@confidencesystemsinc/sdk 1.7.7 → 1.7.8

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/index.cjs CHANGED
@@ -18,7 +18,7 @@ object-assign
18
18
  @license MIT
19
19
  */var dc,kp;function D1(){if(kp)return dc;kp=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 s={},a=0;a<10;a++)s["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(s).map(function(u){return s[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return dc=o()?Object.assign:function(i,s){for(var a,l=r(i),c,u=1;u<arguments.length;u++){a=Object(arguments[u]);for(var f in a)t.call(a,f)&&(l[f]=a[f]);if(e){c=e(a);for(var d=0;d<c.length;d++)n.call(a,c[d])&&(l[c[d]]=a[c[d]])}}return l},dc}var pc,Tp;function Hf(){if(Tp)return pc;Tp=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return pc=e,pc}var hc,Np;function a0(){return Np||(Np=1,hc=Function.call.bind(Object.prototype.hasOwnProperty)),hc}var mc,Op;function F1(){if(Op)return mc;Op=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Hf(),n={},r=a0();e=function(i){var s="Warning: "+i;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function o(i,s,a,l,c){if(process.env.NODE_ENV!=="production"){for(var u in i)if(r(i,u)){var f;try{if(typeof i[u]!="function"){var d=Error((l||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}f=i[u](s,u,l,a,null,t)}catch(h){f=h}if(f&&!(f instanceof Error)&&e((l||"React class")+": type specification of "+a+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var p=c?c():"";e("Failed "+a+" type: "+f.message+(p??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},mc=o,mc}var gc,Pp;function j1(){if(Pp)return gc;Pp=1;var e=s0(),t=D1(),n=Hf(),r=a0(),o=F1(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function s(){return null}return gc=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function f(L){var F=L&&(c&&L[c]||L[u]);if(typeof F=="function")return F}var d="<<anonymous>>",p={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:v(),arrayOf:b,element:w(),elementType:A(),instanceOf:_,node:P(),objectOf:S,oneOf:E,oneOfType:N,shape:W,exact:j};function h(L,F){return L===F?L!==0||1/L===1/F:L!==L&&F!==F}function g(L,F){this.message=L,this.data=F&&typeof F=="object"?F:{},this.stack=""}g.prototype=Error.prototype;function m(L){if(process.env.NODE_ENV!=="production")var F={},K=0;function B(V,ee,te,he,ye,me,ze){if(he=he||d,me=me||te,ze!==n){if(l){var G=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 G.name="Invariant Violation",G}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var qe=he+":"+te;!F[qe]&&K<3&&(i("You are manually calling a React.PropTypes validation function for the `"+me+"` prop on `"+he+"`. 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."),F[qe]=!0,K++)}}return ee[te]==null?V?ee[te]===null?new g("The "+ye+" `"+me+"` is marked as required "+("in `"+he+"`, but its value is `null`.")):new g("The "+ye+" `"+me+"` is marked as required in "+("`"+he+"`, but its value is `undefined`.")):null:L(ee,te,he,ye,me)}var J=B.bind(null,!1);return J.isRequired=B.bind(null,!0),J}function y(L){function F(K,B,J,V,ee,te){var he=K[B],ye=Q(he);if(ye!==L){var me=oe(he);return new g("Invalid "+V+" `"+ee+"` of type "+("`"+me+"` supplied to `"+J+"`, expected ")+("`"+L+"`."),{expectedType:L})}return null}return m(F)}function v(){return m(s)}function b(L){function F(K,B,J,V,ee){if(typeof L!="function")return new g("Property `"+ee+"` of component `"+J+"` has invalid PropType notation inside arrayOf.");var te=K[B];if(!Array.isArray(te)){var he=Q(te);return new g("Invalid "+V+" `"+ee+"` of type "+("`"+he+"` supplied to `"+J+"`, expected an array."))}for(var ye=0;ye<te.length;ye++){var me=L(te,ye,J,V,ee+"["+ye+"]",n);if(me instanceof Error)return me}return null}return m(F)}function w(){function L(F,K,B,J,V){var ee=F[K];if(!a(ee)){var te=Q(ee);return new g("Invalid "+J+" `"+V+"` of type "+("`"+te+"` supplied to `"+B+"`, expected a single ReactElement."))}return null}return m(L)}function A(){function L(F,K,B,J,V){var ee=F[K];if(!e.isValidElementType(ee)){var te=Q(ee);return new g("Invalid "+J+" `"+V+"` of type "+("`"+te+"` supplied to `"+B+"`, expected a single ReactElement type."))}return null}return m(L)}function _(L){function F(K,B,J,V,ee){if(!(K[B]instanceof L)){var te=L.name||d,he=re(K[B]);return new g("Invalid "+V+" `"+ee+"` of type "+("`"+he+"` supplied to `"+J+"`, expected ")+("instance of `"+te+"`."))}return null}return m(F)}function E(L){if(!Array.isArray(L))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.")),s;function F(K,B,J,V,ee){for(var te=K[B],he=0;he<L.length;he++)if(h(te,L[he]))return null;var ye=JSON.stringify(L,function(ze,G){var qe=oe(G);return qe==="symbol"?String(G):G});return new g("Invalid "+V+" `"+ee+"` of value `"+String(te)+"` "+("supplied to `"+J+"`, expected one of "+ye+"."))}return m(F)}function S(L){function F(K,B,J,V,ee){if(typeof L!="function")return new g("Property `"+ee+"` of component `"+J+"` has invalid PropType notation inside objectOf.");var te=K[B],he=Q(te);if(he!=="object")return new g("Invalid "+V+" `"+ee+"` of type "+("`"+he+"` supplied to `"+J+"`, expected an object."));for(var ye in te)if(r(te,ye)){var me=L(te,ye,J,V,ee+"."+ye,n);if(me instanceof Error)return me}return null}return m(F)}function N(L){if(!Array.isArray(L))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var F=0;F<L.length;F++){var K=L[F];if(typeof K!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+M(K)+" at index "+F+"."),s}function B(J,V,ee,te,he){for(var ye=[],me=0;me<L.length;me++){var ze=L[me],G=ze(J,V,ee,te,he,n);if(G==null)return null;G.data&&r(G.data,"expectedType")&&ye.push(G.data.expectedType)}var qe=ye.length>0?", expected one of type ["+ye.join(", ")+"]":"";return new g("Invalid "+te+" `"+he+"` supplied to "+("`"+ee+"`"+qe+"."))}return m(B)}function P(){function L(F,K,B,J,V){return z(F[K])?null:new g("Invalid "+J+" `"+V+"` supplied to "+("`"+B+"`, expected a ReactNode."))}return m(L)}function I(L,F,K,B,J){return new g((L||"React class")+": "+F+" type `"+K+"."+B+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+J+"`.")}function W(L){function F(K,B,J,V,ee){var te=K[B],he=Q(te);if(he!=="object")return new g("Invalid "+V+" `"+ee+"` of type `"+he+"` "+("supplied to `"+J+"`, expected `object`."));for(var ye in L){var me=L[ye];if(typeof me!="function")return I(J,V,ee,ye,oe(me));var ze=me(te,ye,J,V,ee+"."+ye,n);if(ze)return ze}return null}return m(F)}function j(L){function F(K,B,J,V,ee){var te=K[B],he=Q(te);if(he!=="object")return new g("Invalid "+V+" `"+ee+"` of type `"+he+"` "+("supplied to `"+J+"`, expected `object`."));var ye=t({},K[B],L);for(var me in ye){var ze=L[me];if(r(L,me)&&typeof ze!="function")return I(J,V,ee,me,oe(ze));if(!ze)return new g("Invalid "+V+" `"+ee+"` key `"+me+"` supplied to `"+J+"`.\nBad object: "+JSON.stringify(K[B],null," ")+`
20
20
  Valid keys: `+JSON.stringify(Object.keys(L),null," "));var G=ze(te,me,J,V,ee+"."+me,n);if(G)return G}return null}return m(F)}function z(L){switch(typeof L){case"number":case"string":case"undefined":return!0;case"boolean":return!L;case"object":if(Array.isArray(L))return L.every(z);if(L===null||a(L))return!0;var F=f(L);if(F){var K=F.call(L),B;if(F!==L.entries){for(;!(B=K.next()).done;)if(!z(B.value))return!1}else for(;!(B=K.next()).done;){var J=B.value;if(J&&!z(J[1]))return!1}}else return!1;return!0;default:return!1}}function Y(L,F){return L==="symbol"?!0:F?F["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&F instanceof Symbol:!1}function Q(L){var F=typeof L;return Array.isArray(L)?"array":L instanceof RegExp?"object":Y(F,L)?"symbol":F}function oe(L){if(typeof L>"u"||L===null)return""+L;var F=Q(L);if(F==="object"){if(L instanceof Date)return"date";if(L instanceof RegExp)return"regexp"}return F}function M(L){var F=oe(L);switch(F){case"array":case"object":return"an "+F;case"boolean":case"date":case"regexp":return"a "+F;default:return F}}function re(L){return!L.constructor||!L.constructor.name?d:L.constructor.name}return p.checkPropTypes=o,p.resetWarningCache=o.resetWarningCache,p.PropTypes=p,p},gc}var yc,Mp;function z1(){if(Mp)return yc;Mp=1;var e=Hf();function t(){}function n(){}return n.resetWarningCache=t,yc=function(){function r(s,a,l,c,u,f){if(f!==e){var d=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 d.name="Invariant Violation",d}}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},yc}var Ip;function $1(){if(Ip)return fa.exports;if(Ip=1,process.env.NODE_ENV!=="production"){var e=s0(),t=!0;fa.exports=j1()(e.isElement,t)}else fa.exports=z1()();return fa.exports}var U1=$1();const ge=I1(U1);var B1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function l0(e,t){return e(t={exports:{}},t.exports),t.exports}var W1=l0((function(e){(function(t){var n=function(m,y,v){if(!l(y)||u(y)||f(y)||d(y)||a(y))return y;var b,w=0,A=0;if(c(y))for(b=[],A=y.length;w<A;w++)b.push(n(m,y[w],v));else for(var _ in b={},y)Object.prototype.hasOwnProperty.call(y,_)&&(b[m(_,v)]=n(m,y[_],v));return b},r=function(m){return p(m)?m:(m=m.replace(/[\-_\s]+(.)?/g,(function(y,v){return v?v.toUpperCase():""}))).substr(0,1).toLowerCase()+m.substr(1)},o=function(m){var y=r(m);return y.substr(0,1).toUpperCase()+y.substr(1)},i=function(m,y){return(function(v,b){var w=(b=b||{}).separator||"_",A=b.split||/(?=[A-Z])/;return v.split(A).join(w)})(m,y).toLowerCase()},s=Object.prototype.toString,a=function(m){return typeof m=="function"},l=function(m){return m===Object(m)},c=function(m){return s.call(m)=="[object Array]"},u=function(m){return s.call(m)=="[object Date]"},f=function(m){return s.call(m)=="[object RegExp]"},d=function(m){return s.call(m)=="[object Boolean]"},p=function(m){return(m-=0)==m},h=function(m,y){var v=y&&"process"in y?y.process:y;return typeof v!="function"?m:function(b,w){return v(b,m,w)}},g={camelize:r,decamelize:i,pascalize:o,depascalize:i,camelizeKeys:function(m,y){return n(h(r,y),m)},decamelizeKeys:function(m,y){return n(h(i,y),m,y)},pascalizeKeys:function(m,y){return n(h(o,y),m)},depascalizeKeys:function(){return this.decamelizeKeys.apply(this,arguments)}};e.exports?e.exports=g:t.humps=g})(B1)})).decamelize,K1=function(e){if(Array.isArray(e))return e},H1=function(e,t){if(typeof Symbol<"u"&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(l){o=!0,i=l}finally{try{r||a.return==null||a.return()}finally{if(o)throw i}}return n}},Lp=function(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},q1=function(e,t){if(e){if(typeof e=="string")return Lp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Lp(e,t):void 0}},V1=function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
21
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)},Y1=function(e,t){return K1(e)||H1(e,t)||q1(e,t)||V1()},c0=l0((function(e){function t(){return e.exports=t=Object.assign||function(n){for(var r=1;r<arguments.length;r++){var o=arguments[r];for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(n[i]=o[i])}return n},t.apply(this,arguments)}e.exports=t})),Q1=function(e,t){if(e==null)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o},u0=function(e,t){if(e==null)return{};var n,r,o=Q1(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o},G1=T.createContext(null);function f0(e){var t=e.children,n=t===void 0?"":t,r=u0(e,["children"]);return typeof n!="string"&&(n=P1.renderToString(n)),T.createElement("template",c0({},r,{dangerouslySetInnerHTML:{__html:n}}))}function d0(e){var t=e.root,n=e.children;return Nn.createPortal(n===void 0?null:n,t)}function Z1(e){var t=T.forwardRef((function(n,r){var o,i,s=n.mode,a=s===void 0?"open":s,l=n.delegatesFocus,c=l!==void 0&&l,u=n.styleSheets,f=u===void 0?[]:u,d=n.ssr,p=d!==void 0&&d,h=n.children,g=u0(n,["mode","delegatesFocus","styleSheets","ssr","children"]),m=(i=T.useRef((o=r)&&o.current),T.useEffect((function(){o&&(o.current=i.current)}),[o]),i),y=T.useState(null),v=Y1(y,2),b=v[0],w=v[1],A="node_".concat(a).concat(c);return T.useLayoutEffect((function(){if(m.current)try{if(typeof r=="function"&&r(m.current),p){var _=m.current.shadowRoot;return void w(_)}var E=m.current.attachShadow({mode:a,delegatesFocus:c});f.length>0&&(E.adoptedStyleSheets=f),w(E)}catch(S){(function(N){var P=N.error,I=N.styleSheets,W=N.root;switch(P.name){case"NotSupportedError":I.length>0&&(W.adoptedStyleSheets=I);break;default:throw P}})({error:S,styleSheets:f,root:b})}}),[r,m,f]),T.createElement(T.Fragment,null,T.createElement(e.tag,c0({key:A,ref:m},g),(b||p)&&T.createElement(G1.Provider,{value:b},p?T.createElement(f0,{shadowroot:a,shadowrootmode:a},e.render({root:b,ssr:p,children:h})):T.createElement(d0,{root:b},e.render({root:b,ssr:p,children:h})))))}));return t.propTypes={mode:ge.oneOf(["open","closed"]),delegatesFocus:ge.bool,styleSheets:ge.arrayOf(ge.instanceOf(globalThis.CSSStyleSheet)),ssr:ge.bool,children:ge.node},t}f0.propTypes={children:ge.oneOfType([ge.string,ge.node])},d0.propTypes={root:ge.object.isRequired,children:ge.node};var vc=new Map;function J1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"core",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(r){return r.children};return new Proxy(e,{get:function(r,o){var i=W1(o,{separator:"-"}),s="".concat(t,"-").concat(i);return vc.has(s)||vc.set(s,Z1({tag:i,render:n})),vc.get(s)}})}var Cl=J1();const p0="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAYCAYAAADpnJ2CAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAGpSURBVHgBpVbRdYMwDDR9/S8jeARGYIRuUDpBuwHJBGQDskG6ASOQDcwGdANVLnJRHdmIRO/dI8D5zgIhpTAbAQAlHiqEJUyEa1EU30YRqFHj4Q1xzJIQF8QMSziGEAPi1eTNPhi/lwglomOCDWUZc/yGzkEIYQWtlpnNNxwSGimL2ijCi7DMLbveR2aVtHiMFypN/UZPlLUlHR6iWXuPWaQRsuXRpIjyTb1ZDWuBQVaPnvfAzLs9mcL/SoTNzXMCLJ9CiFZh1glmh9yCmkhldB7CgVzyvlCGlBlEnxJf+IkYo2uNINSy+1JxcDOv2acMD0DvT2HqSCxpRmt9Q/iS/J5NIrBP+kX+J9+pRXQC/Yj8Q3TtReCZJ7M0YpsyxcO7yUfKbBLZmEUFrGgSHOnx+jgn+M4/epMRnLME8/euNWYhgSondpIKJ2HqclxYmsi4JRRaW3a2KTakb5FU7rczS29WUvb9nkUD3D+e9o82WNuVA+XkgKUVOnhktLGK/DWOK4421sDaSy+5z0praqlF8Rnn2PlMhvUe3UJDogwtImRxRUzav4k8fgCQHVaVoXL9RAAAAABJRU5ErkJggg==";var Ui=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},X1={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},gn,ao,Yg,ew=(Yg=class{constructor(){fe(this,gn,X1);fe(this,ao,!1)}setTimeoutProvider(e){process.env.NODE_ENV!=="production"&&k(this,ao)&&e!==k(this,gn)&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:k(this,gn),provider:e}),ne(this,gn,e),process.env.NODE_ENV!=="production"&&ne(this,ao,!1)}setTimeout(e,t){return process.env.NODE_ENV!=="production"&&ne(this,ao,!0),k(this,gn).setTimeout(e,t)}clearTimeout(e){k(this,gn).clearTimeout(e)}setInterval(e,t){return process.env.NODE_ENV!=="production"&&ne(this,ao,!0),k(this,gn).setInterval(e,t)}clearInterval(e){k(this,gn).clearInterval(e)}},gn=new WeakMap,ao=new WeakMap,Yg),ro=new ew;function tw(e){setTimeout(e,0)}var _o=typeof window>"u"||"Deno"in globalThis;function kt(){}function nw(e,t){return typeof e=="function"?e(t):e}function uu(e){return typeof e=="number"&&e>=0&&e!==1/0}function h0(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Nr(e,t){return typeof e=="function"?e(t):e}function qt(e,t){return typeof e=="function"?e(t):e}function Rp(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:s,stale:a}=e;if(s){if(r){if(t.queryHash!==qf(s,t.options))return!1}else if(!Es(t.queryKey,s))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||o&&o!==t.state.fetchStatus||i&&!i(t))}function Dp(e,t){const{exact:n,status:r,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(Eo(t.options.mutationKey)!==Eo(i))return!1}else if(!Es(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function qf(e,t){return((t==null?void 0:t.queryKeyHashFn)||Eo)(e)}function Eo(e){return JSON.stringify(e,(t,n)=>du(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Es(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Es(e[n],t[n])):!1}var rw=Object.prototype.hasOwnProperty;function fu(e,t){if(e===t)return e;const n=Fp(e)&&Fp(t);if(!n&&!(du(e)&&du(t)))return t;const o=(n?e:Object.keys(e)).length,i=n?t:Object.keys(t),s=i.length,a=n?new Array(s):{};let l=0;for(let c=0;c<s;c++){const u=n?c:i[c],f=e[u],d=t[u];if(f===d){a[u]=f,(n?c<o:rw.call(e,u))&&l++;continue}if(f===null||d===null||typeof f!="object"||typeof d!="object"){a[u]=d;continue}const p=fu(f,d);a[u]=p,p===f&&l++}return o===s&&l===o?e:a}function Ya(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Fp(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function du(e){if(!jp(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!jp(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function jp(e){return Object.prototype.toString.call(e)==="[object Object]"}function ow(e){return new Promise(t=>{ro.setTimeout(t,e)})}function pu(e,t,n){if(typeof n.structuralSharing=="function")return n.structuralSharing(e,t);if(n.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return fu(e,t)}catch(r){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${r}`),r}return fu(e,t)}return t}function iw(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function sw(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Qa=Symbol();function m0(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===Qa&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Qa?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Vf(e,t){return typeof e=="function"?e(...t):!!e}function aw(e,t,n){let r=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??(o=t()),r||(r=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),e}var lo,vr,xi,Qg,lw=(Qg=class extends Ui{constructor(){super();fe(this,lo);fe(this,vr);fe(this,xi);ne(this,xi,t=>{if(!_o&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){k(this,vr)||this.setEventListener(k(this,xi))}onUnsubscribe(){var t;this.hasListeners()||((t=k(this,vr))==null||t.call(this),ne(this,vr,void 0))}setEventListener(t){var n;ne(this,xi,t),(n=k(this,vr))==null||n.call(this),ne(this,vr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){k(this,lo)!==t&&(ne(this,lo,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof k(this,lo)=="boolean"?k(this,lo):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},lo=new WeakMap,vr=new WeakMap,xi=new WeakMap,Qg),Yf=new lw;function hu(){let e,t;const n=new Promise((o,i)=>{e=o,t=i});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}var cw=tw;function uw(){let e=[],t=0,n=a=>{a()},r=a=>{a()},o=cw;const i=a=>{t?e.push(a):o(()=>{n(a)})},s=()=>{const a=e;e=[],a.length&&o(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||s()}return l},batchCalls:a=>(...l)=>{i(()=>{a(...l)})},schedule:i,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{o=a}}}var Ze=uw(),wi,br,Ai,Gg,fw=(Gg=class extends Ui{constructor(){super();fe(this,wi,!0);fe(this,br);fe(this,Ai);ne(this,Ai,t=>{if(!_o&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){k(this,br)||this.setEventListener(k(this,Ai))}onUnsubscribe(){var t;this.hasListeners()||((t=k(this,br))==null||t.call(this),ne(this,br,void 0))}setEventListener(t){var n;ne(this,Ai,t),(n=k(this,br))==null||n.call(this),ne(this,br,t(this.setOnline.bind(this)))}setOnline(t){k(this,wi)!==t&&(ne(this,wi,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return k(this,wi)}},wi=new WeakMap,br=new WeakMap,Ai=new WeakMap,Gg),Ga=new fw;function dw(e){return Math.min(1e3*2**e,3e4)}function g0(e){return(e??"online")==="online"?Ga.isOnline():!0}var mu=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function y0(e){let t=!1,n=0,r;const o=hu(),i=()=>o.status!=="pending",s=g=>{var m;if(!i()){const y=new mu(g);d(y),(m=e.onCancel)==null||m.call(e,y)}},a=()=>{t=!0},l=()=>{t=!1},c=()=>Yf.isFocused()&&(e.networkMode==="always"||Ga.isOnline())&&e.canRun(),u=()=>g0(e.networkMode)&&e.canRun(),f=g=>{i()||(r==null||r(),o.resolve(g))},d=g=>{i()||(r==null||r(),o.reject(g))},p=()=>new Promise(g=>{var m;r=y=>{(i()||c())&&g(y)},(m=e.onPause)==null||m.call(e)}).then(()=>{var g;r=void 0,i()||(g=e.onContinue)==null||g.call(e)}),h=()=>{if(i())return;let g;const m=n===0?e.initialPromise:void 0;try{g=m??e.fn()}catch(y){g=Promise.reject(y)}Promise.resolve(g).then(f).catch(y=>{var _;if(i())return;const v=e.retry??(_o?0:3),b=e.retryDelay??dw,w=typeof b=="function"?b(n,y):b,A=v===!0||typeof v=="number"&&n<v||typeof v=="function"&&v(n,y);if(t||!A){d(y);return}n++,(_=e.onFail)==null||_.call(e,n,y),ow(w).then(()=>c()?void 0:p()).then(()=>{t?d(y):h()})})};return{promise:o,status:()=>o.status,cancel:s,continue:()=>(r==null||r(),o),cancelRetry:a,continueRetry:l,canStart:u,start:()=>(u()?h():p().then(h),o)}}var co,Zg,v0=(Zg=class{constructor(){fe(this,co)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),uu(this.gcTime)&&ne(this,co,ro.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(_o?1/0:300*1e3))}clearGcTimeout(){k(this,co)&&(ro.clearTimeout(k(this,co)),ne(this,co,void 0))}},co=new WeakMap,Zg),uo,Ci,Ht,fo,tt,Us,po,rn,$n,Jg,pw=(Jg=class extends v0{constructor(t){super();fe(this,rn);fe(this,uo);fe(this,Ci);fe(this,Ht);fe(this,fo);fe(this,tt);fe(this,Us);fe(this,po);ne(this,po,!1),ne(this,Us,t.defaultOptions),this.setOptions(t.options),this.observers=[],ne(this,fo,t.client),ne(this,Ht,k(this,fo).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ne(this,uo,$p(this.options)),this.state=t.state??k(this,uo),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=k(this,tt))==null?void 0:t.promise}setOptions(t){if(this.options={...k(this,Us),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=$p(this.options);n.data!==void 0&&(this.setState(zp(n.data,n.dataUpdatedAt)),ne(this,uo,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&k(this,Ht).remove(this)}setData(t,n){const r=pu(this.state.data,t,this.options);return ve(this,rn,$n).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){ve(this,rn,$n).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=k(this,tt))==null?void 0:r.promise;return(o=k(this,tt))==null||o.cancel(t),n?n.then(kt).catch(kt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(k(this,uo))}isActive(){return this.observers.some(t=>qt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Qa||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Nr(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!h0(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=k(this,tt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=k(this,tt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),k(this,Ht).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(k(this,tt)&&(k(this,po)?k(this,tt).cancel({revert:!0}):k(this,tt).cancelRetry()),this.scheduleGc()),k(this,Ht).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ve(this,rn,$n).call(this,{type:"invalidate"})}async fetch(t,n){var l,c,u,f,d,p,h,g,m,y,v,b;if(this.state.fetchStatus!=="idle"&&((l=k(this,tt))==null?void 0:l.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(k(this,tt))return k(this,tt).continueRetry(),k(this,tt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const w=this.observers.find(A=>A.options.queryFn);w&&this.setOptions(w.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const r=new AbortController,o=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(ne(this,po,!0),r.signal)})},i=()=>{const w=m0(this.options,n),_=(()=>{const E={client:k(this,fo),queryKey:this.queryKey,meta:this.meta};return o(E),E})();return ne(this,po,!1),this.options.persister?this.options.persister(w,_,this):w(_)},a=(()=>{const w={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:k(this,fo),state:this.state,fetchFn:i};return o(w),w})();(c=this.options.behavior)==null||c.onFetch(a,this),ne(this,Ci,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=a.fetchOptions)==null?void 0:u.meta))&&ve(this,rn,$n).call(this,{type:"fetch",meta:(f=a.fetchOptions)==null?void 0:f.meta}),ne(this,tt,y0({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,onCancel:w=>{w instanceof mu&&w.revert&&this.setState({...k(this,Ci),fetchStatus:"idle"}),r.abort()},onFail:(w,A)=>{ve(this,rn,$n).call(this,{type:"failed",failureCount:w,error:A})},onPause:()=>{ve(this,rn,$n).call(this,{type:"pause"})},onContinue:()=>{ve(this,rn,$n).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}));try{const w=await k(this,tt).start();if(w===void 0)throw process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),new Error(`${this.queryHash} data is undefined`);return this.setData(w),(p=(d=k(this,Ht).config).onSuccess)==null||p.call(d,w,this),(g=(h=k(this,Ht).config).onSettled)==null||g.call(h,w,this.state.error,this),w}catch(w){if(w instanceof mu){if(w.silent)return k(this,tt).promise;if(w.revert){if(this.state.data===void 0)throw w;return this.state.data}}throw ve(this,rn,$n).call(this,{type:"error",error:w}),(y=(m=k(this,Ht).config).onError)==null||y.call(m,w,this),(b=(v=k(this,Ht).config).onSettled)==null||b.call(v,this.state.data,w,this),w}finally{this.scheduleGc()}}},uo=new WeakMap,Ci=new WeakMap,Ht=new WeakMap,fo=new WeakMap,tt=new WeakMap,Us=new WeakMap,po=new WeakMap,rn=new WeakSet,$n=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...b0(r.data,this.options),fetchMeta:t.meta??null};case"success":const o={...r,...zp(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ne(this,Ci,t.manual?o:void 0),o;case"error":const i=t.error;return{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Ze.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),k(this,Ht).notify({query:this,type:"updated",action:t})})},Jg);function b0(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:g0(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function zp(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function $p(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Lt,_e,Bs,Et,ho,_i,Hn,xr,Ws,Ei,Si,mo,go,wr,ki,Me,ps,gu,yu,vu,bu,xu,wu,Au,x0,Xg,hw=(Xg=class extends Ui{constructor(t,n){super();fe(this,Me);fe(this,Lt);fe(this,_e);fe(this,Bs);fe(this,Et);fe(this,ho);fe(this,_i);fe(this,Hn);fe(this,xr);fe(this,Ws);fe(this,Ei);fe(this,Si);fe(this,mo);fe(this,go);fe(this,wr);fe(this,ki,new Set);this.options=n,ne(this,Lt,t),ne(this,xr,null),ne(this,Hn,hu()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(k(this,_e).addObserver(this),Up(k(this,_e),this.options)?ve(this,Me,ps).call(this):this.updateResult(),ve(this,Me,bu).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Cu(k(this,_e),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Cu(k(this,_e),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ve(this,Me,xu).call(this),ve(this,Me,wu).call(this),k(this,_e).removeObserver(this)}setOptions(t){const n=this.options,r=k(this,_e);if(this.options=k(this,Lt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof qt(this.options.enabled,k(this,_e))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ve(this,Me,Au).call(this),k(this,_e).setOptions(this.options),n._defaulted&&!Ya(this.options,n)&&k(this,Lt).getQueryCache().notify({type:"observerOptionsUpdated",query:k(this,_e),observer:this});const o=this.hasListeners();o&&Bp(k(this,_e),r,this.options,n)&&ve(this,Me,ps).call(this),this.updateResult(),o&&(k(this,_e)!==r||qt(this.options.enabled,k(this,_e))!==qt(n.enabled,k(this,_e))||Nr(this.options.staleTime,k(this,_e))!==Nr(n.staleTime,k(this,_e)))&&ve(this,Me,gu).call(this);const i=ve(this,Me,yu).call(this);o&&(k(this,_e)!==r||qt(this.options.enabled,k(this,_e))!==qt(n.enabled,k(this,_e))||i!==k(this,wr))&&ve(this,Me,vu).call(this,i)}getOptimisticResult(t){const n=k(this,Lt).getQueryCache().build(k(this,Lt),t),r=this.createResult(n,t);return gw(this,r)&&(ne(this,Et,r),ne(this,_i,this.options),ne(this,ho,k(this,_e).state)),r}getCurrentResult(){return k(this,Et)}trackResult(t,n){return new Proxy(t,{get:(r,o)=>(this.trackProp(o),n==null||n(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&k(this,Hn).status==="pending"&&k(this,Hn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,o))})}trackProp(t){k(this,ki).add(t)}getCurrentQuery(){return k(this,_e)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=k(this,Lt).defaultQueryOptions(t),r=k(this,Lt).getQueryCache().build(k(this,Lt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return ve(this,Me,ps).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),k(this,Et)))}createResult(t,n){var N;const r=k(this,_e),o=this.options,i=k(this,Et),s=k(this,ho),a=k(this,_i),c=t!==r?t.state:k(this,Bs),{state:u}=t;let f={...u},d=!1,p;if(n._optimisticResults){const P=this.hasListeners(),I=!P&&Up(t,n),W=P&&Bp(t,r,n,o);(I||W)&&(f={...f,...b0(u.data,t.options)}),n._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:h,errorUpdatedAt:g,status:m}=f;p=f.data;let y=!1;if(n.placeholderData!==void 0&&p===void 0&&m==="pending"){let P;i!=null&&i.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData)?(P=i.data,y=!0):P=typeof n.placeholderData=="function"?n.placeholderData((N=k(this,Si))==null?void 0:N.state.data,k(this,Si)):n.placeholderData,P!==void 0&&(m="success",p=pu(i==null?void 0:i.data,P,n),d=!0)}if(n.select&&p!==void 0&&!y)if(i&&p===(s==null?void 0:s.data)&&n.select===k(this,Ws))p=k(this,Ei);else try{ne(this,Ws,n.select),p=n.select(p),p=pu(i==null?void 0:i.data,p,n),ne(this,Ei,p),ne(this,xr,null)}catch(P){ne(this,xr,P)}k(this,xr)&&(h=k(this,xr),p=k(this,Ei),g=Date.now(),m="error");const v=f.fetchStatus==="fetching",b=m==="pending",w=m==="error",A=b&&v,_=p!==void 0,S={status:m,fetchStatus:f.fetchStatus,isPending:b,isSuccess:m==="success",isError:w,isInitialLoading:A,isLoading:A,data:p,dataUpdatedAt:f.dataUpdatedAt,error:h,errorUpdatedAt:g,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>c.dataUpdateCount||f.errorUpdateCount>c.errorUpdateCount,isFetching:v,isRefetching:v&&!b,isLoadingError:w&&!_,isPaused:f.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:w&&_,isStale:Qf(t,n),refetch:this.refetch,promise:k(this,Hn),isEnabled:qt(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const P=j=>{S.status==="error"?j.reject(S.error):S.data!==void 0&&j.resolve(S.data)},I=()=>{const j=ne(this,Hn,S.promise=hu());P(j)},W=k(this,Hn);switch(W.status){case"pending":t.queryHash===r.queryHash&&P(W);break;case"fulfilled":(S.status==="error"||S.data!==W.value)&&I();break;case"rejected":(S.status!=="error"||S.error!==W.reason)&&I();break}}return S}updateResult(){const t=k(this,Et),n=this.createResult(k(this,_e),this.options);if(ne(this,ho,k(this,_e).state),ne(this,_i,this.options),k(this,ho).data!==void 0&&ne(this,Si,k(this,_e)),Ya(n,t))return;ne(this,Et,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,i=typeof o=="function"?o():o;if(i==="all"||!i&&!k(this,ki).size)return!0;const s=new Set(i??k(this,ki));return this.options.throwOnError&&s.add("error"),Object.keys(k(this,Et)).some(a=>{const l=a;return k(this,Et)[l]!==t[l]&&s.has(l)})};ve(this,Me,x0).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ve(this,Me,bu).call(this)}},Lt=new WeakMap,_e=new WeakMap,Bs=new WeakMap,Et=new WeakMap,ho=new WeakMap,_i=new WeakMap,Hn=new WeakMap,xr=new WeakMap,Ws=new WeakMap,Ei=new WeakMap,Si=new WeakMap,mo=new WeakMap,go=new WeakMap,wr=new WeakMap,ki=new WeakMap,Me=new WeakSet,ps=function(t){ve(this,Me,Au).call(this);let n=k(this,_e).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(kt)),n},gu=function(){ve(this,Me,xu).call(this);const t=Nr(this.options.staleTime,k(this,_e));if(_o||k(this,Et).isStale||!uu(t))return;const r=h0(k(this,Et).dataUpdatedAt,t)+1;ne(this,mo,ro.setTimeout(()=>{k(this,Et).isStale||this.updateResult()},r))},yu=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(k(this,_e)):this.options.refetchInterval)??!1},vu=function(t){ve(this,Me,wu).call(this),ne(this,wr,t),!(_o||qt(this.options.enabled,k(this,_e))===!1||!uu(k(this,wr))||k(this,wr)===0)&&ne(this,go,ro.setInterval(()=>{(this.options.refetchIntervalInBackground||Yf.isFocused())&&ve(this,Me,ps).call(this)},k(this,wr)))},bu=function(){ve(this,Me,gu).call(this),ve(this,Me,vu).call(this,ve(this,Me,yu).call(this))},xu=function(){k(this,mo)&&(ro.clearTimeout(k(this,mo)),ne(this,mo,void 0))},wu=function(){k(this,go)&&(ro.clearInterval(k(this,go)),ne(this,go,void 0))},Au=function(){const t=k(this,Lt).getQueryCache().build(k(this,Lt),this.options);if(t===k(this,_e))return;const n=k(this,_e);ne(this,_e,t),ne(this,Bs,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},x0=function(t){Ze.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(k(this,Et))}),k(this,Lt).getQueryCache().notify({query:k(this,_e),type:"observerResultsUpdated"})})},Xg);function mw(e,t){return qt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Up(e,t){return mw(e,t)||e.state.data!==void 0&&Cu(e,t,t.refetchOnMount)}function Cu(e,t,n){if(qt(t.enabled,e)!==!1&&Nr(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Qf(e,t)}return!1}function Bp(e,t,n,r){return(e!==t||qt(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Qf(e,n)}function Qf(e,t){return qt(t.enabled,e)!==!1&&e.isStaleByTime(Nr(t.staleTime,e))}function gw(e,t){return!Ya(e.getCurrentResult(),t)}function Wp(e){return{onFetch:(t,n)=>{var u,f,d,p,h;const r=t.options,o=(d=(f=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:f.fetchMore)==null?void 0:d.direction,i=((p=t.state.data)==null?void 0:p.pages)||[],s=((h=t.state.data)==null?void 0:h.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let g=!1;const m=b=>{aw(b,()=>t.signal,()=>g=!0)},y=m0(t.options,t.fetchOptions),v=async(b,w,A)=>{if(g)return Promise.reject();if(w==null&&b.pages.length)return Promise.resolve(b);const E=(()=>{const I={client:t.client,queryKey:t.queryKey,pageParam:w,direction:A?"backward":"forward",meta:t.options.meta};return m(I),I})(),S=await y(E),{maxPages:N}=t.options,P=A?sw:iw;return{pages:P(b.pages,S,N),pageParams:P(b.pageParams,w,N)}};if(o&&i.length){const b=o==="backward",w=b?yw:Kp,A={pages:i,pageParams:s},_=w(r,A);a=await v(A,_,b)}else{const b=e??i.length;do{const w=l===0?s[0]??r.initialPageParam:Kp(r,a);if(l>0&&w==null)break;a=await v(a,w),l++}while(l<b)}return a};t.options.persister?t.fetchFn=()=>{var g,m;return(m=(g=t.options).persister)==null?void 0:m.call(g,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function Kp(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function yw(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Ks,yn,St,yo,vn,mr,e0,vw=(e0=class extends v0{constructor(t){super();fe(this,vn);fe(this,Ks);fe(this,yn);fe(this,St);fe(this,yo);ne(this,Ks,t.client),this.mutationId=t.mutationId,ne(this,St,t.mutationCache),ne(this,yn,[]),this.state=t.state||w0(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){k(this,yn).includes(t)||(k(this,yn).push(t),this.clearGcTimeout(),k(this,St).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ne(this,yn,k(this,yn).filter(n=>n!==t)),this.scheduleGc(),k(this,St).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){k(this,yn).length||(this.state.status==="pending"?this.scheduleGc():k(this,St).remove(this))}continue(){var t;return((t=k(this,yo))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,a,l,c,u,f,d,p,h,g,m,y,v,b,w,A,_,E,S,N;const n=()=>{ve(this,vn,mr).call(this,{type:"continue"})},r={client:k(this,Ks),meta:this.options.meta,mutationKey:this.options.mutationKey};ne(this,yo,y0({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(P,I)=>{ve(this,vn,mr).call(this,{type:"failed",failureCount:P,error:I})},onPause:()=>{ve(this,vn,mr).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>k(this,St).canRun(this)}));const o=this.state.status==="pending",i=!k(this,yo).canStart();try{if(o)n();else{ve(this,vn,mr).call(this,{type:"pending",variables:t,isPaused:i}),await((a=(s=k(this,St).config).onMutate)==null?void 0:a.call(s,t,this,r));const I=await((c=(l=this.options).onMutate)==null?void 0:c.call(l,t,r));I!==this.state.context&&ve(this,vn,mr).call(this,{type:"pending",context:I,variables:t,isPaused:i})}const P=await k(this,yo).start();return await((f=(u=k(this,St).config).onSuccess)==null?void 0:f.call(u,P,t,this.state.context,this,r)),await((p=(d=this.options).onSuccess)==null?void 0:p.call(d,P,t,this.state.context,r)),await((g=(h=k(this,St).config).onSettled)==null?void 0:g.call(h,P,null,this.state.variables,this.state.context,this,r)),await((y=(m=this.options).onSettled)==null?void 0:y.call(m,P,null,t,this.state.context,r)),ve(this,vn,mr).call(this,{type:"success",data:P}),P}catch(P){try{await((b=(v=k(this,St).config).onError)==null?void 0:b.call(v,P,t,this.state.context,this,r))}catch(I){Promise.reject(I)}try{await((A=(w=this.options).onError)==null?void 0:A.call(w,P,t,this.state.context,r))}catch(I){Promise.reject(I)}try{await((E=(_=k(this,St).config).onSettled)==null?void 0:E.call(_,void 0,P,this.state.variables,this.state.context,this,r))}catch(I){Promise.reject(I)}try{await((N=(S=this.options).onSettled)==null?void 0:N.call(S,void 0,P,t,this.state.context,r))}catch(I){Promise.reject(I)}throw ve(this,vn,mr).call(this,{type:"error",error:P}),P}finally{k(this,St).runNext(this)}}},Ks=new WeakMap,yn=new WeakMap,St=new WeakMap,yo=new WeakMap,vn=new WeakSet,mr=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Ze.batch(()=>{k(this,yn).forEach(r=>{r.onMutationUpdate(t)}),k(this,St).notify({mutation:this,type:"updated",action:t})})},e0);function w0(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var qn,on,Hs,t0,bw=(t0=class extends Ui{constructor(t={}){super();fe(this,qn);fe(this,on);fe(this,Hs);this.config=t,ne(this,qn,new Set),ne(this,on,new Map),ne(this,Hs,0)}build(t,n,r){const o=new vw({client:t,mutationCache:this,mutationId:++ua(this,Hs)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){k(this,qn).add(t);const n=pa(t);if(typeof n=="string"){const r=k(this,on).get(n);r?r.push(t):k(this,on).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(k(this,qn).delete(t)){const n=pa(t);if(typeof n=="string"){const r=k(this,on).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&k(this,on).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=pa(t);if(typeof n=="string"){const r=k(this,on).get(n),o=r==null?void 0:r.find(i=>i.state.status==="pending");return!o||o===t}else return!0}runNext(t){var r;const n=pa(t);if(typeof n=="string"){const o=(r=k(this,on).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ze.batch(()=>{k(this,qn).forEach(t=>{this.notify({type:"removed",mutation:t})}),k(this,qn).clear(),k(this,on).clear()})}getAll(){return Array.from(k(this,qn))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Dp(n,r))}findAll(t={}){return this.getAll().filter(n=>Dp(t,n))}notify(t){Ze.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Ze.batch(()=>Promise.all(t.map(n=>n.continue().catch(kt))))}},qn=new WeakMap,on=new WeakMap,Hs=new WeakMap,t0);function pa(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Vn,Ar,Rt,Yn,Jn,Ia,_u,n0,xw=(n0=class extends Ui{constructor(n,r){super();fe(this,Jn);fe(this,Vn);fe(this,Ar);fe(this,Rt);fe(this,Yn);ne(this,Vn,n),this.setOptions(r),this.bindMethods(),ve(this,Jn,Ia).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var o;const r=this.options;this.options=k(this,Vn).defaultMutationOptions(n),Ya(this.options,r)||k(this,Vn).getMutationCache().notify({type:"observerOptionsUpdated",mutation:k(this,Rt),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Eo(r.mutationKey)!==Eo(this.options.mutationKey)?this.reset():((o=k(this,Rt))==null?void 0:o.state.status)==="pending"&&k(this,Rt).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=k(this,Rt))==null||n.removeObserver(this)}onMutationUpdate(n){ve(this,Jn,Ia).call(this),ve(this,Jn,_u).call(this,n)}getCurrentResult(){return k(this,Ar)}reset(){var n;(n=k(this,Rt))==null||n.removeObserver(this),ne(this,Rt,void 0),ve(this,Jn,Ia).call(this),ve(this,Jn,_u).call(this)}mutate(n,r){var o;return ne(this,Yn,r),(o=k(this,Rt))==null||o.removeObserver(this),ne(this,Rt,k(this,Vn).getMutationCache().build(k(this,Vn),this.options)),k(this,Rt).addObserver(this),k(this,Rt).execute(n)}},Vn=new WeakMap,Ar=new WeakMap,Rt=new WeakMap,Yn=new WeakMap,Jn=new WeakSet,Ia=function(){var r;const n=((r=k(this,Rt))==null?void 0:r.state)??w0();ne(this,Ar,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},_u=function(n){Ze.batch(()=>{var r,o,i,s,a,l,c,u;if(k(this,Yn)&&this.hasListeners()){const f=k(this,Ar).variables,d=k(this,Ar).context,p={client:k(this,Vn),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(o=(r=k(this,Yn)).onSuccess)==null||o.call(r,n.data,f,d,p)}catch(h){Promise.reject(h)}try{(s=(i=k(this,Yn)).onSettled)==null||s.call(i,n.data,null,f,d,p)}catch(h){Promise.reject(h)}}else if((n==null?void 0:n.type)==="error"){try{(l=(a=k(this,Yn)).onError)==null||l.call(a,n.error,f,d,p)}catch(h){Promise.reject(h)}try{(u=(c=k(this,Yn)).onSettled)==null||u.call(c,void 0,n.error,f,d,p)}catch(h){Promise.reject(h)}}}this.listeners.forEach(f=>{f(k(this,Ar))})})},n0),bn,r0,ww=(r0=class extends Ui{constructor(t={}){super();fe(this,bn);this.config=t,ne(this,bn,new Map)}build(t,n,r){const o=n.queryKey,i=n.queryHash??qf(o,n);let s=this.get(i);return s||(s=new pw({client:t,queryKey:o,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(s)),s}add(t){k(this,bn).has(t.queryHash)||(k(this,bn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=k(this,bn).get(t.queryHash);n&&(t.destroy(),n===t&&k(this,bn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ze.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return k(this,bn).get(t)}getAll(){return[...k(this,bn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Rp(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Rp(t,r)):n}notify(t){Ze.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Ze.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ze.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},bn=new WeakMap,r0),Ke,Cr,_r,Ti,Ni,Er,Oi,Pi,o0,A0=(o0=class{constructor(e={}){fe(this,Ke);fe(this,Cr);fe(this,_r);fe(this,Ti);fe(this,Ni);fe(this,Er);fe(this,Oi);fe(this,Pi);ne(this,Ke,e.queryCache||new ww),ne(this,Cr,e.mutationCache||new bw),ne(this,_r,e.defaultOptions||{}),ne(this,Ti,new Map),ne(this,Ni,new Map),ne(this,Er,0)}mount(){ua(this,Er)._++,k(this,Er)===1&&(ne(this,Oi,Yf.subscribe(async e=>{e&&(await this.resumePausedMutations(),k(this,Ke).onFocus())})),ne(this,Pi,Ga.subscribe(async e=>{e&&(await this.resumePausedMutations(),k(this,Ke).onOnline())})))}unmount(){var e,t;ua(this,Er)._--,k(this,Er)===0&&((e=k(this,Oi))==null||e.call(this),ne(this,Oi,void 0),(t=k(this,Pi))==null||t.call(this),ne(this,Pi,void 0))}isFetching(e){return k(this,Ke).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return k(this,Cr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=k(this,Ke).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=k(this,Ke).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Nr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return k(this,Ke).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=k(this,Ke).get(r.queryHash),i=o==null?void 0:o.state.data,s=nw(t,i);if(s!==void 0)return k(this,Ke).build(this,r).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return Ze.batch(()=>k(this,Ke).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=k(this,Ke).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=k(this,Ke);Ze.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=k(this,Ke);return Ze.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Ze.batch(()=>k(this,Ke).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(kt).catch(kt)}invalidateQueries(e,t={}){return Ze.batch(()=>(k(this,Ke).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Ze.batch(()=>k(this,Ke).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let i=o.fetch(void 0,n);return n.throwOnError||(i=i.catch(kt)),o.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(kt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=k(this,Ke).build(this,t);return n.isStaleByTime(Nr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(kt).catch(kt)}fetchInfiniteQuery(e){return e.behavior=Wp(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(kt).catch(kt)}ensureInfiniteQueryData(e){return e.behavior=Wp(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ga.isOnline()?k(this,Cr).resumePausedMutations():Promise.resolve()}getQueryCache(){return k(this,Ke)}getMutationCache(){return k(this,Cr)}getDefaultOptions(){return k(this,_r)}setDefaultOptions(e){ne(this,_r,e)}setQueryDefaults(e,t){k(this,Ti).set(Eo(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...k(this,Ti).values()],n={};return t.forEach(r=>{Es(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){k(this,Ni).set(Eo(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...k(this,Ni).values()],n={};return t.forEach(r=>{Es(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...k(this,_r).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=qf(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Qa&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...k(this,_r).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){k(this,Ke).clear(),k(this,Cr).clear()}},Ke=new WeakMap,Cr=new WeakMap,_r=new WeakMap,Ti=new WeakMap,Ni=new WeakMap,Er=new WeakMap,Oi=new WeakMap,Pi=new WeakMap,o0),C0=C.createContext(void 0),_0=e=>{const t=C.useContext(C0);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Aw=({client:e,children:t})=>(C.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),x.jsx(C0.Provider,{value:e,children:t})),E0=C.createContext(!1),Cw=()=>C.useContext(E0);E0.Provider;function _w(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Ew=C.createContext(_w()),Sw=()=>C.useContext(Ew),kw=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?Vf(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},Tw=e=>{C.useEffect(()=>{e.clearReset()},[e])},Nw=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||Vf(n,[e.error,r])),Ow=e=>{if(e.suspense){const n=o=>o==="static"?o:Math.max(o??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...o)=>n(r(...o)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Pw=(e,t)=>e.isLoading&&e.isFetching&&!t,Mw=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Hp=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Iw(e,t,n){var d,p,h,g;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const r=Cw(),o=Sw(),i=_0(n),s=i.defaultQueryOptions(e);(p=(d=i.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||p.call(d,s);const a=i.getQueryCache().get(s.queryHash);process.env.NODE_ENV!=="production"&&(s.queryFn||console.error(`[${s.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),s._optimisticResults=r?"isRestoring":"optimistic",Ow(s),kw(s,o,a),Tw(o);const l=!i.getQueryCache().get(s.queryHash),[c]=C.useState(()=>new t(i,s)),u=c.getOptimisticResult(s),f=!r&&e.subscribed!==!1;if(C.useSyncExternalStore(C.useCallback(m=>{const y=f?c.subscribe(Ze.batchCalls(m)):kt;return c.updateResult(),y},[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),C.useEffect(()=>{c.setOptions(s)},[s,c]),Mw(s,u))throw Hp(s,c,o);if(Nw({result:u,errorResetBoundary:o,throwOnError:s.throwOnError,query:a,suspense:s.suspense}))throw u.error;if((g=(h=i.getDefaultOptions().queries)==null?void 0:h._experimental_afterQuery)==null||g.call(h,s,u),s.experimental_prefetchInRender&&!_o&&Pw(u,r)){const m=l?Hp(s,c,o):a==null?void 0:a.promise;m==null||m.catch(kt).finally(()=>{c.updateResult()})}return s.notifyOnChangeProps?u:c.trackResult(u)}function _l(e,t){return Iw(e,hw,t)}function Gf(e,t){const n=_0(t),[r]=C.useState(()=>new xw(n,e));C.useEffect(()=>{r.setOptions(e)},[r,e]);const o=C.useSyncExternalStore(C.useCallback(s=>r.subscribe(Ze.batchCalls(s)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=C.useCallback((s,a)=>{r.mutate(s,a).catch(kt)},[r]);if(o.error&&Vf(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:i,mutateAsync:o.mutate}}const Zf=T.createContext({queryClient:new A0});Zf.Provider;const jr=()=>{const e=T.useContext(Zf);if(!e)throw new Error("useConfidenceContext must be used within a ConfidenceContext");return e},S0=({children:e})=>{const[t]=T.useState(new A0);return x.jsx(Zf.Provider,{value:{queryClient:t},children:x.jsx(Aw,{client:t,children:e})})},Be={OPEN:"Open",IN_PROGRESS:"In progress",IN_REVIEW:"In review",COMPLETED:"Completed"},k0="https://marketplace.confidence.com/api",rr=k0+"/confidence",qp=k0+"/dropbox/prod",Lw=async e=>{const t={taskInstanceId:e},n=new Headers;return n.append("Content-Type","application/json"),await(await fetch(`${rr}/playbook-task-complete`,{method:"POST",headers:n,body:JSON.stringify(t)})).json()},Rw=()=>{const{queryClient:e}=jr(),t=Gf({mutationFn:async r=>Lw(r)},e);return{completeTask:async r=>t.mutateAsync(r,{onSuccess:()=>{console.log("Task completed successfully")},onError:o=>{console.error("Error completing task:",o)}}),...t}},Dw=async e=>{const t={taskInstanceId:e},n=new Headers;return n.append("Content-Type","application/json"),await(await fetch(`${rr}/playbook-task-start`,{method:"POST",headers:n,body:JSON.stringify(t)})).json()},Fw=()=>{const{queryClient:e}=jr(),t=Gf({mutationFn:async r=>await Dw(r)},e);return{startTask:r=>t.mutateAsync(r,{onSuccess:()=>{console.log("Task started successfully")},onError:o=>{console.error("Error starting task:",o)}}),...t}},T0=(e,t)=>{const{queryClient:n}=jr(),r=_l({initialData:{},queryFn:()=>n.getQueryData(["PLAYBOOK_EXPANDED_TASKS",+e]),queryKey:["PLAYBOOK_EXPANDED_TASKS",+e]}),o=a=>{var l;return((l=r.data)==null?void 0:l[a.toString()])??!1},i=(a,l)=>{var c;n.setQueryData(["PLAYBOOK_EXPANDED_TASKS",+e],()=>({[a]:l!==void 0?l:!o(a)})),(c=t==null?void 0:t.onTaskExpanded)==null||c.call(t,a,o(a))},s=T.useMemo(()=>Object.values(r.data??{}).some(a=>a),[r.data]);return{isTaskExpanded:o,toggleTaskExpanded:i,isAtLeastOneTaskExpanded:s}},jw=(e,t)=>{const{queryClient:n}=jr(),{completeTask:r}=Rw(),{startTask:o}=Fw(),{toggleTaskExpanded:i}=T0(e);return{completeTask:async(l,c)=>{const{status:u}=await r(l.toString());u&&(i(l,!1),n.setQueryData(["playbook",+e],f=>{if(!f)return f;const d=f.tasks.map(p=>p.sequenceOrder===c+1&&t.quickComplete?{...p,workflowStatus:Be.IN_PROGRESS}:p.taskInstanceId===l?{...p,workflowStatus:u}:p);return{...f,tasks:d}}))},startTask:async l=>{const{status:c}=await o(l.toString());c&&(i(l,!0),n.setQueryData(["playbook",+e],u=>{if(!u)return u;const f=u.tasks.map(d=>d.taskInstanceId===l?{...d,workflowStatus:c}:d);return{...u,tasks:f}}))}}},zw=e=>{var o;const{queryClient:t}=jr(),n=_l({queryFn:async()=>{const i=new Headers,s=await fetch(`${rr}/playbook-details`,{method:"POST",cache:"no-store",headers:i,body:JSON.stringify({playbookInstanceId:+e,start:0,limit:50})});if(!s.ok)throw new Error("Network response was not ok");const a=await s.json();if(a.error)throw new Error(a.error);return a},queryKey:["playbook",+e]},t),r=jw(e,{quickComplete:(o=n.data)==null?void 0:o.quickComplete});return{playbook:n.data,isLoading:n.isLoading,error:n.error,actions:r}},ui={START:"START",PAUSE:"PAUSE",COMPLETE:"COMPLETE",ADD_COMMENT:"ADD_COMMENT"},$w={START:"Start",PAUSE:"Pause",RESUME:"Resume",COMPLETE:"Complete"},Uw=e=>{const{taskStatus:t,canStart:n}=e;return{buttons:T.useMemo(()=>t===Be.OPEN&&n?[ui.START]:t===Be.IN_PROGRESS?[ui.PAUSE,ui.COMPLETE]:t===Be.COMPLETED?[]:[],[e.taskStatus,e.canStart])}},N0=async e=>{const t=new Headers;return t.append("Content-Type","application/json"),await(await fetch(`${rr}/playbook-initiate`,{method:"POST",headers:t,body:JSON.stringify(e)})).json()},qs='/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer properties{:root,:host{--fa-font-solid:normal 900 1em/1 "Font Awesome 6 Free";--fa-font-regular:normal 400 1em/1 "Font Awesome 6 Free";--fa-font-light:normal 300 1em/1 "Font Awesome 6 Pro";--fa-font-thin:normal 100 1em/1 "Font Awesome 6 Pro";--fa-font-duotone:normal 900 1em/1 "Font Awesome 6 Duotone";--fa-font-duotone-regular:normal 400 1em/1 "Font Awesome 6 Duotone";--fa-font-duotone-light:normal 300 1em/1 "Font Awesome 6 Duotone";--fa-font-duotone-thin:normal 100 1em/1 "Font Awesome 6 Duotone";--fa-font-brands:normal 400 1em/1 "Font Awesome 6 Brands";--fa-font-sharp-solid:normal 900 1em/1 "Font Awesome 6 Sharp";--fa-font-sharp-regular:normal 400 1em/1 "Font Awesome 6 Sharp";--fa-font-sharp-light:normal 300 1em/1 "Font Awesome 6 Sharp";--fa-font-sharp-thin:normal 100 1em/1 "Font Awesome 6 Sharp";--fa-font-sharp-duotone-solid:normal 900 1em/1 "Font Awesome 6 Sharp Duotone";--fa-font-sharp-duotone-regular:normal 400 1em/1 "Font Awesome 6 Sharp Duotone";--fa-font-sharp-duotone-light:normal 300 1em/1 "Font Awesome 6 Sharp Duotone";--fa-font-sharp-duotone-thin:normal 100 1em/1 "Font Awesome 6 Sharp Duotone"}svg.svg-inline--fa:not(:root),svg.svg-inline--fa:not(:host){box-sizing:content-box;overflow:visible}.svg-inline--fa{display:var(--fa-display,inline-block);vertical-align:-.125em;height:1em;overflow:visible}.svg-inline--fa.fa-2xs{vertical-align:.1em}.svg-inline--fa.fa-xs{vertical-align:0}.svg-inline--fa.fa-sm{vertical-align:-.07143em}.svg-inline--fa.fa-lg{vertical-align:-.2em}.svg-inline--fa.fa-xl{vertical-align:-.25em}.svg-inline--fa.fa-2xl{vertical-align:-.3125em}.svg-inline--fa.fa-pull-left{margin-right:var(--fa-pull-margin,.3em);width:auto}.svg-inline--fa.fa-pull-right{margin-left:var(--fa-pull-margin,.3em);width:auto}.svg-inline--fa.fa-li{width:var(--fa-li-width,2em);top:.25em}.svg-inline--fa.fa-fw{width:var(--fa-fw-width,1.25em)}.fa-layers svg.svg-inline--fa{margin:auto;position:absolute;top:0;right:0;bottom:0;left:0}.fa-layers-counter,.fa-layers-text{text-align:center;display:inline-block;position:absolute}.fa-layers{text-align:center;vertical-align:-.125em;width:1em;height:1em;display:inline-block;position:relative}.fa-layers svg.svg-inline--fa{transform-origin:50%}.fa-layers-text{transform-origin:50%;top:50%;left:50%;transform:translate(-50%,-50%)}.fa-layers-counter{background-color:var(--fa-counter-background-color,#ff253a);border-radius:var(--fa-counter-border-radius,1em);box-sizing:border-box;color:var(--fa-inverse,#fff);line-height:var(--fa-counter-line-height,1);max-width:var(--fa-counter-max-width,5em);min-width:var(--fa-counter-min-width,1.5em);padding:var(--fa-counter-padding,.25em .5em);right:var(--fa-right,0);text-overflow:ellipsis;top:var(--fa-top,0);transform:scale(var(--fa-counter-scale,.25));transform-origin:100% 0;overflow:hidden}.fa-layers-bottom-right{bottom:var(--fa-bottom,0);right:var(--fa-right,0);transform:scale(var(--fa-layers-scale,.25));transform-origin:100% 100%;top:auto}.fa-layers-bottom-left{bottom:var(--fa-bottom,0);left:var(--fa-left,0);transform:scale(var(--fa-layers-scale,.25));transform-origin:0 100%;top:auto;right:auto}.fa-layers-top-right{top:var(--fa-top,0);right:var(--fa-right,0);transform:scale(var(--fa-layers-scale,.25));transform-origin:100% 0}.fa-layers-top-left{left:var(--fa-left,0);right:auto;top:var(--fa-top,0);transform:scale(var(--fa-layers-scale,.25));transform-origin:0 0}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-2xs{vertical-align:.225em;font-size:.625em;line-height:.1em}.fa-xs{vertical-align:.125em;font-size:.75em;line-height:.08333em}.fa-sm{vertical-align:.05357em;font-size:.875em;line-height:.07143em}.fa-lg{vertical-align:-.075em;font-size:1.25em;line-height:.05em}.fa-xl{vertical-align:-.125em;font-size:1.5em;line-height:.04167em}.fa-2xl{vertical-align:-.1875em;font-size:2em;line-height:.03125em}.fa-fw{text-align:center;width:1.25em}.fa-ul{margin-left:var(--fa-li-margin,2.5em);padding-left:0;list-style-type:none}.fa-ul>li{position:relative}.fa-li{left:calc(-1*var(--fa-li-width,2em));text-align:center;width:var(--fa-li-width,2em);line-height:inherit;position:absolute}.fa-border{border-color:var(--fa-border-color,#eee);border-radius:var(--fa-border-radius,.1em);border-style:var(--fa-border-style,solid);border-width:var(--fa-border-width,.08em);padding:var(--fa-border-padding,.2em .25em .15em)}.fa-pull-left{float:left;margin-right:var(--fa-pull-margin,.3em)}.fa-pull-right{float:right;margin-left:var(--fa-pull-margin,.3em)}.fa-beat{animation-name:fa-beat;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,ease-in-out)}.fa-bounce{animation-name:fa-bounce;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,cubic-bezier(.28,.84,.42,1))}.fa-fade{animation-name:fa-fade;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,cubic-bezier(.4,0,.6,1))}.fa-beat-fade{animation-name:fa-beat-fade;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,cubic-bezier(.4,0,.6,1))}.fa-flip{animation-name:fa-flip;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,ease-in-out)}.fa-shake{animation-name:fa-shake;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,linear)}.fa-spin{animation-name:fa-spin;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,2s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,linear)}.fa-spin-reverse{--fa-animation-direction:reverse}.fa-pulse,.fa-spin-pulse{animation-name:fa-spin;animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,steps(8))}@media(prefers-reduced-motion:reduce){.fa-beat,.fa-bounce,.fa-fade,.fa-beat-fade,.fa-flip,.fa-pulse,.fa-shake,.fa-spin,.fa-spin-pulse{transition-duration:0s;transition-delay:0s;animation-duration:1ms;animation-iteration-count:1;animation-delay:-1ms}}@keyframes fa-beat{0%,90%{transform:scale(1)}45%{transform:scale(var(--fa-beat-scale,1.25))}}@keyframes fa-bounce{0%{transform:scale(1)translateY(0)}10%{transform:scale(var(--fa-bounce-start-scale-x,1.1),var(--fa-bounce-start-scale-y,.9))translateY(0)}30%{transform:scale(var(--fa-bounce-jump-scale-x,.9),var(--fa-bounce-jump-scale-y,1.1))translateY(var(--fa-bounce-height,-.5em))}50%{transform:scale(var(--fa-bounce-land-scale-x,1.05),var(--fa-bounce-land-scale-y,.95))translateY(0)}57%{transform:scale(1)translateY(var(--fa-bounce-rebound,-.125em))}64%{transform:scale(1)translateY(0)}to{transform:scale(1)translateY(0)}}@keyframes fa-fade{50%{opacity:var(--fa-fade-opacity,.4)}}@keyframes fa-beat-fade{0%,to{opacity:var(--fa-beat-fade-opacity,.4);transform:scale(1)}50%{opacity:1;transform:scale(var(--fa-beat-fade-scale,1.125))}}@keyframes fa-flip{50%{transform:rotate3d(var(--fa-flip-x,0),var(--fa-flip-y,1),var(--fa-flip-z,0),var(--fa-flip-angle,-180deg))}}@keyframes fa-shake{0%{transform:rotate(-15deg)}4%{transform:rotate(15deg)}8%,24%{transform:rotate(-18deg)}12%,28%{transform:rotate(18deg)}16%{transform:rotate(-22deg)}20%{transform:rotate(22deg)}32%{transform:rotate(-12deg)}36%{transform:rotate(12deg)}40%,to{transform:rotate(0)}}@keyframes fa-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.fa-rotate-90{transform:rotate(90deg)}.fa-rotate-180{transform:rotate(180deg)}.fa-rotate-270{transform:rotate(270deg)}.fa-flip-horizontal{transform:scaleX(-1)}.fa-flip-vertical{transform:scaleY(-1)}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical{transform:scale(-1)}.fa-rotate-by{transform:rotate(var(--fa-rotate-angle,0))}.fa-stack{vertical-align:middle;width:2.5em;height:2em;display:inline-block;position:relative}.fa-stack-1x,.fa-stack-2x{z-index:var(--fa-stack-z-index,auto);margin:auto;position:absolute;top:0;right:0;bottom:0;left:0}.svg-inline--fa.fa-stack-1x{width:1.25em;height:1em}.svg-inline--fa.fa-stack-2x{width:2.5em;height:2em}.fa-inverse{color:var(--fa-inverse,#fff)}.sr-only,.fa-sr-only,.sr-only-focusable:not(:focus),.fa-sr-only-focusable:not(:focus){clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.svg-inline--fa .fa-primary{fill:var(--fa-primary-color,currentColor);opacity:var(--fa-primary-opacity,1)}.svg-inline--fa .fa-secondary{fill:var(--fa-secondary-color,currentColor);opacity:var(--fa-secondary-opacity,.4)}.svg-inline--fa.fa-swap-opacity .fa-primary{opacity:var(--fa-secondary-opacity,.4)}.svg-inline--fa.fa-swap-opacity .fa-secondary{opacity:var(--fa-primary-opacity,1)}.svg-inline--fa mask .fa-primary,.svg-inline--fa mask .fa-secondary{fill:#000}@layer theme{:root,:host{--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-500:oklch(63.7% .237 25.331);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--spacing:.25rem;--container-md:28rem;--container-lg:32rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1)}}@layer base{.confidence-playbook,.confidence-playbook *,.confidence-playbook :after,.confidence-playbook :before,.confidence-playbook ::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}.confidence-playbook ::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}.confidence-playbook{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}.confidence-playbook hr{height:0;color:inherit;border-top-width:1px}.confidence-playbook abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.confidence-playbook h1,.confidence-playbook h2,.confidence-playbook h3,.confidence-playbook h4,.confidence-playbook h5,.confidence-playbook h6{font-size:inherit;font-weight:inherit}.confidence-playbook a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}.confidence-playbook b,.confidence-playbook strong{font-weight:bolder}.confidence-playbook code,.confidence-playbook kbd,.confidence-playbook samp,.confidence-playbook pre{font-feature-settings:normal;font-variation-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}.confidence-playbook small{font-size:80%}.confidence-playbook sub,.confidence-playbook sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}.confidence-playbook sub{bottom:-.25em}.confidence-playbook sup{top:-.5em}.confidence-playbook table{text-indent:0;border-color:inherit;border-collapse:collapse}.confidence-playbook :-moz-focusring{outline:auto}.confidence-playbook progress{vertical-align:baseline}.confidence-playbook summary{display:list-item}.confidence-playbook ol,.confidence-playbook ul,.confidence-playbook menu{list-style:none}.confidence-playbook img,.confidence-playbook svg,.confidence-playbook video,.confidence-playbook canvas,.confidence-playbook audio,.confidence-playbook iframe,.confidence-playbook embed,.confidence-playbook object{vertical-align:middle;display:block}.confidence-playbook img,.confidence-playbook video{max-width:100%;height:auto}.confidence-playbook button,.confidence-playbook input,.confidence-playbook select,.confidence-playbook optgroup,.confidence-playbook textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}.confidence-playbook ::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}.confidence-playbook :where(select:is([multiple],[size])) optgroup{font-weight:bolder}.confidence-playbook :where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}.confidence-playbook ::file-selector-button{margin-inline-end:4px}.confidence-playbook ::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){.confidence-playbook ::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){.confidence-playbook ::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}.confidence-playbook textarea{resize:vertical}.confidence-playbook ::-webkit-search-decoration{-webkit-appearance:none}.confidence-playbook ::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}.confidence-playbook ::-webkit-datetime-edit{display:inline-flex}.confidence-playbook ::-webkit-datetime-edit-fields-wrapper{padding:0}.confidence-playbook ::-webkit-datetime-edit{padding-block:0}.confidence-playbook ::-webkit-datetime-edit-year-field{padding-block:0}.confidence-playbook ::-webkit-datetime-edit-month-field{padding-block:0}.confidence-playbook ::-webkit-datetime-edit-day-field{padding-block:0}.confidence-playbook ::-webkit-datetime-edit-hour-field{padding-block:0}.confidence-playbook ::-webkit-datetime-edit-minute-field{padding-block:0}.confidence-playbook ::-webkit-datetime-edit-second-field{padding-block:0}.confidence-playbook ::-webkit-datetime-edit-millisecond-field{padding-block:0}.confidence-playbook ::-webkit-datetime-edit-meridiem-field{padding-block:0}.confidence-playbook ::-webkit-calendar-picker-indicator{line-height:1}.confidence-playbook :-moz-ui-invalid{box-shadow:none}.confidence-playbook button,.confidence-playbook input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}.confidence-playbook ::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}.confidence-playbook ::-webkit-inner-spin-button{height:auto}.confidence-playbook ::-webkit-outer-spin-button{height:auto}.confidence-playbook [hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.pointer-events-none{pointer-events:none!important}.absolute{position:absolute!important}.fixed{position:fixed!important}.relative{position:relative!important}.sticky{position:sticky!important}.inset-0{inset:calc(var(--spacing)*0)!important}.top-0{top:calc(var(--spacing)*0)!important}.top-0\\.5{top:calc(var(--spacing)*.5)!important}.top-1{top:calc(var(--spacing)*1)!important}.top-3{top:calc(var(--spacing)*3)!important}.-right-0,.right-0{right:calc(var(--spacing)*0)!important}.bottom-0{bottom:calc(var(--spacing)*0)!important}.bottom-2{bottom:calc(var(--spacing)*2)!important}.left-0{left:calc(var(--spacing)*0)!important}.left-1{left:calc(var(--spacing)*1)!important}.left-1\\/2{left:50%!important}.left-4{left:calc(var(--spacing)*4)!important}.z-2{z-index:2!important}.z-10{z-index:10!important}.z-50{z-index:50!important}.z-\\[9999999997\\],.z-\\[9999999998\\],.z-\\[9999999999\\]{z-index:2147483647!important}.container{width:100%!important}@media(min-width:40rem){.container{max-width:40rem!important}}@media(min-width:48rem){.container{max-width:48rem!important}}@media(min-width:64rem){.container{max-width:64rem!important}}@media(min-width:80rem){.container{max-width:80rem!important}}@media(min-width:96rem){.container{max-width:96rem!important}}.m-0{margin:calc(var(--spacing)*0)!important}.mx-1{margin-inline:calc(var(--spacing)*1)!important}.mx-2{margin-inline:calc(var(--spacing)*2)!important}.mx-4{margin-inline:calc(var(--spacing)*4)!important}.mx-auto{margin-inline:auto!important}.my-1{margin-block:calc(var(--spacing)*1)!important}.my-2{margin-block:calc(var(--spacing)*2)!important}.-mt-\\[1px\\]{margin-top:-1px!important}.mt-0{margin-top:calc(var(--spacing)*0)!important}.mt-3{margin-top:calc(var(--spacing)*3)!important}.mr-2{margin-right:calc(var(--spacing)*2)!important}.-mb-3{margin-bottom:calc(var(--spacing)*-3)!important}.mb-1{margin-bottom:calc(var(--spacing)*1)!important}.mb-2{margin-bottom:calc(var(--spacing)*2)!important}.mb-4{margin-bottom:calc(var(--spacing)*4)!important}.ml-2{margin-left:calc(var(--spacing)*2)!important}.block{display:block!important}.flex{display:flex!important}.hidden{display:none!important}.inline-flex{display:inline-flex!important}.size-4{width:calc(var(--spacing)*4)!important;height:calc(var(--spacing)*4)!important}.size-9{width:calc(var(--spacing)*9)!important;height:calc(var(--spacing)*9)!important}.h-2{height:calc(var(--spacing)*2)!important}.h-3{height:calc(var(--spacing)*3)!important}.h-4{height:calc(var(--spacing)*4)!important}.h-16{height:calc(var(--spacing)*16)!important}.h-\\[18px\\]{height:18px!important}.h-\\[20px\\]{height:20px!important}.h-\\[22px\\]{height:22px!important}.h-\\[24px\\]{height:24px!important}.h-\\[30px\\]{height:30px!important}.h-\\[38px\\]{height:38px!important}.h-\\[40px\\]{height:40px!important}.h-\\[75px\\]{height:75px!important}.h-\\[100vh\\]{height:100vh!important}.h-\\[110px\\]{height:110px!important}.h-full{height:100%!important}.min-h-16{min-height:calc(var(--spacing)*16)!important}.min-h-screen{min-height:100vh!important}.w-1\\/3{width:33.3333%!important}.w-3{width:calc(var(--spacing)*3)!important}.w-4{width:calc(var(--spacing)*4)!important}.w-\\[20px\\]{width:20px!important}.w-\\[27px\\]{width:27px!important}.w-\\[38px\\]{width:38px!important}.w-\\[75px\\]{width:75px!important}.w-\\[400px\\]{width:400px!important}.w-\\[calc\\(100vw-1rem\\)\\]{width:calc(100vw - 1rem)!important}.w-full{width:100%!important}.w-screen{width:100vw!important}.max-w-400{max-width:calc(var(--spacing)*400)!important}.max-w-\\[300px\\]{max-width:300px!important}.max-w-\\[420px\\]{max-width:420px!important}.max-w-lg{max-width:var(--container-lg)!important}.max-w-md{max-width:var(--container-md)!important}.min-w-0{min-width:calc(var(--spacing)*0)!important}.min-w-\\[106px\\]{min-width:106px!important}.min-w-\\[140px\\]{min-width:140px!important}.min-w-\\[160px\\]{min-width:160px!important}.min-w-\\[172px\\]{min-width:172px!important}.min-w-\\[270px\\]{min-width:270px!important}.min-w-fit{min-width:fit-content!important}.flex-1{flex:1!important}.flex-shrink-0{flex-shrink:0!important}.-translate-x-1\\/2{--tw-translate-x: -50% !important;translate:var(--tw-translate-x)var(--tw-translate-y)!important}.translate-y-0{--tw-translate-y:calc(var(--spacing)*0)!important;translate:var(--tw-translate-x)var(--tw-translate-y)!important}.translate-y-full{--tw-translate-y:100%!important;translate:var(--tw-translate-x)var(--tw-translate-y)!important}.rotate-180{rotate:180deg!important}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)!important}.animate-progress{animation:1.5s ease-in-out infinite progress!important}.animate-pulse{animation:var(--animate-pulse)!important}.animate-spin{animation:var(--animate-spin)!important}.cursor-not-allowed{cursor:not-allowed!important}.cursor-pointer{cursor:pointer!important}.cursor-zoom-in{cursor:zoom-in!important}.resize{resize:both!important}.list-decimal{list-style-type:decimal!important}.list-disc{list-style-type:disc!important}.flex-col{flex-direction:column!important}.flex-wrap{flex-wrap:wrap!important}.items-center{align-items:center!important}.items-start{align-items:flex-start!important}.items-stretch{align-items:stretch!important}.justify-between{justify-content:space-between!important}.justify-center{justify-content:center!important}.justify-end{justify-content:flex-end!important}.justify-start{justify-content:flex-start!important}.gap-1{gap:calc(var(--spacing)*1)!important}.gap-2{gap:calc(var(--spacing)*2)!important}.gap-3{gap:calc(var(--spacing)*3)!important}.gap-4{gap:calc(var(--spacing)*4)!important}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0!important;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse))!important;margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))!important}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0!important;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse))!important;margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))!important}:where(.space-x-1>:not(:last-child)){--tw-space-x-reverse:0!important;margin-inline-start:calc(calc(var(--spacing)*1)*var(--tw-space-x-reverse))!important;margin-inline-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-x-reverse)))!important}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0!important;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse))!important;margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))!important}:where(.space-x-4>:not(:last-child)){--tw-space-x-reverse:0!important;margin-inline-start:calc(calc(var(--spacing)*4)*var(--tw-space-x-reverse))!important;margin-inline-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-x-reverse)))!important}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0!important;border-bottom-style:var(--tw-border-style)!important;border-top-style:var(--tw-border-style)!important;border-top-width:calc(1px*var(--tw-divide-y-reverse))!important;border-bottom-width:calc(1px*calc(1 - var(--tw-divide-y-reverse)))!important}:where(.divide-black\\/10>:not(:last-child)){border-color:oklab(0% none none/.1) oklab(0% none none/.1) oklab(0% none none/.1) oklab(0% none none/.1)!important}:where(.divide-gray-100>:not(:last-child)){border-color:#ebedef!important}.self-end{align-self:flex-end!important}.truncate{text-overflow:ellipsis!important;white-space:nowrap!important;overflow:hidden!important}.overflow-hidden{overflow:hidden!important}.overflow-x-hidden{overflow-x:hidden!important}.overflow-y-auto{overflow-y:auto!important}.rounded{border-radius:.25rem!important}.rounded-full{border-radius:3.40282e38px!important}.rounded-lg{border-radius:var(--radius-lg)!important}.rounded-md{border-radius:var(--radius-md)!important}.rounded-none{border-radius:0!important}.rounded-sm{border-radius:var(--radius-sm)!important}.rounded-t-sm{border-top-left-radius:var(--radius-sm)!important;border-top-right-radius:var(--radius-sm)!important}.rounded-l-sm{border-top-left-radius:var(--radius-sm)!important;border-bottom-left-radius:var(--radius-sm)!important}.rounded-b-md{border-bottom-right-radius:var(--radius-md)!important;border-bottom-left-radius:var(--radius-md)!important}.border{border-style:var(--tw-border-style)!important;border-width:1px!important}.border-0{border-style:var(--tw-border-style)!important;border-width:0!important}.border-2{border-style:var(--tw-border-style)!important;border-width:2px!important}.border-t{border-top-style:var(--tw-border-style)!important;border-top-width:1px!important}.border-b{border-bottom-style:var(--tw-border-style)!important;border-bottom-width:1px!important}.border-l-1{border-left-style:var(--tw-border-style)!important;border-left-width:1px!important}.border-l-3{border-left-style:var(--tw-border-style)!important;border-left-width:3px!important}.border-none{--tw-border-style:none!important;border-style:none!important}.border-\\[\\#94C8FF\\]{border-color:#94c8ff!important}.border-\\[\\#A5DAB1\\]{border-color:#a5dab1!important}.border-\\[\\#C1C5C8\\]{border-color:#c1c5c8!important}.border-black\\/10{border-color:oklab(0% none none/.1) oklab(0% none none/.1) oklab(0% none none/.1) oklab(0% none none/.1)!important}.border-danger-200{border-color:#f0aab1!important}.border-danger-500{border-color:#dc3545!important}.border-gray-50{border-color:#f5f6f7!important}.border-gray-100{border-color:#ebedef!important}.border-gray-200{border-color:#ced1d6!important}.border-gray-300{border-color:#b0b5bd!important}.border-gray-400{border-color:#757e8c!important}.border-gray-700{border-color:#2c3544!important}.border-gray-800{border-color:#232b37!important}.border-info-500{border-color:#17a2b8!important}.border-orange-500{border-color:#ff7800!important}.border-primary-200{border-color:#94c8ff!important}.border-primary-600{border-color:#0069d9!important}.border-purple-500{border-color:#a855f7!important}.border-red-500{border-color:var(--color-red-500)!important}.border-secondary-500{border-color:#6c757d!important}.border-secondary-600{border-color:#5a6268!important}.border-steel-500{border-color:#556987!important}.border-success-200{border-color:#a5dab1!important}.border-success-600{border-color:#218838!important}.border-warning-200{border-color:#ffe597!important}.border-warning-500{border-color:#ffc107!important}.border-white{border-color:#fff!important}.border-t-blue-500{border-top-color:var(--color-blue-500)!important}.border-l-danger-500{border-left-color:#dc3545!important}.border-l-primary-500{border-left-color:#007bff!important}.border-l-success-500{border-left-color:#28a745!important}.border-l-warning-500{border-left-color:#ffc107!important}.bg-\\[\\#E6F2FF\\]{background-color:#e6f2ff!important}.bg-\\[\\#EAF6EC\\]{background-color:#eaf6ec!important}.bg-\\[\\#F0F1F2\\]{background-color:#f0f1f2!important}.bg-\\[\\#FFE600\\]{background-color:#ffe600!important}.bg-black\\/30{background-color:oklab(0% none none/.3)!important}.bg-blue-500{background-color:var(--color-blue-500)!important}.bg-danger-100{background-color:#f6ccd0!important}.bg-danger-500{background-color:#dc3545!important}.bg-dark{background-color:#1c232d!important}.bg-fiserv-orange-500{background-color:#f60!important}.bg-gray-50{background-color:#f5f6f7!important}.bg-gray-100{background-color:#ebedef!important}.bg-gray-200{background-color:#ced1d6!important}.bg-gray-400{background-color:#757e8c!important}.bg-gray-500{background-color:#3a475b!important}.bg-gray-800{background-color:#232b37!important}.bg-gray-900{background-color:#1c232d!important}.bg-info-500{background-color:#17a2b8!important}.bg-orange-500{background-color:#ff7800!important}.bg-primary-100{background-color:#bfdeff!important}.bg-primary-600{background-color:#0069d9!important}.bg-primary-800{background-color:#0054af!important}.bg-purple-500{background-color:#a855f7!important}.bg-secondary-500{background-color:#6c757d!important}.bg-steel-500{background-color:#556987!important}.bg-success-100{background-color:#c9e9d0!important}.bg-success-500{background-color:#28a745!important}.bg-success-600{background-color:#218838!important}.bg-warning-100{background-color:#ffefc1!important}.bg-warning-500{background-color:#ffc107!important}.bg-white{background-color:#fff!important}.bg-yellow{background-color:#ffe600!important}.object-contain{object-fit:contain!important}.object-cover{object-fit:cover!important}.object-center{object-position:center!important}.p-1{padding:calc(var(--spacing)*1)!important}.p-2{padding:calc(var(--spacing)*2)!important}.p-3{padding:calc(var(--spacing)*3)!important}.p-4{padding:calc(var(--spacing)*4)!important}.px-0{padding-inline:calc(var(--spacing)*0)!important}.px-1{padding-inline:calc(var(--spacing)*1)!important}.px-2{padding-inline:calc(var(--spacing)*2)!important}.px-3{padding-inline:calc(var(--spacing)*3)!important}.px-4{padding-inline:calc(var(--spacing)*4)!important}.px-\\[2px\\]{padding-inline:2px!important}.py-1{padding-block:calc(var(--spacing)*1)!important}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)!important}.py-2{padding-block:calc(var(--spacing)*2)!important}.py-4{padding-block:calc(var(--spacing)*4)!important}.pt-2{padding-top:calc(var(--spacing)*2)!important}.pr-2{padding-right:calc(var(--spacing)*2)!important}.pb-1{padding-bottom:calc(var(--spacing)*1)!important}.pb-2{padding-bottom:calc(var(--spacing)*2)!important}.pb-\\[102px\\]{padding-bottom:102px!important}.pl-4{padding-left:calc(var(--spacing)*4)!important}.text-center{text-align:center!important}.text-left{text-align:left!important}.font-mono{font-family:var(--font-mono)!important}.text-2xl{font-size:var(--text-2xl)!important;line-height:var(--tw-leading,var(--text-2xl--line-height))!important}.text-base{font-size:var(--text-base)!important;line-height:var(--tw-leading,var(--text-base--line-height))!important}.text-lg{font-size:var(--text-lg)!important;line-height:var(--tw-leading,var(--text-lg--line-height))!important}.text-sm{font-size:var(--text-sm)!important;line-height:var(--tw-leading,var(--text-sm--line-height))!important}.text-sm\\/6{font-size:var(--text-sm)!important;line-height:calc(var(--spacing)*6)!important}.text-xl{font-size:var(--text-xl)!important;line-height:var(--tw-leading,var(--text-xl--line-height))!important}.text-xs{font-size:var(--text-xs)!important;line-height:var(--tw-leading,var(--text-xs--line-height))!important}.text-\\[10px\\]{font-size:10px!important}.leading-\\[18px\\]{--tw-leading:18px!important;line-height:18px!important}.leading-\\[22px\\]{--tw-leading:22px!important;line-height:22px!important}.leading-\\[24px\\]{--tw-leading:24px!important;line-height:24px!important}.font-bold{--tw-font-weight:var(--font-weight-bold)!important;font-weight:var(--font-weight-bold)!important}.font-medium{--tw-font-weight:var(--font-weight-medium)!important;font-weight:var(--font-weight-medium)!important}.font-normal{--tw-font-weight:var(--font-weight-normal)!important;font-weight:var(--font-weight-normal)!important}.font-semibold{--tw-font-weight:var(--font-weight-semibold)!important;font-weight:var(--font-weight-semibold)!important}.whitespace-nowrap{white-space:nowrap!important}.text-\\[\\#0069D9\\]{color:#0069d9!important}.text-black{color:#000!important}.text-blue-600{color:var(--color-blue-600)!important}.text-danger-500{color:#dc3545!important}.text-danger-600{color:#c82333!important}.text-danger-900{color:#721c24!important}.text-dark{color:#1c232d!important}.text-dark-300{color:#343a40!important}.text-fiserv-orange-500{color:#f60!important}.text-gray-50{color:#f5f6f7!important}.text-gray-200{color:#ced1d6!important}.text-gray-300{color:#b0b5bd!important}.text-gray-400{color:#757e8c!important}.text-gray-500{color:#3a475b!important}.text-gray-700{color:#2c3544!important}.text-gray-800{color:#232b37!important}.text-gray-900{color:#1c232d!important}.text-info-500{color:#17a2b8!important}.text-orange-500{color:#ff7800!important}.text-primary-600{color:#0069d9!important}.text-primary-900{color:#004085!important}.text-purple-500{color:#a855f7!important}.text-secondary{color:#6c757d!important}.text-secondary-400{color:#899197!important}.text-secondary-500{color:#6c757d!important}.text-secondary-600{color:#5a6268!important}.text-steel-500{color:#556987!important}.text-success-500{color:#28a745!important}.text-success-600{color:#218838!important}.text-success-900{color:#155724!important}.text-warning-500{color:#ffc107!important}.text-warning-600{color:#f59e0b!important}.text-warning-900{color:#935f07!important}.text-white{color:#fff!important}.text-yellow{color:#ffe600!important}.uppercase{text-transform:uppercase!important}.italic{font-style:italic!important}.line-through{text-decoration-line:line-through!important}.underline{text-decoration-line:underline!important}.opacity-0{opacity:0!important}.opacity-50{opacity:.5!important}.opacity-60{opacity:.6!important}.opacity-70{opacity:.7!important}.opacity-100{opacity:1!important}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a)!important;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040)!important;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a)!important;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a)!important;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a)!important;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important}.shadow-dark\\/50{--tw-shadow-color:#1c232d80!important}@supports (color:color-mix(in lab,red,red)){.shadow-dark\\/50{--tw-shadow-color:color-mix(in oklab,oklab(25.3864% -.0047446 -.0210213/.5) var(--tw-shadow-alpha),transparent)!important}}.outline{outline-style:var(--tw-outline-style)!important;outline-width:1px!important}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events!important;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))!important;transition-duration:var(--tw-duration,var(--default-transition-duration))!important}.transition-all{transition-property:all!important;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))!important;transition-duration:var(--tw-duration,var(--default-transition-duration))!important}.duration-300{--tw-duration:.3s!important;transition-duration:.3s!important}.ease-in-out{--tw-ease:var(--ease-in-out)!important;transition-timing-function:var(--ease-in-out)!important}.ease-out{--tw-ease:var(--ease-out)!important;transition-timing-function:var(--ease-out)!important}.outline-none{--tw-outline-style:none!important;outline-style:none!important}.\\[writing-mode\\:vertical-lr\\]{writing-mode:vertical-lr!important}@media(hover:hover){.hover\\:border-primary-500:hover{border-color:#007bff!important}.hover\\:bg-danger-500:hover{background-color:#dc3545!important}.hover\\:bg-dark:hover{background-color:#1c232d!important}.hover\\:bg-fiserv-orange-500:hover{background-color:#f60!important}.hover\\:bg-gray-50:hover{background-color:#f5f6f7!important}.hover\\:bg-gray-100:hover{background-color:#ebedef!important}.hover\\:bg-gray-400:hover{background-color:#757e8c!important}.hover\\:bg-gray-500:hover{background-color:#3a475b!important}.hover\\:bg-gray-800:hover{background-color:#232b37!important}.hover\\:bg-gray-900:hover{background-color:#1c232d!important}.hover\\:bg-info-500:hover{background-color:#17a2b8!important}.hover\\:bg-orange-500:hover{background-color:#ff7800!important}.hover\\:bg-primary-700:hover{background-color:#0062cc!important}.hover\\:bg-primary-800:hover{background-color:#0054af!important}.hover\\:bg-purple-500:hover{background-color:#a855f7!important}.hover\\:bg-secondary-500:hover{background-color:#6c757d!important}.hover\\:bg-steel-500:hover{background-color:#556987!important}.hover\\:bg-success-500:hover{background-color:#28a745!important}.hover\\:bg-transparent:hover{background-color:#0000!important}.hover\\:bg-warning-500:hover{background-color:#ffc107!important}.hover\\:bg-yellow:hover{background-color:#ffe600!important}.hover\\:text-black:hover{color:#000!important}.hover\\:text-blue-600:hover{color:var(--color-blue-600)!important}.hover\\:text-danger-600:hover{color:#c82333!important}.hover\\:text-danger-700:hover{color:#bd2130!important}.hover\\:text-danger-800:hover{color:#aa1927!important}.hover\\:text-dark:hover{color:#1c232d!important}.hover\\:text-fiserv-orange-800:hover{color:#bf4c00!important}.hover\\:text-gray-400:hover{color:#757e8c!important}.hover\\:text-gray-700:hover{color:#2c3544!important}.hover\\:text-gray-800:hover{color:#232b37!important}.hover\\:text-gray-900:hover{color:#1c232d!important}.hover\\:text-info-800:hover{color:#026777!important}.hover\\:text-orange-800:hover{color:#c75d00!important}.hover\\:text-primary-600:hover{color:#0069d9!important}.hover\\:text-primary-700:hover{color:#0062cc!important}.hover\\:text-primary-800:hover{color:#0054af!important}.hover\\:text-purple-800:hover{color:#6f33a7!important}.hover\\:text-secondary-800:hover{color:#444a50!important}.hover\\:text-steel-800:hover{color:#333f51!important}.hover\\:text-success-600:hover{color:#218838!important}.hover\\:text-success-700:hover{color:#1e7e34!important}.hover\\:text-success-800:hover{color:#106c25!important}.hover\\:text-warning-600:hover{color:#f59e0b!important}.hover\\:text-warning-700:hover{color:#dd8e0a!important}.hover\\:text-warning-800:hover{color:#b87708!important}.hover\\:text-white:hover{color:#fff!important}.hover\\:text-yellow:hover{color:#ffe600!important}}.focus\\:border-red-500:focus{border-color:var(--color-red-500)!important}.focus\\:outline:focus{outline-style:var(--tw-outline-style)!important;outline-width:1px!important}.focus\\:outline-3:focus{outline-style:var(--tw-outline-style)!important;outline-width:3px!important}.focus\\:outline-primary-500\\/\\[\\.3\\]:focus{outline-color:#007bff4d!important}.active\\:bg-gray-50:active{background-color:#f5f6f7!important}.active\\:bg-gray-800:active{background-color:#232b37!important}.active\\:text-black:active{color:#000!important}.active\\:text-white:active{color:#fff!important}.disabled\\:pointer-events-none:disabled{pointer-events:none!important}.disabled\\:opacity-15:disabled{opacity:.15!important}.data-closed\\:opacity-0[data-closed]{opacity:0!important}.data-focus\\:-outline-offset-2[data-focus]{outline-offset:-2px!important}.data-focus\\:outline-primary-500[data-focus]{outline-color:#007bff!important}@media(min-width:48rem){.md\\:min-w-fit{min-width:fit-content!important}}}.confidence-playbook *{--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-duration:initial;--tw-ease:initial}.confidence-playbook{display:unset!important;color:#1c232d!important}@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-duration:initial;--tw-ease:initial}}}@layer theme,base,components,utilities;.lexical-view-mode{word-break:break-word!important;color:#1c232d!important;width:100%!important}.lexical-view-mode ul{list-style:revert!important}.editable .lexical-view-mode:hover{cursor:text!important;background-color:#00000012!important;border-radius:1px!important;outline:4px solid #00000012!important}.lexical-view-mode .Collapsible__container{width:fit-content!important}.lexical-view-mode .Collapsible__title{color:#007bff!important;cursor:pointer!important;background-color:#0000!important;align-items:center!important;margin-bottom:4px!important;padding:0!important;list-style:none!important;display:flex!important}.lexical-view-mode .Collapsible__title:hover{color:#0069d9!important}.lexical-view-mode .Collapsible__title:hover .editor-paragraph{text-decoration:underline!important}.lexical-view-mode .Collapsible__title::marker{display:none!important}.lexical-view-mode .Collapsible__title::-webkit-details-marker{display:none!important}.lexical-view-mode .Collapsible__title:before{content:""!important;-moz-osx-font-smoothing:grayscale!important;-webkit-font-smoothing:antialiased!important;display:var(--fa-display,inline-block)!important;font-variant:normal!important;text-rendering:auto!important;background:#fff!important;border-radius:30px!important;margin-right:4px!important;font-family:"Font Awesome 5 Pro"!important;font-style:normal!important;font-weight:900!important;line-height:1!important}.lexical-view-mode .Collapsible__title:hover:before{color:#0069d9!important;border:3px solid #fff!important;margin-left:-3px!important;margin-right:1px!important}.lexical-view-mode hr{border:none!important;margin:5px 0!important;padding:3px 0!important}.lexical-view-mode hr:after{content:""!important;background-color:#0000001a!important;height:2px!important;line-height:2px!important;display:block!important}.lexical-view-mode .editor-line-spacer{background:0 0!important;border:1px dashed #0000!important;line-height:6px!important}.lexical-view-mode .other h2{margin-bottom:7px;color:#444!important;font-size:18px!important}.lexical-view-mode .other a{font-size:14px;color:#777!important;text-decoration:underline!important}.lexical-view-mode .other ul{list-style-type:none;margin:0!important;padding:0!important}.lexical-view-mode .ltr{text-align:left}.lexical-view-mode .rtl{text-align:right}.lexical-view-mode .editor-shell{color:#1c232d!important;border-radius:4px!important;width:100%!important;font-weight:400!important;position:relative!important}.lexical-view-mode .editor{position:relative;background:#fff!important}.lexical-view-mode .editor-input{caret-color:#444;resize:none!important;-moz-tab-size:1!important;tab-size:1!important;outline:0!important;min-height:150px!important;padding:12px!important;position:relative!important}.lexical-view-mode .editor-placeholder{pointer-events:none;color:#999!important;text-overflow:ellipsis!important;-webkit-user-select:none!important;user-select:none!important;font-size:15px!important;display:inline-block!important;position:absolute!important;top:15px!important;left:10px!important;overflow:hidden!important}.lexical-view-mode .editor-text-bold,.lexical-view-mode strong{font-weight:700!important}.lexical-view-mode .editor-text-italic{font-style:italic}.lexical-view-mode .editor-text-code{color:#d70c69;background-color:#0000001a!important;border-radius:4px!important;padding:1px .25rem!important;font-family:Menlo,Consolas,Monaco,monospace!important;font-size:85%!important}.lexical-view-mode .editor-link{word-break:break-word;color:#007bff!important;cursor:pointer!important;background-color:#0000!important;text-decoration:underline!important}.lexical-view-mode .editor-link:hover{color:#0062cc!important;text-decoration:underline!important}.lexical-view-mode .editor-code,.lexical-view-mode pre{word-break:break-word;-moz-tab-size:2!important;tab-size:2!important;background-color:#f0f2f5!important;border-radius:4px!important;margin:8px 0!important;padding:8px 8px 8px 52px!important;font-family:Menlo,Consolas,Monaco,monospace!important;font-size:13px!important;line-height:1.53!important;display:block!important;position:relative!important;overflow-x:auto!important}.lexical-view-mode .editor-code:before{min-width:25px;content:attr(data-gutter)!important;color:#777!important;white-space:pre-wrap!important;text-align:right!important;background-color:#eee!important;border-right:1px solid #ccc!important;padding:8px!important;position:absolute!important;top:0!important;left:0!important}.lexical-view-mode pre{white-space:pre-wrap!important;padding-left:8px!important}.lexical-view-mode pre:before{border-right:0!important;width:100%!important;height:23px!important}.lexical-view-mode .editor-code:after,.lexical-view-mode pre:after{color:#00000080;content:attr(data-highlight-language)!important;text-transform:uppercase!important;padding:3px!important;font-size:10px!important;position:absolute!important;top:0!important;right:3px!important}.lexical-view-mode .editor-tokenComment{color:#708090}.lexical-view-mode .editor-tokenPunctuation{color:#999}.lexical-view-mode .editor-tokenProperty{color:#905}.lexical-view-mode .editor-tokenSelector{color:#690}.lexical-view-mode .editor-tokenOperator{color:#9a6e3a}.lexical-view-mode .editor-tokenAttr{color:#07a}.lexical-view-mode .editor-tokenVariable{color:#e90}.lexical-view-mode .editor-tokenFunction{color:#dd4a68}.lexical-view-mode .editor-paragraph,.lexical-view-mode p{word-break:break-word;margin:0 0 .3rem!important;padding:0!important}.lexical-view-mode .editor-paragraph:last-child{margin-bottom:0}.lexical-view-mode .editor-heading-h1,.lexical-view-mode h1{line-height:100%;border-bottom:thin solid #0000001a!important;margin-top:1.2em!important;margin-bottom:.6em!important;padding-bottom:6px!important;font-size:24px!important}.lexical-view-mode .editor-heading-h2:first-child,.lexical-view-mode .editor-heading-h1:first-child,.lexical-view-mode h2:first-child,.lexical-view-mode h1:first-child{margin-top:0}.lexical-view-mode .editor-heading-h2,.lexical-view-mode h2{line-height:100%;border-bottom:thin solid #0000001a!important;margin-top:1.2em!important;margin-bottom:.6em!important;padding-bottom:6px!important;font-size:20px!important}.lexical-view-mode .editor-list-ol,.lexical-view-mode ol{margin:0 0 .3rem 15px!important;padding:0 0 0 15px!important;list-style-type:decimal!important;list-style-position:outside!important}.lexical-view-mode li ol{margin:0 0 0 20px!important}.lexical-view-mode .editor-list-ol2,.lexical-view-mode .editor-list-ol3,.lexical-view-mode .editor-list-ol4,.lexical-view-mode .editor-list-ol5,.lexical-view-mode .editor-list-ol6,.lexical-view-mode .editor-list-ol7{list-style-position:outside;padding:0!important}.lexical-view-mode .editor-list-ol2{list-style-type:lower-alpha}.lexical-view-mode .editor-list-ol3{list-style-type:lower-roman}.lexical-view-mode .editor-list-ol4{list-style-type:decimal}.lexical-view-mode .editor-list-ol5{list-style-type:lower-alpha}.lexical-view-mode .editor-list-ol6{list-style-type:lower-roman}.lexical-view-mode .editor-list-ol7{list-style-type:decimal}.lexical-view-mode .editor-list-ul,.lexical-view-mode ul{margin-bottom:.3rem;margin:0 0 0 15px!important;padding:0 0 0 5px!important;list-style-position:outside!important}.lexical-view-mode li ul{margin:0 0 0 15px!important;padding:0 0 0 3px!important}.lexical-view-mode .editor-list-item{padding-left:0;vertical-align:top!important;margin-bottom:12px!important;line-height:1.3!important}.lexical-view-mode .editor-nested-list-item{list-style-type:none}.lexical-view-mode code{color:inherit!important;word-wrap:break-word!important;white-space:break-spaces!important}.lexical-view-mode a>code{color:inherit}.lexical-view-mode pre::-webkit-scrollbar{width:10px;background:0 0!important}.lexical-view-mode pre::-webkit-scrollbar-thumb{background:#999}.lexical-view-mode img{cursor:zoom-in!important;border:1px solid #ccc!important;border-radius:4px!important;width:auto!important;max-width:250px!important;height:auto!important;max-height:250px!important;display:block!important}.lexical-view-mode img:hover,.lexical-view-mode img:focus{outline:3px solid #007bff4d}.lexical-view-mode iframe{background:#000!important;border:1px solid #ccc!important;width:fit-content!important;max-width:100%!important;height:fit-content!important}.lexical-view-mode .ql-align-left{text-align:left!important}.lexical-view-mode .ql-align-right{text-align:right!important}.lexical-view-mode .ql-align-center{text-align:center!important}.lexical-view-mode .ql-align-justify{text-align:justify!important}.lexical-view-mode .ql-size-small{font-size:.75em!important}.lexical-view-mode p>a,.lexical-view-mode li>a{color:#007bff!important;cursor:pointer!important;background-color:#0000!important;text-decoration:underline!important}.lexical-view-mode p>a:hover,.lexical-view-mode li>a:hover{color:#0062cc!important;text-decoration:underline!important}.lexical-view-mode .ql-size-large{font-size:1.25rem!important}.lexical-view-mode .ql-indent-1{margin-left:20px!important}.lexical-view-mode .ql-indent-2{margin-left:40px!important}.lexical-view-mode .ql-indent-3{margin-left:60px!important}.lexical-view-mode .ql-indent-4{margin-left:80px!important}.lexical-view-mode .ql-indent-5{margin-left:100px!important}.lexical-view-mode .ql-indent-6{margin-left:120px!important}.lexical-view-mode .ql-indent-7{margin-left:140px!important}.lexical-view-mode .ql-indent-8{margin-left:160px!important}.lexical-view-mode ol li.ql-indent-1,.lexical-view-mode ol li.ql-indent-2,.lexical-view-mode ol li.ql-indent-3,.lexical-view-mode ol li.ql-indent-4,.lexical-view-mode ol li.ql-indent-5,.lexical-view-mode ol li.ql-indent-6,.lexical-view-mode ol li.ql-indent-7,.lexical-view-mode ol li.ql-indent-8,.lexical-view-mode ul li.ql-indent-1,.lexical-view-mode ul li.ql-indent-2,.lexical-view-mode ul li.ql-indent-3,.lexical-view-mode ul li.ql-indent-4,.lexical-view-mode ul li.ql-indent-5,.lexical-view-mode ul li.ql-indent-6,.lexical-view-mode ul li.ql-indent-7,.lexical-view-mode ul li.ql-indent-8{margin-bottom:.3em!important}.lexical-view-mode ol li.ql-indent-1{counter-reset:list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9!important;counter-increment:list-1!important;margin-left:0!important;list-style-type:none!important}.lexical-view-mode ol li.ql-indent-1::marker{display:none}.lexical-view-mode ol li.ql-indent-1:before{content:counter(list-1,lower-alpha)". "!important}.lexical-view-mode ol li.ql-indent-2{counter-reset:list-3 list-4 list-5 list-6 list-7 list-8 list-9!important;counter-increment:list-2!important;margin-left:20px!important;list-style-type:none!important}.lexical-view-mode ol li.ql-indent-2::marker{display:none}.lexical-view-mode ol li.ql-indent-2:before{content:counter(list-2,lower-roman)". "!important}.lexical-view-mode ol li.ql-indent-3{counter-reset:list-4 list-5 list-6 list-7 list-8 list-9!important;counter-increment:list-3!important;margin-left:40px!important;list-style-type:none!important}.lexical-view-mode ol li.ql-indent-3::marker{display:none}.lexical-view-mode ol li.ql-indent-3:before{content:counter(list-3,decimal)". "!important}.lexical-view-mode ol li.ql-indent-4{counter-reset:list-5 list-6 list-7 list-8 list-9!important;counter-increment:list-4!important;margin-left:60px!important;list-style-type:none!important}.lexical-view-mode ol li.ql-indent-4::marker{display:none}.lexical-view-mode ol li.ql-indent-4:before{content:counter(list-4,lower-alpha)". "!important}.lexical-view-mode ol li.ql-indent-5{counter-reset:list-6 list-7 list-8 list-9!important;counter-increment:list-5!important;margin-left:80px!important;list-style-type:none!important}.lexical-view-mode ol li.ql-indent-5::marker{display:none}.lexical-view-mode ol li.ql-indent-5:before{content:counter(list-5,lower-roman)". "!important}.lexical-view-mode ol li.ql-indent-6{counter-reset:list-7 list-8 list-9!important;counter-increment:list-6!important;margin-left:100px!important;list-style-type:none!important}.lexical-view-mode ol li.ql-indent-6::marker{display:none}.lexical-view-mode ol li.ql-indent-6:before{content:counter(list-6,decimal)". "!important}.lexical-view-mode ol li.ql-indent-7{counter-reset:list-8 list-9!important;counter-increment:list-7!important;margin-left:120px!important;list-style-type:none!important}.lexical-view-mode ol li.ql-indent-7::marker{display:none}.lexical-view-mode ol li.ql-indent-7:before{content:counter(list-7,lower-alpha)". "!important}.lexical-view-mode ol li.ql-indent-8{counter-reset:list-9!important;counter-increment:list-8!important;margin-left:140px!important;list-style-type:none!important}.lexical-view-mode ol li.ql-indent-8::marker{display:none}.lexical-view-mode ol li.ql-indent-8:before{content:counter(list-8,lower-roman)". "!important}.lexical-view-mode ul li.ql-indent-3,.lexical-view-mode ul li.ql-indent-6{list-style-type:disc}.lexical-view-mode ul li.ql-indent-1,.lexical-view-mode ul li.ql-indent-4,.lexical-view-mode ul li.ql-indent-7{list-style-type:circle}.lexical-view-mode ul li.ql-indent-2,.lexical-view-mode ul li.ql-indent-5,.lexical-view-mode ul li.ql-indent-8{list-style-type:square}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}@keyframes progress{0%{transform:translate(-100%)}to{transform:translate(300%)}}',Bw=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Ww=(e,t)=>({classGroupId:e,validator:t}),O0=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Za="-",Vp=[],Kw="arbitrary..",Hw=e=>{const t=Vw(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return qw(s);const a=s.split(Za),l=a[0]===""&&a.length>1?1:0;return P0(a,l,t)},getConflictingClassGroupIds:(s,a)=>{if(a){const l=r[s],c=n[s];return l?c?Bw(c,l):l:c||Vp}return n[s]||Vp}}},P0=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const c=P0(e,t+1,i);if(c)return c}const s=n.validators;if(s===null)return;const a=t===0?e.join(Za):e.slice(t).join(Za),l=s.length;for(let c=0;c<l;c++){const u=s[c];if(u.validator(a))return u.classGroupId}},qw=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?Kw+r:void 0})(),Vw=e=>{const{theme:t,classGroups:n}=e;return Yw(n,t)},Yw=(e,t)=>{const n=O0();for(const r in e){const o=e[r];Jf(o,n,r,t)}return n},Jf=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const s=e[i];Qw(s,t,n,r)}},Qw=(e,t,n,r)=>{if(typeof e=="string"){Gw(e,t,n);return}if(typeof e=="function"){Zw(e,t,n,r);return}Jw(e,t,n,r)},Gw=(e,t,n)=>{const r=e===""?t:M0(t,e);r.classGroupId=n},Zw=(e,t,n,r)=>{if(Xw(e)){Jf(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Ww(n,e))},Jw=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let s=0;s<i;s++){const[a,l]=o[s];Jf(l,M0(t,a),n,r)}},M0=(e,t)=>{let n=e;const r=t.split(Za),o=r.length;for(let i=0;i<o;i++){const s=r[i];let a=n.nextPart.get(s);a||(a=O0(),n.nextPart.set(s,a)),n=a}return n},Xw=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,e2=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,s)=>{n[i]=s,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let s=n[i];if(s!==void 0)return s;if((s=r[i])!==void 0)return o(i,s),s},set(i,s){i in n?n[i]=s:o(i,s)}}},Eu="!",Yp=":",t2=[],Qp=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),n2=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let s=0,a=0,l=0,c;const u=o.length;for(let g=0;g<u;g++){const m=o[g];if(s===0&&a===0){if(m===Yp){i.push(o.slice(l,g)),l=g+1;continue}if(m==="/"){c=g;continue}}m==="["?s++:m==="]"?s--:m==="("?a++:m===")"&&a--}const f=i.length===0?o:o.slice(l);let d=f,p=!1;f.endsWith(Eu)?(d=f.slice(0,-1),p=!0):f.startsWith(Eu)&&(d=f.slice(1),p=!0);const h=c&&c>l?c-l:void 0;return Qp(i,p,d,h)};if(t){const o=t+Yp,i=r;r=s=>s.startsWith(o)?i(s.slice(o.length)):Qp(t2,!1,s,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},r2=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i<n.length;i++){const s=n[i],a=s[0]==="[",l=t.has(s);a||l?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(s)):o.push(s)}return o.length>0&&(o.sort(),r.push(...o)),r}},o2=e=>({cache:e2(e.cacheSize),parseClassName:n2(e),sortModifiers:r2(e),...Hw(e)}),i2=/\s+/,s2=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,s=[],a=e.trim().split(i2);let l="";for(let c=a.length-1;c>=0;c-=1){const u=a[c],{isExternal:f,modifiers:d,hasImportantModifier:p,baseClassName:h,maybePostfixModifierPosition:g}=n(u);if(f){l=u+(l.length>0?" "+l:l);continue}let m=!!g,y=r(m?h.substring(0,g):h);if(!y){if(!m){l=u+(l.length>0?" "+l:l);continue}if(y=r(h),!y){l=u+(l.length>0?" "+l:l);continue}m=!1}const v=d.length===0?"":d.length===1?d[0]:i(d).join(":"),b=p?v+Eu:v,w=b+y;if(s.indexOf(w)>-1)continue;s.push(w);const A=o(y,m);for(let _=0;_<A.length;++_){const E=A[_];s.push(b+E)}l=u+(l.length>0?" "+l:l)}return l},a2=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=I0(n))&&(o&&(o+=" "),o+=r);return o},I0=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=I0(e[r]))&&(n&&(n+=" "),n+=t);return n},l2=(e,...t)=>{let n,r,o,i;const s=l=>{const c=t.reduce((u,f)=>f(u),e());return n=o2(c),r=n.cache.get,o=n.cache.set,i=a,a(l)},a=l=>{const c=r(l);if(c)return c;const u=s2(l,n);return o(l,u),u};return i=s,(...l)=>i(a2(...l))},c2=[],Ge=e=>{const t=n=>n[e]||c2;return t.isThemeGetter=!0,t},L0=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,R0=/^\((?:(\w[\w-]*):)?(.+)\)$/i,u2=/^\d+\/\d+$/,f2=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,d2=/\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$/,p2=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,h2=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,m2=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Jo=e=>u2.test(e),xe=e=>!!e&&!Number.isNaN(Number(e)),pr=e=>!!e&&Number.isInteger(Number(e)),bc=e=>e.endsWith("%")&&xe(e.slice(0,-1)),Fn=e=>f2.test(e),g2=()=>!0,y2=e=>d2.test(e)&&!p2.test(e),D0=()=>!1,v2=e=>h2.test(e),b2=e=>m2.test(e),x2=e=>!ae(e)&&!le(e),w2=e=>Bi(e,z0,D0),ae=e=>L0.test(e),Gr=e=>Bi(e,$0,y2),xc=e=>Bi(e,S2,xe),Gp=e=>Bi(e,F0,D0),A2=e=>Bi(e,j0,b2),ha=e=>Bi(e,U0,v2),le=e=>R0.test(e),os=e=>Wi(e,$0),C2=e=>Wi(e,k2),Zp=e=>Wi(e,F0),_2=e=>Wi(e,z0),E2=e=>Wi(e,j0),ma=e=>Wi(e,U0,!0),Bi=(e,t,n)=>{const r=L0.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Wi=(e,t,n=!1)=>{const r=R0.exec(e);return r?r[1]?t(r[1]):n:!1},F0=e=>e==="position"||e==="percentage",j0=e=>e==="image"||e==="url",z0=e=>e==="length"||e==="size"||e==="bg-size",$0=e=>e==="length",S2=e=>e==="number",k2=e=>e==="family-name",U0=e=>e==="shadow",T2=()=>{const e=Ge("color"),t=Ge("font"),n=Ge("text"),r=Ge("font-weight"),o=Ge("tracking"),i=Ge("leading"),s=Ge("breakpoint"),a=Ge("container"),l=Ge("spacing"),c=Ge("radius"),u=Ge("shadow"),f=Ge("inset-shadow"),d=Ge("text-shadow"),p=Ge("drop-shadow"),h=Ge("blur"),g=Ge("perspective"),m=Ge("aspect"),y=Ge("ease"),v=Ge("animate"),b=()=>["auto","avoid","all","avoid-page","page","left","right","column"],w=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],A=()=>[...w(),le,ae],_=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],S=()=>[le,ae,l],N=()=>[Jo,"full","auto",...S()],P=()=>[pr,"none","subgrid",le,ae],I=()=>["auto",{span:["full",pr,le,ae]},pr,le,ae],W=()=>[pr,"auto",le,ae],j=()=>["auto","min","max","fr",le,ae],z=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Y=()=>["start","end","center","stretch","center-safe","end-safe"],Q=()=>["auto",...S()],oe=()=>[Jo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],M=()=>[e,le,ae],re=()=>[...w(),Zp,Gp,{position:[le,ae]}],L=()=>["no-repeat",{repeat:["","x","y","space","round"]}],F=()=>["auto","cover","contain",_2,w2,{size:[le,ae]}],K=()=>[bc,os,Gr],B=()=>["","none","full",c,le,ae],J=()=>["",xe,os,Gr],V=()=>["solid","dashed","dotted","double"],ee=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],te=()=>[xe,bc,Zp,Gp],he=()=>["","none",h,le,ae],ye=()=>["none",xe,le,ae],me=()=>["none",xe,le,ae],ze=()=>[xe,le,ae],G=()=>[Jo,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Fn],breakpoint:[Fn],color:[g2],container:[Fn],"drop-shadow":[Fn],ease:["in","out","in-out"],font:[x2],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Fn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Fn],shadow:[Fn],spacing:["px",xe],text:[Fn],"text-shadow":[Fn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Jo,ae,le,m]}],container:["container"],columns:[{columns:[xe,ae,le,a]}],"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"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:A()}],overflow:[{overflow:_()}],"overflow-x":[{"overflow-x":_()}],"overflow-y":[{"overflow-y":_()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:N()}],"inset-x":[{"inset-x":N()}],"inset-y":[{"inset-y":N()}],start:[{start:N()}],end:[{end:N()}],top:[{top:N()}],right:[{right:N()}],bottom:[{bottom:N()}],left:[{left:N()}],visibility:["visible","invisible","collapse"],z:[{z:[pr,"auto",le,ae]}],basis:[{basis:[Jo,"full","auto",a,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[xe,Jo,"auto","initial","none",ae]}],grow:[{grow:["",xe,le,ae]}],shrink:[{shrink:["",xe,le,ae]}],order:[{order:[pr,"first","last","none",le,ae]}],"grid-cols":[{"grid-cols":P()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":P()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":j()}],"auto-rows":[{"auto-rows":j()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...z(),"normal"]}],"justify-items":[{"justify-items":[...Y(),"normal"]}],"justify-self":[{"justify-self":["auto",...Y()]}],"align-content":[{content:["normal",...z()]}],"align-items":[{items:[...Y(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Y(),{baseline:["","last"]}]}],"place-content":[{"place-content":z()}],"place-items":[{"place-items":[...Y(),"baseline"]}],"place-self":[{"place-self":["auto",...Y()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:Q()}],mx:[{mx:Q()}],my:[{my:Q()}],ms:[{ms:Q()}],me:[{me:Q()}],mt:[{mt:Q()}],mr:[{mr:Q()}],mb:[{mb:Q()}],ml:[{ml:Q()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:oe()}],w:[{w:[a,"screen",...oe()]}],"min-w":[{"min-w":[a,"screen","none",...oe()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...oe()]}],h:[{h:["screen","lh",...oe()]}],"min-h":[{"min-h":["screen","lh","none",...oe()]}],"max-h":[{"max-h":["screen","lh",...oe()]}],"font-size":[{text:["base",n,os,Gr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,le,xc]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",bc,ae]}],"font-family":[{font:[C2,ae,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,le,ae]}],"line-clamp":[{"line-clamp":[xe,"none",le,xc]}],leading:[{leading:[i,...S()]}],"list-image":[{"list-image":["none",le,ae]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",le,ae]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...V(),"wavy"]}],"text-decoration-thickness":[{decoration:[xe,"from-font","auto",le,Gr]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[xe,"auto",le,ae]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",le,ae]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",le,ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:re()}],"bg-repeat":[{bg:L()}],"bg-size":[{bg:F()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},pr,le,ae],radial:["",le,ae],conic:[pr,le,ae]},E2,A2]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:K()}],"gradient-via-pos":[{via:K()}],"gradient-to-pos":[{to:K()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:B()}],"rounded-s":[{"rounded-s":B()}],"rounded-e":[{"rounded-e":B()}],"rounded-t":[{"rounded-t":B()}],"rounded-r":[{"rounded-r":B()}],"rounded-b":[{"rounded-b":B()}],"rounded-l":[{"rounded-l":B()}],"rounded-ss":[{"rounded-ss":B()}],"rounded-se":[{"rounded-se":B()}],"rounded-ee":[{"rounded-ee":B()}],"rounded-es":[{"rounded-es":B()}],"rounded-tl":[{"rounded-tl":B()}],"rounded-tr":[{"rounded-tr":B()}],"rounded-br":[{"rounded-br":B()}],"rounded-bl":[{"rounded-bl":B()}],"border-w":[{border:J()}],"border-w-x":[{"border-x":J()}],"border-w-y":[{"border-y":J()}],"border-w-s":[{"border-s":J()}],"border-w-e":[{"border-e":J()}],"border-w-t":[{"border-t":J()}],"border-w-r":[{"border-r":J()}],"border-w-b":[{"border-b":J()}],"border-w-l":[{"border-l":J()}],"divide-x":[{"divide-x":J()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":J()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...V(),"hidden","none"]}],"divide-style":[{divide:[...V(),"hidden","none"]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:[...V(),"none","hidden"]}],"outline-offset":[{"outline-offset":[xe,le,ae]}],"outline-w":[{outline:["",xe,os,Gr]}],"outline-color":[{outline:M()}],shadow:[{shadow:["","none",u,ma,ha]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":["none",f,ma,ha]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[xe,Gr]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":J()}],"inset-ring-color":[{"inset-ring":M()}],"text-shadow":[{"text-shadow":["none",d,ma,ha]}],"text-shadow-color":[{"text-shadow":M()}],opacity:[{opacity:[xe,le,ae]}],"mix-blend":[{"mix-blend":[...ee(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ee()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[xe]}],"mask-image-linear-from-pos":[{"mask-linear-from":te()}],"mask-image-linear-to-pos":[{"mask-linear-to":te()}],"mask-image-linear-from-color":[{"mask-linear-from":M()}],"mask-image-linear-to-color":[{"mask-linear-to":M()}],"mask-image-t-from-pos":[{"mask-t-from":te()}],"mask-image-t-to-pos":[{"mask-t-to":te()}],"mask-image-t-from-color":[{"mask-t-from":M()}],"mask-image-t-to-color":[{"mask-t-to":M()}],"mask-image-r-from-pos":[{"mask-r-from":te()}],"mask-image-r-to-pos":[{"mask-r-to":te()}],"mask-image-r-from-color":[{"mask-r-from":M()}],"mask-image-r-to-color":[{"mask-r-to":M()}],"mask-image-b-from-pos":[{"mask-b-from":te()}],"mask-image-b-to-pos":[{"mask-b-to":te()}],"mask-image-b-from-color":[{"mask-b-from":M()}],"mask-image-b-to-color":[{"mask-b-to":M()}],"mask-image-l-from-pos":[{"mask-l-from":te()}],"mask-image-l-to-pos":[{"mask-l-to":te()}],"mask-image-l-from-color":[{"mask-l-from":M()}],"mask-image-l-to-color":[{"mask-l-to":M()}],"mask-image-x-from-pos":[{"mask-x-from":te()}],"mask-image-x-to-pos":[{"mask-x-to":te()}],"mask-image-x-from-color":[{"mask-x-from":M()}],"mask-image-x-to-color":[{"mask-x-to":M()}],"mask-image-y-from-pos":[{"mask-y-from":te()}],"mask-image-y-to-pos":[{"mask-y-to":te()}],"mask-image-y-from-color":[{"mask-y-from":M()}],"mask-image-y-to-color":[{"mask-y-to":M()}],"mask-image-radial":[{"mask-radial":[le,ae]}],"mask-image-radial-from-pos":[{"mask-radial-from":te()}],"mask-image-radial-to-pos":[{"mask-radial-to":te()}],"mask-image-radial-from-color":[{"mask-radial-from":M()}],"mask-image-radial-to-color":[{"mask-radial-to":M()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":w()}],"mask-image-conic-pos":[{"mask-conic":[xe]}],"mask-image-conic-from-pos":[{"mask-conic-from":te()}],"mask-image-conic-to-pos":[{"mask-conic-to":te()}],"mask-image-conic-from-color":[{"mask-conic-from":M()}],"mask-image-conic-to-color":[{"mask-conic-to":M()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:re()}],"mask-repeat":[{mask:L()}],"mask-size":[{mask:F()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",le,ae]}],filter:[{filter:["","none",le,ae]}],blur:[{blur:he()}],brightness:[{brightness:[xe,le,ae]}],contrast:[{contrast:[xe,le,ae]}],"drop-shadow":[{"drop-shadow":["","none",p,ma,ha]}],"drop-shadow-color":[{"drop-shadow":M()}],grayscale:[{grayscale:["",xe,le,ae]}],"hue-rotate":[{"hue-rotate":[xe,le,ae]}],invert:[{invert:["",xe,le,ae]}],saturate:[{saturate:[xe,le,ae]}],sepia:[{sepia:["",xe,le,ae]}],"backdrop-filter":[{"backdrop-filter":["","none",le,ae]}],"backdrop-blur":[{"backdrop-blur":he()}],"backdrop-brightness":[{"backdrop-brightness":[xe,le,ae]}],"backdrop-contrast":[{"backdrop-contrast":[xe,le,ae]}],"backdrop-grayscale":[{"backdrop-grayscale":["",xe,le,ae]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[xe,le,ae]}],"backdrop-invert":[{"backdrop-invert":["",xe,le,ae]}],"backdrop-opacity":[{"backdrop-opacity":[xe,le,ae]}],"backdrop-saturate":[{"backdrop-saturate":[xe,le,ae]}],"backdrop-sepia":[{"backdrop-sepia":["",xe,le,ae]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",le,ae]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[xe,"initial",le,ae]}],ease:[{ease:["linear","initial",y,le,ae]}],delay:[{delay:[xe,le,ae]}],animate:[{animate:["none",v,le,ae]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,le,ae]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:ye()}],"rotate-x":[{"rotate-x":ye()}],"rotate-y":[{"rotate-y":ye()}],"rotate-z":[{"rotate-z":ye()}],scale:[{scale:me()}],"scale-x":[{"scale-x":me()}],"scale-y":[{"scale-y":me()}],"scale-z":[{"scale-z":me()}],"scale-3d":["scale-3d"],skew:[{skew:ze()}],"skew-x":[{"skew-x":ze()}],"skew-y":[{"skew-y":ze()}],transform:[{transform:[le,ae,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:G()}],"translate-x":[{"translate-x":G()}],"translate-y":[{"translate-y":G()}],"translate-z":[{"translate-z":G()}],"translate-none":["translate-none"],accent:[{accent:M()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:M()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",le,ae]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"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",le,ae]}],fill:[{fill:["none",...M()]}],"stroke-w":[{stroke:[xe,os,Gr,xc]}],stroke:[{stroke:["none",...M()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},fi=l2(T2);function B0(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=B0(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ss(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=B0(e))&&(r&&(r+=" "),r+=t);return r}function Ee(...e){return fi(Ss(e))}const Jp="confidence_playbook_",N2="confidence_playbook_expanded_",W0=30;function K0(e,t){return t?`${Jp}${e}_${t}`:`${Jp}${e}`}function H0(e,t,n,r){const o={playbookInstanceId:t,email:n},i=K0(e,r),s=new Date;s.setDate(s.getDate()+W0),document.cookie=`${i}=${encodeURIComponent(JSON.stringify(o))}; expires=${s.toUTCString()}; path=/; SameSite=Lax`}function q0(e,t){const n=K0(e,t),r=document.cookie.split(";");for(const o of r){const[i,s]=o.trim().split("=");if(i===n&&s)try{return JSON.parse(decodeURIComponent(s))}catch{return null}}return null}function V0(e){return`${N2}${e}`}function O2(e,t){const n=V0(e),r=new Date;r.setDate(r.getDate()+W0),document.cookie=`${n}=${t?"1":"0"}; expires=${r.toUTCString()}; path=/; SameSite=Lax`}function P2(e){const t=V0(e),n=document.cookie.split(";");for(const r of n){const[o,i]=r.trim().split("=");if(o===t&&i!==void 0)return i==="1"}return null}const M2=typeof document<"u"?T.useLayoutEffect:()=>{},zr=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},oo=e=>e&&"window"in e&&e.window===e?e:zr(e).defaultView||window;function I2(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function L2(e){return I2(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}let R2=!1;function Xf(){return R2}function Y0(e,t){if(!Xf())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let n=t;for(;n!==null;){if(n===e)return!0;n.tagName==="SLOT"&&n.assignedSlot?n=n.assignedSlot.parentNode:L2(n)?n=n.host:n=n.parentNode}return!1}const Su=(e=document)=>{var t;if(!Xf())return e.activeElement;let n=e.activeElement;for(;n&&"shadowRoot"in n&&(!((t=n.shadowRoot)===null||t===void 0)&&t.activeElement);)n=n.shadowRoot.activeElement;return n};function Q0(e){return Xf()&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}function D2(e){if(F2())e.focus({preventScroll:!0});else{let t=j2(e);e.focus(),z2(t)}}let ga=null;function F2(){if(ga==null){ga=!1;try{document.createElement("div").focus({get preventScroll(){return ga=!0,!0}})}catch{}}return ga}function j2(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function z2(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function El(e){var t;if(typeof window>"u"||window.navigator==null)return!1;let n=(t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands;return Array.isArray(n)&&n.some(r=>e.test(r.brand))||e.test(window.navigator.userAgent)}function ed(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function or(e){if(process.env.NODE_ENV==="test")return e;let t=null;return()=>(t==null&&(t=e()),t)}const ks=or(function(){return ed(/^Mac/i)}),$2=or(function(){return ed(/^iPhone/i)}),G0=or(function(){return ed(/^iPad/i)||ks()&&navigator.maxTouchPoints>1}),U2=or(function(){return $2()||G0()});or(function(){return ks()||U2()});const B2=or(function(){return El(/AppleWebKit/i)&&!W2()}),W2=or(function(){return El(/Chrome/i)}),K2=or(function(){return El(/Android/i)}),H2=or(function(){return El(/Firefox/i)});function Ts(e,t,n=!0){var r,o;let{metaKey:i,ctrlKey:s,altKey:a,shiftKey:l}=t;H2()&&(!((o=window.event)===null||o===void 0||(r=o.type)===null||r===void 0)&&r.startsWith("key"))&&e.target==="_blank"&&(ks()?i=!0:s=!0);let c=B2()&&ks()&&!G0()&&process.env.NODE_ENV!=="test"?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:i,ctrlKey:s,altKey:a,shiftKey:l}):new MouseEvent("click",{metaKey:i,ctrlKey:s,altKey:a,shiftKey:l,detail:1,bubbles:!0,cancelable:!0});Ts.isOpening=n,D2(e),e.dispatchEvent(c),Ts.isOpening=!1}Ts.isOpening=!1;function Z0(){let e=T.useRef(new Map),t=T.useCallback((o,i,s,a)=>{let l=a!=null&&a.once?(...c)=>{e.current.delete(s),s(...c)}:s;e.current.set(s,{type:i,eventTarget:o,fn:l,options:a}),o.addEventListener(i,l,a)},[]),n=T.useCallback((o,i,s,a)=>{var l;let c=((l=e.current.get(s))===null||l===void 0?void 0:l.fn)||s;o.removeEventListener(i,c,a),e.current.delete(s)},[]),r=T.useCallback(()=>{e.current.forEach((o,i)=>{n(o.eventTarget,o.type,i,o.options)})},[n]);return T.useEffect(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function q2(e){return e.pointerType===""&&e.isTrusted?!0:K2()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function J0(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function V2(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function X0(e){let t=T.useRef({isFocused:!1,observer:null});return M2(()=>{const n=t.current;return()=>{n.observer&&(n.observer.disconnect(),n.observer=null)}},[]),T.useCallback(n=>{if(n.target instanceof HTMLButtonElement||n.target instanceof HTMLInputElement||n.target instanceof HTMLTextAreaElement||n.target instanceof HTMLSelectElement){t.current.isFocused=!0;let r=n.target,o=i=>{if(t.current.isFocused=!1,r.disabled){let s=J0(i);e==null||e(s)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};r.addEventListener("focusout",o,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&r.disabled){var i;(i=t.current.observer)===null||i===void 0||i.disconnect();let s=r===document.activeElement?null:document.activeElement;r.dispatchEvent(new FocusEvent("blur",{relatedTarget:s})),r.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:s}))}}),t.current.observer.observe(r,{attributes:!0,attributeFilter:["disabled"]})}},[e])}let Y2=!1,Vs=null,ku=new Set,ys=new Map,So=!1,Tu=!1;const Q2={Tab:!0,Escape:!0};function td(e,t){for(let n of ku)n(e,t)}function G2(e){return!(e.metaKey||!ks()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Ja(e){So=!0,!Ts.isOpening&&G2(e)&&(Vs="keyboard",td("keyboard",e))}function Vt(e){Vs="pointer","pointerType"in e&&e.pointerType,(e.type==="mousedown"||e.type==="pointerdown")&&(So=!0,td("pointer",e))}function ey(e){!Ts.isOpening&&q2(e)&&(So=!0,Vs="virtual")}function ty(e){e.target===window||e.target===document||Y2||!e.isTrusted||(!So&&!Tu&&(Vs="virtual",td("virtual",e)),So=!1,Tu=!1)}function ny(){So=!1,Tu=!0}function Nu(e){if(typeof window>"u"||typeof document>"u"||ys.get(oo(e)))return;const t=oo(e),n=zr(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){So=!0,r.apply(this,arguments)},n.addEventListener("keydown",Ja,!0),n.addEventListener("keyup",Ja,!0),n.addEventListener("click",ey,!0),t.addEventListener("focus",ty,!0),t.addEventListener("blur",ny,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",Vt,!0),n.addEventListener("pointermove",Vt,!0),n.addEventListener("pointerup",Vt,!0)):process.env.NODE_ENV==="test"&&(n.addEventListener("mousedown",Vt,!0),n.addEventListener("mousemove",Vt,!0),n.addEventListener("mouseup",Vt,!0)),t.addEventListener("beforeunload",()=>{ry(e)},{once:!0}),ys.set(t,{focus:r})}const ry=(e,t)=>{const n=oo(e),r=zr(e);t&&r.removeEventListener("DOMContentLoaded",t),ys.has(n)&&(n.HTMLElement.prototype.focus=ys.get(n).focus,r.removeEventListener("keydown",Ja,!0),r.removeEventListener("keyup",Ja,!0),r.removeEventListener("click",ey,!0),n.removeEventListener("focus",ty,!0),n.removeEventListener("blur",ny,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",Vt,!0),r.removeEventListener("pointermove",Vt,!0),r.removeEventListener("pointerup",Vt,!0)):process.env.NODE_ENV==="test"&&(r.removeEventListener("mousedown",Vt,!0),r.removeEventListener("mousemove",Vt,!0),r.removeEventListener("mouseup",Vt,!0)),ys.delete(n))};function Z2(e){const t=zr(e);let n;return t.readyState!=="loading"?Nu(e):(n=()=>{Nu(e)},t.addEventListener("DOMContentLoaded",n)),()=>ry(e,n)}typeof document<"u"&&Z2();function oy(){return Vs!=="pointer"}const J2=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function X2(e,t,n){let r=zr(n==null?void 0:n.target);const o=typeof window<"u"?oo(n==null?void 0:n.target).HTMLInputElement:HTMLInputElement,i=typeof window<"u"?oo(n==null?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,s=typeof window<"u"?oo(n==null?void 0:n.target).HTMLElement:HTMLElement,a=typeof window<"u"?oo(n==null?void 0:n.target).KeyboardEvent:KeyboardEvent;return e=e||r.activeElement instanceof o&&!J2.has(r.activeElement.type)||r.activeElement instanceof i||r.activeElement instanceof s&&r.activeElement.isContentEditable,!(e&&t==="keyboard"&&n instanceof a&&!Q2[n.key])}function eA(e,t,n){Nu(),T.useEffect(()=>{let r=(o,i)=>{X2(!!(n!=null&&n.isTextInput),o,i)&&e(oy())};return ku.add(r),()=>{ku.delete(r)}},t)}function tA(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:o}=e;const i=T.useCallback(l=>{if(l.target===l.currentTarget)return r&&r(l),o&&o(!1),!0},[r,o]),s=X0(i),a=T.useCallback(l=>{const c=zr(l.target),u=c?Su(c):Su();l.target===l.currentTarget&&u===Q0(l.nativeEvent)&&(n&&n(l),o&&o(!0),s(l))},[o,n,s]);return{focusProps:{onFocus:!t&&(n||o||r)?a:void 0,onBlur:!t&&(r||o)?i:void 0}}}function nA(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:o}=e,i=T.useRef({isFocusWithin:!1}),{addGlobalListener:s,removeAllGlobalListeners:a}=Z0(),l=T.useCallback(f=>{f.currentTarget.contains(f.target)&&i.current.isFocusWithin&&!f.currentTarget.contains(f.relatedTarget)&&(i.current.isFocusWithin=!1,a(),n&&n(f),o&&o(!1))},[n,o,i,a]),c=X0(l),u=T.useCallback(f=>{if(!f.currentTarget.contains(f.target))return;const d=zr(f.target),p=Su(d);if(!i.current.isFocusWithin&&p===Q0(f.nativeEvent)){r&&r(f),o&&o(!0),i.current.isFocusWithin=!0,c(f);let h=f.currentTarget;s(d,"focus",g=>{if(i.current.isFocusWithin&&!Y0(h,g.target)){let m=new d.defaultView.FocusEvent("blur",{relatedTarget:g.target});V2(m,h);let y=J0(m);l(y)}},{capture:!0})}},[r,o,c,s,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:u,onBlur:l}}}let Xa=!1,ya=0;function Ou(){Xa=!0,setTimeout(()=>{Xa=!1},50)}function Xp(e){e.pointerType==="touch"&&Ou()}function rA(){if(!(typeof document>"u"))return ya===0&&(typeof PointerEvent<"u"?document.addEventListener("pointerup",Xp):process.env.NODE_ENV==="test"&&document.addEventListener("touchend",Ou)),ya++,()=>{ya--,!(ya>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",Xp):process.env.NODE_ENV==="test"&&document.removeEventListener("touchend",Ou))}}function oA(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:o}=e,[i,s]=T.useState(!1),a=T.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;T.useEffect(rA,[]);let{addGlobalListener:l,removeAllGlobalListeners:c}=Z0(),{hoverProps:u,triggerHoverEnd:f}=T.useMemo(()=>{let d=(g,m)=>{if(a.pointerType=m,o||m==="touch"||a.isHovered||!g.currentTarget.contains(g.target))return;a.isHovered=!0;let y=g.currentTarget;a.target=y,l(zr(g.target),"pointerover",v=>{a.isHovered&&a.target&&!Y0(a.target,v.target)&&p(v,v.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:y,pointerType:m}),n&&n(!0),s(!0)},p=(g,m)=>{let y=a.target;a.pointerType="",a.target=null,!(m==="touch"||!a.isHovered||!y)&&(a.isHovered=!1,c(),r&&r({type:"hoverend",target:y,pointerType:m}),n&&n(!1),s(!1))},h={};return typeof PointerEvent<"u"?(h.onPointerEnter=g=>{Xa&&g.pointerType==="mouse"||d(g,g.pointerType)},h.onPointerLeave=g=>{!o&&g.currentTarget.contains(g.target)&&p(g,g.pointerType)}):process.env.NODE_ENV==="test"&&(h.onTouchStart=()=>{a.ignoreEmulatedMouseEvents=!0},h.onMouseEnter=g=>{!a.ignoreEmulatedMouseEvents&&!Xa&&d(g,"mouse"),a.ignoreEmulatedMouseEvents=!1},h.onMouseLeave=g=>{!o&&g.currentTarget.contains(g.target)&&p(g,"mouse")}),{hoverProps:h,triggerHoverEnd:p}},[t,n,r,o,a,l,c]);return T.useEffect(()=>{o&&f({currentTarget:a.target},a.pointerType)},[o]),{hoverProps:u,isHovered:i}}function iA(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,o=T.useRef({isFocused:!1,isFocusVisible:t||oy()}),[i,s]=T.useState(!1),[a,l]=T.useState(()=>o.current.isFocused&&o.current.isFocusVisible),c=T.useCallback(()=>l(o.current.isFocused&&o.current.isFocusVisible),[]),u=T.useCallback(p=>{o.current.isFocused=p,s(p),c()},[c]);eA(p=>{o.current.isFocusVisible=p,c()},[],{isTextInput:n});let{focusProps:f}=tA({isDisabled:r,onFocusChange:u}),{focusWithinProps:d}=nA({isDisabled:!r,onFocusWithinChange:u});return{isFocused:i,isFocusVisible:a,focusProps:r?d:f}}var sA=Object.defineProperty,aA=(e,t,n)=>t in e?sA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wc=(e,t,n)=>(aA(e,typeof t!="symbol"?t+"":t,n),n);let lA=class{constructor(){wc(this,"current",this.detect()),wc(this,"handoffState","pending"),wc(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},cA=new lA,nd=(e,t)=>{cA.isServer?T.useEffect(e,t):T.useLayoutEffect(e,t)};function uA(e){let t=T.useRef(e);return nd(()=>{t.current=e},[e]),t}let Sl=function(e){let t=uA(e);return T.useCallback((...n)=>t.current(...n),[t])};function kl(e){return T.useMemo(()=>e,Object.values(e))}let iy=T.createContext(void 0);function Tl(){return T.useContext(iy)}function fA({value:e,children:t}){return T.createElement(iy.Provider,{value:e},t)}function eh(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function sy(e,t,...n){if(e in t){let o=t[e];return typeof o=="function"?o(...n):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,sy),r}var dA=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(dA||{}),pA=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(pA||{});function Ys(){let e=mA();return T.useCallback(t=>hA({mergeRefs:e,...t}),[e])}function hA({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:i=!0,name:s,mergeRefs:a}){a=a??gA;let l=ay(t,e);if(i)return va(l,n,r,s,a);let c=o??0;if(c&2){let{static:u=!1,...f}=l;if(u)return va(f,n,r,s,a)}if(c&1){let{unmount:u=!0,...f}=l;return sy(u?0:1,{0(){return null},1(){return va({...f,hidden:!0,style:{display:"none"}},n,r,s,a)}})}return va(l,n,r,s,a)}function va(e,t={},n,r,o){let{as:i=n,children:s,refName:a="ref",...l}=Ac(e,["unmount","static"]),c=e.ref!==void 0?{[a]:e.ref}:{},u=typeof s=="function"?s(t):s;"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(t)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let f={};if(t){let d=!1,p=[];for(let[h,g]of Object.entries(t))typeof g=="boolean"&&(d=!0),g===!0&&p.push(h.replace(/([A-Z])/g,m=>`-${m.toLowerCase()}`));if(d){f["data-headlessui-state"]=p.join(" ");for(let h of p)f[`data-${h}`]=""}}if(La(i)&&(Object.keys(Xo(l)).length>0||Object.keys(Xo(f)).length>0))if(!T.isValidElement(u)||Array.isArray(u)&&u.length>1||bA(u)){if(Object.keys(Xo(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(Xo(l)).concat(Object.keys(Xo(f))).map(d=>` - ${d}`).join(`
21
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)},Y1=function(e,t){return K1(e)||H1(e,t)||q1(e,t)||V1()},c0=l0((function(e){function t(){return e.exports=t=Object.assign||function(n){for(var r=1;r<arguments.length;r++){var o=arguments[r];for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(n[i]=o[i])}return n},t.apply(this,arguments)}e.exports=t})),Q1=function(e,t){if(e==null)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o},u0=function(e,t){if(e==null)return{};var n,r,o=Q1(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o},G1=T.createContext(null);function f0(e){var t=e.children,n=t===void 0?"":t,r=u0(e,["children"]);return typeof n!="string"&&(n=P1.renderToString(n)),T.createElement("template",c0({},r,{dangerouslySetInnerHTML:{__html:n}}))}function d0(e){var t=e.root,n=e.children;return Nn.createPortal(n===void 0?null:n,t)}function Z1(e){var t=T.forwardRef((function(n,r){var o,i,s=n.mode,a=s===void 0?"open":s,l=n.delegatesFocus,c=l!==void 0&&l,u=n.styleSheets,f=u===void 0?[]:u,d=n.ssr,p=d!==void 0&&d,h=n.children,g=u0(n,["mode","delegatesFocus","styleSheets","ssr","children"]),m=(i=T.useRef((o=r)&&o.current),T.useEffect((function(){o&&(o.current=i.current)}),[o]),i),y=T.useState(null),v=Y1(y,2),b=v[0],w=v[1],A="node_".concat(a).concat(c);return T.useLayoutEffect((function(){if(m.current)try{if(typeof r=="function"&&r(m.current),p){var _=m.current.shadowRoot;return void w(_)}var E=m.current.attachShadow({mode:a,delegatesFocus:c});f.length>0&&(E.adoptedStyleSheets=f),w(E)}catch(S){(function(N){var P=N.error,I=N.styleSheets,W=N.root;switch(P.name){case"NotSupportedError":I.length>0&&(W.adoptedStyleSheets=I);break;default:throw P}})({error:S,styleSheets:f,root:b})}}),[r,m,f]),T.createElement(T.Fragment,null,T.createElement(e.tag,c0({key:A,ref:m},g),(b||p)&&T.createElement(G1.Provider,{value:b},p?T.createElement(f0,{shadowroot:a,shadowrootmode:a},e.render({root:b,ssr:p,children:h})):T.createElement(d0,{root:b},e.render({root:b,ssr:p,children:h})))))}));return t.propTypes={mode:ge.oneOf(["open","closed"]),delegatesFocus:ge.bool,styleSheets:ge.arrayOf(ge.instanceOf(globalThis.CSSStyleSheet)),ssr:ge.bool,children:ge.node},t}f0.propTypes={children:ge.oneOfType([ge.string,ge.node])},d0.propTypes={root:ge.object.isRequired,children:ge.node};var vc=new Map;function J1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"core",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(r){return r.children};return new Proxy(e,{get:function(r,o){var i=W1(o,{separator:"-"}),s="".concat(t,"-").concat(i);return vc.has(s)||vc.set(s,Z1({tag:i,render:n})),vc.get(s)}})}var Cl=J1();const p0="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAYCAYAAADpnJ2CAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAGpSURBVHgBpVbRdYMwDDR9/S8jeARGYIRuUDpBuwHJBGQDskG6ASOQDcwGdANVLnJRHdmIRO/dI8D5zgIhpTAbAQAlHiqEJUyEa1EU30YRqFHj4Q1xzJIQF8QMSziGEAPi1eTNPhi/lwglomOCDWUZc/yGzkEIYQWtlpnNNxwSGimL2ijCi7DMLbveR2aVtHiMFypN/UZPlLUlHR6iWXuPWaQRsuXRpIjyTb1ZDWuBQVaPnvfAzLs9mcL/SoTNzXMCLJ9CiFZh1glmh9yCmkhldB7CgVzyvlCGlBlEnxJf+IkYo2uNINSy+1JxcDOv2acMD0DvT2HqSCxpRmt9Q/iS/J5NIrBP+kX+J9+pRXQC/Yj8Q3TtReCZJ7M0YpsyxcO7yUfKbBLZmEUFrGgSHOnx+jgn+M4/epMRnLME8/euNWYhgSondpIKJ2HqclxYmsi4JRRaW3a2KTakb5FU7rczS29WUvb9nkUD3D+e9o82WNuVA+XkgKUVOnhktLGK/DWOK4421sDaSy+5z0praqlF8Rnn2PlMhvUe3UJDogwtImRxRUzav4k8fgCQHVaVoXL9RAAAAABJRU5ErkJggg==";var Ui=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},X1={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},gn,ao,Yg,ew=(Yg=class{constructor(){fe(this,gn,X1);fe(this,ao,!1)}setTimeoutProvider(e){process.env.NODE_ENV!=="production"&&k(this,ao)&&e!==k(this,gn)&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:k(this,gn),provider:e}),ne(this,gn,e),process.env.NODE_ENV!=="production"&&ne(this,ao,!1)}setTimeout(e,t){return process.env.NODE_ENV!=="production"&&ne(this,ao,!0),k(this,gn).setTimeout(e,t)}clearTimeout(e){k(this,gn).clearTimeout(e)}setInterval(e,t){return process.env.NODE_ENV!=="production"&&ne(this,ao,!0),k(this,gn).setInterval(e,t)}clearInterval(e){k(this,gn).clearInterval(e)}},gn=new WeakMap,ao=new WeakMap,Yg),ro=new ew;function tw(e){setTimeout(e,0)}var _o=typeof window>"u"||"Deno"in globalThis;function kt(){}function nw(e,t){return typeof e=="function"?e(t):e}function uu(e){return typeof e=="number"&&e>=0&&e!==1/0}function h0(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Nr(e,t){return typeof e=="function"?e(t):e}function qt(e,t){return typeof e=="function"?e(t):e}function Rp(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:s,stale:a}=e;if(s){if(r){if(t.queryHash!==qf(s,t.options))return!1}else if(!Es(t.queryKey,s))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||o&&o!==t.state.fetchStatus||i&&!i(t))}function Dp(e,t){const{exact:n,status:r,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(Eo(t.options.mutationKey)!==Eo(i))return!1}else if(!Es(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function qf(e,t){return((t==null?void 0:t.queryKeyHashFn)||Eo)(e)}function Eo(e){return JSON.stringify(e,(t,n)=>du(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Es(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Es(e[n],t[n])):!1}var rw=Object.prototype.hasOwnProperty;function fu(e,t){if(e===t)return e;const n=Fp(e)&&Fp(t);if(!n&&!(du(e)&&du(t)))return t;const o=(n?e:Object.keys(e)).length,i=n?t:Object.keys(t),s=i.length,a=n?new Array(s):{};let l=0;for(let c=0;c<s;c++){const u=n?c:i[c],f=e[u],d=t[u];if(f===d){a[u]=f,(n?c<o:rw.call(e,u))&&l++;continue}if(f===null||d===null||typeof f!="object"||typeof d!="object"){a[u]=d;continue}const p=fu(f,d);a[u]=p,p===f&&l++}return o===s&&l===o?e:a}function Ya(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Fp(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function du(e){if(!jp(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!jp(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function jp(e){return Object.prototype.toString.call(e)==="[object Object]"}function ow(e){return new Promise(t=>{ro.setTimeout(t,e)})}function pu(e,t,n){if(typeof n.structuralSharing=="function")return n.structuralSharing(e,t);if(n.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return fu(e,t)}catch(r){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${r}`),r}return fu(e,t)}return t}function iw(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function sw(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Qa=Symbol();function m0(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===Qa&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Qa?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Vf(e,t){return typeof e=="function"?e(...t):!!e}function aw(e,t,n){let r=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??(o=t()),r||(r=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),e}var lo,vr,xi,Qg,lw=(Qg=class extends Ui{constructor(){super();fe(this,lo);fe(this,vr);fe(this,xi);ne(this,xi,t=>{if(!_o&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){k(this,vr)||this.setEventListener(k(this,xi))}onUnsubscribe(){var t;this.hasListeners()||((t=k(this,vr))==null||t.call(this),ne(this,vr,void 0))}setEventListener(t){var n;ne(this,xi,t),(n=k(this,vr))==null||n.call(this),ne(this,vr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){k(this,lo)!==t&&(ne(this,lo,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof k(this,lo)=="boolean"?k(this,lo):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},lo=new WeakMap,vr=new WeakMap,xi=new WeakMap,Qg),Yf=new lw;function hu(){let e,t;const n=new Promise((o,i)=>{e=o,t=i});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}var cw=tw;function uw(){let e=[],t=0,n=a=>{a()},r=a=>{a()},o=cw;const i=a=>{t?e.push(a):o(()=>{n(a)})},s=()=>{const a=e;e=[],a.length&&o(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||s()}return l},batchCalls:a=>(...l)=>{i(()=>{a(...l)})},schedule:i,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{o=a}}}var Ze=uw(),wi,br,Ai,Gg,fw=(Gg=class extends Ui{constructor(){super();fe(this,wi,!0);fe(this,br);fe(this,Ai);ne(this,Ai,t=>{if(!_o&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){k(this,br)||this.setEventListener(k(this,Ai))}onUnsubscribe(){var t;this.hasListeners()||((t=k(this,br))==null||t.call(this),ne(this,br,void 0))}setEventListener(t){var n;ne(this,Ai,t),(n=k(this,br))==null||n.call(this),ne(this,br,t(this.setOnline.bind(this)))}setOnline(t){k(this,wi)!==t&&(ne(this,wi,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return k(this,wi)}},wi=new WeakMap,br=new WeakMap,Ai=new WeakMap,Gg),Ga=new fw;function dw(e){return Math.min(1e3*2**e,3e4)}function g0(e){return(e??"online")==="online"?Ga.isOnline():!0}var mu=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function y0(e){let t=!1,n=0,r;const o=hu(),i=()=>o.status!=="pending",s=g=>{var m;if(!i()){const y=new mu(g);d(y),(m=e.onCancel)==null||m.call(e,y)}},a=()=>{t=!0},l=()=>{t=!1},c=()=>Yf.isFocused()&&(e.networkMode==="always"||Ga.isOnline())&&e.canRun(),u=()=>g0(e.networkMode)&&e.canRun(),f=g=>{i()||(r==null||r(),o.resolve(g))},d=g=>{i()||(r==null||r(),o.reject(g))},p=()=>new Promise(g=>{var m;r=y=>{(i()||c())&&g(y)},(m=e.onPause)==null||m.call(e)}).then(()=>{var g;r=void 0,i()||(g=e.onContinue)==null||g.call(e)}),h=()=>{if(i())return;let g;const m=n===0?e.initialPromise:void 0;try{g=m??e.fn()}catch(y){g=Promise.reject(y)}Promise.resolve(g).then(f).catch(y=>{var _;if(i())return;const v=e.retry??(_o?0:3),b=e.retryDelay??dw,w=typeof b=="function"?b(n,y):b,A=v===!0||typeof v=="number"&&n<v||typeof v=="function"&&v(n,y);if(t||!A){d(y);return}n++,(_=e.onFail)==null||_.call(e,n,y),ow(w).then(()=>c()?void 0:p()).then(()=>{t?d(y):h()})})};return{promise:o,status:()=>o.status,cancel:s,continue:()=>(r==null||r(),o),cancelRetry:a,continueRetry:l,canStart:u,start:()=>(u()?h():p().then(h),o)}}var co,Zg,v0=(Zg=class{constructor(){fe(this,co)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),uu(this.gcTime)&&ne(this,co,ro.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(_o?1/0:300*1e3))}clearGcTimeout(){k(this,co)&&(ro.clearTimeout(k(this,co)),ne(this,co,void 0))}},co=new WeakMap,Zg),uo,Ci,Ht,fo,tt,Us,po,rn,$n,Jg,pw=(Jg=class extends v0{constructor(t){super();fe(this,rn);fe(this,uo);fe(this,Ci);fe(this,Ht);fe(this,fo);fe(this,tt);fe(this,Us);fe(this,po);ne(this,po,!1),ne(this,Us,t.defaultOptions),this.setOptions(t.options),this.observers=[],ne(this,fo,t.client),ne(this,Ht,k(this,fo).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ne(this,uo,$p(this.options)),this.state=t.state??k(this,uo),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=k(this,tt))==null?void 0:t.promise}setOptions(t){if(this.options={...k(this,Us),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=$p(this.options);n.data!==void 0&&(this.setState(zp(n.data,n.dataUpdatedAt)),ne(this,uo,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&k(this,Ht).remove(this)}setData(t,n){const r=pu(this.state.data,t,this.options);return ve(this,rn,$n).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){ve(this,rn,$n).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=k(this,tt))==null?void 0:r.promise;return(o=k(this,tt))==null||o.cancel(t),n?n.then(kt).catch(kt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(k(this,uo))}isActive(){return this.observers.some(t=>qt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Qa||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Nr(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!h0(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=k(this,tt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=k(this,tt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),k(this,Ht).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(k(this,tt)&&(k(this,po)?k(this,tt).cancel({revert:!0}):k(this,tt).cancelRetry()),this.scheduleGc()),k(this,Ht).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ve(this,rn,$n).call(this,{type:"invalidate"})}async fetch(t,n){var l,c,u,f,d,p,h,g,m,y,v,b;if(this.state.fetchStatus!=="idle"&&((l=k(this,tt))==null?void 0:l.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(k(this,tt))return k(this,tt).continueRetry(),k(this,tt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const w=this.observers.find(A=>A.options.queryFn);w&&this.setOptions(w.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const r=new AbortController,o=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(ne(this,po,!0),r.signal)})},i=()=>{const w=m0(this.options,n),_=(()=>{const E={client:k(this,fo),queryKey:this.queryKey,meta:this.meta};return o(E),E})();return ne(this,po,!1),this.options.persister?this.options.persister(w,_,this):w(_)},a=(()=>{const w={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:k(this,fo),state:this.state,fetchFn:i};return o(w),w})();(c=this.options.behavior)==null||c.onFetch(a,this),ne(this,Ci,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=a.fetchOptions)==null?void 0:u.meta))&&ve(this,rn,$n).call(this,{type:"fetch",meta:(f=a.fetchOptions)==null?void 0:f.meta}),ne(this,tt,y0({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,onCancel:w=>{w instanceof mu&&w.revert&&this.setState({...k(this,Ci),fetchStatus:"idle"}),r.abort()},onFail:(w,A)=>{ve(this,rn,$n).call(this,{type:"failed",failureCount:w,error:A})},onPause:()=>{ve(this,rn,$n).call(this,{type:"pause"})},onContinue:()=>{ve(this,rn,$n).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}));try{const w=await k(this,tt).start();if(w===void 0)throw process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),new Error(`${this.queryHash} data is undefined`);return this.setData(w),(p=(d=k(this,Ht).config).onSuccess)==null||p.call(d,w,this),(g=(h=k(this,Ht).config).onSettled)==null||g.call(h,w,this.state.error,this),w}catch(w){if(w instanceof mu){if(w.silent)return k(this,tt).promise;if(w.revert){if(this.state.data===void 0)throw w;return this.state.data}}throw ve(this,rn,$n).call(this,{type:"error",error:w}),(y=(m=k(this,Ht).config).onError)==null||y.call(m,w,this),(b=(v=k(this,Ht).config).onSettled)==null||b.call(v,this.state.data,w,this),w}finally{this.scheduleGc()}}},uo=new WeakMap,Ci=new WeakMap,Ht=new WeakMap,fo=new WeakMap,tt=new WeakMap,Us=new WeakMap,po=new WeakMap,rn=new WeakSet,$n=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...b0(r.data,this.options),fetchMeta:t.meta??null};case"success":const o={...r,...zp(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ne(this,Ci,t.manual?o:void 0),o;case"error":const i=t.error;return{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Ze.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),k(this,Ht).notify({query:this,type:"updated",action:t})})},Jg);function b0(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:g0(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function zp(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function $p(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Lt,_e,Bs,Et,ho,_i,Hn,xr,Ws,Ei,Si,mo,go,wr,ki,Me,ps,gu,yu,vu,bu,xu,wu,Au,x0,Xg,hw=(Xg=class extends Ui{constructor(t,n){super();fe(this,Me);fe(this,Lt);fe(this,_e);fe(this,Bs);fe(this,Et);fe(this,ho);fe(this,_i);fe(this,Hn);fe(this,xr);fe(this,Ws);fe(this,Ei);fe(this,Si);fe(this,mo);fe(this,go);fe(this,wr);fe(this,ki,new Set);this.options=n,ne(this,Lt,t),ne(this,xr,null),ne(this,Hn,hu()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(k(this,_e).addObserver(this),Up(k(this,_e),this.options)?ve(this,Me,ps).call(this):this.updateResult(),ve(this,Me,bu).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Cu(k(this,_e),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Cu(k(this,_e),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ve(this,Me,xu).call(this),ve(this,Me,wu).call(this),k(this,_e).removeObserver(this)}setOptions(t){const n=this.options,r=k(this,_e);if(this.options=k(this,Lt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof qt(this.options.enabled,k(this,_e))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ve(this,Me,Au).call(this),k(this,_e).setOptions(this.options),n._defaulted&&!Ya(this.options,n)&&k(this,Lt).getQueryCache().notify({type:"observerOptionsUpdated",query:k(this,_e),observer:this});const o=this.hasListeners();o&&Bp(k(this,_e),r,this.options,n)&&ve(this,Me,ps).call(this),this.updateResult(),o&&(k(this,_e)!==r||qt(this.options.enabled,k(this,_e))!==qt(n.enabled,k(this,_e))||Nr(this.options.staleTime,k(this,_e))!==Nr(n.staleTime,k(this,_e)))&&ve(this,Me,gu).call(this);const i=ve(this,Me,yu).call(this);o&&(k(this,_e)!==r||qt(this.options.enabled,k(this,_e))!==qt(n.enabled,k(this,_e))||i!==k(this,wr))&&ve(this,Me,vu).call(this,i)}getOptimisticResult(t){const n=k(this,Lt).getQueryCache().build(k(this,Lt),t),r=this.createResult(n,t);return gw(this,r)&&(ne(this,Et,r),ne(this,_i,this.options),ne(this,ho,k(this,_e).state)),r}getCurrentResult(){return k(this,Et)}trackResult(t,n){return new Proxy(t,{get:(r,o)=>(this.trackProp(o),n==null||n(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&k(this,Hn).status==="pending"&&k(this,Hn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,o))})}trackProp(t){k(this,ki).add(t)}getCurrentQuery(){return k(this,_e)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=k(this,Lt).defaultQueryOptions(t),r=k(this,Lt).getQueryCache().build(k(this,Lt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return ve(this,Me,ps).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),k(this,Et)))}createResult(t,n){var N;const r=k(this,_e),o=this.options,i=k(this,Et),s=k(this,ho),a=k(this,_i),c=t!==r?t.state:k(this,Bs),{state:u}=t;let f={...u},d=!1,p;if(n._optimisticResults){const P=this.hasListeners(),I=!P&&Up(t,n),W=P&&Bp(t,r,n,o);(I||W)&&(f={...f,...b0(u.data,t.options)}),n._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:h,errorUpdatedAt:g,status:m}=f;p=f.data;let y=!1;if(n.placeholderData!==void 0&&p===void 0&&m==="pending"){let P;i!=null&&i.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData)?(P=i.data,y=!0):P=typeof n.placeholderData=="function"?n.placeholderData((N=k(this,Si))==null?void 0:N.state.data,k(this,Si)):n.placeholderData,P!==void 0&&(m="success",p=pu(i==null?void 0:i.data,P,n),d=!0)}if(n.select&&p!==void 0&&!y)if(i&&p===(s==null?void 0:s.data)&&n.select===k(this,Ws))p=k(this,Ei);else try{ne(this,Ws,n.select),p=n.select(p),p=pu(i==null?void 0:i.data,p,n),ne(this,Ei,p),ne(this,xr,null)}catch(P){ne(this,xr,P)}k(this,xr)&&(h=k(this,xr),p=k(this,Ei),g=Date.now(),m="error");const v=f.fetchStatus==="fetching",b=m==="pending",w=m==="error",A=b&&v,_=p!==void 0,S={status:m,fetchStatus:f.fetchStatus,isPending:b,isSuccess:m==="success",isError:w,isInitialLoading:A,isLoading:A,data:p,dataUpdatedAt:f.dataUpdatedAt,error:h,errorUpdatedAt:g,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>c.dataUpdateCount||f.errorUpdateCount>c.errorUpdateCount,isFetching:v,isRefetching:v&&!b,isLoadingError:w&&!_,isPaused:f.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:w&&_,isStale:Qf(t,n),refetch:this.refetch,promise:k(this,Hn),isEnabled:qt(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const P=j=>{S.status==="error"?j.reject(S.error):S.data!==void 0&&j.resolve(S.data)},I=()=>{const j=ne(this,Hn,S.promise=hu());P(j)},W=k(this,Hn);switch(W.status){case"pending":t.queryHash===r.queryHash&&P(W);break;case"fulfilled":(S.status==="error"||S.data!==W.value)&&I();break;case"rejected":(S.status!=="error"||S.error!==W.reason)&&I();break}}return S}updateResult(){const t=k(this,Et),n=this.createResult(k(this,_e),this.options);if(ne(this,ho,k(this,_e).state),ne(this,_i,this.options),k(this,ho).data!==void 0&&ne(this,Si,k(this,_e)),Ya(n,t))return;ne(this,Et,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,i=typeof o=="function"?o():o;if(i==="all"||!i&&!k(this,ki).size)return!0;const s=new Set(i??k(this,ki));return this.options.throwOnError&&s.add("error"),Object.keys(k(this,Et)).some(a=>{const l=a;return k(this,Et)[l]!==t[l]&&s.has(l)})};ve(this,Me,x0).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ve(this,Me,bu).call(this)}},Lt=new WeakMap,_e=new WeakMap,Bs=new WeakMap,Et=new WeakMap,ho=new WeakMap,_i=new WeakMap,Hn=new WeakMap,xr=new WeakMap,Ws=new WeakMap,Ei=new WeakMap,Si=new WeakMap,mo=new WeakMap,go=new WeakMap,wr=new WeakMap,ki=new WeakMap,Me=new WeakSet,ps=function(t){ve(this,Me,Au).call(this);let n=k(this,_e).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(kt)),n},gu=function(){ve(this,Me,xu).call(this);const t=Nr(this.options.staleTime,k(this,_e));if(_o||k(this,Et).isStale||!uu(t))return;const r=h0(k(this,Et).dataUpdatedAt,t)+1;ne(this,mo,ro.setTimeout(()=>{k(this,Et).isStale||this.updateResult()},r))},yu=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(k(this,_e)):this.options.refetchInterval)??!1},vu=function(t){ve(this,Me,wu).call(this),ne(this,wr,t),!(_o||qt(this.options.enabled,k(this,_e))===!1||!uu(k(this,wr))||k(this,wr)===0)&&ne(this,go,ro.setInterval(()=>{(this.options.refetchIntervalInBackground||Yf.isFocused())&&ve(this,Me,ps).call(this)},k(this,wr)))},bu=function(){ve(this,Me,gu).call(this),ve(this,Me,vu).call(this,ve(this,Me,yu).call(this))},xu=function(){k(this,mo)&&(ro.clearTimeout(k(this,mo)),ne(this,mo,void 0))},wu=function(){k(this,go)&&(ro.clearInterval(k(this,go)),ne(this,go,void 0))},Au=function(){const t=k(this,Lt).getQueryCache().build(k(this,Lt),this.options);if(t===k(this,_e))return;const n=k(this,_e);ne(this,_e,t),ne(this,Bs,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},x0=function(t){Ze.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(k(this,Et))}),k(this,Lt).getQueryCache().notify({query:k(this,_e),type:"observerResultsUpdated"})})},Xg);function mw(e,t){return qt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Up(e,t){return mw(e,t)||e.state.data!==void 0&&Cu(e,t,t.refetchOnMount)}function Cu(e,t,n){if(qt(t.enabled,e)!==!1&&Nr(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Qf(e,t)}return!1}function Bp(e,t,n,r){return(e!==t||qt(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Qf(e,n)}function Qf(e,t){return qt(t.enabled,e)!==!1&&e.isStaleByTime(Nr(t.staleTime,e))}function gw(e,t){return!Ya(e.getCurrentResult(),t)}function Wp(e){return{onFetch:(t,n)=>{var u,f,d,p,h;const r=t.options,o=(d=(f=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:f.fetchMore)==null?void 0:d.direction,i=((p=t.state.data)==null?void 0:p.pages)||[],s=((h=t.state.data)==null?void 0:h.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let g=!1;const m=b=>{aw(b,()=>t.signal,()=>g=!0)},y=m0(t.options,t.fetchOptions),v=async(b,w,A)=>{if(g)return Promise.reject();if(w==null&&b.pages.length)return Promise.resolve(b);const E=(()=>{const I={client:t.client,queryKey:t.queryKey,pageParam:w,direction:A?"backward":"forward",meta:t.options.meta};return m(I),I})(),S=await y(E),{maxPages:N}=t.options,P=A?sw:iw;return{pages:P(b.pages,S,N),pageParams:P(b.pageParams,w,N)}};if(o&&i.length){const b=o==="backward",w=b?yw:Kp,A={pages:i,pageParams:s},_=w(r,A);a=await v(A,_,b)}else{const b=e??i.length;do{const w=l===0?s[0]??r.initialPageParam:Kp(r,a);if(l>0&&w==null)break;a=await v(a,w),l++}while(l<b)}return a};t.options.persister?t.fetchFn=()=>{var g,m;return(m=(g=t.options).persister)==null?void 0:m.call(g,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function Kp(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function yw(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Ks,yn,St,yo,vn,mr,e0,vw=(e0=class extends v0{constructor(t){super();fe(this,vn);fe(this,Ks);fe(this,yn);fe(this,St);fe(this,yo);ne(this,Ks,t.client),this.mutationId=t.mutationId,ne(this,St,t.mutationCache),ne(this,yn,[]),this.state=t.state||w0(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){k(this,yn).includes(t)||(k(this,yn).push(t),this.clearGcTimeout(),k(this,St).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ne(this,yn,k(this,yn).filter(n=>n!==t)),this.scheduleGc(),k(this,St).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){k(this,yn).length||(this.state.status==="pending"?this.scheduleGc():k(this,St).remove(this))}continue(){var t;return((t=k(this,yo))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,a,l,c,u,f,d,p,h,g,m,y,v,b,w,A,_,E,S,N;const n=()=>{ve(this,vn,mr).call(this,{type:"continue"})},r={client:k(this,Ks),meta:this.options.meta,mutationKey:this.options.mutationKey};ne(this,yo,y0({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(P,I)=>{ve(this,vn,mr).call(this,{type:"failed",failureCount:P,error:I})},onPause:()=>{ve(this,vn,mr).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>k(this,St).canRun(this)}));const o=this.state.status==="pending",i=!k(this,yo).canStart();try{if(o)n();else{ve(this,vn,mr).call(this,{type:"pending",variables:t,isPaused:i}),await((a=(s=k(this,St).config).onMutate)==null?void 0:a.call(s,t,this,r));const I=await((c=(l=this.options).onMutate)==null?void 0:c.call(l,t,r));I!==this.state.context&&ve(this,vn,mr).call(this,{type:"pending",context:I,variables:t,isPaused:i})}const P=await k(this,yo).start();return await((f=(u=k(this,St).config).onSuccess)==null?void 0:f.call(u,P,t,this.state.context,this,r)),await((p=(d=this.options).onSuccess)==null?void 0:p.call(d,P,t,this.state.context,r)),await((g=(h=k(this,St).config).onSettled)==null?void 0:g.call(h,P,null,this.state.variables,this.state.context,this,r)),await((y=(m=this.options).onSettled)==null?void 0:y.call(m,P,null,t,this.state.context,r)),ve(this,vn,mr).call(this,{type:"success",data:P}),P}catch(P){try{await((b=(v=k(this,St).config).onError)==null?void 0:b.call(v,P,t,this.state.context,this,r))}catch(I){Promise.reject(I)}try{await((A=(w=this.options).onError)==null?void 0:A.call(w,P,t,this.state.context,r))}catch(I){Promise.reject(I)}try{await((E=(_=k(this,St).config).onSettled)==null?void 0:E.call(_,void 0,P,this.state.variables,this.state.context,this,r))}catch(I){Promise.reject(I)}try{await((N=(S=this.options).onSettled)==null?void 0:N.call(S,void 0,P,t,this.state.context,r))}catch(I){Promise.reject(I)}throw ve(this,vn,mr).call(this,{type:"error",error:P}),P}finally{k(this,St).runNext(this)}}},Ks=new WeakMap,yn=new WeakMap,St=new WeakMap,yo=new WeakMap,vn=new WeakSet,mr=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Ze.batch(()=>{k(this,yn).forEach(r=>{r.onMutationUpdate(t)}),k(this,St).notify({mutation:this,type:"updated",action:t})})},e0);function w0(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var qn,on,Hs,t0,bw=(t0=class extends Ui{constructor(t={}){super();fe(this,qn);fe(this,on);fe(this,Hs);this.config=t,ne(this,qn,new Set),ne(this,on,new Map),ne(this,Hs,0)}build(t,n,r){const o=new vw({client:t,mutationCache:this,mutationId:++ua(this,Hs)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){k(this,qn).add(t);const n=pa(t);if(typeof n=="string"){const r=k(this,on).get(n);r?r.push(t):k(this,on).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(k(this,qn).delete(t)){const n=pa(t);if(typeof n=="string"){const r=k(this,on).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&k(this,on).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=pa(t);if(typeof n=="string"){const r=k(this,on).get(n),o=r==null?void 0:r.find(i=>i.state.status==="pending");return!o||o===t}else return!0}runNext(t){var r;const n=pa(t);if(typeof n=="string"){const o=(r=k(this,on).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ze.batch(()=>{k(this,qn).forEach(t=>{this.notify({type:"removed",mutation:t})}),k(this,qn).clear(),k(this,on).clear()})}getAll(){return Array.from(k(this,qn))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Dp(n,r))}findAll(t={}){return this.getAll().filter(n=>Dp(t,n))}notify(t){Ze.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Ze.batch(()=>Promise.all(t.map(n=>n.continue().catch(kt))))}},qn=new WeakMap,on=new WeakMap,Hs=new WeakMap,t0);function pa(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Vn,Ar,Rt,Yn,Jn,Ia,_u,n0,xw=(n0=class extends Ui{constructor(n,r){super();fe(this,Jn);fe(this,Vn);fe(this,Ar);fe(this,Rt);fe(this,Yn);ne(this,Vn,n),this.setOptions(r),this.bindMethods(),ve(this,Jn,Ia).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var o;const r=this.options;this.options=k(this,Vn).defaultMutationOptions(n),Ya(this.options,r)||k(this,Vn).getMutationCache().notify({type:"observerOptionsUpdated",mutation:k(this,Rt),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Eo(r.mutationKey)!==Eo(this.options.mutationKey)?this.reset():((o=k(this,Rt))==null?void 0:o.state.status)==="pending"&&k(this,Rt).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=k(this,Rt))==null||n.removeObserver(this)}onMutationUpdate(n){ve(this,Jn,Ia).call(this),ve(this,Jn,_u).call(this,n)}getCurrentResult(){return k(this,Ar)}reset(){var n;(n=k(this,Rt))==null||n.removeObserver(this),ne(this,Rt,void 0),ve(this,Jn,Ia).call(this),ve(this,Jn,_u).call(this)}mutate(n,r){var o;return ne(this,Yn,r),(o=k(this,Rt))==null||o.removeObserver(this),ne(this,Rt,k(this,Vn).getMutationCache().build(k(this,Vn),this.options)),k(this,Rt).addObserver(this),k(this,Rt).execute(n)}},Vn=new WeakMap,Ar=new WeakMap,Rt=new WeakMap,Yn=new WeakMap,Jn=new WeakSet,Ia=function(){var r;const n=((r=k(this,Rt))==null?void 0:r.state)??w0();ne(this,Ar,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},_u=function(n){Ze.batch(()=>{var r,o,i,s,a,l,c,u;if(k(this,Yn)&&this.hasListeners()){const f=k(this,Ar).variables,d=k(this,Ar).context,p={client:k(this,Vn),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(o=(r=k(this,Yn)).onSuccess)==null||o.call(r,n.data,f,d,p)}catch(h){Promise.reject(h)}try{(s=(i=k(this,Yn)).onSettled)==null||s.call(i,n.data,null,f,d,p)}catch(h){Promise.reject(h)}}else if((n==null?void 0:n.type)==="error"){try{(l=(a=k(this,Yn)).onError)==null||l.call(a,n.error,f,d,p)}catch(h){Promise.reject(h)}try{(u=(c=k(this,Yn)).onSettled)==null||u.call(c,void 0,n.error,f,d,p)}catch(h){Promise.reject(h)}}}this.listeners.forEach(f=>{f(k(this,Ar))})})},n0),bn,r0,ww=(r0=class extends Ui{constructor(t={}){super();fe(this,bn);this.config=t,ne(this,bn,new Map)}build(t,n,r){const o=n.queryKey,i=n.queryHash??qf(o,n);let s=this.get(i);return s||(s=new pw({client:t,queryKey:o,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(s)),s}add(t){k(this,bn).has(t.queryHash)||(k(this,bn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=k(this,bn).get(t.queryHash);n&&(t.destroy(),n===t&&k(this,bn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ze.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return k(this,bn).get(t)}getAll(){return[...k(this,bn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Rp(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Rp(t,r)):n}notify(t){Ze.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Ze.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ze.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},bn=new WeakMap,r0),Ke,Cr,_r,Ti,Ni,Er,Oi,Pi,o0,A0=(o0=class{constructor(e={}){fe(this,Ke);fe(this,Cr);fe(this,_r);fe(this,Ti);fe(this,Ni);fe(this,Er);fe(this,Oi);fe(this,Pi);ne(this,Ke,e.queryCache||new ww),ne(this,Cr,e.mutationCache||new bw),ne(this,_r,e.defaultOptions||{}),ne(this,Ti,new Map),ne(this,Ni,new Map),ne(this,Er,0)}mount(){ua(this,Er)._++,k(this,Er)===1&&(ne(this,Oi,Yf.subscribe(async e=>{e&&(await this.resumePausedMutations(),k(this,Ke).onFocus())})),ne(this,Pi,Ga.subscribe(async e=>{e&&(await this.resumePausedMutations(),k(this,Ke).onOnline())})))}unmount(){var e,t;ua(this,Er)._--,k(this,Er)===0&&((e=k(this,Oi))==null||e.call(this),ne(this,Oi,void 0),(t=k(this,Pi))==null||t.call(this),ne(this,Pi,void 0))}isFetching(e){return k(this,Ke).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return k(this,Cr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=k(this,Ke).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=k(this,Ke).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Nr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return k(this,Ke).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=k(this,Ke).get(r.queryHash),i=o==null?void 0:o.state.data,s=nw(t,i);if(s!==void 0)return k(this,Ke).build(this,r).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return Ze.batch(()=>k(this,Ke).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=k(this,Ke).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=k(this,Ke);Ze.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=k(this,Ke);return Ze.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Ze.batch(()=>k(this,Ke).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(kt).catch(kt)}invalidateQueries(e,t={}){return Ze.batch(()=>(k(this,Ke).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Ze.batch(()=>k(this,Ke).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let i=o.fetch(void 0,n);return n.throwOnError||(i=i.catch(kt)),o.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(kt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=k(this,Ke).build(this,t);return n.isStaleByTime(Nr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(kt).catch(kt)}fetchInfiniteQuery(e){return e.behavior=Wp(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(kt).catch(kt)}ensureInfiniteQueryData(e){return e.behavior=Wp(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ga.isOnline()?k(this,Cr).resumePausedMutations():Promise.resolve()}getQueryCache(){return k(this,Ke)}getMutationCache(){return k(this,Cr)}getDefaultOptions(){return k(this,_r)}setDefaultOptions(e){ne(this,_r,e)}setQueryDefaults(e,t){k(this,Ti).set(Eo(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...k(this,Ti).values()],n={};return t.forEach(r=>{Es(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){k(this,Ni).set(Eo(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...k(this,Ni).values()],n={};return t.forEach(r=>{Es(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...k(this,_r).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=qf(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Qa&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...k(this,_r).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){k(this,Ke).clear(),k(this,Cr).clear()}},Ke=new WeakMap,Cr=new WeakMap,_r=new WeakMap,Ti=new WeakMap,Ni=new WeakMap,Er=new WeakMap,Oi=new WeakMap,Pi=new WeakMap,o0),C0=C.createContext(void 0),_0=e=>{const t=C.useContext(C0);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Aw=({client:e,children:t})=>(C.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),x.jsx(C0.Provider,{value:e,children:t})),E0=C.createContext(!1),Cw=()=>C.useContext(E0);E0.Provider;function _w(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Ew=C.createContext(_w()),Sw=()=>C.useContext(Ew),kw=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?Vf(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},Tw=e=>{C.useEffect(()=>{e.clearReset()},[e])},Nw=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||Vf(n,[e.error,r])),Ow=e=>{if(e.suspense){const n=o=>o==="static"?o:Math.max(o??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...o)=>n(r(...o)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Pw=(e,t)=>e.isLoading&&e.isFetching&&!t,Mw=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Hp=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Iw(e,t,n){var d,p,h,g;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const r=Cw(),o=Sw(),i=_0(n),s=i.defaultQueryOptions(e);(p=(d=i.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||p.call(d,s);const a=i.getQueryCache().get(s.queryHash);process.env.NODE_ENV!=="production"&&(s.queryFn||console.error(`[${s.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),s._optimisticResults=r?"isRestoring":"optimistic",Ow(s),kw(s,o,a),Tw(o);const l=!i.getQueryCache().get(s.queryHash),[c]=C.useState(()=>new t(i,s)),u=c.getOptimisticResult(s),f=!r&&e.subscribed!==!1;if(C.useSyncExternalStore(C.useCallback(m=>{const y=f?c.subscribe(Ze.batchCalls(m)):kt;return c.updateResult(),y},[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),C.useEffect(()=>{c.setOptions(s)},[s,c]),Mw(s,u))throw Hp(s,c,o);if(Nw({result:u,errorResetBoundary:o,throwOnError:s.throwOnError,query:a,suspense:s.suspense}))throw u.error;if((g=(h=i.getDefaultOptions().queries)==null?void 0:h._experimental_afterQuery)==null||g.call(h,s,u),s.experimental_prefetchInRender&&!_o&&Pw(u,r)){const m=l?Hp(s,c,o):a==null?void 0:a.promise;m==null||m.catch(kt).finally(()=>{c.updateResult()})}return s.notifyOnChangeProps?u:c.trackResult(u)}function _l(e,t){return Iw(e,hw,t)}function Gf(e,t){const n=_0(t),[r]=C.useState(()=>new xw(n,e));C.useEffect(()=>{r.setOptions(e)},[r,e]);const o=C.useSyncExternalStore(C.useCallback(s=>r.subscribe(Ze.batchCalls(s)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=C.useCallback((s,a)=>{r.mutate(s,a).catch(kt)},[r]);if(o.error&&Vf(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:i,mutateAsync:o.mutate}}const Zf=T.createContext({queryClient:new A0});Zf.Provider;const jr=()=>{const e=T.useContext(Zf);if(!e)throw new Error("useConfidenceContext must be used within a ConfidenceContext");return e},S0=({children:e})=>{const[t]=T.useState(new A0);return x.jsx(Zf.Provider,{value:{queryClient:t},children:x.jsx(Aw,{client:t,children:e})})},Be={OPEN:"Open",IN_PROGRESS:"In progress",IN_REVIEW:"In review",COMPLETED:"Completed"},k0="https://marketplace.confidence.com/api",rr=k0+"/confidence",qp=k0+"/dropbox/prod",Lw=async e=>{const t={taskInstanceId:e},n=new Headers;return n.append("Content-Type","application/json"),await(await fetch(`${rr}/playbook-task-complete`,{method:"POST",headers:n,body:JSON.stringify(t)})).json()},Rw=()=>{const{queryClient:e}=jr(),t=Gf({mutationFn:async r=>Lw(r)},e);return{completeTask:async r=>t.mutateAsync(r,{onSuccess:()=>{console.log("Task completed successfully")},onError:o=>{console.error("Error completing task:",o)}}),...t}},Dw=async e=>{const t={taskInstanceId:e},n=new Headers;return n.append("Content-Type","application/json"),await(await fetch(`${rr}/playbook-task-start`,{method:"POST",headers:n,body:JSON.stringify(t)})).json()},Fw=()=>{const{queryClient:e}=jr(),t=Gf({mutationFn:async r=>await Dw(r)},e);return{startTask:r=>t.mutateAsync(r,{onSuccess:()=>{console.log("Task started successfully")},onError:o=>{console.error("Error starting task:",o)}}),...t}},T0=(e,t)=>{const{queryClient:n}=jr(),r=_l({initialData:{},queryFn:()=>n.getQueryData(["PLAYBOOK_EXPANDED_TASKS",+e]),queryKey:["PLAYBOOK_EXPANDED_TASKS",+e]}),o=a=>{var l;return((l=r.data)==null?void 0:l[a.toString()])??!1},i=(a,l)=>{var c;n.setQueryData(["PLAYBOOK_EXPANDED_TASKS",+e],()=>({[a]:l!==void 0?l:!o(a)})),(c=t==null?void 0:t.onTaskExpanded)==null||c.call(t,a,o(a))},s=T.useMemo(()=>Object.values(r.data??{}).some(a=>a),[r.data]);return{isTaskExpanded:o,toggleTaskExpanded:i,isAtLeastOneTaskExpanded:s}},jw=(e,t)=>{const{queryClient:n}=jr(),{completeTask:r}=Rw(),{startTask:o}=Fw(),{toggleTaskExpanded:i}=T0(e);return{completeTask:async(l,c)=>{const{status:u}=await r(l.toString());u&&(i(l,!1),n.setQueryData(["playbook",+e],f=>{if(!f)return f;const d=f.tasks.map(p=>p.sequenceOrder===c+1&&t.quickComplete?{...p,workflowStatus:Be.IN_PROGRESS}:p.taskInstanceId===l?{...p,workflowStatus:u}:p);return{...f,tasks:d}}))},startTask:async l=>{const{status:c}=await o(l.toString());c&&(i(l,!0),n.setQueryData(["playbook",+e],u=>{if(!u)return u;const f=u.tasks.map(d=>d.taskInstanceId===l?{...d,workflowStatus:c}:d);return{...u,tasks:f}}))}}},zw=e=>{var o;const{queryClient:t}=jr(),n=_l({queryFn:async()=>{const i=new Headers,s=await fetch(`${rr}/playbook-details`,{method:"POST",cache:"no-store",headers:i,body:JSON.stringify({playbookInstanceId:+e,start:0,limit:50})});if(!s.ok)throw new Error("Network response was not ok");const a=await s.json();if(a.error)throw new Error(a.error);return a},queryKey:["playbook",+e]},t),r=jw(e,{quickComplete:(o=n.data)==null?void 0:o.quickComplete});return{playbook:n.data,isLoading:n.isLoading,error:n.error,actions:r}},ui={START:"START",PAUSE:"PAUSE",COMPLETE:"COMPLETE",ADD_COMMENT:"ADD_COMMENT"},$w={START:"Start",PAUSE:"Pause",RESUME:"Resume",COMPLETE:"Complete"},Uw=e=>{const{taskStatus:t,canStart:n}=e;return{buttons:T.useMemo(()=>t===Be.OPEN&&n?[ui.START]:t===Be.IN_PROGRESS?[ui.PAUSE,ui.COMPLETE]:t===Be.COMPLETED?[]:[],[e.taskStatus,e.canStart])}},N0=async e=>{const t=new Headers;return t.append("Content-Type","application/json"),await(await fetch(`${rr}/playbook-initiate`,{method:"POST",headers:t,body:JSON.stringify(e)})).json()},qs='/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer properties{:root,:host{--fa-font-solid:normal 900 1em/1 "Font Awesome 6 Free";--fa-font-regular:normal 400 1em/1 "Font Awesome 6 Free";--fa-font-light:normal 300 1em/1 "Font Awesome 6 Pro";--fa-font-thin:normal 100 1em/1 "Font Awesome 6 Pro";--fa-font-duotone:normal 900 1em/1 "Font Awesome 6 Duotone";--fa-font-duotone-regular:normal 400 1em/1 "Font Awesome 6 Duotone";--fa-font-duotone-light:normal 300 1em/1 "Font Awesome 6 Duotone";--fa-font-duotone-thin:normal 100 1em/1 "Font Awesome 6 Duotone";--fa-font-brands:normal 400 1em/1 "Font Awesome 6 Brands";--fa-font-sharp-solid:normal 900 1em/1 "Font Awesome 6 Sharp";--fa-font-sharp-regular:normal 400 1em/1 "Font Awesome 6 Sharp";--fa-font-sharp-light:normal 300 1em/1 "Font Awesome 6 Sharp";--fa-font-sharp-thin:normal 100 1em/1 "Font Awesome 6 Sharp";--fa-font-sharp-duotone-solid:normal 900 1em/1 "Font Awesome 6 Sharp Duotone";--fa-font-sharp-duotone-regular:normal 400 1em/1 "Font Awesome 6 Sharp Duotone";--fa-font-sharp-duotone-light:normal 300 1em/1 "Font Awesome 6 Sharp Duotone";--fa-font-sharp-duotone-thin:normal 100 1em/1 "Font Awesome 6 Sharp Duotone"}svg.svg-inline--fa:not(:root),svg.svg-inline--fa:not(:host){box-sizing:content-box;overflow:visible}.svg-inline--fa{display:var(--fa-display,inline-block);vertical-align:-.125em;height:1em;overflow:visible}.svg-inline--fa.fa-2xs{vertical-align:.1em}.svg-inline--fa.fa-xs{vertical-align:0}.svg-inline--fa.fa-sm{vertical-align:-.07143em}.svg-inline--fa.fa-lg{vertical-align:-.2em}.svg-inline--fa.fa-xl{vertical-align:-.25em}.svg-inline--fa.fa-2xl{vertical-align:-.3125em}.svg-inline--fa.fa-pull-left{margin-right:var(--fa-pull-margin,.3em);width:auto}.svg-inline--fa.fa-pull-right{margin-left:var(--fa-pull-margin,.3em);width:auto}.svg-inline--fa.fa-li{width:var(--fa-li-width,2em);top:.25em}.svg-inline--fa.fa-fw{width:var(--fa-fw-width,1.25em)}.fa-layers svg.svg-inline--fa{margin:auto;position:absolute;top:0;right:0;bottom:0;left:0}.fa-layers-counter,.fa-layers-text{text-align:center;display:inline-block;position:absolute}.fa-layers{text-align:center;vertical-align:-.125em;width:1em;height:1em;display:inline-block;position:relative}.fa-layers svg.svg-inline--fa{transform-origin:50%}.fa-layers-text{transform-origin:50%;top:50%;left:50%;transform:translate(-50%,-50%)}.fa-layers-counter{background-color:var(--fa-counter-background-color,#ff253a);border-radius:var(--fa-counter-border-radius,1em);box-sizing:border-box;color:var(--fa-inverse,#fff);line-height:var(--fa-counter-line-height,1);max-width:var(--fa-counter-max-width,5em);min-width:var(--fa-counter-min-width,1.5em);padding:var(--fa-counter-padding,.25em .5em);right:var(--fa-right,0);text-overflow:ellipsis;top:var(--fa-top,0);transform:scale(var(--fa-counter-scale,.25));transform-origin:100% 0;overflow:hidden}.fa-layers-bottom-right{bottom:var(--fa-bottom,0);right:var(--fa-right,0);transform:scale(var(--fa-layers-scale,.25));transform-origin:100% 100%;top:auto}.fa-layers-bottom-left{bottom:var(--fa-bottom,0);left:var(--fa-left,0);transform:scale(var(--fa-layers-scale,.25));transform-origin:0 100%;top:auto;right:auto}.fa-layers-top-right{top:var(--fa-top,0);right:var(--fa-right,0);transform:scale(var(--fa-layers-scale,.25));transform-origin:100% 0}.fa-layers-top-left{left:var(--fa-left,0);right:auto;top:var(--fa-top,0);transform:scale(var(--fa-layers-scale,.25));transform-origin:0 0}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-2xs{vertical-align:.225em;font-size:.625em;line-height:.1em}.fa-xs{vertical-align:.125em;font-size:.75em;line-height:.08333em}.fa-sm{vertical-align:.05357em;font-size:.875em;line-height:.07143em}.fa-lg{vertical-align:-.075em;font-size:1.25em;line-height:.05em}.fa-xl{vertical-align:-.125em;font-size:1.5em;line-height:.04167em}.fa-2xl{vertical-align:-.1875em;font-size:2em;line-height:.03125em}.fa-fw{text-align:center;width:1.25em}.fa-ul{margin-left:var(--fa-li-margin,2.5em);padding-left:0;list-style-type:none}.fa-ul>li{position:relative}.fa-li{left:calc(-1*var(--fa-li-width,2em));text-align:center;width:var(--fa-li-width,2em);line-height:inherit;position:absolute}.fa-border{border-color:var(--fa-border-color,#eee);border-radius:var(--fa-border-radius,.1em);border-style:var(--fa-border-style,solid);border-width:var(--fa-border-width,.08em);padding:var(--fa-border-padding,.2em .25em .15em)}.fa-pull-left{float:left;margin-right:var(--fa-pull-margin,.3em)}.fa-pull-right{float:right;margin-left:var(--fa-pull-margin,.3em)}.fa-beat{animation-name:fa-beat;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,ease-in-out)}.fa-bounce{animation-name:fa-bounce;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,cubic-bezier(.28,.84,.42,1))}.fa-fade{animation-name:fa-fade;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,cubic-bezier(.4,0,.6,1))}.fa-beat-fade{animation-name:fa-beat-fade;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,cubic-bezier(.4,0,.6,1))}.fa-flip{animation-name:fa-flip;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,ease-in-out)}.fa-shake{animation-name:fa-shake;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,linear)}.fa-spin{animation-name:fa-spin;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,2s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,linear)}.fa-spin-reverse{--fa-animation-direction:reverse}.fa-pulse,.fa-spin-pulse{animation-name:fa-spin;animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,steps(8))}@media(prefers-reduced-motion:reduce){.fa-beat,.fa-bounce,.fa-fade,.fa-beat-fade,.fa-flip,.fa-pulse,.fa-shake,.fa-spin,.fa-spin-pulse{transition-duration:0s;transition-delay:0s;animation-duration:1ms;animation-iteration-count:1;animation-delay:-1ms}}@keyframes fa-beat{0%,90%{transform:scale(1)}45%{transform:scale(var(--fa-beat-scale,1.25))}}@keyframes fa-bounce{0%{transform:scale(1)translateY(0)}10%{transform:scale(var(--fa-bounce-start-scale-x,1.1),var(--fa-bounce-start-scale-y,.9))translateY(0)}30%{transform:scale(var(--fa-bounce-jump-scale-x,.9),var(--fa-bounce-jump-scale-y,1.1))translateY(var(--fa-bounce-height,-.5em))}50%{transform:scale(var(--fa-bounce-land-scale-x,1.05),var(--fa-bounce-land-scale-y,.95))translateY(0)}57%{transform:scale(1)translateY(var(--fa-bounce-rebound,-.125em))}64%{transform:scale(1)translateY(0)}to{transform:scale(1)translateY(0)}}@keyframes fa-fade{50%{opacity:var(--fa-fade-opacity,.4)}}@keyframes fa-beat-fade{0%,to{opacity:var(--fa-beat-fade-opacity,.4);transform:scale(1)}50%{opacity:1;transform:scale(var(--fa-beat-fade-scale,1.125))}}@keyframes fa-flip{50%{transform:rotate3d(var(--fa-flip-x,0),var(--fa-flip-y,1),var(--fa-flip-z,0),var(--fa-flip-angle,-180deg))}}@keyframes fa-shake{0%{transform:rotate(-15deg)}4%{transform:rotate(15deg)}8%,24%{transform:rotate(-18deg)}12%,28%{transform:rotate(18deg)}16%{transform:rotate(-22deg)}20%{transform:rotate(22deg)}32%{transform:rotate(-12deg)}36%{transform:rotate(12deg)}40%,to{transform:rotate(0)}}@keyframes fa-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.fa-rotate-90{transform:rotate(90deg)}.fa-rotate-180{transform:rotate(180deg)}.fa-rotate-270{transform:rotate(270deg)}.fa-flip-horizontal{transform:scaleX(-1)}.fa-flip-vertical{transform:scaleY(-1)}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical{transform:scale(-1)}.fa-rotate-by{transform:rotate(var(--fa-rotate-angle,0))}.fa-stack{vertical-align:middle;width:2.5em;height:2em;display:inline-block;position:relative}.fa-stack-1x,.fa-stack-2x{z-index:var(--fa-stack-z-index,auto);margin:auto;position:absolute;top:0;right:0;bottom:0;left:0}.svg-inline--fa.fa-stack-1x{width:1.25em;height:1em}.svg-inline--fa.fa-stack-2x{width:2.5em;height:2em}.fa-inverse{color:var(--fa-inverse,#fff)}.sr-only,.fa-sr-only,.sr-only-focusable:not(:focus),.fa-sr-only-focusable:not(:focus){clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.svg-inline--fa .fa-primary{fill:var(--fa-primary-color,currentColor);opacity:var(--fa-primary-opacity,1)}.svg-inline--fa .fa-secondary{fill:var(--fa-secondary-color,currentColor);opacity:var(--fa-secondary-opacity,.4)}.svg-inline--fa.fa-swap-opacity .fa-primary{opacity:var(--fa-secondary-opacity,.4)}.svg-inline--fa.fa-swap-opacity .fa-secondary{opacity:var(--fa-primary-opacity,1)}.svg-inline--fa mask .fa-primary,.svg-inline--fa mask .fa-secondary{fill:#000}@layer theme{:root,:host{--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-500:oklch(63.7% .237 25.331);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--spacing:.25rem;--container-md:28rem;--container-lg:32rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1)}}@layer base{.confidence-playbook,.confidence-playbook *,.confidence-playbook :after,.confidence-playbook :before,.confidence-playbook ::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}.confidence-playbook ::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}.confidence-playbook{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}.confidence-playbook hr{height:0;color:inherit;border-top-width:1px}.confidence-playbook abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.confidence-playbook h1,.confidence-playbook h2,.confidence-playbook h3,.confidence-playbook h4,.confidence-playbook h5,.confidence-playbook h6{font-size:inherit;font-weight:inherit}.confidence-playbook a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}.confidence-playbook b,.confidence-playbook strong{font-weight:bolder}.confidence-playbook code,.confidence-playbook kbd,.confidence-playbook samp,.confidence-playbook pre{font-feature-settings:normal;font-variation-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}.confidence-playbook small{font-size:80%}.confidence-playbook sub,.confidence-playbook sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}.confidence-playbook sub{bottom:-.25em}.confidence-playbook sup{top:-.5em}.confidence-playbook table{text-indent:0;border-color:inherit;border-collapse:collapse}.confidence-playbook :-moz-focusring{outline:auto}.confidence-playbook progress{vertical-align:baseline}.confidence-playbook summary{display:list-item}.confidence-playbook ol,.confidence-playbook ul,.confidence-playbook menu{list-style:none}.confidence-playbook img,.confidence-playbook svg,.confidence-playbook video,.confidence-playbook canvas,.confidence-playbook audio,.confidence-playbook iframe,.confidence-playbook embed,.confidence-playbook object{vertical-align:middle;display:block}.confidence-playbook img,.confidence-playbook video{max-width:100%;height:auto}.confidence-playbook button,.confidence-playbook input,.confidence-playbook select,.confidence-playbook optgroup,.confidence-playbook textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}.confidence-playbook ::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}.confidence-playbook :where(select:is([multiple],[size])) optgroup{font-weight:bolder}.confidence-playbook :where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}.confidence-playbook ::file-selector-button{margin-inline-end:4px}.confidence-playbook ::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){.confidence-playbook ::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){.confidence-playbook ::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}.confidence-playbook textarea{resize:vertical}.confidence-playbook ::-webkit-search-decoration{-webkit-appearance:none}.confidence-playbook ::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}.confidence-playbook ::-webkit-datetime-edit{display:inline-flex}.confidence-playbook ::-webkit-datetime-edit-fields-wrapper{padding:0}.confidence-playbook ::-webkit-datetime-edit{padding-block:0}.confidence-playbook ::-webkit-datetime-edit-year-field{padding-block:0}.confidence-playbook ::-webkit-datetime-edit-month-field{padding-block:0}.confidence-playbook ::-webkit-datetime-edit-day-field{padding-block:0}.confidence-playbook ::-webkit-datetime-edit-hour-field{padding-block:0}.confidence-playbook ::-webkit-datetime-edit-minute-field{padding-block:0}.confidence-playbook ::-webkit-datetime-edit-second-field{padding-block:0}.confidence-playbook ::-webkit-datetime-edit-millisecond-field{padding-block:0}.confidence-playbook ::-webkit-datetime-edit-meridiem-field{padding-block:0}.confidence-playbook ::-webkit-calendar-picker-indicator{line-height:1}.confidence-playbook :-moz-ui-invalid{box-shadow:none}.confidence-playbook button,.confidence-playbook input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}.confidence-playbook ::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}.confidence-playbook ::-webkit-inner-spin-button{height:auto}.confidence-playbook ::-webkit-outer-spin-button{height:auto}.confidence-playbook [hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.pointer-events-none{pointer-events:none!important}.absolute{position:absolute!important}.fixed{position:fixed!important}.relative{position:relative!important}.sticky{position:sticky!important}.inset-0{inset:calc(var(--spacing)*0)!important}.top-0{top:calc(var(--spacing)*0)!important}.top-0\\.5{top:calc(var(--spacing)*.5)!important}.top-1{top:calc(var(--spacing)*1)!important}.top-3{top:calc(var(--spacing)*3)!important}.-right-0,.right-0{right:calc(var(--spacing)*0)!important}.bottom-0{bottom:calc(var(--spacing)*0)!important}.bottom-2{bottom:calc(var(--spacing)*2)!important}.-left-9{left:calc(var(--spacing)*-9)!important}.left-0{left:calc(var(--spacing)*0)!important}.left-1{left:calc(var(--spacing)*1)!important}.left-1\\/2{left:50%!important}.left-4{left:calc(var(--spacing)*4)!important}.z-2{z-index:2!important}.z-10{z-index:10!important}.z-50{z-index:50!important}.z-\\[9999999997\\],.z-\\[9999999998\\],.z-\\[9999999999\\]{z-index:2147483647!important}.container{width:100%!important}@media(min-width:40rem){.container{max-width:40rem!important}}@media(min-width:48rem){.container{max-width:48rem!important}}@media(min-width:64rem){.container{max-width:64rem!important}}@media(min-width:80rem){.container{max-width:80rem!important}}@media(min-width:96rem){.container{max-width:96rem!important}}.m-0{margin:calc(var(--spacing)*0)!important}.mx-1{margin-inline:calc(var(--spacing)*1)!important}.mx-2{margin-inline:calc(var(--spacing)*2)!important}.mx-4{margin-inline:calc(var(--spacing)*4)!important}.mx-auto{margin-inline:auto!important}.my-1{margin-block:calc(var(--spacing)*1)!important}.my-2{margin-block:calc(var(--spacing)*2)!important}.-mt-\\[1px\\]{margin-top:-1px!important}.mt-0{margin-top:calc(var(--spacing)*0)!important}.mt-3{margin-top:calc(var(--spacing)*3)!important}.mr-2{margin-right:calc(var(--spacing)*2)!important}.-mb-3{margin-bottom:calc(var(--spacing)*-3)!important}.mb-1{margin-bottom:calc(var(--spacing)*1)!important}.mb-2{margin-bottom:calc(var(--spacing)*2)!important}.mb-4{margin-bottom:calc(var(--spacing)*4)!important}.ml-2{margin-left:calc(var(--spacing)*2)!important}.block{display:block!important}.flex{display:flex!important}.hidden{display:none!important}.inline-flex{display:inline-flex!important}.size-4{width:calc(var(--spacing)*4)!important;height:calc(var(--spacing)*4)!important}.size-9{width:calc(var(--spacing)*9)!important;height:calc(var(--spacing)*9)!important}.h-2{height:calc(var(--spacing)*2)!important}.h-3{height:calc(var(--spacing)*3)!important}.h-4{height:calc(var(--spacing)*4)!important}.h-16{height:calc(var(--spacing)*16)!important}.h-\\[18px\\]{height:18px!important}.h-\\[20px\\]{height:20px!important}.h-\\[22px\\]{height:22px!important}.h-\\[24px\\]{height:24px!important}.h-\\[30px\\]{height:30px!important}.h-\\[38px\\]{height:38px!important}.h-\\[40px\\]{height:40px!important}.h-\\[75px\\]{height:75px!important}.h-\\[100vh\\]{height:100vh!important}.h-\\[110px\\]{height:110px!important}.h-full{height:100%!important}.min-h-16{min-height:calc(var(--spacing)*16)!important}.min-h-screen{min-height:100vh!important}.w-1\\/3{width:33.3333%!important}.w-3{width:calc(var(--spacing)*3)!important}.w-4{width:calc(var(--spacing)*4)!important}.w-\\[20px\\]{width:20px!important}.w-\\[27px\\]{width:27px!important}.w-\\[38px\\]{width:38px!important}.w-\\[75px\\]{width:75px!important}.w-\\[400px\\]{width:400px!important}.w-\\[calc\\(100vw-1rem\\)\\]{width:calc(100vw - 1rem)!important}.w-full{width:100%!important}.w-screen{width:100vw!important}.max-w-400{max-width:calc(var(--spacing)*400)!important}.max-w-\\[300px\\]{max-width:300px!important}.max-w-\\[420px\\]{max-width:420px!important}.max-w-lg{max-width:var(--container-lg)!important}.max-w-md{max-width:var(--container-md)!important}.min-w-0{min-width:calc(var(--spacing)*0)!important}.min-w-\\[106px\\]{min-width:106px!important}.min-w-\\[140px\\]{min-width:140px!important}.min-w-\\[160px\\]{min-width:160px!important}.min-w-\\[172px\\]{min-width:172px!important}.min-w-\\[270px\\]{min-width:270px!important}.min-w-fit{min-width:fit-content!important}.flex-1{flex:1!important}.flex-shrink-0{flex-shrink:0!important}.-translate-x-1\\/2{--tw-translate-x: -50% !important;translate:var(--tw-translate-x)var(--tw-translate-y)!important}.translate-y-0{--tw-translate-y:calc(var(--spacing)*0)!important;translate:var(--tw-translate-x)var(--tw-translate-y)!important}.translate-y-full{--tw-translate-y:100%!important;translate:var(--tw-translate-x)var(--tw-translate-y)!important}.rotate-180{rotate:180deg!important}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)!important}.animate-progress{animation:1.5s ease-in-out infinite progress!important}.animate-pulse{animation:var(--animate-pulse)!important}.animate-spin{animation:var(--animate-spin)!important}.cursor-not-allowed{cursor:not-allowed!important}.cursor-pointer{cursor:pointer!important}.cursor-zoom-in{cursor:zoom-in!important}.resize{resize:both!important}.list-decimal{list-style-type:decimal!important}.list-disc{list-style-type:disc!important}.flex-col{flex-direction:column!important}.flex-wrap{flex-wrap:wrap!important}.items-center{align-items:center!important}.items-start{align-items:flex-start!important}.items-stretch{align-items:stretch!important}.justify-between{justify-content:space-between!important}.justify-center{justify-content:center!important}.justify-end{justify-content:flex-end!important}.justify-start{justify-content:flex-start!important}.gap-1{gap:calc(var(--spacing)*1)!important}.gap-2{gap:calc(var(--spacing)*2)!important}.gap-3{gap:calc(var(--spacing)*3)!important}.gap-4{gap:calc(var(--spacing)*4)!important}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0!important;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse))!important;margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))!important}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0!important;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse))!important;margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))!important}:where(.space-x-1>:not(:last-child)){--tw-space-x-reverse:0!important;margin-inline-start:calc(calc(var(--spacing)*1)*var(--tw-space-x-reverse))!important;margin-inline-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-x-reverse)))!important}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0!important;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse))!important;margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))!important}:where(.space-x-4>:not(:last-child)){--tw-space-x-reverse:0!important;margin-inline-start:calc(calc(var(--spacing)*4)*var(--tw-space-x-reverse))!important;margin-inline-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-x-reverse)))!important}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0!important;border-bottom-style:var(--tw-border-style)!important;border-top-style:var(--tw-border-style)!important;border-top-width:calc(1px*var(--tw-divide-y-reverse))!important;border-bottom-width:calc(1px*calc(1 - var(--tw-divide-y-reverse)))!important}:where(.divide-black\\/10>:not(:last-child)){border-color:oklab(0% none none/.1) oklab(0% none none/.1) oklab(0% none none/.1) oklab(0% none none/.1)!important}:where(.divide-gray-100>:not(:last-child)){border-color:#ebedef!important}.self-end{align-self:flex-end!important}.truncate{text-overflow:ellipsis!important;white-space:nowrap!important;overflow:hidden!important}.overflow-hidden{overflow:hidden!important}.overflow-x-hidden{overflow-x:hidden!important}.overflow-y-auto{overflow-y:auto!important}.rounded{border-radius:.25rem!important}.rounded-full{border-radius:3.40282e38px!important}.rounded-lg{border-radius:var(--radius-lg)!important}.rounded-md{border-radius:var(--radius-md)!important}.rounded-none{border-radius:0!important}.rounded-sm{border-radius:var(--radius-sm)!important}.rounded-t-sm{border-top-left-radius:var(--radius-sm)!important;border-top-right-radius:var(--radius-sm)!important}.rounded-l-sm{border-top-left-radius:var(--radius-sm)!important;border-bottom-left-radius:var(--radius-sm)!important}.rounded-b-md{border-bottom-right-radius:var(--radius-md)!important;border-bottom-left-radius:var(--radius-md)!important}.border{border-style:var(--tw-border-style)!important;border-width:1px!important}.border-0{border-style:var(--tw-border-style)!important;border-width:0!important}.border-2{border-style:var(--tw-border-style)!important;border-width:2px!important}.border-t{border-top-style:var(--tw-border-style)!important;border-top-width:1px!important}.border-b{border-bottom-style:var(--tw-border-style)!important;border-bottom-width:1px!important}.border-l-1{border-left-style:var(--tw-border-style)!important;border-left-width:1px!important}.border-l-3{border-left-style:var(--tw-border-style)!important;border-left-width:3px!important}.border-none{--tw-border-style:none!important;border-style:none!important}.border-\\[\\#94C8FF\\]{border-color:#94c8ff!important}.border-\\[\\#A5DAB1\\]{border-color:#a5dab1!important}.border-\\[\\#C1C5C8\\]{border-color:#c1c5c8!important}.border-black\\/10{border-color:oklab(0% none none/.1) oklab(0% none none/.1) oklab(0% none none/.1) oklab(0% none none/.1)!important}.border-danger-200{border-color:#f0aab1!important}.border-danger-500{border-color:#dc3545!important}.border-gray-50{border-color:#f5f6f7!important}.border-gray-100{border-color:#ebedef!important}.border-gray-200{border-color:#ced1d6!important}.border-gray-300{border-color:#b0b5bd!important}.border-gray-400{border-color:#757e8c!important}.border-gray-700{border-color:#2c3544!important}.border-gray-800{border-color:#232b37!important}.border-info-500{border-color:#17a2b8!important}.border-orange-500{border-color:#ff7800!important}.border-primary-200{border-color:#94c8ff!important}.border-primary-600{border-color:#0069d9!important}.border-purple-500{border-color:#a855f7!important}.border-red-500{border-color:var(--color-red-500)!important}.border-secondary-500{border-color:#6c757d!important}.border-secondary-600{border-color:#5a6268!important}.border-steel-500{border-color:#556987!important}.border-success-200{border-color:#a5dab1!important}.border-success-600{border-color:#218838!important}.border-warning-200{border-color:#ffe597!important}.border-warning-500{border-color:#ffc107!important}.border-white{border-color:#fff!important}.border-t-blue-500{border-top-color:var(--color-blue-500)!important}.border-l-danger-500{border-left-color:#dc3545!important}.border-l-primary-500{border-left-color:#007bff!important}.border-l-success-500{border-left-color:#28a745!important}.border-l-warning-500{border-left-color:#ffc107!important}.bg-\\[\\#E6F2FF\\]{background-color:#e6f2ff!important}.bg-\\[\\#EAF6EC\\]{background-color:#eaf6ec!important}.bg-\\[\\#F0F1F2\\]{background-color:#f0f1f2!important}.bg-\\[\\#FFE600\\]{background-color:#ffe600!important}.bg-black\\/30{background-color:oklab(0% none none/.3)!important}.bg-blue-500{background-color:var(--color-blue-500)!important}.bg-danger-100{background-color:#f6ccd0!important}.bg-danger-500{background-color:#dc3545!important}.bg-dark{background-color:#1c232d!important}.bg-fiserv-orange-500{background-color:#f60!important}.bg-gray-50{background-color:#f5f6f7!important}.bg-gray-100{background-color:#ebedef!important}.bg-gray-200{background-color:#ced1d6!important}.bg-gray-400{background-color:#757e8c!important}.bg-gray-500{background-color:#3a475b!important}.bg-gray-800{background-color:#232b37!important}.bg-gray-900{background-color:#1c232d!important}.bg-info-500{background-color:#17a2b8!important}.bg-orange-500{background-color:#ff7800!important}.bg-primary-100{background-color:#bfdeff!important}.bg-primary-600{background-color:#0069d9!important}.bg-primary-800{background-color:#0054af!important}.bg-purple-500{background-color:#a855f7!important}.bg-secondary-500{background-color:#6c757d!important}.bg-steel-500{background-color:#556987!important}.bg-success-100{background-color:#c9e9d0!important}.bg-success-500{background-color:#28a745!important}.bg-success-600{background-color:#218838!important}.bg-warning-100{background-color:#ffefc1!important}.bg-warning-500{background-color:#ffc107!important}.bg-white{background-color:#fff!important}.bg-yellow{background-color:#ffe600!important}.object-contain{object-fit:contain!important}.object-cover{object-fit:cover!important}.object-center{object-position:center!important}.p-1{padding:calc(var(--spacing)*1)!important}.p-2{padding:calc(var(--spacing)*2)!important}.p-3{padding:calc(var(--spacing)*3)!important}.p-4{padding:calc(var(--spacing)*4)!important}.px-0{padding-inline:calc(var(--spacing)*0)!important}.px-1{padding-inline:calc(var(--spacing)*1)!important}.px-2{padding-inline:calc(var(--spacing)*2)!important}.px-3{padding-inline:calc(var(--spacing)*3)!important}.px-4{padding-inline:calc(var(--spacing)*4)!important}.px-\\[2px\\]{padding-inline:2px!important}.py-1{padding-block:calc(var(--spacing)*1)!important}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)!important}.py-2{padding-block:calc(var(--spacing)*2)!important}.py-4{padding-block:calc(var(--spacing)*4)!important}.pt-2{padding-top:calc(var(--spacing)*2)!important}.pr-2{padding-right:calc(var(--spacing)*2)!important}.pb-1{padding-bottom:calc(var(--spacing)*1)!important}.pb-2{padding-bottom:calc(var(--spacing)*2)!important}.pb-\\[102px\\]{padding-bottom:102px!important}.pl-4{padding-left:calc(var(--spacing)*4)!important}.text-center{text-align:center!important}.text-left{text-align:left!important}.font-mono{font-family:var(--font-mono)!important}.text-2xl{font-size:var(--text-2xl)!important;line-height:var(--tw-leading,var(--text-2xl--line-height))!important}.text-base{font-size:var(--text-base)!important;line-height:var(--tw-leading,var(--text-base--line-height))!important}.text-lg{font-size:var(--text-lg)!important;line-height:var(--tw-leading,var(--text-lg--line-height))!important}.text-sm{font-size:var(--text-sm)!important;line-height:var(--tw-leading,var(--text-sm--line-height))!important}.text-sm\\/6{font-size:var(--text-sm)!important;line-height:calc(var(--spacing)*6)!important}.text-xl{font-size:var(--text-xl)!important;line-height:var(--tw-leading,var(--text-xl--line-height))!important}.text-xs{font-size:var(--text-xs)!important;line-height:var(--tw-leading,var(--text-xs--line-height))!important}.text-\\[10px\\]{font-size:10px!important}.leading-\\[18px\\]{--tw-leading:18px!important;line-height:18px!important}.leading-\\[22px\\]{--tw-leading:22px!important;line-height:22px!important}.leading-\\[24px\\]{--tw-leading:24px!important;line-height:24px!important}.font-bold{--tw-font-weight:var(--font-weight-bold)!important;font-weight:var(--font-weight-bold)!important}.font-medium{--tw-font-weight:var(--font-weight-medium)!important;font-weight:var(--font-weight-medium)!important}.font-normal{--tw-font-weight:var(--font-weight-normal)!important;font-weight:var(--font-weight-normal)!important}.font-semibold{--tw-font-weight:var(--font-weight-semibold)!important;font-weight:var(--font-weight-semibold)!important}.whitespace-nowrap{white-space:nowrap!important}.text-\\[\\#0069D9\\]{color:#0069d9!important}.text-black{color:#000!important}.text-blue-600{color:var(--color-blue-600)!important}.text-danger-500{color:#dc3545!important}.text-danger-600{color:#c82333!important}.text-danger-900{color:#721c24!important}.text-dark{color:#1c232d!important}.text-dark-300{color:#343a40!important}.text-fiserv-orange-500{color:#f60!important}.text-gray-50{color:#f5f6f7!important}.text-gray-200{color:#ced1d6!important}.text-gray-300{color:#b0b5bd!important}.text-gray-400{color:#757e8c!important}.text-gray-500{color:#3a475b!important}.text-gray-700{color:#2c3544!important}.text-gray-800{color:#232b37!important}.text-gray-900{color:#1c232d!important}.text-info-500{color:#17a2b8!important}.text-orange-500{color:#ff7800!important}.text-primary-600{color:#0069d9!important}.text-primary-900{color:#004085!important}.text-purple-500{color:#a855f7!important}.text-secondary{color:#6c757d!important}.text-secondary-400{color:#899197!important}.text-secondary-500{color:#6c757d!important}.text-secondary-600{color:#5a6268!important}.text-steel-500{color:#556987!important}.text-success-500{color:#28a745!important}.text-success-600{color:#218838!important}.text-success-900{color:#155724!important}.text-warning-500{color:#ffc107!important}.text-warning-600{color:#f59e0b!important}.text-warning-900{color:#935f07!important}.text-white{color:#fff!important}.text-yellow{color:#ffe600!important}.uppercase{text-transform:uppercase!important}.italic{font-style:italic!important}.line-through{text-decoration-line:line-through!important}.underline{text-decoration-line:underline!important}.opacity-0{opacity:0!important}.opacity-50{opacity:.5!important}.opacity-60{opacity:.6!important}.opacity-70{opacity:.7!important}.opacity-100{opacity:1!important}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a)!important;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040)!important;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a)!important;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a)!important;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a)!important;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important}.shadow-dark\\/50{--tw-shadow-color:#1c232d80!important}@supports (color:color-mix(in lab,red,red)){.shadow-dark\\/50{--tw-shadow-color:color-mix(in oklab,oklab(25.3864% -.0047446 -.0210213/.5) var(--tw-shadow-alpha),transparent)!important}}.outline{outline-style:var(--tw-outline-style)!important;outline-width:1px!important}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events!important;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))!important;transition-duration:var(--tw-duration,var(--default-transition-duration))!important}.transition-all{transition-property:all!important;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))!important;transition-duration:var(--tw-duration,var(--default-transition-duration))!important}.duration-300{--tw-duration:.3s!important;transition-duration:.3s!important}.ease-in-out{--tw-ease:var(--ease-in-out)!important;transition-timing-function:var(--ease-in-out)!important}.ease-out{--tw-ease:var(--ease-out)!important;transition-timing-function:var(--ease-out)!important}.outline-none{--tw-outline-style:none!important;outline-style:none!important}.\\[writing-mode\\:vertical-lr\\]{writing-mode:vertical-lr!important}@media(hover:hover){.hover\\:border-primary-500:hover{border-color:#007bff!important}.hover\\:bg-danger-500:hover{background-color:#dc3545!important}.hover\\:bg-dark:hover{background-color:#1c232d!important}.hover\\:bg-fiserv-orange-500:hover{background-color:#f60!important}.hover\\:bg-gray-50:hover{background-color:#f5f6f7!important}.hover\\:bg-gray-100:hover{background-color:#ebedef!important}.hover\\:bg-gray-400:hover{background-color:#757e8c!important}.hover\\:bg-gray-500:hover{background-color:#3a475b!important}.hover\\:bg-gray-800:hover{background-color:#232b37!important}.hover\\:bg-gray-900:hover{background-color:#1c232d!important}.hover\\:bg-info-500:hover{background-color:#17a2b8!important}.hover\\:bg-orange-500:hover{background-color:#ff7800!important}.hover\\:bg-primary-700:hover{background-color:#0062cc!important}.hover\\:bg-primary-800:hover{background-color:#0054af!important}.hover\\:bg-purple-500:hover{background-color:#a855f7!important}.hover\\:bg-secondary-500:hover{background-color:#6c757d!important}.hover\\:bg-steel-500:hover{background-color:#556987!important}.hover\\:bg-success-500:hover{background-color:#28a745!important}.hover\\:bg-transparent:hover{background-color:#0000!important}.hover\\:bg-warning-500:hover{background-color:#ffc107!important}.hover\\:bg-yellow:hover{background-color:#ffe600!important}.hover\\:text-black:hover{color:#000!important}.hover\\:text-blue-600:hover{color:var(--color-blue-600)!important}.hover\\:text-danger-600:hover{color:#c82333!important}.hover\\:text-danger-700:hover{color:#bd2130!important}.hover\\:text-danger-800:hover{color:#aa1927!important}.hover\\:text-dark:hover{color:#1c232d!important}.hover\\:text-fiserv-orange-800:hover{color:#bf4c00!important}.hover\\:text-gray-400:hover{color:#757e8c!important}.hover\\:text-gray-700:hover{color:#2c3544!important}.hover\\:text-gray-800:hover{color:#232b37!important}.hover\\:text-gray-900:hover{color:#1c232d!important}.hover\\:text-info-800:hover{color:#026777!important}.hover\\:text-orange-800:hover{color:#c75d00!important}.hover\\:text-primary-600:hover{color:#0069d9!important}.hover\\:text-primary-700:hover{color:#0062cc!important}.hover\\:text-primary-800:hover{color:#0054af!important}.hover\\:text-purple-800:hover{color:#6f33a7!important}.hover\\:text-secondary-800:hover{color:#444a50!important}.hover\\:text-steel-800:hover{color:#333f51!important}.hover\\:text-success-600:hover{color:#218838!important}.hover\\:text-success-700:hover{color:#1e7e34!important}.hover\\:text-success-800:hover{color:#106c25!important}.hover\\:text-warning-600:hover{color:#f59e0b!important}.hover\\:text-warning-700:hover{color:#dd8e0a!important}.hover\\:text-warning-800:hover{color:#b87708!important}.hover\\:text-white:hover{color:#fff!important}.hover\\:text-yellow:hover{color:#ffe600!important}}.focus\\:border-red-500:focus{border-color:var(--color-red-500)!important}.focus\\:outline:focus{outline-style:var(--tw-outline-style)!important;outline-width:1px!important}.focus\\:outline-3:focus{outline-style:var(--tw-outline-style)!important;outline-width:3px!important}.focus\\:outline-primary-500\\/\\[\\.3\\]:focus{outline-color:#007bff4d!important}.active\\:bg-gray-50:active{background-color:#f5f6f7!important}.active\\:bg-gray-800:active{background-color:#232b37!important}.active\\:text-black:active{color:#000!important}.active\\:text-white:active{color:#fff!important}.disabled\\:pointer-events-none:disabled{pointer-events:none!important}.disabled\\:opacity-15:disabled{opacity:.15!important}.data-closed\\:opacity-0[data-closed]{opacity:0!important}.data-focus\\:-outline-offset-2[data-focus]{outline-offset:-2px!important}.data-focus\\:outline-primary-500[data-focus]{outline-color:#007bff!important}@media(min-width:48rem){.md\\:min-w-fit{min-width:fit-content!important}}}.confidence-playbook *{--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-duration:initial;--tw-ease:initial}.confidence-playbook{display:unset!important;color:#1c232d!important}@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-duration:initial;--tw-ease:initial}}}@layer theme,base,components,utilities;.lexical-view-mode{word-break:break-word!important;color:#1c232d!important;width:100%!important}.lexical-view-mode ul{list-style:revert!important}.editable .lexical-view-mode:hover{cursor:text!important;background-color:#00000012!important;border-radius:1px!important;outline:4px solid #00000012!important}.lexical-view-mode .Collapsible__container{width:fit-content!important}.lexical-view-mode .Collapsible__title{color:#007bff!important;cursor:pointer!important;background-color:#0000!important;align-items:center!important;margin-bottom:4px!important;padding:0!important;list-style:none!important;display:flex!important}.lexical-view-mode .Collapsible__title:hover{color:#0069d9!important}.lexical-view-mode .Collapsible__title:hover .editor-paragraph{text-decoration:underline!important}.lexical-view-mode .Collapsible__title::marker{display:none!important}.lexical-view-mode .Collapsible__title::-webkit-details-marker{display:none!important}.lexical-view-mode .Collapsible__title:before{content:""!important;-moz-osx-font-smoothing:grayscale!important;-webkit-font-smoothing:antialiased!important;display:var(--fa-display,inline-block)!important;font-variant:normal!important;text-rendering:auto!important;background:#fff!important;border-radius:30px!important;margin-right:4px!important;font-family:"Font Awesome 5 Pro"!important;font-style:normal!important;font-weight:900!important;line-height:1!important}.lexical-view-mode .Collapsible__title:hover:before{color:#0069d9!important;border:3px solid #fff!important;margin-left:-3px!important;margin-right:1px!important}.lexical-view-mode hr{border:none!important;margin:5px 0!important;padding:3px 0!important}.lexical-view-mode hr:after{content:""!important;background-color:#0000001a!important;height:2px!important;line-height:2px!important;display:block!important}.lexical-view-mode .editor-line-spacer{background:0 0!important;border:1px dashed #0000!important;line-height:6px!important}.lexical-view-mode .other h2{margin-bottom:7px;color:#444!important;font-size:18px!important}.lexical-view-mode .other a{font-size:14px;color:#777!important;text-decoration:underline!important}.lexical-view-mode .other ul{list-style-type:none;margin:0!important;padding:0!important}.lexical-view-mode .ltr{text-align:left}.lexical-view-mode .rtl{text-align:right}.lexical-view-mode .editor-shell{color:#1c232d!important;border-radius:4px!important;width:100%!important;font-weight:400!important;position:relative!important}.lexical-view-mode .editor{position:relative;background:#fff!important}.lexical-view-mode .editor-input{caret-color:#444;resize:none!important;-moz-tab-size:1!important;tab-size:1!important;outline:0!important;min-height:150px!important;padding:12px!important;position:relative!important}.lexical-view-mode .editor-placeholder{pointer-events:none;color:#999!important;text-overflow:ellipsis!important;-webkit-user-select:none!important;user-select:none!important;font-size:15px!important;display:inline-block!important;position:absolute!important;top:15px!important;left:10px!important;overflow:hidden!important}.lexical-view-mode .editor-text-bold,.lexical-view-mode strong{font-weight:700!important}.lexical-view-mode .editor-text-italic{font-style:italic}.lexical-view-mode .editor-text-code{color:#d70c69;background-color:#0000001a!important;border-radius:4px!important;padding:1px .25rem!important;font-family:Menlo,Consolas,Monaco,monospace!important;font-size:85%!important}.lexical-view-mode .editor-link{word-break:break-word;color:#007bff!important;cursor:pointer!important;background-color:#0000!important;text-decoration:underline!important}.lexical-view-mode .editor-link:hover{color:#0062cc!important;text-decoration:underline!important}.lexical-view-mode .editor-code,.lexical-view-mode pre{word-break:break-word;-moz-tab-size:2!important;tab-size:2!important;background-color:#f0f2f5!important;border-radius:4px!important;margin:8px 0!important;padding:8px 8px 8px 52px!important;font-family:Menlo,Consolas,Monaco,monospace!important;font-size:13px!important;line-height:1.53!important;display:block!important;position:relative!important;overflow-x:auto!important}.lexical-view-mode .editor-code:before{min-width:25px;content:attr(data-gutter)!important;color:#777!important;white-space:pre-wrap!important;text-align:right!important;background-color:#eee!important;border-right:1px solid #ccc!important;padding:8px!important;position:absolute!important;top:0!important;left:0!important}.lexical-view-mode pre{white-space:pre-wrap!important;padding-left:8px!important}.lexical-view-mode pre:before{border-right:0!important;width:100%!important;height:23px!important}.lexical-view-mode .editor-code:after,.lexical-view-mode pre:after{color:#00000080;content:attr(data-highlight-language)!important;text-transform:uppercase!important;padding:3px!important;font-size:10px!important;position:absolute!important;top:0!important;right:3px!important}.lexical-view-mode .editor-tokenComment{color:#708090}.lexical-view-mode .editor-tokenPunctuation{color:#999}.lexical-view-mode .editor-tokenProperty{color:#905}.lexical-view-mode .editor-tokenSelector{color:#690}.lexical-view-mode .editor-tokenOperator{color:#9a6e3a}.lexical-view-mode .editor-tokenAttr{color:#07a}.lexical-view-mode .editor-tokenVariable{color:#e90}.lexical-view-mode .editor-tokenFunction{color:#dd4a68}.lexical-view-mode .editor-paragraph,.lexical-view-mode p{word-break:break-word;margin:0 0 .3rem!important;padding:0!important}.lexical-view-mode .editor-paragraph:last-child{margin-bottom:0}.lexical-view-mode .editor-heading-h1,.lexical-view-mode h1{line-height:100%;border-bottom:thin solid #0000001a!important;margin-top:1.2em!important;margin-bottom:.6em!important;padding-bottom:6px!important;font-size:24px!important}.lexical-view-mode .editor-heading-h2:first-child,.lexical-view-mode .editor-heading-h1:first-child,.lexical-view-mode h2:first-child,.lexical-view-mode h1:first-child{margin-top:0}.lexical-view-mode .editor-heading-h2,.lexical-view-mode h2{line-height:100%;border-bottom:thin solid #0000001a!important;margin-top:1.2em!important;margin-bottom:.6em!important;padding-bottom:6px!important;font-size:20px!important}.lexical-view-mode .editor-list-ol,.lexical-view-mode ol{margin:0 0 .3rem 15px!important;padding:0 0 0 15px!important;list-style-type:decimal!important;list-style-position:outside!important}.lexical-view-mode li ol{margin:0 0 0 20px!important}.lexical-view-mode .editor-list-ol2,.lexical-view-mode .editor-list-ol3,.lexical-view-mode .editor-list-ol4,.lexical-view-mode .editor-list-ol5,.lexical-view-mode .editor-list-ol6,.lexical-view-mode .editor-list-ol7{list-style-position:outside;padding:0!important}.lexical-view-mode .editor-list-ol2{list-style-type:lower-alpha}.lexical-view-mode .editor-list-ol3{list-style-type:lower-roman}.lexical-view-mode .editor-list-ol4{list-style-type:decimal}.lexical-view-mode .editor-list-ol5{list-style-type:lower-alpha}.lexical-view-mode .editor-list-ol6{list-style-type:lower-roman}.lexical-view-mode .editor-list-ol7{list-style-type:decimal}.lexical-view-mode .editor-list-ul,.lexical-view-mode ul{margin-bottom:.3rem;margin:0 0 0 15px!important;padding:0 0 0 5px!important;list-style-position:outside!important}.lexical-view-mode li ul{margin:0 0 0 15px!important;padding:0 0 0 3px!important}.lexical-view-mode .editor-list-item{padding-left:0;vertical-align:top!important;margin-bottom:12px!important;line-height:1.3!important}.lexical-view-mode .editor-nested-list-item{list-style-type:none}.lexical-view-mode code{color:inherit!important;word-wrap:break-word!important;white-space:break-spaces!important}.lexical-view-mode a>code{color:inherit}.lexical-view-mode pre::-webkit-scrollbar{width:10px;background:0 0!important}.lexical-view-mode pre::-webkit-scrollbar-thumb{background:#999}.lexical-view-mode img{cursor:zoom-in!important;border:1px solid #ccc!important;border-radius:4px!important;width:auto!important;max-width:250px!important;height:auto!important;max-height:250px!important;display:block!important}.lexical-view-mode img:hover,.lexical-view-mode img:focus{outline:3px solid #007bff4d}.lexical-view-mode iframe{background:#000!important;border:1px solid #ccc!important;width:fit-content!important;max-width:100%!important;height:fit-content!important}.lexical-view-mode .ql-align-left{text-align:left!important}.lexical-view-mode .ql-align-right{text-align:right!important}.lexical-view-mode .ql-align-center{text-align:center!important}.lexical-view-mode .ql-align-justify{text-align:justify!important}.lexical-view-mode .ql-size-small{font-size:.75em!important}.lexical-view-mode p>a,.lexical-view-mode li>a{color:#007bff!important;cursor:pointer!important;background-color:#0000!important;text-decoration:underline!important}.lexical-view-mode p>a:hover,.lexical-view-mode li>a:hover{color:#0062cc!important;text-decoration:underline!important}.lexical-view-mode .ql-size-large{font-size:1.25rem!important}.lexical-view-mode .ql-indent-1{margin-left:20px!important}.lexical-view-mode .ql-indent-2{margin-left:40px!important}.lexical-view-mode .ql-indent-3{margin-left:60px!important}.lexical-view-mode .ql-indent-4{margin-left:80px!important}.lexical-view-mode .ql-indent-5{margin-left:100px!important}.lexical-view-mode .ql-indent-6{margin-left:120px!important}.lexical-view-mode .ql-indent-7{margin-left:140px!important}.lexical-view-mode .ql-indent-8{margin-left:160px!important}.lexical-view-mode ol li.ql-indent-1,.lexical-view-mode ol li.ql-indent-2,.lexical-view-mode ol li.ql-indent-3,.lexical-view-mode ol li.ql-indent-4,.lexical-view-mode ol li.ql-indent-5,.lexical-view-mode ol li.ql-indent-6,.lexical-view-mode ol li.ql-indent-7,.lexical-view-mode ol li.ql-indent-8,.lexical-view-mode ul li.ql-indent-1,.lexical-view-mode ul li.ql-indent-2,.lexical-view-mode ul li.ql-indent-3,.lexical-view-mode ul li.ql-indent-4,.lexical-view-mode ul li.ql-indent-5,.lexical-view-mode ul li.ql-indent-6,.lexical-view-mode ul li.ql-indent-7,.lexical-view-mode ul li.ql-indent-8{margin-bottom:.3em!important}.lexical-view-mode ol li.ql-indent-1{counter-reset:list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9!important;counter-increment:list-1!important;margin-left:0!important;list-style-type:none!important}.lexical-view-mode ol li.ql-indent-1::marker{display:none}.lexical-view-mode ol li.ql-indent-1:before{content:counter(list-1,lower-alpha)". "!important}.lexical-view-mode ol li.ql-indent-2{counter-reset:list-3 list-4 list-5 list-6 list-7 list-8 list-9!important;counter-increment:list-2!important;margin-left:20px!important;list-style-type:none!important}.lexical-view-mode ol li.ql-indent-2::marker{display:none}.lexical-view-mode ol li.ql-indent-2:before{content:counter(list-2,lower-roman)". "!important}.lexical-view-mode ol li.ql-indent-3{counter-reset:list-4 list-5 list-6 list-7 list-8 list-9!important;counter-increment:list-3!important;margin-left:40px!important;list-style-type:none!important}.lexical-view-mode ol li.ql-indent-3::marker{display:none}.lexical-view-mode ol li.ql-indent-3:before{content:counter(list-3,decimal)". "!important}.lexical-view-mode ol li.ql-indent-4{counter-reset:list-5 list-6 list-7 list-8 list-9!important;counter-increment:list-4!important;margin-left:60px!important;list-style-type:none!important}.lexical-view-mode ol li.ql-indent-4::marker{display:none}.lexical-view-mode ol li.ql-indent-4:before{content:counter(list-4,lower-alpha)". "!important}.lexical-view-mode ol li.ql-indent-5{counter-reset:list-6 list-7 list-8 list-9!important;counter-increment:list-5!important;margin-left:80px!important;list-style-type:none!important}.lexical-view-mode ol li.ql-indent-5::marker{display:none}.lexical-view-mode ol li.ql-indent-5:before{content:counter(list-5,lower-roman)". "!important}.lexical-view-mode ol li.ql-indent-6{counter-reset:list-7 list-8 list-9!important;counter-increment:list-6!important;margin-left:100px!important;list-style-type:none!important}.lexical-view-mode ol li.ql-indent-6::marker{display:none}.lexical-view-mode ol li.ql-indent-6:before{content:counter(list-6,decimal)". "!important}.lexical-view-mode ol li.ql-indent-7{counter-reset:list-8 list-9!important;counter-increment:list-7!important;margin-left:120px!important;list-style-type:none!important}.lexical-view-mode ol li.ql-indent-7::marker{display:none}.lexical-view-mode ol li.ql-indent-7:before{content:counter(list-7,lower-alpha)". "!important}.lexical-view-mode ol li.ql-indent-8{counter-reset:list-9!important;counter-increment:list-8!important;margin-left:140px!important;list-style-type:none!important}.lexical-view-mode ol li.ql-indent-8::marker{display:none}.lexical-view-mode ol li.ql-indent-8:before{content:counter(list-8,lower-roman)". "!important}.lexical-view-mode ul li.ql-indent-3,.lexical-view-mode ul li.ql-indent-6{list-style-type:disc}.lexical-view-mode ul li.ql-indent-1,.lexical-view-mode ul li.ql-indent-4,.lexical-view-mode ul li.ql-indent-7{list-style-type:circle}.lexical-view-mode ul li.ql-indent-2,.lexical-view-mode ul li.ql-indent-5,.lexical-view-mode ul li.ql-indent-8{list-style-type:square}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}@keyframes progress{0%{transform:translate(-100%)}to{transform:translate(300%)}}',Bw=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Ww=(e,t)=>({classGroupId:e,validator:t}),O0=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Za="-",Vp=[],Kw="arbitrary..",Hw=e=>{const t=Vw(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return qw(s);const a=s.split(Za),l=a[0]===""&&a.length>1?1:0;return P0(a,l,t)},getConflictingClassGroupIds:(s,a)=>{if(a){const l=r[s],c=n[s];return l?c?Bw(c,l):l:c||Vp}return n[s]||Vp}}},P0=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const c=P0(e,t+1,i);if(c)return c}const s=n.validators;if(s===null)return;const a=t===0?e.join(Za):e.slice(t).join(Za),l=s.length;for(let c=0;c<l;c++){const u=s[c];if(u.validator(a))return u.classGroupId}},qw=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?Kw+r:void 0})(),Vw=e=>{const{theme:t,classGroups:n}=e;return Yw(n,t)},Yw=(e,t)=>{const n=O0();for(const r in e){const o=e[r];Jf(o,n,r,t)}return n},Jf=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const s=e[i];Qw(s,t,n,r)}},Qw=(e,t,n,r)=>{if(typeof e=="string"){Gw(e,t,n);return}if(typeof e=="function"){Zw(e,t,n,r);return}Jw(e,t,n,r)},Gw=(e,t,n)=>{const r=e===""?t:M0(t,e);r.classGroupId=n},Zw=(e,t,n,r)=>{if(Xw(e)){Jf(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Ww(n,e))},Jw=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let s=0;s<i;s++){const[a,l]=o[s];Jf(l,M0(t,a),n,r)}},M0=(e,t)=>{let n=e;const r=t.split(Za),o=r.length;for(let i=0;i<o;i++){const s=r[i];let a=n.nextPart.get(s);a||(a=O0(),n.nextPart.set(s,a)),n=a}return n},Xw=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,e2=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,s)=>{n[i]=s,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let s=n[i];if(s!==void 0)return s;if((s=r[i])!==void 0)return o(i,s),s},set(i,s){i in n?n[i]=s:o(i,s)}}},Eu="!",Yp=":",t2=[],Qp=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),n2=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let s=0,a=0,l=0,c;const u=o.length;for(let g=0;g<u;g++){const m=o[g];if(s===0&&a===0){if(m===Yp){i.push(o.slice(l,g)),l=g+1;continue}if(m==="/"){c=g;continue}}m==="["?s++:m==="]"?s--:m==="("?a++:m===")"&&a--}const f=i.length===0?o:o.slice(l);let d=f,p=!1;f.endsWith(Eu)?(d=f.slice(0,-1),p=!0):f.startsWith(Eu)&&(d=f.slice(1),p=!0);const h=c&&c>l?c-l:void 0;return Qp(i,p,d,h)};if(t){const o=t+Yp,i=r;r=s=>s.startsWith(o)?i(s.slice(o.length)):Qp(t2,!1,s,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},r2=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i<n.length;i++){const s=n[i],a=s[0]==="[",l=t.has(s);a||l?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(s)):o.push(s)}return o.length>0&&(o.sort(),r.push(...o)),r}},o2=e=>({cache:e2(e.cacheSize),parseClassName:n2(e),sortModifiers:r2(e),...Hw(e)}),i2=/\s+/,s2=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,s=[],a=e.trim().split(i2);let l="";for(let c=a.length-1;c>=0;c-=1){const u=a[c],{isExternal:f,modifiers:d,hasImportantModifier:p,baseClassName:h,maybePostfixModifierPosition:g}=n(u);if(f){l=u+(l.length>0?" "+l:l);continue}let m=!!g,y=r(m?h.substring(0,g):h);if(!y){if(!m){l=u+(l.length>0?" "+l:l);continue}if(y=r(h),!y){l=u+(l.length>0?" "+l:l);continue}m=!1}const v=d.length===0?"":d.length===1?d[0]:i(d).join(":"),b=p?v+Eu:v,w=b+y;if(s.indexOf(w)>-1)continue;s.push(w);const A=o(y,m);for(let _=0;_<A.length;++_){const E=A[_];s.push(b+E)}l=u+(l.length>0?" "+l:l)}return l},a2=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=I0(n))&&(o&&(o+=" "),o+=r);return o},I0=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=I0(e[r]))&&(n&&(n+=" "),n+=t);return n},l2=(e,...t)=>{let n,r,o,i;const s=l=>{const c=t.reduce((u,f)=>f(u),e());return n=o2(c),r=n.cache.get,o=n.cache.set,i=a,a(l)},a=l=>{const c=r(l);if(c)return c;const u=s2(l,n);return o(l,u),u};return i=s,(...l)=>i(a2(...l))},c2=[],Ge=e=>{const t=n=>n[e]||c2;return t.isThemeGetter=!0,t},L0=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,R0=/^\((?:(\w[\w-]*):)?(.+)\)$/i,u2=/^\d+\/\d+$/,f2=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,d2=/\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$/,p2=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,h2=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,m2=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Jo=e=>u2.test(e),xe=e=>!!e&&!Number.isNaN(Number(e)),pr=e=>!!e&&Number.isInteger(Number(e)),bc=e=>e.endsWith("%")&&xe(e.slice(0,-1)),Fn=e=>f2.test(e),g2=()=>!0,y2=e=>d2.test(e)&&!p2.test(e),D0=()=>!1,v2=e=>h2.test(e),b2=e=>m2.test(e),x2=e=>!ae(e)&&!le(e),w2=e=>Bi(e,z0,D0),ae=e=>L0.test(e),Gr=e=>Bi(e,$0,y2),xc=e=>Bi(e,S2,xe),Gp=e=>Bi(e,F0,D0),A2=e=>Bi(e,j0,b2),ha=e=>Bi(e,U0,v2),le=e=>R0.test(e),os=e=>Wi(e,$0),C2=e=>Wi(e,k2),Zp=e=>Wi(e,F0),_2=e=>Wi(e,z0),E2=e=>Wi(e,j0),ma=e=>Wi(e,U0,!0),Bi=(e,t,n)=>{const r=L0.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Wi=(e,t,n=!1)=>{const r=R0.exec(e);return r?r[1]?t(r[1]):n:!1},F0=e=>e==="position"||e==="percentage",j0=e=>e==="image"||e==="url",z0=e=>e==="length"||e==="size"||e==="bg-size",$0=e=>e==="length",S2=e=>e==="number",k2=e=>e==="family-name",U0=e=>e==="shadow",T2=()=>{const e=Ge("color"),t=Ge("font"),n=Ge("text"),r=Ge("font-weight"),o=Ge("tracking"),i=Ge("leading"),s=Ge("breakpoint"),a=Ge("container"),l=Ge("spacing"),c=Ge("radius"),u=Ge("shadow"),f=Ge("inset-shadow"),d=Ge("text-shadow"),p=Ge("drop-shadow"),h=Ge("blur"),g=Ge("perspective"),m=Ge("aspect"),y=Ge("ease"),v=Ge("animate"),b=()=>["auto","avoid","all","avoid-page","page","left","right","column"],w=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],A=()=>[...w(),le,ae],_=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],S=()=>[le,ae,l],N=()=>[Jo,"full","auto",...S()],P=()=>[pr,"none","subgrid",le,ae],I=()=>["auto",{span:["full",pr,le,ae]},pr,le,ae],W=()=>[pr,"auto",le,ae],j=()=>["auto","min","max","fr",le,ae],z=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Y=()=>["start","end","center","stretch","center-safe","end-safe"],Q=()=>["auto",...S()],oe=()=>[Jo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],M=()=>[e,le,ae],re=()=>[...w(),Zp,Gp,{position:[le,ae]}],L=()=>["no-repeat",{repeat:["","x","y","space","round"]}],F=()=>["auto","cover","contain",_2,w2,{size:[le,ae]}],K=()=>[bc,os,Gr],B=()=>["","none","full",c,le,ae],J=()=>["",xe,os,Gr],V=()=>["solid","dashed","dotted","double"],ee=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],te=()=>[xe,bc,Zp,Gp],he=()=>["","none",h,le,ae],ye=()=>["none",xe,le,ae],me=()=>["none",xe,le,ae],ze=()=>[xe,le,ae],G=()=>[Jo,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Fn],breakpoint:[Fn],color:[g2],container:[Fn],"drop-shadow":[Fn],ease:["in","out","in-out"],font:[x2],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Fn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Fn],shadow:[Fn],spacing:["px",xe],text:[Fn],"text-shadow":[Fn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Jo,ae,le,m]}],container:["container"],columns:[{columns:[xe,ae,le,a]}],"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"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:A()}],overflow:[{overflow:_()}],"overflow-x":[{"overflow-x":_()}],"overflow-y":[{"overflow-y":_()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:N()}],"inset-x":[{"inset-x":N()}],"inset-y":[{"inset-y":N()}],start:[{start:N()}],end:[{end:N()}],top:[{top:N()}],right:[{right:N()}],bottom:[{bottom:N()}],left:[{left:N()}],visibility:["visible","invisible","collapse"],z:[{z:[pr,"auto",le,ae]}],basis:[{basis:[Jo,"full","auto",a,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[xe,Jo,"auto","initial","none",ae]}],grow:[{grow:["",xe,le,ae]}],shrink:[{shrink:["",xe,le,ae]}],order:[{order:[pr,"first","last","none",le,ae]}],"grid-cols":[{"grid-cols":P()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":P()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":j()}],"auto-rows":[{"auto-rows":j()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...z(),"normal"]}],"justify-items":[{"justify-items":[...Y(),"normal"]}],"justify-self":[{"justify-self":["auto",...Y()]}],"align-content":[{content:["normal",...z()]}],"align-items":[{items:[...Y(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Y(),{baseline:["","last"]}]}],"place-content":[{"place-content":z()}],"place-items":[{"place-items":[...Y(),"baseline"]}],"place-self":[{"place-self":["auto",...Y()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:Q()}],mx:[{mx:Q()}],my:[{my:Q()}],ms:[{ms:Q()}],me:[{me:Q()}],mt:[{mt:Q()}],mr:[{mr:Q()}],mb:[{mb:Q()}],ml:[{ml:Q()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:oe()}],w:[{w:[a,"screen",...oe()]}],"min-w":[{"min-w":[a,"screen","none",...oe()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...oe()]}],h:[{h:["screen","lh",...oe()]}],"min-h":[{"min-h":["screen","lh","none",...oe()]}],"max-h":[{"max-h":["screen","lh",...oe()]}],"font-size":[{text:["base",n,os,Gr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,le,xc]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",bc,ae]}],"font-family":[{font:[C2,ae,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,le,ae]}],"line-clamp":[{"line-clamp":[xe,"none",le,xc]}],leading:[{leading:[i,...S()]}],"list-image":[{"list-image":["none",le,ae]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",le,ae]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...V(),"wavy"]}],"text-decoration-thickness":[{decoration:[xe,"from-font","auto",le,Gr]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[xe,"auto",le,ae]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",le,ae]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",le,ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:re()}],"bg-repeat":[{bg:L()}],"bg-size":[{bg:F()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},pr,le,ae],radial:["",le,ae],conic:[pr,le,ae]},E2,A2]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:K()}],"gradient-via-pos":[{via:K()}],"gradient-to-pos":[{to:K()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:B()}],"rounded-s":[{"rounded-s":B()}],"rounded-e":[{"rounded-e":B()}],"rounded-t":[{"rounded-t":B()}],"rounded-r":[{"rounded-r":B()}],"rounded-b":[{"rounded-b":B()}],"rounded-l":[{"rounded-l":B()}],"rounded-ss":[{"rounded-ss":B()}],"rounded-se":[{"rounded-se":B()}],"rounded-ee":[{"rounded-ee":B()}],"rounded-es":[{"rounded-es":B()}],"rounded-tl":[{"rounded-tl":B()}],"rounded-tr":[{"rounded-tr":B()}],"rounded-br":[{"rounded-br":B()}],"rounded-bl":[{"rounded-bl":B()}],"border-w":[{border:J()}],"border-w-x":[{"border-x":J()}],"border-w-y":[{"border-y":J()}],"border-w-s":[{"border-s":J()}],"border-w-e":[{"border-e":J()}],"border-w-t":[{"border-t":J()}],"border-w-r":[{"border-r":J()}],"border-w-b":[{"border-b":J()}],"border-w-l":[{"border-l":J()}],"divide-x":[{"divide-x":J()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":J()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...V(),"hidden","none"]}],"divide-style":[{divide:[...V(),"hidden","none"]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:[...V(),"none","hidden"]}],"outline-offset":[{"outline-offset":[xe,le,ae]}],"outline-w":[{outline:["",xe,os,Gr]}],"outline-color":[{outline:M()}],shadow:[{shadow:["","none",u,ma,ha]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":["none",f,ma,ha]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[xe,Gr]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":J()}],"inset-ring-color":[{"inset-ring":M()}],"text-shadow":[{"text-shadow":["none",d,ma,ha]}],"text-shadow-color":[{"text-shadow":M()}],opacity:[{opacity:[xe,le,ae]}],"mix-blend":[{"mix-blend":[...ee(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ee()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[xe]}],"mask-image-linear-from-pos":[{"mask-linear-from":te()}],"mask-image-linear-to-pos":[{"mask-linear-to":te()}],"mask-image-linear-from-color":[{"mask-linear-from":M()}],"mask-image-linear-to-color":[{"mask-linear-to":M()}],"mask-image-t-from-pos":[{"mask-t-from":te()}],"mask-image-t-to-pos":[{"mask-t-to":te()}],"mask-image-t-from-color":[{"mask-t-from":M()}],"mask-image-t-to-color":[{"mask-t-to":M()}],"mask-image-r-from-pos":[{"mask-r-from":te()}],"mask-image-r-to-pos":[{"mask-r-to":te()}],"mask-image-r-from-color":[{"mask-r-from":M()}],"mask-image-r-to-color":[{"mask-r-to":M()}],"mask-image-b-from-pos":[{"mask-b-from":te()}],"mask-image-b-to-pos":[{"mask-b-to":te()}],"mask-image-b-from-color":[{"mask-b-from":M()}],"mask-image-b-to-color":[{"mask-b-to":M()}],"mask-image-l-from-pos":[{"mask-l-from":te()}],"mask-image-l-to-pos":[{"mask-l-to":te()}],"mask-image-l-from-color":[{"mask-l-from":M()}],"mask-image-l-to-color":[{"mask-l-to":M()}],"mask-image-x-from-pos":[{"mask-x-from":te()}],"mask-image-x-to-pos":[{"mask-x-to":te()}],"mask-image-x-from-color":[{"mask-x-from":M()}],"mask-image-x-to-color":[{"mask-x-to":M()}],"mask-image-y-from-pos":[{"mask-y-from":te()}],"mask-image-y-to-pos":[{"mask-y-to":te()}],"mask-image-y-from-color":[{"mask-y-from":M()}],"mask-image-y-to-color":[{"mask-y-to":M()}],"mask-image-radial":[{"mask-radial":[le,ae]}],"mask-image-radial-from-pos":[{"mask-radial-from":te()}],"mask-image-radial-to-pos":[{"mask-radial-to":te()}],"mask-image-radial-from-color":[{"mask-radial-from":M()}],"mask-image-radial-to-color":[{"mask-radial-to":M()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":w()}],"mask-image-conic-pos":[{"mask-conic":[xe]}],"mask-image-conic-from-pos":[{"mask-conic-from":te()}],"mask-image-conic-to-pos":[{"mask-conic-to":te()}],"mask-image-conic-from-color":[{"mask-conic-from":M()}],"mask-image-conic-to-color":[{"mask-conic-to":M()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:re()}],"mask-repeat":[{mask:L()}],"mask-size":[{mask:F()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",le,ae]}],filter:[{filter:["","none",le,ae]}],blur:[{blur:he()}],brightness:[{brightness:[xe,le,ae]}],contrast:[{contrast:[xe,le,ae]}],"drop-shadow":[{"drop-shadow":["","none",p,ma,ha]}],"drop-shadow-color":[{"drop-shadow":M()}],grayscale:[{grayscale:["",xe,le,ae]}],"hue-rotate":[{"hue-rotate":[xe,le,ae]}],invert:[{invert:["",xe,le,ae]}],saturate:[{saturate:[xe,le,ae]}],sepia:[{sepia:["",xe,le,ae]}],"backdrop-filter":[{"backdrop-filter":["","none",le,ae]}],"backdrop-blur":[{"backdrop-blur":he()}],"backdrop-brightness":[{"backdrop-brightness":[xe,le,ae]}],"backdrop-contrast":[{"backdrop-contrast":[xe,le,ae]}],"backdrop-grayscale":[{"backdrop-grayscale":["",xe,le,ae]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[xe,le,ae]}],"backdrop-invert":[{"backdrop-invert":["",xe,le,ae]}],"backdrop-opacity":[{"backdrop-opacity":[xe,le,ae]}],"backdrop-saturate":[{"backdrop-saturate":[xe,le,ae]}],"backdrop-sepia":[{"backdrop-sepia":["",xe,le,ae]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",le,ae]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[xe,"initial",le,ae]}],ease:[{ease:["linear","initial",y,le,ae]}],delay:[{delay:[xe,le,ae]}],animate:[{animate:["none",v,le,ae]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,le,ae]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:ye()}],"rotate-x":[{"rotate-x":ye()}],"rotate-y":[{"rotate-y":ye()}],"rotate-z":[{"rotate-z":ye()}],scale:[{scale:me()}],"scale-x":[{"scale-x":me()}],"scale-y":[{"scale-y":me()}],"scale-z":[{"scale-z":me()}],"scale-3d":["scale-3d"],skew:[{skew:ze()}],"skew-x":[{"skew-x":ze()}],"skew-y":[{"skew-y":ze()}],transform:[{transform:[le,ae,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:G()}],"translate-x":[{"translate-x":G()}],"translate-y":[{"translate-y":G()}],"translate-z":[{"translate-z":G()}],"translate-none":["translate-none"],accent:[{accent:M()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:M()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",le,ae]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"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",le,ae]}],fill:[{fill:["none",...M()]}],"stroke-w":[{stroke:[xe,os,Gr,xc]}],stroke:[{stroke:["none",...M()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},fi=l2(T2);function B0(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=B0(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ss(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=B0(e))&&(r&&(r+=" "),r+=t);return r}function Ee(...e){return fi(Ss(e))}const Jp="confidence_playbook_",N2="confidence_playbook_expanded_",W0=30;function K0(e,t){return t?`${Jp}${e}_${t}`:`${Jp}${e}`}function H0(e,t,n,r){const o={playbookInstanceId:t,email:n},i=K0(e,r),s=new Date;s.setDate(s.getDate()+W0),document.cookie=`${i}=${encodeURIComponent(JSON.stringify(o))}; expires=${s.toUTCString()}; path=/; SameSite=Lax`}function q0(e,t){const n=K0(e,t),r=document.cookie.split(";");for(const o of r){const[i,s]=o.trim().split("=");if(i===n&&s)try{return JSON.parse(decodeURIComponent(s))}catch{return null}}return null}function V0(e){return`${N2}${e}`}function O2(e,t){const n=V0(e),r=new Date;r.setDate(r.getDate()+W0),document.cookie=`${n}=${t?"1":"0"}; expires=${r.toUTCString()}; path=/; SameSite=Lax`}function P2(e){const t=V0(e),n=document.cookie.split(";");for(const r of n){const[o,i]=r.trim().split("=");if(o===t&&i!==void 0)return i==="1"}return null}const M2=typeof document<"u"?T.useLayoutEffect:()=>{},zr=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},oo=e=>e&&"window"in e&&e.window===e?e:zr(e).defaultView||window;function I2(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function L2(e){return I2(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}let R2=!1;function Xf(){return R2}function Y0(e,t){if(!Xf())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let n=t;for(;n!==null;){if(n===e)return!0;n.tagName==="SLOT"&&n.assignedSlot?n=n.assignedSlot.parentNode:L2(n)?n=n.host:n=n.parentNode}return!1}const Su=(e=document)=>{var t;if(!Xf())return e.activeElement;let n=e.activeElement;for(;n&&"shadowRoot"in n&&(!((t=n.shadowRoot)===null||t===void 0)&&t.activeElement);)n=n.shadowRoot.activeElement;return n};function Q0(e){return Xf()&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}function D2(e){if(F2())e.focus({preventScroll:!0});else{let t=j2(e);e.focus(),z2(t)}}let ga=null;function F2(){if(ga==null){ga=!1;try{document.createElement("div").focus({get preventScroll(){return ga=!0,!0}})}catch{}}return ga}function j2(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function z2(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function El(e){var t;if(typeof window>"u"||window.navigator==null)return!1;let n=(t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands;return Array.isArray(n)&&n.some(r=>e.test(r.brand))||e.test(window.navigator.userAgent)}function ed(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function or(e){if(process.env.NODE_ENV==="test")return e;let t=null;return()=>(t==null&&(t=e()),t)}const ks=or(function(){return ed(/^Mac/i)}),$2=or(function(){return ed(/^iPhone/i)}),G0=or(function(){return ed(/^iPad/i)||ks()&&navigator.maxTouchPoints>1}),U2=or(function(){return $2()||G0()});or(function(){return ks()||U2()});const B2=or(function(){return El(/AppleWebKit/i)&&!W2()}),W2=or(function(){return El(/Chrome/i)}),K2=or(function(){return El(/Android/i)}),H2=or(function(){return El(/Firefox/i)});function Ts(e,t,n=!0){var r,o;let{metaKey:i,ctrlKey:s,altKey:a,shiftKey:l}=t;H2()&&(!((o=window.event)===null||o===void 0||(r=o.type)===null||r===void 0)&&r.startsWith("key"))&&e.target==="_blank"&&(ks()?i=!0:s=!0);let c=B2()&&ks()&&!G0()&&process.env.NODE_ENV!=="test"?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:i,ctrlKey:s,altKey:a,shiftKey:l}):new MouseEvent("click",{metaKey:i,ctrlKey:s,altKey:a,shiftKey:l,detail:1,bubbles:!0,cancelable:!0});Ts.isOpening=n,D2(e),e.dispatchEvent(c),Ts.isOpening=!1}Ts.isOpening=!1;function Z0(){let e=T.useRef(new Map),t=T.useCallback((o,i,s,a)=>{let l=a!=null&&a.once?(...c)=>{e.current.delete(s),s(...c)}:s;e.current.set(s,{type:i,eventTarget:o,fn:l,options:a}),o.addEventListener(i,l,a)},[]),n=T.useCallback((o,i,s,a)=>{var l;let c=((l=e.current.get(s))===null||l===void 0?void 0:l.fn)||s;o.removeEventListener(i,c,a),e.current.delete(s)},[]),r=T.useCallback(()=>{e.current.forEach((o,i)=>{n(o.eventTarget,o.type,i,o.options)})},[n]);return T.useEffect(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function q2(e){return e.pointerType===""&&e.isTrusted?!0:K2()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function J0(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function V2(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function X0(e){let t=T.useRef({isFocused:!1,observer:null});return M2(()=>{const n=t.current;return()=>{n.observer&&(n.observer.disconnect(),n.observer=null)}},[]),T.useCallback(n=>{if(n.target instanceof HTMLButtonElement||n.target instanceof HTMLInputElement||n.target instanceof HTMLTextAreaElement||n.target instanceof HTMLSelectElement){t.current.isFocused=!0;let r=n.target,o=i=>{if(t.current.isFocused=!1,r.disabled){let s=J0(i);e==null||e(s)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};r.addEventListener("focusout",o,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&r.disabled){var i;(i=t.current.observer)===null||i===void 0||i.disconnect();let s=r===document.activeElement?null:document.activeElement;r.dispatchEvent(new FocusEvent("blur",{relatedTarget:s})),r.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:s}))}}),t.current.observer.observe(r,{attributes:!0,attributeFilter:["disabled"]})}},[e])}let Y2=!1,Vs=null,ku=new Set,ys=new Map,So=!1,Tu=!1;const Q2={Tab:!0,Escape:!0};function td(e,t){for(let n of ku)n(e,t)}function G2(e){return!(e.metaKey||!ks()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Ja(e){So=!0,!Ts.isOpening&&G2(e)&&(Vs="keyboard",td("keyboard",e))}function Vt(e){Vs="pointer","pointerType"in e&&e.pointerType,(e.type==="mousedown"||e.type==="pointerdown")&&(So=!0,td("pointer",e))}function ey(e){!Ts.isOpening&&q2(e)&&(So=!0,Vs="virtual")}function ty(e){e.target===window||e.target===document||Y2||!e.isTrusted||(!So&&!Tu&&(Vs="virtual",td("virtual",e)),So=!1,Tu=!1)}function ny(){So=!1,Tu=!0}function Nu(e){if(typeof window>"u"||typeof document>"u"||ys.get(oo(e)))return;const t=oo(e),n=zr(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){So=!0,r.apply(this,arguments)},n.addEventListener("keydown",Ja,!0),n.addEventListener("keyup",Ja,!0),n.addEventListener("click",ey,!0),t.addEventListener("focus",ty,!0),t.addEventListener("blur",ny,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",Vt,!0),n.addEventListener("pointermove",Vt,!0),n.addEventListener("pointerup",Vt,!0)):process.env.NODE_ENV==="test"&&(n.addEventListener("mousedown",Vt,!0),n.addEventListener("mousemove",Vt,!0),n.addEventListener("mouseup",Vt,!0)),t.addEventListener("beforeunload",()=>{ry(e)},{once:!0}),ys.set(t,{focus:r})}const ry=(e,t)=>{const n=oo(e),r=zr(e);t&&r.removeEventListener("DOMContentLoaded",t),ys.has(n)&&(n.HTMLElement.prototype.focus=ys.get(n).focus,r.removeEventListener("keydown",Ja,!0),r.removeEventListener("keyup",Ja,!0),r.removeEventListener("click",ey,!0),n.removeEventListener("focus",ty,!0),n.removeEventListener("blur",ny,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",Vt,!0),r.removeEventListener("pointermove",Vt,!0),r.removeEventListener("pointerup",Vt,!0)):process.env.NODE_ENV==="test"&&(r.removeEventListener("mousedown",Vt,!0),r.removeEventListener("mousemove",Vt,!0),r.removeEventListener("mouseup",Vt,!0)),ys.delete(n))};function Z2(e){const t=zr(e);let n;return t.readyState!=="loading"?Nu(e):(n=()=>{Nu(e)},t.addEventListener("DOMContentLoaded",n)),()=>ry(e,n)}typeof document<"u"&&Z2();function oy(){return Vs!=="pointer"}const J2=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function X2(e,t,n){let r=zr(n==null?void 0:n.target);const o=typeof window<"u"?oo(n==null?void 0:n.target).HTMLInputElement:HTMLInputElement,i=typeof window<"u"?oo(n==null?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,s=typeof window<"u"?oo(n==null?void 0:n.target).HTMLElement:HTMLElement,a=typeof window<"u"?oo(n==null?void 0:n.target).KeyboardEvent:KeyboardEvent;return e=e||r.activeElement instanceof o&&!J2.has(r.activeElement.type)||r.activeElement instanceof i||r.activeElement instanceof s&&r.activeElement.isContentEditable,!(e&&t==="keyboard"&&n instanceof a&&!Q2[n.key])}function eA(e,t,n){Nu(),T.useEffect(()=>{let r=(o,i)=>{X2(!!(n!=null&&n.isTextInput),o,i)&&e(oy())};return ku.add(r),()=>{ku.delete(r)}},t)}function tA(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:o}=e;const i=T.useCallback(l=>{if(l.target===l.currentTarget)return r&&r(l),o&&o(!1),!0},[r,o]),s=X0(i),a=T.useCallback(l=>{const c=zr(l.target),u=c?Su(c):Su();l.target===l.currentTarget&&u===Q0(l.nativeEvent)&&(n&&n(l),o&&o(!0),s(l))},[o,n,s]);return{focusProps:{onFocus:!t&&(n||o||r)?a:void 0,onBlur:!t&&(r||o)?i:void 0}}}function nA(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:o}=e,i=T.useRef({isFocusWithin:!1}),{addGlobalListener:s,removeAllGlobalListeners:a}=Z0(),l=T.useCallback(f=>{f.currentTarget.contains(f.target)&&i.current.isFocusWithin&&!f.currentTarget.contains(f.relatedTarget)&&(i.current.isFocusWithin=!1,a(),n&&n(f),o&&o(!1))},[n,o,i,a]),c=X0(l),u=T.useCallback(f=>{if(!f.currentTarget.contains(f.target))return;const d=zr(f.target),p=Su(d);if(!i.current.isFocusWithin&&p===Q0(f.nativeEvent)){r&&r(f),o&&o(!0),i.current.isFocusWithin=!0,c(f);let h=f.currentTarget;s(d,"focus",g=>{if(i.current.isFocusWithin&&!Y0(h,g.target)){let m=new d.defaultView.FocusEvent("blur",{relatedTarget:g.target});V2(m,h);let y=J0(m);l(y)}},{capture:!0})}},[r,o,c,s,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:u,onBlur:l}}}let Xa=!1,ya=0;function Ou(){Xa=!0,setTimeout(()=>{Xa=!1},50)}function Xp(e){e.pointerType==="touch"&&Ou()}function rA(){if(!(typeof document>"u"))return ya===0&&(typeof PointerEvent<"u"?document.addEventListener("pointerup",Xp):process.env.NODE_ENV==="test"&&document.addEventListener("touchend",Ou)),ya++,()=>{ya--,!(ya>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",Xp):process.env.NODE_ENV==="test"&&document.removeEventListener("touchend",Ou))}}function oA(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:o}=e,[i,s]=T.useState(!1),a=T.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;T.useEffect(rA,[]);let{addGlobalListener:l,removeAllGlobalListeners:c}=Z0(),{hoverProps:u,triggerHoverEnd:f}=T.useMemo(()=>{let d=(g,m)=>{if(a.pointerType=m,o||m==="touch"||a.isHovered||!g.currentTarget.contains(g.target))return;a.isHovered=!0;let y=g.currentTarget;a.target=y,l(zr(g.target),"pointerover",v=>{a.isHovered&&a.target&&!Y0(a.target,v.target)&&p(v,v.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:y,pointerType:m}),n&&n(!0),s(!0)},p=(g,m)=>{let y=a.target;a.pointerType="",a.target=null,!(m==="touch"||!a.isHovered||!y)&&(a.isHovered=!1,c(),r&&r({type:"hoverend",target:y,pointerType:m}),n&&n(!1),s(!1))},h={};return typeof PointerEvent<"u"?(h.onPointerEnter=g=>{Xa&&g.pointerType==="mouse"||d(g,g.pointerType)},h.onPointerLeave=g=>{!o&&g.currentTarget.contains(g.target)&&p(g,g.pointerType)}):process.env.NODE_ENV==="test"&&(h.onTouchStart=()=>{a.ignoreEmulatedMouseEvents=!0},h.onMouseEnter=g=>{!a.ignoreEmulatedMouseEvents&&!Xa&&d(g,"mouse"),a.ignoreEmulatedMouseEvents=!1},h.onMouseLeave=g=>{!o&&g.currentTarget.contains(g.target)&&p(g,"mouse")}),{hoverProps:h,triggerHoverEnd:p}},[t,n,r,o,a,l,c]);return T.useEffect(()=>{o&&f({currentTarget:a.target},a.pointerType)},[o]),{hoverProps:u,isHovered:i}}function iA(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,o=T.useRef({isFocused:!1,isFocusVisible:t||oy()}),[i,s]=T.useState(!1),[a,l]=T.useState(()=>o.current.isFocused&&o.current.isFocusVisible),c=T.useCallback(()=>l(o.current.isFocused&&o.current.isFocusVisible),[]),u=T.useCallback(p=>{o.current.isFocused=p,s(p),c()},[c]);eA(p=>{o.current.isFocusVisible=p,c()},[],{isTextInput:n});let{focusProps:f}=tA({isDisabled:r,onFocusChange:u}),{focusWithinProps:d}=nA({isDisabled:!r,onFocusWithinChange:u});return{isFocused:i,isFocusVisible:a,focusProps:r?d:f}}var sA=Object.defineProperty,aA=(e,t,n)=>t in e?sA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wc=(e,t,n)=>(aA(e,typeof t!="symbol"?t+"":t,n),n);let lA=class{constructor(){wc(this,"current",this.detect()),wc(this,"handoffState","pending"),wc(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},cA=new lA,nd=(e,t)=>{cA.isServer?T.useEffect(e,t):T.useLayoutEffect(e,t)};function uA(e){let t=T.useRef(e);return nd(()=>{t.current=e},[e]),t}let Sl=function(e){let t=uA(e);return T.useCallback((...n)=>t.current(...n),[t])};function kl(e){return T.useMemo(()=>e,Object.values(e))}let iy=T.createContext(void 0);function Tl(){return T.useContext(iy)}function fA({value:e,children:t}){return T.createElement(iy.Provider,{value:e},t)}function eh(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function sy(e,t,...n){if(e in t){let o=t[e];return typeof o=="function"?o(...n):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,sy),r}var dA=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(dA||{}),pA=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(pA||{});function Ys(){let e=mA();return T.useCallback(t=>hA({mergeRefs:e,...t}),[e])}function hA({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:i=!0,name:s,mergeRefs:a}){a=a??gA;let l=ay(t,e);if(i)return va(l,n,r,s,a);let c=o??0;if(c&2){let{static:u=!1,...f}=l;if(u)return va(f,n,r,s,a)}if(c&1){let{unmount:u=!0,...f}=l;return sy(u?0:1,{0(){return null},1(){return va({...f,hidden:!0,style:{display:"none"}},n,r,s,a)}})}return va(l,n,r,s,a)}function va(e,t={},n,r,o){let{as:i=n,children:s,refName:a="ref",...l}=Ac(e,["unmount","static"]),c=e.ref!==void 0?{[a]:e.ref}:{},u=typeof s=="function"?s(t):s;"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(t)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let f={};if(t){let d=!1,p=[];for(let[h,g]of Object.entries(t))typeof g=="boolean"&&(d=!0),g===!0&&p.push(h.replace(/([A-Z])/g,m=>`-${m.toLowerCase()}`));if(d){f["data-headlessui-state"]=p.join(" ");for(let h of p)f[`data-${h}`]=""}}if(La(i)&&(Object.keys(Xo(l)).length>0||Object.keys(Xo(f)).length>0))if(!T.isValidElement(u)||Array.isArray(u)&&u.length>1||bA(u)){if(Object.keys(Xo(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(Xo(l)).concat(Object.keys(Xo(f))).map(d=>` - ${d}`).join(`
22
22
  `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(d=>` - ${d}`).join(`
23
23
  `)].join(`
24
24
  `))}else{let d=u.props,p=d==null?void 0:d.className,h=typeof p=="function"?(...y)=>eh(p(...y),l.className):eh(p,l.className),g=h?{className:h}:{},m=ay(u.props,Xo(Ac(l,["ref"])));for(let y in f)y in m&&delete f[y];return T.cloneElement(u,Object.assign({},m,f,c,{ref:o(vA(u),c.ref)},g))}return T.createElement(i,Object.assign({},Ac(l,["ref"]),!La(i)&&c,!La(i)&&f),u)}function mA(){let e=T.useRef([]),t=T.useCallback(n=>{for(let r of e.current)r!=null&&(typeof r=="function"?r(n):r.current=n)},[]);return(...n)=>{if(!n.every(r=>r==null))return e.current=n,t}}function gA(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function ay(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];if(t.disabled||t["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[o=>{var i;return(i=o==null?void 0:o.preventDefault)==null?void 0:i.call(o)}]);for(let r in n)Object.assign(t,{[r](o,...i){let s=n[r];for(let a of s){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;a(o,...i)}}});return t}function yA(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];for(let r in n)Object.assign(t,{[r](...o){let i=n[r];for(let s of i)s==null||s(...o)}});return t}function Qs(e){var t;return Object.assign(T.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Xo(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function Ac(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function vA(e){return T.version.split(".")[0]>="19"?e.props.ref:e.ref}function La(e){return e===T.Fragment||e===Symbol.for("react.fragment")}function bA(e){return La(e.type)}let xA="span";var ly=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(ly||{});function wA(e,t){var n;let{features:r=1,...o}=e,i={ref:t,"aria-hidden":(r&2)===2?!0:(n=o["aria-hidden"])!=null?n:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return Ys()({ourProps:i,theirProps:o,slot:{},defaultTag:xA,name:"Hidden"})}let AA=Qs(wA),CA=T.createContext(null);function _A(e){let[t,n]=T.useState(null);return T.createElement(CA.Provider,{value:{target:t}},e.children,T.createElement(AA,{features:ly.Hidden,ref:n}))}let cy=T.createContext(void 0);function uy(){return T.useContext(cy)}function EA({id:e,children:t}){return T.createElement(cy.Provider,{value:e},t)}function SA(e){return typeof e!="object"||e===null?!1:"nodeType"in e}function fy(e){return SA(e)&&"tagName"in e}function dy(e){return fy(e)&&"accessKey"in e}function kA(e){return dy(e)&&e.nodeName==="INPUT"}function th(e){return dy(e)&&e.nodeName==="LABEL"}function TA(e){return fy(e)?e.matches('a[href],audio[controls],button,details,embed,iframe,img[usemap],input:not([type="hidden"]),label,select,textarea,video[controls]'):!1}let NA=Symbol();function py(...e){let t=T.useRef(e);T.useEffect(()=>{t.current=e},[e]);let n=Sl(r=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(r):o.current=r)});return e.every(r=>r==null||(r==null?void 0:r[NA]))?void 0:n}let Nl=T.createContext(null);Nl.displayName="DescriptionContext";function hy(){let e=T.useContext(Nl);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,hy),t}return e}function OA(){var e,t;return(t=(e=T.useContext(Nl))==null?void 0:e.value)!=null?t:void 0}function PA(){let[e,t]=T.useState([]);return[e.length>0?e.join(" "):void 0,T.useMemo(()=>function(n){let r=Sl(i=>(t(s=>[...s,i]),()=>t(s=>{let a=s.slice(),l=a.indexOf(i);return l!==-1&&a.splice(l,1),a}))),o=T.useMemo(()=>({register:r,slot:n.slot,name:n.name,props:n.props,value:n.value}),[r,n.slot,n.name,n.props,n.value]);return T.createElement(Nl.Provider,{value:o},n.children)},[t])]}let MA="p";function IA(e,t){let n=T.useId(),r=Tl(),{id:o=`headlessui-description-${n}`,...i}=e,s=hy(),a=py(t);nd(()=>s.register(o),[o,s.register]);let l=kl({...s.slot,disabled:r||!1}),c={ref:a,...s.props,id:o};return Ys()({ourProps:c,theirProps:i,slot:l,defaultTag:MA,name:s.name||"Description"})}let LA=Qs(IA),RA=Object.assign(LA,{}),Ol=T.createContext(null);Ol.displayName="LabelContext";function my(){let e=T.useContext(Ol);if(e===null){let t=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,my),t}return e}function gy(e){var t,n,r;let o=(n=(t=T.useContext(Ol))==null?void 0:t.value)!=null?n:void 0;return((r=void 0)!=null?r:0)>0?[o,...e].filter(Boolean).join(" "):o}function DA({inherit:e=!1}={}){let t=gy(),[n,r]=T.useState([]),o=e?[t,...n].filter(Boolean):n;return[o.length>0?o.join(" "):void 0,T.useMemo(()=>function(i){let s=Sl(l=>(r(c=>[...c,l]),()=>r(c=>{let u=c.slice(),f=u.indexOf(l);return f!==-1&&u.splice(f,1),u}))),a=T.useMemo(()=>({register:s,slot:i.slot,name:i.name,props:i.props,value:i.value}),[s,i.slot,i.name,i.props,i.value]);return T.createElement(Ol.Provider,{value:a},i.children)},[r])]}let FA="label";function jA(e,t){var n;let r=T.useId(),o=my(),i=uy(),s=Tl(),{id:a=`headlessui-label-${r}`,htmlFor:l=i??((n=o.props)==null?void 0:n.htmlFor),passive:c=!1,...u}=e,f=py(t);nd(()=>o.register(a),[a,o.register]);let d=Sl(g=>{let m=g.currentTarget;if(!(g.target!==g.currentTarget&&TA(g.target))&&(th(m)&&g.preventDefault(),o.props&&"onClick"in o.props&&typeof o.props.onClick=="function"&&o.props.onClick(g),th(m))){let y=document.getElementById(m.htmlFor);if(y){let v=y.getAttribute("disabled");if(v==="true"||v==="")return;let b=y.getAttribute("aria-disabled");if(b==="true"||b==="")return;(kA(y)&&(y.type==="file"||y.type==="radio"||y.type==="checkbox")||y.role==="radio"||y.role==="checkbox"||y.role==="switch")&&y.click(),y.focus({preventScroll:!0})}}}),p=kl({...o.slot,disabled:s||!1}),h={ref:f,...o.props,id:a,htmlFor:l,onClick:d};return c&&("onClick"in h&&(delete h.htmlFor,delete h.onClick),"onClick"in u&&delete u.onClick),Ys()({ourProps:h,theirProps:u,slot:p,defaultTag:l?FA:"div",name:o.name||"Label"})}let zA=Qs(jA),$A=Object.assign(zA,{});function Pl(){return typeof window<"u"}function Ki(e){return yy(e)?(e.nodeName||"").toLowerCase():"#document"}function Ut(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ir(e){var t;return(t=(yy(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function yy(e){return Pl()?e instanceof Node||e instanceof Ut(e).Node:!1}function He(e){return Pl()?e instanceof Element||e instanceof Ut(e).Element:!1}function cn(e){return Pl()?e instanceof HTMLElement||e instanceof Ut(e).HTMLElement:!1}function Pu(e){return!Pl()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ut(e).ShadowRoot}const UA=new Set(["inline","contents"]);function Gs(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Qt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!UA.has(o)}const BA=new Set(["table","td","th"]);function WA(e){return BA.has(Ki(e))}const KA=[":popover-open",":modal"];function Ml(e){return KA.some(t=>{try{return e.matches(t)}catch{return!1}})}const HA=["transform","translate","scale","rotate","perspective"],qA=["transform","translate","scale","rotate","perspective","filter"],VA=["paint","layout","strict","content"];function rd(e){const t=Il(),n=He(e)?Qt(e):e;return HA.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||qA.some(r=>(n.willChange||"").includes(r))||VA.some(r=>(n.contain||"").includes(r))}function YA(e){let t=Xn(e);for(;cn(t)&&!Zn(t);){if(rd(t))return t;if(Ml(t))return null;t=Xn(t)}return null}function Il(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const QA=new Set(["html","body","#document"]);function Zn(e){return QA.has(Ki(e))}function Qt(e){return Ut(e).getComputedStyle(e)}function Ll(e){return He(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Xn(e){if(Ki(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Pu(e)&&e.host||ir(e);return Pu(t)?t.host:t}function vy(e){const t=Xn(e);return Zn(t)?e.ownerDocument?e.ownerDocument.body:e.body:cn(t)&&Gs(t)?t:vy(t)}function di(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=vy(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Ut(o);if(i){const a=Mu(s);return t.concat(s,s.visualViewport||[],Gs(o)?o:[],a&&n?di(a):[])}return t.concat(o,di(o,[],n))}function Mu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const nh=Math.min,vs=Math.max,el=Math.round,En=e=>({x:e,y:e});function by(e){return e.split("-")[0]}function GA(e){return e.split("-")[1]}function ZA(e){return e==="x"?"y":"x"}function JA(e){return e==="y"?"height":"width"}const XA=new Set(["top","bottom"]);function xy(e){return XA.has(by(e))?"y":"x"}function eC(e){return ZA(xy(e))}function wy(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 rh(e,t,n){let{reference:r,floating:o}=e;const i=xy(t),s=eC(t),a=JA(s),l=by(t),c=i==="y",u=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,d=r[a]/2-o[a]/2;let p;switch(l){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-o.width,y:f};break;default:p={x:r.x,y:r.y}}switch(GA(t)){case"start":p[s]-=d*(n&&c?-1:1);break;case"end":p[s]+=d*(n&&c?-1:1);break}return p}const tC=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=rh(c,r,l),d=r,p={},h=0;for(let g=0;g<a.length;g++){const{name:m,fn:y}=a[g],{x:v,y:b,data:w,reset:A}=await y({x:u,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:p,rects:c,platform:s,elements:{reference:e,floating:t}});u=v??u,f=b??f,p={...p,[m]:{...p[m],...w}},A&&h<=50&&(h++,typeof A=="object"&&(A.placement&&(d=A.placement),A.rects&&(c=A.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):A.rects),{x:u,y:f}=rh(c,d,l)),g=-1)}return{x:u,y:f,placement:d,strategy:o,middlewareData:p}};function Ay(e){const t=Qt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=cn(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=el(n)!==i||el(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function Cy(e){return He(e)?e:e.contextElement}function pi(e){const t=Cy(e);if(!cn(t))return En(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Ay(t);let s=(i?el(n.width):n.width)/r,a=(i?el(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const nC=En(0);function _y(e){const t=Ut(e);return!Il()||!t.visualViewport?nC:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function rC(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ut(e)?!1:t}function Ns(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Cy(e);let s=En(1);t&&(r?He(r)&&(s=pi(r)):s=pi(e));const a=rC(i,n,r)?_y(i):En(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,f=o.height/s.y;if(i){const d=Ut(i),p=r&&He(r)?Ut(r):r;let h=d,g=Mu(h);for(;g&&r&&p!==h;){const m=pi(g),y=g.getBoundingClientRect(),v=Qt(g),b=y.left+(g.clientLeft+parseFloat(v.paddingLeft))*m.x,w=y.top+(g.clientTop+parseFloat(v.paddingTop))*m.y;l*=m.x,c*=m.y,u*=m.x,f*=m.y,l+=b,c+=w,h=Ut(g),g=Mu(h)}}return wy({width:u,height:f,x:l,y:c})}function Rl(e,t){const n=Ll(e).scrollLeft;return t?t.left+n:Ns(ir(e)).left+n}function Ey(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Rl(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function oC(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=ir(r),a=t?Ml(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=En(1);const u=En(0),f=cn(r);if((f||!f&&!i)&&((Ki(r)!=="body"||Gs(s))&&(l=Ll(r)),cn(r))){const p=Ns(r);c=pi(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}const d=s&&!f&&!i?Ey(s,l):En(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+d.x,y:n.y*c.y-l.scrollTop*c.y+u.y+d.y}}function iC(e){return Array.from(e.getClientRects())}function sC(e){const t=ir(e),n=Ll(e),r=e.ownerDocument.body,o=vs(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=vs(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Rl(e);const a=-n.scrollTop;return Qt(r).direction==="rtl"&&(s+=vs(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}const oh=25;function aC(e,t){const n=Ut(e),r=ir(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const u=Il();(!u||u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const c=Rl(r);if(c<=0){const u=r.ownerDocument,f=u.body,d=getComputedStyle(f),p=u.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,h=Math.abs(r.clientWidth-f.clientWidth-p);h<=oh&&(i-=h)}else c<=oh&&(i+=c);return{width:i,height:s,x:a,y:l}}const lC=new Set(["absolute","fixed"]);function cC(e,t){const n=Ns(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=cn(e)?pi(e):En(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:s,height:a,x:l,y:c}}function ih(e,t,n){let r;if(t==="viewport")r=aC(e,n);else if(t==="document")r=sC(ir(e));else if(He(t))r=cC(t,n);else{const o=_y(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return wy(r)}function Sy(e,t){const n=Xn(e);return n===t||!He(n)||Zn(n)?!1:Qt(n).position==="fixed"||Sy(n,t)}function uC(e,t){const n=t.get(e);if(n)return n;let r=di(e,[],!1).filter(a=>He(a)&&Ki(a)!=="body"),o=null;const i=Qt(e).position==="fixed";let s=i?Xn(e):e;for(;He(s)&&!Zn(s);){const a=Qt(s),l=rd(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&lC.has(o.position)||Gs(s)&&!l&&Sy(e,s))?r=r.filter(u=>u!==s):o=a,s=Xn(s)}return t.set(e,r),r}function fC(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Ml(t)?[]:uC(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((c,u)=>{const f=ih(t,u,o);return c.top=vs(f.top,c.top),c.right=nh(f.right,c.right),c.bottom=nh(f.bottom,c.bottom),c.left=vs(f.left,c.left),c},ih(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function dC(e){const{width:t,height:n}=Ay(e);return{width:t,height:n}}function pC(e,t,n){const r=cn(t),o=ir(t),i=n==="fixed",s=Ns(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=En(0);function c(){l.x=Rl(o)}if(r||!r&&!i)if((Ki(t)!=="body"||Gs(o))&&(a=Ll(t)),r){const p=Ns(t,!0,i,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=o&&!r&&!i?Ey(o,a):En(0),f=s.left+a.scrollLeft-l.x-u.x,d=s.top+a.scrollTop-l.y-u.y;return{x:f,y:d,width:s.width,height:s.height}}function Cc(e){return Qt(e).position==="static"}function sh(e,t){if(!cn(e)||Qt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ir(e)===n&&(n=n.ownerDocument.body),n}function ky(e,t){const n=Ut(e);if(Ml(e))return n;if(!cn(e)){let o=Xn(e);for(;o&&!Zn(o);){if(He(o)&&!Cc(o))return o;o=Xn(o)}return n}let r=sh(e,t);for(;r&&WA(r)&&Cc(r);)r=sh(r,t);return r&&Zn(r)&&Cc(r)&&!rd(r)?n:r||YA(e)||n}const hC=async function(e){const t=this.getOffsetParent||ky,n=this.getDimensions,r=await n(e.floating);return{reference:pC(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function mC(e){return Qt(e).direction==="rtl"}const gC={convertOffsetParentRelativeRectToViewportRelativeRect:oC,getDocumentElement:ir,getClippingRect:fC,getOffsetParent:ky,getElementRects:hC,getClientRects:iC,getDimensions:dC,getScale:pi,isElement:He,isRTL:mC},yC=(e,t,n)=>{const r=new Map,o={platform:gC,...n},i={...o.platform,_c:r};return tC(e,t,{...o,platform:i})};var vC=typeof document<"u",bC=function(){},Ra=vC?T.useLayoutEffect:bC;function tl(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(!tl(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)&&!tl(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Ty(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ah(e,t){const n=Ty(e);return Math.round(t*n)/n}function _c(e){const t=C.useRef(e);return Ra(()=>{t.current=e}),t}function xC(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,f]=C.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,p]=C.useState(r);tl(d,r)||p(r);const[h,g]=C.useState(null),[m,y]=C.useState(null),v=C.useCallback(M=>{M!==_.current&&(_.current=M,g(M))},[]),b=C.useCallback(M=>{M!==E.current&&(E.current=M,y(M))},[]),w=i||h,A=s||m,_=C.useRef(null),E=C.useRef(null),S=C.useRef(u),N=l!=null,P=_c(l),I=_c(o),W=_c(c),j=C.useCallback(()=>{if(!_.current||!E.current)return;const M={placement:t,strategy:n,middleware:d};I.current&&(M.platform=I.current),yC(_.current,E.current,M).then(re=>{const L={...re,isPositioned:W.current!==!1};z.current&&!tl(S.current,L)&&(S.current=L,M1.flushSync(()=>{f(L)}))})},[d,t,n,I,W]);Ra(()=>{c===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,f(M=>({...M,isPositioned:!1})))},[c]);const z=C.useRef(!1);Ra(()=>(z.current=!0,()=>{z.current=!1}),[]),Ra(()=>{if(w&&(_.current=w),A&&(E.current=A),w&&A){if(P.current)return P.current(w,A,j);j()}},[w,A,j,P,N]);const Y=C.useMemo(()=>({reference:_,floating:E,setReference:v,setFloating:b}),[v,b]),Q=C.useMemo(()=>({reference:w,floating:A}),[w,A]),oe=C.useMemo(()=>{const M={position:n,left:0,top:0};if(!Q.floating)return M;const re=ah(Q.floating,u.x),L=ah(Q.floating,u.y);return a?{...M,transform:"translate("+re+"px, "+L+"px)",...Ty(Q.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:re,top:L}},[n,a,Q.floating,u.x,u.y]);return C.useMemo(()=>({...u,update:j,refs:Y,elements:Q,floatingStyles:oe}),[u,j,Y,Q,oe])}let wC="div";function AC(e,t){let n=`headlessui-control-${T.useId()}`,[r,o]=DA(),[i,s]=PA(),a=Tl(),{disabled:l=a||!1,...c}=e,u=kl({disabled:l}),f={ref:t,disabled:l||void 0,"aria-disabled":l||void 0},d=Ys();return T.createElement(fA,{value:l},T.createElement(o,{value:r},T.createElement(s,{value:i},T.createElement(EA,{id:n},d({ourProps:f,theirProps:{...c,children:T.createElement(_A,null,typeof c.children=="function"?c.children(u):c.children)},slot:u,defaultTag:wC,name:"Field"})))))}let CC=Qs(AC),_C="input";function EC(e,t){let n=T.useId(),r=uy(),o=Tl(),{id:i=r||`headlessui-input-${n}`,disabled:s=o||!1,autoFocus:a=!1,invalid:l=!1,...c}=e,u=gy(),f=OA(),{isFocused:d,focusProps:p}=iA({autoFocus:a}),{isHovered:h,hoverProps:g}=oA({isDisabled:s}),m=yA({ref:t,id:i,"aria-labelledby":u,"aria-describedby":f,"aria-invalid":l?"true":void 0,disabled:s||void 0,autoFocus:a},p,g),y=kl({disabled:s,invalid:l,hover:h,focus:d,autofocus:a});return Ys()({ourProps:m,theirProps:c,slot:y,defaultTag:_C,name:"Input"})}let SC=Qs(EC);const Ny=({type:e="text",className:t,label:n,description:r,error:o,containerClassName:i,...s})=>x.jsx("div",{className:Ee("w-full max-w-md px-4",i),children:x.jsxs(CC,{children:[n&&x.jsx($A,{className:"font-medium text-gray-900",children:n}),r&&x.jsx(RA,{className:"text-sm text-secondary",children:r}),x.jsx(SC,{type:e,className:Ee("mt-3 block w-full rounded-lg border border-gray-200 px-3 py-1.5 text-sm/6 text-gray-800","data-focus:-outline-offset-2 data-focus:outline-primary-500",t,o&&"border-red-500 focus:border-red-500"),...s})]})}),kC="whitespace-nowrap font-normal flex items-center justify-center",TC="focus:outline focus:outline-3 focus:outline-primary-500/[.3]",NC="disabled:opacity-15 disabled:pointer-events-none",Oy=e=>e==="grayLight"||e==="warning",Py=(e,t)=>!t||t==="none"?"":e(),OC=(e,t)=>Py(()=>{const n=e==="gray400"?"gray":e,r=Oy(n)?"active:text-black":"active:text-white";return e==="primary"?t?`bg-${n}-800 text-white`:`hover:bg-${n}-800 active:bg-${n}-800 hover:text-white ${r}`:n==="grayDark"?t?"bg-gray-800 text-white":`hover:bg-gray-800 active:bg-gray-800 hover:text-white ${r}`:n==="grayLight"?t?"bg-gray-50 text-black":`hover:bg-gray-50 active:bg-gray-50 hover:text-black ${r}`:e==="gray400"?t?`bg-${n}-500 text-white`:`hover:bg-${n}-500 active:bg-${n}-500 hover:text-white ${r}`:t?`bg-${n}-700 text-white`:`hover:bg-${n}-600 active:bg-${n}-700 hover:text-white ${r}`},e),PC=e=>Py(()=>{const t=Oy(e)?"text-black":"text-white";return e==="primary"?`bg-primary-600 ${t}`:e==="gray400"?`bg-gray-400 ${t}`:`bg-${e}-500 ${t}`},e),MC=e=>e&&{dark:"text-dark hover:text-dark",yellow:"text-yellow hover:text-yellow",gray:"text-gray-500 hover:text-gray-800",primary:"text-primary-600 hover:text-primary-800",secondary:"text-secondary-500 hover:text-secondary-800",success:"text-success-500 hover:text-success-800",info:"text-info-500 hover:text-info-800",warning:"text-warning-500 hover:text-warning-800",danger:"text-danger-500 hover:text-danger-800",steel:"text-steel-500 hover:text-steel-800",orange:"text-orange-500 hover:text-orange-800",purple:"text-purple-500 hover:text-purple-800","fiserv-orange":"text-fiserv-orange-500 hover:text-fiserv-orange-800",grayDark:"text-gray-800 hover:text-gray-900",grayLight:"text-gray-50 hover:text-gray-400",gray400:"text-gray-400 hover:text-gray-700"}[e]||"",IC=(e,t)=>e&&{dark:t?"bg-dark text-white":"text-dark hover:bg-dark hover:text-white",yellow:t?"bg-yellow text-white":"text-yellow hover:bg-yellow hover:text-white",gray:t?"bg-gray-500 text-white":"text-gray-500 hover:bg-gray-500 hover:text-white",primary:t?"bg-primary-800 text-white":"text-primary-600 hover:bg-primary-800 hover:text-white",secondary:t?"bg-secondary-500 text-white":"text-secondary-500 hover:bg-secondary-500 hover:text-white",success:t?"bg-success-500 text-white":"text-success-500 hover:bg-success-500 hover:text-white",info:t?"bg-info-500 text-white":"text-info-500 hover:bg-info-500 hover:text-white",warning:t?"bg-warning-500 text-white":"text-warning-500 hover:bg-warning-500 hover:text-white",danger:t?"bg-danger-500 text-white":"text-danger-500 hover:bg-danger-500 hover:text-white",steel:t?"bg-steel-500 text-white":"text-steel-500 hover:bg-steel-500 hover:text-white",orange:t?"bg-orange-500 text-white":"text-orange-500 hover:bg-orange-500 hover:text-white",purple:t?"bg-purple-500 text-white":"text-purple-500 hover:bg-purple-500 hover:text-white","fiserv-orange":t?"bg-fiserv-orange-500 text-white":"text-fiserv-orange-500 hover:bg-fiserv-orange-500 hover:text-white",grayDark:t?"bg-gray-900 text-white":"text-gray-800 hover:bg-gray-900 hover:text-white",grayLight:t?"bg-gray-400 text-white":"text-gray-50 hover:bg-gray-400 hover:text-white",gray400:t?"bg-gray-500 text-white":"text-gray-400 hover:bg-gray-500 hover:text-white"}[e]||"",LC=(e,t)=>!e||e==="none"?"":e==="primary"?`border border-primary-600 ${t?"":"text-primary-600"}`:e==="grayDark"?`border border-gray-800 ${t?"":"text-gray-800"}`:e==="grayLight"?`border border-gray-50 ${t?"":"text-gray-400"}`:e==="gray400"?`border border-gray-400 ${t?"":"text-gray-400"}`:`border border-${e}-500 ${t?"":`text-${e}-500`}`,RC=(e,t)=>({solid:PC(e),link:MC(e),linkHoverSolid:IC(e,t),outline:LC(e,t)}),DC={none:"",default:"min-w-fit h-[40px] text-base px-3",base:"w-full md:min-w-fit h-[40px] text-base px-3",small:"min-w-[106px] h-[30px] text-sm px-2",normal:"min-w-[140px] h-[38px] text-base px-3",large:"min-w-[160px] h-[40px] text-lg px-3",NormalBlock:"w-full h-[40px] text-lg px-3",box:"w-[38px] h-[38px]",smallCollapse:"h-[30px] text-sm px-2",normalCollapse:"h-[38px] text-base px-3"},FC={none:"",default:"rounded",pill:"rounded-pill"},jC=({active:e=!1,children:t,color:n="primary",size:r="normal",category:o="solid",className:i,type:s="button",rounded:a="default",style:l={},primaryColor:c,...u},f)=>{var b;const d=NC,p=/link/.test(o)?null:OC(n,e),h=TC,g=DC[r],m=(b=RC(n,e))==null?void 0:b[o],y=fi(p,m),v=FC[a];return x.jsx("button",{...u,style:{...l,transition:"color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out",backgroundColor:c?c+"!important":void 0},type:s,ref:f,className:fi(kC,h,d,g,y,v,i,"cursor-pointer"),children:t})},je=T.forwardRef(jC),zC=({isOpen:e,close:t,title:n,dismissOptions:r,confirmOptions:o,children:i,className:s})=>x.jsx(x.Fragment,{children:e&&Nn.createPortal(x.jsxs(Cl.div,{className:Ee("relative z-50 transition duration-300 ease-out data-closed:opacity-0",s),children:[x.jsx("div",{className:"fixed inset-0 bg-black/30"}),x.jsx("div",{className:"fixed inset-0 flex w-screen items-center justify-center p-4",children:x.jsxs("div",{className:"max-w-lg divide-y divide-gray-100 bg-white rounded-sm shadow-xl",children:[n&&x.jsx("div",{className:" text-gray-900 p-4",children:n}),x.jsx("div",{className:"p-4",children:i}),r||o?x.jsxs("div",{className:"flex gap-4 p-4",children:[r?x.jsx(je,{className:"flex-1",onClick:()=>{r.onClick(),t()},size:"small",color:"secondary",children:r.label}):x.jsx(x.Fragment,{}),o?x.jsx(je,{className:"flex-1",disabled:o.disabled,onClick:()=>{o.onClick(),t()},size:"small",color:"primary",children:o.label}):x.jsx(x.Fragment,{})]}):x.jsx(x.Fragment,{})]})}),x.jsx("style",{type:"text/css",children:qs})]}),document.body,"confidence-modal")}),$C=({onConfirm:e,onClose:t,isOpen:n,title:r})=>{const[o,i]=T.useState(""),[s,a]=T.useState(!1),[l,c]=T.useState(!1),u=async()=>{if(o)try{a(!0),await e(o),i("")}catch{c(!0)}finally{a(!1)}else alert("Please enter a valid email address.")};return x.jsx(zC,{isOpen:n,close:t,dismissOptions:{label:"Cancel",onClick:t},confirmOptions:{label:"Initiate",onClick:u,disabled:s||!o||l},children:x.jsxs("div",{className:"flex flex-col items-center gap-4 w-[400px]",children:[x.jsxs("div",{children:[x.jsx("div",{className:"text-center text-2xl font-medium",children:l?"User already has access":r||"Access Playbook"}),x.jsx("div",{className:"text-center",children:l?x.jsxs(x.Fragment,{children:[x.jsx("b",{children:o})," has already accessed a playbook. Contact Confidence to speak to representative."]}):x.jsx(x.Fragment,{children:"Please enter your company email address to access this playbook."})})]}),x.jsx(Ny,{disabled:s||l,placeholder:"Enter company email address",onChange:f=>i(f.target.value)})]})})},UC=({btnClassName:e,buttonNode:t,size:n,playbookId:r,onInitiated:o,disabled:i,btnLabel:s="Run Playbook",btnColor:a="primary"})=>{const[l,c]=T.useState(!1),[u,f]=T.useState(!1);function d(){c(!0)}function p(){c(!1)}const h=async g=>{try{f(!0);const{playbookInstanceId:m,errorCode:y,details:v,message:b}=await N0({bank:"public-sdk",email:g,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone||"America/Los_Angeles",playbookUid:r})||{};if(y)throw new Error(`Error initiating playbook: ${b} (Code: ${y}) - Details: ${v}`);o(m,g)}finally{f(!1)}};return x.jsxs(x.Fragment,{children:[t?{buttonNode:t}:x.jsxs(je,{onClick:d,className:Ee(e,"flex items-center gap-1"),color:a,size:n,disabled:i||u,children:[x.jsx("img",{src:p0,alt:"Confidence Logo",className:"size-4 object-contain text-white"}),s]}),x.jsx($C,{isOpen:l,onClose:p,onConfirm:async g=>{await h(g),p()}})]})};/*!
@@ -603,4 +603,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
603
603
  `||s===`\r
604
604
  `?r.push(Lo()):s===" "?r.push(na()):r.push(rt(s))}this.insertNodes(r)}insertText(t){const n=this.anchor,r=this.focus,o=this.format,i=this.style;let s=n,a=r;!this.isCollapsed()&&r.isBefore(n)&&(s=r,a=n),s.type==="element"&&(function(m,y,v,b){const w=m.getNode(),A=w.getChildAtIndex(m.offset),_=rt();if(_.setFormat(v),_.setStyle(b),Bd(A))A.splice(0,0,[_]);else{const E=Ye(w)?Tt().append(_):_;A===null?w.append(E):A.insertBefore(E)}m.is(y)&&y.set(_.__key,0,"text"),m.set(_.__key,0,"text")})(s,a,o,i),a.type==="element"&&$o(a,Yt(nr(a,"next")));const l=s.offset;let c=a.offset;const u=this.getNodes(),f=u.length;let d=u[0];X(d)||U(26);const p=d.getTextContent().length,h=d.getParentOrThrow();let g=u[f-1];if(f===1&&a.type==="element"&&(c=p,a.set(s.key,c,"text")),this.isCollapsed()&&l===p&&(Wn(d)||!d.canInsertTextAfter()||!h.canInsertTextAfter()&&d.getNextSibling()===null)){let m=d.getNextSibling();if(X(m)&&m.canInsertTextBefore()&&!Wn(m)||(m=rt(),m.setFormat(o),m.setStyle(i),h.canInsertTextAfter()?d.insertAfter(m):h.insertAfter(m)),m.select(0,0),d=m,t!=="")return void this.insertText(t)}else if(this.isCollapsed()&&l===0&&(Wn(d)||!d.canInsertTextBefore()||!h.canInsertTextBefore()&&d.getPreviousSibling()===null)){let m=d.getPreviousSibling();if(X(m)&&!Wn(m)||(m=rt(),m.setFormat(o),h.canInsertTextBefore()?d.insertBefore(m):h.insertBefore(m)),m.select(),d=m,t!=="")return void this.insertText(t)}else if(d.isSegmented()&&l!==p){const m=rt(d.getTextContent());m.setFormat(o),d.replace(m),d=m}else if(!this.isCollapsed()&&t!==""){const m=g.getParent();if(!h.canInsertTextBefore()||!h.canInsertTextAfter()||R(m)&&(!m.canInsertTextBefore()||!m.canInsertTextAfter()))return this.insertText(""),ex(this.anchor,this.focus,null),void this.insertText(t)}if(f===1){if(wo(d)){const b=rt(t);return b.select(),void d.replace(b)}const m=d.getFormat(),y=d.getStyle();if(l!==c||m===o&&y===i){if(Xb(d)){const b=rt(t);return b.setFormat(o),b.setStyle(i),b.select(),void d.replace(b)}}else{if(d.getTextContent()!==""){const b=rt(t);if(b.setFormat(o),b.setStyle(i),b.select(),l===0)d.insertBefore(b,!1);else{const[w]=d.splitText(l);w.insertAfter(b,!1)}return void(b.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=t.length))}d.setFormat(o),d.setStyle(i)}const v=c-l;d=d.spliceText(l,v,t,!0),d.getTextContent()===""?d.remove():this.anchor.type==="text"&&(d.isComposing()?this.anchor.offset-=t.length:(this.format=m,this.style=y))}else{const m=new Set([...d.getParentKeys(),...g.getParentKeys()]),y=R(d)?d:d.getParentOrThrow();let v=R(g)?g:g.getParentOrThrow(),b=g;if(!y.is(v)&&v.isInline())do b=v,v=v.getParentOrThrow();while(v.isInline());if(a.type==="text"&&(c!==0||g.getTextContent()==="")||a.type==="element"&&g.getIndexWithinParent()<c)if(X(g)&&!wo(g)&&c!==g.getTextContentSize()){if(g.isSegmented()){const S=rt(g.getTextContent());g.replace(S),g=S}Ye(a.getNode())||a.type!=="text"||(g=g.spliceText(0,c,"")),m.add(g.__key)}else{const S=g.getParentOrThrow();S.canBeEmpty()||S.getChildrenSize()!==1?g.remove():S.remove()}else m.add(g.__key);const w=v.getChildren(),A=new Set(u),_=y.is(v),E=y.isInline()&&d.getNextSibling()===null?y:d;for(let S=w.length-1;S>=0;S--){const N=w[S];if(N.is(d)||R(N)&&N.isParentOf(d))break;N.isAttached()&&(!A.has(N)||N.is(b)?_||E.insertAfter(N,!1):N.remove())}if(!_){let S=v,N=null;for(;S!==null;){const P=S.getChildren(),I=P.length;(I===0||P[I-1].is(N))&&(m.delete(S.__key),N=S),S=S.getParent()}}if(wo(d))if(l===p)d.select();else{const S=rt(t);S.select(),d.replace(S)}else d=d.spliceText(l,p-l,t,!0),d.getTextContent()===""?d.remove():d.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=t.length);for(let S=1;S<f;S++){const N=u[S],P=N.__key;m.has(P)||N.remove()}}}removeText(){const t=Z()===this;qa(this,k6(dg(this))),t&&Z()!==this&&Pt(this)}formatText(t,n=null){if(this.isCollapsed())return this.toggleFormat(t),void ft(null);const r=this.getNodes(),o=[];for(const w of r)X(w)&&o.push(w);const i=w=>{r.forEach(A=>{if(R(A)){const _=A.getFormatFlags(t,w);A.setTextFormat(_)}})},s=o.length;if(s===0)return this.toggleFormat(t),ft(null),void i(n);const a=this.anchor,l=this.focus,c=this.isBackward(),u=c?l:a,f=c?a:l;let d=0,p=o[0],h=u.type==="element"?0:u.offset;if(u.type==="text"&&h===p.getTextContentSize()&&(d=1,p=o[1],h=0),p==null)return;const g=p.getFormatFlags(t,n);i(g);const m=s-1;let y=o[m];const v=f.type==="text"?f.offset:y.getTextContentSize();if(p.is(y)){if(h===v)return;if(Wn(p)||h===0&&v===p.getTextContentSize())p.setFormat(g);else{const w=p.splitText(h,v),A=h===0?w[0]:w[1];A.setFormat(g),u.type==="text"&&u.set(A.__key,0,"text"),f.type==="text"&&f.set(A.__key,v-h,"text")}return void(this.format=g)}h===0||Wn(p)||([,p]=p.splitText(h),h=0),p.setFormat(g);const b=y.getFormatFlags(t,g);v>0&&(v===y.getTextContentSize()||Wn(y)||([y]=y.splitText(v)),y.setFormat(b));for(let w=d+1;w<m;w++){const A=o[w],_=A.getFormatFlags(t,b);A.setFormat(_)}u.type==="text"&&u.set(p.__key,h,"text"),f.type==="text"&&f.set(y.__key,v,"text"),this.format=g|b}insertNodes(t){if(t.length===0)return;if(this.isCollapsed()||this.removeText(),this.anchor.key==="root"){this.insertParagraph();const h=Z();return $(h)||U(134),h.insertNodes(t)}const n=(this.isBackward()?this.focus:this.anchor).getNode(),r=at(n,yr),o=t[t.length-1];if(R(r)&&"__language"in r){if("__language"in t[0])this.insertText(t[0].getTextContent());else{const h=Zc(this);r.splice(h,0,t),o.selectEnd()}return}if(!t.some(h=>(R(h)||Te(h))&&!h.isInline())){R(r)||U(211,n.constructor.name,n.getType());const h=Zc(this);return r.splice(h,0,t),void o.selectEnd()}const i=(function(h){const g=Tt();let m=null;for(let y=0;y<h.length;y++){const v=h[y],b=xo(v);if(b||Te(v)&&v.isInline()||R(v)&&v.isInline()||X(v)||v.isParentRequired()){if(m===null&&(m=v.createParentElementNode(),g.append(m),b))continue;m!==null&&m.append(v)}else g.append(v),m=null}return g})(t),s=i.getLastDescendant(),a=i.getChildren(),l=!R(r)||!r.isEmpty()?this.insertParagraph():null,c=a[a.length-1];let u=a[0];var f;R(f=u)&&yr(f)&&!f.isEmpty()&&R(r)&&(!r.isEmpty()||r.canMergeWhenEmpty())&&(R(r)||U(211,n.constructor.name,n.getType()),r.append(...u.getChildren()),u=a[1]),u&&(r===null&&U(212,n.constructor.name,n.getType()),(function(h,g){const m=g.getParentOrThrow().getLastChild();let y=g;const v=[g];for(;y!==m;)y.getNextSibling()||U(140),y=y.getNextSibling(),v.push(y);let b=h;for(const w of v)b=b.insertAfter(w)})(r,u));const d=at(s,yr);l&&R(d)&&(l.canMergeWhenEmpty()||yr(c))&&(d.append(...l.getChildren()),l.remove()),R(r)&&r.isEmpty()&&r.remove(),s.selectEnd();const p=R(r)?r.getLastChild():null;xo(p)&&d!==r&&p.remove()}insertParagraph(){if(this.anchor.key==="root"){const s=Tt();return We().splice(this.anchor.offset,0,[s]),s.select(),s}const t=Zc(this),n=at(this.anchor.getNode(),yr);R(n)||U(213);const r=n.getChildAtIndex(t),o=r?[r,...r.getNextSiblings()]:[],i=n.insertNewAfter(this,!1);return i?(i.append(...o),i.selectStart(),i):null}insertLineBreak(t){const n=Lo();if(this.insertNodes([n]),t){const r=n.getParentOrThrow(),o=n.getIndexWithinParent();r.select(o,o)}}extract(){const t=[...this.getNodes()],n=t.length;let r=t[0],o=t[n-1];const[i,s]=Of(this),a=this.isBackward(),[l,c]=a?[this.focus,this.anchor]:[this.anchor,this.focus],[u,f]=a?[s,i]:[i,s];if(n===0)return[];if(n===1){if(X(r)&&!this.isCollapsed()){const d=r.splitText(u,f),p=u===0?d[0]:d[1];return p?(l.set(p.getKey(),0,"text"),c.set(p.getKey(),p.getTextContentSize(),"text"),[p]):[]}return[r]}if(X(r)&&(u===r.getTextContentSize()?t.shift():u!==0&&([,r]=r.splitText(u),t[0]=r,l.set(r.getKey(),0,"text"))),X(o)){const d=o.getTextContent().length;f===0?t.pop():f!==d&&([o]=o.splitText(f),t[t.length-1]=o,c.set(o.getKey(),o.getTextContentSize(),"text"))}return t}modify(t,n,r){if(Ym(this,t,n,r))return;const o=t==="move",i=Re(),s=en(Xt(i));if(!s)return;const a=i._blockCursorElement,l=i._rootElement,c=this.focus.getNode();if(l===null||a===null||!R(c)||c.isInline()||c.canBeEmpty()||Rf(a,i,l),this.dirty){let u=Do(i,this.anchor.key),f=Do(i,this.focus.key);this.anchor.type==="text"&&(u=Di(u)),this.focus.type==="text"&&(f=Di(f)),u&&f&&ix(s,u,this.anchor.offset,f,this.focus.offset)}if((function(u,f,d,p){u.modify(f,d,p)})(s,t,n?"backward":"forward",r),s.rangeCount>0){const u=s.getRangeAt(0),f=this.anchor.getNode(),d=Ye(f)?f:f6(f);if(this.applyDOMRange(u),this.dirty=!0,!o){const p=this.getNodes(),h=[];let g=!1;for(let m=0;m<p.length;m++){const y=p[m];Lf(y,d)?h.push(y):g=!0}if(g&&h.length>0)if(n){const m=h[0];R(m)?m.selectStart():m.getParentOrThrow().selectStart()}else{const m=h[h.length-1];R(m)?m.selectEnd():m.getParentOrThrow().selectEnd()}s.anchorNode===u.startContainer&&s.anchorOffset===u.startOffset||(function(m){const y=m.focus,v=m.anchor,b=v.key,w=v.offset,A=v.type;v.set(y.key,y.offset,y.type,!0),y.set(b,w,A,!0)})(this)}}r==="lineboundary"&&Ym(this,t,n,r,"decorators")}forwardDeletion(t,n,r){if(!r&&(t.type==="element"&&R(n)&&t.offset===n.getChildrenSize()||t.type==="text"&&t.offset===n.getTextContentSize())){const o=n.getParent(),i=n.getNextSibling()||(o===null?null:o.getNextSibling());if(R(i)&&i.isShadowRoot())return!0}return!1}deleteCharacter(t){const n=this.isCollapsed();if(this.isCollapsed()){const r=this.anchor;let o=r.getNode();if(this.forwardDeletion(r,o,t))return;const i=rp(nr(r,t?"previous":"next"));if(i.getTextSlices().every(a=>a===null||a.distance===0)){let a={type:"initial"};for(const l of i.iterNodeCarets("shadowRoot"))if(Tn(l)){if(!l.origin.isInline()){if(l.origin.isShadowRoot()){if(a.type==="merge-block")break;if(R(i.anchor.origin)&&i.anchor.origin.isEmpty()){const c=Yt(l);qa(this,Fr(c,c)),i.anchor.origin.remove()}return}a.type!=="merge-next-block"&&a.type!=="merge-block"||(a={block:a.block,caret:l,type:"merge-block"})}}else{if(a.type==="merge-block")break;if(ji(l)){if(R(l.origin)){if(l.origin.isInline()){if(!l.origin.isParentOf(i.anchor.origin))break}else a={block:l.origin,type:"merge-next-block"};continue}if(Te(l.origin)){if(!l.origin.isIsolated())if(a.type==="merge-next-block"&&(l.origin.isKeyboardSelectable()||!l.origin.isInline())&&R(i.anchor.origin)&&i.anchor.origin.isEmpty()){i.anchor.origin.remove();const c=ox();c.add(l.origin.getKey()),Pt(c)}else l.origin.remove();return}break}}if(a.type==="merge-block"){const{caret:l,block:c}=a;return qa(this,Fr(!l.origin.isEmpty()&&c.isEmpty()?op(xt(c,l.direction)):i.anchor,l)),this.removeText()}}const s=this.focus;if(this.modify("extend",t,"character"),this.isCollapsed()){if(t&&r.offset===0&&Bm(this,r.getNode()))return}else{const a=s.type==="text"?s.getNode():null;if(o=r.type==="text"?r.getNode():null,a!==null&&a.isSegmented()){const l=s.offset,c=a.getTextContentSize();if(a.is(o)||t&&l!==c||!t&&l!==0)return void Wm(a,t,l)}else if(o!==null&&o.isSegmented()){const l=r.offset,c=o.getTextContentSize();if(o.is(a)||t&&l!==0||!t&&l!==c)return void Wm(o,t,l)}(function(l,c){const u=l.anchor,f=l.focus,d=u.getNode(),p=f.getNode();if(d===p&&u.type==="text"&&f.type==="text"){const h=u.offset,g=f.offset,m=h<g,y=m?h:g,v=m?g:h,b=v-1;y!==b&&(function(w){return!(_x(w)||Q3(w))})(d.getTextContent().slice(y,v))&&(c?f.set(f.key,b,f.type):u.set(u.key,b,u.type))}})(this,t)}}if(this.removeText(),t&&!n&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0){const r=this.anchor.getNode();r.isEmpty()&&Ye(r.getParent())&&r.getPreviousSibling()===null&&Bm(this,r)}}deleteLine(t){this.isCollapsed()&&this.modify("extend",t,"lineboundary"),this.isCollapsed()?this.deleteCharacter(t):this.removeText()}deleteWord(t){if(this.isCollapsed()){const n=this.anchor,r=n.getNode();if(this.forwardDeletion(n,r,t))return;this.modify("extend",t,"word")}this.removeText()}isBackward(){return this.focus.isBefore(this.anchor)}getStartEndPoints(){return[this.anchor,this.focus]}}function ot(e){return e instanceof Jl}function Um(e){const t=e.offset;if(e.type==="text")return t;const n=e.getNode();return t===n.getChildrenSize()?n.getTextContent().length:0}function Of(e){const t=e.getStartEndPoints();if(t===null)return[0,0];const[n,r]=t;return n.type==="element"&&r.type==="element"&&n.key===r.key&&n.offset===r.offset?[0,0]:[Um(n),Um(r)]}function Bm(e,t){for(let n=t;n;n=n.getParent()){if(R(n)){if(n.collapseAtStart(e))return!0;if(jt(n))break}if(n.getPreviousSibling())break}return!1}const Q3=(()=>{try{const e=new RegExp("\\p{Emoji}","u"),t=e.test.bind(e);if(t("❤️")&&t("#️⃣")&&t("👍"))return t}catch{}return()=>!1})();function Wm(e,t,n){const r=e,o=r.getTextContent().split(/(?=\s)/g),i=o.length;let s=0,a=0;for(let c=0;c<i;c++){const u=c===i-1;if(a=s,s+=o[c].length,t&&s===n||s>n||u){o.splice(c,1),u&&(a=void 0);break}}const l=o.join("").trim();l===""?r.remove():(r.setTextContent(l),r.select(a,a))}function Km(e,t,n,r){let o,i=t;if(ht(e)){let s=!1;const a=e.childNodes,l=a.length,c=r._blockCursorElement;i===l&&(s=!0,i=l-1);let u=a[i],f=!1;if(u===c)u=a[i+1],f=!0;else if(c!==null){const d=c.parentNode;e===d&&t>Array.prototype.indexOf.call(d.children,c)&&i--}if(o=ci(u),X(o))i=Pr(o,s?"next":"previous");else{let d=ci(e);if(d===null)return null;if(R(d)){const p=r.getElementByKey(d.getKey());p===null&&U(214),[d,i]=d.getDOMSlot(p).resolveChildIndex(d,p,e,t),R(d)||U(215),s&&i>=d.getChildrenSize()&&(i=Math.max(0,d.getChildrenSize()-1));let g=d.getChildAtIndex(i);if(R(g)&&(function(m,y,v){const b=m.getParent();return v===null||b===null||!b.canBeEmpty()||b!==v.getNode()})(g,0,n)){const m=s?g.getLastDescendant():g.getFirstDescendant();m===null?d=g:(g=m,d=R(g)?g:g.getParentOrThrow()),i=0}X(g)?(o=g,d=null,i=Pr(g,s?"next":"previous")):g!==d&&s&&!f&&(R(d)||U(216),i=Math.min(d.getChildrenSize(),i+1))}else{const p=d.getIndexWithinParent();i=t===0&&Te(d)&&ci(e)===d?p:p+1,d=d.getParentOrThrow()}if(R(d))return Pn(d.__key,i,"element")}}else o=ci(e);return X(o)?Pn(o.__key,Pr(o,i,"clamp"),"text"):null}function Hm(e,t,n){const r=e.offset,o=e.getNode();if(r===0){const i=o.getPreviousSibling(),s=o.getParent();if(t){if((n||!t)&&i===null&&R(s)&&s.isInline()){const a=s.getPreviousSibling();X(a)&&e.set(a.__key,a.getTextContent().length,"text")}}else R(i)&&!n&&i.isInline()?e.set(i.__key,i.getChildrenSize(),"element"):X(i)&&e.set(i.__key,i.getTextContent().length,"text")}else if(r===o.getTextContent().length){const i=o.getNextSibling(),s=o.getParent();if(t&&R(i)&&i.isInline())e.set(i.__key,0,"element");else if((n||t)&&i===null&&R(s)&&s.isInline()&&!s.canInsertTextAfter()){const a=s.getNextSibling();X(a)&&e.set(a.__key,0,"text")}}}function ex(e,t,n){if(e.type==="text"&&t.type==="text"){const r=e.isBefore(t),o=e.is(t);Hm(e,r,o),Hm(t,!r,o),o&&t.set(e.key,e.offset,e.type);const i=Re();if(i.isComposing()&&i._compositionKey!==e.key&&$(n)){const s=n.anchor,a=n.focus;e.set(s.key,s.offset,s.type,!0),t.set(a.key,a.offset,a.type,!0)}}}function tx(e,t,n,r,o,i){if(e===null||n===null||!ia(o,e,n))return null;const s=Km(e,t,$(i)?i.anchor:null,o);if(s===null)return null;const a=Km(n,r,$(i)?i.focus:null,o);if(a===null)return null;if(s.type==="element"&&a.type==="element"){const l=ci(e),c=ci(n);if(Te(l)&&Te(c))return null}return ex(s,a,i),[s,a]}function Pf(e){return R(e)&&!e.isInline()}function nx(e,t,n,r,o,i){const s=Wr(),a=new Wo(Pn(e,t,o),Pn(n,r,i),0,"");return a.dirty=!0,s._selection=a,a}function rx(){const e=Pn("root",0,"element"),t=Pn("root",0,"element");return new Wo(e,t,0,"")}function ox(){return new Jl(new Set)}function jd(e,t,n,r){const o=n._window;if(o===null)return null;const i=r||o.event,s=i?i.type:void 0,a=s==="selectionchange",l=!df&&(a||s==="beforeinput"||s==="compositionstart"||s==="compositionend"||s==="click"&&i&&i.detail===3||s==="drop"||s===void 0);let c,u,f,d;if($(e)&&!l)return e.clone();if(t===null)return null;if(c=t.anchorNode,u=t.focusNode,f=t.anchorOffset,d=t.focusOffset,(a||s===void 0)&&$(e)&&!ia(n,c,u))return e.clone();const p=tx(c,f,u,d,n,e);if(p===null)return null;const[h,g]=p;return new Wo(h,g,$(e)?e.format:0,$(e)?e.style:"")}function Z(){return Wr()._selection}function Gi(){return Re()._editorState._selection}function ml(e,t,n,r=1){const o=e.anchor,i=e.focus,s=o.getNode(),a=i.getNode();if(!t.is(s)&&!t.is(a))return;const l=t.__key;if(e.isCollapsed()){const c=o.offset;if(n<=c&&r>0||n<c&&r<0){const u=Math.max(0,c+r);o.set(l,u,"element"),i.set(l,u,"element"),qm(e)}}else{const c=e.isBackward(),u=c?i:o,f=u.getNode(),d=c?o:i,p=d.getNode();if(t.is(f)){const h=u.offset;(n<=h&&r>0||n<h&&r<0)&&u.set(l,Math.max(0,h+r),"element")}if(t.is(p)){const h=d.offset;(n<=h&&r>0||n<h&&r<0)&&d.set(l,Math.max(0,h+r),"element")}}qm(e)}function qm(e){const t=e.anchor,n=t.offset,r=e.focus,o=r.offset,i=t.getNode(),s=r.getNode();if(e.isCollapsed()){if(!R(i))return;const a=i.getChildrenSize(),l=n>=a,c=l?i.getChildAtIndex(a-1):i.getChildAtIndex(n);if(X(c)){let u=0;l&&(u=c.getTextContentSize()),t.set(c.__key,u,"text"),r.set(c.__key,u,"text")}return}if(R(i)){const a=i.getChildrenSize(),l=n>=a,c=l?i.getChildAtIndex(a-1):i.getChildAtIndex(n);if(X(c)){let u=0;l&&(u=c.getTextContentSize()),t.set(c.__key,u,"text")}}if(R(s)){const a=s.getChildrenSize(),l=o>=a,c=l?s.getChildAtIndex(a-1):s.getChildAtIndex(o);if(X(c)){let u=0;l&&(u=c.getTextContentSize()),r.set(c.__key,u,"text")}}}function gl(e,t,n,r,o){let i=null,s=0,a=null;r!==null?(i=r.__key,X(r)?(s=r.getTextContentSize(),a="text"):R(r)&&(s=r.getChildrenSize(),a="element")):o!==null&&(i=o.__key,X(o)?a="text":R(o)&&(a="element")),i!==null&&a!==null?e.set(i,s,a):(s=t.getIndexWithinParent(),s===-1&&(s=n.getChildrenSize()),e.set(n.__key,s,"element"))}function Vm(e,t,n,r,o){e.type==="text"?e.set(n,e.offset+(t?0:o),"text"):e.offset>r.getIndexWithinParent()&&e.set(e.key,e.offset-1,"element")}function ix(e,t,n,r,o){try{e.setBaseAndExtent(t,n,r,o)}catch{}}function G3(e,t,n,r,o,i,s){const a=r.anchorNode,l=r.focusNode,c=r.anchorOffset,u=r.focusOffset,f=document.activeElement;if(o.has(j3)&&f!==i||f!==null&&Hd(f))return;if(!$(t))return void(e!==null&&ia(n,a,l)&&r.removeAllRanges());const d=t.anchor,p=t.focus,h=d.key,g=p.key,m=Do(n,h),y=Do(n,g),v=d.offset,b=p.offset,w=t.format,A=t.style,_=t.isCollapsed();let E=m,S=y,N=!1;if(d.type==="text"){E=Di(m);const Y=d.getNode();N=Y.getFormat()!==w||Y.getStyle()!==A}else $(e)&&e.anchor.type==="text"&&(N=!0);var P,I,W,j,z;if(p.type==="text"&&(S=Di(y)),E!==null&&S!==null&&(_&&(e===null||N||$(e)&&(e.format!==w||e.style!==A))&&(P=w,I=A,W=v,j=h,z=performance.now(),Kb=[P,I,W,j,z]),c!==v||u!==b||a!==E||l!==S||r.type==="Range"&&_||(f!==null&&i.contains(f)||o.has(U3)||i.focus({preventScroll:!0}),d.type==="element"))){if(ix(r,E,v,S,b),!o.has(z3)&&t.isCollapsed()&&i!==null&&i===document.activeElement){const Y=$(t)&&t.anchor.type==="element"?E.childNodes[v]||null:r.rangeCount>0?r.getRangeAt(0):null;if(Y!==null){let Q;if(Y instanceof Text){const oe=document.createRange();oe.selectNode(Y),Q=oe.getBoundingClientRect()}else Q=Y.getBoundingClientRect();(function(oe,M,re){const L=Tx(re),F=Zd(L);if(L===null||F===null)return;let{top:K,bottom:B}=M,J=0,V=0,ee=re;for(;ee!==null;){const te=ee===L.body;if(te)J=0,V=Xt(oe).innerHeight;else{const ye=ee.getBoundingClientRect();J=ye.top,V=ye.bottom}let he=0;if(K<J?he=-(J-K):B>V&&(he=B-V),he!==0)if(te)F.scrollBy(0,he);else{const ye=ee.scrollTop;ee.scrollTop+=he;const me=ee.scrollTop-ye;K-=me,B-=me}if(te)break;ee=sa(ee)}})(n,Q,i)}}_f=!0}}function sx(e){let t=Z()||Gi();t===null&&(t=We().selectEnd()),t.insertNodes(e)}function Zc(e){let t=e;e.isCollapsed()||t.removeText();const n=Z();$(n)&&(t=n),$(t)||U(161);const r=t.anchor;let o=r.getNode(),i=r.offset;for(;!yr(o);){const s=o;if([o,i]=Z3(o,i),s.is(o))break}return i}function Z3(e,t){const n=e.getParent();if(!n){const o=Tt();return We().append(o),o.select(),[We(),0]}if(X(e)){const o=e.splitText(t);if(o.length===0)return[n,e.getIndexWithinParent()];const i=t===0?0:1;return[n,o[0].getIndexWithinParent()+i]}if(!R(e)||t===0)return[n,e.getIndexWithinParent()];const r=e.getChildAtIndex(t);if(r){const o=new Wo(Pn(e.__key,t,"element"),Pn(e.__key,t,"element"),0,""),i=e.insertNewAfter(o);i&&i.append(r,...r.getNextSiblings())}return[n,e.getIndexWithinParent()+1]}function Ym(e,t,n,r,o="decorators-and-blocks"){if(t==="move"&&r==="character"&&!e.isCollapsed()){const[u,f]=n===e.isBackward()?[e.focus,e.anchor]:[e.anchor,e.focus];return f.set(u.key,u.offset,u.type),!0}const i=nr(e.focus,n?"previous":"next"),s=r==="lineboundary",a=t==="move";let l=i,c=o==="decorators-and-blocks";if(!Lx(l)){for(const u of l){c=!1;const{origin:f}=u;if(!Te(f)||f.isIsolated()||(l=u,!s||!f.isInline()))break}if(c)for(const u of rp(i).iterNodeCarets(t==="extend"?"shadowRoot":"root")){if(Tn(u))u.origin.isInline()||(l=u);else{if(R(u.origin))continue;Te(u.origin)&&!u.origin.isInline()&&(l=u)}break}}if(l===i)return!1;if(a&&!s&&Te(l.origin)&&l.origin.isKeyboardSelectable()){const u=ox();return u.add(l.origin.getKey()),Pt(u),!0}return l=Yt(l),a&&$o(e.anchor,l),$o(e.focus,l),c||!s}let it=null,st=null,Ft=!1,Jc=!1,Ka=0;const Qm={characterData:!0,childList:!0,subtree:!0};function ra(){return Ft||it!==null&&it._readOnly}function vt(){Ft&&U(13)}function ax(){Ka>99&&U(14)}function Wr(){return it===null&&U(195,lx()),it}function Re(){return st===null&&U(196,lx()),st}function lx(){let e=0;const t=new Set,n=Ro.version;if(typeof window<"u")for(const o of document.querySelectorAll("[contenteditable]")){const i=ec(o);if(qd(i))e++;else if(i){let s=String(i.constructor.version||"<0.17.1");s===n&&(s+=" (separately built, likely a bundler configuration issue)"),t.add(s)}}let r=` Detected on the page: ${e} compatible editor(s) with version ${n}`;return t.size&&(r+=` and incompatible editors with versions ${Array.from(t).join(", ")}`),r}function J3(){return st}function Gm(e,t,n){const r=t.__type,o=gx(e,r);let i=n.get(r);i===void 0&&(i=Array.from(o.transforms),n.set(r,i));const s=i.length;for(let a=0;a<s&&(i[a](t),t.isAttached());a++);}function Zm(e,t){return e!==void 0&&e.__key!==t&&e.isAttached()}function cx(e,t){if(!t)return;const n=e._updateTags;let r=t;Array.isArray(t)||(r=[t]);for(const o of r)n.add(o)}function X3(e){return zd(e,Re()._nodes)}function zd(e,t){const n=e.type,r=t.get(n);r===void 0&&U(17,n);const o=r.klass;e.type!==o.getType()&&U(18,o.name);const i=o.importJSON(e),s=e.children;if(R(i)&&Array.isArray(s))for(let a=0;a<s.length;a++){const l=zd(s[a],t);i.append(l)}return i}function Jm(e,t,n){const r=it,o=Ft,i=st;it=t,Ft=!0,st=e;try{return n()}finally{it=r,Ft=o,st=i}}function Qn(e,t){const n=e._pendingEditorState,r=e._rootElement,o=e._headless||r===null;if(n===null)return;const i=e._editorState,s=i._selection,a=n._selection,l=e._dirtyType!==0,c=it,u=Ft,f=st,d=e._updating,p=e._observer;let h=null;if(e._pendingEditorState=null,e._editorState=n,!o&&l&&p!==null){st=e,it=n,Ft=!1,e._updating=!0;try{const _=e._dirtyType,E=e._dirtyElements,S=e._dirtyLeaves;p.disconnect(),h=y3(i,n,e,_,E,S)}catch(_){if(_ instanceof Error&&e._onError(_),Jc)throw _;return hx(e,null,r,n),bb(e),e._dirtyType=2,Jc=!0,Qn(e,i),void(Jc=!1)}finally{p.observe(r,Qm),e._updating=d,it=c,Ft=u,st=f}}n._readOnly||(n._readOnly=!0);const g=e._dirtyLeaves,m=e._dirtyElements,y=e._normalizedNodes,v=e._updateTags,b=e._deferred;l&&(e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements=new Map,e._normalizedNodes=new Set,e._updateTags=new Set),(function(_,E){const S=_._decorators;let N=_._pendingDecorators||S;const P=E._nodeMap;let I;for(I in N)P.has(I)||(N===S&&(N=Ax(_)),delete N[I])})(e,n);const w=o?null:en(Xt(e));if(e._editable&&w!==null&&(l||a===null||a.dirty||!a.is(s))&&r!==null&&!v.has($3)){st=e,it=n;try{if(p!==null&&p.disconnect(),l||a===null||a.dirty){const _=e._blockCursorElement;_!==null&&Rf(_,e,r),G3(s,a,e,w,v,r)}(function(_,E,S){let N=_._blockCursorElement;if($(S)&&S.isCollapsed()&&S.anchor.type==="element"&&E.contains(document.activeElement)){const P=S.anchor,I=P.getNode(),W=P.offset;let j=!1,z=null;if(W===I.getChildrenSize())eu(I.getChildAtIndex(W-1))&&(j=!0);else{const Y=I.getChildAtIndex(W);if(Y!==null&&eu(Y)){const Q=Y.getPreviousSibling();(Q===null||eu(Q))&&(j=!0,z=_.getElementByKey(Y.__key))}}if(j){const Y=_.getElementByKey(I.__key);return N===null&&(_._blockCursorElement=N=(function(Q){const oe=Q.theme,M=document.createElement("div");M.contentEditable="false",M.setAttribute("data-lexical-cursor","true");let re=oe.blockCursor;if(re!==void 0){if(typeof re=="string"){const L=hb(re);re=oe.blockCursor=L}re!==void 0&&M.classList.add(...re)}return M})(_._config)),E.style.caretColor="transparent",void(z===null?Y.appendChild(N):Y.insertBefore(N,z))}}N!==null&&Rf(N,_,E)})(e,r,a)}finally{p!==null&&p.observe(r,Qm),st=f,it=c}}h!==null&&(function(_,E,S,N,P){const I=Array.from(_._listeners.mutation),W=I.length;for(let j=0;j<W;j++){const[z,Y]=I[j];for(const Q of Y){const oe=E.get(Q);oe!==void 0&&z(oe,{dirtyLeaves:N,prevEditorState:P,updateTags:S})}}})(e,h,v,g,i),$(a)||a===null||s!==null&&s.is(a)||e.dispatchCommand(Ql,void 0);const A=e._pendingDecorators;A!==null&&(e._decorators=A,e._pendingDecorators=null,As("decorator",e,!0,A)),(function(_,E,S){const N=ng(E),P=ng(S);N!==P&&As("textcontent",_,!0,P)})(e,t||i,n),As("update",e,!0,{dirtyElements:m,dirtyLeaves:g,editorState:n,mutatedNodes:h,normalizedNodes:y,prevEditorState:t||i,tags:v}),(function(_,E){if(_._deferred=[],E.length!==0){const S=_._updating;_._updating=!0;try{for(let N=0;N<E.length;N++)E[N]()}finally{_._updating=S}}})(e,b),(function(_){const E=_._updates;if(E.length!==0){const S=E.shift();if(S){const[N,P]=S;Xl(_,N,P)}}})(e)}function As(e,t,n,...r){const o=t._updating;t._updating=n;try{const i=Array.from(t._listeners[e]);for(let s=0;s<i.length;s++)i[s].apply(null,r)}finally{t._updating=o}}function Xm(e,t){const n=e._updates;let r=t||!1;for(;n.length!==0;){const o=n.shift();if(o){const[i,s]=o,a=e._pendingEditorState;let l;s!==void 0&&(l=s.onUpdate,s.skipTransforms&&(r=!0),s.discrete&&(a===null&&U(191),a._flushSync=!0),l&&e._deferred.push(l),cx(e,s.tag)),a==null?Xl(e,i,s):i()}}return r}function Xl(e,t,n){const r=e._updateTags;let o,i=!1,s=!1;n!==void 0&&(o=n.onUpdate,cx(e,n.tag),i=n.skipTransforms||!1,s=n.discrete||!1),o&&e._deferred.push(o);const a=e._editorState;let l=e._pendingEditorState,c=!1;(l===null||l._readOnly)&&(l=e._pendingEditorState=fx(l||a),c=!0),l._flushSync=s;const u=it,f=Ft,d=st,p=e._updating;it=l,Ft=!1,e._updating=!0,st=e;const h=e._headless||e.getRootElement()===null;Wd(null);try{c&&(h?a._selection!==null&&(l._selection=a._selection.clone()):l._selection=(function(v,b){const w=v.getEditorState()._selection,A=en(Xt(v));return $(w)||w==null?jd(w,A,v,b):w.clone()})(e,n&&n.event||null));const m=e._compositionKey;t(),i=Xm(e,i),(function(v,b){const w=b.getEditorState()._selection,A=v._selection;if($(A)){const _=A.anchor,E=A.focus;let S;if(_.type==="text"&&(S=_.getNode(),S.selectionTransform(w,A)),E.type==="text"){const N=E.getNode();S!==N&&N.selectionTransform(w,A)}}})(l,e),e._dirtyType!==0&&(i?(function(v,b){const w=b._dirtyLeaves,A=v._nodeMap;for(const _ of w){const E=A.get(_);X(E)&&E.isAttached()&&E.isSimpleText()&&!E.isUnmergeable()&&Nm(E)}})(l,e):(function(v,b){const w=b._dirtyLeaves,A=b._dirtyElements,_=v._nodeMap,E=Sr(),S=new Map;let N=w,P=N.size,I=A,W=I.size;for(;P>0||W>0;){if(P>0){b._dirtyLeaves=new Set;for(const j of N){const z=_.get(j);X(z)&&z.isAttached()&&z.isSimpleText()&&!z.isUnmergeable()&&Nm(z),z!==void 0&&Zm(z,E)&&Gm(b,z,S),w.add(j)}if(N=b._dirtyLeaves,P=N.size,P>0){Ka++;continue}}b._dirtyLeaves=new Set,b._dirtyElements=new Map,I.delete("root")&&I.set("root",!0);for(const j of I){const z=j[0],Y=j[1];if(A.set(z,Y),!Y)continue;const Q=_.get(z);Q!==void 0&&Zm(Q,E)&&Gm(b,Q,S)}N=b._dirtyLeaves,P=N.size,I=b._dirtyElements,W=I.size,Ka++}b._dirtyLeaves=w,b._dirtyElements=A})(l,e),Xm(e),(function(v,b,w,A){const _=v._nodeMap,E=b._nodeMap,S=[];for(const[N]of A){const P=E.get(N);P!==void 0&&(P.isAttached()||(R(P)&&gb(P,N,_,E,S,A),_.has(N)||A.delete(N),S.push(N)))}for(const N of S)E.delete(N);for(const N of w){const P=E.get(N);P===void 0||P.isAttached()||(_.has(N)||w.delete(N),E.delete(N))}})(a,l,e._dirtyLeaves,e._dirtyElements)),m!==e._compositionKey&&(l._flushSync=!0);const y=l._selection;if($(y)){const v=l._nodeMap,b=y.anchor.key,w=y.focus.key;v.get(b)!==void 0&&v.get(w)!==void 0||U(19)}else ot(y)&&y._nodes.size===0&&(l._selection=null)}catch(m){return m instanceof Error&&e._onError(m),e._pendingEditorState=a,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void Qn(e)}finally{it=u,Ft=f,st=d,e._updating=p,Ka=0}e._dirtyType!==0||e._deferred.length>0||(function(m,y){const v=y.getEditorState()._selection,b=m._selection;if(b!==null){if(b.dirty||!b.is(v))return!0}else if(v!==null)return!0;return!1})(l,e)?l._flushSync?(l._flushSync=!1,Qn(e)):c&&i6(()=>{Qn(e)}):(l._flushSync=!1,c&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function kn(e,t,n){st===e&&n===void 0?t():Xl(e,t,n)}class Cs{constructor(t,n,r){D(this,"element");D(this,"before");D(this,"after");this.element=t,this.before=n||null,this.after=r||null}withBefore(t){return new Cs(this.element,t,this.after)}withAfter(t){return new Cs(this.element,this.before,t)}withElement(t){return this.element===t?this:new Cs(t,this.before,this.after)}insertChild(t){const n=this.before||this.getManagedLineBreak();return n!==null&&n.parentElement!==this.element&&U(222),this.element.insertBefore(t,n),this}removeChild(t){return t.parentElement!==this.element&&U(223),this.element.removeChild(t),this}replaceChild(t,n){return n.parentElement!==this.element&&U(224),this.element.replaceChild(t,n),this}getFirstChild(){const t=this.after?this.after.nextSibling:this.element.firstChild;return t===this.before||t===this.getManagedLineBreak()?null:t}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(t){if(t===null)this.removeManagedLineBreak();else{const n=t==="decorator"&&(ta||Vi||ea);this.insertManagedLineBreak(n)}}removeManagedLineBreak(){const t=this.getManagedLineBreak();if(t){const n=this.element,r=t.nodeName==="IMG"?t.nextSibling:null;r&&n.removeChild(r),n.removeChild(t),n.__lexicalLineBreak=void 0}}insertManagedLineBreak(t){const n=this.getManagedLineBreak();if(n){if(t===(n.nodeName==="IMG"))return;this.removeManagedLineBreak()}const r=this.element,o=this.before,i=document.createElement("br");if(r.insertBefore(i,o),t){const s=document.createElement("img");s.setAttribute("data-lexical-linebreak","true"),s.style.cssText="display: inline !important; border: 0px !important; margin: 0px !important;",s.alt="",r.insertBefore(s,i),r.__lexicalLineBreak=s}else r.__lexicalLineBreak=i}getFirstChildOffset(){let t=0;for(let n=this.after;n!==null;n=n.previousSibling)t++;return t}resolveChildIndex(t,n,r,o){if(r===this.element){const l=this.getFirstChildOffset();return[t,Math.min(l+t.getChildrenSize(),Math.max(l,o))]}const i=eg(n,r);i.push(o);const s=eg(n,this.element);let a=t.getIndexWithinParent();for(let l=0;l<s.length;l++){const c=i[l],u=s[l];if(c===void 0||c<u)break;if(c>u){a+=1;break}}return[t.getParentOrThrow(),a]}}function eg(e,t){const n=[];let r=t;for(;r!==e&&r!==null;r=r.parentNode){let o=0;for(let i=r.previousSibling;i!==null;i=i.previousSibling)o++;n.push(o)}return r!==e&&U(225),n.reverse()}class Mn extends ln{constructor(n){super(n);D(this,"__first");D(this,"__last");D(this,"__size");D(this,"__format");D(this,"__style");D(this,"__indent");D(this,"__dir");D(this,"__textFormat");D(this,"__textStyle");this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle=""}afterCloneFrom(n){super.afterCloneFrom(n),this.__key===n.__key&&(this.__first=n.__first,this.__last=n.__last,this.__size=n.__size),this.__indent=n.__indent,this.__format=n.__format,this.__style=n.__style,this.__dir=n.__dir,this.__textFormat=n.__textFormat,this.__textStyle=n.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){const n=this.getFormat();return i3[n]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const n=[];let r=this.getFirstChild();for(;r!==null;)n.push(r),r=r.getNextSibling();return n}getChildrenKeys(){const n=[];let r=this.getFirstChild();for(;r!==null;)n.push(r.__key),r=r.getNextSibling();return n}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){const n=Re()._dirtyElements;return n!==null&&n.has(this.__key)}isLastChild(){const n=this.getLatest(),r=this.getParentOrThrow().getLastChild();return r!==null&&r.is(n)}getAllTextNodes(){const n=[];let r=this.getFirstChild();for(;r!==null;){if(X(r)&&n.push(r),R(r)){const o=r.getAllTextNodes();n.push(...o)}r=r.getNextSibling()}return n}getFirstDescendant(){let n=this.getFirstChild();for(;R(n);){const r=n.getFirstChild();if(r===null)break;n=r}return n}getLastDescendant(){let n=this.getLastChild();for(;R(n);){const r=n.getLastChild();if(r===null)break;n=r}return n}getDescendantByIndex(n){const r=this.getChildren(),o=r.length;if(n>=o){const s=r[o-1];return R(s)&&s.getLastDescendant()||s||null}const i=r[n];return R(i)&&i.getFirstDescendant()||i||null}getFirstChild(){const n=this.getLatest().__first;return n===null?null:Xe(n)}getFirstChildOrThrow(){const n=this.getFirstChild();return n===null&&U(45,this.__key),n}getLastChild(){const n=this.getLatest().__last;return n===null?null:Xe(n)}getLastChildOrThrow(){const n=this.getLastChild();return n===null&&U(96,this.__key),n}getChildAtIndex(n){const r=this.getChildrenSize();let o,i;if(n<r/2){for(o=this.getFirstChild(),i=0;o!==null&&i<=n;){if(i===n)return o;o=o.getNextSibling(),i++}return null}for(o=this.getLastChild(),i=r-1;o!==null&&i>=n;){if(i===n)return o;o=o.getPreviousSibling(),i--}return null}getTextContent(){let n="";const r=this.getChildren(),o=r.length;for(let i=0;i<o;i++){const s=r[i];n+=s.getTextContent(),R(s)&&i!==o-1&&!s.isInline()&&(n+=Dr)}return n}getTextContentSize(){let n=0;const r=this.getChildren(),o=r.length;for(let i=0;i<o;i++){const s=r[i];n+=s.getTextContentSize(),R(s)&&i!==o-1&&!s.isInline()&&(n+=2)}return n}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(n){if(n!==""){const r=wm[n];return(this.getFormat()&r)!==0}return!1}hasTextFormat(n){const r=Po[n];return(this.getTextFormat()&r)!==0}getFormatFlags(n,r){return yl(this.getLatest().__textFormat,n,r)}getTextStyle(){return this.getLatest().__textStyle}select(n,r){vt();const o=Z();let i=n,s=r;const a=this.getChildrenSize();if(!this.canBeEmpty()){if(n===0&&r===0){const c=this.getFirstChild();if(X(c)||R(c))return c.select(0,0)}else if(!(n!==void 0&&n!==a||r!==void 0&&r!==a)){const c=this.getLastChild();if(X(c)||R(c))return c.select()}}i===void 0&&(i=a),s===void 0&&(s=a);const l=this.__key;return $(o)?(o.anchor.set(l,i,"element"),o.focus.set(l,s,"element"),o.dirty=!0,o):nx(l,i,l,s,"element","element")}selectStart(){const n=this.getFirstDescendant();return n?n.selectStart():this.select()}selectEnd(){const n=this.getLastDescendant();return n?n.selectEnd():this.select()}clear(){const n=this.getWritable();return this.getChildren().forEach(r=>r.remove()),n}append(...n){return this.splice(this.getChildrenSize(),0,n)}setDirection(n){const r=this.getWritable();return r.__dir=n,r}setFormat(n){return this.getWritable().__format=n!==""?wm[n]:0,this}setStyle(n){return this.getWritable().__style=n||"",this}setTextFormat(n){const r=this.getWritable();return r.__textFormat=n,r}setTextStyle(n){const r=this.getWritable();return r.__textStyle=n,r}setIndent(n){return this.getWritable().__indent=n,this}splice(n,r,o){hl(this)&&U(324,this.__key,this.__type);const i=this.getChildrenSize(),s=this.getWritable();n+r<=i||U(226,String(n),String(r),String(i));const a=s.__key,l=[],c=[],u=this.getChildAtIndex(n+r);let f=null,d=i-r+o.length;if(n!==0)if(n===i)f=this.getLastChild();else{const h=this.getChildAtIndex(n);h!==null&&(f=h.getPreviousSibling())}if(r>0){let h=f===null?this.getFirstChild():f.getNextSibling();for(let g=0;g<r;g++){h===null&&U(100);const m=h.getNextSibling(),y=h.__key;Ao(h.getWritable()),c.push(y),h=m}}let p=f;for(const h of o){p!==null&&h.is(p)&&(f=p=p.getPreviousSibling());const g=h.getWritable();g.__parent===a&&d--,Ao(g);const m=h.__key;if(p===null)s.__first=m,g.__prev=null;else{const y=p.getWritable();y.__next=m,g.__prev=y.__key}h.__key===a&&U(76),g.__parent=a,l.push(m),p=h}if(n+r===i)p!==null&&(p.getWritable().__next=null,s.__last=p.__key);else if(u!==null){const h=u.getWritable();if(p!==null){const g=p.getWritable();h.__prev=p.__key,g.__next=u.__key}else h.__prev=null}if(s.__size=d,c.length){const h=Z();if($(h)){const g=new Set(c),m=new Set(l),{anchor:y,focus:v}=h;tg(y,g,m)&&gl(y,y.getNode(),this,f,u),tg(v,g,m)&&gl(v,v.getNode(),this,f,u),d!==0||this.canBeEmpty()||jt(this)||this.remove()}}return s}getDOMSlot(n){return new Cs(n)}exportDOM(n){const{element:r}=super.exportDOM(n);if(ht(r)){const o=this.getIndent();o>0&&(r.style.paddingInlineStart=40*o+"px");const i=this.getDirection();i&&(r.dir=i)}return{element:r}}exportJSON(){const n={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},r=this.getTextFormat(),o=this.getTextStyle();return r===0&&o===""||jt(this)||this.getChildren().some(X)||(r!==0&&(n.textFormat=r),o!==""&&(n.textStyle=o)),n}updateFromJSON(n){return super.updateFromJSON(n).setFormat(n.format).setIndent(n.indent).setDirection(n.direction).setTextFormat(n.textFormat||0).setTextStyle(n.textStyle||"")}insertNewAfter(n,r){return null}canIndent(){return!0}collapseAtStart(n){return!1}excludeFromCopy(n){return!1}canReplaceWith(n){return!0}canInsertAfter(n){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(n){return!1}extractWithChild(n,r,o){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(n,r){const o=this.getDOMSlot(n);let i=o.getFirstChild();for(let s=this.getFirstChild();s;s=s.getNextSibling()){const a=r.getElementByKey(s.getKey());a!==null&&(i==null?(o.insertChild(a),i=a):i!==a&&o.replaceChild(a,i),i=i.nextSibling)}}}function R(e){return e instanceof Mn}function tg(e,t,n){let r=e.getNode();for(;r;){const o=r.__key;if(t.has(o)&&!n.has(o))return!0;r=r.getParent()}return!1}class ux extends ln{decorate(t,n){return null}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function Te(e){return e instanceof ux}class Zi extends Mn{constructor(){super("root");D(this,"__cachedText");this.__cachedText=null}static getType(){return"root"}static clone(){return new Zi}getTopLevelElementOrThrow(){U(51)}getTextContent(){const n=this.__cachedText;return!ra()&&Re()._dirtyType!==0||n===null?super.getTextContent():n}remove(){U(52)}replace(n){U(53)}insertBefore(n){U(54)}insertAfter(n){U(55)}updateDOM(n,r){return!1}splice(n,r,o){for(const i of o)R(i)||Te(i)||U(282);return super.splice(n,r,o)}static importJSON(n){return We().updateFromJSON(n)}collapseAtStart(){return!0}}function Ye(e){return e instanceof Zi}function fx(e){return new oa(new Map(e._nodeMap))}function $d(){return new oa(new Map([["root",new Zi]]))}function dx(e){const t=e.exportJSON(),n=e.constructor;if(t.type!==n.getType()&&U(130,n.name),R(e)){const r=t.children;Array.isArray(r)||U(59,n.name);const o=e.getChildren();for(let i=0;i<o.length;i++){const s=dx(o[i]);r.push(s)}}return t}function e6(e){return e instanceof oa}class oa{constructor(t,n){D(this,"_nodeMap");D(this,"_selection");D(this,"_flushSync");D(this,"_readOnly");this._nodeMap=t,this._selection=n||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(t,n){return Jm(n&&n.editor||null,this,t)}clone(t){const n=new oa(this._nodeMap,t===void 0?this._selection:t);return n._readOnly=!0,n}toJSON(){return Jm(null,this,()=>({root:dx(We())}))}}class Ud extends Mn{static getType(){return"artificial"}createDOM(t){return document.createElement("div")}}class Ji extends Mn{static getType(){return"paragraph"}static clone(t){return new Ji(t.__key)}createDOM(t){const n=document.createElement("p"),r=vi(t.theme,"paragraph");return r!==void 0&&n.classList.add(...r),n}updateDOM(t,n,r){return!1}static importDOM(){return{p:t=>({conversion:t6,priority:0})}}exportDOM(t){const{element:n}=super.exportDOM(t);if(ht(n)){this.isEmpty()&&n.append(document.createElement("br"));const r=this.getFormatType();r&&(n.style.textAlign=r)}return{element:n}}static importJSON(t){return Tt().updateFromJSON(t)}exportJSON(){const t=super.exportJSON();if(t.textFormat===void 0||t.textStyle===void 0){const n=this.getChildren().find(X);n?(t.textFormat=n.getFormat(),t.textStyle=n.getStyle()):(t.textFormat=this.getTextFormat(),t.textStyle=this.getTextStyle())}return t}insertNewAfter(t,n){const r=Tt();r.setTextFormat(t.format),r.setTextStyle(t.style);const o=this.getDirection();return r.setDirection(o),r.setFormat(this.getFormatType()),r.setStyle(this.getStyle()),this.insertAfter(r,n),r}collapseAtStart(){const t=this.getChildren();if(t.length===0||X(t[0])&&t[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 t6(e){const t=Tt();return e.style&&(t.setFormat(e.style.textAlign),g6(e,t)),{node:t}}function Tt(){return Kr(new Ji)}function Bd(e){return e instanceof Ji}const we=0,Gn=1,n6=3,px=4;function hx(e,t,n,r){const o=e._keyToDOMMap;o.clear(),e._editorState=$d(),e._pendingEditorState=r,e._compositionKey=null,e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,e._updateTags=new Set,e._updates=[],e._blockCursorElement=null;const i=e._observer;i!==null&&(i.disconnect(),e._observer=null),t!==null&&(t.textContent=""),n!==null&&(n.textContent="",o.set("root",n))}function r6(e){const t=new Set,n=new Set;let r=e;for(;r;){const{ownNodeConfig:o}=rc(r),i=r.transform;if(!n.has(i)){n.add(i);const s=r.transform();s&&t.add(s)}if(o){const s=o.$transform;s&&t.add(s),r=o.extends}else{const s=Object.getPrototypeOf(r);r=s.prototype instanceof ln&&s!==ln?s:void 0}}return t}function mx(e){const t=e||{},n=J3(),r=t.theme||{},o=e===void 0?n:t.parentEditor||null,i=t.disableEvents||!1,s=$d(),a=t.namespace||(o!==null?o._config.namespace:Ex()),l=t.editorState,c=[Zi,Br,Yi,Qi,Ji,Ud,...t.nodes||[]],{onError:u,html:f}=t,d=t.editable===void 0||t.editable;let p;if(e===void 0&&n!==null)p=n._nodes;else{p=new Map;for(let g=0;g<c.length;g++){let m=c[g],y=null,v=null;if(typeof m!="function"){const A=m;m=A.replace,y=A.with,v=A.withKlass||null}rc(m);const b=m.getType(),w=r6(m);p.set(b,{exportDOM:f&&f.export?f.export.get(m):void 0,klass:m,replace:y,replaceWithKlass:v,sharedNodeState:d3(c[g]),transforms:w})}}const h=new Ro(s,o,p,{disableEvents:i,namespace:a,theme:r},u||console.error,(function(g,m){const y=new Map,v=new Set,b=w=>{Object.keys(w).forEach(A=>{let _=y.get(A);_===void 0&&(_=[],y.set(A,_)),_.push(w[A])})};return g.forEach(w=>{const A=w.klass.importDOM;if(A==null||v.has(A))return;v.add(A);const _=A.call(w.klass);_!==null&&b(_)}),m&&b(m),y})(p,f?f.import:void 0),d,e);return l!==void 0&&(h._pendingEditorState=l,h._dirtyType=2),(function(g){g.registerCommand(Sb,O3,we),g.registerCommand(kb,P3,we),g.registerCommand(Tb,M3,we),g.registerCommand(Nb,I3,we),g.registerCommand(Ob,L3,we)})(h),h}class Ro{constructor(t,n,r,o,i,s,a,l){D(this,"_headless");D(this,"_parentEditor");D(this,"_rootElement");D(this,"_editorState");D(this,"_pendingEditorState");D(this,"_compositionKey");D(this,"_deferred");D(this,"_keyToDOMMap");D(this,"_updates");D(this,"_updating");D(this,"_listeners");D(this,"_commands");D(this,"_nodes");D(this,"_decorators");D(this,"_pendingDecorators");D(this,"_config");D(this,"_dirtyType");D(this,"_cloneNotNeeded");D(this,"_dirtyLeaves");D(this,"_dirtyElements");D(this,"_normalizedNodes");D(this,"_updateTags");D(this,"_observer");D(this,"_key");D(this,"_onError");D(this,"_htmlConversions");D(this,"_window");D(this,"_editable");D(this,"_blockCursorElement");D(this,"_createEditorArgs");this._createEditorArgs=l,this._parentEditor=n,this._rootElement=null,this._editorState=t,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=o,this._nodes=r,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=Ex(),this._onError=i,this._htmlConversions=s,this._editable=a,this._headless=n!==null&&n._headless,this._window=null,this._blockCursorElement=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(t){const n=this._listeners.update;return n.add(t),()=>{n.delete(t)}}registerEditableListener(t){const n=this._listeners.editable;return n.add(t),()=>{n.delete(t)}}registerDecoratorListener(t){const n=this._listeners.decorator;return n.add(t),()=>{n.delete(t)}}registerTextContentListener(t){const n=this._listeners.textcontent;return n.add(t),()=>{n.delete(t)}}registerRootListener(t){const n=this._listeners.root;return t(this._rootElement,null),n.add(t),()=>{t(null,this._rootElement),n.delete(t)}}registerCommand(t,n,r){r===void 0&&U(35);const o=this._commands;o.has(t)||o.set(t,[new Set,new Set,new Set,new Set,new Set]);const i=o.get(t);i===void 0&&U(36,String(t));const s=i[r];return s.add(n),()=>{s.delete(n),i.every(a=>a.size===0)&&o.delete(t)}}registerMutationListener(t,n,r){const o=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(t)).klass,i=this._listeners.mutation;let s=i.get(n);s===void 0&&(s=new Set,i.set(n,s)),s.add(o);const a=r&&r.skipInitialization;return a!==void 0&&a||this.initializeMutationListener(n,o),()=>{s.delete(o),s.size===0&&i.delete(n)}}getRegisteredNode(t){const n=this._nodes.get(t.getType());return n===void 0&&U(37,t.name),n}resolveRegisteredNodeAfterReplacements(t){for(;t.replaceWithKlass;)t=this.getRegisteredNode(t.replaceWithKlass);return t}initializeMutationListener(t,n){const r=this._editorState,o=cg(r).get(n.getType());if(!o)return;const i=new Map;for(const s of o.keys())i.set(s,"created");i.size>0&&t(i,{dirtyLeaves:new Set,prevEditorState:r,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(t,n){const r=this.getRegisteredNode(t);return r.transforms.add(n),r}registerNodeTransform(t,n){const r=this.registerNodeTransformToKlass(t,n),o=[r],i=r.replaceWithKlass;if(i!=null){const s=this.registerNodeTransformToKlass(i,n);o.push(s)}return(function(s,a){const l=cg(s.getEditorState()),c=[];for(const u of a){const f=l.get(u);f&&c.push(f)}c.length!==0&&s.update(()=>{for(const u of c)for(const f of u.keys()){const d=Xe(f);d&&d.markDirty()}},s._pendingEditorState===null?{tag:bo}:void 0)})(this,o.map(s=>s.klass.getType())),()=>{o.forEach(s=>s.transforms.delete(n))}}hasNode(t){return this._nodes.has(t.getType())}hasNodes(t){return t.every(this.hasNode.bind(this))}dispatchCommand(t,n){return ie(this,t,n)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(t){const n=this._rootElement;if(t!==n){const r=vi(this._config.theme,"root"),o=this._pendingEditorState||this._editorState;if(this._rootElement=t,hx(this,n,t,o),n!==null&&(this._config.disableEvents||R3(n),r!=null&&n.classList.remove(...r)),t!==null){const i=Zd(t),s=t.style;s.userSelect="text",s.whiteSpace="pre-wrap",s.wordBreak="break-word",t.setAttribute("data-lexical-editor","true"),this._window=i,this._dirtyType=2,bb(this),this._updateTags.add(bo),Qn(this),this._config.disableEvents||(function(a,l){const c=a.ownerDocument;Cf.set(a,c);const u=dl.get(c)??0;u<1&&c.addEventListener("selectionchange",Qb),dl.set(c,u+1),a.__lexicalEditor=l;const f=Yb(a);for(let d=0;d<Af.length;d++){const[p,h]=Af[d],g=typeof h=="function"?m=>{Dm(m)||(Rm(m),(l.isEditable()||p==="click")&&h(m,l))}:m=>{if(Dm(m))return;Rm(m);const y=l.isEditable();switch(p){case"cut":return y&&ie(l,Dd,m);case"copy":return ie(l,Zl,m);case"paste":return y&&ie(l,Gl,m);case"dragstart":return y&&ie(l,$b,m);case"dragover":return y&&ie(l,Ub,m);case"dragend":return y&&ie(l,_3,m);case"focus":return y&&ie(l,k3,m);case"blur":return y&&ie(l,T3,m);case"drop":return y&&ie(l,zb,m)}};a.addEventListener(p,g),f.push(()=>{a.removeEventListener(p,g)})}})(t,this),r!=null&&t.classList.add(...r)}else this._window=null,this._updateTags.add(bo),Qn(this);As("root",this,!1,t,n)}}getElementByKey(t){return this._keyToDOMMap.get(t)||null}getEditorState(){return this._editorState}setEditorState(t,n){t.isEmpty()&&U(38);let r=t;r._readOnly&&(r=fx(t),r._selection=t._selection?t._selection.clone():null),vb(this);const o=this._pendingEditorState,i=this._updateTags,s=n!==void 0?n.tag:null;o===null||o.isEmpty()||(s!=null&&i.add(s),Qn(this)),this._pendingEditorState=r,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,s!=null&&i.add(s),this._updating||Qn(this)}parseEditorState(t,n){return(function(r,o,i){const s=$d(),a=it,l=Ft,c=st,u=o._dirtyElements,f=o._dirtyLeaves,d=o._cloneNotNeeded,p=o._dirtyType;o._dirtyElements=new Map,o._dirtyLeaves=new Set,o._cloneNotNeeded=new Set,o._dirtyType=0,it=s,Ft=!1,st=o,Wd(null);try{const h=o._nodes;zd(r.root,h),i&&i(),s._readOnly=!0}catch(h){h instanceof Error&&o._onError(h)}finally{o._dirtyElements=u,o._dirtyLeaves=f,o._cloneNotNeeded=d,o._dirtyType=p,it=a,Ft=l,st=c}return s})(typeof t=="string"?JSON.parse(t):t,this,n)}read(t){return Qn(this),this.getEditorState().read(t,{editor:this})}update(t,n){(function(r,o,i){r._updating?r._updates.push([o,i]):Xl(r,o,i)})(this,t,n)}focus(t,n={}){const r=this._rootElement;r!==null&&(r.setAttribute("autocapitalize","off"),kn(this,()=>{const o=Z(),i=We();o!==null?o.dirty||Pt(o.clone()):i.getChildrenSize()!==0&&(n.defaultSelection==="rootStart"?i.selectStart():i.selectEnd()),c6("focus"),u6(()=>{r.removeAttribute("autocapitalize"),t&&t()})}),this._pendingEditorState===null&&r.removeAttribute("autocapitalize"))}blur(){const t=this._rootElement;t!==null&&t.blur();const n=en(this._window);n!==null&&n.removeAllRanges()}isEditable(){return this._editable}setEditable(t){this._editable!==t&&(this._editable=t,As("editable",this,!0,t))}toJSON(){return{editorState:this._editorState.toJSON()}}}D(Ro,"version");Ro.version="0.39.0+prod.esm";let Mf=null;function Wd(e){Mf=e}let o6=1;function gx(e,t){const n=Kd(e,t);return n===void 0&&U(30,t),n}function Kd(e,t){return e._nodes.get(t)}const i6=typeof queueMicrotask=="function"?queueMicrotask:e=>{Promise.resolve().then(e)};function yx(e){return Te(Fi(e))}function Hd(e){const t=document.activeElement;if(!ht(t))return!1;const n=t.nodeName;return Te(Fi(e))&&(n==="INPUT"||n==="TEXTAREA"||t.contentEditable==="true"&&ec(t)==null)}function ia(e,t,n){const r=e.getRootElement();try{return r!==null&&r.contains(t)&&r.contains(n)&&t!==null&&!Hd(t)&&vx(t)===e}catch{return!1}}function qd(e){return e instanceof Ro}function vx(e){let t=e;for(;t!=null;){const n=ec(t);if(qd(n))return n;t=sa(t)}return null}function ec(e){return e?e.__lexicalEditor:null}function wo(e){return Xb(e)||e.isToken()}function Wn(e){return wo(e)||e.isSegmented()}function cr(e){return Xi(e)&&e.nodeType===3}function bx(e){return Xi(e)&&e.nodeType===9}function Di(e){let t=e;for(;t!=null;){if(cr(t))return t;t=t.firstChild}return null}function yl(e,t,n){const r=Po[t];if(n!==null&&(e&r)===(n&r))return e;let o=e^r;return t==="subscript"?o&=-65:t==="superscript"?o&=-33:t==="lowercase"?(o&=-513,o&=-1025):t==="uppercase"?(o&=-257,o&=-1025):t==="capitalize"&&(o&=-257,o&=-513),o}function xx(e){return X(e)||xo(e)||Te(e)}function s6(e,t){const n=(function(){const s=Mf;return Mf=null,s})();if((t=t||n&&n.__key)!=null)return void(e.__key=t);vt(),ax();const r=Re(),o=Wr(),i=""+o6++;o._nodeMap.set(i,e),R(e)?r._dirtyElements.set(i,!0):r._dirtyLeaves.add(i),r._cloneNotNeeded.add(i),r._dirtyType=1,e.__key=i}function Ao(e){const t=e.getParent();if(t!==null){const n=e.getWritable(),r=t.getWritable(),o=e.getPreviousSibling(),i=e.getNextSibling(),s=i!==null?i.__key:null,a=o!==null?o.__key:null,l=o!==null?o.getWritable():null,c=i!==null?i.getWritable():null;o===null&&(r.__first=s),i===null&&(r.__last=a),l!==null&&(l.__next=s),c!==null&&(c.__prev=a),n.__prev=null,n.__next=null,n.__parent=null,r.__size--}}function vl(e){ax(),hl(e)&&U(323,e.__key,e.__type);const t=e.getLatest(),n=t.__parent,r=Wr(),o=Re(),i=r._nodeMap,s=o._dirtyElements;n!==null&&(function(l,c,u){let f=l;for(;f!==null;){if(u.has(f))return;const d=c.get(f);if(d===void 0)break;u.set(f,!1),f=d.__parent}})(n,i,s);const a=t.__key;o._dirtyType=1,R(e)?s.set(a,!0):o._dirtyLeaves.add(a)}function ft(e){vt();const t=Re(),n=t._compositionKey;if(e!==n){if(t._compositionKey=e,n!==null){const r=Xe(n);r!==null&&r.getWritable()}if(e!==null){const r=Xe(e);r!==null&&r.getWritable()}}}function Sr(){return ra()?null:Re()._compositionKey}function Xe(e,t){const n=(t||Wr())._nodeMap.get(e);return n===void 0?null:n}function wx(e,t){const n=tc(e,Re());return n!==void 0?Xe(n,t):null}function tc(e,t){return e[`__lexicalKey_${t._key}`]}function Fi(e,t){let n=e;for(;n!=null;){const r=wx(n,t);if(r!==null)return r;n=sa(n)}return null}function Ax(e){const t=e._decorators,n=Object.assign({},t);return e._pendingDecorators=n,n}function ng(e){return e.read(()=>We().getTextContent())}function We(){return Cx(Wr())}function Cx(e){return e._nodeMap.get("root")}function Pt(e){vt();const t=Wr();e!==null&&(e.dirty=!0,e.setCachedNodes(null)),t._selection=e}function ci(e){const t=Re(),n=(function(r,o){let i=r;for(;i!=null;){const s=tc(i,o);if(s!==void 0)return s;i=sa(i)}return null})(e,t);return n===null?e===t.getRootElement()?Xe("root"):null:Xe(n)}function _x(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function Vd(e){const t=[];let n=e;for(;n!==null;)t.push(n),n=n._parentEditor;return t}function Ex(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function Sx(e){return cr(e)?e.nodeValue:null}function Yd(e,t,n){const r=en(Xt(t));if(r===null)return;const o=r.anchorNode;let{anchorOffset:i,focusOffset:s}=r;if(o!==null){let a=Sx(o);const l=Fi(o);if(a!==null&&X(l)){if(a===Vl&&n){const c=n.length;a=n,i=c,s=c}a!==null&&Qd(l,a,i,s,e)}}}function Qd(e,t,n,r,o){let i=e;if(i.isAttached()&&(o||!i.isDirty())){const s=i.isComposing();let a=t;(s||o)&&t[t.length-1]===Vl&&(a=t.slice(0,-1));const l=i.getTextContent();if(o||a!==l){if(a===""){if(ft(null),ea||Vi||ta)i.remove();else{const g=Re();setTimeout(()=>{g.update(()=>{i.isAttached()&&i.remove()})},20)}return}const c=i.getParent(),u=Gi(),f=i.getTextContentSize(),d=Sr(),p=i.getKey();if(i.isToken()||d!==null&&p===d&&!s||$(u)&&(c!==null&&!c.canInsertTextBefore()&&u.anchor.offset===0||u.anchor.key===e.__key&&u.anchor.offset===0&&!i.canInsertTextBefore()&&!s||u.focus.key===e.__key&&u.focus.offset===f&&!i.canInsertTextAfter()&&!s))return void i.markDirty();const h=Z();if(!$(h)||n===null||r===null)return void rg(i,a,h);if(h.setTextNodeRange(i,n,i,r),i.isSegmented()){const g=rt(i.getTextContent());i.replace(g),i=g}rg(i,a,h)}}}function rg(e,t,n){if(e.setTextContent(t),$(n)){const r=e.getKey();for(const o of["anchor","focus"]){const i=n[o];i.type==="text"&&i.key===r&&(i.offset=Pr(e,i.offset,"clamp"))}}}function ka(e,t,n){const r=t[n]||!1;return r==="any"||r===e[n]}function a6(e,t){return ka(e,t,"altKey")&&ka(e,t,"ctrlKey")&&ka(e,t,"shiftKey")&&ka(e,t,"metaKey")}function Ie(e,t,n){return a6(e,n)&&e.key.toLowerCase()===t.toLowerCase()}const Un={ctrlKey:!sn,metaKey:sn},og={altKey:sn,ctrlKey:!sn};function ig(e){return e.key==="Backspace"}function sg(e){return Ie(e,"a",Un)}function l6(e){const t=We();if($(e)){const n=e.anchor,r=e.focus,o=n.getNode().getTopLevelElementOrThrow().getParentOrThrow();return n.set(o.getKey(),0,"element"),r.set(o.getKey(),o.getChildrenSize(),"element"),Ri(e),e}{const n=t.select(0,t.getChildrenSize());return Pt(Ri(n)),n}}function vi(e,t){e.__lexicalClassNameCache===void 0&&(e.__lexicalClassNameCache={});const n=e.__lexicalClassNameCache,r=n[t];if(r!==void 0)return r;const o=e[t];if(typeof o=="string"){const i=hb(o);return n[t]=i,i}return o}function Gd(e,t,n,r,o){if(n.size===0)return;const i=r.__type,s=r.__key,a=t.get(i);a===void 0&&U(33,i);const l=a.klass;let c=e.get(l);c===void 0&&(c=new Map,e.set(l,c));const u=c.get(s),f=u==="destroyed"&&o==="created";(u===void 0||f)&&c.set(s,f?"updated":o)}function ag(e,t,n){const r=e.getParent();let o=n,i=e;return r!==null&&(t&&n===0?(o=i.getIndexWithinParent(),i=r):t||n!==i.getChildrenSize()||(o=i.getIndexWithinParent()+1,i=r)),i.getChildAtIndex(t?o-1:o)}function If(e,t){const n=e.offset;if(e.type==="element")return ag(e.getNode(),t,n);{const r=e.getNode();if(t&&n===0||!t&&n===r.getTextContentSize()){const o=t?r.getPreviousSibling():r.getNextSibling();return o===null?ag(r.getParentOrThrow(),t,r.getIndexWithinParent()+(t?0:1)):o}}return null}function kx(e){const t=Xt(e).event,n=t&&t.inputType;return n==="insertFromPaste"||n==="insertFromPasteAsQuotation"}function ie(e,t,n){return(function(r,o,i){const s=Vd(r);for(let a=4;a>=0;a--)for(let l=0;l<s.length;l++){const c=s[l],u=c._commands.get(o);if(u!==void 0){const f=u[a];if(f!==void 0){const d=Array.from(f),p=d.length;let h=!1;if(kn(c,()=>{for(let g=0;g<p;g++)if(d[g](i,r))return void(h=!0)}),h)return h}}}return!1})(e,t,n)}function nc(e){return!Ye(e)&&!e.isLastChild()&&!e.isInline()}function Do(e,t){const n=e._keyToDOMMap.get(t);return n===void 0&&U(75,t),n}function sa(e){const t=e.assignedSlot||e.parentElement;return Df(t)?t.host:t}function Tx(e){return bx(e)?e:ht(e)?e.ownerDocument:null}function c6(e){vt(),Re()._updateTags.add(e)}function u6(e){vt(),Re()._deferred.push(e)}function Lf(e,t){let n=e.getParent();for(;n!==null;){if(n.is(t))return!0;n=n.getParent()}return!1}function Zd(e){const t=Tx(e);return t?t.defaultView:null}function Xt(e){const t=e._window;return t===null&&U(78),t}function f6(e){let t=e.getParentOrThrow();for(;t!==null;){if(jt(t))return t;t=t.getParentOrThrow()}return t}function jt(e){return Ye(e)||R(e)&&e.isShadowRoot()}function Kr(e){const t=Re(),n=e.getType(),r=Kd(t,n);r===void 0&&U(200,e.constructor.name,n);const{replace:o,replaceWithKlass:i}=r;if(o!==null){const s=o(e),a=s.constructor;return i!==null?s instanceof i||U(201,i.name,i.getType(),a.name,a.getType(),e.constructor.name,n):s instanceof e.constructor&&a!==e.constructor||U(202,a.name,a.getType(),e.constructor.name,n),s.__key===e.__key&&U(203,e.constructor.name,n,a.name,a.getType()),s}return e}function Xc(e,t){!Ye(e.getParent())||R(t)||Te(t)||U(99)}function d6(e){const t=Xe(e);return t===null&&U(63,e),t}function eu(e){return(Te(e)||R(e)&&!e.canBeEmpty())&&!e.isInline()}function Rf(e,t,n){n.style.removeProperty("caret-color"),t._blockCursorElement=null;const r=e.parentElement;r!==null&&r.removeChild(e)}function en(e){return dn?(e||window).getSelection():null}function p6(e){const t=Zd(e);return t?t.getSelection():null}function Nx(e){return ht(e)&&e.tagName==="A"}function ht(e){return Xi(e)&&e.nodeType===1}function Xi(e){return typeof e=="object"&&e!==null&&"nodeType"in e&&typeof e.nodeType=="number"}function Df(e){return Xi(e)&&e.nodeType===11}function Ff(e){const t=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/,"i");return e.nodeName.match(t)!==null}function bl(e){const t=new RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/,"i");return e.nodeName.match(t)!==null}function yr(e){if(Te(e)&&!e.isInline())return!0;if(!R(e)||jt(e))return!1;const t=e.getFirstChild(),n=t===null||xo(t)||X(t)||t.isInline();return!e.isInline()&&e.canBeEmpty()!==!1&&n}function Jd(){return Re()}const lg=new WeakMap,h6=new Map;function cg(e){if(!e._readOnly&&e.isEmpty())return h6;e._readOnly||U(192);let t=lg.get(e);return t||(t=(function(n){const r=new Map;for(const[o,i]of n._nodeMap){const s=i.__type;let a=r.get(s);a||(a=new Map,r.set(s,a)),a.set(o,i)}return r})(e),lg.set(e,t)),t}function Ox(e){const t=e.constructor.clone(e);return t.afterCloneFrom(e),t}function m6(e){return(t=Ox(e))[Gb]=!0,t;var t}function g6(e,t){const n=parseInt(e.style.paddingInlineStart,10)||0,r=Math.round(n/40);t.setIndent(r)}function y6(e){return e.__lexicalUnmanaged===!0}function fs(e,t){return(function(n,r){return Object.prototype.hasOwnProperty.call(n,r)})(e,t)&&e[t]!==ln[t]}function rc(e){const t=Am in e.prototype?e.prototype[Am]():void 0,n=(function(s){if(!(s===ln||s.prototype instanceof ln)){let a="<unknown>",l="<unknown>";try{a=s.getType()}catch{}try{Ro.version&&(l=JSON.parse(Ro.version))}catch{}U(290,s.name,a,l)}return s===ux||s===Mn||s===ln})(e),r=!n&&fs(e,"getType")?e.getType():void 0;let o,i=r;if(t)if(r)o=t[r];else for(const[s,a]of Object.entries(t))i=s,o=a;if(!n&&i&&(fs(e,"getType")||(e.getType=()=>i),fs(e,"clone")||(e.clone=s=>(Wd(s),new e)),fs(e,"importJSON")||(e.importJSON=o&&o.$importJSON||(s=>new e().updateFromJSON(s))),!fs(e,"importDOM")&&o)){const{importDOM:s}=o;s&&(e.importDOM=()=>s)}return{ownNodeConfig:o,ownNodeType:i}}const at=(e,t)=>{let n=e;for(;n!=null&&!Ye(n);){if(t(n))return n;n=n.getParent()}return null},v6={next:"previous",previous:"next"};class Xd{constructor(t){D(this,"origin");this.origin=t}[Symbol.iterator](){return Px({hasNext:ji,initial:this.getAdjacentCaret(),map:t=>t,step:t=>t.getAdjacentCaret()})}getAdjacentCaret(){return xt(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return xt(this.origin,this.direction)}remove(){const t=this.getNodeAtCaret();return t&&t.remove(),this}replaceOrInsert(t,n){const r=this.getNodeAtCaret();return t.is(this.origin)||t.is(r)||(r===null?this.insert(t):r.replace(t,n)),this}splice(t,n,r="next"){const o=r===this.direction?n:Array.from(n).reverse();let i=this;const s=this.getParentAtCaret(),a=new Map;for(let l=i.getAdjacentCaret();l!==null&&a.size<t;l=l.getAdjacentCaret()){const c=l.origin.getWritable();a.set(c.getKey(),c)}for(const l of o){if(a.size>0){const c=i.getNodeAtCaret();if(c){if(a.delete(c.getKey()),a.delete(l.getKey()),!(c.is(l)||i.origin.is(l))){const u=l.getParent();u&&u.is(s)&&l.remove(),c.replace(l)}}else c===null&&U(263,Array.from(a).join(" "))}else i.insert(l);i=xt(l,this.direction)}for(const l of a.values())l.remove();return this}}class zs extends Xd{constructor(){super(...arguments);D(this,"type","child")}getLatest(){const n=this.origin.getLatest();return n===this.origin?this:un(n,this.direction)}getParentCaret(n="root"){return xt(ep(this.getParentAtCaret(),n),this.direction)}getFlipped(){const n=es(this.direction);return xt(this.getNodeAtCaret(),n)||un(this.origin,n)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(n){return n instanceof zs&&this.direction===n.direction&&this.origin.is(n.origin)}isSamePointCaret(n){return this.isSameNodeCaret(n)}}const b6={root:Ye,shadowRoot:jt};function es(e){return v6[e]}function ep(e,t="root"){return b6[t](e)?null:e}class Fo extends Xd{constructor(){super(...arguments);D(this,"type","sibling")}getLatest(){const n=this.origin.getLatest();return n===this.origin?this:xt(n,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return R(this.origin)?un(this.origin,this.direction):null}getParentCaret(n="root"){return xt(ep(this.getParentAtCaret(),n),this.direction)}getFlipped(){const n=es(this.direction);return xt(this.getNodeAtCaret(),n)||un(this.origin.getParentOrThrow(),n)}isSamePointCaret(n){return n instanceof Fo&&this.direction===n.direction&&this.origin.is(n.origin)}isSameNodeCaret(n){return(n instanceof Fo||n instanceof jo)&&this.direction===n.direction&&this.origin.is(n.origin)}}class jo extends Xd{constructor(n,r){super(n);D(this,"type","text");D(this,"offset");this.offset=r}getLatest(){const n=this.origin.getLatest();return n===this.origin?this:zo(n,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(n="root"){return xt(ep(this.getParentAtCaret(),n),this.direction)}getFlipped(){return zo(this.origin,es(this.direction),this.offset)}isSamePointCaret(n){return n instanceof jo&&this.direction===n.direction&&this.origin.is(n.origin)&&this.offset===n.offset}isSameNodeCaret(n){return(n instanceof Fo||n instanceof jo)&&this.direction===n.direction&&this.origin.is(n.origin)}getSiblingCaret(){return xt(this.origin,this.direction)}}function Or(e){return e instanceof jo}function ji(e){return e instanceof Fo}function Tn(e){return e instanceof zs}const x6={next:class extends jo{constructor(){super(...arguments);D(this,"direction","next")}getNodeAtCaret(){return this.origin.getNextSibling()}insert(t){return this.origin.insertAfter(t),this}},previous:class extends jo{constructor(){super(...arguments);D(this,"direction","previous")}getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(t){return this.origin.insertBefore(t),this}}},w6={next:class extends Fo{constructor(){super(...arguments);D(this,"direction","next")}getNodeAtCaret(){return this.origin.getNextSibling()}insert(t){return this.origin.insertAfter(t),this}},previous:class extends Fo{constructor(){super(...arguments);D(this,"direction","previous")}getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(t){return this.origin.insertBefore(t),this}}},A6={next:class extends zs{constructor(){super(...arguments);D(this,"direction","next")}getNodeAtCaret(){return this.origin.getFirstChild()}insert(t){return this.origin.splice(0,0,[t]),this}},previous:class extends zs{constructor(){super(...arguments);D(this,"direction","previous")}getNodeAtCaret(){return this.origin.getLastChild()}insert(t){return this.origin.splice(this.origin.getChildrenSize(),0,[t]),this}}};function xt(e,t){return e?new w6[t](e):null}function zo(e,t,n){return e?new x6[t](e,Pr(e,n)):null}function Pr(e,t,n="error"){const r=e.getTextContentSize();let o=t==="next"?r:t==="previous"?0:t;return(o<0||o>r)&&(n!=="clamp"&&db(284,String(t),String(r),e.getKey()),o=o<0?0:r),o}function ug(e,t){return new _6(e,t)}function un(e,t){return R(e)?new A6[t](e):null}function C6(e){return e&&e.getChildCaret()||e}function tp(e){return e&&C6(e.getAdjacentCaret())}class np{constructor(t,n,r){D(this,"type","node-caret-range");D(this,"direction");D(this,"anchor");D(this,"focus");this.anchor=t,this.focus=n,this.direction=r}getLatest(){const t=this.anchor.getLatest(),n=this.focus.getLatest();return t===this.anchor&&n===this.focus?this:new np(t,n,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){const t=o=>{const i=this[o].getLatest();return Or(i)?(function(s,a){const{direction:l,origin:c}=s,u=Pr(c,a==="focus"?es(l):l);return ug(s,u-s.offset)})(i,o):null},n=t("anchor"),r=t("focus");if(n&&r){const{caret:o}=n,{caret:i}=r;if(o.isSameNodeCaret(i))return[ug(o,i.offset-o.offset),null]}return[n,r]}iterNodeCarets(t="root"){const n=Or(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),r=this.focus.getLatest(),o=Or(r),i=s=>s.isSameNodeCaret(r)?null:tp(s)||s.getParentCaret(t);return Px({hasNext:s=>s!==null&&!(o&&r.isSameNodeCaret(s)),initial:n.isSameNodeCaret(r)?null:i(n),map:s=>s,step:i})}[Symbol.iterator](){return this.iterNodeCarets("root")}}class _6{constructor(t,n){D(this,"type","slice");D(this,"caret");D(this,"distance");this.caret=t,this.distance=n}getSliceIndices(){const{distance:t,caret:{offset:n}}=this,r=n+t;return r<n?[r,n]:[n,r]}getTextContent(){const[t,n]=this.getSliceIndices();return this.caret.origin.getTextContent().slice(t,n)}getTextContentSize(){return Math.abs(this.distance)}removeTextSlice(){const{caret:{origin:t,direction:n}}=this,[r,o]=this.getSliceIndices(),i=t.getTextContent();return zo(t.setTextContent(i.slice(0,r)+i.slice(o)),n,r)}}function rp(e){return Fr(e,xt(We(),e.direction))}function E6(e){return Fr(e,e)}function Fr(e,t){return e.direction!==t.direction&&U(265),new np(e,t,e.direction)}function Px(e){const{initial:t,hasNext:n,step:r,map:o}=e;let i=t;return{[Symbol.iterator](){return this},next(){if(!n(i))return{done:!0,value:void 0};const s={done:!1,value:o(i)};return i=r(i),s}}}function Mx(e,t){const n=Ha(e.origin,t.origin);switch(n===null&&U(275,e.origin.getKey(),t.origin.getKey()),n.type){case"same":{const r=e.type==="text",o=t.type==="text";return r&&o?(function(i,s){return Math.sign(i-s)})(e.offset,t.offset):e.type===t.type?0:r?-1:o?1:e.type==="child"?-1:1}case"ancestor":return e.type==="child"?-1:1;case"descendant":return t.type==="child"?1:-1;case"branch":return Ix(n)}}function Ix(e){const{a:t,b:n}=e,r=t.__key,o=n.__key;let i=t,s=n;for(;i&&s;i=i.getNextSibling(),s=s.getNextSibling()){if(i.__key===o)return-1;if(s.__key===r)return 1}return i===null?1:-1}function Ta(e,t){return t.is(e)}function fg(e){return R(e)?[e.getLatest(),null]:[e.getParent(),e.getLatest()]}function Ha(e,t){if(e.is(t))return{commonAncestor:e,type:"same"};const n=new Map;for(let[r,o]=fg(e);r;o=r,r=r.getParent())n.set(r,o);for(let[r,o]=fg(t);r;o=r,r=r.getParent()){const i=n.get(r);if(i!==void 0)return i===null?(Ta(e,r)||U(276),{commonAncestor:r,type:"ancestor"}):o===null?(Ta(t,r)||U(277),{commonAncestor:r,type:"descendant"}):((R(i)||Ta(e,i))&&(R(o)||Ta(t,o))&&r.is(i.getParent())&&r.is(o.getParent())||U(278),{a:i,b:o,commonAncestor:r,type:"branch"})}return null}function nr(e,t){const{type:n,key:r,offset:o}=e,i=d6(e.key);return n==="text"?(X(i)||U(266,i.getType(),r),zo(i,t,o)):(R(i)||U(267,i.getType(),r),T6(i,e.offset,t))}function $o(e,t){const{origin:n,direction:r}=t,o=r==="next";Or(t)?e.set(n.getKey(),t.offset,"text"):ji(t)?X(n)?e.set(n.getKey(),Pr(n,r),"text"):e.set(n.getParentOrThrow().getKey(),n.getIndexWithinParent()+(o?1:0),"element"):(Tn(t)&&R(n)||U(268),e.set(n.getKey(),o?0:n.getChildrenSize(),"element"))}function S6(e){const t=Z(),n=$(t)?t:rx();return qa(n,e),Pt(n),n}function qa(e,t){$o(e.anchor,t.anchor),$o(e.focus,t.focus)}function dg(e){const{anchor:t,focus:n}=e,r=nr(t,"next"),o=nr(n,"next"),i=Mx(r,o)<=0?"next":"previous";return Fr(zi(r,i),zi(o,i))}function op(e){const{direction:t,origin:n}=e,r=xt(n,es(t)).getNodeAtCaret();return r?xt(r,t):un(n.getParentOrThrow(),t)}function pg(e,t="root"){const n=[e];for(let r=Tn(e)?e.getParentCaret(t):e.getSiblingCaret();r!==null;r=r.getParentCaret(t))n.push(op(r));return n}function tu(e){return!!e&&e.origin.isAttached()}function k6(e,t="removeEmptySlices"){if(e.isCollapsed())return e;const n="root",r="next";let o=t;const i=Rx(e,r),s=pg(i.anchor,n),a=pg(i.focus.getFlipped(),n),l=new Set,c=[];for(const h of i.iterNodeCarets(n))if(Tn(h))l.add(h.origin.getKey());else if(ji(h)){const{origin:g}=h;R(g)&&!l.has(g.getKey())||c.push(g)}for(const h of c)h.remove();for(const h of i.getTextSlices()){if(!h)continue;const{origin:g}=h.caret,m=g.getTextContentSize(),y=op(xt(g,r)),v=g.getMode();if(Math.abs(h.distance)===m&&o==="removeEmptySlices"||v==="token"&&h.distance!==0)y.remove();else if(h.distance!==0){o="removeEmptySlices";let b=h.removeTextSlice();const w=h.caret.origin;if(v==="segmented"){const A=b.origin,_=rt(A.getTextContent()).setStyle(A.getStyle()).setFormat(A.getFormat());y.replaceOrInsert(_),b=zo(_,r,b.offset)}w.is(s[0].origin)&&(s[0]=b),w.is(a[0].origin)&&(a[0]=b.getFlipped())}}let u,f;for(const h of s)if(tu(h)){u=Yt(h);break}for(const h of a)if(tu(h)){f=Yt(h);break}const d=(function(h,g,m){if(!h||!g)return null;const y=h.getParentAtCaret(),v=g.getParentAtCaret();if(!y||!v)return null;const b=y.getParents().reverse();b.push(y);const w=v.getParents().reverse();w.push(v);const A=Math.min(b.length,w.length);let _;for(_=0;_<A&&b[_]===w[_];_++);const E=(P,I)=>{let W;for(let j=_;j<P.length;j++){const z=P[j];if(jt(z))return;!W&&I(z)&&(W=z)}return W},S=E(b,yr),N=S&&E(w,P=>m.has(P.getKey())&&yr(P));return S&&N?[S,N]:null})(u,f,l);if(d){const[h,g]=d;un(h,"previous").splice(0,g.getChildren()),g.remove()}const p=[u,f,...s,...a].find(tu);if(p)return E6(zi(Yt(p),e.direction));U(269,JSON.stringify(s.map(h=>h.origin.__key)))}function Yt(e){const t=(function(o){let i=o;for(;Tn(i);){const s=tp(i);if(!Tn(s))break;i=s}return i})(e.getLatest()),{direction:n}=t;if(X(t.origin))return Or(t)?t:zo(t.origin,n,n);const r=t.getAdjacentCaret();return ji(r)&&X(r.origin)?zo(r.origin,n,es(n)):t}function Lx(e){return Or(e)&&e.offset!==Pr(e.origin,e.direction)}function zi(e,t){return e.direction===t?e:e.getFlipped()}function Rx(e,t){return e.direction===t?e:Fr(zi(e.focus,t),zi(e.anchor,t))}function T6(e,t,n){let r=un(e,"next");for(let o=0;o<t;o++){const i=r.getAdjacentCaret();if(i===null)break;r=i}return zi(r,n)}function N6(...e){return e}function O6(e,t){if(!t||e===t)return e;for(const n in t)if(e[n]!==t[n])return{...e,...t};return e}const Dx=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,P6=Dx?T.useLayoutEffect:T.useEffect,Na={tag:bo};function M6({initialConfig:e,children:t}){const n=T.useMemo(()=>{const{theme:r,namespace:o,nodes:i,onError:s,editorState:a,html:l}=e,c=HT(null,r),u=mx({editable:e.editable,html:l,namespace:o,nodes:i,onError:f=>s(f,u),theme:r});return(function(f,d){if(d!==null){if(d===void 0)f.update(()=>{const p=We();if(p.isEmpty()){const h=Tt();p.append(h);const g=Dx?document.activeElement:null;(Z()!==null||g!==null&&g===f.getRootElement())&&h.select()}},Na);else if(d!==null)switch(typeof d){case"string":{const p=f.parseEditorState(d);f.setEditorState(p,Na);break}case"object":f.setEditorState(d,Na);break;case"function":f.update(()=>{We().isEmpty()&&d(f)},Na)}}})(u,a),[u,c]},[]);return P6(()=>{const r=e.editable,[o]=n;o.setEditable(r===void 0||r)},[]),x.jsx(fb.Provider,{value:n,children:t})}const I6=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?T.useLayoutEffect:T.useEffect;function L6(e){return{initialValueFn:()=>e.isEditable(),subscribe:t=>e.registerEditableListener(t)}}function R6(){return(function(e){const[t]=pt(),n=T.useMemo(()=>e(t),[t,e]),[r,o]=T.useState(()=>n.initialValueFn()),i=T.useRef(r);return I6(()=>{const{initialValueFn:s,subscribe:a}=n,l=s();return i.current!==l&&(i.current=l,o(l)),a(c=>{i.current=c,o(c)})},[n,e]),r})(L6)}function D6(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const o of t)r.append("v",o);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const jf=new Map;function Fx(e){const t={};if(!e)return t;const n=e.split(";");for(const r of n)if(r!==""){const[o,i]=r.split(/:([^]+)/);o&&i&&(t[o.trim()]=i.trim())}return t}function hg(e){let t=jf.get(e);return t===void 0&&(t=Fx(e),jf.set(e,t)),t}function jx(e){const t=Jd().getElementByKey(e.getKey());if(t===null)return null;const n=t.ownerDocument.defaultView;return n===null?null:n.getComputedStyle(t)}function zx(e){return jx(Ye(e)?e:e.getParentOrThrow())}function mg(e){const t=zx(e);return t!==null&&t.direction==="rtl"}function $x(e,t,n="self"){const r=e.getStartEndPoints();if(t.isSelected(e)&&!Wn(t)&&r!==null){const[o,i]=r,s=e.isBackward(),a=o.getNode(),l=i.getNode(),c=t.is(a),u=t.is(l);if(c||u){const[f,d]=Of(e),p=a.is(l),h=t.is(s?l:a),g=t.is(s?a:l);let m,y=0;p?(y=f>d?d:f,m=f>d?f:d):h?(y=s?d:f,m=void 0):g&&(y=0,m=s?f:d);const v=t.__text.slice(y,m);v!==t.__text&&(n==="clone"&&(t=m6(t)),t.__text=v)}}return t}function gg(e){if(e.type==="text")return e.offset===e.getNode().getTextContentSize();const t=e.getNode();return R(t)||D6(177),e.offset===t.getChildrenSize()}function F6(e){const t=e.getStyle(),n=Fx(t);jf.set(t,n)}function Ux(e){const t=Bx(e);return t!==null&&t.writingMode==="vertical-rl"}function Bx(e){const t=e.anchor.getNode();return R(t)?jx(t):zx(t)}function yg(e,t){let n=Ux(e)?!t:t;Wx(e)&&(n=!n);const r=nr(e.focus,n?"previous":"next");if(Lx(r))return!1;for(const o of rp(r)){if(Tn(o))return!o.origin.isInline();if(!R(o.origin)){if(Te(o.origin))return!0;break}}return!1}function j6(e,t,n,r){e.modify(t?"extend":"move",n,r)}function Wx(e){const t=Bx(e);return t!==null&&t.direction==="rtl"}function vg(e,t,n){const r=Wx(e);let o;o=Ux(e)||r?!n:n,j6(e,t,o,"character")}function z6(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const o of t)r.append("v",o);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const Kx=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,$6=Kx&&"documentMode"in document?document.documentMode:null;!(!Kx||!("InputEvent"in window)||$6)&&"getTargetRanges"in new window.InputEvent("input");function Hx(...e){const t=[];for(const n of e)if(n&&typeof n=="string")for(const[r]of n.matchAll(/\S+/g))t.push(r);return t}function fn(...e){return()=>{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}function ip(e,...t){const n=Hx(...t);n.length>0&&e.classList.add(...n)}function qx(e,...t){const n=Hx(...t);n.length>0&&e.classList.remove(...n)}function U6(e,t){let n=e;for(;n!=null;){if(n instanceof t)return n;n=n.getParent()}return null}function B6(e){const t=at(e,n=>R(n)&&!n.isInline());return R(t)||z6(4,e.__key),t}function kr(e,t){return e!==null&&Object.getPrototypeOf(e).constructor.name===t.name}const W6=Symbol.for("preact-signals");function oc(){if(Mr>1)return void Mr--;let e,t=!1;for(;_s!==void 0;){let n=_s;for(_s=void 0,zf++;n!==void 0;){const r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&Vx(n))try{n.c()}catch(o){t||(e=o,t=!0)}n=r}}if(zf=0,Mr--,t)throw e}function K6(e){if(Mr>0)return e();Mr++;try{return e()}finally{oc()}}let Pe,_s;function bg(e){const t=Pe;Pe=void 0;try{return e()}finally{Pe=t}}let Mr=0,zf=0,Va=0;function xg(e){if(Pe===void 0)return;let t=e.n;return t===void 0||t.t!==Pe?(t={i:0,S:e,p:Pe.s,n:void 0,t:Pe,e:void 0,x:void 0,r:t},Pe.s!==void 0&&(Pe.s.n=t),Pe.s=t,e.n=t,32&Pe.f&&e.S(t),t):t.i===-1?(t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=Pe.s,t.n=void 0,Pe.s.n=t,Pe.s=t),t):void 0}function _t(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.W=t==null?void 0:t.watched,this.Z=t==null?void 0:t.unwatched,this.name=t==null?void 0:t.name}function H6(e,t){return new _t(e,t)}function Vx(e){for(let t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function wg(e){for(let t=e.s;t!==void 0;t=t.n){const n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function Yx(e){let t,n=e.s;for(;n!==void 0;){const r=n.p;n.i===-1?(n.S.U(n),r!==void 0&&(r.n=n.n),n.n!==void 0&&(n.n.p=r)):t=n,n.S.n=n.r,n.r!==void 0&&(n.r=void 0),n=r}e.s=t}function ti(e,t){_t.call(this,void 0),this.x=e,this.s=void 0,this.g=Va-1,this.f=4,this.W=t==null?void 0:t.watched,this.Z=t==null?void 0:t.unwatched,this.name=t==null?void 0:t.name}function Qx(e){const t=e.u;if(e.u=void 0,typeof t=="function"){Mr++;const n=Pe;Pe=void 0;try{t()}catch(r){throw e.f&=-2,e.f|=8,sp(e),r}finally{Pe=n,oc()}}}function sp(e){for(let t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Qx(e)}function q6(e){if(Pe!==this)throw new Error("Out-of-order effect");Yx(this),Pe=e,this.f&=-2,8&this.f&&sp(this),oc()}function ai(e,t){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32,this.name=t==null?void 0:t.name}function $s(e,t){const n=new ai(e,t);try{n.c()}catch(o){throw n.d(),o}const r=n.d.bind(n);return r[Symbol.dispose]=r,r}function Gx(e,t={}){const n={};for(const r in e){const o=t[r],i=H6(o===void 0?e[r]:o);n[r]=i}return n}_t.prototype.brand=W6,_t.prototype.h=function(){return!0},_t.prototype.S=function(e){const t=this.t;t!==e&&e.e===void 0&&(e.x=t,this.t=e,t!==void 0?t.e=e:bg(()=>{var n;(n=this.W)==null||n.call(this)}))},_t.prototype.U=function(e){if(this.t!==void 0){const t=e.e,n=e.x;t!==void 0&&(t.x=n,e.e=void 0),n!==void 0&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n,n===void 0&&bg(()=>{var r;(r=this.Z)==null||r.call(this)}))}},_t.prototype.subscribe=function(e){return $s(()=>{const t=this.value,n=Pe;Pe=void 0;try{e(t)}finally{Pe=n}},{name:"sub"})},_t.prototype.valueOf=function(){return this.value},_t.prototype.toString=function(){return this.value+""},_t.prototype.toJSON=function(){return this.value},_t.prototype.peek=function(){const e=Pe;Pe=void 0;try{return this.value}finally{Pe=e}},Object.defineProperty(_t.prototype,"value",{get(){const e=xg(this);return e!==void 0&&(e.i=this.i),this.v},set(e){if(e!==this.v){if(zf>100)throw new Error("Cycle detected");this.v=e,this.i++,Va++,Mr++;try{for(let t=this.t;t!==void 0;t=t.x)t.t.N()}finally{oc()}}}}),ti.prototype=new _t,ti.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Va))return!0;if(this.g=Va,this.f|=1,this.i>0&&!Vx(this))return this.f&=-2,!0;const e=Pe;try{wg(this),Pe=this;const t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(t){this.v=t,this.f|=16,this.i++}return Pe=e,Yx(this),this.f&=-2,!0},ti.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(let t=this.s;t!==void 0;t=t.n)t.S.S(t)}_t.prototype.S.call(this,e)},ti.prototype.U=function(e){if(this.t!==void 0&&(_t.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(let t=this.s;t!==void 0;t=t.n)t.S.U(t)}},ti.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(let e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty(ti.prototype,"value",{get(){if(1&this.f)throw new Error("Cycle detected");const e=xg(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),ai.prototype.c=function(){const e=this.S();try{if(8&this.f||this.x===void 0)return;const t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}},ai.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Qx(this),wg(this),Mr++;const e=Pe;return Pe=this,q6.bind(this,e)},ai.prototype.N=function(){2&this.f||(this.f|=2,this.o=_s,_s=this)},ai.prototype.d=function(){this.f|=8,1&this.f||sp(this)},ai.prototype.dispose=function(){this.d()};function V6(e){return(typeof e.nodes=="function"?e.nodes():e.nodes)||[]}function Fe(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const o of t)r.append("v",o);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function Zx(e,t){if(e&&t&&!Array.isArray(t)&&typeof e=="object"&&typeof t=="object"){const n=e,r=t;for(const o in r)n[o]=Zx(n[o],r[o]);return e}return t}const ap=0,$f=1,Jx=2,nu=3,Oa=4,ni=5,ru=6,ds=7;function ou(e){return e.id===ap}function Xx(e){return e.id===Jx}function Y6(e){return(function(t){return t.id===$f})(e)||Fe(305,String(e.id),String($f)),Object.assign(e,{id:Jx})}const Q6=new Set;class G6{constructor(t,n){D(this,"builder");D(this,"configs");D(this,"_dependency");D(this,"_peerNameSet");D(this,"extension");D(this,"state");D(this,"_signal");this.builder=t,this.extension=n,this.configs=new Set,this.state={id:ap}}mergeConfigs(){let t=this.extension.config||{};const n=this.extension.mergeConfig?this.extension.mergeConfig.bind(this.extension):O6;for(const r of this.configs)t=n(t,r);return t}init(t){const n=this.state;Xx(n)||Fe(306,String(n.id));const r={getDependency:this.getInitDependency.bind(this),getDirectDependentNames:this.getDirectDependentNames.bind(this),getPeer:this.getInitPeer.bind(this),getPeerNameSet:this.getPeerNameSet.bind(this)},o={...r,getDependency:this.getDependency.bind(this),getInitResult:this.getInitResult.bind(this),getPeer:this.getPeer.bind(this)},i=(function(a,l,c){return Object.assign(a,{config:l,id:nu,registerState:c})})(n,this.mergeConfigs(),r);let s;this.state=i,this.extension.init&&(s=this.extension.init(t,i.config,r)),this.state=(function(a,l,c){return Object.assign(a,{id:Oa,initResult:l,registerState:c})})(i,s,o)}build(t){const n=this.state;let r;n.id!==Oa&&Fe(307,String(n.id),String(ni)),this.extension.build&&(r=this.extension.build(t,n.config,n.registerState));const o={...n.registerState,getOutput:()=>r,getSignal:this.getSignal.bind(this)};this.state=(function(i,s,a){return Object.assign(i,{id:ni,output:s,registerState:a})})(n,r,o)}register(t,n){this._signal=n;const r=this.state;r.id!==ni&&Fe(308,String(r.id),String(ni));const o=this.extension.register&&this.extension.register(t,r.config,r.registerState);return this.state=(function(i){return Object.assign(i,{id:ru})})(r),()=>{const i=this.state;i.id!==ds&&Fe(309,String(r.id),String(ds)),this.state=(function(s){return Object.assign(s,{id:ni})})(i),o&&o()}}afterRegistration(t){const n=this.state;let r;return n.id!==ru&&Fe(310,String(n.id),String(ru)),this.extension.afterRegistration&&(r=this.extension.afterRegistration(t,n.config,n.registerState)),this.state=(function(o){return Object.assign(o,{id:ds})})(n),r}getSignal(){return this._signal===void 0&&Fe(311),this._signal}getInitResult(){this.extension.init===void 0&&Fe(312,this.extension.name);const t=this.state;return(function(n){return n.id>=Oa})(t)||Fe(313,String(t.id),String(Oa)),t.initResult}getInitPeer(t){const n=this.builder.extensionNameMap.get(t);return n?n.getExtensionInitDependency():void 0}getExtensionInitDependency(){const t=this.state;return(function(n){return n.id>=nu})(t)||Fe(314,String(t.id),String(nu)),{config:t.config}}getPeer(t){const n=this.builder.extensionNameMap.get(t);return n?n.getExtensionDependency():void 0}getInitDependency(t){const n=this.builder.getExtensionRep(t);return n===void 0&&Fe(315,this.extension.name,t.name),n.getExtensionInitDependency()}getDependency(t){const n=this.builder.getExtensionRep(t);return n===void 0&&Fe(315,this.extension.name,t.name),n.getExtensionDependency()}getState(){const t=this.state;return(function(n){return n.id>=ds})(t)||Fe(316,String(t.id),String(ds)),t}getDirectDependentNames(){return this.builder.incomingEdges.get(this.extension.name)||Q6}getPeerNameSet(){let t=this._peerNameSet;return t||(t=new Set((this.extension.peerDependencies||[]).map(([n])=>n)),this._peerNameSet=t),t}getExtensionDependency(){if(!this._dependency){const t=this.state;(function(n){return n.id>=ni})(t)||Fe(317,this.extension.name),this._dependency={config:t.config,init:t.initResult,output:t.output}}return this._dependency}}const Ag={tag:bo};function Z6(){const e=We();e.isEmpty()&&e.append(Tt())}const J6={config:{setOptions:Ag,updateOptions:Ag},init:({$initialEditorState:e=Z6})=>({$initialEditorState:e,initialized:!1}),afterRegistration(e,{updateOptions:t,setOptions:n},r){const o=r.getInitResult();if(!o.initialized){o.initialized=!0;const{$initialEditorState:i}=o;if(e6(i))e.setEditorState(i,n);else if(typeof i=="function")e.update(()=>{i(e)},t);else if(i&&(typeof i=="string"||typeof i=="object")){const s=e.parseEditorState(i);e.setEditorState(s,n)}}return()=>{}},name:"@lexical/extension/InitialState",nodes:[Zi,Br,Yi,Qi,Ji]},Cg=Symbol.for("@lexical/extension/LexicalBuilder");function _g(){}function X6(e){throw e}function Pa(e){return Array.isArray(e)?e:[e]}const iu="0.39.0+prod.esm";class bi{constructor(t){D(this,"roots");D(this,"extensionNameMap");D(this,"outgoingConfigEdges");D(this,"incomingEdges");D(this,"conflicts");D(this,"_sortedExtensionReps");D(this,"PACKAGE_VERSION");this.outgoingConfigEdges=new Map,this.incomingEdges=new Map,this.extensionNameMap=new Map,this.conflicts=new Map,this.PACKAGE_VERSION=iu,this.roots=t;for(const n of t)this.addExtension(n)}static fromExtensions(t){const n=[Pa(J6)];for(const r of t)n.push(Pa(r));return new bi(n)}static maybeFromEditor(t){const n=t[Cg];return n&&(n.PACKAGE_VERSION!==iu&&Fe(292,n.PACKAGE_VERSION,iu),n instanceof bi||Fe(293)),n}static fromEditor(t){const n=bi.maybeFromEditor(t);return n===void 0&&Fe(294),n}constructEditor(){const{$initialEditorState:t,onError:n,...r}=this.buildCreateEditorArgs(),o=Object.assign(mx({...r,...n?{onError:i=>{n(i,o)}}:{}}),{[Cg]:this});for(const i of this.sortedExtensionReps())i.build(o);return o}buildEditor(){let t=_g;function n(){try{t()}finally{t=_g}}const r=Object.assign(this.constructEditor(),{dispose:n,[Symbol.dispose]:n});return t=fn(this.registerEditor(r),()=>r.setRootElement(null)),r}hasExtensionByName(t){return this.extensionNameMap.has(t)}getExtensionRep(t){const n=this.extensionNameMap.get(t.name);if(n)return n.extension!==t&&Fe(295,t.name),n}addEdge(t,n,r){const o=this.outgoingConfigEdges.get(t);o?o.set(n,r):this.outgoingConfigEdges.set(t,new Map([[n,r]]));const i=this.incomingEdges.get(n);i?i.add(t):this.incomingEdges.set(n,new Set([t]))}addExtension(t){this._sortedExtensionReps!==void 0&&Fe(296);const n=Pa(t),[r]=n;typeof r.name!="string"&&Fe(297,typeof r.name);let o=this.extensionNameMap.get(r.name);if(o!==void 0&&o.extension!==r&&Fe(298,r.name),!o){o=new G6(this,r),this.extensionNameMap.set(r.name,o);const i=this.conflicts.get(r.name);typeof i=="string"&&Fe(299,r.name,i);for(const s of r.conflictsWith||[])this.extensionNameMap.has(s)&&Fe(299,r.name,s),this.conflicts.set(s,r.name);for(const s of r.dependencies||[]){const a=Pa(s);this.addEdge(r.name,a[0].name,a.slice(1)),this.addExtension(a)}for(const[s,a]of r.peerDependencies||[])this.addEdge(r.name,s,a?[a]:[])}}sortedExtensionReps(){if(this._sortedExtensionReps)return this._sortedExtensionReps;const t=[],n=(r,o)=>{let i=r.state;if(Xx(i))return;const s=r.extension.name;var a;ou(i)||Fe(300,s,o||"[unknown]"),ou(a=i)||Fe(304,String(a.id),String(ap)),i=Object.assign(a,{id:$f}),r.state=i;const l=this.outgoingConfigEdges.get(s);if(l)for(const c of l.keys()){const u=this.extensionNameMap.get(c);u&&n(u,s)}i=Y6(i),r.state=i,t.push(r)};for(const r of this.extensionNameMap.values())ou(r.state)&&n(r);for(const r of t)for(const[o,i]of this.outgoingConfigEdges.get(r.extension.name)||[])if(i.length>0){const s=this.extensionNameMap.get(o);if(s)for(const a of i)s.configs.add(a)}for(const[r,...o]of this.roots)if(o.length>0){const i=this.extensionNameMap.get(r.name);i===void 0&&Fe(301,r.name);for(const s of o)i.configs.add(s)}return this._sortedExtensionReps=t,this._sortedExtensionReps}registerEditor(t){const n=this.sortedExtensionReps(),r=new AbortController,o=[()=>r.abort()],i=r.signal;for(const s of n){const a=s.register(t,i);a&&o.push(a)}for(const s of n){const a=s.afterRegistration(t);a&&o.push(a)}return fn(...o)}buildCreateEditorArgs(){const t={},n=new Set,r=new Map,o=new Map,i={},s={},a=this.sortedExtensionReps();for(const u of a){const{extension:f}=u;if(f.onError!==void 0&&(t.onError=f.onError),f.disableEvents!==void 0&&(t.disableEvents=f.disableEvents),f.parentEditor!==void 0&&(t.parentEditor=f.parentEditor),f.editable!==void 0&&(t.editable=f.editable),f.namespace!==void 0&&(t.namespace=f.namespace),f.$initialEditorState!==void 0&&(t.$initialEditorState=f.$initialEditorState),f.nodes)for(const d of V6(f)){if(typeof d!="function"){const p=r.get(d.replace);p&&Fe(302,f.name,d.replace.name,p.extension.name),r.set(d.replace,u)}n.add(d)}if(f.html){if(f.html.export)for(const[d,p]of f.html.export.entries())o.set(d,p);f.html.import&&Object.assign(i,f.html.import)}f.theme&&Zx(s,f.theme)}Object.keys(s).length>0&&(t.theme=s),n.size&&(t.nodes=[...n]);const l=Object.keys(i).length>0,c=o.size>0;(l||c)&&(t.html={},l&&(t.html.import=i),c&&(t.html.export=o));for(const u of a)u.init(t);return t.onError||(t.onError=X6),t}}function eN(e,t){const n=bi.fromEditor(e).extensionNameMap.get(t);return n?n.getExtensionDependency():void 0}const tN={name:"@lexical/react/ReactProvider"};function nN(){return We().getTextContent()}function rN(e,t=!0){if(e)return!1;let n=nN();return t&&(n=n.trim()),n===""}function oN(e){if(!rN(e,!1))return!1;const t=We().getChildren(),n=t.length;if(n>1)return!1;for(let r=0;r<n;r++){const o=t[r];if(Te(o))return!1;if(R(o)){if(!Bd(o)||o.__indent!==0)return!1;const i=o.getChildren(),s=i.length;for(let a=0;a<s;a++){const l=i[r];if(!X(l))return!1}}}return!0}function e1(e){return()=>oN(e)}function iN(e){const t=window.location.origin,n=r=>{if(r.origin!==t)return;const o=e.getRootElement();if(document.activeElement!==o)return;const i=r.data;if(typeof i=="string"){let s;try{s=JSON.parse(i)}catch{return}if(s&&s.protocol==="nuanria_messaging"&&s.type==="request"){const a=s.payload;if(a&&a.functionId==="makeChanges"){const l=a.args;if(l){const[c,u,f,d,p]=l;e.update(()=>{const h=Z();if($(h)){const g=h.anchor;let m=g.getNode(),y=0,v=0;if(X(m)&&c>=0&&u>=0&&(y=c,v=c+u,h.setTextNodeRange(m,y,m,v)),y===v&&f===""||(h.insertRawText(f),m=g.getNode()),X(m)){y=d,v=d+p;const b=m.getTextContentSize();y=y>b?b:y,v=v>b?b:v,h.setTextNodeRange(m,y,m,v)}r.stopImmediatePropagation()}})}}}}};return window.addEventListener("message",n,!0),()=>{window.removeEventListener("message",n,!0)}}function t1(e,t){const n=bx(t)?t.body.childNodes:t.childNodes;let r=[];const o=[];for(const i of n)if(!o1.has(i.nodeName)){const s=i1(i,e,o,!1);s!==null&&(r=r.concat(s))}return(function(i){for(const s of i)s.getNextSibling()instanceof Ud&&s.insertAfter(Lo());for(const s of i){const a=s.getChildren();for(const l of a)s.insertBefore(l);s.remove()}})(o),r}function n1(e,t){if(typeof document>"u"||typeof window>"u"&&global.window===void 0)throw new Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");const n=document.createElement("div"),r=We().getChildren();for(let o=0;o<r.length;o++)r1(e,r[o],n,t);return n.innerHTML}function r1(e,t,n,r=null){let o=r===null||t.isSelected(r);const i=R(t)&&t.excludeFromCopy("html");let s=t;r!==null&&X(t)&&(s=$x(r,t,"clone"));const a=R(s)?s.getChildren():[],l=Kd(e,s.getType());let c;c=l&&l.exportDOM!==void 0?l.exportDOM(e,s):s.exportDOM(e);const{element:u,after:f}=c;if(!u)return!1;const d=document.createDocumentFragment();for(let p=0;p<a.length;p++){const h=a[p],g=r1(e,h,d,r);!o&&R(t)&&g&&t.extractWithChild(h,r,"html")&&(o=!0)}if(o&&!i){if((ht(u)||Df(u))&&u.append(d),n.append(u),f){const p=f.call(s,u);p&&(Df(u)?u.replaceChildren(p):u.replaceWith(p))}}else n.append(d);return o}const o1=new Set(["STYLE","SCRIPT"]);function i1(e,t,n,r,o=new Map,i){let s=[];if(o1.has(e.nodeName))return s;let a=null;const l=(function(h,g){const{nodeName:m}=h,y=g._htmlConversions.get(m.toLowerCase());let v=null;if(y!==void 0)for(const b of y){const w=b(h);w!==null&&(v===null||(v.priority||0)<=(w.priority||0))&&(v=w)}return v!==null?v.conversion:null})(e,t),c=l?l(e):null;let u=null;if(c!==null){u=c.after;const h=c.node;if(a=Array.isArray(h)?h[h.length-1]:h,a!==null){for(const[,g]of o)if(a=g(a,i),!a)break;a&&s.push(...Array.isArray(h)?h:[a])}c.forChild!=null&&o.set(e.nodeName,c.forChild)}const f=e.childNodes;let d=[];const p=(a==null||!jt(a))&&(a!=null&&Pf(a)||r);for(let h=0;h<f.length;h++)d.push(...i1(f[h],t,n,p,new Map(o),a));return u!=null&&(d=u(d)),bl(e)&&(d=sN(e,d,p?()=>{const h=new Ud;return n.push(h),h}:Tt)),a==null?d.length>0?s=s.concat(d):bl(e)&&(function(h){return h.nextSibling==null||h.previousSibling==null?!1:Ff(h.nextSibling)&&Ff(h.previousSibling)})(e)&&(s=s.concat(Lo())):R(a)&&a.append(...d),s}function sN(e,t,n){const r=e.style.textAlign,o=[];let i=[];for(let s=0;s<t.length;s++){const a=t[s];if(Pf(a))r&&!a.getFormat()&&a.setFormat(r),o.push(a);else if(i.push(a),s===t.length-1||s<t.length-1&&Pf(t[s+1])){const l=n();l.setFormat(r),l.append(...i),o.push(l),i=[]}}return o}function xl(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const o of t)r.append("v",o);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function aN(e,t=Z()){return t==null&&xl(166),$(t)&&t.isCollapsed()||t.getNodes().length===0?"":n1(e,t)}function lN(e,t=Z()){return t==null&&xl(166),$(t)&&t.isCollapsed()||t.getNodes().length===0?null:JSON.stringify(cN(e,t))}function Eg(e,t,n){const r=e.getData("application/x-lexical-editor");if(r)try{const a=JSON.parse(r);if(a.namespace===n._config.namespace&&Array.isArray(a.nodes))return Sg(n,uN(a.nodes),t)}catch(a){console.error(a)}const o=e.getData("text/html"),i=e.getData("text/plain");if(o&&i!==o)try{const a=new DOMParser().parseFromString((function(l){return window.trustedTypes&&window.trustedTypes.createPolicy?window.trustedTypes.createPolicy("lexical",{createHTML:c=>c}).createHTML(l):l})(o),"text/html");return Sg(n,t1(n,a),t)}catch(a){console.error(a)}const s=i||e.getData("text/uri-list");if(s!=null)if($(t)){const a=s.split(/(\r?\n|\t)/);a[a.length-1]===""&&a.pop();for(let l=0;l<a.length;l++){const c=Z();if($(c)){const u=a[l];u===`
605
605
  `||u===`\r
606
- `?c.insertParagraph():u===" "?c.insertNodes([na()]):c.insertText(u)}}}else t.insertRawText(s)}function Sg(e,t,n){e.dispatchCommand(v3,{nodes:t,selection:n})||(n.insertNodes(t),(function(r){if($(r)&&r.isCollapsed()){const o=r.anchor;let i=null;const s=nr(o,"previous");if(s)if(Or(s))i=s.origin;else{const a=Fr(s,un(We(),"next").getFlipped());for(const l of a){if(X(l.origin)){i=l.origin;break}if(R(l.origin)&&!l.origin.isInline())break}}if(i&&X(i)){const a=i.getFormat(),l=i.getStyle();r.format===a&&r.style===l||(r.format=a,r.style=l,r.dirty=!0)}}})(n))}function s1(e,t,n,r=[]){let o=t===null||n.isSelected(t);const i=R(n)&&n.excludeFromCopy("html");let s=n;t!==null&&X(s)&&(s=$x(t,s,"clone"));const a=R(s)?s.getChildren():[],l=(function(c){const u=c.exportJSON(),f=c.constructor;if(u.type!==f.getType()&&xl(58,f.name),R(c)){const d=u.children;Array.isArray(d)||xl(59,f.name)}return u})(s);X(s)&&s.getTextContentSize()===0&&(o=!1);for(let c=0;c<a.length;c++){const u=a[c],f=s1(e,t,u,l.children);!o&&R(n)&&f&&n.extractWithChild(u,t,"clone")&&(o=!0)}if(o&&!i)r.push(l);else if(Array.isArray(l.children))for(let c=0;c<l.children.length;c++){const u=l.children[c];r.push(u)}return o}function cN(e,t){const n=[],r=We().getChildren();for(let o=0;o<r.length;o++)s1(e,t,r[o],n);return{namespace:e._config.namespace,nodes:n}}function uN(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n],o=X3(r);X(o)&&F6(o),t.push(o)}return t}let ri=null;async function kg(e,t,n){if(ri!==null)return!1;if(t!==null)return new Promise((c,u)=>{e.update(()=>{c(Tg(e,t,n))})});const r=e.getRootElement(),o=e._window||window,i=o.document,s=en(o);if(r===null||s===null)return!1;const a=i.createElement("span");a.style.cssText="position: fixed; top: -1000px;",a.append(i.createTextNode("#")),r.append(a);const l=new Range;return l.setStart(a,0),l.setEnd(a,1),s.removeAllRanges(),s.addRange(l),new Promise((c,u)=>{const f=e.registerCommand(Zl,d=>(kr(d,ClipboardEvent)&&(f(),ri!==null&&(o.clearTimeout(ri),ri=null),c(Tg(e,d,n))),!0),px);ri=o.setTimeout(()=>{f(),ri=null,c(!1)},50),i.execCommand("copy"),a.remove()})}function Tg(e,t,n){if(n===void 0){const o=en(e._window),i=Z();if(!i||i.isCollapsed()||!o)return!1;const s=o.anchorNode,a=o.focusNode;if(s!==null&&a!==null&&!ia(e,s,a))return!1;n=fN(i)}t.preventDefault();const r=t.clipboardData;return r!==null&&(dN(r,n),!0)}const a1=[["text/html",aN],["application/x-lexical-editor",lN]];function fN(e=Z()){const t={"text/plain":e?e.getTextContent():""};if(e){const n=Jd();for(const[r,o]of a1){const i=o(n,e);i!==null&&(t[r]=i)}}return t}function dN(e,t){for(const[n]of a1)t[n]===void 0&&e.setData(n,"");for(const n in t){const r=t[n];r!==void 0&&e.setData(n,r)}}function Ng(e,t){if(document.caretRangeFromPoint!==void 0){const n=document.caretRangeFromPoint(e,t);return n===null?null:{node:n.startContainer,offset:n.startOffset}}if(document.caretPositionFromPoint!=="undefined"){const n=document.caretPositionFromPoint(e,t);return n===null?null:{node:n.offsetNode,offset:n.offset}}return null}const Ko=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,pN=Ko&&"documentMode"in document?document.documentMode:null,hN=Ko&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),mN=!(!Ko||!("InputEvent"in window)||pN)&&"getTargetRanges"in new window.InputEvent("input"),gN=Ko&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),Og=Ko&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,yN=Ko&&/^(?=.*Chrome).*/i.test(navigator.userAgent),vN=Ko&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&hN&&!yN,Pg=pe("DRAG_DROP_PASTE_FILE");function Ma(e){let t=null;if(kr(e,DragEvent)?t=e.dataTransfer:kr(e,ClipboardEvent)&&(t=e.clipboardData),t===null)return[!1,[],!1];const n=t.types,r=n.includes("Files"),o=n.includes("text/html")||n.includes("text/plain");return[r,Array.from(t.files),o]}function Mg(e){const t=Z();if(!$(t))return!1;const n=new Set,r=t.getNodes();for(let o=0;o<r.length;o++){const i=r[o],s=i.getKey();if(n.has(s))continue;const a=at(i,c=>R(c)&&!c.isInline());if(a===null)continue;const l=a.getKey();a.canIndent()&&!n.has(l)&&(n.add(l),e(a))}return n.size>0}function Ig(e){const t=Fi(e);return Te(t)}function su(e){for(const t of["lowercase","uppercase","capitalize"])e.hasFormat(t)&&e.toggleFormat(t)}function bN(e){return fn(e.registerCommand(Md,t=>{const n=Z();return!!ot(n)&&(n.clear(),!0)},we),e.registerCommand(vo,t=>{const n=Z();return $(n)?(n.deleteCharacter(t),!0):!!ot(n)&&(n.deleteNodes(),!0)},we),e.registerCommand(Rs,t=>{const n=Z();return!!$(n)&&(n.deleteWord(t),!0)},we),e.registerCommand(Ds,t=>{const n=Z();return!!$(n)&&(n.deleteLine(t),!0)},we),e.registerCommand(gi,t=>{const n=Z();if(typeof t=="string")n!==null&&n.insertText(t);else{if(n===null)return!1;const r=t.dataTransfer;if(r!=null)Eg(r,n,e);else if($(n)){const o=t.data;return o&&n.insertText(o),!0}}return!0},we),e.registerCommand(xf,()=>{const t=Z();return!!$(t)&&(t.removeText(),!0)},we),e.registerCommand(_n,t=>{const n=Z();return!!$(n)&&(n.formatText(t),!0)},we),e.registerCommand(C3,t=>{const n=Z();if(!$(n)&&!ot(n))return!1;const r=n.getNodes();for(const o of r){const i=at(o,s=>R(s)&&!s.isInline());i!==null&&i.setFormat(t)}return!0},we),e.registerCommand(mi,t=>{const n=Z();return!!$(n)&&(n.insertLineBreak(t),!0)},we),e.registerCommand(Ls,()=>{const t=Z();return!!$(t)&&(t.insertParagraph(),!0)},we),e.registerCommand(w3,()=>(sx([na()]),!0),we),e.registerCommand(A3,()=>Mg(t=>{const n=t.getIndent();t.setIndent(n+1)}),we),e.registerCommand(Mm,()=>Mg(t=>{const n=t.getIndent();n>0&&t.setIndent(Math.max(0,n-1))}),we),e.registerCommand(Ib,t=>{const n=Z();if(ot(n)){const r=n.getNodes();if(r.length>0)return t.preventDefault(),r[0].selectPrevious(),!0}else if($(n)){const r=If(n.focus,!0);if(!t.shiftKey&&Te(r)&&!r.isIsolated()&&!r.isInline())return r.selectPrevious(),t.preventDefault(),!0}return!1},we),e.registerCommand(Lb,t=>{const n=Z();if(ot(n)){const r=n.getNodes();if(r.length>0)return t.preventDefault(),r[0].selectNext(0,0),!0}else if($(n)){if((function(o){const i=o.focus;return i.key==="root"&&i.offset===We().getChildrenSize()})(n))return t.preventDefault(),!0;const r=If(n.focus,!1);if(!t.shiftKey&&Te(r)&&!r.isIsolated()&&!r.isInline())return r.selectNext(),t.preventDefault(),!0}return!1},we),e.registerCommand(Mb,t=>{const n=Z();if(ot(n)){const r=n.getNodes();if(r.length>0)return t.preventDefault(),mg(r[0])?r[0].selectNext(0,0):r[0].selectPrevious(),!0}if(!$(n))return!1;if(yg(n,!0)){const r=t.shiftKey;return t.preventDefault(),vg(n,r,!0),!0}return!1},we),e.registerCommand(Pb,t=>{const n=Z();if(ot(n)){const o=n.getNodes();if(o.length>0)return t.preventDefault(),mg(o[0])?o[0].selectPrevious():o[0].selectNext(0,0),!0}if(!$(n))return!1;const r=t.shiftKey;return!!yg(n,!1)&&(t.preventDefault(),vg(n,r,!1),!0)},we),e.registerCommand(Db,t=>{if(Ig(t.target))return!1;const n=Z();if($(n)){if((function(r){if(!r.isCollapsed())return!1;const{anchor:o}=r;if(o.offset!==0)return!1;const i=o.getNode();if(Ye(i))return!1;const s=B6(i);return s.getIndent()>0&&(s.is(i)||i.is(s.getFirstDescendant()))})(n))return t.preventDefault(),e.dispatchCommand(Mm,void 0);if(Og&&navigator.language==="ko-KR")return!1}else if(!ot(n))return!1;return t.preventDefault(),e.dispatchCommand(vo,!0)},we),e.registerCommand(Fb,t=>{if(Ig(t.target))return!1;const n=Z();return!(!$(n)&&!ot(n))&&(t.preventDefault(),e.dispatchCommand(vo,!1))},we),e.registerCommand(Fs,t=>{const n=Z();if(!$(n))return!1;if(su(n),t!==null){if((Og||gN||vN)&&mN)return!1;if(t.preventDefault(),t.shiftKey)return e.dispatchCommand(mi,!1)}return e.dispatchCommand(Ls,void 0)},we),e.registerCommand(Rd,()=>{const t=Z();return!!$(t)&&(e.blur(),!0)},we),e.registerCommand(zb,t=>{const[,n]=Ma(t);if(n.length>0){const o=Ng(t.clientX,t.clientY);if(o!==null){const{offset:i,node:s}=o,a=Fi(s);if(a!==null){const l=rx();if(X(a))l.anchor.set(a.getKey(),i,"text"),l.focus.set(a.getKey(),i,"text");else{const u=a.getParentOrThrow().getKey(),f=a.getIndexWithinParent()+1;l.anchor.set(u,f,"element"),l.focus.set(u,f,"element")}const c=Ri(l);Pt(c)}e.dispatchCommand(Pg,n)}return t.preventDefault(),!0}const r=Z();return!!$(r)},we),e.registerCommand($b,t=>{const[n]=Ma(t),r=Z();return!(n&&!$(r))},we),e.registerCommand(Ub,t=>{const[n]=Ma(t),r=Z();if(n&&!$(r))return!1;const o=Ng(t.clientX,t.clientY);if(o!==null){const i=Fi(o.node);Te(i)&&t.preventDefault()}return!0},we),e.registerCommand(wf,()=>(l6(),!0),we),e.registerCommand(Zl,t=>(kg(e,kr(t,ClipboardEvent)?t:null),!0),we),e.registerCommand(Dd,t=>((async function(n,r){await kg(r,kr(n,ClipboardEvent)?n:null),r.update(()=>{const o=Z();$(o)?o.removeText():ot(o)&&o.getNodes().forEach(i=>i.remove())})})(t,e),!0),we),e.registerCommand(Gl,t=>{const[,n,r]=Ma(t);return n.length>0&&!r?(e.dispatchCommand(Pg,n),!0):Xi(t.target)&&Hd(t.target)?!1:Z()!==null&&((function(o,i){o.preventDefault(),i.update(()=>{const s=Z(),a=kr(o,InputEvent)||kr(o,KeyboardEvent)?null:o.clipboardData;a!=null&&s!==null&&Eg(a,s,i)},{tag:F3})})(t,e),!0)},we),e.registerCommand(Rb,t=>{const n=Z();return $(n)&&su(n),!1},we),e.registerCommand(jb,t=>{const n=Z();return $(n)&&su(n),!1},we))}function xN(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const o of t)r.append("v",o);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const lp=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?T.useLayoutEffect:T.useEffect;function wN({editor:e,ErrorBoundary:t}){return(function(n,r){const[o,i]=T.useState(()=>n.getDecorators());return lp(()=>n.registerDecoratorListener(s=>{Nn.flushSync(()=>{i(s)})}),[n]),T.useEffect(()=>{i(n.getDecorators())},[n]),T.useMemo(()=>{const s=[],a=Object.keys(o);for(let l=0;l<a.length;l++){const c=a[l],u=x.jsx(r,{onError:d=>n._onError(d),children:x.jsx(T.Suspense,{fallback:null,children:o[c]})}),f=n.getElementByKey(c);f!==null&&s.push(Nn.createPortal(u,f,c))}return s},[r,o,n])})(e,t)}function AN({editor:e,ErrorBoundary:t}){return(function(n){const r=bi.maybeFromEditor(n);if(r&&r.hasExtensionByName(tN.name)){for(const o of["@lexical/plain-text","@lexical/rich-text"])r.hasExtensionByName(o)&&xN(320,o);return!0}return!1})(e)?null:x.jsx(wN,{editor:e,ErrorBoundary:t})}function Lg(e){return e.getEditorState().read(e1(e.isComposing()))}function CN({contentEditable:e,placeholder:t=null,ErrorBoundary:n}){const[r]=pt();return(function(o){lp(()=>fn(bN(o),iN(o)),[o])})(r),x.jsxs(x.Fragment,{children:[e,x.jsx(_N,{content:t}),x.jsx(AN,{editor:r,ErrorBoundary:n})]})}function _N({content:e}){const[t]=pt(),n=(function(o){const[i,s]=T.useState(()=>Lg(o));return lp(()=>{function a(){const l=Lg(o);s(l)}return a(),fn(o.registerUpdateListener(()=>{a()}),o.registerEditableListener(()=>{a()}))},[o]),i})(t),r=R6();return n?typeof e=="function"?e(r):e:null}function EN(e,t,n,r,o){if(e===null||n.size===0&&r.size===0&&!o)return 0;const i=t._selection,s=e._selection;if(o)return 1;if(!($(i)&&$(s)&&s.isCollapsed()&&i.isCollapsed()))return 0;const a=(function(y,v,b){const w=y._nodeMap,A=[];for(const _ of v){const E=w.get(_);E!==void 0&&A.push(E)}for(const[_,E]of b){if(!E)continue;const S=w.get(_);S===void 0||Ye(S)||A.push(S)}return A})(t,n,r);if(a.length===0)return 0;if(a.length>1){const y=t._nodeMap,v=y.get(i.anchor.key),b=y.get(s.anchor.key);return v&&b&&!e._nodeMap.has(v.__key)&&X(v)&&v.__text.length===1&&i.anchor.offset===1?2:0}const l=a[0],c=e._nodeMap.get(l.__key);if(!X(c)||!X(l)||c.__mode!==l.__mode)return 0;const u=c.__text,f=l.__text;if(u===f)return 0;const d=i.anchor,p=s.anchor;if(d.key!==p.key||d.type!=="text")return 0;const h=d.offset,g=p.offset,m=f.length-u.length;return m===1&&g===h-1?2:m===-1&&g===h+1?3:m===-1&&g===h?4:0}function SN(e,t){let n=Date.now(),r=0;return(o,i,s,a,l,c)=>{const u=Date.now();if(c.has(Nf))return r=0,n=u,2;const f=EN(o,i,a,l,e.isComposing()),d=(()=>{const p=s===null||s.editor===e,h=c.has(D3);if(!h&&p&&c.has(bo))return 0;if(o===null)return 1;const g=i._selection;if(!(a.size>0||l.size>0))return g!==null?0:2;const m=typeof t=="number"?t:t.peek();return h===!1&&f!==0&&f===r&&u<n+m&&p||a.size===1&&(function(y,v,b){const w=v._nodeMap.get(y),A=b._nodeMap.get(y),_=v._selection,E=b._selection;return!($(_)&&$(E)&&_.anchor.type==="element"&&_.focus.type==="element"&&E.anchor.type==="text"&&E.focus.type==="text"||!X(w)||!X(A)||w.__parent!==A.__parent)&&JSON.stringify(v.read(()=>w.exportJSON()))===JSON.stringify(b.read(()=>A.exportJSON()))})(Array.from(a)[0],o,i)?0:1})();return n=u,r=f,d}}function Rg(e){e.undoStack=[],e.redoStack=[],e.current=null}function l1(e,t,n){const r=SN(e,n);return fn(e.registerCommand(Id,()=>((function(i,s){const a=s.redoStack,l=s.undoStack;if(l.length!==0){const c=s.current,u=l.pop();c!==null&&(a.push(c),i.dispatchCommand(Ca,!0)),l.length===0&&i.dispatchCommand(_a,!1),s.current=u||null,u&&u.editor.setEditorState(u.editorState,{tag:Nf})}})(e,t),!0),we),e.registerCommand(Ld,()=>((function(i,s){const a=s.redoStack,l=s.undoStack;if(a.length!==0){const c=s.current;c!==null&&(l.push(c),i.dispatchCommand(_a,!0));const u=a.pop();a.length===0&&i.dispatchCommand(Ca,!1),s.current=u||null,u&&u.editor.setEditorState(u.editorState,{tag:Nf})}})(e,t),!0),we),e.registerCommand(E3,()=>(Rg(t),!1),we),e.registerCommand(S3,()=>(Rg(t),e.dispatchCommand(Ca,!1),e.dispatchCommand(_a,!1),!0),we),e.registerUpdateListener(({editorState:i,prevEditorState:s,dirtyLeaves:a,dirtyElements:l,tags:c})=>{const u=t.current,f=t.redoStack,d=t.undoStack,p=u===null?null:u.editorState;if(u!==null&&i===p)return;const h=r(s,i,u,a,l,c);if(h===1)f.length!==0&&(t.redoStack=[],e.dispatchCommand(Ca,!1)),u!==null&&(d.push({...u}),e.dispatchCommand(_a,!0));else if(h===2)return;t.current={editor:e,editorState:i}}))}function c1(){return{current:null,redoStack:[],undoStack:[]}}const au={build:(e,{delay:t,createInitialHistoryState:n,disabled:r})=>Gx({delay:t,disabled:r,historyState:n(e)}),config:{createInitialHistoryState:c1,delay:300,disabled:typeof window>"u"},name:"@lexical/history/History",register:(e,t,n)=>{const r=n.getOutput();return $s(()=>r.disabled.value?void 0:l1(e,r.historyState.value,r.delay))}};N6(au,{createInitialHistoryState:()=>{throw new Error("SharedHistory did not inherit parent history")},disabled:!0});function kN({delay:e,externalHistoryState:t}){const[n]=pt();return(function(r,o,i=1e3){const s=T.useMemo(()=>o||c1(),[o]);T.useEffect(()=>l1(r,s,i),[i,r,s])})(n,t,e),null}const u1=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?T.useLayoutEffect:T.useEffect;function TN({editor:e,ariaActiveDescendant:t,ariaAutoComplete:n,ariaControls:r,ariaDescribedBy:o,ariaErrorMessage:i,ariaExpanded:s,ariaInvalid:a,ariaLabel:l,ariaLabelledBy:c,ariaMultiline:u,ariaOwns:f,ariaRequired:d,autoCapitalize:p,className:h,id:g,role:m="textbox",spellCheck:y=!0,style:v,tabIndex:b,"data-testid":w,...A},_){const[E,S]=T.useState(e.isEditable()),N=T.useCallback(I=>{I&&I.ownerDocument&&I.ownerDocument.defaultView?e.setRootElement(I):e.setRootElement(null)},[e]),P=T.useMemo(()=>(function(...I){return W=>{for(const j of I)typeof j=="function"?j(W):j!=null&&(j.current=W)}})(_,N),[N,_]);return u1(()=>(S(e.isEditable()),e.registerEditableListener(I=>{S(I)})),[e]),x.jsx("div",{"aria-activedescendant":E?t:void 0,"aria-autocomplete":E?n:"none","aria-controls":E?r:void 0,"aria-describedby":o,...i!=null?{"aria-errormessage":i}:{},"aria-expanded":E&&m==="combobox"?!!s:void 0,...a!=null?{"aria-invalid":a}:{},"aria-label":l,"aria-labelledby":c,"aria-multiline":u,"aria-owns":E?f:void 0,"aria-readonly":!E||void 0,"aria-required":d,autoCapitalize:p,className:h,contentEditable:E,"data-testid":w,id:g,ref:P,role:m,spellCheck:y,style:v,tabIndex:b,...A})}const NN=T.forwardRef(TN);function Dg(e){return e.getEditorState().read(e1(e.isComposing()))}const ON=T.forwardRef(PN);function PN(e,t){const{placeholder:n,...r}=e,[o]=pt();return x.jsxs(x.Fragment,{children:[x.jsx(NN,{editor:o,...r,ref:t}),n!=null&&x.jsx(MN,{editor:o,content:n})]})}function MN({content:e,editor:t}){const n=(function(s){const[a,l]=T.useState(()=>Dg(s));return u1(()=>{function c(){const u=Dg(s);l(u)}return c(),fn(s.registerUpdateListener(()=>{c()}),s.registerEditableListener(()=>{c()}))},[s]),a})(t),[r,o]=T.useState(t.isEditable());if(T.useLayoutEffect(()=>(o(t.isEditable()),t.registerEditableListener(s=>{o(s)})),[t]),!n)return null;let i=null;return typeof e=="function"?i=e(r):e!==null&&(i=e),i===null?null:x.jsx("div",{"aria-hidden":!0,children:i})}const IN=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?T.useLayoutEffect:T.useEffect;function LN({ignoreHistoryMergeTagChange:e=!0,ignoreSelectionChange:t=!1,onChange:n}){const[r]=pt();return IN(()=>{if(n)return r.registerUpdateListener(({editorState:o,dirtyElements:i,dirtyLeaves:s,prevEditorState:a,tags:l})=>{t&&i.size===0&&s.size===0||e&&l.has(bo)||a.isEmpty()||n(o,r,l)})},[r,e,t,n]),null}const RN=T.createContext(null),lu={didCatch:!1,error:null};class DN extends T.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=lu}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(...t){var r,o;const{error:n}=this.state;n!==null&&((o=(r=this.props).onReset)==null||o.call(r,{args:t,reason:"imperative-api"}),this.setState(lu))}componentDidCatch(t,n){var r,o;(o=(r=this.props).onError)==null||o.call(r,t,n)}componentDidUpdate(t,n){var i,s;const{didCatch:r}=this.state,{resetKeys:o}=this.props;r&&n.error!==null&&FN(t.resetKeys,o)&&((s=(i=this.props).onReset)==null||s.call(i,{next:o,prev:t.resetKeys,reason:"keys"}),this.setState(lu))}render(){const{children:t,fallbackRender:n,FallbackComponent:r,fallback:o}=this.props,{didCatch:i,error:s}=this.state;let a=t;if(i){const l={error:s,resetErrorBoundary:this.resetErrorBoundary};if(typeof n=="function")a=n(l);else if(r)a=T.createElement(r,l);else if(o!==void 0)a=o;else throw s}return T.createElement(RN.Provider,{value:{didCatch:i,error:s,resetErrorBoundary:this.resetErrorBoundary}},a)}}function FN(e=[],t=[]){return e.length!==t.length||e.some((n,r)=>!Object.is(n,t[r]))}function jN({children:e,onError:t}){return x.jsx(DN,{fallback:x.jsx("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"},children:"An error was thrown."}),onError:t,children:e})}const zN={paragraph:"m-0",list:{ol:"list-decimal pl-4",ul:"list-disc pl-4"},text:{bold:"font-semibold",italic:"italic",underline:"underline",strikethrough:"line-through",code:"font-mono"},link:"text-blue-600 hover:text-blue-600 underline cursor-pointer"};function Tr(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const o of t)r.append("v",o);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function Uf(e){let t=1,n=e.getParent();for(;n!=null;){if(ke(n)){const r=n.getParent();if(be(r)){t++,n=r.getParent();continue}Tr(40)}return t}return t}function Bf(e){let t=e.getParent();be(t)||Tr(40);let n=t;for(;n!==null;)n=n.getParent(),be(n)&&(t=n);return t}function f1(e){let t=[];const n=e.getChildren().filter(ke);for(let r=0;r<n.length;r++){const o=n[r],i=o.getFirstChild();be(i)?t=t.concat(f1(i)):t.push(o)}return t}function wn(e){return ke(e)&&be(e.getFirstChild())}function Fg(e){return Zt().append(e)}function d1(e,t){return ke(e)&&(t.length===0||t.length===1&&e.is(t[0])&&e.getChildrenSize()===0)}function jg(e){const t=Z();if(t!==null){let n=t.getNodes();if($(t)){const o=t.getStartEndPoints();o===null&&Tr(143);const[i]=o,s=i.getNode(),a=s.getParent();if(jt(s)){const l=s.getFirstChild();if(l)n=l.selectStart().getNodes();else{const c=Tt();s.append(c),n=c.select().getNodes()}}else if(d1(s,n)){const l=Bt(e);if(jt(a)){s.replace(l);const c=Zt();R(s)&&(c.setFormat(s.getFormatType()),c.setIndent(s.getIndent())),l.append(c)}else if(ke(s)){const c=s.getParentOrThrow();Uo(l,c.getChildren()),c.replace(l)}return}}const r=new Set;for(let o=0;o<n.length;o++){const i=n[o];if(R(i)&&i.isEmpty()&&!ke(i)&&!r.has(i.getKey())){zg(i,e);continue}let s=xx(i)?i.getParent():ke(i)&&i.isEmpty()?i:null;for(;s!=null;){const a=s.getKey();if(be(s)){if(!r.has(a)){const l=Bt(e);Uo(l,s.getChildren()),s.replace(l),r.add(a)}break}{const l=s.getParent();if(jt(l)&&!r.has(a)){r.add(a),zg(s,e);break}s=l}}}}}function Uo(e,t){e.splice(e.getChildrenSize(),0,t)}function zg(e,t){if(be(e))return e;const n=e.getPreviousSibling(),r=e.getNextSibling(),o=Zt();let i;if(Uo(o,e.getChildren()),be(n)&&t===n.getListType())n.append(o),be(r)&&t===r.getListType()&&(Uo(n,r.getChildren()),r.remove()),i=n;else if(be(r)&&t===r.getListType())r.getFirstChildOrThrow().insertBefore(o),i=r;else{const s=Bt(t);s.append(o),e.replace(s),i=s}return o.setFormat(e.getFormatType()),o.setIndent(e.getIndent()),e.remove(),i}function cp(e,t){const n=e.getLastChild(),r=t.getFirstChild();n&&r&&wn(n)&&wn(r)&&(cp(n.getFirstChild(),r.getFirstChild()),r.remove());const o=t.getChildren();o.length>0&&e.append(...o),t.remove()}function $N(){const e=Z();if($(e)){const t=new Set,n=e.getNodes(),r=e.anchor.getNode();if(d1(r,n))t.add(Bf(r));else for(let o=0;o<n.length;o++){const i=n[o];if(xx(i)){const s=U6(i,ts);s!=null&&t.add(Bf(s))}}for(const o of t){let i=o;const s=f1(o);for(const a of s){const l=Tt().setTextStyle(e.style).setTextFormat(e.format);Uo(l,a.getChildren()),i.insertAfter(l),i=l,a.__key===e.anchor.key&&$o(e.anchor,Yt(un(l,"next"))),a.__key===e.focus.key&&$o(e.focus,Yt(un(l,"next"))),a.remove()}o.remove()}}}function p1(e){const t=e.getListType()!=="check";let n=e.getStart();for(const r of e.getChildren())ke(r)&&(r.getValue()!==n&&r.setValue(n),t&&r.getLatest().__checked!=null&&r.setChecked(void 0),be(r.getFirstChild())||n++)}function UN(e){const t=new Set;if(wn(e)||t.has(e.getKey()))return;const n=e.getParent(),r=e.getNextSibling(),o=e.getPreviousSibling();if(wn(r)&&wn(o)){const i=o.getFirstChild();if(be(i)){i.append(e);const s=r.getFirstChild();be(s)&&(Uo(i,s.getChildren()),r.remove(),t.add(r.getKey()))}}else if(wn(r)){const i=r.getFirstChild();if(be(i)){const s=i.getFirstChild();s!==null&&s.insertBefore(e)}}else if(wn(o)){const i=o.getFirstChild();be(i)&&i.append(e)}else if(be(n)){const i=Zt().setTextFormat(e.getTextFormat()).setTextStyle(e.getTextStyle()),s=Bt(n.getListType()).setTextFormat(n.getTextFormat()).setTextStyle(n.getTextStyle());i.append(s),s.append(e),o?o.insertAfter(i):r?r.insertBefore(i):n.append(i)}}function BN(e){if(wn(e))return;const t=e.getParent(),n=t?t.getParent():void 0;if(be(n?n.getParent():void 0)&&ke(n)&&be(t)){const r=t?t.getFirstChild():void 0,o=t?t.getLastChild():void 0;if(e.is(r))n.insertBefore(e),t.isEmpty()&&n.remove();else if(e.is(o))n.insertAfter(e),t.isEmpty()&&n.remove();else{const i=t.getListType(),s=Zt(),a=Bt(i);s.append(a),e.getPreviousSiblings().forEach(u=>a.append(u));const l=Zt(),c=Bt(i);l.append(c),Uo(c,e.getNextSiblings()),n.insertBefore(s),n.insertAfter(l),n.replace(e)}}}function WN(){const e=Z();if(!$(e)||!e.isCollapsed())return!1;const t=e.anchor.getNode();if(!ke(t)||t.getChildrenSize()!==0)return!1;const n=Bf(t),r=t.getParent();be(r)||Tr(40);const o=r.getParent();let i;if(jt(o))i=Tt(),n.insertAfter(i);else{if(!ke(o))return!1;i=Zt(),o.insertAfter(i)}i.setTextStyle(e.style).setTextFormat(e.format).select();const s=t.getNextSiblings();if(s.length>0){const a=Bt(r.getListType());if(ke(i)){const l=Zt();l.append(a),i.insertAfter(l)}else i.insertAfter(a);a.append(...s)}return(function(a){let l=a;for(;l.getNextSibling()==null&&l.getPreviousSibling()==null;){const c=l.getParent();if(c==null||!ke(c)&&!be(c))break;l=c}l.remove()})(t),!0}function wl(...e){const t=[];for(const n of e)if(n&&typeof n=="string")for(const[r]of n.matchAll(/\S+/g))t.push(r);return t}class ts extends Mn{constructor(n=1,r=void 0,o){super(o);D(this,"__value");D(this,"__checked");this.__value=n===void 0?1:n,this.__checked=r}$config(){return this.config("listitem",{$transform:n=>{if(n.__checked==null)return;const r=n.getParent();be(r)&&r.getListType()!=="check"&&n.getChecked()!=null&&n.setChecked(void 0)},extends:Mn,importDOM:{li:()=>({conversion:KN,priority:0})}})}afterCloneFrom(n){super.afterCloneFrom(n),this.__value=n.__value,this.__checked=n.__checked}createDOM(n){const r=document.createElement("li");return this.updateListItemDOM(null,r,n),r}updateListItemDOM(n,r,o){(function(a,l,c){const u=l.getParent();!be(u)||u.getListType()!=="check"||be(l.getFirstChild())?(a.removeAttribute("role"),a.removeAttribute("tabIndex"),a.removeAttribute("aria-checked")):(a.setAttribute("role","checkbox"),a.setAttribute("tabIndex","-1"),c&&l.__checked===c.__checked||a.setAttribute("aria-checked",l.getChecked()?"true":"false"))})(r,this,n),r.value=this.__value,(function(a,l,c){const u=[],f=[],d=l.list,p=d?d.listitem:void 0;let h;if(d&&d.nested&&(h=d.nested.listitem),p!==void 0&&u.push(...wl(p)),d){const g=c.getParent(),m=be(g)&&g.getListType()==="check",y=c.getChecked();m&&!y||f.push(d.listitemUnchecked),m&&y||f.push(d.listitemChecked),m&&u.push(y?d.listitemChecked:d.listitemUnchecked)}if(h!==void 0){const g=wl(h);c.getChildren().some(m=>be(m))?u.push(...g):f.push(...g)}f.length>0&&qx(a,...f),u.length>0&&ip(a,...u)})(r,o.theme,this);const i=n?n.__style:"",s=this.__style;i!==s&&(s===""?r.removeAttribute("style"):r.style.cssText=s),(function(a,l,c){const u=hg(l.__textStyle);for(const f in u)a.style.setProperty(`--listitem-marker-${f}`,u[f]);if(c)for(const f in hg(c.__textStyle))f in u||a.style.removeProperty(`--listitem-marker-${f}`)})(r,this,n)}updateDOM(n,r,o){const i=r;return this.updateListItemDOM(n,i,o),!1}updateFromJSON(n){return super.updateFromJSON(n).setValue(n.value).setChecked(n.checked)}exportDOM(n){const r=this.createDOM(n._config),o=this.getFormatType();o&&(r.style.textAlign=o);const i=this.getDirection();return i&&(r.dir=i),{element:r}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),value:this.getValue()}}append(...n){for(let r=0;r<n.length;r++){const o=n[r];if(R(o)&&this.canMergeWith(o)){const i=o.getChildren();this.append(...i),o.remove()}else super.append(o)}return this}replace(n,r){if(ke(n))return super.replace(n);this.setIndent(0);const o=this.getParentOrThrow();if(!be(o))return n;if(o.__first===this.getKey())o.insertBefore(n);else if(o.__last===this.getKey())o.insertAfter(n);else{const i=Bt(o.getListType());let s=this.getNextSibling();for(;s;){const a=s;s=s.getNextSibling(),i.append(a)}o.insertAfter(n),n.insertAfter(i)}return r&&(R(n)||Tr(139),this.getChildren().forEach(i=>{n.append(i)})),this.remove(),o.getChildrenSize()===0&&o.remove(),n}insertAfter(n,r=!0){const o=this.getParentOrThrow();if(be(o)||Tr(39),ke(n))return super.insertAfter(n,r);const i=this.getNextSiblings();if(o.insertAfter(n,r),i.length!==0){const s=Bt(o.getListType());i.forEach(a=>s.append(a)),n.insertAfter(s,r)}return n}remove(n){const r=this.getPreviousSibling(),o=this.getNextSibling();super.remove(n),r&&o&&wn(r)&&wn(o)&&(cp(r.getFirstChild(),o.getFirstChild()),o.remove())}insertNewAfter(n,r=!0){const o=Zt().updateFromJSON(this.exportJSON()).setChecked(!this.getChecked()&&void 0);return this.insertAfter(o,r),o}collapseAtStart(n){const r=Tt();this.getChildren().forEach(a=>r.append(a));const o=this.getParentOrThrow(),i=o.getParentOrThrow(),s=ke(i);if(o.getChildrenSize()===1)if(s)o.remove(),i.select();else{o.insertBefore(r),o.remove();const a=n.anchor,l=n.focus,c=r.getKey();a.type==="element"&&a.getNode().is(this)&&a.set(c,a.offset,"element"),l.type==="element"&&l.getNode().is(this)&&l.set(c,l.offset,"element")}else o.insertBefore(r),this.remove();return!0}getValue(){return this.getLatest().__value}setValue(n){const r=this.getWritable();return r.__value=n,r}getChecked(){const n=this.getLatest();let r;const o=this.getParent();return be(o)&&(r=o.getListType()),r==="check"?!!n.__checked:void 0}setChecked(n){const r=this.getWritable();return r.__checked=n,r}toggleChecked(){const n=this.getWritable();return n.setChecked(!n.__checked)}getIndent(){const n=this.getParent();if(n===null||!this.isAttached())return this.getLatest().__indent;let r=n.getParentOrThrow(),o=0;for(;ke(r);)r=r.getParentOrThrow().getParentOrThrow(),o++;return o}setIndent(n){typeof n!="number"&&Tr(117),(n=Math.floor(n))>=0||Tr(199);let r=this.getIndent();for(;r!==n;)r<n?(UN(this),r++):(BN(this),r--);return this}canInsertAfter(n){return ke(n)}canReplaceWith(n){return ke(n)}canMergeWith(n){return ke(n)||Bd(n)}extractWithChild(n,r){if(!$(r))return!1;const o=r.anchor.getNode(),i=r.focus.getNode();return this.isParentOf(o)&&this.isParentOf(i)&&this.getTextContent().length===r.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return Bt("bullet")}canMergeWhenEmpty(){return!0}}function KN(e){if(e.classList.contains("task-list-item")){for(const n of e.children)if(n.tagName==="INPUT")return $g(n)}if(e.classList.contains("joplin-checkbox")){for(const n of e.children)if(n.classList.contains("checkbox-wrapper")&&n.children.length>0&&n.children[0].tagName==="INPUT")return $g(n.children[0])}const t=e.getAttribute("aria-checked");return{node:Zt(t==="true"||t!=="false"&&void 0)}}function $g(e){return e.getAttribute("type")!=="checkbox"?{node:null}:{node:Zt(e.hasAttribute("checked"))}}function Zt(e){return Kr(new ts(void 0,e))}function ke(e){return e instanceof ts}class aa extends Mn{constructor(n="number",r=1,o){super(o);D(this,"__tag");D(this,"__start");D(this,"__listType");const i=qN[n]||n;this.__listType=i,this.__tag=i==="number"?"ol":"ul",this.__start=r}$config(){return this.config("list",{$transform:n=>{(function(r){const o=r.getNextSibling();be(o)&&r.getListType()===o.getListType()&&cp(r,o)})(n),p1(n)},extends:Mn,importDOM:{ol:()=>({conversion:Bg,priority:0}),ul:()=>({conversion:Bg,priority:0})}})}afterCloneFrom(n){super.afterCloneFrom(n),this.__listType=n.__listType,this.__tag=n.__tag,this.__start=n.__start}getTag(){return this.getLatest().__tag}setListType(n){const r=this.getWritable();return r.__listType=n,r.__tag=n==="number"?"ol":"ul",r}getListType(){return this.getLatest().__listType}getStart(){return this.getLatest().__start}setStart(n){const r=this.getWritable();return r.__start=n,r}createDOM(n,r){const o=this.__tag,i=document.createElement(o);return this.__start!==1&&i.setAttribute("start",String(this.__start)),i.__lexicalListType=this.__listType,Ug(i,n.theme,this),i}updateDOM(n,r,o){return n.__tag!==this.__tag||n.__listType!==this.__listType||(Ug(r,o.theme,this),!1)}updateFromJSON(n){return super.updateFromJSON(n).setListType(n.listType).setStart(n.start)}exportDOM(n){const r=this.createDOM(n._config,n);return ht(r)&&(this.__start!==1&&r.setAttribute("start",String(this.__start)),this.__listType==="check"&&r.setAttribute("__lexicalListType","check")),{element:r}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag()}}canBeEmpty(){return!1}canIndent(){return!1}splice(n,r,o){let i=o;for(let s=0;s<o.length;s++){const a=o[s];ke(a)||(i===o&&(i=[...o]),i[s]=Zt().append(!R(a)||be(a)||a.isInline()?a:rt(a.getTextContent())))}return super.splice(n,r,i)}extractWithChild(n){return ke(n)}}function Ug(e,t,n){const r=[],o=[],i=t.list;if(i!==void 0){const s=i[`${n.__tag}Depth`]||[],a=Uf(n)-1,l=a%s.length,c=s[l],u=i[n.__tag];let f;const d=i.nested,p=i.checklist;if(d!==void 0&&d.list&&(f=d.list),u!==void 0&&r.push(u),p!==void 0&&n.__listType==="check"&&r.push(p),c!==void 0){r.push(...wl(c));for(let h=0;h<s.length;h++)h!==l&&o.push(n.__tag+h)}if(f!==void 0){const h=wl(f);a>1?r.push(...h):o.push(...h)}}o.length>0&&qx(e,...o),r.length>0&&ip(e,...r)}function HN(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n];if(ke(r)){t.push(r);const o=r.getChildren();o.length>1&&o.forEach(i=>{be(i)&&t.push(Fg(i))})}else t.push(Fg(r))}return t}function Bg(e){const t=e.nodeName.toLowerCase();let n=null;return t==="ol"?n=Bt("number",e.start):t==="ul"&&(n=(function(r){if(r.getAttribute("__lexicallisttype")==="check"||r.classList.contains("contains-task-list")||r.getAttribute("data-is-checklist")==="1")return!0;for(const o of r.childNodes)if(ht(o)&&o.hasAttribute("aria-checked"))return!0;return!1})(e)?Bt("check"):Bt("bullet")),{after:HN,node:n}}const qN={ol:"number",ul:"bullet"};function Bt(e="number",t=1){return Kr(new aa(e,t))}function be(e){return e instanceof aa}const VN=pe("UPDATE_LIST_START_COMMAND"),h1=pe("INSERT_UNORDERED_LIST_COMMAND"),m1=pe("INSERT_ORDERED_LIST_COMMAND"),Wf=pe("REMOVE_LIST_COMMAND");function YN(e){return fn(e.registerCommand(m1,()=>(jg("number"),!0),Gn),e.registerCommand(VN,t=>{const{listNodeKey:n,newStart:r}=t,o=Xe(n);return!!be(o)&&(o.getListType()==="number"&&(o.setStart(r),p1(o)),!0)},Gn),e.registerCommand(h1,()=>(jg("bullet"),!0),Gn),e.registerCommand(Wf,()=>($N(),!0),Gn),e.registerCommand(Ls,()=>WN(),Gn),e.registerNodeTransform(ts,t=>{const n=t.getFirstChild();if(n){if(X(n)){const r=n.getStyle(),o=n.getFormat();t.getTextStyle()!==r&&t.setTextStyle(r),t.getTextFormat()!==o&&t.setTextFormat(o)}}else{const r=Z();$(r)&&(r.style!==t.getTextStyle()||r.format!==t.getTextFormat())&&r.isCollapsed()&&t.is(r.anchor.getNode())&&t.setTextStyle(r.style).setTextFormat(r.format)}}),e.registerNodeTransform(Br,t=>{const n=t.getParent();if(ke(n)&&t.is(n.getFirstChild())){const r=t.getStyle(),o=t.getFormat();r===n.getTextStyle()&&o===n.getTextFormat()||n.setTextStyle(r).setTextFormat(o)}}))}function QN(e){const t=n=>{const r=n.getParent();if(be(n.getFirstChild())||!be(r))return;const o=at(n,i=>ke(i)&&be(i.getParent())&&ke(i.getPreviousSibling()));if(o===null&&n.getIndent()>0)n.setIndent(0);else if(ke(o)){const i=o.getPreviousSibling();if(ke(i)){const s=(function(l){let c=l,u=c.getFirstChild();for(;be(u);){const f=u.getLastChild();if(!ke(f))break;c=f,u=c.getFirstChild()}return c})(i),a=s.getParent();if(be(a)){const l=Uf(a);l+1<Uf(r)&&n.setIndent(l)}}}};return e.registerNodeTransform(aa,n=>{const r=[n];for(;r.length>0;){const o=r.shift();if(be(o)){for(const i of o.getChildren())if(ke(i)){t(i);const s=i.getFirstChild();be(s)&&r.push(s)}}}})}const GN=new Set(["http:","https:","mailto:","sms:","tel:"]);class Ho extends Mn{constructor(n="",r={},o){super(o);D(this,"__url");D(this,"__target");D(this,"__rel");D(this,"__title");const{target:i=null,rel:s=null,title:a=null}=r;this.__url=n,this.__target=i,this.__rel=s,this.__title=a}static getType(){return"link"}static clone(n){return new Ho(n.__url,{rel:n.__rel,target:n.__target,title:n.__title},n.__key)}createDOM(n){const r=document.createElement("a");return this.updateLinkDOM(null,r,n),ip(r,n.theme.link),r}updateLinkDOM(n,r,o){if(Nx(r)){n&&n.__url===this.__url||(r.href=this.sanitizeUrl(this.__url));for(const i of["target","rel","title"]){const s=`__${i}`,a=this[s];n&&n[s]===a||(a?r[i]=a:r.removeAttribute(i))}}}updateDOM(n,r,o){return this.updateLinkDOM(n,r,o),!1}static importDOM(){return{a:n=>({conversion:ZN,priority:1})}}static importJSON(n){return Co().updateFromJSON(n)}updateFromJSON(n){return super.updateFromJSON(n).setURL(n.url).setRel(n.rel||null).setTarget(n.target||null).setTitle(n.title||null)}sanitizeUrl(n){n=Hg(n);try{const r=new URL(Hg(n));if(!GN.has(r.protocol))return"about:blank"}catch{return n}return n}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),url:this.getURL()}}getURL(){return this.getLatest().__url}setURL(n){const r=this.getWritable();return r.__url=n,r}getTarget(){return this.getLatest().__target}setTarget(n){const r=this.getWritable();return r.__target=n,r}getRel(){return this.getLatest().__rel}setRel(n){const r=this.getWritable();return r.__rel=n,r}getTitle(){return this.getLatest().__title}setTitle(n){const r=this.getWritable();return r.__title=n,r}insertNewAfter(n,r=!0){const o=Co(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(o,r),o}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(n,r,o){if(!$(r))return!1;const i=r.anchor.getNode(),s=r.focus.getNode();return this.isParentOf(i)&&this.isParentOf(s)&&r.getTextContent().length>0}isEmailURI(){return this.__url.startsWith("mailto:")}isWebSiteURI(){return this.__url.startsWith("https://")||this.__url.startsWith("http://")}}function ZN(e){let t=null;if(Nx(e)){const n=e.textContent;(n!==null&&n!==""||e.children.length>0)&&(t=Co(e.getAttribute("href")||"",{rel:e.getAttribute("rel"),target:e.getAttribute("target"),title:e.getAttribute("title")}))}return{node:t}}function Co(e="",t){return Kr(new Ho(e,t))}function ut(e){return e instanceof Ho}class ic extends Ho{constructor(n="",r={},o){super(n,r,o);D(this,"__isUnlinked");this.__isUnlinked=r.isUnlinked!==void 0&&r.isUnlinked!==null&&r.isUnlinked}static getType(){return"autolink"}static clone(n){return new ic(n.__url,{isUnlinked:n.__isUnlinked,rel:n.__rel,target:n.__target,title:n.__title},n.__key)}getIsUnlinked(){return this.__isUnlinked}setIsUnlinked(n){const r=this.getWritable();return r.__isUnlinked=n,r}createDOM(n){return this.__isUnlinked?document.createElement("span"):super.createDOM(n)}updateDOM(n,r,o){return super.updateDOM(n,r,o)||n.__isUnlinked!==this.__isUnlinked}static importJSON(n){return Wg().updateFromJSON(n)}updateFromJSON(n){return super.updateFromJSON(n).setIsUnlinked(n.isUnlinked||!1)}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),isUnlinked:this.__isUnlinked}}insertNewAfter(n,r=!0){const o=this.getParentOrThrow().insertNewAfter(n,r);if(R(o)){const i=Wg(this.__url,{isUnlinked:this.__isUnlinked,rel:this.__rel,target:this.__target,title:this.__title});return o.append(i),i}return null}}function Wg(e="",t){return Kr(new ic(e,t))}function so(e){return e instanceof ic}const $i=pe("TOGGLE_LINK_COMMAND");function Kg(e,t){if(e.type==="element"){const n=e.getNode();return R(n)||(function(r,...o){const i=new URL("https://lexical.dev/docs/error"),s=new URLSearchParams;s.append("code",r);for(const a of o)s.append("v",a);throw i.search=s.toString(),Error(`Minified Lexical error #${r}; visit ${i.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(252),n.getChildren()[e.offset+t]||null}return null}function cu(e,t={}){let n;if(e&&typeof e=="object"){const{url:u,...f}=e;n=u,t={...f,...t}}else n=e;const{target:r,title:o}=t,i=t.rel===void 0?"noreferrer":t.rel,s=Z();if(s===null||!$(s)&&!ot(s))return;if(ot(s)){const u=s.getNodes();return u.length===0?void 0:void u.forEach(f=>{if(n===null){const d=at(f,p=>!so(p)&&ut(p));d&&(d.insertBefore(f),d.getChildren().length===0&&d.remove())}else{const d=at(f,p=>!so(p)&&ut(p));if(d)d.setURL(n),r!==void 0&&d.setTarget(r),i!==void 0&&d.setRel(i);else{const p=Co(n,{rel:i,target:r});f.insertBefore(p),p.append(f)}}})}const a=s.extract();if(n===null){const u=new Set;return void a.forEach(f=>{const d=f.getParent();if(ut(d)&&!so(d)){const p=d.getKey();if(u.has(p))return;(function(h,g){const m=new Set(g.filter(E=>h.isParentOf(E)).map(E=>E.getKey())),y=h.getChildren(),v=y.filter(E=>m.has(E.getKey()));if(v.length===y.length)return y.forEach(E=>h.insertBefore(E)),void h.remove();const b=y.findIndex(E=>m.has(E.getKey())),w=y.findLastIndex(E=>m.has(E.getKey())),A=b===0,_=w===y.length-1;if(A)v.forEach(E=>h.insertBefore(E));else if(_)for(let E=v.length-1;E>=0;E--)h.insertAfter(v[E]);else{for(let S=v.length-1;S>=0;S--)h.insertAfter(v[S]);const E=y.slice(w+1);if(E.length>0){const S=Co(h.getURL(),{rel:h.getRel(),target:h.getTarget(),title:h.getTitle()});v[v.length-1].insertAfter(S),E.forEach(N=>S.append(N))}}})(d,a),u.add(p)}})}const l=new Set,c=u=>{l.has(u.getKey())||(l.add(u.getKey()),u.setURL(n),r!==void 0&&u.setTarget(r),i!==void 0&&u.setRel(i),o!==void 0&&u.setTitle(o))};if(a.length===1){const u=a[0],f=at(u,ut);if(f!==null)return c(f)}(function(u){const f=Z();if(!$(f))return u();const d=Ri(f),p=d.isBackward(),h=Kg(d.anchor,p?-1:0),g=Kg(d.focus,p?0:-1);if(u(),h||g){const m=Z();if($(m)){const y=m.clone();if(h){const v=h.getParent();v&&y.anchor.set(v.getKey(),h.getIndexWithinParent()+(p?1:0),"element")}if(g){const v=g.getParent();v&&y.focus.set(v.getKey(),g.getIndexWithinParent()+(p?0:1),"element")}Pt(Ri(y))}}})(()=>{let u=null;for(const f of a){if(!f.isAttached())continue;const d=at(f,ut);if(d){c(d);continue}if(R(f)){if(!f.isInline())continue;if(ut(f)){if(!(so(f)||u!==null&&u.getParentOrThrow().isParentOf(f))){c(f),u=f;continue}for(const h of f.getChildren())f.insertBefore(h);f.remove();continue}}const p=f.getPreviousSibling();ut(p)&&p.is(u)?p.append(f):(u=Co(n,{rel:i,target:r,title:o}),f.insertAfter(u),u.append(f))}})}const JN=/^\+?[0-9\s()-]{5,}$/;function Hg(e){return e.match(/^[a-z][a-z0-9+.-]*:/i)||e.match(/^[/#.]/)?e:e.includes("@")?`mailto:${e}`:JN.test(e)?`tel:${e}`:`https://${e}`}function XN(e,t){return fn($s(()=>e.registerCommand($i,n=>{const r=t.validateUrl.peek(),o=t.attributes.peek();if(n===null)return cu(null),!0;if(typeof n=="string")return!(r!==void 0&&!r(n))&&(cu(n,o),!0);{const{url:i,target:s,rel:a,title:l}=n;return cu(i,{...o,rel:a,target:s,title:l}),!0}},Gn)),$s(()=>{const n=t.validateUrl.value;if(!n)return;const r=t.attributes.value;return e.registerCommand(Gl,o=>{const i=Z();if(!$(i)||i.isCollapsed()||!kr(o,ClipboardEvent)||o.clipboardData===null)return!1;const s=o.clipboardData.getData("text");return!!n(s)&&!i.getNodes().some(a=>R(a))&&(e.dispatchCommand($i,{...r,url:s}),o.preventDefault(),!0)},Gn)}))}function e5({commentType:e,onCommentTypeChange:t,isCommentTypeEditable:n=!0,actions:r,setIsLinkEditMode:o,onAddAttachments:i}){const[s]=pt(),[a,l]=T.useState({bold:!1,italic:!1,underline:!1,strikethrough:!1,code:!1}),[c,u]=T.useState(null),f=T.useRef(null),d=T.useRef(null),p=up[e];T.useLayoutEffect(()=>s.registerUpdateListener(({editorState:v})=>{v.read(()=>{const b=Z();if(!$(b))return;l({bold:b.hasFormat("bold"),italic:b.hasFormat("italic"),underline:b.hasFormat("underline"),strikethrough:b.hasFormat("strikethrough"),code:b.hasFormat("code")});let w=b.anchor.getNode(),A=null;for(;w;){if(be(w)){const _=w.getListType();A=_==="bullet"||_==="number"?_:null;break}if(ke(w)){w=w.getParent();continue}w=w.getParent()}u(A)})}),[s]);const h=v=>{s.dispatchCommand(_n,v)},g=()=>{c!=="bullet"?s.dispatchCommand(h1,void 0):s.dispatchCommand(Wf,void 0)},m=()=>{c!=="number"?s.dispatchCommand(m1,void 0):s.dispatchCommand(Wf,void 0)},y=()=>{s.update(()=>{const v=Z();if(!$(v))return;["bold","italic","underline","strikethrough","code"].forEach(w=>{v.hasFormat(w)&&s.dispatchCommand(_n,w)})})};return x.jsxs("div",{className:Ee("flex items-center w-full",r?"justify-between":"justify-end"),children:[x.jsxs("div",{className:"flex items-center gap-1",children:[x.jsx(ff,{placement:"top-start",minWidth:"fit-content",title:"text formatting menu",trigger:x.jsx(je,{category:"link",size:"smallCollapse",color:"gray400",children:x.jsx(Ce,{icon:N4})}),children:x.jsxs("ul",{className:"flex items-start flex-col",children:[x.jsx("li",{className:"flex items-center w-full",children:x.jsxs("button",{type:"button",title:"Bold",onClick:()=>h("bold"),className:Ee("cursor-pointer w-full h-full justify-start text-left p-2 hover:bg-gray-100",a.bold?"text-white bg-primary-600 hover:bg-primary-700":"text-gray-400 hover:text-gray-400"),children:[x.jsx(Ce,{icon:w4,className:"mr-2"}),"Bold"]})}),x.jsx("li",{className:"flex items-center w-full",children:x.jsxs("button",{type:"button",title:"Italic",onClick:()=>h("italic"),className:Ee("cursor-pointer w-full h-full justify-start text-left p-2 hover:bg-gray-100",a.italic?"text-white bg-primary-600 hover:bg-primary-700":"text-gray-400 hover:text-gray-400"),children:[x.jsx(Ce,{icon:_4,className:"mr-2"}),"Italic"]})}),x.jsx("li",{className:"flex items-center w-full",children:x.jsxs("button",{type:"button",title:"Underline",onClick:()=>h("underline"),className:Ee("cursor-pointer w-full h-full justify-start text-left p-2 hover:bg-gray-100",a.underline?"text-white bg-primary-600 hover:bg-primary-700":"text-gray-400 hover:text-gray-400"),children:[x.jsx(Ce,{icon:x4,className:"mr-2"}),"Underline"]})}),x.jsx("li",{className:"flex items-center w-full",children:x.jsxs("button",{type:"button",title:"Strikethrough",onClick:()=>h("strikethrough"),className:Ee("cursor-pointer w-full h-full justify-start text-left p-2 hover:bg-gray-100",a.strikethrough?"text-white bg-primary-600 hover:bg-primary-700":"text-gray-400 hover:text-gray-400"),children:[x.jsx(Ce,{icon:b4,className:"mr-2"}),"Strikethrough"]})}),x.jsx("li",{className:"flex items-center w-full",children:x.jsxs("button",{type:"button",title:"Monospace",onClick:()=>h("code"),className:Ee("cursor-pointer w-full h-full justify-start text-left p-2 hover:bg-gray-100",a.code?"text-white bg-primary-600 hover:bg-primary-700":"text-gray-400 hover:text-gray-400"),children:[x.jsx(Ce,{icon:S4,className:"mr-2"}),"Monospace"]})}),x.jsx("hr",{className:"w-full border-gray-200"}),x.jsx("li",{className:"flex items-center w-full",children:x.jsxs("button",{type:"button",title:"Clear formatting",onClick:y,className:"cursor-pointer w-full h-full justify-start text-left p-2 text-gray-400 hover:text-gray-400 hover:bg-gray-100",children:[x.jsx(Ce,{icon:C4,className:"mr-2"}),"Clear formatting"]})})]})}),x.jsx(je,{category:"link",size:"smallCollapse",color:"gray400",title:"Format bullet list",onClick:g,children:x.jsx(Ce,{icon:O4})}),x.jsx(je,{category:"link",size:"smallCollapse",color:"gray400",title:"Format numbered list",onClick:m,children:x.jsx(Ce,{icon:E4})}),x.jsx(je,{category:"link",size:"smallCollapse",color:"gray400",title:"Format link",onClick:()=>{o(!0),s.dispatchCommand($i,"https://")},children:x.jsx(Ce,{icon:T4})}),i&&x.jsxs(x.Fragment,{children:[x.jsx(je,{category:"link",size:"smallCollapse",color:"gray400",title:"Add image",className:"border-l-1 border-gray-200 rounded-none",onClick:()=>{var v;(v=f.current)==null||v.click()},children:x.jsx(Ce,{icon:A4})}),x.jsx(je,{category:"link",size:"smallCollapse",color:"gray400",title:"Add file",onClick:()=>{var v;(v=d.current)==null||v.click()},children:x.jsx(Ce,{icon:k4})})]}),n&&x.jsx(ff,{placement:"top-end",title:"comment type menu",trigger:x.jsx(je,{category:"link",size:"smallCollapse",className:`${p.iconColor} border-l-1 border-gray-200 rounded-none`,children:x.jsx(Ce,{icon:p.icon})}),children:x.jsx("ul",{className:"flex items-center justify-between gap-2 p-3",children:y1.map(v=>x.jsx("li",{children:x.jsx(je,{category:"link",size:"none",title:v.title,className:Ee(v.color,e===v.type?v.color:"text-gray-400"),onClick:()=>t==null?void 0:t(v.type),children:x.jsx(Ce,{icon:v.icon})})},v.type))})})]}),r,x.jsx("input",{type:"file",hidden:!0,id:"image-input",multiple:!0,ref:f,accept:"image/*",onChange:v=>{const b=v.target.files;b&&(i==null||i(b))}}),x.jsx("input",{type:"file",hidden:!0,id:"file-input",multiple:!0,ref:d,accept:"*",onChange:v=>{const b=v.target.files;b&&(i==null||i(b))}})]})}function t5({hasStrictIndent:e=!1}){const[t]=pt();return T.useEffect(()=>{if(!t.hasNodes([aa,ts]))throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")},[t]),T.useEffect(()=>{if(e)return QN(t)},[t,e]),(function(n){T.useEffect(()=>YN(n),[n])})(t),null}function n5({validateUrl:e,attributes:t}){const[n]=pt();return T.useEffect(()=>{if(!n.hasNodes([Ho]))throw new Error("LinkPlugin: LinkNode not registered on editor")}),T.useEffect(()=>XN(n,Gx({attributes:t,validateUrl:e})),[n,e,t]),null}const r5=new Set(["http:","https:","mailto:","sms:","tel:"]);function qg(e){try{const t=new URL(e);if(!r5.has(t.protocol))return"about:blank"}catch{return e}return e}function Vg(e,t,n,r=10,o=5){const i=n.parentElement;if(e===null||!i){t.style.opacity="0",t.style.transform="translate(-10000px, -10000px)";return}const s=t.getBoundingClientRect(),a=n.getBoundingClientRect(),l=i.getBoundingClientRect();let c=e.top-r,u=e.left-o;c<l.top&&(c+=s.height+e.height+r*2),u+s.width>l.right&&(u=l.right-s.width-o),c-=a.top,u-=a.left,t.style.opacity="1",t.style.transform=`translate(${u}px, ${c}px)`}function Al(e){const t=e.anchor,n=e.focus,r=e.anchor.getNode(),o=e.focus.getNode();return r===o?r:e.isBackward()?gg(n)?r:o:gg(t)?r:o}function o5({editor:e,isLink:t,setIsLink:n,anchorElem:r,isLinkEditMode:o,setIsLinkEditMode:i}){const s=T.useRef(null),[a,l]=T.useState(""),[c,u]=T.useState("https://"),[f,d]=T.useState(null),p=T.useCallback(()=>{var A,_;const m=Z();if($(m)){const E=Al(m),S=at(E,ut);S?l(S.getURL()):ut(E)?l(E.getURL()):l(""),o&&u(a)}else if(ot(m)){const E=m.getNodes();if(E.length>0){const S=E[0],N=S.getParent();ut(N)?l(N.getURL()):ut(S)?l(S.getURL()):l(""),o&&u(a)}}const y=s.current,v=en(e._window),b=document.activeElement;if(y===null)return;const w=e.getRootElement();if(m!==null&&w!==null&&e.isEditable()){let E;if(ot(m)){const S=m.getNodes();if(S.length>0){const N=e.getElementByKey(S[0].getKey());N&&(E=N.getBoundingClientRect())}}else v!==null&&w.contains(v.anchorNode)&&(E=(_=(A=v.focusNode)==null?void 0:A.parentElement)==null?void 0:_.getBoundingClientRect());E&&(E.y+=40,Vg(E,y,r)),d(m)}else(!b||b.className!=="link-input")&&(w!==null&&Vg(null,y,r),d(null),i(!1),l(""));return!0},[r,e,i,o,a]);T.useEffect(()=>{const m=r.parentElement,y=()=>{e.getEditorState().read(()=>{p()})};return window.addEventListener("resize",y),m&&m.addEventListener("scroll",y),()=>{window.removeEventListener("resize",y),m&&m.removeEventListener("scroll",y)}},[r.parentElement,e,p]),T.useEffect(()=>fn(e.registerUpdateListener(({editorState:m})=>{m.read(()=>{p()})}),e.registerCommand(Ql,()=>(p(),!0),Gn),e.registerCommand(Rd,()=>t?(n(!1),!0):!1,n6)),[e,p,n,t]),T.useEffect(()=>{e.getEditorState().read(()=>{p()})},[e,p]),T.useEffect(()=>{const m=s.current;if(m===null)return;const y=v=>{!m.contains(v.relatedTarget)&&t&&(n(!1),i(!1))};return m.addEventListener("focusout",y),()=>{m.removeEventListener("focusout",y)}},[n,i,t]);const h=m=>{m.key==="Enter"?g(m):m.key==="Escape"&&(m.preventDefault(),i(!1))},g=m=>{m.preventDefault(),f!==null&&(a!==""&&e.update(()=>{e.dispatchCommand($i,qg(c));const y=Z();if($(y)){const v=Al(y).getParent();if(so(v)){const b=Co(v.getURL(),{rel:v.__rel,target:v.__target,title:v.__title});v.replace(b,!0)}}}),u("https://"),i(!1))};return x.jsx("div",{ref:s,className:"absolute flex top-0 left-0 shadow-lg bg-white z-10 rounded-sm w-full max-w-400",children:t?o?x.jsxs("div",{className:"flex justify-between w-full items-center p-2",children:[x.jsx(Ny,{containerClassName:"px-0 mr-2",autoFocus:!0,className:"mt-0",value:c,onChange:m=>{u(m.target.value)},onKeyDown:m=>{h(m)}}),x.jsxs("div",{className:"flex justify-center items-center gap-4",children:[x.jsx(je,{size:"none",category:"link",color:"gray400",tabIndex:0,onMouseDown:m=>m.preventDefault(),onClick:()=>{i(!1)},children:x.jsx(Ce,{icon:Dl})}),x.jsx(je,{size:"none",category:"link",color:"gray400",tabIndex:0,onMouseDown:m=>m.preventDefault(),onClick:g,children:x.jsx(Ce,{icon:zy})})]})]}):x.jsxs("div",{className:"flex justify-between w-full items-center p-2",children:[x.jsx("a",{href:qg(a),target:"_blank",rel:"noopener noreferrer",children:a}),x.jsxs("div",{className:"flex items-center gap-4",children:[x.jsx(je,{size:"none",category:"link",color:"gray400",tabIndex:0,onMouseDown:m=>m.preventDefault(),onClick:()=>{u(a),i(!0)},children:x.jsx(Ce,{icon:VC})}),x.jsx(je,{size:"none",category:"link",color:"gray400",tabIndex:0,onMouseDown:m=>m.preventDefault(),onClick:()=>e.dispatchCommand($i,null),children:x.jsx(Ce,{icon:o_})})]})]}):null})}function i5(e,t,n,r){const[o,i]=T.useState(e),[s,a]=T.useState(!1);return T.useEffect(()=>{function l(){const c=Z();if($(c)){const u=Al(c),f=at(u,ut),d=at(u,so);if(!(f||d)){a(!1);return}const p=c.getNodes().filter(h=>!xo(h)).find(h=>{const g=at(h,ut),m=at(h,so);return f&&!f.is(g)||g&&!g.is(f)||d&&!d.is(m)||m&&(!m.is(d)||m.getIsUnlinked())});a(!p)}else if(ot(c)){const u=c.getNodes();if(u.length===0){a(!1);return}const f=u[0],d=f.getParent();ut(d)||ut(f)?a(!0):a(!1)}}return fn(e.registerUpdateListener(({editorState:c})=>{c.read(()=>{l()})}),e.registerCommand(Ql,(c,u)=>(l(),i(u),!1),px),e.registerCommand(Md,c=>{const u=Z();if($(u)){const f=Al(u),d=at(f,ut);if(ut(d)&&(c.metaKey||c.ctrlKey))return window.open(d.getURL(),"_blank"),!0}return!1},Gn))},[e]),Nn.createPortal(x.jsx(o5,{editor:o,isLink:s,anchorElem:t,setIsLink:a,isLinkEditMode:n,setIsLinkEditMode:r}),t)}function s5({anchorElem:e=document.body,isLinkEditMode:t,setIsLinkEditMode:n}){const[r]=pt();return i5(r,e,t,n)}const a5=({url:e,onDelete:t})=>x.jsxs("div",{className:"relative",children:[x.jsx("img",{src:e,alt:"Thumbnail",width:75,height:75,className:"w-[75px] h-[75px] object-cover rounded-lg border border-gray-200"}),x.jsx(je,{size:"smallCollapse",title:"Delete attachment",onClick:t,className:"absolute top-1 left-1 w-[20px] h-[20px] rounded-full",color:"secondary",children:x.jsx(Ce,{icon:jy})})]}),l5=({onRemoveFile:e,type:t,label:n})=>{const r=t.toLowerCase(),o=Iv(r);return x.jsxs("div",{className:"relative flex items-center justify-center rounded border border-gray-200",children:[x.jsx(je,{size:"smallCollapse",color:"secondary",className:"absolute top-1 left-1 w-[20px] h-[20px] rounded-full",title:"Remove file",onClick:e,children:x.jsx(Ce,{icon:jy})}),x.jsxs("div",{className:"flex items-center justify-center mx-2",children:[x.jsx("span",{className:"text-primary-600 my-2",children:x.jsx(Ce,{icon:o,size:"3x",className:"text-primary-600"})}),x.jsx("span",{className:"font-bold p-2",children:n})]})]})},c5=({clearKey:e})=>{const[t]=pt(),n=T.useRef(e);return T.useEffect(()=>{n.current!==e&&(t.update(()=>{We().clear()}),n.current=e)},[e,t]),null},u5=({isOpen:e})=>{const[t]=pt(),n=T.useRef(!1);return T.useEffect(()=>{if(!e){n.current=!1;return}if(n.current)return;const r=()=>{const o=t.getRootElement();if(!o){requestAnimationFrame(r);return}n.current=!0;const i=window.scrollX,s=window.scrollY;try{o.focus({preventScroll:!0})}catch{o.focus()}requestAnimationFrame(()=>window.scrollTo(i,s)),setTimeout(()=>window.scrollTo(i,s),0)};r()},[t,e]),null},f5=({initialValue:e})=>{const[t]=pt(),n=T.useCallback((o,i)=>{const a=new DOMParser().parseFromString(i,"text/html");return t1(o,a)},[]),r=T.useRef(!1);return T.useEffect(()=>{!r.current&&e&&(t.update(()=>{We().clear(),sx(n(t,e))}),r.current=!0)},[t,e,n]),null},d5=({onChange:e})=>{const[t]=pt();return x.jsx(LN,{onChange:n=>{n.read(()=>{const r=n1(t,null);e(r)})}})},p5=({onAddAttachments:e})=>{const[t]=pt();return T.useEffect(()=>{if(!e)return;const n=t.getRootElement();if(!n)return;const r=o=>{const i=o.clipboardData;if(!i)return;const s=i.items;let a=!1;for(let l=0;l<s.length;l++){const c=s[l];if(c.kind==="file"&&c.type.startsWith("image/")){a=!0;break}}if(a){for(let l=0;l<s.length;l++){const c=s[l];if(c.kind==="file"&&c.type.startsWith("image/")){const u=c.getAsFile();if(u){const f=Date.now(),d=u.type.split("/")[1]||"png",p=`image_${f}.${d}`,h=new File([u],p,{type:u.type});e==null||e([h])}}}o.preventDefault(),o.stopPropagation()}};return n.addEventListener("paste",r,!0),()=>{n.removeEventListener("paste",r,!0)}},[t,e]),null},h5=({onSubmit:e})=>{const[t]=pt();return T.useEffect(()=>{if(e)return t.registerCommand(Fs,n=>n&&!n.shiftKey?(n.preventDefault(),e(),!0):!1,1)},[t,e]),null},m5=({setIsLinkEditMode:e})=>{const[t]=pt();return T.useEffect(()=>{const n=t.getRootElement();if(!n)return;const r=o=>{const i=o.metaKey||o.ctrlKey,s=o.key==="k"||o.key==="K";i&&s&&t.getEditorState().read(()=>{const a=Z();$(a)&&!a.isCollapsed()&&(o.preventDefault(),e(!0),t.dispatchCommand($i,"https://"))})};return n.addEventListener("keydown",r),()=>{n.removeEventListener("keydown",r)}},[t,e]),null};function g1({attachments:e,clearKey:t=0,inputFieldClassName:n="",containerClassName:r="",initialValue:o,onChange:i,commentType:s,onCommentTypeChange:a,isCommentTypeEditable:l=!0,actions:c,onAddAttachments:u,onRemoveAttachment:f,onSubmit:d,isOpen:p}){const h={namespace:"comment-editor",theme:zN,nodes:[aa,ts,Ho],onError:A=>{console.error(A)}},[g,m]=T.useState(null),[y,v]=T.useState(!1),b=A=>{A!==null&&m(A)},w=up[s];return x.jsx("div",{className:r,children:x.jsxs(M6,{initialConfig:h,children:[x.jsxs("div",{className:"relative",children:[x.jsx(CN,{contentEditable:x.jsx("div",{ref:b,children:x.jsx(ON,{className:Ee("p-3 outline-none border-0 w-full border-t border-gray-200 rounded-none border-l-3",w.bg,w.border,w.fontColor,n)})}),placeholder:x.jsx("div",{className:"absolute top-3 left-4 text-gray-400 pointer-events-none",children:"Type comment…"}),ErrorBoundary:jN}),x.jsx(t5,{}),x.jsx(n5,{}),g&&x.jsx(s5,{anchorElem:g,isLinkEditMode:y,setIsLinkEditMode:v}),x.jsx(kN,{}),x.jsx(f5,{initialValue:o}),x.jsx(d5,{onChange:i}),x.jsx(h5,{onSubmit:d}),x.jsx(m5,{setIsLinkEditMode:v}),x.jsx(c5,{clearKey:t}),x.jsx(p5,{onAddAttachments:u}),x.jsx(u5,{isOpen:p})]}),e&&e.length>0&&x.jsx("div",{className:"flex flex-wrap justify-start gap-2 p-4",children:e.map(A=>md(A.type)?x.jsx(a5,{url:A.url,onDelete:()=>f==null?void 0:f(A.originFile)},A.originFile.name):x.jsx(l5,{type:A.type,label:A.name,onRemoveFile:()=>f==null?void 0:f(A.originFile)},A.originFile.name))}),x.jsx("div",{className:"border-t border-gray-200 p-2 flex justify-end",children:x.jsx(e5,{commentType:s,onCommentTypeChange:a,isCommentTypeEditable:l,actions:c,setIsLinkEditMode:v,onAddAttachments:u})})]})})}const g5=({asset:e,onSetActiveSrc:t})=>x.jsxs("div",{className:"relative border border-gray-200 rounded-md h-[110px] w-full hover:border-primary-500",children:[x.jsx("img",{src:$a(e),onClick:()=>t($a(e)),onKeyDown:n=>{n.key==="Enter"&&t($a(e))},alt:e.name,className:"w-full h-full object-cover rounded-md object-center cursor-zoom-in"}),(e==null?void 0:e.uploading)&&x.jsx("div",{className:"absolute bottom-2 w-full max-w-md mx-auto px-2",children:x.jsx("div",{className:"relative h-2 overflow-hidden rounded-full bg-gray-200",children:x.jsx("div",{className:"absolute left-0 top-0 h-full w-1/3 rounded-full bg-blue-500 animate-progress"})})})]}),y5=({asset:e})=>{var r,o;const t=((o=(r=e==null?void 0:e.mimeType)==null?void 0:r.split("/").pop())==null?void 0:o.toLowerCase())||"",n=Iv(t);return x.jsxs("div",{className:"flex gap-2",children:[(e==null?void 0:e.uploading)&&x.jsx("div",{className:"flex items-center justify-center",children:x.jsx("div",{className:"h-4 w-4 rounded-full border-2 border-gray-300 border-t-blue-500 animate-spin"})}),x.jsx(Ce,{icon:n,size:"lg",className:"text-primary-600"}),x.jsx("a",{href:$a(e),className:"text-sm text-blue-600 underline",download:!0,target:"_blank",rel:"noopener noreferrer",children:e.name})]})},v5=({commentType:e=dt.INFO,author:t,username:n,comment:r,createdDate:o,onDelete:i,onEdit:s,hasAssets:a,taskAssets:l,taskVerified:c})=>{const f={[dt.INFO]:{bg:"bg-primary-100",border:"border-primary-200",icon:Dy,iconColor:"text-primary-600 hover:text-primary-600",text:"text-primary-900"},[dt.WARNING]:{bg:"bg-warning-100",border:"border-warning-200",icon:My,iconColor:"text-warning-600 hover:text-warning-600",text:"text-warning-900"},[dt.DANGER]:{bg:"bg-danger-100",border:"border-danger-200",icon:$y,iconColor:"text-danger-600 hover:text-danger-600",text:"text-danger-900"},[dt.SUCCESS]:{bg:"bg-success-100",border:"border-success-200",icon:Ly,iconColor:"text-success-600 hover:text-success-600",text:"text-success-900"}}[e],d=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"}).format(new Date(o||"")).replace(",",""),[p,h]=T.useState(!1),[g,m]=T.useState(zc(r)),[y,v]=T.useState(e),[b,w]=T.useState(""),A=()=>{h(!0)},_=()=>{const N=of.sanitize(g);s(N,y),h(!1)},E=N=>{const P=of.sanitize(g);v(N),s(P,N),h(!1)},S=()=>{h(!1)};return x.jsxs("div",{className:"flex items-start space-x-4 w-full",children:[x.jsx(BT,{alt:t}),x.jsxs("div",{className:"flex-1 min-w-0",children:[x.jsxs("div",{className:`border ${f.border} rounded-sm ${f.bg} shadow-sm flex flex-col items-start justify-between w-full`,children:[x.jsx("div",{className:"p-3 flex flex-col items-start justify-between w-full",children:x.jsxs("div",{className:"w-full",children:[x.jsxs("div",{className:"flex items-center mb-2 justify-between",children:[x.jsxs("div",{children:[x.jsx(Ce,{icon:f.icon,size:"lg",className:`mr-2 ${f.iconColor}`}),x.jsx("span",{className:`font-semibold text-sm ${f.text}`,children:t})]}),x.jsx(KT,{commentType:e,taskVerified:c,isUsernameAuthor:n.trim()===t.trim(),onEdit:A,onSaveCommentType:E,onDelete:i})]}),p?x.jsx(g1,{inputFieldClassName:"bg-white border-0 rounded-sm",containerClassName:"bg-white border-0 rounded-sm",onChange:m,commentType:e,isCommentTypeEditable:!1,initialValue:zc(r),actions:x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(je,{category:"outline",size:"smallCollapse",color:"secondary",onClick:S,title:"Cancel edit",children:"Cancel"}),x.jsx(je,{category:"solid",size:"smallCollapse",color:"primary",onClick:_,title:"Save edit",disabled:Ua(g),children:"Save"})]})}):x.jsx("div",{className:`text-sm ${f.text}`,dangerouslySetInnerHTML:{__html:zc(r)}})]})}),a&&l&&(l==null?void 0:l.length)>0&&x.jsx("div",{className:`${f.border} border-t w-full p-2 flex gap-2 flex-wrap`,children:l.map(N=>x.jsx(T.Fragment,{children:md(N.mimeType)?x.jsx(g5,{asset:N,onSetActiveSrc:w}):x.jsx(y5,{asset:N})},N.assetId))})]}),x.jsxs("div",{className:"flex gap-2 my-1",children:[o&&x.jsx("time",{dateTime:o,className:"text-xs text-gray-500 opacity-60",children:d}),c&&x.jsxs("span",{className:"text-xs text-success-600 font-semibold flex items-center gap-1",children:[x.jsx(Ce,{icon:Ry}),"Comment Required"]})]})]}),x.jsx(CT,{plugins:[$T],open:!!b,zoom:{maxZoomPixelRatio:2},close:()=>w(""),styles:{root:{zIndex:9999999999}},carousel:{finite:!0,preload:0},controller:{closeOnBackdropClick:!0},slides:[{src:b}]})]})},up={[dt.INFO]:{icon:a_,bg:"bg-primary-100",border:"border-l-primary-500",iconColor:"text-primary-600 hover:text-primary-700",fontColor:"text-primary-900"},[dt.WARNING]:{icon:YC,bg:"bg-warning-100",border:"border-l-warning-500",iconColor:"text-warning-600 hover:text-warning-700",fontColor:"text-warning-900"},[dt.DANGER]:{icon:u_,bg:"bg-danger-100",border:"border-l-danger-500",iconColor:"text-danger-600 hover:text-danger-700",fontColor:"text-danger-900"},[dt.SUCCESS]:{icon:Ry,bg:"bg-success-100",border:"border-l-success-500",iconColor:"text-success-600 hover:text-success-700",fontColor:"text-success-900"}},y1=Object.entries(up).map(([e,t])=>({type:e,icon:t.icon,color:t.iconColor,title:`Change comment type to ${e}`})),b5=({comments:e,onClose:t,isOpen:n,taskName:r,taskInstanceId:o,isLoading:i,playbookInstanceId:s,taskVerification:a})=>{const[l,c]=T.useState(""),[u,f]=T.useState(dt.INFO),[d,p]=T.useState(0),[h,g]=T.useState([]),m=T.useRef(null),{username:y}=v1(),{manageComment:v}=fk({playbookInstanceId:s}),b=()=>{const P=h.length,W=h.some(z=>!md(z.mimeType))?"Attachment":"Image",j=P>1?"s":"";return`<p class="m-0"><span style="white-space: pre-wrap;">${W}${j} added.</span></p>`},w=P=>{const I=Array.from(P).map((W,j)=>nk(W,h.length+j+1));g(W=>[...W,...I])},A=P=>{g(I=>I.filter(W=>W.originFile!==P))},_=P=>{f(P)},E=async()=>{if(!h.length&&Ua(l)||!o)return;h.length>0&&g([]);const P=of.sanitize(l);c(""),p(I=>I+1),await v({action:"add",comment:h.length>0&&Ua(l)?b():P,username:y||"",commentType:u,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,hasAssets:h.length>0,taskInstanceId:o,taskVerified:a,attachments:h}),f(dt.INFO)},S=async P=>{o&&await v({username:y||"",action:"delete",taskVerified:!1,taskInstanceId:o,commentId:P})},N=async({commentId:P,comment:I,commentType:W,hasAssets:j,isAlreadyVerified:z})=>{o&&await v({action:"edit",username:y||"",...I&&{comment:I},taskInstanceId:o,commentId:P,hasAssets:j,taskVerified:z,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,commentType:W})};return T.useLayoutEffect(()=>{m.current&&n&&!i&&e.length>0&&(m.current.scrollTop=m.current.scrollHeight)},[n,i,e.length]),x.jsxs("div",{className:Ee("transition-all duration-300 fixed bg-white right-0 bottom-0 h-[100vh] z-[9999999998] flex flex-col min-w-[270px] max-w-[420px] w-[calc(100vw-1rem)] border border-gray-200 rounded-t-sm overflow-hidden",n?"translate-y-0 opacity-100":"translate-y-full opacity-0 pointer-events-none"),children:[x.jsxs("div",{className:"flex items-center justify-between gap-2 border-b border-gray-200 px-2 py-4 w-full",children:[x.jsx("h6",{className:"font-semibold text-gray-900 truncate max-w-[300px]",children:r}),x.jsx(je,{color:"grayLight",size:"smallCollapse",rounded:"none",title:"Close comment box",onClick:t,children:x.jsx(Ce,{icon:Dl,className:"size-4 text-gray-300"})})]}),x.jsxs("div",{ref:m,className:"flex flex-col flex-1 overflow-y-auto",children:[x.jsxs("div",{className:"flex flex-col justify-end flex-1 gap-4 p-4 pb-[102px]",children:[i&&x.jsx("div",{className:"flex flex-col gap-3",children:[1,2,3].map(P=>x.jsx("div",{className:"h-16 animate-pulse rounded-lg bg-gray-100"},P))}),(e==null?void 0:e.length)>0&&!i&&e.map(P=>x.jsx(v5,{username:y||"",onDelete:()=>S(P.commentId),onEdit:(I,W)=>N({commentId:P.commentId,comment:I,commentType:W,hasAssets:P.hasAssets,isAlreadyVerified:P.taskVerified}),...P},P.commentId)),(e==null?void 0:e.length)===0&&!i&&x.jsxs("div",{className:"flex flex-1 flex-col items-center justify-end gap-3 text-center mb-1",children:[x.jsx("img",{src:ek,className:"opacity-70",alt:"Empty"}),x.jsx("p",{className:"text-gray-400",children:"There is no discussion in this Task."})]})]}),x.jsx(g1,{attachments:h,onChange:c,containerClassName:"fixed bottom-0 left-0 right-0 bg-white",clearKey:d,commentType:u,onCommentTypeChange:_,onAddAttachments:w,onRemoveAttachment:A,onSubmit:E,isOpen:n,actions:x.jsx(je,{category:"link",size:"normalCollapse",title:"Send comment",onClick:E,disabled:Ua(l)&&h.length===0,children:x.jsx(Ce,{icon:P4})})})]})]})},Kf=T.createContext({comments:[],openTaskDetails:null,username:void 0,setOpenTaskDetails:()=>{},prefetchQuery:e=>{}}),v1=()=>{if(!T.useContext(Kf))throw new Error("useCommentContext must be used within a CommentProvider");return T.useContext(Kf)},x5=({playbookInstanceId:e,children:t,username:n})=>{const[r,o]=T.useState({taskInstanceId:null,taskName:"",taskVerification:!1}),{taskInstanceId:i,taskName:s,taskVerification:a}=r||{taskInstanceId:null,taskName:"",taskVerification:!1},{comments:l,isLoading:c,prefetchQuery:u}=ak({taskInstanceId:i||0,enabled:i!==null,username:n});return x.jsxs(Kf.Provider,{value:{comments:l,openTaskDetails:r,setOpenTaskDetails:o,prefetchQuery:u,username:n},children:[t,Nn.createPortal(x.jsxs("div",{id:"cnfdnc-comment-box-root",children:[x.jsx("style",{children:qs}),x.jsx("div",{className:"confidence-playbook",children:x.jsx(b5,{playbookInstanceId:e,comments:l,onClose:()=>o(null),isOpen:!!i,taskName:s,taskInstanceId:i,isLoading:c,taskVerification:a})})]}),M4)]})},w5={[Be.OPEN]:"border-[#C1C5C8] bg-[#F0F1F2]",[Be.IN_PROGRESS]:"bg-[#E6F2FF] border-[#94C8FF]",[Be.IN_REVIEW]:"bg-[#EAF6EC] border-[#A5DAB1]",[Be.COMPLETED]:"bg-[#EAF6EC] border-[#A5DAB1]"},Bn={PHOTO:"photo",SCREENSHOT:"screenshot",COMMENT:"comment",NO_VERIFICATION:null},A5=({task:e,step:t,playbookType:n,onButtonClick:r,viewMode:o="card",canStart:i=!1,isExpanded:s=!1,toggleExpanded:a,playbookId:l,taskStyle:c,listStickyTopBase:u})=>{const[f,d]=T.useState(!1),{taskDetails:p,prefetchQuery:h}=LS({taskId:e.taskId,playbookId:l,enabled:s}),{setOpenTaskDetails:g,prefetchQuery:m}=v1(),{buttons:y}=Uw({taskStatus:e.workflowStatus,canStart:i}),v=T.useMemo(()=>e.imageRequired===0?Bn.NO_VERIFICATION:e.imageRequired===1?Bn.SCREENSHOT:e.imageRequired===2?Bn.PHOTO:e.imageRequired===4?Bn.COMMENT:null,[e.imageRequired]),b=async w=>{try{d(!0),await r(w)}finally{d(!1)}};if(o==="list"){const w=T.useMemo(()=>e.workflowStatus===Be.COMPLETED?"success":e.workflowStatus===Be.IN_PROGRESS?"primary":"default",[e.workflowStatus]),A=T.useMemo(()=>{const _=[];return y.forEach(E=>{E==="START"&&_.push({id:"START",color:"primary",action:"Start",to:Be.IN_PROGRESS}),E==="COMPLETE"&&(!e.taskVerified&&v===Bn.COMMENT&&_.push({id:"ADD_COMMENT",color:"danger",action:"Add Comment",to:"Required"}),_.push({id:"COMPLETE",color:"success",action:"Complete",to:Be.COMPLETED,disabled:!e.taskVerified&&v===Bn.COMMENT}))}),_},[y,v,e.taskVerified]);return x.jsxs("div",{className:Ee("flex flex-col"),children:[x.jsxs("div",{className:Ee("flex items-center gap-3 p-2 border-gray-200",e.sequenceOrder>0&&"border-t",s&&"bg-white rounded-md border border-t-none shadow-sm sticky"),style:{top:s?u:0},children:[x.jsx("div",{className:"text-gray-200 text-base",children:e.sequenceOrder+1}),x.jsx("div",{onClick:()=>{a==null||a(!s)},onMouseOver:h,className:Ee("flex-1 truncate cursor-pointer",s&&"font-medium",e.workflowStatus===Be.COMPLETED&&"text-secondary-400 line-through"),style:{color:e.workflowStatus===Be.IN_PROGRESS&&(c==null?void 0:c.titleColor)||"#1C232D"},children:e.taskInstanceName}),x.jsx(f4,{taskVerified:e.taskVerified,verificationType:v,title:e.workflowStatus,variant:w,transitions:A,onClick:_=>{if(_===ui.ADD_COMMENT){g({taskInstanceId:e.taskInstanceId,taskName:e.taskInstanceName,taskVerification:!0});return}r(_)}}),x.jsx(Yh,{onMouseOver:()=>m(e.taskInstanceId),commentsCount:(e==null?void 0:e.numberOfComments)||0,commentType:(e==null?void 0:e.recentCommentType)||dt.INFO,onClick:()=>g({taskInstanceId:e.taskInstanceId,taskName:e.taskInstanceName,taskVerification:!1})})]}),(p==null?void 0:p.description)&&x.jsx("div",{className:Ee(!s&&"hidden","border-gray-200 border p-2 mx-4 mb-4 border-t-none -mt-[1px] bg-gray-100 rounded-b-md"),children:x.jsx(Vh,{description:(p==null?void 0:p.description)||""})})]})}return x.jsxs("div",{className:Ss("flex items-stretch rounded-sm overflow-hidden border",w5[e.workflowStatus]),children:[x.jsx(m4,{playbookType:n,status:e.workflowStatus,step:t}),x.jsxs("div",{className:"flex w-full flex-col overflow-x-hidden flex-1 p-2",children:[n==="Sequential"&&x.jsx("div",{className:"-mb-3 self-end pr-2 pt-2",children:x.jsx(y4,{status:e.workflowStatus})}),x.jsxs("div",{className:"space-y-2 divide-y divide-black/10 flex flex-col flex-1",children:[x.jsx("div",{className:Ee("text-lg font-medium flex-1 pb-1"),style:{color:e.workflowStatus==="Completed"?"#1C232D":(c==null?void 0:c.titleColor)||"#1C232D"},children:e.taskInstanceName}),v?x.jsxs("div",{className:"flex items-center gap-2 text-sm pb-2",children:[x.jsx(Ce,{icon:Iy,className:"size-4"}),x.jsxs("div",{children:[x.jsx("span",{className:"font-medium",children:v===Bn.PHOTO?"Photo":v===Bn.SCREENSHOT?"Screenshot":"Comment"})," ","required"]})]}):x.jsx(x.Fragment,{})]}),(p==null?void 0:p.description)&&x.jsx("div",{className:Ee(!s&&"hidden"),children:x.jsx(Vh,{description:(p==null?void 0:p.description)||""})}),(y.length>0||e.hasDescription)&&x.jsxs("div",{className:"flex items-center justify-end gap-4 border-t border-black/10 pt-2",children:[x.jsx("div",{className:"flex-1",children:x.jsx(RS,{buttons:y,onButtonClick:b,disabled:f})}),x.jsx(Yh,{onMouseOver:()=>m(e.taskInstanceId),commentsCount:(e==null?void 0:e.numberOfComments)||0,commentType:(e==null?void 0:e.recentCommentType)||dt.INFO,onClick:()=>g({taskInstanceId:e.taskInstanceId,taskName:e.taskInstanceName,taskVerification:!1})}),a&&x.jsx(je,{size:"smallCollapse",onMouseOver:h,category:"link",onClick:()=>{a()},title:s?"Hide task description":"Show task description",children:x.jsx(Ce,{icon:Fy,className:Ss("cursor-pointer text-[#0069D9]",s?"rotate-180":"")})})]})]})]})},b1=T.forwardRef(({title:e,className:t,playbookStyle:n,...r},o)=>{var i,s,a;return x.jsx("div",{ref:o,className:Ee("border-b border-gray-200 flex items-center",t),style:{backgroundColor:((i=n==null?void 0:n.whiteLabel)==null?void 0:i.titleBackgroundColor)||"#f8f9fa"},...r,children:x.jsx("div",{className:Ee("text-xl min-h-16 p-4 font-medium flex-1",{"text-dark":!((s=n==null?void 0:n.whiteLabel)!=null&&s.titleTextColor)}),style:{color:(a=n==null?void 0:n.whiteLabel)==null?void 0:a.titleTextColor},children:e})})});b1.displayName="PlaybookHeader";const C5=({playbookInstanceId:e,playbookMode:t,playbookStyle:n,defaultExpanded:r=!0})=>{const{playbook:o,actions:i}=zw(e);if(!o)return x.jsx("div",{});const s=async(a,l)=>{var c;if(a===ui.COMPLETE){const u=(c=o.tasks.find(f=>f.taskInstanceId===l))==null?void 0:c.sequenceOrder;if(u===void 0){console.error("Task not found in playbook");return}return i.completeTask(l,u)}if(a===ui.START)return i.startTask(l)};return x.jsx("div",{className:"confidence-playbook",children:x.jsx(x1,{playbook:o,playbookMode:t,onTaskButtonClick:s,playbookStyle:n,defaultExpanded:r})})},_5=({className:e,children:t,numberOfTasks:n,playbookMode:r})=>x.jsxs("div",{className:Ee("w-full p-4",e),children:[n&&x.jsxs("div",{className:Ee(r==="card"&&"mb-4"),children:[x.jsx("span",{className:"font-medium",children:"Tasks"})," (",n,")"]}),x.jsx("div",{className:Ee(r==="card"&&"space-y-4"),children:t})]}),x1=({playbook:e,playbookMode:t,onTaskButtonClick:n,playbookStyle:r,defaultExpanded:o=!0})=>{var y,v,b,w,A;const{playbookInstanceName:i,tasks:s}=e,a=T.useRef(null),[l,c]=T.useState(0),[u,f]=T.useState(()=>{const _=P2(e.playbookInstanceId);return _!==null?_:o}),d=()=>{f(_=>{const E=!_;return O2(e.playbookInstanceId,E),E})},{isTaskExpanded:p,toggleTaskExpanded:h,isAtLeastOneTaskExpanded:g}=T0(e.playbookInstanceId,{onTaskExpanded:()=>{var _;c(((_=a.current)==null?void 0:_.offsetHeight)||0)}});T.useEffect(()=>{if(g){if(!a.current)throw new Error("Playbook header ref is not set");new ResizeObserver(E=>{var S;for(const N of E)N.contentRect&&c(((S=a.current)==null?void 0:S.offsetHeight)||0)}).observe(a.current)}return()=>{a.current&&new ResizeObserver(()=>{}).unobserve(a.current)}},[g]);const m=T.useMemo(()=>{const _=s.filter(E=>E.workflowStatus===Be.COMPLETED).sort((E,S)=>S.sequenceOrder-E.sequenceOrder)[0];return _?_.sequenceOrder+1:0},[s]);return x.jsxs("div",{className:Ee(!(r!=null&&r.overlay)&&"min-h-screen",(r==null?void 0:r.overlay)&&"fixed bottom-0 z-[9999999997] flex","transition-all duration-300 ease-in-out "),...(r==null?void 0:r.overlay)&&{style:{width:"100%",maxWidth:u?((y=r.overlay.size)==null?void 0:y.width)||450:"2.25rem",height:((v=r.overlay.size)==null?void 0:v.height)||"calc(100vh - 4rem)",maxHeight:"calc(100vh - 4rem)",right:((b=r.overlay.offset)==null?void 0:b.right)!==void 0?r.overlay.offset.right:r.overlay.position==="right"?32:void 0,left:((w=r.overlay.offset)==null?void 0:w.left)!==void 0?r.overlay.offset.left:r.overlay.position==="left"?32:void 0}},children:[(r==null?void 0:r.overlay)&&x.jsx("div",{onClick:d,className:Ee("size-9 relative p-1 top-3 z-[9999999997] border-none rounded-l-sm cursor-pointer"),style:{backgroundColor:((A=r==null?void 0:r.whiteLabel)==null?void 0:A.primaryColor)||"#007BFF",boxShadow:"0px 3px 3px 0px #00000040"},children:x.jsx("img",{src:p0,alt:"Confidence Logo",className:"w-full h-full object-contain"})}),x.jsxs("div",{className:Ee("flex flex-col flex-1 bg-gray-50",(r==null?void 0:r.overlay)&&"border border-gray-200 shadow-2xl rounded-t-sm overflow-y-auto"),children:[x.jsx(b1,{title:i,className:Ee("top-0 sticky z-2"),playbookStyle:r,ref:a}),x.jsx(_5,{playbookMode:t,numberOfTasks:e.numberofTasks,children:s.map((_,E)=>{var S;return x.jsx(A5,{task:_,step:E+1,viewMode:t,playbookId:e.playbookId,canStart:_.sequenceOrder===m,onButtonClick:N=>n(N,_.taskInstanceId),playbookType:"Non-Sequential",taskStyle:{titleColor:(S=r==null?void 0:r.whiteLabel)==null?void 0:S.primaryColor},isExpanded:p(_.taskInstanceId),toggleExpanded:()=>h(_.taskInstanceId),listStickyTopBase:l||104},_.taskId)})})]})]})},E5=({email:e,playbookId:t,playbookMode:n,playbookStyle:r,bank:o="public-sdk",timezone:i="America/Los_Angeles",persistKey:s,defaultExpanded:a=!0})=>{const[l,c]=T.useState(null);return T.useEffect(()=>{(async()=>{const u=q0(t,s);if(u&&u.email===e){c(u.playbookInstanceId);return}const{playbookInstanceId:f,errorCode:d,details:p,message:h}=await N0({bank:o,email:e,timezone:i,playbookUid:t})||{};if(d)throw new Error(`Error initiating playbook: ${h} (Code: ${d}) - Details: ${p}`);if(!f)throw new Error("No playbook instance ID returned from initiation");H0(t,f,e,s),c(f)})()},[]),l?x.jsx(Hr,{playbookInstanceId:l,playbookMode:n,playbookStyle:r,username:e,defaultExpanded:a}):null},S5=({playbookId:e,playbookMode:t="list",playbookStyle:n,btnLabel:r="Start Playbook",btnColor:o="primary",persistKey:i,defaultExpanded:s=!0})=>{const[a,l]=T.useState(null),[c,u]=T.useState(void 0);return T.useEffect(()=>{const f=q0(e,i);f&&(l(f.playbookInstanceId),u(f.email))},[e,i]),x.jsxs(x.Fragment,{children:[x.jsxs(Cl.div,{children:[x.jsx(UC,{playbookId:e,disabled:!!a,onInitiated:(f,d)=>{H0(e,f,d,i),l(f),u(d)},btnLabel:r,btnColor:o}),x.jsx("style",{type:"text/css",children:qs})]}),a&&x.jsx(Hr,{playbookInstanceId:a,playbookMode:t,playbookStyle:n,username:c,defaultExpanded:s})]})},Hr=({playbookInstanceId:e,playbookMode:t,playbookStyle:n,username:r,defaultExpanded:o=!0})=>(console.log("Starting ConfidencePlaybook with instance ID:",e,r),x.jsx(S0,{children:x.jsx(x5,{playbookInstanceId:e,username:r,children:x.jsx(C5,{playbookInstanceId:e,playbookMode:t,playbookStyle:n,defaultExpanded:o})})}));Hr.Context=S0;Hr.View=x1;Hr.AutoInstantiated=E5;Hr.WithInstantiateButton=S5;const w1=e=>Nn.createPortal(x.jsxs(Cl.div,{style:{position:"relative",zIndex:2147483646},children:[x.jsx("style",{children:qs}),x.jsx(Hr,{...e})]}),document.body),k5=e=>Nn.createPortal(x.jsxs(Cl.div,{style:{position:"relative",zIndex:2147483646},children:[x.jsx("style",{children:qs}),x.jsx(Hr.AutoInstantiated,{...e})]}),document.body);w1.AutoInstantiated=k5;exports.ConfidencePlaybook=w1;
606
+ `?c.insertParagraph():u===" "?c.insertNodes([na()]):c.insertText(u)}}}else t.insertRawText(s)}function Sg(e,t,n){e.dispatchCommand(v3,{nodes:t,selection:n})||(n.insertNodes(t),(function(r){if($(r)&&r.isCollapsed()){const o=r.anchor;let i=null;const s=nr(o,"previous");if(s)if(Or(s))i=s.origin;else{const a=Fr(s,un(We(),"next").getFlipped());for(const l of a){if(X(l.origin)){i=l.origin;break}if(R(l.origin)&&!l.origin.isInline())break}}if(i&&X(i)){const a=i.getFormat(),l=i.getStyle();r.format===a&&r.style===l||(r.format=a,r.style=l,r.dirty=!0)}}})(n))}function s1(e,t,n,r=[]){let o=t===null||n.isSelected(t);const i=R(n)&&n.excludeFromCopy("html");let s=n;t!==null&&X(s)&&(s=$x(t,s,"clone"));const a=R(s)?s.getChildren():[],l=(function(c){const u=c.exportJSON(),f=c.constructor;if(u.type!==f.getType()&&xl(58,f.name),R(c)){const d=u.children;Array.isArray(d)||xl(59,f.name)}return u})(s);X(s)&&s.getTextContentSize()===0&&(o=!1);for(let c=0;c<a.length;c++){const u=a[c],f=s1(e,t,u,l.children);!o&&R(n)&&f&&n.extractWithChild(u,t,"clone")&&(o=!0)}if(o&&!i)r.push(l);else if(Array.isArray(l.children))for(let c=0;c<l.children.length;c++){const u=l.children[c];r.push(u)}return o}function cN(e,t){const n=[],r=We().getChildren();for(let o=0;o<r.length;o++)s1(e,t,r[o],n);return{namespace:e._config.namespace,nodes:n}}function uN(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n],o=X3(r);X(o)&&F6(o),t.push(o)}return t}let ri=null;async function kg(e,t,n){if(ri!==null)return!1;if(t!==null)return new Promise((c,u)=>{e.update(()=>{c(Tg(e,t,n))})});const r=e.getRootElement(),o=e._window||window,i=o.document,s=en(o);if(r===null||s===null)return!1;const a=i.createElement("span");a.style.cssText="position: fixed; top: -1000px;",a.append(i.createTextNode("#")),r.append(a);const l=new Range;return l.setStart(a,0),l.setEnd(a,1),s.removeAllRanges(),s.addRange(l),new Promise((c,u)=>{const f=e.registerCommand(Zl,d=>(kr(d,ClipboardEvent)&&(f(),ri!==null&&(o.clearTimeout(ri),ri=null),c(Tg(e,d,n))),!0),px);ri=o.setTimeout(()=>{f(),ri=null,c(!1)},50),i.execCommand("copy"),a.remove()})}function Tg(e,t,n){if(n===void 0){const o=en(e._window),i=Z();if(!i||i.isCollapsed()||!o)return!1;const s=o.anchorNode,a=o.focusNode;if(s!==null&&a!==null&&!ia(e,s,a))return!1;n=fN(i)}t.preventDefault();const r=t.clipboardData;return r!==null&&(dN(r,n),!0)}const a1=[["text/html",aN],["application/x-lexical-editor",lN]];function fN(e=Z()){const t={"text/plain":e?e.getTextContent():""};if(e){const n=Jd();for(const[r,o]of a1){const i=o(n,e);i!==null&&(t[r]=i)}}return t}function dN(e,t){for(const[n]of a1)t[n]===void 0&&e.setData(n,"");for(const n in t){const r=t[n];r!==void 0&&e.setData(n,r)}}function Ng(e,t){if(document.caretRangeFromPoint!==void 0){const n=document.caretRangeFromPoint(e,t);return n===null?null:{node:n.startContainer,offset:n.startOffset}}if(document.caretPositionFromPoint!=="undefined"){const n=document.caretPositionFromPoint(e,t);return n===null?null:{node:n.offsetNode,offset:n.offset}}return null}const Ko=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,pN=Ko&&"documentMode"in document?document.documentMode:null,hN=Ko&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),mN=!(!Ko||!("InputEvent"in window)||pN)&&"getTargetRanges"in new window.InputEvent("input"),gN=Ko&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),Og=Ko&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,yN=Ko&&/^(?=.*Chrome).*/i.test(navigator.userAgent),vN=Ko&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&hN&&!yN,Pg=pe("DRAG_DROP_PASTE_FILE");function Ma(e){let t=null;if(kr(e,DragEvent)?t=e.dataTransfer:kr(e,ClipboardEvent)&&(t=e.clipboardData),t===null)return[!1,[],!1];const n=t.types,r=n.includes("Files"),o=n.includes("text/html")||n.includes("text/plain");return[r,Array.from(t.files),o]}function Mg(e){const t=Z();if(!$(t))return!1;const n=new Set,r=t.getNodes();for(let o=0;o<r.length;o++){const i=r[o],s=i.getKey();if(n.has(s))continue;const a=at(i,c=>R(c)&&!c.isInline());if(a===null)continue;const l=a.getKey();a.canIndent()&&!n.has(l)&&(n.add(l),e(a))}return n.size>0}function Ig(e){const t=Fi(e);return Te(t)}function su(e){for(const t of["lowercase","uppercase","capitalize"])e.hasFormat(t)&&e.toggleFormat(t)}function bN(e){return fn(e.registerCommand(Md,t=>{const n=Z();return!!ot(n)&&(n.clear(),!0)},we),e.registerCommand(vo,t=>{const n=Z();return $(n)?(n.deleteCharacter(t),!0):!!ot(n)&&(n.deleteNodes(),!0)},we),e.registerCommand(Rs,t=>{const n=Z();return!!$(n)&&(n.deleteWord(t),!0)},we),e.registerCommand(Ds,t=>{const n=Z();return!!$(n)&&(n.deleteLine(t),!0)},we),e.registerCommand(gi,t=>{const n=Z();if(typeof t=="string")n!==null&&n.insertText(t);else{if(n===null)return!1;const r=t.dataTransfer;if(r!=null)Eg(r,n,e);else if($(n)){const o=t.data;return o&&n.insertText(o),!0}}return!0},we),e.registerCommand(xf,()=>{const t=Z();return!!$(t)&&(t.removeText(),!0)},we),e.registerCommand(_n,t=>{const n=Z();return!!$(n)&&(n.formatText(t),!0)},we),e.registerCommand(C3,t=>{const n=Z();if(!$(n)&&!ot(n))return!1;const r=n.getNodes();for(const o of r){const i=at(o,s=>R(s)&&!s.isInline());i!==null&&i.setFormat(t)}return!0},we),e.registerCommand(mi,t=>{const n=Z();return!!$(n)&&(n.insertLineBreak(t),!0)},we),e.registerCommand(Ls,()=>{const t=Z();return!!$(t)&&(t.insertParagraph(),!0)},we),e.registerCommand(w3,()=>(sx([na()]),!0),we),e.registerCommand(A3,()=>Mg(t=>{const n=t.getIndent();t.setIndent(n+1)}),we),e.registerCommand(Mm,()=>Mg(t=>{const n=t.getIndent();n>0&&t.setIndent(Math.max(0,n-1))}),we),e.registerCommand(Ib,t=>{const n=Z();if(ot(n)){const r=n.getNodes();if(r.length>0)return t.preventDefault(),r[0].selectPrevious(),!0}else if($(n)){const r=If(n.focus,!0);if(!t.shiftKey&&Te(r)&&!r.isIsolated()&&!r.isInline())return r.selectPrevious(),t.preventDefault(),!0}return!1},we),e.registerCommand(Lb,t=>{const n=Z();if(ot(n)){const r=n.getNodes();if(r.length>0)return t.preventDefault(),r[0].selectNext(0,0),!0}else if($(n)){if((function(o){const i=o.focus;return i.key==="root"&&i.offset===We().getChildrenSize()})(n))return t.preventDefault(),!0;const r=If(n.focus,!1);if(!t.shiftKey&&Te(r)&&!r.isIsolated()&&!r.isInline())return r.selectNext(),t.preventDefault(),!0}return!1},we),e.registerCommand(Mb,t=>{const n=Z();if(ot(n)){const r=n.getNodes();if(r.length>0)return t.preventDefault(),mg(r[0])?r[0].selectNext(0,0):r[0].selectPrevious(),!0}if(!$(n))return!1;if(yg(n,!0)){const r=t.shiftKey;return t.preventDefault(),vg(n,r,!0),!0}return!1},we),e.registerCommand(Pb,t=>{const n=Z();if(ot(n)){const o=n.getNodes();if(o.length>0)return t.preventDefault(),mg(o[0])?o[0].selectPrevious():o[0].selectNext(0,0),!0}if(!$(n))return!1;const r=t.shiftKey;return!!yg(n,!1)&&(t.preventDefault(),vg(n,r,!1),!0)},we),e.registerCommand(Db,t=>{if(Ig(t.target))return!1;const n=Z();if($(n)){if((function(r){if(!r.isCollapsed())return!1;const{anchor:o}=r;if(o.offset!==0)return!1;const i=o.getNode();if(Ye(i))return!1;const s=B6(i);return s.getIndent()>0&&(s.is(i)||i.is(s.getFirstDescendant()))})(n))return t.preventDefault(),e.dispatchCommand(Mm,void 0);if(Og&&navigator.language==="ko-KR")return!1}else if(!ot(n))return!1;return t.preventDefault(),e.dispatchCommand(vo,!0)},we),e.registerCommand(Fb,t=>{if(Ig(t.target))return!1;const n=Z();return!(!$(n)&&!ot(n))&&(t.preventDefault(),e.dispatchCommand(vo,!1))},we),e.registerCommand(Fs,t=>{const n=Z();if(!$(n))return!1;if(su(n),t!==null){if((Og||gN||vN)&&mN)return!1;if(t.preventDefault(),t.shiftKey)return e.dispatchCommand(mi,!1)}return e.dispatchCommand(Ls,void 0)},we),e.registerCommand(Rd,()=>{const t=Z();return!!$(t)&&(e.blur(),!0)},we),e.registerCommand(zb,t=>{const[,n]=Ma(t);if(n.length>0){const o=Ng(t.clientX,t.clientY);if(o!==null){const{offset:i,node:s}=o,a=Fi(s);if(a!==null){const l=rx();if(X(a))l.anchor.set(a.getKey(),i,"text"),l.focus.set(a.getKey(),i,"text");else{const u=a.getParentOrThrow().getKey(),f=a.getIndexWithinParent()+1;l.anchor.set(u,f,"element"),l.focus.set(u,f,"element")}const c=Ri(l);Pt(c)}e.dispatchCommand(Pg,n)}return t.preventDefault(),!0}const r=Z();return!!$(r)},we),e.registerCommand($b,t=>{const[n]=Ma(t),r=Z();return!(n&&!$(r))},we),e.registerCommand(Ub,t=>{const[n]=Ma(t),r=Z();if(n&&!$(r))return!1;const o=Ng(t.clientX,t.clientY);if(o!==null){const i=Fi(o.node);Te(i)&&t.preventDefault()}return!0},we),e.registerCommand(wf,()=>(l6(),!0),we),e.registerCommand(Zl,t=>(kg(e,kr(t,ClipboardEvent)?t:null),!0),we),e.registerCommand(Dd,t=>((async function(n,r){await kg(r,kr(n,ClipboardEvent)?n:null),r.update(()=>{const o=Z();$(o)?o.removeText():ot(o)&&o.getNodes().forEach(i=>i.remove())})})(t,e),!0),we),e.registerCommand(Gl,t=>{const[,n,r]=Ma(t);return n.length>0&&!r?(e.dispatchCommand(Pg,n),!0):Xi(t.target)&&Hd(t.target)?!1:Z()!==null&&((function(o,i){o.preventDefault(),i.update(()=>{const s=Z(),a=kr(o,InputEvent)||kr(o,KeyboardEvent)?null:o.clipboardData;a!=null&&s!==null&&Eg(a,s,i)},{tag:F3})})(t,e),!0)},we),e.registerCommand(Rb,t=>{const n=Z();return $(n)&&su(n),!1},we),e.registerCommand(jb,t=>{const n=Z();return $(n)&&su(n),!1},we))}function xN(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const o of t)r.append("v",o);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const lp=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?T.useLayoutEffect:T.useEffect;function wN({editor:e,ErrorBoundary:t}){return(function(n,r){const[o,i]=T.useState(()=>n.getDecorators());return lp(()=>n.registerDecoratorListener(s=>{Nn.flushSync(()=>{i(s)})}),[n]),T.useEffect(()=>{i(n.getDecorators())},[n]),T.useMemo(()=>{const s=[],a=Object.keys(o);for(let l=0;l<a.length;l++){const c=a[l],u=x.jsx(r,{onError:d=>n._onError(d),children:x.jsx(T.Suspense,{fallback:null,children:o[c]})}),f=n.getElementByKey(c);f!==null&&s.push(Nn.createPortal(u,f,c))}return s},[r,o,n])})(e,t)}function AN({editor:e,ErrorBoundary:t}){return(function(n){const r=bi.maybeFromEditor(n);if(r&&r.hasExtensionByName(tN.name)){for(const o of["@lexical/plain-text","@lexical/rich-text"])r.hasExtensionByName(o)&&xN(320,o);return!0}return!1})(e)?null:x.jsx(wN,{editor:e,ErrorBoundary:t})}function Lg(e){return e.getEditorState().read(e1(e.isComposing()))}function CN({contentEditable:e,placeholder:t=null,ErrorBoundary:n}){const[r]=pt();return(function(o){lp(()=>fn(bN(o),iN(o)),[o])})(r),x.jsxs(x.Fragment,{children:[e,x.jsx(_N,{content:t}),x.jsx(AN,{editor:r,ErrorBoundary:n})]})}function _N({content:e}){const[t]=pt(),n=(function(o){const[i,s]=T.useState(()=>Lg(o));return lp(()=>{function a(){const l=Lg(o);s(l)}return a(),fn(o.registerUpdateListener(()=>{a()}),o.registerEditableListener(()=>{a()}))},[o]),i})(t),r=R6();return n?typeof e=="function"?e(r):e:null}function EN(e,t,n,r,o){if(e===null||n.size===0&&r.size===0&&!o)return 0;const i=t._selection,s=e._selection;if(o)return 1;if(!($(i)&&$(s)&&s.isCollapsed()&&i.isCollapsed()))return 0;const a=(function(y,v,b){const w=y._nodeMap,A=[];for(const _ of v){const E=w.get(_);E!==void 0&&A.push(E)}for(const[_,E]of b){if(!E)continue;const S=w.get(_);S===void 0||Ye(S)||A.push(S)}return A})(t,n,r);if(a.length===0)return 0;if(a.length>1){const y=t._nodeMap,v=y.get(i.anchor.key),b=y.get(s.anchor.key);return v&&b&&!e._nodeMap.has(v.__key)&&X(v)&&v.__text.length===1&&i.anchor.offset===1?2:0}const l=a[0],c=e._nodeMap.get(l.__key);if(!X(c)||!X(l)||c.__mode!==l.__mode)return 0;const u=c.__text,f=l.__text;if(u===f)return 0;const d=i.anchor,p=s.anchor;if(d.key!==p.key||d.type!=="text")return 0;const h=d.offset,g=p.offset,m=f.length-u.length;return m===1&&g===h-1?2:m===-1&&g===h+1?3:m===-1&&g===h?4:0}function SN(e,t){let n=Date.now(),r=0;return(o,i,s,a,l,c)=>{const u=Date.now();if(c.has(Nf))return r=0,n=u,2;const f=EN(o,i,a,l,e.isComposing()),d=(()=>{const p=s===null||s.editor===e,h=c.has(D3);if(!h&&p&&c.has(bo))return 0;if(o===null)return 1;const g=i._selection;if(!(a.size>0||l.size>0))return g!==null?0:2;const m=typeof t=="number"?t:t.peek();return h===!1&&f!==0&&f===r&&u<n+m&&p||a.size===1&&(function(y,v,b){const w=v._nodeMap.get(y),A=b._nodeMap.get(y),_=v._selection,E=b._selection;return!($(_)&&$(E)&&_.anchor.type==="element"&&_.focus.type==="element"&&E.anchor.type==="text"&&E.focus.type==="text"||!X(w)||!X(A)||w.__parent!==A.__parent)&&JSON.stringify(v.read(()=>w.exportJSON()))===JSON.stringify(b.read(()=>A.exportJSON()))})(Array.from(a)[0],o,i)?0:1})();return n=u,r=f,d}}function Rg(e){e.undoStack=[],e.redoStack=[],e.current=null}function l1(e,t,n){const r=SN(e,n);return fn(e.registerCommand(Id,()=>((function(i,s){const a=s.redoStack,l=s.undoStack;if(l.length!==0){const c=s.current,u=l.pop();c!==null&&(a.push(c),i.dispatchCommand(Ca,!0)),l.length===0&&i.dispatchCommand(_a,!1),s.current=u||null,u&&u.editor.setEditorState(u.editorState,{tag:Nf})}})(e,t),!0),we),e.registerCommand(Ld,()=>((function(i,s){const a=s.redoStack,l=s.undoStack;if(a.length!==0){const c=s.current;c!==null&&(l.push(c),i.dispatchCommand(_a,!0));const u=a.pop();a.length===0&&i.dispatchCommand(Ca,!1),s.current=u||null,u&&u.editor.setEditorState(u.editorState,{tag:Nf})}})(e,t),!0),we),e.registerCommand(E3,()=>(Rg(t),!1),we),e.registerCommand(S3,()=>(Rg(t),e.dispatchCommand(Ca,!1),e.dispatchCommand(_a,!1),!0),we),e.registerUpdateListener(({editorState:i,prevEditorState:s,dirtyLeaves:a,dirtyElements:l,tags:c})=>{const u=t.current,f=t.redoStack,d=t.undoStack,p=u===null?null:u.editorState;if(u!==null&&i===p)return;const h=r(s,i,u,a,l,c);if(h===1)f.length!==0&&(t.redoStack=[],e.dispatchCommand(Ca,!1)),u!==null&&(d.push({...u}),e.dispatchCommand(_a,!0));else if(h===2)return;t.current={editor:e,editorState:i}}))}function c1(){return{current:null,redoStack:[],undoStack:[]}}const au={build:(e,{delay:t,createInitialHistoryState:n,disabled:r})=>Gx({delay:t,disabled:r,historyState:n(e)}),config:{createInitialHistoryState:c1,delay:300,disabled:typeof window>"u"},name:"@lexical/history/History",register:(e,t,n)=>{const r=n.getOutput();return $s(()=>r.disabled.value?void 0:l1(e,r.historyState.value,r.delay))}};N6(au,{createInitialHistoryState:()=>{throw new Error("SharedHistory did not inherit parent history")},disabled:!0});function kN({delay:e,externalHistoryState:t}){const[n]=pt();return(function(r,o,i=1e3){const s=T.useMemo(()=>o||c1(),[o]);T.useEffect(()=>l1(r,s,i),[i,r,s])})(n,t,e),null}const u1=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?T.useLayoutEffect:T.useEffect;function TN({editor:e,ariaActiveDescendant:t,ariaAutoComplete:n,ariaControls:r,ariaDescribedBy:o,ariaErrorMessage:i,ariaExpanded:s,ariaInvalid:a,ariaLabel:l,ariaLabelledBy:c,ariaMultiline:u,ariaOwns:f,ariaRequired:d,autoCapitalize:p,className:h,id:g,role:m="textbox",spellCheck:y=!0,style:v,tabIndex:b,"data-testid":w,...A},_){const[E,S]=T.useState(e.isEditable()),N=T.useCallback(I=>{I&&I.ownerDocument&&I.ownerDocument.defaultView?e.setRootElement(I):e.setRootElement(null)},[e]),P=T.useMemo(()=>(function(...I){return W=>{for(const j of I)typeof j=="function"?j(W):j!=null&&(j.current=W)}})(_,N),[N,_]);return u1(()=>(S(e.isEditable()),e.registerEditableListener(I=>{S(I)})),[e]),x.jsx("div",{"aria-activedescendant":E?t:void 0,"aria-autocomplete":E?n:"none","aria-controls":E?r:void 0,"aria-describedby":o,...i!=null?{"aria-errormessage":i}:{},"aria-expanded":E&&m==="combobox"?!!s:void 0,...a!=null?{"aria-invalid":a}:{},"aria-label":l,"aria-labelledby":c,"aria-multiline":u,"aria-owns":E?f:void 0,"aria-readonly":!E||void 0,"aria-required":d,autoCapitalize:p,className:h,contentEditable:E,"data-testid":w,id:g,ref:P,role:m,spellCheck:y,style:v,tabIndex:b,...A})}const NN=T.forwardRef(TN);function Dg(e){return e.getEditorState().read(e1(e.isComposing()))}const ON=T.forwardRef(PN);function PN(e,t){const{placeholder:n,...r}=e,[o]=pt();return x.jsxs(x.Fragment,{children:[x.jsx(NN,{editor:o,...r,ref:t}),n!=null&&x.jsx(MN,{editor:o,content:n})]})}function MN({content:e,editor:t}){const n=(function(s){const[a,l]=T.useState(()=>Dg(s));return u1(()=>{function c(){const u=Dg(s);l(u)}return c(),fn(s.registerUpdateListener(()=>{c()}),s.registerEditableListener(()=>{c()}))},[s]),a})(t),[r,o]=T.useState(t.isEditable());if(T.useLayoutEffect(()=>(o(t.isEditable()),t.registerEditableListener(s=>{o(s)})),[t]),!n)return null;let i=null;return typeof e=="function"?i=e(r):e!==null&&(i=e),i===null?null:x.jsx("div",{"aria-hidden":!0,children:i})}const IN=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?T.useLayoutEffect:T.useEffect;function LN({ignoreHistoryMergeTagChange:e=!0,ignoreSelectionChange:t=!1,onChange:n}){const[r]=pt();return IN(()=>{if(n)return r.registerUpdateListener(({editorState:o,dirtyElements:i,dirtyLeaves:s,prevEditorState:a,tags:l})=>{t&&i.size===0&&s.size===0||e&&l.has(bo)||a.isEmpty()||n(o,r,l)})},[r,e,t,n]),null}const RN=T.createContext(null),lu={didCatch:!1,error:null};class DN extends T.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=lu}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(...t){var r,o;const{error:n}=this.state;n!==null&&((o=(r=this.props).onReset)==null||o.call(r,{args:t,reason:"imperative-api"}),this.setState(lu))}componentDidCatch(t,n){var r,o;(o=(r=this.props).onError)==null||o.call(r,t,n)}componentDidUpdate(t,n){var i,s;const{didCatch:r}=this.state,{resetKeys:o}=this.props;r&&n.error!==null&&FN(t.resetKeys,o)&&((s=(i=this.props).onReset)==null||s.call(i,{next:o,prev:t.resetKeys,reason:"keys"}),this.setState(lu))}render(){const{children:t,fallbackRender:n,FallbackComponent:r,fallback:o}=this.props,{didCatch:i,error:s}=this.state;let a=t;if(i){const l={error:s,resetErrorBoundary:this.resetErrorBoundary};if(typeof n=="function")a=n(l);else if(r)a=T.createElement(r,l);else if(o!==void 0)a=o;else throw s}return T.createElement(RN.Provider,{value:{didCatch:i,error:s,resetErrorBoundary:this.resetErrorBoundary}},a)}}function FN(e=[],t=[]){return e.length!==t.length||e.some((n,r)=>!Object.is(n,t[r]))}function jN({children:e,onError:t}){return x.jsx(DN,{fallback:x.jsx("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"},children:"An error was thrown."}),onError:t,children:e})}const zN={paragraph:"m-0",list:{ol:"list-decimal pl-4",ul:"list-disc pl-4"},text:{bold:"font-semibold",italic:"italic",underline:"underline",strikethrough:"line-through",code:"font-mono"},link:"text-blue-600 hover:text-blue-600 underline cursor-pointer"};function Tr(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const o of t)r.append("v",o);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function Uf(e){let t=1,n=e.getParent();for(;n!=null;){if(ke(n)){const r=n.getParent();if(be(r)){t++,n=r.getParent();continue}Tr(40)}return t}return t}function Bf(e){let t=e.getParent();be(t)||Tr(40);let n=t;for(;n!==null;)n=n.getParent(),be(n)&&(t=n);return t}function f1(e){let t=[];const n=e.getChildren().filter(ke);for(let r=0;r<n.length;r++){const o=n[r],i=o.getFirstChild();be(i)?t=t.concat(f1(i)):t.push(o)}return t}function wn(e){return ke(e)&&be(e.getFirstChild())}function Fg(e){return Zt().append(e)}function d1(e,t){return ke(e)&&(t.length===0||t.length===1&&e.is(t[0])&&e.getChildrenSize()===0)}function jg(e){const t=Z();if(t!==null){let n=t.getNodes();if($(t)){const o=t.getStartEndPoints();o===null&&Tr(143);const[i]=o,s=i.getNode(),a=s.getParent();if(jt(s)){const l=s.getFirstChild();if(l)n=l.selectStart().getNodes();else{const c=Tt();s.append(c),n=c.select().getNodes()}}else if(d1(s,n)){const l=Bt(e);if(jt(a)){s.replace(l);const c=Zt();R(s)&&(c.setFormat(s.getFormatType()),c.setIndent(s.getIndent())),l.append(c)}else if(ke(s)){const c=s.getParentOrThrow();Uo(l,c.getChildren()),c.replace(l)}return}}const r=new Set;for(let o=0;o<n.length;o++){const i=n[o];if(R(i)&&i.isEmpty()&&!ke(i)&&!r.has(i.getKey())){zg(i,e);continue}let s=xx(i)?i.getParent():ke(i)&&i.isEmpty()?i:null;for(;s!=null;){const a=s.getKey();if(be(s)){if(!r.has(a)){const l=Bt(e);Uo(l,s.getChildren()),s.replace(l),r.add(a)}break}{const l=s.getParent();if(jt(l)&&!r.has(a)){r.add(a),zg(s,e);break}s=l}}}}}function Uo(e,t){e.splice(e.getChildrenSize(),0,t)}function zg(e,t){if(be(e))return e;const n=e.getPreviousSibling(),r=e.getNextSibling(),o=Zt();let i;if(Uo(o,e.getChildren()),be(n)&&t===n.getListType())n.append(o),be(r)&&t===r.getListType()&&(Uo(n,r.getChildren()),r.remove()),i=n;else if(be(r)&&t===r.getListType())r.getFirstChildOrThrow().insertBefore(o),i=r;else{const s=Bt(t);s.append(o),e.replace(s),i=s}return o.setFormat(e.getFormatType()),o.setIndent(e.getIndent()),e.remove(),i}function cp(e,t){const n=e.getLastChild(),r=t.getFirstChild();n&&r&&wn(n)&&wn(r)&&(cp(n.getFirstChild(),r.getFirstChild()),r.remove());const o=t.getChildren();o.length>0&&e.append(...o),t.remove()}function $N(){const e=Z();if($(e)){const t=new Set,n=e.getNodes(),r=e.anchor.getNode();if(d1(r,n))t.add(Bf(r));else for(let o=0;o<n.length;o++){const i=n[o];if(xx(i)){const s=U6(i,ts);s!=null&&t.add(Bf(s))}}for(const o of t){let i=o;const s=f1(o);for(const a of s){const l=Tt().setTextStyle(e.style).setTextFormat(e.format);Uo(l,a.getChildren()),i.insertAfter(l),i=l,a.__key===e.anchor.key&&$o(e.anchor,Yt(un(l,"next"))),a.__key===e.focus.key&&$o(e.focus,Yt(un(l,"next"))),a.remove()}o.remove()}}}function p1(e){const t=e.getListType()!=="check";let n=e.getStart();for(const r of e.getChildren())ke(r)&&(r.getValue()!==n&&r.setValue(n),t&&r.getLatest().__checked!=null&&r.setChecked(void 0),be(r.getFirstChild())||n++)}function UN(e){const t=new Set;if(wn(e)||t.has(e.getKey()))return;const n=e.getParent(),r=e.getNextSibling(),o=e.getPreviousSibling();if(wn(r)&&wn(o)){const i=o.getFirstChild();if(be(i)){i.append(e);const s=r.getFirstChild();be(s)&&(Uo(i,s.getChildren()),r.remove(),t.add(r.getKey()))}}else if(wn(r)){const i=r.getFirstChild();if(be(i)){const s=i.getFirstChild();s!==null&&s.insertBefore(e)}}else if(wn(o)){const i=o.getFirstChild();be(i)&&i.append(e)}else if(be(n)){const i=Zt().setTextFormat(e.getTextFormat()).setTextStyle(e.getTextStyle()),s=Bt(n.getListType()).setTextFormat(n.getTextFormat()).setTextStyle(n.getTextStyle());i.append(s),s.append(e),o?o.insertAfter(i):r?r.insertBefore(i):n.append(i)}}function BN(e){if(wn(e))return;const t=e.getParent(),n=t?t.getParent():void 0;if(be(n?n.getParent():void 0)&&ke(n)&&be(t)){const r=t?t.getFirstChild():void 0,o=t?t.getLastChild():void 0;if(e.is(r))n.insertBefore(e),t.isEmpty()&&n.remove();else if(e.is(o))n.insertAfter(e),t.isEmpty()&&n.remove();else{const i=t.getListType(),s=Zt(),a=Bt(i);s.append(a),e.getPreviousSiblings().forEach(u=>a.append(u));const l=Zt(),c=Bt(i);l.append(c),Uo(c,e.getNextSiblings()),n.insertBefore(s),n.insertAfter(l),n.replace(e)}}}function WN(){const e=Z();if(!$(e)||!e.isCollapsed())return!1;const t=e.anchor.getNode();if(!ke(t)||t.getChildrenSize()!==0)return!1;const n=Bf(t),r=t.getParent();be(r)||Tr(40);const o=r.getParent();let i;if(jt(o))i=Tt(),n.insertAfter(i);else{if(!ke(o))return!1;i=Zt(),o.insertAfter(i)}i.setTextStyle(e.style).setTextFormat(e.format).select();const s=t.getNextSiblings();if(s.length>0){const a=Bt(r.getListType());if(ke(i)){const l=Zt();l.append(a),i.insertAfter(l)}else i.insertAfter(a);a.append(...s)}return(function(a){let l=a;for(;l.getNextSibling()==null&&l.getPreviousSibling()==null;){const c=l.getParent();if(c==null||!ke(c)&&!be(c))break;l=c}l.remove()})(t),!0}function wl(...e){const t=[];for(const n of e)if(n&&typeof n=="string")for(const[r]of n.matchAll(/\S+/g))t.push(r);return t}class ts extends Mn{constructor(n=1,r=void 0,o){super(o);D(this,"__value");D(this,"__checked");this.__value=n===void 0?1:n,this.__checked=r}$config(){return this.config("listitem",{$transform:n=>{if(n.__checked==null)return;const r=n.getParent();be(r)&&r.getListType()!=="check"&&n.getChecked()!=null&&n.setChecked(void 0)},extends:Mn,importDOM:{li:()=>({conversion:KN,priority:0})}})}afterCloneFrom(n){super.afterCloneFrom(n),this.__value=n.__value,this.__checked=n.__checked}createDOM(n){const r=document.createElement("li");return this.updateListItemDOM(null,r,n),r}updateListItemDOM(n,r,o){(function(a,l,c){const u=l.getParent();!be(u)||u.getListType()!=="check"||be(l.getFirstChild())?(a.removeAttribute("role"),a.removeAttribute("tabIndex"),a.removeAttribute("aria-checked")):(a.setAttribute("role","checkbox"),a.setAttribute("tabIndex","-1"),c&&l.__checked===c.__checked||a.setAttribute("aria-checked",l.getChecked()?"true":"false"))})(r,this,n),r.value=this.__value,(function(a,l,c){const u=[],f=[],d=l.list,p=d?d.listitem:void 0;let h;if(d&&d.nested&&(h=d.nested.listitem),p!==void 0&&u.push(...wl(p)),d){const g=c.getParent(),m=be(g)&&g.getListType()==="check",y=c.getChecked();m&&!y||f.push(d.listitemUnchecked),m&&y||f.push(d.listitemChecked),m&&u.push(y?d.listitemChecked:d.listitemUnchecked)}if(h!==void 0){const g=wl(h);c.getChildren().some(m=>be(m))?u.push(...g):f.push(...g)}f.length>0&&qx(a,...f),u.length>0&&ip(a,...u)})(r,o.theme,this);const i=n?n.__style:"",s=this.__style;i!==s&&(s===""?r.removeAttribute("style"):r.style.cssText=s),(function(a,l,c){const u=hg(l.__textStyle);for(const f in u)a.style.setProperty(`--listitem-marker-${f}`,u[f]);if(c)for(const f in hg(c.__textStyle))f in u||a.style.removeProperty(`--listitem-marker-${f}`)})(r,this,n)}updateDOM(n,r,o){const i=r;return this.updateListItemDOM(n,i,o),!1}updateFromJSON(n){return super.updateFromJSON(n).setValue(n.value).setChecked(n.checked)}exportDOM(n){const r=this.createDOM(n._config),o=this.getFormatType();o&&(r.style.textAlign=o);const i=this.getDirection();return i&&(r.dir=i),{element:r}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),value:this.getValue()}}append(...n){for(let r=0;r<n.length;r++){const o=n[r];if(R(o)&&this.canMergeWith(o)){const i=o.getChildren();this.append(...i),o.remove()}else super.append(o)}return this}replace(n,r){if(ke(n))return super.replace(n);this.setIndent(0);const o=this.getParentOrThrow();if(!be(o))return n;if(o.__first===this.getKey())o.insertBefore(n);else if(o.__last===this.getKey())o.insertAfter(n);else{const i=Bt(o.getListType());let s=this.getNextSibling();for(;s;){const a=s;s=s.getNextSibling(),i.append(a)}o.insertAfter(n),n.insertAfter(i)}return r&&(R(n)||Tr(139),this.getChildren().forEach(i=>{n.append(i)})),this.remove(),o.getChildrenSize()===0&&o.remove(),n}insertAfter(n,r=!0){const o=this.getParentOrThrow();if(be(o)||Tr(39),ke(n))return super.insertAfter(n,r);const i=this.getNextSiblings();if(o.insertAfter(n,r),i.length!==0){const s=Bt(o.getListType());i.forEach(a=>s.append(a)),n.insertAfter(s,r)}return n}remove(n){const r=this.getPreviousSibling(),o=this.getNextSibling();super.remove(n),r&&o&&wn(r)&&wn(o)&&(cp(r.getFirstChild(),o.getFirstChild()),o.remove())}insertNewAfter(n,r=!0){const o=Zt().updateFromJSON(this.exportJSON()).setChecked(!this.getChecked()&&void 0);return this.insertAfter(o,r),o}collapseAtStart(n){const r=Tt();this.getChildren().forEach(a=>r.append(a));const o=this.getParentOrThrow(),i=o.getParentOrThrow(),s=ke(i);if(o.getChildrenSize()===1)if(s)o.remove(),i.select();else{o.insertBefore(r),o.remove();const a=n.anchor,l=n.focus,c=r.getKey();a.type==="element"&&a.getNode().is(this)&&a.set(c,a.offset,"element"),l.type==="element"&&l.getNode().is(this)&&l.set(c,l.offset,"element")}else o.insertBefore(r),this.remove();return!0}getValue(){return this.getLatest().__value}setValue(n){const r=this.getWritable();return r.__value=n,r}getChecked(){const n=this.getLatest();let r;const o=this.getParent();return be(o)&&(r=o.getListType()),r==="check"?!!n.__checked:void 0}setChecked(n){const r=this.getWritable();return r.__checked=n,r}toggleChecked(){const n=this.getWritable();return n.setChecked(!n.__checked)}getIndent(){const n=this.getParent();if(n===null||!this.isAttached())return this.getLatest().__indent;let r=n.getParentOrThrow(),o=0;for(;ke(r);)r=r.getParentOrThrow().getParentOrThrow(),o++;return o}setIndent(n){typeof n!="number"&&Tr(117),(n=Math.floor(n))>=0||Tr(199);let r=this.getIndent();for(;r!==n;)r<n?(UN(this),r++):(BN(this),r--);return this}canInsertAfter(n){return ke(n)}canReplaceWith(n){return ke(n)}canMergeWith(n){return ke(n)||Bd(n)}extractWithChild(n,r){if(!$(r))return!1;const o=r.anchor.getNode(),i=r.focus.getNode();return this.isParentOf(o)&&this.isParentOf(i)&&this.getTextContent().length===r.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return Bt("bullet")}canMergeWhenEmpty(){return!0}}function KN(e){if(e.classList.contains("task-list-item")){for(const n of e.children)if(n.tagName==="INPUT")return $g(n)}if(e.classList.contains("joplin-checkbox")){for(const n of e.children)if(n.classList.contains("checkbox-wrapper")&&n.children.length>0&&n.children[0].tagName==="INPUT")return $g(n.children[0])}const t=e.getAttribute("aria-checked");return{node:Zt(t==="true"||t!=="false"&&void 0)}}function $g(e){return e.getAttribute("type")!=="checkbox"?{node:null}:{node:Zt(e.hasAttribute("checked"))}}function Zt(e){return Kr(new ts(void 0,e))}function ke(e){return e instanceof ts}class aa extends Mn{constructor(n="number",r=1,o){super(o);D(this,"__tag");D(this,"__start");D(this,"__listType");const i=qN[n]||n;this.__listType=i,this.__tag=i==="number"?"ol":"ul",this.__start=r}$config(){return this.config("list",{$transform:n=>{(function(r){const o=r.getNextSibling();be(o)&&r.getListType()===o.getListType()&&cp(r,o)})(n),p1(n)},extends:Mn,importDOM:{ol:()=>({conversion:Bg,priority:0}),ul:()=>({conversion:Bg,priority:0})}})}afterCloneFrom(n){super.afterCloneFrom(n),this.__listType=n.__listType,this.__tag=n.__tag,this.__start=n.__start}getTag(){return this.getLatest().__tag}setListType(n){const r=this.getWritable();return r.__listType=n,r.__tag=n==="number"?"ol":"ul",r}getListType(){return this.getLatest().__listType}getStart(){return this.getLatest().__start}setStart(n){const r=this.getWritable();return r.__start=n,r}createDOM(n,r){const o=this.__tag,i=document.createElement(o);return this.__start!==1&&i.setAttribute("start",String(this.__start)),i.__lexicalListType=this.__listType,Ug(i,n.theme,this),i}updateDOM(n,r,o){return n.__tag!==this.__tag||n.__listType!==this.__listType||(Ug(r,o.theme,this),!1)}updateFromJSON(n){return super.updateFromJSON(n).setListType(n.listType).setStart(n.start)}exportDOM(n){const r=this.createDOM(n._config,n);return ht(r)&&(this.__start!==1&&r.setAttribute("start",String(this.__start)),this.__listType==="check"&&r.setAttribute("__lexicalListType","check")),{element:r}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag()}}canBeEmpty(){return!1}canIndent(){return!1}splice(n,r,o){let i=o;for(let s=0;s<o.length;s++){const a=o[s];ke(a)||(i===o&&(i=[...o]),i[s]=Zt().append(!R(a)||be(a)||a.isInline()?a:rt(a.getTextContent())))}return super.splice(n,r,i)}extractWithChild(n){return ke(n)}}function Ug(e,t,n){const r=[],o=[],i=t.list;if(i!==void 0){const s=i[`${n.__tag}Depth`]||[],a=Uf(n)-1,l=a%s.length,c=s[l],u=i[n.__tag];let f;const d=i.nested,p=i.checklist;if(d!==void 0&&d.list&&(f=d.list),u!==void 0&&r.push(u),p!==void 0&&n.__listType==="check"&&r.push(p),c!==void 0){r.push(...wl(c));for(let h=0;h<s.length;h++)h!==l&&o.push(n.__tag+h)}if(f!==void 0){const h=wl(f);a>1?r.push(...h):o.push(...h)}}o.length>0&&qx(e,...o),r.length>0&&ip(e,...r)}function HN(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n];if(ke(r)){t.push(r);const o=r.getChildren();o.length>1&&o.forEach(i=>{be(i)&&t.push(Fg(i))})}else t.push(Fg(r))}return t}function Bg(e){const t=e.nodeName.toLowerCase();let n=null;return t==="ol"?n=Bt("number",e.start):t==="ul"&&(n=(function(r){if(r.getAttribute("__lexicallisttype")==="check"||r.classList.contains("contains-task-list")||r.getAttribute("data-is-checklist")==="1")return!0;for(const o of r.childNodes)if(ht(o)&&o.hasAttribute("aria-checked"))return!0;return!1})(e)?Bt("check"):Bt("bullet")),{after:HN,node:n}}const qN={ol:"number",ul:"bullet"};function Bt(e="number",t=1){return Kr(new aa(e,t))}function be(e){return e instanceof aa}const VN=pe("UPDATE_LIST_START_COMMAND"),h1=pe("INSERT_UNORDERED_LIST_COMMAND"),m1=pe("INSERT_ORDERED_LIST_COMMAND"),Wf=pe("REMOVE_LIST_COMMAND");function YN(e){return fn(e.registerCommand(m1,()=>(jg("number"),!0),Gn),e.registerCommand(VN,t=>{const{listNodeKey:n,newStart:r}=t,o=Xe(n);return!!be(o)&&(o.getListType()==="number"&&(o.setStart(r),p1(o)),!0)},Gn),e.registerCommand(h1,()=>(jg("bullet"),!0),Gn),e.registerCommand(Wf,()=>($N(),!0),Gn),e.registerCommand(Ls,()=>WN(),Gn),e.registerNodeTransform(ts,t=>{const n=t.getFirstChild();if(n){if(X(n)){const r=n.getStyle(),o=n.getFormat();t.getTextStyle()!==r&&t.setTextStyle(r),t.getTextFormat()!==o&&t.setTextFormat(o)}}else{const r=Z();$(r)&&(r.style!==t.getTextStyle()||r.format!==t.getTextFormat())&&r.isCollapsed()&&t.is(r.anchor.getNode())&&t.setTextStyle(r.style).setTextFormat(r.format)}}),e.registerNodeTransform(Br,t=>{const n=t.getParent();if(ke(n)&&t.is(n.getFirstChild())){const r=t.getStyle(),o=t.getFormat();r===n.getTextStyle()&&o===n.getTextFormat()||n.setTextStyle(r).setTextFormat(o)}}))}function QN(e){const t=n=>{const r=n.getParent();if(be(n.getFirstChild())||!be(r))return;const o=at(n,i=>ke(i)&&be(i.getParent())&&ke(i.getPreviousSibling()));if(o===null&&n.getIndent()>0)n.setIndent(0);else if(ke(o)){const i=o.getPreviousSibling();if(ke(i)){const s=(function(l){let c=l,u=c.getFirstChild();for(;be(u);){const f=u.getLastChild();if(!ke(f))break;c=f,u=c.getFirstChild()}return c})(i),a=s.getParent();if(be(a)){const l=Uf(a);l+1<Uf(r)&&n.setIndent(l)}}}};return e.registerNodeTransform(aa,n=>{const r=[n];for(;r.length>0;){const o=r.shift();if(be(o)){for(const i of o.getChildren())if(ke(i)){t(i);const s=i.getFirstChild();be(s)&&r.push(s)}}}})}const GN=new Set(["http:","https:","mailto:","sms:","tel:"]);class Ho extends Mn{constructor(n="",r={},o){super(o);D(this,"__url");D(this,"__target");D(this,"__rel");D(this,"__title");const{target:i=null,rel:s=null,title:a=null}=r;this.__url=n,this.__target=i,this.__rel=s,this.__title=a}static getType(){return"link"}static clone(n){return new Ho(n.__url,{rel:n.__rel,target:n.__target,title:n.__title},n.__key)}createDOM(n){const r=document.createElement("a");return this.updateLinkDOM(null,r,n),ip(r,n.theme.link),r}updateLinkDOM(n,r,o){if(Nx(r)){n&&n.__url===this.__url||(r.href=this.sanitizeUrl(this.__url));for(const i of["target","rel","title"]){const s=`__${i}`,a=this[s];n&&n[s]===a||(a?r[i]=a:r.removeAttribute(i))}}}updateDOM(n,r,o){return this.updateLinkDOM(n,r,o),!1}static importDOM(){return{a:n=>({conversion:ZN,priority:1})}}static importJSON(n){return Co().updateFromJSON(n)}updateFromJSON(n){return super.updateFromJSON(n).setURL(n.url).setRel(n.rel||null).setTarget(n.target||null).setTitle(n.title||null)}sanitizeUrl(n){n=Hg(n);try{const r=new URL(Hg(n));if(!GN.has(r.protocol))return"about:blank"}catch{return n}return n}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),url:this.getURL()}}getURL(){return this.getLatest().__url}setURL(n){const r=this.getWritable();return r.__url=n,r}getTarget(){return this.getLatest().__target}setTarget(n){const r=this.getWritable();return r.__target=n,r}getRel(){return this.getLatest().__rel}setRel(n){const r=this.getWritable();return r.__rel=n,r}getTitle(){return this.getLatest().__title}setTitle(n){const r=this.getWritable();return r.__title=n,r}insertNewAfter(n,r=!0){const o=Co(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(o,r),o}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(n,r,o){if(!$(r))return!1;const i=r.anchor.getNode(),s=r.focus.getNode();return this.isParentOf(i)&&this.isParentOf(s)&&r.getTextContent().length>0}isEmailURI(){return this.__url.startsWith("mailto:")}isWebSiteURI(){return this.__url.startsWith("https://")||this.__url.startsWith("http://")}}function ZN(e){let t=null;if(Nx(e)){const n=e.textContent;(n!==null&&n!==""||e.children.length>0)&&(t=Co(e.getAttribute("href")||"",{rel:e.getAttribute("rel"),target:e.getAttribute("target"),title:e.getAttribute("title")}))}return{node:t}}function Co(e="",t){return Kr(new Ho(e,t))}function ut(e){return e instanceof Ho}class ic extends Ho{constructor(n="",r={},o){super(n,r,o);D(this,"__isUnlinked");this.__isUnlinked=r.isUnlinked!==void 0&&r.isUnlinked!==null&&r.isUnlinked}static getType(){return"autolink"}static clone(n){return new ic(n.__url,{isUnlinked:n.__isUnlinked,rel:n.__rel,target:n.__target,title:n.__title},n.__key)}getIsUnlinked(){return this.__isUnlinked}setIsUnlinked(n){const r=this.getWritable();return r.__isUnlinked=n,r}createDOM(n){return this.__isUnlinked?document.createElement("span"):super.createDOM(n)}updateDOM(n,r,o){return super.updateDOM(n,r,o)||n.__isUnlinked!==this.__isUnlinked}static importJSON(n){return Wg().updateFromJSON(n)}updateFromJSON(n){return super.updateFromJSON(n).setIsUnlinked(n.isUnlinked||!1)}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),isUnlinked:this.__isUnlinked}}insertNewAfter(n,r=!0){const o=this.getParentOrThrow().insertNewAfter(n,r);if(R(o)){const i=Wg(this.__url,{isUnlinked:this.__isUnlinked,rel:this.__rel,target:this.__target,title:this.__title});return o.append(i),i}return null}}function Wg(e="",t){return Kr(new ic(e,t))}function so(e){return e instanceof ic}const $i=pe("TOGGLE_LINK_COMMAND");function Kg(e,t){if(e.type==="element"){const n=e.getNode();return R(n)||(function(r,...o){const i=new URL("https://lexical.dev/docs/error"),s=new URLSearchParams;s.append("code",r);for(const a of o)s.append("v",a);throw i.search=s.toString(),Error(`Minified Lexical error #${r}; visit ${i.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(252),n.getChildren()[e.offset+t]||null}return null}function cu(e,t={}){let n;if(e&&typeof e=="object"){const{url:u,...f}=e;n=u,t={...f,...t}}else n=e;const{target:r,title:o}=t,i=t.rel===void 0?"noreferrer":t.rel,s=Z();if(s===null||!$(s)&&!ot(s))return;if(ot(s)){const u=s.getNodes();return u.length===0?void 0:void u.forEach(f=>{if(n===null){const d=at(f,p=>!so(p)&&ut(p));d&&(d.insertBefore(f),d.getChildren().length===0&&d.remove())}else{const d=at(f,p=>!so(p)&&ut(p));if(d)d.setURL(n),r!==void 0&&d.setTarget(r),i!==void 0&&d.setRel(i);else{const p=Co(n,{rel:i,target:r});f.insertBefore(p),p.append(f)}}})}const a=s.extract();if(n===null){const u=new Set;return void a.forEach(f=>{const d=f.getParent();if(ut(d)&&!so(d)){const p=d.getKey();if(u.has(p))return;(function(h,g){const m=new Set(g.filter(E=>h.isParentOf(E)).map(E=>E.getKey())),y=h.getChildren(),v=y.filter(E=>m.has(E.getKey()));if(v.length===y.length)return y.forEach(E=>h.insertBefore(E)),void h.remove();const b=y.findIndex(E=>m.has(E.getKey())),w=y.findLastIndex(E=>m.has(E.getKey())),A=b===0,_=w===y.length-1;if(A)v.forEach(E=>h.insertBefore(E));else if(_)for(let E=v.length-1;E>=0;E--)h.insertAfter(v[E]);else{for(let S=v.length-1;S>=0;S--)h.insertAfter(v[S]);const E=y.slice(w+1);if(E.length>0){const S=Co(h.getURL(),{rel:h.getRel(),target:h.getTarget(),title:h.getTitle()});v[v.length-1].insertAfter(S),E.forEach(N=>S.append(N))}}})(d,a),u.add(p)}})}const l=new Set,c=u=>{l.has(u.getKey())||(l.add(u.getKey()),u.setURL(n),r!==void 0&&u.setTarget(r),i!==void 0&&u.setRel(i),o!==void 0&&u.setTitle(o))};if(a.length===1){const u=a[0],f=at(u,ut);if(f!==null)return c(f)}(function(u){const f=Z();if(!$(f))return u();const d=Ri(f),p=d.isBackward(),h=Kg(d.anchor,p?-1:0),g=Kg(d.focus,p?0:-1);if(u(),h||g){const m=Z();if($(m)){const y=m.clone();if(h){const v=h.getParent();v&&y.anchor.set(v.getKey(),h.getIndexWithinParent()+(p?1:0),"element")}if(g){const v=g.getParent();v&&y.focus.set(v.getKey(),g.getIndexWithinParent()+(p?0:1),"element")}Pt(Ri(y))}}})(()=>{let u=null;for(const f of a){if(!f.isAttached())continue;const d=at(f,ut);if(d){c(d);continue}if(R(f)){if(!f.isInline())continue;if(ut(f)){if(!(so(f)||u!==null&&u.getParentOrThrow().isParentOf(f))){c(f),u=f;continue}for(const h of f.getChildren())f.insertBefore(h);f.remove();continue}}const p=f.getPreviousSibling();ut(p)&&p.is(u)?p.append(f):(u=Co(n,{rel:i,target:r,title:o}),f.insertAfter(u),u.append(f))}})}const JN=/^\+?[0-9\s()-]{5,}$/;function Hg(e){return e.match(/^[a-z][a-z0-9+.-]*:/i)||e.match(/^[/#.]/)?e:e.includes("@")?`mailto:${e}`:JN.test(e)?`tel:${e}`:`https://${e}`}function XN(e,t){return fn($s(()=>e.registerCommand($i,n=>{const r=t.validateUrl.peek(),o=t.attributes.peek();if(n===null)return cu(null),!0;if(typeof n=="string")return!(r!==void 0&&!r(n))&&(cu(n,o),!0);{const{url:i,target:s,rel:a,title:l}=n;return cu(i,{...o,rel:a,target:s,title:l}),!0}},Gn)),$s(()=>{const n=t.validateUrl.value;if(!n)return;const r=t.attributes.value;return e.registerCommand(Gl,o=>{const i=Z();if(!$(i)||i.isCollapsed()||!kr(o,ClipboardEvent)||o.clipboardData===null)return!1;const s=o.clipboardData.getData("text");return!!n(s)&&!i.getNodes().some(a=>R(a))&&(e.dispatchCommand($i,{...r,url:s}),o.preventDefault(),!0)},Gn)}))}function e5({commentType:e,onCommentTypeChange:t,isCommentTypeEditable:n=!0,actions:r,setIsLinkEditMode:o,onAddAttachments:i}){const[s]=pt(),[a,l]=T.useState({bold:!1,italic:!1,underline:!1,strikethrough:!1,code:!1}),[c,u]=T.useState(null),f=T.useRef(null),d=T.useRef(null),p=up[e];T.useLayoutEffect(()=>s.registerUpdateListener(({editorState:v})=>{v.read(()=>{const b=Z();if(!$(b))return;l({bold:b.hasFormat("bold"),italic:b.hasFormat("italic"),underline:b.hasFormat("underline"),strikethrough:b.hasFormat("strikethrough"),code:b.hasFormat("code")});let w=b.anchor.getNode(),A=null;for(;w;){if(be(w)){const _=w.getListType();A=_==="bullet"||_==="number"?_:null;break}if(ke(w)){w=w.getParent();continue}w=w.getParent()}u(A)})}),[s]);const h=v=>{s.dispatchCommand(_n,v)},g=()=>{c!=="bullet"?s.dispatchCommand(h1,void 0):s.dispatchCommand(Wf,void 0)},m=()=>{c!=="number"?s.dispatchCommand(m1,void 0):s.dispatchCommand(Wf,void 0)},y=()=>{s.update(()=>{const v=Z();if(!$(v))return;["bold","italic","underline","strikethrough","code"].forEach(w=>{v.hasFormat(w)&&s.dispatchCommand(_n,w)})})};return x.jsxs("div",{className:Ee("flex items-center w-full",r?"justify-between":"justify-end"),children:[x.jsxs("div",{className:"flex items-center gap-1",children:[x.jsx(ff,{placement:"top-start",minWidth:"fit-content",title:"text formatting menu",trigger:x.jsx(je,{category:"link",size:"smallCollapse",color:"gray400",children:x.jsx(Ce,{icon:N4})}),children:x.jsxs("ul",{className:"flex items-start flex-col",children:[x.jsx("li",{className:"flex items-center w-full",children:x.jsxs("button",{type:"button",title:"Bold",onClick:()=>h("bold"),className:Ee("cursor-pointer w-full h-full justify-start text-left p-2 hover:bg-gray-100",a.bold?"text-white bg-primary-600 hover:bg-primary-700":"text-gray-400 hover:text-gray-400"),children:[x.jsx(Ce,{icon:w4,className:"mr-2"}),"Bold"]})}),x.jsx("li",{className:"flex items-center w-full",children:x.jsxs("button",{type:"button",title:"Italic",onClick:()=>h("italic"),className:Ee("cursor-pointer w-full h-full justify-start text-left p-2 hover:bg-gray-100",a.italic?"text-white bg-primary-600 hover:bg-primary-700":"text-gray-400 hover:text-gray-400"),children:[x.jsx(Ce,{icon:_4,className:"mr-2"}),"Italic"]})}),x.jsx("li",{className:"flex items-center w-full",children:x.jsxs("button",{type:"button",title:"Underline",onClick:()=>h("underline"),className:Ee("cursor-pointer w-full h-full justify-start text-left p-2 hover:bg-gray-100",a.underline?"text-white bg-primary-600 hover:bg-primary-700":"text-gray-400 hover:text-gray-400"),children:[x.jsx(Ce,{icon:x4,className:"mr-2"}),"Underline"]})}),x.jsx("li",{className:"flex items-center w-full",children:x.jsxs("button",{type:"button",title:"Strikethrough",onClick:()=>h("strikethrough"),className:Ee("cursor-pointer w-full h-full justify-start text-left p-2 hover:bg-gray-100",a.strikethrough?"text-white bg-primary-600 hover:bg-primary-700":"text-gray-400 hover:text-gray-400"),children:[x.jsx(Ce,{icon:b4,className:"mr-2"}),"Strikethrough"]})}),x.jsx("li",{className:"flex items-center w-full",children:x.jsxs("button",{type:"button",title:"Monospace",onClick:()=>h("code"),className:Ee("cursor-pointer w-full h-full justify-start text-left p-2 hover:bg-gray-100",a.code?"text-white bg-primary-600 hover:bg-primary-700":"text-gray-400 hover:text-gray-400"),children:[x.jsx(Ce,{icon:S4,className:"mr-2"}),"Monospace"]})}),x.jsx("hr",{className:"w-full border-gray-200"}),x.jsx("li",{className:"flex items-center w-full",children:x.jsxs("button",{type:"button",title:"Clear formatting",onClick:y,className:"cursor-pointer w-full h-full justify-start text-left p-2 text-gray-400 hover:text-gray-400 hover:bg-gray-100",children:[x.jsx(Ce,{icon:C4,className:"mr-2"}),"Clear formatting"]})})]})}),x.jsx(je,{category:"link",size:"smallCollapse",color:"gray400",title:"Format bullet list",onClick:g,children:x.jsx(Ce,{icon:O4})}),x.jsx(je,{category:"link",size:"smallCollapse",color:"gray400",title:"Format numbered list",onClick:m,children:x.jsx(Ce,{icon:E4})}),x.jsx(je,{category:"link",size:"smallCollapse",color:"gray400",title:"Format link",onClick:()=>{o(!0),s.dispatchCommand($i,"https://")},children:x.jsx(Ce,{icon:T4})}),i&&x.jsxs(x.Fragment,{children:[x.jsx(je,{category:"link",size:"smallCollapse",color:"gray400",title:"Add image",className:"border-l-1 border-gray-200 rounded-none",onClick:()=>{var v;(v=f.current)==null||v.click()},children:x.jsx(Ce,{icon:A4})}),x.jsx(je,{category:"link",size:"smallCollapse",color:"gray400",title:"Add file",onClick:()=>{var v;(v=d.current)==null||v.click()},children:x.jsx(Ce,{icon:k4})})]}),n&&x.jsx(ff,{placement:"top-end",title:"comment type menu",trigger:x.jsx(je,{category:"link",size:"smallCollapse",className:`${p.iconColor} border-l-1 border-gray-200 rounded-none`,children:x.jsx(Ce,{icon:p.icon})}),children:x.jsx("ul",{className:"flex items-center justify-between gap-2 p-3",children:y1.map(v=>x.jsx("li",{children:x.jsx(je,{category:"link",size:"none",title:v.title,className:Ee(v.color,e===v.type?v.color:"text-gray-400"),onClick:()=>t==null?void 0:t(v.type),children:x.jsx(Ce,{icon:v.icon})})},v.type))})})]}),r,x.jsx("input",{type:"file",hidden:!0,id:"image-input",multiple:!0,ref:f,accept:"image/*",onChange:v=>{const b=v.target.files;b&&(i==null||i(b))}}),x.jsx("input",{type:"file",hidden:!0,id:"file-input",multiple:!0,ref:d,accept:"*",onChange:v=>{const b=v.target.files;b&&(i==null||i(b))}})]})}function t5({hasStrictIndent:e=!1}){const[t]=pt();return T.useEffect(()=>{if(!t.hasNodes([aa,ts]))throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")},[t]),T.useEffect(()=>{if(e)return QN(t)},[t,e]),(function(n){T.useEffect(()=>YN(n),[n])})(t),null}function n5({validateUrl:e,attributes:t}){const[n]=pt();return T.useEffect(()=>{if(!n.hasNodes([Ho]))throw new Error("LinkPlugin: LinkNode not registered on editor")}),T.useEffect(()=>XN(n,Gx({attributes:t,validateUrl:e})),[n,e,t]),null}const r5=new Set(["http:","https:","mailto:","sms:","tel:"]);function qg(e){try{const t=new URL(e);if(!r5.has(t.protocol))return"about:blank"}catch{return e}return e}function Vg(e,t,n,r=10,o=5){const i=n.parentElement;if(e===null||!i){t.style.opacity="0",t.style.transform="translate(-10000px, -10000px)";return}const s=t.getBoundingClientRect(),a=n.getBoundingClientRect(),l=i.getBoundingClientRect();let c=e.top-r,u=e.left-o;c<l.top&&(c+=s.height+e.height+r*2),u+s.width>l.right&&(u=l.right-s.width-o),c-=a.top,u-=a.left,t.style.opacity="1",t.style.transform=`translate(${u}px, ${c}px)`}function Al(e){const t=e.anchor,n=e.focus,r=e.anchor.getNode(),o=e.focus.getNode();return r===o?r:e.isBackward()?gg(n)?r:o:gg(t)?r:o}function o5({editor:e,isLink:t,setIsLink:n,anchorElem:r,isLinkEditMode:o,setIsLinkEditMode:i}){const s=T.useRef(null),[a,l]=T.useState(""),[c,u]=T.useState("https://"),[f,d]=T.useState(null),p=T.useCallback(()=>{var A,_;const m=Z();if($(m)){const E=Al(m),S=at(E,ut);S?l(S.getURL()):ut(E)?l(E.getURL()):l(""),o&&u(a)}else if(ot(m)){const E=m.getNodes();if(E.length>0){const S=E[0],N=S.getParent();ut(N)?l(N.getURL()):ut(S)?l(S.getURL()):l(""),o&&u(a)}}const y=s.current,v=en(e._window),b=document.activeElement;if(y===null)return;const w=e.getRootElement();if(m!==null&&w!==null&&e.isEditable()){let E;if(ot(m)){const S=m.getNodes();if(S.length>0){const N=e.getElementByKey(S[0].getKey());N&&(E=N.getBoundingClientRect())}}else v!==null&&w.contains(v.anchorNode)&&(E=(_=(A=v.focusNode)==null?void 0:A.parentElement)==null?void 0:_.getBoundingClientRect());E&&(E.y+=40,Vg(E,y,r)),d(m)}else(!b||b.className!=="link-input")&&(w!==null&&Vg(null,y,r),d(null),i(!1),l(""));return!0},[r,e,i,o,a]);T.useEffect(()=>{const m=r.parentElement,y=()=>{e.getEditorState().read(()=>{p()})};return window.addEventListener("resize",y),m&&m.addEventListener("scroll",y),()=>{window.removeEventListener("resize",y),m&&m.removeEventListener("scroll",y)}},[r.parentElement,e,p]),T.useEffect(()=>fn(e.registerUpdateListener(({editorState:m})=>{m.read(()=>{p()})}),e.registerCommand(Ql,()=>(p(),!0),Gn),e.registerCommand(Rd,()=>t?(n(!1),!0):!1,n6)),[e,p,n,t]),T.useEffect(()=>{e.getEditorState().read(()=>{p()})},[e,p]),T.useEffect(()=>{const m=s.current;if(m===null)return;const y=v=>{!m.contains(v.relatedTarget)&&t&&(n(!1),i(!1))};return m.addEventListener("focusout",y),()=>{m.removeEventListener("focusout",y)}},[n,i,t]);const h=m=>{m.key==="Enter"?g(m):m.key==="Escape"&&(m.preventDefault(),i(!1))},g=m=>{m.preventDefault(),f!==null&&(a!==""&&e.update(()=>{e.dispatchCommand($i,qg(c));const y=Z();if($(y)){const v=Al(y).getParent();if(so(v)){const b=Co(v.getURL(),{rel:v.__rel,target:v.__target,title:v.__title});v.replace(b,!0)}}}),u("https://"),i(!1))};return x.jsx("div",{ref:s,className:"absolute flex top-0 left-0 shadow-lg bg-white z-10 rounded-sm w-full max-w-400",children:t?o?x.jsxs("div",{className:"flex justify-between w-full items-center p-2",children:[x.jsx(Ny,{containerClassName:"px-0 mr-2",autoFocus:!0,className:"mt-0",value:c,onChange:m=>{u(m.target.value)},onKeyDown:m=>{h(m)}}),x.jsxs("div",{className:"flex justify-center items-center gap-4",children:[x.jsx(je,{size:"none",category:"link",color:"gray400",tabIndex:0,onMouseDown:m=>m.preventDefault(),onClick:()=>{i(!1)},children:x.jsx(Ce,{icon:Dl})}),x.jsx(je,{size:"none",category:"link",color:"gray400",tabIndex:0,onMouseDown:m=>m.preventDefault(),onClick:g,children:x.jsx(Ce,{icon:zy})})]})]}):x.jsxs("div",{className:"flex justify-between w-full items-center p-2",children:[x.jsx("a",{href:qg(a),target:"_blank",rel:"noopener noreferrer",children:a}),x.jsxs("div",{className:"flex items-center gap-4",children:[x.jsx(je,{size:"none",category:"link",color:"gray400",tabIndex:0,onMouseDown:m=>m.preventDefault(),onClick:()=>{u(a),i(!0)},children:x.jsx(Ce,{icon:VC})}),x.jsx(je,{size:"none",category:"link",color:"gray400",tabIndex:0,onMouseDown:m=>m.preventDefault(),onClick:()=>e.dispatchCommand($i,null),children:x.jsx(Ce,{icon:o_})})]})]}):null})}function i5(e,t,n,r){const[o,i]=T.useState(e),[s,a]=T.useState(!1);return T.useEffect(()=>{function l(){const c=Z();if($(c)){const u=Al(c),f=at(u,ut),d=at(u,so);if(!(f||d)){a(!1);return}const p=c.getNodes().filter(h=>!xo(h)).find(h=>{const g=at(h,ut),m=at(h,so);return f&&!f.is(g)||g&&!g.is(f)||d&&!d.is(m)||m&&(!m.is(d)||m.getIsUnlinked())});a(!p)}else if(ot(c)){const u=c.getNodes();if(u.length===0){a(!1);return}const f=u[0],d=f.getParent();ut(d)||ut(f)?a(!0):a(!1)}}return fn(e.registerUpdateListener(({editorState:c})=>{c.read(()=>{l()})}),e.registerCommand(Ql,(c,u)=>(l(),i(u),!1),px),e.registerCommand(Md,c=>{const u=Z();if($(u)){const f=Al(u),d=at(f,ut);if(ut(d)&&(c.metaKey||c.ctrlKey))return window.open(d.getURL(),"_blank"),!0}return!1},Gn))},[e]),Nn.createPortal(x.jsx(o5,{editor:o,isLink:s,anchorElem:t,setIsLink:a,isLinkEditMode:n,setIsLinkEditMode:r}),t)}function s5({anchorElem:e=document.body,isLinkEditMode:t,setIsLinkEditMode:n}){const[r]=pt();return i5(r,e,t,n)}const a5=({url:e,onDelete:t})=>x.jsxs("div",{className:"relative",children:[x.jsx("img",{src:e,alt:"Thumbnail",width:75,height:75,className:"w-[75px] h-[75px] object-cover rounded-lg border border-gray-200"}),x.jsx(je,{size:"smallCollapse",title:"Delete attachment",onClick:t,className:"absolute top-1 left-1 w-[20px] h-[20px] rounded-full",color:"secondary",children:x.jsx(Ce,{icon:jy})})]}),l5=({onRemoveFile:e,type:t,label:n})=>{const r=t.toLowerCase(),o=Iv(r);return x.jsxs("div",{className:"relative flex items-center justify-center rounded border border-gray-200",children:[x.jsx(je,{size:"smallCollapse",color:"secondary",className:"absolute top-1 left-1 w-[20px] h-[20px] rounded-full",title:"Remove file",onClick:e,children:x.jsx(Ce,{icon:jy})}),x.jsxs("div",{className:"flex items-center justify-center mx-2",children:[x.jsx("span",{className:"text-primary-600 my-2",children:x.jsx(Ce,{icon:o,size:"3x",className:"text-primary-600"})}),x.jsx("span",{className:"font-bold p-2",children:n})]})]})},c5=({clearKey:e})=>{const[t]=pt(),n=T.useRef(e);return T.useEffect(()=>{n.current!==e&&(t.update(()=>{We().clear()}),n.current=e)},[e,t]),null},u5=({isOpen:e})=>{const[t]=pt(),n=T.useRef(!1);return T.useEffect(()=>{if(!e){n.current=!1;return}if(n.current)return;const r=()=>{const o=t.getRootElement();if(!o){requestAnimationFrame(r);return}n.current=!0;const i=window.scrollX,s=window.scrollY;try{o.focus({preventScroll:!0})}catch{o.focus()}requestAnimationFrame(()=>window.scrollTo(i,s)),setTimeout(()=>window.scrollTo(i,s),0)};r()},[t,e]),null},f5=({initialValue:e})=>{const[t]=pt(),n=T.useCallback((o,i)=>{const a=new DOMParser().parseFromString(i,"text/html");return t1(o,a)},[]),r=T.useRef(!1);return T.useEffect(()=>{!r.current&&e&&(t.update(()=>{We().clear(),sx(n(t,e))}),r.current=!0)},[t,e,n]),null},d5=({onChange:e})=>{const[t]=pt();return x.jsx(LN,{onChange:n=>{n.read(()=>{const r=n1(t,null);e(r)})}})},p5=({onAddAttachments:e})=>{const[t]=pt();return T.useEffect(()=>{if(!e)return;const n=t.getRootElement();if(!n)return;const r=o=>{const i=o.clipboardData;if(!i)return;const s=i.items;let a=!1;for(let l=0;l<s.length;l++){const c=s[l];if(c.kind==="file"&&c.type.startsWith("image/")){a=!0;break}}if(a){for(let l=0;l<s.length;l++){const c=s[l];if(c.kind==="file"&&c.type.startsWith("image/")){const u=c.getAsFile();if(u){const f=Date.now(),d=u.type.split("/")[1]||"png",p=`image_${f}.${d}`,h=new File([u],p,{type:u.type});e==null||e([h])}}}o.preventDefault(),o.stopPropagation()}};return n.addEventListener("paste",r,!0),()=>{n.removeEventListener("paste",r,!0)}},[t,e]),null},h5=({onSubmit:e})=>{const[t]=pt();return T.useEffect(()=>{if(e)return t.registerCommand(Fs,n=>n&&!n.shiftKey?(n.preventDefault(),e(),!0):!1,1)},[t,e]),null},m5=({setIsLinkEditMode:e})=>{const[t]=pt();return T.useEffect(()=>{const n=t.getRootElement();if(!n)return;const r=o=>{const i=o.metaKey||o.ctrlKey,s=o.key==="k"||o.key==="K";i&&s&&t.getEditorState().read(()=>{const a=Z();$(a)&&!a.isCollapsed()&&(o.preventDefault(),e(!0),t.dispatchCommand($i,"https://"))})};return n.addEventListener("keydown",r),()=>{n.removeEventListener("keydown",r)}},[t,e]),null};function g1({attachments:e,clearKey:t=0,inputFieldClassName:n="",containerClassName:r="",initialValue:o,onChange:i,commentType:s,onCommentTypeChange:a,isCommentTypeEditable:l=!0,actions:c,onAddAttachments:u,onRemoveAttachment:f,onSubmit:d,isOpen:p}){const h={namespace:"comment-editor",theme:zN,nodes:[aa,ts,Ho],onError:A=>{console.error(A)}},[g,m]=T.useState(null),[y,v]=T.useState(!1),b=A=>{A!==null&&m(A)},w=up[s];return x.jsx("div",{className:r,children:x.jsxs(M6,{initialConfig:h,children:[x.jsxs("div",{className:"relative",children:[x.jsx(CN,{contentEditable:x.jsx("div",{ref:b,children:x.jsx(ON,{className:Ee("p-3 outline-none border-0 w-full border-t border-gray-200 rounded-none border-l-3",w.bg,w.border,w.fontColor,n)})}),placeholder:x.jsx("div",{className:"absolute top-3 left-4 text-gray-400 pointer-events-none",children:"Type comment…"}),ErrorBoundary:jN}),x.jsx(t5,{}),x.jsx(n5,{}),g&&x.jsx(s5,{anchorElem:g,isLinkEditMode:y,setIsLinkEditMode:v}),x.jsx(kN,{}),x.jsx(f5,{initialValue:o}),x.jsx(d5,{onChange:i}),x.jsx(h5,{onSubmit:d}),x.jsx(m5,{setIsLinkEditMode:v}),x.jsx(c5,{clearKey:t}),x.jsx(p5,{onAddAttachments:u}),x.jsx(u5,{isOpen:p})]}),e&&e.length>0&&x.jsx("div",{className:"flex flex-wrap justify-start gap-2 p-4",children:e.map(A=>md(A.type)?x.jsx(a5,{url:A.url,onDelete:()=>f==null?void 0:f(A.originFile)},A.originFile.name):x.jsx(l5,{type:A.type,label:A.name,onRemoveFile:()=>f==null?void 0:f(A.originFile)},A.originFile.name))}),x.jsx("div",{className:"border-t border-gray-200 p-2 flex justify-end",children:x.jsx(e5,{commentType:s,onCommentTypeChange:a,isCommentTypeEditable:l,actions:c,setIsLinkEditMode:v,onAddAttachments:u})})]})})}const g5=({asset:e,onSetActiveSrc:t})=>x.jsxs("div",{className:"relative border border-gray-200 rounded-md h-[110px] w-full hover:border-primary-500",children:[x.jsx("img",{src:$a(e),onClick:()=>t($a(e)),onKeyDown:n=>{n.key==="Enter"&&t($a(e))},alt:e.name,className:"w-full h-full object-cover rounded-md object-center cursor-zoom-in"}),(e==null?void 0:e.uploading)&&x.jsx("div",{className:"absolute bottom-2 w-full max-w-md mx-auto px-2",children:x.jsx("div",{className:"relative h-2 overflow-hidden rounded-full bg-gray-200",children:x.jsx("div",{className:"absolute left-0 top-0 h-full w-1/3 rounded-full bg-blue-500 animate-progress"})})})]}),y5=({asset:e})=>{var r,o;const t=((o=(r=e==null?void 0:e.mimeType)==null?void 0:r.split("/").pop())==null?void 0:o.toLowerCase())||"",n=Iv(t);return x.jsxs("div",{className:"flex gap-2",children:[(e==null?void 0:e.uploading)&&x.jsx("div",{className:"flex items-center justify-center",children:x.jsx("div",{className:"h-4 w-4 rounded-full border-2 border-gray-300 border-t-blue-500 animate-spin"})}),x.jsx(Ce,{icon:n,size:"lg",className:"text-primary-600"}),x.jsx("a",{href:$a(e),className:"text-sm text-blue-600 underline",download:!0,target:"_blank",rel:"noopener noreferrer",children:e.name})]})},v5=({commentType:e=dt.INFO,author:t,username:n,comment:r,createdDate:o,onDelete:i,onEdit:s,hasAssets:a,taskAssets:l,taskVerified:c})=>{const f={[dt.INFO]:{bg:"bg-primary-100",border:"border-primary-200",icon:Dy,iconColor:"text-primary-600 hover:text-primary-600",text:"text-primary-900"},[dt.WARNING]:{bg:"bg-warning-100",border:"border-warning-200",icon:My,iconColor:"text-warning-600 hover:text-warning-600",text:"text-warning-900"},[dt.DANGER]:{bg:"bg-danger-100",border:"border-danger-200",icon:$y,iconColor:"text-danger-600 hover:text-danger-600",text:"text-danger-900"},[dt.SUCCESS]:{bg:"bg-success-100",border:"border-success-200",icon:Ly,iconColor:"text-success-600 hover:text-success-600",text:"text-success-900"}}[e],d=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"}).format(new Date(o||"")).replace(",",""),[p,h]=T.useState(!1),[g,m]=T.useState(zc(r)),[y,v]=T.useState(e),[b,w]=T.useState(""),A=()=>{h(!0)},_=()=>{const N=of.sanitize(g);s(N,y),h(!1)},E=N=>{const P=of.sanitize(g);v(N),s(P,N),h(!1)},S=()=>{h(!1)};return x.jsxs("div",{className:"flex items-start space-x-4 w-full",children:[x.jsx(BT,{alt:t}),x.jsxs("div",{className:"flex-1 min-w-0",children:[x.jsxs("div",{className:`border ${f.border} rounded-sm ${f.bg} shadow-sm flex flex-col items-start justify-between w-full`,children:[x.jsx("div",{className:"p-3 flex flex-col items-start justify-between w-full",children:x.jsxs("div",{className:"w-full",children:[x.jsxs("div",{className:"flex items-center mb-2 justify-between",children:[x.jsxs("div",{children:[x.jsx(Ce,{icon:f.icon,size:"lg",className:`mr-2 ${f.iconColor}`}),x.jsx("span",{className:`font-semibold text-sm ${f.text}`,children:t})]}),x.jsx(KT,{commentType:e,taskVerified:c,isUsernameAuthor:n.trim()===t.trim(),onEdit:A,onSaveCommentType:E,onDelete:i})]}),p?x.jsx(g1,{inputFieldClassName:"bg-white border-0 rounded-sm",containerClassName:"bg-white border-0 rounded-sm",onChange:m,commentType:e,isCommentTypeEditable:!1,initialValue:zc(r),actions:x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(je,{category:"outline",size:"smallCollapse",color:"secondary",onClick:S,title:"Cancel edit",children:"Cancel"}),x.jsx(je,{category:"solid",size:"smallCollapse",color:"primary",onClick:_,title:"Save edit",disabled:Ua(g),children:"Save"})]})}):x.jsx("div",{className:`text-sm ${f.text}`,dangerouslySetInnerHTML:{__html:zc(r)}})]})}),a&&l&&(l==null?void 0:l.length)>0&&x.jsx("div",{className:`${f.border} border-t w-full p-2 flex gap-2 flex-wrap`,children:l.map(N=>x.jsx(T.Fragment,{children:md(N.mimeType)?x.jsx(g5,{asset:N,onSetActiveSrc:w}):x.jsx(y5,{asset:N})},N.assetId))})]}),x.jsxs("div",{className:"flex gap-2 my-1",children:[o&&x.jsx("time",{dateTime:o,className:"text-xs text-gray-500 opacity-60",children:d}),c&&x.jsxs("span",{className:"text-xs text-success-600 font-semibold flex items-center gap-1",children:[x.jsx(Ce,{icon:Ry}),"Comment Required"]})]})]}),x.jsx(CT,{plugins:[$T],open:!!b,zoom:{maxZoomPixelRatio:2},close:()=>w(""),styles:{root:{zIndex:9999999999}},carousel:{finite:!0,preload:0},controller:{closeOnBackdropClick:!0},slides:[{src:b}]})]})},up={[dt.INFO]:{icon:a_,bg:"bg-primary-100",border:"border-l-primary-500",iconColor:"text-primary-600 hover:text-primary-700",fontColor:"text-primary-900"},[dt.WARNING]:{icon:YC,bg:"bg-warning-100",border:"border-l-warning-500",iconColor:"text-warning-600 hover:text-warning-700",fontColor:"text-warning-900"},[dt.DANGER]:{icon:u_,bg:"bg-danger-100",border:"border-l-danger-500",iconColor:"text-danger-600 hover:text-danger-700",fontColor:"text-danger-900"},[dt.SUCCESS]:{icon:Ry,bg:"bg-success-100",border:"border-l-success-500",iconColor:"text-success-600 hover:text-success-700",fontColor:"text-success-900"}},y1=Object.entries(up).map(([e,t])=>({type:e,icon:t.icon,color:t.iconColor,title:`Change comment type to ${e}`})),b5=({comments:e,onClose:t,isOpen:n,taskName:r,taskInstanceId:o,isLoading:i,playbookInstanceId:s,taskVerification:a})=>{const[l,c]=T.useState(""),[u,f]=T.useState(dt.INFO),[d,p]=T.useState(0),[h,g]=T.useState([]),m=T.useRef(null),{username:y}=v1(),{manageComment:v}=fk({playbookInstanceId:s}),b=()=>{const P=h.length,W=h.some(z=>!md(z.mimeType))?"Attachment":"Image",j=P>1?"s":"";return`<p class="m-0"><span style="white-space: pre-wrap;">${W}${j} added.</span></p>`},w=P=>{const I=Array.from(P).map((W,j)=>nk(W,h.length+j+1));g(W=>[...W,...I])},A=P=>{g(I=>I.filter(W=>W.originFile!==P))},_=P=>{f(P)},E=async()=>{if(!h.length&&Ua(l)||!o)return;h.length>0&&g([]);const P=of.sanitize(l);c(""),p(I=>I+1),await v({action:"add",comment:h.length>0&&Ua(l)?b():P,username:y||"",commentType:u,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,hasAssets:h.length>0,taskInstanceId:o,taskVerified:a,attachments:h}),f(dt.INFO)},S=async P=>{o&&await v({username:y||"",action:"delete",taskVerified:!1,taskInstanceId:o,commentId:P})},N=async({commentId:P,comment:I,commentType:W,hasAssets:j,isAlreadyVerified:z})=>{o&&await v({action:"edit",username:y||"",...I&&{comment:I},taskInstanceId:o,commentId:P,hasAssets:j,taskVerified:z,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,commentType:W})};return T.useLayoutEffect(()=>{m.current&&n&&!i&&e.length>0&&(m.current.scrollTop=m.current.scrollHeight)},[n,i,e.length]),x.jsxs("div",{className:Ee("transition-all duration-300 fixed bg-white right-0 bottom-0 h-[100vh] z-[9999999998] flex flex-col min-w-[270px] max-w-[420px] w-[calc(100vw-1rem)] border border-gray-200 rounded-t-sm overflow-hidden",n?"translate-y-0 opacity-100":"translate-y-full opacity-0 pointer-events-none"),children:[x.jsxs("div",{className:"flex items-center justify-between gap-2 border-b border-gray-200 px-2 py-4 w-full",children:[x.jsx("h6",{className:"font-semibold text-gray-900 truncate max-w-[300px]",children:r}),x.jsx(je,{color:"grayLight",size:"smallCollapse",rounded:"none",title:"Close comment box",onClick:t,children:x.jsx(Ce,{icon:Dl,className:"size-4 text-gray-300"})})]}),x.jsxs("div",{ref:m,className:"flex flex-col flex-1 overflow-y-auto",children:[x.jsxs("div",{className:"flex flex-col justify-end flex-1 gap-4 p-4 pb-[102px]",children:[i&&x.jsx("div",{className:"flex flex-col gap-3",children:[1,2,3].map(P=>x.jsx("div",{className:"h-16 animate-pulse rounded-lg bg-gray-100"},P))}),(e==null?void 0:e.length)>0&&!i&&e.map(P=>x.jsx(v5,{username:y||"",onDelete:()=>S(P.commentId),onEdit:(I,W)=>N({commentId:P.commentId,comment:I,commentType:W,hasAssets:P.hasAssets,isAlreadyVerified:P.taskVerified}),...P},P.commentId)),(e==null?void 0:e.length)===0&&!i&&x.jsxs("div",{className:"flex flex-1 flex-col items-center justify-end gap-3 text-center mb-1",children:[x.jsx("img",{src:ek,className:"opacity-70",alt:"Empty"}),x.jsx("p",{className:"text-gray-400",children:"There is no discussion in this Task."})]})]}),x.jsx(g1,{attachments:h,onChange:c,containerClassName:"fixed bottom-0 left-0 right-0 bg-white",clearKey:d,commentType:u,onCommentTypeChange:_,onAddAttachments:w,onRemoveAttachment:A,onSubmit:E,isOpen:n,actions:x.jsx(je,{category:"link",size:"normalCollapse",title:"Send comment",onClick:E,disabled:Ua(l)&&h.length===0,children:x.jsx(Ce,{icon:P4})})})]})]})},Kf=T.createContext({comments:[],openTaskDetails:null,username:void 0,setOpenTaskDetails:()=>{},prefetchQuery:e=>{}}),v1=()=>{if(!T.useContext(Kf))throw new Error("useCommentContext must be used within a CommentProvider");return T.useContext(Kf)},x5=({playbookInstanceId:e,children:t,username:n})=>{const[r,o]=T.useState({taskInstanceId:null,taskName:"",taskVerification:!1}),{taskInstanceId:i,taskName:s,taskVerification:a}=r||{taskInstanceId:null,taskName:"",taskVerification:!1},{comments:l,isLoading:c,prefetchQuery:u}=ak({taskInstanceId:i||0,enabled:i!==null,username:n});return x.jsxs(Kf.Provider,{value:{comments:l,openTaskDetails:r,setOpenTaskDetails:o,prefetchQuery:u,username:n},children:[t,Nn.createPortal(x.jsxs("div",{id:"cnfdnc-comment-box-root",children:[x.jsx("style",{children:qs}),x.jsx("div",{className:"confidence-playbook",children:x.jsx(b5,{playbookInstanceId:e,comments:l,onClose:()=>o(null),isOpen:!!i,taskName:s,taskInstanceId:i,isLoading:c,taskVerification:a})})]}),M4)]})},w5={[Be.OPEN]:"border-[#C1C5C8] bg-[#F0F1F2]",[Be.IN_PROGRESS]:"bg-[#E6F2FF] border-[#94C8FF]",[Be.IN_REVIEW]:"bg-[#EAF6EC] border-[#A5DAB1]",[Be.COMPLETED]:"bg-[#EAF6EC] border-[#A5DAB1]"},Bn={PHOTO:"photo",SCREENSHOT:"screenshot",COMMENT:"comment",NO_VERIFICATION:null},A5=({task:e,step:t,playbookType:n,onButtonClick:r,viewMode:o="card",canStart:i=!1,isExpanded:s=!1,toggleExpanded:a,playbookId:l,taskStyle:c,listStickyTopBase:u})=>{const[f,d]=T.useState(!1),{taskDetails:p,prefetchQuery:h}=LS({taskId:e.taskId,playbookId:l,enabled:s}),{setOpenTaskDetails:g,prefetchQuery:m}=v1(),{buttons:y}=Uw({taskStatus:e.workflowStatus,canStart:i}),v=T.useMemo(()=>e.imageRequired===0?Bn.NO_VERIFICATION:e.imageRequired===1?Bn.SCREENSHOT:e.imageRequired===2?Bn.PHOTO:e.imageRequired===4?Bn.COMMENT:null,[e.imageRequired]),b=async w=>{try{d(!0),await r(w)}finally{d(!1)}};if(o==="list"){const w=T.useMemo(()=>e.workflowStatus===Be.COMPLETED?"success":e.workflowStatus===Be.IN_PROGRESS?"primary":"default",[e.workflowStatus]),A=T.useMemo(()=>{const _=[];return y.forEach(E=>{E==="START"&&_.push({id:"START",color:"primary",action:"Start",to:Be.IN_PROGRESS}),E==="COMPLETE"&&(!e.taskVerified&&v===Bn.COMMENT&&_.push({id:"ADD_COMMENT",color:"danger",action:"Add Comment",to:"Required"}),_.push({id:"COMPLETE",color:"success",action:"Complete",to:Be.COMPLETED,disabled:!e.taskVerified&&v===Bn.COMMENT}))}),_},[y,v,e.taskVerified]);return x.jsxs("div",{className:Ee("flex flex-col"),children:[x.jsxs("div",{className:Ee("flex items-center gap-3 p-2 border-gray-200",e.sequenceOrder>0&&"border-t",s&&"bg-white rounded-md border border-t-none shadow-sm sticky"),style:{top:s?u:0},children:[x.jsx("div",{className:"text-gray-200 text-base",children:e.sequenceOrder+1}),x.jsx("div",{onClick:()=>{a==null||a(!s)},onMouseOver:h,className:Ee("flex-1 truncate cursor-pointer",s&&"font-medium",e.workflowStatus===Be.COMPLETED&&"text-secondary-400 line-through"),style:{color:e.workflowStatus===Be.IN_PROGRESS&&(c==null?void 0:c.titleColor)||"#1C232D"},children:e.taskInstanceName}),x.jsx(f4,{taskVerified:e.taskVerified,verificationType:v,title:e.workflowStatus,variant:w,transitions:A,onClick:_=>{if(_===ui.ADD_COMMENT){g({taskInstanceId:e.taskInstanceId,taskName:e.taskInstanceName,taskVerification:!0});return}r(_)}}),x.jsx(Yh,{onMouseOver:()=>m(e.taskInstanceId),commentsCount:(e==null?void 0:e.numberOfComments)||0,commentType:(e==null?void 0:e.recentCommentType)||dt.INFO,onClick:()=>g({taskInstanceId:e.taskInstanceId,taskName:e.taskInstanceName,taskVerification:!1})})]}),(p==null?void 0:p.description)&&x.jsx("div",{className:Ee(!s&&"hidden","border-gray-200 border p-2 mx-4 mb-4 border-t-none -mt-[1px] bg-gray-100 rounded-b-md"),children:x.jsx(Vh,{description:(p==null?void 0:p.description)||""})})]})}return x.jsxs("div",{className:Ss("flex items-stretch rounded-sm overflow-hidden border",w5[e.workflowStatus]),children:[x.jsx(m4,{playbookType:n,status:e.workflowStatus,step:t}),x.jsxs("div",{className:"flex w-full flex-col overflow-x-hidden flex-1 p-2",children:[n==="Sequential"&&x.jsx("div",{className:"-mb-3 self-end pr-2 pt-2",children:x.jsx(y4,{status:e.workflowStatus})}),x.jsxs("div",{className:"space-y-2 divide-y divide-black/10 flex flex-col flex-1",children:[x.jsx("div",{className:Ee("text-lg font-medium flex-1 pb-1"),style:{color:e.workflowStatus==="Completed"?"#1C232D":(c==null?void 0:c.titleColor)||"#1C232D"},children:e.taskInstanceName}),v?x.jsxs("div",{className:"flex items-center gap-2 text-sm pb-2",children:[x.jsx(Ce,{icon:Iy,className:"size-4"}),x.jsxs("div",{children:[x.jsx("span",{className:"font-medium",children:v===Bn.PHOTO?"Photo":v===Bn.SCREENSHOT?"Screenshot":"Comment"})," ","required"]})]}):x.jsx(x.Fragment,{})]}),(p==null?void 0:p.description)&&x.jsx("div",{className:Ee(!s&&"hidden"),children:x.jsx(Vh,{description:(p==null?void 0:p.description)||""})}),(y.length>0||e.hasDescription)&&x.jsxs("div",{className:"flex items-center justify-end gap-4 border-t border-black/10 pt-2",children:[x.jsx("div",{className:"flex-1",children:x.jsx(RS,{buttons:y,onButtonClick:b,disabled:f})}),x.jsx(Yh,{onMouseOver:()=>m(e.taskInstanceId),commentsCount:(e==null?void 0:e.numberOfComments)||0,commentType:(e==null?void 0:e.recentCommentType)||dt.INFO,onClick:()=>g({taskInstanceId:e.taskInstanceId,taskName:e.taskInstanceName,taskVerification:!1})}),a&&x.jsx(je,{size:"smallCollapse",onMouseOver:h,category:"link",onClick:()=>{a()},title:s?"Hide task description":"Show task description",children:x.jsx(Ce,{icon:Fy,className:Ss("cursor-pointer text-[#0069D9]",s?"rotate-180":"")})})]})]})]})},b1=T.forwardRef(({title:e,className:t,playbookStyle:n,...r},o)=>{var i,s,a;return x.jsx("div",{ref:o,className:Ee("border-b border-gray-200 flex items-center",t),style:{backgroundColor:((i=n==null?void 0:n.whiteLabel)==null?void 0:i.titleBackgroundColor)||"#f8f9fa"},...r,children:x.jsx("div",{className:Ee("text-xl min-h-16 p-4 font-medium flex-1",{"text-dark":!((s=n==null?void 0:n.whiteLabel)!=null&&s.titleTextColor)}),style:{color:(a=n==null?void 0:n.whiteLabel)==null?void 0:a.titleTextColor},children:e})})});b1.displayName="PlaybookHeader";const C5=({playbookInstanceId:e,playbookMode:t,playbookStyle:n,defaultExpanded:r=!0})=>{const{playbook:o,actions:i}=zw(e);if(!o)return x.jsx("div",{});const s=async(a,l)=>{var c;if(a===ui.COMPLETE){const u=(c=o.tasks.find(f=>f.taskInstanceId===l))==null?void 0:c.sequenceOrder;if(u===void 0){console.error("Task not found in playbook");return}return i.completeTask(l,u)}if(a===ui.START)return i.startTask(l)};return x.jsx("div",{className:"confidence-playbook",children:x.jsx(x1,{playbook:o,playbookMode:t,onTaskButtonClick:s,playbookStyle:n,defaultExpanded:r})})},_5=({className:e,children:t,numberOfTasks:n,playbookMode:r})=>x.jsxs("div",{className:Ee("w-full p-4",e),children:[n&&x.jsxs("div",{className:Ee(r==="card"&&"mb-4"),children:[x.jsx("span",{className:"font-medium",children:"Tasks"})," (",n,")"]}),x.jsx("div",{className:Ee(r==="card"&&"space-y-4"),children:t})]}),x1=({playbook:e,playbookMode:t,onTaskButtonClick:n,playbookStyle:r,defaultExpanded:o=!0})=>{var y,v,b,w,A;const{playbookInstanceName:i,tasks:s}=e,a=T.useRef(null),[l,c]=T.useState(0),[u,f]=T.useState(()=>{const _=P2(e.playbookInstanceId);return _!==null?_:o}),d=()=>{f(_=>{const E=!_;return O2(e.playbookInstanceId,E),E})},{isTaskExpanded:p,toggleTaskExpanded:h,isAtLeastOneTaskExpanded:g}=T0(e.playbookInstanceId,{onTaskExpanded:()=>{var _;c(((_=a.current)==null?void 0:_.offsetHeight)||0)}});T.useEffect(()=>{if(g){if(!a.current)throw new Error("Playbook header ref is not set");new ResizeObserver(E=>{var S;for(const N of E)N.contentRect&&c(((S=a.current)==null?void 0:S.offsetHeight)||0)}).observe(a.current)}return()=>{a.current&&new ResizeObserver(()=>{}).unobserve(a.current)}},[g]);const m=T.useMemo(()=>{const _=s.filter(E=>E.workflowStatus===Be.COMPLETED).sort((E,S)=>S.sequenceOrder-E.sequenceOrder)[0];return _?_.sequenceOrder+1:0},[s]);return x.jsxs("div",{className:Ee(!(r!=null&&r.overlay)&&"min-h-screen",(r==null?void 0:r.overlay)&&"fixed bottom-0 z-[9999999997] flex","transition-all duration-300 ease-in-out"),...(r==null?void 0:r.overlay)&&{style:{width:"100%",maxWidth:u?((y=r.overlay.size)==null?void 0:y.width)||450:"0rem",height:((v=r.overlay.size)==null?void 0:v.height)||"calc(100vh - 4rem)",maxHeight:"calc(100vh - 4rem)",right:((b=r.overlay.offset)==null?void 0:b.right)!==void 0?r.overlay.offset.right:r.overlay.position==="right"?32:void 0,left:((w=r.overlay.offset)==null?void 0:w.left)!==void 0?r.overlay.offset.left:r.overlay.position==="left"?32:void 0}},children:[(r==null?void 0:r.overlay)&&x.jsx("div",{onClick:d,className:Ee("size-9 absolute -left-9 p-1 top-3 z-[9999999997] border-none rounded-l-sm cursor-pointer"),style:{backgroundColor:((A=r==null?void 0:r.whiteLabel)==null?void 0:A.primaryColor)||"#007BFF",boxShadow:"0px 3px 3px 0px #00000040"},children:x.jsx("img",{src:p0,alt:"Confidence Logo",className:"w-full h-full object-contain"})}),x.jsxs("div",{className:Ee("flex flex-col flex-1 bg-gray-50",(r==null?void 0:r.overlay)&&"border border-gray-200 shadow-2xl rounded-t-sm overflow-y-auto"),children:[x.jsx(b1,{title:i,className:Ee("top-0 sticky z-2"),playbookStyle:r,ref:a}),x.jsx(_5,{playbookMode:t,numberOfTasks:e.numberofTasks,children:s.map((_,E)=>{var S;return x.jsx(A5,{task:_,step:E+1,viewMode:t,playbookId:e.playbookId,canStart:_.sequenceOrder===m,onButtonClick:N=>n(N,_.taskInstanceId),playbookType:"Non-Sequential",taskStyle:{titleColor:(S=r==null?void 0:r.whiteLabel)==null?void 0:S.primaryColor},isExpanded:p(_.taskInstanceId),toggleExpanded:()=>h(_.taskInstanceId),listStickyTopBase:l||104},_.taskId)})})]})]})},E5=({email:e,playbookId:t,playbookMode:n,playbookStyle:r,bank:o="public-sdk",timezone:i="America/Los_Angeles",persistKey:s,defaultExpanded:a=!0})=>{const[l,c]=T.useState(null);return T.useEffect(()=>{(async()=>{const u=q0(t,s);if(u&&u.email===e){c(u.playbookInstanceId);return}const{playbookInstanceId:f,errorCode:d,details:p,message:h}=await N0({bank:o,email:e,timezone:i,playbookUid:t})||{};if(d)throw new Error(`Error initiating playbook: ${h} (Code: ${d}) - Details: ${p}`);if(!f)throw new Error("No playbook instance ID returned from initiation");H0(t,f,e,s),c(f)})()},[]),l?x.jsx(Hr,{playbookInstanceId:l,playbookMode:n,playbookStyle:r,username:e,defaultExpanded:a}):null},S5=({playbookId:e,playbookMode:t="list",playbookStyle:n,btnLabel:r="Start Playbook",btnColor:o="primary",persistKey:i,defaultExpanded:s=!0})=>{const[a,l]=T.useState(null),[c,u]=T.useState(void 0);return T.useEffect(()=>{const f=q0(e,i);f&&(l(f.playbookInstanceId),u(f.email))},[e,i]),x.jsxs(x.Fragment,{children:[x.jsxs(Cl.div,{children:[x.jsx(UC,{playbookId:e,disabled:!!a,onInitiated:(f,d)=>{H0(e,f,d,i),l(f),u(d)},btnLabel:r,btnColor:o}),x.jsx("style",{type:"text/css",children:qs})]}),a&&x.jsx(Hr,{playbookInstanceId:a,playbookMode:t,playbookStyle:n,username:c,defaultExpanded:s})]})},Hr=({playbookInstanceId:e,playbookMode:t,playbookStyle:n,username:r,defaultExpanded:o=!0})=>(console.log("Starting ConfidencePlaybook with instance ID:",e,r),x.jsx(S0,{children:x.jsx(x5,{playbookInstanceId:e,username:r,children:x.jsx(C5,{playbookInstanceId:e,playbookMode:t,playbookStyle:n,defaultExpanded:o})})}));Hr.Context=S0;Hr.View=x1;Hr.AutoInstantiated=E5;Hr.WithInstantiateButton=S5;const w1=e=>Nn.createPortal(x.jsxs(Cl.div,{style:{position:"relative",zIndex:2147483646},children:[x.jsx("style",{children:qs}),x.jsx(Hr,{...e})]}),document.body),k5=e=>Nn.createPortal(x.jsxs(Cl.div,{style:{position:"relative",zIndex:2147483646},children:[x.jsx("style",{children:qs}),x.jsx(Hr.AutoInstantiated,{...e})]}),document.body);w1.AutoInstantiated=k5;exports.ConfidencePlaybook=w1;