vendor: 6,287 bytes, lines 1-9
1var KR=Object.defineProperty;var qb=t=>{throw TypeError(t)};var YR=(t,e,n)=>e in t?KR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var _r=(t,e,n)=>YR(t,typeof e!="symbol"?e+"":e,n),$p=(t,e,n)=>e.has(t)||qb("Cannot "+n);var j=(t,e,n)=>($p(t,e,"read from private field"),n?n.call(t):e.get(t)),ge=(t,e,n)=>e.has(t)?qb("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),ie=(t,e,n,r)=>($p(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),Ct=(t,e,n)=>($p(t,e,"access private method"),n);var Cu=(t,e,n,r)=>({set _(s){ie(t,e,s,n)},get _(){return j(t,e,r)}});function JR(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in t)){const i=Object.getOwnPropertyDescriptor(r,s);i&&Object.defineProperty(t,s,i.get?i:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();function iu(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var qS={exports:{}},jf={},GS={exports:{}},de={};/** 2 * @license React 3 * react.production.min.js 4 * 5 * Copyright (c) Facebook, Inc. and its affiliates. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE file in the root directory of this source tree. 9 */var ou=Symbol.for("react.element"),QR=Symbol.for("react.portal"),XR=Symbol.for("react.fragment"),ZR=Symbol.for("react.strict_mode"),e2=Symbol.for("react.profiler"),t2=Symbol.for("react.provider"),n2=Symbol.for("react.context"),r2=Symbol.for("react.forward_ref"),s2=Symbol.for("react.suspense"),i2=Symbol.for("react.memo"),o2=Symbol.for("react.lazy"),Gb=Symbol.iterator;function a2(t){return t===null||typeof t!="object"?null:(t=Gb&&t[Gb]||t["@@iterator"],typeof t=="function"?t:null)}var KS={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},YS=Object.assign,JS={};function Va(t,e,n){this.props=t,this.context=e,this.refs=JS,this.updater=n||KS}Va.prototype.isReactComponent={};Va.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};Va.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function QS(){}QS.prototype=Va.prototype;function Cv(t,e,n){this.props=t,this.context=e,this.refs=JS,this.updater=n||KS}var Ev=Cv.prototype=new QS;Ev.constructor=Cv;YS(Ev,Va.prototype);Ev.isPureReactComponent=!0;var Kb=Array.isArray,XS=Object.prototype.hasOwnProperty,Tv={current:null},ZS={key:!0,ref:!0,__self:!0,__source:!0};function eC(t,e,n){var r,s={},i=null,o=null;if(e!=null)for(r in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(i=""+e.key),e)XS.call(e,r)&&!ZS.hasOwnProperty(r)&&(s[r]=e[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];s.children=l}if(t&&t.defaultProps)for(r in a=t.defaultProps,a)s[r]===void 0&&(s[r]=a[r]);return{$$typeof:ou,type:t,key:i,ref:o,props:s,_owner:Tv.current}}function l2(t,e){return{$$typeof:ou,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function Nv(t){return typeof t=="object"&&t!==null&&t.$$typeof===ou}function c2(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var Yb=/\/+/g;function zp(t,e){return typeof t=="object"&&t!==null&&t.key!=null?c2(""+t.key):e.toString(36)}function kd(t,e,n,r,s){var i=typeof t;(i==="undefined"||i==="boolean")&&(t=null);var o=!1;if(t===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case ou:case QR:o=!0}}if(o)return o=t,s=s(o),t=r===""?"."+zp(o,0):r,Kb(s)?(n="",t!=null&&(n=t.replace(Yb,"$&/")+"/"),kd(s,e,n,"",function(c){return c})):s!=null&&(Nv(s)&&(s=l2(s,n+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(Yb,"$&/")+"/")+t)),e.push(s)),1;if(o=0,r=r===""?".":r+":",Kb(t))for(var a=0;a<t.length;a++){i=t[a];var l=r+zp(i,a);o+=kd(i,e,n,l,s)}else if(l=a2(t),typeof l=="function")for(t=l.call(t),a=0;!(i=t.next()).done;)i=i.value,l=r+zp(i,a++),o+=kd(i,e,n,l,s);else if(i==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return o}function Eu(t,e,n){if(t==null)return t;var r=[],s=0;return kd(t,r,"","",function(i){return e.call(n,i,s++)}),r}function u2(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){(t._status===0||t._status===-1)&&(t._status=1,t._result=n)},function(n){(t._status===0||t._status===-1)&&(t._status=2,t._result=n)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var Wt={current:null},Sd={transition:null},d2={ReactCurrentDispatcher:Wt,ReactCurrentBatchConfig:Sd,ReactCurrentOwner:Tv};function tC(){throw Error("act(...) is not supported in production builds of React.")}de.Children={map:Eu,forEach:function(t,e,n){Eu(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return Eu(t,function(){e++}),e},toArray:function(t){return Eu(t,function(e){return e})||[]},only:function(t){if(!Nv(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};de.Component=Va;de.Fragment=XR;de.Profiler=e2;de.PureComponent=Cv;de.StrictMode=ZR;de.Suspense=s2;
vendor: 3,664 bytes, lines 9-25
9de.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=d2;de.act=tC;de.cloneElement=function(t,e,n){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var r=YS({},t.props),s=t.key,i=t.ref,o=t._owner;if(e!=null){if(e.ref!==void 0&&(i=e.ref,o=Tv.current),e.key!==void 0&&(s=""+e.key),t.type&&t.type.defaultProps)var a=t.type.defaultProps;for(l in e)XS.call(e,l)&&!ZS.hasOwnProperty(l)&&(r[l]=e[l]===void 0&&a!==void 0?a[l]:e[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:ou,type:t.type,key:s,ref:i,props:r,_owner:o}};de.createContext=function(t){return t={$$typeof:n2,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:t2,_context:t},t.Consumer=t};de.createElement=eC;de.createFactory=function(t){var e=eC.bind(null,t);return e.type=t,e};de.createRef=function(){return{current:null}};de.forwardRef=function(t){return{$$typeof:r2,render:t}};de.isValidElement=Nv;de.lazy=function(t){return{$$typeof:o2,_payload:{_status:-1,_result:t},_init:u2}};de.memo=function(t,e){return{$$typeof:i2,type:t,compare:e===void 0?null:e}};de.startTransition=function(t){var e=Sd.transition;Sd.transition={};try{t()}finally{Sd.transition=e}};de.unstable_act=tC;de.useCallback=function(t,e){return Wt.current.useCallback(t,e)};de.useContext=function(t){return Wt.current.useContext(t)};de.useDebugValue=function(){};de.useDeferredValue=function(t){return Wt.current.useDeferredValue(t)};de.useEffect=function(t,e){return Wt.current.useEffect(t,e)};de.useId=function(){return Wt.current.useId()};de.useImperativeHandle=function(t,e,n){return Wt.current.useImperativeHandle(t,e,n)};de.useInsertionEffect=function(t,e){return Wt.current.useInsertionEffect(t,e)};de.useLayoutEffect=function(t,e){return Wt.current.useLayoutEffect(t,e)};de.useMemo=function(t,e){return Wt.current.useMemo(t,e)};de.useReducer=function(t,e,n){return Wt.current.useReducer(t,e,n)};de.useRef=function(t){return Wt.current.useRef(t)};de.useState=function(t){return Wt.current.useState(t)};de.useSyncExternalStore=function(t,e,n){return Wt.current.useSyncExternalStore(t,e,n)};de.useTransition=function(){return Wt.current.useTransition()};de.version="18.3.1";GS.exports=de;var w=GS.exports;const R=iu(w),Av=JR({__proto__:null,default:R},[w]);/** 10 * @license React 11 * react-jsx-runtime.production.min.js 12 * 13 * Copyright (c) Facebook, Inc. and its affiliates. 14 * 15 * This source code is licensed under the MIT license found in the 16 * LICENSE file in the root directory of this source tree. 17 */var h2=w,f2=Symbol.for("react.element"),p2=Symbol.for("react.fragment"),m2=Object.prototype.hasOwnProperty,g2=h2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,y2={key:!0,ref:!0,__self:!0,__source:!0};function nC(t,e,n){var r,s={},i=null,o=null;n!==void 0&&(i=""+n),e.key!==void 0&&(i=""+e.key),e.ref!==void 0&&(o=e.ref);for(r in e)m2.call(e,r)&&!y2.hasOwnProperty(r)&&(s[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)s[r]===void 0&&(s[r]=e[r]);return{$$typeof:f2,type:t,key:i,ref:o,props:s,_owner:g2.current}}jf.Fragment=p2;jf.jsx=nC;jf.jsxs=nC;qS.exports=jf;var d=qS.exports,rC={exports:{}},fn={},sC={exports:{}},iC={};/** 18 * @license React 19 * scheduler.production.min.js 20 * 21 * Copyright (c) Facebook, Inc. and its affiliates. 22 * 23 * This source code is licensed under the MIT license found in the 24 * LICENSE file in the root directory of this source tree. 25 */(function(t){function e(A,O){var B=A.length;A.push(O);e:for(;0<B;){var te=B-1>>>1,J=A[te];
vendor: 10,575 bytes, lines 25-34
25if(0<s(J,O))A[te]=O,A[B]=J,B=te;else break e}}function n(A){return A.length===0?null:A[0]}function r(A){if(A.length===0)return null;var O=A[0],B=A.pop();if(B!==O){A[0]=B;e:for(var te=0,J=A.length,oe=J>>>1;te<oe;){var re=2*(te+1)-1,_e=A[re],Be=re+1,F=A[Be];if(0>s(_e,B))Be<J&&0>s(F,_e)?(A[te]=F,A[Be]=B,te=Be):(A[te]=_e,A[re]=B,te=re);else if(Be<J&&0>s(F,B))A[te]=F,A[Be]=B,te=Be;else break e}}return O}function s(A,O){var B=A.sortIndex-O.sortIndex;return B!==0?B:A.id-O.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],c=[],u=1,h=null,p=3,f=!1,g=!1,m=!1,y=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(A){for(var O=n(c);O!==null;){if(O.callback===null)r(c);else if(O.startTime<=A)r(c),O.sortIndex=O.expirationTime,e(l,O);else break;O=n(c)}}function k(A){if(m=!1,x(A),!g)if(n(l)!==null)g=!0,V(S);else{var O=n(c);O!==null&&Q(k,O.startTime-A)}}function S(A,O){g=!1,m&&(m=!1,v(T),T=-1),f=!0;var B=p;try{for(x(O),h=n(l);h!==null&&(!(h.expirationTime>O)||A&&!z());){var te=h.callback;if(typeof te=="function"){h.callback=null,p=h.priorityLevel;var J=te(h.expirationTime<=O);O=t.unstable_now(),typeof J=="function"?h.callback=J:h===n(l)&&r(l),x(O)}else r(l);h=n(l)}if(h!==null)var oe=!0;else{var re=n(c);re!==null&&Q(k,re.startTime-O),oe=!1}return oe}finally{h=null,p=B,f=!1}}var C=!1,E=null,T=-1,N=5,_=-1;function z(){return!(t.unstable_now()-_<N)}function I(){if(E!==null){var A=t.unstable_now();_=A;var O=!0;try{O=E(!0,A)}finally{O?H():(C=!1,E=null)}}else C=!1}var H;if(typeof b=="function")H=function(){b(I)};else if(typeof MessageChannel<"u"){var M=new MessageChannel,U=M.port2;M.port1.onmessage=I,H=function(){U.postMessage(null)}}else H=function(){y(I,0)};function V(A){E=A,C||(C=!0,H())}function Q(A,O){T=y(function(){A(t.unstable_now())},O)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(A){A.callback=null},t.unstable_continueExecution=function(){g||f||(g=!0,V(S))},t.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):N=0<A?Math.floor(1e3/A):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_getFirstCallbackNode=function(){return n(l)},t.unstable_next=function(A){switch(p){case 1:case 2:case 3:var O=3;break;default:O=p}var B=p;p=O;try{return A()}finally{p=B}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(A,O){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var B=p;p=A;try{return O()}finally{p=B}},t.unstable_scheduleCallback=function(A,O,B){var te=t.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0<B?te+B:te):B=te,A){case 1:var J=-1;break;case 2:J=250;break;case 5:J=1073741823;break;case 4:J=1e4;break;default:J=5e3}return J=B+J,A={id:u++,callback:O,priorityLevel:A,startTime:B,expirationTime:J,sortIndex:-1},B>te?(A.sortIndex=B,e(c,A),n(l)===null&&A===n(c)&&(m?(v(T),T=-1):m=!0,Q(k,B-te))):(A.sortIndex=J,e(l,A),g||f||(g=!0,V(S))),A},t.unstable_shouldYield=z,t.unstable_wrapCallback=function(A){var O=p;return function(){var B=p;p=O;try{return A.apply(this,arguments)}finally{p=B}}}})(iC);sC.exports=iC;var v2=sC.exports;/** 26 * @license React 27 * react-dom.production.min.js 28 * 29 * Copyright (c) Facebook, Inc. and its affiliates. 30 * 31 * This source code is licensed under the MIT license found in the 32 * LICENSE file in the root directory of this source tree. 33 */var b2=w,hn=v2;function L(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var oC=new Set,fc={};function yo(t,e){Ta(t,e),Ta(t+"Capture",e)}function Ta(t,e){for(fc[t]=e,t=0;t<e.length;t++)oC.add(e[t])}var Xr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),pg=Object.prototype.hasOwnProperty,x2=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Jb={},Qb={};function w2(t){return pg.call(Qb,t)?!0:pg.call(Jb,t)?!1:x2.test(t)?Qb[t]=!0:(Jb[t]=!0,!1)}function k2(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function S2(t,e,n,r){if(e===null||typeof e>"u"||k2(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function Ht(t,e,n,r,s,i,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=i,this.removeEmptyString=o}var wt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){wt[t]=new Ht(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];wt[e]=new Ht(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){wt[t]=new Ht(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){wt[t]=new Ht(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){wt[t]=new Ht(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){wt[t]=new Ht(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){wt[t]=new Ht(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){wt[t]=new Ht(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){wt[t]=new Ht(t,5,!1,t.toLowerCase(),null,!1,!1)});var _v=/[\-:]([a-z])/g;function jv(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(_v,jv);wt[e]=new Ht(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(_v,jv);wt[e]=new Ht(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(_v,jv);wt[e]=new Ht(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){wt[t]=new Ht(t,1,!1,t.toLowerCase(),null,!1,!1)});wt.xlinkHref=new Ht("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){wt[t]=new Ht(t,1,!1,t.toLowerCase(),null,!0,!0)});function Ov(t,e,n,r){var s=wt.hasOwnProperty(e)?wt[e]:null;(s!==null?s.type!==0:r||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(S2(e,n,s,r)&&(n=null),r||s===null?w2(e)&&(n===null?t.removeAttribute(e):t.setAttribute(e,""+n)):s.mustUseProperty?t[s.propertyName]=n===null?s.type===3?!1:"":n:(e=s.attributeName,r=s.attributeNamespace,n===null?t.removeAttribute(e):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}var ss=b2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Tu=Symbol.for("react.element"),Uo=Symbol.for("react.portal"),Vo=Symbol.for("react.fragment"),Rv=Symbol.for("react.strict_mode"),mg=Symbol.for("react.profiler"),aC=Symbol.for("react.provider"),lC=Symbol.for("react.context"),Mv=Symbol.for("react.forward_ref"),gg=Symbol.for("react.suspense"),yg=Symbol.for("react.suspense_list"),Pv=Symbol.for("react.memo"),xs=Symbol.for("react.lazy"),cC=Symbol.for("react.offscreen"),Xb=Symbol.iterator;function al(t){return t===null||typeof t!="object"?null:(t=Xb&&t[Xb]||t["@@iterator"],typeof t=="function"?t:null)}var ze=Object.assign,Bp;function Nl(t){if(Bp===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);Bp=e&&e[1]||""}return` 34`+Bp+t}var Fp=!1;function Wp(t,e){if(!t||Fp)return"";Fp=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(c){var r=c}Reflect.construct(t,[],e)}else{try{e.call()}catch(c){r=c}t.call(e.prototype)}else{try{throw Error()}catch(c){r=c}t()}}
vendor: 5,497 bytes, lines 34-37
34catch(c){if(c&&r&&typeof c.stack=="string"){for(var s=c.stack.split(` 35`),i=r.stack.split(` 36`),o=s.length-1,a=i.length-1;1<=o&&0<=a&&s[o]!==i[a];)a--;for(;1<=o&&0<=a;o--,a--)if(s[o]!==i[a]){if(o!==1||a!==1)do if(o--,a--,0>a||s[o]!==i[a]){var l=` 37`+s[o].replace(" at new "," at ");return t.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",t.displayName)),l}while(1<=o&&0<=a);break}}}finally{Fp=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?Nl(t):""}function C2(t){switch(t.tag){case 5:return Nl(t.type);case 16:return Nl("Lazy");case 13:return Nl("Suspense");case 19:return Nl("SuspenseList");case 0:case 2:case 15:return t=Wp(t.type,!1),t;case 11:return t=Wp(t.type.render,!1),t;case 1:return t=Wp(t.type,!0),t;default:return""}}function vg(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Vo:return"Fragment";case Uo:return"Portal";case mg:return"Profiler";case Rv:return"StrictMode";case gg:return"Suspense";case yg:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case lC:return(t.displayName||"Context")+".Consumer";case aC:return(t._context.displayName||"Context")+".Provider";case Mv:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Pv:return e=t.displayName||null,e!==null?e:vg(t.type)||"Memo";case xs:e=t._payload,t=t._init;try{return vg(t(e))}catch{}}return null}function E2(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return vg(e);case 8:return e===Rv?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function ti(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function uC(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function T2(t){var e=uC(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return s.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Nu(t){t._valueTracker||(t._valueTracker=T2(t))}function dC(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=uC(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function Qd(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function bg(t,e){var n=e.checked;return ze({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function Zb(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=ti(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function hC(t,e){e=e.checked,e!=null&&Ov(t,"checked",e,!1)}function xg(t,e){hC(t,e);var n=ti(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?wg(t,e.type,n):e.hasOwnProperty("defaultValue")&&wg(t,e.type,ti(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function ex(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function wg(t,e,n){(e!=="number"||Qd(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var Al=Array.isArray;function ra(t,e,n,r){if(t=t.options,e){e={};for(var s=0;s<n.length;s++)e["$"+n[s]]=!0;for(n=0;n<t.length;n++)s=e.hasOwnProperty("$"+t[n].value),t[n].selected!==s&&(t[n].selected=s),s&&r&&(t[n].defaultSelected=!0)}else{for(n=""+ti(n),e=null,s=0;s<t.length;s++){if(t[s].value===n){t[s].selected=!0,r&&(t[s].defaultSelected=!0);return}e!==null||t[s].disabled||(e=t[s])}e!==null&&(e.selected=!0)}}function kg(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(L(91));return ze({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function tx(t,e){var n=e.value;if(n==null){if(n=e.children,e=e.defaultValue,n!=null){if(e!=null)throw Error(L(92));
vendor: 11,240 bytes, line 37
37if(Al(n)){if(1<n.length)throw Error(L(93));n=n[0]}e=n}e==null&&(e=""),n=e}t._wrapperState={initialValue:ti(n)}}function fC(t,e){var n=ti(e.value),r=ti(e.defaultValue);n!=null&&(n=""+n,n!==t.value&&(t.value=n),e.defaultValue==null&&t.defaultValue!==n&&(t.defaultValue=n)),r!=null&&(t.defaultValue=""+r)}function nx(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function pC(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Sg(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?pC(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var Au,mC=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,n,r,s){MSApp.execUnsafeLocalFunction(function(){return t(e,n,r,s)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(Au=Au||document.createElement("div"),Au.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=Au.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function pc(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var Fl={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},N2=["Webkit","ms","Moz","O"];Object.keys(Fl).forEach(function(t){N2.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Fl[e]=Fl[t]})});function gC(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||Fl.hasOwnProperty(t)&&Fl[t]?(""+e).trim():e+"px"}function yC(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=gC(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,s):t[n]=s}}var A2=ze({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Cg(t,e){if(e){if(A2[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(L(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(L(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(L(61))}if(e.style!=null&&typeof e.style!="object")throw Error(L(62))}}function Eg(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Tg=null;function Iv(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Ng=null,sa=null,ia=null;function rx(t){if(t=cu(t)){if(typeof Ng!="function")throw Error(L(280));var e=t.stateNode;e&&(e=If(e),Ng(t.stateNode,t.type,e))}}function vC(t){sa?ia?ia.push(t):ia=[t]:sa=t}function bC(){if(sa){var t=sa,e=ia;if(ia=sa=null,rx(t),e)for(t=0;t<e.length;t++)rx(e[t])}}function xC(t,e){return t(e)}function wC(){}var Hp=!1;function kC(t,e,n){if(Hp)return t(e,n);Hp=!0;try{return xC(t,e,n)}finally{Hp=!1,(sa!==null||ia!==null)&&(wC(),bC())}}function mc(t,e){var n=t.stateNode;if(n===null)return null;var r=If(n);if(r===null)return null;n=r[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(t=t.type,r=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!r;break e;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(L(231,e,typeof n));return n}var Ag=!1;if(Xr)try{var ll={};Object.defineProperty(ll,"passive",{get:function(){Ag=!0}}),window.addEventListener("test",ll,ll),window.removeEventListener("test",ll,ll)}catch{Ag=!1}function _2(t,e,n,r,s,i,o,a,l){var c=Array.prototype.slice.call(arguments,3);try{e.apply(n,c)}catch(u){this.onError(u)}}var Wl=!1,Xd=null,Zd=!1,_g=null,j2={onError:function(t){Wl=!0,Xd=t}};function O2(t,e,n,r,s,i,o,a,l){Wl=!1,Xd=null,_2.apply(j2,arguments)}function R2(t,e,n,r,s,i,o,a,l){if(O2.apply(this,arguments),Wl){if(Wl){var c=Xd;Wl=!1,Xd=null}else throw Error(L(198));Zd||(Zd=!0,_g=c)}}function vo(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function SC(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function sx(t){if(vo(t)!==t)throw Error(L(188))}function M2(t){var e=t.alternate;if(!e){if(e=vo(t),e===null)throw Error(L(188));return e!==t?null:t}for(var n=t,r=e;;){var s=n.return;if(s===null)break;var i=s.alternate;if(i===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===n)return sx(s),t;if(i===r)return sx(s),e;i=i.sibling}throw Error(L(188))}if(n.return!==r.return)n=s,r=i;else{for(var o=!1,a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o){for(a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o)throw Error(L(189))}}if(n.alternate!==r)throw Error(L(190))}if(n.tag!==3)throw Error(L(188));return n.stateNode.current===n?t:e}function CC(t){return t=M2(t),t!==null?EC(t):null}function EC(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=EC(t);if(e!==null)return e;t=t.sibling}return null}var TC=hn.unstable_scheduleCallback,ix=hn.unstable_cancelCallback,P2=hn.unstable_shouldYield,I2=hn.unstable_requestPaint,Ye=hn.unstable_now,L2=hn.unstable_getCurrentPriorityLevel,Lv=hn.unstable_ImmediatePriority,NC=hn.unstable_UserBlockingPriority,eh=hn.unstable_NormalPriority,D2=hn.unstable_LowPriority,AC=hn.unstable_IdlePriority,Of=null,xr=null;function $2(t){if(xr&&typeof xr.onCommitFiberRoot=="function")try{xr.onCommitFiberRoot(Of,t,void 0,(t.current.flags&128)===128)}catch{}}var Xn=Math.clz32?Math.clz32:F2,z2=Math.log,B2=Math.LN2;function F2(t){return t>>>=0,t===0?32:31-(z2(t)/B2|0)|0}var _u=64,ju=4194304;function _l(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function th(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,s=t.suspendedLanes,i=t.pingedLanes,o=n&268435455;if(o!==0){var a=o&~s;a!==0?r=_l(a):(i&=o,i!==0&&(r=_l(i)))}else o=n&~s,o!==0?r=_l(o):i!==0&&(r=_l(i));if(r===0)return 0;if(e!==0&&e!==r&&!(e&s)&&(s=r&-r,i=e&-e,s>=i||s===16&&(i&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0<e;)n=31-Xn(e),s=1<<n,r|=t[n],e&=~s;return r}function W2(t,e){switch(t){case 1:case 2:case 4:return e+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function H2(t,e){for(var n=t.suspendedLanes,r=t.pingedLanes,s=t.expirationTimes,i=t.pendingLanes;0<i;){var o=31-Xn(i),a=1<<o,l=s[o];l===-1?(!(a&n)||a&r)&&(s[o]=W2(a,e)):l<=e&&(t.expiredLanes|=a),i&=~a}}function jg(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function _C(){var t=_u;return _u<<=1,!(_u&4194240)&&(_u=64),t}function Up(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function au(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Xn(e),t[e]=n}function U2(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0<n;){var s=31-Xn(n),i=1<<s;e[s]=0,r[s]=-1,t[s]=-1,n&=~i}}function Dv(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var r=31-Xn(n),s=1<<r;s&e|t[r]&e&&(t[r]|=e),n&=~s}}var ke=0;function jC(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var OC,$v,RC,MC,PC,Og=!1,Ou=[],Bs=null,Fs=null,Ws=null,gc=new Map,yc=new Map,Es=[],V2="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function ox(t,e){switch(t){case"focusin":case"focusout":Bs=null;break;case"dragenter":case"dragleave":Fs=null;break;case"mouseover":case"mouseout":Ws=null;break;case"pointerover":case"pointerout":gc.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":yc.delete(e.pointerId)}}function cl(t,e,n,r,s,i){return t===null||t.nativeEvent!==i?(t={blockedOn:e,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[s]},e!==null&&(e=cu(e),e!==null&&$v(e)),t):(t.eventSystemFlags|=r,e=t.targetContainers,s!==null&&e.indexOf(s)===-1&&e.push(s),t)}function q2(t,e,n,r,s){switch(e){case"focusin":return Bs=cl(Bs,t,e,n,r,s),!0;case"dragenter":return Fs=cl(Fs,t,e,n,r,s),!0;case"mouseover":return Ws=cl(Ws,t,e,n,r,s),!0;case"pointerover":var i=s.pointerId;return gc.set(i,cl(gc.get(i)||null,t,e,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,yc.set(i,cl(yc.get(i)||null,t,e,n,r,s)),!0}return!1}function IC(t){var e=ji(t.target);if(e!==null){var n=vo(e);if(n!==null){if(e=n.tag,e===13){if(e=SC(n),e!==null){t.blockedOn=e,PC(t.priority,function(){RC(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Cd(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=Rg(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(n===null){n=t.nativeEvent;var r=new n.constructor(n.type,n);Tg=r,n.target.dispatchEvent(r),Tg=null}else return e=cu(n),e!==null&&$v(e),t.blockedOn=n,!1;e.shift()}return!0}function ax(t,e,n){Cd(t)&&n.delete(e)}function G2(){Og=!1,Bs!==null&&Cd(Bs)&&(Bs=null),Fs!==null&&Cd(Fs)&&(Fs=null),Ws!==null&&Cd(Ws)&&(Ws=null),gc.forEac
vendor: 9,291 bytes, line 37
37h(ax),yc.forEach(ax)}function ul(t,e){t.blockedOn===e&&(t.blockedOn=null,Og||(Og=!0,hn.unstable_scheduleCallback(hn.unstable_NormalPriority,G2)))}function vc(t){function e(s){return ul(s,t)}if(0<Ou.length){ul(Ou[0],t);for(var n=1;n<Ou.length;n++){var r=Ou[n];r.blockedOn===t&&(r.blockedOn=null)}}for(Bs!==null&&ul(Bs,t),Fs!==null&&ul(Fs,t),Ws!==null&&ul(Ws,t),gc.forEach(e),yc.forEach(e),n=0;n<Es.length;n++)r=Es[n],r.blockedOn===t&&(r.blockedOn=null);for(;0<Es.length&&(n=Es[0],n.blockedOn===null);)IC(n),n.blockedOn===null&&Es.shift()}var oa=ss.ReactCurrentBatchConfig,nh=!0;function K2(t,e,n,r){var s=ke,i=oa.transition;oa.transition=null;try{ke=1,zv(t,e,n,r)}finally{ke=s,oa.transition=i}}function Y2(t,e,n,r){var s=ke,i=oa.transition;oa.transition=null;try{ke=4,zv(t,e,n,r)}finally{ke=s,oa.transition=i}}function zv(t,e,n,r){if(nh){var s=Rg(t,e,n,r);if(s===null)em(t,e,r,rh,n),ox(t,r);else if(q2(s,t,e,n,r))r.stopPropagation();else if(ox(t,r),e&4&&-1<V2.indexOf(t)){for(;s!==null;){var i=cu(s);if(i!==null&&OC(i),i=Rg(t,e,n,r),i===null&&em(t,e,r,rh,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else em(t,e,r,null,n)}}var rh=null;function Rg(t,e,n,r){if(rh=null,t=Iv(r),t=ji(t),t!==null)if(e=vo(t),e===null)t=null;else if(n=e.tag,n===13){if(t=SC(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return rh=t,null}function LC(t){switch(t){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(L2()){case Lv:return 1;case NC:return 4;case eh:case D2:return 16;case AC:return 536870912;default:return 16}default:return 16}}var Is=null,Bv=null,Ed=null;function DC(){if(Ed)return Ed;var t,e=Bv,n=e.length,r,s="value"in Is?Is.value:Is.textContent,i=s.length;for(t=0;t<n&&e[t]===s[t];t++);var o=n-t;for(r=1;r<=o&&e[n-r]===s[i-r];r++);return Ed=s.slice(t,1<r?1-r:void 0)}function Td(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function Ru(){return!0}function lx(){return!1}function pn(t){function e(n,r,s,i,o){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var a in t)t.hasOwnProperty(a)&&(n=t[a],this[a]=n?n(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Ru:lx,this.isPropagationStopped=lx,this}return ze(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Ru)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ru)},persist:function(){},isPersistent:Ru}),e}var qa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Fv=pn(qa),lu=ze({},qa,{view:0,detail:0}),J2=pn(lu),Vp,qp,dl,Rf=ze({},lu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Wv,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==dl&&(dl&&t.type==="mousemove"?(Vp=t.screenX-dl.screenX,qp=t.screenY-dl.screenY):qp=Vp=0,dl=t),Vp)},movementY:function(t){return"movementY"in t?t.movementY:qp}}),cx=pn(Rf),Q2=ze({},Rf,{dataTransfer:0}),X2=pn(Q2),Z2=ze({},lu,{relatedTarget:0}),Gp=pn(Z2),eM=ze({},qa,{animationName:0,elapsedTime:0,pseudoElement:0}),tM=pn(eM),nM=ze({},qa,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),rM=pn(nM),sM=ze({},qa,{data:0}),ux=pn(sM),iM={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},oM={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},aM={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function lM(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=aM[t])?!!e[t]:!1}function Wv(){return lM}var cM=ze({},lu,{key:function(t){if(t.key){var e=iM[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=Td(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?oM[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Wv,charCode:function(t){return t.type==="keypress"?Td(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Td(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),uM=pn(cM),dM=ze({},Rf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),dx=pn(dM),hM=ze({},lu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Wv}),fM=pn(hM),pM=ze({},qa,{propertyName:0,elapsedTime:0,pseudoElement:0}),mM=pn(pM),gM=ze({},Rf,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),yM=pn(gM),vM=[9,13,27,32],Hv=Xr&&"CompositionEvent"in window,Hl=null;Xr&&"documentMode"in document&&(Hl=document.documentMode);var bM=Xr&&"TextEvent"in window&&!Hl,$C=Xr&&(!Hv||Hl&&8<Hl&&11>=Hl),hx=" ",fx=!1;function zC(t,e){switch(t){case"keyup":return vM.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function BC(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var qo=!1;function xM(t,e){switch(t){case"compositionend":return BC(e);case"keypress":return e.which!==32?null:(fx=!0,hx);case"textInput":return t=e.data,t===hx&&fx?null:t;default:return null}}function wM(t,e){if(qo)return t==="compositionend"||!Hv&&zC(t,e)?(t=DC(),Ed=Bv=Is=null,qo=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return $C&&e.locale!=="ko"?null:e.data;default:return null}}var kM={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function px(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!kM[t.type]:e==="textarea"}function FC(t,e,n,r){vC(r),e=sh(e,"onChange"),0<e.length&&(n=new Fv("onChange","change",null,n,r),t.push({event:n,listeners:e}))}var Ul=null,bc=null;function SM(t){XC(t,0)}function Mf(t){var e=Yo(t);if(dC(e))return t}function CM(t,e){if(t==="change")return e}var WC=!1;if(Xr){var Kp;if(Xr){var Yp="oninput"in document;if(!Yp){var mx=document.createElement("div");mx.setAttribute("oninput","return;"),Yp=typeof mx.oninput=="function"}Kp=Yp}else Kp=!1;WC=Kp&&(!document.documentMode||9<document.documentMode)}function gx(){Ul&&(Ul.detachEvent("onpropertychange",HC),bc=Ul=null)}function HC(t){if(t.propertyName==="value"&&Mf(bc)){var e=[];FC(e,bc,t,Iv(t)),kC(SM,e)}}function EM(t,e,n){t==="focusin"?(gx(),Ul=e,bc=n,Ul.attachEvent("onpropertychange",HC)):t==="focusout"&&gx()}function TM(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Mf(bc)}function NM(t,e){if(t==="click")return Mf(e)}function AM(t,e){if(t==="input"||t==="change")return Mf(e)}function _M(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var tr=typeof Object.is=="function"?Object.is:_M;function xc(t,e){if(tr(t,e))return!0;
vendor: 4,808 bytes, line 37
37if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!pg.call(e,s)||!tr(t[s],e[s]))return!1}return!0}function yx(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function vx(t,e){var n=yx(t);t=0;for(var r;n;){if(n.nodeType===3){if(r=t+n.textContent.length,t<=e&&r>=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=yx(n)}}function UC(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?UC(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function VC(){for(var t=window,e=Qd();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=Qd(t.document)}return e}function Uv(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function jM(t){var e=VC(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&UC(n.ownerDocument.documentElement,n)){if(r!==null&&Uv(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!t.extend&&i>r&&(s=r,r=i,i=s),s=vx(n,i);var o=vx(n,r);s&&o&&(t.rangeCount!==1||t.anchorNode!==s.node||t.anchorOffset!==s.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(s.node,s.offset),t.removeAllRanges(),i>r?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<e.length;n++)t=e[n],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var OM=Xr&&"documentMode"in document&&11>=document.documentMode,Go=null,Mg=null,Vl=null,Pg=!1;function bx(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Pg||Go==null||Go!==Qd(r)||(r=Go,"selectionStart"in r&&Uv(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Vl&&xc(Vl,r)||(Vl=r,r=sh(Mg,"onSelect"),0<r.length&&(e=new Fv("onSelect","select",null,e,n),t.push({event:e,listeners:r}),e.target=Go)))}function Mu(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var Ko={animationend:Mu("Animation","AnimationEnd"),animationiteration:Mu("Animation","AnimationIteration"),animationstart:Mu("Animation","AnimationStart"),transitionend:Mu("Transition","TransitionEnd")},Jp={},qC={};Xr&&(qC=document.createElement("div").style,"AnimationEvent"in window||(delete Ko.animationend.animation,delete Ko.animationiteration.animation,delete Ko.animationstart.animation),"TransitionEvent"in window||delete Ko.transitionend.transition);function Pf(t){if(Jp[t])return Jp[t];if(!Ko[t])return t;var e=Ko[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in qC)return Jp[t]=e[n];return t}var GC=Pf("animationend"),KC=Pf("animationiteration"),YC=Pf("animationstart"),JC=Pf("transitionend"),QC=new Map,xx="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function ci(t,e){QC.set(t,e),yo(e,[t])}for(var Qp=0;Qp<xx.length;Qp++){var Xp=xx[Qp],RM=Xp.toLowerCase(),MM=Xp[0].toUpperCase()+Xp.slice(1);ci(RM,"on"+MM)}ci(GC,"onAnimationEnd");ci(KC,"onAnimationIteration");ci(YC,"onAnimationStart");ci("dblclick","onDoubleClick");ci("focusin","onFocus");ci("focusout","onBlur");ci(JC,"onTransitionEnd");Ta("onMouseEnter",["mouseout","mouseover"]);Ta("onMouseLeave",["mouseout","mouseover"]);Ta("onPointerEnter",["pointerout","pointerover"]);Ta("onPointerLeave",["pointerout","pointerover"]);yo("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));
vendor: 4,770 bytes, line 37
37yo("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));yo("onBeforeInput",["compositionend","keypress","textInput","paste"]);yo("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));yo("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));yo("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var jl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),PM=new Set("cancel close invalid load scroll toggle".split(" ").concat(jl));function wx(t,e,n){var r=t.type||"unknown-event";t.currentTarget=n,R2(r,e,void 0,t),t.currentTarget=null}function XC(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var r=t[n],s=r.event;r=r.listeners;e:{var i=void 0;if(e)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==i&&s.isPropagationStopped())break e;wx(s,a,c),i=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,c=a.currentTarget,a=a.listener,l!==i&&s.isPropagationStopped())break e;wx(s,a,c),i=l}}}if(Zd)throw t=_g,Zd=!1,_g=null,t}function Oe(t,e){var n=e[zg];n===void 0&&(n=e[zg]=new Set);var r=t+"__bubble";n.has(r)||(ZC(e,t,2,!1),n.add(r))}function Zp(t,e,n){var r=0;e&&(r|=4),ZC(n,t,r,e)}var Pu="_reactListening"+Math.random().toString(36).slice(2);function wc(t){if(!t[Pu]){t[Pu]=!0,oC.forEach(function(n){n!=="selectionchange"&&(PM.has(n)||Zp(n,!1,t),Zp(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[Pu]||(e[Pu]=!0,Zp("selectionchange",!1,e))}}function ZC(t,e,n,r){switch(LC(e)){case 1:var s=K2;break;case 4:s=Y2;break;default:s=zv}n=s.bind(null,e,n,t),s=void 0,!Ag||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(s=!0),r?s!==void 0?t.addEventListener(e,n,{capture:!0,passive:s}):t.addEventListener(e,n,!0):s!==void 0?t.addEventListener(e,n,{passive:s}):t.addEventListener(e,n,!1)}function em(t,e,n,r,s){var i=r;if(!(e&1)&&!(e&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===s||a.nodeType===8&&a.parentNode===s)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;o=o.return}for(;a!==null;){if(o=ji(a),o===null)return;if(l=o.tag,l===5||l===6){r=i=o;continue e}a=a.parentNode}}r=r.return}kC(function(){var c=i,u=Iv(n),h=[];e:{var p=QC.get(t);if(p!==void 0){var f=Fv,g=t;switch(t){case"keypress":if(Td(n)===0)break e;case"keydown":case"keyup":f=uM;break;case"focusin":g="focus",f=Gp;break;case"focusout":g="blur",f=Gp;break;case"beforeblur":case"afterblur":f=Gp;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":f=cx;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":f=X2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":f=fM;break;case GC:case KC:case YC:f=tM;break;case JC:f=mM;break;case"scroll":f=J2;break;case"wheel":f=yM;break;case"copy":case"cut":case"paste":f=rM;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":f=dx}var m=(e&4)!==0,y=!m&&t==="scroll",v=m?p!==null?p+"Capture":null:p;m=[];for(var b=c,x;b!==null;){x=b;var k=x.stateNode;if(x.tag===5&&k!==null&&(x=k,v!==null&&(k=mc(b,v),k!=null&&m.push(kc(b,k,x)))),y)break;b=b.return}0<m.length&&(p=new f(p,g,null,n,u),h.push({event:p,listeners:m}))}}if(!(e&7)){e:{if(p=t==="mouseover"||t==="pointerover",f=t==="mouseout"||t==="pointerout",p&&n!==Tg&&(g=n.relatedTarget||n.fromElement)&&(ji(g)||g[Zr]))break e;if((f||p)&&(p=u.window===u?u:(p=u.ownerDocument)?p.defaultView||p.parentWindow:window,f?(g=n.relatedTarget||n.toElement,f=c,g=g?ji(g):null,g!==null&&(y=vo(g),g!==y||g.tag!==5&&g.tag!==6)&&(g=null)):(f=null,g=c),f!==g)){if(m=cx,k="onMouseLeave",v="onMouseEnter",b="mouse",(t==="pointerout"||t==="pointerover")&&(m=dx,k="onPointerLeave",v="onPointerEnter",b="pointer"),y=f==null?p:Yo(f),x=g==null?p:Yo(g),p=new m(k,b+"leave",f,n,u),p.target=y,p.relatedTarget=x,k=null,ji(u)===c&&(m=new m(v,b+"enter",g,n,u),m.target=x,m.relatedTarget=y,k=m),y=k,f&&g)t:{for(m=f,v=g,b=0,x=m;x;x=No(x))b++;for(x=0,k=v;k;k=No(k))x++;for(;0<b-x;)m=No(m),b--;for(;0<x-b;)v=No(v),x--;for(;b--;){if(m===v||v!==null&&m===v.alternate)break t;m=No(m),v=No(v)}m=null}else m=null;f!==null&&kx(h,p,f,m,!1),g!==null&&y!==null&&kx(h,y,g,m,!0)}}
vendor: 7,613 bytes, lines 37-38
37e:{if(p=c?Yo(c):window,f=p.nodeName&&p.nodeName.toLowerCase(),f==="select"||f==="input"&&p.type==="file")var S=CM;else if(px(p))if(WC)S=AM;else{S=TM;var C=EM}else(f=p.nodeName)&&f.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(S=NM);if(S&&(S=S(t,c))){FC(h,S,n,u);break e}C&&C(t,p,c),t==="focusout"&&(C=p._wrapperState)&&C.controlled&&p.type==="number"&&wg(p,"number",p.value)}switch(C=c?Yo(c):window,t){case"focusin":(px(C)||C.contentEditable==="true")&&(Go=C,Mg=c,Vl=null);break;case"focusout":Vl=Mg=Go=null;break;case"mousedown":Pg=!0;break;case"contextmenu":case"mouseup":case"dragend":Pg=!1,bx(h,n,u);break;case"selectionchange":if(OM)break;case"keydown":case"keyup":bx(h,n,u)}var E;if(Hv)e:{switch(t){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else qo?zC(t,n)&&(T="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(T="onCompositionStart");T&&($C&&n.locale!=="ko"&&(qo||T!=="onCompositionStart"?T==="onCompositionEnd"&&qo&&(E=DC()):(Is=u,Bv="value"in Is?Is.value:Is.textContent,qo=!0)),C=sh(c,T),0<C.length&&(T=new ux(T,t,null,n,u),h.push({event:T,listeners:C}),E?T.data=E:(E=BC(n),E!==null&&(T.data=E)))),(E=bM?xM(t,n):wM(t,n))&&(c=sh(c,"onBeforeInput"),0<c.length&&(u=new ux("onBeforeInput","beforeinput",null,n,u),h.push({event:u,listeners:c}),u.data=E))}XC(h,e)})}function kc(t,e,n){return{instance:t,listener:e,currentTarget:n}}function sh(t,e){for(var n=e+"Capture",r=[];t!==null;){var s=t,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=mc(t,n),i!=null&&r.unshift(kc(t,i,s)),i=mc(t,e),i!=null&&r.push(kc(t,i,s))),t=t.return}return r}function No(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function kx(t,e,n,r,s){for(var i=e._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&c!==null&&(a=c,s?(l=mc(n,i),l!=null&&o.unshift(kc(n,l,a))):s||(l=mc(n,i),l!=null&&o.push(kc(n,l,a)))),n=n.return}o.length!==0&&t.push({event:e,listeners:o})}var IM=/\r\n?/g,LM=/\u0000|\uFFFD/g;function Sx(t){return(typeof t=="string"?t:""+t).replace(IM,` 38`).replace(LM,"")}function Iu(t,e,n){if(e=Sx(e),Sx(t)!==e&&n)throw Error(L(425))}function ih(){}var Ig=null,Lg=null;function Dg(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var $g=typeof setTimeout=="function"?setTimeout:void 0,DM=typeof clearTimeout=="function"?clearTimeout:void 0,Cx=typeof Promise=="function"?Promise:void 0,$M=typeof queueMicrotask=="function"?queueMicrotask:typeof Cx<"u"?function(t){return Cx.resolve(null).then(t).catch(zM)}:$g;function zM(t){setTimeout(function(){throw t})}function tm(t,e){var n=e,r=0;do{var s=n.nextSibling;if(t.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){t.removeChild(s),vc(e);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);vc(e)}function Hs(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function Ex(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"){if(e===0)return t;e--}else n==="/$"&&e++}t=t.previousSibling}return null}var Ga=Math.random().toString(36).slice(2),yr="__reactFiber$"+Ga,Sc="__reactProps$"+Ga,Zr="__reactContainer$"+Ga,zg="__reactEvents$"+Ga,BM="__reactListeners$"+Ga,FM="__reactHandles$"+Ga;function ji(t){var e=t[yr];if(e)return e;for(var n=t.parentNode;n;){if(e=n[Zr]||n[yr]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=Ex(t);t!==null;){if(n=t[yr])return n;t=Ex(t)}return e}t=n,n=t.parentNode}return null}function cu(t){return t=t[yr]||t[Zr],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function Yo(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(L(33))}function If(t){return t[Sc]||null}var Bg=[],Jo=-1;function ui(t){return{current:t}}function Me(t){0>Jo||(t.current=Bg[Jo],Bg[Jo]=null,Jo--)}function Ae(t,e){Jo++,Bg[Jo]=t.current,t.current=e}var ni={},Ot=ui(ni),Qt=ui(!1),no=ni;function Na(t,e){var n=t.type.contextTypes;if(!n)return ni;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=e[i];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=s),s}function Xt(t){return t=t.childContextTypes,t!=null}function oh(){Me(Qt),Me(Ot)}function Tx(t,e,n){if(Ot.current!==ni)throw Error(L(168));Ae(Ot,e),Ae(Qt,n)}function eE(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in e))throw Error(L(108,E2(t)||"Unknown",s));return ze({},n,r)}function ah(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||ni,no=Ot.current,Ae(Ot,t),Ae(Qt,Qt.current),!0}function Nx(t,e,n){var r=t.stateNode;if(!r)throw Error(L(169));n?(t=eE(t,e,no),r.__reactInternalMemoizedMergedChildContext=t,Me(Qt),Me(Ot),Ae(Ot,t)):Me(Qt),Ae(Qt,n)}var Hr=null,Lf=!1,nm=!1;function tE(t){Hr===null?Hr=[t]:Hr.push(t)}function WM(t){Lf=!0,tE(t)}function di(){if(!nm&&Hr!==null){nm=!0;var t=0,e=ke;try{var n=Hr;for(ke=1;t<n.length;t++){var r=n[t];do r=r(!0);while(r!==null)}Hr=null,Lf=!1}catch(s){throw Hr!==null&&(Hr=Hr.slice(t+1)),TC(Lv,di),s}finally{ke=e,nm=!1}}return null}var Qo=[],Xo=0,lh=null,ch=0,Sn=[],Cn=0,ro=null,qr=1,Gr="";function Ei(t,e){Qo[Xo++]=ch,Qo[Xo++]=lh,lh=t,ch=e}function nE(t,e,n){Sn[Cn++]=qr,Sn[Cn++]=Gr,Sn[Cn++]=ro,ro=t;var r=qr;t=Gr;var s=32-Xn(r)-1;r&=~(1<<s),n+=1;var i=32-Xn(e)+s;if(30<i){var o=s-s%5;i=(r&(1<<o)-1).toString(32),r>>=o,s-=o,qr=1<<32-Xn(e)+s|n<<s|r,Gr=i+t}else qr=1<<i|n<<s|r,Gr=t}function Vv(t){t.return!==null&&(Ei(t,1),nE(t,1,0))}function qv(t){for(;t===lh;)lh=Qo[--Xo],Qo[Xo]=null,ch=Qo[--Xo],Qo[Xo]=null;for(;t===ro;)ro=Sn[--Cn],Sn[Cn]=null,Gr=Sn[--Cn],Sn[Cn]=null,qr=Sn[--Cn],Sn[Cn]=null}var un=null,cn=null,Ie=!1,Gn=null;function rE(t,e){var n=Tn(5,null,null,0);n.elementType="DELETED",n.stateNode=e,n.return=t,e=t.deletions,e===null?(t.deletions=[n],t.flags|=16):e.push(n)}function Ax(t,e){switch(t.tag){case 5:var n=t.type;return e=e.nodeType!==1||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,un=t,cn=Hs(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,un=t,cn=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(n=ro!==null?{id:qr,overflow:Gr}:null,t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},n=Tn(18,null,null,0),n.stateNode=e,n.return=t,t.child=n,un=t,cn=null,!0):!1;default:return!1}}function Fg(t){return(t.mode&1)!==0&&(t.flags&128)===0}function Wg(t){if(Ie){var e=cn;if(e){var n=e;if(!Ax(t,e)){if(Fg(t))throw Error(L(418));e=Hs(n.nextSibling);var r=un;e&&Ax(t,e)?rE(r,n):(t.flags=t.flags&-4097|2,Ie=!1,un=t)}}else{if(Fg(t))throw Error(L(418));t.flags=t.flags&-4097|2,Ie=!1,un=t}}}function _x(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;un=t}function Lu(t){if(t!==un)return!1;if(!Ie)return _x(t),Ie=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!Dg(t.type,t.memoizedProps)),e&&(e=cn)){if(Fg(t))throw sE(),Error(L(418));for(;e;)rE(t,e),e=Hs(e.nextSibling)}if(_x(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(L(317));e:{for(t=t.nextSibling,e=0;t;
vendor: 25,596 bytes, lines 38-40
38){if(t.nodeType===8){var n=t.data;if(n==="/$"){if(e===0){cn=Hs(t.nextSibling);break e}e--}else n!=="$"&&n!=="$!"&&n!=="$?"||e++}t=t.nextSibling}cn=null}}else cn=un?Hs(t.stateNode.nextSibling):null;return!0}function sE(){for(var t=cn;t;)t=Hs(t.nextSibling)}function Aa(){cn=un=null,Ie=!1}function Gv(t){Gn===null?Gn=[t]:Gn.push(t)}var HM=ss.ReactCurrentBatchConfig;function hl(t,e,n){if(t=n.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(L(309));var r=n.stateNode}if(!r)throw Error(L(147,t));var s=r,i=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===i?e.ref:(e=function(o){var a=s.refs;o===null?delete a[i]:a[i]=o},e._stringRef=i,e)}if(typeof t!="string")throw Error(L(284));if(!n._owner)throw Error(L(290,t))}return t}function Du(t,e){throw t=Object.prototype.toString.call(e),Error(L(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function jx(t){var e=t._init;return e(t._payload)}function iE(t){function e(v,b){if(t){var x=v.deletions;x===null?(v.deletions=[b],v.flags|=16):x.push(b)}}function n(v,b){if(!t)return null;for(;b!==null;)e(v,b),b=b.sibling;return null}function r(v,b){for(v=new Map;b!==null;)b.key!==null?v.set(b.key,b):v.set(b.index,b),b=b.sibling;return v}function s(v,b){return v=Gs(v,b),v.index=0,v.sibling=null,v}function i(v,b,x){return v.index=x,t?(x=v.alternate,x!==null?(x=x.index,x<b?(v.flags|=2,b):x):(v.flags|=2,b)):(v.flags|=1048576,b)}function o(v){return t&&v.alternate===null&&(v.flags|=2),v}function a(v,b,x,k){return b===null||b.tag!==6?(b=cm(x,v.mode,k),b.return=v,b):(b=s(b,x),b.return=v,b)}function l(v,b,x,k){var S=x.type;return S===Vo?u(v,b,x.props.children,k,x.key):b!==null&&(b.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===xs&&jx(S)===b.type)?(k=s(b,x.props),k.ref=hl(v,b,x),k.return=v,k):(k=Md(x.type,x.key,x.props,null,v.mode,k),k.ref=hl(v,b,x),k.return=v,k)}function c(v,b,x,k){return b===null||b.tag!==4||b.stateNode.containerInfo!==x.containerInfo||b.stateNode.implementation!==x.implementation?(b=um(x,v.mode,k),b.return=v,b):(b=s(b,x.children||[]),b.return=v,b)}function u(v,b,x,k,S){return b===null||b.tag!==7?(b=Ji(x,v.mode,k,S),b.return=v,b):(b=s(b,x),b.return=v,b)}function h(v,b,x){if(typeof b=="string"&&b!==""||typeof b=="number")return b=cm(""+b,v.mode,x),b.return=v,b;if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Tu:return x=Md(b.type,b.key,b.props,null,v.mode,x),x.ref=hl(v,null,b),x.return=v,x;case Uo:return b=um(b,v.mode,x),b.return=v,b;case xs:var k=b._init;return h(v,k(b._payload),x)}if(Al(b)||al(b))return b=Ji(b,v.mode,x,null),b.return=v,b;Du(v,b)}return null}function p(v,b,x,k){var S=b!==null?b.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return S!==null?null:a(v,b,""+x,k);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Tu:return x.key===S?l(v,b,x,k):null;case Uo:return x.key===S?c(v,b,x,k):null;case xs:return S=x._init,p(v,b,S(x._payload),k)}if(Al(x)||al(x))return S!==null?null:u(v,b,x,k,null);Du(v,x)}return null}function f(v,b,x,k,S){if(typeof k=="string"&&k!==""||typeof k=="number")return v=v.get(x)||null,a(b,v,""+k,S);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case Tu:return v=v.get(k.key===null?x:k.key)||null,l(b,v,k,S);case Uo:return v=v.get(k.key===null?x:k.key)||null,c(b,v,k,S);case xs:var C=k._init;return f(v,b,x,C(k._payload),S)}if(Al(k)||al(k))return v=v.get(x)||null,u(b,v,k,S,null);Du(b,k)}return null}function g(v,b,x,k){for(var S=null,C=null,E=b,T=b=0,N=null;E!==null&&T<x.length;T++){E.index>T?(N=E,E=null):N=E.sibling;var _=p(v,E,x[T],k);if(_===null){E===null&&(E=N);break}t&&E&&_.alternate===null&&e(v,E),b=i(_,b,T),C===null?S=_:C.sibling=_,C=_,E=N}if(T===x.length)return n(v,E),Ie&&Ei(v,T),S;if(E===null){for(;T<x.length;T++)E=h(v,x[T],k),E!==null&&(b=i(E,b,T),C===null?S=E:C.sibling=E,C=E);return Ie&&Ei(v,T),S}for(E=r(v,E);T<x.length;T++)N=f(E,v,T,x[T],k),N!==null&&(t&&N.alternate!==null&&E.delete(N.key===null?T:N.key),b=i(N,b,T),C===null?S=N:C.sibling=N,C=N);return t&&E.forEach(function(z){return e(v,z)}),Ie&&Ei(v,T),S}function m(v,b,x,k){var S=al(x);if(typeof S!="function")throw Error(L(150));if(x=S.call(x),x==null)throw Error(L(151));for(var C=S=null,E=b,T=b=0,N=null,_=x.next();E!==null&&!_.done;T++,_=x.next()){E.index>T?(N=E,E=null):N=E.sibling;var z=p(v,E,_.value,k);if(z===null){E===null&&(E=N);break}t&&E&&z.alternate===null&&e(v,E),b=i(z,b,T),C===null?S=z:C.sibling=z,C=z,E=N}if(_.done)return n(v,E),Ie&&Ei(v,T),S;if(E===null){for(;!_.done;T++,_=x.next())_=h(v,_.value,k),_!==null&&(b=i(_,b,T),C===null?S=_:C.sibling=_,C=_);return Ie&&Ei(v,T),S}for(E=r(v,E);!_.done;T++,_=x.next())_=f(E,v,T,_.value,k),_!==null&&(t&&_.alternate!==null&&E.delete(_.key===null?T:_.key),b=i(_,b,T),C===null?S=_:C.sibling=_,C=_);return t&&E.forEach(function(I){return e(v,I)}),Ie&&Ei(v,T),S}function y(v,b,x,k){if(typeof x=="object"&&x!==null&&x.type===Vo&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Tu:e:{for(var S=x.key,C=b;C!==null;){if(C.key===S){if(S=x.type,S===Vo){if(C.tag===7){n(v,C.sibling),b=s(C,x.props.children),b.return=v,v=b;break e}}else if(C.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===xs&&jx(S)===C.type){n(v,C.sibling),b=s(C,x.props),b.ref=hl(v,C,x),b.return=v,v=b;break e}n(v,C);break}else e(v,C);C=C.sibling}x.type===Vo?(b=Ji(x.props.children,v.mode,k,x.key),b.return=v,v=b):(k=Md(x.type,x.key,x.props,null,v.mode,k),k.ref=hl(v,b,x),k.return=v,v=k)}return o(v);case Uo:e:{for(C=x.key;b!==null;){if(b.key===C)if(b.tag===4&&b.stateNode.containerInfo===x.containerInfo&&b.stateNode.implementation===x.implementation){n(v,b.sibling),b=s(b,x.children||[]),b.return=v,v=b;break e}else{n(v,b);break}else e(v,b);b=b.sibling}b=um(x,v.mode,k),b.return=v,v=b}return o(v);case xs:return C=x._init,y(v,b,C(x._payload),k)}if(Al(x))return g(v,b,x,k);if(al(x))return m(v,b,x,k);Du(v,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,b!==null&&b.tag===6?(n(v,b.sibling),b=s(b,x),b.return=v,v=b):(n(v,b),b=cm(x,v.mode,k),b.return=v,v=b),o(v)):n(v,b)}return y}var _a=iE(!0),oE=iE(!1),uh=ui(null),dh=null,Zo=null,Kv=null;function Yv(){Kv=Zo=dh=null}function Jv(t){var e=uh.current;Me(uh),t._currentValue=e}function Hg(t,e,n){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function aa(t,e){dh=t,Kv=Zo=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(Jt=!0),t.firstContext=null)}function On(t){var e=t._currentValue;if(Kv!==t)if(t={context:t,memoizedValue:e,next:null},Zo===null){if(dh===null)throw Error(L(308));Zo=t,dh.dependencies={lanes:0,firstContext:t}}else Zo=Zo.next=t;return e}var Oi=null;function Qv(t){Oi===null?Oi=[t]:Oi.push(t)}function aE(t,e,n,r){var s=e.interleaved;return s===null?(n.next=n,Qv(e)):(n.next=s.next,s.next=n),e.interleaved=n,es(t,r)}function es(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var ws=!1;function Xv(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function lE(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Jr(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function Us(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,fe&2){var s=r.pending;return s===null?e.next=e:(e.next=s.next,s.next=e),r.pending=e,es(t,n)}return s=r.interleaved,s===null?(e.next=e,Qv(r)):(e.next=s.next,s.next=e),r.interleaved=e,es(t,n)}function Nd(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,Dv(t,n)}}function Ox(t,e){var n=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?s=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?s=i=e:i=i.next=e}else s=i=e;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function hh(t,e,n,r){var s=t.updateQueue;ws=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?i=c:o.next=c,o=l;var u=t.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==o&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(i!==null){var h=s.baseState;o=0,u=c=l=null,a=i;do{var p=a.lane,f=a.eventTime;if((r&p)===p){u!==null&&(u=u.next={eventTime:f,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var g=t,m=a;switch(p=e,f=n,m.tag){case 1:if(g=m.payload,typeof g=="function"){h=g.call(f,h,p);break e}h=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=m.payload,p=typeof g=="function"?g.call(f,h,p):g,p==null)break e;h=ze({},h,p);break e;case 2:ws=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,p=s.effects,p===null?s.effects=[a]:p.push(a))}else f={eventTime:f,lane:p,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=f,l=h):u=u.next=f,o|=p;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;p=a,a=p.next,p.next=null,s.lastBaseUpdate=p,s.shared.pending=null}}while(!0);if(u===null&&(l=h),s.baseState=l,s.firstBaseUpdate=c,s.lastBaseUpdate=u,e=s.shared.interleaved,e!==null){s=e;do o|=s.lane,s=s.next;while(s!==e)}else i===null&&(s.shared.lanes=0);io|=o,t.lanes=o,t.memoizedState=h}}function Rx(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var r=t[e],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(L(191,s));s.call(r)}}}var uu={},wr=ui(uu),Cc=ui(uu),Ec=ui(uu);function Ri(t){if(t===uu)throw Error(L(174));return t}function Zv(t,e){switch(Ae(Ec,e),Ae(Cc,t),Ae(wr,uu),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Sg(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Sg(e,t)}Me(wr),Ae(wr,e)}function ja(){Me(wr),Me(Cc),Me(Ec)}function cE(t){Ri(Ec.current);var e=Ri(wr.current),n=Sg(e,t.type);e!==n&&(Ae(Cc,t),Ae(wr,n))}function e0(t){Cc.current===t&&(Me(wr),Me(Cc))}var De=ui(0);function fh(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var rm=[];function t0(){for(var t=0;t<rm.length;t++)rm[t]._workInProgressVersionPrimary=null;rm.length=0}var Ad=ss.ReactCurrentDispatcher,sm=ss.ReactCurrentBatchConfig,so=0,$e=null,it=null,ct=null,ph=!1,ql=!1,Tc=0,UM=0;function Et(){throw Error(L(321))}function n0(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!tr(t[n],e[n]))return!1;return!0}function r0(t,e,n,r,s,i){if(so=i,$e=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,Ad.current=t===null||t.memoizedState===null?KM:YM,t=n(r,s),ql){i=0;do{if(ql=!1,Tc=0,25<=i)throw Error(L(301));i+=1,ct=it=null,e.updateQueue=null,Ad.current=JM,t=n(r,s)}while(ql)}if(Ad.current=mh,e=it!==null&&it.next!==null,so=0,ct=it=$e=null,ph=!1,e)throw Error(L(300));return t}function s0(){var t=Tc!==0;return Tc=0,t}function lr(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ct===null?$e.memoizedState=ct=t:ct=ct.next=t,ct}function Rn(){if(it===null){var t=$e.alternate;t=t!==null?t.memoizedState:null}else t=it.next;var e=ct===null?$e.memoizedState:ct.next;if(e!==null)ct=e,it=t;else{if(t===null)throw Error(L(310));it=t,t={memoizedState:it.memoizedState,baseState:it.baseState,baseQueue:it.baseQueue,queue:it.queue,next:null},ct===null?$e.memoizedState=ct=t:ct=ct.next=t}return ct}function Nc(t,e){return typeof e=="function"?e(t):e}function im(t){var e=Rn(),n=e.queue;if(n===null)throw Error(L(311));n.lastRenderedReducer=t;var r=it,s=r.baseQueue,i=n.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}r.baseQueue=s=i,n.pending=null}if(s!==null){i=s.next,r=r.baseState;var a=o=null,l=null,c=i;do{var u=c.lane;if((so&u)===u)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:t(r,c.action);else{var h={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=h,o=r):l=l.next=h,$e.lanes|=u,io|=u}c=c.next}while(c!==null&&c!==i);l===null?o=r:l.next=a,tr(r,e.memoizedState)||(Jt=!0),e.memoizedState=r,e.baseState=o,e.baseQueue=l,n.lastRenderedState=r}if(t=n.interleaved,t!==null){s=t;do i=s.lane,$e.lanes|=i,io|=i,s=s.next;while(s!==t)}else s===null&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function om(t){var e=Rn(),n=e.queue;if(n===null)throw Error(L(311));n.lastRenderedReducer=t;var r=n.dispatch,s=n.pending,i=e.memoizedState;if(s!==null){n.pending=null;var o=s=s.next;do i=t(i,o.action),o=o.next;while(o!==s);tr(i,e.memoizedState)||(Jt=!0),e.memoizedState=i,e.baseQueue===null&&(e.baseState=i),n.lastRenderedState=i}return[i,r]}function uE(){}function dE(t,e){var n=$e,r=Rn(),s=e(),i=!tr(r.memoizedState,s);if(i&&(r.memoizedState=s,Jt=!0),r=r.queue,i0(pE.bind(null,n,r,t),[t]),r.getSnapshot!==e||i||ct!==null&&ct.memoizedState.tag&1){if(n.flags|=2048,Ac(9,fE.bind(null,n,r,s,e),void 0,null),dt===null)throw Error(L(349));so&30||hE(n,e,s)}return s}function hE(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=$e.updateQueue,e===null?(e={lastEffect:null,stores:null},$e.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function fE(t,e,n,r){e.value=n,e.getSnapshot=r,mE(e)&&gE(t)}function pE(t,e,n){return n(function(){mE(e)&&gE(t)})}function mE(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!tr(t,n)}catch{return!0}}function gE(t){var e=es(t,1);e!==null&&Zn(e,t,1,-1)}function Mx(t){var e=lr();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Nc,lastRenderedState:t},e.queue=t,t=t.dispatch=GM.bind(null,$e,t),[e.memoizedState,t]}function Ac(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},e=$e.updateQueue,e===null?(e={lastEffect:null,stores:null},$e.updateQueue=e,e.lastEffect=t.next=t):(n=e.lastEffect,n===null?e.lastEffect=t.next=t:(r=n.next,n.next=t,t.next=r,e.lastEffect=t)),t}function yE(){return Rn().memoizedState}function _d(t,e,n,r){var s=lr();$e.flags|=t,s.memoizedState=Ac(1|e,n,void 0,r===void 0?null:r)}function Df(t,e,n,r){var s=Rn();r=r===void 0?null:r;var i=void 0;if(it!==null){var o=it.memoizedState;if(i=o.destroy,r!==null&&n0(r,o.deps)){s.memoizedState=Ac(e,n,i,r);return}}$e.flags|=t,s.memoizedState=Ac(1|e,n,i,r)}function Px(t,e){return _d(8390656,8,t,e)}function i0(t,e){return Df(2048,8,t,e)}function vE(t,e){return Df(4,2,t,e)}function bE(t,e){return Df(4,4,t,e)}function xE(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function wE(t,e,n){return n=n!=null?n.concat([t]):null,Df(4,4,xE.bind(null,e,t),n)}function o0(){}function kE(t,e){var n=Rn();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&n0(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function SE(t,e){var n=Rn();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&n0(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function CE(t,e,n){return so&21?(tr(n,e)||(n=_C(),$e.lanes|=n,io|=n,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,Jt=!0),t.memoizedState=n)}function VM(t,e){var n=ke;ke=n!==0&&4>n?n:4,t(!0);var r=sm.transition;sm.transition={};try{t(!1),e()}finally{ke=n,sm.transition=r}}function EE(){return Rn().memoizedState}function qM(t,e,n){var r=qs(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},TE(t))NE(e,n);else if(n=aE(t,e,n,r),n!==null){var s=zt();Zn(n,t,r,s),AE(n,e,r)}}function GM(t,e,n){var r=qs(t),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(TE(t))NE(e,s);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var o=e.lastRenderedState,a=i(o,n);if(s.hasEagerState=!0,s.eagerState=a,tr(a,o)){var l=e.interleaved;l===null?(s.next=s,Qv(e)):(s.next=l.next,l.next=s),e.interleaved=s;return}}catch{}finally{}n=aE(t,e,s,r),n!==null&&(s=zt(),Zn(n,t,r,s),AE(n,e,r))}}function TE(t){var e=t.alternate;return t===$e||e!==null&&e===$e}function NE(t,e){ql=ph=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function AE(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,Dv(t,n)}}var mh={readContext:On,useCallback:Et,useContext:Et,useEffect:Et,useImperativeHandle:Et,useInsertionEffect:Et,useLayoutEffect:Et,useMemo:Et,useReducer:Et,useRef:Et,useState:Et,useDebugValue:Et,useDeferredValue:Et,useTransition:Et,useMutableSource:Et,useSyncExternalStore:Et,useId:Et,unstable_isNewReconciler:!1},KM={readContext:On,useCallback:function(t,e){return lr().memoizedState=[t,e===void 0?null:e],t},useContext:On,useEffect:Px,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,_d(4194308,4,xE.bind(null,e,t),n)},useLayoutEffect:function(t,e){return _d(4194308,4,t,e)},useInsertionEffect:function(t,e){return _d(4,2,t,e)},useMemo:function(t,e){var n=lr();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=lr();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=qM.bind(null,$e,t),[r.memoizedState,t]},useRef:function(t){var e=lr();return t={current:t},e.memoizedState=t},useState:Mx,useDebugValue:o0,useDeferredValue:function(t){return lr().memoizedState=t},useTransition:function(){var t=Mx(!1),e=t[0];return t=VM.bind(null,t[1]),lr().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=$e,s=lr();if(Ie){if(n===void 0)throw Error(L(407));n=n()}else{if(n=e(),dt===null)throw Error(L(349));so&30||hE(r,e,n)}s.memoizedState=n;var i={value:n,getSnapshot:e};return s.queue=i,Px(pE.bind(null,r,i,t),[t]),r.flags|=2048,Ac(9,fE.bind(null,r,i,n,e),void 0,null),n},useId:function(){var t=lr(),e=dt.identifierPrefix;if(Ie){var n=Gr,r=qr;n=(r&~(1<<32-Xn(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=Tc++,0<n&&(e+="H"+n.toString(32)),e+=":"}else n=UM++,e=":"+e+"r"+n.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},YM={readContext:On,useCallback:kE,useContext:On,useEffect:i0,useImperativeHandle:wE,useInsertionEffect:vE,useLayoutEffect:bE,useMemo:SE,useReducer:im,useRef:yE,useState:function(){return im(Nc)},useDebugValue:o0,useDeferredValue:function(t){var e=Rn();return CE(e,it.memoizedState,t)},useTransition:function(){var t=im(Nc)[0],e=Rn().memoizedState;return[t,e]},useMutableSource:uE,useSyncExternalStore:dE,useId:EE,unstable_isNewReconciler:!1},JM={readContext:On,useCallback:kE,useContext:On,useEffect:i0,useImperativeHandle:wE,useInsertionEffect:vE,useLayoutEffect:bE,useMemo:SE,useReducer:om,useRef:yE,useState:function(){return om(Nc)},useDebugValue:o0,useDeferredValue:function(t){var e=Rn();return it===null?e.memoizedState=t:CE(e,it.memoizedState,t)},useTransition:function(){var t=om(Nc)[0],e=Rn().memoizedState;return[t,e]},useMutableSource:uE,useSyncExternalStore:dE,useId:EE,unstable_isNewReconciler:!1};function Fn(t,e){if(t&&t.defaultProps){e=ze({},e),t=t.defaultProps;for(var n in t)e[n]===void 0&&(e[n]=t[n]);return e}return e}function Ug(t,e,n,r){e=t.memoizedState,n=n(r,e),n=n==null?e:ze({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var $f={isMounted:function(t){return(t=t._reactInternals)?vo(t)===t:!1},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=zt(),s=qs(t),i=Jr(r,s);i.payload=e,n!=null&&(i.callback=n),e=Us(t,i,s),e!==null&&(Zn(e,t,s,r),Nd(e,t,s))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=zt(),s=qs(t),i=Jr(r,s);i.tag=1,i.payload=e,n!=null&&(i.callback=n),e=Us(t,i,s),e!==null&&(Zn(e,t,s,r),Nd(e,t,s))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=zt(),r=qs(t),s=Jr(n,r);s.tag=2,e!=null&&(s.callback=e),e=Us(t,s,r),e!==null&&(Zn(e,t,r,n),Nd(e,t,r))}};function Ix(t,e,n,r,s,i,o){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(r,i,o):e.prototype&&e.prototype.isPureReactComponent?!xc(n,r)||!xc(s,i):!0}function _E(t,e,n){var r=!1,s=ni,i=e.contextType;return typeof i=="object"&&i!==null?i=On(i):(s=Xt(e)?no:Ot.current,r=e.contextTypes,i=(r=r!=null)?Na(t,s):ni),e=new e(n,i),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=$f,t.stateNode=e,e._reactInternals=t,r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=s,t.__reactInternalMemoizedMaskedChildContext=i),e}function Lx(t,e,n,r){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,r),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&$f.enqueueReplaceState(e,e.state,null)}function Vg(t,e,n,r){var s=t.stateNode;s.props=n,s.state=t.memoizedState,s.refs={},Xv(t);var i=e.contextType;typeof i=="object"&&i!==null?s.context=On(i):(i=Xt(e)?no:Ot.current,s.context=Na(t,i)),s.state=t.memoizedState,i=e.getDerivedStateFromProps,typeof i=="function"&&(Ug(t,e,i,n),s.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(e=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),e!==s.state&&$f.enqueueReplaceState(s,s.state,null),hh(t,n,s,r),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308)}function Oa(t,e){try{var n="",r=e;do n+=C2(r),r=r.return;while(r);var s=n}catch(i){s=` 39Error generating stack: `+i.message+` 40`+i.stack}return{value:t,source:e,stack:s,digest:null}}function am(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function qg(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var QM=typeof WeakMap=="function"?WeakMap:Map;function jE(t,e,n){n=Jr(-1,n),n.tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){yh||(yh=!0,ny=r),qg(t,e)},n}function OE(t,e,n){n=Jr(-1,n),n.tag=3;var r=t.type.getDerivedStateFromError;if(typeof r=="function"){var s=e.value;n.payload=function(){return r(s)},n.callback=function(){qg(t,e)}}var i=t.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){qg(t,e),typeof r!="function"&&(Vs===null?Vs=new Set([this]):Vs.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),n}function Dx(t,e,n){var r=t.pingCache;if(r===null){r=t.pingCache=new QM;var s=new Set;r.set(e,s)}else s=r.get(e),s===void 0&&(s=new Set,r.set(e,s));s.has(n)||(s.add(n),t=dP.bind(null,t,e,n),e.then(t,t))}function $x(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function zx(t,e,n,r,s){return t.mode&1?(t.flags|=65536,t.lanes=s,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(e=Jr(-1,1),e.tag=2,Us(n,e,1))),n.lanes|=1),t)}var XM=ss.ReactCurrentOwner,Jt=!1;function Lt(t,e,n,r){e.child=t===null?oE(e,null,n,r):_a(e,t.child,n,r)}function Bx(t,e,n,r,s){n=n.render;var i=e.ref;return aa(e,s),r=r0(t,e,n,r,i,s),n=s0(),t!==null&&!Jt?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,ts(t,e,s)):(Ie&&n&&Vv(e),e.flags|=1,Lt(t,e,r,s),e.child)}function Fx(t,e,n,r,s){if(t===null){var i=n.type;return typeof i=="function"&&!p0(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=i,RE(t,e,i,r,s)):(t=Md(n.type,null,r,e,e.mode,s),t.ref=e.ref,t.return=e,e.child=t)}if(i=t.child,!(t.lanes&s)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:xc,n(o,r)&&t.ref===e.ref)return ts(t,e,s)}return e.flags|=1,t=Gs(i,r),t.ref=e.ref,t.return=e,e.child=t}function RE(t,e,n,r,s){if(t!==null){var i=t.memoizedProps;if(xc(i,r)&&t.ref===e.ref)if(Jt=!1,e.pendingProps=r=i,(t.lanes&s)!==0)t.flags&131072&&(Jt=!0);else return e.lanes=t.lanes,ts(t,e,s)}return Gg(t,e,n,r,s)}function ME(t,e,n){var r=e.pendingProps,s=r.children,i=t!==null?t.memoizedState:null;if(r.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ae(ta,nn),nn|=n;else{if(!(n&1073741824))return t=i!==null?i.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,Ae(ta,nn),nn|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,Ae(ta,nn),nn|=r}else i!==null?(r=i.baseLanes|n,e.memoizedState=null):r=n,Ae(ta,nn),nn|=r;return Lt(t,e,s,n),e.child}function PE(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}
vendor: 7,934 bytes, line 40
40function Gg(t,e,n,r,s){var i=Xt(n)?no:Ot.current;return i=Na(e,i),aa(e,s),n=r0(t,e,n,r,i,s),r=s0(),t!==null&&!Jt?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,ts(t,e,s)):(Ie&&r&&Vv(e),e.flags|=1,Lt(t,e,n,s),e.child)}function Wx(t,e,n,r,s){if(Xt(n)){var i=!0;ah(e)}else i=!1;if(aa(e,s),e.stateNode===null)jd(t,e),_E(e,n,r),Vg(e,n,r,s),r=!0;else if(t===null){var o=e.stateNode,a=e.memoizedProps;o.props=a;var l=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=On(c):(c=Xt(n)?no:Ot.current,c=Na(e,c));var u=n.getDerivedStateFromProps,h=typeof u=="function"||typeof o.getSnapshotBeforeUpdate=="function";h||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==c)&&Lx(e,o,r,c),ws=!1;var p=e.memoizedState;o.state=p,hh(e,r,o,s),l=e.memoizedState,a!==r||p!==l||Qt.current||ws?(typeof u=="function"&&(Ug(e,n,u,r),l=e.memoizedState),(a=ws||Ix(e,n,a,r,p,l,c))?(h||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=l),o.props=r,o.state=l,o.context=c,r=a):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{o=e.stateNode,lE(t,e),a=e.memoizedProps,c=e.type===e.elementType?a:Fn(e.type,a),o.props=c,h=e.pendingProps,p=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=On(l):(l=Xt(n)?no:Ot.current,l=Na(e,l));var f=n.getDerivedStateFromProps;(u=typeof f=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==h||p!==l)&&Lx(e,o,r,l),ws=!1,p=e.memoizedState,o.state=p,hh(e,r,o,s);var g=e.memoizedState;a!==h||p!==g||Qt.current||ws?(typeof f=="function"&&(Ug(e,n,f,r),g=e.memoizedState),(c=ws||Ix(e,n,c,r,p,g,l)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,g,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,g,l)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&p===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&p===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=g),o.props=r,o.state=g,o.context=l,r=c):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&p===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&p===t.memoizedState||(e.flags|=1024),r=!1)}return Kg(t,e,n,r,i,s)}function Kg(t,e,n,r,s,i){PE(t,e);var o=(e.flags&128)!==0;if(!r&&!o)return s&&Nx(e,n,!1),ts(t,e,i);r=e.stateNode,XM.current=e;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return e.flags|=1,t!==null&&o?(e.child=_a(e,t.child,null,i),e.child=_a(e,null,a,i)):Lt(t,e,a,i),e.memoizedState=r.state,s&&Nx(e,n,!0),e.child}function IE(t){var e=t.stateNode;e.pendingContext?Tx(t,e.pendingContext,e.pendingContext!==e.context):e.context&&Tx(t,e.context,!1),Zv(t,e.containerInfo)}function Hx(t,e,n,r,s){return Aa(),Gv(s),e.flags|=256,Lt(t,e,n,r),e.child}var Yg={dehydrated:null,treeContext:null,retryLane:0};function Jg(t){return{baseLanes:t,cachePool:null,transitions:null}}function LE(t,e,n){var r=e.pendingProps,s=De.current,i=!1,o=(e.flags&128)!==0,a;if((a=o)||(a=t!==null&&t.memoizedState===null?!1:(s&2)!==0),a?(i=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(s|=1),Ae(De,s&1),t===null)return Wg(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=r.children,t=r.fallback,i?(r=e.mode,i=e.child,o={mode:"hidden",children:o},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=Ff(o,r,0,null),t=Ji(t,r,n,null),i.return=e,t.return=e,i.sibling=t,e.child=i,e.child.memoizedState=Jg(n),e.memoizedState=Yg,t):a0(e,o));if(s=t.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return ZM(t,e,o,r,a,s,n);if(i){i=r.fallback,o=e.mode,s=t.child,a=s.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&e.child!==s?(r=e.child,r.childLanes=0,r.pendingProps=l,e.deletions=null):(r=Gs(s,l),r.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=Gs(a,i):(i=Ji(i,o,n,null),i.flags|=2),i.return=e,r.return=e,r.sibling=i,e.child=r,r=i,i=e.child,o=t.child.memoizedState,o=o===null?Jg(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=t.childLanes&~n,e.memoizedState=Yg,r}return i=t.child,t=i.sibling,r=Gs(i,{mode:"visible",children:r.children}),!(e.mode&1)&&(r.lanes=n),r.return=e,r.sibling=null,t!==null&&(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=r,e.memoizedState=null,r}function a0(t,e){return e=Ff({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function $u(t,e,n,r){return r!==null&&Gv(r),_a(e,t.child,null,n),t=a0(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function ZM(t,e,n,r,s,i,o){if(n)return e.flags&256?(e.flags&=-257,r=am(Error(L(422))),$u(t,e,o,r)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(i=r.fallback,s=e.mode,r=Ff({mode:"visible",children:r.children},s,0,null),i=Ji(i,s,o,null),i.flags|=2,r.return=e,i.return=e,r.sibling=i,e.child=r,e.mode&1&&_a(e,t.child,null,o),e.child.memoizedState=Jg(o),e.memoizedState=Yg,i);if(!(e.mode&1))return $u(t,e,o,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(L(419)),r=am(i,r,void 0),$u(t,e,o,r)}if(a=(o&t.childLanes)!==0,Jt||a){if(r=dt,r!==null){switch(o&-o){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|o)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,es(t,s),Zn(r,t,s,-1))}return f0(),r=am(Error(L(421))),$u(t,e,o,r)}return s.data==="$?"?(e.flags|=128,e.child=t.child,e=hP.bind(null,t),s._reactRetry=e,null):(t=i.treeContext,cn=Hs(s.nextSibling),un=e,Ie=!0,Gn=null,t!==null&&(Sn[Cn++]=qr,Sn[Cn++]=Gr,Sn[Cn++]=ro,qr=t.id,Gr=t.overflow,ro=e),e=a0(e,r.children),e.flags|=4096,e)}function Ux(t,e,n){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),Hg(t.return,e,n)}function lm(t,e,n,r,s){var i=t.memoizedState;i===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(i.isBackwards=e,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=s)}function DE(t,e,n){var r=e.pendingProps,s=r.revealOrder,i=r.tail;if(Lt(t,e,r.children,n),r=De.current,r&2)r=r&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Ux(t,n,e);else if(t.tag===19)Ux(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(Ae(De,r),!(e.mode&1))e.memoizedState=null;else switch(s){case"forwards":for(n=e.child,s=null;n!==null;)t=n.alternate,t!==null&&fh(t)===null&&(s=n),n=n.sibling;n=s,n===null?(s=e.child,e.child=null):(s=n.sibling,n.sibling=null),lm(e,!1,s,n,i);break;case"backwards":for(n=null,s=e.child,e.child=null;s!==null;){if(t=s.alternate,t!==null&&fh(t)===null){e.child=s;break}t=s.sibling,s.sibling=n,n=s,s=t}lm(e,!0,n,null,i);break;case"together":lm(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}
vendor: 4,990 bytes, line 40
40function jd(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function ts(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),io|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(L(153));if(e.child!==null){for(t=e.child,n=Gs(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=Gs(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function eP(t,e,n){switch(e.tag){case 3:IE(e),Aa();break;case 5:cE(e);break;case 1:Xt(e.type)&&ah(e);break;case 4:Zv(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,s=e.memoizedProps.value;Ae(uh,r._currentValue),r._currentValue=s;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(Ae(De,De.current&1),e.flags|=128,null):n&e.child.childLanes?LE(t,e,n):(Ae(De,De.current&1),t=ts(t,e,n),t!==null?t.sibling:null);Ae(De,De.current&1);break;case 19:if(r=(n&e.childLanes)!==0,t.flags&128){if(r)return DE(t,e,n);e.flags|=128}if(s=e.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),Ae(De,De.current),r)break;return null;case 22:case 23:return e.lanes=0,ME(t,e,n)}return ts(t,e,n)}var $E,Qg,zE,BE;$E=function(t,e){for(var n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Qg=function(){};zE=function(t,e,n,r){var s=t.memoizedProps;if(s!==r){t=e.stateNode,Ri(wr.current);var i=null;switch(n){case"input":s=bg(t,s),r=bg(t,r),i=[];break;case"select":s=ze({},s,{value:void 0}),r=ze({},r,{value:void 0}),i=[];break;case"textarea":s=kg(t,s),r=kg(t,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(t.onclick=ih)}Cg(n,r);var o;n=null;for(c in s)if(!r.hasOwnProperty(c)&&s.hasOwnProperty(c)&&s[c]!=null)if(c==="style"){var a=s[c];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(fc.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in r){var l=r[c];if(a=s!=null?s[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(i||(i=[]),i.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(fc.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Oe("scroll",t),i||a===l||(i=[])):(i=i||[]).push(c,l))}n&&(i=i||[]).push("style",n);var c=i;(e.updateQueue=c)&&(e.flags|=4)}};BE=function(t,e,n,r){n!==r&&(e.flags|=4)};function fl(t,e){if(!Ie)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function Tt(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,r=0;if(e)for(var s=t.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=t,s=s.sibling;else for(s=t.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=t,s=s.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function tP(t,e,n){var r=e.pendingProps;switch(qv(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Tt(e),null;case 1:return Xt(e.type)&&oh(),Tt(e),null;case 3:return r=e.stateNode,ja(),Me(Qt),Me(Ot),t0(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(Lu(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Gn!==null&&(iy(Gn),Gn=null))),Qg(t,e),Tt(e),null;case 5:e0(e);var s=Ri(Ec.current);if(n=e.type,t!==null&&e.stateNode!=null)zE(t,e,n,r,s),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error(L(166));return Tt(e),null}if(t=Ri(wr.current),Lu(e)){r=e.stateNode,n=e.type;var i=e.memoizedProps;switch(r[yr]=e,r[Sc]=i,t=(e.mode&1)!==0,n){case"dialog":Oe("cancel",r),Oe("close",r);break;case"iframe":case"object":case"embed":Oe("load",r);break;case"video":case"audio":for(s=0;s<jl.length;s++)Oe(jl[s],r);break;case"source":Oe("error",r);break;case"img":case"image":case"link":Oe("error",r),Oe("load",r);break;case"details":Oe("toggle",r);break;case"input":Zb(r,i),Oe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},Oe("invalid",r);break;case"textarea":tx(r,i),Oe("invalid",r)}Cg(n,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];
vendor: 29,630 bytes, line 40
40o==="children"?typeof a=="string"?r.textContent!==a&&(i.suppressHydrationWarning!==!0&&Iu(r.textContent,a,t),s=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&Iu(r.textContent,a,t),s=["children",""+a]):fc.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&Oe("scroll",r)}switch(n){case"input":Nu(r),ex(r,i,!0);break;case"textarea":Nu(r),nx(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=ih)}r=s,e.updateQueue=r,r!==null&&(e.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=pC(n)),t==="http://www.w3.org/1999/xhtml"?n==="script"?(t=o.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=o.createElement(n,{is:r.is}):(t=o.createElement(n),n==="select"&&(o=t,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):t=o.createElementNS(t,n),t[yr]=e,t[Sc]=r,$E(t,e,!1,!1),e.stateNode=t;e:{switch(o=Eg(n,r),n){case"dialog":Oe("cancel",t),Oe("close",t),s=r;break;case"iframe":case"object":case"embed":Oe("load",t),s=r;break;case"video":case"audio":for(s=0;s<jl.length;s++)Oe(jl[s],t);s=r;break;case"source":Oe("error",t),s=r;break;case"img":case"image":case"link":Oe("error",t),Oe("load",t),s=r;break;case"details":Oe("toggle",t),s=r;break;case"input":Zb(t,r),s=bg(t,r),Oe("invalid",t);break;case"option":s=r;break;case"select":t._wrapperState={wasMultiple:!!r.multiple},s=ze({},r,{value:void 0}),Oe("invalid",t);break;case"textarea":tx(t,r),s=kg(t,r),Oe("invalid",t);break;default:s=r}Cg(n,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?yC(t,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&mC(t,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&pc(t,l):typeof l=="number"&&pc(t,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(fc.hasOwnProperty(i)?l!=null&&i==="onScroll"&&Oe("scroll",t):l!=null&&Ov(t,i,l,o))}switch(n){case"input":Nu(t),ex(t,r,!1);break;case"textarea":Nu(t),nx(t);break;case"option":r.value!=null&&t.setAttribute("value",""+ti(r.value));break;case"select":t.multiple=!!r.multiple,i=r.value,i!=null?ra(t,!!r.multiple,i,!1):r.defaultValue!=null&&ra(t,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(t.onclick=ih)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return Tt(e),null;case 6:if(t&&e.stateNode!=null)BE(t,e,t.memoizedProps,r);else{if(typeof r!="string"&&e.stateNode===null)throw Error(L(166));if(n=Ri(Ec.current),Ri(wr.current),Lu(e)){if(r=e.stateNode,n=e.memoizedProps,r[yr]=e,(i=r.nodeValue!==n)&&(t=un,t!==null))switch(t.tag){case 3:Iu(r.nodeValue,n,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&Iu(r.nodeValue,n,(t.mode&1)!==0)}i&&(e.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[yr]=e,e.stateNode=r}return Tt(e),null;case 13:if(Me(De),r=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(Ie&&cn!==null&&e.mode&1&&!(e.flags&128))sE(),Aa(),e.flags|=98560,i=!1;else if(i=Lu(e),r!==null&&r.dehydrated!==null){if(t===null){if(!i)throw Error(L(318));if(i=e.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(L(317));i[yr]=e}else Aa(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;Tt(e),i=!1}else Gn!==null&&(iy(Gn),Gn=null),i=!0;if(!i)return e.flags&65536?e:null}return e.flags&128?(e.lanes=n,e):(r=r!==null,r!==(t!==null&&t.memoizedState!==null)&&r&&(e.child.flags|=8192,e.mode&1&&(t===null||De.current&1?ot===0&&(ot=3):f0())),e.updateQueue!==null&&(e.flags|=4),Tt(e),null);case 4:return ja(),Qg(t,e),t===null&&wc(e.stateNode.containerInfo),Tt(e),null;case 10:return Jv(e.type._context),Tt(e),null;case 17:return Xt(e.type)&&oh(),Tt(e),null;case 19:if(Me(De),i=e.memoizedState,i===null)return Tt(e),null;if(r=(e.flags&128)!==0,o=i.rendering,o===null)if(r)fl(i,!1);else{if(ot!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(o=fh(t),o!==null){for(e.flags|=128,fl(i,!1),r=o.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),e.subtreeFlags=0,r=n,n=e.child;n!==null;)i=n,t=r,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=t,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,t=o.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return Ae(De,De.current&1|2),e.child}t=t.sibling}i.tail!==null&&Ye()>Ra&&(e.flags|=128,r=!0,fl(i,!1),e.lanes=4194304)}else{if(!r)if(t=fh(o),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),fl(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!Ie)return Tt(e),null}else 2*Ye()-i.renderingStartTime>Ra&&n!==1073741824&&(e.flags|=128,r=!0,fl(i,!1),e.lanes=4194304);i.isBackwards?(o.sibling=e.child,e.child=o):(n=i.last,n!==null?n.sibling=o:e.child=o,i.last=o)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=Ye(),e.sibling=null,n=De.current,Ae(De,r?n&1|2:n&1),e):(Tt(e),null);case 22:case 23:return h0(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?nn&1073741824&&(Tt(e),e.subtreeFlags&6&&(e.flags|=8192)):Tt(e),null;case 24:return null;case 25:return null}throw Error(L(156,e.tag))}function nP(t,e){switch(qv(e),e.tag){case 1:return Xt(e.type)&&oh(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return ja(),Me(Qt),Me(Ot),t0(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return e0(e),null;case 13:if(Me(De),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(L(340));Aa()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Me(De),null;case 4:return ja(),null;case 10:return Jv(e.type._context),null;case 22:case 23:return h0(),null;case 24:return null;default:return null}}var zu=!1,jt=!1,rP=typeof WeakSet=="function"?WeakSet:Set,q=null;function ea(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ve(t,e,r)}else n.current=null}function Xg(t,e,n){try{n()}catch(r){Ve(t,e,r)}}var Vx=!1;function sP(t,e){if(Ig=nh,t=VC(),Uv(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,c=0,u=0,h=t,p=null;t:for(;;){for(var f;h!==n||s!==0&&h.nodeType!==3||(a=o+s),h!==i||r!==0&&h.nodeType!==3||(l=o+r),h.nodeType===3&&(o+=h.nodeValue.length),(f=h.firstChild)!==null;)p=h,h=f;for(;;){if(h===t)break t;if(p===n&&++c===s&&(a=o),p===i&&++u===r&&(l=o),(f=h.nextSibling)!==null)break;h=p,p=h.parentNode}h=f}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Lg={focusedElem:t,selectionRange:n},nh=!1,q=e;q!==null;)if(e=q,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,q=t;else for(;q!==null;){e=q;try{var g=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var m=g.memoizedProps,y=g.memoizedState,v=e.stateNode,b=v.getSnapshotBeforeUpdate(e.elementType===e.type?m:Fn(e.type,m),y);v.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var x=e.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(L(163))}}catch(k){Ve(e,e.return,k)}if(t=e.sibling,t!==null){t.return=e.return,q=t;break}q=e.return}return g=Vx,Vx=!1,g}function Gl(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&t)===t){var i=s.destroy;s.destroy=void 0,i!==void 0&&Xg(e,n,i)}s=s.next}while(s!==r)}}function zf(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function Zg(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function FE(t){var e=t.alternate;e!==null&&(t.alternate=null,FE(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[yr],delete e[Sc],delete e[zg],delete e[BM],delete e[FM])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function WE(t){return t.tag===5||t.tag===3||t.tag===4}function qx(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||WE(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function ey(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=ih));else if(r!==4&&(t=t.child,t!==null))for(ey(t,e,n),t=t.sibling;t!==null;)ey(t,e,n),t=t.sibling}function ty(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(ty(t,e,n),t=t.sibling;t!==null;)ty(t,e,n),t=t.sibling}var mt=null,qn=!1;function hs(t,e,n){for(n=n.child;n!==null;)HE(t,e,n),n=n.sibling}function HE(t,e,n){if(xr&&typeof xr.onCommitFiberUnmount=="function")try{xr.onCommitFiberUnmount(Of,n)}catch{}switch(n.tag){case 5:jt||ea(n,e);case 6:var r=mt,s=qn;mt=null,hs(t,e,n),mt=r,qn=s,mt!==null&&(qn?(t=mt,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):mt.removeChild(n.stateNode));break;case 18:mt!==null&&(qn?(t=mt,n=n.stateNode,t.nodeType===8?tm(t.parentNode,n):t.nodeType===1&&tm(t,n),vc(t)):tm(mt,n.stateNode));break;case 4:r=mt,s=qn,mt=n.stateNode.containerInfo,qn=!0,hs(t,e,n),mt=r,qn=s;break;case 0:case 11:case 14:case 15:if(!jt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&Xg(n,e,o),s=s.next}while(s!==r)}hs(t,e,n);break;case 1:if(!jt&&(ea(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Ve(n,e,a)}hs(t,e,n);break;case 21:hs(t,e,n);break;case 22:n.mode&1?(jt=(r=jt)||n.memoizedState!==null,hs(t,e,n),jt=r):hs(t,e,n);break;default:hs(t,e,n)}}function Gx(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new rP),e.forEach(function(r){var s=fP.bind(null,t,r);n.has(r)||(n.add(r),r.then(s,s))})}}function Ln(t,e){var n=e.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var i=t,o=e,a=o;e:for(;a!==null;){switch(a.tag){case 5:mt=a.stateNode,qn=!1;break e;case 3:mt=a.stateNode.containerInfo,qn=!0;break e;case 4:mt=a.stateNode.containerInfo,qn=!0;break e}a=a.return}if(mt===null)throw Error(L(160));HE(i,o,s),mt=null,qn=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(c){Ve(s,e,c)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)UE(e,t),e=e.sibling}function UE(t,e){var n=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Ln(e,t),or(t),r&4){try{Gl(3,t,t.return),zf(3,t)}catch(m){Ve(t,t.return,m)}try{Gl(5,t,t.return)}catch(m){Ve(t,t.return,m)}}break;case 1:Ln(e,t),or(t),r&512&&n!==null&&ea(n,n.return);break;case 5:if(Ln(e,t),or(t),r&512&&n!==null&&ea(n,n.return),t.flags&32){var s=t.stateNode;try{pc(s,"")}catch(m){Ve(t,t.return,m)}}if(r&4&&(s=t.stateNode,s!=null)){var i=t.memoizedProps,o=n!==null?n.memoizedProps:i,a=t.type,l=t.updateQueue;if(t.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&hC(s,i),Eg(a,o);var c=Eg(a,i);for(o=0;o<l.length;o+=2){var u=l[o],h=l[o+1];u==="style"?yC(s,h):u==="dangerouslySetInnerHTML"?mC(s,h):u==="children"?pc(s,h):Ov(s,u,h,c)}switch(a){case"input":xg(s,i);break;case"textarea":fC(s,i);break;case"select":var p=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var f=i.value;f!=null?ra(s,!!i.multiple,f,!1):p!==!!i.multiple&&(i.defaultValue!=null?ra(s,!!i.multiple,i.defaultValue,!0):ra(s,!!i.multiple,i.multiple?[]:"",!1))}s[Sc]=i}catch(m){Ve(t,t.return,m)}}break;case 6:if(Ln(e,t),or(t),r&4){if(t.stateNode===null)throw Error(L(162));s=t.stateNode,i=t.memoizedProps;try{s.nodeValue=i}catch(m){Ve(t,t.return,m)}}break;case 3:if(Ln(e,t),or(t),r&4&&n!==null&&n.memoizedState.isDehydrated)try{vc(e.containerInfo)}catch(m){Ve(t,t.return,m)}break;case 4:Ln(e,t),or(t);break;case 13:Ln(e,t),or(t),s=t.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(u0=Ye())),r&4&&Gx(t);break;case 22:if(u=n!==null&&n.memoizedState!==null,t.mode&1?(jt=(c=jt)||u,Ln(e,t),jt=c):Ln(e,t),or(t),r&8192){if(c=t.memoizedState!==null,(t.stateNode.isHidden=c)&&!u&&t.mode&1)for(q=t,u=t.child;u!==null;){for(h=q=u;q!==null;){switch(p=q,f=p.child,p.tag){case 0:case 11:case 14:case 15:Gl(4,p,p.return);break;case 1:ea(p,p.return);var g=p.stateNode;if(typeof g.componentWillUnmount=="function"){r=p,n=p.return;try{e=r,g.props=e.memoizedProps,g.state=e.memoizedState,g.componentWillUnmount()}catch(m){Ve(r,n,m)}}break;case 5:ea(p,p.return);break;case 22:if(p.memoizedState!==null){Yx(h);continue}}f!==null?(f.return=p,q=f):Yx(h)}u=u.sibling}e:for(u=null,h=t;;){if(h.tag===5){if(u===null){u=h;try{s=h.stateNode,c?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=h.stateNode,l=h.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=gC("display",o))}catch(m){Ve(t,t.return,m)}}}else if(h.tag===6){if(u===null)try{h.stateNode.nodeValue=c?"":h.memoizedProps}catch(m){Ve(t,t.return,m)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===t)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===t)break e;for(;h.sibling===null;){if(h.return===null||h.return===t)break e;u===h&&(u=null),h=h.return}u===h&&(u=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:Ln(e,t),or(t),r&4&&Gx(t);break;case 21:break;default:Ln(e,t),or(t)}}function or(t){var e=t.flags;if(e&2){try{e:{for(var n=t.return;n!==null;){if(WE(n)){var r=n;break e}n=n.return}throw Error(L(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(pc(s,""),r.flags&=-33);var i=qx(t);ty(t,i,s);break;case 3:case 4:var o=r.stateNode.containerInfo,a=qx(t);ey(t,a,o);break;default:throw Error(L(161))}}catch(l){Ve(t,t.return,l)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function iP(t,e,n){q=t,VE(t)}function VE(t,e,n){for(var r=(t.mode&1)!==0;q!==null;){var s=q,i=s.child;if(s.tag===22&&r){var o=s.memoizedState!==null||zu;if(!o){var a=s.alternate,l=a!==null&&a.memoizedState!==null||jt;a=zu;var c=jt;if(zu=o,(jt=l)&&!c)for(q=s;q!==null;)o=q,l=o.child,o.tag===22&&o.memoizedState!==null?Jx(s):l!==null?(l.return=o,q=l):Jx(s);for(;i!==null;)q=i,VE(i),i=i.sibling;q=s,zu=a,jt=c}Kx(t)}else s.subtreeFlags&8772&&i!==null?(i.return=s,q=i):Kx(t)}}function Kx(t){for(;q!==null;){var e=q;if(e.flags&8772){var n=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:jt||zf(5,e);break;case 1:var r=e.stateNode;if(e.flags&4&&!jt)if(n===null)r.componentDidMount();else{var s=e.elementType===e.type?n.memoizedProps:Fn(e.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=e.updateQueue;i!==null&&Rx(e,i,r);break;case 3:var o=e.updateQueue;if(o!==null){if(n=null,e.child!==null)switch(e.child.tag){case 5:n=e.child.stateNode;break;case 1:n=e.child.stateNode}Rx(e,o,n)}break;case 5:var a=e.stateNode;if(n===null&&e.flags&4){n=a;var l=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var c=e.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var h=u.dehydrated;h!==null&&vc(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(L(163))}jt||e.flags&512&&Zg(e)}catch(p){Ve(e,e.return,p)}}if(e===t){q=null;break}if(n=e.sibling,n!==null){n.return=e.return,q=n;break}q=e.return}}function Yx(t){for(;q!==null;){var e=q;if(e===t){q=null;break}var n=e.sibling;if(n!==null){n.return=e.return,q=n;break}q=e.return}}function Jx(t){for(;q!==null;){var e=q;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{zf(4,e)}catch(l){Ve(e,n,l)}break;case 1:var r=e.stateNode;if(typeof r.componentDidMount=="function"){var s=e.return;try{r.componentDidMount()}catch(l){Ve(e,s,l)}}var i=e.return;try{Zg(e)}catch(l){Ve(e,i,l)}break;case 5:var o=e.return;try{Zg(e)}catch(l){Ve(e,o,l)}}}catch(l){Ve(e,e.return,l)}if(e===t){q=null;break}var a=e.sibling;if(a!==null){a.return=e.return,q=a;break}q=e.return}}var oP=Math.ceil,gh=ss.ReactCurrentDispatcher,l0=ss.ReactCurrentOwner,Nn=ss.ReactCurrentBatchConfig,fe=0,dt=null,tt=null,xt=0,nn=0,ta=ui(0),ot=0,_c=null,io=0,Bf=0,c0=0,Kl=null,Gt=null,u0=0,Ra=1/0,$r=null,yh=!1,ny=null,Vs=null,Bu=!1,Ls=null,vh=0,Yl=0,ry=null,Od=-1,Rd=0;function zt(){return fe&6?Ye():Od!==-1?Od:Od=Ye()}function qs(t){return t.mode&1?fe&2&&xt!==0?xt&-xt:HM.transition!==null?(Rd===0&&(Rd=_C()),Rd):(t=ke,t!==0||(t=window.event,t=t===void 0?16:LC(t.type)),t):1}function Zn(t,e,n,r){if(50<Yl)throw Yl=0,ry=null,Error(L(185));au(t,n,r),(!(fe&2)||t!==dt)&&(t===dt&&(!(fe&2)&&(Bf|=n),ot===4&&Ts(t,xt)),Zt(t,r),n===1&&fe===0&&!(e.mode&1)&&(Ra=Ye()+500,Lf&&di()))}function Zt(t,e){var n=t.callbackNode;H2(t,e);var r=th(t,t===dt?xt:0);if(r===0)n!==null&&ix(n),t.callbackNode=null,t.callbackPriority=0;else if(e=r&-r,t.callbackPriority!==e){if(n!=null&&ix(n),e===1)t.tag===0?WM(Qx.bind(null,t)):tE(Qx.bind(null,t)),$M(function(){!(fe&6)&&di()}),n=null;else{switch(jC(r)){case 1:n=Lv;break;case 4:n=NC;break;case 16:n=eh;break;case 536870912:n=AC;break;default:n=eh}n=ZE(n,qE.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function qE(t,e){if(Od=-1,Rd=0,fe&6)throw Error(L(327));var n=t.callbackNode;if(la()&&t.callbackNode!==n)return null;var r=th(t,t===dt?xt:0);if(r===0)return null;if(r&30||r&t.expiredLanes||e)e=bh(t,r);else{e=r;var s=fe;fe|=2;var i=KE();(dt!==t||xt!==e)&&($r=null,Ra=Ye()+500,Yi(t,e));do try{cP();break}catch(a){GE(t,a)}while(!0);Yv(),gh.current=i,fe=s,tt!==null?e=0:(dt=null,xt=0,e=ot)}if(e!==0){if(e===2&&(s=jg(t),s!==0&&(r=s,e=sy(t,s))),e===1)throw n=_c,Yi(t,0),Ts(t,r),Zt(t,Ye()),n;if(e===6)Ts(t,r);else{if(s=t.current.alternate,!(r&30)&&!aP(s)&&(e=bh(t,r),e===2&&(i=jg(t),i!==0&&(r=i,e=sy(t,i))),e===1))throw n=_c,Yi(t,0),Ts(t,r),Zt(t,Ye()),n;switch(t.finishedWork=s,t.finishedLanes=r,e){case 0:case 1:throw Error(L(345));case 2:Ti(t,Gt,$r);break;case 3:if(Ts(t,r),(r&130023424)===r&&(e=u0+500-Ye(),10<e)){if(th(t,0)!==0)break;if(s=t.suspendedLanes,(s&r)!==r){zt(),t.pingedLanes|=t.suspendedLanes&s;break}t.timeoutHandle=$g(Ti.bind(null,t,Gt,$r),e);break}Ti(t,Gt,$r);break;case 4:if(Ts(t,r),(r&4194240)===r)break;for(e=t.eventTimes,s=-1;0<r;){var o=31-Xn(r);i=1<<o,o=e[o],o>s&&(s=o),r&=~i}if(r=s,r=Ye()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*oP(r/1960))-r,10<r){t.timeoutHandle=$g(Ti.bind(null,t,Gt,$r),r);break}Ti(t,Gt,$r);break;case 5:Ti(t,Gt,$r);break;default:throw Error(L(329))}}}return Zt(t,Ye()),t.callbackNode===n?qE.bind(null,t):null}function sy(t,e){var n=Kl;return t.current.memoizedState.isDehydrated&&(Yi(t,e).flags|=256),t=bh(t,e),t!==2&&(e=Gt,Gt=n,e!==null&&iy(e)),t}function iy(t){Gt===null?Gt=t:Gt.push.apply(Gt,t)}function aP(t){for(var e=t;;){if(e.flags&16384){var n=e.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],i=s.getSnapshot;s=s.value;try{if(!tr(i(),s))return!1}catch{return!1}}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function Ts(t,e){for(e&=~c0,e&=~Bf,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-Xn(e),r=1<<n;t[n]=-1,e&=~r}}function Qx(t){if(fe&6)throw Error(L(327));la();var e=th(t,0);if(!(e&1))return Zt(t,Ye()),null;var n=bh(t,e);if(t.tag!==0&&n===2){var r=jg(t);r!==0&&(e=r,n=sy(t,r))}if(n===1)throw n=_c,Yi(t,0),Ts(t,e),Zt(t,Ye()),n;if(n===6)throw Error(L(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,Ti(t,Gt,$r),Zt(t,Ye()),null}function d0(t,e){var n=fe;fe|=1;try{return t(e)}finally{fe=n,fe===0&&(Ra=Ye()+500,Lf&&di())}}function oo(t){Ls!==null&&Ls.tag===0&&!(fe&6)&&la();var e=fe;fe|=1;var n=Nn.transition,r=ke;try{if(Nn.transition=null,ke=1,t)return t()}finally{ke=r,Nn.transition=n,fe=e,!(fe&6)&&di()}}function h0(){nn=ta.current,Me(ta)}function Yi(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==-1&&(t.timeoutHandle=-1,DM(n)),tt!==null)for(n=tt.return;n!==null;){var r=n;switch(qv(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&oh();break;case 3:ja(),Me(Qt),Me(Ot),t0();break;case 5:e0(r);break;case 4:ja();break;case 13:Me(De);break;case 19:Me(De);break;case 10:Jv(r.type._context);break;case 22:case 23:h0()}n=n.return}if(dt=t,tt=t=Gs(t.current,null),xt=nn=e,ot=0,_c=null,c0=Bf=io=0,Gt=Kl=null,Oi!==null){for(e=0;e<Oi.length;e++)if(n=Oi[e],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,i=n.pending;if(i!==null){var o=i.next;i.next=s,r.next=o}n.pending=r}Oi=null}return t}function GE(t,e){do{var n=tt;try{if(Yv(),Ad.current=mh,ph){for(var r=$e.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}ph=!1}if(so=0,ct=it=$e=null,ql=!1,Tc=0,l0.current=null,n===null||n.return===null){ot=1,_c=e,tt=null;break}e:{var i=t,o=n.return,a=n,l=e;if(e=xt,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=a,h=u.tag;if(!(u.mode&1)&&(h===0||h===11||h===15)){var p=u.alternate;p?(u.updateQueue=p.updateQueue,u.memoizedState=p.memoizedState,u.lanes=p.lanes):(u.updateQueue=null,u.memoizedState=null)}var f=$x(o);if(f!==null){f.flags&=-257,zx(f,o,a,i,e),f.mode&1&&Dx(i,c,e),e=f,l=c;var g=e.updateQueue;if(g===null){var m=new Set;m.add(l),e.updateQueue=m}else g.add(l);break e}else{if(!(e&1)){Dx(i,c,e),f0();break e}l=Error(L(426))}}else if(Ie&&a.mode&1){var y=$x(o);if(y!==null){!(y.flags&65536)&&(y.flags|=256),zx(y,o,a,i,e),Gv(Oa(l,a));break e}}i=l=Oa(l,a),ot!==4&&(ot=2),Kl===null?Kl=[i]:Kl.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,e&=-e,i.lanes|=e;var v=jE(i,l,e);Ox(i,v);break e;case 1:a=l;var b=i.type,x=i.stateNode;if(!(i.flags&128)&&(typeof b.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(Vs===null||!Vs.has(x)))){i.flags|=65536,e&=-e,i.lanes|=e;var k=OE(i,a,e);Ox(i,k);break e}}i=i.return}while(i!==null)}JE(n)}catch(S){e=S,tt===n&&n!==null&&(tt=n=n.return);continue}break}while(!0)}function KE(){var t=gh.current;return gh.current=mh,t===null?mh:t}function f0(){(ot===0||ot===3||ot===2)&&(ot=4),dt===null||!(io&268435455)&&!(Bf&268435455)||Ts(dt,xt)}function bh(t,e){var n=fe;fe|=2;var r=KE();(dt!==t||xt!==e)&&($r=null,Yi(t,e));do try{lP();break}catch(s){GE(t,s)}while(!0);if(Yv(),fe=n,gh.current=r,tt!==null)throw Error(L(261));return dt=null,xt=0,ot}function lP(){for(;tt!==null;)YE(tt)}function cP(){for(;tt!==null&&!P2();)YE(tt)}function YE(t){var e=XE(t.alternate,t,nn);t.memoizedProps=t.pendingProps,e===null?JE(t):tt=e,l0.current=null}function JE(t){var e=t;do{var n=e.alternate;if(t=e.return,e.flags&32768){if(n=nP(n,e),n!==null){n.flags&=32767,tt=n;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{ot=6,tt=null;return}}else if(n=tP(n,e,nn),n!==null){tt=n;return}if(e=e.sibling,e!==null){tt=e;return}tt=e=t}while(e!==null);ot===0&&(ot=5)}function Ti(t,e,n){var r=ke,s=Nn.transition;try{Nn.transition=null,ke=1,uP(t,e,n,r)}finally{Nn.transition=s,ke=r}return null}function uP(t,e,n,r){do la();while(Ls!==null);if(fe&6)throw Error(L(327));n=t.finishedWork;var s=t.finishedLanes;if(n===null)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(L(177));t.callbackNode=null,t.callbackPriority=0;var i=n.lanes|n.childLanes;if(U2(t,i),t===dt&&(tt=dt=null,xt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Bu||(Bu=!0,ZE(eh,function(){return la(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=Nn.transition,Nn.transition=null;var o=ke;ke=1;var a=fe;fe|=4,l0.current=null,sP(t,n),UE(n,t),jM(Lg),nh=!!Ig,Lg=Ig=null,t.current=n,iP(n),I2(),fe=a,ke=o,Nn.transition=i}else t.current=n;if(Bu&&(Bu=!1,Ls=t,vh=s),i=t.pendingLanes,i===0&&(Vs=null),$2(n.stateNode),Zt(t,Ye()),e!==null)for(r=t.onRecoverableError,n=0;n<e.length;n++)s=e[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(yh)throw yh=!1,t=ny,ny=null,t;return vh&1&&t.tag!==0&&la(),i=t.pendingLanes,i&1?t===ry?Yl++:(Yl=0,ry=t):Yl=0,di(),null}function la(){if(Ls!==null){var t=jC(vh),e=Nn.transition,n=ke;try{if(Nn.transition=null,ke=16>t?16:t,Ls===null)var r=!1;else{if(t=Ls,Ls=null,vh=0,fe&6)throw Error(L(331));var s=fe;for(fe|=4,q=t.current;q!==null;){var i=q,o=i.child;if(q.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(q=c;q!==null;){var u=q;switch(u.tag){case 0:case 11:case 15:Gl(8,u,i)}var h=u.child;if(h!==null)h.return=u,q=h;else for(;q!==null;){u=q;var p=u.sibling,f=u.return;if(FE(u),u===c){q=null;break}if(p!==null){p.return=f,q=p;break}q=f}}}var g=i.alternate;if(g!==null){var m=g.child;if(m!==null){g.child=null;do{var y=m.sibling;m.sibling=null,m=y}while(m!==null)}}q=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,q=o;else e:for(;q!==null;){if(i=q,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Gl(9,i,i.return)}var v=i.sibling;if(v!==null){v.return=i.return,q=v;break e}q=i.return}}var b=t.current;for(q=b;q!==null;){o=q;var x=o.child;if(o.subtreeFlags&2064&&x!==null)x.return=o,q=x;else e:for(o=b;q!==null;){if(a=q,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:zf(9,a)}}catch(S){Ve(a,a.return,S)}if(a===o){q=null;break e}var k=a.sibling;if(k!==null){k.return=a.return,q=k;break e}q=a.return}}if(fe=s,di(),xr&&typeof xr.onPostCommitFiberRoot=="function")try{xr.onPostCommitFiberRoot(Of,t)}catch{}r=!0}return r}finally{ke=n,Nn.transition=e}}return!1}function Xx(t,e,n){e=Oa(n,e),e=jE(t,e,1),t=Us(t,e,1),e=zt(),t!==null&&(au(t,1,e),Zt(t,e))}function Ve(t,e,n){if(t.tag===3)Xx(t,t,n);else for(;e!==null;){if(e.tag===3){Xx(e,t,n);break}else if(e.tag===1){var r=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Vs===null||!Vs.has(r))){t=Oa(n,t),t=OE(e,t,1),e=Us(e,t,1),t=zt(),e!==null&&(au(e,1,t),Zt(e,t));break}}e=e.return}}function dP(t,e,n){var r=t.pingCache;r!==null&&r.delete(e),e=zt(),t.pingedLanes|=t.suspendedLanes&n,dt===t&&(xt&n)===n&&(ot===4||ot===3&&(xt&130023424)===xt&&500>Ye()-u0?Yi(t,0):c0|=n),Zt(t,e)}function QE(t,e){e===0&&(t.mode&1?(e=ju,ju<<=1,!(ju&130023424)&&(ju=4194304)):e=1);var n=zt();t=es(t,e),t!==null&&(au(t,e,n),Zt(t,n))}function hP(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),QE(t,n)}function fP(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,s=t.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(L(314))}r!==null&&r.delete(e),QE(t,n)}var XE;XE=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||Qt.current)Jt=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return Jt=!1,eP(t,e,n);Jt=!!(t.flags&131072)}else Jt=!1,Ie&&e.flags&1048576&&nE(e,ch,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;jd(t,e),t=e.pendingProps;var s=Na(e,Ot.current);aa(e,n),s=r0(null,e,r,t,s,n);var i=s0();return e.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Xt(r)?(i=!0,ah(e)):i=!1,e.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Xv(e),s.updater=$f,e.stateNode=s,s._reactInternals=e,Vg(e,r,t,n),e=Kg(null,e,r,!0,i,n)):(e.tag=0,Ie&&i&&Vv(e),Lt(null,e,s,n),e=e.child),e;case 16:r=e.elementType;e:{switch(jd(t,e),t=e.pendingProps,s=r._init,r=s(r._payload),e.type=r,s=e.tag=mP(r),t=Fn(r,t),s){case 0:e=Gg(null,e,r,t,n);break e;case 1:e=Wx(null,e,r,t,n);break e;case 11:e=Bx(null,e,r,t,n);break e;case 14:e=Fx(null,e,r,Fn(r.type,t),n);break e}throw Error(L(306,r,""))}return e;case 0:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:Fn(r,s),Gg(t,e,r,s,n);case 1:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:Fn(r,s),Wx(t,e,r,s,n);case 3:e:{if(IE(e),t===null)throw Error(L(387));r=e.pendingProps,i=e.memoizedState,s=i.element,lE(t,e),hh(e,r,null,n);var o=e.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){s=Oa(Error(L(423)),e),e=Hx(t,e,r,n,s);break e}else if(r!==s){s=Oa(Error(L(424)),e),e=Hx(t,e,r,n,s);break e}else for(cn=Hs(e.stateNode.containerInfo.firstChild),un=e,Ie=!0,Gn=null,n=oE(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Aa(),r===s){e=ts(t,e,n);break e}Lt(t,e,r,n)}e=e.child}return e;case 5:return cE(e),t===null&&Wg(e),r=e.type,s=e.pendingProps,i=t!==null?t.memoizedProps:null,o=s.children,Dg(r,
vendor: 9,631 bytes, line 40
40s)?o=null:i!==null&&Dg(r,i)&&(e.flags|=32),PE(t,e),Lt(t,e,o,n),e.child;case 6:return t===null&&Wg(e),null;case 13:return LE(t,e,n);case 4:return Zv(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=_a(e,null,r,n):Lt(t,e,r,n),e.child;case 11:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:Fn(r,s),Bx(t,e,r,s,n);case 7:return Lt(t,e,e.pendingProps,n),e.child;case 8:return Lt(t,e,e.pendingProps.children,n),e.child;case 12:return Lt(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,s=e.pendingProps,i=e.memoizedProps,o=s.value,Ae(uh,r._currentValue),r._currentValue=o,i!==null)if(tr(i.value,o)){if(i.children===s.children&&!Qt.current){e=ts(t,e,n);break e}}else for(i=e.child,i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=Jr(-1,n&-n),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),Hg(i.return,n,e),a.lanes|=n;break}l=l.next}}else if(i.tag===10)o=i.type===e.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(L(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Hg(o,n,e),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===e){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}Lt(t,e,s.children,n),e=e.child}return e;case 9:return s=e.type,r=e.pendingProps.children,aa(e,n),s=On(s),r=r(s),e.flags|=1,Lt(t,e,r,n),e.child;case 14:return r=e.type,s=Fn(r,e.pendingProps),s=Fn(r.type,s),Fx(t,e,r,s,n);case 15:return RE(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:Fn(r,s),jd(t,e),e.tag=1,Xt(r)?(t=!0,ah(e)):t=!1,aa(e,n),_E(e,r,s),Vg(e,r,s,n),Kg(null,e,r,!0,t,n);case 19:return DE(t,e,n);case 22:return ME(t,e,n)}throw Error(L(156,e.tag))};function ZE(t,e){return TC(t,e)}function pP(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Tn(t,e,n,r){return new pP(t,e,n,r)}function p0(t){return t=t.prototype,!(!t||!t.isReactComponent)}function mP(t){if(typeof t=="function")return p0(t)?1:0;if(t!=null){if(t=t.$$typeof,t===Mv)return 11;if(t===Pv)return 14}return 2}function Gs(t,e){var n=t.alternate;return n===null?(n=Tn(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function Md(t,e,n,r,s,i){var o=2;if(r=t,typeof t=="function")p0(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case Vo:return Ji(n.children,s,i,e);case Rv:o=8,s|=8;break;case mg:return t=Tn(12,n,e,s|2),t.elementType=mg,t.lanes=i,t;case gg:return t=Tn(13,n,e,s),t.elementType=gg,t.lanes=i,t;case yg:return t=Tn(19,n,e,s),t.elementType=yg,t.lanes=i,t;case cC:return Ff(n,s,i,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case aC:o=10;break e;case lC:o=9;break e;case Mv:o=11;break e;case Pv:o=14;break e;case xs:o=16,r=null;break e}throw Error(L(130,t==null?t:typeof t,""))}return e=Tn(o,n,e,s),e.elementType=t,e.type=r,e.lanes=i,e}function Ji(t,e,n,r){return t=Tn(7,t,r,e),t.lanes=n,t}function Ff(t,e,n,r){return t=Tn(22,t,r,e),t.elementType=cC,t.lanes=n,t.stateNode={isHidden:!1},t}function cm(t,e,n){return t=Tn(6,t,null,e),t.lanes=n,t}function um(t,e,n){return e=Tn(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function gP(t,e,n,r,s){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Up(0),this.expirationTimes=Up(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Up(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function m0(t,e,n,r,s,i,o,a,l){return t=new gP(t,e,n,a,l),e===1?(e=1,i===!0&&(e|=8)):e=0,i=Tn(3,null,null,e),t.current=i,i.stateNode=t,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Xv(i),t}function yP(t,e,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Uo,key:r==null?null:""+r,children:t,containerInfo:e,implementation:n}}function eT(t){if(!t)return ni;t=t._reactInternals;e:{if(vo(t)!==t||t.tag!==1)throw Error(L(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(Xt(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(L(171))}if(t.tag===1){var n=t.type;if(Xt(n))return eE(t,n,e)}return e}function tT(t,e,n,r,s,i,o,a,l){return t=m0(n,r,!0,t,s,i,o,a,l),t.context=eT(null),n=t.current,r=zt(),s=qs(n),i=Jr(r,s),i.callback=e??null,Us(n,i,s),t.current.lanes=s,au(t,s,r),Zt(t,r),t}function Wf(t,e,n,r){var s=e.current,i=zt(),o=qs(s);return n=eT(n),e.context===null?e.context=n:e.pendingContext=n,e=Jr(i,o),e.payload={element:t},r=r===void 0?null:r,r!==null&&(e.callback=r),t=Us(s,e,o),t!==null&&(Zn(t,s,o,i),Nd(t,s,o)),o}function xh(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function Zx(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function g0(t,e){Zx(t,e),(t=t.alternate)&&Zx(t,e)}function vP(){return null}var nT=typeof reportError=="function"?reportError:function(t){console.error(t)};function y0(t){this._internalRoot=t}Hf.prototype.render=y0.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(L(409));Wf(t,e,null,null)};Hf.prototype.unmount=y0.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;oo(function(){Wf(null,t,null,null)}),e[Zr]=null}};function Hf(t){this._internalRoot=t}Hf.prototype.unstable_scheduleHydration=function(t){if(t){var e=MC();t={blockedOn:null,target:t,priority:e};for(var n=0;n<Es.length&&e!==0&&e<Es[n].priority;n++);Es.splice(n,0,t),n===0&&IC(t)}};function v0(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function Uf(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function ew(){}function bP(t,e,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var c=xh(o);i.call(c)}}var o=tT(e,r,t,0,null,!1,!1,"",ew);return t._reactRootContainer=o,t[Zr]=o.current,wc(t.nodeType===8?t.parentNode:t),oo(),o}for(;s=t.lastChild;)t.removeChild(s);if(typeof r=="function"){var a=r;r=function(){var c=xh(l);a.call(c)}}var l=m0(t,0,!1,null,null,!1,!1,"",ew);return t._reactRootContainer=l,t[Zr]=l.current,wc(t.nodeType===8?t.parentNode:t),oo(function(){Wf(e,l,n,r)}),l}function Vf(t,e,n,r,s){var i=n._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var a=s;s=function(){var l=xh(o);a.call(l)}}Wf(e,o,t,s)}else o=bP(n,e,t,s,r);return xh(o)}OC=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=_l(e.pendingLanes);n!==0&&(Dv(e,n|1),Zt(e,Ye()),!(fe&6)&&(Ra=Ye()+500,di()))}break;case 13:oo(function(){var r=es(t,1);if(r!==null){var s=zt();Zn(r,t,1,s)}}),g0(t,1)}};$v=function(t){if(t.tag===13){var e=es(t,134217728);if(e!==null){var n=zt();Zn(e,t,134217728,n)}g0(t,134217728)}};RC=function(t){if(t.tag===13){var e=qs(t),n=es(t,e);if(n!==null){var r=zt();Zn(n,t,e,r)}g0(t,e)}};MC=function(){return ke};PC=function(t,e){var n=ke;try{return ke=t,e()}finally{ke=n}};Ng=function(t,e,n){switch(e){case"input":if(xg(t,n),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var r=n[e];if(r!==t&&r.form===t.form){var s=If(r);if(!s)throw Error(L(90));dC(r),xg(r,s)}}}break;case"textarea":fC(t,n);break;case"select":e=n.value,e!=null&&ra(t,!!n.multiple,e,!1)}};xC=d0;wC=oo;var xP={usingClientEntryPoint:!1,Events:[cu,Yo,If,vC,bC,d0]},pl={findFiberByHostInstance:ji,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},wP={bundleType:pl.bundleType,version:pl.version,rendererPackageName:pl.rendererPackageName,rendererConfig:pl.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ss.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=CC(t),t===null?null:t.stateNode},findFiberByHostInstance:pl.findFiberByHostInstance||vP,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};
40if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Fu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Fu.isDisabled&&Fu.supportsFiber)try{Of=Fu.inject(wP),xr=Fu}catch{}}fn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=xP;fn.createPortal=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!v0(e))throw Error(L(200));return yP(t,e,null,n)};fn.createRoot=function(t,e){if(!v0(t))throw Error(L(299));var n=!1,r="",s=nT;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(r=e.identifierPrefix),e.onRecoverableError!==void 0&&(s=e.onRecoverableError)),e=m0(t,1,!1,null,null,n,!1,r,s),t[Zr]=e.current,wc(t.nodeType===8?t.parentNode:t),new y0(e)};fn.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(L(188)):(t=Object.keys(t).join(","),Error(L(268,t)));return t=CC(e),t=t===null?null:t.stateNode,t};fn.flushSync=function(t){return oo(t)};fn.hydrate=function(t,e,n){if(!Uf(e))throw Error(L(200));return Vf(null,t,e,!0,n)};fn.hydrateRoot=function(t,e,n){if(!v0(t))throw Error(L(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",o=nT;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),e=tT(e,null,t,1,n??null,s,!1,i,o),t[Zr]=e.current,wc(t),r)for(t=0;t<r.length;t++)n=r[t],s=n._getVersion,s=s(n._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[n,s]:e.mutableSourceEagerHydrationData.push(n,s);return new Hf(e)};fn.render=function(t,e,n){if(!Uf(e))throw Error(L(200));return Vf(null,t,e,!1,n)};fn.unmountComponentAtNode=function(t){if(!Uf(t))throw Error(L(40));return t._reactRootContainer?(oo(function(){Vf(null,null,t,!1,function(){t._reactRootContainer=null,t[Zr]=null})}),!0):!1};fn.unstable_batchedUpdates=d0;fn.unstable_renderSubtreeIntoContainer=function(t,e,n,r){if(!Uf(n))throw Error(L(200));if(t==null||t._reactInternals===void 0)throw Error(L(38));return Vf(t,e,n,!1,r)};fn.version="18.3.1-next-f1338f8080-20240426";function rT(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(rT)}catch(t){console.error(t)}}rT(),rC.exports=fn;var bo=rC.exports;const b0=iu(bo);var sT,tw=bo;sT=tw.createRoot,tw.hydrateRoot;var kP=typeof Element<"u",SP=typeof Map=="function",CP=typeof Set=="function",EP=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function Pd(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var n,r,s;if(Array.isArray(t)){if(n=t.length,n!=e.length)return!1;for(r=n;r--!==0;)if(!Pd(t[r],e[r]))return!1;return!0}var i;if(SP&&t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(i=t.entries();!(r=i.next()).done;)if(!e.has(r.value[0]))return!1;for(i=t.entries();!(r=i.next()).done;)if(!Pd(r.value[1],e.get(r.value[0])))return!1;return!0}if(CP&&t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(i=t.entries();!(r=i.next()).done;)if(!e.has(r.value[0]))return!1;return!0}if(EP&&ArrayBuffer.isView(t)&&ArrayBuffer.isView(e)){if(n=t.length,n!=e.length)return!1;for(r=n;r--!==0;)if(t[r]!==e[r])return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf&&typeof t.valueOf=="function"&&typeof e.valueOf=="function")return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString&&typeof t.toString=="function"&&typeof e.toString=="function")return t.toString()===e.toString();if(s=Object.keys(t),n=s.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(e,s[r]))return!1;if(kP&&t instanceof Element)return!1;for(r=n;r--!==0;)if(!((s[r]==="_owner"||s[r]==="__v"||s[r]==="__o")&&t.$$typeof)&&!Pd(t[s[r]],e[s[r]]))return!1;return!0}return t!==t&&e!==e}var TP=function(e,n){try{return Pd(e,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};const NP=iu(TP);var AP=function(t,e,n,r,s,i,o,a){if(!t){var l;if(e===void 0)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,s,i,o,a],u=0;l=new Error(e.replace(/%s/g,function(){return c[u++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}},_P=AP;const nw=iu(_P);
40var jP=function(e,n,r,s){var i=r?r.call(s,e,n):void 0;if(i!==void 0)return!!i;if(e===n)return!0;if(typeof e!="object"||!e||typeof n!="object"||!n)return!1;var o=Object.keys(e),a=Object.keys(n);if(o.length!==a.length)return!1;for(var l=Object.prototype.hasOwnProperty.bind(n),c=0;c<o.length;c++){var u=o[c];if(!l(u))return!1;var h=e[u],p=n[u];if(i=r?r.call(s,h,p,u):void 0,i===!1||i===void 0&&h!==p)return!1}return!0};const OP=iu(jP);var iT=(t=>(t.BASE="base",t.BODY="body",t.HEAD="head",t.HTML="html",t.LINK="link",t.META="meta",t.NOSCRIPT="noscript",t.SCRIPT="script",t.STYLE="style",t.TITLE="title",t.FRAGMENT="Symbol(react.fragment)",t))(iT||{}),dm={link:{rel:["amphtml","canonical","alternate"]},script:{type:["application/ld+json"]},meta:{charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]}},rw=Object.values(iT),qf={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},oT=Object.entries(qf).reduce((t,[e,n])=>(t[n]=e,t),{}),Jn="data-rh",ca={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},ua=(t,e)=>{for(let n=t.length-1;n>=0;n-=1){const r=t[n];if(Object.prototype.hasOwnProperty.call(r,e))return r[e]}return null},RP=t=>{let e=ua(t,"title");const n=ua(t,ca.TITLE_TEMPLATE);if(Array.isArray(e)&&(e=e.join("")),n&&e)return n.replace(/%s/g,()=>e);const r=ua(t,ca.DEFAULT_TITLE);return e||r||void 0},MP=t=>ua(t,ca.ON_CHANGE_CLIENT_STATE)||(()=>{}),hm=(t,e)=>e.filter(n=>typeof n[t]<"u").map(n=>n[t]).reduce((n,r)=>({...n,...r}),{}),PP=(t,e)=>e.filter(n=>typeof n.base<"u").map(n=>n.base).reverse().reduce((n,r)=>{if(!n.length){const s=Object.keys(r);for(let i=0;i<s.length;i+=1){const a=s[i].toLowerCase();if(t.indexOf(a)!==-1&&r[a])return n.concat(r)}}return n},[]),IP=t=>console&&typeof console.warn=="function"&&console.warn(t),ml=(t,e,n)=>{const r={};return n.filter(s=>Array.isArray(s[t])?!0:(typeof s[t]<"u"&&IP(`Helmet: ${t} should be of type "Array". Instead found type "${typeof s[t]}"`),!1)).map(s=>s[t]).reverse().reduce((s,i)=>{const o={};i.filter(l=>{let c;const u=Object.keys(l);for(let p=0;p<u.length;p+=1){const f=u[p],g=f.toLowerCase();e.indexOf(g)!==-1&&!(c==="rel"&&l[c].toLowerCase()==="canonical")&&!(g==="rel"&&l[g].toLowerCase()==="stylesheet")&&(c=g),e.indexOf(f)!==-1&&(f==="innerHTML"||f==="cssText"||f==="itemprop")&&(c=f)}if(!c||!l[c])return!1;const h=l[c].toLowerCase();return r[c]||(r[c]={}),o[c]||(o[c]={}),r[c][h]?!1:(o[c][h]=!0,!0)}).reverse().forEach(l=>s.push(l));const a=Object.keys(o);for(let l=0;l<a.length;l+=1){const c=a[l],u={...r[c],...o[c]};r[c]=u}return s},[]).reverse()},LP=(t,e)=>{if(Array.isArray(t)&&t.length){for(let n=0;n<t.length;n+=1)if(t[n][e])return!0}return!1},DP=t=>({baseTag:PP(["href"],t),bodyAttributes:hm("bodyAttributes",t),defer:ua(t,ca.DEFER),encode:ua(t,ca.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:hm("htmlAttributes",t),linkTags:ml("link",["rel","href"],t),metaTags:ml("meta",["name","charset","http-equiv","property","itemprop"],t),noscriptTags:ml("noscript",["innerHTML"],t),onChangeClientState:MP(t),scriptTags:ml("script",["src","innerHTML"],t),styleTags:ml("style",["cssText"],t),title:RP(t),titleAttributes:hm("titleAttributes",t),prioritizeSeoTags:LP(t,ca.PRIORITIZE_SEO_TAGS)}),aT=t=>Array.isArray(t)?t.join(""):t,$P=(t,e)=>{const n=Object.keys(t);for(let r=0;r<n.length;r+=1)if(e[n[r]]&&e[n[r]].includes(t[n[r]]))return!0;return!1},fm=(t,e)=>Array.isArray(t)?t.reduce((n,r)=>($P(r,e)?n.priority.push(r):n.default.push(r),n),{priority:[],default:[]}):{default:t,priority:[]},sw=(t,e)=>({...t,[e]:void 0}),zP=["noscript","script","style"],oy=(t,e=!0)=>e===!1?String(t):String(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),lT=t=>Object.keys(t).reduce((e,n)=>{const r=typeof t[n]<"u"?`${n}
40="${t[n]}"`:`${n}`;return e?`${e} ${r}`:r},""),BP=(t,e,n,r)=>{const s=lT(n),i=aT(e);return s?`<${t} ${Jn}="true" ${s}>${oy(i,r)}</${t}>`:`<${t} ${Jn}="true">${oy(i,r)}</${t}>`},FP=(t,e,n=!0)=>e.reduce((r,s)=>{const i=s,o=Object.keys(i).filter(c=>!(c==="innerHTML"||c==="cssText")).reduce((c,u)=>{const h=typeof i[u]>"u"?u:`${u}="${oy(i[u],n)}"`;return c?`${c} ${h}`:h},""),a=i.innerHTML||i.cssText||"",l=zP.indexOf(t)===-1;return`${r}<${t} ${Jn}="true" ${o}${l?"/>":`>${a}</${t}>`}`},""),cT=(t,e={})=>Object.keys(t).reduce((n,r)=>{const s=qf[r];return n[s||r]=t[r],n},e),WP=(t,e,n)=>{const r={key:e,[Jn]:!0},s=cT(n,r);return[R.createElement("title",s,e)]},Id=(t,e)=>e.map((n,r)=>{const s={key:r,[Jn]:!0};return Object.keys(n).forEach(i=>{const a=qf[i]||i;if(a==="innerHTML"||a==="cssText"){const l=n.innerHTML||n.cssText;s.dangerouslySetInnerHTML={__html:l}}else s[a]=n[i]}),R.createElement(t,s)}),xn=(t,e,n=!0)=>{switch(t){case"title":return{toComponent:()=>WP(t,e.title,e.titleAttributes),toString:()=>BP(t,e.title,e.titleAttributes,n)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>cT(e),toString:()=>lT(e)};default:return{toComponent:()=>Id(t,e),toString:()=>FP(t,e,n)}}},HP=({metaTags:t,linkTags:e,scriptTags:n,encode:r})=>{const s=fm(t,dm.meta),i=fm(e,dm.link),o=fm(n,dm.script);return{priorityMethods:{toComponent:()=>[...Id("meta",s.priority),...Id("link",i.priority),...Id("script",o.priority)],toString:()=>`${xn("meta",s.priority,r)} ${xn("link",i.priority,r)} ${xn("script",o.priority,r)}`},metaTags:s.default,linkTags:i.default,scriptTags:o.default}},UP=t=>{const{baseTag:e,bodyAttributes:n,encode:r=!0,htmlAttributes:s,noscriptTags:i,styleTags:o,title:a="",titleAttributes:l,prioritizeSeoTags:c}=t;let{linkTags:u,metaTags:h,scriptTags:p}=t,f={toComponent:()=>[],toString:()=>""};return c&&({priorityMethods:f,linkTags:u,metaTags:h,scriptTags:p}=HP(t)),{priority:f,base:xn("base",e,r),bodyAttributes:xn("bodyAttributes",n,r),htmlAttributes:xn("htmlAttributes",s,r),link:xn("link",u,r),meta:xn("meta",h,r),noscript:xn("noscript",i,r),script:xn("script",p,r),style:xn("style",o,r),title:xn("title",{title:a,titleAttributes:l},r)}},ay=UP,Wu=[],x0=!!(typeof window<"u"&&window.document&&window.document.createElement),ly=class{constructor(t,e){_r(this,"instances",[]);_r(this,"canUseDOM",x0);_r(this,"context");_r(this,"value",{setHelmet:t=>{this.context.helmet=t},helmetInstances:{get:()=>this.canUseDOM?Wu:this.instances,add:t=>{(this.canUseDOM?Wu:this.instances).push(t)},remove:t=>{const e=(this.canUseDOM?Wu:this.instances).indexOf(t);(this.canUseDOM?Wu:this.instances).splice(e,1)}}});this.context=t,this.canUseDOM=e||!1,e||(t.helmet=ay({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},VP=parseInt(R.version.split(".")[0],10),cy=VP>=19,qP={},uT=R.createContext(qP),Wi,dT=(Wi=class extends w.Component{constructor(n){super(n);_r(this,"helmetData");cy?this.helmetData=null:this.helmetData=new ly(this.props.context||{},Wi.canUseDOM)}render(){return cy?R.createElement(R.Fragment,null,this.props.children):R.createElement(uT.Provider,{value:this.helmetData.value},this.props.children)}},_r(Wi,"canUseDOM",x0),Wi),Ao=(t,e)=>{const n=document.head||document.querySelector("head"),r=n.querySelectorAll(`${t}[${Jn}]`),s=[].slice.call(r),i=[];let o;return e&&e.length&&e.forEach(a=>{const l=document.createElement(t);for(const c in a)if(Object.prototype.hasOwnProperty.call(a,c))if(c==="innerHTML")l.innerHTML=a.innerHTML;else if(c==="cssText"){const u=a.cssText;l.appendChild(document.createTextNode(u))}else{const u=c,h=typeof a[u]>
40"u"?"":a[u];l.setAttribute(c,h)}l.setAttribute(Jn,"true"),s.some((c,u)=>(o=u,l.isEqualNode(c)))?s.splice(o,1):i.push(l)}),s.forEach(a=>{var l;return(l=a.parentNode)==null?void 0:l.removeChild(a)}),i.forEach(a=>n.appendChild(a)),{oldTags:s,newTags:i}},uy=(t,e)=>{const n=document.getElementsByTagName(t)[0];if(!n)return;const r=n.getAttribute(Jn),s=r?r.split(","):[],i=[...s],o=Object.keys(e);for(const a of o){const l=e[a]||"";n.getAttribute(a)!==l&&n.setAttribute(a,l),s.indexOf(a)===-1&&s.push(a);const c=i.indexOf(a);c!==-1&&i.splice(c,1)}for(let a=i.length-1;a>=0;a-=1)n.removeAttribute(i[a]);s.length===i.length?n.removeAttribute(Jn):n.getAttribute(Jn)!==o.join(",")&&n.setAttribute(Jn,o.join(","))},GP=(t,e)=>{typeof t<"u"&&document.title!==t&&(document.title=aT(t)),uy("title",e)},iw=(t,e)=>{const{baseTag:n,bodyAttributes:r,htmlAttributes:s,linkTags:i,metaTags:o,noscriptTags:a,onChangeClientState:l,scriptTags:c,styleTags:u,title:h,titleAttributes:p}=t;uy("body",r),uy("html",s),GP(h,p);const f={baseTag:Ao("base",n),linkTags:Ao("link",i),metaTags:Ao("meta",o),noscriptTags:Ao("noscript",a),scriptTags:Ao("script",c),styleTags:Ao("style",u)},g={},m={};Object.keys(f).forEach(y=>{const{newTags:v,oldTags:b}=f[y];v.length&&(g[y]=v),b.length&&(m[y]=f[y].oldTags)}),e&&e(),l(t,g,m)},gl=null,KP=t=>{gl&&cancelAnimationFrame(gl),t.defer?gl=requestAnimationFrame(()=>{iw(t,()=>{gl=null})}):(iw(t),gl=null)},YP=KP,ow=class extends w.Component{constructor(){super(...arguments);_r(this,"rendered",!1)}shouldComponentUpdate(e){return!OP(e,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:e}=this.props.context;e.remove(this),this.emitChange()}emitChange(){const{helmetInstances:e,setHelmet:n}=this.props.context;let r=null;const s=DP(e.get().map(i=>{const{context:o,...a}=i.props;return a}));dT.canUseDOM?YP(s):ay&&(r=ay(s)),n(r)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:e}=this.props.context;e.add(this),this.emitChange()}render(){return this.init(),null}},Ld=[],aw=t=>{const e={};for(const n of Object.keys(t))e[oT[n]||n]=t[n];return e},Si=t=>{const e={};for(const n of Object.keys(t)){const r=qf[n];e[r||n]=t[n]}return e},lw=(t,e)=>{if(!x0)return;const n=document.getElementsByTagName(t)[0];if(!n)return;const r="data-rh-managed",s=n.getAttribute(r),i=s?s.split(","):[],o=Object.keys(e);for(const a of i)o.includes(a)||n.removeAttribute(a);for(const a of o){const l=e[a];l==null||l===!1?n.removeAttribute(a):l===!0?n.setAttribute(a,""):n.setAttribute(a,String(l))}o.length>0?n.setAttribute(r,o.join(",")):n.removeAttribute(r)},pm=()=>{const t={},e={};for(const n of Ld){const{htmlAttributes:r,bodyAttributes:s}=n.props;r&&Object.assign(t,aw(r)),s&&Object.assign(e,aw(s))}lw("html",t),lw("body",e)},JP=class extends w.Component{componentDidMount(){Ld.push(this),pm()}componentDidUpdate(){pm()}componentWillUnmount(){const t=Ld.indexOf(this);t!==-1&&Ld.splice(t,1),pm()}resolveTitle(){const{title:t,titleTemplate:e,defaultTitle:n}=this.props;return t&&e?e.replace(/%s/g,()=>Array.isArray(t)?t.join(""):t):t||n||void 0}renderTitle(){const t=this.resolveTitle();if(t===void 0)return null;const e=this.props.titleAttributes||{};return R.createElement("title",Si(e),t)}renderBase(){const{base:t}=this.props;return t?R.createElement("base",Si(t)):null}renderMeta(){const{meta:t}=this.props;return!t||!Array.isArray(t)?null:t.map((e,n)=>R.createElement("meta",{key:n,...Si(e)}))}renderLink(){const{link:t}=this.props;return!t||!Array.isArray(t)?null:t.map((e,n)=>R.createElement("link",{key:n,...Si(e)}))}renderScript(){const{script:t}=this.props;return!t||!Array.isArray(t)?null:t.map((e,n)=>{const{innerHTML:r,...s}=e,i=Si(s);return r&&(i.dangerouslySetInnerHTML={__html:r}),R.createElement("script",{key:n,...i})})}renderStyle(){const{style:t}=this.props;return!t||!Array.isArray(t)?null:t.map((e,n)=>{const{cssText:r,...s}=e,i=Si(s);return r&&(i.dangerouslySetInnerHTML={__html:r}),R.createElement("style",{key:n,...i})})}renderNoscript(){const{noscript:t}=this.props;return!t||!Array.isArray(t)?null:t.map((e,n)=>{const{innerHTML:r,...s}=e,i=Si(s);return r&&(i.dangerouslySetInnerHTML={__html:r}),R.createElement("noscript",{key:n,...i})})}render(){return R.createElement(R.Fragment,null,this.renderTitle(),this.renderBase(),this.renderMeta(),this.renderLink(),this.renderScript(),this.renderStyle(),this.renderNoscript())}},fg,du=(fg=class extends w.Component{shouldComponentUpdate(t){return!NP(sw(this.props,"helmetData"),sw(t,"helmetData"))}mapNestedChildrenToProps(t,e){if(!e)return null;switch(t.type){case"script":case"noscript":return{innerHTML:e};case"style":return{cssText:e};default:throw new Error(`<${t.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(t,e,n,r){return{...e,[t.type]:[...e[t.type]||[],{...n,...this.mapNestedChildrenToProps(t,r)}]}}mapObjectTypeChildren(t,e,n,r){switch(t.type){case"title":return{...e,[t.type]:r,titleAttributes:{...n}};case"body":return{...e,bodyAttributes:{...n}};case"html":return{...e,htmlAttributes:{...n}};default:return{...e,[t.type]:{...n}}}}mapArrayTypeChildrenToProps(t,e){let n={...e};return Object.keys(t).forEach(r=>{n={...n,[r]:t[r]}}),n}
40warnOnInvalidChildren(t,e){return nw(rw.some(n=>t.type===n),typeof t.type=="function"?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${rw.join(", ")} are allowed. Helmet does not support rendering <${t.type}> elements. Refer to our API for more information.`),nw(!e||typeof e=="string"||Array.isArray(e)&&!e.some(n=>typeof n!="string"),`Helmet expects a string as a child of <${t.type}>. Did you forget to wrap your children in braces? ( <${t.type}>{\`\`}</${t.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(t,e){let n={};return R.Children.forEach(t,r=>{if(!r||!r.props)return;const{children:s,...i}=r.props,o=Object.keys(i).reduce((l,c)=>(l[oT[c]||c]=i[c],l),{});let{type:a}=r;switch(typeof a=="symbol"?a=a.toString():this.warnOnInvalidChildren(r,s),a){case"Symbol(react.fragment)":e=this.mapChildrenToProps(s,e);break;case"link":case"meta":case"noscript":case"script":case"style":n=this.flattenArrayTypeChildren(r,n,o,s);break;default:e=this.mapObjectTypeChildren(r,e,o,s);break}}),this.mapArrayTypeChildrenToProps(n,e)}render(){const{children:t,...e}=this.props;let n={...e},{helmetData:r}=e;if(t&&(n=this.mapChildrenToProps(t,n)),r&&!(r instanceof ly)){const s=r;r=new ly(s.context,!0),delete n.helmetData}return cy?R.createElement(JP,{...n}):r?R.createElement(ow,{...n,context:r.value}):R.createElement(uT.Consumer,null,s=>R.createElement(ow,{...n,context:s}))}},_r(fg,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),fg),Gf=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Kf=typeof window>"u"||"Deno"in globalThis;function Wn(){}function QP(t,e){return typeof t=="function"?t(e):t}function XP(t){return typeof t=="number"&&t>=0&&t!==1/0}function ZP(t,e){return Math.max(t+(e||0)-Date.now(),0)}function dy(t,e){return typeof t=="function"?t(e):t}function eI(t,e){return typeof t=="function"?t(e):t}function cw(t,e){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:o,stale:a}=t;if(o){if(r){if(e.queryHash!==w0(o,e.options))return!1}else if(!Oc(e.queryKey,o))return!1}if(n!=="all"){const l=e.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||s&&s!==e.state.fetchStatus||i&&!i(e))}function uw(t,e){const{exact:n,status:r,predicate:s,mutationKey:i}=t;if(i){if(!e.options.mutationKey)return!1;if(n){if(jc(e.options.mutationKey)!==jc(i))return!1}else if(!Oc(e.options.mutationKey,i))return!1}return!(r&&e.state.status!==r||s&&!s(e))}function w0(t,e){return((e==null?void 0:e.queryKeyHashFn)||jc)(t)}function jc(t){return JSON.stringify(t,(e,n)=>hy(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function Oc(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(n=>Oc(t[n],e[n])):!1}function hT(t,e){if(t===e)return t;const n=dw(t)&&dw(e);if(n||hy(t)&&hy(e)){const r=n?t:Object.keys(t),s=r.length,i=n?e:Object.keys(e),o=i.length,a=n?[]:{},l=new Set(r);let c=0;for(let u=0;u<o;u++){const h=n?u:i[u];(!n&&l.has(h)||n)&&t[h]===void 0&&e[h]===void 0?(a[h]=void 0,c++):(a[h]=hT(t[h],e[h]),a[h]===t[h]&&t[h]!==void 0&&c++)}return s===o&&c===s?t:a}return e}function dw(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function hy(t){if(!hw(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!hw(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function hw(t){return Object.prototype.toString.call(t)==="[object Object]"}function tI(t){return new Promise(e=>{setTimeout(e,t)})}function nI(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?hT(t,e):e}function rI(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function sI(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var k0=Symbol();function fT(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===k0?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var Hi,js,va,$S,iI=($S=class extends Gf{constructor(){super();ge(this,Hi);ge(this,js);ge(this,va);ie(this,va,e=>{if(!Kf&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){j(this,js)||this.setEventListener(j(this,va))}onUnsubscribe(){var e;this.hasListeners()||((e=j(this,js))==null||e.call(this),ie(this,js,void 0))}setEventListener(e){var n;ie(this,va,e),(n=j(this,js))==null||n.call(this),ie(this,js,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){j(this,Hi)!==e&&(ie(this,Hi,e),this.onFocus())}onFocus(){const e=this.isFocused();
vendor: 4,924 bytes, line 40
40this.listeners.forEach(n=>{n(e)})}isFocused(){var e;return typeof j(this,Hi)=="boolean"?j(this,Hi):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Hi=new WeakMap,js=new WeakMap,va=new WeakMap,$S),pT=new iI,ba,Os,xa,zS,oI=(zS=class extends Gf{constructor(){super();ge(this,ba,!0);ge(this,Os);ge(this,xa);ie(this,xa,e=>{if(!Kf&&window.addEventListener){const n=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){j(this,Os)||this.setEventListener(j(this,xa))}onUnsubscribe(){var e;this.hasListeners()||((e=j(this,Os))==null||e.call(this),ie(this,Os,void 0))}setEventListener(e){var n;ie(this,xa,e),(n=j(this,Os))==null||n.call(this),ie(this,Os,e(this.setOnline.bind(this)))}setOnline(e){j(this,ba)!==e&&(ie(this,ba,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return j(this,ba)}},ba=new WeakMap,Os=new WeakMap,xa=new WeakMap,zS),wh=new oI;function aI(){let t,e;const n=new Promise((s,i)=>{t=s,e=i});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),t(s)},n.reject=s=>{r({status:"rejected",reason:s}),e(s)},n}function lI(t){return Math.min(1e3*2**t,3e4)}function mT(t){return(t??"online")==="online"?wh.isOnline():!0}var gT=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function mm(t){return t instanceof gT}function yT(t){let e=!1,n=0,r=!1,s;const i=aI(),o=m=>{var y;r||(p(new gT(m)),(y=t.abort)==null||y.call(t))},a=()=>{e=!0},l=()=>{e=!1},c=()=>pT.isFocused()&&(t.networkMode==="always"||wh.isOnline())&&t.canRun(),u=()=>mT(t.networkMode)&&t.canRun(),h=m=>{var y;r||(r=!0,(y=t.onSuccess)==null||y.call(t,m),s==null||s(),i.resolve(m))},p=m=>{var y;r||(r=!0,(y=t.onError)==null||y.call(t,m),s==null||s(),i.reject(m))},f=()=>new Promise(m=>{var y;s=v=>{(r||c())&&m(v)},(y=t.onPause)==null||y.call(t)}).then(()=>{var m;s=void 0,r||(m=t.onContinue)==null||m.call(t)}),g=()=>{if(r)return;let m;const y=n===0?t.initialPromise:void 0;try{m=y??t.fn()}catch(v){m=Promise.reject(v)}Promise.resolve(m).then(h).catch(v=>{var C;if(r)return;const b=t.retry??(Kf?0:3),x=t.retryDelay??lI,k=typeof x=="function"?x(n,v):x,S=b===!0||typeof b=="number"&&n<b||typeof b=="function"&&b(n,v);if(e||!S){p(v);return}n++,(C=t.onFail)==null||C.call(t,n,v),tI(k).then(()=>c()?void 0:f()).then(()=>{e?p(v):g()})})};return{promise:i,cancel:o,continue:()=>(s==null||s(),i),cancelRetry:a,continueRetry:l,canStart:u,start:()=>(u()?g():f().then(g),i)}}var cI=t=>setTimeout(t,0);function uI(){let t=[],e=0,n=a=>{a()},r=a=>{a()},s=cI;const i=a=>{e?t.push(a):s(()=>{n(a)})},o=()=>{const a=t;t=[],a.length&&s(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;e++;try{l=a()}finally{e--,e||o()}return l},batchCalls:a=>(...l)=>{i(()=>{a(...l)})},schedule:i,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{s=a}}}var Dt=uI(),Ui,BS,vT=(BS=class{constructor(){ge(this,Ui)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),XP(this.gcTime)&&ie(this,Ui,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Kf?1/0:5*60*1e3))}clearGcTimeout(){j(this,Ui)&&(clearTimeout(j(this,Ui)),ie(this,Ui,void 0))}},Ui=new WeakMap,BS),wa,Vi,wn,qi,Nt,ru,Gi,Un,Lr,FS,dI=(FS=class extends vT{constructor(e){super();ge(this,Un);ge(this,wa);ge(this,Vi);ge(this,wn);ge(this,qi);ge(this,Nt);ge(this,ru);ge(this,Gi);ie(this,Gi,!1),ie(this,ru,e.defaultOptions),this.setOptions(e.options),this.observers=[],ie(this,qi,e.client),ie(this,wn,j(this,qi).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,ie(this,wa,fI(this.options)),this.state=e.state??j(this,wa),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=j(this,Nt))==null?void 0:e.promise}setOptions(e){this.options={...j(this,ru),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&j(this,wn).remove(this)}setData(e,n){const r=nI(this.state.data,e,this.options);return Ct(this,Un,Lr).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(e,n){Ct(this,Un,Lr).call(this,{type:"setState",state:e,setStateOptions:n})}cancel(e){var r,s;const n=(r=j(this,Nt))==null?void 0:r.promise;return(s=j(this,Nt))==null||s.cancel(e),n?n.then(Wn).catch(Wn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(j(this,wa))}isActive(){return this.observers.some(e=>eI(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===k0||this.state.dataUpdateCount+this.state.errorUpdate
40Count===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>dy(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!ZP(this.state.dataUpdatedAt,e)}onFocus(){var n;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(n=j(this,Nt))==null||n.continue()}onOnline(){var n;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(n=j(this,Nt))==null||n.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),j(this,wn).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(j(this,Nt)&&(j(this,Gi)?j(this,Nt).cancel({revert:!0}):j(this,Nt).cancelRetry()),this.scheduleGc()),j(this,wn).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ct(this,Un,Lr).call(this,{type:"invalidate"})}fetch(e,n){var c,u,h;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(j(this,Nt))return j(this,Nt).continueRetry(),j(this,Nt).promise}if(e&&this.setOptions(e),!this.options.queryFn){const p=this.observers.find(f=>f.options.queryFn);p&&this.setOptions(p.options)}const r=new AbortController,s=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(ie(this,Gi,!0),r.signal)})},i=()=>{const p=fT(this.options,n),g=(()=>{const m={client:j(this,qi),queryKey:this.queryKey,meta:this.meta};return s(m),m})();return ie(this,Gi,!1),this.options.persister?this.options.persister(p,g,this):p(g)},a=(()=>{const p={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:j(this,qi),state:this.state,fetchFn:i};return s(p),p})();(c=this.options.behavior)==null||c.onFetch(a,this),ie(this,Vi,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=a.fetchOptions)==null?void 0:u.meta))&&Ct(this,Un,Lr).call(this,{type:"fetch",meta:(h=a.fetchOptions)==null?void 0:h.meta});const l=p=>{var f,g,m,y;mm(p)&&p.silent||Ct(this,Un,Lr).call(this,{type:"error",error:p}),mm(p)||((g=(f=j(this,wn).config).onError)==null||g.call(f,p,this),(y=(m=j(this,wn).config).onSettled)==null||y.call(m,this.state.data,p,this)),this.scheduleGc()};return ie(this,Nt,yT({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:p=>{var f,g,m,y;if(p===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(p)}catch(v){l(v);return}(g=(f=j(this,wn).config).onSuccess)==null||g.call(f,p,this),(y=(m=j(this,wn).config).onSettled)==null||y.call(m,p,this.state.error,this),this.scheduleGc()},onError:l,onFail:(p,f)=>{Ct(this,Un,Lr).call(this,{type:"failed",failureCount:p,error:f})},onPause:()=>{Ct(this,Un,Lr).call(this,{type:"pause"})},onContinue:()=>{Ct(this,Un,Lr).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),j(this,Nt).start()}},wa=new WeakMap,Vi=new WeakMap,wn=new WeakMap,qi=new WeakMap,Nt=new WeakMap,ru=new WeakMap,Gi=new WeakMap,Un=new WeakSet,Lr=function(e){const n=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...hI(r.data,this.options),fetchMeta:e.meta??null};case"success":return ie(this,Vi,void 0),{...r,data:e.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=e.error;return mm(s)&&s.revert&&j(this,Vi)?{...j(this,Vi),fetchStatus:"idle"}
vendor: 9,640 bytes, line 40
40:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=n(this.state),Dt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),j(this,wn).notify({query:this,type:"updated",action:e})})},FS);function hI(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:mT(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function fI(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,r=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,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 fr,WS,pI=(WS=class extends Gf{constructor(e={}){super();ge(this,fr);this.config=e,ie(this,fr,new Map)}build(e,n,r){const s=n.queryKey,i=n.queryHash??w0(s,n);let o=this.get(i);return o||(o=new dI({client:e,queryKey:s,queryHash:i,options:e.defaultQueryOptions(n),state:r,defaultOptions:e.getQueryDefaults(s)}),this.add(o)),o}add(e){j(this,fr).has(e.queryHash)||(j(this,fr).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=j(this,fr).get(e.queryHash);n&&(e.destroy(),n===e&&j(this,fr).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Dt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return j(this,fr).get(e)}getAll(){return[...j(this,fr).values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>cw(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>cw(e,r)):n}notify(e){Dt.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){Dt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Dt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},fr=new WeakMap,WS),pr,It,Ki,mr,ys,HS,mI=(HS=class extends vT{constructor(e){super();ge(this,mr);ge(this,pr);ge(this,It);ge(this,Ki);this.mutationId=e.mutationId,ie(this,It,e.mutationCache),ie(this,pr,[]),this.state=e.state||gI(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){j(this,pr).includes(e)||(j(this,pr).push(e),this.clearGcTimeout(),j(this,It).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){ie(this,pr,j(this,pr).filter(n=>n!==e)),this.scheduleGc(),j(this,It).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){j(this,pr).length||(this.state.status==="pending"?this.scheduleGc():j(this,It).remove(this))}continue(){var e;return((e=j(this,Ki))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var i,o,a,l,c,u,h,p,f,g,m,y,v,b,x,k,S,C,E,T;const n=()=>{Ct(this,mr,ys).call(this,{type:"continue"})};ie(this,Ki,yT({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(N,_)=>{Ct(this,mr,ys).call(this,{type:"failed",failureCount:N,error:_})},onPause:()=>{Ct(this,mr,ys).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>j(this,It).canRun(this)}));const r=this.state.status==="pending",s=!j(this,Ki).canStart();try{if(r)n();else{Ct(this,mr,ys).call(this,{type:"pending",variables:e,isPaused:s}),await((o=(i=j(this,It).config).onMutate)==null?void 0:o.call(i,e,this));const _=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,e));_!==this.state.context&&Ct(this,mr,ys).call(this,{type:"pending",context:_,variables:e,isPaused:s})}const N=await j(this,Ki).start();return await((u=(c=j(this,It).config).onSuccess)==null?void 0:u.call(c,N,e,this.state.context,this)),await((p=(h=this.options).onSuccess)==null?void 0:p.call(h,N,e,this.state.context)),await((g=(f=j(this,It).config).onSettled)==null?void 0:g.call(f,N,null,this.state.variables,this.state.context,this)),await((y=(m=this.options).onSettled)==null?void 0:y.call(m,N,null,e,this.state.context)),Ct(this,mr,ys).call(this,{type:"success",data:N}),N}catch(N){try{throw await((b=(v=j(this,It).config).onError)==null?void 0:b.call(v,N,e,this.state.context,this)),await((k=(x=this.options).onError)==null?void 0:k.call(x,N,e,this.state.context)),await((C=(S=j(this,It).config).onSettled)==null?void 0:C.call(S,void 0,N,this.state.variables,this.state.context,this)),await((T=(E=this.options).onSettled)==null?void 0:T.call(E,void 0,N,e,this.state.context)),N}finally{Ct(this,mr,ys).call(this,{type:"error",error:N})}}finally{j(this,It).runNext(this)}}},pr=new WeakMap,It=new WeakMap,Ki=new WeakMap,mr=new WeakSet,ys=function(e){const n=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Dt.batch(()=>{j(this,pr).forEach(r=>{r.onMutationUpdate(e)}),j(this,It).notify({mutation:this,type:"updated",action:e})})},HS);function gI(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ur,Vn,su,US,yI=(US=class extends Gf{constructor(e={}){super();ge(this,Ur);ge(this,Vn);ge(this,su);this.config=e,ie(this,Ur,new Set),ie(this,Vn,new Map),ie(this,su,0)}build(e,n,r){const s=new mI({mutationCache:this,mutationId:++Cu(this,su)._,options:e.defaultMutationOptions(n),state:r});return this.add(s),s}add(e){j(this,Ur).add(e);const n=Hu(e);if(typeof n=="string"){const r=j(this,Vn).get(n);r?r.push(e):j(this,Vn).set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(j(this,Ur).delete(e)){const n=Hu(e);if(typeof n=="string"){const r=j(this,Vn).get(n);if(r)if(r.length>1){const s=r.indexOf(e);s!==-1&&r.splice(s,1)}else r[0]===e&&j(this,Vn).delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=Hu(e);if(typeof n=="string"){const r=j(this,Vn).get(n),s=r==null?void 0:r.find(i=>i.state.status==="pending");return!s||s===e}else return!0}runNext(e){var r;const n=Hu(e);if(typeof n=="string"){const s=(r=j(this,Vn).get(n))==null?void 0:r.find(i=>i!==e&&i.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Dt.batch(()=>{j(this,Ur).forEach(e=>{this.notify({type:"removed",mutation:e})}),j(this,Ur).clear(),j(this,Vn).clear()})}getAll(){return Array.from(j(this,Ur))}find(e){const n={exact:!0,...e};return this.getAll().find(r=>uw(n,r))}findAll(e={}){return this.getAll().filter(n=>uw(e,n))}notify(e){Dt.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return Dt.batch(()=>Promise.all(e.map(n=>n.continue().catch(Wn))))}},Ur=new WeakMap,Vn=new WeakMap,su=new WeakMap,US);function Hu(t){var e;return(e=t.options.scope)==null?void 0:e.id}function fw(t){return{onFetch:(e,n)=>{var u,h,p,f,g;const r=e.options,s=(p=(h=(u=e.fetchOptions)==null?void 0:u.meta)==null?void 0:h.fetchMore)==null?void 0:p.direction,i=((f=e.state.data)==null?void 0:f.pages)||[],o=((g=e.state.data)==null?void 0:g.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let m=!1;const y=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(e.signal.aborted?m=!0:e.signal.addEventListener("abort",()=>{m=!0}),e.signal)})},v=fT(e.options,e.fetchOptions),b=async(x,k,S)=>{if(m)return Promise.reject();if(k==null&&x.pages.length)return Promise.resolve(x);const E=(()=>{const z={client:e.client,queryKey:e.queryKey,pageParam:k,direction:S?"backward":"forward",meta:e.options.meta};return y(z),z})(),T=await v(E),{maxPages:N}=e.options,_=S?sI:rI;return{pages:_(x.pages,T,N),pageParams:_(x.pageParams,k,N)}};if(s&&i.length){const x=s==="backward",k=x?vI:pw,S={pages:i,pageParams:o},C=k(r,S);a=await b(S,C,x)}else{const x=t??i.length;do{const k=l===0?o[0]??r.initialPageParam:pw(r,a);if(l>0&&k==null)break;a=await b(a,k),l++}while(l<x)}return a};e.options.persister?e.fetchFn=()=>{var m,y;return(y=(m=e.options).persister)==null?void 0:y.call(m,c,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=c}}}function pw(t,{pages:e,pageParams:n}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,n[r],n):void 0}function vI(t,{pages:e,pageParams:n}){var r;return e.length>0?(r=t.getPreviousPageParam)==null?void 0:r.call(t,e[0],e,n[0],n):void 0}var He,Rs,Ms,ka,Sa,Ps,Ca,Ea,VS,bI=(VS=class{constructor(t={}){ge(this,He);ge(this,Rs);ge(this,Ms);ge(this,ka);ge(this,Sa);ge(this,Ps);ge(this,Ca);ge(this,Ea);ie(this,He,t.queryCache||new pI),ie(this,Rs,t.mutationCache||new yI),ie(this,Ms,t.defaultOptions||{}),ie(this,ka,new Map),ie(this,Sa,new Map),ie(this,Ps,0)}mount(){Cu(this,Ps)._++,j(this,Ps)===1&&(ie(this,Ca,pT.subscribe(async t=>{t&&(await this.resumePausedMutations(),j(this,He).onFocus())})),ie(this,Ea,wh.subscribe(async t=>{t&&(await this.resumePausedMutations(),j(this,He).onOnline())})))}unmount(){var t,e;
40Cu(this,Ps)._--,j(this,Ps)===0&&((t=j(this,Ca))==null||t.call(this),ie(this,Ca,void 0),(e=j(this,Ea))==null||e.call(this),ie(this,Ea,void 0))}isFetching(t){return j(this,He).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return j(this,Rs).findAll({...t,status:"pending"}).length}getQueryData(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=j(this,He).get(e.queryHash))==null?void 0:n.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),n=j(this,He).build(this,e),r=n.state.data;return r===void 0?this.fetchQuery(t):(t.revalidateIfStale&&n.isStaleByTime(dy(e.staleTime,n))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(t){return j(this,He).findAll(t).map(({queryKey:e,state:n})=>{const r=n.data;return[e,r]})}setQueryData(t,e,n){const r=this.defaultQueryOptions({queryKey:t}),s=j(this,He).get(r.queryHash),i=s==null?void 0:s.state.data,o=QP(e,i);if(o!==void 0)return j(this,He).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(t,e,n){return Dt.batch(()=>j(this,He).findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,n)]))}getQueryState(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=j(this,He).get(e.queryHash))==null?void 0:n.state}removeQueries(t){const e=j(this,He);Dt.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=j(this,He);return Dt.batch(()=>(n.findAll(t).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const n={revert:!0,...e},r=Dt.batch(()=>j(this,He).findAll(t).map(s=>s.cancel(n)));return Promise.all(r).then(Wn).catch(Wn)}invalidateQueries(t,e={}){return Dt.batch(()=>(j(this,He).findAll(t).forEach(n=>{n.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},e)))}refetchQueries(t,e={}){const n={...e,cancelRefetch:e.cancelRefetch??!0},r=Dt.batch(()=>j(this,He).findAll(t).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,n);return n.throwOnError||(i=i.catch(Wn)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Wn)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=j(this,He).build(this,e);return n.isStaleByTime(dy(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Wn).catch(Wn)}fetchInfiniteQuery(t){return t.behavior=fw(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Wn).catch(Wn)}ensureInfiniteQueryData(t){return t.behavior=fw(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return wh.isOnline()?j(this,Rs).resumePausedMutations():Promise.resolve()}getQueryCache(){return j(this,He)}getMutationCache(){return j(this,Rs)}getDefaultOptions(){return j(this,Ms)}setDefaultOptions(t){ie(this,Ms,t)}setQueryDefaults(t,e){j(this,ka).set(jc(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...j(this,ka).values()],n={};return e.forEach(r=>{Oc(t,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(t,e){j(this,Sa).set(jc(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...j(this,Sa).values()],n={};return e.forEach(r=>{Oc(t,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...j(this,Ms).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=w0(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===k0&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...j(this,Ms).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){j(this,He).clear(),j(this,Rs).clear()}},He=new WeakMap,Rs=new WeakMap,Ms=new WeakMap,ka=new WeakMap,Sa=new WeakMap,Ps=new WeakMap,Ca=new WeakMap,Ea=new WeakMap,VS),xI=w.createContext(void 0),wI=({client:t,children:e})=>(w.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),d.jsx(xI.Provider,{value:t,children:e}));/** 41 * @remix-run/router v1.23.0 42 * 43 * Copyright (c) Remix Software Inc. 44 * 45 * This source code is licensed under the MIT license found in the 46 * LICENSE.md file in the root directory of this source tree. 47 * 48 * @license MIT 49 */function Rc(){return Rc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Rc.apply(this,arguments)}var Ds;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(Ds||(Ds={}));const mw="popstate";function kI(t){t===void 0&&(t={});function e(r,s){let{pathname:i,search:o,hash:a}=r.location;return fy("",{pathname:i,search:o,hash:a},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:kh(s)}return CI(e,n,null,t)}function Je(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function bT(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function SI(){return Math.random().toString(36).substr(2,8)}function gw(t,e){return{usr:t.state,key:t.key,idx:e}}function fy(t,e,n,r){return n===void 0&&(n=null),Rc({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Ka(e):e,{state:n,key:e&&e.key||r||SI()})}function kh(t){let{pathname:e="/",search:n="",hash:r=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Ka(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substr(r),t=t.substr(0,r)),t&&(e.pathname=t)}return e}function CI(t,e,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,o=s.history,a=Ds.Pop,l=null,c=u();c==null&&(c=0,o.replaceState(Rc({},o.state,{idx:c}),""));function u(){return(o.state||{idx:null}).idx}function h(){a=Ds.Pop;let y=u(),v=y==null?null:y-c;c=y,l&&l({action:a,location:m.location,delta:v})}function p(y,v){a=Ds.Push;let b=fy(m.location,y,v);c=u()+1;let x=gw(b,c),k=m.createHref(b);try{o.pushState(x,"",k)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;s.location.assign(k)}i&&l&&l({action:a,location:m.location,delta:1})}function f(y,v){a=Ds.Replace;let b=fy(m.location,y,v);c=u();let x=gw(b,c),k=m.createHref(b);o.replaceState(x,"",k),i&&l&&l({action:a,location:m.location,delta:0})}function g(y){let v=s.location.origin!=="null"?s.location.origin:s.location.href,b=typeof y=="string"?y:kh(y);return b=b.replace(/ $/,"%20"),Je(v,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,v)}let m={get action(){return a},get location(){return t(s,o)},listen(y){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(mw,h),l=y,()=>{s.removeEventListener(mw,h),l=null}},createHref(y){return e(s,y)},createURL:g,encodeLocation(y){let v=g(y);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:p,replace:f,go(y){return o.go(y)}};return m}var yw;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(yw||(yw={}));function EI(t,e,n){return n===void 0&&(n="/"),TI(t,e,n,!1)}function TI(t,e,n,r){let s=typeof e=="string"?Ka(e):e,i=S0(s.pathname||"/",n);if(i==null)return null;let o=xT(t);NI(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let c=$I(i);a=LI(o[l],c,r)}return a}function xT(t,e,n,r){e===void 0&&(e=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(i,o,a)=>{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};l.relativePath.startsWith("/")&&(Je(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not val
49id. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=Ks([r,l.relativePath]),u=n.concat(l);i.children&&i.children.length>0&&(Je(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),xT(i.children,e,u,c)),!(i.path==null&&!i.index)&&e.push({path:c,score:PI(c,i.index),routesMeta:u})};return t.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of wT(i.path))s(i,o,l)}),e}function wT(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let o=wT(r.join("/")),a=[];return a.push(...o.map(l=>l===""?i:[i,l].join("/"))),s&&a.push(...o),a.map(l=>t.startsWith("/")&&l===""?"/":l)}function NI(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:II(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const AI=/^:[\w-]+$/,_I=3,jI=2,OI=1,RI=10,MI=-2,vw=t=>t==="*";function PI(t,e){let n=t.split("/"),r=n.length;return n.some(vw)&&(r+=MI),e&&(r+=jI),n.filter(s=>!vw(s)).reduce((s,i)=>s+(AI.test(i)?_I:i===""?OI:RI),r)}function II(t,e){return t.length===e.length&&t.slice(0,-1).every((r,s)=>r===e[s])?t[t.length-1]-e[e.length-1]:0}function LI(t,e,n){let{routesMeta:r}=t,s={},i="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],c=a===r.length-1,u=i==="/"?e:e.slice(i.length)||"/",h=bw({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},u),p=l.route;if(!h&&c&&n&&!r[r.length-1].route.index&&(h=bw({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},u)),!h)return null;
vendor: 14,024 bytes, lines 49-67
49Object.assign(s,h.params),o.push({params:s,pathname:Ks([i,h.pathname]),pathnameBase:WI(Ks([i,h.pathnameBase])),route:p}),h.pathnameBase!=="/"&&(i=Ks([i,h.pathnameBase]))}return o}function bw(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[n,r]=DI(t.path,t.caseSensitive,t.end),s=e.match(n);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:r.reduce((c,u,h)=>{let{paramName:p,isOptional:f}=u;if(p==="*"){let m=a[h]||"";o=i.slice(0,i.length-m.length).replace(/(.)\/+$/,"$1")}const g=a[h];return f&&!g?c[p]=void 0:c[p]=(g||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:o,pattern:t}}function DI(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),bT(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let r=[],s="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(r.push({paramName:"*"}),s+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":t!==""&&t!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,e?void 0:"i"),r]}function $I(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return bT(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function S0(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}function zI(t,e){e===void 0&&(e="/");let{pathname:n,search:r="",hash:s=""}=typeof t=="string"?Ka(t):t;return{pathname:n?n.startsWith("/")?n:BI(n,e):e,search:HI(r),hash:UI(s)}}function BI(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function gm(t,e,n,r){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function FI(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function C0(t,e){let n=FI(t);return e?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function E0(t,e,n,r){r===void 0&&(r=!1);let s;typeof t=="string"?s=Ka(t):(s=Rc({},t),Je(!s.pathname||!s.pathname.includes("?"),gm("?","pathname","search",s)),Je(!s.pathname||!s.pathname.includes("#"),gm("#","pathname","hash",s)),Je(!s.search||!s.search.includes("#"),gm("#","search","hash",s)));let i=t===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=n;else{let h=e.length-1;if(!r&&o.startsWith("..")){let p=o.split("/");for(;p[0]==="..";)p.shift(),h-=1;s.pathname=p.join("/")}a=h>=0?e[h]:"/"}let l=zI(s,a),c=o&&o!=="/"&&o.endsWith("/"),u=(i||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const Ks=t=>t.join("/").replace(/\/\/+/g,"/"),WI=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),HI=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,UI=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function VI(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const kT=["post","put","patch","delete"];new Set(kT);const qI=["get",...kT];new Set(qI);/** 50 * React Router v6.30.1 51 * 52 * Copyright (c) Remix Software Inc. 53 * 54 * This source code is licensed under the MIT license found in the 55 * LICENSE.md file in the root directory of this source tree. 56 * 57 * @license MIT 58 */function Mc(){return Mc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Mc.apply(this,arguments)}const T0=w.createContext(null),GI=w.createContext(null),hi=w.createContext(null),Yf=w.createContext(null),Er=w.createContext({outlet:null,matches:[],isDataRoute:!1}),ST=w.createContext(null);function KI(t,e){let{relative:n}=e===void 0?{}:e;Ya()||Je(!1);let{basename:r,navigator:s}=w.useContext(hi),{hash:i,pathname:o,search:a}=ET(t,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:Ks([r,o])),s.createHref({pathname:l,search:a,hash:i})}function Ya(){return w.useContext(Yf)!=null}function is(){return Ya()||Je(!1),w.useContext(Yf).location}function CT(t){w.useContext(hi).static||w.useLayoutEffect(t)}function Ja(){let{isDataRoute:t}=w.useContext(Er);return t?cL():YI()}function YI(){Ya()||Je(!1);let t=w.useContext(T0),{basename:e,future:n,navigator:r}=w.useContext(hi),{matches:s}=w.useContext(Er),{pathname:i}=is(),o=JSON.stringify(C0(s,n.v7_relativeSplatPath)),a=w.useRef(!1);return CT(()=>{a.current=!0}),w.useCallback(function(c,u){if(u===void 0&&(u={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let h=E0(c,JSON.parse(o),i,u.relative==="path");t==null&&e!=="/"&&(h.pathname=h.pathname==="/"?e:Ks([e,h.pathname])),(u.replace?r.replace:r.push)(h,u.state,u)},[e,r,o,i,t])}const JI=w.createContext(null);function QI(t){let e=w.useContext(Er).outlet;return e&&w.createElement(JI.Provider,{value:t},e)}function Jf(){let{matches:t}=w.useContext(Er),e=t[t.length-1];return e?e.params:{}}function ET(t,e){let{relative:n}=e===void 0?{}:e,{future:r}=w.useContext(hi),{matches:s}=w.useContext(Er),{pathname:i}=is(),o=JSON.stringify(C0(s,r.v7_relativeSplatPath));return w.useMemo(()=>E0(t,JSON.parse(o),i,n==="path"),[t,o,i,n])}function XI(t,e){return ZI(t,e)}function ZI(t,e,n,r){Ya()||Je(!1);let{navigator:s}=w.useContext(hi),{matches:i}=w.useContext(Er),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=is(),u;if(e){var h;let y=typeof e=="string"?Ka(e):e;l==="/"||(h=y.pathname)!=null&&h.startsWith(l)||Je(!1),u=y}else u=c;let p=u.pathname||"/",f=p;if(l!=="/"){let y=l.replace(/^\//,"").split("/");f="/"+p.replace(/^\//,"").split("/").slice(y.length).join("/")}let g=EI(t,{pathname:f}),m=sL(g&&g.map(y=>Object.assign({},y,{params:Object.assign({},a,y.params),pathname:Ks([l,s.encodeLocation?s.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?l:Ks([l,s.encodeLocation?s.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),i,n,r);return e&&m?w.createElement(Yf.Provider,{value:{location:Mc({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Ds.Pop}},m):m}function eL(){let t=lL(),e=VI(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},e),n?w.createElement("pre",{style:s},n):null,null)}const tL=w.createElement(eL,null);class nL extends w.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error!==void 0?w.createElement(Er.Provider,{value:this.props.routeContext},w.createElement(ST.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function rL(t){let{routeContext:e,match:n,children:r}=t,s=w.useContext(T0);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),w.createElement(Er.Provider,{value:e},r)}function sL(t,e,n,r){var s;if(e===void 0&&(e=[]),n===void 0&&(n=null),r===void 0&&(r=null),t==null){var i;if(!n)return null;if(n.errors)t=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let o=t,a=(s=n)==null?void 0:s.errors;if(a!=null){let u=o.findIndex(h=>h.route.id&&(a==null?void 0:a[h.route.id])!==void 0);u>=0||Je(!1),o=o.slice(0,Math.min(o.length,u+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let u=0;u<o.length;u++){let h=o[u];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(c=u),h.route.id){let{loaderData:p,errors:f}=n,g=h.route.loader&&p[h.route.id]===void 0&&(!f||f[h.route.id]===void 0);if(h.route.lazy||g){l=!0,c>=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((u,h,p)=>{let f,g=!1,m=null,y=null;n&&(f=a&&h.route.id?a[h.route.id]:void 0,m=h.route.errorElement||tL,l&&(c<0&&p===0?(g=!0,y=null):c===p&&(g=!0,y=h.route.hydrateFallbackElement||null)));let v=e.concat(o.slice(0,p+1)),b=()=>{let x;return f?x=m:g?x=y:h.route.Component?x=w.createElement(h.route.Component,null):h.route.element?x=h.route.element:x=u,w.createElement(rL,{match:h,routeContext:{outlet:u,matches:v,isDataRoute:n!=null},children:x})};return n&&(h.route.ErrorBoundary||h.route.errorElement||p===0)?w.createElement(nL,{location:n.location,revalidation:n.revalidation,component:m,error:f,children:b(),routeContext:{outlet:null,matches:v,isDataRoute:!0}}):b()},null)}var TT=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(TT||{}),Sh=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(Sh||{});function iL(t){let e=w.useContext(T0);return e||Je(!1),e}function oL(t){let e=w.useContext(GI);return e||Je(!1),e}function aL(t){let e=w.useContext(Er);return e||Je(!1),e}function NT(t){let e=aL(),n=e.matches[e.matches.length-1];return n.route.id||Je(!1),n.route.id}function lL(){var t;let e=w.useContext(ST),n=oL(Sh.UseRouteError),r=NT(Sh.UseRouteError);return e!==void 0?e:(t=n.errors)==null?void 0:t[r]}function cL(){let{router:t}=iL(TT.UseNavigateStable),e=NT(Sh.UseNavigateStable),n=w.useRef(!1);return CT(()=>{n.current=!0}),w.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?t.navigate(s):t.navigate(s,Mc({fromRouteId:e},i)))},[t,e])}function uL(t,e){t==null||t.v7_startTransition,t==null||t.v7_relativeSplatPath}function AT(t){let{to:e,replace:n,state:r,relative:s}=t;Ya()||Je(!1);let{future:i,static:o}=w.useContext(hi),{matches:a}=w.useContext(Er),{pathname:l}=is(),c=Ja(),u=E0(e,C0(a,i.v7_relativeSplatPath),l,s==="path"),h=JSON.stringify(u);return w.useEffect(()=>c(JSON.parse(h),{replace:n,state:r,relative:s}),[c,h,s,n,r]),null}function dL(t){return QI(t.context)}function Xe(t){Je(!1)}function hL(t){let{basename:e="/",children:n=null,location:r,navigationType:s=Ds.Pop,navigator:i,static:o=!1,future:a}=t;Ya()&&Je(!1);let l=e.replace(/^\/*/,"/"),c=w.useMemo(()=>({basename:l,navigator:i,static:o,future:Mc({v7_relativeSplatPath:!1},a)}),[l,a,i,o]);typeof r=="string"&&(r=Ka(r));let{pathname:u="/",search:h="",hash:p="",state:f=null,key:g="default"}=r,m=w.useMemo(()=>{let y=S0(u,l);return y==null?null:{location:{pathname:y,search:h,hash:p,state:f,key:g},navigationType:s}},[l,u,h,p,f,g,s]);return m==null?null:w.createElement(hi.Provider,{value:c},w.createElement(Yf.Provider,{children:n,value:m}))}function fL(t){let{children:e,location:n}=t;return XI(py(e),n)}new Promise(()=>{});function py(t,e){e===void 0&&(e=[]);let n=[];return w.Children.forEach(t,(r,s)=>{if(!w.isValidElement(r))return;let i=[...e,s];if(r.type===w.Fragment){n.push.apply(n,py(r.props.children,i));return}r.type!==Xe&&Je(!1),!r.props.index||!r.props.children||Je(!1);let o={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=py(r.props.children,i)),n.push(o)}),n}/** 59 * React Router DOM v6.30.1 60 * 61 * Copyright (c) Remix Software Inc. 62 * 63 * This source code is licensed under the MIT license found in the 64 * LICENSE.md file in the root directory of this source tree. 65 * 66 * @license MIT 67 */function my(){return my=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},my.apply(this,arguments)}function pL(t,e){if(t==null)return{};var n={},r=Object.keys(t),s,i;for(i=0;i<r.length;i++)s=r[i],!(e.indexOf(s)>=0)&&(n[s]=t[s]);return n}function mL(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function gL(t,e){return t.button===0&&(!e||e==="_self")&&!mL(t)}const yL=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],vL="6";try{window.__reactRouterVersion=vL}catch{}const bL="startTransition",xw=Av[bL];function xL(t){let{basename:e,children:n,future:r,window:s}=t,i=w.useRef();i.current==null&&(i.current=kI({window:s,v5Compat:!0}));let o=i.current,[a,l]=w.useState({action:o.action,location:o.location}),{v7_startTransition:c}=r||{},u=w.useCallback(h=>{c&&xw?xw(()=>l(h)):l(h)},[l,c]);return w.useLayoutEffect(()=>o.listen(u),[o,u]),w.useEffect(()=>
67uL(r),[r]),w.createElement(hL,{basename:e,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}const wL=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",kL=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ne=w.forwardRef(function(e,n){let{onClick:r,relative:s,reloadDocument:i,replace:o,state:a,target:l,to:c,preventScrollReset:u,viewTransition:h}=e,p=pL(e,yL),{basename:f}=w.useContext(hi),g,m=!1;if(typeof c=="string"&&kL.test(c)&&(g=c,wL))try{let x=new URL(window.location.href),k=c.startsWith("//")?new URL(x.protocol+c):new URL(c),S=S0(k.pathname,f);k.origin===x.origin&&S!=null?c=S+k.search+k.hash:m=!0}catch{}let y=KI(c,{relative:s}),v=SL(c,{replace:o,state:a,target:l,preventScrollReset:u,relative:s,viewTransition:h});function b(x){r&&r(x),x.defaultPrevented||v(x)}return w.createElement("a",my({},p,{href:g||y,onClick:m||i?r:b,ref:n,target:l}))});var ww;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(ww||(ww={}));var kw;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(kw||(kw={}));function SL(t,e){let{target:n,replace:r,state:s,preventScrollReset:i,relative:o,viewTransition:a}=e===void 0?{}:e,l=Ja(),c=is(),u=ET(t,{relative:o});return w.useCallback(h=>{if(gL(h,n)){h.preventDefault();let p=r!==void 0?r:kh(c)===kh(u);l(t,{replace:p,state:s,preventScrollReset:i,relative:o,viewTransition:a})}},[c,l,u,r,s,n,t,i,o,a])}var Sw=["light","dark"],CL="(prefers-color-scheme: dark)",EL=w.createContext(void 0),TL={setTheme:t=>{},themes:[]},NL=()=>{var t;return(t=w.useContext(EL))!=null?t:TL};w.memo(({forcedTheme:t,storageKey:e,attribute:n,enableSystem:r,enableColorScheme:s,defaultTheme:i,value:o,attrs:a,nonce:l})=>{let c=i==="system",u=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${a.map(g=>`'${g}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,h=s?Sw.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",p=(g,m=!1,y=!0)=>{let v=o?o[g]:g,b=m?g+"|| ''":`'${v}'`,x="";return s&&y&&!m&&Sw.includes(g)&&(x+=`d.style.colorScheme = '${g}';`),n==="class"?m||v?x+=`c.add(${b})`:x+="null":v&&(x+=`d[s](n,${b})`),x},f=t?`!function(){${u}${p(t)}}()`:r?`!function(){try{${u}var e=localStorage.getItem('${e}');if('system'===e||(!e&&${c})){var t='${CL}',m=window.matchMedia(t);if(m.media!==t||m.matches){${p("dark")}}else{${p("light")}}}else if(e){${o?`var x=${JSON.stringify(o)};`:""}${p(o?"x[e]":"e",!0)}}${c?"":"else{"+p(i,!1,!1)+"}"}${h}}catch(e){}}()`:`!function(){try{${u}var e=localStorage.getItem('${e}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${p(o?"x[e]":"e",!0)}}else{${p(i,!1,!1)};}${h}}catch(t){}}();`;return w.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:f}})});var AL=t=>{switch(t){case"success":return OL;case"info":return ML;case"warning":return RL;case"error":return PL;default:return null}},_L=Array(12).fill(0),jL=({visible:t,className:e})=>R.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},R.createElement("div",{className:"sonner-spinner"},_L.map((n,r)=>R.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),OL=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},R.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),RL=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},R.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),ML=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},R.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),PL=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},R.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),IL=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},R.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),R.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),LL=()=>{let[t,e]=R.useState(document.hidden);return R.useEffect(()=>{let n=()=>{e(document.hidden)};
67return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),t},gy=1,DL=class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let e=this.subscribers.indexOf(t);this.subscribers.splice(e,1)}),this.publish=t=>{this.subscribers.forEach(e=>e(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var e;let{message:n,...r}=t,s=typeof(t==null?void 0:t.id)=="number"||((e=t.id)==null?void 0:e.length)>0?t.id:gy++,i=this.toasts.find(a=>a.id===s),o=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(a=>a.id===s?(this.publish({...a,...t,id:s,title:n}),{...a,...t,id:s,dismissible:o,title:n}):a):this.addToast({title:n,...r,dismissible:o,id:s}),s},this.dismiss=t=>(this.dismissedToasts.add(t),t||this.toasts.forEach(e=>{this.subscribers.forEach(n=>n({id:e.id,dismiss:!0}))}),this.subscribers.forEach(e=>e({id:t,dismiss:!0})),t),this.message=(t,e)=>this.create({...e,message:t}),this.error=(t,e)=>this.create({...e,message:t,type:"error"}),this.success=(t,e)=>this.create({...e,type:"success",message:t}),this.info=(t,e)=>this.create({...e,type:"info",message:t}),this.warning=(t,e)=>this.create({...e,type:"warning",message:t}),this.loading=(t,e)=>this.create({...e,type:"loading",message:t}),this.promise=(t,e)=>{if(!e)return;let n;e.loading!==void 0&&(n=this.create({...e,promise:t,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));let r=t instanceof Promise?t:t(),s=n!==void 0,i,o=r.then(async l=>{if(i=["resolve",l],R.isValidElement(l))s=!1,this.create({id:n,type:"default",message:l});else if(zL(l)&&!l.ok){s=!1;let c=typeof e.error=="function"?await e.error(`HTTP error! status: ${l.status}`):e.error,u=typeof e.description=="function"?await e.description(`HTTP error! status: ${l.status}`):e.description;this.create({id:n,type:"error",message:c,description:u})}else if(e.success!==void 0){s=!1;let c=typeof e.success=="function"?await e.success(l):e.success,u=typeof e.description=="function"?await e.description(l):e.description;this.create({id:n,type:"success",message:c,description:u})}}).catch(async l=>{if(i=["reject",l],e.error!==void 0){s=!1;let c=typeof e.error=="function"?await e.error(l):e.error,u=typeof e.description=="function"?await e.description(l):e.description;this.create({id:n,type:"error",message:c,description:u})}}).finally(()=>{var l;s&&(this.dismiss(n),n=void 0),(l=e.finally)==null||l.call(e)}),a=()=>new Promise((l,c)=>o.then(()=>i[0]==="reject"?c(i[1]):l(i[1])).catch(c));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})},this.custom=(t,e)=>{let n=(e==null?void 0:e.id)||gy++;return this.create({jsx:t(n),id:n,...e}),n},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Vt=new DL,$L=(t,e)=>{let n=(e==null?void 0:e.id)||gy++;return Vt.addToast({title:t,...e,id:n}),n},zL=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",BL=$L,FL=()=>Vt.toasts,WL=()=>Vt.getActiveToasts(),sn=Object.assign(BL,{success:Vt.success,info:Vt.info,warning:Vt.warning,error:Vt.error,custom:Vt.custom,message:Vt.message,promise:Vt.promise,dismiss:Vt.dismiss,loading:Vt.loading},{getHistory:FL,getToasts:WL});function HL(t,{insertAt:e}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",e==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}HL(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
67left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
67:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);
67--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} 68`);function Uu(t){return t.label!==void 0}var UL=3,VL="32px",qL="16px",Cw=4e3,GL=356,KL=14,YL=20,JL=200;function Dn(...t){return t.filter(Boolean).join(" ")}function QL(t){let[e,n]=t.split("-"),r=[];return e&&r.push(e),n&&r.push(n),r}var XL=t=>{var e,n,r,s,i,o,a,l,c,u,h;let{invert:p,toast:f,unstyled:g,interacting:m,setHeights:y,visibleToasts:v,heights:b,index:x,toasts:k,expanded:S,removeToast:C,defaultRichColors:E,closeButton:T,style:N,cancelButtonStyle:_,actionButtonStyle:z,className:I="",descriptionClassName:H="",duration:M,position:U,gap:V,loadingIcon:Q,expandByDefault:A,classNames:O,icons:B,closeButtonAriaLabel:te="Close toast",pauseWhenPageIsHidden:J}=t,[oe,re]=R.useState(null),[_e,Be]=R.useState(null),[F,xe]=R.useState(!1),[Fe,ye]=R.useState(!1),[he,me]=R.useState(!1),[St,mn]=R.use
68State(!1),[bi,ls]=R.useState(!1),[xi,il]=R.useState(0),[So,Bb]=R.useState(0),ol=R.useRef(f.duration||M||Cw),Fb=R.useRef(null),wi=R.useRef(null),zR=x===0,BR=x+1<=v,gn=f.type,Co=f.dismissible!==!1,FR=f.className||"",WR=f.descriptionClassName||"",Su=R.useMemo(()=>b.findIndex(se=>se.toastId===f.id)||0,[b,f.id]),HR=R.useMemo(()=>{var se;return(se=f.closeButton)!=null?se:T},[f.closeButton,T]),Wb=R.useMemo(()=>f.duration||M||Cw,[f.duration,M]),Lp=R.useRef(0),Eo=R.useRef(0),Hb=R.useRef(0),To=R.useRef(null),[UR,VR]=U.split("-"),Ub=R.useMemo(()=>b.reduce((se,Se,Pe)=>Pe>=Su?se:se+Se.height,0),[b,Su]),Vb=LL(),qR=f.invert||p,Dp=gn==="loading";Eo.current=R.useMemo(()=>Su*V+Ub,[Su,Ub]),R.useEffect(()=>{ol.current=Wb},[Wb]),R.useEffect(()=>{xe(!0)},[]),R.useEffect(()=>{let se=wi.current;if(se){let Se=se.getBoundingClientRect().height;return Bb(Se),y(Pe=>[{toastId:f.id,height:Se,position:f.position},...Pe]),()=>y(Pe=>Pe.filter(Mn=>Mn.toastId!==f.id))}},[y,f.id]),R.useLayoutEffect(()=>{if(!F)return;let se=wi.current,Se=se.style.height;se.style.height="auto";let Pe=se.getBoundingClientRect().height;se.style.height=Se,Bb(Pe),y(Mn=>Mn.find(Pn=>Pn.toastId===f.id)?Mn.map(Pn=>Pn.toastId===f.id?{...Pn,height:Pe}:Pn):[{toastId:f.id,height:Pe,position:f.position},...Mn])},[F,f.title,f.description,y,f.id]);let cs=R.useCallback(()=>{ye(!0),il(Eo.current),y(se=>se.filter(Se=>Se.toastId!==f.id)),setTimeout(()=>{C(f)},JL)},[f,C,y,Eo]);R.useEffect(()=>{if(f.promise&&gn==="loading"||f.duration===1/0||f.type==="loading")return;let se;return S||m||J&&Vb?(()=>{if(Hb.current<Lp.current){let Se=new Date().getTime()-Lp.current;ol.current=ol.current-Se}Hb.current=new Date().getTime()})():ol.current!==1/0&&(Lp.current=new Date().getTime(),se=setTimeout(()=>{var Se;(Se=f.onAutoClose)==null||Se.call(f,f),cs()},ol.current)),()=>clearTimeout(se)},[S,m,f,gn,J,Vb,cs]),R.useEffect(()=>{f.delete&&cs()},[cs,f.delete]);function GR(){var se,Se,Pe;return B!=null&&B.loading?R.createElement("div",{className:Dn(O==null?void 0:O.loader,(se=f==null?void 0:f.classNames)==null?void 0:se.loader,"sonner-loader"),"data-visible":gn==="loading"},B.loading):Q?R.createElement("div",{className:Dn(O==null?void 0:O.loader,(Se=f==null?void 0:f.classNames)==null?void 0:Se.loader,"sonner-loader"),"data-visible":gn==="loading"},Q):R.createElement(jL,{className:Dn(O==null?void 0:O.loader,(Pe=f==null?void 0:f.classNames)==null?void 0:Pe.loader),visible:gn==="loading"})}return R.createElement("li",{tabIndex:0,ref:wi,className:Dn(I,FR,O==null?void 0:O.toast,(e=f==null?void 0:f.classNames)==null?void 0:e.toast,O==null?void 0:O.default,O==null?void 0:O[gn],(n=f==null?void 0:f.classNames)==null?void 0:n[gn]),"data-sonner-toast":"","data-rich-colors":(r=f.richColors)!=null?r:E,"data-styled":!(f.jsx||f.unstyled||g),"data-mounted":F,"data-promise":!!f.promise,"data-swiped":bi,"data-removed":Fe,"data-visible":BR,"data-y-position":UR,"data-x-position":VR,"data-index":x,"data-front":zR,"data-swiping":he,"data-dismissible":Co,"data-type":gn,"data-invert":qR,"data-swipe-out":St,"data-swipe-direction":_e,"data-expanded":!!(S||A&&F),style:{"--index":x,"--toasts-before":x,"--z-index":k.length-x,"--offset":`${Fe?xi:Eo.current}px`,"--initial-height":A?"auto":`${So}px`,...N,...f.style},onDragEnd:()=>{me(!1),re(null),To.current=null},onPointerDown:se=>{Dp||!Co||(Fb.current=new Date,il(Eo.current),se.target.setPointerCapture(se.pointerId),se.target.tagName!=="BUTTON"&&(me(!0),To.current={x:se.clientX,y:se.clientY}))},onPointerUp:()=>{var se,Se,Pe,Mn;if(St||!Co)return;To.current=null;let Pn=Number(((se=wi.current)==null?void 0:se.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),us=Number(((Se=wi.current)==null?void 0:Se.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ki=new Date().getTime()-((Pe=Fb.current)==null?void 0:Pe.getTime()),In=oe==="x"?Pn:us,ds=Math.abs(In)/ki;if(Math.abs(In)>=YL||ds>.11){il(Eo.current),(Mn=f.onDismiss)==null||Mn.call(f,f),Be(oe==="x"?Pn>0?"right":"left":us>0?"down":"up"),cs(),mn(!0),ls(!1);return}me(!1),re(null)},onPointerMove:se=>{var Se,Pe,Mn,Pn;if(!To.current||!Co||((Se=window.getSelection())==null?void 0:Se.toString().length)>0)return;let us=se.clientY-To.current.y,ki=se.clientX-To.current.x,In=(Pe=t.swipeDirections)!=null?Pe:QL(U);!oe&&(Math.abs(ki)>1||Math.abs(us)>1)&&re(Math.abs(ki)>Math.abs(us)?"x":"y");let ds={x:0,y:0};oe==="y"?(In.includes("top")||In.includes("bottom"))&&(In.includes("top")&&us<0||In.includes("bottom")&&us>0)&&(ds.y=us):oe==="x"&&(In.includes("left")||In.includes("right"))&&(In.includes("left")&&ki<0||In.includes("right")&&ki>0)&&(ds.x=ki),(Math.abs(ds.x)>0||Math.abs(ds.y)>0)&&ls(!0),(Mn=wi.current)==null||Mn.style.setProperty("--swipe-amount-x",`${ds.x}px`),(Pn=wi.current)==null||Pn.style.setProperty("--swipe-amount-y",`${ds.y}px`)}},HR&&!f.jsx?R.createElement("button",{"aria-label":te,"data-disabled":Dp,"data-close-button":!0,onClick:Dp||!Co?()=>{}:()=>{var se;cs(),(se=f.onDismiss)==null||se.call(f,f)},className:Dn(O==null?void 0:O.closeButton,(s=f==null?void 0:f.classNames)==null?void 0:s.closeButton)},(i=B==null?void 0:B.close)!=null?i:IL):null,f.jsx||w.isValidElement(f.title)?f.jsx?f.jsx:typeof f.title=="function"?f.title():f.title:R.createElement(R.Fragment,null,gn||f.icon||f.promise?R.createElement("div",{"data-icon":"",className:Dn(O==null?void 0:O.icon,(o=f==null?void 0:f.classNames)==null?void 0:o.icon)},f.promise||f.type==="loading"&&!f.icon?f.icon||GR():null,f.type!=="loading"?f.icon||(B==null?void 0:B[gn])||AL(gn):null):null,R.createElement("div",{"data-content":"",className:Dn(O==null?void 0:O.content,(a=f==null?void 0:f.classNames)==null?void 0:a.content)},R.createElement("div",{"data-title":"",className:Dn(O==null?void 0:O.title,(l=f==null?void 0:f.classNames)==null?void 0:l.title)},typeof f.title=="function"?f.title():f.title),f.description?R.createElement("div",{"data-description":"",className:Dn(H,WR,O==null?void 0:O.de
vendor: 4,366 bytes, line 68
68scription,(c=f==null?void 0:f.classNames)==null?void 0:c.description)},typeof f.description=="function"?f.description():f.description):null),w.isValidElement(f.cancel)?f.cancel:f.cancel&&Uu(f.cancel)?R.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||_,onClick:se=>{var Se,Pe;Uu(f.cancel)&&Co&&((Pe=(Se=f.cancel).onClick)==null||Pe.call(Se,se),cs())},className:Dn(O==null?void 0:O.cancelButton,(u=f==null?void 0:f.classNames)==null?void 0:u.cancelButton)},f.cancel.label):null,w.isValidElement(f.action)?f.action:f.action&&Uu(f.action)?R.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||z,onClick:se=>{var Se,Pe;Uu(f.action)&&((Pe=(Se=f.action).onClick)==null||Pe.call(Se,se),!se.defaultPrevented&&cs())},className:Dn(O==null?void 0:O.actionButton,(h=f==null?void 0:f.classNames)==null?void 0:h.actionButton)},f.action.label):null))};function Ew(){if(typeof window>"u"||typeof document>"u")return"ltr";let t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function ZL(t,e){let n={};return[t,e].forEach((r,s)=>{let i=s===1,o=i?"--mobile-offset":"--offset",a=i?qL:VL;function l(c){["top","right","bottom","left"].forEach(u=>{n[`${o}-${u}`]=typeof c=="number"?`${c}px`:c})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(c=>{r[c]===void 0?n[`${o}-${c}`]=a:n[`${o}-${c}`]=typeof r[c]=="number"?`${r[c]}px`:r[c]}):l(a)}),n}var eD=w.forwardRef(function(t,e){let{invert:n,position:r="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:o,className:a,offset:l,mobileOffset:c,theme:u="light",richColors:h,duration:p,style:f,visibleToasts:g=UL,toastOptions:m,dir:y=Ew(),gap:v=KL,loadingIcon:b,icons:x,containerAriaLabel:k="Notifications",pauseWhenPageIsHidden:S}=t,[C,E]=R.useState([]),T=R.useMemo(()=>Array.from(new Set([r].concat(C.filter(J=>J.position).map(J=>J.position)))),[C,r]),[N,_]=R.useState([]),[z,I]=R.useState(!1),[H,M]=R.useState(!1),[U,V]=R.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),Q=R.useRef(null),A=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),O=R.useRef(null),B=R.useRef(!1),te=R.useCallback(J=>{E(oe=>{var re;return(re=oe.find(_e=>_e.id===J.id))!=null&&re.delete||Vt.dismiss(J.id),oe.filter(({id:_e})=>_e!==J.id)})},[]);return R.useEffect(()=>Vt.subscribe(J=>{if(J.dismiss){E(oe=>oe.map(re=>re.id===J.id?{...re,delete:!0}:re));return}setTimeout(()=>{b0.flushSync(()=>{E(oe=>{let re=oe.findIndex(_e=>_e.id===J.id);return re!==-1?[...oe.slice(0,re),{...oe[re],...J},...oe.slice(re+1)]:[J,...oe]})})})}),[]),R.useEffect(()=>{if(u!=="system"){V(u);return}if(u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?V("dark"):V("light")),typeof window>"u")return;let J=window.matchMedia("(prefers-color-scheme: dark)");try{J.addEventListener("change",({matches:oe})=>{V(oe?"dark":"light")})}catch{J.addListener(({matches:re})=>{try{V(re?"dark":"light")}catch(_e){console.error(_e)}})}},[u]),R.useEffect(()=>{C.length<=1&&I(!1)},[C]),R.useEffect(()=>{let J=oe=>{var re,_e;s.every(Be=>oe[Be]||oe.code===Be)&&(I(!0),(re=Q.current)==null||re.focus()),oe.code==="Escape"&&(document.activeElement===Q.current||(_e=Q.current)!=null&&_e.contains(document.activeElement))&&I(!1)};return document.addEventListener("keydown",J),()=>document.removeEventListener("keydown",J)},[s]),R.useEffect(()=>{if(Q.current)return()=>{O.current&&(O.current.focus({preventScroll:!0}),O.current=null,B.current=!1)}},[Q.current]),R.createElement("section",{ref:e,"aria-label":`${k} ${A}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},T.map((J,oe)=>{var re;let[_e,Be]=J.split("-");return C.length?R.createElement("ol",{key:J,dir:y==="auto"?Ew():y,tabIndex:-1,ref:Q,className:a,"data-sonner-toaster":!0,"data-theme":U,"data-y-position":_e,"data-lifted":z&&C.length>1&&!i,"data-x-position":Be,style:{"--front-toast-height":`${((re=N[0])==null?void 0:re.height)||0}px`,"--width":`${GL}px`,"--gap":`${v}px`,...f,...ZL(l,c)},onBlur:F=>{B.current&&!F.currentTarget.contains(F.relatedTarget)&&(B.current=!1,O.current&&(O.current.focus({preventScroll:!0}),O.current=null))}
68,onFocus:F=>{F.target instanceof HTMLElement&&F.target.dataset.dismissible==="false"||B.current||(B.current=!0,O.current=F.relatedTarget)},onMouseEnter:()=>I(!0),onMouseMove:()=>I(!0),onMouseLeave:()=>{H||I(!1)},onDragEnd:()=>I(!1),onPointerDown:F=>{F.target instanceof HTMLElement&&F.target.dataset.dismissible==="false"||M(!0)},onPointerUp:()=>M(!1)},C.filter(F=>!F.position&&oe===0||F.position===J).map((F,xe)=>{var Fe,ye;return R.createElement(XL,{key:F.id,icons:x,index:xe,toast:F,defaultRichColors:h,duration:(Fe=m==null?void 0:m.duration)!=null?Fe:p,className:m==null?void 0:m.className,descriptionClassName:m==null?void 0:m.descriptionClassName,invert:n,visibleToasts:g,closeButton:(ye=m==null?void 0:m.closeButton)!=null?ye:o,interacting:H,position:J,style:m==null?void 0:m.style,unstyled:m==null?void 0:m.unstyled,classNames:m==null?void 0:m.classNames,cancelButtonStyle:m==null?void 0:m.cancelButtonStyle,actionButtonStyle:m==null?void 0:m.actionButtonStyle,removeToast:te,toasts:C.filter(he=>he.position==F.position),heights:N.filter(he=>he.position==F.position),setHeights:_,expandByDefault:i,gap:v,loadingIcon:b,expanded:z,pauseWhenPageIsHidden:S,swipeDirections:t.swipeDirections})})):null}))});const tD=({...t})=>{const{theme:e="system"}=NL();return d.jsx(eD,{theme:e,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...t})},nD=1,rD=1e6;let ym=0;function sD(){return ym=(ym+1)%Number.MAX_SAFE_INTEGER,ym.toString()}const vm=new Map,Tw=t=>{if(vm.has(t))return;const e=setTimeout(()=>{vm.delete(t),Jl({type:"REMOVE_TOAST",toastId:t})},rD);vm.set(t,e)},iD=(t,e)=>{switch(e.type){case"ADD_TOAST":return{...t,toasts:[e.toast,...t.toasts].slice(0,nD)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(n=>n.id===e.toast.id?{...n,...e.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=e;return n?Tw(n):t.toasts.forEach(r=>{Tw(r.id)}),{...t,toasts:t.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(n=>n.id!==e.toastId)}}},Dd=[];let $d={toasts:[]};function Jl(t){$d=iD($d,t),Dd.forEach(e=>{e($d)})}function oD({...t}){const e=sD(),n=s=>Jl({type:"UPDATE_TOAST",toast:{...s,id:e}}),r=()=>Jl({type:"DISMISS_TOAST",toastId:e});return Jl({type:"ADD_TOAST",toast:{...t,id:e,open:!0,onOpenChange:s=>{s||r()}}}),{id:e,dismiss:r,update:n}}function aD(){const[t,e]=w.useState($d);return w.useEffect(()=>(Dd.push(e),()=>{const n=Dd.indexOf(e);n>-1&&Dd.splice(n,1)}),[t]),{...t,toast:oD,dismiss:n=>Jl({type:"DISMISS_TOAST",toastId:n})}}function ue(t,e,{checkForDefaultPrevented:n=!0}={}){return function(s){if(t==null||t(s),n===!1||!s.defaultPrevented)return e==null?void 0:e(s)}}function Nw(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function _T(...t){return e=>{let n=!1;const r=t.map(s=>{const i=Nw(s,e);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s<r.length;s++){const i=r[s];typeof i=="function"?i():Nw(t[s],null)}}}}function Ge(...t){return w.useCallback(_T(...t),t)}function hu(t,e=[]){let n=[];function r(i,o){const a=w.createContext(o),l=n.length;n=[...n,o];const c=h=>{var v;const{scope:p,children:f,...g}=h,m=((v=p==null?void 0:p[t])==null?void 0:v[l])||a,y=w.useMemo(()=>g,Object.values(g));return d.jsx(m.Provider,{value:y,children:f})};c.displayName=i+"Provider";function u(h,p){var m;const f=((m=p==null?void 0:p[t])==null?void 0:m[l])||a,g=w.useContext(f);if(g)return g;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${i}\``)}return[c,u]}const s=()=>{const i=n.map(o=>w.createContext(o));return function(a){const l=(a==null?void 0:a[t])||i;return w.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return s.scopeName=t,[r,lD(s,...e)]}function lD(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=r.reduce((a,{useScope:l,scopeName:c}
vendor: 9,289 bytes, line 68
68)=>{const h=l(i)[`__scope${c}`];return{...a,...h}},{});return w.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return n.scopeName=e.scopeName,n}function Pc(t){const e=uD(t),n=w.forwardRef((r,s)=>{const{children:i,...o}=r,a=w.Children.toArray(i),l=a.find(hD);if(l){const c=l.props.children,u=a.map(h=>h===l?w.Children.count(c)>1?w.Children.only(null):w.isValidElement(c)?c.props.children:null:h);return d.jsx(e,{...o,ref:s,children:w.isValidElement(c)?w.cloneElement(c,void 0,u):null})}return d.jsx(e,{...o,ref:s,children:i})});return n.displayName=`${t}.Slot`,n}var cD=Pc("Slot");function uD(t){const e=w.forwardRef((n,r)=>{const{children:s,...i}=n;if(w.isValidElement(s)){const o=pD(s),a=fD(i,s.props);return s.type!==w.Fragment&&(a.ref=r?_T(r,o):o),w.cloneElement(s,a)}return w.Children.count(s)>1?w.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var jT=Symbol("radix.slottable");function dD(t){const e=({children:n})=>d.jsx(d.Fragment,{children:n});return e.displayName=`${t}.Slottable`,e.__radixId=jT,e}function hD(t){return w.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===jT}function fD(t,e){const n={...e};for(const r in e){const s=t[r],i=e[r];/^on[A-Z]/.test(r)?s&&i?n[r]=(...a)=>{const l=i(...a);return s(...a),l}:s&&(n[r]=s):r==="style"?n[r]={...s,...i}:r==="className"&&(n[r]=[s,i].filter(Boolean).join(" "))}return{...t,...n}}function pD(t){var r,s;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function OT(t){const e=t+"CollectionProvider",[n,r]=hu(e),[s,i]=n(e,{collectionRef:{current:null},itemMap:new Map}),o=m=>{const{scope:y,children:v}=m,b=R.useRef(null),x=R.useRef(new Map).current;return d.jsx(s,{scope:y,itemMap:x,collectionRef:b,children:v})};o.displayName=e;const a=t+"CollectionSlot",l=Pc(a),c=R.forwardRef((m,y)=>{const{scope:v,children:b}=m,x=i(a,v),k=Ge(y,x.collectionRef);return d.jsx(l,{ref:k,children:b})});c.displayName=a;const u=t+"CollectionItemSlot",h="data-radix-collection-item",p=Pc(u),f=R.forwardRef((m,y)=>{const{scope:v,children:b,...x}=m,k=R.useRef(null),S=Ge(y,k),C=i(u,v);return R.useEffect(()=>(C.itemMap.set(k,{ref:k,...x}),()=>void C.itemMap.delete(k))),d.jsx(p,{[h]:"",ref:S,children:b})});f.displayName=u;function g(m){const y=i(t+"CollectionConsumer",m);return R.useCallback(()=>{const b=y.collectionRef.current;if(!b)return[];const x=Array.from(b.querySelectorAll(`[${h}]`));return Array.from(y.itemMap.values()).sort((C,E)=>x.indexOf(C.ref.current)-x.indexOf(E.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:o,Slot:c,ItemSlot:f},g,r]}var mD=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],be=mD.reduce((t,e)=>{const n=Pc(`Primitive.${e}`),r=w.forwardRef((s,i)=>{const{asChild:o,...a}=s,l=o?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(l,{...a,ref:i})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function RT(t,e){t&&bo.flushSync(()=>t.dispatchEvent(e))}function nr(t){const e=w.useRef(t);return w.useEffect(()=>{e.current=t}),w.useMemo(()=>(...n)=>{var r;return(r=e.current)==null?void 0:r.call(e,...n)},[])}function gD(t,e=globalThis==null?void 0:globalThis.document){const n=nr(t);w.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return e.addEventListener("keydown",r,{capture:!0}),()=>e.removeEventListener("keydown",r,{capture:!0})},[n,e])}var yD="DismissableLayer",yy="dismissableLayer.update",vD="dismissableLayer.pointerDownOutside",bD="dismissableLayer.focusOutside",Aw,MT=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Qf=w.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:a,...l}=t,c=w.useContext(MT),[u,h]=w.useState(null),p=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=w.useState({}),g=Ge(e,E=>h(E)),m=Array.from(c.layers),[y]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=m.indexOf(y),b=u?m.indexOf(u):-1,x=c.layersWithOutsidePointerEventsDisabled.size>0,k=b>=v,S=wD(E=>{const T=E.target,N=[...c.branches].some(_=>_.contains(T));!k||N||(s==null||s(E),o==null||o(E),E.defaultPrevented||a==null||a())},p),C=kD(E=>{const T=E.target;[...c.branches].some(_=>_.contains(T))||(i==null||i(E),o==null||o(E),E.defaultPrevented||a==null||a())},p);return gD(E=>{b===c.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},p),w.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Aw=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),_w(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Aw)}},[u,p,n,c]),w.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),_w())},[u,c]),w.useEffect(()=>{const E=()=>f({});return document.addEventListener(yy,E),()=>document.removeEventListener(yy,E)},[]),d.jsx(be.div,{...l,ref:g,style:{pointerEvents:x?k?"auto":"none":void 0,...t.style},onFocusCapture:ue(t.onFocusCapture,C.onFocusCapture),onBlurCapture:ue(t.onBlurCapture,C.onBlurCapture),onPointerDownCapture:ue(t.onPointerDownCapture,S.onPointerDownCapture)})});Qf.displayName=yD;var xD="DismissableLayerBranch",PT=w.forwardRef((t,e)=>{const n=w.useContext(MT),r=w.useRef(null),s=Ge(e,r);return w.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),d.jsx(be.div,{...t,ref:s})});PT.displayName=xD;function wD(t,e=globalThis==null?void 0:globalThis.document){const n=nr(t),r=w.useRef(!1),s=w.useRef(()=>{});return w.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let l=function(){IT(vD,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=l,e.addEventListener("click",s.current,{once:!0})):l()}else e.removeEventListener("click",s.current);r.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",i),e.removeEventListener("click",s.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function kD(t,e=globalThis==null?void 0:globalThis.document){const n=nr(t),r=w.useRef(!1);return w.useEffect(()=>{const s=i=>{i.target&&!r.current&&IT(bD,n,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function _w(){const t=new CustomEvent(yy);document.dispatchEvent(t)}function IT(t,e,n,{discrete:r}){const s=n.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&s.addEventListener(t,e,{once:!0}),r?RT(s,i):s.dispatchEvent(i)}var SD=Qf,CD=PT,kt=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{},ED="Portal",N0=w.forwardRef((t,e)=>{var a;const{container:n,...r}=t,[s,i]=w.useState(!1);kt(()=>i(!0),[]);const o=n||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?b0.createPortal(d.jsx(be.div,{...r,ref:e}),o):null});N0.displayName=ED;function TD(t,e){return w.useReducer((n,r)=>e[n][r]??n,t)}var A0=t=>{const{present:e,children:n}=t,r=ND(e),s=typeof n=="function"?n({present:r.isPresent}):w.Children.only(n),i=Ge(r.ref,AD(s));return typeof n=="function"||r.isPresent?w.cloneElement(s,{ref:i}):null};A0.displayName="Presence";function ND(t){const[e,n]=w.useState(),r=w.useRef(null),s=w.useRef(t),i=w.useRef("none"),o=t?"mounted":"unmounted",[a,l]=TD(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const c=Vu(r.current);i.current=a==="mounted"?c:"none"},[a]),kt(()=>{const c=r.current,u=s.current;if(u!==t){const p=i.current,f=Vu(c);t?l("MOUNT"):f==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&p!==f?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,l]),kt(()=>{if(e){let c;const u=e.ownerDocument.defaultView??window,h=f=>{const m=Vu(r.current).includes(f.animationName);if(f.target===e&&m&&(l("ANIMATION_END"),!s.current)){const y=e.style.animationFillMode;e.style.animationFillMode="forwards",c=u.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=y)})}},p=f=>{f.target===e&&(i.current=Vu(r.current))};return e.addEventListener("animationstart",p),e.addEventListener("animationcancel",h),e.addEventListener("animationend",h),()=>{u.clearTimeout(c),e.removeEventListener("animationstart",p),e.removeEventListener("animationcancel",h),e.removeEventListener("animationend",h)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:w.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function Vu(t){return(t==null?void 0:t.animationName)||"none"}function AD(t){var r,s;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.
68isReactWarning;return n?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var _D=Av[" useInsertionEffect ".trim().toString()]||kt;function Ch({prop:t,defaultProp:e,onChange:n=()=>{},caller:r}){const[s,i,o]=jD({defaultProp:e,onChange:n}),a=t!==void 0,l=a?t:s;{const u=w.useRef(t!==void 0);w.useEffect(()=>{const h=u.current;h!==a&&console.warn(`${r} is changing from ${h?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=a},[a,r])}const c=w.useCallback(u=>{var h;if(a){const p=OD(u)?u(t):u;p!==t&&((h=o.current)==null||h.call(o,p))}else i(u)},[a,t,i,o]);return[l,c]}function jD({defaultProp:t,onChange:e}){const[n,r]=w.useState(t),s=w.useRef(n),i=w.useRef(e);return _D(()=>{i.current=e},[e]),w.useEffect(()=>{var o;s.current!==n&&((o=i.current)==null||o.call(i,n),s.current=n)},[n,s]),[n,r,i]}function OD(t){return typeof t=="function"}var LT=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),RD="VisuallyHidden",Xf=w.forwardRef((t,e)=>d.jsx(be.span,{...t,ref:e,style:{...LT,...t.style}}));Xf.displayName=RD;var MD=Xf,_0="ToastProvider",[j0,PD,ID]=OT("Toast"),[DT,qJ]=hu("Toast",[ID]),[LD,Zf]=DT(_0),$T=t=>{const{__scopeToast:e,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=t,[a,l]=w.useState(null),[c,u]=w.useState(0),h=w.useRef(!1),p=w.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${_0}\`. Expected non-empty \`string\`.`),d.jsx(j0.Provider,{scope:e,children:d.jsx(LD,{scope:e,label:n,duration:r,swipeDirection:s,swipeThreshold:i,toastCount:c,viewport:a,onViewportChange:l,onToastAdd:w.useCallback(()=>u(f=>f+1),[]),onToastRemove:w.useCallback(()=>u(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:h,isClosePausedRef:p,children:o})})};$T.displayName=_0;var zT="ToastViewport",DD=["F8"],vy="toast.viewportPause",by="toast.viewportResume",BT=w.forwardRef((t,e)=>{const{__scopeToast:n,hotkey:r=DD,label:s="Notifications ({hotkey})",...i}=t,o=Zf(zT,n),a=PD(n),l=w.useRef(null),c=w.useRef(null),u=w.useRef(null),h=w.useRef(null),p=Ge(e,h,o.onViewportChange),f=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),g=o.toastCount>0;w.useEffect(()=>{const y=v=>{var x;r.length!==0&&r.every(k=>v[k]||v.code===k)&&((x=h.current)==null||x.focus())};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[r]),w.useEffect(()=>{const y=l.current,v=h.current;if(g&&y&&v){const b=()=>{if(!o.isClosePausedRef.current){const C=new CustomEvent(vy);v.dispatchEvent(C),o.isClosePausedRef.current=!0}},x=()=>{if(o.isClosePausedRef.current){const C=new CustomEvent(by);v.dispatchEvent(C),o.isClosePausedRef.current=!1}},k=C=>{!y.contains(C.relatedTarget)&&x()},S=()=>{y.contains(document.activeElement)||x()};return y.addEventListener("focusin",b),y.addEventListener("focusout",k),y.addEventListener("pointermove",b),y.addEventListener("pointerleave",S),window.addEventListener("blur",b),window.addEventListener("focus",x),()=>{y.removeEventListener("focusin",b),y.removeEventListener("focusout",k),y.removeEventListener("pointermove",b),y.removeEventListener("pointerleave",S),window.removeEventListener("blur",b),window.removeEventListener("focus",x)}}},[g,o.isClosePausedRef]);const m=w.useCallback(({tabbingDirection:y})=>{const b=a().map(x=>{const k=x.ref.current,S=[k,...JD(k)];return y==="forwards"?S:S.reverse()});return(y==="forwards"?b.reverse():b).flat()},[a]);return w.useEffect(()=>{const y=h.current;if(y){const v=b=>{var S,C,E;const x=b.altKey||b.ctrlKey||b.metaKey;if(b.key==="Tab"&&!x){const T=document.activeElement,N=b.shiftKey;if(b.target===y&&N){(S=c.current)==null||S.focus();return}const I=m({tabbingDirection:N?"backwards":"forwards"}),H=I.findIndex(M=>M===T);bm(I.slice(H+1))?b.preventDefault():N?(C=c.current)==null||C.focus():(E=u.current)==null||E.focus()}};return y.addEventListener("keydown",v),()=>y.removeEventListener("keydown",v)}},[a,m]),d.jsxs(CD,{ref:l,role:"region","aria-label":s.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:g?void 0:"none"},children:[g&&d.jsx(xy,{ref:c,onFocusFromOutsideViewport:()=>{const y=m({tabbingDirection:"forwards"});bm(y)}}),d.jsx(j0.Slot,{scope:n,children:d.jsx(be.ol,{tabIndex:-1,...i,ref:p})}),g&&d.jsx(xy,{ref:u,onFocusFromOutsideViewport:()=>{const y=m({tabbingDirection:"backwards"});bm(y)}})]})});BT.displayName=zT;var FT="ToastFocusProxy",xy=w.forwardRef((t,e)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=t,i=Zf(FT,n);return d.jsx(Xf,{"aria-hidden":!0,tabIndex:0,...s,ref:e,style:{position:"fixed"},onFocus:o=>{var c;const a=o.relatedTarget;!((c=i.viewport)!=null&&c.contains(a))&&r()}})});xy.displayName=FT;var fu="Toast",$D="toast.swipeStart",zD="toast.swipeMove",BD="toast.swipeCancel",FD="toast.swipeEnd",WT=w.forwardRef((t,e)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:i,...o}=t,[a,l]=Ch({prop:r,defaultProp:s??!0,onChange:i,caller:fu});return d.jsx(A0,{present:n||a,children:d.jsx(UD,{open:a,...o,ref:e,onClose:()=>l(!1),onPause:nr(t.onPause),onResume:nr(t.onResume),onSwipeStart:ue(t.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ue(t.onSwipeMove,c=>{const{x:u,y:h}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${h}px`)}),onSwipeCancel:ue(t.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ue(t.onSwipeEnd,c=>{const{x:u,y:h}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${h}px`),l(!1)})})})});WT.displayName=fu;var[WD,HD]=DT(fu,{onClose(){}}),UD=w.forwardRef((t,e)=>{const{__scopeToast:n,type:r="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:h,onSwipeCancel:p,onSwipeEnd:f,...g}=t,m=Zf(fu,n),[y,v]=w.useState(null),b=Ge(e,M=>v(M)),x=w.useRef(null),k=w.useRef(null),S=s||m.duration,C=w.useRef(0),E=w.useRef(S),T=w.useRef(0),{onToastAdd:N,onToastRemove:_}=m,z=nr(()=>{var U;(y==null?void 0:y.contains(document.activeElement))&&((U=m.viewport)==null||U.focus()),o()}),I=w.useCallback(M=>
68{!M||M===1/0||(window.clearTimeout(T.current),C.current=new Date().getTime(),T.current=window.setTimeout(z,M))},[z]);w.useEffect(()=>{const M=m.viewport;if(M){const U=()=>{I(E.current),c==null||c()},V=()=>{const Q=new Date().getTime()-C.current;E.current=E.current-Q,window.clearTimeout(T.current),l==null||l()};return M.addEventListener(vy,V),M.addEventListener(by,U),()=>{M.removeEventListener(vy,V),M.removeEventListener(by,U)}}},[m.viewport,S,l,c,I]),w.useEffect(()=>{i&&!m.isClosePausedRef.current&&I(S)},[i,S,m.isClosePausedRef,I]),w.useEffect(()=>(N(),()=>_()),[N,_]);const H=w.useMemo(()=>y?YT(y):null,[y]);return m.viewport?d.jsxs(d.Fragment,{children:[H&&d.jsx(VD,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:H}),d.jsx(WD,{scope:n,onClose:z,children:bo.createPortal(d.jsx(j0.ItemSlot,{scope:n,children:d.jsx(SD,{asChild:!0,onEscapeKeyDown:ue(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||z(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:d.jsx(be.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":m.swipeDirection,...g,ref:b,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:ue(t.onKeyDown,M=>{M.key==="Escape"&&(a==null||a(M.nativeEvent),M.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,z()))}),onPointerDown:ue(t.onPointerDown,M=>{M.button===0&&(x.current={x:M.clientX,y:M.clientY})}),onPointerMove:ue(t.onPointerMove,M=>{if(!x.current)return;const U=M.clientX-x.current.x,V=M.clientY-x.current.y,Q=!!k.current,A=["left","right"].includes(m.swipeDirection),O=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,B=A?O(0,U):0,te=A?0:O(0,V),J=M.pointerType==="touch"?10:2,oe={x:B,y:te},re={originalEvent:M,delta:oe};Q?(k.current=oe,qu(zD,h,re,{discrete:!1})):jw(oe,m.swipeDirection,J)?(k.current=oe,qu($D,u,re,{discrete:!1}),M.target.setPointerCapture(M.pointerId)):(Math.abs(U)>J||Math.abs(V)>J)&&(x.current=null)}),onPointerUp:ue(t.onPointerUp,M=>{const U=k.current,V=M.target;if(V.hasPointerCapture(M.pointerId)&&V.releasePointerCapture(M.pointerId),k.current=null,x.current=null,U){const Q=M.currentTarget,A={originalEvent:M,delta:U};jw(U,m.swipeDirection,m.swipeThreshold)?qu(FD,f,A,{discrete:!0}):qu(BD,p,A,{discrete:!0}),Q.addEventListener("click",O=>O.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),VD=t=>{const{__scopeToast:e,children:n,...r}=t,s=Zf(fu,e),[i,o]=w.useState(!1),[a,l]=w.useState(!1);return KD(()=>o(!0)),w.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:d.jsx(N0,{asChild:!0,children:d.jsx(Xf,{...r,children:i&&d.jsxs(d.Fragment,{children:[s.label," ",n]})})})},qD="ToastTitle",HT=w.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return d.jsx(be.div,{...r,ref:e})});HT.displayName=qD;var GD="ToastDescription",UT=w.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return d.jsx(be.div,{...r,ref:e})});UT.displayName=GD;var VT="ToastAction",qT=w.forwardRef((t,e)=>{const{altText:n,...r}=t;return n.trim()?d.jsx(KT,{altText:n,asChild:!0,children:d.jsx(O0,{...r,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${VT}\`. Expected non-empty \`string\`.`),null)});qT.displayName=VT;var GT="ToastClose",O0=w.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t,s=HD(GT,n);return d.jsx(KT,{asChild:!0,children:d.jsx(be.button,{type:"button",...r,ref:e,onClick:ue(t.onClick,s.onClose)})})});O0.displayName=GT;var KT=w.forwardRef((t,e)=>{const{__scopeToast:n,altText:r,...s}=t;return d.jsx(be.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:e})});function YT(t){const e=[];return Array.from(t.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&e.push(r.textContent),YD(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=r.dataset.radixToastAnnounceAlt;o&&e.push(o)}else e.push(...YT(r))}}),e}function qu(t,e,n,{discrete:r}){const s=n.originalEvent.currentTarget,i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});e&&s.addEventListener(t,e,{once:!0}),r?RT(s,i):s.dispatchEvent(i)}var jw=(t,e,n=0)=>{const r=Math.abs(t.x),s=Math.abs(t.y),i=r>s;return e==="left"||e==="right"?i&&r>n:!i&&s>n};function KD(t=()=>{}){const e=nr(t);kt(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[e])}function YD(t){return t.nodeType===t.ELEMENT_NODE}function JD(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function bm(t){const e=document.activeElement;return t.some(n=>n===e?!0:(n.focus(),document.activeElement!==e))}var QD=$T,JT=BT,QT=WT,XT=HT,ZT=UT,eN=qT,tN=O0;function nN(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(n=nN(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function rN(){for(var t,e,n=0,r="",s=arguments.length;n<s;n++)(t=arguments[n])&&(e=nN(t))&&(r&&(r+=" "),r+=e);return r}const Ow=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Rw=rN,ep=(t,e)=>n=>{var r;if((e==null?void 0:e.variants)==null)return Rw(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:i}=e,o=Object.keys(s).map(c=>{const u=n==null?void 0:n[c],h=i==null?void 0:i[c];if(u===null)return null;const p=Ow(u)||Ow(h);return s[c][p]}),a=n&&Object.entries(n).reduce((c,u)=>{let[h,p]=u;return p===void 0||(c[h]=p),c},{}),l=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:h,className:p,...f}=u;return Object.entries(f).every(g=>{let[m,y]=g;return Array.isArray(y)?y.includes({...i,...a}[m]):{...i,...a}[m]===y})?[...c,h,p]:c},[]);return Rw(t,o,l,n==null?void 0:n.class,n==null?void 0:n.className)};/** 69 * @license lucide-react v0.462.0 - ISC 70 * 71 * This source code is licensed under the ISC license. 72 * See the LICENSE file in the root directory of this source tree. 73 */const XD=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),sN=(...t)=>t.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===n).join(" ").trim();/** 74 * @license lucide-react v0.462.0 - ISC 75 * 76 * This source code is licensed under the ISC license. 77 * See the LICENSE file in the root directory of this source tree. 78 */var ZD={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** 79 * @license lucide-react v0.462.0 - ISC 80 * 81 * This source code is licensed under the ISC license. 82 * See the LICENSE file in the root directory of this source tree. 83 */const e3=w.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:i,iconNode:o,...a},l)=>w.createElement("svg",{ref:l,...ZD,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:sN("lucide",s),...a},[...o.map(([c,u])=>w.createElement(c,u)),...Array.isArray(i)?i:[i]]));/** 84 * @license lucide-react v0.462.0 - ISC 85 * 86 * This source code is licensed under the ISC license. 87 * See the LICENSE file in the root directory of this source tree. 88 */const G=(t,e)=>{const n=w.forwardRef(({className:r,...s},i)=>w.createElement(e3,{ref:i,iconNode:e,className:sN(`lucide-${XD(t)}`,r),...s}));return n.displayName=`${t}`,n};/** 89 * @license lucide-react v0.462.0 - ISC 90 * 91 * This source code is licensed under the ISC license. 92 * See the LICENSE file in the root directory of this source tree. 93 */const iN=G("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** 94 * @license lucide-react v0.462.0 - ISC 95 * 96 * This source code is licensed under the ISC license. 97 * See the LICENSE file in the root directory of this source tree. 98 */const t3=G("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** 99 * @license lucide-react v0.462.0 - ISC 100 * 101 * This source code is licensed under the ISC license. 102 * See the LICENSE file in the root directory of this source tree. 103 */const pe=G("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/** 104 * @license lucide-react v0.462.0 - ISC 105 * 106 * This source code is licensed under the ISC license. 107 * See the LICENSE file in the root directory of this source tree. 108 */const n3=G("Bold",[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]]);/** 109 * @license lucide-react v0.462.0 - ISC 110 * 111 * This source code is licensed under the ISC license. 112 * See the LICENSE file in the root directory of this source tree. 113 */const r3=G("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/** 114 * @license lucide-react v0.462.0 - ISC 115 * 116 * This source code is licensed under the ISC license. 117 * See the LICENSE file in the root directory of this source tree. 118 */const fi=G("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/** 119 * @license lucide-react v0.462.0 - ISC 120 * 121 * This source code is licensed under the ISC license. 122 * See the LICENSE file in the root directory of this source tree. 123 */const s3=G("Briefcase",[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]]);/** 124 * @license lucide-react v0.462.0 - ISC 125 * 126 * This source code is licensed under the ISC license. 127 * See the LICENSE file in the root directory of this source tree. 128 */const Eh=G("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/** 129 * @license lucide-react v0.462.0 - ISC 130 * 131 * This source code is licensed under the ISC license. 132 * See the LICENSE file in the root directory of this source tree. 133 */const oN=G("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/** 134 * @license lucide-react v0.462.0 - ISC 135 * 136 * This source code is licensed under the ISC license. 137 * See the LICENSE file in the root directory of this source tree. 138 */const aN=G("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 139 * @license lucide-react v0.462.0 - ISC 140 * 141 * This source code is licensed under the ISC license. 142 * See the LICENSE file in the root directory of this source tree. 143 */const Ql=G("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** 144 * @license lucide-react v0.462.0 - ISC 145 * 146 * This source code is licensed under the ISC license. 147 * See the LICENSE file in the root directory of this source tree. 148 */const zd=G("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** 149 * @license lucide-react v0.462.0 - ISC 150 * 151 * This source code is licensed under the ISC license. 152 * See the LICENSE file in the root directory of this source tree. 153 */const i3=G("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** 154 * @license lucide-react v0.462.0 - ISC 155 * 156 * This source code is licensed under the ISC license. 157 * See the LICENSE file in the root directory of this source tree. 158 */const o3=G("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/** 159 * @license lucide-react v0.462.0 - ISC 160 * 161 * This source code is licensed under the ISC license. 162 * See the LICENSE file in the root directory of this source tree. 163 */const ao=G("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 164 * @license lucide-react v0.462.0 - ISC 165 * 166 * This source code is licensed under the ISC license. 167 * See the LICENSE file in the root directory of this source tree. 168 */const tp=G("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** 169 * @license lucide-react v0.462.0 - ISC 170 * 171 * This source code is licensed under the ISC license. 172 * See the LICENSE file in the root directory of this source tree. 173 */const a3=G("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/** 174 * @license lucide-react v0.462.0 - ISC 175 * 176 * This source code is licensed under the ISC license. 177 * See the LICENSE file in the root directory of this source tree. 178 */const l3=G("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** 179 * @license lucide-react v0.462.0 - ISC 180 * 181 * This source code is licensed under the ISC license. 182 * See the LICENSE file in the root directory of this source tree. 183 */const c3=G("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/** 184 * @license lucide-react v0.462.0 - ISC 185 * 186 * This source code is licensed under the ISC license. 187 * See the LICENSE file in the root directory of this source tree. 188 */const u3=G("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** 189 * @license lucide-react v0.462.0 - ISC 190 * 191 * This source code is licensed under the ISC license. 192 * See the LICENSE file in the root directory of this source tree. 193 */const d3=G("Facebook",[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]]);/** 194 * @license lucide-react v0.462.0 - ISC 195 * 196 * This source code is licensed under the ISC license. 197 * See the LICENSE file in the root directory of this source tree. 198 */const h3=G("Hammer",[["path",{d:"m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9",key:"eefl8a"}],["path",{d:"m18 15 4-4",key:"16gjal"}],["path",{d:"m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172V7l-2.26-2.26a6 6 0 0 0-4.202-1.756L9 2.96l.92.82A6.18 6.18 0 0 1 12 8.4V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5",key:"b7pghm"}]]);/** 199 * @license lucide-react v0.462.0 - ISC 200 * 201 * This source code is licensed under the ISC license. 202 * See the LICENSE file in the root directory of this source tree. 203 */const f3=G("Heading1",[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"m17 12 3-2v8",key:"1hhhft"}]]);/** 204 * @license lucide-react v0.462.0 - ISC 205 * 206 * This source code is licensed under the ISC license. 207 * See the LICENSE file in the root directory of this source tree. 208 */const p3=G("Heading2",[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1",key:"9jr5yi"}
208]]);/** 209 * @license lucide-react v0.462.0 - ISC 210 * 211 * This source code is licensed under the ISC license. 212 * See the LICENSE file in the root directory of this source tree. 213 */const m3=G("Heading3",[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2",key:"68ncm8"}],["path",{d:"M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2",key:"1ejuhz"}]]);/** 214 * @license lucide-react v0.462.0 - ISC 215 * 216 * This source code is licensed under the ISC license. 217 * See the LICENSE file in the root directory of this source tree. 218 */const g3=G("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/** 219 * @license lucide-react v0.462.0 - ISC 220 * 221 * This source code is licensed under the ISC license. 222 * See the LICENSE file in the root directory of this source tree. 223 */const y3=G("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/** 224 * @license lucide-react v0.462.0 - ISC 225 * 226 * This source code is licensed under the ISC license. 227 * See the LICENSE file in the root directory of this source tree. 228 */const lN=G("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/** 229 * @license lucide-react v0.462.0 - ISC 230 * 231 * This source code is licensed under the ISC license. 232 * See the LICENSE file in the root directory of this source tree. 233 */const v3=G("Instagram",[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]]);/** 234 * @license lucide-react v0.462.0 - ISC 235 * 236 * This source code is licensed under the ISC license. 237 * See the LICENSE file in the root directory of this source tree. 238 */const b3=G("Italic",[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]]);/** 239 * @license lucide-react v0.462.0 - ISC 240 * 241 * This source code is licensed under the ISC license. 242 * See the LICENSE file in the root directory of this source tree. 243 */const x3=G("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);/** 244 * @license lucide-react v0.462.0 - ISC 245 * 246 * This source code is licensed under the ISC license. 247 * See the LICENSE file in the root directory of this source tree. 248 */const w3=G("Linkedin",[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]]);/** 249 * @license lucide-react v0.462.0 - ISC 250 * 251 * This source code is licensed under the ISC license. 252 * See the LICENSE file in the root directory of this source tree. 253 */const k3=G("ListOrdered",[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]]);/** 254 * @license lucide-react v0.462.0 - ISC 255 * 256 * This source code is licensed under the ISC license. 257 * See the LICENSE file in the root directory of this source tree. 258 */const S3=G("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/** 259 * @license lucide-react v0.462.0 - ISC 260 * 261 * This source code is licensed under the ISC license. 262 * See the LICENSE file in the root directory of this source tree. 263 */const Mi=G("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** 264 * @license lucide-react v0.462.0 - ISC 265 * 266 * This source code is licensed under the ISC license. 267 * See the LICENSE file in the root directory of this source tree. 268 */const np=G("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/** 269 * @license lucide-react v0.462.0 - ISC 270 * 271 * This source code is licensed under the ISC license. 272 * See the LICENSE file in the root directory of this source tree. 273 */const R0=G("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/** 274 * @license lucide-react v0.462.0 - ISC 275 * 276 * This source code is licensed under the ISC license. 277 * See the LICENSE file in the root directory of this source tree. 278 */const C3=G("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/** 279 * @license lucide-react v0.462.0 - ISC 280 * 281 * This source code is licensed under the ISC license. 282 * See the LICENSE file in the root directory of this source tree. 283 */const E3=G("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/** 284 * @license lucide-react v0.462.0 - ISC 285 * 286 * This source code is licensed under the ISC license. 287 * See the LICENSE file in the root directory of this source tree. 288 */const T3=G("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/** 289 * @license lucide-react v0.462.0 - ISC 290 * 291 * This source code is licensed under the ISC license. 292 * See the LICENSE file in the root directory of this source tree. 293 */const N3=G("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/** 294 * @license lucide-react v0.462.0 - ISC 295 * 296 * This source code is licensed under the ISC license. 297 * See the LICENSE file in the root directory of this source tree. 298 */const cN=G("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/** 299 * @license lucide-react v0.462.0 - ISC 300 * 301 * This source code is licensed under the ISC license. 302 * See the LICENSE file in the root directory of this source tree. 303 */const A3=G("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** 304 * @license lucide-react v0.462.0 - ISC 305 * 306 * This source code is licensed under the ISC license. 307 * See the LICENSE file in the root directory of this source tree. 308 */const _3=G("Quote",[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]);/** 309 * @license lucide-react v0.462.0 - ISC 310 * 311 * This source code is licensed under the ISC license. 312 * See the LICENSE file in the root directory of this source tree. 313 */const j3=G("Redo",[["path",{d:"M21 7v6h-6",key:"3ptur4"}],["path",{d:"M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7",key:"1kgawr"}]]);/** 314 * @license lucide-react v0.462.0 - ISC 315 * 316 * This source code is licensed under the ISC license. 317 * See the LICENSE file in the root directory of this source tree. 318 */const O3=G("Repeat",[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]]);/** 319 * @license lucide-react v0.462.0 - ISC 320 * 321 * This source code is licensed under the ISC license. 322 * See the LICENSE file in the root directory of this source tree. 323 */const R3=G("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/** 324 * @license lucide-react v0.462.0 - ISC 325 * 326 * This source code is licensed under the ISC license. 327 * See the LICENSE file in the root directory of this source tree. 328 */const M3=G("Scale",[["path",{d:"m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"7g6ntu"}],["path",{d:"m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"ijws7r"}],["path",{d:"M7 21h10",key:"1b0cd5"}],["path",{d:"M12 3v18",key:"108xh3"}
328],["path",{d:"M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2",key:"3gwbw2"}]]);/** 329 * @license lucide-react v0.462.0 - ISC 330 * 331 * This source code is licensed under the ISC license. 332 * See the LICENSE file in the root directory of this source tree. 333 */const Qa=G("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** 334 * @license lucide-react v0.462.0 - ISC 335 * 336 * This source code is licensed under the ISC license. 337 * See the LICENSE file in the root directory of this source tree. 338 */const P3=G("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/** 339 * @license lucide-react v0.462.0 - ISC 340 * 341 * This source code is licensed under the ISC license. 342 * See the LICENSE file in the root directory of this source tree. 343 */const I3=G("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/** 344 * @license lucide-react v0.462.0 - ISC 345 * 346 * This source code is licensed under the ISC license. 347 * See the LICENSE file in the root directory of this source tree. 348 */const rp=G("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/** 349 * @license lucide-react v0.462.0 - ISC 350 * 351 * This source code is licensed under the ISC license. 352 * See the LICENSE file in the root directory of this source tree. 353 */const Mw=G("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/** 354 * @license lucide-react v0.462.0 - ISC 355 * 356 * This source code is licensed under the ISC license. 357 * See the LICENSE file in the root directory of this source tree. 358 */const L3=G("Stethoscope",[["path",{d:"M11 2v2",key:"1539x4"}],["path",{d:"M5 2v2",key:"1yf1q8"}],["path",{d:"M5 3H4a2 2 0 0 0-2 2v4a6 6 0 0 0 12 0V5a2 2 0 0 0-2-2h-1",key:"rb5t3r"}],["path",{d:"M8 15a6 6 0 0 0 12 0v-3",key:"x18d4x"}],["circle",{cx:"20",cy:"10",r:"2",key:"ts1r5v"}]]);/** 359 * @license lucide-react v0.462.0 - ISC 360 * 361 * This source code is licensed under the ISC license. 362 * See the LICENSE file in the root directory of this source tree. 363 */const D3=G("Store",[["path",{d:"m2 7 4.41-4.41A2 2 0 0 1 7.83 2h8.34a2 2 0 0 1 1.42.59L22 7",key:"ztvudi"}],["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["path",{d:"M15 22v-4a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4",key:"2ebpfo"}],["path",{d:"M2 7h20",key:"1fcdvo"}],["path",{d:"M22 7v3a2 2 0 0 1-2 2a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 16 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 12 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 8 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 4 12a2 2 0 0 1-2-2V7",key:"6c3vgh"}]]);/** 364 * @license lucide-react v0.462.0 - ISC 365 * 366 * This source code is licensed under the ISC license. 367 * See the LICENSE file in the root directory of this source tree. 368 */const $3=G("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/** 369 * @license lucide-react v0.462.0 - ISC 370 * 371 * This source code is licensed under the ISC license. 372 * See the LICENSE file in the root directory of this source tree. 373 */const M0=G("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/** 374 * @license lucide-react v0.462.0 - ISC 375 * 376 * This source code is licensed under the ISC license. 377 * See the LICENSE file in the root directory of this source tree. 378 */const z3=G("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}
vendor: 8,344 bytes, lines 378-418
378],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** 379 * @license lucide-react v0.462.0 - ISC 380 * 381 * This source code is licensed under the ISC license. 382 * See the LICENSE file in the root directory of this source tree. 383 */const ri=G("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/** 384 * @license lucide-react v0.462.0 - ISC 385 * 386 * This source code is licensed under the ISC license. 387 * See the LICENSE file in the root directory of this source tree. 388 */const B3=G("Twitter",[["path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",key:"pff0z6"}]]);/** 389 * @license lucide-react v0.462.0 - ISC 390 * 391 * This source code is licensed under the ISC license. 392 * See the LICENSE file in the root directory of this source tree. 393 */const F3=G("Undo",[["path",{d:"M3 7v6h6",key:"1v2h90"}],["path",{d:"M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13",key:"1r6uu6"}]]);/** 394 * @license lucide-react v0.462.0 - ISC 395 * 396 * This source code is licensed under the ISC license. 397 * See the LICENSE file in the root directory of this source tree. 398 */const uN=G("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** 399 * @license lucide-react v0.462.0 - ISC 400 * 401 * This source code is licensed under the ISC license. 402 * See the LICENSE file in the root directory of this source tree. 403 */const W3=G("Video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);/** 404 * @license lucide-react v0.462.0 - ISC 405 * 406 * This source code is licensed under the ISC license. 407 * See the LICENSE file in the root directory of this source tree. 408 */const P0=G("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** 409 * @license lucide-react v0.462.0 - ISC 410 * 411 * This source code is licensed under the ISC license. 412 * See the LICENSE file in the root directory of this source tree. 413 */const H3=G("Youtube",[["path",{d:"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17",key:"1q2vi4"}],["path",{d:"m10 15 5-3-5-3z",key:"1jp15x"}]]);/** 414 * @license lucide-react v0.462.0 - ISC 415 * 416 * This source code is licensed under the ISC license. 417 * See the LICENSE file in the root directory of this source tree. 418 */const I0=G("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),L0="-",U3=t=>{const e=q3(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:o=>{const a=o.split(L0);return a[0]===""&&a.length!==1&&a.shift(),dN(a,e)||V3(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},dN=(t,e)=>{var o;if(t.length===0)return e.classGroupId;const n=t[0],r=e.nextPart.get(n),s=r?dN(t.slice(1),r):void 0;if(s)return s;if(e.validators.length===0)return;const i=t.join(L0);return(o=e.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},Pw=/^\[(.+)\]$/,V3=t=>{if(Pw.test(t)){const e=Pw.exec(t)[1],n=e==null?void 0:e.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}},q3=t=>{const{theme:e,prefix:n}=t,r={nextPart:new Map,validators:[]};return K3(Object.entries(t.classGroups),n).forEach(([i,o])=>{wy(o,r,i,e)}),r},wy=(t,e,n,r)=>{t.forEach(s=>{if(typeof s=="string"){const i=s===""?e:Iw(e,s);i.classGroupId=n;return}if(typeof s=="function"){if(G3(s)){wy(s(r),e,n,r);return}e.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([i,o])=>{wy(o,Iw(e,i),n,r)})})},Iw=(t,e)=>{let n=t;return e.split(L0).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},G3=t=>t.isThemeGetter,K3=(t,e)=>e?t.map(([n,r])=>{const s=r.map(i=>typeof i=="string"?e+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,a])=>[e+o,a])):i);return[n,s]}):t,Y3=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,r=new Map;const s=(i,o)=>{n.set(i,o),e++,e>t&&(e=0,r=n,n=new Map)};return{get(i){let o=n.get(i);if(o!==void 0)return o;if((o=r.get(i))!==void 0)return s(i,o),o},set(i,o){n.has(i)?n.set(i,o):s(i,o)}}},hN="!",J3=t=>{const{separator:e,experimentalParseClassName:n}=t,r=e.length===1,s=e[0],i=e.length,o=a=>{const l=[];let c=0,u=0,h;for(let y=0;y<a.length;y++){let v=a[y];if(c===0){if(v===s&&(r||a.slice(y,y+i)===e)){l.push(a.slice(u,y)),u=y+i;continue}if(v==="/"){h=y;continue}}v==="["?c++:v==="]"&&c--}const p=l.length===0?a:a.substring(u),f=p.startsWith(hN),g=f?p.substring(1):p,m=h&&h>u?h-u:void 0;return{modifiers:l,hasImportantModifier:f,baseClassName:g,maybePostfixModifierPosition:m}};return n?a=>n({className:a,parseClassName:o}):o},Q3=t=>{if(t.length<=1)return t;const e=[];let n=[];return t.forEach(r=>{r[0]==="["?(e.push(...n.sort(),r),n=[]):n.push(r)}),e.push(...n.sort()),e},X3=t=>({cache:Y3(t.cacheSize),parseClassName:J3(t),...U3(t)}),Z3=/\s+/,e4=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=e,i=[],o=t.trim().split(Z3);let a="";for(let l=o.length-1;l>=0;l-=1){const c=o[l],{modifiers:u,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:f}=n(c);let g=!!f,m=r(g?p.substring(0,f):p);if(!m){if(!g){a=c+(a.length>0?" "+a:a);continue}if(m=r(p),!m){a=c+(a.length>0?" "+a:a);continue}g=!1}const y=Q3(u).join(":"),v=h?y+hN:y,b=v+m;if(i.includes(b))continue;i.push(b);const x=s(m,g);for(let k=0;k<x.length;++k){const S=x[k];i.push(v+S)}a=c+(a.length>0?" "+a:a)}return a};function t4(){let t=0,e,n,r="";for(;t<arguments.length;)(e=arguments[t++])&&(n=fN(e))&&(r&&(r+=" "),r+=n);return r}const fN=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=fN(t[r]))&&(n&&(n+=" "),n+=e);return n};function n4(t,...e){let n,r,s,i=o;function o(l){const c=e.reduce((u,h)=>h(u),t());return n=X3(c),r=n.cache.get,s=n.cache.set,i=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=e4(l,n);return s(l,u),u}return function(){return i(t4.apply(null,arguments))}}const je=t=>{const e=n=>n[t]||[];return e.isThemeGetter=!0,e},pN=/^\[(?:([a-z-]+):)?(.+)\]$/i,r4=/^\d+\/\d+$/,s4=new Set(["px","full","screen"]),i4=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,o4=/\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$/,a4=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,l4=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,c4=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,jr=t=>da(t)||s4.has(t)||r4.test(t),fs=t=>Xa(t,"length",y4),da=t=>!!t&&!Number.isNaN(Number(t)),xm=t=>Xa(t,"number",da),yl=t=>!!t&&Number.isInteger(Number(t)),u4=t=>t.endsWith("%")&&da(t.slice(0,-1)),ae=t=>pN.test(t),ps=t=>i4.test(t),d4=new Set(["length","size","percentage"]),h4=t=>Xa(t,d4,mN),f4=t=>Xa(t,"position",mN),p4=new Set(["image","url"]),m4=t=>Xa(t,p4,b4),g4=t=>Xa(t,"",v4),vl=()=>!0,Xa=(t,e,n)=>{const r=pN.exec(t);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):n(r[2]):!1},y4=t=>o4.test(t)&&!a4.test(t),mN=()=>!1,v4=t=>l4.test(t),b4=t=>c4.test(t),x4=()=>{const t=je("colors"),e=je("spacing"),n=je("blur"),r=je("brightness"),s=je("borderColor"),i=je("borderRadius"),o=je("borderSpacing"),a=je("borderWidth"),l=je("contrast"),c=je("grayscale"),u=je("hueRotate"),h=je("invert"),p=je("gap"),f=je("gradientColorStops"),g=je("gradientColorStopPositions"),m=je("inset"),y=je("margin"),v=je("opacity"),b=je("padding"),x=je("saturate"),k=je("scale"),S=je("sepia"),C=je("skew"),E=je("space"),T=je("translate"),N=()=>["auto","contain","none"],_=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto",ae,e],I=()=>[ae,e],H=()=>["",jr,fs],M=()=>["auto",da,ae],U=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],
vendor: 12,081 bytes, line 418
418V=()=>["solid","dashed","dotted","double","none"],Q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],A=()=>["start","end","center","between","around","evenly","stretch"],O=()=>["","0",ae],B=()=>["auto","avoid","all","avoid-page","page","left","right","column"],te=()=>[da,ae];return{cacheSize:500,separator:":",theme:{colors:[vl],spacing:[jr,fs],blur:["none","",ps,ae],brightness:te(),borderColor:[t],borderRadius:["none","","full",ps,ae],borderSpacing:I(),borderWidth:H(),contrast:te(),grayscale:O(),hueRotate:te(),invert:O(),gap:I(),gradientColorStops:[t],gradientColorStopPositions:[u4,fs],inset:z(),margin:z(),opacity:te(),padding:I(),saturate:te(),scale:te(),sepia:O(),skew:te(),space:I(),translate:I()},classGroups:{aspect:[{aspect:["auto","square","video",ae]}],container:["container"],columns:[{columns:[ps]}],"break-after":[{"break-after":B()}],"break-before":[{"break-before":B()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...U(),ae]}],overflow:[{overflow:_()}],"overflow-x":[{"overflow-x":_()}],"overflow-y":[{"overflow-y":_()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",yl,ae]}],basis:[{basis:z()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ae]}],grow:[{grow:O()}],shrink:[{shrink:O()}],order:[{order:["first","last","none",yl,ae]}],"grid-cols":[{"grid-cols":[vl]}],"col-start-end":[{col:["auto",{span:["full",yl,ae]},ae]}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":[vl]}],"row-start-end":[{row:["auto",{span:[yl,ae]},ae]}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ae]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ae]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...A()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...A(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...A(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[E]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[E]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ae,e]}],"min-w":[{"min-w":[ae,e,"min","max","fit"]}],"max-w":[{"max-w":[ae,e,"none","full","min","max","fit","prose",{screen:[ps]},ps]}],h:[{h:[ae,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ae,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ae,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ae,e,"auto","min","max","fit"]}],"font-size":[{text:["base",ps,fs]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",xm]}],"font-family":[{font:[vl]}],"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:["tighter","tight","normal","wide","wider","widest",ae]}],"line-clamp":[{"line-clamp":["none",da,xm]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",jr,ae]}],"list-image":[{"list-image":["none",ae]}],"list-style-type":[{list:["none","disc","decimal",ae]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...V(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",jr,fs]}],"underline-offset":[{"underline-offset":["auto",jr,ae]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ae]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...U(),f4]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",h4]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},m4]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...V(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:V()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...V()]}],"outline-offset":[{"outline-offset":[jr,ae]}],"outline-w":[{outline:[jr,fs]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[jr,fs]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",ps,g4]}],"shadow-color":[{shadow:[vl]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...Q(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Q()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",ps,ae]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[h]}],saturate:[{saturate:[x]}],sepia:[{sepia:[S]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ae]}],duration:[{duration:te()}],ease:[{ease:["linear","in","out","in-out",ae]}],delay:[{delay:te()}],animate:[{animate:["none","spin","ping","pulse","bounce",ae]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[k]}],"scale-x":[{"scale-x":[k]}],"scale-y":[{"scale-y":[k]}],rotate:[{rotate:[yl,ae]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ae]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ae]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"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"]}
vendor: 3,855 bytes, line 418
418],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",ae]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[jr,fs,xm]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},w4=n4(x4);function rt(...t){return w4(rN(t))}const k4=QD,gN=w.forwardRef(({className:t,...e},n)=>d.jsx(JT,{ref:n,className:rt("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",t),...e}));gN.displayName=JT.displayName;const S4=ep("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),yN=w.forwardRef(({className:t,variant:e,...n},r)=>d.jsx(QT,{ref:r,className:rt(S4({variant:e}),t),...n}));
vendor: 4,329 bytes, line 418
418yN.displayName=QT.displayName;const C4=w.forwardRef(({className:t,...e},n)=>d.jsx(eN,{ref:n,className:rt("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",t),...e}));C4.displayName=eN.displayName;const vN=w.forwardRef(({className:t,...e},n)=>d.jsx(tN,{ref:n,className:rt("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",t),"toast-close":"",...e,children:d.jsx(P0,{className:"h-4 w-4"})}));vN.displayName=tN.displayName;const bN=w.forwardRef(({className:t,...e},n)=>d.jsx(XT,{ref:n,className:rt("text-sm font-semibold",t),...e}));bN.displayName=XT.displayName;const xN=w.forwardRef(({className:t,...e},n)=>d.jsx(ZT,{ref:n,className:rt("text-sm opacity-90",t),...e}));xN.displayName=ZT.displayName;function E4(){const{toasts:t}=aD();return d.jsxs(k4,{children:[t.map(function({id:e,title:n,description:r,action:s,...i}){return d.jsxs(yN,{...i,children:[d.jsxs("div",{className:"grid gap-1",children:[n&&d.jsx(bN,{children:n}),r&&d.jsx(xN,{children:r})]}),s,d.jsx(vN,{})]},e)}),d.jsx(gN,{})]})}var T4=Av[" useId ".trim().toString()]||(()=>{}),N4=0;function D0(t){const[e,n]=w.useState(T4());return kt(()=>{n(r=>r??String(N4++))},[t]),e?`radix-${e}`:""}const A4=["top","right","bottom","left"],si=Math.min,on=Math.max,Th=Math.round,Gu=Math.floor,kr=t=>({x:t,y:t}),_4={left:"right",right:"left",bottom:"top",top:"bottom"},j4={start:"end",end:"start"};function ky(t,e,n){return on(t,si(e,n))}function ns(t,e){return typeof t=="function"?t(e):t}function rs(t){return t.split("-")[0]}function Za(t){return t.split("-")[1]}function $0(t){return t==="x"?"y":"x"}function z0(t){return t==="y"?"height":"width"}const O4=new Set(["top","bottom"]);function br(t){return O4.has(rs(t))?"y":"x"}function B0(t){return $0(br(t))}function R4(t,e,n){n===void 0&&(n=!1);const r=Za(t),s=B0(t),i=z0(s);let o=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(o=Nh(o)),[o,Nh(o)]}function M4(t){const e=Nh(t);return[Sy(t),e,Sy(e)]}function Sy(t){return t.replace(/start|end/g,e=>j4[e])}const Lw=["left","right"],Dw=["right","left"],P4=["top","bottom"],I4=["bottom","top"];function L4(t,e,n){switch(t){case"top":case"bottom":return n?e?Dw:Lw:e?Lw:Dw;case"left":case"right":return e?P4:I4;default:return[]}}function D4(t,e,n,r){const s=Za(t);let i=L4(rs(t),n==="start",r);return s&&(i=i.map(o=>o+"-"+s),e&&(i=i.concat(i.map(Sy)))),i}function Nh(t){return t.replace(/left|right|bottom|top/g,e=>_4[e])}function $4(t){return{top:0,right:0,bottom:0,left:0,...t}}function wN(t){return typeof t!="number"?$4(t):{top:t,right:t,bottom:t,left:t}}function Ah(t){const{x:e,y:n,width:r,height:s}=t;return{width:r,height:s,top:n,left:e,right:e+r,bottom:n+s,x:e,y:n}}function $w(t,e,n){let{reference:r,floating:s}=t;const i=br(e),o=B0(e),a=z0(o),l=rs(e),c=i==="y",u=r.x+r.width/2-s.width/2,h=r.y+r.height/2-s.height/2,p=r[a]/2-s[a]/2;let f;switch(l){case"top":f={x:u,y:r.y-s.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:h};break;case"left":f={x:r.x-s.width,y:h};break;default:f={x:r.x,y:r.y}}switch(Za(e)){case"start":f[o]-=p*(n&&c?-1:1);break;case"end":f[o]+=p*(n&&c?-1:1);break}return f}const z4=async(t,e,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:i=[],platform:o}=n,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:s}),{x:u,y:h}=$w(c,r,l),p=r,f={},g=0;for(let m=0;m<a.length;m++){const{name:y,fn:v}=a[m],{x:b,y:x,data:k,reset:S}=await v({x:u,y:h,initialPlacement:r,placement:p,strategy:s,middlewareData:f,re
vendor: 17,008 bytes, line 418
418cts:c,platform:o,elements:{reference:t,floating:e}});u=b??u,h=x??h,f={...f,[y]:{...f[y],...k}},S&&g<=50&&(g++,typeof S=="object"&&(S.placement&&(p=S.placement),S.rects&&(c=S.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:s}):S.rects),{x:u,y:h}=$w(c,p,l)),m=-1)}return{x:u,y:h,placement:p,strategy:s,middlewareData:f}};async function Ic(t,e){var n;e===void 0&&(e={});const{x:r,y:s,platform:i,rects:o,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:h="floating",altBoundary:p=!1,padding:f=0}=ns(e,t),g=wN(f),y=a[p?h==="floating"?"reference":"floating":h],v=Ah(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(y)))==null||n?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),b=h==="floating"?{x:r,y:s,width:o.floating.width,height:o.floating.height}:o.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),k=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},S=Ah(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:x,strategy:l}):b);return{top:(v.top-S.top+g.top)/k.y,bottom:(S.bottom-v.bottom+g.bottom)/k.y,left:(v.left-S.left+g.left)/k.x,right:(S.right-v.right+g.right)/k.x}}const B4=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:s,rects:i,platform:o,elements:a,middlewareData:l}=e,{element:c,padding:u=0}=ns(t,e)||{};if(c==null)return{};const h=wN(u),p={x:n,y:r},f=B0(s),g=z0(f),m=await o.getDimensions(c),y=f==="y",v=y?"top":"left",b=y?"bottom":"right",x=y?"clientHeight":"clientWidth",k=i.reference[g]+i.reference[f]-p[f]-i.floating[g],S=p[f]-i.reference[f],C=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let E=C?C[x]:0;(!E||!await(o.isElement==null?void 0:o.isElement(C)))&&(E=a.floating[x]||i.floating[g]);const T=k/2-S/2,N=E/2-m[g]/2-1,_=si(h[v],N),z=si(h[b],N),I=_,H=E-m[g]-z,M=E/2-m[g]/2+T,U=ky(I,M,H),V=!l.arrow&&Za(s)!=null&&M!==U&&i.reference[g]/2-(M<I?_:z)-m[g]/2<0,Q=V?M<I?M-I:M-H:0;return{[f]:p[f]+Q,data:{[f]:U,centerOffset:M-U-Q,...V&&{alignmentOffset:Q}},reset:V}}}),F4=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:s,middlewareData:i,rects:o,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...y}=ns(t,e);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=rs(s),b=br(a),x=rs(a)===a,k=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=p||(x||!m?[Nh(a)]:M4(a)),C=g!=="none";!p&&C&&S.push(...D4(a,m,g,k));const E=[a,...S],T=await Ic(e,y),N=[];let _=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&N.push(T[v]),h){const M=R4(s,o,k);N.push(T[M[0]],T[M[1]])}if(_=[..._,{placement:s,overflows:N}],!N.every(M=>M<=0)){var z,I;const M=(((z=i.flip)==null?void 0:z.index)||0)+1,U=E[M];if(U&&(!(h==="alignment"?b!==br(U):!1)||_.every(A=>A.overflows[0]>0&&br(A.placement)===b)))return{data:{index:M,overflows:_},reset:{placement:U}};let V=(I=_.filter(Q=>Q.overflows[0]<=0).sort((Q,A)=>Q.overflows[1]-A.overflows[1])[0])==null?void 0:I.placement;if(!V)switch(f){case"bestFit":{var H;const Q=(H=_.filter(A=>{if(C){const O=br(A.placement);return O===b||O==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(O=>O>0).reduce((O,B)=>O+B,0)]).sort((A,O)=>A[1]-O[1])[0])==null?void 0:H[0];Q&&(V=Q);break}case"initialPlacement":V=a;break}if(s!==V)return{reset:{placement:V}}}return{}}}};function zw(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Bw(t){return A4.some(e=>t[e]>=0)}const W4=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:r="referenceHidden",...s}=ns(t,e);switch(r){case"referenceHidden":{const i=await Ic(e,{...s,elementContext:"reference"}),o=zw(i,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Bw(o)}}}case"escaped":{const i=await Ic(e,{...s,altBoundary:!0}),o=zw(i,n.floating);return{data:{escapedOffsets:o,escaped:Bw(o)}}}default:return{}}}}},kN=new Set(["left","top"]);async function H4(t,e){const{placement:n,platform:r,elements:s}=t,i=await(r.isRTL==null?void 0:r.isRTL(s.floating)),o=rs(n),a=Za(n),l=br(n)==="y",c=kN.has(o)?-1:1,u=i&&l?-1:1,h=ns(e,t);let{mainAxis:p,crossAxis:f,alignmentAxis:g}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&typeof g=="number"&&(f=a==="end"?g*-1:g),l?{x:f*u,y:p*c}:{x:p*c,y:f*u}}const U4=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:s,y:i,placement:o,middlewareData:a}=e,l=await H4(e,t);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:s+l.x,y:i+l.y,data:{...l,placement:o}}}}},V4=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:s}=e,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:y=>{let{x:v,y:b}=y;return{x:v,y:b}}},...l}=ns(t,e),c={x:n,y:r},u=await Ic(e,l),h=br(rs(s)),p=$0(h);let f=c[p],g=c[h];if(i){const y=p==="y"?"top":"left",v=p==="y"?"bottom":"right",b=f+u[y],x=f-u[v];f=ky(b,f,x)}if(o){const y=h==="y"?"top":"left",v=h==="y"?"bottom":"right",b=g+u[y],x=g-u[v];g=ky(b,g,x)}const m=a.fn({...e,[p]:f,[h]:g});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[p]:i,[h]:o}}}}}},q4=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:s,rects:i,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=ns(t,e),u={x:n,y:r},h=br(s),p=$0(h);let f=u[p],g=u[h];const m=ns(a,e),y=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const x=p==="y"?"height":"width",k=i.reference[p]-i.floating[x]+y.mainAxis,S=i.reference[p]+i.reference[x]-y.mainAxis;f<k?f=k:f>S&&(f=S)}if(c){var v,b;const x=p==="y"?"width":"height",k=kN.has(rs(s)),S=i.reference[h]-i.floating[x]+(k&&((v=o.offset)==null?void 0:v[h])||0)+(k?0:y.crossAxis),C=i.reference[h]+i.reference[x]+(k?0:((b=o.offset)==null?void 0:b[h])||0)-(k?y.crossAxis:0);g<S?g=S:g>C&&(g=C)}return{[p]:f,[h]:g}}}},G4=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:s,rects:i,platform:o,elements:a}=e,{apply:l=()=>{},...c}=ns(t,e),u=await Ic(e,c),h=rs(s),p=Za(s),f=br(s)==="y",{width:g,height:m}=i.floating;let y,v;h==="top"||h==="bottom"?(y=h,v=p===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(v=h,y=p==="end"?"top":"bottom");const b=m-u.top-u.bottom,x=g-u.left-u.right,k=si(m-u[y],b),S=si(g-u[v],x),C=!e.middlewareData.shift;let E=k,T=S;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(T=x),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(E=b),C&&!p){const _=on(u.left,0),z=on(u.right,0),I=on(u.top,0),H=on(u.bottom,0);f?T=g-2*(_!==0||z!==0?_+z:on(u.left,u.right)):E=m-2*(I!==0||H!==0?I+H:on(u.top,u.bottom))}await l({...e,availableWidth:T,availableHeight:E});const N=await o.getDimensions(a.floating);return g!==N.width||m!==N.height?{reset:{rects:!0}}:{}}}};function sp(){return typeof window<"u"}function el(t){return SN(t)?(t.nodeName||"").toLowerCase():"#document"}function dn(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Tr(t){var e;return(e=(SN(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function SN(t){return sp()?t instanceof Node||t instanceof dn(t).Node:!1}function rr(t){return sp()?t instanceof Element||t instanceof dn(t).Element:!1}function Sr(t){return sp()?t instanceof HTMLElement||t instanceof dn(t).HTMLElement:!1}function Fw(t){return!sp()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof dn(t).ShadowRoot}const K4=new Set(["inline","contents"]);function pu(t){const{overflow:e,overflowX:n,overflowY:r,display:s}=sr(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!K4.has(s)}const Y4=new Set(["table","td","th"]);function J4(t){return Y4.has(el(t))}const Q4=[":popover-open",":modal"];function ip(t){return Q4.some(e=>{try{return t.matches(e)}catch{return!1}})}const X4=["transform","translate","scale","rotate","perspective"],Z4=["transform","translate","scale","rotate","perspective","filter"],e$=["paint","layout","strict","content"];function F0(t){const e=W0(),n=rr(t)?sr(t):t;return X4.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||Z4.some(r=>(n.willChange||"").includes(r))||e$.some(r=>(n.contain||"").includes(r))}function t$(t){let e=ii(t);for(;Sr(e)&&!Ma(e);){if(F0(e))return e;if(ip(e))return null;e=ii(e)}return null}function W0(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const n$=new Set(["html","body","#document"]);function Ma(t){return n$.has(el(t))}function sr(t){return dn(t).getComputedStyle(t)}function op(t){return rr(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function ii(t){if(el(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Fw(t)&&t.host||Tr(t);return Fw(e)?e.host:e}function CN(t){const e=ii(t);return Ma(e)?t.ownerDocument?t.ownerDocument.body:t.body:Sr(e)&&pu(e)?e:CN(e)}function Lc(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const s=CN(t),i=s===((r=t.ownerDocument)==null?void 0:r.body),o=dn(s);if(i){const a=Cy(o);return e.concat(o,o.visualViewport||[],pu(s)?s:[],a&&n?Lc(a):[])}return e.concat(s,Lc(s,[],n))}function Cy(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function EN(t){const e=sr(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const s=Sr(t),i=s?t.offsetWidth:n,o=s?t.offsetHeight:r,a=Th(n)!==i||Th(r)!==o;return a&&(n=i,r=o),{width:n,height:r,$:a}}function H0(t){return rr(t)?t:t.contextElement}function ha(t){const e=H0(t);if(!Sr(e))return kr(1);const n=e.getBoundingClientRect(),{width:r,height:s,$:i}=EN(e);let o=(i?Th(n.width):n.width)/r,a=(i?Th(n.height):n.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const r$=kr(0);function TN(t){const e=dn(t);return!W0()||!e.visualViewport?r$:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function s$(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==dn(t)?!1:e}function lo(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const s=t.getBoundingClientRect(),i=H0(t);let o=kr(1);e&&(r?rr(r)&&(o=ha(r)):o=ha(t));const a=s$(i,n,r)?TN(i):kr(0);let l=(s.left+a.x)/o.x,c=(s.top+a.y)/o.y,u=s.width/o.x,h=s.height/o.y;if(i){const p=dn(i),f=r&&rr(r)?dn(r):r;let g=p,m=Cy(g);for(;m&&r&&f!==g;){const y=ha(m),v=m.getBoundingClientRect(),b=sr(m),x=v.left+(m.clientLeft+parseFloat(b.paddingLeft))*y.x,k=v.top+(m.clientTop+parseFloat(b.paddingTop))*y.y;l*=y.x,c*=y.y,u*=y.x,h*=y.y,l+=x,c+=k,g=dn(m),m=Cy(g)}}return Ah({width:u,height:h,x:l,y:c})}function U0(t,e){const n=op(t).scrollLeft;return e?e.left+n:lo(Tr(t)).left+n}function NN(t,e,n){n===void 0&&(n=!1);const r=t.getBoundingClientRect(),s=r.left+e.scrollLeft-(n?0:U0(t,r)),i=r.top+e.scrollTop;return{x:s,y:i}}function i$(t){let{elements:e,rect:n,offsetParent:r,strategy:s}=t;const i=s==="fixed",o=Tr(r),a=e?ip(e.floating):!1;if(r===o||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=kr(1);const u=kr(0),h=Sr(r);if((h||!h&&!i)&&((el(r)!=="body"||pu(o))&&(l=op(r)),Sr(r))){const f=lo(r);c=ha(r),u.x=f.x+r.clientLeft,u.y=f.y+r.clientTop}const p=o&&!h&&!i?NN(o,l,!0):kr(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:n.y*c.y-l.scrollTop*c.y+u.y+p.y}}function o$(t){return Array.from(t.getClientRects())}function a$(t){const e=Tr(t),n=op(t),r=t.ownerDocument.body,s=on(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),i=on(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+U0(t);const a=-n.scrollTop;return sr(r).direction==="rtl"&&(o+=on(e.clientWidth,r.clientWidth)-s),{width:s,height:i,x:o,y:a}}function l$(t,e){const n=dn(t),r=Tr(t),s=n.visualViewport;let i=r.clientWidth,o=r.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const c=W0();(!c||c&&e==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:i,height:o,x:a,y:l}}const c$=new Set(["absolute","fixed"]);function u$(t,e){const n=lo(t,!0,e==="fixed"),r=n.top+t.clientTop,s=n.left+t.clientLeft,i=Sr(t)?ha(t):kr(1),o=t.clientWidth*i.x,a=t.clientHeight*i.y,l=s*i.x,c=r*i.y;return{width:o,height:a,x:l,y:c}}function Ww(t,e,n){let r;if(e==="viewport")r=l$(t,n);else if(e==="document")r=a$(Tr(t));else if(rr(e))r=u$(e,n);else{const s=TN(t);r={x:e.x-s.x,y:e.y-s.y,width:e.width,height:e.height}}return Ah(r)}function AN(t,e){const n=ii(t);return n===e||!rr(n)||Ma(n)?!1:sr(n).position==="fixed"||AN(n,e)}function d$(t,e){const n=e.get(t);if(n)return n;let r=Lc(t,[],!1).filter(a=>rr(a)&&el(a)!=="body"),s=null;const i=sr(t).position==="fixed";let o=i?ii(t):t;for(;rr(o)&&!Ma(o);){const a=sr(o),l=F0(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&c$.has(s.position)||pu(o)&&!l&&AN(t,o))?r=r.filter(u=>u!==o):s=a,o=ii(o)}return e.set(t,r),r}function h$(t){let{element:e,boundary:n,rootBoundary:r,strategy:s}=t;const o=[...n==="clippingAncestors"?ip(e)?[]:d$(e,this._c):[].concat(n),r],a=o[0],l=o.reduce((c,u)=>{const h=Ww(e,u,s);return c.top=on(h.top,c.top),c.right=si(h.right,c.right),c.bottom=si(h.bottom,c.bottom),c.left=on(h.left,c.left),c},Ww(e,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function f$(t){const{width:e,height:n}=EN(t);return{width:e,height:n}}function p$(t,e,n){const r=Sr(e),s=Tr(e),i=n==="fixed",o=lo(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const l=kr(0);function c(){l.x=U0(s)}if(r||!r&&!i)if((el(e)!=="body"||pu(s))&&(a=op(e)),r){const f=lo(e,!0,i,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}else s&&c();i&&!r&&s&&c();const u=s&&!r&&!i?NN(s,a):kr(0),h=o.left+a.scrollLeft-l.x-u.x,p=o.top+a.scrollTop-l.y-u.y;return{x:h,y:p,width:o.width,height:o.height}}function wm(t){return sr(t).position==="static"}function Hw(t,e){if(!Sr(t)||sr(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Tr(t)===n&&(n=n.ownerDocument.body),n}function _N(t,e){const n=dn(t);if(ip(t))return n;if(!Sr(t)){let s=ii(t);for(;s&&!Ma(s);){if(rr(s)&&!wm(s))return s;s=ii(s)}return n}let r=Hw(t,e);for(;r&&J4(r)&&wm(r);)r=Hw(r,e);return r&&Ma(r)&&wm(r)&&!F0(r)?n:r||t$(t)||n}const m$=async function(t){const e=this.getOffsetParent||_N,n=this.getDimensions,r=await n(t.floating);return{reference:p$(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function g$(t){return sr(t).direction==="rtl"}const y$={convertOffsetParentRelativeRectToViewportRelativeRect:i$,getDocumentElement:Tr,getClippingRect:h$,getOffsetParent:_N,getElementRects:m$,getClientRects:o$,getDimensions:f$,getScale:ha,isElement:rr,isRTL:g$};function jN(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function v$(t,e){let n=null,r;const s=Tr(t);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const c=t.getBoundingClientRect(),{left:u,top:h,width:p,height:f}=c;if(a||e(),!p||!f)return;const g=Gu(h),m=Gu(s.clientWidth-(u+p)),y=Gu(s.clientHeight-(h+f)),v=Gu(u),x={rootMargin:-g+"px "+-m+"px "+-y+"px "+-v+"px",threshold:on(0,si(1,l))||1};let k=!0;function S(C){const E=C[0].intersectionRatio;if(E!==l){if(!k)return o();E?o(!1,E):r=setTimeout(()=>{o(!1,1e-7)},1e3)}E===1&&!jN(c,t.getBoundingClientRect())&&o(),k=!1}try{n=new IntersectionObserver(S,{...x,root:s.ownerDocument})}catch{n=new IntersectionObserver(S,x)}n.observe(t)}return o(!0),i}function b$(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=H0(t),u=s||i?[...c?Lc(c):[],...Lc(e)]:[];u.forEach(v=>{s&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const h=c&&a?v$(c,n):null;let p=-1,f=null;o&&(f=new ResizeObserver(v=>{let[b]=v;b&&b.target===c&&f&&(f.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var x;(x=f)==null||x.observe(e)})),n()}),c&&!l&&f.observe(c),f.observe(e));let g,m=l?lo(t):null;l&&y();function y(){const v=lo(t);m&&!jN(m,v)&&n(),m=v,g=requestAnimationFrame(y)}return n(),()=>{var v;u.forEach(b=>{s&&b.removeEventListener("scroll",n),i&&b.removeEventListener("resize",n)}),h==null||h(),(v=f)==null||v.disconnect(),f=null,l&&cancelAnimationFrame(g)}}const x$=U4,w$=V4,k$=F4,S$=G4,C$=W4,Uw=B4,E$=q4,T$=(t,e,n)=>{const r=new Map,s={platform:y$,...n},i={...s.platform,_c:r};return z4(t,e,{...s,platform:i})};var N$=typeof document<"u",A$=function(){},Bd=N$?w.useLayoutEffect:A$;function _h(t,e){if(t===e)return!0;
vendor: 14,200 bytes, line 418
418if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,s;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!_h(t[r],e[r]))return!1;return!0}if(s=Object.keys(t),n=s.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,s[r]))return!1;for(r=n;r--!==0;){const i=s[r];if(!(i==="_owner"&&t.$$typeof)&&!_h(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function ON(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Vw(t,e){const n=ON(t);return Math.round(e*n)/n}function km(t){const e=w.useRef(t);return Bd(()=>{e.current=t}),e}function _$(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[u,h]=w.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[p,f]=w.useState(r);_h(p,r)||f(r);const[g,m]=w.useState(null),[y,v]=w.useState(null),b=w.useCallback(A=>{A!==C.current&&(C.current=A,m(A))},[]),x=w.useCallback(A=>{A!==E.current&&(E.current=A,v(A))},[]),k=i||g,S=o||y,C=w.useRef(null),E=w.useRef(null),T=w.useRef(u),N=l!=null,_=km(l),z=km(s),I=km(c),H=w.useCallback(()=>{if(!C.current||!E.current)return;const A={placement:e,strategy:n,middleware:p};z.current&&(A.platform=z.current),T$(C.current,E.current,A).then(O=>{const B={...O,isPositioned:I.current!==!1};M.current&&!_h(T.current,B)&&(T.current=B,bo.flushSync(()=>{h(B)}))})},[p,e,n,z,I]);Bd(()=>{c===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,h(A=>({...A,isPositioned:!1})))},[c]);const M=w.useRef(!1);Bd(()=>(M.current=!0,()=>{M.current=!1}),[]),Bd(()=>{if(k&&(C.current=k),S&&(E.current=S),k&&S){if(_.current)return _.current(k,S,H);H()}},[k,S,H,_,N]);const U=w.useMemo(()=>({reference:C,floating:E,setReference:b,setFloating:x}),[b,x]),V=w.useMemo(()=>({reference:k,floating:S}),[k,S]),Q=w.useMemo(()=>{const A={position:n,left:0,top:0};if(!V.floating)return A;const O=Vw(V.floating,u.x),B=Vw(V.floating,u.y);return a?{...A,transform:"translate("+O+"px, "+B+"px)",...ON(V.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:O,top:B}},[n,a,V.floating,u.x,u.y]);return w.useMemo(()=>({...u,update:H,refs:U,elements:V,floatingStyles:Q}),[u,H,U,V,Q])}const j$=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:s}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?Uw({element:r.current,padding:s}).fn(n):{}:r?Uw({element:r,padding:s}).fn(n):{}}}},O$=(t,e)=>({...x$(t),options:[t,e]}),R$=(t,e)=>({...w$(t),options:[t,e]}),M$=(t,e)=>({...E$(t),options:[t,e]}),P$=(t,e)=>({...k$(t),options:[t,e]}),I$=(t,e)=>({...S$(t),options:[t,e]}),L$=(t,e)=>({...C$(t),options:[t,e]}),D$=(t,e)=>({...j$(t),options:[t,e]});var $$="Arrow",RN=w.forwardRef((t,e)=>{const{children:n,width:r=10,height:s=5,...i}=t;return d.jsx(be.svg,{...i,ref:e,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});RN.displayName=$$;var z$=RN;function B$(t){const[e,n]=w.useState(void 0);return kt(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,a=c.blockSize}else o=t.offsetWidth,a=t.offsetHeight;n({width:o,height:a})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else n(void 0)},[t]),e}var V0="Popper",[MN,ap]=hu(V0),[F$,PN]=MN(V0),IN=t=>{const{__scopePopper:e,children:n}=t,[r,s]=w.useState(null);return d.jsx(F$,{scope:e,anchor:r,onAnchorChange:s,children:n})};IN.displayName=V0;var LN="PopperAnchor",DN=w.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:r,...s}=t,i=PN(LN,n),o=w.useRef(null),a=Ge(e,o);return w.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:d.jsx(be.div,{...s,ref:a})});DN.displayName=LN;var q0="PopperContent",[W$,H$]=MN(q0),$N=w.forwardRef((t,e)=>{var F,xe,Fe,ye,he,me;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:i="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:h="partial",hideWhenDetached:p=!1,updatePositionStrategy:f="optimized",onPlaced:g,...m}=t,y=PN(q0,n),[v,b]=w.useState(null),x=Ge(e,St=>b(St)),[k,S]=w.useState(null),C=B$(k),E=(C==null?void 0:C.width)??0,T=(C==null?void 0:C.height)??0,N=r+(i!=="center"?"-"+i:""),_=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},z=Array.isArray(c)?c:[c],I=z.length>0,H={padding:_,boundary:z.filter(V$),altBoundary:I},{refs:M,floatingStyles:U,placement:V,isPositioned:Q,middlewareData:A}=_$({strategy:"fixed",placement:N,whileElementsMounted:(...St)=>b$(...St,{animationFrame:f==="always"}),elements:{reference:y.anchor},middleware:[O$({mainAxis:s+T,alignmentAxis:o}),l&&R$({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?M$():void 0,...H}),l&&P$({...H}),I$({...H,apply:({elements:St,rects:mn,availableWidth:bi,availableHeight:ls})=>{const{width:xi,height:il}=mn.reference,So=St.floating.style;So.setProperty("--radix-popper-available-width",`${bi}px`),So.setProperty("--radix-popper-available-height",`${ls}px`),So.setProperty("--radix-popper-anchor-width",`${xi}px`),So.setProperty("--radix-popper-anchor-height",`${il}px`)}}),k&&D$({element:k,padding:a}),q$({arrowWidth:E,arrowHeight:T}),p&&L$({strategy:"referenceHidden",...H})]}),[O,B]=FN(V),te=nr(g);kt(()=>{Q&&(te==null||te())},[Q,te]);const J=(F=A.arrow)==null?void 0:F.x,oe=(xe=A.arrow)==null?void 0:xe.y,re=((Fe=A.arrow)==null?void 0:Fe.centerOffset)!==0,[_e,Be]=w.useState();return kt(()=>{v&&Be(window.getComputedStyle(v).zIndex)},[v]),d.jsx("div",{ref:M.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:Q?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:_e,"--radix-popper-transform-origin":[(ye=A.transformOrigin)==null?void 0:ye.x,(he=A.transformOrigin)==null?void 0:he.y].join(" "),...((me=A.hide)==null?void 0:me.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:d.jsx(W$,{scope:n,placedSide:O,onArrowChange:S,arrowX:J,arrowY:oe,shouldHideArrow:re,children:d.jsx(be.div,{"data-side":O,"data-align":B,...m,ref:x,style:{...m.style,animation:Q?void 0:"none"}})})})});$N.displayName=q0;var zN="PopperArrow",U$={top:"bottom",right:"left",bottom:"top",left:"right"},BN=w.forwardRef(function(e,n){const{__scopePopper:r,...s}=e,i=H$(zN,r),o=U$[i.placedSide];return d.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:d.jsx(z$,{...s,ref:n,style:{...s.style,display:"block"}})})});BN.displayName=zN;function V$(t){return t!==null}var q$=t=>({name:"transformOrigin",options:t,fn(e){var y,v,b;const{placement:n,rects:r,middlewareData:s}=e,o=((y=s.arrow)==null?void 0:y.centerOffset)!==0,a=o?0:t.arrowWidth,l=o?0:t.arrowHeight,[c,u]=FN(n),h={start:"0%",center:"50%",end:"100%"}[u],p=(((v=s.arrow)==null?void 0:v.x)??0)+a/2,f=(((b=s.arrow)==null?void 0:b.y)??0)+l/2;let g="",m="";return c==="bottom"?(g=o?h:`${p}px`,m=`${-l}px`):c==="top"?(g=o?h:`${p}px`,m=`${r.floating.height+l}px`):c==="right"?(g=`${-l}px`,m=o?h:`${f}px`):c==="left"&&(g=`${r.floating.width+l}px`,m=o?h:`${f}px`),{data:{x:g,y:m}}}});function FN(t){const[e,n="center"]=t.split("-");return[e,n]}var G$=IN,WN=DN,HN=$N,UN=BN,[lp,GJ]=hu("Tooltip",[ap]),G0=ap(),VN="TooltipProvider",K$=700,qw="tooltip.open",[Y$,qN]=lp(VN),GN=t=>{const{__scopeTooltip:e,delayDuration:n=K$,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:i}=t,o=w.useRef(!0),a=w.useRef(!1),l=w.useRef(0);return w.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),d.jsx(Y$,{scope:e,isOpenDelayedRef:o,delayDuration:n,onOpen:w.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:w.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:w.useCallback(c=>{a.current=c},[]),disableHoverableContent:s,children:i})};GN.displayName=VN;var KN="Tooltip",[KJ,cp]=lp(KN),Ey="TooltipTrigger",J$=w.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,s=cp(Ey,n),i=qN(Ey,n),o=G0(n),a=w.useRef(null),l=Ge(e,a,s.onTriggerChange),c=w.useRef(!1),u=w.useRef(!1),h=w.useCallback(()=>c.current=!1,[]);return w.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),d.jsx(WN,{asChild:!0,...o,children:d.jsx(be.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:l,onPointerMove:ue(t.onPointerMove,p=>{p.pointerType!=="touch"&&!u.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),u.current=!0)}),onPointerLeave:ue(t.onPointerLeave,()=>{s.onTriggerLeave(),u.current=!1}),onPointerDown:ue(t.onPointerDown,()=>{s.open&&s.onClose(),c.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:ue(t.onFocus,()=>{c.current||s.onOpen()}),onBlur:ue(t.onBlur,s.onClose),onClick:ue(t.onClick,s.onClose)})})});J$.displayName=Ey;var Q$="TooltipPortal",[YJ,X$]=lp(Q$,{forceMount:void 0}),Pa="TooltipContent",YN=w.forwardRef((t,e)=>{const n=X$(Pa,t.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...i}=t,o=cp(Pa,t.__scopeTooltip);return d.jsx(A0,{present:r||o.open,children:o.disableHoverableContent?d.jsx(JN,{side:s,...i,ref:e}):d.jsx(Z$,{side:s,...i,ref:e})})}),Z$=w.forwardRef((t,e)=>{const n=cp(Pa,t.__scopeTooltip),r=qN(Pa,t.__scopeTooltip),s=w.useRef(null),i=Ge(e,s),[o,a]=w.useState(null),{trigger:l,onClose:c}=n,u=s.current,{onPointerInTransitChange:h}=r,p=w.useCallback(()=>{a(null),h(!1)},[h]),f=w.useCallback((g,m)=>{const y=g.currentTarget,v={x:g.clientX,y:g.clientY},b=s5(v,y.getBoundingClientRect()),x=i5(v,b),k=o5(m.getBoundingClientRect()),S=l5([...x,...k]);a(S),h(!0)},[h]);return w.useEffect(()=>()=>p(),[p]),w.useEffect(()=>{if(l&&u){const g=y=>f(y,u),m=y=>f(y,l);return l.addEventListener("pointerleave",g),u.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",g),u.removeEventListener("pointerleave",m)}}},[l,u,f,p]),w.useEffect(()=>{if(o){const g=m=>{const y=m.target,v={x:m.clientX,y:m.clientY},b=(l==null?void 0:l.contains(y))||(u==null?void 0:u.contains(y)),x=!a5(v,o);b?p():x&&(p(),c())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[l,u,o,c,p]),d.jsx(JN,{...t,ref:i})}),[e5,t5]=lp(KN,{isInside:!1}),n5=dD("TooltipContent"),JN=w.forwardRef((t,e)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=t,l=cp(Pa,n),c=G0(n),{onClose:u}=l;return w.useEffect(()=>(document.addEventListener(qw,u),()=>document.removeEventListener(qw,u)),[u]),w.useEffect(()=>{if(l.trigger){const h=p=>{const f=p.target;f!=null&&f.contains(l.trigger)&&u()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[l.trigger,u]),d.jsx(Qf,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:h=>h.preventDefault(),onDismiss:u,children:d.jsxs(HN,{"data-state":l.stateAttribute,...c,...a,ref:e,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[d.jsx(n5,{children:r}),d.jsx(e5,{scope:n,isInside:!0,children:d.jsx(MD,{id:l.contentId,role:"tooltip",children:s||r})})]})})});YN.displayName=Pa;var QN="TooltipArrow",r5=w.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,s=G0(n);return t5(QN,n).isInside?null:d.jsx(UN,{...s,...r,ref:e})});r5.displayName=QN;function s5(t,e){const n=Math.abs(e.top-t.y),r=Math.abs(e.bottom-t.y),s=Math.abs(e.right-t.x),i=Math.abs(e.left-t.x);switch(Math.min(n,r,s,i)){case i:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function i5(t,e,n=5){const r=[];switch(e){case"top":r.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":r.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":r.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":r.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return r}function o5(t){const{top:e,right:n,bottom:r,left:s}=t;return[{x:s,y:e},{x:n,y:e},{x:n,y:r},{x:s,y:r}]}function a5(t,e){const{x:n,y:r}=t;let s=!1;for(let i=0,o=e.length-1;i<e.length;o=i++){const a=e[i],l=e[o],c=a.x,u=a.y,h=l.x,p=l.y;u>r!=p>r&&n<(h-c)*(r-u)/(p-u)+c&&(s=!s)}return s}function l5(t){const e=t.slice();return e.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),c5(e)}function c5(t){if(t.length<=1)return t.slice();const e=[];for(let r=0;r<t.length;r++){const s=t[r];for(;e.length>=2;){const i=e[e.length-1],o=e[e.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))e.pop();else break}e.push(s)}e.pop();const n=[];for(let r=t.length-1;r>=0;r--){const s=t[r];for(;n.length>=2;){const i=n[n.length-1],o=n[n.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))n.pop();else break}n.push(s)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}var u5=GN,XN=YN;const d5=u5,h5=w.forwardRef(({className:t,sideOffset:e=4,...n},r)=>d.jsx(XN,{ref:r,sideOffset:e,className:rt("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
418de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...n}));h5.displayName=XN.displayName;const Gw=[{icon:ri,title:"Growth Systems",tagline:"It's not more marketing. It's better systems.",path:"/services/growth-systems",items:[{label:"Lead Generation",path:"/services/lead-generation"},{label:"Conversion Optimization",path:"/services/conversion-optimization"},{label:"Funnel Development",path:"/services/landing-pages-funnels"},{label:"Email Automation",path:"/services/email-marketing"}]},{icon:fi,title:"AI Implementation & Automation",tagline:"Modern operations, intelligently automated.",path:"/services/ai-implementation",items:[{label:"Marketing Automation",path:"/services/ghl-pipeline-automation"},{label:"GoHighLevel CRM Integration",path:"/services/ghl-crm-setup"},{label:"AI Chat",path:"/services/ai-chatbots"},{label:"AI Voice",path:"/services/voice-ai-agents"}]},{icon:Qa,title:"Authority & Visibility",tagline:"Get cited. Get found. Get chosen.",path:"/services/authority-visibility",items:[{label:"SEO Services",path:"/services/seo-strategy"},{label:"Local SEO",path:"/services/local-seo"},{label:"Content Strategy",path:"/services/content-strategy"},{label:"AEO / AI Search",path:"/services/ai-search-optimization"}]}],Kw=[{label:"Home",path:"/"},{label:"About",path:"/about"},{label:"Services",path:"/services",hasMegaMenu:!0},{label:"Resources",path:"/blog"},{label:"Contact Us",path:"/contact"}];function f5(){const[t,e]=w.useState(!1),[n,r]=w.useState(!1),s=is(),i=o=>s.pathname===o;return d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"hidden lg:block bg-primary",children:d.jsxs("div",{className:"container-wide mx-auto flex items-center justify-between px-8 py-2 text-sm text-primary-foreground/80",children:[d.jsx("div",{className:"flex items-center gap-6",children:d.jsx("span",{children:"222 Capitol Street, Suite 522, Charleston, WV 25301"})}),d.jsxs("div",{className:"flex items-center gap-6",children:[d.jsx("a",{href:"tel:3048142445",className:"hover:text-accent transition-colors",children:"(304) 814-2445"}),d.jsx("a",{href:"mailto:[email protected]",className:"hover:text-accent transition-colors",children:"[email protected]"})]})]})}),d.jsxs("header",{className:"sticky top-0 z-50 bg-background/80 backdrop-blur-xl border-b border-border/60",children:[d.jsxs("div",{className:"container-wide mx-auto flex items-center justify-between px-4 lg:px-8 h-20",children:[d.jsx(ne,{to:"/",className:"flex items-center gap-3 shrink-0",children:d.jsx("img",{src:"https://lirp.cdn-website.com/53d6ba3a/dms3rep/multi/opt/Ideation+Digital+Logo-98w.webp",alt:"Ideation Digital Marketing",className:"h-11 w-auto"})}),d.jsxs("nav",{className:"hidden lg:flex items-center gap-1",children:[Kw.map(o=>o.hasMegaMenu?d.jsxs("div",{className:"relative group",children:[d.jsxs(ne,{to:o.path,className:`flex items-center gap-1 px-4 py-2 text-sm font-medium transition-colors rounded-full hover:bg-secondary ${i(o.path)||s.pathname.startsWith("/services")?"text-accent":"text-foreground"}`,children:[o.label,d.jsx(Ql,{className:"w-3.5 h-3.5"})]}),d.jsx("div",{className:"absolute top-full -left-32 pt-3 opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200",children:d.jsxs("div",{className:"bg-card rounded-3xl shadow-2xl border border-border p-6 w-[760px]",children:[d.jsx("div",{className:"grid grid-cols-3 gap-4",children:Gw.map(a=>d.jsxs(ne,{to:a.path,className:"group/hub relative rounded-2xl p-5 border border-border hover:border-foreground hover:bg-secondary transition-all",children:[d.jsxs("div",{className:"flex items-start justify-between mb-3",children:[d.jsx("div",{className:"w-10 h-10 rounded-xl bg-foreground text-background flex items-center justify-center",children:d.jsx(a.icon,{className:"w-5 h-5"})}),d.jsx(pe,{className:"w-4 h-4 text-muted-foreground group-hover/hub:text-accent group-hover/hub:translate-x-0.5 group-hover/hub:-translate-y-0.5 transition-all"})]}),d.jsx("h3",{className:"font-heading font-bold text-sm text-foreground group-hover/hub:text-accent transition-colors leading-tight",children:a.title}),d.jsx("p",{className:"serif italic text-xs text-muted-foreground mt-1 leading-snug",children:a.tagline}),d.jsx("ul",{className:"mt-3 pt-3 border-t border-border space-y-1.5",children:a.items.map(l
418=>d.jsx("li",{children:d.jsx(ne,{to:l.path,className:"block text-xs text-muted-foreground hover:text-accent transition-colors",children:l.label})},l.path))})]},a.title))}),d.jsxs("div",{className:"mt-5 pt-4 border-t border-border flex items-center justify-between",children:[d.jsx("p",{className:"text-xs text-muted-foreground",children:"Not sure where to start? Book a free AI Readiness Assessment."}),d.jsx("a",{href:"https://api.leadconnectorhq.com/widget/booking/gm0vY68yNGLxXwCHFKLC",target:"_blank",rel:"noopener noreferrer",className:"text-xs font-semibold text-accent hover:underline",children:"Book a call â"})]})]})})]},o.label):d.jsx(ne,{to:o.path,className:`px-4 py-2 text-sm font-medium transition-colors rounded-full hover:bg-secondary ${i(o.path)?"text-accent":"text-foreground"}`,children:o.label},o.path)),d.jsxs("a",{href:"https://api.leadconnectorhq.com/widget/booking/gm0vY68yNGLxXwCHFKLC",target:"_blank",rel:"noopener noreferrer",className:"ml-3 group inline-flex items-center gap-2 pl-5 pr-2 py-2 bg-foreground text-background text-sm font-semibold rounded-full hover:bg-primary transition-all",children:["Book a Call",d.jsx("span",{className:"w-7 h-7 rounded-full bg-background/15 flex items-center justify-center group-hover:translate-x-0.5 transition-transform",children:d.jsx(Ql,{className:"w-3.5 h-3.5 -rotate-90"})})]})]}),d.jsx("button",{onClick:()=>e(!t),className:"lg:hidden p-2 text-foreground","aria-label":"Toggle menu",children:t?d.jsx(P0,{className:"w-6 h-6"}):d.jsx(C3,{className:"w-6 h-6"})})]}),t&&d.jsx("div",{className:"lg:hidden bg-card border-t border-border animate-fade-in max-h-[80vh] overflow-y-auto",children:d.jsxs("nav",{className:"flex flex-col p-4 gap-1",children:[Kw.map(o=>d.jsx("div",{children:o.hasMegaMenu?d.jsxs(d.Fragment,{children:[d.jsxs("button",{onClick:()=>r(!n),className:`flex items-center justify-between w-full px-4 py-3 text-sm font-medium rounded-md transition-colors ${s.pathname.startsWith("/services")?"bg-secondary text-accent":"text-foreground hover:bg-secondary"}`,children:[o.label,d.jsx(Ql,{className:`w-4 h-4 transition-transform ${n?"rotate-180":""}`})]}),n&&d.jsx("div",{className:"pl-4 pb-2 space-y-3 mt-1",children:Gw.map(a=>d.jsxs("div",{children:[d.jsxs(ne,{to:a.path,onClick:()=>e(!1),className:"flex items-center gap-2 px-4 py-2 text-sm font-semibold text-foreground hover:text-accent transition-colors",children:[d.jsx(a.icon,{className:"w-4 h-4"}),a.title]}),a.items.map(l=>d.jsx(ne,{to:l.path,onClick:()=>e(!1),className:"block pl-10 pr-4 py-1.5 text-xs text-muted-foreground hover:text-accent transition-colors",children:l.label},l.path))]},a.title))})]}):d.jsx(ne,{to:o.path,onClick:()=>e(!1),className:`block px-4 py-3 text-sm font-medium rounded-md transition-colors ${i(o.path)?"bg-secondary text-accent":"text-foreground hover:bg-secondary"}`,children:o.label})},o.label)),d.jsx("a",{href:"https://api.leadconnectorhq.com/widget/booking/gm0vY68yNGLxXwCHFKLC",target:"_blank",rel:"noopener noreferrer",onClick:()=>e(!1),className:"mt-2 px-5 py-3 bg-cta text-cta-foreground text-sm font-semibold rounded-lg text-center",children:"Book a Strategy Call"})]})})]})]})}const p5=[{label:"Growth Systems",path:"/services/growth-systems"},{label:"AI Implementation & Automation",path:"/services/ai-implementation"},{label:"Authority & Visibility",path:"/services/authority-visibility"},{label:"Lead Generation",path:"/services/lead-generation"},{label:"GoHighLevel CRM",path:"/services/ghl-crm-setup"},{label:"AI Voice Agents",path:"/services/voice-ai-agents"}],m5=[{label:"About",path:"/about"},{label:"Contact Us",path:"/contact"},{label:"Done-With-You",path:"/done-with-you"},{label:"Charleston, WV",path:"/charleston"},{label:"Blog",path:"/blog"},{label:"Privacy Policy",path:"/privacy-policy"}],g5=[{icon:d3,href:"https://facebook.com/IdeationDigital",label:"Facebook"},{icon:B3,href:"https://twitter.com/ideationdigital",label:"Twitter"},{icon:v3,href:"https://instagram.com/ideation_digital",label:"Instagram"},{icon:w3,href:"https://linkedin.com/company/ideationdigital",label:"LinkedIn"},{icon:H3,href:"https://youtube.com/@clientsideation1455",label:"YouTube"},{icon:np,href:"mailto:[email protected]",label:"Email"}];function y5(){return d.jsxs("footer",{className:"relative bg-primary text-primary-foreground overflow-hidden",children:[d.jsx("div",{className:"absolute inset-0 bg-grid-dark opacity-30"}),d.jsx("div",{className:"absolute -top-40 right-0 w-[600px] h-[600px] bg-electric/15 rounded-full blur-3xl"}),d.jsx("div",{className:"absolute -bottom-40 left-0 w-[500px] h-[500px] bg-magenta/15 rounded-full blur-3xl"}),d.jsxs("div",{className:"container-wide mx-auto px-4 lg:px-8 relative",children:[d.jsx("div",{className:"border-b border-primary-foreground
418/10 py-16 lg:py-20",children:d.jsxs("div",{className:"grid lg:grid-cols-12 gap-8 items-end",children:[d.jsx("div",{className:"lg:col-span-8",children:d.jsxs("h2",{className:"font-heading font-black text-4xl lg:text-7xl tracking-tighter leading-[0.95]",children:["Ready to ",d.jsx("span",{className:"serif italic font-normal text-gradient",children:"grow?"})]})}),d.jsxs("div",{className:"lg:col-span-4 flex flex-col sm:flex-row lg:flex-col gap-3",children:[d.jsxs("a",{href:"https://api.leadconnectorhq.com/widget/booking/gm0vY68yNGLxXwCHFKLC",target:"_blank",rel:"noopener noreferrer",className:"group inline-flex items-center justify-between gap-3 pl-6 pr-2 py-3 bg-cta text-cta-foreground font-semibold rounded-full hover:bg-cta/90 transition-all shadow-2xl",children:["Book a Strategy Call",d.jsx("span",{className:"w-10 h-10 rounded-full bg-cta-foreground/10 flex items-center justify-center group-hover:translate-x-1 transition-transform",children:d.jsx(pe,{className:"w-4 h-4"})})]}),d.jsx(ne,{to:"/contact",className:"inline-flex items-center justify-center gap-2 px-6 py-3 border border-primary-foreground/20 text-primary-foreground font-medium rounded-full hover:bg-primary-foreground/5 transition-all",children:"Send a Message"})]})]})}),d.jsxs("div",{className:"py-16 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-12 gap-12",children:[d.jsxs("div",{className:"lg:col-span-4",children:[d.jsxs(ne,{to:"/",className:"inline-block",children:[d.jsxs("p",{className:"font-heading font-black text-3xl tracking-tight",children:["Ideation",d.jsx("span",{className:"text-accent",children:"."})]}),d.jsx("p",{className:"text-xs uppercase tracking-[0.3em] text-primary-foreground/50 mt-1",children:"Digital Studio"})]}),d.jsx("p",{className:"text-primary-foreground/70 mt-6 leading-relaxed max-w-sm",children:"AI-powered marketing systems for ambitious operators. Built in Charleston, WV. Trusted nationwide."}),d.jsxs("div",{className:"space-y-3 text-sm text-primary-foreground/70 mt-8",children:[d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsx(R0,{className:"w-4 h-4 mt-0.5 shrink-0 text-accent"}),d.jsxs("div",{children:[d.jsx("p",{children:"222 Capitol Street, Suite 522"}),d.jsx("p",{children:"Charleston, WV 25301"})]})]}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(cN,{className:"w-4 h-4 shrink-0 text-accent"}),d.jsx("a",{href:"tel:3048142445",className:"hover:text-accent transition-colors",children:"(304) 814-2445"})]}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(np,{className:"w-4 h-4 shrink-0 text-accent"}),d.jsx("a",{href:"mailto:[email protected]",className:"hover:text-accent transition-colors",children:"[email protected]"})]})]})]}),d.jsxs("div",{className:"lg:col-span-3",children:[d.jsx("h4",{className:"font-heading font-bold text-xs uppercase tracking-[0.2em] mb-6 text-accent",children:"Services"}),d.jsx("ul",{className:"space-y-3",children:p5.map(t=>d.jsx("li",{children:d.jsxs(ne,{to:t.path,className:"group text-sm text-primary-foreground/70 hover:text-accent transition-colors inline-flex items-center gap-1",children:[t.label,d.jsx(pe,{className:"w-3 h-3 opacity-0 group-hover:opacity-100 transition-opacity"})]})},t.path))})]}),d.jsxs("div",{className:"lg:col-span-3",children:[d.jsx("h4",{className:"font-heading font-bold text-xs uppercase tracking-[0.2em] mb-6 text-accent",children:"Company"}),d.jsx("ul",{className:"space-y-3",children:m5.map(t=>d.jsx("li",{children:d.jsxs(ne,{to:t.path,className:"group text-sm text-primary-foreground/70 hover:text-accent transition-colors inline-flex items-center gap-1",children:[t.label,d.jsx(pe,{className:"w-3 h-3 opacity-0 group-hover:opacity-100 transition-opacity"})]})},t.path))})]}),d.jsxs("div",{className:"lg:col-span-2",children:[d.jsx("h4",{className:"font-heading font-bold text-xs uppercase tracking-[0.2em] mb-6 text-accent",children:"Follow"}),d.jsx("div",{className:"grid grid-cols-3 gap-2",children:g5.map(t=>d.jsx("a",{href:t.href,target:"_blank",rel:"noopener noreferrer","aria-label":t.label,className:"aspect-square rounded-xl bg-primary-foreground
418/5 border border-primary-foreground/10 flex items-center justify-center hover:bg-accent hover:border-accent transition-colors",children:d.jsx(t.icon,{className:"w-4 h-4"})},t.label))}),d.jsxs("div",{className:"mt-8 p-4 rounded-2xl bg-primary-foreground/5 border border-primary-foreground/10 text-center",children:[d.jsx("p",{className:"font-heading font-black text-2xl text-cta",children:"5.0â
"}),d.jsx("p",{className:"text-xs uppercase tracking-wider text-primary-foreground/60 mt-1",children:"Google Rated"})]})]})]})]}),d.jsx("div",{className:"border-t border-primary-foreground/10 relative",children:d.jsxs("div",{className:"container-wide mx-auto px-4 lg:px-8 py-6 flex flex-col sm:flex-row items-center justify-between gap-4 text-xs text-primary-foreground/50",children:[d.jsxs("p",{children:["© ",new Date().getFullYear()," Ideation Digital â All Rights Reserved"]}),d.jsxs("div",{className:"flex items-center gap-6",children:[d.jsx(ne,{to:"/privacy-policy",className:"hover:text-accent transition-colors",children:"Privacy Policy"}),d.jsx(ne,{to:"/charleston",className:"hover:text-accent transition-colors",children:"Charleston, WV"})]})]})})]})}function v5(){const{pathname:t}=is();return w.useEffect(()=>{window.scrollTo(0,0)},[t]),null}function b5(){return d.jsxs("div",{className:"min-h-screen flex flex-col",children:[d.jsx(v5,{}),d.jsx(f5,{}),d.jsx("main",{className:"flex-1",children:d.jsx(dL,{})}),d.jsx(y5,{})]})}const x5="/assets/hero-abstract-KL0hDzm1.jpg",w5="/assets/orb-gradient-r8lxFFM5.jpg",k5="/assets/team-collab-o3-62Vvc.jpg",ZN="/assets/ai-dashboard-0YZxbliq.jpg",eA="/assets/blob-purple-C-xcxr_n.jpg",S5="/assets/blob-amber-wDxAVm9J.jpg",C5=[{icon:ri,title:"Growth Systems",desc:"It's not more marketing. It's better systems. Lead gen, CRO, funnels, email automation.",path:"/services/growth-systems",tone:"electric"},{icon:fi,title:"AI Implementation & Automation",desc:"Voice AI, AI chat, GoHighLevel CRM, marketing automation â modern operations on rails.",path:"/services/ai-implementation",tone:"magenta"},{icon:Qa,title:"Authority & Visibility",desc:"SEO, Local SEO, content strategy, and AEO â get cited in Google AND in AI search.",path:"/services/authority-visibility",tone:"accent"}],E5=[{name:"Danielle Ellis",role:"Business Owner",text:"Thanks to Sean's guidance, my business is showing up at the top of AI and Google search results. He makes complex digital marketing accessible."},{name:"Jeremy Myers",role:"Founder",text:"Absolute game changer. Sean is personable, knowledgeable, and really understands marketing from a business owner's perspective."},{name:"Dianna Gorrell",role:"Operations Director",text:"Hands down the BEST marketing agency I have worked with. Unmatched attention to detail and promptness to action."},{name:"Joseph Justice",role:"CEO",text:"Real consultants who care about your business. Great work technically, but they take the time to understand your goals."}],T5=[{num:"01",title:"Consultation",desc:"We listen to your vision, challenges, and growth goals."},{num:"02",title:"Strategy",desc:"Custom AI + marketing roadmap â no contracts, no fluff."},{num:"03",title:"Implementation",desc:"Our team builds and ships while you run your business."},{num:"04",title:"Growth",desc:"Measure, optimize, scale â every month, every channel."}],N5=[{value:"5.0â
",label:"Google Rating"},{value:"17+",label:"Verified Reviews"},{value:"24/7",label:"Voice AI Coverage"},{value:"100%",label:"Owner-Operated"}],Yw=["AI Marketing","Voice AI","GoHighLevel","SEO","Paid Ads","Automation","Lead Gen","Web Design","AI Search","CRM","Email & SMS","Reputation"],A5=[{icon:s3,label:"Professional Services"},{icon:M3,label:"Law Firms"},{icon:L3,label:"Healthcare Practices"},{icon:h3,label:"Contractors"},{icon:y3,label:"Home Service Businesses"},{icon:g3,label:"Nonprofits"},{icon:R0,label:"Multi-Location Businesses"},{icon:D3,label:"Established Local & Regional"}],_5=[{icon:o3,text:"Our marketing isn't producing results."},{icon:c3,text:"Our website isn't helping the business grow."},{icon:Qa,text:"We need better visibility on Google."},{icon:fi,text:"We need help understanding AI and automation."},{icon:oN,text:"We can't tell what's working anymore."},{icon:ri,text:"We've outgrown our current marketing systems."},{icon:O3,text:"We've hired agencies before and still aren't getting results."}],Jw={traditional:["Website","SEO","Ads","Reporting"],ideation:["Growth System","Visibility System","Lead Generation System","Automation System","Measurement System"]};function j5(){return d.jsxs(d.Fragment,{children:[d.jsxs("section",{className:"relative bg-primary overflow-hidden",children:[d.jsxs("div",{className:"absolute inset-0",children:[d.jsx("img",{src:x5,alt:"",className:"w-full h-full object-cover opacity-40",width:1920,height:1080}),d.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-primary via-primary/85 to-primary/30"}),d.jsx("div",{className:"absolute inset-0 bg-grid-dark opacity-50"})]}),d.jsx("div",{className:"absolute top-20 right-10 w-72 h-72 rounded-full bg-electric/30 blur-3xl animate-blob"}),d.jsx("div",{className:"absolute bottom-10 left-1/3 w-96 h-96 rounded-full bg-magenta/20 blur-3xl animate-blob",style:{animationDelay:"4s"}}),d.jsxs("div",{className:"container-wide mx-auto px-4 lg:px-8 pt-20 lg:pt-28 pb-24 lg:pb-32 relative",children:[d.jsxs("h1",{className:"font-heading font-black text-primary-foreground leading-[0.95] animate-fade-up text-[14vw] sm:text-[10vw] lg:text-[8.5rem] xl:text-[10rem] tracking-tighter",style:{animationDelay:"0.1s"},children:["Marketing",d.jsx("br",{}),d.jsx("span",{className:"serif italic font-normal text-gradient",children:"re-engineered"}),d.jsx("br",{}),d.jsx("span",{className:"text-stroke-light",children:"for AI."})]}),d.jsxs("div",{className:"grid lg:grid-cols-12 gap-8 mt-12 lg:mt-16 items-end",children:[d.jsx("div",{className:"lg:col-span-7 animate-fade-up",style:{animationDelay:"0.3s"},children:d.jsxs("p",{className:"text-lg lg:text-xl text-primary-foreground
418/75 leading-relaxed max-w-xl",children:["For ",d.jsx("span",{className:"text-accent",children:"established businesses"})," ready to build smarter growth systems through ",d.jsx("span",{className:"text-accent",children:"AI, automation, search visibility"}),", and performance-focused marketing."]})}),d.jsxs("div",{className:"lg:col-span-5 flex flex-col sm:flex-row gap-3 animate-fade-up lg:justify-end",style:{animationDelay:"0.4s"},children:[d.jsxs("a",{href:"https://api.leadconnectorhq.com/widget/booking/gm0vY68yNGLxXwCHFKLC",target:"_blank",rel:"noopener noreferrer",className:"group inline-flex items-center justify-between gap-3 px-6 py-4 bg-cta text-cta-foreground font-semibold rounded-full hover:bg-cta/90 transition-all shadow-2xl",children:["Book a Free Strategy Call",d.jsx("span",{className:"w-9 h-9 rounded-full bg-cta-foreground/10 flex items-center justify-center group-hover:translate-x-1 transition-transform",children:d.jsx(pe,{className:"w-4 h-4"})})]}),d.jsx(ne,{to:"/services",className:"inline-flex items-center justify-center gap-2 px-6 py-4 border border-primary-foreground/20 text-primary-foreground font-medium rounded-full hover:bg-primary-foreground/5 transition-all",children:"Explore Services"})]})]})]}),d.jsx("div",{className:"relative border-t border-primary-foreground/10 py-6 overflow-hidden bg-primary/40",children:d.jsx("div",{className:"flex gap-12 animate-marquee whitespace-nowrap",children:[...Yw,...Yw].map((t,e)=>d.jsxs("div",{className:"flex items-center gap-12 shrink-0",children:[d.jsx("span",{className:"text-primary-foreground/60 font-heading font-medium text-2xl lg:text-3xl",children:t}),d.jsx(rp,{className:"w-5 h-5 text-accent shrink-0"})]},e))})})]}),d.jsx("section",{className:"bg-background border-b border-border",children:d.jsx("div",{className:"container-wide mx-auto px-4 lg:px-8",children:d.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 divide-x divide-border",children:N5.map(t=>d.jsxs("div",{className:"py-10 px-6 text-center first:pl-0 last:pr-0",children:[d.jsx("p",{className:"font-heading font-black text-4xl lg:text-6xl text-foreground tracking-tight",children:t.value}),d.jsx("p",{className:"mt-2 text-xs uppercase tracking-widest text-muted-foreground",children:t.label})]},t.label))})})}),d.jsxs("section",{className:"section-padding bg-background relative overflow-hidden",children:[d.jsx("div",{className:"absolute top-1/2 left-0 w-96 h-96 bg-electric/10 rounded-full blur-3xl -translate-y-1/2"}),d.jsxs("div",{className:"container-wide mx-auto relative",children:[d.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-end justify-between gap-8 mb-14",children:[d.jsxs("div",{className:"max-w-2xl",children:[d.jsxs("h2",{className:"font-heading font-black text-4xl lg:text-6xl text-foreground tracking-tight leading-[1]",children:["Three hubs. ",d.jsx("span",{className:"serif italic font-normal text-gradient",children:"One execution layer."})]}),d.jsx("p",{className:"mt-6 text-lg text-muted-foreground leading-relaxed",children:"We don't sell disconnected marketing services. We build integrated growth systems designed to improve visibility, generate opportunities, automate repetitive work, and help businesses scale more effectively."})]}),d.jsxs(ne,{to:"/services",className:"group inline-flex items-center gap-2 text-foreground font-semibold border-b-2 border-foreground pb-1 hover:border-accent hover:text-accent transition-colors shrink-0",children:["View all services ",d.jsx(pe,{className:"w-4 h-4 group-hover:translate-x-1 group-hover:-translate-y-1 transition-transform"})]})]}),d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-5",children:C5.map(t=>{const e={electric:"from-electric/90 to-electric/60 text-electric-foreground",accent:"from-accent/90 to-accent/60 text-accent-foreground",magenta:"from-magenta/90 to-magenta/60 text-magenta-foreground",cta:"from-cta to-cta/70 text-cta-foreground"};return d.jsxs(ne,{to:t.path,className:`group relative overflow-hidden rounded-3xl p-7 lg:p-8 hover-lift bg-gradient-to-br ${e[t.tone]}`,children:[d.jsx("div",{className:"absolute -bottom-20 -right-20 w-64 h-64 roun
418ded-full bg-white/10 blur-2xl group-hover:scale-125 transition-transform duration-700"}),d.jsxs("div",{className:"relative flex flex-col gap-8",children:[d.jsxs("div",{className:"flex items-start justify-between",children:[d.jsx(t.icon,{className:"w-8 h-8",strokeWidth:1.75}),d.jsx(pe,{className:"w-6 h-6 opacity-60 group-hover:opacity-100 group-hover:translate-x-1 group-hover:-translate-y-1 transition-all"})]}),d.jsxs("div",{children:[d.jsx("h3",{className:"font-heading font-bold text-2xl lg:text-3xl leading-[1.1]",children:t.title}),d.jsx("p",{className:"mt-3 text-sm lg:text-base opacity-90 leading-relaxed",children:t.desc})]})]})]},t.path)})})]})]}),d.jsx("section",{className:"section-padding bg-secondary relative overflow-hidden",children:d.jsxs("div",{className:"container-wide mx-auto px-4 lg:px-8 relative",children:[d.jsxs("div",{className:"max-w-3xl mb-14",children:[d.jsx("p",{className:"text-sm uppercase tracking-widest text-accent font-semibold mb-4",children:"Who We Help"}),d.jsxs("h2",{className:"font-heading font-black text-4xl lg:text-6xl text-foreground tracking-tight leading-[1.05]",children:["Built for businesses ",d.jsx("span",{className:"serif italic font-normal text-gradient",children:"ready to grow."})]}),d.jsx("p",{className:"mt-6 text-lg text-muted-foreground leading-relaxed",children:"Ideation Digital works best with organizations that already have a foundation and are ready to improve growth, visibility, efficiency, lead generation, and marketing performance."})]}),d.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-10",children:A5.map(t=>d.jsxs("div",{className:"bg-card border border-border rounded-2xl p-5 hover:border-foreground transition-colors flex flex-col gap-3",children:[d.jsx(t.icon,{className:"w-6 h-6 text-accent",strokeWidth:1.75}),d.jsx("p",{className:"font-heading font-semibold text-foreground text-sm lg:text-base leading-tight",children:t.label})]},t.label))}),d.jsxs("div",{className:"rounded-3xl border border-border bg-card p-6 lg:p-8 flex flex-col md:flex-row md:items-center justify-between gap-4",children:[d.jsxs("div",{children:[d.jsx("p",{className:"font-heading font-bold text-foreground text-lg",children:"Looking for a basic website or just getting started?"}),d.jsx("p",{className:"text-muted-foreground mt-1",children:"222 Websites may be a better fit."})]}),d.jsxs("a",{href:"https://222websites.com",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-5 py-3 border border-foreground
418/20 text-foreground font-medium rounded-full hover:bg-foreground hover:text-background transition-all shrink-0",children:["Visit 222 Websites ",d.jsx(pe,{className:"w-4 h-4"})]})]})]})}),d.jsxs("section",{className:"relative bg-primary overflow-hidden",children:[d.jsx("div",{className:"absolute inset-0 bg-grid-dark opacity-40"}),d.jsx("div",{className:"container-wide mx-auto px-4 lg:px-8 py-24 lg:py-32 relative",children:d.jsxs("div",{className:"grid lg:grid-cols-12 gap-12 items-center",children:[d.jsxs("div",{className:"lg:col-span-5 relative",children:[d.jsx("div",{className:"absolute -top-10 -left-10 w-40 h-40 bg-magenta/40 rounded-full blur-3xl animate-blob"}),d.jsxs("div",{className:"relative rounded-3xl overflow-hidden border border-white/10",children:[d.jsx("img",{src:ZN,alt:"AI marketing dashboard",className:"w-full aspect-[4/5] object-cover",loading:"lazy",width:1280,height:1600}),d.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-primary/80 to-transparent"}),d.jsx("div",{className:"absolute bottom-6 left-6 right-6 glass-dark rounded-2xl p-4",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"w-10 h-10 rounded-full bg-accent/20 flex items-center justify-center",children:d.jsx(ri,{className:"w-5 h-5 text-accent"})}),d.jsxs("div",{children:[d.jsx("p",{className:"text-primary-foreground font-semibold text-sm",children:"+312% organic growth"}),d.jsx("p",{className:"text-primary-foreground/60 text-xs",children:"across AI search engines"})]})]})})]})]}),d.jsxs("div",{className:"lg:col-span-7",children:[d.jsxs("h2",{className:"font-heading font-black text-4xl lg:text-6xl text-primary-foreground leading-[1.05] tracking-tight",children:["Built for the era where ",d.jsx("span",{className:"serif italic font-normal text-accent",children:"search means more"})," than Google."]}),d.jsx("p",{className:"mt-6 text-lg text-primary-foreground/70 leading-relaxed max-w-xl",children:"Buyers now ask ChatGPT, Perplexity, and Gemini before they type a single word into a browser. We engineer your visibility, your voice, and your funnel for the AI-first internet."}),d.jsx("div",{className:"mt-10 grid sm:grid-cols-2 gap-4",children:[{icon:fi,title:"AI-First Strategy",desc:"Not bolted on â built in."},{icon:r3,title:"Voice + Chat Agents",desc:"24/7 lead capture & qualification."},{icon:I0,title:"GHL Power-Stack",desc:"Full CRM + automation infrastructure."},{icon:ri,title:"Performance Obsessed",desc:"We measure what matters."}].map(t=>d.jsxs("div",{className:"glass-dark rounded-2xl p-5 hover:border-accent/40 transition-colors",children:[d.jsx(t.icon,{className:"w-6 h-6 text-accent mb-3"}),d.jsx("p",{className:"font-heading font-bold text-primary-foreground",children:t.title}),d.jsx("p",{className:"text-primary-foreground/60 text-sm mt-1",children:t.desc})]},t.title))})]})]})})]}),d.jsxs("section",{className:"section-padding bg-background relative overflow-hidden",children:[d.jsx("img",{src:eA,alt:"",className:"absolute -top-20 -right-20 w-80 h-80 object-contain mix-blend-multiply opacity-60 animate-blob",loading:"lazy",width:800,height:800}),d.jsx("img",{src:S5,alt:"",className:"absolute -bottom-20 -left-20 w-80 h-80 object-contain mix-blend-multiply opacity-50 animate-blob",style:{animationDelay:"6s"},loading:"lazy",width:800,height:800}),d.jsxs("div",{className:"container-wide mx-auto relative",children:[d.jsx("div",{className:"text-center max-w-2xl mx-auto mb-16",children:d.jsxs("h2",{className:"font-heading font-black text-4xl lg:text-6xl text-foreground tracking-tight leading-[1.05]",children:["From ",d.jsx("span",{className:"serif italic font-normal text-gradient",children:"first call"})," to compounding growth."]})}),d.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-4 gap-
4185",children:T5.map((t,e)=>d.jsxs("div",{className:"group relative bg-card rounded-3xl p-8 border border-border hover:border-foreground transition-all overflow-hidden",children:[d.jsx("div",{className:"absolute top-0 right-0 w-32 h-32 bg-gradient-to-br from-accent/10 to-electric/10 rounded-full blur-2xl group-hover:scale-150 transition-transform duration-700"}),d.jsxs("div",{className:"relative",children:[d.jsxs("div",{className:"flex items-center justify-between mb-8",children:[d.jsx("span",{className:"serif font-normal text-7xl text-foreground/15 group-hover:text-foreground/40 transition-colors",children:t.num}),d.jsx("div",{className:"w-10 h-10 rounded-full border-2 border-foreground/20 flex items-center justify-center group-hover:border-accent group-hover:bg-accent transition-colors",children:d.jsx(t3,{className:"w-4 h-4 group-hover:text-accent-foreground"})})]}),d.jsx("h3",{className:"font-heading font-bold text-2xl text-foreground",children:t.title}),d.jsx("p",{className:"text-muted-foreground mt-3 leading-relaxed",children:t.desc})]})]},t.num))})]})]}),d.jsx("section",{className:"section-padding bg-background relative overflow-hidden border-t border-border",children:d.jsxs("div",{className:"container-wide mx-auto px-4 lg:px-8 relative",children:[d.jsxs("div",{className:"max-w-3xl mb-14",children:[d.jsx("p",{className:"text-sm uppercase tracking-widest text-accent font-semibold mb-4",children:"Why We're Different"}),d.jsxs("h2",{className:"font-heading font-black text-4xl lg:text-6xl text-foreground tracking-tight leading-[1.05]",children:["Most agencies sell services. ",d.jsx("span",{className:"serif italic font-normal text-gradient",children:"We build systems."})]})]}),d.jsxs("div",{className:"grid md:grid-cols-2 gap-5",children:[d.jsxs("div",{className:"rounded-3xl border border-border bg-card p-8 lg:p-10",children:[d.jsx("p",{className:"text-xs uppercase tracking-widest text-muted-foreground font-semibold mb-2",children:"Traditional Agency"}),d.jsx("h3",{className:"font-heading font-bold text-2xl text-foreground mb-6",children:"Disconnected deliverables"}),d.jsx("ul",{className:"space-y-3",children:Jw.traditional.map(t=>d.jsxs("li",{className:"flex items-center gap-3 text-muted-foreground",children:[d.jsx("span",{className:"w-6 h-6 rounded-full bg-muted flex items-center justify-center shrink-0",children:d.jsx(P0,{className:"w-3.5 h-3.5"})}),d.jsx("span",{className:"text-base",children:t})]},t))})]}),d.jsxs("div",{className:"rounded-3xl bg-primary text-primary-foreground p-8 lg:p-10 relative overflow-hidden",children:[d.jsx("div",{className:"absolute -top-20 -right-20 w-64 h-64 rounded-full bg-accent/20 blur-3xl"}),d.jsxs("div",{className:"relative",children:[d.jsx("p",{className:"text-xs uppercase tracking-widest text-accent font-semibold mb-2",children:"Ideation Digital"}),d.jsx("h3",{className:"font-heading font-bold text-2xl mb-6",children:"Integrated growth systems"}),d.jsx("ul",{className:"space-y-3",children:Jw.ideation.map(t=>d.jsxs("li",{className:"flex items-center gap-3",children:[d.jsx("span",{className:"w-6 h-6 rounded-full bg-accent flex items-center justify-center shrink-0",children:d.jsx(aN,{className:"w-3.5 h-3.5 text-accent-foreground"})}),d.jsx("span",{className:"text-base font-medium",children:t})]},t))})]})]})]})]})}),d.jsxs("section",{className:"relative h-[60vh] min-h-[500px] overflow-hidden",children:[d.jsx("img",{src:k5,alt:"Ideation Digital team",className:"absolute inset-0 w-full h-full object-cover",loading:"lazy",width:1280,height:960}),d.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-primary via-primary/40 to-transparent"}),d.jsx("div",{className:"container-wide mx-auto px-4 lg:px-8 h-full relative flex items-end pb-16",children:d.jsx("div",{className:"max-w-3xl",children:d.jsxs("h2",{className:"font-heading font-black text-4xl lg:text-6xl text-primary-foreground leading-[1.05] tracking-tight",children:["We focus on ",d.jsx("span",{className:"serif italic font-normal text-cta",children:"your business growth"}),", while you experience your vision."]})})})]}),d.jsx("section",{className:"section-padding bg-background relative overflow-hidden",children:d.jsxs("div",{className:"container-wide mx-auto px-4 lg:px-8 relative",children:[d.jsxs("div",{className:"max-w-3xl mb-14",children:[d.jsx("p",{className:"text-sm uppercase tracking-widest text-accent font-semibold mb-4",children:"Sound Familiar?"}),d.jsxs("h2",{className:"font-heading font-black text-4xl lg:text-6xl text-foreground tracking-tight leading-[1.05]",children:["Most clients come to us ",d.jsx("span",{className:"serif italic font-normal text-gradient",children:"because..."})]})]}),d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5",children:_5.map(t=>d.jsxs("div",{className:"bg-card border border-border rounded-2xl p-6 hover:border-foreground transition-colors flex items-start gap-4",children:[d.jsx("div",{className:"w-11 h-11 rounded-full bg-accent/10 flex items-center justify-center shrink-0",children:d.jsx(t.icon,{className:"w-5 h-5 text-accent",strokeWidth:1.75})}),d.jsxs("p",{className:"text-foreground leading-relaxed pt-1.5",children:['"',t.text,'"']})]},t.text))})]})}),d.jsx("section",{className:"section-padding bg-secondary",children:d.jsxs("div",{className:"container-wide mx-auto",children:[d.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-end justify-between gap-8 mb-14",children:[d.jsxs("div",{className:"max-w-2xl",children:[d.jsxs("h2",{className:"font-heading font-black text-4xl lg:text-6xl text-foreground tracking-tight leading-[1.05]",children:["The clients we serve ",d.jsx("span",{className:"serif italic font-normal text-gradient",children:"say it best."})]}),d.jsx("p",{className:"mt-6 text-lg text-muted-foreground leading-relaxed",children:"Most clients come to us after investing in marketing that failed to produce meaningful business results. These are their experiences after implementing a more strategic approach."})]}),d.jsxs("div",{className:"flex items-center gap-4",children:[d.jsx("div",{className:"flex -sp
418ace-x-2",children:[...Array(5)].map((t,e)=>d.jsx(Mw,{className:"w-6 h-6 fill-cta text-cta"},e))}),d.jsx("p",{className:"font-heading font-bold text-foreground text-lg",children:"5.0 / 5.0"})]})]}),d.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-5",children:E5.map((t,e)=>d.jsxs("div",{className:`bg-card rounded-3xl p-7 border border-border hover-lift ${e%2===1?"lg:translate-y-8":""}`,children:[d.jsx("div",{className:"flex gap-1 mb-5",children:[...Array(5)].map((n,r)=>d.jsx(Mw,{className:"w-4 h-4 fill-cta text-cta"},r))}),d.jsxs("p",{className:"text-foreground leading-relaxed text-sm",children:['"',t.text,'"']}),d.jsxs("div",{className:"mt-6 pt-6 border-t border-border",children:[d.jsx("p",{className:"font-heading font-bold text-foreground",children:t.name}),d.jsx("p",{className:"text-muted-foreground text-xs uppercase tracking-wider mt-1",children:t.role})]})]},t.name))})]})}),d.jsxs("section",{className:"relative bg-primary overflow-hidden",children:[d.jsx("img",{src:w5,alt:"",className:"absolute right-0 top-1/2 -translate-y-1/2 w-[600px] h-[600px] object-contain opacity-70 animate-spin-slow",loading:"lazy",width:1024,height:1024}),d.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-primary via-primary/80 to-transparent"}),d.jsx("div",{className:"container-wide mx-auto px-4 lg:px-8 py-24 lg:py-32 relative",children:d.jsxs("div",{className:"max-w-3xl",children:[d.jsxs("h2",{className:"font-heading font-black text-5xl lg:text-7xl text-primary-foreground leading-[0.95] tracking-tight",children:["Ready to build a marketing engine that ",d.jsx("span",{className:"serif italic font-normal text-gradient",children:"actually compounds?"})]}),d.jsx("p",{className:"mt-8 text-xl text-primary-foreground/70 max-w-xl leading-relaxed",children:"Free 30-minute strategy call. No contract. No pressure. Just clarity on what's possible."}),d.jsxs("div",{className:"mt-10 flex flex-col sm:flex-row gap-4",children:[d.jsxs("a",{href:"https://api.leadconnectorhq.com/widget/booking/gm0vY68yNGLxXwCHFKLC",target:"_blank",rel:"noopener noreferrer",className:"group inline-flex items-center justify-between gap-3 px-7 py-4 bg-cta text-cta-foreground font-semibold rounded-full hover:bg-cta/90 transition-all shadow-2xl",children:["Book Your Strategy Call",d.jsx("span",{className:"w-9 h-9 rounded-full bg-cta-foreground/10 flex items-center justify-center group-hover:translate-x-1 transition-transform",children:d.jsx(pe,{className:"w-4 h-4"})})]}),d.jsx(ne,{to:"/contact",className:"inline-flex items-center justify-center gap-2 px-7 py-4 border border-primary-foreground/20 text-primary-foreground font-medium rounded-full hover:bg-primary-foreground/5 transition-all",children:"Send a Message"})]})]})})]})]})}function Qw({href:t,label:e,isPrimary:n}){const r=t.startsWith("http");if(n){const i="group inline-flex items-center justify-between gap-3 pl-7 pr-2 py-3 bg-cta text-cta-foreground font-semibold rounded-full hover:bg-cta/90 transition-all shadow-2xl",o=d.jsx("span",{className:"w-10 h-10 rounded-full bg-cta-foreground/10 flex items-center justify-center group-hover:translate-x-1 transition-transform",children:d.jsx(pe,{className:"w-4 h-4"})});return r?d.jsxs("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:i,children:[e,o]}):d.jsxs(ne,{to:t,className:i,children:[e,o]})}const s="inline-flex items-center justify-center gap-2 px-7 py-3 border border-primary-foreground/20 text-primary-foreground font-medium rounded-full hover:bg-primary-foreground/5 transition-all";return r?d.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:s,children:e}):d.jsx(ne,{to:t,className:s,children:e})}function tl({title:t,subtitle:e,compact:n,eyebrow:r,italicWords:s=1,ctaLabel:i,ctaHref:o,secondaryLabel:a,secondaryHref:l}){const c=t.split(" "),u=c.slice(0,c.length-s).join(" "),h=c.slice(c.length-s).join(" ");return d.jsxs("section",{className:`relative bg-primary overflow-hidden ${n?"pt-24 pb-16 lg:pt-28 lg:pb-20":"pt-28 pb-20 lg:pt-36 lg:pb-28"}`,children:[d.jsx("div",{className:"absolute inset-0 bg-grid-dark opacity-40"}),d.jsx("div",{className:"absolute -top-20 right-0 w-[500px] h-[500px] bg-electric/25 rounded-full blur-3xl animate-blob"}),d.jsx("div",{className:"absolute -bottom-32 left-1/4 w-[420px] h-[420px] bg-magenta/20 rounded-full blur-3xl animate-blob",style:{animationDelay:"5s"}}),d.jsx("div",{className:"absolute top-1/3 left-0 w-72 h-72 bg-cta/15 rounded-full blur-3xl animate-blob",style:{animationDelay:"9s"}}),d.jsxs("div",{className:"container-wide mx-auto px-4 lg:px-8 relative",children:[d.jsxs("h1",{className:`font-heading font-black text-primary-foreground max-w-5xl tracking-tighter leading-[0.95] animate-fade-up ${n?"text-4xl sm:text-5xl lg:text-7xl":"text-5xl sm:text-6xl lg:text-8xl"}`,style:{animationDelay:"0.1s"},children:[u,u&&d.jsx("br",{}),d.jsx("span",{className:"serif italic font-normal text-gradient",children:h})]}),e&&d.jsx("p",{className:"mt-8 text-lg lg:text-xl text-primary-foreground
418/70 max-w-2xl leading-relaxed animate-fade-up",style:{animationDelay:"0.25s"},children:e}),(i||a)&&d.jsxs("div",{className:"mt-10 flex flex-col sm:flex-row gap-4 animate-fade-up",style:{animationDelay:"0.35s"},children:[i&&o&&d.jsx(Qw,{href:o,label:i,isPrimary:!0}),a&&l&&d.jsx(Qw,{href:l,label:a,isPrimary:!1})]})]})]})}function ut({eyebrow:t,title:e,italicWords:n=1,subtitle:r,align:s="left",invert:i=!1}){const o=e.split(" "),a=o.slice(0,o.length-n).join(" "),l=o.slice(o.length-n).join(" "),c=s==="center",u=i?"text-primary-foreground":"text-foreground",h=i?"text-primary-foreground/70":"text-muted-foreground";return d.jsxs("div",{className:`${c?"text-center mx-auto":""} max-w-3xl`,children:[d.jsxs("h2",{className:`font-heading font-black tracking-tight leading-[1.05] ${u} text-3xl sm:text-4xl lg:text-6xl`,children:[a," ",a&&d.jsx("br",{className:"hidden sm:block"}),d.jsx("span",{className:"serif italic font-normal text-gradient",children:l})]}),r&&d.jsx("p",{className:`mt-6 text-lg leading-relaxed ${h} max-w-2xl ${c?"mx-auto":""}`,children:r})]})}function up({words:t,invert:e=!1,slow:n=!1}){return d.jsx("div",{className:`relative py-6 overflow-hidden border-y ${e?"bg-primary border-primary-foreground/10":"bg-background border-border"}`,children:d.jsx("div",{className:`flex gap-12 ${n?"animate-marquee-slow":"animate-marquee"} whitespace-nowrap`,children:[...t,...t,...t].map((r,s)=>d.jsxs("div",{className:"flex items-center gap-12 shrink-0",children:[d.jsx("span",{className:`font-heading font-medium text-2xl lg:text-3xl ${e?"text-primary-foreground/60":"text-foreground/40"}`,children:r}),d.jsx(rp,{className:"w-5 h-5 text-accent shrink-0"})]},s))})})}const O5="https://api.leadconnectorhq.com/widget/booking/gm0vY68yNGLxXwCHFKLC";function Nr({title:t="Ready to take your business to new heights?",subtitle:e="You don't have to know everything. Our team of experts builds done-for-you AI marketing systems that support the growth you envision.",buttonText:n="Book Your Free Consultation",buttonLink:r=O5}){const s=r.startsWith("http"),i="group inline-flex items-center gap-3 mt-10 pl-7 pr-2 py-3 bg-cta text-cta-foreground font-semibold rounded-full hover:bg-cta/90 transition-all shadow-2xl",o="w-10 h-10 rounded-full bg-cta-foreground/10 flex items-center justify-center group-hover:translate-x-1 transition-transform";return d.jsxs("section",{className:"relative bg-primary overflow-hidden",children:[d.jsx("div",{className:"absolute inset-0 bg-grid-dark opacity-40"}),d.jsx("div",{className:"absolute -top-20 -left-20 w-96 h-96 bg-electric/20 rounded-full blur-3xl animate-blob"}),d.jsx("div",{className:"absolute -bottom-20 -right-20 w-96 h-96 bg-magenta/20 rounded-full blur-3xl animate-blob",style:{animationDelay:"4s"}}),d.jsx("div",{className:"container-wide mx-auto section-padding relative",children:d.jsxs("div",{className:"max-w-4xl",children:[d.jsxs("h2",{className:"font-heading font-black text-4xl sm:text-5xl lg:text-7xl text-primary-foreground tracking-tight leading-[1] max-w-3xl",children:[t.split(" ").slice(0,-2).join(" ")," ",d.jsx("span",{className:"serif italic font-normal text-gradient",children:t.split(" ").slice(-2).join(" ")})]}),d.jsx("p",{className:"mt-8 text-lg lg:text-xl text-primary-foreground/70 max-w-2xl leading-relaxed",children:e}),s?d.jsxs("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:i,children:[n,d.jsx("span",{className:o,children:d.jsx(pe,{className:"w-4 h-4"})})]}):d.jsxs(ne,{to:r,className:i,children:[n,d.jsx("span",{className:o,children:d.jsx(pe,{className:"w-4 h-4"})})]})]})})]})}const R5="/assets/editorial-strategist-BoKLv1Rp.jpg",K0="/assets/editorial-team-meeting-DlsgzbKf.jpg",Y0="/assets/editorial-wave-Bc1TXjZ8.jpg",M5=[{icon:I0,title:"No-Contract Flexibility",desc:"Lower barrier to entry, higher accountability â results justify the engagement."},{icon:uN,title:"Done-For-You Execution",desc:"End-to-end campaign management from strategy to reporting and optimization."},{icon:M0,title:"Measurable Results",desc:"Transparent KPI dashboards mean you always know exactly what's working."},{icon:fi,title:"AI-First Thinking",desc:"Every system we build is engineered for the era of AI search and automation."}],P5=[{value:"5.0â
",label:"Google Rated"},{value:"17+",label:"Verified Reviews"},{value:"24/7",label:"Voice AI Coverage"},{value:"100%",label:"Owner-Operated"}],I5=[{num:"01",title:"Book a Consultation",desc:"Align on objectives and KPIs in a complimentary 30-minute discovery session."},{num:"02",title:"Receive an Audit",desc:"Get a scoped proposal detailing priorities, quick wins, and projected ROI."},{num:"03",title:"Commence Implementation",desc:"Clearly defined 30/60/90-day milestones guide every sprint of execution."},{num:"04",title:"Ongoing Optimization",desc:"Monthly reporting and strategy sessions drive continuous compounding growth."}],L5=[{num:"01",title:"Identify the Problem",desc:"We surface your customer's core pain and the cost of inaction."},{num:"02",title:"Position as the Guide",desc:"Your brand becomes the trusted expert with an actionable plan."}
418,{num:"03",title:"Drive the Action",desc:"Direct CTAs and vivid outcomes turn interest into revenue."}],D5=["Strategy","Execution","AI Search","Voice AI","GoHighLevel","Performance","Charleston, WV"];function $5(){return d.jsxs(d.Fragment,{children:[d.jsx(tl,{eyebrow:"About Ideation Digital",title:"Strategic growth, engineered for ambitious operators",italicWords:3,subtitle:"We empower small and mid-sized businesses to dominate online with strategic, done-for-you AI marketing systems that deliver measurable, compounding results.",ctaLabel:"Book a Strategy Call",ctaHref:"https://api.leadconnectorhq.com/widget/booking/gm0vY68yNGLxXwCHFKLC",secondaryLabel:"Explore Services",secondaryHref:"/services"}),d.jsx(up,{words:D5}),d.jsxs("section",{className:"relative bg-background section-padding overflow-hidden",children:[d.jsx("img",{src:eA,alt:"",className:"absolute -top-20 -right-20 w-80 h-80 object-contain opacity-50 animate-blob",loading:"lazy",width:800,height:800}),d.jsx("div",{className:"container-narrow mx-auto relative",children:d.jsxs("p",{className:"font-heading font-black text-3xl sm:text-4xl lg:text-6xl text-foreground tracking-tight leading-[1.05] text-center",children:["We focus on ",d.jsx("span",{className:"serif italic font-normal text-gradient",children:"your business growth"}),", while you experience your vision."]})})]}),d.jsx("section",{className:"bg-background section-padding border-t border-border",children:d.jsx("div",{className:"container-wide mx-auto",children:d.jsxs("div",{className:"grid lg:grid-cols-12 gap-12 items-center",children:[d.jsxs("div",{className:"lg:col-span-5 relative group",children:[d.jsx("div",{className:"absolute -inset-4 bg-gradient-to-br from-electric/30 to-magenta/20 rounded-3xl blur-2xl opacity-50 group-hover:opacity-80 transition-opacity"}),d.jsxs("div",{className:"relative rounded-3xl overflow-hidden border border-border",children:[d.jsx("img",{src:R5,alt:"Marketing strategist at work",className:"w-full aspect-[4/5] object-cover",loading:"lazy",width:1080,height:1350}),d.jsx("div",{className:"absolute top-5 left-5",children:d.jsx("span",{className:"inline-flex items-center px-3 py-1.5 rounded-full text-xs font-semibold bg-cta text-cta-foreground",children:"01 / Strategic Partner"})})]})]}),d.jsxs("div",{className:"lg:col-span-7",children:[d.jsx(ut,{eyebrow:"Who We Are",title:"Your strategic marketing partner",italicWords:2,subtitle:"Operating as a true strategic partner means integrating advisory planning with operational delivery â strategy directly informs execution and measurement at every touchpoint."}),d.jsx("div",{className:"mt-10 grid sm:grid-cols-2 gap-4",children:M5.map(t=>d.jsxs("div",{className:"group bg-card rounded-2xl p-6 border border-border hover:border-foreground transition-all",children:[d.jsx("div",{className:"w-11 h-11 rounded-xl bg-accent/10 flex items-center justify-center mb-4 group-hover:bg-accent group-hover:text-accent-foreground transition-colors",children:d.jsx(t.icon,{className:"w-5 h-5 text-accent group-hover:text-accent-foreground transition-colors"})}),d.jsx("h3",{className:"font-heading font-bold text-foreground",children:t.title}),d.jsx("p",{className:"text-muted-foreground text-sm mt-2 leading-relaxed",children:t.desc})]},t.title))})]})]})})}),d.jsx("section",{className:"bg-background border-y border-border",children:d.jsx("div",{className:"container-wide mx-auto px-4 lg:px-8",children:d.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 divide-x divide-border",children:P5.map(t=>d.jsxs("div",{className:"py-12 px-6 text-center",children:[d.jsx("p",{className:"font-heading font-black text-4xl lg:text-6xl text-foreground tracking-tight",children:t.value}),d.jsx("p",{className:"mt-2 text-xs uppercase tracking-widest text-muted-foreground",children:t.label})]},t.label))})})}),d.jsxs("section",{className:"relative bg-primary overflow-hidden section-padding",children:[d.jsx("div",{className:"absolute inset-0 bg-grid-dark opacity-40"}),d.jsx("img",{src:Y0,alt:"",className:"absolute inset-0 w-full h-full object-cover opacity-15",loading:"lazy",width:1920,height:1080}),d.jsxs("div",{className:"container-wide mx-auto relative",children:[d.jsx(ut,{invert:!0,align:"center",eyebrow:"The Framework",title:"The StoryBrand engine",italicWords:1,subtitle:"We simplify your marketing by casting the customer as the hero, defining their problem clearly, and positioning your brand as the indispensable guide."}),d.jsx("div",{className:"mt-16 grid sm:grid-cols-3 gap-5",children:L5.map(t=>d.jsxs("div",{className:"group glass-dark rounded-3xl p-8 hover:border-accent/40 transition-all",children:[d.jsx("span",{className:"serif font-normal text-7xl text-primary-foreground
418/15 group-hover:text-accent/40 transition-colors",children:t.num}),d.jsx("h3",{className:"font-heading font-bold text-2xl text-primary-foreground mt-3",children:t.title}),d.jsx("p",{className:"text-primary-foreground/70 mt-3 leading-relaxed",children:t.desc})]},t.num))})]})]}),d.jsx("section",{className:"section-padding bg-background",children:d.jsxs("div",{className:"container-wide mx-auto",children:[d.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-end justify-between gap-8 mb-14",children:[d.jsx(ut,{eyebrow:"The Process",title:"From first call to compounding growth",italicWords:2}),d.jsxs("a",{href:"https://api.leadconnectorhq.com/widget/booking/gm0vY68yNGLxXwCHFKLC",target:"_blank",rel:"noopener noreferrer",className:"group inline-flex items-center gap-2 text-foreground font-semibold border-b-2 border-foreground pb-1 hover:border-accent hover:text-accent transition-colors",children:["Start Yours ",d.jsx(pe,{className:"w-4 h-4 group-hover:translate-x-1 group-hover:-translate-y-1 transition-transform"})]})]}),d.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-4 gap-
4185",children:I5.map(t=>d.jsxs("div",{className:"group relative bg-card rounded-3xl p-8 border border-border hover:border-foreground transition-all overflow-hidden",children:[d.jsx("div",{className:"absolute top-0 right-0 w-32 h-32 bg-gradient-to-br from-accent/10 to-electric/10 rounded-full blur-2xl group-hover:scale-150 transition-transform duration-700"}),d.jsxs("div",{className:"relative",children:[d.jsx("span",{className:"serif font-normal text-7xl text-foreground/15 group-hover:text-foreground/40 transition-colors",children:t.num}),d.jsx("h3",{className:"font-heading font-bold text-xl text-foreground mt-3",children:t.title}),d.jsx("p",{className:"text-muted-foreground text-sm mt-3 leading-relaxed",children:t.desc})]})]},t.num))})]})}),d.jsx("section",{className:"relative section-padding bg-secondary overflow-hidden",children:d.jsx("div",{className:"container-wide mx-auto",children:d.jsxs("div",{className:"grid lg:grid-cols-12 gap-12 items-center",children:[d.jsxs("div",{className:"lg:col-span-6",children:[d.jsx(ut,{eyebrow:"AI Inside",title:"AI-powered marketing, built in not bolted on",italicWords:3,subtitle:"AI revolutionizes marketing for SMBs by automating optimization, personalizing at scale, and surfacing insights from data your team would never have time to analyze."}),d.jsx("div",{className:"mt-8 space-y-3",children:["Predictive bidding that compounds CPC efficiency","AI content systems that 3x your output","Personalization engines tuned to user behavior","Voice AI that captures every after-hours lead"].map(t=>d.jsxs("div",{className:"flex items-center gap-3 bg-card rounded-xl p-4 border border-border",children:[d.jsx(ao,{className:"w-5 h-5 text-accent shrink-0"}),d.jsx("p",{className:"text-foreground text-sm",children:t})]},t))})]}),d.jsxs("div",{className:"lg:col-span-6 relative",children:[d.jsx("div",{className:"absolute -top-10 -right-10 w-40 h-40 bg-electric/30 rounded-full blur-3xl animate-blob"}),d.jsxs("div",{className:"relative rounded-3xl overflow-hidden border border-border shadow-2xl",children:[d.jsx("img",{src:ZN,alt:"AI marketing dashboard",className:"w-full aspect-[4/3] object-cover",loading:"lazy",width:1280,height:960}),d.jsx("div",{className:"absolute bottom-5 left-5 right-5 glass rounded-2xl p-4 backdrop-blur-xl",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"w-10 h-10 rounded-full bg-accent/20 flex items-center justify-center",children:d.jsx(ri,{className:"w-5 h-5 text-accent"})}),d.jsxs("div",{children:[d.jsx("p",{className:"font-semibold text-foreground text-sm",children:"+312% organic growth"}),d.jsx("p",{className:"text-muted-foreground text-xs",children:"AI search & traditional combined"})]})]})})]})]})]})})}),d.jsxs("section",{className:"relative h-[60vh] min-h-[480px] overflow-hidden",children:[d.jsx("img",{src:K0,alt:"Ideation Digital team strategy session",className:"absolute inset-0 w-full h-full object-cover",loading:"lazy",width:1920,height:1080}),d.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-primary via-primary/60 to-transparent"}),d.jsx("div",{className:"container-wide mx-auto px-4 lg:px-8 h-full relative flex items-end pb-16",children:d.jsx("div",{className:"max-w-3xl",children:d.jsxs("h2",{className:"font-heading font-black text-4xl lg:text-6xl text-primary-foreground leading-[1.05] tracking-tight",children:["Built in Charleston. ",d.jsx("span",{className:"serif italic font-normal text-cta",children:"Trusted nationwide."})]})})})]}),d.jsx("section",{className:"section-padding bg-background",children:d.jsx("div",{className:"container-narrow mx-auto",children:d.jsxs("div",{className:"bg-card rounded-3xl p-10 lg:p-14 border border-border relative overflow-hidden",children:[d.jsx("div",{className:"absolute top-0 right-0 w-64 h-64 bg-accent/10 rounded-full blur-3xl"}),d.jsxs("div",{className:"relative grid md:grid-cols-3 gap-8 items-center",children:[d.jsxs("div",{className:"md:col-span-2",children:[d.jsxs("h3",{className:"font-heading font-black text-2xl lg:text-4xl text-foreground tracking-tight leading-tight",children:["Featured on ",d.jsx("span",{className:"serif italic font-normal text-gradient",children:"DesignRush."})]}),d.jsx("p",{className:"mt-4 text-muted-foreground leading-relaxed",children:"Continued recognition for delivering smart, strategic digital solutions that produce measurable results for our clients."}),d.jsxs("a",{href:"https://www.designrush.com/agency/profile/ideation-digital-2",target:"_blank",rel:"noopener noreferrer",className:"group inline-flex items-center gap-2 text-foreground font-semibold mt-6 border-b-2 border-foreground pb-1 hover:border-accent hover:text-accent transition-colors",children:["View our profile ",d.jsx(pe,{className:"w-4 h-4 group-hover:translate-x-1 group-hover:-translate-y-1 transition-transform"})]})]}),d.jsx("div",{className:"flex justify-center md:justify-end",children:d.jsx("div",{className:"w-32 h-32 rounded-full bg-gradient-to-br from-electric to-magenta flex items-center justify-center shadow-2xl",children:d.jsx(rp,{className:"w-14 h-14 text-white"})})})]})]})})}),d.jsx(Nr,{})]})}const tA="/assets/hub-growth-systems-D5Vjz6rg.jpg",nA="/assets/hub-ai-implementation-DbvKvBYS.jpg",rA="/assets/hub-authority-visibility-7lzqlbMG.jpg",Xw=[{icon:ri,label:"01",title:"Growth Systems",tagline:"It's not more marketing. It's better systems.",path:"/services/growth-systems",image:tA,de
418scription:"The execution layer between traffic and revenue. Lead capture, conversion optimization, funnel architecture, email automation, and the conversion-built websites that turn clicks into customers â predictably.",items:[{label:"Lead Generation",path:"/services/lead-generation"},{label:"Conversion Optimization",path:"/services/conversion-optimization"},{label:"Funnel Development",path:"/services/landing-pages-funnels"},{label:"Email Automation",path:"/services/email-marketing"},{label:"Conversion Websites",path:"/services/website-design"},{label:"Google & Meta Ads",path:"/services/google-ads"}],tone:"electric"},{icon:fi,label:"02",title:"AI Implementation & Automation",tagline:"Modern operations, intelligently automated.",path:"/services/ai-implementation",image:nA,description:"AI-powered marketing systems, Voice AI agents, conversational chat, and GoHighLevel-powered CRM and automation infrastructure that runs your business while you scale.",items:[{label:"Marketing Automation",path:"/services/ghl-pipeline-automation"},{label:"GoHighLevel CRM",path:"/services/ghl-crm-setup"},{label:"AI Chat Agents",path:"/services/ai-chatbots"},{label:"AI Voice Agents",path:"/services/voice-ai-agents"},{label:"AI Marketing Strategy",path:"/services/ai-marketing-strategy"},{label:"Reputation Management",path:"/services/ghl-reputation-management"}],tone:"magenta"},{icon:Qa,label:"03",title:"Authority & Visibility",tagline:"Get cited. Get found. Get chosen.",path:"/services/authority-visibility",image:rA,description:"SEO, AI search optimization, local search, and content systems that earn the topical authority Google AND AI engines reward â building a moat your competitors can't out-spend.",items:[{label:"SEO for AI Visibility",path:"/services/seo-strategy"},{label:"Local SEO",path:"/services/local-seo"},{label:"Technical SEO",path:"/services/technical-seo"},{label:"On-Page SEO",path:"/services/on-page-seo"},{label:"Content Strategy",path:"/services/content-strategy"},{label:"AEO / AI Search",path:"/services/ai-search-optimization"}],tone:"accent"}],z5={electric:{chip:"bg-electric text-electric-foreground",ring:"ring-electric/40",text:"text-electric"},accent:{chip:"bg-accent text-accent-foreground",ring:"ring-accent/40",text:"text-accent"},magenta:{chip:"bg-magenta text-magenta-foreground",ring:"ring-magenta/40",text:"text-magenta"},cta:{chip:"bg-cta text-cta-foreground",ring:"ring-cta/40",text:"text-cta-foreground"}};function B5(){return d.jsxs(d.Fragment,{children:[d.jsxs("section",{className:"relative bg-primary overflow-hidden",children:[d.jsx("div",{className:"absolute inset-0 bg-grid-dark opacity-50"}),d.jsx("div",{className:"absolute top-0 right-0 w-[600px] h-[600px] bg-electric/20 rounded-full blur-3xl animate-blob"}),d.jsx("div",{className:"absolute bottom-0 left-0 w-[500px] h-[500px] bg-magenta/20 rounded-full blur-3xl animate-blob",style:{animationDelay:"5s"}}),d.jsxs("div",{className:"container-wide mx-auto px-4 lg:px-8 py-20 lg:py-28 relative",children:[d.jsxs("h1",{className:"font-heading font-black text-5xl sm:text-6xl lg:text-8xl text-primary-foreground tracking-tighter leading-[0.95]",children:["Three hubs.",d.jsx("br",{}),d.jsx("span",{className:"serif italic font-normal text-gradient",children:"One execution layer."})]}),d.jsx("p",{className:"mt-8 text-lg lg:text-xl text-primary-foreground/70 max-w-2xl leading-relaxed",children:"Ideation Digital is the execution layer for ambitious operators. We build Growth Systems, deploy AI Implementation, and earn Authority & Visibility â the modern stack that turns marketing into a system, not a series of campaigns."}),d.jsx("div",{className:"mt-10 flex flex-wrap gap-3",children:Xw.map(t=>d.jsxs("a",{href:`#${t.path.split("/").pop()}`,className:"group inline-flex items-center gap-2 px-4 py-2 rounded-full bg-primary-foreground/5 border border-primary-foreground/15 text-primary-foreground/80 text-sm hover:bg-primary-foreground/10 hover:text-primary-foreground transition-all",children:[d.jsx(t.icon,{className:"w-4 h-4 text-accent"}),t.title]},t.path))})]})]}),d.jsx("section",{className:"bg-background",children:Xw.map((t,e)=>{const n=e%2!==0,r=z5[t.tone],s=t.path.split("/").pop();return d.jsx("div",{id:s,className:"border-b border-border scroll-mt-24",children:d.jsx("div",{className:"container-wide mx-auto px-4 lg:px-8 py-20 lg:py-28",children:d.jsxs("div",{className:"grid lg:grid-cols-12 gap-12 items-center",children:[d.jsxs("div",{className:`lg:col-span-6 relative group ${n?"lg:order-2":""}`,children:[d.jsx("div",{className:`absolute -inset-4 bg-gradient-to-br ${t.tone==="electric"?"from-electric/30 to-accent/20":t.tone
418==="magenta"?"from-magenta/30 to-cta/20":"from-accent/30 to-electric/20"} rounded-3xl blur-2xl opacity-40 group-hover:opacity-70 transition-opacity`}),d.jsxs("div",{className:"relative rounded-3xl overflow-hidden border border-border",children:[d.jsx("img",{src:t.image,alt:t.title,className:"w-full aspect-[4/3] object-cover group-hover:scale-105 transition-transform duration-700",loading:"lazy",width:1280,height:960}),d.jsx("div",{className:"absolute top-5 left-5",children:d.jsxs("span",{className:`inline-flex items-center px-3 py-1.5 rounded-full text-xs font-semibold ${r.chip}`,children:[t.label," / Hub"]})})]})]}),d.jsxs("div",{className:`lg:col-span-6 ${n?"lg:order-1":""}`,children:[d.jsxs("div",{className:"flex items-center gap-4 mb-6",children:[d.jsx("div",{className:"w-14 h-14 rounded-2xl bg-foreground text-background flex items-center justify-center",children:d.jsx(t.icon,{className:"w-7 h-7"})}),d.jsx("span",{className:"serif text-5xl font-normal text-foreground/15",children:t.label})]}),d.jsx("h2",{className:"font-heading font-black text-3xl lg:text-5xl text-foreground tracking-tight leading-[1.05]",children:t.title}),d.jsxs("p",{className:"mt-3 serif italic text-xl text-accent",children:['"',t.tagline,'"']}),d.jsx("p",{className:"mt-5 text-lg text-muted-foreground leading-relaxed",children:t.description}),d.jsx("div",{className:"mt-8 grid sm:grid-cols-2 gap-2",children:t.items.map(i=>d.jsxs(ne,{to:i.path,className:"group/item inline-flex items-center justify-between gap-2 px-4 py-2.5 rounded-xl bg-secondary border border-border hover:border-foreground transition-all",children:[d.jsx("span",{className:"text-sm font-medium text-foreground group-hover/item:text-accent transition-colors",children:i.label}),d.jsx(pe,{className:"w-3.5 h-3.5 text-muted-foreground group-hover/item:text-accent group-hover/item:translate-x-0.5 group-hover/item:-translate-y-0.5 transition-all"})]},i.path))}),d.jsxs(ne,{to:t.path,className:"group/cta inline-flex items-center justify-between gap-4 mt-10 pl-6 pr-2 py-2 bg-foreground text-background font-semibold rounded-full hover:bg-primary transition-all",children:["Explore ",t.title,d.jsx("span",{className:"w-10 h-10 rounded-full bg-background/15 flex items-center justify-center group-hover/cta:translate-x-1 transition-transform",children:d.jsx(pe,{className:"w-4 h-4"})})]})]})]})})},t.title)})}),d.jsxs("section",{className:"bg-primary py-20 lg:py-28 relative overflow-hidden",children:[d.jsx("div",{className:"absolute inset-0 bg-grid-dark opacity-30"}),d.jsx("div",{className:"absolute top-0 right-0 w-[500px] h-[500px] bg-electric/20 rounded-full blur-3xl animate-blob"}),d.jsx("div",{className:"container-wide mx-auto px-4 lg:px-8 relative",children:d.jsxs("div",{className:"max-w-4xl",children:[d.jsxs("h2",{className:"font-heading font-black text-3xl lg:text-5xl text-primary-foreground tracking-tight leading-[1.1]",children:["Strategy is one thing. ",d.jsx("span",{className:"serif italic font-normal text-gradient",children:"Execution is another."})]}),d.jsxs("p",{className:"mt-8 text-lg text-primary-foreground/75 leading-relaxed max-w-3xl",children:["Ideation Digital is the execution layer. We don't sell hours â we ship systems. While other agencies talk strategy, we build the AI-powered marketing infrastructure that turns plans into pipeline. Every engagement starts with an ",d.jsx("span",{className:"text-accent font-semibold",children:"AI Readiness Assessment"})," â a structured audit of where your marketing leaks revenue and what to fix first."]})]})})]}),d.jsx(Nr,{})]})}const Zw={"growth-systems":{title:"Growth Systems",italicWords:1,tagline:"It's not more marketing. It's better systems.",heroSubtitle:"Turn the traffic and leads you already have into predictable, compounding revenue.",image:tA,intro:"Most businesses don't have a marketing problem â they have a systems problem. Leads come in, but follow-up is slow. Traffic shows up, but the funnel leaks. Ads run, but attribution is fuzzy. Growth Systems is our discipline of engineering the layer between traffic and revenue: lead capture, conversion optimization, automated follow-up, and the funnel architecture that turns clicks into customers â predictably.",positioning:"This is the execution layer. Where strategy becomes pipeline. Where pipeline becomes revenue. We don't just bring you traffic â we make sure every visitor, lead, and inquiry has somewhere to land, someone to talk to, and a system that follows up before your competitor does.",painPoints:["Are leads coming in but not converting to revenue?","Is your follow-up too slow or inconsistent?","Do you struggle to attribute marketing ROI?","Are you spending on ads with no funnel behind them?"],benefits:["Predictable, forecastable lead pipeline","Conversion-engineered websites and landing pages","Speed-to-lead automation that responds in seconds","Funnel attribution from first touch to closed deal","Multi-channel paid + organic acquisition systems","Email + SMS automation that nurtures while you sleep"],details:[{title:"Lead Generation Systems",description:"Predictable pipeline engineered through multi-channel capture, instant follow-up, and proper attribution.",path:"/services/lead-generation"},{title:"Conversion Optimization (CRO)",description:"Lift conversion rates with structured A/B testing, behavior data, and friction removal.",path:"/services/conversion-optimization"},{title:"Funnel Development",description:"High-converting landing pages and full funnel sequences that turn ad clicks into customers.",path:"/services/landing-pages-funnels"},{title:"Email Automation",description:"Strategic campaigns and automated sequences that nurture relationships and drive revenue.",path:"/services/email-marketing"},{title:"Conversion-Focused Websites",description:"Fast, beautiful sites built around growth systems â not just brochures.",path:"/services/website-design"},{title:"Google Ads Management",description:"High-intent search campaigns engineered for ROAS, not vanity clicks.",path:"/services/google-ads"},{title:"Meta Ads Management",description:"Facebook + Instagram with surgical targeting and creative testing.",path:"/services/meta-ads"},{title:"E-commerce Websites",description:"Online stores designed to reduce friction and lift conversion.",path:"/services/ecommerce-websites"}],ctaText:"Start with an AI Readiness Assessment",tone:"electric"},"ai-implementation":{title:"AI Implementation & Automation",italicWords:1,tagline:"Modern operations, intelligently automated.",heroSubtitle:"Deploy AI marketing, voice agents, chat, and GoHighLevel-powered systems that run your business while you scale.",image:nA,intro:"AI is not a feature you bolt on â it's the operational layer that separates businesses that scale from businesses that stall. We implement AI-powered marketing systems, V
418oice AI agents, conversational chat, and GoHighLevel-based CRM and automation infrastructure. The result is a business that responds in seconds, qualifies leads at 3 AM, and runs the repeatable parts of marketing on rails.",positioning:"This is where Ideation Digital becomes your AI execution partner. We don't sell hype â we deploy systems. Every AI tool we implement is wired into a clear business outcome: faster response, qualified pipeline, automated follow-up, freed-up team. Less manual work, more leverage.",painPoints:["Are you missing calls and inquiries after hours?","Is your team buried in repetitive follow-up?","Are competitors using AI while you're still manual?","Do you have 5+ disconnected tools instead of one system?"],benefits:["AI Voice agents that answer, qualify, and book 24/7","AI chatbots trained on your business and FAQs","GoHighLevel CRM that replaces 5-8 separate tools","Automated pipelines from lead capture to close","AI-optimized ad campaigns and content workflows","Reputation, SMS, and email automation on rails"],details:[{title:"AI Marketing Strategy",description:"AI integration audit, roadmap, and implementation aligned with measurable ROI.",path:"/services/ai-marketing-strategy"},{title:"Marketing Automation",description:"End-to-end pipeline automation from lead capture to close in GoHighLevel.",path:"/services/ghl-pipeline-automation"},{title:"GoHighLevel CRM Integration",description:"Complete GHL setup that replaces your scattered marketing tools.",path:"/services/ghl-crm-setup"},{title:"AI Chat Agents",description:"Custom chatbots that engage, qualify, and book â 24/7 across every channel.",path:"/services/ai-chatbots"},{title:"AI Voice Agents",description:"AI phone agents that answer calls, qualify leads, and book appointments.",path:"/services/voice-ai-agents"},{title:"AI Content Production",description:"On-brand content produced 3x faster with AI-assisted workflows.",path:"/services/ai-content-creation"},{title:"Reputation Management",description:"Automated review generation and monitoring across every platform.",path:"/services/ghl-reputation-management"},{title:"SMS & Lead Nurture Automation",description:"Multi-channel sequences that follow up while you focus on closing.",path:"/services/sms-automation"}],ctaText:"Start with an AI Readiness Assessment",tone:"magenta"},"authority-visibility":{title:"Authority & Visibility",italicWords:1,tagline:"Get cited. Get found. Get chosen.",heroSubtitle:"SEO, AI search optimization, and content systems that earn the topical authority Google and AI both reward.",image:rA,intro:"Search has fundamentally changed. People still Google â but they also ask ChatGPT, Perplexity, and Gemini before they ever type a URL. To win in the new search landscape, your business needs visibility across both classic SEO and the AI search engines now shaping buying decisions. We build the topical authority, technical foundation, and content strategy that earn rankings â and citations â across every search surface that matters.",positioning:"Authority isn't a vanity metric â it's the moat. When your business is consistently cited by Google, by AI engines, by local search, and by content across the web, you stop competing on price and start competing on credibility. This is the long-game compound layer of marketing.",painPoints:["Is your business invisible in local Google search?","Are AI engines (ChatGPT, Perplexity) bypassing your site?","Have you invested in SEO before with no return?","Are competitors getting cited as the experts in your space?"],benefits:["Higher organic rankings on your most valuable keywords","Citations in ChatGPT, Perplexity, and Google AI Overviews","Dominant Google Maps and local pack visibility","Technical site health: Core Web Vitals, speed, schema","Content systems that build compounding topical authority","Audits and roadmaps grounded in your real competitive landscape"],details:[{title:"SEO Services for AI Visibility & Authority",description:"Modern SEO engineered for both Google rankings and AI search citations.",path:"/services/seo-strategy"},{title:"Local SEO",description:"Google Business Profile, citations, and Map Pack domination.",path:"/services/local-seo"},{title:"On-Page SEO",description:"Content, metadata, headers, and internal linking optimized for ranking.",path:"/services/on-page-seo"},{title:"Technical SEO",description:"Core Web Vitals, speed, mobile, schema â the foundation rankings depend on.",path:"/services/technical-seo"},{title:"Content Strategy & Topical Authority",description:"Pillar + cluster content systems that earn rankings AND AI citations.",path:"/services/content-strategy"},{title:"AEO / AI Search Optimization",description:"Get cited in ChatGPT, Perplexity, Gemini, and Google AI Overviews.",path:"/services/ai-search-optimization"}],ctaText:"Start with an AI Readiness Assessment",tone:"accent"}},F5=["growth-systems","ai-implementation","authority-visibility"],W5={electric:"from-electric/40 via-electric/20",accent:"from-
418accent/40 via-accent/20",magenta:"from-magenta/40 via-magenta/20",cta:"from-cta/40 via-cta/20"};function sA(){const{slug:t}=Jf(),{pathname:e}=is(),n=t??e.replace(/^\/services\//,"").split("/")[0],r=n?Zw[n]:void 0;if(!r)return d.jsx(AT,{to:"/services",replace:!0});const s=r.title.split(" "),i=s.slice(s.length-r.italicWords).join(" "),o=s.slice(0,s.length-r.italicWords).join(" ");return d.jsxs(d.Fragment,{children:[d.jsxs("section",{className:"relative bg-primary overflow-hidden pt-28 pb-20 lg:pt-36 lg:pb-28",children:[d.jsxs("div",{className:"absolute inset-0",children:[d.jsx("img",{src:r.image,alt:r.title,className:"w-full h-full object-cover opacity-30",loading:"lazy",width:1920,height:1080}),d.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-primary via-primary/85 to-primary/30"}),d.jsx("div",{className:"absolute inset-0 bg-grid-dark opacity-30"})]}),d.jsx("div",{className:`absolute -top-20 right-0 w-[500px] h-[500px] rounded-full blur-3xl animate-blob bg-gradient-to-br ${W5[r.tone]} to-transparent`}),d.jsxs("div",{className:"container-wide mx-auto px-4 lg:px-8 relative",children:[d.jsxs("nav",{className:"flex items-center gap-2 text-sm text-primary-foreground/60 mb-8",children:[d.jsx(ne,{to:"/services",className:"hover:text-accent transition-colors",children:"Services"}),d.jsx(zd,{className:"w-3.5 h-3.5"}),d.jsx("span",{className:"text-primary-foreground",children:r.title})]}),d.jsxs("h1",{className:"font-heading font-black text-primary-foreground tracking-tighter leading-[0.95] text-5xl sm:text-6xl lg:text-8xl max-w-5xl",children:[o,o&&d.jsx("br",{}),d.jsx("span",{className:"serif italic font-normal text-gradient",children:i})]}),d.jsxs("p",{className:"mt-6 serif italic text-2xl lg:text-3xl text-accent",children:['"',r.tagline,'"']}),d.jsx("p",{className:"mt-6 text-lg lg:text-xl text-primary-foreground/75 max-w-2xl leading-relaxed",children:r.heroSubtitle}),d.jsxs("div",{className:"mt-10 flex flex-col sm:flex-row gap-4",children:[d.jsxs("a",{href:"https://api.leadconnectorhq.com/widget/booking/gm0vY68yNGLxXwCHFKLC",target:"_blank",rel:"noopener noreferrer",className:"group inline-flex items-center justify-between gap-3 pl-7 pr-2 py-3 bg-cta text-cta-foreground font-semibold rounded-full hover:bg-cta/90 transition-all shadow-2xl",children:[r.ctaText,d.jsx("span",{className:"w-10 h-10 rounded-full bg-cta-foreground/10 flex items-center justify-center group-hover:translate-x-1 transition-transform",children:d.jsx(pe,{className:"w-4 h-4"})})]}),d.jsx(ne,{to:"/contact",className:"inline-flex items-center justify-center gap-2 px-7 py-3 border border-primary-foreground/20 text-primary-foreground font-medium rounded-full hover:bg-primary-foreground/5 transition-all",children:"Talk to a Strategist"})]})]})]}),d.jsx(up,{words:r.details.map(a=>a.title)}),d.jsx("section",{className:"section-padding bg-background",children:d.jsx("div",{className:"container-wide mx-auto",children:d.jsxs("div",{className:"grid lg:grid-cols-12 gap-12",children:[d.jsxs("div",{className:"lg:col-span-8",children:[d.jsx(ut,{eyebrow:"The Strategy",title:"What this looks like in practice",italicWords:3}),d.jsx("p",{className:"mt-6 text-lg text-muted-foreground leading-relaxed",children:r.intro}),d.jsx("div",{className:"mt-10 p-8 rounded-3xl bg-gradient-to-br from-secondary to-background border border-border",children:d.jsx("p",{className:"text-lg text-foreground leading-relaxed",children:r.positioning})}),d.jsx("div",{className:"mt-14",children:d.jsx("div",{className:"grid sm:grid-cols-2 gap-4",children:r.painPoints.map(a=>d.jsx("div",{className:"bg-card rounded-2xl p-5 border border-border hover:border-foreground transition-colors",children:d.jsx("p",{className:"text-foreground leading-relaxed",children:a})},a))})}),d.jsxs("div",{className:"mt-14",children:[d.jsx(ut,{eyebrow:"The Outcomes",title:"What you'll get",italicWords:1}),d.jsx("div",{className:"mt-8 grid sm:grid-cols-2 gap-3",children:r.benefits.map(a=>d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsx(ao,{className:"w-5 h-5 text-accent shrink-0 mt-0.5"}),d.jsx("p",{className:"text-foreground",children:a})]},a))})]})]}),d.jsx("div",{className:"lg:col-span-4",children:d.jsxs("div",{className:"sticky top-28 space-y-5",children:[d.jsxs("div",{className:"bg-primary text-primary-foreground rounded-3xl p-8 relative overflow-hidden",children:[d.jsx("div",{className:"absolute -top-10 -right-10 w-40 h-40 bg-cta/30 rounded-full blur-3xl animate-blob"}),d.jsxs("div",{className:"relative",children:[d.jsxs("h3",{className:"font-heading font-black text-2xl tracking-tight leading-tight",children:["Ready to ",d.jsx("span",{className:"serif italic font-normal text-cta",children:"move?"})]}
418),d.jsx("p",{className:"text-primary-foreground/70 text-sm mt-3 leading-relaxed",children:"Book a free 30-minute AI Readiness Assessment. We'll audit your current setup and show you what's possible."}),d.jsxs("a",{href:"https://api.leadconnectorhq.com/widget/booking/gm0vY68yNGLxXwCHFKLC",target:"_blank",rel:"noopener noreferrer",className:"group mt-6 w-full inline-flex items-center justify-between gap-3 pl-5 pr-2 py-3 bg-cta text-cta-foreground font-semibold rounded-full hover:bg-cta/90 transition-all shadow-xl",children:[r.ctaText,d.jsx("span",{className:"w-9 h-9 rounded-full bg-cta-foreground/10 flex items-center justify-center group-hover:translate-x-1 transition-transform",children:d.jsx(pe,{className:"w-4 h-4"})})]})]})]}),d.jsxs("div",{className:"bg-card rounded-3xl p-6 border border-border",children:[d.jsx("p",{className:"text-xs uppercase tracking-wider text-muted-foreground font-semibold mb-4",children:"Other Hubs"}),d.jsx("div",{className:"space-y-2",children:F5.filter(a=>a!==n).map(a=>{const l=a==="growth-systems"?ri:a==="ai-implementation"?fi:Qa;return d.jsxs(ne,{to:`/services/${a}`,className:"group flex items-center justify-between py-3 border-b border-border last:border-0 hover:text-accent transition-colors",children:[d.jsxs("span",{className:"flex items-center gap-3 text-sm text-foreground group-hover:text-accent transition-colors",children:[d.jsx(l,{className:"w-4 h-4"}),Zw[a].title]}),d.jsx(pe,{className:"w-3.5 h-3.5 text-muted-foreground group-hover:text-accent group-hover:translate-x-0.5 group-hover:-translate-y-0.5 transition-all"})]},a)})})]})]})})]})})}),d.jsx("section",{className:"section-padding bg-secondary",children:d.jsxs("div",{className:"container-wide mx-auto",children:[d.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-end justify-between gap-8 mb-12",children:[d.jsx(ut,{eyebrow:"Inside this Hub",title:"Explore each capability",italicWords:2,subtitle:"Each service below is its own deep dive â built to rank, built to convert, built to compound."}),d.jsxs(ne,{to:"/services",className:"group inline-flex items-center gap-2 text-foreground font-semibold border-b-2 border-foreground pb-1 hover:border-accent hover:text-accent transition-colors",children:["All hubs ",d.jsx(pe,{className:"w-4 h-4 group-hover:translate-x-1 group-hover:-translate-y-1 transition-transform"})]})]}),d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5",children:r.details.map((a,l)=>d.jsxs(ne,{to:a.path,className:`group relative bg-card rounded-3xl p-7 border border-border hover:border-foreground hover:shadow-2xl transition-all overflow-hidden ${l===0?"lg:col-span-2 lg:row-span-1":""}`,children:[d.jsx("div",{className:"absolute top-0 right-0 w-32 h-32 bg-gradient-to-br from-accent/10 to-electric/10 rounded-full blur-2xl group-hover:scale-150 transition-transform duration-700"}),d.jsxs("div",{className:"relative flex flex-col justify-between h-full min-h-[180px]",children:[d.jsxs("div",{className:"flex items-start justify-between",children:[d.jsx("span",{className:"text-xs uppercase tracking-wider font-semibold text-accent",children:String(l+1).padStart(2,"0")}),d.jsx(pe,{className:"w-5 h-5 text-muted-foreground group-hover:text-accent group-hover:translate-x-1 group-hover:-translate-y-1 transition-all"})]}),d.jsxs("div",{children:[d.jsx("h3",{className:`font-heading font-bold text-foreground group-hover:text-accent transition-colors ${l===0?"text-2xl lg:text-3xl":"text-xl"} leading-tight`,children:a.title}),d.jsx("p",{className:"text-muted-foreground text-sm mt-3 leading-relaxed",children:a.description})]})]})]},a.title))})]})}),d.jsx(Nr,{})]})}const H5="/assets/svc-local-seo-CJvd9CQU.jpg",U5="/assets/svc-onpage-seo-1qsGxojp.jpg",V5="/assets/svc-technical-seo-D9b51E7Q.jpg",iA="/assets/svc-seo-strategy-3AB8T6hQ.jpg",q5="/assets/svc-ai-search-CEjBJ_t6.jpg",G5="/assets/svc-web
418site-design-Bfu6uGRQ.jpg",K5="/assets/service-webdev-CKITLvAG.jpg",Y5="/assets/svc-ecommerce-80oeZVdp.jpg",e1="/assets/svc-landing-pages-BJk0lWo0.jpg",J5="/assets/svc-youtube-ads-BRirwGzH.jpg",Q5="/assets/svc-ott-ctv-BnbjtnMg.jpg",X5="/assets/svc-meta-ads-DHfrPVWZ.jpg",Z5="/assets/svc-google-ads-DblJrK-F.jpg",ez="/assets/svc-sms-automation-B33TvUI4.jpg",tz="/assets/svc-crm-setup-80mD7MQO.jpg",nz="/assets/svc-email-marketing-Cc7nYBev.jpg",oA="/assets/svc-ai-marketing-strategy-BNvi047_.jpg",rz="/assets/svc-ai-chatbots-B8FfXeuh.jpg",sz="/assets/svc-ai-content-CQg_aDel.jpg",iz="/assets/svc-voice-ai-agents-eVyBaB4s.jpg",oz="/assets/svc-ghl-crm-BhSieD_m.jpg",az="/assets/svc-reputation-mgmt-j_MeBIPM.jpg",lz="/assets/svc-workflow-automation-Bu55Mw1N.jpg",cz="/assets/svc-lead-generation-DGm4SZ_F.jpg",uz="/assets/svc-conversion-optimization-CfUiS8_V.jpg",dz="/assets/svc-content-strategy-Z-oM2ten.jpg",t1={"local-seo":{slug:"local-seo",parentSlug:"authority-visibility",parentTitle:"Authority & Visibility",title:"Local SEO",heroSubtitle:"Dominate local search results and get found by customers in your area",image:H5,intro:"When someone in your area searches for a service you offer, will they find you â or your competitor? Local SEO ensures your business appears prominently in Google Maps, the local 3-pack, and geo-targeted organic results. For small and medium-sized businesses, local search visibility is the difference between a phone that rings and one that doesn't.",whyItMatters:"46% of all Google searches have local intent, and 76% of people who search for something nearby visit a business within a day. If your Google Business Profile isn't optimized, your citations aren't consistent, and your reviews aren't managed â you're leaving money on the table every single day.",stats:[{value:"46%",label:"of Google searches have local intent"},{value:"76%",label:"of local searches result in a visit within 24hrs"},{value:"88%",label:"of consumers trust online reviews as much as personal recommendations"},{value:"3x",label:"more likely to be contacted when in the Google Map Pack"}],features:[{title:"Google Business Profile Optimization",description:"We fully optimize your GBP listing with accurate NAP data, compelling descriptions, strategic categories, posts, Q&As, and photos to maximize your visibility in Maps and local search.",icon:"MapPin"},{title:"Local Citation Building",description:"We build and clean up your business citations across 60+ authoritative directories ensuring consistency in your name, address, and phone number â a critical ranking factor for local search.",icon:"Building"},{title:"Review Generation & Management",description:"We implement review generation campaigns and reputation management strategies that build social proof and directly influence your local search rankings.",icon:"Star"},{title:"Geo-Targeted Content",description:"We create location-specific landing pages and content that targets the exact service areas and neighborhoods where your customers are searching.",icon:"Target"},{title:"Local Link Building",description:"We earn links from local organizations, chambers of commerce, news outlets, and community websites that signal geographic relevance to Google.",icon:"Link"},{title:"Competitor Analysis",description:"We analyze your local competitors' strategies, identify gaps, and build a plan that positions your business to outrank them in your most important service areas.",icon:"BarChart3"}],process:[{step:"01",title:"Local Audit",description:"We audit your current local presence â GBP, citations, reviews, local rankings, and competitor landscape â to identify quick wins and strategic priorities."}
418,{step:"02",title:"Foundation Setup",description:"We optimize your Google Business Profile, clean up citations, and ensure your NAP consistency across the web."},{step:"03",title:"Content & Links",description:"We create geo-targeted landing pages, build local links, and launch review generation campaigns."},{step:"04",title:"Monitor & Grow",description:"We track rankings, monitor reviews, and continuously optimize to expand your local visibility and drive more calls and visits."}],faqs:[{q:"How long does it take to see results from Local SEO?",a:"Most businesses start seeing improvements in local rankings within 3-6 months. Quick wins like GBP optimization can show results in weeks."},{q:"Do I need a physical location for Local SEO?",a:"Not necessarily. Service-area businesses that travel to customers can still benefit from Local SEO."},{q:"How important are Google reviews for local rankings?",a:"Very important. Reviews are one of the top 3 local ranking factors."}],ctaText:"Dominate Local Search",relatedSlugs:["on-page-seo","seo-strategy","google-ads"]},"on-page-seo":{slug:"on-page-seo",parentSlug:"authority-visibility",parentTitle:"Authority & Visibility",title:"On-Page SEO",heroSubtitle:"Optimize every page to rank higher and convert more visitors",image:U5,intro:"On-page SEO is the foundation of every successful search strategy. It's the practice of optimizing individual web pages â from content and HTML source code to internal linking and user experience â so search engines understand exactly what each page is about and rank it accordingly.",whyItMatters:"Google's algorithms have become incredibly sophisticated. They don't just match keywords â they understand topics, intent, and content quality. On-page SEO aligns your content with these signals.",stats:[{value:"53%",label:"of all website traffic comes from organic search"},{value:"75%",label:"of users never scroll past the first page of results"},{value:"10x",label:"more traffic to pages with optimized title tags"},{value:"200+",label:"ranking factors Google uses to evaluate pages"}],features:[{title:"Title Tag & Meta Description Optimization",description:"We craft compelling, keyword-rich title tags and meta descriptions that improve click-through rates from search results.",icon:"FileText"},{title:"Header Structure & Content Hierarchy",description:"We organize your content with proper H1-H6 heading structure, creating clear topical hierarchies.",icon:"Layers"},{title:"Internal Linking Strategy",description:"We build strategic internal link architectures that distribute page authority and improve crawlability.",icon:"Link"},{title:"Schema Markup Implementation",description:"We add structured data markup that helps Google understand your content and can generate rich snippets.",icon:"Code"},{title:"Content Optimization",description:"We optimize existing content for target keywords, search intent, readability, and engagement.",icon:"Edit"},{title:"Image Optimization",description:"We optimize image file sizes, alt tags, filenames, and lazy loading to improve page speed.",icon:"Image"}],process:[{step:"01",title:"Page Audit",description:"We crawl your entire site, audit every page for on-page factors, and identify the highest-impact optimization opportunities."},{step:"02",title:"Keyword Mapping",description:"We map target keywords to specific pages, eliminating
418keyword cannibalization."},{step:"03",title:"Optimize & Implement",description:"We optimize title tags, meta descriptions, headers, content, images, schema, and internal links."},{step:"04",title:"Measure & Iterate",description:"We monitor ranking changes, traffic growth, and user behavior to continuously refine our strategy."}],faqs:[{q:"What's the difference between on-page and off-page SEO?",a:"On-page SEO refers to optimizations on your website. Off-page SEO involves external signals like backlinks. Both are essential."},{q:"How often should on-page SEO be updated?",a:"We recommend quarterly content reviews and ongoing optimization as search algorithms evolve."},{q:"Will on-page SEO changes affect my current rankings?",a:"When done correctly, on-page optimizations improve rankings. We follow best practices and make data-driven changes."}],ctaText:"Optimize Your Pages",relatedSlugs:["technical-seo","local-seo","ai-search-optimization"]},"technical-seo":{slug:"technical-seo",parentSlug:"authority-visibility",parentTitle:"Authority & Visibility",title:"Technical SEO",heroSubtitle:"Build a rock-solid technical foundation that search engines love",image:V5,intro:"Technical SEO is the invisible architecture that determines whether search engines can find, crawl, understand, and index your website. Even the most brilliant content won't rank if your site has crawl errors, slow load times, or indexation problems.",whyItMatters:"Google has confirmed that page experience signals â including Core Web Vitals, mobile-friendliness, and HTTPS â directly impact rankings. A technically sound website loads faster, gets crawled more efficiently, and converts more visitors.",stats:[{value:"53%",label:"of mobile users leave sites that take over 3 seconds to load"},{value:"70%",label:"increase in crawl efficiency with proper technical SEO"},{value:"40%",label:"of revenue is captured by organic traffic"},{value:"99.9%",label:"uptime target for properly maintained sites"}],features:[{title:"Core Web Vitals Optimization",description:"We optimize your LCP, FID, and CLS scores to meet Google's page experience standards.",icon:"Gauge"},{title:"Site Speed Optimization",description:"We implement image compression, code minification, browser caching, and CDN configuration.",icon:"Zap"},{title:"Crawl & Indexation Management",description:"We manage robots.txt, XML sitemaps, canonical tags, and crawl budgets.",icon:"Search"},{title:"Mobile Responsiveness",description:"We ensure your site provides a flawless experience across all devices.",icon:"Smartphone"},{title:"HTTPS & Security",description:"We implement SSL certificates, security headers, and best practices.",icon:"Shield"},{title:"Structured Data & Schema",description:"We implement comprehensive schema markup for enhanced search results.",icon:"Code"}],process:[{step:"01",title:"Technical Audit",description:"We perform a comprehensive crawl analyzing hundreds of technical factors."},{step:"02",title:"Priority Roadmap",description:"We create a prioritized roadmap tackling high-impact issues first."},{step:"03",title:"Implementation",description:"Our team fixes issues directly or provides detailed specifications."},{step:"04",title:"Monitoring",description:"We set up ongoing monitoring for site health and Core Web Vitals."}],faqs:[{q:"How do I know if my site has technical SEO issues?",a:"Common signs include slow load times, pages not appearing in Google, and mobile display problems."},{q:"Can technical SEO alone improve my rankings?",a:"Technical SEO removes barriers. Fixing technical issues often results in immediate ranking improvements."},{q:"How long does a technical SEO overhaul take?",a:"Typically 4-8 weeks depending on site size and severity of issues."}],ctaText:"Fix Your Technical SEO",relatedSlugs:["on-page-seo","website-development","seo-strategy"]},"seo-strategy":{slug:"seo-strategy",parentSlug:"authority-visibility",parentTitle:"Authority & Visibility",title:"SEO Strategy & Audits",heroSubtitle:"Data-driven SEO strategies backed by comprehensive audits",image:iA,intro:"Flying blind with SEO is expensive. Our SEO strategy and audit services give you complete clarity on where you stand, where your competitors are winning, and exactly what needs to happen to close the gap.",whyItMatters:"Most businesses waste months and thousands of dollars on SEO tactics that don't align with their actual competitive landscape. A proper audit and strategy eliminates guesswork.",stats:[{value:"67%",label:"of clicks go to the first 5 organic results"},{value:"5-10x",label:"ROI from strategic SEO vs. ad spend over 2 years"},{value:"90%",label:"of pages get zero organic traffic from Google"},{value:"12-18",label:"months for a well-executed SEO strategy to mature"}],features:[{title:"Comprehensive Site Audit",description:"We analyze 200+ on-page, technical, and off-page factors to create a complete picture of your current SEO health.",icon:"ClipboardCheck"},{title:"Competitor Analysis",description:"We reverse-engineer your top competitors' strategies â their keywords, content, backlinks, and technical advantages.",icon:"Users"},{title:"Keyword Research & Mapping",description:"We identify your highest-value
418keyword opportunities based on search volume, competition, and intent.",icon:"Search"},{title:"Content Gap Analysis",description:"We identify topics your competitors rank for that you're missing.",icon:"FileSearch"},{title:"Custom Strategy Roadmap",description:"We deliver a prioritized, month-by-month SEO roadmap with specific actions and projected outcomes.",icon:"Map"},{title:"KPI & Reporting Framework",description:"We set up tracking and reporting dashboards so you can see exactly how your investment is performing.",icon:"BarChart3"}],process:[{step:"01",title:"Discovery",description:"We learn your business goals, target audience, and current marketing efforts."},{step:"02",title:"Deep Audit",description:"We run a comprehensive technical, on-page, and off-page audit alongside competitor analysis."},{step:"03",title:"Strategy Development",description:"We synthesize findings into a prioritized SEO strategy with clear actions and timelines."},{step:"04",title:"Execution Support",description:"We can execute the strategy or provide hands-on guidance to your team."}],faqs:[{q:"What does an SEO audit include?",a:"Our audits cover technical health, on-page optimization, off-page signals, competitive positioning, and keyword opportunity analysis."},{q:"How is an SEO strategy different from just doing SEO?",a:"Strategy is the plan; execution is the work. Without a strategy, you're doing random SEO tasks."},{q:"How often should we update our SEO strategy?",a:"We recommend a full strategy review every 6-12 months with quarterly check-ins."}],ctaText:"Get Your SEO Audit",relatedSlugs:["on-page-seo","technical-seo","ai-search-optimization"]},"ai-search-optimization":{slug:"ai-search-optimization",parentSlug:"authority-visibility",parentTitle:"Authority & Visibility",title:"AI Search Optimization",heroSubtitle:"Get your business cited in ChatGPT, Perplexity, and Google AI Overviews",image:q5,intro:"The search landscape is changing faster than ever. AI-powered search engines â ChatGPT, Google AI Overviews, Perplexity, Microsoft Copilot â are reshaping how people discover businesses and make decisions. If your business isn't structured and positioned to appear in AI-generated answers, you're becoming invisible to a rapidly growing segment of searchers.",whyItMatters:"AI search doesn't work like traditional search. AI models synthesize information from across the web and present direct answers â often without users ever clicking through to a website. To be included in these AI-generated responses, your content needs to be authoritative, well-structured, and widely cited.",stats:[{value:"40%",label:"of Gen Z uses AI tools instead of Google for search"},{value:"1B+",label:"weekly active users on ChatGPT"},{value:"60%",label:"of Google searches now include AI Overviews"},{value:"2025",label:"the year AI search hit mainstream adoption"}],features:[{title:"AI Citation Building",description:"We ensure your business is mentioned and cited across authoritative sources that AI models reference.",icon:"Brain"},{title:"Structured Data for AI",description:"We implement advanced schema markup and structured content formats that AI systems can easily parse.",icon:"Code"},{title:"Content Authority Building",description:"We create comprehensive, expert-level content that positions your business as a topical authority.",icon:"BookOpen"},{title:"Brand Entity Optimization",description:"We strengthen your brand's digital entity across Wikipedia, Wikidata, Google Knowledge Graph, and other knowledge bases.",icon:"Globe"},{title:"AI Overview Monitoring",description:"We track when and how your business appears in Google AI Overviews, ChatGPT responses, and Perplexity answers.",icon:"Eye"},{title:"Multi-Platform Visibility",description:"We optimize your presence across ChatGPT, Perplexity, Google AI Overviews, Microsoft Copilot, and emerging AI search platforms.",icon:"Layers"}],process:[{step:"01",title:"AI Visibility Audit",description:"We test how your brand appears across major AI search platforms, identifying gaps and competitor presence."},{step:"02",title:"Entity & Authority Building",description:"We strengthen your brand's digital entity and build authoritative citations."},{step:"03",title:"Content Optimization",description:"We create and optimize content specifically structured for AI consumption."},{step:"04",title:"Track & Adapt",description:"We continuously monitor AI search results and adapt as platforms evolve."}],faqs:[{q:"Is AI search optimization different from traditional SEO?",a:"Yes. Traditional SEO focuses on ranking in Google's organic results. AI search optimization focuses on getting your business cited in AI-generated answers. They're complementary."},{q:"Can I control what AI says about my business?",a:"You can't directly control AI outputs, but you can heavily influence them by ensuring your brand information is accurate and authoritative."},{q:"Is it too early to invest in AI search optimization?",a:"No â early movers have a significant advantage. AI models are being trained now on current web content."}],ctaText:"Future-Proof Your SEO",relatedSlugs:["ai-marketing-strategy","on-page-seo","seo-strategy"]},"website-design":{slug:"website-design",parentSlug:"growth-systems",parentTitle:"Growth Systems",title:"Website Design",heroSubtitle:"Beautiful, conversion-focused designs that make lasting first impressions",image:G5,intro:"Your website has about 3 seconds to make a first impression. We design websites that don't just look beautiful â they're strategically crafted to build trust, communicate your value, and guide visitors toward taking action.",whyItMatters:"94% of first impressions are design-related, and 75% of consumers judge a company's credibility based on their website design. A professionally designed website isn't a luxury â it's a necessity.",stats:[{value:"94%",label:"of first impressions are design-related"},{value:"75%",label:"of credibility comes from website design"},{value:"3sec",label:"to make a first impression online"},{value:"88%",label:"of users won't return after a bad experience"}],features:[{title:"Custom Brand-Aligned Design",description:"We create designs that authentically represent your brand while following modern design best practices.",icon:"Palette"},{title:"Conversion-Optimized Layouts",description:"Every section, every CTA is strategically placed based on user behavior research.",icon:"Target"},{title:"Mobile-First Approach",description:"We design for mobile first, then scale up to desktop.",icon:"Smartphone"},{title:"UX Research & Wireframing",description:"We research your users, map their journey, and create wireframes that validate strategy.",icon:"Layout"},{title:"Accessibility Compliance",description:"We design with WCAG accessibility standards ensuring usability for everyone.",icon:"Eye"},{title:"Design System Creation",description:"We create reusable design systems with consistent typography, colors, and components.",icon:"Grid"}],process:[{step:"01",title:"Discovery & Research",description:"We learn your brand, study your audience, analyze competitors, and define goals."},{step:"02",title:"Wireframes & Strategy",description:"We create page-by-page wireframes mapping content hierarchy and conversion paths."},{step:"03",title:"Visual Design",description:"We bring wireframes to life with your brand's visual personality."},{step:"04",title:"Review & Handoff",description:"We present designs for feedback, iterate, then hand off pixel-perfect specifications."}],faqs:[{q:"How long does the design process take?",a:"Typical projects take 3-6 weeks depending on complexity."},{q:"Will my website be mobile-friendly?",a:"Absolutely. We design mobile-first."},{q:"Can I provide input during the design process?",a:"Yes! Design is collaborative with clear checkpoints for feedback."}],ctaText:"Start Your Design",relatedSlugs:["website-development","ecommerce-websites","landing-pages-funnels"]},"website-development":{slug:"website-development",parentSlug:"growth-systems",parentTitle:"Growth Systems",title:"Website Development",heroSubtitle:"Fast, secure, scalable websites built with modern technology",image:K5,intro:"A beautiful design is only as good as the code behind it. We build websites that are fast, secure, scalable, and maintainable â using modern development practices.",whyItMatters:"The technology behind your website affects everything: how fast it loads, how secure it is, how well it ranks, how easy it is to update, and how it scales.",stats:[{value:"<2s",label:"target page load time for optimal conversions"},{value:"99.9%",label:"uptime guarantee for our hosted sites"},{value:"100",label:"target Google PageSpeed score"},{value:"0",label:"security vulnerabilities in our delivered code"}],features:[{title:"Modern Tech Stack",description:"We build with industry-leading technologies that deliver blazing-fast performance.",icon:"Code"},{title:"Performance Optimization",description:"We optimize every aspect of performance for sub-2-second load times.",icon:"Zap"},{title:"Security Best Practices",description:"We implement SSL, security headers, input sanitization, and regular updates.",icon:"Shield"},{title:"SEO-Ready Architecture",description:"Clean HTML, proper headings, fast loads, mobile responsiveness, and schema markup.",icon:"Search"},{title:"Content Management",description:"Intuitive CMS that empowers your team to update content without a developer.",icon:"Edit"},{title:"Analytics Integration",description:"Google Analytics, c
418onversion tracking, and custom event tracking.",icon:"BarChart3"}],process:[{step:"01",title:"Technical Planning",description:"We define the tech stack, hosting, integrations, and architecture."},{step:"02",title:"Development",description:"We build in iterative sprints, delivering working features regularly."},{step:"03",title:"Testing & QA",description:"Rigorous testing across browsers, devices, and screen sizes."},{step:"04",title:"Launch & Support",description:"We handle deployment, DNS, SSL, and post-launch monitoring."}],faqs:[{q:"What platform do you build on?",a:"We choose the best platform for your needs â WordPress, Shopify, or custom solutions."},{q:"Do you provide ongoing maintenance?",a:"Yes, we offer monthly maintenance plans with security updates and monitoring."},{q:"Can you rebuild my existing website?",a:"Absolutely. We preserve SEO equity while redesigning and rebuilding."}],ctaText:"Build Your Website",relatedSlugs:["website-design","ecommerce-websites","technical-seo"]},"ecommerce-websites":{slug:"ecommerce-websites",parentSlug:"growth-systems",parentTitle:"Growth Systems",title:"E-commerce Websites",heroSubtitle:"Online stores that turn browsers into buyers",image:Y5,intro:"Selling online requires more than just listing products. It requires a strategically designed shopping experience that builds trust, reduces friction, and makes buying effortless.",whyItMatters:"E-commerce sales are projected to reach $6.3 trillion in 2025. The difference between a 1% and 3% conversion rate is literally tripling your revenue from the same traffic.",stats:[{value:"$6.3T",label:"global e-commerce sales projected for 2025"},{value:"70%",label:"of shopping carts are abandoned before checkout"},{value:"3x",label:"more revenue from optimized vs. average stores"},{value:"85%",label:"of shoppers say product photos influence purchases"}],features:[{title:"Conversion-Optimized Product Pages",description:"High-quality galleries, compelling descriptions, social proof, and clear CTAs.",icon:"ShoppingCart"},{title:"Streamlined Checkout",description:"Guest checkout, multiple payment options, progress indicators, minimal form fields.",icon:"CreditCard"},{title:"Inventory & Order Management",description:"Robust inventory tracking, order management, and automated fulfillment.",icon:"Package"},{title:"Payment Processing",description:"Secure gateways including Stripe, PayPal, Square, and Apple Pay.",icon:"Shield"},{title:"Shipping & Tax Automation",description:"Real-time shipping rates, tax calculations, and shipping label generation.",icon:"Truck"},{title:"Product SEO",description:"Optimized product pages with structured data, clean URLs, and category architecture.",icon:"Search"}],process:[{step:"01",title:"Store Strategy",description:"We plan categories, checkout flow, payment methods, and shipping rules."},{step:"02",title:"Design & Build",description:"We design and develop with focus on beautiful product presentation."},{step:"03",title:"Product Setup",description:"We set up your catalog, configure variants, manage imagery, and write descriptions."},{step:"04",title:"Launch & Optimize",description:"We launch, set up analytics, and continuously optimize based on data."}],faqs:[{q:"Which e-commerce platform do you recommend?",a:"Shopify for most SMBs. WooCommerce for WordPress users. We evaluate your needs."},{q:"Can you migrate my existing store?",a:"Yes. We handle product data migration, URL redirects, and SEO preservation."},{q:"How do you reduce cart abandonment?",a:"Guest checkout, saved carts, exit-intent offers, abandoned cart emails, and trust signals."}],ctaText:"Launch Your Store",relatedSlugs:["website-design","google-ads","email-marketing"]},"landing-pages-funnels":{slug:"landing-pages-funnels",parentSlug:"growth-systems",parentTitle:"Growth Systems",title:"Landing Pages & Funnels",heroSubtitle:"High-converting landing pages that turn ad clicks into customers",image:e1,intro:"You're paying for traffic. But if that traffic lands on a generic page with no clear direction, you're burning money. We build purpose-driven landing pages and conversion funnels designed to turn visitors into leads and leads into customers.",whyItMatters:"The average landing page conversion rate is 2.35%, but the top 25% convert at 5.31% or higher. That difference in conversion rate can mean doubling your leads from the same ad spend.",stats:[{value:"2.35%",label:"average landing page conversion rate"},{value:"5.31%",label:"conversion rate of top-performing landing pages"},{value:"48%",label:"of marketers build a new landing page for each campaign"},{value:"300%",label:"increase in leads with optimized landing pages"}],features:[{title:"Conversion-Focused Design",description:"Single-purpose pages with one clear CTA, remov
418ing distractions.",icon:"Target"},{title:"A/B Testing Framework",description:"We test headlines, layouts, CTAs, and offers to find what converts best.",icon:"BarChart3"},{title:"Lead Capture Optimization",description:"Smart forms, multi-step forms, and progressive profiling to maximize submissions.",icon:"Users"},{title:"Speed Optimization",description:"Lightweight pages that load instantly â because every second of delay costs conversions.",icon:"Zap"},{title:"Ad-to-Page Alignment",description:"We ensure your landing page messaging matches your ad copy.",icon:"Link"},{title:"Multi-Step Funnels",description:"We design complete funnel sequences â awareness, consideration, conversion, upsell.",icon:"Layers"}],process:[{step:"01",title:"Strategy & Research",description:"We define goals, audience, and conversion paths."},{step:"02",title:"Design & Copy",description:"We create compelling designs with persuasive copy."},{step:"03",title:"Build & Test",description:"We develop the pages, integrate tracking, and run A/B tests."},{step:"04",title:"Optimize & Scale",description:"We continuously optimize based on data and scale winning variations."}],faqs:[{q:"What's the difference between a landing page and a regular page?",a:"Landing pages are single-purpose pages designed around one specific conversion goal."},{q:"How many landing pages do I need?",a:"We recommend one landing page per campaign, offer, or audience segment."},{q:"Do you write the copy for landing pages?",a:"Yes. Conversion-focused copywriting is included in our landing page service."}],ctaText:"Build Your Funnel",relatedSlugs:["google-ads","meta-ads","ghl-pipeline-automation"]},"google-ads":{slug:"google-ads",parentSlug:"growth-systems",parentTitle:"Growth Systems",title:"Google Ads Management",heroSubtitle:"Reach customers at the exact moment they're searching for your services",image:Z5,intro:"Google Ads puts your business in front of people who are actively searching for what you offer. We build and manage campaigns that maximize your return on every dollar spent â from keyword research and bidding strategy to ad copy and landing page alignment.",whyItMatters:"Google processes 8.5 billion searches per day. When managed properly, Google Ads delivers the highest-intent traffic available in digital marketing.",stats:[{value:"8.5B",label:"daily Google searches worldwide"},{value:"8:1",label:"average ROI for well-managed Google Ads"},{value:"65%",label:"of people click on Google Ads when ready to buy"},{value:"200%",label:"average revenue increase for our clients"}],features:[{title:"Search Campaign Management",description:"Keyword-targeted campaigns that capture high-intent search traffic.",icon:"Search"},{title:"Display & Remarketing",description:"Visual ads across the Google Display Network to build awareness and retarget visitors.",icon:"Monitor"},{title:"Shopping Campaigns",description:"Product listing ads that showcase your inventory directly in search results.",icon:"ShoppingCart"},{title:"Bid Strategy Optimization",description:"AI-powered and manual bid strategies optimized for your specific conversion goals.",icon:"TrendingUp"},{title:"Ad Copy & Extensions",description:"Compelling ad copy with sitelinks, callouts, and structured snippets.",icon:"FileText"},{title:"Conversion Tracking",description:"Full-funnel conversion tracking from first click to final sale.",icon:"BarChart3"}],process:[{step:"01",title:"Audit & Strategy",description:"We analyze your current performance, competitors, and keyword opportunities."},{step:"02",title:"Campaign Build",description:"We structure campaigns with proper ad groups, keywords, and targeting."},{step:"03",title:"Launch & Optimize",description:"We launch, monitor, and continuously optimize for maximum ROI."},{step:"04",title:"Scale & Report",description:"We scale winning campaigns and provide transparent performance reporting."}],faqs:[{q:"How much should I budget for Google Ads?",a:"It depends on your industry and goals. We recommend starting with $1,500-3,000/month for meaningful data collection and optimization."},{q:"How long before I see results?",a:"You can start getting clicks immediately, but 2-3 months of optimization is needed for peak performance."},{q:"Do you manage existing Google Ads accounts?",a:"Yes. We audit existing accounts and identify improvement opportunities before making changes."}],ctaText:"Start Google Ads",relatedSlugs:["meta-ads","youtube-ads","landing-pages-funnels"]},"meta-ads":{slug:"meta-ads",parentSlug:"growth-systems",parentTitle:"Growth Systems",title:"Meta Ads Management",heroSubtitle:"Reach your ideal audience on Facebook and Instagram with precision targeting",image:X5,intro:"Meta Ads (Facebook & Instagram) give you access to the most detailed audience targeting in digital advertising. We build campaigns that reach your ideal customers based on demographics, interests, behaviors, and lookalike audiences â driving awareness, engagement, and conversions.",whyItMatters:"3.05 billion people use Meta platforms monthly. With the right targeting and creative, Meta Ads can deliver leads at a fraction of the cost of other channels.",stats:[{value:"3.05B",label:"monthly active Meta users worldwide"},{value:"72%",label:"of consumers have made a purchase after seeing a Meta ad"},{value:"5-10x",label:"ROAS for well-optimized Meta campaigns"},{value:"1,000+",label:"audience targeting parameters available"}],features:[{title:"Audience Strategy",description:"We build custom, lookalike, and retargeting audiences based on your ideal customer profile.",icon:"Users"},{title:"Creative Production",description:"Scroll-stopping images, carousels, and video ads designed for each platform.",icon:"Image"},{title:"Lead Generation Campaigns",description:"In-platform lead forms that capture contact information without leaving the app.",icon:"UserPlus"},{title:"Retargeting Campaigns",description:"Re-engage website visitors, video viewers, and past customers.",icon:"RefreshCw"},{title:"Conversion Optimization",description:"We optimize for the actions that matter most to your business.",icon:"Target"},{title:"Creative Testing",description:"Systematic A/B testing of headlines, images, copy, and CTAs.",icon:"Layers"}],process:[{step:"01",title:"Audience Research",description:"We research your ideal customer and build detailed targeting strategies."},{step:"02",title:"Creative Development",description:"We produce ad creative designed to stop the scroll and drive action."},{step:"03",title:"Campaign Launch",description:"We structure and launch campaigns with proper objectives and budgets."},{step:"04",title:"Optimize & Report",description:"We continuously test, optimize, and report on performance."}],faqs:[{q:"Which is better â Facebook Ads or Google Ads?",a:"They serve different purposes. Google captures existing demand; Meta creates new demand. Most businesses benefit from both."},{q:"How much creative do I need?",a:"We recommend 3-5 ad variations per campaign for effective testing. We handle the creative production."},{q:"Can you target my competitors' customers?",a:"We can target people who follow competitor pages and have similar interests and behaviors."}],ctaText:"Launch Meta Ads",relatedSlugs:["google-ads","youtube-ads","landing-pages-funnels"]},"youtube-ads":{slug:"youtube-ads",parentSlug:"growth-systems",parentTitle:"Growth Systems",title:"YouTube Ads",heroSubtitle:"Leverage video advertising to drive awareness and conversions at scale",image:J5,intro:"YouTube is the world's second-largest search engine and the leading platform for video content. YouTube Ads let you reach your audience with engaging video content at scale â from short bumper ads to in-stream commercials.",whyItMatters:"People watch over 1 billion hours of YouTube video daily. Video ads have proven to increase purchase intent by up to 150%.",stats:[{value:"2.5B",label:"monthly active YouTube users"},{value:"1B+",label:"hours of video watched daily"},{value:"150%",label:"increase in purchase intent from video ads"}
418,{value:"70%",label:"of viewers say they bought from a brand after seeing YouTube ad"}],features:[{title:"In-Stream Ads",description:"Skippable and non-skippable ads before, during, or after YouTube videos.",icon:"Play"},{title:"Discovery Ads",description:"Ads that appear alongside related videos and in search results.",icon:"Search"},{title:"Bumper Ads",description:"6-second non-skippable ads designed for maximum brand recall.",icon:"Zap"},{title:"Audience Targeting",description:"We target by demographics, interests, topics, placements, and custom intent.",icon:"Target"},{title:"Video Creative Strategy",description:"We develop video concepts and scripts optimized for each ad format.",icon:"Video"},{title:"Performance Tracking",description:"Full-funnel tracking from view to website visit to conversion.",icon:"BarChart3"}],process:[{step:"01",title:"Strategy & Scripting",description:"We develop video strategy and scripts aligned with your goals."},{step:"02",title:"Audience Setup",description:"We build detailed audience targeting for maximum relevance."},{step:"03",title:"Campaign Launch",description:"We set up and launch campaigns with proper bidding and objectives."},{step:"04",title:"Optimize & Scale",description:"We analyze performance and scale winning audiences and creatives."}],faqs:[{q:"Do I need professional video for YouTube Ads?",a:"Not necessarily. Authentic, well-scripted videos often outperform highly produced content. We help with strategy either way."},{q:"How much do YouTube Ads cost?",a:"Average CPV is $0.01-$0.30 depending on targeting and industry. You only pay when viewers watch 30+ seconds."},{q:"Can YouTube Ads drive direct conversions?",a:"Yes. With proper targeting and landing pages, YouTube Ads can drive measurable leads and sales."}],ctaText:"Start YouTube Ads",relatedSlugs:["google-ads","ott-ctv-advertising","meta-ads"]},"ott-ctv-advertising":{slug:"ott-ctv-advertising",parentSlug:"growth-systems",parentTitle:"Growth Systems",title:"OTT / CTV Advertising",heroSubtitle:"Reach cord-cutters on streaming platforms with targeted TV ads",image:Q5,intro:"OTT (Over-The-Top) and CTV (Connected TV) advertising lets you reach streaming TV viewers on platforms like Roku, Hulu, Amazon Fire TV, and more â with the precise targeting and measurability of digital advertising.",whyItMatters:"Over 85% of US households now use a streaming service. Traditional TV ad spending is declining while OTT/CTV is growing 20%+ annually.",stats:[{value:"85%",label:"of US households use streaming services"},{value:"20%+",label:"annual growth in OTT/CTV ad spending"},{value:"98%",label:"ad completion rate on CTV (non-skippable)"},{value:"3x",label:"more cost-effective than traditional TV advertising"}],features:[{title:"Platform Selection",description:"We identify the best streaming platforms for your audience and budget.",icon:"Monitor"},{title:"Audience Targeting",description:"Geographic, demographic, behavioral, and interest-based targeting.",icon:"Target"},{title:"Creative Production",description:"We produce broadcast-quality video ads optimized for streaming platforms.",icon:"Video"},{title:"Cross-Device Retargeting",description:"We retarget CTV viewers on their mobile devices and computers.",icon:"Smartphone"},{title:"Attribution & Measurement",description:"We track website visits, conversions, and foot traffic driven by CTV ads.",icon:"BarChart3"},{title:"Frequency Management",description:"We control ad frequency to maximize impact without viewer fatigue.",icon:"Settings"}],process:[{step:"01",title:"Audience & Platform Strategy",description:"We identify your target audience and select the best streaming platforms."},{step:"02",title:"Creative Development",description:"We produce or adapt video creative for CTV formats."},{step:"03",title:"Campaign Launch",description:"We launch campaigns with precise targeting and budget allocation."},{step:"04",title:"Measure & Optimize",description:"We analyze performance metrics and optimize for maximum reach and impact."}],faqs:[{q:"What's the difference between OTT and CTV?",a:"OTT refers to
418streaming content delivery. CTV refers to the devices (smart TVs, Roku, etc.). We use both terms together."},{q:"Is OTT/CTV advertising affordable for small businesses?",a:"Yes. Unlike traditional TV, CTV campaigns can start with budgets as low as $1,000/month."},{q:"Can you target specific geographic areas?",a:"Absolutely. We can target by zip code, DMA, city, state, or custom geographic areas."}],ctaText:"Start Streaming Ads",relatedSlugs:["youtube-ads","google-ads","meta-ads"]},"ai-marketing-strategy":{slug:"ai-marketing-strategy",parentSlug:"ai-implementation",parentTitle:"AI Implementation & Automation",title:"AI-Powered Marketing Strategy",heroSubtitle:"Leverage artificial intelligence to outpace your competition and drive smarter growth",image:oA,intro:"AI is no longer a future concept â it's the competitive advantage separating businesses that grow from those that stagnate. We help small and medium-sized businesses integrate AI into their marketing strategy in practical, results-driven ways. From predictive analytics and automated content to AI-optimized ad campaigns and intelligent customer segmentation, we make AI work for your business â not the other way around.",whyItMatters:"Businesses that adopt AI in their marketing see 40% higher revenue growth than those that don't. But most SMBs don't have the expertise to implement AI effectively. That's where we come in â we bridge the gap between cutting-edge AI capabilities and practical business application, so you get the results without the complexity.",stats:[{value:"40%",label:"higher revenue growth for AI-adopting businesses"},{value:"77%",label:"of marketers use AI in some form today"},{value:"3x",label:"faster content production with AI workflows"},{value:"50%",label:"reduction in customer acquisition costs with AI targeting"}],features:[{title:"AI Marketing Audit",description:"We evaluate your current marketing stack and identify where AI can deliver the highest ROI â from content creation to campaign optimization to customer targeting.",icon:"Brain"},{title:"Predictive Analytics & Insights",description:"We implement AI-powered analytics that predict customer behavior, identify high-value segments, and surface opportunities your competitors miss.",icon:"TrendingUp"},{title:"AI-Optimized Ad Campaigns",description:"We use machine learning to optimize bid strategies, audience targeting, and creative performance across Google, Meta, and other platforms â delivering better results at lower cost.",icon:"Target"},{title:"Intelligent Customer Segmentation",description:"AI analyzes your customer data to create hyper-specific segments based on behavior, preferences, and purchase likelihood â enabling personalized marketing at scale.",icon:"Users"},{title:"Marketing Automation Integration",description:"We connect AI tools with your existing marketing systems â CRM, email, ads, analytics â creating an intelligent, interconnected ecosystem.",icon:"Settings"},{title:"Competitive Intelligence",description:"AI-powered monitoring of competitor strategies, market trends, and industry shifts so you can stay ahead of changes instead of reacting to them.",icon:"Eye"}],process:[{step:"01",title:"AI Readiness Assessment",description:"We audit your current tools, data, and processes to determine where AI will have the biggest impact on your marketing performance."},{step:"02",title:"Strategy & Roadmap",description:"We build a phased AI implementation plan prioritized by ROI potential, starting with quick wins and building toward full AI integration."},{step:"03",title:"Implementation",description:"We deploy AI tools and integrations, configure automations, and train your team on the new capabilities."},{step:"04",title:"Optimize & Expand",description:"We continuously monitor AI performance, refine models, and expand AI applications as new opportunities emerge."}],faqs:[{q:"Is AI marketing only for large companies?",a:"Not anymore. Modern AI tools are accessible and affordable for businesses of all sizes. We specialize in implementing AI solutions that are practical and cost-effective for small and medium-sized businesses."},{q:"Will AI replace my marketing team?",a:"No. AI augments your team by handling data analysis, optimization, and repetitive tasks â freeing your people to focus on strategy, creativity, and relationship building."},{q:"How quickly will I see results from AI marketing?",a:"Some AI implementations show results within weeks (like ad optimization). Others, like predictive analytics, build value over 2-3 months as the models learn from your data."}],ctaText:"Explore AI Marketing",relatedSlugs:["ai-search-optimization","ai-chatbots","ai-content-creation"]},"ai-chatbots":{slug:"ai-chatbots",parentSlug:"ai-implementation",parentTitle:"AI Implementation & Automation",title:"AI Chatbots & Conversational AI",heroSubtitle:"Engage visitors, capture leads, and answer questions 24/7 with intelligent chatbots",image:rz,intro:"Your website visitors have questions â and they expect immediate answers. AI-
418powered chatbots provide instant, intelligent responses 24/7, qualifying leads, booking appointments, and answering FAQs without requiring human intervention. We build custom chatbot solutions that feel natural, on-brand, and genuinely helpful â not robotic or frustrating.",whyItMatters:"79% of consumers prefer live chat for immediate answers, but most small businesses can't staff 24/7 support. AI chatbots bridge this gap by providing instant, accurate responses at any hour â capturing leads that would otherwise leave your site unanswered.",stats:[{value:"79%",label:"of consumers prefer live chat for instant answers"},{value:"24/7",label:"availability without additional staffing costs"},{value:"67%",label:"of consumers have used a chatbot in the past year"},{value:"3x",label:"more leads captured with chatbot engagement"}],features:[{title:"Custom AI Chatbot Development",description:"We build chatbots trained on your specific business, services, FAQs, and brand voice â not generic, one-size-fits-all bots.",icon:"MessageSquare"},{title:"Lead Qualification & Capture",description:"Your chatbot asks the right questions to qualify leads, collect contact information, and route hot prospects to your team instantly.",icon:"UserPlus"},{title:"Appointment Scheduling",description:"Integrated with your calendar, the chatbot can book consultations, demos, and appointments without human involvement.",icon:"Calendar"},{title:"Multi-Channel Deployment",description:"Deploy your chatbot on your website, Facebook Messenger, Instagram DMs, SMS, and more â one bot, every channel.",icon:"Globe"},{title:"Human Handoff",description:"When conversations require a human touch, the bot seamlessly transfers to your team with full conversation context.",icon:"Users"},{title:"Analytics & Optimization",description:"We track conversation quality, lead capture rates, and customer satisfaction to continuously improve bot performance.",icon:"BarChart3"}],process:[{step:"01",title:"Discovery & Training",description:"We learn your business, catalog your FAQs, map conversation flows, and train the AI on your specific knowledge base."},{step:"02",title:"Bot Design & Build",description:"We design conversation flows, configure AI responses, and build the chatbot with your brand personality."},{step:"03",title:"Integration & Launch",description:"We deploy across your chosen channels, integrate with your CRM and calendar, and launch with monitoring."},{step:"04",title:"Learn & Improve",description:"We analyze conversations, identify gaps, and continuously train the bot to handle more scenarios better."}],faqs:[{q:"Will the chatbot sound robotic?",a:"No. We train AI chatbots on your brand voice and use advanced language models that generate natural, conversational responses."},{q:"Can the chatbot handle complex questions?",a:"For most common questions, yes. For highly complex or sensitive inquiries, the bot seamlessly hands off to a human team member."},{q:"Does it integrate with my CRM?",a:"Yes. We integrate with GoHighLevel, HubSpot, Salesforce, and most popular CRM platforms to automatically sync lead data."}],ctaText:"Get Your AI Chatbot",relatedSlugs:["voice-ai-agents","ghl-crm-setup","ai-marketing-strategy"]},"ai-content-creation":{slug:"ai-content-creation",parentSlug:"ai-implementation",parentTitle:"AI Implementation & Automation",title:"AI Content Creation",heroSubtitle:"Produce high-quality marketing content faster with AI-powered workflows",image:sz,intro:"Content is the fuel of modern marketing â but creating enough quality content to feed your blog, social media, email campaigns, and website is a constant challenge. We use AI-powered content workflows to produce high-quality, on-brand content at 3x the speed and a fraction of the cost of traditional content production â with human oversight ensuring every piece meets your standards.",whyItMatters:"Businesses that publish consistent, high-quality content generate 3x more leads than those that don't. But most SMBs struggle to produce enough content to stay relevant. AI content creation solves the volume problem without sacrificing quality.",stats:[{value:"3x",label:"faster content production with AI workflows"},{value:"67%",label:"cost reduction vs. traditional content agencies"},{value:"5x",label:"more content output per month with AI assistance"},{value:"92%",label:"of marketers plan to increase AI content spending"}],features:[{title:"Blog & Article Production",description:"AI-assisted long-form content that's researched, written, and optimized for SEO â with human editing for quality, accuracy, and brand voice.",icon:"FileText"},{title:"Social Media Content",description:"Platform-optimized social posts, captions, and content calendars generated by AI and refined by our team.",icon:"Share2"},{title:"Email Copy & Sequences",description:"AI-powered email campaigns, nurture sequences, and promotional content that drives opens, clicks, and conversions.",icon:"Mail"},{title:"Ad Copy Generation",description:"Multiple ad copy variations generated and tested for Google, Meta, and other platforms â finding winners faster.",icon:"Megaphone"},{title:"Website Copy",description:"Service pages, landing pages, and website content that's persuasive, SEO-optimized, and aligned with your brand.",icon:"Globe"},{title:"Content Strategy",description:"AI-powered topic research, keyword analysis, and content gap identification to guide your content calendar.",icon:"Map"}],process:[{step:"01",title:"Brand & Voice Training",description:"We analyze your existing content, brand guidelines, and tone to train AI models on your specific voice and style."},{step:"02",title:"Content Strategy",description:"We use AI to i
418dentify high-value topics, keywords, and content gaps across your industry."},{step:"03",title:"Production & Review",description:"AI generates drafts, our team edits and refines, and you approve final content before publication."},{step:"04",title:"Publish & Optimize",description:"We publish, track performance, and use data to continuously improve content quality and relevance."}],faqs:[{q:"Is AI-generated content detectable by Google?",a:"Google's stance is that quality matters more than how content is created. Our process combines AI speed with human expertise to produce content that meets Google's quality standards."},{q:"Will the content sound like my brand?",a:"Yes. We train AI on your brand voice and have human editors ensure every piece maintains your tone, style, and messaging standards."},{q:"Can AI create content for any industry?",a:"AI excels at researching and writing across virtually every industry. For highly specialized fields, we pair AI with subject matter expert review."}],ctaText:"Scale Your Content",relatedSlugs:["ai-marketing-strategy","seo-strategy","email-marketing"]},"voice-ai-agents":{slug:"voice-ai-agents",parentSlug:"ai-implementation",parentTitle:"AI Implementation & Automation",title:"Voice AI Agents",heroSubtitle:"AI-powered phone agents that answer calls, qualify leads, and book appointments automatically",image:iz,intro:"What if every phone call to your business was answered instantly â 24 hours a day, 7 days a week â by an intelligent agent that sounds natural, knows your business, qualifies leads, and books appointments directly into your calendar? That's exactly what Voice AI delivers. We build and deploy custom voice AI agents that handle inbound and outbound calls with human-like conversation, eliminating missed calls and turning every inquiry into an opportunity.",whyItMatters:"62% of calls to small businesses go unanswered. Each missed call is a missed opportunity â and your competitor's gain. Voice AI ensures every call is handled professionally, every lead is captured, and every appointment is booked â without hiring additional staff.",stats:[{value:"62%",label:"of calls to small businesses go unanswered"},{value:"24/7",label:"call coverage without additional staff"},{value:"85%",label:"of callers who can't reach a business won't call back"},{value:"40%",label:"increase in booked appointments with Voice AI"}],features:[{title:"Inbound Call Handling",description:"Your Voice AI agent answers every call instantly, greets callers by context, answers common questions, and routes complex inquiries to the right team member.",icon:"Phone"},{title:"Outbound Calling Campaigns",description:"AI agents make outbound calls for appointment confirmations, follow-ups, lead qualification, review requests, and re-engagement campaigns.",icon:"PhoneOutgoing"},{title:"Appointment Booking",description:"Integrated with your calendar and CRM, Voice AI books appointments in real-time, confirms details, and sends reminders automatically.",icon:"Calendar"},{title:"Lead Qualification",description:"Your AI agent asks qualifying questions, scores leads based on your criteria, and instantly routes hot leads to your sales team.",icon:"UserCheck"},{title:"Custom Voice & Personality",description:"We configure your AI agent's voice, tone, conversation style, and knowledge base to match your brand and business.",icon:"Mic"},{title:"CRM & GHL Integration",description:"Every call is logged, every lead is captured, and every interaction syncs directly with your GoHighLevel CRM or existing system.",icon:"Settings"}],process:[{step:"01",title:"Voice Agent Design",description:"We map your call flows, script conversational paths, define qualification criteria, and configure your AI agent's personality and knowledge."},{step:"02",title:"Training & Configuration",description:"We train the AI on your business specifics â services, pricing, availability, FAQs, and objection handling."},{step:"03",title:"Integration & Testing",description:"We integrate with your phone system, CRM, and calendar, then conduct extensive testing with real-world scenarios."},{step:"04",title:"Launch & Optimize",description:"We go live with monitoring, analyze call transcripts, and continuously improve the agent's performance and accuracy."}],faqs:[{q:"Will callers know they're talking to AI?",a:"Modern Voice AI is remarkably natural. Many callers won't realize they're speaking with an AI agent. If transparency is preferred, the agent can identify itself â either way, the experience feels professional and helpful."},{q:"Can Voice AI handle complex conversations?",a:"Voice AI handles most standard business inquiries effectively. For complex or sensitive conversations, the agent can seamlessly transfer to a human team member with full context."},{q:"What happens if the AI can't answer a question?",a:"The agent gracefully acknowledges the limitation and either transfers to a human, takes a message, or schedules a callback â ensuring no caller is left frustrated."}],ctaText:"Deploy Voice AI",relatedSlugs:["ai-chatbots","ghl-crm-setup","sms-automation"]},"sms-automation":{slug:"sms-automation",parentSlug:"ai-implementation",parentTitle:"AI Implementation & Automation",title:"SMS Automation",heroSubtitle:"Reach leads instantly with automated text messaging that converts",image:ez,intro:"SMS has a 98% open rate â making it the most direct communication channel available. We build automated SMS campaigns and sequences that reach your leads and customers instantly with appointment reminders, follow-ups, promotional messages, and review requests.",whyItMatters:"90% of text messages are read within 3 minutes. In a world of email overload, SMS cuts through the noise and delivers your message directly.",stats:[{value:"98%",label:"SMS open rate"},{value:"90%",label:"of texts read within 3 minutes"},{value:"45%",label:"average SMS response rate"},{value:"6x",label:"higher engagement than email"}],features:[{title:"Automated Follow-Up Sequences",description:"Trigger SMS sequences based on form submissions, missed calls, appointments, and customer actions.",icon:"MessageSquare"}
418,{title:"Appointment Reminders",description:"Reduce no-shows with automated appointment reminders and confirmation texts.",icon:"Calendar"},{title:"Review Request Campaigns",description:"Automated review request texts that boost your Google and Facebook review count.",icon:"Star"},{title:"Two-Way Conversations",description:"Customers can reply directly, and conversations route to your team or AI.",icon:"MessageCircle"},{title:"Broadcast Campaigns",description:"Send promotional messages, announcements, and offers to segmented contact lists.",icon:"Megaphone"},{title:"Compliance & Opt-In Management",description:"We ensure TCPA compliance with proper opt-in/opt-out management.",icon:"Shield"}],process:[{step:"01",title:"Strategy & Compliance",description:"We design your SMS strategy and set up compliant opt-in processes."},{step:"02",title:"Sequence Building",description:"We build automated SMS sequences triggered by specific events."},{step:"03",title:"Integration",description:"We integrate with your CRM, booking system, and other tools."},{step:"04",title:"Launch & Monitor",description:"We launch, monitor engagement rates, and optimize messaging."}],faqs:[{q:"Is SMS marketing legal?",a:"Yes, when done properly with TCPA compliance, proper opt-in consent, and opt-out mechanisms."},{q:"What kind of messages can I send?",a:"Appointment reminders, follow-ups, promotions, review requests, and transactional messages."},{q:"How is SMS automation different from mass texting?",a:"Automated SMS is triggered by specific events and personalized. Mass texting is one-to-many broadcasting."}],ctaText:"Start SMS Automation",relatedSlugs:["email-marketing","ghl-crm-setup","lead-nurture-funnels"]},"lead-nurture-funnels":{slug:"lead-nurture-funnels",parentSlug:"ai-implementation",parentTitle:"AI Implementation & Automation",title:"Lead Nurture Funnels",heroSubtitle:"Convert more leads into customers with automated nurture sequences",image:e1,intro:"Most leads aren't ready to buy immediately. Lead nurture funnels keep your business top-of-mind with strategically timed touchpoints across email, SMS, and other channels â guiding prospects from awareness through consideration to purchase.",whyItMatters:"Nurtured leads produce a 20% increase in sales opportunities. Companies that excel at lead nurturing generate 50% more sales-ready leads at 33% lower cost.",stats:[{value:"20%",label:"increase in sales opportunities from nurtured leads"},{value:"50%",label:"more sales-ready leads with nurturing"},{value:"33%",label:"lower cost per lead with nurture campaigns"},{value:"47%",label:"larger purchases by nurtured leads vs. non-nurtured"}],features:[{title:"Multi-Channel Sequences",description:"Coordinated nurture campaigns across email, SMS, voicemail drops, and social retargeting.",icon:"Layers"},{title:"Behavioral Triggers",description:"Sequences triggered by specific actions â form fills, page visits, email opens, and link clicks.",icon:"Zap"},{title:"Lead Scoring",description:"We assign scores based on engagement and behavior, automatically routing hot leads to sales.",icon:"TrendingUp"},{title:"Content Drips",description:"Educational content delivered at the right time to build trust and address objections.",icon:"BookOpen"},{title:"Pipeline Automation",description:"Leads move automatically through pipeline stages based on engagement and actions.",icon:"GitBranch"},{title:"Re-Engagement Campaigns",description:"Win back cold leads and dormant contacts with targeted re-engagement sequences.",icon:"RefreshCw"}],process:[{step:"01",title:"Funnel Mapping",description:"We map your customer journey and identify key touchpoints for nurture."},{step:"02",title:"Content & Messaging",description:"We create nurture content for each stage of the buyer's journey."},{step:"03",title:"Automation Build",description:"We build sequences in GoHighLevel with proper triggers and conditions."},{step:"04",title:"Optimize & Scale",description:"We analyze conversion data and continuously improve sequence performance."}],faqs:[{q:"How long should a nurture sequence be?",a:"Typically 5-12 touchpoints over 2-6 weeks, depending on your sales cycle."},{q:"What content works best for lead nurturing?",a:"Case studies, educational content, FAQs, testimonials, and value-driven offers."},{q:"Can you nurture leads across multiple channels?",a:"Yes. We coordinate email, SMS, voicemail, and retargeting for maximum impact."}],ctaText:"Build Your Funnel",relatedSlugs:["email-marketing","sms-automation","ghl-crm-setup"]},"ghl-crm-setup":{slug:"ghl-crm-setup",parentSlug:"ai-implementation",parentTitle:"AI Implementation & Automation",title:"GoHighLevel CRM & Marketing Platform",heroSubtitle:"Your all-in-one CRM, marketing automation, and sales system â fully configured and optimized",image:oz,intro:"GoHighLevel (GHL) is the most powerful all-in-one marketing and sales platform available for small businesses â
418combining CRM, email marketing, SMS, appointment scheduling, pipeline management, reputation management, website builder, and marketing automation into a single system. We don't just set it up â we architect your entire GHL ecosystem to match your business processes, automate your workflows, and create a growth machine that runs on autopilot.",whyItMatters:"Most businesses use 5-8 separate tools for their marketing and sales operations â paying for multiple subscriptions, dealing with integration headaches, and losing data between systems. GoHighLevel replaces them all with one platform. But the power of GHL is only realized when it's properly configured, automated, and aligned with your business goals.",stats:[{value:"5-8",label:"separate tools replaced by GoHighLevel"},{value:"60%",label:"reduction in monthly software costs"},{value:"10x",label:"faster lead response time with GHL automation"},{value:"35%",label:"increase in conversion rates after GHL implementation"}],features:[{title:"Complete CRM Configuration",description:"We set up your GoHighLevel CRM with custom pipelines, deal stages, contact properties, smart lists, and automations that mirror your exact sales process.",icon:"Database"},{title:"Sales Pipeline Automation",description:"Leads automatically move through your pipeline based on actions, triggers, and engagement â ensuring nothing falls through the cracks and your team focuses on the hottest opportunities.",icon:"GitBranch"},{title:"Email & SMS Marketing",description:"We configure email campaigns, SMS sequences, and multi-channel automations that nurture leads, onboard customers, and drive repeat business â all from within GHL.",icon:"Mail"},{title:"Appointment & Calendar System",description:"Integrated booking calendars with automated confirmations, reminders, follow-ups, and no-show recovery sequences that maximize your appointment show rate.",icon:"Calendar"},{title:"Reputation Management",description:"Automated review requests, review monitoring, and response management that build your online reputation and social proof across Google and Facebook.",icon:"Star"},{title:"Reporting & Dashboards",description:"Custom dashboards that show pipeline value, conversion rates, revenue attribution, and marketing ROI in real-time â so you always know what's working.",icon:"BarChart3"}],process:[{step:"01",title:"Business Process Mapping",description:"We map your entire sales and marketing process â lead sources, qualification steps, follow-up sequences, and conversion paths â to design your GHL architecture."},{step:"02",title:"Platform Configuration",description:"We build your GHL environment â CRM pipelines, automations, email/SMS templates, calendar booking, forms, and integrations â customized to your business."},{step:"03",title:"Automation & Workflow Build",description:"We create the automated workflows that power your lead management â from initial capture through nurture, follow-up, and conversion."},{step:"04",title:"Training & Launch",description:"We train your team on GHL, document your workflows, and provide ongoing support as you scale."}],faqs:[{q:"What is GoHighLevel?",a:"GoHighLevel is an all-in-one sales and marketing platform that combines CRM, email, SMS, calendars, pipelines, automations, reputation management, and more into a single system. It replaces tools like Mailchimp, Calendly, HubSpot, and more."},{q:"How long does GHL setup take?",a:"A complete GHL implementation typically takes 2-4 weeks. Basic CRM and pipeline setup can be done in a week. Complex automations and multi-channel workflows take longer."},{q:"Do you provide ongoing GHL support?",a:"Yes. We offer ongoing management, optimization, and support plans. We can also train your team to manage the platform independently."},{q:"Can GHL replace my current tools?",a:"In most cases, yes. GHL can replace your CRM, email marketing, SMS, calendar booking, form builder, reputation management, and funnel builder â often at a lower combined cost."}],ctaText:"Set Up GoHighLevel",relatedSlugs:["ghl-pipeline-automation","ghl-reputation-management","lead-nurture-funnels"]},"email-marketing":{slug:"email-marketing",parentSlug:"growth-systems",parentTitle:"Growth Systems",title:"Email Marketing & Sequences",heroSubtitle:"Strategic email campaigns that nurture relationships and drive revenue",image:nz,intro:"Email marketing delivers an average ROI of $42 for every $1 spent â making it one of the most cost-effective marketing channels available. We design and build automated email campaigns and sequences that nurture relationships, drive conversions, and generate repeat business.",whyItMatters:"Email is the most reliable owned channel in marketing. Unlike social media, you control the audience, the timing, and the message. A well-built email system is a revenue engine that c
418ompounds over time.",stats:[{value:"$42",label:"average ROI per $1 spent on email marketing"},{value:"4B+",label:"daily email users worldwide"},{value:"77%",label:"of marketers have seen email engagement increase"},{value:"6x",label:"higher transaction rates from email vs. other channels"}],features:[{title:"Welcome & Onboarding Sequences",description:"First impressions matter. We create welcome sequences that set expectations, deliver value, and move new subscribers toward conversion.",icon:"Mail"},{title:"Drip Campaigns",description:"Automated email sequences that deliver the right message at the right time based on subscriber behavior.",icon:"Droplets"},{title:"Promotional Campaigns",description:"Compelling promotional emails that drive sales, announce offers, and generate urgency.",icon:"Megaphone"},{title:"Re-Engagement Sequences",description:"Win back inactive subscribers and customers with targeted re-engagement campaigns.",icon:"RefreshCw"},{title:"Segmentation & Personalization",description:"Dynamic content and list segmentation that delivers personalized experiences at scale.",icon:"Users"},{title:"Analytics & Optimization",description:"A/B testing, open rate optimization, and conversion tracking to continuously improve performance.",icon:"BarChart3"}],process:[{step:"01",title:"Audit & Strategy",description:"We review your current email performance and build a strategy aligned with your goals."},{step:"02",title:"Sequence Design",description:"We map out email sequences with compelling copy, design, and timing."},{step:"03",title:"Build & Automate",description:"We build sequences in your platform with proper triggers and segmentation."},{step:"04",title:"Test & Optimize",description:"We A/B test, analyze data, and continuously improve deliverability and conversions."}],faqs:[{q:"How often should I email my list?",a:"It depends on your audience and content. Most businesses benefit from 1-4 emails per week."},{q:"What email platform do you use?",a:"We work with GoHighLevel, Mailchimp, ActiveCampaign, and other platforms based on your needs."},{q:"Can you help grow my email list?",a:"Yes. We implement lead magnets, opt-in forms, and landing pages designed to grow your subscriber base."}],ctaText:"Start Email Marketing",relatedSlugs:["sms-automation","lead-nurture-funnels","ghl-crm-setup"]},"ghl-pipeline-automation":{slug:"ghl-pipeline-automation",parentSlug:"ai-implementation",parentTitle:"AI Implementation & Automation",title:"Pipeline & Workflow Automation",heroSubtitle:"Automate your entire sales pipeline from lead capture to close",image:lz,intro:"Manual sales processes are the silent killer of small business growth. Every lead that doesn't get a fast follow-up, every appointment that isn't confirmed, every customer that isn't asked for a review â these are all revenue leaks that automation can plug. We build end-to-e
418nd pipeline automation in GoHighLevel that captures, qualifies, nurtures, and converts leads without requiring constant manual attention from your team.",whyItMatters:"Businesses that automate their lead management see 10% or more revenue increase within 6-9 months. The fastest-growing businesses aren't working harder â they're automating the repetitive processes that consume time and let leads slip through the cracks.",stats:[{value:"10%+",label:"revenue increase from lead management automation"},{value:"80%",label:"of sales require 5+ follow-ups (most businesses stop at 1)"},{value:"5min",label:"response time increases conversion 9x vs. 30-minute response"},{value:"67%",label:"of the buyer's journey is done digitally before talking to sales"}],features:[{title:"Lead Capture Automation",description:"Every lead from every source â forms, calls, chats, ads, referrals â automatically enters your CRM with proper tagging, assignment, and initial follow-up triggered instantly.",icon:"Download"},{title:"Speed-to-Lead Response",description:"Automated SMS, email, and voicemail drops fire within seconds of a new lead, ensuring your business responds before the prospect forgets they inquired.",icon:"Zap"},{title:"Pipeline Stage Automation",description:"Leads automatically move through pipeline stages based on engagement, actions, and responses â giving your team a real-time view of where every deal stands.",icon:"GitBranch"},{title:"Task & Notification System",description:"Your team receives automated task assignments and notifications when leads hit key pipeline stages or require personal outreach.",icon:"Bell"},{title:"Follow-Up Sequences",description:"Multi-channel follow-up sequences (email, SMS, voicemail) continue nurturing leads based on their behavior and pipeline position.",icon:"RefreshCw"},{title:"Booking & Confirmation Flows",description:"Automated appointment booking, confirmation, reminder, and no-show recovery workflows that maximize your show rate.",icon:"Calendar"}],process:[{step:"01",title:"Sales Process Mapping",description:"We document your current sales process, identify bottlenecks and leaks, and design optimized pipeline stages and automation triggers."},{step:"02",title:"Automation Architecture",description:"We design the complete automation system â triggers, conditions, actions, and fallback paths â before building anything."},{step:"03",title:"Build & Integrate",description:"We build all automations in GoHighLevel, integrate lead sources, and connect with your calendar, phone, and communication channels."},{step:"04",title:"Test, Train & Launch",description:"We rigorously test every automation path, train your team, and launch with monitoring to ensure everything runs smoothly."}],faqs:[{q:"Will automation feel impersonal to my leads?",a:"Done right, automation feels more personal. Leads get instant, relevant responses instead of waiting hours or days. The key is smart personalization, which we build into every workflow."},{q:"What happens when the automation needs a human touch?",a:"We build human escalation triggers into every workflow. When a lead responds, asks a complex question, or hits a key buying signal, your team is notified immediately."},{q:"How many automations do I need?",a:"We typically start with 3-5 core automations: speed-to-lead response, appointment booking, follow-up sequence, review request, and pipeline management. We can expand from there."}],ctaText:"Automate Your Pipeline",relatedSlugs:["ghl-crm-setup","lead-nurture-funnels","sms-automation"]},"ghl-reputation-management":{slug:"ghl-reputation-management",parentSlug:"ai-implementation",parentTitle:"AI Implementation & Automation",title:"Reputation Management",heroSubtitle:"Build and protect your online reputation with automated review systems",image:az,intro:"Your online reputation is often the first thing potential customers evaluate before contacting you. We build automated reputation management systems in GoHighLevel that consistently generate new reviews, monitor your online presence, and help you respond to feedback â turning your reputation into a competitive advantage.",whyItMatters:"93% of consumers say online reviews influence their purchasing decisions. Businesses with 4+ stars earn 28% more revenue than those below 4 stars. Your reputation directly impacts your bottom line.",stats:[{value:"93%",label:"of consumers say reviews influence purchasing decisions"},{value:"28%",label:"more revenue for businesses with 4+ star ratings"},{value:"72%",label:"of consumers won't act until they read reviews"}
418,{value:"5x",label:"more reviews generated with automated request systems"}],features:[{title:"Automated Review Requests",description:"Smart review request campaigns sent via SMS and email at the optimal time after service delivery â personalized and timed for maximum response.",icon:"Star"},{title:"Review Monitoring",description:"Real-time monitoring of new reviews across Google, Facebook, Yelp, and industry-specific platforms with instant team notifications.",icon:"Eye"},{title:"Response Templates & Management",description:"Pre-built response templates for positive, neutral, and negative reviews â plus a centralized dashboard for managing all reviews in one place.",icon:"MessageSquare"},{title:"Review Widget & Social Proof",description:"Display your best reviews directly on your website with beautiful review widgets that build trust and drive conversions.",icon:"Award"},{title:"Negative Review Recovery",description:"Private feedback capture that intercepts unhappy customers before they post negative reviews publicly.",icon:"Shield"},{title:"Review Analytics",description:"Track review volume, sentiment trends, response rates, and reputation score over time.",icon:"BarChart3"}],process:[{step:"01",title:"Reputation Audit",description:"We audit your current online reputation across all platforms and identify improvement opportunities."},{step:"02",title:"System Setup",description:"We configure automated review request campaigns, monitoring alerts, and response workflows in GoHighLevel."},{step:"03",title:"Launch & Generate",description:"We launch review campaigns and begin systematically generating new positive reviews."},{step:"04",title:"Monitor & Protect",description:"We continuously monitor your reputation, alert you to new reviews, and help maintain a strong online presence."}],faqs:[{q:"Is it okay to ask customers for reviews?",a:"Absolutely. Google encourages businesses to ask for reviews. What's prohibited is incentivizing reviews or posting fake ones. Our system sends genuine, compliant review requests."},{q:"How quickly will I see more reviews?",a:"Most businesses see a significant increase in reviews within the first 30 days of launching automated review requests."},{q:"Can you remove negative reviews?",a:"We can't remove legitimate negative reviews. But we can help you respond professionally and strategically, often turning a negative experience into a positive impression for future readers."}],ctaText:"Protect Your Reputation",relatedSlugs:["ghl-crm-setup","local-seo","ghl-pipeline-automation"]},"crm-setup":{slug:"crm-setup",parentSlug:"ai-implementation",parentTitle:"AI Implementation & Automation",title:"CRM Setup (GoHighLevel)",heroSubtitle:"Your all-in-one CRM configured and optimized for your business",image:tz,intro:"A CRM is only as powerful as its setup. We configure GoHighLevel as your central hub for customer relationships, lead management, and marketing automation â customized to match your business processes.",whyItMatters:"Businesses using a CRM see a 29% increase in sales. But 43% of CRM users utilize less than half of their system's features â usually because it wasn't set up properly.",stats:[{value:"29%",label:"increase in sales for businesses using CRM"},{value:"43%",label:"of CRM users underutilize their system"},{value:"300%",label:"ROI improvement with proper CRM implementation"},{value:"74%",label:"of businesses say CRM improves customer relationships"}],features:[{title:"Custom Pipeline Setup",description:"We design pipelines that mirror your sales process.",icon:"GitBranch"},{title:"Contact Management",description:"Custom fields, tags, and segmentation for organized lead data.",icon:"Users"},{title:"Automation Rules",description:"Triggers, conditions, and actions that automate routine tasks.",icon:"Zap"},{title:"Appointment System",description:"Calendar booking integrated with automated confirmations.",icon:"Calendar"},{title:"Communication Hub",description:"Email, SMS, and calling all unified in one platform.",icon:"MessageSquare"},{title:"Reporting Dashboards",description:"Real-time visibility into pipeline health and performance.",icon:"BarChart3"}],process:[{step:"01",title:"Discovery",description:"We learn your sales process, team structure, and current tools."},{step:"02",title:"Configuration",description:"We set up pipelines, automations, and integrations."},{step:"03",title:"Data Migration",description:"We migrate existing contacts and data into GoHighLevel."},{step:"04",title:"Training & Launch",description:"We train your team and provide ongoing support."}],faqs:[{q:"What is GoHighLevel?",a:"An all-in-one CRM and marketing platform that replaces multiple tools."},{q:"Can you migrate my existing data?",a:"Yes. We handle data migration from your current CRM or spreadsheets."},{q:"Do you provide training?",a:"Yes. We include team training with every CRM setup engagement."}],ctaText:"Set Up Your CRM",relatedSlugs:["ghl-crm-setup","email-marketing","sms-automation"]},"lead-generation":{slug:"lead-generation",parentSlug:"growth-systems",parentTitle:"Growth Systems",title:"Lead Generation Systems",heroSubtitle:"Predictable, qualified pipeline â engineered, not improvised",image:cz,intro:"Most businesses don't have a lead generation problem â they have a lead generation system problem. We architect end-to-e
418nd lead capture systems that combine high-intent traffic, conversion-built landing experiences, instant follow-up automation, and proper attribution. The result: a predictable pipeline you can forecast against, not a feast-or-famine cycle.",whyItMatters:"61% of marketers say generating quality leads is their #1 challenge. The businesses winning are not the ones spending more â they're the ones who treat lead generation as a system: source, capture, route, qualify, follow-up, attribute. Each piece reinforces the next.",stats:[{value:"61%",label:"of marketers say lead gen is their #1 challenge"},{value:"9x",label:"higher conversion when leads contacted in under 5 minutes"},{value:"3x",label:"more qualified leads with multi-channel capture"},{value:"47%",label:"larger purchases by nurtured leads"}],features:[{title:"Multi-Channel Lead Capture",description:"Forms, calls, chat, SMS, social â every channel routed into one CRM with proper tagging and routing logic.",icon:"Download"},{title:"High-Intent Traffic Strategy",description:"We pair lead capture systems with the right paid + organic traffic so your forms aren't sitting empty.",icon:"Target"},{title:"Speed-to-Lead Automation",description:"Automated SMS, email, and AI voice fire within seconds of capture so leads talk to you while interest is hot.",icon:"Zap"},{title:"Lead Scoring & Routing",description:"Hot leads get sales notifications. Warm leads enter nurture. Cold leads enter long-term re-engagement. Nothing slips.",icon:"GitBranch"},{title:"Attribution & Reporting",description:"Track every lead back to the source â campaign, channel, keyword â so you double down on what works.",icon:"BarChart3"},{title:"Integrated Nurture",description:"Captured leads flow directly into nurture sequences across email, SMS, and retargeting until they convert.",icon:"RefreshCw"}],process:[{step:"01",title:"Audit & Architecture",description:"We map your current funnel, find the leaks, and design the system around your actual sales motion."},{step:"02",title:"Capture Build",description:"We build the forms, landing pages, chat, and call routing â wired into your CRM with full tracking."},{step:"03",title:"Automation Layer",description:"Speed-to-lead, scoring, routing, and nurture automations go live in GoHighLevel."},{step:"04",title:"Optimize & Scale",description:"We measure conversion at every stage and remove friction until the system compounds."}],faqs:[{q:"How is this different from just running ads?",a:"Ads are a traffic source. Lead generation is a system. We build the entire system â not just the front door."},{q:"Do you handle the traffic too?",a:"Yes â we pair lead capture systems with the right paid (Google, Meta) and organic (SEO, content) channels."},{q:"How quickly will I see leads?",a:"Properly built systems start producing within 2-4 weeks. Compounding results show in 3-6 months."}],ctaText:"Build a Lead System",relatedSlugs:["conversion-optimization","landing-pages-funnels","google-ads"]},"conversion-optimization":{slug:"conversion-optimization",parentSlug:"growth-systems",parentTitle:"Growth Systems",title:"Conversion Optimization (CRO)",heroSubtitle:"Turn the traffic you already have into revenue you don't yet have",image:uz,intro:"You don't always need more traffic â you need more from the traffic you have. Conversion Rate Optimization is the discipline of finding the friction in your funnel and removing it. We use behavior data, heatmaps, session recordings, and structured A/B testing to systematically lift conversion rates across landing pages, websites, checkouts, and lead forms.",whyItMatters:"The average website converts at 2-3%. Top performers convert at 8-12%. The difference isn't more traffic â it's a methodical CRO program. A 1% lift in conversion rate is the same as a 50% lift in traffic, at zero additional ad cost.",stats:[{value:"2-3%",label:"average website conversion rate"},{value:"8-12%",label:"conversion rate of top performers"},{value:"223%",label:"average ROI of structured CRO programs"},{value:"1%",label:"lift = 50% more traffic at $0 extra cost"}],features:[{title:"Conversion Audit",description:"We analyze your funnels with heatmaps, scroll maps, session recordings, and analytics to find every leak.",icon:"Eye"},{title:"A/B & Multivariate Testing",description:"We test headlines, CTAs, layouts, forms, pricing, and offers with proper statistical rigor â not guesses.",icon:"Layers"},{title:"Landing Page Optimization",description:"We rebuild your highest-traffic pages around conversion principles: clarity, friction, trust, urgency.",icon:"Target"},{title:"Form & Checkout Optimization",description:"Reduce abandonment with smarter forms, multi-step flows, trust signals, and friction removal.",icon:"ShoppingCart"},{title:"User Experience Research",description:"User testing and behavioral analysis to understand why visitors don't convert â not just where they leave.",icon:"Users"},{title:"Continuous Improvement",description:"CRO isn't one-and-done. We run ongoing optimization sprints that compound month over month.",icon:"RefreshCw"}],process:[{step:"01",title:"Diagnose",description:"We audit your funnel, gather behavior data, and identify the highest-impact opportunities."},{step:"02",title:"Hypothesize",description:"Every test starts with a hypothesis grounded in data, not opinion."},{step:"03",title:"Test",description:"We launch A/B tests with proper sample sizes and statistical confidence."},{step:"04",title:"Implement & Iterate",description:"Winners ship. Losers teach us. Then we run the next sprint."}],faqs:[{q:"How much traffic do I need for CRO to work?",a:"We recommend at least 1,000 visitors per page per month for meaningful A/B tests. Smaller sites benefit from qualitative research instead."},{q:"How long until I see lift?",a:"Most clients see 15-40% conversion lifts within the first 90 days of structured CRO."},{q:"Do you handle implementation or just recommendations?",a:"Both. We design, build, ship, and measure â full implementation, not just a report."}],ctaText:"Lift Your Conversions",relatedSlugs:["lead-generation","landing-pages-funnels","website-design"]},"content-strategy":{slug:"content-strategy",parentSlug:"authority-visibility",parentTitle:"Authority & Visibility",title:"Content Strategy & Topical Authority",heroSubtitle:"Build the topical authority that earns rankings â in Google AND in AI",image:dz,intro:"Content without strategy is noise. We build content systems that earn topical authority â the signal Google and AI models use to decide who to cite as the expert in your space. Through keyword clustering, intent mapping, content briefs, and editorial calendars, we turn your blog from a cost center into a compounding visibility asset.",whyItMatters:"Topical authority is the new SEO. Google and AI engines reward businesses that comprehensively cover a to
418pic â not just rank for one keyword. Without a content strategy, you're publishing into the void. With one, every article reinforces the last.",stats:[{value:"3x",label:"more leads from companies with consistent content strategy"},{value:"434%",label:"more indexed pages on sites with active blogs"},{value:"67%",label:"of B2B buyers consume 3-5 pieces of content before buying"},{value:"13:1",label:"average ROI of content marketing vs. paid alone"}],features:[{title:"Keyword & Intent Research",description:"We identify the topics, keywords, and questions your buyers are searching â including AI-search prompts.",icon:"Search"},{title:"Topical Cluster Architecture",description:"We design pillar + cluster content structures that signal topical authority to Google and AI models.",icon:"Layers"},{title:"Editorial Calendar",description:"A 90-day publishing calendar mapped to buyer journey stages and SEO priorities â not random ideas.",icon:"Calendar"},{title:"Content Briefs",description:"Detailed, SEO-optimized briefs that ensure every article ranks-ready before a single word is written.",icon:"FileText"},{title:"Internal Linking Strategy",description:"Strategic internal links that distribute authority across your content cluster and lift the whole site.",icon:"Link"},{title:"AI Citation Optimization",description:"Content structured so ChatGPT, Perplexity, and Google AI Overviews cite you as the source.",icon:"Brain"}],process:[{step:"01",title:"Authority Audit",description:"We map your current content footprint, identify gaps vs. competitors, and find quick-win opportunities."},{step:"02",title:"Topical Architecture",description:"We design pillar pages and supporting cluster content around your highest-value buyer topics."},{step:"03",title:"Production System",description:"Briefs, drafts, edits, optimization, publication â a repeatable system that ships content reliably."},{step:"04",title:"Measure & Compound",description:"We track rankings, AI citations, traffic, and conversions â doubling down on what compounds."}],faqs:[{q:"How is this different from just hiring a blogger?",a:"A blogger writes posts. A content strategy ensures every post earns rankings, citations, and pipeline."},{q:"Do you produce the content too?",a:"We can. We offer strategy-only, full-production, or hybrid models â your call based on internal capacity."},{q:"How long until content drives results?",a:"First rankings: 60-90 days. Compounding traffic: 6-12 months. The earlier you start, the bigger the moat."}],ctaText:"Build Topical Authority",relatedSlugs:["seo-strategy","ai-search-optimization","ai-content-creation"]}},hz=new Set(["growth-systems","ai-implementation","authority-visibility"]);function fz(){const{slug:t}=Jf();if(t&&hz.has(t))return d.jsx(sA,{});const e=t?t1[t]:void 0;if(!e)return d.jsx(AT,{to:"/services",replace:!0});const n=e.title.split(" "),r=n.slice(-1).join(" "),s=n.slice(0,-1).join(" ");return d.jsxs(d.Fragment,{children:[d.jsxs("section",{className:"relative bg-primary overflow-hidden pt-28 pb-20 lg:pt-36 lg:pb-28 min-h-[520px] flex items-end",children:[d.jsxs("div",{className:"absolute inset-0",children:[d.jsx("img",{src:e.image,alt:e.title,className:"w-full h-full object-cover opacity-25",loading:"lazy",width:1920,height:1080}),d.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-primary via-primary/85 to-primary/40"}),d.jsx("div",{className:"absolute inset-0 bg-grid-dark opacity-30"})]}),d.jsx("div",{className:"absolute -top-20 right-0 w-[500px] h-[500px] bg-electric/25 rounded-full blur-3xl animate-blob"}),d.jsx("div",{className:"absolute -bottom-32 left-1/4 w-[420px] h-[420px] bg-magenta/20 rounded-full blur-3xl animate-blob",style:{animationDelay:"5s"}}),d.jsxs("div",{className:"container-wide mx-auto px-4 lg:px-8 relative",children:[d.jsxs("nav",{className:"flex items-center gap-2 text-sm text-primary-foreground/60 mb-6 flex-wrap",children:[d.jsx(ne,{to:"/services",className:"hover:text-accent transition-colors",children:"Services"}),d.jsx(zd,{className:"w-3.5 h-3.5"}),d.jsx(ne,{to:`/services/${e.parentSlug}`,className:"hover:text-accent transition-colors",children:e.parentTitle}),d.jsx(zd,{className:"w-3.5 h-3.5"}),d.jsx("span",{className:"text-primary-foreground",children:e.title})]}),d.jsxs("h1",{className:"font-heading font-black text-primary-foreground tracking-tighter leading-[0.95] text-4xl sm:text-5xl lg:text-7xl max-w-4xl",children:[s," ",d.jsx("span",{className:"serif italic font-normal text-gradient",children:r})]}),d.jsx("p",{className:"mt-6 text-lg lg:text-xl text-primary-foreground
418/75 max-w-2xl leading-relaxed",children:e.heroSubtitle}),d.jsxs("div",{className:"mt-10 flex flex-col sm:flex-row gap-4",children:[d.jsxs("a",{href:"https://api.leadconnectorhq.com/widget/booking/gm0vY68yNGLxXwCHFKLC",target:"_blank",rel:"noopener noreferrer",className:"group inline-flex items-center justify-between gap-3 pl-7 pr-2 py-3 bg-cta text-cta-foreground font-semibold rounded-full hover:bg-cta/90 transition-all shadow-2xl",children:[e.ctaText,d.jsx("span",{className:"w-10 h-10 rounded-full bg-cta-foreground/10 flex items-center justify-center group-hover:translate-x-1 transition-transform",children:d.jsx(pe,{className:"w-4 h-4"})})]}),d.jsx(ne,{to:"/contact",className:"inline-flex items-center justify-center gap-2 px-7 py-3 border border-primary-foreground/20 text-primary-foreground font-medium rounded-full hover:bg-primary-foreground/5 transition-all",children:"Talk to a Strategist"})]})]})]}),d.jsx(up,{words:e.features.slice(0,6).map(i=>i.title)}),d.jsx("section",{className:"section-padding bg-background",children:d.jsx("div",{className:"container-wide mx-auto",children:d.jsxs("div",{className:"grid lg:grid-cols-12 gap-12 items-start",children:[d.jsxs("div",{className:"lg:col-span-7",children:[d.jsx(ut,{eyebrow:"Overview",title:"Here's how it works",italicWords:2}),d.jsx("p",{className:"mt-6 text-lg text-muted-foreground leading-relaxed",children:e.intro}),d.jsxs("a",{href:"https://api.leadconnectorhq.com/widget/booking/gm0vY68yNGLxXwCHFKLC",target:"_blank",rel:"noopener noreferrer",className:"group inline-flex items-center gap-2 text-foreground font-semibold mt-8 border-b-2 border-foreground pb-1 hover:border-accent hover:text-accent transition-colors",children:["Schedule a Free Consultation ",d.jsx(pe,{className:"w-4 h-4 group-hover:translate-x-1 group-hover:-translate-y-1 transition-transform"})]})]}),d.jsx("div",{className:"lg:col-span-5",children:d.jsxs("div",{className:"bg-primary text-primary-foreground rounded-3xl p-8 relative overflow-hidden",children:[d.jsx("div",{className:"absolute -top-10 -right-10 w-40 h-40 bg-cta/30 rounded-full blur-3xl animate-blob"}),d.jsx("div",{className:"relative",children:d.jsx("p",{className:"text-primary-foreground/85 leading-relaxed text-lg",children:e.whyItMatters})})]})})]})})}),d.jsxs("section",{className:"bg-primary py-16 relative overflow-hidden",children:[d.jsx("div",{className:"absolute inset-0 bg-grid-dark opacity-30"}),d.jsx("div",{className:"container-wide mx-auto px-4 lg:px-8 relative",children:d.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-8 lg:gap-12",children:e.stats.map(i=>d.jsxs("div",{className:"text-center",children:[d.jsx("p",{className:"font-heading font-black text-4xl lg:text-6xl text-gradient tracking-tight",children:i.value}),d.jsx("p",{className:"text-primary-foreground/70 text-sm mt-3 leading-snug",children:i.label})]},i.label))})})]}),d.jsx("section",{className:"section-padding bg-background",children:d.jsx("div",{className:"container-wide mx-auto",children:d.jsxs("div",{className:"grid lg:grid-cols-12 gap-12 items-center",children:[d.jsxs("div",{className:"lg:col-span-6 relative group",children:[d.jsx("div",{className:"absolute -inset-4 bg-gradient-to-br from-electric/30 to-magenta/20 rounded-3xl blur-2xl opacity-50 group-hover:opacity-80 transition-opacity"}),d.jsxs("div",{className:"relative rounded-3xl overflow-hidden border border-border",children:[d.jsx("img",{src:e.image,alt:e.title,className:"w-full aspect-[4/3] object-cover",loading:"lazy",width:1280,height:960}),d.jsx("div",{className:"absolute top-5 left-5",children:d.jsx("span",{className:"inline-flex items-center px-3 py-1.5 rounded-full text-xs font-semibold bg-cta text-cta-foreground",children:e.parentTitle})})]})]}),d.jsxs("div",{className:"lg:col-span-6",children:[d.jsx(ut,{eyebrow:"What's Included",title:"The headline deliverables",italicWords:2}),d.jsx("div",{className:"mt-8 space-y-4",children:e.features.slice(0,4).map(i=>d.jsxs("div",{className:"flex items-start gap-4",children:[d.jsx("div",{className:"w-11 h-11 rounded-xl bg-accent/10 flex items-center justify-center shrink-0",children:d.jsx(ao,{className:"w-5 h-5 text-accent"})}),d.jsxs("div",{children:[d.jsx("h3",{className:"font-heading font-bold text-foreground text-lg",children:i.title}),d.jsx("p",{className:"text-muted-foreground text-sm mt-1 leading-relaxed",children:i.description})]})]},i.title))})]})]})})}),d.jsx("section",{className:"section-padding bg-secondary",children:d.jsxs("div",{className:"container-wide mx-auto",children:[d.jsx(ut,{align:"center",eyebrow:"Everything Inside",title:"What we deliver, end-to-e
418nd",italicWords:2,subtitle:`A comprehensive approach to ${e.title.toLowerCase()} that covers every angle.`}),d.jsx("div",{className:"mt-14 grid sm:grid-cols-2 lg:grid-cols-3 gap-5",children:e.features.map((i,o)=>d.jsxs("div",{className:`group relative bg-card rounded-3xl p-7 border border-border hover:border-foreground hover:shadow-2xl transition-all overflow-hidden ${o===0?"lg:col-span-2":""}`,children:[d.jsx("div",{className:"absolute top-0 right-0 w-32 h-32 bg-gradient-to-br from-accent/10 to-electric/10 rounded-full blur-2xl group-hover:scale-150 transition-transform duration-700"}),d.jsxs("div",{className:"relative",children:[d.jsxs("div",{className:"flex items-start justify-between mb-6",children:[d.jsx("span",{className:"text-xs uppercase tracking-wider font-semibold text-accent",children:String(o+1).padStart(2,"0")}),d.jsx("div",{className:"w-11 h-11 rounded-xl bg-accent/10 flex items-center justify-center group-hover:bg-accent group-hover:text-accent-foreground transition-colors",children:d.jsx(ao,{className:"w-5 h-5 text-accent group-hover:text-accent-foreground transition-colors"})})]}),d.jsx("h3",{className:`font-heading font-bold text-foreground ${o===0?"text-2xl":"text-xl"} leading-tight`,children:i.title}),d.jsx("p",{className:"text-muted-foreground text-sm mt-3 leading-relaxed",children:i.description})]})]},i.title))})]})}),d.jsxs("section",{className:"relative bg-primary overflow-hidden section-padding",children:[d.jsx("div",{className:"absolute inset-0 bg-grid-dark opacity-30"}),d.jsx("div",{className:"absolute -top-32 -right-32 w-[500px] h-[500px] bg-electric/20 rounded-full blur-3xl animate-blob"}),d.jsxs("div",{className:"container-wide mx-auto relative",children:[d.jsx(ut,{invert:!0,align:"center",eyebrow:"The Process",title:"A proven, structured approach",italicWords:2,subtitle:"Four phases that turn complexity into compounding results."}),d.jsx("div",{className:"mt-16 grid sm:grid-cols-2 lg:grid-cols-4 gap-
4185",children:e.process.map((i,o)=>d.jsxs("div",{className:"relative group",children:[d.jsxs("div",{className:"glass-dark rounded-3xl p-7 hover:border-accent/40 transition-all h-full",children:[d.jsx("span",{className:"serif font-normal text-7xl text-primary-foreground/15 group-hover:text-accent/40 transition-colors leading-none block",children:String(i.step).padStart(2,"0")}),d.jsx("h3",{className:"font-heading font-bold text-xl text-primary-foreground mt-4",children:i.title}),d.jsx("p",{className:"text-primary-foreground/70 text-sm mt-3 leading-relaxed",children:i.description})]}),o<e.process.length-1&&d.jsx("div",{className:"hidden lg:flex absolute top-1/2 -right-3 z-10",children:d.jsx(pe,{className:"w-5 h-5 text-accent/50"})})]},i.step))})]})]}),d.jsx("section",{className:"section-padding bg-background",children:d.jsxs("div",{className:"container-narrow mx-auto",children:[d.jsx(ut,{align:"center",eyebrow:"FAQs",title:"Questions, asked and answered",italicWords:2}),d.jsx("div",{className:"mt-12 space-y-3",children:e.faqs.map(i=>d.jsxs("details",{className:"bg-card rounded-2xl border border-border group hover:border-foreground transition-colors",children:[d.jsxs("summary",{className:"flex items-center justify-between cursor-pointer p-6 font-heading font-bold text-foreground hover:text-accent transition-colors",children:[d.jsx("span",{className:"text-base lg:text-lg",children:i.q}),d.jsx(zd,{className:"w-5 h-5 text-muted-foreground group-open:rotate-90 transition-transform shrink-0 ml-4"})]}),d.jsx("div",{className:"px-6 pb-6",children:d.jsx("p",{className:"text-muted-foreground leading-relaxed",children:i.a})})]},i.q))})]})}),d.jsx("section",{className:"section-padding bg-secondary",children:d.jsxs("div",{className:"container-wide mx-auto",children:[d.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-end justify-between gap-8 mb-12",children:[d.jsx(ut,{eyebrow:"Keep Exploring",title:"Related services",italicWords:1}),d.jsxs(ne,{to:`/services/${e.parentSlug}`,className:"group inline-flex items-center gap-2 text-foreground font-semibold border-b-2 border-foreground pb-1 hover:border-accent hover:text-accent transition-colors",children:["All ",e.parentTitle," ",d.jsx(pe,{className:"w-4 h-4 group-hover:translate-x-1 group-hover:-translate-y-1 transition-transform"})]})]}),d.jsx("div",{className:"grid sm:grid-cols-3 gap-5",children:e.relatedSlugs.map((i,o)=>{const a=t1[i];return a?d.jsxs(ne,{to:`/services/${i}`,className:`group bg-card rounded-3xl overflow-hidden border border-border hover:border-foreground hover:shadow-2xl transition-all ${o%2===1?"lg:translate-y-6":""}`,children:[d.jsxs("div",{className:"aspect-[4/3] overflow-hidden relative",children:[d.jsx("img",{src:a.image,alt:a.title,className:"w-full h-full object-cover group-hover:scale-110 transition-transform duration-700",loading:"lazy",width:800,height:600}),d.jsx("div",{className:"absolute top-4 left-4",children:d.jsx("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-xs font-semibold bg-background/95 text-foreground",children:a.parentTitle})})]}),d.jsxs("div",{className:"p-6",children:[d.jsx("h3",{className:"font-heading font-bold text-xl text-foreground group-hover:text-accent transition-colors leading-tight",children:a.title}),d.jsxs("span",{className:"inline-flex items-center gap-1 text-foreground text-sm font-semibold mt-4 group-hover:gap-2 group-hover:text-accent transition-all",children:["Learn more ",d.jsx(pe,{className:"w-3.5 h-3.5"})]})]})]},i):null})})]})}),d.jsx(Nr,{})]})}const pz=[{name:"Charleston HQ",address:"222 Capitol Street, Suite 522",city:"Charleston, WV 25301"},{name:"Williamson Office",address:"48 1/2 Second Ave",city:"Williamson, WV 25661"},{name:"Lebanon Office",address:"20 Clinch Mountain Ave",city:"Lebanon, VA 24266"}];function n1(){return d.jsxs(d.Fragment,{children:[d.jsx(tl,{eyebrow:"Get in Touch",title:"Let's build something remarkable",italicWords:2,subtitle:"Tell us about your business, your goals, and where you want to be twelve months from now. We'll bring the strategy.",ctaLabel:"Book a Strategy Call",ctaHref:"https://api.leadconnectorhq.com/widget/booking/gm0vY68yNGL
418xXwCHFKLC"}),d.jsx("section",{className:"section-padding bg-background",children:d.jsx("div",{className:"container-wide mx-auto",children:d.jsxs("div",{className:"grid lg:grid-cols-12 gap-10",children:[d.jsxs("div",{className:"lg:col-span-5 space-y-6",children:[d.jsxs("div",{className:"bg-card rounded-3xl p-8 border border-border",children:[d.jsx("h3",{className:"font-heading font-black text-3xl text-foreground tracking-tight",children:"Connect With Our Team."}),d.jsxs("div",{className:"mt-6 space-y-5",children:[d.jsxs("div",{className:"flex gap-4 items-start",children:[d.jsx("div",{className:"w-11 h-11 rounded-xl bg-accent/10 flex items-center justify-center shrink-0",children:d.jsx(cN,{className:"w-5 h-5 text-accent"})}),d.jsxs("div",{children:[d.jsx("p",{className:"text-xs uppercase tracking-wider text-muted-foreground",children:"Call"}),d.jsx("a",{href:"tel:3048142445",className:"text-foreground font-semibold text-lg hover:text-accent transition-colors",children:"(304) 814-2445"})]})]}),d.jsxs("div",{className:"flex gap-4 items-start",children:[d.jsx("div",{className:"w-11 h-11 rounded-xl bg-accent/10 flex items-center justify-center shrink-0",children:d.jsx(np,{className:"w-5 h-5 text-accent"})}),d.jsxs("div",{children:[d.jsx("p",{className:"text-xs uppercase tracking-wider text-muted-foreground",children:"Email"}),d.jsx("a",{href:"mailto:[email protected]",className:"text-foreground font-semibold hover:text-accent transition-colors",children:"[email protected]"})]})]}),d.jsxs("div",{className:"flex gap-4 items-start",children:[d.jsx("div",{className:"w-11 h-11 rounded-xl bg-accent/10 flex items-center justify-center shrink-0",children:d.jsx(tp,{className:"w-5 h-5 text-accent"})}),d.jsxs("div",{children:[d.jsx("p",{className:"text-xs uppercase tracking-wider text-muted-foreground",children:"Hours"}),d.jsx("p",{className:"text-foreground font-semibold",children:"MonâFri · 9amâ5pm"}),d.jsx("p",{className:"text-muted-foreground text-sm",children:"After-hours? Our Voice AI never sleeps."})]})]})]})]}),d.jsxs("div",{className:"bg-primary text-primary-foreground rounded-3xl p-8 relative overflow-hidden",children:[d.jsx("div",{className:"absolute -top-10 -right-10 w-40 h-40 bg-electric/30 rounded-full blur-3xl animate-blob"}),d.jsxs("div",{className:"relative",children:[d.jsxs("h3",{className:"font-heading font-black text-2xl tracking-tight",children:["Three locations.",d.jsx("br",{}),"One mission."]}),d.jsx("div",{className:"mt-6 space-y-5",children:pz.map(t=>d.jsxs("div",{className:"flex gap-4 items-start",children:[d.jsx(R0,{className:"w-5 h-5 text-accent shrink-0 mt-1"}),d.jsxs("div",{children:[d.jsx("p",{className:"font-semibold text-primary-foreground",children:t.name}),d.jsx("p",{className:"text-primary-foreground/70 text-sm",children:t.address}),d.jsx("p",{className:"text-primary-foreground/70 text-sm",children:t.city})]})]},t.name))})]})]})]}),d.jsxs("div",{className:"lg:col-span-7",children:[d.jsxs("div",{className:"bg-card rounded-3xl p-4 sm:p-6 border border-border shadow-2xl relative overflow-hidden",children:[d.jsx("div",{className:"absolute -top-20 -right-20 w-64 h-64 bg-magenta/10 rounded-full blur-3xl pointer-events-none"}),d.jsxs("div",{className:"relative",children:[d.jsxs("h2",{className:"font-heading font-black text-3xl lg:text-4xl text-foreground tracking-tight leading-tight px-2 pt-2",children:["Drop us a line. ",d.jsx("span",{className:"serif italic font-normal text-gradient",children:"We respond fast."})]}),d.jsx("p",{className:"text-muted-foreground mt-3 px-2",children:"Most inquiries get a reply within one business hour."}),d.jsx("iframe",{src:"https://link.apisystem.tech/widget/form/09iNCljyVO8oKgrgJYDI",title:"Contact Ideation Digital",className:"w-full mt-6 rounded-2xl border-0 bg-transparent",style:{minHeight:"720px"}})]})]}),d.jsx("a",{href:"https://api.leadconnectorhq.com/widget/booking/gm0vY68yNGLxXwCHFKLC",target:"_blank",rel:"noopener noreferrer",className:"group mt-6 block bg-primary text-primary-foreground rounded-2xl p-6 hover:bg-foreground transition-colors",children:d.jsxs("div",{className:"flex items-center justify-between gap-4",children:[d.jsxs("div",{children:[d.jsx("p",{className:"font-heading font-bold text-lg",children:"Prefer to schedule directly?"}
418),d.jsx("p",{className:"text-primary-foreground/70 text-sm mt-1",children:"Book a free 30-minute discovery call on our calendar."})]}),d.jsx("span",{className:"w-12 h-12 rounded-full bg-cta text-cta-foreground flex items-center justify-center shrink-0 group-hover:translate-x-1 transition-transform",children:d.jsx(pe,{className:"w-5 h-5"})})]})})]})]})})}),d.jsxs("section",{className:"relative h-64 overflow-hidden",children:[d.jsx("img",{src:Y0,alt:"",className:"absolute inset-0 w-full h-full object-cover",loading:"lazy",width:1920,height:1080}),d.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-background via-transparent to-primary/40"})]}),d.jsx(Nr,{})]})}const mz=[{num:"01",title:"Discovery",desc:"We learn about your business, goals, and current marketing landscape â no scripts."},{num:"02",title:"Recommendations",desc:"Receive actionable insights and a tailored strategy overview within 48 hours."},{num:"03",title:"Next Steps",desc:"A clear plan with timeline, milestones, and pricing to start driving growth."}],gz=["No high-pressure sales tactics, ever","100% complimentary â zero obligation","Real strategist on the call (never a junior rep)","Concrete next steps you can act on either way"];function yz(){return d.jsxs(d.Fragment,{children:[d.jsx(tl,{eyebrow:"Book Your Call",title:"Schedule a free strategy call",italicWords:3,subtitle:"A 30-minute conversation that could change the trajectory of your business. Pick a time that works â we'll bring the strategy."}),d.jsxs("section",{className:"section-padding bg-background relative overflow-hidden",children:[d.jsx("img",{src:Y0,alt:"",className:"absolute -top-40 -right-40 w-[800px] opacity-15",loading:"lazy",width:1920,height:1080}),d.jsx("div",{className:"container-wide mx-auto relative",children:d.jsxs("div",{className:"grid lg:grid-cols-12 gap-10 items-start",children:[d.jsxs("div",{className:"lg:col-span-5 lg:sticky lg:top-28 space-y-6",children:[d.jsxs("div",{className:"bg-primary text-primary-foreground rounded-3xl p-8 relative overflow-hidden",children:[d.jsx("div",{className:"absolute -top-10 -right-10 w-40 h-40 bg-cta/30 rounded-full blur-3xl animate-blob"}),d.jsxs("div",{className:"relative",children:[d.jsxs("div",{className:"flex items-center gap-3 mb-5",children:[d.jsx("div",{className:"w-12 h-12 rounded-full bg-cta flex items-center justify-center",children:d.jsx(Eh,{className:"w-6 h-6 text-cta-foreground"})}),d.jsx("div",{children:d.jsx("p",{className:"font-heading font-bold text-lg",children:"Discovery Call"})})]}),d.jsxs("h3",{className:"font-heading font-black text-3xl tracking-tight leading-tight",children:["30 minutes.",d.jsx("br",{}),d.jsx("span",{className:"serif italic font-normal text-cta",children:"Zero pressure."})]}),d.jsxs("div",{className:"mt-8 space-y-4",children:[d.jsxs("div",{className:"flex items-center gap-3 text-primary-foreground/80 text-sm",children:[d.jsx(tp,{className:"w-4 h-4 text-accent"})," 30 minute call"]}),d.jsxs("div",{className:"flex items-center gap-3 text-primary-foreground/80 text-sm",children:[d.jsx(W3,{className:"w-4 h-4 text-accent"})," Phone or Zoom"]}),d.jsxs("div",{className:"flex items-center gap-3 text-primary-foreground/80 text-sm",children:[d.jsx(Eh,{className:"w-4 h-4 text-accent"})," MonâFri availability"]})]}),d.jsxs("a",{href:"https://api.leadconnectorhq.com/widget/booking/gm0vY68yNGLxXwCHFKLC",target:"_blank",rel:"noopener noreferrer",className:"group mt-8 w-full inline-flex items-center justify-between gap-3 pl-6 pr-2 py-3 bg-cta text-cta-foreground font-semibold rounded-full hover:bg-cta/90 transition-all shadow-2xl",children:["Open Booking Calendar",d.jsx("span",{className:"w-10 h-10 rounded-full bg-cta-foreground/10 flex items-center justify-center group-hover:translate-x-1 transition-transform",children:d.jsx(pe,{className:"w-4 h-4"})})]})]})]}),d.jsx("div",{className:"bg-card rounded-3xl p-8 border border-border",children:d.jsx("div",{className:"space-y-3",children:gz.map(t=>d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsx(ao,{className:"w-5 h-5 text-accent shrink-0 mt-0.5"}),d.jsx("p",{className:"text-foreground text-sm",children:t})]},t))})})]}),d.jsxs("div",{className:"lg:col-span-7",children:[d.jsx(ut,{eyebrow:"What to Expect",title:"A 30-minute call that respects your time",italicWords:3,subtitle:"No fluff. No upsells. Just clarity on whether we can move the needle for your business â and a concrete plan if so."}),d.jsx("div",{className:"mt-12 space-y-5",children:mz.map(t=>d.jsxs("div",{className:"group relative bg-card rounded-3xl p-8 border border-border hover:border-foreground transition-all overflow-hidden",children:[d.jsx("div",{className:"absolute top-0 right-0 w-32 h-32 bg-gradient-to-br from-accent/10 to-electric/10 rounded-full blur-2xl group-hover:scale-150 transition-transform duration-700"}),d.jsxs("div",{className:"relative flex gap-6 items-start",children:[d.jsx("span",{className:"serif font-normal text-7xl text-foreground
418/15 group-hover:text-foreground/40 transition-colors leading-none",children:t.num}),d.jsxs("div",{className:"pt-2",children:[d.jsx("h3",{className:"font-heading font-bold text-2xl text-foreground",children:t.title}),d.jsx("p",{className:"text-muted-foreground mt-3 leading-relaxed",children:t.desc})]})]})]},t.num))}),d.jsx("div",{className:"mt-10 bg-secondary rounded-3xl p-8 border border-border",children:d.jsxs("div",{className:"flex gap-4 items-start",children:[d.jsx("div",{className:"w-12 h-12 rounded-xl bg-accent/10 flex items-center justify-center shrink-0",children:d.jsx(E3,{className:"w-6 h-6 text-accent"})}),d.jsxs("div",{children:[d.jsx("p",{className:"font-heading font-bold text-foreground text-lg",children:"Have questions first?"}),d.jsxs("p",{className:"text-muted-foreground mt-1",children:["Call us at ",d.jsx("a",{href:"tel:3048142445",className:"text-accent font-semibold hover:underline",children:"(304) 814-2445"})," or email ",d.jsx("a",{href:"mailto:[email protected]",className:"text-accent font-semibold hover:underline",children:"[email protected]"})]})]})]})})]})]})})]}),d.jsx(Nr,{title:"Or just send us a message",subtitle:"Prefer email? Drop us a line and we'll respond within one business hour.",buttonText:"Contact Us",buttonLink:"/contact"})]})}function vz(t,e,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function a(u){try{c(r.next(u))}catch(h){o(h)}}function l(u){try{c(r.throw(u))}catch(h){o(h)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((r=r.apply(t,e||[])).next())})}const bz=t=>t?(...e)=>t(...e):(...e)=>fetch(...e);class J0 extends Error{constructor(e,n="FunctionsError",r){super(e),this.name=n,this.context=r}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class xz extends J0{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class r1 extends J0{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class s1 extends J0{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var Ty;(function(t){t.Any="any",t.ApNortheast1="ap-northeast-1",t.ApNortheast2="ap-northeast-2",t.ApSouth1="ap-south-1",t.ApSoutheast1="ap-southeast-1",t.ApSoutheast2="ap-southeast-2",t.CaCentral1="ca-central-1",t.EuCentral1="eu-central-1",t.EuWest1="eu-west-1",t.EuWest2="eu-west-2",t.EuWest3="eu-west-3",t.SaEast1="sa-east-1",t.UsEast1="us-east-1",t.UsWest1="us-west-1",t.UsWest2="us-west-2"})(Ty||(Ty={}));class wz{constructor(e,{headers:n={},customFetch:r,region:s=Ty.Any}={}){this.url=e,this.headers=n,this.region=s,this.fetch=bz(r)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return vz(this,arguments,void 0,function*(n,r={}){var s,i;let o,a,l;try{const{headers:c,method:u,body:h,signal:p,timeout:f}=r;let g={},{region:m}=r;m||(m=this.region);const y=new URL(`${this.url}/${n}`);m&&m!=="any"&&(g["x-region"]=m,y.searchParams.set("forceFunctionRegion",m));let v;const b=!!c&&Object.keys(c).some(T=>T.toLowerCase()==="content-type");h&&!b?typeof Blob<"u"&&h instanceof Blob||h instanceof ArrayBuffer?(g["Content-Type"]="application/octet-stream",v=h):typeof h=="string"?(g["Content-Type"]="text/plain",v=h):typeof FormData<"u"&&h instanceof FormData?v=h:(g["Content-Type"]="application/json",v=JSON.stringify(h)):h&&typeof h!="string"&&!(typeof Blob<"u"&&h instanceof Blob)&&!(h instanceof ArrayBuffer)&&!(typeof FormData<"u"&&h instanceof FormData)?v=JSON.stringify(h):v=h;let x=p;f&&(a=new AbortController,o=setTimeout(()=>a.abort(),f),p?(x=a.signal,l=()=>a.abort(),p.addEventListener("abort",l)):x=a.signal);const k=yield this.fetch(y.toString(),{method:u||"POST",headers:Object.assign(Object.assign(Object.assign({},g),this.headers),c),body:v,signal:x}).catch(T=>{throw new xz(T)}),S=k.headers.get("x-relay-error");if(S&&S==="true")throw new r1(k);if(!k.ok)throw new s1(k);let C=((s=k.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim().toLowerCase(),E;return C==="application/json"?E=yield k.json():C==="application/octet-stream"||C==="application/pdf"?E=yield k.blob():C==="text/event-stream"?E=k:C==="multipart/form-data"?E=yield k.formData():E=yield k.text(),{data:E,error:null,response:k}}catch(c){return{data:null,error:c,response:c instanceof s1||c instanceof r1?c.context:void 0}}finally{o&&clearTimeout(o),l&&((i=r.signal)===null||i===void 0||i.removeEventListener("abort",l))}})}}const aA=3,i1=t=>Math.min(1e3*2**t,3e4),kz=[520,503],lA=["GET","HEAD","OPTIONS"];
418var o1=class extends Error{constructor(t){super(t.message),this.name="PostgrestError",this.details=t.details,this.hint=t.hint,this.code=t.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function a1(t,e){return new Promise(n=>{if(e!=null&&e.aborted){n();return}const r=setTimeout(()=>{e==null||e.removeEventListener("abort",s),n()},t);function s(){clearTimeout(r),n()}e==null||e.addEventListener("abort",s)})}function Sz(t,e,n,r){return!(!r||n>=aA||!lA.includes(t)||!kz.includes(e))}var Cz=class{constructor(t){var e,n,r,s,i;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=t.method,this.url=t.url,this.headers=new Headers(t.headers),this.schema=t.schema,this.body=t.body,this.shouldThrowOnError=(e=t.shouldThrowOnError)!==null&&e!==void 0?e:!1,this.signal=t.signal,this.isMaybeSingle=(n=t.isMaybeSingle)!==null&&n!==void 0?n:!1,this.shouldStripNulls=(r=t.shouldStripNulls)!==null&&r!==void 0?r:!1,this.urlLengthLimit=(s=t.urlLengthLimit)!==null&&s!==void 0?s:8e3,this.retryEnabled=(i=t.retry)!==null&&i!==void 0?i:!0,t.fetch?this.fetch=t.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(t,e){return this.headers=new Headers(this.headers),this.headers.set(t,e),this}retry(t){return this.retryEnabled=t,this}then(t,e){var n=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const o=this.headers.get("Accept");o==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!o||o==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const r=this.fetch;let i=(async()=>{let o=0;for(;;){const c={};n.headers.forEach((h,p)=>{c[p]=h}),o>0&&(c["X-Retry-Count"]=String(o));let u;try{u=await r(n.url.toString(),{method:n.method,headers:c,body:JSON.stringify(n.body,(h,p)=>typeof p=="bigint"?p.toString():p),signal:n.signal})}catch(h){if((h==null?void 0:h.name)==="AbortError"||(h==null?void 0:h.code)==="ABORT_ERR"||!lA.includes(n.method))throw h;if(n.retryEnabled&&o<aA){const p=i1(o);o++,await a1(p,n.signal);continue}throw h}if(Sz(n.method,u.status,o,n.retryEnabled)){var a,l;const h=(a=(l=u.headers)===null||l===void 0?void 0:l.get("Retry-After"))!==null&&a!==void 0?a:null,p=h!==null?Math.max(0,parseInt(h,10)||0)*1e3:i1(o);await u.text(),o++,await a1(p,n.signal);continue}return await n.processResponse(u)}})();return this.shouldThrowOnError||(i=i.catch(o=>{var a;let l="",c="",u="";const h=o==null?void 0:o.cause;if(h){var p,f,g,m;const b=(p=h==null?void 0:h.message)!==null&&p!==void 0?p:"",x=(f=h==null?void 0:h.code)!==null&&f!==void 0?f:"";l=`${(g=o==null?void 0:o.name)!==null&&g!==void 0?g:"FetchError"}: ${o==null?void 0:o.message}`,l+=` 419 420Caused by: ${(m=h==null?void 0:h.name)!==null&&m!==void 0?m:"Error"}: ${b}`,x&&(l+=` (${x})`),h!=null&&h.stack&&(l+=` 421${h.stack}`)}else{var y;l=(y=o==null?void 0:o.stack)!==null&&y!==void 0?y:""}const v=this.url.toString().length;return(o==null?void 0:o.name)==="AbortError"||(o==null?void 0:o.code)==="ABORT_ERR"?(u="",c="Request was aborted (timeout or manual cancellation)",v>this.urlLengthLimit&&(c+=`. Note: Your request URL is ${v} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):((h==null?void 0:h.name)==="HeadersOverflowError"||(h==null?void 0:h.code)==="UND_ERR_HEADERS_OVERFLOW")&&(u="",c="HTTP headers exceeded server limits (typically 16KB)",v>this.urlLengthLimit&&(c+=`. Your request URL is ${v} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${(a=o==null?void 0:o.name)!==null&&a!==void 0?a:"FetchError"}: ${o==null?void 0:o.message}`,details:l,hint:c,code:u},data:null,count:null,status:0,statusText:""}}
421)),i.then(t,e)}async processResponse(t){var e=this;let n=null,r=null,s=null,i=t.status,o=t.statusText;if(t.ok){var a,l;if(e.method!=="HEAD"){var c;const p=await t.text();if(p!=="")if(e.headers.get("Accept")==="text/csv")r=p;else if(e.headers.get("Accept")&&(!((c=e.headers.get("Accept"))===null||c===void 0)&&c.includes("application/vnd.pgrst.plan+text")))r=p;else try{r=JSON.parse(p)}catch{if(n={message:p},r=null,e.shouldThrowOnError)throw new o1({message:p,details:"",hint:"",code:""})}}const u=(a=e.headers.get("Prefer"))===null||a===void 0?void 0:a.match(/count=(exact|planned|estimated)/),h=(l=t.headers.get("content-range"))===null||l===void 0?void 0:l.split("/");u&&h&&h.length>1&&(s=parseInt(h[1])),e.isMaybeSingle&&Array.isArray(r)&&(r.length>1?(n={code:"PGRST116",details:`Results contain ${r.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},r=null,s=null,i=406,o="Not Acceptable"):r.length===1?r=r[0]:r=null)}else{const u=await t.text();try{n=JSON.parse(u),Array.isArray(n)&&t.status===404&&(r=[],n=null,i=200,o="OK")}catch{t.status===404&&u===""?(i=204,o="No Content"):n={message:u}}if(n&&e.shouldThrowOnError)throw new o1(n)}return{success:n===null,error:n,data:r,count:s,status:i,statusText:o}}returns(){return this}overrideTypes(){return this}},Ez=class extends Cz{throwOnError(){return super.throwOnError()}select(t){let e=!1;const n=(t??"*").split("").map(r=>/\s/.test(r)&&!e?"":(r==='"'&&(e=!e),r)).join("");return this.url.searchParams.set("select",n),this.headers.append("Prefer","return=representation"),this}order(t,{ascending:e=!0,nullsFirst:n,foreignTable:r,referencedTable:s=r}={}){const i=s?`${s}.order`:"order",o=this.url.searchParams.get(i);return this.url.searchParams.set(i,`${o?`${o},`:""}${t}.${e?"asc":"desc"}${n===void 0?"":n?".nullsfirst":".nullslast"}`),this}limit(t,{foreignTable:e,referencedTable:n=e}={}){const r=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(r,`${t}`),this}range(t,e,{foreignTable:n,referencedTable:r=n}={}){const s=typeof r>"u"?"offset":`${r}.offset`,i=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(s,`${t}`),this.url.searchParams.set(i,`${e-t+1}`),this}abortSignal(t){return this.signal=t,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:t=!1,verbose:e=!1,settings:n=!1,buffers:r=!1,wal:s=!1,format:i="text"}={}){var o;const a=[t?"analyze":null,e?"verbose":null,n?"settings":null,r?"buffers":null,s?"wal":null].filter(Boolean).join("|"),l=(o=this.headers.get("Accept"))!==null&&o!==void 0?o:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${i}; for="${l}"; options=${a};`),i==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(t){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${t}`),this}};const l1=new RegExp("[,()]");var zo=class extends Ez{throwOnError(){return super.throwOnError()}eq(t,e){return this.url.searchParams.append(t,`eq.${e}`),this}neq(t,e){return this.url.searchParams.append(t,`neq.${e}`),this}gt(t,e){return this.url.searchParams.append(t,`gt.${e}`),this}gte(t,e){return this.url.searchParams.append(t,`gte.${e}`),this}lt(t,e){return this.url.searchParams.append(t,`lt.${e}`),this}lte(t,e){return this.url.searchParams.append(t,`lte.${e}`),this}like(t,e){return this.url.searchParams.append(t,`like.${e}`),this}likeAllOf(t,e){return this.url.searchParams.append(t,`like(all).{${e.join(",")}}`),this}likeAnyOf(t,e){return this.url.searchParams.append(t,`like(any).{${e.join(",")}}`),this}ilike(t,e){return this.url.searchParams.append(t,`ilike.${e}`),this}ilikeAllOf(t,e){return this.url.searchParams.append(t,`ilike(all).{${e.join(",")}}`),this}ilikeAnyOf(t,e){return this.url.searchParams.append(t,`ilike(any).{${e.join(",")}}`),this}regexMatch(t,e){return this.url.searchParams.append(t,`match.${e}`),this}regexIMatch(t,e){return this.url.searchParams.append(t,`imatch.${e}`),this}is(t,e){return this.url.searchParams.append(t,`is.${e}`),this}isDistinct(t,e){return this.url.searchParams.append(t,`isdistinct.${e}`),this}in(t,e){const n=Array.from(new Set(e)).map(r=>typeof r=="string"&&l1.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(t,`in.(${n})`),this}notIn(t,e){const n=Array.from(new Set(e)).map(r=>typeof r=="string"&&l1.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(t,`not.in.(${n})`),this}contains(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cs.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cs.{${e.join(",")}}`):this.url.searchParams.append(t,`cs.${JSON.stringify(e)}`),this}containedBy(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cd.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cd.{${e.join(",")}}`):this.url.searchParams.append(t,`cd.${JSON.stringify(e)}`),this}rangeGt(t,e){return this.url.searchParams.append(t,`sr.${e}`),this}rangeGte(t,e){return this.url.searchParams.append(t,`nxl.${e}`),this}rangeLt(t,e){return this.url.searchParams.append(t,`sl.${e}`),this}rangeLte(t,e){return this.url.searchParams.append(t,`nxr.${e}`),this}rangeAdjacent(t,e){return this.url.searchParams.append(t,`adj.${e}`),this}overlaps(t,e){return typeof e=="string"?this.url.searchParams.append(t,`ov.${e}`):this.url.searchParams.append(t,`ov.{${e.join(",")}}`),this}textSearch(t,e,{config:n,type:r}={}){let s="";r==="plain"?s="pl":r==="phrase"?s="ph":r==="websearch"&&(s="w");const i=n===void 0?"":`(${n})`;return this.url.searchParams.append(t,`${s}fts${i}.${e}`),this}match(t){return Object.entries(t).filter(([e,n])=>
421n!==void 0).forEach(([e,n])=>{this.url.searchParams.append(e,`eq.${n}`)}),this}not(t,e,n){return this.url.searchParams.append(t,`not.${e}.${n}`),this}or(t,{foreignTable:e,referencedTable:n=e}={}){const r=n?`${n}.or`:"or";return this.url.searchParams.append(r,`(${t})`),this}filter(t,e,n){return this.url.searchParams.append(t,`${e}.${n}`),this}},Tz=class{constructor(t,{headers:e={},schema:n,fetch:r,urlLengthLimit:s=8e3,retry:i}){this.url=t,this.headers=new Headers(e),this.schema=n,this.fetch=r,this.urlLengthLimit=s,this.retry=i}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(t,e){const{head:n=!1,count:r}=e??{},s=n?"HEAD":"GET";let i=!1;const o=(t??"*").split("").map(c=>/\s/.test(c)&&!i?"":(c==='"'&&(i=!i),c)).join(""),{url:a,headers:l}=this.cloneRequestState();return a.searchParams.set("select",o),r&&l.append("Prefer",`count=${r}`),new zo({method:s,url:a,headers:l,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(t,{count:e,defaultToNull:n=!0}={}){var r;const s="POST",{url:i,headers:o}=this.cloneRequestState();if(e&&o.append("Prefer",`count=${e}`),n||o.append("Prefer","missing=default"),Array.isArray(t)){const a=t.reduce((l,c)=>l.concat(Object.keys(c)),[]);if(a.length>
4210){const l=[...new Set(a)].map(c=>`"${c}"`);i.searchParams.set("columns",l.join(","))}}return new zo({method:s,url:i,headers:o,schema:this.schema,body:t,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(t,{onConflict:e,ignoreDuplicates:n=!1,count:r,defaultToNull:s=!0}={}){var i;const o="POST",{url:a,headers:l}=this.cloneRequestState();if(l.append("Prefer",`resolution=${n?"ignore":"merge"}-duplicates`),e!==void 0&&a.searchParams.set("on_conflict",e),r&&l.append("Prefer",`count=${r}`),s||l.append("Prefer","missing=default"),Array.isArray(t)){const c=t.reduce((u,h)=>u.concat(Object.keys(h)),[]);if(c.length>0){const u=[...new Set(c)].map(h=>`"${h}"`);a.searchParams.set("columns",u.join(","))}}return new zo({method:o,url:a,headers:l,schema:this.schema,body:t,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(t,{count:e}={}){var n;const r="PATCH",{url:s,headers:i}=this.cloneRequestState();return e&&i.append("Prefer",`count=${e}`),new zo({method:r,url:s,headers:i,schema:this.schema,body:t,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:t}={}){var e;const n="DELETE",{url:r,headers:s}=this.cloneRequestState();return t&&s.append("Prefer",`count=${t}`),new zo({method:n,url:r,headers:s,schema:this.schema,fetch:(e=this.fetch)!==null&&e!==void 0?e:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function Dc(t){"@babel/helpers - typeof";return Dc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Dc(t)}function Nz(t,e){if(Dc(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Dc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Az(t){var e=Nz(t,"string");return Dc(e)=="symbol"?e:e+""}function _z(t,e,n){return(e=Az(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function c1(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function Ku(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?c1(Object(n),!0).forEach(function(r){_z(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c1(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var jz=class cA{constructor(e,{headers:n={},schema:r,fetch:s,timeout:i,urlLengthLimit:o=8e3,retry:a}={}){this.url=e,this.headers=new Headers(n),this.schemaName=r,this.urlLengthLimit=o;const l=s??globalThis.fetch;i!==void 0&&i>0?this.fetch=(c,u)=>{const h=new AbortController,p=setTimeout(()=>h.abort(),i),f=u==null?void 0:u.signal;if(f){if(f.aborted)return clearTimeout(p),l(c,u);const g=()=>{clearTimeout(p),h.abort()};return f.addEventListener("abort",g,{once:!0}),l(c,Ku(Ku({},u),{},{signal:h.signal})).finally(()=>{clearTimeout(p),f.removeEventListener("abort",g)})}return l(c,Ku(Ku({},u),{},{signal:h.signal})).finally(()=>clearTimeout(p))}:this.fetch=l,this.retry=a}from(e){if(!e||typeof e!="string"||e.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new Tz(new URL(`${this.url}/${e}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(e){return new cA(this.url,{headers:this.headers,schema:e,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(e,n={},{head:r=!1,get:s=!1,count:i}={}){var o;let a;const l=new URL(`${this.url}/rpc/${e}`);let c;const u=f=>f!==null&&typeof f=="object"&&(!Array.isArray(f)||f.some(u)),h=r&&Object.values(n).some(u);h?(a="POST",c=n):r||s?(a=r?"HEAD":"GET",Object.entries(n).filter(([f,g])=>g!==void 0).map(([f,g])=>[f,Array.isArray(g)?`{${g.join(",")}}`:`${g}
421`]).forEach(([f,g])=>{l.searchParams.append(f,g)})):(a="POST",c=n);const p=new Headers(this.headers);return h?p.set("Prefer",i?`count=${i},return=minimal`:"return=minimal"):i&&p.set("Prefer",`count=${i}`),new zo({method:a,url:l,headers:p,schema:this.schemaName,body:c,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class Oz{constructor(){}static detectEnvironment(){var e;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const n=globalThis;if(typeof globalThis<"u"&&typeof n.WebSocket<"u")return{type:"native",wsConstructor:n.WebSocket};const r=typeof global<"u"?global:void 0;if(r&&typeof r.WebSocket<"u")return{type:"native",wsConstructor:r.WebSocket};if(typeof globalThis<"u"&&typeof n.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&n.EdgeRuntime||typeof navigator<"u"&&(!((e=navigator.userAgent)===null||e===void 0)&&e.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const s=globalThis.process;if(s){const i=s.versions;if(i&&i.node)return{type:"unsupported",error:"Node.js detected but native WebSocket not found.",workaround:"Ensure you are running Node.js 22+ or provide a WebSocket implementation via the transport option."}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const e=this.detectEnvironment();if(e.wsConstructor)return e.wsConstructor;let n=e.error||"WebSocket not supported in this environment.";throw e.workaround&&(n+=` 422 423Suggested solution: ${e.workaround}`),new Error(n)}static isWebSocketSupported(){try{return this.detectEnvironment().type==="native"}catch{return!1}}}const Rz="2.111.0",Mz=`realtime-js/${Rz}`,Pz="1.0.0",uA="2.0.0",Iz=uA,Lz=1e4,Dz=100,Ns={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},dA={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave",access_token:"access_token"},Ny={connecting:"connecting",open:"open",closing:"closing",closed:"closed"};class $z{constructor(e){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=e??[]}encode(e,n){if(e.event===this.BROADCAST_EVENT&&!(e.payload instanceof ArrayBuffer)&&typeof e.payload.event=="string")return n(this._binaryEncodeUserBroadcastPush(e));let r=[e.join_ref,e.ref,e.topic,e.event,e.payload];return n(JSON.stringify(r))}_binaryEncodeUserBroadcastPush(e){var n;return this._isArrayBuffer((n=e.payload)===null||n===void 0?void 0:n.payload)?this._encodeBinaryUserBroadcastPush(e):this._encodeJsonUserBroadcastPush(e)}_encodeBinaryUserBroadcastPush(e){var n,r;const s=(r=(n=e.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:new ArrayBuffer(0);return this._encodeUserBroadcastPush(e,this.BINARY_ENCODING,s)}_encodeJsonUserBroadcastPush(e){var n,r;const s=(r=(n=e.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:{},o=new TextEncoder().encode(JSON.stringify(s)).buffer;return this._encodeUserBroadcastPush(e,this.JSON_ENCODING,o)}_encodeUserBroadcastPush(e,n,r){var s,i;const o=new TextEncoder,a=o.encode(e.topic),l=o.encode((s=e.ref)!==null&&s!==void 0?s:""),c=o.encode((i=e.join_ref)!==null&&i!==void 0?i:""),u=o.encode(e.payload.event),h=this.allowedMetadataKeys?this._pick(e.payload,this.allowedMetadataKeys):{},p=o.encode(Object.keys(h).length===0?"":JSON.stringify(h));if(c.length>255)throw new Error(`joinRef length ${c.length} exceeds maximum of 255`);if(l.length>255)throw new Error(`ref length ${l.length} exceeds maximum of 255`);if(a.length>255)throw new Error(`topic length ${a.length} exceeds maximum of 255`);if(u.length>255)throw new Error(`userEvent length ${u.length} exceeds maximum of 255`);if(p.length>255)throw new Error(`metadata length ${p.length} exceeds maximum of 255`);const f=this.USER_BROADCAST_PUSH_META_LENGTH+c.length+l.length+a.length+u.length+p.length,g=new ArrayBuffer(this.HEADER_LENGTH+f),m=new DataView(g),y=new Uint8Array(g);let v=0;m.setUint8(v++,this.KINDS.userBroadcastPush),m.setUint8(v++,c.length),m.setUint8(v++,l.length),m.setUint8(v++,a.length),m.setUint8(v++,u.length),m.setUint8(v++,p.length),m.setUint8(v++,n),y.set(c,v),v+=c.length,y.set(l,v),v+=l.length,y.set(a,v),v+=a.length,y.set(u,v),v+=u.length,y.set(p,v),v+=p.length;var b=new Uint8Array(g.byteLength+r.byteLength);return b.set(new Uint8Array(g),0),b.set(new Uint8Array(r),g.byteLength),b.buffer}decode(e,n){if(this._isArrayBuffer(e)){let r=this._binaryDecode(e);return n(r)}if(typeof e=="string"){const r=JSON.parse(e),[s,i,o,a,l]=r;
423return n({join_ref:s,ref:i,topic:o,event:a,payload:l})}return n({})}_binaryDecode(e){const n=new DataView(e),r=n.getUint8(0),s=new TextDecoder;switch(r){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(e,n,s)}}_decodeUserBroadcast(e,n,r){const s=n.getUint8(1),i=n.getUint8(2),o=n.getUint8(3),a=n.getUint8(4);let l=this.HEADER_LENGTH+4;const c=r.decode(e.slice(l,l+s));l=l+s;const u=r.decode(e.slice(l,l+i));l=l+i;const h=r.decode(e.slice(l,l+o));l=l+o;const p=e.slice(l,e.byteLength),f=a===this.JSON_ENCODING?JSON.parse(r.decode(p)):p,g={type:this.BROADCAST_EVENT,event:u,payload:f};return o>0&&(g.meta=JSON.parse(h)),{join_ref:null,ref:null,topic:c,event:this.BROADCAST_EVENT,payload:g}}_isArrayBuffer(e){var n;return e instanceof ArrayBuffer||((n=e==null?void 0:e.constructor)===null||n===void 0?void 0:n.name)==="ArrayBuffer"}_pick(e,n){return!e||typeof e!="object"?{}:Object.fromEntries(Object.entries(e).filter(([r])=>n.includes(r)))}}var Ee;(function(t){t.abstime="abstime",t.bool="bool",t.date="date",t.daterange="daterange",t.float4="float4",t.float8="float8",t.int2="int2",t.int4="int4",t.int4range="int4range",t.int8="int8",t.int8range="int8range",t.json="json",t.jsonb="jsonb",t.money="money",t.numeric="numeric",t.oid="oid",t.reltime="reltime",t.text="text",t.time="time",t.timestamp="timestamp",t.timestamptz="timestamptz",t.timetz="timetz",t.tsrange="tsrange",t.tstzrange="tstzrange"})(Ee||(Ee={}));const u1=(t,e,n={})=>{var r;const s=(r=n.skipTypes)!==null&&r!==void 0?r:[];return e?Object.keys(e).reduce((i,o)=>(i[o]=zz(o,t,e,s),i),{}):{}},zz=(t,e,n,r)=>{const s=e.find(a=>a.name===t),i=s==null?void 0:s.type,o=n[t];return i&&!r.includes(i)?hA(i,o):Ay(o)},hA=(t,e)=>{if(t.charAt(0)==="_"){const n=t.slice(1,t.length);return Hz(e,n)}switch(t){case Ee.bool:return Bz(e);case Ee.float4:case Ee.float8:case Ee.int2:case Ee.int4:case Ee.int8:case Ee.numeric:case Ee.oid:return Fz(e);case Ee.json:case Ee.jsonb:return Wz(e);case Ee.timestamp:return Uz(e);case Ee.abstime:case Ee.date:case Ee.daterange:case Ee.int4range:case Ee.int8range:case Ee.money:case Ee.reltime:case Ee.text:case Ee.time:case Ee.timestamptz:case Ee.timetz:case Ee.tsrange:case Ee.tstzrange:return Ay(e);default:return Ay(e)}},Ay=t=>t,Bz=t=>{switch(t){case"t":return!0;case"f":return!1;default:return t}},Fz=t=>{if(typeof t=="string"){const e=parseFloat(t);if(!Number.isNaN(e))return e}return t},Wz=t=>{if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t},Hz=(t,e)=>{if(typeof t!="string")return t;const n=t.length-1,r=t[n];if(t[0]==="{"&&r==="}"){let i;const o=t.slice(1,n);try{i=JSON.parse("["+o+"]")}catch{i=o?o.split(","):[]}return i.map(a=>hA(e,a))}return t},Uz=t=>typeof t=="string"?t.replace(" ","T"):t,fA=t=>{const e=new URL(t);return e.protocol=e.protocol.replace(/^ws/i,"http"),e.pathname=e.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),e.pathname===""||e.pathname==="/"?e.pathname="/api/broadcast":e.pathname=e.pathname+"/api/broadcast",e.href};var fa=t=>typeof t=="function"?t:function(){return t},Vz=typeof self<"u"?self:null,Bo=typeof window<"u"?window:null,hr=Vz||Bo||globalThis,qz="2.0.0",Gz=1e4,Kz=1e3,Yz=100,gr={connecting:0,open:1,closing:2,closed:3},Ut={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},zr={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},_y={longpoll:"longpoll",websocket:"websocket"},Jz={complete:4},jy="base64url.bearer.phx.",Yu=class{constructor(t,e,n,r){this.channel=t,this.event=e,this.payload=n||function(){return{}},this.receivedResp=null,this.timeout=r,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(t){this.timeout=t,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(t,e){return this.hasReceived(t)&&e(this.receivedResp.response),this.recHooks.push({status:t,callback:e}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}
vendor: 21,118 bytes, lines 423-424
423matchReceive({status:t,response:e,_ref:n}){this.recHooks.filter(r=>r.status===t).forEach(r=>r.callback(e))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,t=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=t,this.matchReceive(t)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}trigger(t,e){this.channel.trigger(this.refEvent,{status:t,response:e})}},pA=class{constructor(t,e){this.callback=t,this.timerCalc=e,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},Qz=class{constructor(t,e,n){this.state=Ut.closed,this.topic=t,this.params=fa(e||{}),this.socket=n,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Yu(this,zr.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new pA(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=Ut.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(r=>r.send()),this.pushBuffer=[]}),this.joinPush.receive("error",r=>{this.state=Ut.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,r),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=Ut.closed,this.socket.remove(this)}),this.onError(r=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,r),this.isJoining()&&this.joinPush.reset(),this.state=Ut.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),new Yu(this,zr.leave,fa({}),this.timeout).send(),this.state=Ut.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(zr.reply,(r,s)=>{this.trigger(this.replyEventName(s),r)})}join(t=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=t,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Ut.closed,this.bindings=[]}onClose(t){this.on(zr.close,t)}onError(t){return this.on(zr.error,e=>t(e))}on(t,e){let n=this.bindingRef++;return this.bindings.push({event:t,ref:n,callback:e}),n}off(t,e){this.bindings=this.bindings.filter(n=>!(n.event===t&&(typeof e>"u"||e===n.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(t,e,n=this.timeout){if(e=e||{},!this.joinedOnce)throw new Error(`tried to push '${t}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let r=new Yu(this,t,function(){return e},n);return this.canPush()?r.send():(r.startTimeout(),this.pushBuffer.push(r)),r}leave(t=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=Ut.leaving;let e=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(zr.close,"leave")},n=new Yu(this,zr.leave,fa({}),t);return n.receive("ok",()=>e()).receive("timeout",()=>e()),n.send(),this.canPush()||n.trigger("ok",{}),n}onMessage(t,e,n){return e}filterBindings(t,e,n){return!0}isMember(t,e,n,r){return this.topic!==t?!1:r&&r!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:t,event:e,payload:n,joinRef:r}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(t=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=Ut.joining,this.joinPush.resend(t))}trigger(t,e,n,r){let s=this.onMessage(t,e,n,r);if(e&&!s)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let i=this.bindings.filter(o=>o.event===t&&this.filterBindings(o,e,n));for(let o=0;o<i.length;o++)i[o].callback(s,n,r||this.joinRef())}replyEventName(t){return`chan_reply_${t}`}isClosed(){return this.state===Ut.closed}isErrored(){return this.state===Ut.errored}isJoined(){return this.state===Ut.joined}isJoining(){return this.state===Ut.joining}isLeaving(){return this.state===Ut.leaving}},jh=class{static request(t,e,n,r,s,i,o){if(hr.XDomainRequest){let a=new hr.XDomainRequest;return this.xdomainRequest(a,t,e,r,s,i,o)}else if(hr.XMLHttpRequest){let a=new hr.XMLHttpRequest;return this.xhrRequest(a,t,e,n,r,s,i,o)}else{if(hr.fetch&&hr.AbortController)return this.fetchRequest(t,e,n,r,s,i,o);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(t,e,n,r,s,i,o){let a={method:t,headers:n,body:r},l=null;return s&&(l=new AbortController,setTimeout(()=>l.abort(),s),a.signal=l.signal),hr.fetch(e,a).then(c=>c.text()).then(c=>this.parseJSON(c)).then(c=>o&&o(c)).catch(c=>{c.name==="AbortError"&&i?i():o&&o(null)}),l}static xdomainRequest(t,e,n,r,s,i,o){return t.timeout=s,t.open(e,n),t.onload=()=>{let a=this.parseJSON(t.responseText);o&&o(a)},i&&(t.ontimeout=i),t.onprogress=()=>{},t.send(r),t}static xhrRequest(t,e,n,r,s,i,o,a){t.open(e,n,!0),t.timeout=i;for(let[l,c]of Object.entries(r))t.setRequestHeader(l,c);return t.onerror=()=>a&&a(null),t.onreadystatechange=()=>{if(t.readyState===Jz.complete&&a){let l=this.parseJSON(t.responseText);a(l)}},o&&(t.ontimeout=o),t.send(s),t}static parseJSON(t){if(!t||t==="")return null;try{return JSON.parse(t)}catch{return console&&console.log("failed to parse JSON response",t),null}}static serialize(t,e){let n=[];for(var r in t){if(!Object.prototype.hasOwnProperty.call(t,r))continue;let s=e?`${e}[${r}]`:r,i=t[r];typeof i=="object"?n.push(this.serialize(i,s)):n.push(encodeURIComponent(s)+"="+encodeURIComponent(i))}return n.join("&")}static appendParams(t,e){if(Object.keys(e).length===0)return t;let n=t.match(/\?/)?"&":"?";return`${t}${n}${this.serialize(e)}`}},Xz=t=>{let e="",n=new Uint8Array(t),r=n.byteLength;for(let s=0;s<r;s++)e+=String.fromCharCode(n[s]);return btoa(e)},_o=class{constructor(t,e){e&&e.length===2&&e[1].startsWith(jy)&&(this.authToken=atob(e[1].slice(jy.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(t),this.readyState=gr.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(t){return t.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+_y.websocket),"$1/"+_y.longpoll)}endpointURL(){return jh.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(t,e,n){this.close(t,e,n),this.readyState=gr.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===gr.open||this.readyState===gr.connecting}poll(){const t={Accept:"application/json"};this.authToken&&(t["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",t,null,()=>this.ontimeout(),e=>{if(e){var{status:n,token:r,messages:s}=e;if(n===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=r}else n=0;switch(n){case 200:s.forEach(i=>{setTimeout(()=>this.onmessage({data:i}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=gr.open,this.onopen({}),this.poll();break;case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${n}`)}})}send(t){typeof t!="string"&&(t=Xz(t)),this.currentBatch?this.currentBatch.push(t):this.awaitingBatchAck?this.batchBuffer.push(t):(this.currentBatch=[t],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(t,e=0){this.awaitingBatchAck=!0;const n=e+Yz,r=t.slice(e,n);this.ajax("POST",{"Content-Type":"application/x-ndjson"},r.join(` 424`),()=>this.onerror("timeout"),s=>{!s||s.status!==200?(this.awaitingBatchAck=!1,this.onerror(s&&s.status),this.closeAndRetry(1011,"internal server error",!1)):n<t.length?this.batchSend(t,n):this.batchBuffer.length>0?(this.batchSend(this.batchBuffer),this.batchBuffer=[]):this.awaitingBatchAck=!1})}close(t,e,n){for(let s of this.reqs)s.abort();this.readyState=gr.closed;let r=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:t,reason:e,wasClean:n});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",r)):this.onclose(r)}ajax(t,e,n,r,s){let i,o=()=>{this.reqs.delete(i),r()};i=jh.request(t,this.endpointURL(),e,n,this.timeout,o,a=>{this.reqs.delete(i),this.isActive()&&s(a)}),this.reqs.add(i)}},Zz=class Ol{constructor(e,n={}){let r=n.events||{state:"presence_state",diff:"presence_diff"};this.state=Object.create(null),this.pendingDiffs=[],this.channel=e,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(r.state,s=>{let{onJoin:i,onLeave:o,onSync:a}=this.caller;this.joinRef=this.channel.joinRef(),this.state=Ol.syncState(this.state,s,i,o),this.pendingDiffs.forEach(l=>{this.state=Ol.syncDiff(this.state,l,i,o)}),this.pendingDiffs=[],a()}),this.channel.on(r.diff,s=>{let{onJoin:i,onLeave:o,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=Ol.syncDiff(this.state,s,i,o),a())})}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}list(e){return Ol.list(this.state,e)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(e,n,r,s){let i=this.toNullProtoObj(this.clone(e));n=this.toNullProtoObj(n);let o=Object.create(null),a=Object.create(null);return this.map(i,(l,c)=>{n[l]||(a[l]=c)}),this.map(n,(l,c)=>{let u=i[l];if(u){let h=c.metas.map(m=>m.phx_ref),p=u.metas.map(m=>m.phx_ref),f=c.metas.filter(m=>p.indexOf(m.phx_ref)<0),g=u.metas.filter(m=>h.indexOf(m.phx_ref)<0);f.length>0&&(o[l]=c,o[l].metas=f),g.length>0&&(a[l]=this.clone(u),a[l].metas=g)}else o[l]=c}),this.syncDiff(i,{joins:o,leaves:a},r,s)}static syncDiff(e,n,r,s){e=this.toNullProtoObj(e);let{joins:i,leaves:o}=this.clone(n);return r||(r=function(){}),s||(s=function(){}),this.map(i,(a,l)=>{let c=e[a];if(e[a]=this.clone(l),c){let u=e[a].metas.map(p=>p.phx_ref),h=c.metas.filter(p=>u.indexOf(p.phx_ref)<0);e[a].metas.unshift(...h)}r(a,c,l)}),this.map(o,(a,l)=>{let c=e[a];if(!c)return;let u=l.metas.map(h=>h.phx_ref);c.metas=c.metas.filter(h=>u.indexOf(h.phx_ref)<0),s(a,c,l),c.metas.length===0&&delete e[a]}),e}static list(e,n){return n||(n=function(r,s){return s}),this.map(e,(r,s)=>n(r,s))}static map(e,n){return Object.getOwnPropertyNames(e).map(r=>n(r,e[r]))}static toNullProtoObj(e){if(Object.getPrototypeOf(e)===null)return e;let n=Object.create(null);return Object.getOwnPropertyNames(e).forEach(r=>{n[r]=e[r]}),n}static clone(e){return JSON.parse(JSON.stringify(e))}},Ju={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(t,e){if(t.payload.constructor===ArrayBuffer)return e(this.binaryEncode(t));{let n=[t.join_ref,t.ref,t.topic,t.event,t.payload];return e(JSON.stringify(n))}},decode(t,e){if(t.constructor===ArrayBuffer)return e(this.binaryDecode(t));{let[n,r,s,i,o]=JSON.parse(t);return e({join_ref:n,ref:r,topic:s,event:i,payload:o})}},binaryEncode(t){let{join_ref:e,ref:n,event:r,topic:s,payload:i}=t,o=new TextEncoder,a=o.encode(e),l=o.encode(n),c=o.encode(s),u=o.encode(r);this.assertFieldSize(a.byteLength,"join_ref"),this.assertFieldSize(l.byteLength,"ref"),this.assertFieldSize(c.byteLength,"topic"),this.assertFieldSize(u.byteLength,"event");let h=this.META_LENGTH+a.byteLength+l.byteLength+c.byteLength+u.byteLength,p=new ArrayBuffer(this.HEADER_LENGTH+h),f=new Uint8Array(p),g=new DataView(p),m=0;g.setUint8(m++,this.KINDS.push),g.setUint8(m++,a.byteLength),g.setUint8(m++,l.byteLength),g.setUint8(m++,c.byteLength),g.setUint8(m++,u.byteLength),f.set(a,m),m+=a.byteLength,f.set(l,m),m+=l.byteLength,f.set(c,m),m+=c.byteLength,f.set(u,m),m+=u.byteLength;var y=new Uint8Array(p.byteLength+i.byteLength);return y.set(f,0),y.set(new Uint8Array(i),p.byteLength),y.buffer},assertFieldSize(t,e){if(t>255)throw new Error(`unable to convert ${e} to binary: must be less than or equal to 255 bytes, but is ${t} bytes`)},binaryDecode(t){let e=new DataView(t),n=e.getUint8(0),r=new TextDecoder;switch(n){case this.KINDS.push:return this.decodePush(t,e,r);case this.KINDS.reply:return this.decodeReply(t,e,r);case this.KINDS.broadcast:return this.decodeBroadcast(t,e,r)}},decodePush(t,e,n){let r=e.getUint8(1),s=e.getUint8(2),i=e.getUint8(3),o=this.HEADER_LENGTH+this.META_LENGTH-1,a=n.decode(t.slice(o,o+r));o=o+r;let l=n.decode(t.slice(o,o+s));o=o+s;let c=n.decode(t.slice(o,o+i));o=o+i;let u=t.slice(o,t.byteLength);return{join_ref:a,ref:null,topic:l,event:c,payload:u}},decodeReply(t,e,n){let r=e.getUint8(1),s=e.getUint8(2),i=e.getUint8(3),o=e.getUint8(4),a=this.HEADER_LENGTH+this.META_LENGTH,l=n.decode(t.slice(a,a+r));a=a+r;let c=n.decode(t.slice(a,a+s));a=a+s;let u=n.decode(t.slice(a,a+i));a=a+i;let h=n.decode(t.slice(a,a+o));a=a+o;let p=t.slice(a,t.byteLength),f={status:h,response:p};return{join_ref:l,ref:c,topic:u,event:zr.reply,payload:f}},decodeBroadcast(t,e,n){let r=e.getUint8(1),s=e.getUint8(2),i=this.HEADER_LENGTH+2,o=n.decode(t.slice(i,i+r));i=i+r;let a=n.decode(t.slice(i,i+s));i=i+s;let l=t.slice(i,t.byteLength);return{join_ref:null,ref:null,topic:o,event:a,payload:l}}},eB=class{constructor(t,e={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=e.timeout||Gz,this.transport=e.transport||hr.WebSocket||_o,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=e.longPollFallbackMs,this.fallbackTimer=null;let n=null;try{n=hr&&hr.sessionStorage}catch{}this.sessionStore=e.sessionStorage||n,this.establishedConnections=0,this.defaultEncoder=Ju.encode.bind(Ju),this.defaultDecoder=Ju.decode.bind(Ju),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=e.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==_o?(this.encode=e.encode||this.defaultEncoder,this.decode=e.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let r=null;Bo&&Bo.addEventListener&&(Bo.addEventListener("pagehide",s=>{this.conn&&(this.disconnect(),r=this.connectClock)}),Bo.addEventListener("pageshow",s=>{r===this.connectClock&&(r=null,this.connect())}),Bo.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=e.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=e.autoSendHeartbeat??!0,this.heartbeatCallback=e.heartbeatCallback??(()=>{}),this.rejoinAfterMs=s=>e.rejoinAfterMs?e.rejoinAfterMs(s):[1e3,2e3,5e3][s-1]||1e4,this.reconnectAfterMs=s=>e.reconnectAfterMs?e.reconnectAfterMs(s):[10,50,100,150,200,250,500,1e3,2e3][s-1]||5e3,this.logger=e.logger||null,!this.logger&&e.debug&&(this.logger=(s,i,o)=>{console.log(`${s}: ${i}`,o)}),this.longpollerTimeout=e.longpollerTimeout||2e4,this.params=fa(e.params||{}),this.endPoint=`${t}/${_y.websocket}`,this.vsn=e.vsn||qz,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new pA(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{e.beforeReconnect&&await e.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=e.authToken&&fa(e.authToken)}getLongPollTransport(){return _o}replaceTransport(t){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=t}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let t=jh.appendParams(jh.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return t.charAt(0)!=="/"?t:t.charAt(1)==="/"?`${this.protocol()}:${t}`:`${this.protocol()}://${location.host}${t}`}disconnect(t,e,n){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,t&&t()},e,n)}connect(t){t&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=fa(t)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==_o?this.connectWithFallback(_o,this.longPollFallbackMs):this.transportConnect())}log(t,e,n){this.logger&&this.logger(t,e,n)}hasLogger(){return this.logger!==null}onOpen(t){let e=this.makeRef();return this.stateChangeCallbacks.open.push([e,t]),e}onClose(t){let e=this.makeRef();return this.stateChangeCallbacks.close.push([e,t]),e}onError(t){let e=this.makeRef();return this.stateChangeCallbacks.error.push([e,t]),e}onMessage(t){let e=this.makeRef();return this.stateChangeCallbacks.message.push([e,t]),e}onHeartbeat(t){this.heartbeatCallback=t}ping(t){if(!this.isConnected())return!1;let e=this.makeRef(),n=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:e});let r=this.onMessage(s=>{s.ref===e&&(this.off([r]),t(Date.now()-n))});return!0}transportName(t){switch(t){case _o:return"LongPoll";default:return t.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let t;this.authToken&&(t=["phoenix",`${jy}${btoa(this.authToken()).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),t),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=e=>this.onConnError(e),this.conn.onmessage=e=>this.onConnMessage(e),this.conn.onclose=e=>this.onConnClose(e)}getSession(t){return this.sessionStore&&this.sessionStore.getItem(t)}storeSession(t,e){this.sessionStore&&this.sessionStore.setItem(t,e)}connectWithFallback(t,e=2500){clearTimeout(this.fallbackTimer);let n=!1,r=!0,s,i,o=this.transportName(t),a=l=>{this.log("transport",`falling back to ${o}...`,l),this.off([s,i]),r=!1,this.replaceTransport(t),this.transportConnect()};if(this.getSession(`phx:fallback:${o}`))return a("memorized");this.fallbackTimer=setTimeout(a,e),i=this.onError(l=>{this.log("transport","error",l),r&&!n&&(clearTimeout(this.fallbackTimer),a(l))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(n=!0,!r){let l=this.transportName(t);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${l}`,"true"),this.log("transport",`established ${l} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(a,e),this.ping(l=>{this.log("transport","connected to primary after",l),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(t){this.log("error","error in heartbeat callback",t)}this.triggerChanError(new Error("heartbeat timeout")),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),Kz,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(t,e,n){if(!this.conn)return t&&t();const r=this.conn;this.waitForBufferDone(r,()=>{e?r.close(e,n||""):r.close(),this.waitForSocketClosed(r,()=>{this.conn===r&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){}
vendor: 5,018 bytes, line 424
424,this.conn.onclose=function(){},this.conn=null),t&&t()})})}waitForBufferDone(t,e,n=1){if(n===5||!t.bufferedAmount){e();return}setTimeout(()=>{this.waitForBufferDone(t,e,n+1)},150*n)}waitForSocketClosed(t,e,n=1){if(n===5||t.readyState===gr.closed){e();return}setTimeout(()=>{this.waitForSocketClosed(t,e,n+1)},150*n)}onConnClose(t){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",t),this.triggerChanError(t),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",t)}onConnError(t){this.hasLogger()&&this.log("transport","error",t);let e=this.transport,n=this.establishedConnections;this.triggerStateCallbacks("error",t,e,n),(e===this.transport||n>0)&&this.triggerChanError(t)}triggerChanError(t){this.channels.forEach(e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(zr.error,t)})}connectionState(){switch(this.conn&&this.conn.readyState){case gr.connecting:return"connecting";case gr.open:return"open";case gr.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(t){this.off(t.stateChangeRefs),this.channels=this.channels.filter(e=>e!==t)}off(t){for(let e in this.stateChangeCallbacks)this.stateChangeCallbacks[e]=this.stateChangeCallbacks[e].filter(([n])=>t.indexOf(n)===-1)}channel(t,e={}){let n=new Qz(t,e,this);return this.channels.push(n),n}push(t){if(this.hasLogger()){let{topic:e,event:n,payload:r,ref:s,join_ref:i}=t;this.log("push",`${e} ${n} (${i}, ${s})`,r)}this.isConnected()?this.encode(t,e=>this.conn.send(e)):this.sendBuffer.push(()=>this.encode(t,e=>this.conn.send(e)))}makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(t){this.log("error","error in heartbeat callback",t)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(t){this.log("error","error in heartbeat callback",t)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}onConnMessage(t){this.decode(t.data,e=>{let{topic:n,event:r,payload:s,ref:i,join_ref:o}=e;if(i&&i===this.pendingHeartbeatRef){const a=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(s.status==="ok"?"ok":"error",a)}catch(l){this.log("error","error in heartbeat callback",l)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${s.status||""} ${n} ${r} ${i&&"("+i+")"||""}`.trim(),s);for(let a=0;a<this.channels.length;a++){const l=this.channels[a];l.isMember(n,r,s,o)&&l.trigger(r,s,i,o)}this.triggerStateCallbacks("message",e)})}triggerStateCallbacks(t,...e){try{this.stateChangeCallbacks[t].forEach(([n,r])=>{try{r(...e)}catch(s){this.log("error",`error in ${t} callback`,s)}})}catch(n){this.log("error",`error triggering ${t} callbacks`,n)}}leaveOpenTopic(t){let e=this.channels.find(n=>n.topic===t&&(n.isJoined()||n.isJoining()));e&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${t}"`),e.leave())}};class Xl{constructor(e,n){const r=nB(n);this.presence=new Zz(e.getChannel(),r),this.presence.onJoin((s,i,o)=>{const a=Xl.onJoinPayload(s,i,o);e.getChannel().trigger("presence",a)}),this.presence.onLeave((s,i,o)=>{const a=Xl.onLeavePayload(s,i,o);e.getChannel().trigger("presence",a)}),this.presence.onSync(()=>{e.getChannel().trigger("presence",{event:"sync"})})}get state(){return Xl.transformState(this.presence.state)}static transformState(e){return e=tB(e),Object.getOwnPropertyNames(e).reduce((n,r)=>{const s=e[r];return n[r]=Fd(s),n},{})}static onJoinPayload(e,n,r){const s=d1(n),i=Fd(r);return{event:"join",key:e,currentPresences:s,newPresences:i}}static onLeavePayload(e,n,r){const s=d1(n),i=Fd(r);return{event:"leave",key:e,currentPresences:s,leftPresences:i}}}function Fd(t){return t.metas.map(e=>{const n=Object.getOwnPropertyDescriptors(e),r=Object.defineProperties({},n);return r.presence_ref=r.phx_ref,delete r.phx_ref,delete r.phx_ref_prev,r})}function tB(t){return JSON.parse(JSON.stringify(t))}function nB(t){return(t==null?void 0:t.events)&&{events:t.events}}function d1(t){return t!=null&&t.metas?Fd(t):[]}var h1;(function(t){t.SYNC="sync",t.JOIN="join",t.LEAVE="leave"})(h1||(h1={}));class rB{get state(){return this.presenceAdapter.state}constructor(e,n){this.channel=e,this.presenceAdapter=new Xl(this.channel.channelAdapter,n)}}function sB(t){if(t instanceof Error)return t;if(typeof t=="string")return new Error(t);if(t&&typeof t=="object"){const e=t;
424if(typeof e.code=="number"){const n=typeof e.reason=="string"&&e.reason?` (${e.reason})`:"";return new Error(`socket closed: ${e.code}${n}`,{cause:t})}return new Error("channel error: transport failure",{cause:t})}return new Error("channel error: connection lost")}class iB{constructor(e,n,r){const s=oB(r);this.channel=e.getSocket().channel(n,s),this.socket=e}get state(){return this.channel.state}set state(e){this.channel.state=e}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(e,n){return this.channel.on(e,n)}off(e,n){this.channel.off(e,n)}subscribe(e){return this.channel.join(e)}unsubscribe(e){return this.channel.leave(e)}teardown(){this.channel.teardown()}onClose(e){this.channel.onClose(e)}onError(e){return this.channel.onError(e)}push(e,n,r){let s;try{s=this.channel.push(e,n,r)}catch{throw new Error(`tried to push '${e}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>Dz){const i=this.channel.pushBuffer.shift();i.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${i.event}`,i.payload())}return s}updateJoinPayload(e){const n=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},n),e)}canPush(){return this.socket.isConnected()&&this.state===Ns.joined}isJoined(){return this.state===Ns.joined}isJoining(){return this.state===Ns.joining}isClosed(){return this.state===Ns.closed}isLeaving(){return this.state===Ns.leaving}updateFilterBindings(e){this.channel.filterBindings=e}updatePayloadTransform(e){this.channel.onMessage=e}getChannel(){return this.channel}}function oB(t){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},t.config)}}const aB=/[,()"\\]/,lB=t=>aB.test(t)||t!==t.trim(),cB=t=>`"${t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`,f1=t=>{const e=t===null?"null":String(t);return lB(e)?cB(e):e},uB=t=>t===null?"null":String(t),dB=(t,e)=>{if(t==="in"){const n=Array.isArray(e)?e:[e];if(n.length===0)throw new Error("Realtime `in` filter requires at least one value.");return`in.(${Array.from(new Set(n)).map(s=>f1(s)).join(",")})`}return t==="is"?`is.${uB(e)}`:`${t}.${f1(e)}`};class hB{constructor(){this.filters=[]}add(e,n,r,s=!1){const i=s?"not.":"";return this.filters.push(`${e}=${i}${dB(n,r)}`),this}eq(e,n){return this.add(e,"eq",n)}neq(e,n){return this.add(e,"neq",n)}gt(e,n){return this.add(e,"gt",n)}gte(e,n){return this.add(e,"gte",n)}lt(e,n){return this.add(e,"lt",n)}lte(e,n){return this.add(e,"lte",n)}in(e,n){return this.add(e,"in",n)}like(e,n){return this.add(e,"like",n)}ilike(e,n){return this.add(e,"ilike",n)}match(e,n){return this.add(e,"match",n)}imatch(e,n){return this.add(e,"imatch",n)}is(e,n){return this.add(e,"is",n)}isDistinct(e,n){return this.add(e,"isdistinct",n)}not(e,n,r){return this.add(e,n,r,!0)}build(){return this.filters.join(",")}toString(){return this.build()}}var p1;(function(t){t.ALL="*",t.INSERT="INSERT",t.UPDATE="UPDATE",t.DELETE="DELETE"})(p1||(p1={}));var na;(function(t){t.BROADCAST="broadcast",t.PRESENCE="presence",t.POSTGRES_CHANGES="postgres_changes",t.SYSTEM="system"})(na||(na={}));var Br;(function(t){t.SUBSCRIBED="SUBSCRIBED",t.TIMED_OUT="TIMED_OUT",t.CLOSED="CLOSED",t.CHANNEL_ERROR="CHANNEL_ERROR"})(Br||(Br={}));class Zl{get state(){return this.channelAdapter.state}set state(e){this.channelAdapter.state=e}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(e,n={config:{}},r){var s,i;if(this.topic=e,this.params=n,this.socket=r,this.bindings={},this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},n.config),this.channelAdapter=new iB(this.socket.socketAdapter,e,this.params),this.presence=new rB(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=fA(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((i=(s=this.params.config)===null||s===void 0?void 0:s.broadcast)===null||i===void 0)&&i.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(e,n=this.timeout){var r,s,i;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:o,presence:a,private:l}}=this.params,c=(s=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(f=>f.filter))!==null&&s!==void 0?s:[],u=!!this.bindings[na.PRESENCE]&&this.bindings[na.PRESENCE].length>0||((i=this.params.config.presence)===null||i===void 0?void 0:i.enabled)===!0,h={},p={broadcast:o,presence:Object.assign(Object.assign({},a),{enabled:u}),postgres_changes:c,private:l};this.socket.accessTokenValue&&(h.access_token=this.socket.accessTokenValue),this._onError(f=>{e==null||e(Br.CHANNEL_ERROR,sB(f))}),this._onClose(()=>e==null?void 0:e(Br.CLOSED)),this.updateJoinPayload(Object.assign({config:p},h)),this._updateFilterMessage(),this.channelAdapter.subscribe(n).receive("ok",async({postgres_changes:f})=>{if(this.socket._isManualToken()||this.socket.setAuth(),f===void 0){e==null||e(Br.SUBSCRIBED);return}this._updatePostgresBindings(f,e)}).receive("error",f=>{this.state=Ns.errored;const g=Object.values(f).join(", ")||"error";e==null||e(Br.CHANNEL_ERROR,new Error(g,{cause:f}))}).receive("timeout",()=>{e==null||e(Br.TIMED_OUT)})}return this}_updatePostgresBindings(e,n){var r;const s=this.bindings.postgres_changes,i=(r=s==null?void 0:s.length)!==null&&r!==void 0?r:0,o=[];for(let a=0;a<i;a++){const l=s[a],{filter:{event:c,schema:u,table:h,filter:p}}=l,f=e&&e[a];if(f&&f.event===c&&Zl.isFilterValueEqual(f.schema,u)&&Zl.isFilterValueEqual(f.table,h)&&Zl.isFilterValueEqual(f.filter,p))o.push(Object.assign(Object.assign({},l),{id:f.id}));else{this.unsubscribe(),this.state=Ns.errored,n==null||n(Br.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=o,this.state!=Ns.errored&&n&&n(Br.SUBSCRIBED)}presenceState(){return this.presence.state}async track(e,n={}){return await this.send({type:"presence",event:"track",payload:e},n)}async untrack(e={}){return await this.send({type:"presence",event:"untrack"},e)}on(e,n,r){const s=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),i=e===na.PRESENCE||e===na.POSTGRES_CHANGES;if(s&&i)throw this.socket.log("channel",`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(e,n,r)}async httpSend(e,n,r={}){var s;if(n==null)return Promise.reject(new Error("Payload is required for httpSend()"));const i=n instanceof ArrayBuffer||ArrayBuffer.isView(n),o={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":i?"application/octet-stream":"application/json"};this.socket.accessTokenValue&&(o.Authorization=`Bearer ${this.socket.accessTokenValue}`);const a=new URL(this.broadcastEndpointURL);a.pathname+=`/${encodeURIComponent(this.subTopic)}/events/${encodeURIComponent(e)}`,this.private&&a.searchParams.set("private","true");const l={method:"POST",headers:o,body:i?n:JSON.stringify(n)},c=await this._fetchWithTimeout(a.toString(),l,(s=r.timeout)!==null&&s!==void 0?s:this.timeout);if(c.status===202)return{success:!0};if(c.status===404)return Promise.reject(new Error("httpSend() requires Realtime server v2.97.0 or newer; the endpoint returned 404. Update your Supabase CLI to a recent version, or upgrade the Realtime server in your self-hosted setup. See https://github.com/supabase/supabase-js/blob/master/packages/core/realt
424ime-js/migrations/httpsend-server-version.md"));let u=c.statusText;try{const h=await c.json();u=h.error||h.message||u}catch{}return Promise.reject(new Error(u))}async send(e,n={}){var r,s;if(!this.channelAdapter.canPush()&&e.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event:i,payload:o}=e,a={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(a.Authorization=`Bearer ${this.socket.accessTokenValue}`);const l={method:"POST",headers:a,body:JSON.stringify({messages:[{topic:this.subTopic,event:i,payload:o,private:this.private}]})};try{const c=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(r=n.timeout)!==null&&r!==void 0?r:this.timeout);return await((s=c.body)===null||s===void 0?void 0:s.cancel()),c.ok?"ok":"error"}catch(c){return c instanceof Error&&c.name==="AbortError"?"timed out":"error"}}else return new Promise(i=>{var o,a,l;const c=this.channelAdapter.push(e.type,e,n.timeout||this.timeout);e.type==="broadcast"&&!(!((l=(a=(o=this.params)===null||o===void 0?void 0:o.config)===null||a===void 0?void 0:a.broadcast)===null||l===void 0)&&l.ack)&&i("ok"),c.receive("ok",()=>i("ok")),c.receive("error",()=>i("error")),c.receive("timeout",()=>i("timed out"))})}updateJoinPayload(e){this.channelAdapter.updateJoinPayload(e)}async unsubscribe(e=this.timeout){return new Promise(n=>{this.channelAdapter.unsubscribe(e).receive("ok",()=>n("ok")).receive("timeout",()=>n("timed out")).receive("error",()=>n("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(e,n,r){const s=new AbortController,i=setTimeout(()=>s.abort(),r),o=await this.socket.fetch(e,Object.assign(Object.assign({},n),{signal:s.signal}));return clearTimeout(i),o}_on(e,n,r){const s=e.toLocaleLowerCase(),i=n==null?void 0:n.filter;(i instanceof hB||typeof i=="object"&&i!==null&&typeof i.build=="function")&&(n=Object.assign(Object.assign({},n),{filter:i.build()}));const o=this.channelAdapter.on(e,r),a={type:s,filter:n,callback:r,ref:o};return this.bindings[s]?this.bindings[s].push(a):this.bindings[s]=[a],this._updateFilterMessage(),this}_onClose(e){this.channelAdapter.onClose(e)}_onError(e){this.channelAdapter.onError(e)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((e,n,r)=>{var s,i,o,a,l,c,u;const h=e.event.toLocaleLowerCase();if(this._notThisChannelEvent(h,r))return!1;const p=(s=this.bindings[h])===null||s===void 0?void 0:s.find(f=>f.ref===e.ref);if(!p)return!0;if(["broadcast","presence","postgres_changes"].includes(h))if("id"in p){const f=p.id,g=(i=p.filter)===null||i===void 0?void 0:i.event;return f&&((o=n.ids)===null||o===void 0?void 0:o.includes(f))&&(g==="*"||(g==null?void 0:g.toLocaleLowerCase())===((a=n.data)===null||a===void 0?void 0:a.type.toLocaleLowerCase()))}else{const f=(c=(l=p==null?void 0:p.filter)===null||l===void 0?void 0:l.event)===null||c===void 0?void 0:c.toLocaleLowerCase();return f==="*"||f===((u=n==null?void 0:n.event)===null||u===void 0?void 0:u.toLocaleLowerCase())}else return p.type.toLocaleLowerCase()===h})}_notThisChannelEvent(e,n){const{close:r,error:s,leave:i,join:o}=dA;return n&&[r,s,i,o].includes(e)&&n!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((e,n,r)=>{if(typeof n=="object"&&"ids"in n){const s=n.data,{schema:i,table:o,commit_timestamp:a,type:l,errors:c}=s;return Object.assign(Object.assign({},{schema:i,table:o,commit_timestamp:a,eventType:l,new:{},old:{},errors:c}),this._getPayloadRecords(s))}return n})}copyBindings(e){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const n in e.bindings)for(const r of e.bindings[n])this._on(r.type,r.filter,r.callback)}static isFilterValueEqual(e,n){return(e??void 0)===(n??void 0)}_getPayloadRecords(e){const n={new:{},old:{}};return(e.type==="INSERT"||e.type==="UPDATE")&&(n.new=u1(e.columns,e.record)),(e.type==="UPDATE"||e.type==="DELETE")&&(n.old=u1(e.columns,e.old_record)),n}}class fB{constructor(e,n){this.socket=new eB(e,n)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(e){this.socket.heartbeatCallback=e}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(e,n,r,s=1e4){return new Promise(i=>{setTimeout(()=>i("timeout"),s),this.socket.disconnect(()=>{e(),i("ok")},n,r)})}push(e){this.socket.push(e)}log(e,n,r){this.socket.log(e,n,r)}makeRef(){return this.socket.makeRef()}onOpen(e){this.socket.onOpen(e)}onClose(e){this.socket.onClose(e)}onError(e){this.socket.onError(e)}onMessage(e){this.socket.onMessage(e)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==Ny.connecting}isDisconnecting(){return this.socket.connectionState()==Ny.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const m1={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},pB=[1e3,2e3,5e3,1e4],mB=1e4;function gB(){const t=new Map;return{get length(){return t.size},clear(){t.clear()},getItem(e){return t.has(e)?t.get(e):null},key(e){var n;return(n=Array.from(t.keys())[e])!==null&&n!==void 0?n:null},removeItem(e){t.delete(e)},setItem(e,n){t.set(e,String(n))}}}function yB(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return gB()}const vB=` 425 addEventListener("message", (e) => { 426 if (e.data.event === "start") { 427 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 428 } 429 });`;class bB{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(e,n){var r;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={}
429,this.ref=0,this.serializer=new $z,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=i=>i?(...o)=>i(...o):(...o)=>fetch(...o),!(!((r=n==null?void 0:n.params)===null||r===void 0)&&r.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=n.params.apikey;const s=this._initializeOptions(n);this.socketAdapter=new fB(e,s),this.httpEndpoint=fA(e),this.fetch=this._resolveFetch(n==null?void 0:n.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(e){const n=e.message;throw new Error(`WebSocket not available: ${n}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(e,n){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},e,n)}getChannels(){return this.channels}async removeChannel(e){const n=await e.unsubscribe();return n==="ok"&&e.teardown(),n}async removeAllChannels(){const e=this.channels.map(async r=>{const s=await r.unsubscribe();return r.teardown(),s}),n=await Promise.all(e);return await this.disconnect(),n}log(e,n,r){this.socketAdapter.log(e,n,r)}connectionState(){return this.socketAdapter.connectionState()||Ny.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(e,n={config:{}}){const r=`realtime:${e}`,s=this.getChannels().find(i=>i.topic===r);if(s)return s;{const i=new Zl(`realtime:${e}`,n,this);return this._cancelPendingDisconnect(),this.channels.push(i),i}}push(e){this.socketAdapter.push(e)}async setAuth(e=null){this._authPromise=this._performAuth(e);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(e){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(e)}_makeRef(){return this.socketAdapter.makeRef()}_remove(e){this.channels=this.channels.filter(n=>n.topic!==e.topic),this.channels.length===0&&(this.log("transport","no channels remaining, scheduling disconnect"),this._schedulePendingDisconnect())}_schedulePendingDisconnect(){if(this._cancelPendingDisconnect(),this._disconnectOnEmptyChannelsAfterMs===0){this.log("transport","disconnecting immediately - no channels"),this.disconnect();return}
429this._pendingDisconnectTimer=setTimeout(()=>{this._pendingDisconnectTimer=null,this.channels.length===0&&(this.log("transport","deferred disconnect fired - no channels, disconnecting"),this.disconnect())},this._disconnectOnEmptyChannelsAfterMs),this.log("transport",`deferred disconnect scheduled in ${this._disconnectOnEmptyChannelsAfterMs}ms`)}_cancelPendingDisconnect(){this._pendingDisconnectTimer!==null&&(this.log("transport","pending disconnect cancelled - channel activity detected"),clearTimeout(this._pendingDisconnectTimer),this._pendingDisconnectTimer=null)}async _performAuth(e=null){let n,r=!1;if(e)n=e,r=!0;else if(this.accessToken)try{n=await this.accessToken()}catch(s){this.log("error","Error fetching access token from callback",s),n=this.accessTokenValue}else n=this.accessTokenValue;r?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=n&&(this.accessTokenValue=n,this.channels.forEach(s=>{const i={access_token:n,version:Mz};n&&s.updateJoinPayload(i),s.joinedOnce&&s.channelAdapter.isJoined()&&s.channelAdapter.push(dA.access_token,{access_token:n})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(e="general"){this._isManualToken()||this.setAuth().catch(n=>{this.log("error",`Error setting auth in ${e}`,n)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(n=>{this.log("error","error waiting for auth on connect",n)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(e=>{e.ref&&e.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(e){return(n,r)=>{n!=="disconnected"&&(n=="sent"&&this._setAuthSafely(),e&&e(n,r))}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e),this.workerRef.onerror=n=>{this.log("worker","worker error",n.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=n=>{n.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_workerObjectUrl(e){let n;if(e)n=e;else{const r=new Blob([vB],{type:"application/javascript"});n=URL.createObjectURL(r)}return n}_initializeOptions(e){var n,r,s,i,o,a,l,c,u,h,p,f;this.worker=(n=e==null?void 0:e.worker)!==null&&n!==void 0?n:!1,this.accessToken=(r=e==null?void 0:e.accessToken)!==null&&r!==void 0?r:null;const g={};g.timeout=(s=e==null?void 0:e.timeout)!==null&&s!==void 0?s:Lz,g.heartbeatIntervalMs=(i=e==null?void 0:e.heartbeatIntervalMs)!==null&&i!==void 0?i:m1.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(o=e==null?void 0:e.disconnectOnEmptyChannelsAfterMs)!==null&&o!==void 0?o:2*((a=e==null?void 0:e.heartbeatIntervalMs)!==null&&a!==void 0?a:m1.HEARTBEAT_INTERVAL),g.transport=(l=e==null?void 0:e.transport)!==null&&l!==void 0?l:Oz.getWebSocketConstructor(),g.params=e==null?void 0:e.params,g.logger=e==null?void 0:e.logger,g.heartbeatCallback=this._wrapHeartbeatCallback(e==null?void 0:e.heartbeatCallback),g.sessionStorage=(c=e==null?void 0:e.sessionStorage)!==null&&c!==void 0?c:yB(),g.reconnectAfterMs=(u=e==null?void 0:e.reconnectAfterMs)!==null&&u!==void 0?u:b=>pB[b-1]||mB;let m,y;const v=(h=e==null?void 0:e.vsn)!==null&&h!==void 0?h:Iz;switch(v){case Pz:m=(b,x)=>x(JSON.stringify(b)),y=(b,x)=>x(JSON.parse(b));break;case uA:m=this.serializer.encode.bind(this.serializer),y=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${g.vsn}`)}if(g.vsn=v,g.encode=(p=e==null?void 0:e.encode)!==null&&p!==void 0?p:m,g.decode=(f=e==null?void 0:e.decode)!==null&&f!==void 0?f:y,g.beforeReconnect=this._reconnectAuth.bind(this),(e!=null&&e.logLevel||e!=null&&e.log_level)&&(this.logLevel=e.logLevel||e.log_level,g.params=Object.assign(Object.assign({},g.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=e==null?void 0:e.workerUrl,g.autoSendHeartbeat=!this.worker}return g}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
429var $c=class extends Error{constructor(t,e){var n;super(t),this.name="IcebergError",this.status=e.status,this.icebergType=e.icebergType,this.icebergCode=e.icebergCode,this.details=e.details,this.isCommitStateUnknown=e.icebergType==="CommitStateUnknownException"||[500,502,504].includes(e.status)&&((n=e.icebergType)==null?void 0:n.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function xB(t,e,n){const r=new URL(e,t);if(n)for(const[s,i]of Object.entries(n))i!==void 0&&r.searchParams.set(s,i);return r.toString()}async function wB(t){return!t||t.type==="none"?{}:t.type==="bearer"?{Authorization:`Bearer ${t.token}`}:t.type==="header"?{[t.name]:t.value}:t.type==="custom"?await t.getHeaders():{}}function kB(t){const e=t.fetchImpl??globalThis.fetch;return{async request({method:n,path:r,query:s,body:i,headers:o}){const a=xB(t.baseUrl,r,s),l=await wB(t.auth),c=await e(a,{method:n,headers:{...i?{"Content-Type":"application/json"}:{},...l,...o},body:i?JSON.stringify(i):void 0}),u=await c.text(),h=(c.headers.get("content-type")||"").includes("application/json"),p=h&&u?JSON.parse(u):u;if(!c.ok){const f=h?p:void 0,g=f==null?void 0:f.error;throw new $c((g==null?void 0:g.message)??`Request failed with status ${c.status}`,{status:c.status,icebergType:g==null?void 0:g.type,icebergCode:g==null?void 0:g.code,details:f})}return{status:c.status,headers:c.headers,data:p}}}}function Qu(t){return t.join("�")}var SB=class{constructor(t,e=""){this.client=t,this.prefix=e}async listNamespaces(t){const e=t?{parent:Qu(t.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:e})).data.namespaces.map(r=>({namespace:r}))}async createNamespace(t,e){const n={namespace:t.namespace,properties:e==null?void 0:e.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:n})).data}async dropNamespace(t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Qu(t.namespace)}`})}async loadNamespaceMetadata(t){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Qu(t.namespace)}`})).data.properties}}async namespaceExists(t){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Qu(t.namespace)}`}),!0}catch(e){if(e instanceof $c&&e.status===404)return!1;throw e}}async createNamespaceIfNotExists(t,e){try{return await this.createNamespace(t,e)}catch(n){if(n instanceof $c&&n.status===409)return;throw n}}};function jo(t){return t.join("�")}var CB=class{constructor(t,e="",n){this.client=t,this.prefix=e,this.accessDelegation=n}async listTables(t){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${jo(t.namespace)}/tables`})).data.identifiers}async createTable(t,e){const n={};return this.accessDelegation&&(n["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${jo(t.namespace)}/tables`,body:e,headers:n})).data.metadata}async updateTable(t,e){const n=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${jo(t.namespace)}/tables/${t.name}`,body:e});return{"metadata-location":n.data["metadata-location"],metadata:n.data.metadata}}async dropTable(t,e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${jo(t.namespace)}/tables/${t.name}`,query:{purgeRequested:String((e==null?void 0:e.purge)??!1)}})}async loadTable(t){const e={};return this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${jo(t.namespace)}/tables/${t.name}`,headers:e})).data.metadata}async tableExists(t){const e={};this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${jo(t.namespace)}/tables/${t.name}`,headers:e}),!0}catch(n){if(n instanceof $c&&n.status===404)return!1;throw n}}async createTableIfNotExists(t,e){try{return await this.createTable(t,e)}catch(n){if(n instanceof $c&&n.status===409)return await this.loadTable({namespace:t.namespace,name:e.name});throw n}}},EB=class{constructor(t){var r;let e="v1";t.catalogName&&(e+=`/${t.catalogName}`);const n=t.baseUrl.endsWith("/")?t.baseUrl:`${t.baseUrl}/`;this.client=kB({baseUrl:n,auth:t.auth,fetchImpl:t.fetch}),this.accessDelegation=(r=t.accessDelegation)==null?void 0:r.join(","),this.namespaceOps=new SB(this.client,e),this.tableOps=new CB(this.client,e,this.accessDelegation)}async listNamespaces(t){return this.namespaceOps.listNamespaces(t)}async createNamespace(t,e){return this.namespaceOps.createNamespace(t,e)}async dropNamespace(t){await this.namespaceOps.dropNamespace(t)}async loadNamespaceMetadata(t){return this.namespaceOps.loadNamespaceMetadata(t)}async listTables(t){return this.tableOps.listTables(t)}
429async createTable(t,e){return this.tableOps.createTable(t,e)}async updateTable(t,e){return this.tableOps.updateTable(t,e)}async dropTable(t,e){await this.tableOps.dropTable(t,e)}async loadTable(t){return this.tableOps.loadTable(t)}async namespaceExists(t){return this.namespaceOps.namespaceExists(t)}async tableExists(t){return this.tableOps.tableExists(t)}async createNamespaceIfNotExists(t,e){return this.namespaceOps.createNamespaceIfNotExists(t,e)}async createTableIfNotExists(t,e){return this.tableOps.createTableIfNotExists(t,e)}};function zc(t){"@babel/helpers - typeof";return zc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zc(t)}function TB(t,e){if(zc(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(zc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function NB(t){var e=TB(t,"string");return zc(e)=="symbol"?e:e+""}function AB(t,e,n){return(e=NB(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function g1(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function Z(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?g1(Object(n),!0).forEach(function(r){AB(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):g1(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var dp=class extends Error{constructor(t,e="storage",n,r){super(t),this.__isStorageError=!0,this.namespace=e,this.name=e==="vectors"?"StorageVectorsError":"StorageError",this.status=n,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function hp(t){return typeof t=="object"&&t!==null&&"__isStorageError"in t}var Oy=class extends dp{constructor(t,e,n,r="storage"){super(t,r,e,n),this.name=r==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=e,this.statusCode=n}toJSON(){return Z({},super.toJSON())}},mA=class extends dp{constructor(t,e,n="storage"){super(t,n),this.name=n==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=e}};function Oh(t,e,n){const r=Z({},t),s=e.toLowerCase();for(const i of Object.keys(r))i.toLowerCase()===s&&delete r[i];return r[s]=n,r}function _B(t){const e={};for(const[n,r]of Object.entries(t))e[n.toLowerCase()]=r;return e}const jB=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),OB=t=>{if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Ry=t=>{if(Array.isArray(t))return t.map(n=>Ry(n));if(typeof t=="function"||t!==Object(t))return t;const e={};return Object.entries(t).forEach(([n,r])=>{const s=n.replace(/([-_][a-z])/gi,i=>i.toUpperCase().replace(/[-_]/g,""));e[s]=Ry(r)}),e},RB=t=>!t||typeof t!="string"||t.length===0||t.length>100||t.trim()!==t||t.includes("/")||t.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(t),gA=t=>t.split("/").map(encodeURIComponent).join("/"),y1=t=>{if(typeof t=="object"&&t!==null){const e=t;if(typeof e.msg=="string")return e.msg;if(typeof e.message=="string")return e.message;if(typeof e.error_description=="string")return e.error_description;if(typeof e.error=="string")return e.error;if(typeof e.error=="object"&&e.error!==null){const n=e.error;if(typeof n.message=="string")return n.message}}return JSON.stringify(t)},MB=async(t,e,n,r)=>{if(t!==null&&typeof t=="object"&&"json"in t&&typeof t.json=="function"){const s=t;let i=parseInt(String(s.status),10);Number.isFinite(i)||(i=500),s.json().then(o=>{const a=(o==null?void 0:o.statusCode)||(o==null?void 0:o.code)||i+"";e(new Oy(y1(o),i,a,r))}).catch(()=>{const o=i+"";e(new Oy(s.statusText||`HTTP ${i} error`,i,o,r))})}else e(new mA(y1(t),t,r))},PB=(t,e,n,r)=>{const s={method:t,headers:(e==null?void 0:e.headers)||{}};if(t==="GET"||t==="HEAD"||!r)return Z(Z({},s),n);if(OB(r)){var i;const o=(e==null?void 0:e.headers)||{};let a;for(const[l,c]of Object.entries(o))l.toLowerCase()==="content-type"&&(a=c);s.headers=Oh(o,"Content-Type",(i=a)!==null&&i!==void 0?i:"application/json"),s.body=JSON.stringify(r)}else s.body=r;return e!=null&&e.duplex&&(s.duplex=e.duplex),Z(Z({},s),n)};async function bl(t,e,n,r,s,i,o){return new Promise((a,l)=>
429{t(n,PB(e,r,s,i)).then(c=>{if(!c.ok)throw c;if(r!=null&&r.noResolveJson)return c;if(o==="vectors"){const u=c.headers.get("content-type");if(c.headers.get("content-length")==="0"||c.status===204)return{};if(!u||!u.includes("application/json"))return{}}return c.json()}).then(c=>a(c)).catch(c=>MB(c,l,r,o))})}function yA(t="storage"){return{get:async(e,n,r,s)=>bl(e,"GET",n,r,s,void 0,t),post:async(e,n,r,s,i)=>bl(e,"POST",n,s,i,r,t),put:async(e,n,r,s,i)=>bl(e,"PUT",n,s,i,r,t),head:async(e,n,r,s)=>bl(e,"HEAD",n,Z(Z({},r),{},{noResolveJson:!0}),s,void 0,t),remove:async(e,n,r,s,i)=>bl(e,"DELETE",n,s,i,r,t)}}const IB=yA("storage"),{get:Bc,post:Hn,put:My,head:LB,remove:Fc}=IB,an=yA("vectors");var nl=class{constructor(t,e={},n,r="storage"){this.shouldThrowOnError=!1,this.url=t,this.headers=_B(e),this.fetch=jB(n),this.namespace=r}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(t,e){return this.headers=Oh(this.headers,t,e),this}async handleOperation(t){var e=this;try{return{data:await t(),error:null}}catch(n){if(e.shouldThrowOnError)throw n;if(hp(n))return{data:null,error:n};throw n}}};let vA;vA=Symbol.toStringTag;var DB=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e,this[vA]="StreamDownloadBuilder",this.promise=null}then(t,e){return this.getPromise().then(t,e)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var t=this;try{return{data:(await t.downloadFn()).body,error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(hp(e))return{data:null,error:e};throw e}}};let bA;bA=Symbol.toStringTag;var $B=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e,this[bA]="BlobDownloadBuilder",this.promise=null}asStream(){return new DB(this.downloadFn,this.shouldThrowOnError)}then(t,e){return this.getPromise().then(t,e)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var t=this;try{return{data:await(await t.downloadFn()).blob(),error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(hp(e))return{data:null,error:e};throw e}}};const Sm={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},v1={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var zB=class extends nl{constructor(t,e={},n,r){super(t,e,r,"storage"),this.bucketId=n}async uploadOrUpdate(t,e,n,r){var s=this;return s.handleOperation(async()=>{let i;const o=Z(Z({},v1),r);let a=Z(Z({},s.headers),t==="POST"&&{"x-upsert":String(o.upsert)});const l=o.metadata;if(typeof Blob<"u"&&n instanceof Blob?(i=new FormData,i.append("cacheControl",o.cacheControl),l&&i.append("metadata",s.encodeMetadata(l)),i.append("",n)):typeof FormData<"u"&&n instanceof FormData?(i=n,i.has("cacheControl")||i.append("cacheControl",o.cacheControl),l&&!i.has("metadata")&&i.append("metadata",s.encodeMetadata(l))):(i=n,a["cache-control"]=`max-age=${o.cacheControl}`,a["content-type"]=o.contentType,l&&(a["x-metadata"]=s.toBase64(s.encodeMetadata(l))),(typeof ReadableStream<"u"&&i instanceof ReadableStream||i&&typeof i=="object"&&"pipe"in i&&typeof i.pipe=="function")&&!o.duplex&&(o.duplex="half")),r!=null&&r.headers)for(const[p,f]of Object.entries(r.headers))a=Oh(a,p,f);const c=s._removeEmptyFolders(e),u=s._getFinalPath(c),h=await(t=="PUT"?My:Hn)(s.fetch,`${s.url}/object/${u}`,i,Z({headers:a},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{path:c,id:h.Id,fullPath:h.Key}})}async upload(t,e,n){return this.uploadOrUpdate("POST",t,e,n)}async uploadToSignedUrl(t,e,n,r){var s=this;const i=s._removeEmptyFolders(t),o=s._getFinalPath(i),a=new URL(s.url+`/object/upload/sign/${o}`);return a.searchParams.set("token",e),s.handleOperation(async()=>{let l;const c=Z(Z({},v1),r);let u=Z(Z({},s.headers),{"x-upsert":String(c.upsert)});const h=c.metadata;if(typeof Blob<"u"&&n instanceof Blob?(l=new FormData,l.append("cacheControl",c.cacheControl),h&&l.append("metadata",s.encodeMetadata(h)),l.append("",n)):typeof FormData<"u"&&n instanceof FormData?(l=n,l.has("cacheControl")||l.append("cacheControl",c.cacheControl),h&&!l.has("metadata")&&l.a
429ppend("metadata",s.encodeMetadata(h))):(l=n,u["cache-control"]=`max-age=${c.cacheControl}`,u["content-type"]=c.contentType,h&&(u["x-metadata"]=s.toBase64(s.encodeMetadata(h))),(typeof ReadableStream<"u"&&l instanceof ReadableStream||l&&typeof l=="object"&&"pipe"in l&&typeof l.pipe=="function")&&!c.duplex&&(c.duplex="half")),r!=null&&r.headers)for(const[p,f]of Object.entries(r.headers))u=Oh(u,p,f);return{path:i,fullPath:(await My(s.fetch,a.toString(),l,Z({headers:u},c!=null&&c.duplex?{duplex:c.duplex}:{}))).Key}})}async createSignedUploadUrl(t,e){var n=this;return n.handleOperation(async()=>{let r=n._getFinalPath(t);const s=Z({},n.headers);e!=null&&e.upsert&&(s["x-upsert"]="true");const i=await Hn(n.fetch,`${n.url}/object/upload/sign/${r}`,{},{headers:s}),o=new URL(n.url+i.url),a=o.searchParams.get("token");if(!a)throw new dp("No token returned by API");return{signedUrl:o.toString(),path:t,token:a}})}async update(t,e,n){return this.uploadOrUpdate("PUT",t,e,n)}async move(t,e,n){var r=this;return r.handleOperation(async()=>await Hn(r.fetch,`${r.url}/object/move`,{bucketId:r.bucketId,sourceKey:t,destinationKey:e,destinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers}))}async copy(t,e,n){var r=this;return r.handleOperation(async()=>({path:(await Hn(r.fetch,`${r.url}/object/copy`,{bucketId:r.bucketId,sourceKey:t,destinationKey:e,destinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers})).Key}))}async createSignedUrl(t,e,n){var r=this;return r.handleOperation(async()=>{let s=r._getFinalPath(t);const i=typeof(n==null?void 0:n.transform)=="object"&&n.transform!==null&&Object.keys(n.transform).length>0;let o=await Hn(r.fetch,`${r.url}/object/sign/${s}`,Z({expiresIn:e},i?{transform:n.transform}:{}),{headers:r.headers});const a=new URLSearchParams;n!=null&&n.download&&a.set("download",n.download===!0?"":n.download),(n==null?void 0:n.cacheNonce)!=null&&a.set("cacheNonce",String(n.cacheNonce));const l=a.toString();return{signedUrl:encodeURI(`${r.url}${o.signedURL}${l?`&${l}`:""}`)}})}async createSignedUrls(t,e,n){var r=this;return r.handleOperation(async()=>{const s=await Hn(r.fetch,`${r.url}/object/sign/${r.bucketId}`,{expiresIn:e,paths:t},{headers:r.headers}),i=new URLSearchParams;n!=null&&n.download&&i.set("download",n.download===!0?"":n.download),(n==null?void 0:n.cacheNonce)!=null&&i.set("cacheNonce",String(n.cacheNonce));const o=i.toString();return s.map(a=>Z(Z({},a),{},{signedUrl:a.signedURL?encodeURI(`${r.url}${a.signedURL}${o?`&${o}`:""}`):null}))})}download(t,e,n){const r=typeof(e==null?void 0:e.transform)=="object"&&e.transform!==null&&Object.keys(e.transform).length>0?"render/image/authenticated":"object",s=new URLSearchParams;e!=null&&e.transform&&this.applyTransformOptsToQuery(s,e.transform),(e==null?void 0:e.cacheNonce)!=null&&s.set("cacheNonce",String(e.cacheNonce));const i=s.toString(),o=this._getFinalPath(t),a=()=>Bc(this.fetch,`${this.url}/${r}/${o}${i?`?${i}`:""}`,{headers:this.headers,noResolveJson:!0},n);return new $B(a,this.shouldThrowOnError)}async info(t){var e=this;const n=e._getFinalPath(t);return e.handleOperation(async()=>Ry(await Bc(e.fetch,`${e.url}/object/info/${n}`,{headers:e.headers})))}async exists(t){var e=this;const n=e._getFinalPath(t);try{return await LB(e.fetch,`${e.url}/object/${n}`,{headers:e.headers}),{data:!0,error:null}}catch(s){if(e.shouldThrowOnError)throw s;if(hp(s)){var r;const i=s instanceof Oy?s.status:s instanceof mA?(r=s.originalError)===null||r===void 0?void 0:r.status:void 0;if(i!==void 0&&[400,404].includes(i))return{data:!1,error:s}}throw s}}getPublicUrl(t,e){const n=this._getFinalPath(t),r=new URLSearchParams;e!=null&&e.download&&r.set("download",e.download===!0?"":e.download),e!=null&&e.transform&&this.applyTransformOptsToQuery(r,e.transform),(e==null?void 0:e.cacheNonce)!=null&&r.set("cacheNonce",String(e.cacheNonce));const s=r.toString(),i=typeof(e==null?void 0:e.transform)=="object"&&e.transform!==null&&Object.keys(e.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${i}/public/${n}`)+(s?`?${s}`:"")}}}async remove(t){var e=this;return e.handleOperation(async()=>await Fc(e.fetch,`${e.url}/object/${e.bucketId}`,{prefixes:t},{headers:e.headers}))}async purgeCache(t,e,n){var r=this;return r.handleOperation(async()=>{const s=gA(r._getFinalPath(t)),i=new URLSearchParams;e!=null&&e.transformations&&i.set("transformations","true");const o=i.toString();return await Fc(r.fetch,`${r.url}/cdn/${s}${o?`?${o}`:""}`,{},{headers:r.headers},n)})}async list(t,e,n){var r=this;return r.handleOperation(async()=>{const s=e!=null&&e.sortBy?Z(Z({},Sm.sortBy),e.sortBy):Sm.sortBy,i=Z(Z(Z({},Sm),e),{},{sortBy:s,prefix:t||""});return await Hn(r.fetch,`${r.url}/object/list/${r.bucketId}`,i,{headers:r.headers},n)})}async listV2(t,e){var n=this;return n.handleOperation(async()=>{const r=Z({},t);return await Hn(n.fetch,`${n.url}/object/list-v2/${n.bucketId}`,r,{headers:n.headers},e)})}encodeMetadata(t){return JSON.stringify(t)}toBase64(t){return typeof Buffer<"u"?Buffer.from(t).toString("base64"):btoa(t)}_getFinalPath(t){return`${this.bucketId}/${t.replace(/^\/+/,"")}`}_removeEmptyFolders(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(t,e){return e.width&&t.set("width",e.width.toString()),e.height&&t.set("height",e.height.toString()),e.resize&&t.set("resize",e.resize),e.format&&t.set("format",e.format),e.quality&&t.set("qual
429ity",e.quality.toString()),t}};const BB="2.111.0",mu={"X-Client-Info":`storage-js/${BB}`};var FB=class extends nl{constructor(t,e={},n,r){const s=new URL(t);r!=null&&r.useNewHostname&&/supabase\.(co|in|red)$/.test(s.hostname)&&!s.hostname.includes("storage.supabase.")&&(s.hostname=s.hostname.replace("supabase.","storage.supabase."));const i=s.href.replace(/\/$/,""),o=Z(Z({},mu),e);super(i,o,n,"storage")}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const n=e.listBucketOptionsToQueryString(t);return await Bc(e.fetch,`${e.url}/bucket${n}`,{headers:e.headers})})}async getBucket(t){var e=this;return e.handleOperation(async()=>await Bc(e.fetch,`${e.url}/bucket/${t}`,{headers:e.headers}))}async createBucket(t,e={public:!1}){var n=this;return n.handleOperation(async()=>await Hn(n.fetch,`${n.url}/bucket`,{id:t,name:t,type:e.type,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:n.headers}))}async updateBucket(t,e){var n=this;return n.handleOperation(async()=>await My(n.fetch,`${n.url}/bucket/${t}`,{id:t,name:t,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:n.headers}))}async emptyBucket(t){var e=this;return e.handleOperation(async()=>await Hn(e.fetch,`${e.url}/bucket/${t}/empty`,{},{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await Fc(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}async purgeBucketCache(t,e,n){var r=this;return r.handleOperation(async()=>{const s=new URLSearchParams;e!=null&&e.transformations&&s.set("transformations","true");const i=s.toString();return await Fc(r.fetch,`${r.url}/cdn/${gA(t)}${i?`?${i}`:""}`,{},{headers:r.headers},n)})}listBucketOptionsToQueryString(t){const e={};return t&&("limit"in t&&(e.limit=String(t.limit)),"offset"in t&&(e.offset=String(t.offset)),t.search&&(e.search=t.search),t.sortColumn&&(e.sortColumn=t.sortColumn),t.sortOrder&&(e.sortOrder=t.sortOrder)),Object.keys(e).length>0?"?"+new URLSearchParams(e).toString():""}},WB=class extends nl{constructor(t,e={},n){const r=t.replace(/\/$/,""),s=Z(Z({},mu),e);super(r,s,n,"storage")}async createBucket(t){var e=this;return e.handleOperation(async()=>await Hn(e.fetch,`${e.url}/bucket`,{name:t},{headers:e.headers}))}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const n=new URLSearchParams;(t==null?void 0:t.limit)!==void 0&&n.set("limit",t.limit.toString()),(t==null?void 0:t.offset)!==void 0&&n.set("offset",t.offset.toString()),t!=null&&t.sortColumn&&n.set("sortColumn",t.sortColumn),t!=null&&t.sortOrder&&n.set("sortOrder",t.sortOrder),t!=null&&t.search&&n.set("search",t.search);const r=n.toString(),s=r?`${e.url}/bucket?${r}`:`${e.url}/bucket`;return await Bc(e.fetch,s,{headers:e.headers})})}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await Fc(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}from(t){var e=this;if(!RB(t))throw new dp("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const n=new EB({baseUrl:this.url,catalogName:t,auth:{type:"custom",getHeaders:async()=>e.headers},fetch:this.fetch}),r=this.shouldThrowOnError;return new Proxy(n,{get(s,i){const o=s[i];return typeof o!="function"?o:async(...a)=>{try{return{data:await o.apply(s,a),error:null}}catch(l){if(r)throw l;return{data:null,error:l}}}}})}},HB=class extends nl{constructor(t,e={},n){const r=t.replace(/\/$/,""),s=Z(Z({},mu),{},{"Content-Type":"application/json"},e);super(r,s,n,"vectors")}async createIndex(t){var e=this;return e.handleOperation(async()=>await an.post(e.fetch,`${e.url}/CreateIndex`,t,{headers:e.headers})||{})}async getIndex(t,e){var n=this;return n.handleOperation(async()=>await an.post(n.fetch,`${n.url}/GetIndex`,{vectorBucketName:t,indexName:e},{headers:n.headers}))}async listIndexes(t){var e=this;return e.handleOperation(async()=>await an.post(e.fetch,`${e.url}/ListIndexes`,t,{headers:e.headers}))}async deleteIndex(t,e){var n=this;return n.handleOperation(async()=>await an.post(n.fetch,`${n.url}/DeleteIndex`,{vectorBucketName:t,indexName:e},{headers:n.headers})||{})}},UB=class extends nl{constructor(t,e={},n){const r=t.replace(/\/$/,""),s=Z(Z({},mu),{},{"Content-Type":"application/json"},e);super(r,s,n,"vectors")}async putVectors(t){var e=this;if(t.vectors.length<1||t.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return e.handleOperation(async()=>await an.post(e.fetch,`${e.url}/PutVectors`,t,{headers:e.headers})||{})}async getVectors(t){var e=this;return e.handleOperation(async()=>await an.post(e.fetch,`${e.url}/GetVectors`,t,{headers:e.headers}))}async listVectors(t){var e=this;if(t.segmentCount!==void 0){if(t.segmentCount<1||t.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");
429if(t.segmentIndex!==void 0&&(t.segmentIndex<0||t.segmentIndex>=t.segmentCount))throw new Error(`segmentIndex must be between 0 and ${t.segmentCount-1}`)}return e.handleOperation(async()=>await an.post(e.fetch,`${e.url}/ListVectors`,t,{headers:e.headers}))}async queryVectors(t){var e=this;return e.handleOperation(async()=>await an.post(e.fetch,`${e.url}/QueryVectors`,t,{headers:e.headers}))}async deleteVectors(t){var e=this;if(t.keys.length<1||t.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return e.handleOperation(async()=>await an.post(e.fetch,`${e.url}/DeleteVectors`,t,{headers:e.headers})||{})}},VB=class extends nl{constructor(t,e={},n){const r=t.replace(/\/$/,""),s=Z(Z({},mu),{},{"Content-Type":"application/json"},e);super(r,s,n,"vectors")}async createBucket(t){var e=this;return e.handleOperation(async()=>await an.post(e.fetch,`${e.url}/CreateVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}async getBucket(t){var e=this;return e.handleOperation(async()=>await an.post(e.fetch,`${e.url}/GetVectorBucket`,{vectorBucketName:t},{headers:e.headers}))}async listBuckets(t={}){var e=this;return e.handleOperation(async()=>await an.post(e.fetch,`${e.url}/ListVectorBuckets`,t,{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await an.post(e.fetch,`${e.url}/DeleteVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}},qB=class extends VB{constructor(t,e={}){super(t,e.headers||{},e.fetch)}from(t){return new GB(this.url,this.headers,t,this.fetch)}async createBucket(t){var e=()=>super.createBucket,n=this;return e().call(n,t)}async getBucket(t){var e=()=>super.getBucket,n=this;return e().call(n,t)}async listBuckets(t={}){var e=()=>super.listBuckets,n=this;return e().call(n,t)}async deleteBucket(t){var e=()=>super.deleteBucket,n=this;return e().call(n,t)}},GB=class extends HB{constructor(t,e,n,r){super(t,e,r),this.vectorBucketName=n}async createIndex(t){var e=()=>super.createIndex,n=this;return e().call(n,Z(Z({},t),{},{vectorBucketName:n.vectorBucketName}))}async listIndexes(t={}){var e=()=>super.listIndexes,n=this;return e().call(n,Z(Z({},t),{},{vectorBucketName:n.vectorBucketName}))}async getIndex(t){var e=()=>super.getIndex,n=this;return e().call(n,n.vectorBucketName,t)}async deleteIndex(t){var e=()=>super.deleteIndex,n=this;return e().call(n,n.vectorBucketName,t)}index(t){return new KB(this.url,this.headers,this.vectorBucketName,t,this.fetch)}},KB=class extends UB{constructor(t,e,n,r,s){super(t,e,s),this.vectorBucketName=n,this.indexName=r}async putVectors(t){var e=()=>super.putVectors,n=this;return e().call(n,Z(Z({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async getVectors(t){var e=()=>super.getVectors,n=this;return e().call(n,Z(Z({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async listVectors(t={}){var e=()=>super.listVectors,n=this;return e().call(n,Z(Z({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async queryVectors(t){var e=()=>super.queryVectors,n=this;return e().call(n,Z(Z({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async deleteVectors(t){var e=()=>super.deleteVectors,n=this;return e().call(n,Z(Z({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}},YB=class extends FB{constructor(t,e={},n,r){super(t,e,n,r)}from(t){return new zB(this.url,this.headers,t,this.fetch)}get vectors(){return new qB(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new WB(this.url+"/iceberg",this.headers,this.fetch)}};function fp(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(t);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(n[r[s]]=t[r[s]]);return n}const xA="2.111.0",Fr=30*1e3,Rl=3,Cm=Rl*Fr,JB=2*Fr,QB="http://localhost:9999",XB="supabase.auth.token",ZB={"X-Client-Info":`gotrue-js/${xA}`},Py="X-Supabase-Api-Version",wA={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},eF=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,Pi="sb_flow_id",tF=5,nF=10*60*1e3;
429class Wc extends Error{constructor(e,n,r){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=r}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function $(t){return typeof t=="object"&&t!==null&&"__isAuthError"in t}class rF extends Wc{constructor(e,n,r){super(e,n,r),this.name="AuthApiError",this.status=n,this.code=r}}function b1(t){return $(t)&&t.name==="AuthApiError"}class Kn extends Wc{constructor(e,n){super(e),this.name="AuthUnknownError",this.originalError=n}}class Ar extends Wc{constructor(e,n,r,s){super(e,r,s),this.name=n,this.status=r}}class lt extends Ar{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Xu(t){return $(t)&&t.name==="AuthSessionMissingError"}class Oo extends Ar{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class Zu extends Ar{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class ed extends Ar{constructor(e,n=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function sF(t){return $(t)&&t.name==="AuthImplicitGrantRedirectError"}class x1 extends Ar{constructor(e,n=null){super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class iF extends Ar{constructor(){super("PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.","AuthPKCECodeVerifierMissingError",400,"pkce_code_verifier_not_found")}}class Iy extends Ar{constructor(e,n){super(e,"AuthRetryableFetchError",n,void 0)}}function td(t){return $(t)&&t.name==="AuthRetryableFetchError"}class w1 extends Ar{constructor(e="Refresh result discarded: session state changed mid-flight (e.g., concurrent signOut)"){super(e,"AuthRefreshDiscardedError",409,void 0)}}function oF(t){return $(t)&&t.name==="AuthRefreshDiscardedError"}class k1 extends Ar{constructor(e,n,r){super(e,"AuthWeakPasswordError",n,"weak_password"),this.reasons=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class Rh extends Ar{constructor(e){super(e,"AuthInvalidJwtError",400,"invalid_jwt")}}const Mh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),S1=` 430\r=`.split(""),aF=(()=>{const t=new Array(128);for(let e=0;e<t.length;e+=1)t[e]=-1;for(let e=0;e<S1.length;e+=1)t[S1[e].charCodeAt(0)]=-2;for(let e=0;e<Mh.length;e+=1)t[Mh[e].charCodeAt(0)]=e;return t})();function C1(t,e,n){if(t!==null)for(e.queue=e.queue<<8|t,e.queuedBits+=8;e.queuedBits>=6;){const r=e.queue>>e.queuedBits-6&63;n(Mh[r]),e.queuedBits-=6}else if(e.queuedBits>0)for(e.queue=e.queue<<6-e.queuedBits,e.queuedBits=6;e.queuedBits>=6;){const r=e.queue>>e.queuedBits-6&63;n(Mh[r]),e.queuedBits-=6}}function kA(t,e,n){const r=aF[t];if(r>-1)for(e.queue=e.queue<<6|r,e.queuedBits+=6;e.queuedBits>=8;)n(e.queue>>e.queuedBits-8&255),e.queuedBits-=8;else{if(r===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(t)}"`)}}function E1(t){const e=[],n=o=>{e.push(String.fromCodePoint(o))},r={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},i=o=>{uF(o,r,n)};for(let o=0;o<t.length;o+=1)kA(t.charCodeAt(o),s,i);return e.join("")}function lF(t,e){if(t<=127){e(t);return}else if(t<=2047){e(192|t>>6),e(128|t&63);return}else if(t<=65535){e(224|t>>12),e(128|t>>6&63),e(128|t&63);return}else if(t<=1114111){e(240|t>>18),e(128|t>>12&63),e(128|t>>6&63),e(128|t&63);return}throw new Error(`Unrecognized Unicode codepoint: ${t.toString(16)}`)}function cF(t,e){for(let n=0;n<t.length;n+=1){let r=t.charCodeAt(n);if(r>55295&&r<=56319){const s=(r-55296)*1024&65535;r=(t.charCodeAt(n+1)-56320&65535|s)+65536,n+=1}lF(r,e)}}function uF(t,e,n){if(e.utf8seq===0){if(t<=127){n(t);return}for(let r=1;r<6;r+=1)if(!(t>>7-r&1)){e.utf8seq=r;break}if(e.utf8seq===2)e.codepoint=t&31;else if(e.utf8seq===3)e.codepoint=t&15;else if(e.utf8seq===4)e.codepoint=t&7;else throw new Error("Invalid UTF-8 sequence");e.utf8seq-=1}else if(e.utf8seq>0){if(t<=127)throw new Error("Invalid UTF-8 sequence");e.codepoint=e.codepoint<<6|t&63,e.utf8seq-=1,e.utf8seq===0&&n(e.codepoint)}}function pa(t){const e=[],n={queue:0,queuedBits:0},r=s=>{e.push(s)};for(let s=0;s<t.length;s+=1)kA(t.charCodeAt(s),n,r);return new Uint8Array(e)}function dF(t){const e=[];return cF(t,n=>e.push(n)),new Uint8Array(e)}function Ii(t){const e=[],n={queue:0,queuedBits:0},r=s=>{e.push(s)};return t.forEach(s=>C1(s,n,r)),C1(null,n,r),e.join("")}function hF(t){return Math.round(Date.now()/1e3)+t}function fF(){return Symbol("auth-callback")}const pt=()=>typeof window<"u"&&typeof document<"u",Ci={tested:!1,writable:!1},SA=()=>{if(!pt())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Ci.tested)return Ci.writable;const t=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(t,t),globalThis.localStorage.removeItem(t),Ci.tested=!0,Ci.writable=!0}catch{Ci.tested=!0,Ci.writable=!1}return Ci.writable};function T1(t){const e={},n=new URL(t);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEac
430h((s,i)=>{e[i]=s})}catch{}return n.searchParams.forEach((r,s)=>{e[s]=r}),e}const CA=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),pF=t=>typeof t=="object"&&t!==null&&"status"in t&&"ok"in t&&"json"in t&&typeof t.json=="function",Vr=async(t,e,n)=>{await t.setItem(e,JSON.stringify(n))},At=async(t,e)=>{const n=await t.getItem(e);if(!n)return null;try{return JSON.parse(n)}catch{return null}},Kt=async(t,e)=>{await t.removeItem(e)};class pp{constructor(){this.promise=new pp.promiseConstructor((e,n)=>{this.resolve=e,this.reject=n})}}pp.promiseConstructor=Promise;function nd(t){const e=t.split(".");if(e.length!==3)throw new Rh("Invalid JWT structure");for(let r=0;r<e.length;r++)if(!eF.test(e[r]))throw new Rh("JWT not in base64url format");return{header:JSON.parse(E1(e[0])),payload:JSON.parse(E1(e[1])),signature:pa(e[2]),raw:{header:e[0],payload:e[1]}}}async function mF(t){return await new Promise(e=>{setTimeout(()=>e(null),t)})}function gF(t,e){return new Promise((r,s)=>{(async()=>{for(let i=0;i<1/0;i++)try{const o=await t(i);if(!e(i,null,o)){r(o);return}}catch(o){if(!e(i,o)){s(o);return}}})()})}function EA(t){return("0"+t.toString(16)).substr(-2)}function yF(){const e=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=n.length;let s="";for(let i=0;i<56;i++)s+=n.charAt(Math.floor(Math.random()*r));return s}return crypto.getRandomValues(e),Array.from(e,EA).join("")}async function vF(t){const n=new TextEncoder().encode(t),r=await crypto.subtle.digest("SHA-256",n),s=new Uint8Array(r);return Array.from(s).map(i=>String.fromCharCode(i)).join("")}async function bF(t){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),t;const n=await vF(t);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}const xF=/^[a-zA-Z0-9_-]{8,64}$/;function Wd(t){return typeof t=="string"&&xF.test(t)?t:null}function wF(){if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"){const e=new Uint8Array(16);return crypto.getRandomValues(e),Array.from(e,EA).join("")}let t="";for(let e=0;e<32;e++)t+=Math.floor(Math.random()*16).toString(16);return t}const Ia=(t,e)=>`${t}-flow-${e}-code-verifier`,Hc=t=>`${t}-flows-code-verifier`;async function Q0(t,e){const n=await At(t,Hc(e));return Array.isArray(n)?n.filter(r=>Wd(r)!==null):[]}async function kF(t,e,n,r,s){await Vr(t,Ia(e,n),r);const i=(await Q0(t,e)).filter(o=>o!==n);for(i.push(n);i.length>tF;){const o=i.shift();await Kt(t,Ia(e,o)),s==null||s(o)}await Vr(t,Hc(e),i),await Vr(t,`${e}-code-verifier`,r)}async function SF(t,e,n){if(n){const s=await At(t,Ia(e,n));return{verifier:typeof s=="string"?s:null,flowId:n}}const r=await At(t,`${e}-code-verifier`);return{verifier:typeof r=="string"?r:null,flowId:null}}async function $n(t,e,n){const r=`${e}-code-verifier`;if(!n){await Kt(t,r);return}const s=Ia(e,n),i=await At(t,s);await Kt(t,s);const o=await Q0(t,e),a=o.filter(l=>l!==n);a.length!==o.length&&(a.length>0?await Vr(t,Hc(e),a):await Kt(t,Hc(e))),i!=null&&i===await At(t,r)&&await Kt(t,r)}async function CF(t,e){const n=await Q0(t,e);for(const r of n)await Kt(t,Ia(e,r));await Kt(t,Hc(e)),await Kt(t,`${e}-code-verifier`)}function EF(t,e){const n=t.indexOf("#");let r=n===-1?t:t.slice(0,n);const s=n===-1?"":t.slice(n),i=r.indexOf("?");if(i!==-1){const a=r.slice(0,i),l=r.slice(i+1).split("&").filter(c=>c!==""&&c!==Pi&&!c.startsWith(`${Pi}=`));r=l.length>0?`${a}?${l.join("&")}`:a}const o=r.includes("?")?"&":"?";return`${r}${o}${Pi}=${encodeURIComponent(e)}${s}`}async function TF(t,e,n=!1,r){const s=yF();let i=s;n&&(i+="/recovery");const o=wF();await kF(t,e,o,i,r);const a=await bF(s);return[a,s===a?"plain":"s256",o]}const NF=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function AF(t){const e=t.headers.get(Py);if(!e||!e.match(NF))return null;try{return new Date(`${e}T00:00:00.0Z`)}catch{return null}}function _F(t){if(!t)throw new Error("Missing exp claim");const e=Math.floor(Date.now()/1e3);if(t<=e)throw new Error("JWT has expired")}function jF(t){switch(t){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const OF=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Or(t){if(!OF.test(t))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function zn(t){if(!t.passkey)throw new Error("@supabase/auth-js: the passkey API is experimental and disabled by default. Enable it by passing `auth: { experimental: { passkey: true } }` to createClient (or to the GoTrueClient constructor).")}function Em(){const t={};return new Proxy(t,{get:(e,n)=>{if(n==="__isUserNotAvailableProxy")return!0;
430if(typeof n=="symbol"){const r=n.toString();if(r==="Symbol(Symbol.toPrimitive)"||r==="Symbol(Symbol.toStringTag)"||r==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${n}" property of the session object is not supported. Please use getUser() instead.`)},set:(e,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(e,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function RF(t,e){return new Proxy(t,{get:(n,r,s)=>{if(r==="__isInsecureUserWarningProxy")return!0;if(typeof r=="symbol"){const i=r.toString();if(i==="Symbol(Symbol.toPrimitive)"||i==="Symbol(Symbol.toStringTag)"||i==="Symbol(util.inspect.custom)"||i==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(n,r,s)}return!e.value&&typeof r=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),e.value=!0),Reflect.get(n,r,s)}})}function N1(t){return JSON.parse(JSON.stringify(t))}const Ni=t=>{if(typeof t=="object"&&t!==null){const e=t;if(typeof e.msg=="string")return e.msg;if(typeof e.message=="string")return e.message;if(typeof e.error_description=="string")return e.error_description;if(typeof e.error=="string")return e.error}return JSON.stringify(t)},MF=[500,501,502,503,504,520,521,522,523,524,525,526,527,528,529,530];async function A1(t){var e;if(!pF(t))throw new Iy(Ni(t),0);if(MF.includes(t.status))throw new Iy(Ni(t),t.status);let n;try{n=await t.json()}catch(i){throw new Kn(Ni(i),i)}let r;const s=AF(t);if(s&&s.getTime()>=wA["2024-01-01"].timestamp&&typeof n=="object"&&n&&typeof n.code=="string"?r=n.code:typeof n=="object"&&n&&typeof n.error_code=="string"&&(r=n.error_code),r){if(r==="weak_password")throw new k1(Ni(n),t.status,((e=n.weak_password)===null||e===void 0?void 0:e.reasons)||[]);if(r==="session_not_found")throw new lt}else if(typeof n=="object"&&n&&typeof n.weak_password=="object"&&n.weak_password&&Array.isArray(n.weak_password.reasons)&&n.weak_password.reasons.length&&n.weak_password.reasons.reduce((i,o)=>i&&typeof o=="string",!0))throw new k1(Ni(n),t.status,n.weak_password.reasons);throw new rF(Ni(n),t.status||500,r)}const PF=(t,e,n,r)=>{const s={method:t,headers:(e==null?void 0:e.headers)||{}};return t==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},e==null?void 0:e.headers),s.body=JSON.stringify(r),Object.assign(Object.assign({},s),n))};async function K(t,e,n,r){var s;const i=Object.assign({},r==null?void 0:r.headers);i[Py]||(i[Py]=wA["2024-01-01"].name),r!=null&&r.jwt&&(i.Authorization=`Bearer ${r.jwt}`);const o=(s=r==null?void 0:r.query)!==null&&s!==void 0?s:{};r!=null&&r.redirectTo&&(o.redirect_to=r.redirectTo);const a=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",l=await IF(t,e,n+a,{headers:i,noResolveJson:r==null?void 0:r.noResolveJson},{},r==null?void 0:r.body);return r!=null&&r.xform?r==null?void 0:r.xform(l):{data:Object.assign({},l),error:null}}async function IF(t,e,n,r,s,i){const o=PF(e,r,s,i);let a;try{a=await t(n,Object.assign({},o))}catch(l){throw new Iy(Ni(l),0)}if(a.ok||await A1(a),r!=null&&r.noResolveJson)return a;try{return await a.json()}catch(l){await A1(l)}}function vn(t){var e;let n=null;$F(t)&&(n=Object.assign({},t),t.expires_at||(n.expires_at=hF(t.expires_in)));const r=(e=t.user)!==null&&e!==void 0?e:typeof(t==null?void 0:t.id)=="string"?t:null;return{data:{session:n,user:r},error:null}}function _1(t){const e=vn(t);return!e.error&&t.weak_password&&typeof t.weak_password=="object"&&Array.isArray(t.weak_password.reasons)&&t.weak_password.reasons.length&&t.weak_password.message&&typeof t.weak_password.message=="string"&&t.weak_password.reasons.reduce((n,r)=>n&&typeof r=="string",!0)&&(e.data.weak_password=t.weak_password),e}function As(t){var e;return{data:{user:(e=t.user)!==null&&e!==void 0?e:t},error:null}}function LF(t){return{data:t,error:null}}function DF(t){const{action_link:e,email_otp:n,hashed_token:r,redirect_to:s,verification_type:i}=t,o=fp(t,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:e,email_otp:n,hashed_token:r,redirect_to:s,verification_type:i},l=Object.assign({},o);return{data:{properties:a,user:l},error:null}}function j1(t){return t}function $F(t){return!!t.access_token&&!!t.refresh_token&&!!t.expires_in}const Tm=["global","local","others"];class zF{constructor({url:e="",headers:n={},fetch:r,experimental:s}){this.url=e,this.headers=n,this.fetch=CA(r),this.experimental=s??{},this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)},this.passkey={listPasskeys:this._adminListPasskeys.bind(this),deletePasskey:this._adminDeletePasskey.bind(this)}}async signOut(e,n=Tm[0]){if(Tm.indexOf(n)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Tm.join(", ")}`);try{return await K(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(r){if($(r))return{data:null,error:r};throw r}}async inviteUserByEmail(e,n={}){try{return await K(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:As})}catch(r){if($(r))return{data:{user:null},error:r};throw r}}async generateLink(e){try{const{options:n}=e,r=fp(e,["options"]),s=Object.assign(Object.assign({},r),n);return"newEmail"in r&&(s.new_email=r==null?void 0:r.newEmail,delete s.newEmail),await K(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:DF,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if($(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(e){try{return await K(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:As})}catch(n){if($(n))return{data:{user:null},error:n};throw n}}async listUsers(e){var n,r,s,i,o,a,l;try{const c={nextPage:null,lastPage:0,total:0},u=await K(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=e==null?void 0:e.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(i=(s=e==null?void 0:e.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:j1});if(u.error)throw u.error;const h=await u.json(),p=(o=u.headers.get("x-total-count"))!==null&&o!==void 0?o:0,f=(l=(a=u.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return f.length>0&&(f.forEach(g=>{const m=parseInt(g.split(";")[0].split("=")[1].substring(0,1)),y=JSON.parse(g.split(";")[1].split("=")[1]);c[`${y}Page`]=m}),c.total=parseInt(p)),{data:Object.assign(Object.assign({},h),c),error:null}}catch(c){if($(c))return{data:{users:[]},error:c};throw c}}async getUserById(e){Or(e);try{return await K(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:As})}catch(n){if($(n))return{data:{user:null},error:n};throw n}}async updateUserById(e,n){Or(e);try{return await K(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:n,headers:this.headers,xform:As})}catch(r){if($(r))return{data:{user:null},error:r};throw r}}async deleteUser(e,n=!1){Or(e);
430try{return await K(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:n},xform:As})}catch(r){if($(r))return{data:{user:null},error:r};throw r}}async _listFactors(e){Or(e.userId);try{const{data:n,error:r}=await K(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:n,error:r}}catch(n){if($(n))return{data:null,error:n};throw n}}async _deleteFactor(e){Or(e.userId),Or(e.id);try{return{data:await K(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(n){if($(n))return{data:null,error:n};throw n}}async _listOAuthClients(e){var n,r,s,i,o,a,l;try{const c={nextPage:null,lastPage:0,total:0},u=await K(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=e==null?void 0:e.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(i=(s=e==null?void 0:e.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:j1});if(u.error)throw u.error;const h=await u.json(),p=(o=u.headers.get("x-total-count"))!==null&&o!==void 0?o:0,f=(l=(a=u.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return f.length>0&&(f.forEach(g=>{const m=parseInt(g.split(";")[0].split("=")[1].substring(0,1)),y=JSON.parse(g.split(";")[1].split("=")[1]);c[`${y}Page`]=m}),c.total=parseInt(p)),{data:Object.assign(Object.assign({},h),c),error:null}}catch(c){if($(c))return{data:{clients:[]},error:c};throw c}}async _createOAuthClient(e){try{return await K(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:e,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if($(n))return{data:null,error:n};throw n}}async _getOAuthClient(e){try{return await K(this.fetch,"GET",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if($(n))return{data:null,error:n};throw n}}async _updateOAuthClient(e,n){try{return await K(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${e}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if($(r))return{data:null,error:r};throw r}}async _deleteOAuthClient(e){try{return await K(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if($(n))return{data:null,error:n};throw n}}async _regenerateOAuthClientSecret(e){try{return await K(this.fetch,"POST",`${this.url}/admin/oauth/clients/${e}/regenerate_secret`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if($(n))return{data:null,error:n};throw n}}async _listCustomProviders(e){try{const n={};return e!=null&&e.type&&(n.type=e.type),await K(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:n,xform:r=>{var s;return{data:{providers:(s=r==null?void 0:r.providers)!==null&&s!==void 0?s:[]},error:null}}})}catch(n){if($(n))return{data:{providers:[]},error:n};throw n}}async _createCustomProvider(e){try{return await K(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:e,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if($(n))return{data:null,error:n};throw n}}async _getCustomProvider(e){try{return await K(this.fetch,"GET",`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if($(n))return{data:null,error:n};throw n}}async _updateCustomProvider(e,n){try{return await K(this.fetch,"PUT",`${this.url}/admin/custom-providers/${e}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if($(r))return{data:null,error:r};throw r}}async _deleteCustomProvider(e){try{return await K(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if($(n))return{data:null,error:n};throw n}}async _adminListPasskeys(e){zn(this.experimental),Or(e.userId);try{return await K(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/passkeys`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if($(n))return{data:null,error:n};throw n}}async _adminDeletePasskey(e){zn(this.experimental),Or(e.userId),Or(e.passkeyId);
430try{return await K(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/passkeys/${e.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if($(n))return{data:null,error:n};throw n}}}function O1(t={}){return{getItem:e=>t[e]||null,setItem:(e,n)=>{t[e]=n},removeItem:e=>{delete t[e]}}}globalThis&&SA()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug");class BF extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}function FF(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function TA(t){if(!/^0x[a-fA-F0-9]{40}$/.test(t))throw new Error(`@supabase/auth-js: Address "${t}" is invalid.`);return t.toLowerCase()}function WF(t){return parseInt(t,16)}function HF(t){const e=new TextEncoder().encode(t);return"0x"+Array.from(e,r=>r.toString(16).padStart(2,"0")).join("")}function UF(t){var e;const{chainId:n,domain:r,expirationTime:s,issuedAt:i=new Date,nonce:o,notBefore:a,requestId:l,resources:c,scheme:u,uri:h,version:p}=t;{if(!Number.isInteger(n))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${n}`);if(!r)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(o&&o.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${o}`);if(!h)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(p!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${p}`);if(!((e=t.statement)===null||e===void 0)&&e.includes(` 431`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${t.statement}`)}const f=TA(t.address),g=u?`${u}://${r}`:r,m=t.statement?`${t.statement} 432`:"",y=`${g} wants you to sign in with your Ethereum account: 433${f} 434 435${m}`;let v=`URI: ${h} 436Version: ${p} 437Chain ID: ${n}${o?` 438Nonce: ${o}`:""} 439Issued At: ${i.toISOString()}`;if(s&&(v+=` 440Expiration Time: ${s.toISOString()}`),a&&(v+=` 441Not Before: ${a.toISOString()}`),l&&(v+=` 442Request ID: ${l}`),c){let b=` 443Resources:`;for(const x of c){if(!x||typeof x!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${x}`);b+=` 444- ${x}`}v+=b}return`${y} 445${v}`}class Ze extends Error{constructor({message:e,code:n,cause:r,name:s}){var i;super(e,{cause:r}),this.__isWebAuthnError=!0,this.name=(i=s??(r instanceof Error?r.name:void 0))!==null&&i!==void 0?i:"Unknown Error",this.code=n}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class Ph extends Ze{constructor(e,n){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:n,message:e}),this.name="WebAuthnUnknownError",this.originalError=n}}function VF({error:t,options:e}){var n,r,s;const{publicKey:i}=e;if(!i)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new Ze({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else if(t.name==="ConstraintError"){if(((n=i.authenticatorSelection)===null||n===void 0?void 0:n.requireResidentKey)===!0)return new Ze({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:t});if(e.mediation==="conditional"&&((r=i.authenticatorSelection)===null||r===void 0?void 0:r.userVerification)==="required")return new Ze({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:t});if(((s=i.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new Ze({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:t})}else{if(t.name==="InvalidStateError")return new Ze({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:t});if(t.name==="NotAllowedError")return new Ze({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="NotSupportedError")return i.pubKeyCredParams.filter(a=>a.type==="public-key").length===0?new Ze({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:t}):new Ze({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:t});if(t.name==="SecurityError"){const o=window.location.hostname;if(NA(o)){if(i.rp.id!==o)return new Ze({message:`The RP ID "${i.rp.id}
445" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new Ze({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="TypeError"){if(i.user.id.byteLength<1||i.user.id.byteLength>64)return new Ze({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:t})}else if(t.name==="UnknownError")return new Ze({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new Ze({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}function qF({error:t,options:e}){const{publicKey:n}=e;if(!n)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new Ze({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else{if(t.name==="NotAllowedError")return new Ze({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="SecurityError"){const r=window.location.hostname;if(NA(r)){if(n.rpId!==r)return new Ze({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new Ze({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="UnknownError")return new Ze({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new Ze({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}class GF{createNewAbortSignal(){if(this.controller){const n=new Error("Cancelling existing WebAuthn API call for new one");n.name="AbortError",this.controller.abort(n)}const e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){const e=new Error("Manually cancelling existing WebAuthn API call");e.name="AbortError",this.controller.abort(e),this.controller=void 0}}}const Ly=new GF;function R1(t){if(!t)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(t);const{challenge:e,user:n,excludeCredentials:r}=t,s=fp(t,["challenge","user","excludeCredentials"]),i=pa(e).buffer,o=Object.assign(Object.assign({},n),{id:pa(n.id).buffer}),a=Object.assign(Object.assign({},s),{challenge:i,user:o});if(r&&r.length>0){a.excludeCredentials=new Array(r.length);for(let l=0;l<r.length;l++){const c=r[l];a.excludeCredentials[l]=Object.assign(Object.assign({},c),{id:pa(c.id).buffer,type:c.type||"public-key",transports:c.transports})}}return a}function M1(t){if(!t)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(t);const{challenge:e,allowCredentials:n}=t,r=fp(t,["challenge","allowCredentials"]),s=pa(e).buffer,i=Object.assign(Object.assign({},r),{challenge:s});if(n&&n.length>0){i.allowCredentials=new Array(n.length);for(let o=0;o<n.length;o++){const a=n[o];i.allowCredentials[o]=Object.assign(Object.assign({},a),{id:pa(a.id).buffer,type:a.type||"public-key",transports:a.transports})}}return i}function P1(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const n=t;return{id:t.id,rawId:t.id,response:{attestationObject:Ii(new Uint8Array(t.response.attestationObject)),clientDataJSON:Ii(new Uint8Array(t.response.clientDataJSON))},type:"public-key",clientExtensionResults:t.getClientExtensionResults(),authenticatorAttachment:(e=n.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function I1(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const n=t,r=t.getClientExtensionResults(),s=t.response;return{id:t.id,rawId:t.id,response:{authenticatorData:Ii(new Uint8Array(s.authenticatorData)),clientDataJSON:Ii(new Uint8Array(s.clientDataJSON)),signature:Ii(new Uint8Array(s.signature)),userHandle:s.userHandle?Ii(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:r,authenticatorAttachment:(e=n.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function NA(t){return t==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(t)}function Ih(){var t,e;return!!(pt()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.create)=="function"&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.get)=="function")}async function AA(t){try{const e=await navigator.credentials.create(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new Ph("Browser returned unexpected credential type",e)}:{data:null,error:new Ph("Empty credential response",e)}}catch(e){return{data:null,error:VF({error:e,options:t})}}}async function _A(t){try{const e=await navigator.credentials.get(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new Ph("Browser returned unexpected credential type",e)}:{data:null,error:new Ph("Empty credential response",e)}}catch(e){return{data:null,error:qF({error:e,options:t})}}}const KF={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},YF={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Lh(...t){const e=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),n=s=>s instanceof ArrayBuffer||ArrayBuffer.isView(s),r={};for(const s of t)if(s)for(const i in s){const o=s[i];if(o!==void 0)if(Array.isArray(o))r[i]=o;else if(n(o))r[i]=o;else if(e(o)){const a=r[i];e(a)?r[i]=Lh(a,o):r[i]=Lh(o)}else r[i]=o}return r}function JF(t,e){return Lh(KF,t,e||{})}function QF(t,e){return Lh(YF,t,e||{})}class XF{constructor(e){this.client=e,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(e){return this.client.mfa.enroll(Object.assign(Object.assign({},e),{factorType:"webauthn"}))}async _challenge({factorId:e,webauthn:n,friendlyName:r,signal:s},i){var o;try{const{data:a,error:l}=await this.client.mfa.challenge({factorId:e,webauthn:n});if(!a)return{data:null,error:l};const c=s??Ly.createNewAbortSignal();if(a.webauthn.type==="create"){const{user:u}=a.webauthn.credential_options.publicKey;if(!u.name){const h=r;if(h)u.name=`${u.id}:${h}`;else{const f=(await this.client.getUser()).data.user,g=((o=f==null?void 0:f.user_metadata)===null||o===void 0?void 0:o.name)||(f==null?void 0:f.email)||(f==null?void 0:f.id)||"User";u.name=`${u.id}:${g}`}}u.displayName||(u.displayName=u.name)}
445switch(a.webauthn.type){case"create":{const u=JF(a.webauthn.credential_options.publicKey,i==null?void 0:i.create),{data:h,error:p}=await AA({publicKey:u,signal:c});return h?{data:{factorId:e,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:h}},error:null}:{data:null,error:p}}case"request":{const u=QF(a.webauthn.credential_options.publicKey,i==null?void 0:i.request),{data:h,error:p}=await _A(Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:u,signal:c}));return h?{data:{factorId:e,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:h}},error:null}:{data:null,error:p}}}}catch(a){return $(a)?{data:null,error:a}:{data:null,error:new Kn("Unexpected error in challenge",a)}}}async _verify({challengeId:e,factorId:n,webauthn:r}){return this.client.mfa.verify({factorId:n,challengeId:e,webauthn:r})}async _authenticate({factorId:e,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!n)return{data:null,error:new Wc("rpId is required for WebAuthn authentication")};try{if(!Ih())return{data:null,error:new Kn("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this.challenge({factorId:e,webauthn:{rpId:n,rpOrigins:r},signal:s},{request:i});if(!o)return{data:null,error:a};const{webauthn:l}=o;return this._verify({factorId:e,challengeId:o.challengeId,webauthn:{type:l.type,rpId:n,rpOrigins:r,credential_response:l.credential_response}})}catch(o){return $(o)?{data:null,error:o}:{data:null,error:new Kn("Unexpected error in authenticate",o)}}}async _register({friendlyName:e,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!n)return{data:null,error:new Wc("rpId is required for WebAuthn registration")};try{if(!Ih())return{data:null,error:new Kn("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this._enroll({friendlyName:e});if(!o)return await this.client.mfa.listFactors().then(u=>{var h;return(h=u.data)===null||h===void 0?void 0:h.all.find(p=>p.factor_type==="webauthn"&&p.friendly_name===e&&p.status!=="unverified")}).then(u=>u?this.client.mfa.unenroll({factorId:u==null?void 0:u.id}):void 0),{data:null,error:a};const{data:l,error:c}=await this._challenge({factorId:o.id,friendlyName:o.friendly_name,webauthn:{rpId:n,rpOrigins:r},signal:s},{create:i});return l?this._verify({factorId:o.id,challengeId:l.challengeId,webauthn:{rpId:n,rpOrigins:r,type:l.webauthn.type,credential_response:l.webauthn.credential_response}}):{data:null,error:c}}catch(o){return $(o)?{data:null,error:o}:{data:null,error:new Kn("Unexpected error in register",o)}}}}FF();const ZF={url:QB,storageKey:XB,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:ZB,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}},Ro={};class Uc{get jwks(){var e,n;return(n=(e=Ro[this.storageKey])===null||e===void 0?void 0:e.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(e){Ro[this.storageKey]=Object.assign(Object.assign({},Ro[this.storageKey]),{jwks:e})}get jwks_cached_at(){var e,n;return(n=(e=Ro[this.storageKey])===null||e===void 0?void 0:e.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(e){Ro[this.storageKey]=Object.assign(Object.assign({},Ro[this.storageKey]),{cachedAt:e})}constructor(e){var n,r,s;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.lastRefreshFailure=null,this._sessionRemovalEpoch=0,this.initializePromise=null,this._pendingInitNotifications=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lock=null,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const i=Object.assign(Object.assign({},ZF),e);if(this.storageKey=i.storageKey,this.instanceID=(n=Uc.nextInstanceID[this.storageKey])!==null&&n!==void 0?n:0,Uc.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!i.debug,typeof i.debug=="function"&&(this.logger=i.debug),this.instanceID>0&&pt()){const o=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(o),this.logDebugMessages&&console.trace(o)}if(this.persistSession=i.persistSession,this.autoRefreshToken=i.autoRefreshToken,this.experimental=(r=i.experimental)!==null&&r!==void 0?r:{},this.admin=new zF({url:i.url,headers:i.headers,fetch:i.fetch,experimental:this.experimental}),this.url=i.url,this.headers=i.headers,this.fetch=CA(i.fetch),this.detectSessionInUrl=i.detectSessionInUrl,this.flowType=i.flowType,this.hasCustomAuthorizationHeader=i.hasCustomAuthorizationHeader,this.throwOnError=i.throwOnError,this.lockAcquireTimeout=i.lockAcquireTimeout,i.lock!=null&&(this.lock=i.lock),this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new XF(this)}
445,this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.passkey={startRegistration:this._startPasskeyRegistration.bind(this),verifyRegistration:this._verifyPasskeyRegistration.bind(this),startAuthentication:this._startPasskeyAuthentication.bind(this),verifyAuthentication:this._verifyPasskeyAuthentication.bind(this),list:this._listPasskeys.bind(this),update:this._updatePasskey.bind(this),delete:this._deletePasskey.bind(this)},this.persistSession?(i.storage?this.storage=i.storage:SA()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=O1(this.memoryStorage)),i.userStorage&&(this.userStorage=i.userStorage)):(this.memoryStorage={},this.storage=O1(this.memoryStorage)),pt()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(o){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",o)}(s=this.broadcastChannel)===null||s===void 0||s.addEventListener("message",async o=>{this._debug("received broadcast notification from other tab or client",o),(o.data.event==="TOKEN_REFRESHED"||o.data.event==="SIGNED_IN")&&(this.lastRefreshFailure=null);try{await this._notifyAllSubscribers(o.data.event,o.data.session,!1)}catch(a){this._debug("#broadcastChannel","error",a)}})}i.skipAutoInitialize||this.initialize().catch(o=>{this._debug("#initialize()","error",o)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(e){if(this.throwOnError&&e&&e.error)throw e.error;return e}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${xA}) ${new Date().toISOString()}`}_debug(...e){return this.logDebugMessages&&this.logger(this._logPrefix(),...e),this}async initialize(){var e;if(this.initializePromise)return await this.initializePromise;this._pendingInitNotifications=[],this.initializePromise=(async()=>this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()):await this._initialize())();const n=await this.initializePromise,r=(e=this._pendingInitNotifications)!==null&&e!==void 0?e:[];this._pendingInitNotifications=null;for(const s of r)await this._notifyAllSubscribers(s.event,s.session,s.broadcast);return n}async _initialize(){var e;try{let n={},r="none";if(pt()&&(n=T1(window.location.href),this._isImplicitGrantCallback(n)?r="implicit":await this._isPKCECallback(n)&&(r="pkce")),pt()&&this.detectSessionInUrl&&r!=="none"){const{data:s,error:i}=await this._getSessionFromURL(n,r);if(i){if(this._debug("#_initialize()","error detecting session from URL",i),sF(i)){const l=(e=i.details)===null||e===void 0?void 0:e.code;if(l==="identity_already_exists"||l==="identity_not_found"||l==="single_identity_not_deletable")return{error:i}}return{error:i}}const{session:o,redirectType:a}=s;return this._debug("#_initialize()","detected session in URL",o,"redirect type",a),await this._saveSession(o),setTimeout(async()=>{a==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",o):await this._notifyAllSubscribers("SIGNED_IN",o)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(n){return $(n)?this._returnResult({error:n}):this._returnResult({error:new Kn("Unexpected error during initialization",n)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var n,r,s;try{const i=await K(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(r=(n=e==null?void 0:e.options)===null||n===void 0?void 0:n.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:(s=e==null?void 0:e.options)===null||s===void 0?void 0:s.captchaToken}},xform:vn}),{data:o,error:a}=i;if(a||!o)return this._returnResult({data:{user:null,session:null},error:a});const l=o.session,c=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(i){if($(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signUp(e){var n,r,s;let i=null;try{let o;if("email"in e){const{email:h,password:p,options:f}=e;let g=null,m=null;this.flowType==="pkce"&&([g,m,i]=await this._getCodeChallengeAndMethod()),o=await K(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:this._maybeAppendFlowIdToRedirect(f==null?void 0:f.emailRedirectTo,i),body:{email:h,password:p,data:(n=f==null?void 0:f.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken},code_challenge:g,code_challenge_method:m},xform:vn})}else if("phone"in e){const{phone:h,password:p,options:f}=e;o=await K(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:h,password:p,data:(r=f==null?void 0:f.data)!==null&&r!==void 0?r:{},channel:(s=f==null?void 0:f.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken}},xform:vn})}else throw new Zu("You must provide either an email or phone number and a password");const{data:a,error:l}=o;if(l||!a)return await $n(this.storage,this.storageKey,i),this._returnResult({data:{user:null,session:null},error:l});const c=a.session,u=a.user;return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(o){if(await $n(this.storage,this.storageKey,i),$(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signInWithPassword(e){try{let n;if("email"in e){const{email:i,password:o,options:a}=e;n=await K(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:i,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:_1})}else if("phone"in e){const{phone:i,password:o,options:a}=e;n=await K(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:i,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:_1})}else throw new Zu("You must provide either an email or phone number and a password");const{data:r,error:s}=n;if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!r||!r.session||!r.user){const i=new Oo;return this._returnResult({data:{user:null,session:null},error:i})}return r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),this._returnResult({data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:s})}catch(n){if($(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOAuth(e){var n,r,s,i;return await this._handleProviderSignIn(e.provider,{redirectTo:(n=e.options)===null||n===void 0?void 0:n.redirectTo,scopes:(r=e.options)===null||r===void 0?void 0:r.scopes,queryParams:(s=e.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(i=e.options)===null||i===void 0?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(e,n){return await this.initializePromise,this.lock!=null?this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(e,n)):this._exchangeCodeForSession(e,n)}async signInWithWeb3(e){const{chain:n}=e;switch(n){case"ethereum":return await this.signInWithEthereum(e);case"solana":return await this.signInWithSolana(e);default:throw new Error(`@supabase/auth-js: Unsupported chain "${n}"`)}}async signInWithEthereum(e){var n,r,s,i,o,a,l,c,u,h,p;let f,g;if("message"in e)f=e.message,g=e.signature;else{const{chain:m,wallet:y,statement:v,options:b}=e;let x;if(pt())if(typeof y=="object")x=y;else{const N=window;if("ethereum"in N&&typeof N.ethereum=="object"&&"request"in N.ethereum&&typeof N.ethereum.request=="function")x=N.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof y!="object"||!(b!=null&&b.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");x=y}const k=new URL((n=b==null?void 0:b.url)!==null&&n!==void 0?n:window.location.href),S=await x.request({method:"eth_requestAccounts"}).then(N=>N).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!S||S.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const C=TA(S[0]);let E=(r=b==null?void 0:b.signInWithEthereum)===null||r===void 0?void 0:r.chainId;if(!E){const N=await x.request({method:"eth_chainId"});E=WF(N)}const T={domain:k.host,address:C,statement:v,uri:k.href,version:"1",chainId:E,nonce:(s=b==null?void 0:b.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(o=(i=b==null?void 0:b.signInWithEthereum)===null||i===void 0?void 0:i.issuedAt)!==null&&o!==void 0?o:new Date,expirationTime:(a=b==null?void 0:b.signInWithEthereum)===null||a===void 0?void 0:a.expirationTime,notBefore:(l=b==null?void 0:b.signInWithEthereum)===null||l===void 0?void 0:l.notBefore,requestId:(c=b==null?void 0:b.signInWithEthereum)===null||c===void 0?void 0:c.requestId,resources:(u=b==null?void 0:b.signInWithEthereum)===null||u===void 0?void 0:u.resources};f=UF(T),g=await x.request({method:"personal_sign",params:[HF(f),C]})}try{const{data:m,error:y}=await K(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:f,signature:g}
445,!((h=e.options)===null||h===void 0)&&h.captchaToken?{gotrue_meta_security:{captcha_token:(p=e.options)===null||p===void 0?void 0:p.captchaToken}}:null),xform:vn});if(y)throw y;if(!m||!m.session||!m.user){const v=new Oo;return this._returnResult({data:{user:null,session:null},error:v})}return m.session&&(await this._saveSession(m.session),await this._notifyAllSubscribers("SIGNED_IN",m.session)),this._returnResult({data:Object.assign({},m),error:y})}catch(m){if($(m))return this._returnResult({data:{user:null,session:null},error:m});throw m}}async signInWithSolana(e){var n,r,s,i,o,a,l,c,u,h,p,f;let g,m;if("message"in e)g=e.message,m=e.signature;else{const{chain:y,wallet:v,statement:b,options:x}=e;let k;if(pt())if(typeof v=="object")k=v;else{const C=window;if("solana"in C&&typeof C.solana=="object"&&("signIn"in C.solana&&typeof C.solana.signIn=="function"||"signMessage"in C.solana&&typeof C.solana.signMessage=="function"))k=C.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof v!="object"||!(x!=null&&x.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");k=v}const S=new URL((n=x==null?void 0:x.url)!==null&&n!==void 0?n:window.location.href);
445if("signIn"in k&&k.signIn){const C=await k.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},x==null?void 0:x.signInWithSolana),{version:"1",domain:S.host,uri:S.href}),b?{statement:b}:null));let E;if(Array.isArray(C)&&C[0]&&typeof C[0]=="object")E=C[0];else if(C&&typeof C=="object"&&"signedMessage"in C&&"signature"in C)E=C;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in E&&"signature"in E&&(typeof E.signedMessage=="string"||E.signedMessage instanceof Uint8Array)&&E.signature instanceof Uint8Array)g=typeof E.signedMessage=="string"?E.signedMessage:new TextDecoder().decode(E.signedMessage),m=E.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in k)||typeof k.signMessage!="function"||!("publicKey"in k)||typeof k!="object"||!k.publicKey||!("toBase58"in k.publicKey)||typeof k.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");g=[`${S.host} wants you to sign in with your Solana account:`,k.publicKey.toBase58(),...b?["",b,""]:[""],"Version: 1",`URI: ${S.href}`,`Issued At: ${(s=(r=x==null?void 0:x.signInWithSolana)===null||r===void 0?void 0:r.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((i=x==null?void 0:x.signInWithSolana)===null||i===void 0)&&i.notBefore?[`Not Before: ${x.signInWithSolana.notBefore}`]:[],...!((o=x==null?void 0:x.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${x.signInWithSolana.expirationTime}`]:[],...!((a=x==null?void 0:x.signInWithSolana)===null||a===void 0)&&a.chainId?[`Chain ID: ${x.signInWithSolana.chainId}`]:[],...!((l=x==null?void 0:x.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${x.signInWithSolana.nonce}`]:[],...!((c=x==null?void 0:x.signInWithSolana)===null||c===void 0)&&c.requestId?[`Request ID: ${x.signInWithSolana.requestId}`]:[],...!((h=(u=x==null?void 0:x.signInWithSolana)===null||u===void 0?void 0:u.resources)===null||h===void 0)&&h.length?["Resources",...x.signInWithSolana.resources.map(E=>`- ${E}`)]:[]].join(` 446`);const C=await k.signMessage(new TextEncoder().encode(g),"utf8");if(!C||!(C instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");m=C}}try{const{data:y,error:v}=await K(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:g,signature:Ii(m)},!((p=e.options)===null||p===void 0)&&p.captchaToken?{gotrue_meta_security:{captcha_token:(f=e.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:vn});if(v)throw v;if(!y||!y.session||!y.user){const b=new Oo;return this._returnResult({data:{user:null,session:null},error:b})}return y.session&&(await this._saveSession(y.session),await this._notifyAllSubscribers("SIGNED_IN",y.session)),this._returnResult({data:Object.assign({},y),error:v})}catch(y){if($(y))return this._returnResult({data:{user:null,session:null},error:y});throw y}}async _exchangeCodeForSession(e,n){const r=(n==null?void 0:n.flowId)!=null,s=r?Wd(n==null?void 0:n.flowId):pt()?Wd(T1(window.location.href)[Pi]):null;r&&!s&&this._debug("#_exchangeCodeForSession()","provided flowId is not a valid flow id",n==null?void 0:n.flowId);const{verifier:i,flowId:o}=r&&!s?{verifier:null,flowId:null}:await SF(this.storage,this.storageKey,s),[a,l]=(i??"").split("/");try{if(!a&&this.flowType==="pkce")throw new iF;const{data:c,error:u}=await K(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:a},xform:vn});if(await $n(this.storage,this.storageKey,o),u)throw u;if(!c||!c.session||!c.user){const h=new Oo;return this._returnResult({data:{user:null,session:null,redirectType:null},error:h})}return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers(l==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",c.session)),this._returnResult({data:Object.assign(Object.assign({},c),{redirectType:l??null}),error:u})}catch(c){if(await $n(this.storage,this.storageKey,o),$(c))return this._returnResult({data:{user:null,session:null,redirectType:null},error:c});throw c}}async signInWithIdToken(e){try{const{options:n,provider:r,token:s,access_token:i,nonce:o}=e,a=await K(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:s,access_token:i,nonce:o,gotrue_meta_security:{captcha_token:n==null?void 0:n.captchaToken}},xform:vn}),{data:l,error:c}=a;if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!l||!l.session||!l.user){const u=new Oo;return this._returnResult({data:{user:null,session:null},error:u})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),this._returnResult({data:l,error:c})}catch(n){if($(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOtp(e){var n,r,s,i,o;let a=null;try{if("email"in e){const{email:l,options:c}=e;let u=null,h=null;this.flowType==="pkce"&&([u,h,a]=await this._getCodeChallengeAndMethod());const{error:p}=await K(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:l,data:(n=c==null?void 0:c.data)!==null&&n!==void 0?n:{},create_user:(r=c==null?void 0:c.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},code_challenge:u,code_challenge_method:h},redirectTo:this._maybeAppendFlowIdToRedirect(c==null?void 0:c.emailRedirectTo,a)});return this._returnResult({data:{user:null,session:null},error:p})}if("phone"in e){const{phone:l,options:c}=e,{data:u,error:h}=await K(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:l,data:(s=c==null?void 0:c.data)!==null&&s!==void 0?s:{},create_user:(i=c==null?void 0:c.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},channel:(o=c==null?void 0:c.channel)!==null&&o!==void 0?o:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:h})}throw new Zu("You must provide either an email or phone number.")}catch(l){if(await $n(this.storage,this.storageKey,a),$(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}}async verifyOtp(e){var n,r;try{let s,i;"options"in e&&(s=(n=e.options)===null||n===void 0?void 0:n.redirectTo,i=(r=e.options)===null||r===void 0?void 0:r.captchaToken);const{data:o,error:a}=await K(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:i}}),redirectTo:s,xform:vn});if(a)throw a;if(!o)throw new Error("An error occurred on token verification.");const l=o.session,c=o.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(s){if($(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(e){var n,r,s,i;let o=null;try{let a=null,l=null;this.flowType==="pkce"&&([a,l,o]=await this._getCodeChallengeAndMethod());const c=await K(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:this._maybeAppendFlowIdToRedirect((n=e.options)===null||n===void 0?void 0:n.redirectTo,o)}),!((r=e==null?void 0:e.options)===null||r===void 0)&&r.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:a,code_challenge_method:l}),headers:this.headers,xform:LF});return!((s=c.data)===null||s===void 0)&&s.url&&pt()&&!(!((i=e.options)===null||i===void 0)&&i.skipBrowserRedirect)&&window.location.assign(c.data.url),this._returnResult(c)}catch(a){if(await $n(this.storage,this.storageKey,o),$(a))return this._returnResult({data:null,error:a});throw a}}async reauthenticate(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate()):await this._reauthenticate()}async _reauthenticate(){try{return await this._useSession(async e=>{const{data:{session:n},error:r}=e;if(r)throw r;if(!n)throw new lt;const{error:s}=await K(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return this._returnResult({data:{user:null,session:null},error:s})})}catch(e){if($(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async resend(e){let n=null;try{const r=`${this.url}/resend`;if("email"in e){const{email:s,type:i,options:o}=e;let a=null,l=null;this.flowType==="pkce"&&([a,l,n]=await this._getCodeChallengeAndMethod());const{error:c}=await K(this.fetch,"POST",r,{headers:this.headers,body:{email:s,type:i,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken},code_challenge:a,code_challenge_method:l},redirectTo:this._maybeAppendFlowIdToRedirect(o==null?void 0:o.emailRedirectTo,n)});return c&&await $n(this.storage,this.storageKey,n),this._returnResult({data:{user:null,session:null},error:c})}else if("phone"in e){const{phone:s,type:i,options:o}=e,{data:a,error:l}=await K(this.fetch,"POST",r,{headers:this.headers,body:{phone:s,type:i,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:a==null?void 0:a.message_id},error:l})}throw new Zu("You must provide either an email or phone number and a type")}catch(r){if(await $n(this.storage,this.storageKey,n),$(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async getSession(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async e=>e)):await this._useSession(async e=>e)}async _acquireLock(e,n){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){const r=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await r,await n()))();return this.pendingInLock.push((async()=>{try{await s}catch{}})()),s}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const r=n();for(this.pendingInLock.push((async()=>{try{await r}catch{}})()),await r;this.pendingInLock.length;){const s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await r}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(e){this._debug("#_useSession","begin");try{const n=await this.__loadSession();return await e(n)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lock!=null&&!this.lockAcquired&&this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let e=null;const n=await At(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?e=n:(this._debug("#getSession()","session from storage is not val
446id"),await this._removeSession())),!e)return{data:{session:null},error:null};const r=e.expires_at?e.expires_at*1e3-Date.now()<Cm:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",e.expires_at),!r){if(this.userStorage){const o=await At(this.userStorage,this.storageKey+"-user");o!=null&&o.user?e.user=o.user:e.user=Em()}if(this.storage.isServer&&e.user&&!e.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};e.user=RF(e.user,o),o.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:e},error:null}}const{data:s,error:i}=await this._callRefreshToken(e.refresh_token);if(i){if(!!(e.expires_at&&e.expires_at*1e3>Date.now())){const a=await At(this.storage,this.storageKey);if(a&&a.refresh_token===e.refresh_token)return this._returnResult({data:{session:e},error:null})}return this._returnResult({data:{session:null},error:i})}return this._returnResult({data:{session:s},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(e){if(e)return await this._getUser(e);await this.initializePromise;let n;return this.lock!=null?n=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser()):n=await this._getUser(),n.data.user&&(this.suppressGetSessionWarning=!0),n}async _getUser(e){try{return e?await K(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:As}):await this._useSession(async n=>{var r,s,i;const{data:o,error:a}=n;if(a)throw a;return!(!((r=o.session)===null||r===void 0)&&r.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new lt}:await K(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(i=(s=o.session)===null||s===void 0?void 0:s.access_token)!==null&&i!==void 0?i:void 0,xform:As})})}catch(n){if($(n))return Xu(n)&&await this._removeSession(),this._returnResult({data:{user:null},error:n});throw n}}async updateUser(e,n={}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(e,n)):await this._updateUser(e,n)}async _updateUser(e,n={}){let r=null;try{return await this._useSession(async s=>{const{data:i,error:o}=s;if(o)throw o;if(!i.session)throw new lt;const a=i.session;let l=null,c=null;this.flowType==="pkce"&&e.email!=null&&([l,c,r]=await this._getCodeChallengeAndMethod());const{data:u,error:h}=await K(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:this._maybeAppendFlowIdToRedirect(n==null?void 0:n.emailRedirectTo,r),body:Object.assign(Object.assign({},e),{code_challenge:l,code_challenge_method:c}),jwt:a.access_token,xform:As});if(h)throw h;return a.user=u.user,await this._saveSession(a),await this._notifyAllSubscribers("USER_UPDATED",a),this._returnResult({data:{user:a.user},error:null})})}catch(s){if(await $n(this.storage,this.storageKey,r),$(s))return this._returnResult({data:{user:null},error:s});throw s}}async setSession(e){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(e)):await this._setSession(e)}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new lt;const n=Date.now()/1e3;let r=n,s=!0,i=null;const{payload:o}=nd(e.access_token);if(o.exp&&(r=o.exp,s=r<=n),s){const{data:a,error:l}=await this._callRefreshToken(e.refresh_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!a)return{data:{user:null,session:null},error:null};i=a}else{const{data:a,error:l}=await this._getUser(e.access_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});i={access_token:e.access_token,refresh_token:e.refresh_token,user:a.user,token_type:"bearer",expires_in:r-n,expires_at:r},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return this._returnResult({data:{user:i.user,session:i},error:null})}catch(n){if($(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}}async refreshSession(e){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(e)):await this._refreshSession(e)}async _refreshSession(e){try{return await this._useSession(async n=>{var r;if(!e){const{data:o,error:a}=n;
446if(a)throw a;e=(r=o.session)!==null&&r!==void 0?r:void 0}if(!(e!=null&&e.refresh_token))throw new lt;const{data:s,error:i}=await this._callRefreshToken(e.refresh_token);return i?this._returnResult({data:{user:null,session:null},error:i}):s?this._returnResult({data:{user:s.user,session:s},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(n){if($(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async _getSessionFromURL(e,n){var r;try{if(!pt())throw new ed("No browser detected.");if(e.error||e.error_description||e.error_code)throw new ed(e.error_description||"Error in URL with unspecified error_description",{error:e.error||"unspecified_error",code:e.error_code||"unspecified_code"});switch(n){case"implicit":if(this.flowType==="pkce")throw new x1("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new ed("Not a valid implicit grant flow url.");break;default:}if(n==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!e.code)throw new x1("No code detected.");const{data:x,error:k}=await this._exchangeCodeForSession(e.code,{flowId:e[Pi]});if(k)throw k;const S=new URL(window.location.href);return S.searchParams.delete("code"),S.searchParams.delete(Pi),window.history.replaceState(window.history.state,"",S.toString()),{data:{session:x.session,redirectType:(r=x.redirectType)!==null&&r!==void 0?r:null},error:null}}const{provider_token:s,provider_refresh_token:i,access_token:o,refresh_token:a,expires_in:l,expires_at:c,token_type:u}=e;if(!o||!l||!a||!u)throw new ed("No session defined in URL");const h=Math.round(Date.now()/1e3),p=parseInt(l);let f=h+p;c&&(f=parseInt(c));const g=f-h;g*1e3<=Fr&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${g}s, should have been closer to ${p}s`);const m=f-p;h-m>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",m,f,h):h-m<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",m,f,h);const{data:y,error:v}=await this._getUser(o);if(v)throw v;const b={provider_token:s,provider_refresh_token:i,access_token:o,expires_in:p,expires_at:f,refresh_token:a,token_type:u,user:y.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:b,redirectType:e.type},error:null})}catch(s){if($(s))return this._returnResult({data:{session:null,redirectType:null},error:s});throw s}}_isImplicitGrantCallback(e){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),e):!!(e.access_token||e.error||e.error_description||e.error_code)}async _isPKCECallback(e){if(!e.code)return!1;const n=Wd(e[Pi]);return n&&await At(this.storage,Ia(this.storageKey,n))?!0:!!await At(this.storage,`${this.storageKey}-code-verifier`)}async signOut(e={scope:"global"}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(e)):await this._signOut(e)}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async n=>{var r;const s=async()=>{await this._removeSession()},{data:i,error:o}=n;if(o&&!Xu(o))return this._returnResult({error:o});const a=(r=i.session)===null||r===void 0?void 0:r.access_token;if(a){const{error:l}=await this.admin.signOut(a,e);if(l&&!(b1(l)&&(l.status===404||l.status===401||l.status===403)||Xu(l)))return e!=="others"&&await s(),this._returnResult({error:l})}return e!=="others"&&await s(),this._returnResult({error:null})})}
446onAuthStateChange(e){const n=fF(),r={id:n,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",n),this.stateChangeEmitters.delete(n)}};return this._debug("#onAuthStateChange()","registered callback with id",n),this.stateChangeEmitters.set(n,r),(async()=>(await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(n)}):await this._emitInitialSession(n)))(),{data:{subscription:r}}}async _emitInitialSession(e){return await this._useSession(async n=>{var r,s;try{const{data:{session:i},error:o}=n;if(o)throw o;await((r=this.stateChangeEmitters.get(e))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",i)),this._debug("INITIAL_SESSION","callback id",e,"session",i)}catch(i){await((s=this.stateChangeEmitters.get(e))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",i),Xu(i)||td(i)||b1(i)&&(i.code==="refresh_token_not_found"||i.code==="refresh_token_already_used"||i.code==="session_expired")?console.warn(i):console.error(i)}})}async resetPasswordForEmail(e,n={}){let r=null,s=null,i=null;this.flowType==="pkce"&&([r,s,i]=await this._getCodeChallengeAndMethod(!0));try{return await K(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:r,code_challenge_method:s,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:this._maybeAppendFlowIdToRedirect(n.redirectTo,i)})}catch(o){if(await $n(this.storage,this.storageKey,i),$(o))return this._returnResult({data:null,error:o});throw o}}async getUserIdentities(){var e;try{const{data:n,error:r}=await this.getUser();if(r)throw r;return this._returnResult({data:{identities:(e=n.user.identities)!==null&&e!==void 0?e:[]},error:null})}catch(n){if($(n))return this._returnResult({data:null,error:n});throw n}}async linkIdentity(e){return"token"in e?this.linkIdentityIdToken(e):this.linkIdentityOAuth(e)}async linkIdentityOAuth(e){var n;let r=null;try{const{data:s,error:i}=await this._useSession(async o=>{var a,l,c,u,h;const{data:p,error:f}=o;if(f)throw f;const{url:g,flowId:m}=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(a=e.options)===null||a===void 0?void 0:a.redirectTo,scopes:(l=e.options)===null||l===void 0?void 0:l.scopes,queryParams:(c=e.options)===null||c===void 0?void 0:c.queryParams,skipBrowserRedirect:!0});return r=m,await K(this.fetch,"GET",g,{headers:this.headers,jwt:(h=(u=p.session)===null||u===void 0?void 0:u.access_token)!==null&&h!==void 0?h:void 0})});if(i)throw i;return pt()&&!(!((n=e.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(s==null?void 0:s.url),this._returnResult({data:{provider:e.provider,url:s==null?void 0:s.url,flowId:r},error:null})}catch(s){if($(s))return this._returnResult({data:{provider:e.provider,url:null,flowId:r},error:s});throw s}}async linkIdentityIdToken(e){return await this._useSession(async n=>{var r;try{const{error:s,data:{session:i}}=n;if(s)throw s;const{options:o,provider:a,token:l,access_token:c,nonce:u}=e,h=await K(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(r=i==null?void 0:i.access_token)!==null&&r!==void 0?r:void 0,body:{provider:a,id_token:l,access_token:c,nonce:u,link_identity:!0,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:vn}),{data:p,error:f}=h;return f?this._returnResult({data:{user:null,session:null},error:f}):!p||!p.session||!p.user?this._returnResult({data:{user:null,session:null},error:new Oo}):(p.session&&(await this._saveSession(p.session),await this._notifyAllSubscribers("USER_UPDATED",p.session)),this._returnResult({data:p,error:f}))}catch(s){if(await $n(this.storage,this.storageKey,null),$(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}async unlinkIdentity(e){try{return await this._useSession(async n=>{var r,s;const{data:i,error:o}=n;if(o)throw o;return await K(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:(s=(r=i.session)===null||r===void 0?void 0:r.access_token)!==null&&s!==void 0?s:void 0})})}catch(n){if($(n))return this._returnResult({data:null,error:n});throw n}}async _refreshAccessToken(e){const n="#_refreshAccessToken()";this._debug(n,"begin");try{const r=Date.now();return await gF(async s=>(s>
4460&&await mF(200*Math.pow(2,s-1)),this._debug(n,"refreshing attempt",s),await K(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:vn})),(s,i)=>{const o=200*Math.pow(2,s);return i&&td(i)&&Date.now()+o-r<Fr})}catch(r){if(this._debug(n,"error",r),$(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}finally{this._debug(n,"end")}}_isValidSession(e){return typeof e=="object"&&e!==null&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,n){const{url:r,flowId:s}=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:n.redirectTo,scopes:n.scopes,queryParams:n.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",n,"url",r),pt()&&!n.skipBrowserRedirect&&window.location.assign(r),{data:{provider:e,url:r,flowId:s},error:null}}async _recoverAndRefresh(){var e,n;const r="#_recoverAndRefresh()";this._debug(r,"begin");try{const s=await At(this.storage,this.storageKey);if(s&&this.userStorage){let o=await At(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:s.user},await Vr(this.userStorage,this.storageKey+"-user",o)),s.user=(e=o==null?void 0:o.user)!==null&&e!==void 0?e:Em()}else if(s&&!s.user&&!s.user){const o=await At(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(s.user=o.user,await Kt(this.storage,this.storageKey+"-user"),await Vr(this.storage,this.storageKey,s)):s.user=Em()}if(this._debug(r,"session from storage",s),!this._isValidSession(s)){this._debug(r,"session is not valid"),s!==null&&await this._removeSession();return}const i=((n=s.expires_at)!==null&&n!==void 0?n:1/0)*1e3-Date.now()<Cm;if(this._debug(r,`session has${i?"":" not"} expired with margin of ${Cm}s`),i){if(this.autoRefreshToken&&s.refresh_token){const{error:o}=await this._callRefreshToken(s.refresh_token);o&&(oF(o)?this._debug(r,"refresh discarded by commit guard",o):this._debug(r,"refresh failed",o))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:o,error:a}=await this._getUser(s.access_token);!a&&(o!=null&&o.user)?(s.user=o.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):this._debug(r,"could not get user data, skipping SIGNED_IN notification")}catch(o){console.error("Error getting user data:",o),this._debug(r,"error getting user data, skipping SIGNED_IN notification",o)}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(s){this._debug(r,"error",s),td(s)?console.warn(s):console.error(s);return}finally{this._debug(r,"end")}}async _callRefreshToken(e){var n,r;if(!e)throw new lt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;if(this.lastRefreshFailure&&this.lastRefreshFailure.refreshToken===e&&Date.now()<this.lastRefreshFailure.expiresAt)return this._debug("#_callRefreshToken()","returning cached failure (cooldown active)"),this.lastRefreshFailure.result;const s="#_callRefreshToken()";this._debug(s,"begin");try{this.refreshingDeferred=new pp;const i=await At(this.storage,this.storageKey),{data:o,error:a}=await this._refreshAccessToken(e);if(a)throw a;if(!o.session)throw new lt;const l=await At(this.storage,this.storageKey);if(i!==null&&(l===null||l.refresh_token!==i.refresh_token)){this._debug(s,"commit guard: storage changed since refresh started, discarding rotated tokens",{startedWith:"present",nowHolds:l?"replaced":"cleared"});const p={data:null,error:new w1};return this.refreshingDeferred.resolve(p),p}const u=this._sessionRemovalEpoch;if(await this._saveSession(o.session),this._sessionRemovalEpoch!==u){this._debug(s,"commit guard (post-save): _removeSession ran during _saveSession, undoing write"),await Kt(this.storage,this.storageKey),this.userStorage&&await Kt(this.userStorage,this.storageKey+"-user");const p={data:null,error:new w1};return this.refreshingDeferred.resolve(p),p}await this._notifyAllSubscribers("TOKEN_REFRESHED",o.session);const h={data:o.session,error:null};return this.lastRefreshFailure=null,this.refreshingDeferred.resolve(h),h}catch(i){if(this._debug(s,"error",i),$(i)){const o={data:null,error:i};if(!td(i)){const a=await At(this.storage,this.storageKey);!!(a!=null&&a.expires_at&&a.expires_at*1e3>Date.now())?this._debug(s,"proactive refresh failed, access token still valid â preserving session"):await this._removeSession()}return this.lastRefreshFailure={refreshToken:e,result:o,expiresAt:Date.now()+JB},(n=this.refreshingDeferred)===null||n===void 0||n.resolve(o),o}throw(r=this.refreshingDeferred)===null||r===void 0||r.reject(i),i}finally{this.refreshingDeferred=null,this._debug(s,"end")}}
446async _notifyAllSubscribers(e,n,r=!0){if(this._pendingInitNotifications!==null&&r){this._pendingInitNotifications.push({event:e,session:n,broadcast:r});return}const s=`#_notifyAllSubscribers(${e})`;this._debug(s,"begin",n,`broadcast = ${r}`);try{this.broadcastChannel&&r&&this.broadcastChannel.postMessage({event:e,session:n});const i=[],o=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(e,n)}catch(l){i.push(l)}});if(await Promise.all(o),i.length>0){for(let a=0;a<i.length;a+=1)console.error(i[a]);throw i[0]}}finally{this._debug(s,"end")}}async _saveSession(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0;const n=Object.assign({},e),r=n.user&&n.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!r&&n.user&&await Vr(this.userStorage,this.storageKey+"-user",{user:n.user});const s=Object.assign({},n);delete s.user;const i=N1(s);await Vr(this.storage,this.storageKey,i)}else{const s=N1(n);await Vr(this.storage,this.storageKey,s)}}async _removeSession(){this._sessionRemovalEpoch+=1,this._debug("#_removeSession()"),this.lastRefreshFailure=null,this.suppressGetSessionWarning=!1,await Kt(this.storage,this.storageKey),await CF(this.storage,this.storageKey),await Kt(this.storage,this.storageKey+"-user"),this.userStorage&&await Kt(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&pt()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",e)}catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const e=setInterval(()=>this._autoRefreshTokenTick(),Fr);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e);const n=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=n,n&&typeof n=="object"&&typeof n.unref=="function"?n.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(n)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e);const n=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,n&&clearTimeout(n)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async dispose(){var e;this._removeVisibilityChangedCallback(),await this._stopAutoRefresh(),(e=this.broadcastChannel)===null||e===void 0||e.close(),this.broadcastChannel=null,this.stateChangeEmitters.clear()}async _autoRefreshTokenTick(){if(this._debug("#_autoRefreshTokenTick()","begin"),this.lock!=null){try{await this._acquireLock(0,async()=>{try{const e=Date.now();try{return await this._useSession(async n=>{const{data:{session:r}}=n;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((r.expires_at*1e3-e)/Fr);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${Fr}ms, refresh threshold is ${Rl} ticks`),s<=Rl&&await this._callRefreshToken(r.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(e){if(e instanceof BF)this._debug("auto refresh token tick lock not available");else throw e}return}if(this.refreshingDeferred!==null){this._debug("#_autoRefreshTokenTick()","refresh already in flight, skipping");return}try{const e=Date.now();try{await this._useSession(async n=>{const{data:{session:r}}=n;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((r.expires_at*1e3-e)/Fr);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${Fr}ms, refresh threshold is ${Rl} ticks`),s<=Rl&&await this._callRefreshToken(r.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!pt()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(e){this._debug("#visibilityChangedCallback","error",e)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){const n=`#_onVisibilityChanged(${e})`;if(this._debug(n,"visibilityState",document.visibilityState),document.visibilityState==="visible"){if(this.autoRefreshToken&&this._startAutoRefresh(),!e)if(await this.initializePromise,this.lock!=null)await this._acquireLock(this.lockAcquireTimeout,async()=>
446{if(document.visibilityState!=="visible"){this._debug(n,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()});else{if(document.visibilityState!=="visible"){this._debug(n,"visibilityState is no longer visible, skipping recovery");return}await this._recoverAndRefresh()}}else document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(e,n,r){let s=r==null?void 0:r.redirectTo,i=null,o=null,a=null;this.flowType==="pkce"&&([i,o,a]=await this._getCodeChallengeAndMethod(),s=this._maybeAppendFlowIdToRedirect(s,a));const l=[`provider=${encodeURIComponent(n)}`];if(s&&l.push(`redirect_to=${encodeURIComponent(s)}`),r!=null&&r.scopes&&l.push(`scopes=${encodeURIComponent(r.scopes)}`),i!=null&&o!=null){const c=new URLSearchParams({code_challenge:`${encodeURIComponent(i)}`,code_challenge_method:`${encodeURIComponent(o)}`});l.push(c.toString())}if(r!=null&&r.queryParams){const c=new URLSearchParams(r.queryParams);l.push(c.toString())}return r!=null&&r.skipBrowserRedirect&&l.push(`skip_http_redirect=${r.skipBrowserRedirect}`),{url:`${e}?${l.join("&")}`,flowId:a}}_maybeAppendFlowIdToRedirect(e,n){return!e||!n||!this.experimental.appendPkceFlowIdToRedirects?e??void 0:EF(e,n)}async _getCodeChallengeAndMethod(e=!1){return TF(this.storage,this.storageKey,e,n=>this._debug("#_getCodeChallengeAndMethod()","evicted oldest pending PKCE verifier slot",n))}async _unenroll(e){try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;return i?this._returnResult({data:null,error:i}):await K(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if($(n))return this._returnResult({data:null,error:n});throw n}}async _enroll(e){try{return await this._useSession(async n=>{var r,s;const{data:i,error:o}=n;if(o)return this._returnResult({data:null,error:o});const a=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType==="phone"?{phone:e.phone}:e.factorType==="totp"?{issuer:e.issuer}:{}),{data:l,error:c}=await K(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token});return c?this._returnResult({data:null,error:c}):(e.factorType==="totp"&&l.type==="totp"&&(!((s=l==null?void 0:l.totp)===null||s===void 0)&&s.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),this._returnResult({data:l,error:null}))})}catch(n){if($(n))return this._returnResult({data:null,error:n});throw n}}async _verify(e){const n=async()=>{try{return await this._useSession(async r=>{var s;const{data:i,error:o}=r;if(o)return this._returnResult({data:null,error:o});const a=Object.assign({challenge_id:e.challengeId},"webauthn"in e?{webauthn:Object.assign(Object.assign({},e.webauthn),{credential_response:e.webauthn.type==="create"?P1(e.webauthn.credential_response):I1(e.webauthn.credential_response)})}:{code:e.code}),{data:l,error:c}=await K(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:a,headers:this.headers,jwt:(s=i==null?void 0:i.session)===null||s===void 0?void 0:s.access_token});return c?this._returnResult({data:null,error:c}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+l.expires_in},l)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",l),this._returnResult({data:l,error:c}))})}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,n):n()}async _challenge(e){const n=async()=>{try{return await this._useSession(async r=>{var s;const{data:i,error:o}=r;if(o)return this._returnResult({data:null,error:o});const a=await K(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:e,headers:this.headers,jwt:(s=i==null?void 0:i.session)===null||s===void 0?void 0:s.access_token});if(a.error)return a;const{data:l}=a;if(l.type!=="webauthn")return{data:l,error:null};switch(l.webauthn.type){case"create":return{data:Object.assign(Object.assign({},l),{webauthn:Object.assign(Object.assign({},l.webauthn),{credential_options:Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:R1(l.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},l),{webauthn:Object.assign(Object.assign({},l.webauthn),{credential_options:Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:M1(l.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,n):n()}async _challengeAndVerify(e){const{data:n,error:r}=await this._challenge({factorId:e.factorId});return r?this._returnResult({data:null,error:r}):await this._verify({factorId:e.factorId,challengeId:n.id,code:e.code})}async _listFactors(){var e;const{data:{user:n},error:r}=await this.getUser();if(r)return{data:null,error:r};const s={all:[],phone:[],totp:[],webauthn:[]};for(const i of(e=n==null?void 0:n.factors)!==null&&e!==void 0?e:[])s.all.push(i),i.status==="verified"&&s[i.factor_type].push(i);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(e){var n,r,s,i;if(e)try{const{payload:f}=nd(e);let g=null;f.aal&&(g=f.aal);let m=g;const{data:{user:y},error:v}=await this.getUser(e);if(v)return this._returnResult({data:null,error:v});((r=(n=y==null?void 0:y.factors)===null||n===void 0?void 0:n.filter(k=>k.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(m="aal2");const x=f.amr||[];return{data:{currentLevel:g,nextLevel:m,currentAuthenticationMethods:x},error:null}}catch(f){if($(f))return this._returnResult({data:null,error:f});throw f}const{data:{session:o},error:a}
446=await this.getSession();if(a)return this._returnResult({data:null,error:a});if(!o)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:l}=nd(o.access_token);let c=null;l.aal&&(c=l.aal);let u=c;((i=(s=o.user.factors)===null||s===void 0?void 0:s.filter(f=>f.status==="verified"))!==null&&i!==void 0?i:[]).length>0&&(u="aal2");const p=l.amr||[];return{data:{currentLevel:c,nextLevel:u,currentAuthenticationMethods:p},error:null}}async _getAuthorizationDetails(e){try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;return s?this._returnResult({data:null,error:s}):r?await K(this.fetch,"GET",`${this.url}/oauth/authorizations/${e}`,{headers:this.headers,jwt:r.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new lt})})}catch(n){if($(n))return this._returnResult({data:null,error:n});throw n}}async _approveAuthorization(e,n){try{return await this._useSession(async r=>{const{data:{session:s},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new lt});const o=await K(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&pt()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}}async _denyAuthorization(e,n){try{return await this._useSession(async r=>{const{data:{session:s},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new lt});const o=await K(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&pt()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}}async _listOAuthGrants(){try{return await this._useSession(async e=>{const{data:{session:n},error:r}=e;return r?this._returnResult({data:null,error:r}):n?await K(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,xform:s=>({data:s,error:null})}):this._returnResult({data:null,error:new lt})})}catch(e){if($(e))return this._returnResult({data:null,error:e});throw e}}async _revokeOAuthGrant(e){try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;return s?this._returnResult({data:null,error:s}):r?(await K(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,query:{client_id:e.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new lt})})}catch(n){if($(n))return this._returnResult({data:null,error:n});throw n}}async fetchJwk(e,n={keys:[]}){let r=n.keys.find(a=>a.kid===e);if(r)return r;const s=Date.now();if(r=this.jwks.keys.find(a=>a.kid===e),r&&this.jwks_cached_at+nF>s)return r;const{data:i,error:o}=await K(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(o)throw o;return!i.keys||i.keys.length===0||(this.jwks=i,this.jwks_cached_at=s,r=i.keys.find(a=>a.kid===e),!r)?null:r}async getClaims(e,n={}){try{let r=e;if(!r){const{data:f,error:g}
446=await this.getSession();if(g||!f.session)return this._returnResult({data:null,error:g});r=f.session.access_token}const{header:s,payload:i,signature:o,raw:{header:a,payload:l}}=nd(r);if(!(n!=null&&n.allowExpired))try{_F(i.exp)}catch(f){throw new Rh(f instanceof Error?f.message:"JWT validation failed")}const c=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,n!=null&&n.keys?{keys:n.keys}:n==null?void 0:n.jwks);if(!c){const{error:f}=await this.getUser(r);if(f)throw f;return{data:{claims:i,header:s,signature:o},error:null}}const u=jF(s.alg),h=await crypto.subtle.importKey("jwk",c,u,!0,["verify"]);if(!await crypto.subtle.verify(u,h,o,dF(`${a}.${l}`)))throw new Rh("Invalid JWT signature");return{data:{claims:i,header:s,signature:o},error:null}}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}}async signInWithPasskey(e){var n,r,s;zn(this.experimental);try{if(!Ih())return this._returnResult({data:null,error:new Kn("Browser does not support WebAuthn",null)});const{data:i,error:o}=await this._startPasskeyAuthentication({options:{captchaToken:(n=e==null?void 0:e.options)===null||n===void 0?void 0:n.captchaToken}});if(o||!i)return this._returnResult({data:null,error:o});const a=M1(i.options),l=(s=(r=e==null?void 0:e.options)===null||r===void 0?void 0:r.signal)!==null&&s!==void 0?s:Ly.createNewAbortSignal(),{data:c,error:u}=await _A({publicKey:a,signal:l});if(u||!c)return this._returnResult({data:null,error:u??new Kn("WebAuthn ceremony failed",null)});const h=I1(c);return this._verifyPasskeyAuthentication({challengeId:i.challenge_id,credential:h})}catch(i){if($(i))return this._returnResult({data:null,error:i});throw i}}async registerPasskey(e){var n,r;zn(this.experimental);try{if(!Ih())return this._returnResult({data:null,error:new Kn("Browser does not support WebAuthn",null)});const{data:s,error:i}=await this._startPasskeyRegistration();if(i||!s)return this._returnResult({data:null,error:i});const o=R1(s.options),a=(r=(n=e==null?void 0:e.options)===null||n===void 0?void 0:n.signal)!==null&&r!==void 0?r:Ly.createNewAbortSignal(),{data:l,error:c}=await AA({publicKey:o,signal:a});if(c||!l)return this._returnResult({data:null,error:c??new Kn("WebAuthn ceremony failed",null)});const u=P1(l);return this._verifyPasskeyRegistration({challengeId:s.challenge_id,credential:u})}catch(s){if($(s))return this._returnResult({data:null,error:s});throw s}}async _startPasskeyRegistration(){zn(this.experimental);try{return await this._useSession(async e=>{const{data:{session:n},error:r}=e;if(r)return this._returnResult({data:null,error:r});if(!n)return this._returnResult({data:null,error:new lt});const{data:s,error:i}=await K(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:n.access_token,body:{}});return i?this._returnResult({data:null,error:i}):this._returnResult({data:s,error:null})})}catch(e){if($(e))return this._returnResult({data:null,error:e});throw e}}async _verifyPasskeyRegistration(e){zn(this.experimental);try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;if(s)return this._returnResult({data:null,error:s});if(!r)return this._returnResult({data:null,error:new lt});const{data:i,error:o}=await K(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:r.access_token,body:{challenge_id:e.challengeId,credential:e.credential}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:i,error:null})})}catch(n){if($(n))return this._returnResult({data:null,error:n});throw n}}async _startPasskeyAuthentication(e){var n;zn(this.experimental);try{const{data:r,error:s}=await K(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(n=e==null?void 0:e.options)===null||n===void 0?void 0:n.captchaToken}}});return s?this._returnResult({data:null,error:s}):this._returnResult({data:r,error:null})}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}}async _verifyPasskeyAuthentication(e){zn(this.experimental);try{const{data:n,error:r}=await K(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:e.challengeId,credential:e.credential},xform:vn});return r?this._returnResult({data:null,error:r}):(n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),this._returnResult({data:n,error:null}))}catch(n){if($(n))return this._returnResult({data:null,error:n});throw n}}async _listPasskeys(){zn(this.experimental);try{return await this._useSession(async e=>{const{data:{session:n},error:r}=e;if(r)return this._returnResult({data:null,error:r});if(!n)return this._returnResult({data:null,error:new lt});const{data:s,error:i}=await K(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:n.access_token,xform:o=>({data:o,error:null})});return i?this._returnResult({data:null,error:i}):this._returnResult({data:s,error:null})})}catch(e){if($(e))return this._returnResult({data:null,error:e});throw e}}async _updatePasskey(e){zn(this.experimental);try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;if(s)return this._returnResult({data:null,error:s});if(!r)return this._returnResult({data:null,error:new lt});const{data:i,error:o}=await K(this.fetch,"PATCH",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:r.access_token,body:{friendly_name:e.friendlyName}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:i,error:null})})}catch(n){if($(n))return this._returnResult({data:null,error:n});throw n}}async _deletePasskey(e){zn(this.experimental);try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;if(s)return this._returnResult({data:null,error:s});if(!r)return this._returnResult({data:null,error:new lt});const{error:i}
446=await K(this.fetch,"DELETE",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:r.access_token,noResolveJson:!0});return i?this._returnResult({data:null,error:i}):this._returnResult({data:null,error:null})})}catch(n){if($(n))return this._returnResult({data:null,error:n});throw n}}}Uc.nextInstanceID={};const eW=Uc,tW="2.111.0";let Ml="",Dh;if(typeof Deno<"u"){var Nm;Ml="deno",Dh=(Nm=Deno.version)===null||Nm===void 0?void 0:Nm.deno}else if(typeof document<"u")Ml="web";else if(typeof navigator<"u"&&navigator.product==="ReactNative")Ml="react-native";else{var Am;Ml="node";const t=globalThis.process;Dh=t==null||(Am=t.version)===null||Am===void 0?void 0:Am.replace(/^v/,"")}const jA=[`runtime=${Ml}`];Dh&&jA.push(`runtime-version=${Dh}`);const nW={"X-Client-Info":`supabase-js/${tW}; ${jA.join("; ")}`},rW={headers:nW},sW={schema:"public"},iW={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},oW={},aW={enabled:!1,respectSamplingDecision:!0};function lW(t,e,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function a(u){try{c(r.next(u))}catch(h){o(h)}}function l(u){try{c(r.throw(u))}catch(h){o(h)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((r=r.apply(t,[])).next())})}let _m=null;const cW="@opentelemetry/api";function uW(){return _m===null&&(_m=import(cW).catch(()=>null)),_m}function dW(){return lW(this,void 0,void 0,function*(){try{const t=yield uW();if(!t||!t.propagation||!t.context)return null;const e={};t.propagation.inject(t.context.active(),e);const n=e.traceparent;return n?{traceparent:n,tracestate:e.tracestate,baggage:e.baggage}:null}catch{return null}})}function hW(t){if(!t||typeof t!="string")return null;const e=t.split("-");if(e.length!==4)return null;const[n,r,s,i]=e;if(n.length!==2||r.length!==32||s.length!==16||i.length!==2)return null;const o=/^[0-9a-f]+$/i;return!o.test(n)||!o.test(r)||!o.test(s)||!o.test(i)||r==="00000000000000000000000000000000"||s==="0000000000000000"?null:{version:n,traceId:r,parentId:s,traceFlags:i,isSampled:(parseInt(i,16)&1)===1}}function fW(t,e){if(!t||!e||e.length===0)return!1;let n;if(t instanceof URL)n=t;else try{n=new URL(t)}catch{return!1}for(const r of e)try{if(typeof r=="string"){if(pW(n.hostname,r))return!0}else if(r instanceof RegExp){if(r.test(n.hostname))return!0}else if(typeof r=="function"&&r(n))return!0}catch{continue}return!1}function pW(t,e){if(e===t)return!0;if(e.startsWith("*.")){const n=e.slice(2);if(t.endsWith(n)&&(t===n||t.endsWith("."+n)))return!0}return!1}function mW(t){const e=[];try{const n=new URL(t);e.push(n.hostname)}catch{}return e.push("*.supabase.co","*.supabase.in"),e.push("localhost","127.0.0.1","[::1]"),e}function Vc(t){"@babel/helpers - typeof";return Vc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vc(t)}function gW(t,e){if(Vc(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Vc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function yW(t){var e=gW(t,"string");return Vc(e)=="symbol"?e:e+""}function vW(t,e,n){return(e=yW(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function L1(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function Ue(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?L1(Object(n),!0).forEach(function(r){vW(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):L1(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}const bW=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),xW=()=>Headers,OA=t=>t.startsWith("sb_publishable_")||t.startsWith("sb_secret_"),wW="sb_temp_",D1=new Set,kW=t=>{var e,n;if(!t.startsWith("sb_")||OA(t)||t.startsWith(wW))return;const r=(e=(n=t.match(/^sb_[a-zA-Z0-9]+_/))===null||n===void 0?void 0:n[0])!==null&&e!==void 0?e:"unknown";D1.has(r)||(D1.add(r),console.warn("@supabase/supabase-js: Unrecognized Supabase API key format. The client will proceed and send this key as-is;
446 if you see authentication errors you may need to upgrade @supabase/supabase-js to a version that recognizes this key type."))},$1=(t,e,n,r,s,i)=>{const o=bW(r),a=xW(),l=(s==null?void 0:s.enabled)===!0,c=(s==null?void 0:s.respectSamplingDecision)!==!1,u=l?mW(e):null,h=!(i!=null&&i.omitApiKeyAsBearer&&OA(t));return async(p,f)=>{const g=await n();let m=new a(f==null?void 0:f.headers);if(m.has("apikey")||m.set("apikey",t),!m.has("Authorization")){const y=g??(h?t:null);y&&m.set("Authorization",`Bearer ${y}`)}if(u){const y=await SW(p,u,c);y&&(y.traceparent&&!m.has("traceparent")&&m.set("traceparent",y.traceparent),y.tracestate&&!m.has("tracestate")&&m.set("tracestate",y.tracestate),y.baggage&&!m.has("baggage")&&m.set("baggage",y.baggage))}return o(p,Ue(Ue({},f),{},{headers:m}))}};async function SW(t,e,n){if(!fW(typeof t=="string"||t instanceof URL?t:t.url,e))return null;const r=await dW();if(!r||!r.traceparent)return null;if(n){const s=hW(r.traceparent);if(s&&!s.isSampled)return null}return r}function z1(t){return typeof t=="boolean"?{enabled:t}:t}function CW(t){return t.endsWith("/")?t:t+"/"}function EW(t,e){var n,r,s,i,o,a;const{db:l,auth:c,realtime:u,global:h}=t,{db:p,auth:f,realtime:g,global:m}=e,y=z1(t.tracePropagation),v=z1(e.tracePropagation),b={db:Ue(Ue({},p),l),auth:Ue(Ue({},f),c),realtime:Ue(Ue({},g),u),storage:{},global:Ue(Ue(Ue({},m),h),{},{headers:Ue(Ue({},(n=m==null?void 0:m.headers)!==null&&n!==void 0?n:{}),(r=h==null?void 0:h.headers)!==null&&r!==void 0?r:{})}),tracePropagation:{enabled:(s=(i=y==null?void 0:y.enabled)!==null&&i!==void 0?i:v==null?void 0:v.enabled)!==null&&s!==void 0?s:!1,respectSamplingDecision:(o=(a=y==null?void 0:y.respectSamplingDecision)!==null&&a!==void 0?a:v==null?void 0:v.respectSamplingDecision)!==null&&o!==void 0?o:!0},accessToken:async()=>""};return t.accessToken?b.accessToken=t.accessToken:delete b.accessToken,b}function TW(t){const e=t==null?void 0:t.trim();if(!e)throw new Error("supabaseUrl is required.");if(!e.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(CW(e))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var NW=class extends eW{constructor(t){super(t)}},AW=class{constructor(t,e,n){var r,s;this.supabaseUrl=t,this.supabaseKey=e;const i=TW(t);if(!e)throw new Error("supabaseKey is required.");kW(e),this.realtimeUrl=new URL("realtime/v1",i),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",i),this.storageUrl=new URL("storage/v1",i),this.functionsUrl=new URL("functions/v1",i);const o=`sb-${i.hostname.split(".")[0]}-auth-token`,a={db:sW,realtime:oW,auth:Ue(Ue({},iW),{},{storageKey:o}),global:rW,tracePropagation:aW},l=EW(n??{},a);if(this.settings=l,this.storageKey=(r=l.auth.storageKey)!==null&&r!==void 0?r:"",this.headers=(s=l.global.headers)!==null&&s!==void 0?s:{},l.accessToken)this.accessToken=l.accessToken,this.auth=new Proxy({},{get:(u,h)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(h)} is not possible`)}});else{var c;this.auth=this._initSupabaseAuthClient((c=l.auth)!==null&&c!==void 0?c:{},this.headers,l.global.fetch)}this.fetch=$1(e,t,this._getSessionToken.bind(this),l.global.fetch,l.tracePropagation),this.functionsFetch=$1(e,t,this._getSessionToken.bind(this),l.global.fetch,l.tracePropagation,{omitApiKeyAsBearer:!0}),this.realtime=this._initRealtimeClient(Ue({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},l.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(u=>this.realtime.setAuth(u)).catch(u=>console.warn("Failed to set initial Realtime auth token:",u)),this.rest=new jz(new URL("rest/v1",i).href,{headers:this.headers,schema:l.db.schema,fetch:this.fetch,timeout:l.db.timeout,urlLengthLimit:l.db.urlLengthLimit}),this.storage=new YB(this.storageUrl.href,this.headers,this.fetch,n==null?void 0:n.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new wz(this.functionsUrl.href,{headers:this.headers,customFetch:this.functionsFetch})}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}rpc(t,e={},n={head:!1,get:!1,count:void 0}){return this.rest.rpc(t,e,n)}channel(t,e={config:{}}){return this.realtime.channel(t,e)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getSessionToken(){var t=this,e,n;if(t.accessToken)return await t.accessToken();const{data:r}=await t.auth.getSession();
446return(e=(n=r.session)===null||n===void 0?void 0:n.access_token)!==null&&e!==void 0?e:null}async _getAccessToken(){var t=this,e;return(e=await t._getSessionToken())!==null&&e!==void 0?e:t.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:e,detectSessionInUrl:n,storage:r,userStorage:s,storageKey:i,flowType:o,lock:a,debug:l,throwOnError:c,experimental:u,lockAcquireTimeout:h,skipAutoInitialize:p},f,g){const m={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new NW({url:this.authUrl.href,headers:Ue(Ue({},m),f),storageKey:i,autoRefreshToken:t,persistSession:e,detectSessionInUrl:n,storage:r,userStorage:s,flowType:o,lock:a,debug:l,throwOnError:c,experimental:u,fetch:g,lockAcquireTimeout:h,skipAutoInitialize:p,hasCustomAuthorizationHeader:Object.keys(this.headers).some(y=>y.toLowerCase()==="authorization")})}_initRealtimeClient(t){return new bB(this.realtimeUrl.href,Ue(Ue({},t),{},{params:Ue(Ue({},{apikey:this.supabaseKey}),t==null?void 0:t.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((t,e)=>{this._handleTokenChanged(t,"CLIENT",e==null?void 0:e.access_token)})}_handleTokenChanged(t,e,n){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN"||t==="INITIAL_SESSION")&&this.changedAccessToken!==n?(this.changedAccessToken=n,this.realtime.setAuth(n)):t==="SIGNED_OUT"&&(this.realtime.setAuth(),e=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const _W=(t,e,n)=>new AW(t,e,n);function jW(){if(typeof window<"u"||globalThis.Deno!==void 0)return!1;const t=globalThis.process;if(!t)return!1;const e=t.version;if(e==null)return!1;const n=e.match(/^v(\d+)\./);return n?parseInt(n[1],10)<=20:!1}jW()&&console.warn("â ï¸ Node.js 20 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 22 or later. For more information, visit: https://github.com/orgs/supabase/discussions/45715");function OW(){var y,v;if(typeof window>"u")return;const t=location.hostname,n=["lovableproject.com","lovableproject-dev.com","lovable.app","gpt-eng.com","gptengineer.run"].some(b=>t===b||t.endsWith("."+b)),r="[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}",s=n?((y=t.match(new RegExp("^(?:id-preview(?:-[a-z0-9]+)?|project)--("+r+")(?:-dev)?(?=\\.|$)","i")))==null?void 0:y[1])??((v=t.match(new RegExp("^("+r+")(?=[.-])","i")))==null?void 0:v[1]):void 0,i=window.parent&&window.parent!==window;if(!s||!i)return localStorage;const o=t.endsWith(".lovableproject-dev.com")||t.endsWith(".gpt-eng.com"),a=o?/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$|^http:\/\/localhost:3000$/:/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$/,l=location.ancestorOrigins&&location.ancestorOrigins[0]||(document.referrer?new URL(document.referrer).origin:""),c=l&&a.test(l)?[l]:o?["https://lovable.dev","http://localhost:3000"]:["https://lovable.dev"],u="lovable-preview-auth:result",h=2e3,p=()=>Math.random().toString(36).slice(2)+Date.now().toString(36),f=(b,x,k)=>new Promise(S=>{const C=p();let E=!1,T;const N=I=>{E||(E=!0,clearTimeout(T),window.removeEventListener("message",_),S(I))},_=I=>{if(c.indexOf(I.origin)<0)return;const H=I.data;H&&H.type===u&&H.requestId===C&&N(H)};window.addEventListener("message",_);const z={type:b,requestId:C,projectId:s,key:x};k!==void 0&&(z.value=k);for(const I of c)window.parent.postMessage(z,I);T=setTimeout(()=>N(null),h)});let g=!0;const m=250;return{getItem:async b=>{let x=await f("lovable-preview-auth:get",b);return!x&&g&&(await new Promise(k=>setTimeout(k,m)),x=await f("lovable-preview-auth:get",b)),g=!1,x&&x.ok&&typeof x.value=="string"?x.value===""?(localStorage.removeItem(b),null):x.value:localStorage.getItem(b)},setItem:(b,x)=>(localStorage.setItem(b,x),f("lovable-preview-auth:set",b,x).then(()=>{})),removeItem:b=>(localStorage.removeItem(b),f("lovable-preview-auth:remove",b).then(()=>{}))}}const RW="https://jcnyzzajtipmhcpjewwp.supabase.co",B1="sb_publishable_tnCR8xU49P0OrfZPh1c5aA_I36CdxLm";function MW(t){return t.startsWith("sb_publishable_")||t.startsWith("sb_secret_")}function PW(t){return(e,n)=>{const r=new Headers(typeof Request<"u"&&e instanceof Request?e.headers:void 0);
446return n!=null&&n.headers&&new Headers(n.headers).forEach((s,i)=>r.set(i,s)),MW(t)&&r.get("Authorization")===`Bearer ${t}`&&r.delete("Authorization"),r.set("apikey",t),fetch(e,{...n,headers:r})}}const Te=_W(RW,B1,{global:{fetch:PW(B1)},auth:{storage:OW(),persistSession:!0,autoRefreshToken:!0}}),F1=Object.freeze(Object.defineProperty({__proto__:null,supabase:Te},Symbol.toStringTag,{value:"Module"})),W1="/assets/editorial-blog-bZ-0RANM.jpg",IW=["All","AI Marketing","SEO","Voice AI","GoHighLevel","Automation","Paid Ads"];function LW(){const[t,e]=w.useState([]),[n,r]=w.useState(null),[s,i]=w.useState(!0),[o,a]=w.useState("All");w.useEffect(()=>{(async()=>{const{data:u,error:h}=await Te.from("posts").select("*").eq("status","published").lte("published_at",new Date().toISOString()).order("published_at",{ascending:!1});if(h)console.error(h);else{const p=u||[];r(p[0]||null),e(p.slice(1))}i(!1)})()},[]);const l=o==="All"?t:t.filter(u=>u.category===o),c=u=>{const h=JSON.stringify(u.content||[]).split(" ").length;return Math.max(1,Math.ceil(h/200))};return d.jsxs(d.Fragment,{children:[d.jsxs(du,{children:[d.jsx("title",{children:"Blog & Insights | Ideation Digital"}),d.jsx("meta",{name:"description",content:"Tactical playbooks, frameworks, and field reports from the agency building AI-first growth systems for ambitious SMBs."}),d.jsx("link",{rel:"canonical",href:"https://ideation-digital.com/blog"}),d.jsx("meta",{property:"og:type",content:"website"}),d.jsx("meta",{property:"og:title",content:"Blog & Insights | Ideation Digital"}),d.jsx("meta",{property:"og:description",content:"Tactical playbooks, frameworks, and field reports from the agency building AI-first growth systems for ambitious SMBs."}),d.jsx("meta",{property:"og:url",content:"https://ideation-digital.com/blog"}),d.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),d.jsx("meta",{name:"twitter:title",content:"Blog & Insights | Ideation Digital"}),d.jsx("meta",{name:"twitter:description",content:"Tactical playbooks, frameworks, and field reports from the agency building AI-first growth systems for ambitious SMBs."})]}),d.jsx(tl,{title:"Insights from the AI marketing frontier",italicWords:2,subtitle:"Tactical playbooks, frameworks, and field reports from the agency building AI-first growth systems for ambitious SMBs."}),d.jsx("section",{className:"bg-background border-b border-border",children:d.jsx("div",{className:"container-wide mx-auto px-4 lg:px-8 py-6 flex gap-3 overflow-x-auto scrollbar-none",children:IW.map(u=>d.jsx("button",{onClick:()=>a(u),className:`shrink-0 px-5 py-2 rounded-full text-sm font-medium border transition-colors ${o===u?"bg-foreground text-background border-foreground":"bg-secondary text-foreground border-border hover:border-foreground"}`,children:u},u))})}),n&&d.jsx("section",{className:"section-padding bg-background",children:d.jsx("div",{className:"container-wide mx-auto",children:d.jsx(ne,{to:`/blog/${n.slug}`,className:"group block",children:d.jsxs("div",{className:"grid lg:grid-cols-2 gap-10 items-center",children:[d.jsxs("div",{className:"relative",children:[d.jsx("div",{className:"absolute -inset-4 bg-gradient-to-br from-electric/30 to-magenta/20 rounded-3xl blur-2xl opacity-50 group-hover:opacity-80 transition-opacity"}),d.jsxs("div",{className:"relative rounded-3xl overflow-hidden border border-border",children:[d.jsx("img",{src:n.cover_image||W1,alt:n.title,className:"w-full aspect-[4/3] object-cover group-hover:scale-105 transition-transform duration-700",loading:"eager",width:1280,height:960}),n.category&&d.jsx("div",{className:"absolute top-5 left-5",children:d.jsxs("span",{className:"inline-flex items-center px-3 py-1.5 rounded-full text-xs font-semibold bg-cta text-cta-foreground",children:["Featured · ",n.category]})})]})]}),d.jsxs("div",{children:[d.jsx("h2",{className:"font-heading font-black text-3xl lg:text-5xl text-foreground tracking-tight leading-[1.05] group-hover:text-accent transition-colors",children:n.title}),d.jsx("p",{className:"mt-6 text-lg text-muted-foreground leading-relaxed",children:n.excerpt}),d.jsxs("div",{className:"mt-6 flex items-center gap-5 text-sm text-muted-foreground",children:[n.published_at&&d.jsxs("span",{className:"flex items-center gap-2",children:[d.jsx(Eh,{className:"w-4 h-4"})," ",new Date(n.published_at).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})]}),d.jsxs("span",{className:"flex items-center gap-2",children:[d.jsx(tp,{className:"w-4 h-4"})," ",c(n)," min read"]})]}),d.jsxs("span",{className:"group/cta inline-flex items-center gap-2 text-foreground font-semibold mt-8 border-b-2 border-foreground pb-1 group-hover:text-accent group-hover:border-accent transition-colors",children:["Read article ",d.jsx(pe,{className:"w-4 h-4 group-hover/cta:translate-x-1 group-hover/cta:-translate-y-1 transition-transform"})]})]})]})})})}),d.jsx("section",{className:"section-padding bg-secondary",children:d.jsxs("div",{className:"container-wide mx-auto",children:[d.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-end justify-between gap-8 mb-12",children:[d.jsx(ut,{title:"Recent posts and playbooks",italicWords:2}),d.jsxs("p",{className:"text-muted-foreground text-sm",children:[l.length," articles"]})]}),s?d.jsx("div",{className:"flex items-center justify-center py-20",children:d.jsx("div",{className:"w-8 h-8 border-2 border-accent border-t-transparent roun
446ded-full animate-spin"})}):d.jsxs("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-6",children:[l.map((u,h)=>d.jsxs(ne,{to:`/blog/${u.slug}`,className:`group bg-card rounded-3xl border border-border overflow-hidden hover:border-foreground hover:shadow-2xl transition-all ${h%3===1?"lg:translate-y-8":""}`,children:[d.jsxs("div",{className:"aspect-[4/3] overflow-hidden relative",children:[d.jsx("img",{src:u.cover_image||W1,alt:u.title,className:"w-full h-full object-cover group-hover:scale-110 transition-transform duration-700",loading:"lazy",width:800,height:600}),u.category&&d.jsx("div",{className:"absolute top-4 left-4",children:d.jsx("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-xs font-semibold bg-background/95 text-foreground",children:u.category})})]}),d.jsxs("div",{className:"p-6",children:[d.jsxs("div",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[u.published_at&&d.jsx("span",{children:new Date(u.published_at).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}),d.jsx("span",{children:"·"}),d.jsxs("span",{children:[c(u)," min"]})]}),d.jsx("h3",{className:"font-heading font-bold text-xl text-foreground mt-3 group-hover:text-accent transition-colors leading-tight",children:u.title}),d.jsxs("span",{className:"inline-flex items-center gap-1 text-foreground text-sm font-semibold mt-5 group-hover:gap-2 group-hover:text-accent transition-all",children:["Read more ",d.jsx(pe,{className:"w-3.5 h-3.5"})]})]})]},u.id)),!s&&l.length===0&&d.jsx("div",{className:"col-span-full text-center py-20 text-muted-foreground",children:"No posts in this category yet. Check back soon."})]})]})}),d.jsx(Nr,{})]})}function ir(t){const e=Object.prototype.toString.call(t);return t instanceof Date||typeof t=="object"&&e==="[object Date]"?new t.constructor(+t):typeof t=="number"||e==="[object Number]"||typeof t=="string"||e==="[object String]"?new Date(t):new Date(NaN)}function co(t,e){return t instanceof Date?new t.constructor(e):new Date(e)}const RA=6048e5,DW=864e5;let $W={};function mp(){return $W}function qc(t,e){var a,l,c,u;const n=mp(),r=(e==null?void 0:e.weekStartsOn)??((l=(a=e==null?void 0:e.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,s=ir
vendor: 19,250 bytes, line 446
446(t),i=s.getDay(),o=(i<r?7:0)+i-r;return s.setDate(s.getDate()-o),s.setHours(0,0,0,0),s}function $h(t){return qc(t,{weekStartsOn:1})}function MA(t){const e=ir(t),n=e.getFullYear(),r=co(t,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const s=$h(r),i=co(t,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);const o=$h(i);return e.getTime()>=s.getTime()?n+1:e.getTime()>=o.getTime()?n:n-1}function H1(t){const e=ir(t);return e.setHours(0,0,0,0),e}function U1(t){const e=ir(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function zW(t,e){const n=H1(t),r=H1(e),s=+n-U1(n),i=+r-U1(r);return Math.round((s-i)/DW)}function BW(t){const e=MA(t),n=co(t,0);return n.setFullYear(e,0,4),n.setHours(0,0,0,0),$h(n)}function FW(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function WW(t){if(!FW(t)&&typeof t!="number")return!1;const e=ir(t);return!isNaN(Number(e))}function HW(t){const e=ir(t),n=co(t,0);return n.setFullYear(e.getFullYear(),0,1),n.setHours(0,0,0,0),n}const UW={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},VW=(t,e,n)=>{let r;const s=UW[t];return typeof s=="string"?r=s:e===1?r=s.one:r=s.other.replace("{{count}}",e.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function jm(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const qW={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},GW={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},KW={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},YW={date:jm({formats:qW,defaultWidth:"full"}),time:jm({formats:GW,defaultWidth:"full"}),dateTime:jm({formats:KW,defaultWidth:"full"})},JW={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},QW=(t,e,n,r)=>JW[t];function xl(t){return(e,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let s;if(r==="formatting"&&t.formattingValues){const o=t.defaultFormattingWidth||t.defaultWidth,a=n!=null&&n.width?String(n.width):o;s=t.formattingValues[a]||t.formattingValues[o]}else{const o=t.defaultWidth,a=n!=null&&n.width?String(n.width):t.defaultWidth;s=t.values[a]||t.values[o]}const i=t.argumentCallback?t.argumentCallback(e):e;return s[i]}}const XW={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},ZW={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},e6={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},t6={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},n6={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},r6={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},s6=(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},i6={ordinalNumber:s6,era:xl({values:XW,defaultWidth:"wide"}),quarter:xl({values:ZW,defaultWidth:"wide",argumentCallback:t=>t-1}),month:xl({values:e6,defaultWidth:"wide"}),day:xl({values:t6,defaultWidth:"wide"}),dayPeriod:xl({values:n6,defaultWidth:"wide",formattingValues:r6,defaultFormattingWidth:"wide"})};function wl(t){return(e,n={})=>{const r=n.width,s=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],i=e.match(s);if(!i)return null;const o=i[0],a=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(a)?a6(a,h=>h.test(o)):o6(a,h=>h.test(o));let c;c=t.valueCallback?t.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=e.slice(o.length);return{value:c,rest:u}}}function o6(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function a6(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return n}function l6(t){return(e,n={})=>{const r=e.match(t.matchPattern);if(!r)return null;const s=r[0],i=e.match(t.parsePattern);if(!i)return null;let o=t.valueCallback?t.valueCallback(i[0]):i[0];o=n.valueCallback?n.valueCallback(o):o;const a=e.slice(s.length);return{value:o,rest:a}}}const c6=/^(\d+)(th|st|nd|rd)?/i,u6=/\d+/i,d6={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},h6={any:[/^b/i,/^(a|c)/i]},f6={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},p6={any:[/1/i,/2/i,/3/i,/4/i]},m6={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},g6={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},y6={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},v6={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},b6={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},x6={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},w6={ordinalNumber:l6({matchPattern:c6,parsePattern:u6,valueCallback:t=>parseInt(t,10)}),era:wl({matchPatterns:d6,defaultMatchWidth:"wide",parsePatterns:h6,defaultParseWidth:"any"}),quarter:wl({matchPatterns:f6,defaultMatchWidth:"wide",parsePatterns:p6,defaultParseWidth:"any",valueCallback:t=>t+1}),month:wl({matchPatterns:m6,defaultMatchWidth:"wide",parsePatterns:g6,defaultParseWidth:"any"}),day:wl({matchPatterns:y6,defaultMatchWidth:"wide",parsePatterns:v6,defaultParseWidth:"any"}),dayPeriod:wl({matchPatterns:b6,defaultMatchWidth:"any",parsePatterns:x6,defaultParseWidth:"any"})},k6={code:"en-US",formatDistance:VW,formatLong:YW,formatRelative:QW,localize:i6,match:w6,options:{weekStartsOn:0,firstWeekContainsDate:1}};function S6(t){const e=ir(t);return zW(e,HW(e))+1}function C6(t){const e=ir(t),n=+$h(e)-+BW(e);return Math.round(n/RA)+1}function PA(t,e){var u,h,p,f;const n=ir(t),r=n.getFullYear(),s=mp(),i=(e==null?void 0:e.firstWeekContainsDate)??((h=(u=e==null?void 0:e.locale)==null?void 0:u.options)==null?void 0:h.firstWeekContainsDate)??s.firstWeekContainsDate??((f=(p=s.locale)==null?void 0:p.options)==null?void 0:f.firstWeekContainsDate)??1,o=co(t,0);o.setFullYear(r+1,0,i),o.setHours(0,0,0,0);const a=qc(o,e),l=co(t,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=qc(l,e);return n.getTime()>=a.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function E6(t,e){var a,l,c,u;const n=mp(),r=(e==null?void 0:e.firstWeekContainsDate)??((l=(a=e==null?void 0:e.locale)==null?void 0:a.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??1,s=PA(t,e),i=co(t,0);return i.setFullYear(s,0,r),i.setHours(0,0,0,0),qc(i,e)}function T6(t,e){const n=ir(t),r=+qc(n,e)-+E6(n,e);return Math.round(r/RA)+1}function we(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const ms={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return we(e==="yy"?r%100:r,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):we(n+1,2)},d(t,e){return we(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(t,e){return we(t.getHours()%12||12,e.length)},H(t,e){return we(t.getHours(),e.length)},m(t,e){return we(t.getMinutes(),e.length)},s(t,e){return we(t.getSeconds(),e.length)},S(t,e){const n=e.length,r=t.getMilliseconds(),s=Math.trunc(r*Math.pow(10,n-3));return we(s,e.length)}},Mo={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},V1={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const r=t.getFullYear(),s=r>0?r:1-r;return n.ordinalNumber(s,{unit:"year"})}return ms.y(t,e)},Y:function(t,e,n,r){const s=PA(t,r),i=s>0?s:1-s;if(e==="YY"){const o=i%100;return we(o,2)}return e==="Yo"?n.ordinalNumber(i,{unit:"year"}):we(i,e.length)},R:function(t,e){const n=MA(t);return we(n,e.length)},u:function(t,e){const n=t.getFullYear();return we(n,e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return we(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return we(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return ms.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return we(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const s=T6(t,r);return e==="wo"?n.ordinalNumber(s,{unit:"week"}):we(s,e.length)},I:function(t,e,n){const r=C6(t);return e==="Io"?n.ordinalNumber(r,{unit:"week"}):we(r,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):ms.d(t,e)},D:function(t,e,n){const r=S6(t);return e==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):we(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const s=t.getDay(),i=(s-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return we(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(s,{width:"short",context:"formatting"});case"eeee":default:return n.day(s,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const s=t.getDay(),i=(s-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return we(i,e.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(s,{width:"narrow",context:"standalone"});case"cccccc":return n.day(s,{width:"short",context:"standalone"});case"cccc":default:return n.day(s,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),s=r===0?7:r;switch(e){case"i":return String(s);case"ii":return we(s,e.length);case"io":return n.ordinalNumber(s,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const s=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let s;switch(r===12?s=Mo.noon:r===0?s=Mo.midnight:s=r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let s;switch(r>=17?s=Mo.evening:r>=12?s=Mo.afternoon:r>=4?s=Mo.morning:s=Mo.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let r=t.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return ms.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):ms.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return e==="Ko"?n.ordinalNumber(r,{unit:"hour"}):we(r,e.length)},k:function(t,e,n){let r=t.getHours();return r===0&&(r=24),e==="ko"?n.ordinalNumber(r,{unit:"hour"}):we(r,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):ms.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):ms.s(t,e)},S:function(t,e){return ms.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return G1(r);case"XXXX":case"XX":return Ai(r);case"XXXXX":case"XXX":default:return Ai(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return G1(r);case"xxxx":case"xx":return Ai(r);case"xxxxx":case"xxx":default:return Ai(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+q1(r,":");case"OOOO":default:return"GMT"+Ai(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+q1(r,":");case"zzzz":default:return"GMT"+Ai(r,":")}},t:function(t,e,n){const r=Math.trunc(t.getTime()/1e3);return we(r,e.length)},T:function(t,e,n){const r=t.getTime();return we(r,e.length)}};function q1(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),s=Math.trunc(r/60),i=r%60;return i===0?n+String(s):n+String(s)+e+we(i,2)}function G1(t,e){return t%60===0?(t>0?"-":"+")+we(Math.abs(t)/60,2):Ai(t,e)}function Ai(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),s=we(Math.trunc(r/60),2),i=we(r%60,2);return n+s+e+i}const K1=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},IA=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},N6=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],s=n[2];if(!s)return K1(t,e);let i;switch(r){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;case"PPPP":default:i=e.dateTime({width:"full"});break}return i.replace("{{date}}",K1(r,e)).replace("{{time}}",IA(s,e))},A6={p:IA,P:N6},_6=/^D+$/,j6=/^Y+$/,O6=["D","DD","YY","YYYY"];function R6(t){return _6.test(t)}function M6(t){return j6.test(t)}function P6(t,e,n){const r=I6(t,e,n);if(console.warn(r),O6.includes(t))throw new RangeError(r)}function I6(t,e,n){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const L6=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,D6=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,$6=/^'([^]*?)'?$/,z6=/''/g,B6=/[a-zA-Z]/;function F6(t,e,n){var u,h,p,f;const r=mp(),s=r.locale??k6,i=r.firstWeekContainsDate??((h=(u=r.locale)==null?void 0:u.options)==null?void 0:h.firstWeekContainsDate)??1,o=r.weekStartsOn??((f=(p=r.locale)==null?void 0:p.options)==null?void 0:f.weekStartsOn)??0,a=ir(t);if(!WW(a))throw new RangeError("Invalid time value");let l=e.match(D6).map(g=>{const m=g[0];if(m==="p"||m==="P"){const y=A6[m];return y(g,s.formatLong)}return g}).join("").match(L6).map(g=>{if(g==="''")return{isToken:!1,value:"'"};const m=g[0];if(m==="'")return{isToken:!1,value:W6(g)};if(V1[m])return{isToken:!0,value:g};
446if(m.match(B6))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:g}});s.localize.preprocessor&&(l=s.localize.preprocessor(a,l));const c={firstWeekContainsDate:i,weekStartsOn:o,locale:s};return l.map(g=>{if(!g.isToken)return g.value;const m=g.value;(M6(m)||R6(m))&&P6(m,e,String(t));const y=V1[m[0]];return y(a,m,s.localize,c)}).join("")}function W6(t){const e=t.match($6);return e?e[1].replace(z6,"'"):t}function H6(){const{slug:t}=Jf(),e=Ja(),[n,r]=w.useState(null),[s,i]=w.useState(!0),o=new URLSearchParams(window.location.search).get("preview")==="1";if(w.useEffect(()=>{if(!t)return;let c=!1;return(async()=>{if(o){const{data:g}=await Te.auth.getSession();if(!g.session){e("/admin/login",{replace:!0});return}const{data:m}=await Te.from("user_roles").select("role").eq("user_id",g.session.user.id).eq("role","admin").single();if(!m){e("/admin/login",{replace:!0});return}}let u=Te.from("posts").select("*, post_tags(tags(name, slug))").eq("slug",t);o||(u=u.eq("status","published").lte("published_at",new Date().toISOString()));const{data:h,error:p}=await u.single();if(c)return;if(p||!h){e("/404",{replace:!0});return}const f=Array.isArray(h.post_tags)?h.post_tags.map(g=>g.tags).filter(Boolean):[];r({...h,tags:f}),i(!1)})(),()=>{c=!0}},[t,e,o]),s)return d.jsx("div",{className:"min-h-[60vh] flex items-center justify-center",children:d.jsx("div",{className:"w-8 h-8 border-2 border-accent border-t-transparent rounded-full animate-spin"})});if(!n)return null;const a=n.published_at?new Date(n.published_at):null,l=Math.max(1,Math.ceil(JSON.stringify(n.content||[]).split(" ").length/200));return d.jsxs(d.Fragment,{children:[d.jsxs(du,{children:[d.jsxs("title",{children:[n.meta_title||n.title," | Ideation Digital"]}),d.jsx("meta",{name:"description",content:n.meta_description||n.excerpt||""}),d.jsx("link",{rel:"canonical",href:`https://ideation-digital.com/blog/${n.slug}`}),d.jsx("meta",{property:"og:type",content:"article"}),d.jsx("meta",{property:"og:title",content:n.meta_title||n.title}),d.jsx("meta",{property:"og:description",content:n.meta_description||n.excerpt||""}),d.jsx("meta",{property:"og:url",content:`https://ideation-digital.com/blog/${n.slug}`}),n.og_image||n.cover_image?d.jsx("meta",{property:"og:image",content:n.og_image||n.cover_image||""}):null,d.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),d.jsx("meta",{name:"twitter:title",content:n.meta_title||n.title}),d.jsx("meta",{name:"twitter:description",content:n.meta_description||n.excerpt||""}),n.og_image||n.cover_image?d.jsx("meta",{name:"twitter:image",content:n.og_image||n.cover_image||""}):null,d.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"BlogPosting",headline:n.title,description:n.meta_description||n.excerpt,image:n.og_image||n.cover_image,datePublished:n.published_at,author:{"@type":"Organization",name:"Ideation Digital"},publisher:{"@type":"Organization",name:"Ideation Digital"},mainEntityOfPage:{"@type":"WebPage","@id":`https://ideation-digital.com/blog/${n.slug}`}})})]}),d.jsxs("article",{children:[d.jsxs("section",{className:"relative bg-primary overflow-hidden pt-28 pb-16 lg:pt-36 lg:pb-24",children:[d.jsx("div",{className:"absolute inset-0 bg-grid-dark opacity-40"}),d.jsx("div",{className:"absolute -top-20 right-0 w-[500px] h-[500px] bg-electric/25 rounded-full blur-3xl animate-blob"}),d.jsx("div",{className:"absolute -bottom-32 left-1/4 w-[420px] h-[420px] bg-magenta/20 rounded-full blur-3xl animate-blob",style:{animationDelay:"5s"}}),d.jsxs("div",{className:"container-wide mx-auto px-4 lg:px-8 relative",children:[d.jsxs(ne,{to:"/blog",className:"inline-flex items-center gap-2 text-primary-foreground/70 hover:text-accent transition-colors text-sm font-medium mb-8",children:[d.jsx(iN,{className:"w-4 h-4"})," Back to insights"]}),d.jsxs("div",{className:"max-w-4xl",children:[n.category&&d.jsx("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-xs font-semibold bg-accent text-accent-foreground mb-6",children:n.category}),d.jsx("h1",{className:"font-heading font-black text-4xl sm:text-5xl lg:text-7xl text-primary-foreground tracking-tight leading-[1.05]",children:n.title}),n.excerpt&&d.jsx("p",{className:"mt-6 text-xl text-primary-foreground
446/70 leading-relaxed max-w-3xl",children:n.excerpt}),d.jsxs("div",{className:"mt-8 flex flex-wrap items-center gap-6 text-sm text-primary-foreground/60",children:[a&&d.jsxs("span",{className:"flex items-center gap-2",children:[d.jsx(Eh,{className:"w-4 h-4"}),F6(a,"MMMM d, yyyy")]}),d.jsxs("span",{className:"flex items-center gap-2",children:[d.jsx(tp,{className:"w-4 h-4"}),l," min read"]})]})]})]})]}),n.cover_image&&d.jsx("section",{className:"section-padding bg-background -mt-8 relative z-10",children:d.jsx("div",{className:"container-wide mx-auto max-w-5xl",children:d.jsx("div",{className:"relative rounded-3xl overflow-hidden border border-border shadow-2xl",children:d.jsx("img",{src:n.cover_image,alt:n.title,className:"w-full aspect-[16/9] object-cover",loading:"eager"})})})}),d.jsx("section",{className:"section-padding bg-background",children:d.jsxs("div",{className:"container-wide mx-auto max-w-3xl",children:[d.jsx("div",{className:"prose prose-lg prose-slate max-w-none",children:Array.isArray(n.content)?n.content.map((c,u)=>d.jsx(U6,{node:c},u)):d.jsx("p",{className:"text-muted-foreground",children:"No content yet."})}),n.tags&&n.tags.length>0&&d.jsx("div",{className:"mt-16 pt-8 border-t border-border",children:d.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[d.jsx($3,{className:"w-4 h-4 text-muted-foreground"}),n.tags.map(c=>d.jsx("span",{className:"px-3 py-1 rounded-full text-xs font-medium bg-secondary text-secondary-foreground border border-border",children:c.name},c.slug))]})})]})})]}),d.jsx(Nr,{})]})}function U6({node:t}){var e,n,r,s,i,o;if(!t)return null;switch(t.type){case"heading":{const a=((e=t.attrs)==null?void 0:e.level)||2,l=LA(t);return a===1?d.jsx("h1",{children:l}):a===2?d.jsx("h2",{children:l}):a===3?d.jsx("h3",{children:l}):d.jsx("h4",{children:l})}case"paragraph":return d.jsx("p",{children:kl(t.content)});case"bulletList":return d.jsx("ul",{children:(n=t.content)==null?void 0:n.map((a,l)=>d.jsx("li",{children:kl(a.content)},l))});case"orderedList":return d.jsx("ol",{children:(r=t.content)==null?void 0:r.map((a,l)=>d.jsx("li",{children:kl(a.content)},l))});case"blockquote":return d.jsx("blockquote",{children:kl(t.content)});case"image":return d.jsxs("figure",{children:[d.jsx("img",{src:(s=t.attrs)==null?void 0:s.src,alt:((i=t.attrs)==null?void 0:i.alt)||"",className:"rounded-xl"}),((o=t.attrs)==null?void 0:o.alt)&&d.jsx("figcaption",{children:t.attrs.alt})]});default:return d.jsx("p",{children:kl(t.content)})}}function kl(t){return Array.isArray(t)?t.map((e,n)=>{if(e.type==="text"){let r=e.text;return e.marks&&e.marks.forEach(s=>{var i;s.type==="bold"&&(r=d.jsx("strong",{children:r},n)),s.type==="italic"&&(r=d.jsx("em",{children:r},n)),s.type==="link"&&(r=d.jsx("a",{href:(i=s.attrs)==null?void 0:i.href,target:"_blank",rel:"noopener noreferrer",className:"text-accent hover:underline",children:r},n))}),d.jsx("span",{children:r},n)}return e.type==="hardBreak"?d.jsx("br",{},n):null}):null}function LA(t){return t?t.type==="text"?t.text||"":t.content?t.content.map(LA).join(""):"":""}const Y1="/assets/editorial-charleston-Cu0bEFX3.jpg",V6=[{icon:fi,title:"AI Marketing",path:"/services/ai-marketing",tone:"electric"},{icon:Qa,title:"SEO & AI Search",path:"/services/seo",tone:"accent"},{icon:T3,title:"Voice AI",path:"/services/voice-ai",tone:"magenta"},{icon:M0,title:"Paid Ads",path:"/services/paid-ads",tone:"cta"},{icon:I3,title:"Web Development",path:"/services/web-development",tone:"electric"},{icon:I0,title:"GoHighLevel & Automation",path:"/services/automation",tone:"accent"},{icon:np,title:"Email Marketing",path:"/services/email-marketing",tone:"magenta"},{icon:oN,title:"Local SEO",path:"/services/local-seo",tone:"cta"}],q6={electric:"from-electric/90 to-electric/60 text-electric-foreground",accent:"from-accent/90 to-accent/60 text-accent-foreground",magenta:"from-magenta/90 to-magenta/60 text-magenta-foreground",cta:"from-cta to-cta/70 text-cta-foreground"},G6=[{value:"WV",label:"Born & Based"},{value:"20+",label:"Local Clients"},{value:"5.0â
",label:"Charleston Reviews"},{value:"24/7",label:"Voice AI Available"}];function K6(){return d.jsxs(d.Fragment,{children:[d.jsxs("section",{className:"relative bg-primary overflow-hidden pt-28 pb-20 lg:pt-36 lg:pb-28",children:[d.jsxs("div",{className:"absolute inset-0",children:[d.jsx("img",{src:Y1,alt:"Charleston WV skyline",className:"w-full h-full object-cover opacity-30",loading:"lazy",width:1920,height:1080}),d.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-primary via-primary/85 to-primary/40"}),d.jsx("div",{className:"absolute inset-0 bg-grid-dark opacity-30"})]}),d.jsx("div",{className:"absolute -top-20 right-0 w-[500px] h-[500px] bg-electric/25 rounded-full blur-3xl animate-blob"}),d.jsxs("div",{className:"container-wide mx-auto px-4 lg:px-8 relative",children:[d.jsxs("h1",{className:"font-heading font-black text-primary-foreground tracking-tighter leading-[0.95] text-5xl sm:text-6xl lg:text-8xl max-w-5xl animate-fade-up",style:{animationDelay:"0.1s"},children:["Charleston's",d.jsx("br",{}),d.jsx("span",{className:"serif italic font-normal text-gradient",children:"AI marketing studio."})]}),d.jsx("p",{className:"mt-8 text-lg lg:text-xl text-primary-foreground
446/75 max-w-2xl leading-relaxed animate-fade-up",style:{animationDelay:"0.25s"},children:"We help Charleston-area businesses dominate Google, AI search, local maps, and the new generation of voice-driven discovery. Local roots. National-grade technology."}),d.jsxs("div",{className:"mt-10 flex flex-col sm:flex-row gap-4 animate-fade-up",style:{animationDelay:"0.35s"},children:[d.jsxs("a",{href:"https://api.leadconnectorhq.com/widget/booking/gm0vY68yNGLxXwCHFKLC",target:"_blank",rel:"noopener noreferrer",className:"group inline-flex items-center justify-between gap-3 pl-7 pr-2 py-3 bg-cta text-cta-foreground font-semibold rounded-full hover:bg-cta/90 transition-all shadow-2xl",children:["Book a Charleston Call",d.jsx("span",{className:"w-10 h-10 rounded-full bg-cta-foreground/10 flex items-center justify-center group-hover:translate-x-1 transition-transform",children:d.jsx(pe,{className:"w-4 h-4"})})]}),d.jsx(ne,{to:"/services",className:"inline-flex items-center justify-center gap-2 px-7 py-3 border border-primary-foreground/20 text-primary-foreground font-medium rounded-full hover:bg-primary-foreground/5 transition-all",children:"Explore Services"})]})]})]}),d.jsx(up,{words:["Charleston","Williamson","Lebanon","Huntington","Beckley","South Charleston","Cross Lanes"]}),d.jsx("section",{className:"bg-background border-b border-border",children:d.jsx("div",{className:"container-wide mx-auto px-4 lg:px-8",children:d.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 divide-x divide-border",children:G6.map(t=>d.jsxs("div",{className:"py-12 px-6 text-center",children:[d.jsx("p",{className:"font-heading font-black text-4xl lg:text-6xl text-foreground tracking-tight",children:t.value}),d.jsx("p",{className:"mt-2 text-xs uppercase tracking-widest text-muted-foreground",children:t.label})]},t.label))})})}),d.jsx("section",{className:"section-padding bg-background",children:d.jsx("div",{className:"container-wide mx-auto",children:d.jsxs("div",{className:"grid lg:grid-cols-12 gap-12 items-center",children:[d.jsxs("div",{className:"lg:col-span-7",children:[d.jsx(ut,{eyebrow:"Why Local Matters",title:"A Charleston economy meets the AI-first internet",italicWords:3,subtitle:"Charleston, WV is a vibrant city with a booming small-business community. As buyers shift from Google to ChatGPT, Perplexity, and Maps-first discovery, your visibility depends on a local partner who understands both the market AND the technology."}),d.jsx("div",{className:"mt-8 grid sm:grid-cols-2 gap-3",children:["Comprehensive local digital audits","Custom strategies for the Charleston market","Transparent KPI reporting","Voice AI for after-hours coverage","GoHighLevel CRM implementation","Ongoing optimization & support"].map(t=>d.jsxs("div",{className:"flex items-start gap-3 bg-card p-4 rounded-xl border border-border",children:[d.jsx(ao,{className:"w-5 h-5 text-accent shrink-0 mt-0.5"}),d.jsx("p",{className:"text-foreground text-sm",children:t})]},t))})]}),d.jsxs("div",{className:"lg:col-span-5 relative",children:[d.jsx("div",{className:"absolute -inset-4 bg-gradient-to-br from-electric/30 to-magenta/20 rounded-3xl blur-2xl opacity-50"}),d.jsxs("div",{className:"relative rounded-3xl overflow-hidden border border-border",children:[d.jsx("img",{src:K0,alt:"Charleston team strategy",className:"w-full aspect-[4/5] object-cover",loading:"lazy",width:1280,height:1600}),d.jsx("div",{className:"absolute top-5 left-5",children:d.jsx("span",{className:"inline-flex items-center px-3 py-1.5 rounded-full text-xs font-semibold bg-background/95 text-foreground",children:"Local · Strategic · Results-driven"})})]})]})]})})}),d.jsx("section",{className:"section-padding bg-secondary",children:d.jsxs("div",{className:"container-wide mx-auto",children:[d.jsx(ut,{align:"center",eyebrow:"Available in Charleston",title:"The full Ideation stack at your doorstep",italicWords:3,subtitle:"Every service we offer nationally, delivered with a local team that knows your market."}),d.jsx("div",{className:"mt-14 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-
4465",children:V6.map(t=>d.jsxs(ne,{to:t.path,className:`group relative overflow-hidden rounded-3xl p-6 hover-lift bg-gradient-to-br ${q6[t.tone]}`,children:[d.jsx("div",{className:"absolute -bottom-16 -right-16 w-48 h-48 rounded-full bg-white/10 blur-2xl group-hover:scale-125 transition-transform duration-700"}),d.jsxs("div",{className:"relative flex flex-col gap-6",children:[d.jsxs("div",{className:"flex items-start justify-between",children:[d.jsx(t.icon,{className:"w-7 h-7",strokeWidth:1.75}),d.jsx(pe,{className:"w-5 h-5 opacity-60 group-hover:opacity-100 group-hover:translate-x-1 group-hover:-translate-y-1 transition-all"})]}),d.jsx("h3",{className:"font-heading font-bold text-xl lg:text-2xl leading-tight",children:t.title})]})]},t.path))})]})}),d.jsxs("section",{className:"relative h-[55vh] min-h-[420px] overflow-hidden",children:[d.jsx("img",{src:Y1,alt:"Charleston WV at golden hour",className:"absolute inset-0 w-full h-full object-cover",loading:"lazy",width:1920,height:1080}),d.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-primary via-primary/40 to-transparent"}),d.jsx("div",{className:"container-wide mx-auto px-4 lg:px-8 h-full relative flex items-end pb-16",children:d.jsxs("div",{className:"max-w-3xl",children:[d.jsxs("h2",{className:"font-heading font-black text-4xl lg:text-6xl text-primary-foreground leading-[1.05] tracking-tight",children:["222 Capitol Street. ",d.jsx("span",{className:"serif italic font-normal text-cta",children:"Suite 522."})]}),d.jsx("p",{className:"text-primary-foreground/80 mt-4 text-lg",children:"Charleston, WV 25301 â coffee's on us."})]})})]}),d.jsx(Nr,{title:"Ready to grow your Charleston business?",subtitle:"Let's chat about how AI-powered marketing can transform your local visibility â coffee or Zoom, your call.",buttonText:"Book a Local Call",buttonLink:"https://api.leadconnectorhq.com/widget/booking/gm0vY68yNGLxXwCHFKLC"})]})}const Y6=[{title:"Competitive Analysis & Strategy",desc:"We sit alongside your team and dissect your market â competitors, gaps, opportunities, positioning. You'll leave with a battle-tested playbook your team can execute.",image:iA,label:"01 / Strategy",bullets:["Market & competitor audit","Positioning framework","12-month growth roadmap","KPI dashboard setup"]},{title:"SEO & AI Search Workshops",desc:"Hands-on training and ongoing guidance for your in-house team. We teach you how to rank in Google, ChatGPT, Perplexity, and the AI search engines that own tomorrow.",image:oA,label:"02 / Enablement",bullets:["Live workshops & playbooks","Custom SOPs for your team","Monthly strategy reviews","Direct slack/email support"]},{title:"Social Media & Content Coaching",desc:"Build your brand, sharpen your messaging, and engage your audience across every platform â with the strategic muscle of an agency and the agility of doing it yourself.",image:K0,label:"03 / Coaching",bullets:["Content calendar templates","Brand voice guidelines","Creative direction","Performance reviews"]}],J6=[{icon:uN,title:"You Stay in Control",desc:"Your team owns the work. We bring the strategy, frameworks, and senior expertise."},{icon:M0,title:"Faster Skill Building",desc:"Your team levels up while we're working. Knowledge stays in-house permanently."},{icon:rp,title:"Lower Investment",desc:"Done-with-you is significantly more affordable than full done-for-you engagements."}];function Q6(){return d.jsxs(d.Fragment,{children:[d.jsx(tl,{eyebrow:"Done-With-You",title:"Strategy, frameworks, and senior expertise â without losing control",italicWords:3,subtitle:"Collaborative engagements where we plug into your team, share our playbooks, and build the strategic muscle your business needs to scale.",ctaLabel:"Book a Discovery Call",ctaHref:"https://api.leadconnectorhq.com/widget/booking/gm0vY68yNGLxXwCHFKLC",secondaryLabel:"Compare Done-For-You",secondaryHref:"/services"}),d.jsx("section",{className:"section-padding bg-background border-b border-border",children:d.jsxs("div",{className:"container-wide mx-auto",children:[d.jsx(ut,{align:"center",eyebrow:"Why Done-With-You",title:"The best of both worlds",italicWords:2,subtitle:"When you have a capable internal team but need senior-level strategy and proven frameworks, this is the engagement model that fits."}),d.jsx("div",{className:"mt-14 grid md:grid-cols-3 gap-5",children:J6.map(t=>d.jsxs("div",{className:"group bg-card rounded-3xl p-8 border border-border hover:border-foreground transition-all",children:[d.jsx("div",{className:"w-12 h-12 rounded-2xl bg-foreground text-background flex items-center justify-center group-hover:bg-accent group-hover:text-accent-foreground transition-colors",children:d.jsx(t.icon,{className:"w-6 h-6"})}),d.jsx("h3",{className:"font-heading font-bold text-xl text-foreground mt-6",children:t.title}),d.jsx("p",{className:"text-muted-foreground mt-3 leading-relaxed",children:t.desc})]},t.title))})]})}),d.jsx("section",{className:"bg-background",children:Y6.map((t,e)=>{const n=e%2!==0;return d.jsx("div",{className:"border-b border-border",children:d.jsx("div",{className:"container-wide mx-auto px-4 lg:px-8 py-20 lg:py-28",children:d.jsxs("div",{className:"grid lg:grid-cols-12 gap-12 items-center",children:[d.jsxs("div",{className:`lg:col-span-6 relative group ${n?"lg:order-2":""}`,children:[d.jsx("div",{className:"absolute -inset-4 bg-gradient-to-br from-electric/30 to-magenta/20 rounded-3xl blur-2xl opacity-40 group-hover:opacity-70 transition-opacity"}),d.jsxs("div",{className:"relative rounded-3xl overflow-hidden border border-border",children:[d.jsx("img",{src:t.image,alt:t.title,className:"w-full aspect-[4/3] object-cover group-hover:scale-105 transition-transform duration-700",loading:"lazy",width:1280,height:960}),d.jsx("div",{className:"absolute top-5 left-5",children:d.jsx("span",{className:"inline-flex items-center px-3 py-1.5 rounded-full text-xs font-semibold bg-cta text-cta-foreground",children:t.label})})]})]}),d.jsxs("div",{className:`lg:col-span-6 ${n?"lg:order-1":""}`,children:[d.jsx("span",{className:"serif text-5xl font-normal text-foreground
446/15",children:t.label.split(" ")[0]}),d.jsx("h2",{className:"font-heading font-black text-3xl lg:text-5xl text-foreground tracking-tight leading-[1.05] mt-2",children:t.title}),d.jsx("p",{className:"mt-5 text-lg text-muted-foreground leading-relaxed",children:t.desc}),d.jsx("div",{className:"mt-8 grid sm:grid-cols-2 gap-3",children:t.bullets.map(r=>d.jsxs("div",{className:"flex items-start gap-2",children:[d.jsx(ao,{className:"w-5 h-5 text-accent shrink-0 mt-0.5"}),d.jsx("p",{className:"text-foreground text-sm",children:r})]},r))}),d.jsxs("a",{href:"https://api.leadconnectorhq.com/widget/booking/gm0vY68yNGLxXwCHFKLC",target:"_blank",rel:"noopener noreferrer",className:"group/cta inline-flex items-center justify-between gap-4 mt-10 pl-6 pr-2 py-2 bg-foreground text-background font-semibold rounded-full hover:bg-primary transition-all",children:["Get Started",d.jsx("span",{className:"w-10 h-10 rounded-full bg-background/15 flex items-center justify-center group-hover/cta:translate-x-1 transition-transform",children:d.jsx(pe,{className:"w-4 h-4"})})]})]})]})})},t.title)})}),d.jsx(Nr,{title:"Not sure which model is right for you?",subtitle:"Done-with-you, done-for-you, or hybrid â we'll help you figure out the engagement that fits your team and goals.",buttonText:"Book a Free Call",buttonLink:"https://api.leadconnectorhq.com/widget/booking/gm0vY68yNGLxXwCHFKLC"})]})}function X6(){return d.jsxs(d.Fragment,{children:[d.jsx(tl,{title:"Privacy Policy",compact:!0}),d.jsx("section",{className:"section-padding bg-background",children:d.jsxs("div",{className:"container-narrow mx-auto prose prose-slate max-w-none",children:[d.jsx("p",{className:"text-muted-foreground",children:"At Ideation Digital, we are committed to protecting your privacy. This Privacy Policy outlines how we collect, use, and safeguard your personal information when you visit our website or use our services."}),d.jsx("h2",{className:"font-heading font-bold text-xl text-foreground mt-8",children:"Information We Collect"}),d.jsx("p",{className:"text-muted-foreground",children:"We may collect personal information such as your name, email address, phone number, and business information when you contact us, fill out a form, or schedule a consultation."}),d.jsx("h2",{className:"font-heading font-bold text-xl text-foreground mt-8",children:"How We Use Your Information"}),d.jsx("p",{className:"text-muted-foreground",children:"We use the information we collect to provide and improve our services, communicate with you, and send relevant marketing information with your consent."}),d.jsx("h2",{className:"font-heading font-bold text-xl text-foreground mt-8",children:"Contact"}),d.jsxs("p",{className:"text-muted-foreground",children:["If you have questions about this Privacy Policy, please contact us at ",d.jsx("a",{href:"mailto:[email protected]",className:"text-accent",children:"[email protected]"})," or call ",d.jsx("a",{href:"tel:3048142445",className:"text-accent",children:"(304) 814-2445"}),"."]})]})})]})}const Z6=()=>{const t=is();return w.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",t.pathname)},[t.pathname]),d.jsx("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:d.jsxs("div",{className:"text-center",children:[d.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),d.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),d.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Return to Home"})]})})},rn=w.forwardRef(({className:t,type:e,...n},r)=>d.jsx("input",{type:e,className:rt("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),ref:r,...n}));rn.displayName="Input";const eH=ep("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),qt=w.forwardRef(({className:t,variant:e,size:n,asChild:r=!1,...s},i)=>{const o=r?cD:"button";return d.jsx(o,{className:rt(eH({variant:e,size:n,className:t})),ref:i,...s})});
446qt.displayName="Button";var tH="Label",DA=w.forwardRef((t,e)=>d.jsx(be.label,{...t,ref:e,onMouseDown:n=>{var s;n.target.closest("button, input, select, textarea")||((s=t.onMouseDown)==null||s.call(t,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));DA.displayName=tH;var $A=DA;const nH=ep("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Pt=w.forwardRef(({className:t,...e},n)=>d.jsx($A,{ref:n,className:rt(nH(),t),...e}));Pt.displayName=$A.displayName;const rH="https://jcnyzzajtipmhcpjewwp.supabase.co/functions/v1";function sH(){const t=Ja(),[e,n]=w.useState(""),[r,s]=w.useState(""),[i,o]=w.useState(!1),[a,l]=w.useState("login"),[c,u]=w.useState(!0);w.useEffect(()=>{Te.auth.getSession().then(({data:f})=>{f.session?h(f.session.access_token).then(g=>{g&&t("/admin/posts"),u(!1)}):u(!1)})},[t]);const h=async f=>{var b;const g=((b=(await Te.auth.getUser()).data.user)==null?void 0:b.id)||"",{data:m}=await Te.from("user_roles").select("role").eq("user_id",g).eq("role","admin").maybeSingle();return m?!0:(await(await fetch(`${rH}/bootstrap-admin`,{method:"POST",headers:{authorization:`Bearer ${f}`}})).json()).success===!0},p=async f=>{f.preventDefault(),o(!0);try{if(a==="signup"){const{data:g,error:m}=await Te.auth.signUp({email:e,password:r});if(m)throw m;g.session&&await h(g.session.access_token),sn.success("Account created. You can now manage posts."),t("/admin/posts")}else{const{data:g,error:m}=await Te.auth.signInWithPassword({email:e,password:r});if(m)throw m;if(!await h(g.session.access_token)){sn.error("You do not have admin access."),await Te.auth.signOut(),o(!1);return}sn.success("Welcome back."),t("/admin/posts")}}catch(g){sn.error(g.message||"Authentication failed.")}finally{o(!1)}};return c?d.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:d.jsx(Mi,{className:"w-8 h-8 animate-spin text-accent"})}):d.jsxs(d.Fragment,{children:[d.jsxs(du,{children:[d.jsx("title",{children:"Admin Access | Ideation Digital"}),d.jsx("meta",{name:"robots",content:"noindex, nofollow"})]}),d.jsx("div",{className:"min-h-screen flex items-center justify-center bg-secondary px-4",children:d.jsxs("div",{className:"w-full max-w-md bg-card border border-border rounded-3xl p-8 shadow-2xl",children:[d.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[d.jsx("div",{className:"w-10 h-10 rounded-xl bg-foreground text-background flex items-center justify-center",children:d.jsx(P3,{className:"w-5 h-5"})}),d.jsx("h1",{className:"font-heading font-bold text-2xl text-foreground",children:"Admin Access"})]}),d.jsx("p",{className:"text-muted-foreground text-sm mb-8",children:a==="login"?"Sign in to manage blog posts.":"Create the first admin account."}),d.jsxs("form",{onSubmit:p,className:"space-y-5",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsx(Pt,{htmlFor:"email",children:"Email"}),d.jsx(rn,{id:"email",type:"email",value:e,onChange:f=>n(f.target.value),placeholder:"[email protected]",required:!0,className:"rounded-xl"})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Pt,{htmlFor:"password",children:"Password"}),d.jsx(rn,{id:"password",type:"password",value:r,onChange:f=>s(f.target.value),placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",required:!0,minLength:8,className:"rounded-xl"})]}),d.jsxs(qt,{type:"submit",disabled:i,className:"w-full rounded-full bg-cta text-cta-foreground hover:bg-cta/90 font-semibold",children:[i&&d.jsx(Mi,{className:"w-4 h-4 mr-2 animate-spin"}),a==="login"?"Sign In":"Create Admin Account"]})]}),d.jsx("button",{type:"button",onClick:()=>l(a==="login"?"signup":"login"),className:"mt-6 text-sm text-accent hover:underline w-full text-center",children:a==="login"?"Need to create an admin account?":"Already have an account? Sign in"})]})})]})}function iH(){const t=Ja(),[e,n]=w.useState([]),[r,s]=w.useState(!0);w.useEffect(()=>{(async()=>{const{data:c}=await Te.auth.getSession();if(!c.session){t("/admin/login");return}i()})()},[t]);const i=async()=>{s(!0);const{data:l,error:c}=await Te.from("posts").select("*").order("created_at",{ascending:!1});c?sn.error(c.message):n(l||[]),s(!1)},o=async l=>{if(!confirm("Are you sure you want to delete this post?"))return;const{error:c}=await Te.from("posts").delete().eq("id",l);c?sn.error(c.message):(sn.success("Post deleted."),n(e.filter(u=>u.id!==l)))},a=l=>l.status==="published"&&l.published_at&&new Date(l.published_at)<=new Date?"Published":l.status==="scheduled"?"Scheduled":"Draft";return r?d.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:d.jsx(Mi,{className:"w-8 h-8 animate-spin text-accent"})}):d.jsxs(d.Fragment,{children:[d.jsxs(du,{children:[d.jsx("title",{children:"Blog Admin | Ideation Digital"}),d.jsx("meta",{name:"robots",content:"noindex, nofollow"})]}),d.jsxs("div",{className:"min-h-screen bg-background",children:[d.jsx("div",{className:"border-b border-border bg-card",children:d.jsxs("div",{className:"container-wide mx-auto px-4 lg:px-8 h-20 flex items-center justify-between",children:[d.jsx("h1",{className:"font-heading font-bold text-xl text-foreground",children:"Blog Admin"}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(ne,{to:"/blog",className:"text-sm text-muted-foreground hover:text-foreground transition-colors",children:"View blog"}),d.jsx(qt,{asChild:!0,className:"rounded-full bg-cta text-cta-foreground hover:bg-cta/90 font-semibold",children:d.jsxs(ne,{to:"/admin/posts/new",children:[d.jsx(A3,{className:"w-4 h-4 mr-2"})," New post"]})})]})]})}),d.jsx("div",{className:"container-wide mx-auto px-4 lg:px-8 py-12",children:d.jsx("div",{className:"bg-card border border-border rounded-3xl overflow-hidden",children:d.jsxs("table",{className:"w-full text-left",children:[d.jsx("thead",{className:"bg-secondary border-b border-border",children:d.jsxs("tr",{children:[d.jsx("th",{className:"px-6 py-4 text-xs font-semibold text-muted-foreground uppercase tracking-wider",children:"Title"}),d.jsx("th",{className:"px-6 py-4 text-xs font-semibold text-muted-foreground uppercase tracking-wider",children:"Slug"}),d.jsx("th",{className:"px-6 py-4 text-xs font-semibold text-muted-foreground uppercase tracking-wider",children:"Status"}),d.jsx("th",{className:"px-6 py-4 text-xs font-semibold text-muted-foreground uppercase tracking-wider",children:"Category"}),d.jsx("th",{className:"px-6 py-4 text-xs font-semibold text-muted-foreground uppercase tracking-wider",children:"Updated"}),d.jsx("th",{className:"px-6 py-4 text-xs font-semibold text-muted-foreground uppercase tracking-wider text-right",children:"Actions"})]})}),d.jsxs("tbody",{className:"divide-y divide-border",children:[e.map(l=>d.jsxs("tr",{className:"hover:bg-secondary/50 transition-colors",children:[d.jsx("td",{className:"px-6 py-4 font-medium text-foreground",children:l.title}),d.jsx("td",{className:"px-6 py-4 text-sm text-muted-foreground",children:l.slug}),d.jsx("td",{className:"px-6 py-4",children:d.jsx("span",{className:`inline-flex items-center px-2.5 py-1 rounded-full text-xs font-medium ${a(l)==="Published"?"bg-green-100 text-green-700":a(l)==="Scheduled"?"bg-amber-100 text-amber-700":"bg-slate-100 text-slate-700"}`,children:a(l)})}),d.jsx("td",{className:"px-6 py-4 text-sm text-muted-foreground",children:l.category||"â"}),d.jsx("td",{className:"px-6 py-4 text-sm text-muted-foreground",children:new Date(l.updated_at).toLocaleDateString()}),d.jsx("td",{className:"px-6 py-4 text-right",children:d.jsxs("div",{className:"flex items-center justify-end gap-2",children:[d.jsx(ne,{to:`/blog/${l.slug}`,target:"_blank",className:"p-2 rounded-lg hover:bg-secondary text-muted-foreground hover:text-foreground transition-colors",title:"Preview public post",children:d.jsx(l3,{className:"w-4 h-4"})}),d.jsx(ne,{to:`/admin/posts/${l.id}`,className:"p-2 rounded-lg hover:bg-secondary text-muted-foreground hover:text-foreground transition-colors",title:"Edit",children:d.jsx(N3,{className:"w-4 h-4"})}),d.jsx("button",{onClick:()=>o(l.id),className:"p-2 rounded-lg hover:bg-destructive/10 text-muted-foreground hover:text-destructive transition-colors",title:"Delete",children:d.jsx(z3,{className:"w-4 h-4"})})]})})]},l.id)),e.length===0&&d.jsx("tr",{children:d.jsxs("td",{colSpan:6,className:"px-6 py-12 text-center text-muted-foreground",children:["No posts yet. ",d.jsx(ne,{to:"/admin/posts/new",className:"text-accent hover:underline",children:"Create your first post"}),"."]})})]})]})})})]})]})}const Dy=w.forwardRef(({className:t,...e},n)=>d.jsx("textarea",{className:rt("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
446ing-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),ref:n,...e}));Dy.displayName="Textarea";function J1(t,[e,n]){return Math.min(n,Math.max(e,t))}var oH=w.createContext(void 0);function aH(t){const e=w.useContext(oH);return t||e||"ltr"}var Om=0;function lH(){w.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??Q1()),document.body.insertAdjacentElement("beforeend",t[1]??Q1()),Om++,()=>{Om===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),Om--}},[])}function Q1(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var Rm="focusScope.autoFocusOnMount",Mm="focusScope.autoFocusOnUnmount",X1={bubbles:!1,cancelable:!0},cH="FocusScope",zA=w.forwardRef((t,e)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=t,[a,l]=w.useState(null),c=nr(s),u=nr(i),h=w.useRef(null),p=Ge(e,m=>l(m)),f=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(r){let m=function(x){if(f.paused||!a)return;const k=x.target;a.contains(k)?h.current=k:vs(h.current,{select:!0})},y=function(x){if(f.paused||!a)return;const k=x.relatedTarget;k!==null&&(a.contains(k)||vs(h.current,{select:!0}))},v=function(x){if(document.activeElement===document.body)for(const S of x)S.removedNodes.length>0&&vs(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",y);const b=new MutationObserver(v);return a&&b.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",y),b.disconnect()}}},[r,a,f.paused]),w.useEffect(()=>{if(a){ek.add(f);const m=document.activeElement;if(!a.contains(m)){const v=new CustomEvent(Rm,X1);a.addEventListener(Rm,c),a.dispatchEvent(v),v.defaultPrevented||(uH(mH(BA(a)),{select:!0}),document.activeElement===m&&vs(a))}return()=>{a.removeEventListener(Rm,c),setTimeout(()=>{const v=new CustomEvent(Mm,X1);a.addEventListener(Mm,u),a.dispatchEvent(v),v.defaultPrevented||vs(m??document.body,{select:!0}),a.removeEventListener(Mm,u),ek.remove(f)},0)}}},[a,c,u,f]);const g=w.useCallback(m=>{if(!n&&!r||f.paused)return;const y=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,v=document.activeElement;if(y&&v){const b=m.currentTarget,[x,k]=dH(b);x&&k?!m.shiftKey&&v===k?(m.preventDefault(),n&&vs(x,{select:!0})):m.shiftKey&&v===x&&(m.preventDefault(),n&&vs(k,{select:!0})):v===b&&m.preventDefault()}},[n,r,f.paused]);return d.jsx(be.div,{tabIndex:-1,...o,ref:p,onKeyDown:g})});zA.displayName=cH;function uH(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(vs(r,{select:e}),document.activeElement!==n)return}function dH(t){const e=BA(t),n=Z1(e,t),r=Z1(e.reverse(),t);return[n,r]}function BA(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function Z1(t,e){for(const n of t)if(!hH(n,{upTo:e}))return n}function hH(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function fH(t){return t instanceof HTMLInputElement&&"select"in t}function vs(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&fH(t)&&e&&t.select()}}var ek=pH();function pH(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=tk(t,e),t.unshift(e)},remove(e){var n;t=tk(t,e),(n=t[0])==null||n.resume()}}}function tk(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function mH(t){return t.filter(e=>e.tagName!=="A")}function gH(t){const e=w.useRef({value:t,previous:t});return w.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}var yH=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Po=new WeakMap,rd=new WeakMap,sd={},Pm=0,FA=function(t){return t&&(t.host||FA(t.parentNode))},vH=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=FA(n);return r&&t.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},bH=function(t,e,n,r){var s=vH(e,Array.isArray(t)?t:[t]);sd[n]||(sd[n]=new WeakMap);var i=sd[n],o=[],a=new Set,l=new Set(s),c=function(h){!h||a.has(h)||(a.add(h),c(h.parentNode))};
vendor: 6,462 bytes, lines 446-461
446s.forEach(c);var u=function(h){!h||l.has(h)||Array.prototype.forEach.call(h.children,function(p){if(a.has(p))u(p);else try{var f=p.getAttribute(r),g=f!==null&&f!=="false",m=(Po.get(p)||0)+1,y=(i.get(p)||0)+1;Po.set(p,m),i.set(p,y),o.push(p),m===1&&g&&rd.set(p,!0),y===1&&p.setAttribute(n,"true"),g||p.setAttribute(r,"true")}catch(v){console.error("aria-hidden: cannot operate on ",p,v)}})};return u(e),a.clear(),Pm++,function(){o.forEach(function(h){var p=Po.get(h)-1,f=i.get(h)-1;Po.set(h,p),i.set(h,f),p||(rd.has(h)||h.removeAttribute(r),rd.delete(h)),f||h.removeAttribute(n)}),Pm--,Pm||(Po=new WeakMap,Po=new WeakMap,rd=new WeakMap,sd={})}},xH=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),s=yH(t);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live]"))),bH(r,s,n,"aria-hidden")):function(){return null}},vr=function(){return vr=Object.assign||function(e){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},vr.apply(this,arguments)};function WA(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(t);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(n[r[s]]=t[r[s]]);return n}function wH(t,e,n){if(n||arguments.length===2)for(var r=0,s=e.length,i;r<s;r++)(i||!(r in e))&&(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}var Hd="right-scroll-bar-position",Ud="width-before-scroll-bar",kH="with-scroll-bars-hidden",SH="--removed-body-scroll-bar-size";function Im(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function CH(t,e){var n=w.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(r){var s=n.value;s!==r&&(n.value=r,n.callback(r,s))}}}})[0];return n.callback=e,n.facade}var EH=typeof window<"u"?w.useLayoutEffect:w.useEffect,nk=new WeakMap;function TH(t,e){var n=CH(null,function(r){return t.forEach(function(s){return Im(s,r)})});return EH(function(){var r=nk.get(n);if(r){var s=new Set(r),i=new Set(t),o=n.current;s.forEach(function(a){i.has(a)||Im(a,null)}),i.forEach(function(a){s.has(a)||Im(a,o)})}nk.set(n,t)},[t]),n}function NH(t){return t}function AH(t,e){e===void 0&&(e=NH);var n=[],r=!1,s={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:t},useMedium:function(i){var o=e(i,r);return n.push(o),function(){n=n.filter(function(a){return a!==o})}},assignSyncMedium:function(i){for(r=!0;n.length;){var o=n;n=[],o.forEach(i)}n={push:function(a){return i(a)},filter:function(){return n}}},assignMedium:function(i){r=!0;var o=[];if(n.length){var a=n;n=[],a.forEach(i),o=n}var l=function(){var u=o;o=[],u.forEach(i)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(u){o.push(u),c()},filter:function(u){return o=o.filter(u),n}}}};return s}function _H(t){t===void 0&&(t={});var e=AH(null);return e.options=vr({async:!0,ssr:!1},t),e}var HA=function(t){var e=t.sideCar,n=WA(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=e.read();if(!r)throw new Error("Sidecar medium not found");return w.createElement(r,vr({},n))};HA.isSideCarExport=!0;function jH(t,e){return t.useMedium(e),HA}var UA=_H(),Lm=function(){},gp=w.forwardRef(function(t,e){var n=w.useRef(null),r=w.useState({onScrollCapture:Lm,onWheelCapture:Lm,onTouchMoveCapture:Lm}),s=r[0],i=r[1],o=t.forwardProps,a=t.children,l=t.className,c=t.removeScrollBar,u=t.enabled,h=t.shards,p=t.sideCar,f=t.noRelative,g=t.noIsolation,m=t.inert,y=t.allowPinchZoom,v=t.as,b=v===void 0?"div":v,x=t.gapMode,k=WA(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=p,C=TH([n,e]),E=vr(vr({},k),s);return w.createElement(w.Fragment,null,u&&w.createElement(S,{sideCar:UA,removeScrollBar:c,shards:h,noRelative:f,noIsolation:g,inert:m,setCallbacks:i,allowPinchZoom:!!y,lockRef:n,gapMode:x}),o?w.cloneElement(w.Children.only(a),vr(vr({},E),{ref:C})):w.createElement(b,vr({},E,{className:l,ref:C}),a))});gp.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};gp.classNames={fullWidth:Ud,zeroRight:Hd};var OH=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function RH(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=OH();return e&&t.setAttribute("nonce",e),t}function MH(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function PH(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var IH=function(){var t=0,e=null;return{add:function(n){t==0&&(e=RH())&&(MH(e,n),PH(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},LH=function(){var t=IH();return function(e,n){w.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},VA=function(){var t=LH(),e=function(n){var r=n.styles,s=n.dynamic;return t(r,s),null};return e},DH={left:0,top:0,right:0,gap:0},Dm=function(t){return parseInt(t||"",10)||0},$H=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],r=e[t==="padding"?"paddingTop":"marginTop"],s=e[t==="padding"?"paddingRight":"marginRight"];return[Dm(n),Dm(r),Dm(s)]},zH=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return DH;var e=$H(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}},BH=VA(),ma="data-scroll-locked",FH=function(t,e,n,r){var s=t.left,i=t.top,o=t.right,a=t.gap;return n===void 0&&(n="margin"),` 447 .`.concat(kH,` { 448 overflow: hidden `).concat(r,`; 449 padding-right: `).concat(a,"px ").concat(r,`; 450 } 451 body[`).concat(ma,`] { 452 overflow: hidden `).concat(r,`; 453 overscroll-behavior: contain; 454 `).concat([e&&"position: relative ".concat(r,";"),n==="margin"&&` 455 padding-left: `.concat(s,`px; 456 padding-top: `).concat(i,`px; 457 padding-right: `).concat(o,`px; 458 margin-left:0; 459 margin-top:0; 460 margin-right: `).concat(a,"px ").concat(r,`; 461 `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";
461")].filter(Boolean).join(""),` 462 } 463 464 .`).concat(Hd,` { 465 right: `).concat(a,"px ").concat(r,`; 466 } 467 468 .`).concat(Ud,` { 469 margin-right: `).concat(a,"px ").concat(r,`; 470 } 471 472 .`).concat(Hd," .").concat(Hd,` { 473 right: 0 `).concat(r,`; 474 } 475 476 .`).concat(Ud," .").concat(Ud,` { 477 margin-right: 0 `).concat(r,`; 478 } 479 480 body[`).concat(ma,`] { 481 `).concat(SH,": ").concat(a,`px; 482 } 483`)},rk=function(){var t=parseInt(document.body.getAttribute(ma)||"0",10);return isFinite(t)?t:0},WH=function(){w.useEffect(function(){return document.body.setAttribute(ma,(rk()+1).toString()),function(){var t=rk()-1;t<=0?document.body.removeAttribute(ma):document.body.setAttribute(ma,t.toString())}},[])},HH=function(t){var e=t.noRelative,n=t.noImportant,r=t.gapMode,s=r===void 0?"margin":r;WH();var i=w.useMemo(function(){return zH(s)},[s]);return w.createElement(BH,{styles:FH(i,!e,s,n?"":"!important")})},$y=!1;if(typeof window<"u")try{var id=Object.defineProperty({},"passive",{get:function(){return $y=!0,!0}});window.addEventListener("test",id,id),window.removeEventListener("test",id,id)}catch{$y=!1}var Io=$y?{passive:!1}:!1,UH=function(t){return t.tagName==="TEXTAREA"},qA=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!UH(t)&&n[e]==="visible")},VH=function(t){return qA(t,"overflowY")},qH=function(t){return qA(t,"overflowX")},sk=function(t,e){var n=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=GA(t,r);if(s){var i=KA(t,r),o=i[1],a=i[2];if(o>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},GH=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},KH=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},GA=function(t,e){return t==="v"?VH(e):qH(e)},KA=function(t,e){return t==="v"?GH(e):KH(e)},YH=function(t,e){return t==="h"&&e==="rtl"?-1:1},JH=function(t,e,n,r,s){var i=YH(t,window.getComputedStyle(e).direction),o=i*r,a=n.target,l=e.contains(a),c=!1,u=o>0,h=0,p=0;do{if(!a)break;var f=KA(t,a),g=f[0],m=f[1],y=f[2],v=m-y-i*g;(g||v)&&GA(t,a)&&(h+=v,p+=g);var b=a.parentNode;a=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(u&&(Math.abs(h)<1||!s)||!u&&(Math.abs(p)<1||!s))&&(c=!0),c},od=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},ik=function(t){return[t.deltaX,t.deltaY]},ok=function(t){return t&&"current"in t?t.current:t},QH=function(t,e){return t[0]===e[0]&&t[1]===e[1]},XH=function(t){return` 484 .block-interactivity-`.concat(t,` {pointer-events: none;} 485 .allow-interactivity-`).concat(t,` {pointer-events: all;} 486`)},ZH=0,Lo=[];function eU(t){var e=w.useRef([]),n=w.useRef([0,0]),r=w.useRef(),s=w.useState(ZH++)[0],i=w.useState(VA)[0],o=w.useRef(t);w.useEffect(function(){o.current=t},[t]),w.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var m=wH([t.lockRef.current],(t.shards||[]).map(ok),!0).filter(Boolean);return m.forEach(function(y){return y.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),m.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var a=w.useCallback(function(m,y){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!o.current.allowPinchZoom;var v=od(m),b=n.current,x="deltaX"in m?m.deltaX:b[0]-v[0],k="deltaY"in m?m.deltaY:b[1]-v[1],S,C=m.target,E=Math.abs(x)>Math.abs(k)?"h":"v";if("touches"in m&&E==="h"&&C.type==="range")return!1;var T=sk(E,C);if(!T)return!0;if(T?S=E:(S=E==="v"?"h":"v",T=sk(E,C)),!T)return!1;if(!r.current&&"changedTouches"in m&&(x||k)&&(r.current=S),!S)return!0;var N=r.current||S;return JH(N,y,m,N==="h"?x:k,!0)},[]),l=w.useCallback(function(m){var y=m;if(!(!Lo.length||Lo[Lo.length-1]!==i)){var v="deltaY"in y?ik(y):od(y),b=e.current.filter(function(S){return S.name===y.type&&(S.target===y.target||y.target===S.shadowParent)&&QH(S.delta,v)}
vendor: 4,186 bytes, line 486
486)[0];if(b&&b.should){y.cancelable&&y.preventDefault();return}if(!b){var x=(o.current.shards||[]).map(ok).filter(Boolean).filter(function(S){return S.contains(y.target)}),k=x.length>0?a(y,x[0]):!o.current.noIsolation;k&&y.cancelable&&y.preventDefault()}}},[]),c=w.useCallback(function(m,y,v,b){var x={name:m,delta:y,target:v,should:b,shadowParent:tU(v)};e.current.push(x),setTimeout(function(){e.current=e.current.filter(function(k){return k!==x})},1)},[]),u=w.useCallback(function(m){n.current=od(m),r.current=void 0},[]),h=w.useCallback(function(m){c(m.type,ik(m),m.target,a(m,t.lockRef.current))},[]),p=w.useCallback(function(m){c(m.type,od(m),m.target,a(m,t.lockRef.current))},[]);w.useEffect(function(){return Lo.push(i),t.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:p}),document.addEventListener("wheel",l,Io),document.addEventListener("touchmove",l,Io),document.addEventListener("touchstart",u,Io),function(){Lo=Lo.filter(function(m){return m!==i}),document.removeEventListener("wheel",l,Io),document.removeEventListener("touchmove",l,Io),document.removeEventListener("touchstart",u,Io)}},[]);var f=t.removeScrollBar,g=t.inert;return w.createElement(w.Fragment,null,g?w.createElement(i,{styles:XH(s)}):null,f?w.createElement(HH,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function tU(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const nU=jH(UA,eU);var YA=w.forwardRef(function(t,e){return w.createElement(gp,vr({},t,{ref:e,sideCar:nU}))});YA.classNames=gp.classNames;var rU=[" ","Enter","ArrowUp","ArrowDown"],sU=[" ","Enter"],uo="Select",[yp,vp,iU]=OT(uo),[rl,JJ]=hu(uo,[iU,ap]),bp=ap(),[oU,pi]=rl(uo),[aU,lU]=rl(uo),JA=t=>{const{__scopeSelect:e,children:n,open:r,defaultOpen:s,onOpenChange:i,value:o,defaultValue:a,onValueChange:l,dir:c,name:u,autoComplete:h,disabled:p,required:f,form:g}=t,m=bp(e),[y,v]=w.useState(null),[b,x]=w.useState(null),[k,S]=w.useState(!1),C=aH(c),[E,T]=Ch({prop:r,defaultProp:s??!1,onChange:i,caller:uo}),[N,_]=Ch({prop:o,defaultProp:a,onChange:l,caller:uo}),z=w.useRef(null),I=y?g||!!y.closest("form"):!0,[H,M]=w.useState(new Set),U=Array.from(H).map(V=>V.props.value).join(";");return d.jsx(G$,{...m,children:d.jsxs(oU,{required:f,scope:e,trigger:y,onTriggerChange:v,valueNode:b,onValueNodeChange:x,valueNodeHasChildren:k,onValueNodeHasChildrenChange:S,contentId:D0(),value:N,onValueChange:_,open:E,onOpenChange:T,dir:C,triggerPointerDownPosRef:z,disabled:p,children:[d.jsx(yp.Provider,{scope:e,children:d.jsx(aU,{scope:t.__scopeSelect,onNativeOptionAdd:w.useCallback(V=>{M(Q=>new Set(Q).add(V))},[]),onNativeOptionRemove:w.useCallback(V=>{M(Q=>{const A=new Set(Q);return A.delete(V),A})},[]),children:n})}),I?d.jsxs(x_,{"aria-hidden":!0,required:f,tabIndex:-1,name:u,autoComplete:h,value:N,onChange:V=>_(V.target.value),disabled:p,form:g,children:[N===void 0?d.jsx("option",{value:""}):null,Array.from(H)]},U):null]})})};JA.displayName=uo;var QA="SelectTrigger",XA=w.forwardRef((t,e)=>{const{__scopeSelect:n,disabled:r=!1,...s}=t,i=bp(n),o=pi(QA,n),a=o.disabled||r,l=Ge(e,o.onTriggerChange),c=vp(n),u=w.useRef("touch"),[h,p,f]=k_(m=>{const y=c().filter(x=>!x.disabled),v=y.find(x=>x.value===o.value),b=S_(y,m,v);b!==void 0&&o.onValueChange(b.value)}),g=m=>{a||(o.onOpenChange(!0),f()),m&&(o.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return d.jsx(WN,{asChild:!0,...i,children:d.jsx(be.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":w_(o.value)?"":void 0,...s,ref:l,onClick:ue(s.onClick,m=>{m.currentTarget.focus(),u.current!=="mouse"&&g(m)}),onPointerDown:ue(s.onPointerDown,m=>{u.current=m.pointerType;const y=m.target;y.hasPointerCapture(m.pointerId)&&y.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(g(m),m.preventDefault())}),onKeyDown:ue(s.onKeyDown,m=>{const y=h.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&p(m.key),!(y&&m.key===" ")&&rU.includes(m.key)&&
vendor: 15,648 bytes, line 486
486(g(),m.preventDefault())})})})});XA.displayName=QA;var ZA="SelectValue",e_=w.forwardRef((t,e)=>{const{__scopeSelect:n,className:r,style:s,children:i,placeholder:o="",...a}=t,l=pi(ZA,n),{onValueNodeHasChildrenChange:c}=l,u=i!==void 0,h=Ge(e,l.onValueNodeChange);return kt(()=>{c(u)},[c,u]),d.jsx(be.span,{...a,ref:h,style:{pointerEvents:"none"},children:w_(l.value)?d.jsx(d.Fragment,{children:o}):i})});e_.displayName=ZA;var cU="SelectIcon",t_=w.forwardRef((t,e)=>{const{__scopeSelect:n,children:r,...s}=t;return d.jsx(be.span,{"aria-hidden":!0,...s,ref:e,children:r||"â¼"})});t_.displayName=cU;var uU="SelectPortal",n_=t=>d.jsx(N0,{asChild:!0,...t});n_.displayName=uU;var ho="SelectContent",r_=w.forwardRef((t,e)=>{const n=pi(ho,t.__scopeSelect),[r,s]=w.useState();if(kt(()=>{s(new DocumentFragment)},[]),!n.open){const i=r;return i?bo.createPortal(d.jsx(s_,{scope:t.__scopeSelect,children:d.jsx(yp.Slot,{scope:t.__scopeSelect,children:d.jsx("div",{children:t.children})})}),i):null}return d.jsx(i_,{...t,ref:e})});r_.displayName=ho;var Bn=10,[s_,mi]=rl(ho),dU="SelectContentImpl",hU=Pc("SelectContent.RemoveScroll"),i_=w.forwardRef((t,e)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:i,onPointerDownOutside:o,side:a,sideOffset:l,align:c,alignOffset:u,arrowPadding:h,collisionBoundary:p,collisionPadding:f,sticky:g,hideWhenDetached:m,avoidCollisions:y,...v}=t,b=pi(ho,n),[x,k]=w.useState(null),[S,C]=w.useState(null),E=Ge(e,F=>k(F)),[T,N]=w.useState(null),[_,z]=w.useState(null),I=vp(n),[H,M]=w.useState(!1),U=w.useRef(!1);w.useEffect(()=>{if(x)return xH(x)},[x]),lH();const V=w.useCallback(F=>{const[xe,...Fe]=I().map(me=>me.ref.current),[ye]=Fe.slice(-1),he=document.activeElement;for(const me of F)if(me===he||(me==null||me.scrollIntoView({block:"nearest"}),me===xe&&S&&(S.scrollTop=0),me===ye&&S&&(S.scrollTop=S.scrollHeight),me==null||me.focus(),document.activeElement!==he))return},[I,S]),Q=w.useCallback(()=>V([T,x]),[V,T,x]);w.useEffect(()=>{H&&Q()},[H,Q]);const{onOpenChange:A,triggerPointerDownPosRef:O}=b;w.useEffect(()=>{if(x){let F={x:0,y:0};const xe=ye=>{var he,me;F={x:Math.abs(Math.round(ye.pageX)-(((he=O.current)==null?void 0:he.x)??0)),y:Math.abs(Math.round(ye.pageY)-(((me=O.current)==null?void 0:me.y)??0))}},Fe=ye=>{F.x<=10&&F.y<=10?ye.preventDefault():x.contains(ye.target)||A(!1),document.removeEventListener("pointermove",xe),O.current=null};return O.current!==null&&(document.addEventListener("pointermove",xe),document.addEventListener("pointerup",Fe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",xe),document.removeEventListener("pointerup",Fe,{capture:!0})}}},[x,A,O]),w.useEffect(()=>{const F=()=>A(!1);return window.addEventListener("blur",F),window.addEventListener("resize",F),()=>{window.removeEventListener("blur",F),window.removeEventListener("resize",F)}},[A]);const[B,te]=k_(F=>{const xe=I().filter(he=>!he.disabled),Fe=xe.find(he=>he.ref.current===document.activeElement),ye=S_(xe,F,Fe);ye&&setTimeout(()=>ye.ref.current.focus())}),J=w.useCallback((F,xe,Fe)=>{const ye=!U.current&&!Fe;(b.value!==void 0&&b.value===xe||ye)&&(N(F),ye&&(U.current=!0))},[b.value]),oe=w.useCallback(()=>x==null?void 0:x.focus(),[x]),re=w.useCallback((F,xe,Fe)=>{const ye=!U.current&&!Fe;(b.value!==void 0&&b.value===xe||ye)&&z(F)},[b.value]),_e=r==="popper"?zy:o_,Be=_e===zy?{side:a,sideOffset:l,align:c,alignOffset:u,arrowPadding:h,collisionBoundary:p,collisionPadding:f,sticky:g,hideWhenDetached:m,avoidCollisions:y}:{};return d.jsx(s_,{scope:n,content:x,viewport:S,onViewportChange:C,itemRefCallback:J,selectedItem:T,onItemLeave:oe,itemTextRefCallback:re,focusSelectedItem:Q,selectedItemText:_,position:r,isPositioned:H,searchRef:B,children:d.jsx(YA,{as:hU,allowPinchZoom:!0,children:d.jsx(zA,{asChild:!0,trapped:b.open,onMountAutoFocus:F=>{F.preventDefault()},onUnmountAutoFocus:ue(s,F=>{var xe;(xe=b.trigger)==null||xe.focus({preventScroll:!0}),F.preventDefault()}),children:d.jsx(Qf,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:F=>F.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:d.jsx(_e,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:F=>F.preventDefault(),...v,...Be,onPlaced:()=>M(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:ue(v.onKeyDown,F=>{const xe=F.ctrlKey||F.altKey||F.metaKey;if(F.key==="Tab"&&F.preventDefault(),!xe&&F.key.length===1&&te(F.key),["ArrowUp","ArrowDown","Home","End"].includes(F.key)){let ye=I().filter(he=>!he.disabled).map(he=>he.ref.current);if(["ArrowUp","End"].includes(F.key)&&(ye=ye.slice().reverse()),["ArrowUp","ArrowDown"].includes(F.key)){const he=F.target,me=ye.indexOf(he);ye=ye.slice(me+1)}setTimeout(()=>V(ye)),F.preventDefault()}})})})})})})});i_.displayName=dU;var fU="SelectItemAlignedPosition",o_=w.forwardRef((t,e)=>{const{__scopeSelect:n,onPlaced:r,...s}=t,i=pi(ho,n),o=mi(ho,n),[a,l]=w.useState(null),[c,u]=w.useState(null),h=Ge(e,E=>u(E)),p=vp(n),f=w.useRef(!1),g=w.useRef(!0),{viewport:m,selectedItem:y,selectedItemText:v,focusSelectedItem:b}=o,x=w.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&c&&m&&y&&v){const E=i.trigger.getBoundingClientRect(),T=c.getBoundingClientRect(),N=i.valueNode.getBoundingClientRect(),_=v.getBoundingClientRect();if(i.dir!=="rtl"){const he=_.left-T.left,me=N.left-he,St=E.left-me,mn=E.width+St,bi=Math.max(mn,T.width),ls=window.innerWidth-Bn,xi=J1(me,[Bn,Math.max(Bn,ls-bi)]);a.style.minWidth=mn+"px",a.style.left=xi+"px"}else{const he=T.right-_.right,me=window.innerWidth-N.right-he,St=window.innerWidth-E.right-me,mn=E.width+St,bi=Math.max(mn,T.width),ls=window.innerWidth-Bn,xi=J1(me,[Bn,Math.max(Bn,ls-bi)]);a.style.minWidth=mn+"px",a.style.right=xi+"px"}const z=p(),I=window.innerHeight-Bn*2,H=m.scrollHeight,M=window.getComputedStyle(c),U=parseInt(M.borderTopWidth,10),V=parseInt(M.paddingTop,10),Q=parseInt(M.borderBottomWidth,10),A=parseInt(M.paddingBottom,10),O=U+V+H+A+Q,B=Math.min(y.offsetHeight*5,O),te=window.getComputedStyle(m),J=parseInt(te.paddingTop,10),oe=parseInt(te.paddingBottom,10),re=E.top+E.height/2-Bn,_e=I-re,Be=y.offsetHeight/2,F=y.offsetTop+Be,xe=U+V+F,Fe=O-xe;if(xe<=re){const he=z.length>0&&y===z[z.length-1].ref.current;a.style.bottom="0px";const me=c.clientHeight-m.offsetTop-m.offsetHeight,St=Math.max(_e,Be+(he?oe:0)+me+Q),mn=xe+St;a.style.height=mn+"px"}else{const he=z.length>0&&y===z[0].ref.current;a.style.top="0px";const St=Math.max(re,U+m.offsetTop+(he?J:0)+Be)+Fe;a.style.height=St+"px",m.scrollTop=xe-re+m.offsetTop}a.style.margin=`${Bn}px 0`,a.style.minHeight=B+"px",a.style.maxHeight=I+"px",r==null||r(),requestAnimationFrame(()=>f.current=!0)}},[p,i.trigger,i.valueNode,a,c,m,y,v,i.dir,r]);kt(()=>x(),[x]);const[k,S]=w.useState();kt(()=>{c&&S(window.getComputedStyle(c).zIndex)},[c]);const C=w.useCallback(E=>{E&&g.current===!0&&(x(),b==null||b(),g.current=!1)},[x,b]);return d.jsx(mU,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:f,onScrollButtonChange:C,children:d.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:d.jsx(be.div,{...s,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});o_.displayName=fU;var pU="SelectPopperPosition",zy=w.forwardRef((t,e)=>{const{__scopeSelect:n,align:r="start",collisionPadding:s=Bn,...i}=t,o=bp(n);return d.jsx(HN,{...o,...i,ref:e,align:r,collisionPadding:s,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});zy.displayName=pU;var[mU,X0]=rl(ho,{}),By="SelectViewport",a_=w.forwardRef((t,e)=>{const{__scopeSelect:n,nonce:r,...s}=t,i=mi(By,n),o=X0(By,n),a=Ge(e,i.onViewportChange),l=w.useRef(0);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),d.jsx(yp.Slot,{scope:n,children:d.jsx(be.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:ue(s.onScroll,c=>{const u=c.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:p}=o;if(p!=null&&p.current&&h){const f=Math.abs(l.current-u.scrollTop);if(f>0){const g=window.innerHeight-Bn*2,m=parseFloat(h.style.minHeight),y=parseFloat(h.style.height),v=Math.max(m,y);if(v<g){const b=v+f,x=Math.min(g,b),k=b-x;h.style.height=x+"px",h.style.bottom==="0px"&&(u.scrollTop=k>0?k:0,h.style.justifyContent="flex-end")}}}l.current=u.scrollTop})})})]})});a_.displayName=By;var l_="SelectGroup",[gU,yU]=rl(l_),vU=w.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,s=D0();return d.jsx(gU,{scope:n,id:s,children:d.jsx(be.div,{role:"group","aria-labelledby":s,...r,ref:e})})});vU.displayName=l_;var c_="SelectLabel",u_=w.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,s=yU(c_,n);return d.jsx(be.div,{id:s.id,...r,ref:e})});u_.displayName=c_;var zh="SelectItem",[bU,d_]=rl(zh),h_=w.forwardRef((t,e)=>{const{__scopeSelect:n,value:r,disabled:s=!1,textValue:i,...o}=t,a=pi(zh,n),l=mi(zh,n),c=a.value===r,[u,h]=w.useState(i??""),[p,f]=w.useState(!1),g=Ge(e,b=>{var x;return(x=l.itemRefCallback)==null?void 0:x.call(l,b,r,s)}),m=D0(),y=w.useRef("touch"),v=()=>{s||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return d.jsx(bU,{scope:n,value:r,disabled:s,textId:m,isSelected:c,onItemTextChange:w.useCallback(b=>{h(x=>x||((b==null?void 0:b.textContent)??"").trim())},[]),children:d.jsx(yp.ItemSlot,{scope:n,value:r,disabled:s,textValue:u,children:d.jsx(be.div,{role:"option","aria-labelledby":m,"data-highlighted":p?"":void 0,"aria-selected":c&&p,"data-state":c?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...o,ref:g,onFocus:ue(o.onFocus,()=>f(!0)),onBlur:ue(o.onBlur,()=>f(!1)),onClick:ue(o.onClick,()=>{y.current!=="mouse"&&v()}),onPointerUp:ue(o.onPointerUp,()=>{y.current==="mouse"&&v()}),onPointerDown:ue(o.onPointerDown,b=>{y.current=b.pointerType}),onPointerMove:ue(o.onPointerMove,b=>{var x;y.current=b.pointerType,s?(x=l.onItemLeave)==null||x.call(l):y.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ue(o.onPointerLeave,b=>{var x;b.currentTarget===document.activeElement&&((x=l.onItemLeave)==null||x.call(l))}),onKeyDown:ue(o.onKeyDown,b=>{var k;((k=l.searchRef)==null?void 0:k.current)!==""&&b.key===" "||(sU.includes(b.key)&&v(),b.key===" "&&b.preventDefault())})})})})});h_.displayName=zh;var Pl="SelectItemText",f_=w.forwardRef((t,e)=>{const{__scopeSelect:n,className:r,style:s,...i}=t,o=pi(Pl,n),a=mi(Pl,n),l=d_(Pl,n),c=lU(Pl,n),[u,h]=w.useState(null),p=Ge(e,v=>h(v),l.onItemTextChange,v=>{var b;return(b=a.itemTextRefCallback)==null?void 0:b.call(a,v,l.value,l.disabled)}),f=u==null?void 0:u.textContent,g=w.useMemo(()=>d.jsx("option",{value:l.value,disabled:l.disabled,children:f},l.value),[l.disabled,l.value,f]),{onNativeOptionAdd:m,onNativeOptionRemove:y}=c;return kt(()=>(m(g),()=>y(g)),[m,y,g]),d.jsxs(d.Fragment,{children:[d.jsx(be.span,{id:l.textId,...i,ref:p}),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?bo.createPortal(i.children,o.valueNode):null]})});f_.displayName=Pl;var p_="SelectItemIndicator",m_=w.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t;return d_(p_,n).isSelected?d.jsx(be.span,{"aria-hidden":!0,...r,ref:e}):null});m_.displayName=p_;var Fy="SelectScrollUpButton",g_=w.forwardRef((t,e)=>{const n=mi(Fy,t.__scopeSelect),r=X0(Fy,t.__scopeSelect),[s,i]=w.useState(!1),o=Ge(e,r.onScrollButtonChange);return kt(()=>{if(n.viewport&&n.isPositioned){let a=function(){const c=l.scrollTop>0;i(c)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),s?d.jsx(v_,{...t,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});g_.displayName=Fy;var Wy="SelectScrollDownButton",y_=w.forwardRef((t,e)=>{const n=mi(Wy,t.__scopeSelect),r=X0(Wy,t.__scopeSelect),[s,i]=w.useState(!1),o=Ge(e,r.onScrollButtonChange);return kt(()=>{if(n.viewport&&n.isPositioned){let a=function(){const c=l.scrollHeight-l.clientHeight,u=Math.ceil(l.scrollTop)<c;i(u)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),s?d.jsx(v_,{...t,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});y_.displayName=Wy;var v_=w.forwardRef((t,e)=>{const{__scopeSelect:n,onAutoScroll:r,...s}=t,i=mi("SelectScrollButton",n),o=w.useRef(null),a=vp(n),l=w.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return w.useEffect(()=>()=>l(),[l]),kt(()=>{var u;const c=a().find(h=>h.ref.current===document.activeElement);(u=c==null?void 0:c.ref.current)==null||u.scrollIntoView({block:"nearest"})},[a]),d.jsx(be.div,{"aria-hidden":!0,...s,ref:e,style:{flexShrink:0,...s.style},onPointerDown:ue(s.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:ue(s.onPointerMove,()=>{var c;(c=i.onItemLeave)==null||c.call(i),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:ue(s.onPointerLeave,()=>{l()})})}),xU="SelectSeparator",b_=w.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t;return d.jsx(be.div,{"aria-hidden":!0,...r,ref:e})});b_.displayName=xU;var Hy="SelectArrow",wU=w.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,s=bp(n),i=pi(Hy,n),o=mi(Hy,n);return i.open&&o.position==="popper"?d.jsx(UN,{...s,...r,ref:e}):null});wU.displayName=Hy;var kU="SelectBubbleInput",x_=w.forwardRef(({__scopeSelect:t,value:e,...n},r)=>{const s=w.useRef(null),i=Ge(r,s),o=gH(e);return w.useEffect(()=>{const a=s.current;if(!a)return;const l=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==e&&u){const h=new Event("change",{bubbles:!0});u.call(a,e),a.dispatchEvent(h)}},[o,e]),d.jsx(be.select,{...n,style:{...LT,...n.style},ref:i,defaultValue:e})});x_.displayName=kU;function w_(t){return t===""||t===void 0}function k_(t){const e=nr(t),n=w.useRef(""),r=w.useRef(0),s=w.useCallback(o=>{const a=n.current+o;e(a),function l(c){n.current=c,window.clearTimeout(r.current),c!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(a)},[e]),i=w.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return w.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,s,i]}function S_(t,e,n){const s=e.length>1&&Array.from(e).every(c=>c===e[0])?e[0]:e,i=n?t.indexOf(n):-1;let o=SU(t,Math.max(i,0));s.length===1&&(o=o.filter(c=>c!==n));const l=o.find(c=>c.textValue.toLowerCase().startsWith(s.toLowerCase()));return l!==n?l:void 0}function SU(t,e){return t.map((n,r)=>t[(e+r)%t.length])}var CU=JA,C_=XA,EU=e_,TU=t_,NU=n_,E_=r_,AU=a_,T_=u_,N_=h_,_U=f_,jU=m_,A_=g_,__=y_,j_=b_;const OU=CU,RU=EU,O_=w.forwardRef(({className:t,children:e,...n},r)=>d.jsxs(C_,{ref:r,className:rt("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm r
486ing-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...n,children:[e,d.jsx(TU,{asChild:!0,children:d.jsx(Ql,{className:"h-4 w-4 opacity-50"})})]}));O_.displayName=C_.displayName;const R_=w.forwardRef(({className:t,...e},n)=>d.jsx(A_,{ref:n,className:rt("flex cursor-default items-center justify-center py-1",t),...e,children:d.jsx(i3,{className:"h-4 w-4"})}));R_.displayName=A_.displayName;const M_=w.forwardRef(({className:t,...e},n)=>d.jsx(__,{ref:n,className:rt("flex cursor-default items-center justify-center py-1",t),...e,children:d.jsx(Ql,{className:"h-4 w-4"})}));M_.displayName=__.displayName;const P_=w.forwardRef(({className:t,children:e,position:n="popper",...r},s)=>d.jsx(NU,{children:d.jsxs(E_,{ref:s,className:rt("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:n,...r,children:[d.jsx(R_,{}),d.jsx(AU,{className:rt("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),d.jsx(M_,{})]})}));P_.displayName=E_.displayName;const MU=w.forwardRef(({className:t,...e},n)=>d.jsx(T_,{ref:n,className:rt("py-1.5 pl-8 pr-2 text-sm font-semibold",t),...e}));MU.displayName=T_.displayName;const Vd=w.forwardRef(({className:t,children:e,...n},r)=>d.jsxs(N_,{ref:r,className:rt("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",t),...n,children:[d.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:d.jsx(jU,{children:d.jsx(aN,{className:"h-4 w-4"})})}),d.jsx(_U,{children:e})]}));Vd.displayName=N_.displayName;const PU=w.forwardRef(({className:t,...e},n)=>d.jsx(j_,{ref:n,className:rt("-mx-1 my-1 h-px bg-muted",t),...e}));PU.displayName=j_.displayName;const IU="modulepreload",LU=function(t){return"/"+t},ak={},lk=function(e,n,r){let s=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));s=Promise.allSettled(n.map(l=>{if(l=LU(l),l in ak)return;ak[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const h=document.createElement("link");if(h.rel=c?"stylesheet":IU,c||(h.as="script"),h.crossOrigin="",h.href=l,a&&h.setAttribute("nonce",a),document.head.appendChild(h),c)return new Promise((p,f)=>{h.addEventListener("load",p),h.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${l}`)))})}))}function i(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return s.then(o=>{for(const a of o||[])a.status==="rejected"&&i(a.reason);return e().catch(i)})};var I_={exports:{}},L_={};/** 487 * @license React 488 * use-sync-external-store-shim.production.js 489 * 490 * Copyright (c) Meta Platforms, Inc. and affiliates. 491 * 492 * This source code is licensed under the MIT license found in the 493 * LICENSE file in the root directory of this source tree. 494 */var La=w;function DU(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var $U=typeof Object.is=="function"?Object.is:DU,zU=La.useState,BU=La.useEffect,FU=La.useLayoutEffect,WU=La.useDebugValue;function HU(t,e){var n=e(),r=zU({inst:{value:n,getSnapshot:e}}),s=r[0].inst,i=r[1];return FU(function(){s.value=n,s.getSnapshot=e,$m(s)&&i({inst:s})},[t,n,e]),BU(function(){return $m(s)&&i({inst:s}),t(function(){$m(s)&&i({inst:s})})},[t]),WU(n),n}function $m(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!$U(t,n)}catch{return!0}}function UU(t,e){return e()}var VU=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?UU:HU;L_.useSyncExternalStore=La.useSyncExternalStore!==void 0?La.useSyncExternalStore:VU;I_.exports=L_;var Z0=I_.exports;function gt(t){this.content=t}gt.prototype={constructor:gt,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,s=r.find(t),i=r.content.slice();return s==-1?i.push(n||t,e):(i[s+1]=e,n&&(i[s]=n)),new gt(i)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new gt(n)},addToStart:function(t,e){return new gt([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new gt(n)},addBefore:function(t,e,n){var r=this.remove(e),s=r.content.slice(),i=r.find(t);return s.splice(i==-1?s.length:i,0,e,n),new gt(s)}
vendor: 1,544 bytes, line 494
494,forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=gt.from(t),t.size?new gt(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=gt.from(t),t.size?new gt(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=gt.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}};gt.from=function(t){if(t instanceof gt)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new gt(e)};function D_(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let s=t.child(r),i=e.child(r);if(s==i){n+=s.nodeSize;continue}if(!s.sameMarkup(i))return n;if(s.isText&&s.text!=i.text){let o=s.text,a=i.text,l=0;for(;o[l]==a[l];l++)n++;return l&&l<o.length&&l<a.length&&B_(o.charCodeAt(l-1))&&z_(o.charCodeAt(l))&&n--,n}if(s.content.size||i.content.size){let o=D_(s.content,i.content,n+1);if(o!=null)return o}n+=s.nodeSize}}function $_(t,e,n,r){for(let s=t.childCount,i=e.childCount;;){if(s==0||i==0)return s==i?null:{a:n,b:r};let o=t.child(--s),a=e.child(--i),l=o.nodeSize;if(o==a){n-=l,r-=l;continue}if(!o.sameMarkup(a))return{a:n,b:r};if(o.isText&&o.text!=a.text){let c=o.text,u=a.text,h=c.length,p=u.length;for(;h>0&&p>0&&c[h-1]==u[p-1];)h--,p--,n--,r--;return h&&p&&h<c.length&&B_(c.charCodeAt(h-1))&&z_(c.charCodeAt(h))&&(n++,r++),{a:n,b:r}}
vendor: 8,983 bytes, line 494
494if(o.content.size||a.content.size){let c=$_(o.content,a.content,n-1,r-1);if(c)return c}n-=l,r-=l}}function z_(t){return t>=56320&&t<57344}function B_(t){return t>=55296&&t<56320}class P{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,s=0,i){for(let o=0,a=0;a<n;o++){let l=this.content[o],c=a+l.nodeSize;if(c>e&&r(l,s+a,i||null,o)!==!1&&l.content.size){let u=a+1;l.nodesBetween(Math.max(0,e-u),Math.min(l.content.size,n-u),r,s+u)}a=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,s){let i="",o=!0;return this.nodesBetween(e,n,(a,l)=>{let c=a.isText?a.text.slice(Math.max(e,l)-l,n-l):a.isLeaf?s?typeof s=="function"?s(a):s:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&c||a.isTextblock)&&r&&(o?o=!1:i+=r),i+=c},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,s=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(s[s.length-1]=n.withText(n.text+r.text),i=1);i<e.content.length;i++)s.push(e.content[i]);return new P(s,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],s=0;if(n>e)for(let i=0,o=0;o<n;i++){let a=this.content[i],l=o+a.nodeSize;l>e&&((o<e||l>n)&&(a.isText?a=a.cut(Math.max(0,e-o),Math.min(a.text.length,n-o)):a=a.cut(Math.max(0,e-o-1),Math.min(a.content.size,n-o-1))),r.push(a),s+=a.nodeSize),o=l}return new P(r,s)}cutByIndex(e,n){return e==n?P.empty:e==0&&n==this.content.length?this:new P(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let s=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return s[e]=n,new P(s,i)}addToStart(e){return new P([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new P(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let s=this.content[n];e(s,r,n),r+=s.nodeSize}}findDiffStart(e,n=0){return D_(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return $_(this,e,n,r)}findIndex(e){if(e==0)return ad(0,e);if(e==this.size)return ad(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let s=this.child(n),i=r+s.nodeSize;if(i>=e)return i==e?ad(n+1,i):ad(n,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return P.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return P.fromArray(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return P.empty;let n,r=0;for(let s=0;s<e.length;s++){let i=e[s];r+=i.nodeSize,s&&i.isText&&e[s-1].sameMarkup(i)?(n||(n=e.slice(0,s)),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new P(n||e,r)}static from(e){if(!e)return P.empty;if(e instanceof P)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new P([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}P.empty=new P([],0);const zm={index:0,offset:0};function ad(t,e){return zm.index=t,zm.offset=e,zm}function Bh(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!Bh(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!Bh(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let Ce=class Uy{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let s=0;s<e.length;s++){let i=e[s];if(this.eq(i))return e;if(this.type.excludes(i.type))n||(n=e.slice(0,s));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(n||(n=e.slice(0,s)),n.push(this),r=!0),n&&n.push(i)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Bh(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let s=r.create(n.attrs);return r.checkAttrs(s.attrs),s}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Uy.none;if(e instanceof Uy)return[e];let n=e.slice();return n.sort((r,s)=>r.type.rank-s.type.rank),n}};Ce.none=[];class Gc extends Error{}class W{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=W_(this.content,e+this.openStart,n,this.openStart+1,this.openEnd+1);return r&&new W(r,this.openStart,this.openEnd)}removeBetween(e,n){return new W(F_(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return W.empty;let r=n.openStart||0,s=n.openEnd||0;if(typeof r!="number"||typeof s!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new W(P.fromJSON(e,n.content),r,s)}static maxOpen(e,n=!0){let r=0,s=0;for(let i=e.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.lastChild)s++;return new W(e,r,s)}}W.empty=new W(P.empty,0,0);function F_(t,e,n){let{index:r,offset:s}=t.findIndex(e),i=t.maybeChild(r),{index:o,offset:a}=t.findIndex(n);if(s==e||i.isText){if(a!=n&&!t.child(o).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=o)throw new RangeError("Removing non-flat range");return t.replaceChild(r,i.copy(F_(i.content,e-s-1,n-s-1)))}function W_(t,e,n,r,s,i){let{index:o,offset:a}=t.findIndex(e),l=t.maybeChild(o);if(a==e||l.isText)return i&&r<=0&&s<=0&&!i.canReplace(o,o,n)?null:t.cut(0,e).append(n).append(t.cut(e));let c=W_(l.content,e-a-1,n,o==0?r-1:0,o==t.childCount-1?s-1:0,l);return c&&t.replaceChild(o,l.copy(c))}function qU(t,e,n){if(n.openStart>t.depth)throw new Gc("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new Gc("Inconsistent open depths");return H_(t,e,n,0)}function H_(t,e,n,r){let s=t.index(r),i=t.node(r);if(s==e.index(r)&&r<t.depth-n.openStart){let o=H_(t,e,n,r+1);return i.copy(i.content.replaceChild(s,o))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let o=t.parent,a=o.content;return Xi(o,a.cut(0,t.parentOffset).append(n.content).append(a.cut(e.parentOffset)))}else{let{start:o,end:a}=GU(n,t);return Xi(i,V_(t,o,a,e,r))}else return Xi(i,Fh(t,e,r))}function U_(t,e){if(!e.type.compatibleContent(t.type))throw new Gc("Cannot join "+e.type.name+" onto "+t.type.name)}function Vy(t,e,n){let r=t.node(n);return U_(r,e.node(n)),r}function Qi(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function ec(t,e,n,r){let s=(e||t).node(n),i=0,o=e?e.index(n):s.childCount;t&&(i=t.index(n),t.depth>n?i++:t.textOffset&&(Qi(t.nodeAfter,r),i++));for(let a=i;a<o;a++)Qi(s.child(a),r);e&&e.depth==n&&e.textOffset&&Qi(e.nodeBefore,r)}function Xi(t,e){if(!t.type.validContent(e))throw new Gc("Invalid content for node "+t.type.name);return t.copy(e)}function V_(t,e,n,r,s){let i=t.depth>s&&Vy(t,e,s+1),o=r.depth>s&&Vy(n,r,s+1),a=[];return ec(null,t,s,a),i&&o&&e.index(s)==n.index(s)?(U_(i,o),Qi(Xi(i,V_(t,e,n,r,s+1)),a)):(i&&Qi(Xi(i,Fh(t,e,s+1)),a),ec(e,n,s,a),o&&Qi(Xi(o,Fh(n,r,s+1)),a)),ec(r,null,s,a),new P(a)}function Fh(t,e,n){let r=[];if(ec(null,t,n,r),t.depth>n){let s=Vy(t,e,n+1);Qi(Xi(s,Fh(t,e,n+1)),r)}return ec(e,null,n,r),new P(r)}function GU(t,e){let n=e.depth-t.openStart,s=e.node(n).copy(t.content);for(let i=n-1;i>=0;
vendor: 11,278 bytes, lines 494-495
494i--)s=e.node(i).copy(P.from(s));return{start:s.resolveNoCache(t.openStart+n),end:s.resolveNoCache(s.content.size-t.openEnd-n)}}class Kc{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],s=e.child(n);return r?e.child(n).cut(r):s}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],s=n==0?0:this.path[n*3-1]+1;for(let i=0;i<e;i++)s+=r.child(i).nodeSize;return s}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return Ce.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),s=e.maybeChild(n);if(!r){let a=r;r=s,s=a}let i=r.marks;for(var o=0;o<i.length;o++)i[o].type.spec.inclusive===!1&&(!s||!i[o].isInSet(s.marks))&&(i=i[o--].removeFromSet(i));return i}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,s=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!s||!r[i].isInSet(s.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new Wh(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],s=0,i=n;for(let o=e;;){let{index:a,offset:l}=o.content.findIndex(i),c=i-l;if(r.push(o,a,s+l),!c||(o=o.child(a),o.isText))break;i=c-1,s+=l+1}return new Kc(n,r,i)}static resolveCached(e,n){let r=ck.get(e);if(r)for(let i=0;i<r.elts.length;i++){let o=r.elts[i];if(o.pos==n)return o}else ck.set(e,r=new KU);let s=r.elts[r.i]=Kc.resolve(e,n);return r.i=(r.i+1)%YU,s}}class KU{constructor(){this.elts=[],this.i=0}}const YU=12,ck=new WeakMap;class Wh{constructor(e,n,r){this.$from=e,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const JU=Object.create(null);let Ys=class qy{constructor(e,n,r,s=Ce.none){this.type=e,this.attrs=n,this.marks=s,this.content=r||P.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,r,s=0){this.content.nodesBetween(e,n,r,s,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,n,r,s){return this.content.textBetween(e,n,r,s)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,n,r){return this.type==e&&Bh(this.attrs,n||e.defaultAttrs||JU)&&Ce.sameSet(this.marks,r||Ce.none)}copy(e=null){return e==this.content?this:new qy(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new qy(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return W.empty;let s=this.resolve(e),i=this.resolve(n),o=r?0:s.sharedDepth(n),a=s.start(o),c=s.node(o).content.cut(s.pos-a,i.pos-a);return new W(c,s.depth-o,i.depth-o)}replace(e,n,r){return qU(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:s}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(s==e||n.isText)return n;e-=s+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let s=this.content.child(n-1);return{node:s,index:n-1,offset:r-s.nodeSize}}resolve(e){return Kc.resolveCached(this,e)}resolveNoCache(e){return Kc.resolve(this,e)}rangeHasMark(e,n,r){let s=!1;return n>e&&this.nodesBetween(e,n,i=>(r.isInSet(i.marks)&&(s=!0),!s)),s}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),q_(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=P.empty,s=0,i=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,s,i),a=o&&o.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let l=s;l<i;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,n,r,s){if(s&&!this.type.allowsMarks(s))return!1;let i=this.contentMatchAt(e).matchType(r),o=i&&i.matchFragment(this.content,n);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=Ce.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!Ce.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let s=P.fromJSON(e,n.content),i=e.nodeType(n.type).create(n.attrs,s,r);return i.type.checkAttrs(i.attrs),i}};Ys.prototype.text=void 0;class Hh extends Ys{constructor(e,n,r,s){if(super(e,n,null,s),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):q_(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Hh(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Hh(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function q_(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class fo{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new QU(e,n);if(r.next==null)return fo.empty;let s=G_(r);r.next&&r.err("Unexpected trailing text");let i=s8(r8(s));return i8(i,r),i}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let s=this;for(let i=n;s&&i<r;i++)s=s.matchType(e.child(i).type);return s}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let s=[this];function i(o,a){let l=o.matchFragment(e,r);if(l&&(!n||l.validEnd))return P.from(a.map(c=>c.createAndFill()));for(let c=0;c<o.next.length;c++){let{type:u,next:h}=o.next[c];if(!(u.isText||u.hasRequiredAttrs())&&s.indexOf(h)==-1){s.push(h);let p=i(h,a.concat(u));if(p)return p}}return null}return i(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let s=r.shift(),i=s.match;if(i.matchType(e)){let o=[];for(let a=s;a.type;a=a.via)o.push(a.type);return o.reverse()}for(let o=0;o<i.next.length;o++){let{type:a,next:l}=i.next[o];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in n)&&(!s.type||l.validEnd)&&(r.push({match:a.contentMatch,type:a,via:s}),n[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(r){e.push(r);for(let s=0;s<r.next.length;s++)e.indexOf(r.next[s].next)==-1&&n(r.next[s].next)}return n(this),e.map((r,s)=>{let i=s+(r.validEnd?"*":" ")+" ";for(let o=0;o<r.next.length;o++)i+=(o?", ":"")+r.next[o].type.name+"->"+e.indexOf(r.next[o].next);return i}).join(` 495`)}}fo.empty=new fo(!0);class QU{constructor(e,n){this.string=e,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?
vendor: 15,990 bytes, lines 495-497
495=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function G_(t){let e=[];do e.push(XU(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function XU(t){let e=[];do e.push(ZU(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function ZU(t){let e=n8(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=e8(t,e);else break;return e}function uk(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function e8(t,e){let n=uk(t),r=n;return t.eat(",")&&(t.next!="}"?r=uk(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function t8(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let s=[];for(let i in n){let o=n[i];o.isInGroup(e)&&s.push(o)}return s.length==0&&t.err("No node type or group '"+e+"' found"),s}function n8(t){if(t.eat("(")){let e=G_(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=t8(t,t.next).map(n=>(t.inline==null?t.inline=n.isInline:t.inline!=n.isInline&&t.err("Mixing inline and block content"),{type:"name",value:n}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function r8(t){let e=[[]];return s(i(t,0),n()),e;function n(){return e.push([])-1}function r(o,a,l){let c={term:l,to:a};return e[o].push(c),c}function s(o,a){o.forEach(l=>l.to=a)}function i(o,a){if(o.type=="choice")return o.exprs.reduce((l,c)=>l.concat(i(c,a)),[]);if(o.type=="seq")for(let l=0;;l++){let c=i(o.exprs[l],a);if(l==o.exprs.length-1)return c;s(c,a=n())}else if(o.type=="star"){let l=n();return r(a,l),s(i(o.expr,l),l),[r(l)]}else if(o.type=="plus"){let l=n();return s(i(o.expr,a),l),s(i(o.expr,l),l),[r(l)]}else{if(o.type=="opt")return[r(a)].concat(i(o.expr,a));if(o.type=="range"){let l=a;for(let c=0;c<o.min;c++){let u=n();s(i(o.expr,l),u),l=u}if(o.max==-1)s(i(o.expr,l),l);else for(let c=o.min;c<o.max;c++){let u=n();r(l,u),s(i(o.expr,l),u),l=u}return[r(l)]}else{if(o.type=="name")return[r(a,void 0,o.value)];throw new Error("Unknown expr type")}}}}function K_(t,e){return e-t}function dk(t,e){let n=[];return r(e),n.sort(K_);function r(s){let i=t[s];if(i.length==1&&!i[0].term)return r(i[0].to);n.push(s);for(let o=0;o<i.length;o++){let{term:a,to:l}=i[o];!a&&n.indexOf(l)==-1&&r(l)}}}function s8(t){let e=Object.create(null);return n(dk(t,0));function n(r){let s=[];r.forEach(o=>{t[o].forEach(({term:a,to:l})=>{if(!a)return;let c;for(let u=0;u<s.length;u++)s[u][0]==a&&(c=s[u][1]);dk(t,l).forEach(u=>{c||s.push([a,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let i=e[r.join(",")]=new fo(r.indexOf(t.length-1)>-1);for(let o=0;o<s.length;o++){let a=s[o][1].sort(K_);i.next.push({type:s[o][0],next:e[a.join(",")]||n(a)})}return i}}function i8(t,e){for(let n=0,r=[t];n<r.length;n++){let s=r[n],i=!s.validEnd,o=[];for(let a=0;a<s.next.length;a++){let{type:l,next:c}=s.next[a];o.push(l.name),i&&!(l.isText||l.hasRequiredAttrs())&&(i=!1),r.indexOf(c)==-1&&r.push(c)}i&&e.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function Y_(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function J_(t,e){let n=Object.create(null);for(let r in t){let s=e&&e[r];if(s===void 0){let i=t[r];if(i.hasDefault)s=i.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=s}return n}function Q_(t,e,n,r){for(let s in e)if(!(s in t))throw new RangeError(`Unsupported attribute ${s} for ${n} of type ${r}`);for(let s in t)t[s].validate&&t[s].validate(e[s])}function X_(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new a8(t,r,e[r]);return n}let hk=class Z_{constructor(e,n,r){this.name=e,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=X_(e,r.attrs),this.defaultAttrs=Y_(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==fo.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:J_(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Ys(this,this.computeAttrs(e),P.from(n),Ce.setFrom(r))}createChecked(e=null,n,r){return n=P.from(n),this.checkContent(n),new Ys(this,this.computeAttrs(e),n,Ce.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),n=P.from(n),n.size){let o=this.contentMatch.fillBefore(n);if(!o)return null;n=o.append(n)}let s=this.contentMatch.matchFragment(n),i=s&&s.fillBefore(P.empty,!0);return i?new Ys(this,e,n.append(i),Ce.setFrom(r)):null}validContent(e){let n=this.contentMatch.matchFragment(e);if(!n||!n.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){Q_(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let n=0;n<e.length;n++)if(!this.allowsMarkType(e[n].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let n;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?n&&n.push(e[r]):n||(n=e.slice(0,r));return n?n.length?n:Ce.none:e}static compile(e,n){let r=Object.create(null);e.forEach((i,o)=>r[i]=new Z_(i,n,o));let s=n.spec.topNode||"doc";if(!r[s])throw new RangeError("Schema is missing its top node type ('"+s+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function o8(t,e,n){let r=n.split("|");return s=>{let i=s===null?"null":typeof s;if(r.indexOf(i)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${i}`)}}class a8{constructor(e,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?o8(e,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class xp{constructor(e,n,r,s){this.name=e,this.rank=n,this.schema=r,this.spec=s,this.attrs=X_(e,s.attrs),this.excluded=null;let i=Y_(this.attrs);this.instance=i?new Ce(this,i):null}create(e=null){return!e&&this.instance?this.instance:new Ce(this,J_(this.attrs,e))}static compile(e,n){let r=Object.create(null),s=0;return e.forEach((i,o)=>r[i]=new xp(i,s++,n,o)),r}removeFromSet(e){for(var n=0;n<e.length;n++)e[n].type==this&&(e=e.slice(0,n).concat(e.slice(n+1)),n--);return e}isInSet(e){for(let n=0;n<e.length;n++)if(e[n].type==this)return e[n]}checkAttrs(e){Q_(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class ej{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let s in e)n[s]=e[s];n.nodes=gt.from(e.nodes),n.marks=gt.from(e.marks||{}),this.nodes=hk.compile(this.spec.nodes,this),this.marks=xp.compile(this.spec.marks,this);let r=Object.create(null);for(let s in this.nodes){if(s in this.marks)throw new RangeError(s+" can not be both a node and a mark");let i=this.nodes[s],o=i.spec.content||"",a=i.spec.marks;if(i.contentMatch=r[o]||(r[o]=fo.parse(o,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=a=="_"?null:a?fk(this,a.split(" ")):a==""||!i.inlineContent?[]:null}for(let s in this.marks){let i=this.marks[s],o=i.spec.excludes;i.excluded=o==null?[i]:o==""?[]:fk(this,o.split(" "))}this.nodeFromJSON=s=>Ys.fromJSON(this,s),this.markFromJSON=s=>Ce.fromJSON(this,s),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,n=null,r,s){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof hk){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(n,r,s)}text(e,n){let r=this.nodes.text;return new Hh(r,r.defaultAttrs,e,Ce.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}}function fk(t,e){let n=[];for(let r=0;r<e.length;r++){let s=e[r],i=t.marks[s],o=i;if(i)n.push(i);else for(let a in t.marks){let l=t.marks[a];(s=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(s)>-1)&&n.push(o=l)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}function l8(t){return t.tag!=null}function c8(t){return t.style!=null}class Js{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(s=>{if(l8(s))this.tags.push(s);else if(c8(s)){let i=/[^=]*/.exec(s.style)[0];r.indexOf(i)<0&&r.push(i),this.styles.push(s)}}),this.normalizeLists=!this.tags.some(s=>{if(!/^(ul|ol)\b/.test(s.tag)||!s.node)return!1;let i=e.nodes[s.node];return i.contentMatch.matchType(i)})}parse(e,n={}){let r=new mk(this,n,!1);return r.addAll(e,Ce.none,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new mk(this,n,!0);return r.addAll(e,Ce.none,n.from,n.to),W.maxOpen(r.finish())}matchTag(e,n,r){for(let s=r?this.tags.indexOf(r)+1:0;s<this.tags.length;s++){let i=this.tags[s];if(h8(e,i.tag)&&(i.namespace===void 0||e.namespaceURI==i.namespace)&&(!i.context||n.matchesContext(i.context))){if(i.getAttrs){let o=i.getAttrs(e);if(o===!1)continue;i.attrs=o||void 0}return i}}}matchStyle(e,n,r,s){for(let i=s?this.styles.indexOf(s)+1:0;i<this.styles.length;i++){let o=this.styles[i],a=o.style;if(!(a.indexOf(e)!=0||o.context&&!r.matchesContext(o.context)||a.length>e.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=n))){if(o.getAttrs){let l=o.getAttrs(n);if(l===!1)continue;o.attrs=l||void 0}return o}}}static schemaRules(e){let n=[];function r(s){let i=s.priority==null?50:s.priority,o=0;for(;o<n.length;o++){let a=n[o];if((a.priority==null?50:a.priority)<i)break}n.splice(o,0,s)}for(let s in e.marks){let i=e.marks[s].spec.parseDOM;i&&i.forEach(o=>{r(o=gk(o)),o.mark||o.ignore||o.clearMark||(o.mark=s)})}for(let s in e.nodes){let i=e.nodes[s].spec.parseDOM;i&&i.forEach(o=>{r(o=gk(o)),o.node||o.ignore||o.mark||(o.node=s)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Js(e,Js.schemaRules(e)))}}const tj={address:!0,article:!0,aside:!0,blockquote:!0,body:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},u8={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},nj={ol:!0,ul:!0},Yc=1,Gy=2,tc=4;function pk(t,e,n){return e!=null?(e?Yc:0)|(e==="full"?Gy:0):t&&t.whitespace=="pre"?Yc|Gy:n&~tc}class ld{constructor(e,n,r,s,i,o){this.type=e,this.attrs=n,this.marks=r,this.solid=s,this.options=o,this.content=[],this.activeMarks=Ce.none,this.match=i||(o&tc?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(P.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,s;return(s=r.findWrapping(e.type))?(this.match=r,s):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Yc)){let r=this.content[this.content.length-1],s;if(r&&r.isText&&(s=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==s[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-s[0].length))}}let n=P.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(P.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!tj.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class mk{constructor(e,n,r){this.parser=e,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let s=n.topNode,i,o=pk(null,n.preserveWhitespace,0)|(r?tc:0);s?i=new ld(s.type,s.attrs,Ce.none,!0,n.topMatch||s.type.contentMatch,o):r?i=new ld(null,null,Ce.none,!0,null,o):i=new ld(e.schema.topNodeType,null,Ce.none,!0,null,o),this.nodes=[i],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,n){e.nodeType==3?this.addTextNode(e,n):e.nodeType==1&&this.addElement(e,n)}addTextNode(e,n){let r=e.nodeValue,s=this.top,i=s.options&Gy?"full":this.localPreserveWS||(s.options&Yc)>0,{schema:o}=this.parser;if(i==="full"||s.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(i)if(i==="full")r=r.replace(/\r\n?/g,` 496`);else if(o.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(o.linebreakReplacement.create())){let a=r.split(/\r?\n|\r/);for(let l=0;l<a.length;l++)l&&this.insertNode(o.linebreakReplacement.create(),n,!0),a[l]&&this.insertNode(o.text(a[l]),n,!/\S/.test(a[l]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let a=s.content[s.content.length-1],l=e.previousSibling;(!a||l&&l.nodeName=="BR"||a.isText&&/[ \t\r\n\u000c]$/.test(a.text))&&(r=r.slice(1))}r&&this.insertNode(o.text(r),n,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,n,r){let s=this.localPreserveWS,i=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let o=e.nodeName.toLowerCase(),a;nj.hasOwnProperty(o)&&this.parser.normalizeLists&&d8(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(a=this.parser.matchTag(e,this,r));e:if(l?l.ignore:u8.hasOwnProperty(o))this.findInside(e),this.ignoreFallback(e,n);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(e=l.skip);let c,u=this.needsBlock;if(tj.hasOwnProperty(o))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),c=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,n);break e}let h=l&&l.skip?n:this.readStyles(e,n);h&&this.addAll(e,h),c&&this.sync(i),this.needsBlock=u}else{let c=this.readStyles(e,n);c&&this.addElementByRule(e,l,c,l.consuming===!1?a:void 0)}this.localPreserveWS=s}leafFallback(e,n){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(` 497`),n)}ignoreFallback(e,n){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(e,n){let r=e.style;if(r&&r.length)for(let s=0;s<this.parser.matchedStyles.length;s++){let i=this.parser.matchedStyles[s],o=r.getPropertyValue(i);if(o)for(let a=void 0;;){let l=this.parser.matchStyle(i,o,this,a);if(!l)break;if(l.ignore)return null;if(l.clearMark?n=n.filter(c=>!l.clearMark(c)):n=n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)a=l;else break}}return n}addElementByRule(e,n,r,s){let i,o;
vendor: 4,119 bytes, line 497
497if(n.node)if(o=this.parser.schema.nodes[n.node],o.isLeaf)this.insertNode(o.create(n.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let l=this.enter(o,n.attrs||null,r,n.preserveWhitespace);l&&(i=!0,r=l)}else{let l=this.parser.schema.marks[n.mark];r=r.concat(l.create(n.attrs))}let a=this.top;if(o&&o.isLeaf)this.findInside(e);else if(s)this.addElement(e,r,s);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l,r,!1));else{let l=e;typeof n.contentElement=="string"?l=e.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(e):n.contentElement&&(l=n.contentElement),this.findAround(e,l,!0),this.addAll(l,r),this.findAround(e,l,!1)}i&&this.sync(a)&&this.open--}addAll(e,n,r,s){let i=r||0;for(let o=r?e.childNodes[r]:e.firstChild,a=s==null?null:e.childNodes[s];o!=a;o=o.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(o,n);this.findAtPoint(e,i)}findPlace(e,n,r){let s,i;for(let o=this.open,a=0;o>=0;o--){let l=this.nodes[o],c=l.findWrapping(e);if(c&&(!s||s.length>c.length+a)&&(s=c,i=l,!c.length))break;if(l.solid){if(r)break;a+=2}}if(!s)return null;this.sync(i);for(let o=0;o<s.length;o++)n=this.enterInner(s[o],null,n,!1);return n}insertNode(e,n,r){if(e.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(n=this.enterInner(i,null,n))}let s=this.findPlace(e,n,r);if(s){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(e.type));let o=Ce.none;for(let a of s.concat(e.marks))(i.type?i.type.allowsMarkType(a.type):yk(a.type,e.type))&&(o=a.addToSet(o));return i.content.push(e.mark(o)),!0}return!1}enter(e,n,r,s){let i=this.findPlace(e.create(n),r,!1);return i&&(i=this.enterInner(e,n,r,!0,s)),i}enterInner(e,n,r,s=!1,i){this.closeExtra();let o=this.top;o.match=o.match&&o.match.matchType(e);let a=pk(e,i,o.options);o.options&tc&&o.content.length==0&&(a|=tc);let l=Ce.none;return r=r.filter(c=>(o.type?o.type.allowsMarkType(c.type):yk(c.type,e))?(l=c.addToSet(l),!1):!0),this.nodes.push(new ld(e,n,l,s,null,a)),this.open++,r}closeExtra(e=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let n=this.open;n>=0;n--){if(this.nodes[n]==e)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=Yc)}return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let s=r.length-1;s>=0;s--)e+=r[s].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,r){if(e!=n&&this.find)for(let s=0;s<this.find.length;s++)this.find[s].pos==null&&e.nodeType==1&&e.contains(this.find[s].node)&&n.compareDocumentPosition(this.find[s].node)&(r?2:4)&&(this.find[s].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,s=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(s?0:1),o=(a,l)=>{for(;a>=0;a--){let c=n[a];if(c==""){if(a==n.length-1||a==0)continue;for(;l>=i;l--)if(o(a-1,l))return!0;return!1}else{let u=l>0||l==0&&s?this.nodes[l].type:r&&l>=i?r.node(l-i).type:null;if(!u||u.name!=c&&!u.isInGroup(c))return!1;l--}}return!0};return o(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];
vendor: 4,471 bytes, line 497
497if(r.isTextblock&&r.defaultAttrs)return r}}}function d8(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&nj.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function h8(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function gk(t){let e={};for(let n in t)e[n]=t[n];return e}function yk(t,e){let n=e.schema.nodes;for(let r in n){let s=n[r];if(!s.allowsMarkType(t))continue;let i=[],o=a=>{i.push(a);for(let l=0;l<a.edgeCount;l++){let{type:c,next:u}=a.edge(l);if(c==e||i.indexOf(u)<0&&o(u))return!0}};if(o(s.contentMatch))return!0}}class xo{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=cd(n).createDocumentFragment());let s=r,i=[];return e.forEach(o=>{if(i.length||o.marks.length){let a=0,l=0;for(;a<i.length&&l<o.marks.length;){let c=o.marks[l];if(!this.marks[c.type.name]){l++;continue}if(!c.eq(i[a][0])||c.type.spec.spanning===!1)break;a++,l++}for(;a<i.length;)s=i.pop()[1];for(;l<o.marks.length;){let c=o.marks[l++],u=this.serializeMark(c,o.isInline,n);u&&(i.push([c,s]),s.appendChild(u.dom),s=u.contentDOM||u.dom)}}s.appendChild(this.serializeNodeInner(o,n))}),r}serializeNodeInner(e,n){if(e.isText)return cd(n).createTextNode(e.text);let{dom:r,contentDOM:s}=qd(cd(n),this.nodes[e.type.name](e),null,e.attrs);if(s){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,s)}return r}serializeNode(e,n={}){let r=this.serializeNodeInner(e,n);for(let s=e.marks.length-1;s>=0;s--){let i=this.serializeMark(e.marks[s],e.isInline,n);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(e,n,r={}){let s=this.marks[e.type.name];return s&&qd(cd(r),s(e,n),null,e.attrs)}static renderSpec(e,n,r=null,s){return typeof n=="string"?{dom:e.createTextNode(n)}:qd(e,n,r,s)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new xo(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=vk(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return vk(e.marks)}}function vk(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function cd(t){return t.document||window.document}const bk=new WeakMap;function f8(t){let e=bk.get(t);return e===void 0&&bk.set(t,e=p8(t)),e}function p8(t){let e=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let s=0;s<r.length;s++)n(r[s]);else for(let s in r)n(r[s])}return n(t),e}function qd(t,e,n,r){if(e.nodeType==1)return{dom:e};if(e.dom&&e.dom.nodeType==1)return e;let s=e[0],i;if(typeof s!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=f8(r))&&i.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let o=s.indexOf(" ");o>0&&(n=s.slice(0,o),s=s.slice(o+1));let a,l=n?t.createElementNS(n,s):t.createElement(s),c=e[1],u=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){u=2;for(let h in c)if(c[h]!=null){let p=h.indexOf(" ");p>0?l.setAttributeNS(h.slice(0,p),h.slice(p+1),c[h]):h=="style"&&l.style?l.style.cssText=c[h]:l.setAttribute(h,c[h])}}for(let h=u;h<e.length;h++){let p=e[h];if(p===0){if(h<e.length-1||h>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else if(typeof p=="string")l.appendChild(t.createTextNode(p));else{let{dom:f,contentDOM:g}=qd(t,p,n,r);if(l.appendChild(f),g){if(a)throw new RangeError("Multiple content holes");a=g}}}return{dom:l,contentDOM:a}}const rj=65535,sj=Math.pow(2,16);function m8(t,e){return t+e*sj}function xk(t){return t&rj}function g8(t){return(t-(t&rj))/sj}const ij=1,oj=2,Gd=4,aj=8;class Ky{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&aj)>0}get deletedBefore(){return(this.delInfo&(ij|Gd))>0}get deletedAfter(){return(this.delInfo&(oj|Gd))>0}get deletedAcross(){return(this.delInfo&Gd)>0}}class ln{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&ln.empty)return ln.empty}recover(e){let n=0,r=xk(e);if(!this.inverted)for(let s=0;s<r;s++)n+=this.ranges[s*3+2]-this.ranges[s*3+1];return this.ranges[r*3]+n+g8(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,r){let s=0,i=this.inverted?2:1,o=this.inverted?1:2;
vendor: 5,290 bytes, line 497
497for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?s:0);if(l>e)break;let c=this.ranges[a+i],u=this.ranges[a+o],h=l+c;if(e<=h){let p=c?e==l?-1:e==h?1:n:n,f=l+s+(p<0?0:u);if(r)return f;let g=e==(n<0?l:h)?null:m8(a/3,e-l),m=e==l?oj:e==h?ij:Gd;return(n<0?e!=l:e!=h)&&(m|=aj),new Ky(f,m,g)}s+=u-c}return r?e+s:new Ky(e+s,0,null)}touches(e,n){let r=0,s=xk(n),i=this.inverted?2:1,o=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?r:0);if(l>e)break;let c=this.ranges[a+i],u=l+c;if(e<=u&&a==s*3)return!0;r+=this.ranges[a+o]-c}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let s=0,i=0;s<this.ranges.length;s+=3){let o=this.ranges[s],a=o-(this.inverted?i:0),l=o+(this.inverted?0:i),c=this.ranges[s+n],u=this.ranges[s+r];e(a,a+c,l,l+u),i+=u-c}}invert(){return new ln(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?ln.empty:new ln(e<0?[0,-e,0]:[0,0,e])}}ln.empty=new ln([]);class Jc{constructor(e,n,r=0,s=e?e.length:0){this.mirror=n,this.from=r,this.to=s,this._maps=e||[],this.ownData=!(e||n)}get maps(){return this._maps}slice(e=0,n=this.maps.length){return new Jc(this._maps,this.mirror,e,n)}appendMap(e,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(e){for(let n=0,r=this._maps.length;n<e._maps.length;n++){let s=e.getMirror(n);this.appendMap(e._maps[n],s!=null&&s<n?r+s:void 0)}}getMirror(e){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==e)return this.mirror[n+(n%2?-1:1)]}}setMirror(e,n){this.mirror||(this.mirror=[]),this.mirror.push(e,n)}appendMappingInverted(e){for(let n=e.maps.length-1,r=this._maps.length+e._maps.length;n>=0;n--){let s=e.getMirror(n);this.appendMap(e._maps[n].invert(),s!=null&&s>n?r-s-1:void 0)}}invert(){let e=new Jc;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,n);return e}mapResult(e,n=1){return this._map(e,n,!1)}_map(e,n,r){let s=0;for(let i=this.from;i<this.to;i++){let o=this._maps[i],a=o.mapResult(e,n);if(a.recover!=null){let l=this.getMirror(i);if(l!=null&&l>i&&l<this.to){i=l,e=this._maps[l].recover(a.recover);continue}}s|=a.delInfo,e=a.pos}return r?e:new Ky(e,s,null)}}const Bm=Object.create(null);class Mt{getMap(){return ln.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Bm[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in Bm)throw new RangeError("Duplicate use of step JSON ID "+e);return Bm[e]=n,n.prototype.jsonID=e,n}}class nt{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new nt(e,null)}static fail(e){return new nt(null,e)}static fromReplace(e,n,r,s){try{return nt.ok(e.replace(n,r,s))}catch(i){if(i instanceof Gc)return nt.fail(i.message);throw i}}}function eb(t,e,n){let r=[];for(let s=0;s<t.childCount;s++){let i=t.child(s);i.content.size&&(i=i.copy(eb(i.content,e,i))),i.isInline&&(i=e(i,n,s)),r.push(i)}return P.fromArray(r)}class $s extends Mt{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=e.resolve(this.from),s=r.node(r.sharedDepth(this.to)),i=new W(eb(n.content,(o,a)=>!o.isAtom||!a.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),s),n.openStart,n.openEnd);return nt.fromReplace(e,this.from,this.to,i)}invert(){return new Qn(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new $s(n.pos,r.pos,this.mark)}merge(e){return e instanceof $s&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new $s(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new $s(n.from,n.to,e.markFromJSON(n.mark))}}Mt.jsonID("addMark",$s);class Qn extends Mt{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=new W(eb(n.content,s=>s.mark(this.mark.removeFromSet(s.marks)),e),n.openStart,n.openEnd);return nt.fromReplace(e,this.from,this.to,r)}invert(){return new $s(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Qn(n.pos,r.pos,this.mark)}merge(e){return e instanceof Qn&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Qn(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Qn(n.from,n.to,e.markFromJSON(n.mark))}}Mt.jsonID("removeMark",Qn);class zs extends Mt{constructor(e,n){super(),this.pos=e,this.mark=n}
vendor: 10,550 bytes, lines 497-498
497apply(e){let n=e.nodeAt(this.pos);if(!n)return nt.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return nt.fromReplace(e,this.pos,this.pos+1,new W(P.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let s=0;s<n.marks.length;s++)if(!n.marks[s].isInSet(r))return new zs(this.pos,n.marks[s]);return new zs(this.pos,this.mark)}}return new po(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new zs(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new zs(n.pos,e.markFromJSON(n.mark))}}Mt.jsonID("addNodeMark",zs);class po extends Mt{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return nt.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return nt.fromReplace(e,this.pos,this.pos+1,new W(P.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new zs(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new po(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new po(n.pos,e.markFromJSON(n.mark))}}Mt.jsonID("removeNodeMark",po);class et extends Mt{constructor(e,n,r,s=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=s}apply(e){return this.structure&&Yy(e,this.from,this.to)?nt.fail("Structure replace would overwrite content"):nt.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new ln([this.from,this.to-this.from,this.slice.size])}invert(e){return new et(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.to,-1),r=this.from==this.to&&et.MAP_BIAS<0?n:e.mapResult(this.from,1);return r.deletedAcross&&n.deletedAcross?null:new et(r.pos,Math.max(r.pos,n.pos),this.slice,this.structure)}merge(e){if(!(e instanceof et)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let n=this.slice.size+e.slice.size==0?W.empty:new W(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new et(this.from,this.to+(e.to-e.from),n,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let n=this.slice.size+e.slice.size==0?W.empty:new W(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new et(e.from,this.to,n,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new et(n.from,n.to,W.fromJSON(e,n.slice),!!n.structure)}}et.MAP_BIAS=1;Mt.jsonID("replace",et);class ht extends Mt{constructor(e,n,r,s,i,o,a=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=s,this.slice=i,this.insert=o,this.structure=a}apply(e){if(this.structure&&(Yy(e,this.from,this.gapFrom)||Yy(e,this.gapTo,this.to)))return nt.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return nt.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?nt.fromReplace(e,this.from,this.to,r):nt.fail("Content does not fit in gap")}getMap(){return new ln([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let n=this.gapTo-this.gapFrom;return new ht(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),s=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||s<n.pos||i>r.pos?null:new ht(n.pos,r.pos,s,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new ht(n.from,n.to,n.gapFrom,n.gapTo,W.fromJSON(e,n.slice),n.insert,!!n.structure)}}Mt.jsonID("replaceAround",ht);function Yy(t,e,n){let r=t.resolve(e),s=n-e,i=r.depth;for(;s>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,s--;if(s>0){let o=r.node(i).maybeChild(r.indexAfter(i));for(;s>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,s--}}return!1}function y8(t,e,n,r){let s=[],i=[],o,a;t.doc.nodesBetween(e,n,(l,c,u)=>{if(!l.isInline)return;let h=l.marks;if(!r.isInSet(h)&&u.type.allowsMarkType(r.type)){let p=Math.max(c,e),f=Math.min(c+l.nodeSize,n),g=r.addToSet(h);for(let m=0;m<h.length;m++)h[m].isInSet(g)||(o&&o.to==p&&o.mark.eq(h[m])?o.to=f:s.push(o=new Qn(p,f,h[m])));a&&a.to==p?a.to=f:i.push(a=new $s(p,f,r))}}),s.forEach(l=>t.step(l)),i.forEach(l=>t.step(l))}function v8(t,e,n,r){let s=[],i=0;t.doc.nodesBetween(e,n,(o,a)=>{if(!o.isInline)return;i++;let l=null;if(r instanceof xp){let c=o.marks,u;for(;u=r.isInSet(c);)(l||(l=[])).push(u),c=u.removeFromSet(c)}else r?r.isInSet(o.marks)&&(l=[r]):l=o.marks;if(l&&l.length){let c=Math.min(a+o.nodeSize,n);for(let u=0;u<l.length;u++){let h=l[u],p;for(let f=0;f<s.length;f++){let g=s[f];g.step==i-1&&h.eq(s[f].style)&&(p=g)}p?(p.to=c,p.step=i):s.push({style:h,from:Math.max(a,e),to:c,step:i})}}}),s.forEach(o=>t.step(new Qn(o.from,o.to,o.style)))}function tb(t,e,n,r=n.contentMatch,s=!0){let i=t.doc.nodeAt(e),o=[],a=e+1;for(let l=0;l<i.childCount;l++){let c=i.child(l),u=a+c.nodeSize,h=r.matchType(c.type);if(!h)o.push(new et(a,u,W.empty));else{r=h;for(let p=0;p<c.marks.length;p++)n.allowsMarkType(c.marks[p].type)||t.step(new Qn(a,u,c.marks[p]));if(s&&c.isText&&n.whitespace!="pre"){let p,f=/\r?\n|\r/g,g;for(;p=f.exec(c.text);)g||(g=new W(P.from(n.schema.text(" ",n.allowedMarks(c.marks))),0,0)),o.push(new et(a+p.index,a+p.index+p[0].length,g))}}a=u}if(!r.validEnd){let l=r.fillBefore(P.empty,!0);t.replace(a,a,new W(l,0,0))}for(let l=o.length-1;l>=0;l--)t.step(o[l])}function b8(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function sl(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth,s=0,i=0;;--r){let o=t.$from.node(r),a=t.$from.index(r)+s,l=t.$to.indexAfter(r)-i;if(r<t.depth&&o.canReplace(a,l,n))return r;if(r==0||o.type.spec.isolating||!b8(o,a,l))break;a&&(s=1),l<o.childCount&&(i=1)}return null}function x8(t,e,n){let{$from:r,$to:s,depth:i}=e,o=r.before(i+1),a=s.after(i+1),l=o,c=a,u=P.empty,h=0;for(let g=i,m=!1;g>n;g--)m||r.index(g)>0?(m=!0,u=P.from(r.node(g).copy(u)),h++):l--;let p=P.empty,f=0;for(let g=i,m=!1;g>n;g--)m||s.after(g+1)<s.end(g)?(m=!0,p=P.from(s.node(g).copy(p)),f++):c++;t.step(new ht(l,c,o,a,new W(u.append(p),h,f),u.size-h,!0))}function nb(t,e,n=null,r=t){let s=w8(t,e),i=s&&k8(r,e);return i?s.map(wk).concat({type:e,attrs:n}).concat(i.map(wk)):null}function wk(t){return{type:t,attrs:null}}function w8(t,e){let{parent:n,startIndex:r,endIndex:s}=t,i=n.contentMatchAt(r).findWrapping(e);if(!i)return null;let o=i.length?i[0]:e;return n.canReplaceWith(r,s,o)?i:null}function k8(t,e){let{parent:n,startIndex:r,endIndex:s}=t,i=n.child(r),o=e.contentMatch.findWrapping(i.type);if(!o)return null;let l=(o.length?o[o.length-1]:e).contentMatch;for(let c=r;l&&c<s;c++)l=l.matchType(n.child(c).type);return!l||!l.validEnd?null:o}function S8(t,e,n){let r=P.empty;for(let o=n.length-1;o>=0;o--){if(r.size){let a=n[o].type.contentMatch.matchFragment(r);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=P.from(n[o].type.create(n[o].attrs,r))}let s=e.start,i=e.end;t.step(new ht(s,i,s,i,new W(r,0,0),n.length,!0))}function C8(t,e,n,r,s){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=t.steps.length;t.doc.nodesBetween(e,n,(o,a)=>{let l=typeof s=="function"?s(o):s;if(o.isTextblock&&!o.hasMarkup(r,l)&&E8(t.doc,t.mapping.slice(i).map(a),r)){let c=null;if(r.schema.linebreakReplacement){let f=r.whitespace=="pre",g=!!r.contentMatch.matchType(r.schema.linebreakReplacement);f&&!g?c=!1:!f&&g&&(c=!0)}c===!1&&cj(t,o,a,i),tb(t,t.mapping.slice(i).map(a,1),r,void 0,c===null);let u=t.mapping.slice(i),h=u.map(a,1),p=u.map(a+o.nodeSize,1);return t.step(new ht(h,p,h+1,p-1,new W(P.from(r.create(l,null,o.marks)),0,0),1,!0)),c===!0&&lj(t,o,a,i),!1}})}function lj(t,e,n,r){e.forEach((s,i)=>{if(s.isText){let o,a=/\r?\n|\r/g;for(;o=a.exec(s.text);){let l=t.mapping.slice(r).map(n+1+i+o.index);t.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function cj(t,e,n,r){e.forEach((s,i)=>{if(s.type==s.type.schema.linebreakReplacement){let o=t.mapping.slice(r).map(n+1+i);t.replaceWith(o,o+1,e.type.schema.text(` 498`))}})}function E8(t,e,n){let r=t.resolve(e),s=r.index();return r.parent.canReplaceWith(s,s+1,n)}function T8(t,e,n,r,s){let i=t.doc.nodeAt(e);if(!i)throw new RangeError("No node at given position");n||(n=i.type);let o=n.create(r,null,s||i.marks);if(i.isLeaf)return t.replaceWith(e,e+i.nodeSize,o);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new ht(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new W(P.from(o),0,0),1,!0))}function ga(t,e,n=1,r){let s=t.resolve(e),i=s.depth-n,o=r&&r[r.length-1]||s.parent;if(i<0||s.parent.type.spec.isolating||!s.parent.canReplace(s.index(),s.parent.childCount)||!o.type.validContent(s.parent.content.cutByIndex(s.index(),s.parent.childCount)))return!1;for(let c=s.depth-1,u=n-2;c>i;c--,u--){let h=s.node(c),p=s.index(c);if(h.type.spec.isolating)return!1;let f=h.content.cutByIndex(p,h.childCount),g=r&&r[u+1];g&&(f=f.replaceChild(0,g.type.create(g.attrs)));let m=r&&r[u]||h;
vendor: 8,884 bytes, line 498
498if(!h.canReplace(p+1,h.childCount)||!m.type.validContent(f))return!1}let a=s.indexAfter(i),l=r&&r[0];return s.node(i).canReplaceWith(a,a,l?l.type:s.node(i+1).type)}function N8(t,e,n=1,r){let s=t.doc.resolve(e),i=P.empty,o=P.empty;for(let a=s.depth,l=s.depth-n,c=n-1;a>l;a--,c--){i=P.from(s.node(a).copy(i));let u=r&&r[c];o=P.from(u?u.type.create(u.attrs,o):s.node(a).copy(o))}t.step(new et(e,e,new W(i.append(o),n,n),!0))}function gi(t,e){let n=t.resolve(e),r=n.index();return uj(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function A8(t,e){e.content.size||t.type.compatibleContent(e.type);let n=t.contentMatchAt(t.childCount),{linebreakReplacement:r}=t.type.schema;for(let s=0;s<e.childCount;s++){let i=e.child(s),o=i.type==r?t.type.schema.nodes.text:i.type;if(n=n.matchType(o),!n||!t.type.allowsMarks(i.marks))return!1}return n.validEnd}function uj(t,e){return!!(t&&e&&!t.isLeaf&&A8(t,e))}function wp(t,e,n=-1){let r=t.resolve(e);for(let s=r.depth;;s--){let i,o,a=r.index(s);if(s==r.depth?(i=r.nodeBefore,o=r.nodeAfter):n>0?(i=r.node(s+1),a++,o=r.node(s).maybeChild(a)):(i=r.node(s).maybeChild(a-1),o=r.node(s+1)),i&&!i.isTextblock&&uj(i,o)&&r.node(s).canReplace(a,a+1))return e;if(s==0)break;e=n<0?r.before(s):r.after(s)}}function _8(t,e,n){let r=null,{linebreakReplacement:s}=t.doc.type.schema,i=t.doc.resolve(e-n),o=i.node().type;if(s&&o.inlineContent){let u=o.whitespace=="pre",h=!!o.contentMatch.matchType(s);u&&!h?r=!1:!u&&h&&(r=!0)}let a=t.steps.length;if(r===!1){let u=t.doc.resolve(e+n);cj(t,u.node(),u.before(),a)}o.inlineContent&&tb(t,e+n-1,o,i.node().contentMatchAt(i.index()),r==null);let l=t.mapping.slice(a),c=l.map(e-n);if(t.step(new et(c,l.map(e+n,-1),W.empty,!0)),r===!0){let u=t.doc.resolve(c);lj(t,u.node(),u.before(),t.steps.length)}return t}function j8(t,e,n){let r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(r.parentOffset==0)for(let s=r.depth-1;s>=0;s--){let i=r.index(s);if(r.node(s).canReplaceWith(i,i,n))return r.before(s+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(let s=r.depth-1;s>=0;s--){let i=r.indexAfter(s);if(r.node(s).canReplaceWith(i,i,n))return r.after(s+1);if(i<r.node(s).childCount)return null}return null}function dj(t,e,n){let r=t.resolve(e);if(!n.content.size)return e;let s=n.content;for(let i=0;i<n.openStart;i++)s=s.firstChild.content;for(let i=1;i<=(n.openStart==0&&n.size?2:1);i++)for(let o=r.depth;o>=0;o--){let a=o==r.depth?0:r.pos<=(r.start(o+1)+r.end(o+1))/2?-1:1,l=r.index(o)+(a>0?1:0),c=r.node(o),u=!1;if(i==1)u=c.canReplace(l,l,s);else{let h=c.contentMatchAt(l).findWrapping(s.firstChild.type);u=h&&c.canReplaceWith(l,l,h[0])}if(u)return a==0?r.pos:a<0?r.before(o+1):r.after(o+1)}return null}function kp(t,e,n=e,r=W.empty){if(e==n&&!r.size)return null;let s=t.resolve(e),i=t.resolve(n);return hj(s,i,r)?new et(e,n,r):new O8(s,i,r).fit()}function hj(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}class O8{constructor(e,n,r){this.$from=e,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=P.empty;for(let s=0;s<=e.depth;s++){let i=e.node(s);this.frontier.push({type:i.type,match:i.contentMatchAt(e.indexAfter(s))})}for(let s=e.depth;s>0;s--)this.placed=P.from(e.node(s).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,s=this.close(e<0?this.$to:r.doc.resolve(e));if(!s)return null;let i=this.placed,o=r.depth,a=s.depth;for(;o&&a&&i.childCount==1;)i=i.firstChild.content,o--,a--;let l=new W(i,o,a);return e>-1?new ht(r.pos,e,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new et(r.pos,s.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,s=this.unplaced.openEnd;r<e;r++){let i=n.firstChild;if(n.childCount>1&&(s=0),i.type.spec.isolating&&s<=r){e=r;break}n=i.content}for(let n=1;n<=2;n++)for(let r=n==1?e:this.unplaced.openStart;r>=0;r--){let s,i=null;r?(i=Fm(this.unplaced.content,r-1).firstChild,s=i.content):s=this.unplaced.content;let o=s.firstChild;for(let a=this.depth;a>=0;a--){let{type:l,match:c}=this.frontier[a],u,h=null;if(n==1&&(o?c.matchType(o.type)||(h=c.fillBefore(P.from(o),!1)):i&&l.compatibleContent(i.type)))return{sliceDepth:r,frontierDepth:a,parent:i,inject:h};if(n==2&&o&&(u=c.findWrapping(o.type)))return{sliceDepth:r,frontierDepth:a,parent:i,wrap:u};if(i&&c.matchType(i.type))break}}}openMore(){let{content:e,openStart:n,openEnd:r}=this.unplaced,s=Fm(e,n);return!s.childCount||s.firstChild.isLeaf?!1:(this.unplaced=new W(e,n+1,Math.max(r,s.size+n>=e.size-r?n+1:0)),!0)}dropNode(){let{content:e,openStart:n,openEnd:r}=this.unplaced,s=Fm(e,n);if(s.childCount<=1&&n>0){let i=e.size-n<=n+s.size;this.unplaced=new W(Il(e,n-1,1),n-1,i?n-1:r)}else this.unplaced=new W(Il(e,n,1),n,r)}placeNodes({sliceDepth:e,frontierDepth:n,parent:r,inject:s,wrap:i}){for(;this.depth>n;)this.closeFrontierNode();if(i)for(let m=0;m<i.length;m++)this.openFrontierNode(i[m]);let o=this.unplaced,a=r?r.content:o.content,l=o.openStart-e,c=0,u=[],{match:h,type:p}=this.frontier[n];if(s){for(let m=0;m<s.childCount;m++)u.push(s.child(m));h=h.matchFragment(s)}let f=a.size+e-(o.content.size-o.openEnd);for(;c<a.childCount;){let m=a.child(c),y=h.matchType(m.type);if(!y)break;c++,(c>1||l==0||m.content.size)&&(h=y,u.push(fj(m.mark(p.allowedMarks(m.marks)),c==1?l:0,c==a.childCount?f:-1)))}let g=c==a.childCount;g||(f=-1),this.placed=Ll(this.placed,n,P.from(u)),this.frontier[n].match=h,g&&f<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,y=a;m<f;m++){let v=y.lastChild;this.frontier.push({type:v.type,match:v.contentMatchAt(v.childCount)}),y=v.content}this.unplaced=g?e==0?W.empty:new W(Il(o.content,e-1,1),e-1,f<0?o.openEnd:e-1):new W(Il(o.content,e,c),o.openStart,o.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],n;if(!e.type.isTextblock||!Wm(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:r}=this.$to,s=this.$to.after(r);for(;r>1&&s==this.$to.end(--r);)++s;return s}findCloseLevel(e){e:for(let n=Math.min(this.depth,e.depth);n>=0;n--){let{match:r,type:s}=this.frontier[n],i=n<e.depth&&e.end(n+1)==e.pos+(e.depth-(n+1)),o=Wm(e,n,s,r,i);if(o){for(let a=n-1;a>=0;a--){let{match:l,type:c}=this.frontier[a],u=Wm(e,a,c,l,!0);if(!u||u.childCount)continue e}return{depth:n,fit:o,move:i?e.doc.resolve(e.after(n+1)):e}}}}close(e){let n=this.findCloseLevel(e);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=Ll(this.placed,n.depth,n.fit)),e=n.move;for(let r=n.depth+1;r<=e.depth;r++){let s=e.node(r),i=s.type.contentMatch.fillBefore(s.content,!0,e.index(r));this.openFrontierNode(s.type,s.attrs,i)}return e}openFrontierNode(e,n=null,r){let s=this.frontier[this.depth];s.match=s.match.matchType(e),this.placed=Ll(this.placed,this.depth,P.from(e.create(n,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(P.empty,!0);n.childCount&&(this.placed=Ll(this.placed,this.frontier.length,n))}}function Il(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(Il(t.firstChild.content,e-1,n)))}function Ll(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(Ll(t.lastChild.content,e-1,n)))}function Fm(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function fj(t,e,n){if(e<=0)return t;let r=t.content;return e>1&&(r=r.replaceChild(0,fj(r.firstChild,e-1,r.childCount==1?n-1:0))),e>0&&(r=t.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(t.type.contentMatch.matchFragment(r).fillBefore(P.empty,!0)))),t.copy(r)}function Wm(t,e,n,r,s){let i=t.node(e),o=s?t.indexAfter(e):t.index(e);if(o==i.childCount&&!n.compatibleContent(i.type))return null;let a=r.fillBefore(i.content,!0,o);return a&&!R8(n,i.content,o)?a:null}function R8(t,e,n){for(let r=n;r<e.childCount;r++)if(!t.allowsMarks(e.child(r).marks))return!0;return!1}function M8(t){return t.spec.defining||t.spec.definingForContent}function P8(t,e,n,r){if(!r.size)return t.deleteRange(e,n);let s=t.doc.resolve(e),i=t.doc.resolve(n);if(hj(s,i,r))return t.step(new et(e,n,r));let o=mj(s,i);o[o.length-1]==0&&o.pop();let a=-(s.depth+1);o.unshift(a);for(let p=s.depth,f=s.pos-1;p>0;p--,f--){let g=s.node(p).type.spec;if(g.defining||g.definingAsContext||g.isolating)break;o.indexOf(p)>-1?a=p:s.before(p)==f&&o.splice(1,0,-p)}let l=o.indexOf(a),c=[],u=r.openStart;for(let p=r.content,f=0;;f++){let g=p.firstChild;if(c.push(g),f==r.openStart)break;p=g.content}for(let p=u-1;p>=0;p--){let f=c[p],g=M8(f.type);
vendor: 14,620 bytes, line 498
498if(g&&!f.sameMarkup(s.node(Math.abs(a)-1)))u=p;else if(g||!f.type.isTextblock)break}for(let p=r.openStart;p>=0;p--){let f=(p+u+1)%(r.openStart+1),g=c[f];if(g)for(let m=0;m<o.length;m++){let y=o[(m+l)%o.length],v=!0;y<0&&(v=!1,y=-y);let b=s.node(y-1),x=s.index(y-1);if(b.canReplaceWith(x,x,g.type,g.marks))return t.replace(s.before(y),v?i.after(y):n,new W(pj(r.content,0,r.openStart,f),f,r.openEnd))}}let h=t.steps.length;for(let p=o.length-1;p>=0&&(t.replace(e,n,r),!(t.steps.length>h));p--){let f=o[p];f<0||(e=s.before(f),n=i.after(f))}}function pj(t,e,n,r,s){if(e<n){let i=t.firstChild;t=t.replaceChild(0,i.copy(pj(i.content,e+1,n,r,i)))}if(e>r){let i=s.contentMatchAt(0),o=i.fillBefore(t).append(t);t=o.append(i.matchFragment(o).fillBefore(P.empty,!0))}return t}function I8(t,e,n,r){if(!r.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let s=j8(t.doc,e,r.type);s!=null&&(e=n=s)}t.replaceRange(e,n,new W(P.from(r),0,0))}function L8(t,e,n){let r=t.doc.resolve(e),s=t.doc.resolve(n);if(r.parent.isTextblock&&s.parent.isTextblock&&r.start()!=s.start()&&r.parentOffset==0&&s.parentOffset==0){let o=r.sharedDepth(n),a=!1;for(let l=r.depth;l>o;l--)r.node(l).type.spec.isolating&&(a=!0);for(let l=s.depth;l>o;l--)s.node(l).type.spec.isolating&&(a=!0);if(!a){for(let l=r.depth;l>0&&e==r.start(l);l--)e=r.before(l);for(let l=s.depth;l>0&&n==s.start(l);l--)n=s.before(l);r=t.doc.resolve(e),s=t.doc.resolve(n)}}let i=mj(r,s);for(let o=0;o<i.length;o++){let a=i[o],l=o==i.length-1;if(l&&a==0||r.node(a).type.contentMatch.validEnd)return t.delete(r.start(a),s.end(a));if(a>0&&(l||r.node(a-1).canReplace(r.index(a-1),s.indexAfter(a-1))))return t.delete(r.before(a),s.after(a))}for(let o=1;o<=r.depth&&o<=s.depth;o++)if(e-r.start(o)==r.depth-o&&n>r.end(o)&&s.end(o)-n!=s.depth-o&&r.start(o-1)==s.start(o-1)&&r.node(o-1).canReplace(r.index(o-1),s.index(o-1)))return t.delete(r.before(o),n);t.delete(e,n)}function mj(t,e){let n=[],r=Math.min(t.depth,e.depth);for(let s=r;s>=0;s--){let i=t.start(s);if(i<t.pos-(t.depth-s)||e.end(s)>e.pos+(e.depth-s)||t.node(s).type.spec.isolating||e.node(s).type.spec.isolating)break;(i==e.start(s)||s==t.depth&&s==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&s&&e.start(s-1)==i-1)&&n.push(s)}return n}class ya extends Mt{constructor(e,n,r){super(),this.pos=e,this.attr=n,this.value=r}apply(e){let n=e.nodeAt(this.pos);if(!n)return nt.fail("No node at attribute step's position");let r=Object.create(null);for(let i in n.attrs)r[i]=n.attrs[i];r[this.attr]=this.value;let s=n.type.create(r,null,n.marks);return nt.fromReplace(e,this.pos,this.pos+1,new W(P.from(s),0,n.isLeaf?0:1))}getMap(){return ln.empty}invert(e){return new ya(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new ya(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new ya(n.pos,n.attr,n.value)}}Mt.jsonID("attr",ya);class Qc extends Mt{constructor(e,n){super(),this.attr=e,this.value=n}apply(e){let n=Object.create(null);for(let s in e.attrs)n[s]=e.attrs[s];n[this.attr]=this.value;let r=e.type.create(n,e.content,e.marks);return nt.ok(r)}getMap(){return ln.empty}invert(e){return new Qc(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Qc(n.attr,n.value)}}Mt.jsonID("docAttr",Qc);let Da=class extends Error{};Da=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n};Da.prototype=Object.create(Error.prototype);Da.prototype.constructor=Da;Da.prototype.name="TransformError";class gj{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Jc}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let n=this.maybeStep(e);if(n.failed)throw new Da(n.failed);return this}maybeStep(e){let n=e.apply(this.doc);return n.failed||this.addStep(e,n.doc),n}get docChanged(){return this.steps.length>0}changedRange(){let e=1e9,n=-1e9;for(let r=0;r<this.mapping.maps.length;r++){let s=this.mapping.maps[r];r&&(e=s.map(e,1),n=s.map(n,-1)),s.forEach((i,o,a,l)=>{e=Math.min(e,a),n=Math.max(n,l)})}return e==1e9?null:{from:e,to:n}}addStep(e,n){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=n}replace(e,n=e,r=W.empty){let s=kp(this.doc,e,n,r);return s&&this.step(s),this}replaceWith(e,n,r){return this.replace(e,n,new W(P.from(r),0,0))}delete(e,n){return this.replace(e,n,W.empty)}insert(e,n){return this.replaceWith(e,e,n)}replaceRange(e,n,r){return P8(this,e,n,r),this}replaceRangeWith(e,n,r){return I8(this,e,n,r),this}deleteRange(e,n){return L8(this,e,n),this}lift(e,n){return x8(this,e,n),this}join(e,n=1){return _8(this,e,n),this}wrap(e,n){return S8(this,e,n),this}setBlockType(e,n=e,r,s=null){return C8(this,e,n,r,s),this}setNodeMarkup(e,n,r=null,s){return T8(this,e,n,r,s),this}setNodeAttribute(e,n,r){return this.step(new ya(e,n,r)),this}setDocAttribute(e,n){return this.step(new Qc(e,n)),this}addNodeMark(e,n){return this.step(new zs(e,n)),this}removeNodeMark(e,n){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(n instanceof Ce)n.isInSet(r.marks)&&this.step(new po(e,n));else{let s=r.marks,i,o=[];for(;i=n.isInSet(s);)o.push(new po(e,i)),s=i.removeFromSet(s);for(let a=o.length-1;a>=0;a--)this.step(o[a])}return this}split(e,n=1,r){return N8(this,e,n,r),this}addMark(e,n,r){return y8(this,e,n,r),this}removeMark(e,n,r){return v8(this,e,n,r),this}clearIncompatible(e,n,r){return tb(this,e,n,r),this}}const Hm=Object.create(null);class le{constructor(e,n,r){this.$anchor=e,this.$head=n,this.ranges=r||[new D8(e.min(n),e.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let n=0;n<e.length;n++)if(e[n].$from.pos!=e[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,n=W.empty){let r=n.content.lastChild,s=null;for(let a=0;a<n.openEnd;a++)s=r,r=r.lastChild;let i=e.steps.length,o=this.ranges;for(let a=0;a<o.length;a++){let{$from:l,$to:c}=o[a],u=e.mapping.slice(i);e.replaceRange(u.map(l.pos),u.map(c.pos),a?W.empty:n),a==0&&Ck(e,i,(r?r.isInline:s&&s.isTextblock)?-1:1)}}replaceWith(e,n){let r=e.steps.length,s=this.ranges;for(let i=0;i<s.length;i++){let{$from:o,$to:a}=s[i],l=e.mapping.slice(r),c=l.map(o.pos),u=l.map(a.pos);i?e.deleteRange(c,u):(e.replaceRangeWith(c,u,n),Ck(e,r,n.isInline?-1:1))}}static findFrom(e,n,r=!1){let s=e.parent.inlineContent?new ee(e):Fo(e.node(0),e.parent,e.pos,e.index(),n,r);if(s)return s;for(let i=e.depth-1;i>=0;i--){let o=n<0?Fo(e.node(0),e.node(i),e.before(i+1),e.index(i),n,r):Fo(e.node(0),e.node(i),e.after(i+1),e.index(i)+1,n,r);if(o)return o}return null}static near(e,n=1){return this.findFrom(e,n)||this.findFrom(e,-n)||new An(e.node(0))}static atStart(e){return Fo(e,e,0,0,1)||new An(e)}static atEnd(e){return Fo(e,e,e.content.size,e.childCount,-1)||new An(e)}static fromJSON(e,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=Hm[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in Hm)throw new RangeError("Duplicate use of selection JSON ID "+e);return Hm[e]=n,n.prototype.jsonID=e,n}getBookmark(){return ee.between(this.$anchor,this.$head).getBookmark()}}le.prototype.visible=!0;class D8{constructor(e,n){this.$from=e,this.$to=n}}let kk=!1;function Sk(t){!kk&&!t.parent.inlineContent&&(kk=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class ee extends le{constructor(e,n=e){Sk(e),Sk(n),super(e,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,n){let r=e.resolve(n.map(this.head));if(!r.parent.inlineContent)return le.near(r);let s=e.resolve(n.map(this.anchor));return new ee(s.parent.inlineContent?s:r,r)}replace(e,n=W.empty){if(super.replace(e,n),n==W.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof ee&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Sp(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new ee(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){let s=e.resolve(n);return new this(s,r==n?s:e.resolve(r))}static between(e,n,r){let s=e.pos-n.pos;if((!r||s)&&(r=s>=0?1:-1),!n.parent.inlineContent){let i=le.findFrom(n,r,!0)||le.findFrom(n,-r,!0);if(i)n=i.$head;else return le.near(n,r)}return e.parent.inlineContent||(s==0?e=n:(e=(le.findFrom(e,-r,!0)||le.findFrom(e,r,!0)).$anchor,e.pos<n.pos!=s<0&&(e=n))),new ee(e,n)}}le.jsonID("text",ee);class Sp{constructor(e,n){this.anchor=e,this.head=n}map(e){return new Sp(e.map(this.anchor),e.map(this.head))}resolve(e){return ee.between(e.resolve(this.anchor),e.resolve(this.head))}}class X extends le{constructor(e){let n=e.nodeAfter,r=e.node(0).resolve(e.pos+n.nodeSize);super(e,r),this.node=n}map(e,n){let{deleted:r,pos:s}=n.mapResult(this.anchor),i=e.resolve(s);return r?le.near(i):new X(i)}content(){return new W(P.from(this.node),0,0)}eq(e){return e instanceof X&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new rb(this.anchor)}static fromJSON(e,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new X(e.resolve(n.anchor))}static create(e,n){return new X(e.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}X.prototype.visible=!1;le.jsonID("node",X);class rb{constructor(e){this.anchor=e}map(e){let{deleted:n,pos:r}=e.mapResult(this.anchor);return n?new Sp(r,r):new rb(r)}resolve(e){let n=e.resolve(this.anchor),r=n.nodeAfter;return r&&X.isSelectable(r)?new X(n):le.near(n)}}class An extends le{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,n=W.empty){if(n==W.empty){e.delete(0,e.doc.content.size);let r=le.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,n)}toJSON(){return{type:"all"}}static fromJSON(e){return new An(e)}map(e){return new An(e)}eq(e){return e instanceof An}getBookmark(){return $8}}le.jsonID("all",An);const $8={map(){return this},resolve(t){return new An(t)}};function Fo(t,e,n,r,s,i=!1){if(e.inlineContent)return ee.create(t,n);for(let o=r-(s>0?0:1);s>0?o<e.childCount:o>=0;o+=s){let a=e.child(o);if(a.isAtom){if(!i&&X.isSelectable(a))return X.create(t,n-(s<0?a.nodeSize:0))}else{let l=Fo(t,a,n+s,s<0?a.childCount:0,s,i);if(l)return l}n+=a.nodeSize*s}return null}function Ck(t,e,n){let r=t.steps.length-1;if(r<e)return;let s=t.steps[r];if(!(s instanceof et||s instanceof ht))return;let i=t.mapping.maps[r],o;i.forEach((a,l,c,u)=>{o==null&&(o=u)}),t.setSelection(le.near(t.doc.resolve(o),n))}const Ek=1,ud=2,Tk=4;class z8 extends gj{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|Ek)&~ud,this.storedMarks=null,this}get selectionSet(){return(this.updated&Ek)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=ud,this}ensureMarks(e){return Ce.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&ud)>0}addStep(e,n){super.addStep(e,n),this.updated=this.updated&~ud,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,n=!0){let r=this.selection;return n&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||Ce.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,n,r){let s=this.doc.type.schema;if(n==null)return e?this.replaceSelectionWith(s.text(e),!0):this.deleteSelection();{if(r==null&&(r=n),!e)return this.deleteRange(n,r);let i=this.storedMarks;if(!i){let o=this.doc.resolve(n);i=r==n?o.marks():o.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,s.text(e,i)),!this.selection.empty&&this.selection.to==n+e.length&&this.setSelection(le.near(this.selection.$to)),this}}setMeta(e,n){return this.meta[typeof e=="string"?e:e.key]=n,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=Tk,this}get scrolledIntoView(){return(this.updated&Tk)>0}}function Nk(t,e){return!e||!t?t:t.bind(e)}class Dl{constructor(e,n,r){this.name=e,this.init=Nk(n.init,r),this.apply=Nk(n.apply,r)}}const B8=[new Dl("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new Dl("selection",{init(t,e){return t.selection||le.atStart(e.doc)},apply(t){return t.selection}}),new Dl("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,n,r){return r.selection.$cursor?t.storedMarks:null}}),new Dl("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class Um{constructor(e,n){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=B8.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new Dl(r.key,r.spec.state,r))})}}class Li{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}
vendor: 13,685 bytes, lines 498-499
498apply(e){return this.applyTransaction(e).state}filterTransaction(e,n=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=n){let s=this.config.plugins[r];if(s.spec.filterTransaction&&!s.spec.filterTransaction.call(s,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let n=[e],r=this.applyInner(e),s=null;for(;;){let i=!1;for(let o=0;o<this.config.plugins.length;o++){let a=this.config.plugins[o];if(a.spec.appendTransaction){let l=s?s[o].n:0,c=s?s[o].state:this,u=l<n.length&&a.spec.appendTransaction.call(a,l?n.slice(l):n,c,r);if(u&&r.filterTransaction(u,o)){if(u.setMeta("appendedTransaction",e),!s){s=[];for(let h=0;h<this.config.plugins.length;h++)s.push(h<o?{state:r,n:n.length}:{state:this,n:0})}n.push(u),r=r.applyInner(u),i=!0}s&&(s[o]={state:r,n:n.length})}}if(!i)return{state:r,transactions:n}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new Li(this.config),r=this.config.fields;for(let s=0;s<r.length;s++){let i=r[s];n[i.name]=i.apply(e,this[i.name],this,n)}return n}get tr(){return new z8(this)}static create(e){let n=new Um(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new Li(n);for(let s=0;s<n.fields.length;s++)r[n.fields[s].name]=n.fields[s].init(e,r);return r}reconfigure(e){let n=new Um(this.schema,e.plugins),r=n.fields,s=new Li(n);for(let i=0;i<r.length;i++){let o=r[i].name;s[o]=this.hasOwnProperty(o)?this[o]:r[i].init(e,s)}return s}toJSON(e){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(r=>r.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let s=e[r],i=s.spec.state;i&&i.toJSON&&(n[r]=i.toJSON.call(s,this[s.key]))}return n}static fromJSON(e,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let s=new Um(e.schema,e.plugins),i=new Li(s);return s.fields.forEach(o=>{if(o.name=="doc")i.doc=Ys.fromJSON(e.schema,n.doc);else if(o.name=="selection")i.selection=le.fromJSON(i.doc,n.selection);else if(o.name=="storedMarks")n.storedMarks&&(i.storedMarks=n.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let a in r){let l=r[a],c=l.spec.state;if(l.key==o.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(n,a)){i[o.name]=c.fromJSON.call(l,e,n[a],i);return}}i[o.name]=o.init(e,i)}}),i}}function yj(t,e,n){for(let r in t){let s=t[r];s instanceof Function?s=s.bind(e):r=="handleDOMEvents"&&(s=yj(s,e,{})),n[r]=s}return n}class Le{constructor(e){this.spec=e,this.props={},e.props&&yj(e.props,this,this.props),this.key=e.key?e.key.key:vj("plugin")}getState(e){return e[this.key]}}const Vm=Object.create(null);function vj(t){return t in Vm?t+"$"+ ++Vm[t]:(Vm[t]=0,t+"$")}class at{constructor(e="key"){this.key=vj(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}function bj(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const F8=(t,e,n)=>{let r=bj(t,n);if(!r)return!1;let s=sb(r);if(!s){let o=r.blockRange(),a=o&&sl(o);return a==null?!1:(e&&e(t.tr.lift(o,a).scrollIntoView()),!0)}let i=s.nodeBefore;if(Sj(t,s,e,-1))return!0;if(r.parent.content.size==0&&($a(i,"end")||X.isSelectable(i)))for(let o=r.depth;;o--){let a=kp(t.doc,r.before(o),r.after(o),W.empty);if(a&&a.slice.size<a.to-a.from){if(e){let l=t.tr.step(a);l.setSelection($a(i,"end")?le.findFrom(l.doc.resolve(l.mapping.map(s.pos,-1)),-1):X.create(l.doc,s.pos-i.nodeSize)),e(l.scrollIntoView())}return!0}if(o==1||r.node(o-1).childCount>1)break}return i.isAtom&&s.depth==r.depth-1?(e&&e(t.tr.delete(s.pos-i.nodeSize,s.pos).scrollIntoView()),!0):!1},W8=(t,e,n)=>{let r=bj(t,n);if(!r)return!1;let s=sb(r);return s?xj(t,s,e):!1},H8=(t,e,n)=>{let r=wj(t,n);if(!r)return!1;let s=ib(r);return s?xj(t,s,e):!1};function xj(t,e,n){let r=e.nodeBefore,s=r,i=e.pos-1;for(;!s.isTextblock;i--){if(s.type.spec.isolating)return!1;let u=s.lastChild;if(!u)return!1;s=u}let o=e.nodeAfter,a=o,l=e.pos+1;for(;!a.isTextblock;l++){if(a.type.spec.isolating)return!1;let u=a.firstChild;if(!u)return!1;a=u}let c=kp(t.doc,i,l,W.empty);if(!c||c.from!=i||c instanceof et&&c.slice.size>=l-i)return!1;if(n){let u=t.tr.step(c);u.setSelection(ee.create(u.doc,i)),n(u.scrollIntoView())}return!0}function $a(t,e,n=!1){for(let r=t;r;r=e=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}const U8=(t,e,n)=>{let{$head:r,empty:s}=t.selection,i=r;if(!s)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):r.parentOffset>0)return!1;i=sb(r)}let o=i&&i.nodeBefore;return!o||!X.isSelectable(o)?!1:(e&&e(t.tr.setSelection(X.create(t.doc,i.pos-o.nodeSize)).scrollIntoView()),!0)};function sb(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function wj(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)?null:n}const V8=(t,e,n)=>{let r=wj(t,n);if(!r)return!1;let s=ib(r);if(!s)return!1;let i=s.nodeAfter;if(Sj(t,s,e,1))return!0;if(r.parent.content.size==0&&($a(i,"start")||X.isSelectable(i))){let o=kp(t.doc,r.before(),r.after(),W.empty);if(o&&o.slice.size<o.to-o.from){if(e){let a=t.tr.step(o);a.setSelection($a(i,"start")?le.findFrom(a.doc.resolve(a.mapping.map(s.pos)),1):X.create(a.doc,a.mapping.map(s.pos))),e(a.scrollIntoView())}return!0}}return i.isAtom&&s.depth==r.depth-1?(e&&e(t.tr.delete(s.pos,s.pos+i.nodeSize).scrollIntoView()),!0):!1},q8=(t,e,n)=>{let{$head:r,empty:s}=t.selection,i=r;if(!s)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size)return!1;i=ib(r)}let o=i&&i.nodeAfter;return!o||!X.isSelectable(o)?!1:(e&&e(t.tr.setSelection(X.create(t.doc,i.pos)).scrollIntoView()),!0)};function ib(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){let n=t.node(e);if(t.index(e)+1<n.childCount)return t.doc.resolve(t.after(e+1));if(n.type.spec.isolating)break}return null}const G8=(t,e)=>{let n=t.selection,r=n instanceof X,s;if(r){if(n.node.isTextblock||!gi(t.doc,n.from))return!1;s=n.from}else if(s=wp(t.doc,n.from,-1),s==null)return!1;if(e){let i=t.tr.join(s);r&&i.setSelection(X.create(i.doc,s-t.doc.resolve(s).nodeBefore.nodeSize)),e(i.scrollIntoView())}return!0},K8=(t,e)=>{let n=t.selection,r;if(n instanceof X){if(n.node.isTextblock||!gi(t.doc,n.to))return!1;r=n.to}else if(r=wp(t.doc,n.to,1),r==null)return!1;return e&&e(t.tr.join(r).scrollIntoView()),!0},Y8=(t,e)=>{let{$from:n,$to:r}=t.selection,s=n.blockRange(r),i=s&&sl(s);return i==null?!1:(e&&e(t.tr.lift(s,i).scrollIntoView()),!0)},J8=(t,e)=>{let{$head:n,$anchor:r}=t.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(e&&e(t.tr.insertText(` 499`).scrollIntoView()),!0)};function kj(t){for(let e=0;e<t.edgeCount;e++){let{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const Q8=(t,e)=>{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let s=n.node(-1),i=n.indexAfter(-1),o=kj(s.contentMatchAt(i));if(!o||!s.canReplaceWith(i,i,o))return!1;if(e){let a=n.after(),l=t.tr.replaceWith(a,a,o.createAndFill());l.setSelection(le.near(l.doc.resolve(a),1)),e(l.scrollIntoView())}return!0},X8=(t,e)=>{let n=t.selection,{$from:r,$to:s}=n;if(n instanceof An||r.parent.inlineContent||s.parent.inlineContent)return!1;let i=kj(s.parent.contentMatchAt(s.indexAfter()));if(!i||!i.isTextblock)return!1;if(e){let o=(!r.parentOffset&&s.index()<s.parent.childCount?r:s).pos,a=t.tr.insert(o,i.createAndFill());a.setSelection(ee.create(a.doc,o+1)),e(a.scrollIntoView())}return!0},Z8=(t,e)=>{let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if(ga(t.doc,i))return e&&e(t.tr.split(i).scrollIntoView()),!0}let r=n.blockRange(),s=r&&sl(r);return s==null?!1:(e&&e(t.tr.lift(r,s).scrollIntoView()),!0)},eV=(t,e)=>{let{$from:n,to:r}=t.selection,s,i=n.sharedDepth(r);return i==0?!1:(s=n.before(i),e&&e(t.tr.setSelection(X.create(t.doc,s))),!0)};function tV(t,e,n){let r=e.nodeBefore,s=e.nodeAfter,i=e.index();return!r||!s||!r.type.compatibleContent(s.type)?!1:!r.content.size&&e.parent.canReplace(i-1,i)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(i,i+1)||!(s.isTextblock||gi(t.doc,e.pos))?!1:(n&&n(t.tr.join(e.pos).scrollIntoView()),!0)}function Sj(t,e,n,r){let s=e.nodeBefore,i=e.nodeAfter,o,a,l=s.type.spec.isolating||i.type.spec.isolating;if(!l&&tV(t,e,n))return!0;let c=!l&&e.parent.canReplace(e.index(),e.index()+1);if(c&&(o=(a=s.contentMatchAt(s.childCount)).findWrapping(i.type))&&a.matchType(o[0]||i.type).validEnd){if(n){let f=e.pos+i.nodeSize,g=P.empty;for(let v=o.length-1;v>=0;v--)g=P.from(o[v].create(null,g));g=P.from(s.copy(g));let m=t.tr.step(new ht(e.pos-1,f,e.pos,f,new W(g,1,0),o.length,!0)),y=m.doc.resolve(f+2*o.length);y.nodeAfter&&y.nodeAfter.type==s.type&&gi(m.doc,y.pos)&&m.join(y.pos),n(m.scrollIntoView())}return!0}let u=i.type.spec.isolating||r>0&&l?null:le.findFrom(e,1),h=u&&u.$from.blockRange(u.$to),p=h&&sl(h);if(p!=null&&p>=e.depth)return n&&n(t.tr.lift(h,p).scrollIntoView()),!0;if(c&&$a(i,"start",!0)&&$a(s,"end")){let f=s,g=[];for(;g.push(f),!f.isTextblock;)f=f.lastChild;let m=i,y=1;for(;!m.isTextblock;m=m.firstChild)y++;if(f.canReplace(f.childCount,f.childCount,m.content)){if(n){let v=P.empty;for(let x=g.length-1;x>=0;x--)v=P.from(g[x].copy(v));let b=t.tr.step(new ht(e.pos-g.length,e.pos+i.nodeSize,e.pos+y,e.pos+i.nodeSize-y,new W(v,g.length,0),0,!0));n(b.scrollIntoView())}return!0}}return!1}function Cj(t){return function(e,n){let r=e.selection,s=t<0?r.$from:r.$to,i=s.depth;for(;s.node(i).isInline;){if(!i)return!1;i--}return s.node(i).isTextblock?(n&&n(e.tr.setSelection(ee.create(e.doc,t<0?s.start(i):s.end(i)))),!0):!1}}const nV=Cj(-1),rV=Cj(1);function sV(t,e=null){return function(n,r){let{$from:s,$to:i}=n.selection,o=s.blockRange(i),a=o&&nb(o,t,e);return a?(r&&r(n.tr.wrap(o,a).scrollIntoView()),!0):!1}}function Ak(t,e=null){return function(n,r){let s=!1;for(let i=0;i<n.selection.ranges.length&&!s;i++){let{$from:{pos:o},$to:{pos:a}}=n.selection.ranges[i];n.doc.nodesBetween(o,a,(l,c)=>{if(s)return!1;if(!(!l.isTextblock||l.hasMarkup(t,e)))if(l.type==t)s=!0;else{let u=n.doc.resolve(c),h=u.index();s=u.parent.canReplaceWith(h,h+1,t)}})}if(!s)return!1;if(r){let i=n.tr;for(let o=0;o<n.selection.ranges.length;o++){let{$from:{pos:a},$to:{pos:l}}=n.selection.ranges[o];i.setBlockType(a,l,t,e)}r(i.scrollIntoView())}return!0}}typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function iV(t,e=null){return function(n,r){let{$from:s,$to:i}=n.selection,o=s.blockRange(i);if(!o)return!1;let a=r?n.tr:null;return oV(a,o,t,e)?(r&&r(a.scrollIntoView()),!0):!1}}function oV(t,e,n,r=null){let s=!1,i=e,o=e.$from.doc;if(e.depth>=2&&e.$from.node(e.depth-1).type.compatibleContent(n)&&e.startIndex==0){if(e.$from.index(e.depth-1)==0)return!1;let l=o.resolve(e.start-2);i=new Wh(l,l,e.depth),e.endIndex<e.parent.childCount&&(e=new Wh(e.$from,o.resolve(e.$to.end(e.depth)),e.depth)),s=!0}let a=nb(i,n,r,e);return a?(t&&aV(t,e,a,s,n),!0):!1}function aV(t,e,n,r,s){let i=P.empty;for(let u=n.length-1;u>=0;u--)i=P.from(n[u].type.create(n[u].attrs,i));t.step(new ht(e.start-(r?2:0),e.end,e.start,e.end,new W(i,0,0),n.length,!0));let o=0;for(let u=0;u<n.length;u++)n[u].type==s&&(o=u+1);let a=n.length-o,l=e.start+n.length-(r?2:0),c=e.parent;for(let u=e.startIndex,h=e.endIndex,p=!0;u<h;u++,p=!1)!p&&ga(t.doc,l,a)&&(t.split(l,a),l+=2*a),l+=c.child(u).nodeSize;return t}function lV(t){return function(e,n){let{$from:r,$to:s}=e.selection,i=r.blockRange(s,o=>o.childCount>0&&o.firstChild.type==t);return i?n?r.node(i.depth-1).type==t?cV(e,n,t,i):uV(e,n,i):!0:!1}}function cV(t,e,n,r){let s=t.tr,i=r.end,o=r.$to.end(r.depth);i<o&&(s.step(new ht(i-1,o,i,o,new W(P.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new Wh(s.doc.resolve(r.$from.pos),s.doc.resolve(o),r.depth));const a=sl(r);if(a==null)return!1;s.lift(r,a);let l=s.doc.resolve(s.mapping.map(i,-1)-1);return gi(s.doc,l.pos)&&l.nodeBefore.type==l.nodeAfter.type&&s.join(l.pos),e(s.scrollIntoView()),!0}function uV(t,e,n){let r=t.tr,s=n.parent;for(let f=n.end,g=n.endIndex-1,m=n.startIndex;g>m;g--)f-=s.child(g).nodeSize,r.delete(f-1,f+1);let i=r.doc.resolve(n.start),o=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let a=n.startIndex==0,l=n.endIndex==s.childCount,c=i.node(-1),u=i.index(-1);if(!c.canReplace(u+(a?0:1),u+1,o.content.append(l?P.empty:P.from(s))))return!1;let h=i.pos,p=h+o.nodeSize;return r.step(new ht(h-(a?1:0),p+(l?1:0),h+1,p-1,new W((a?P.empty:P.from(s.copy(P.empty))).append(l?P.empty:P.from(s.copy(P.empty))),a?0:1,l?0:1),a?0:1)),e(r.scrollIntoView()),!0}function dV(t){return function(e,n){let{$from:r,$to:s}=e.selection,i=r.blockRange(s,c=>c.childCount>0&&c.firstChild.type==t);if(!i)return!1;let o=i.startIndex;if(o==0)return!1;let a=i.parent,l=a.child(o-1);if(l.type!=t)return!1;if(n){let c=l.lastChild&&l.lastChild.type==a.type,u=P.from(c?t.create():null),h=new W(P.from(t.create(null,P.from(a.type.create(null,u)))),c?3:1,0),p=i.start,f=i.end;n(e.tr.step(new ht(p-(c?3:1),f,p,f,h,1,!0)).scrollIntoView())}return!0}}const yt=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},za=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let Jy=null;
vendor: 40,168 bytes, lines 499-500
499const Wr=function(t,e,n){let r=Jy||(Jy=document.createRange());return r.setEnd(t,n??t.nodeValue.length),r.setStart(t,e||0),r},hV=function(){Jy=null},mo=function(t,e,n,r){return n&&(_k(t,e,n,r,-1)||_k(t,e,n,r,1))},fV=/^(img|br|input|textarea|hr)$/i;function _k(t,e,n,r,s){for(var i;;){if(t==n&&e==r)return!0;if(e==(s<0?0:En(t))){let o=t.parentNode;if(!o||o.nodeType!=1||gu(t)||fV.test(t.nodeName)||t.contentEditable=="false")return!1;e=yt(t)+(s<0?0:1),t=o}else if(t.nodeType==1){let o=t.childNodes[e+(s<0?-1:0)];if(o.nodeType==1&&o.contentEditable=="false")if(!((i=o.pmViewDesc)===null||i===void 0)&&i.ignoreForSelection)e+=s;else return!1;else t=o,e=s<0?En(t):0}else return!1}}function En(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function pV(t,e){for(;;){if(t.nodeType==3&&e)return t;if(t.nodeType==1&&e>0){if(t.contentEditable=="false")return null;t=t.childNodes[e-1],e=En(t)}else if(t.parentNode&&!gu(t))e=yt(t),t=t.parentNode;else return null}}function mV(t,e){for(;;){if(t.nodeType==3&&e<t.nodeValue.length)return t;if(t.nodeType==1&&e<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[e],e=0}else if(t.parentNode&&!gu(t))e=yt(t)+1,t=t.parentNode;else return null}}function gV(t,e,n){for(let r=e==0,s=e==En(t);r||s;){if(t==n)return!0;let i=yt(t);if(t=t.parentNode,!t)return!1;r=r&&i==0,s=s&&i==En(t)}}function gu(t){let e;for(let n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const Cp=function(t){return t.focusNode&&mo(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function _i(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function yV(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function vV(t,e,n){if(t.caretPositionFromPoint)try{let r=t.caretPositionFromPoint(e,n);if(r)return{node:r.offsetNode,offset:Math.min(En(r.offsetNode),r.offset)}}catch{}if(t.caretRangeFromPoint){let r=t.caretRangeFromPoint(e,n);if(r)return{node:r.startContainer,offset:Math.min(En(r.startContainer),r.startOffset)}}}const Cr=typeof navigator<"u"?navigator:null,jk=typeof document<"u"?document:null,yi=Cr&&Cr.userAgent||"",Qy=/Edge\/(\d+)/.exec(yi),Ej=/MSIE \d/.exec(yi),Xy=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(yi),en=!!(Ej||Xy||Qy),Qs=Ej?document.documentMode:Xy?+Xy[1]:Qy?+Qy[1]:0,_n=!en&&/gecko\/(\d+)/i.test(yi);_n&&+(/Firefox\/(\d+)/.exec(yi)||[0,0])[1];const Zy=!en&&/Chrome\/(\d+)/.exec(yi),bt=!!Zy,Tj=Zy?+Zy[1]:0,Rt=!en&&!!Cr&&/Apple Computer/.test(Cr.vendor),Ba=Rt&&(/Mobile\/\w+/.test(yi)||!!Cr&&Cr.maxTouchPoints>2),kn=Ba||(Cr?/Mac/.test(Cr.platform):!1),Nj=Cr?/Win/.test(Cr.platform):!1,Kr=/Android \d/.test(yi),yu=!!jk&&"webkitFontSmoothing"in jk.documentElement.style,bV=yu?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function xV(t){let e=t.defaultView&&t.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function Rr(t,e){return typeof t=="number"?t:t[e]}function wV(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,r=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*r}}function Ok(t,e,n){if(!ev(e)&&e.left==0)return;let r=t.someProp("scrollThreshold")||0,s=t.someProp("scrollMargin")||5,i=t.dom.ownerDocument;for(let o=n||t.dom;o;){if(o.nodeType!=1){o=za(o);continue}let a=o,l=a==i.body,c=l?xV(i):wV(a),u=0,h=0;if(e.top<c.top+Rr(r,"top")?h=-(c.top-e.top+Rr(s,"top")):e.bottom>c.bottom-Rr(r,"bottom")&&(h=e.bottom-e.top>c.bottom-c.top?e.top+Rr(s,"top")-c.top:e.bottom-c.bottom+Rr(s,"bottom")),e.left<c.left+Rr(r,"left")?u=-(c.left-e.left+Rr(s,"left")):e.right>c.right-Rr(r,"right")&&(u=e.right-c.right+Rr(s,"right")),u||h)if(l)i.defaultView.scrollBy(u,h);else{let f=a.scrollLeft,g=a.scrollTop;h&&(a.scrollTop+=h),u&&(a.scrollLeft+=u);let m=a.scrollLeft-f,y=a.scrollTop-g;e={left:e.left-m,top:e.top-y,right:e.right-m,bottom:e.bottom-y}}let p=l?"fixed":getComputedStyle(o).position;if(/^(fixed|sticky)$/.test(p))break;o=p=="absolute"?o.offsetParent:za(o)}}function kV(t){let e=t.dom.getBoundingClientRect(),n=Math.max(0,e.top),r,s;for(let i=(e.left+e.right)/2,o=n+1;o<Math.min(innerHeight,e.bottom);o+=5){let a=t.root.elementFromPoint(i,o);if(!a||a==t.dom||!t.dom.contains(a))continue;let l=a.getBoundingClientRect();if(l.top>=n-20){r=a,s=l.top;break}}return{refDOM:r,refTop:s,stack:Aj(t.dom)}}function Aj(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=za(r));return e}function SV({refDOM:t,refTop:e,stack:n}){let r=t?t.getBoundingClientRect().top:0;_j(n,r==0?0:r-e)}function _j(t,e){for(let n=0;n<t.length;n++){let{dom:r,top:s,left:i}=t[n];r.scrollTop!=s+e&&(r.scrollTop=s+e),r.scrollLeft!=i&&(r.scrollLeft=i)}}let Do=null;function CV(t){if(t.setActive)return t.setActive();if(Do)return t.focus(Do);let e=Aj(t);t.focus(Do==null?{get preventScroll(){return Do={preventScroll:!0},!0}}:void 0),Do||(Do=!1,_j(e,0))}function jj(t,e){let n,r=2e8,s,i=0,o=e.top,a=e.top,l,c;for(let u=t.firstChild,h=0;u;u=u.nextSibling,h++){let p;if(u.nodeType==1)p=u.getClientRects();else if(u.nodeType==3)p=Wr(u).getClientRects();else continue;for(let f=0;f<p.length;f++){let g=p[f];if(g.top<=o&&g.bottom>=a){o=Math.max(g.bottom,o),a=Math.min(g.top,a);let m=g.left>e.left?g.left-e.left:g.right<e.left?e.left-g.right:0;if(m<r){n=u,r=m,s=m&&n.nodeType==3?{left:g.right<e.left?g.right:g.left,top:e.top}:e,u.nodeType==1&&m&&(i=h+(e.left>=(g.left+g.right)/2?1:0));continue}}else g.top>e.top&&!l&&g.left<=e.left&&g.right>=e.left&&(l=u,c={left:Math.max(g.left,Math.min(g.right,e.left)),top:g.top});!n&&(e.left>=g.right&&e.top>=g.top||e.left>=g.left&&e.top>=g.bottom)&&(i=h+1)}}return!n&&l&&(n=l,s=c,r=0),n&&n.nodeType==3?EV(n,s):!n||r&&n.nodeType==1?{node:t,offset:i}:jj(n,s)}function EV(t,e){let n=t.nodeValue.length,r=document.createRange(),s;for(let i=0;i<n;i++){r.setEnd(t,i+1),r.setStart(t,i);let o=bs(r,1);if(o.top!=o.bottom&&ob(e,o)){s={node:t,offset:i+(e.left>=(o.left+o.right)/2?1:0)};break}}return r.detach(),s||{node:t,offset:0}}function ob(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function TV(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}function NV(t,e,n){let{node:r,offset:s}=jj(e,n),i=-1;if(r.nodeType==1&&!r.firstChild){let o=r.getBoundingClientRect();i=o.left!=o.right&&n.left>(o.left+o.right)/2?1:-1}return t.docView.posFromDOM(r,s,i)}function AV(t,e,n,r){let s=-1;for(let i=e,o=!1;i!=t.dom;){let a=t.docView.nearestDesc(i,!0),l;if(!a)return null;if(a.dom.nodeType==1&&(a.node.isBlock&&a.parent||!a.contentDOM)&&((l=a.dom.getBoundingClientRect()).width||l.height)&&(a.node.isBlock&&a.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(a.dom.nodeName)&&(!o&&l.left>r.left||l.top>r.top?s=a.posBefore:(!o&&l.right<r.left||l.bottom<r.top)&&(s=a.posAfter),o=!0),!a.contentDOM&&s<0&&!a.node.isText))return(a.node.isBlock?r.top<(l.top+l.bottom)/2:r.left<(l.left+l.right)/2)?a.posBefore:a.posAfter;i=a.dom.parentNode}return s>-1?s:t.docView.posFromDOM(e,n,-1)}function Oj(t,e,n){let r=t.childNodes.length;if(r&&n.top<n.bottom)for(let s=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-n.top)/(n.bottom-n.top))-2)),i=s;;){let o=t.childNodes[i];if(o.nodeType==1){let a=o.getClientRects();for(let l=0;l<a.length;l++){let c=a[l];if(ob(e,c))return Oj(o,e,c)}}if((i=(i+1)%r)==s)break}return t}function _V(t,e){let n=t.dom.ownerDocument,r,s=0,i=vV(n,e.left,e.top);i&&({node:r,offset:s}=i);let o=(t.root.elementFromPoint?t.root:n).elementFromPoint(e.left,e.top),a;if(!o||!t.dom.contains(o.nodeType!=1?o.parentNode:o)){let c=t.dom.getBoundingClientRect();if(!ob(e,c)||(o=Oj(t.dom,e,c),!o))return null}if(Rt)for(let c=o;r&&c;c=za(c))c.draggable&&(r=void 0);if(o=TV(o,e),r){if(_n&&r.nodeType==1&&(s=Math.min(s,r.childNodes.length),s<r.childNodes.length)){let u=r.childNodes[s],h;u.nodeName=="IMG"&&(h=u.getBoundingClientRect()).right<=e.left&&h.bottom>e.top&&s++}let c;yu&&s&&r.nodeType==1&&(c=r.childNodes[s-1]).nodeType==1&&c.contentEditable=="false"&&c.getBoundingClientRect().top>=e.top&&s--,r==t.dom&&s==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?a=t.state.doc.content.size:(s==0||r.nodeType!=1||r.childNodes[s-1].nodeName!="BR")&&(a=AV(t,r,s,e))}a==null&&(a=NV(t,o,e));let l=t.docView.nearestDesc(o,!0);return{pos:a,inside:l?l.posAtStart-l.border:-1}}function ev(t){return t.top<t.bottom||t.left<t.right}function bs(t,e){let n=t.getClientRects();if(n.length){let r=n[e<0?0:n.length-1];if(ev(r))return r}return Array.prototype.find.call(n,ev)||t.getBoundingClientRect()}const jV=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Rj(t,e,n){let{node:r,offset:s,atom:i}=t.docView.domFromPos(e,n<0?-1:1),o=yu||_n;if(r.nodeType==3)if(o&&(jV.test(r.nodeValue)||(n<0?!s:s==r.nodeValue.length))){let l=bs(Wr(r,s,s),n);if(_n&&s&&/\s/.test(r.nodeValue[s-1])&&s<r.nodeValue.length){let c=bs(Wr(r,s-1,s-1),-1);if(c.top==l.top){let u=bs(Wr(r,s,s+1),-1);if(u.top!=l.top)return Sl(u,u.left<c.left)}}return l}else{let l=s,c=s,u=n<0?1:-1;return n<0&&!s?(c++,u=-1):n>=0&&s==r.nodeValue.length?(l--,u=1):n<0?l--:c++,Sl(bs(Wr(r,l,c),u),u<0)}if(!t.state.doc.resolve(e-(i||0)).parent.inlineContent){if(i==null&&s&&(n<0||s==En(r))){let l=r.childNodes[s-1];if(l.nodeType==1)return qm(l.getBoundingClientRect(),!1)}if(i==null&&s<En(r)){let l=r.childNodes[s];if(l.nodeType==1)return qm(l.getBoundingClientRect(),!0)}return qm(r.getBoundingClientRect(),n>=0)}if(i==null&&s&&(n<0||s==En(r))){let l=r.childNodes[s-1],c=l.nodeType==3?Wr(l,En(l)-(o?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(c)return Sl(bs(c,1),!1)}if(i==null&&s<En(r)){let l=r.childNodes[s];for(;l.pmViewDesc&&l.pmViewDesc.ignoreForCoords;)l=l.nextSibling;let c=l?l.nodeType==3?Wr(l,0,o?0:1):l.nodeType==1?l:null:null;if(c)return Sl(bs(c,-1),!0)}return Sl(bs(r.nodeType==3?Wr(r):r,-n),n>=0)}function Sl(t,e){if(t.width==0)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function qm(t,e){if(t.height==0)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function Mj(t,e,n){let r=t.state,s=t.root.activeElement;r!=e&&t.updateState(e),s!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),s!=t.dom&&s&&s.focus()}}function OV(t,e,n){let r=e.selection,s=n=="up"?r.$from:r.$to;return Mj(t,e,()=>{let{node:i}=t.docView.domFromPos(s.pos,n=="up"?-1:1);for(;;){let a=t.docView.nearestDesc(i,!0);if(!a)break;if(a.node.isBlock){i=a.contentDOM||a.dom;break}i=a.dom.parentNode}let o=Rj(t,s.pos,1);for(let a=i.firstChild;a;a=a.nextSibling){let l;if(a.nodeType==1)l=a.getClientRects();else if(a.nodeType==3)l=Wr(a,0,a.nodeValue.length).getClientRects();else continue;for(let c=0;c<l.length;c++){let u=l[c];if(u.bottom>u.top+1&&(n=="up"?o.top-u.top>(u.bottom-o.top)*2:u.bottom-o.bottom>(o.bottom-u.top)*2))return!1}}return!0})}const RV=/[\u0590-\u08ac]/;function MV(t,e,n){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let s=r.parentOffset,i=!s,o=s==r.parent.content.size,a=t.domSelection();return a?!RV.test(r.parent.textContent)||!a.modify?n=="left"||n=="backward"?i:o:Mj(t,e,()=>{let{focusNode:l,focusOffset:c,anchorNode:u,anchorOffset:h}=t.domSelectionRange(),p=a.caretBidiLevel;a.modify("move",n,"character");let f=r.depth?t.docView.domAfterPos(r.before()):t.dom,{focusNode:g,focusOffset:m}=t.domSelectionRange(),y=g&&!f.contains(g.nodeType==1?g:g.parentNode)||l==g&&c==m;try{a.collapse(u,h),l&&(l!=u||c!=h)&&a.extend&&a.extend(l,c)}catch{}return p!=null&&(a.caretBidiLevel=p),y}):r.pos==r.start()||r.pos==r.end()}let Rk=null,Mk=null,Pk=!1;function PV(t,e,n){return Rk==e&&Mk==n?Pk:(Rk=e,Mk=n,Pk=n=="up"||n=="down"?OV(t,e,n):MV(t,e,n))}const jn=0,Ik=1,Di=2,er=3;class vu{constructor(e,n,r,s){this.parent=e,this.children=n,this.dom=r,this.contentDOM=s,this.dirty=jn,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,n,r){return!1}matchesHack(e){return!1}parseRule(e){return null}stopEvent(e){return!1}get size(){let e=0;for(let n=0;n<this.children.length;n++)e+=this.children[n].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let n=0,r=this.posAtStart;;n++){let s=this.children[n];if(s==e)return r;r+=s.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,n,r){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(r<0){let i,o;if(e==this.contentDOM)i=e.childNodes[n-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.previousSibling}for(;i&&!((o=i.pmViewDesc)&&o.parent==this);)i=i.previousSibling;return i?this.posBeforeChild(o)+o.size:this.posAtStart}else{let i,o;if(e==this.contentDOM)i=e.childNodes[n];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.nextSibling}for(;i&&!((o=i.pmViewDesc)&&o.parent==this);)i=i.nextSibling;return i?this.posBeforeChild(o):this.posAtEnd}let s;if(e==this.dom&&this.contentDOM)s=n>yt(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))s=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let i=e;;i=i.parentNode){if(i==this.dom){s=!1;break}if(i.previousSibling)break}if(s==null&&n==e.childNodes.length)for(let i=e;;i=i.parentNode){if(i==this.dom){s=!0;break}if(i.nextSibling)break}}return s??r>0?this.posAtEnd:this.posAtStart}nearestDesc(e,n=!1){for(let r=!0,s=e;s;s=s.parentNode){let i=this.getDesc(s),o;if(i&&(!n||i.node))if(r&&(o=i.nodeDOM)&&!(o.nodeType==1?o.contains(e.nodeType==1?e:e.parentNode):o==e))r=!1;else return i}}getDesc(e){let n=e.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(e,n,r){for(let s=e;s;s=s.parentNode){let i=this.getDesc(s);if(i)return i.localPosFromDOM(e,n,r)}return-1}descAt(e){for(let n=0,r=0;n<this.children.length;n++){let s=this.children[n],i=r+s.size;if(r==e&&i!=r){for(;!s.border&&s.children.length;)for(let o=0;o<s.children.length;o++){let a=s.children[o];if(a.size){s=a;break}}return s}if(e<i)return s.descAt(e-r-s.border);r=i}}domFromPos(e,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,s=0;for(let i=0;r<this.children.length;r++){let o=this.children[r],a=i+o.size;if(a>e||o instanceof Ij){s=e-i;break}i=a}if(s)return this.children[r].domFromPos(s-this.children[r].border,n);for(let i;r&&!(i=this.children[r-1]).size&&i instanceof Pj&&i.side>=0;r--);if(n<=0){let i,o=!0;for(;i=r?this.children[r-1]:null,!(!i||i.dom.parentNode==this.contentDOM);r--,o=!1);return i&&n&&o&&!i.border&&!i.domAtom?i.domFromPos(i.size,n):{node:this.contentDOM,offset:i?yt(i.dom)+1:0}}else{let i,o=!0;for(;i=r<this.children.length?this.children[r]:null,!(!i||i.dom.parentNode==this.contentDOM);r++,o=!1);return i&&o&&!i.border&&!i.domAtom?i.domFromPos(0,n):{node:this.contentDOM,offset:i?yt(i.dom):this.contentDOM.childNodes.length}}}parseRange(e,n,r=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let s=-1,i=-1;for(let o=r,a=0;;a++){let l=this.children[a],c=o+l.size;if(s==-1&&e<=c){let u=o+l.border;if(e>=u&&n<=c-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(e,n,u);e=o;for(let h=a;h>0;h--){let p=this.children[h-1];if(p.size&&p.dom.parentNode==this.contentDOM&&!p.emptyChildAt(1)){s=yt(p.dom)+1;break}e-=p.size}s==-1&&(s=0)}if(s>-1&&(c>n||a==this.children.length-1)){n=c;for(let u=a+1;u<this.children.length;u++){let h=this.children[u];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(-1)){i=yt(h.dom);break}n+=h.size}i==-1&&(i=this.contentDOM.childNodes.length);break}o=c}return{node:this.contentDOM,from:e,to:n,fromOffset:s,toOffset:i}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[e<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(e)}domAfterPos(e){let{node:n,offset:r}=this.domFromPos(e,0);if(n.nodeType!=1||r==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[r]}setSelection(e,n,r,s=!1){let i=Math.min(e,n),o=Math.max(e,n);for(let f=0,g=0;f<this.children.length;f++){let m=this.children[f],y=g+m.size;if(i>g&&o<y)return m.setSelection(e-g-m.border,n-g-m.border,r,s);g=y}let a=this.domFromPos(e,e?-1:1),l=n==e?a:this.domFromPos(n,n?-1:1),c=r.root.getSelection(),u=r.domSelectionRange(),h=!1;if((_n||Rt)&&e==n){let{node:f,offset:g}=a;if(f.nodeType==3){if(h=!!(g&&f.nodeValue[g-1]==` 500`),h&&g==f.nodeValue.length)for(let m=f,y;m;m=m.parentNode){if(y=m.nextSibling){y.nodeName=="BR"&&(a=l={node:y.parentNode,offset:yt(y)+1});break}let v=m.pmViewDesc;if(v&&v.node&&v.node.isBlock)break}}else{let m=f.childNodes[g-1];h=m&&(m.nodeName=="BR"||m.contentEditable=="false")}}if(_n&&u.focusNode&&u.focusNode!=l.node&&u.focusNode.nodeType==1){let f=u.focusNode.childNodes[u.focusOffset];f&&f.contentEditable=="false"&&(s=!0)}if(!(s||h&&Rt)&&mo(a.node,a.offset,u.anchorNode,u.anchorOffset)&&mo(l.node,l.offset,u.focusNode,u.focusOffset))return;let p=!1;if((c.extend||e==n)&&!(h&&_n)){c.collapse(a.node,a.offset);try{e!=n&&c.extend(l.node,l.offset),p=!0}catch{}}if(!p){if(e>n){let g=a;a=l,l=g}let f=document.createRange();f.setEnd(l.node,l.offset),f.setStart(a.node,a.offset),c.removeAllRanges(),c.addRange(f)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,n){for(let r=0,s=0;s<this.children.length;s++){let i=this.children[s],o=r+i.size;if(r==o?e<=o&&n>=r:e<o&&n>r){let a=r+i.border,l=o-i.border;if(e>=a&&n<=l){this.dirty=e==r||n==o?Di:Ik,e==a&&n==l&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=er:i.markDirty(e-a,n-a);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?Di:er}r=o}this.dirty=Di}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let r=e==1?Di:Ik;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}}class Pj extends vu{constructor(e,n,r,s){let i,o=n.type.toDOM;if(typeof o=="function"&&(o=o(r,()=>{if(!i)return s;if(i.parent)return i.parent.posBeforeChild(i)})),!n.type.spec.raw){if(o.nodeType!=1){let a=document.createElement("span");a.appendChild(o),o=a}o.contentEditable="false",o.classList.add("ProseMirror-widget")}super(e,[],o,null),this.widget=n,this.widget=n,i=this}matchesWidget(e){return this.dirty==jn&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let n=this.widget.spec.stopEvent;return n?n(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}}class IV extends vu{constructor(e,n,r,s){super(e,[],n,null),this.textDOM=r,this.text=s}get size(){return this.text.length}localPosFromDOM(e,n){return e!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class Xs extends vu{constructor(e,n,r,s,i){super(e,[],r,s),this.mark=n,this.spec=i}static create(e,n,r,s){let i=s.nodeViews[n.type.name],o=i&&i(n,s,r);return(!o||!o.dom)&&(o=xo.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new Xs(e,n,o.dom,o.contentDOM||o.dom,o)}parseRule(){return this.dirty&er||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=er&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=jn){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=jn}}slice(e,n,r){let s=Xs.create(this.parent,this.mark,!0,r),i=this.children,o=this.size;n<o&&(i=nv(i,n,o,r)),e>0&&(i=nv(i,0,e,r));for(let a=0;a<i.length;a++)i[a].parent=s;return s.children=i,s}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class Zs extends vu{constructor(e,n,r,s,i,o,a){super(e,[],i,o),this.node=n,this.outerDeco=r,this.innerDeco=s,this.nodeDOM=a}static create(e,n,r,s,i,o){let a=i.nodeViews[n.type.name],l,c=a&&a(n,i,()=>{if(!l)return o;if(l.parent)return l.parent.posBeforeChild(l)},r,s),u=c&&c.dom,h=c&&c.contentDOM;if(n.isText){if(!u)u=document.createTextNode(n.text);else if(u.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else u||({dom:u,contentDOM:h}=xo.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!h&&!n.isText&&u.nodeName!="BR"&&(u.hasAttribute("contenteditable")||(u.contentEditable="false"),n.type.spec.draggable&&(u.draggable=!0));let p=u;return u=$j(u,r,n),c?l=new LV(e,n,r,s,u,h||null,p,c):n.isText?new Ep(e,n,r,s,u,p):new Zs(e,n,r,s,u,h||null,p)}parseRule(e){if(this.node.type.spec.reparseInView)return null;let n={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(n.preserveWhitespace="full"),!this.contentDOM)n.getContent=()=>this.node.content;else if(!this.contentLost)n.contentElement=this.contentDOM;else{for(let r=this.children.length-1;r>=0;r--){let s=this.children[r];if(this.dom.contains(s.dom.parentNode)){n.contentElement=s.dom.parentNode;break}}if(!n.contentElement){let r=e&&e.find(s=>s.nodeType==1&&e.indexOf(s.parentNode)<0&&this.dom.contains(s));r?n.contentElement=r:n.getContent=()=>P.empty}}return n}matchesNode(e,n,r){return this.dirty==jn&&e.eq(this.node)&&Uh(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,n){let r=this.node.inlineContent,s=n,i=e.composing?this.localCompositionInfo(e,n):null,o=i&&i.pos>-1?i:null,a=i&&i.pos<0,l=new $V(this,o&&o.node,e);FV(this.node,this.innerDeco,(c,u,h)=>{c.spec.marks?l.syncToMarks(c.spec.marks,r,e,u):c.type.side>=0&&!h&&l.syncToMarks(u==this.node.childCount?Ce.none:this.node.child(u).marks,r,e,u),l.placeWidget(c,e,s)},(c,u,h,p)=>{l.syncToMarks(c.marks,r,e,p);let f;l.findNodeMatch(c,u,h,p)||a&&e.state.selection.from>s&&e.state.selection.to<s+c.nodeSize&&(f=l.findIndexWithChild(i.node))>-1&&l.updateNodeAt(c,u,h,f,e)||l.updateNextNode(c,u,h,e,p,s)||l.addNode(c,u,h,e,s),s+=c.nodeSize}),l.syncToMarks([],r,e,0),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==Di)&&(o&&this.protectLocalComposition(e,o),Lj(this.contentDOM,this.children,e),Ba&&WV(this.dom))}localCompositionInfo(e,n){let{from:r,to:s}=e.state.selection;if(!(e.state.selection instanceof ee)||r<n||s>n+this.node.content.size)return null;let i=e.input.compositionNode;if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let o=i.nodeValue,a=HV(this.node.content,o,r-n,s-n);return a<0?null:{node:i,pos:a,text:o}}else return{node:i,pos:-1,text:""}}protectLocalComposition(e,{node:n,pos:r,text:s}){if(this.getDesc(n))return;let i=n;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let o=new IV(this,i,n,s);e.input.compositionNodes.push(o),this.children=nv(this.children,r,r+s.length,e,o)}update(e,n,r,s){return this.dirty==er||!e.sameMarkup(this.node)?!1:(this.updateInner(e,n,r,s),!0)}updateInner(e,n,r,s){this.updateOuterDeco(n),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(s,this.posAtStart),this.dirty=jn}updateOuterDeco(e){if(Uh(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=Dj(this.dom,this.nodeDOM,tv(this.outerDeco,this.node,n),tv(e,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function Lk(t,e,n,r,s){$j(r,e,t);let i=new Zs(void 0,t,e,n,r,r,r);return i.contentDOM&&i.updateChildren(s,0),i}class Ep extends Zs{constructor(e,n,r,s,i,o){super(e,n,r,s,i,null,o)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,n,r,s){return this.dirty==er||this.dirty!=jn&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=jn||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,s.trackWrites==this.nodeDOM&&(s.trackWrites=null)),this.node=e,this.dirty=jn,!0)}inParent(){let e=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,n,r){return e==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(e,n,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,n,r){let s=this.node.cut(e,n),i=document.createTextNode(s.text);return new Ep(this.parent,s,this.outerDeco,this.innerDeco,i,i)}markDirty(e,n){super.markDirty(e,n),this.dom!=this.nodeDOM&&(e==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=er)}get domAtom(){return!1}isText(e){return this.node.text==e}}class Ij extends vu{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==jn&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class LV extends Zs{constructor(e,n,r,s,i,o,a,l){super(e,n,r,s,i,o,a),this.spec=l}update(e,n,r,s){if(this.dirty==er)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let i=this.spec.update(e,n,r);return i&&this.updateInner(e,n,r,s),i}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,n,r,s)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,n,r,s){this.spec.setSelection?this.spec.setSelection(e,n,r.root):super.setSelection(e,n,r,s)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function Lj(t,e,n){let r=t.firstChild,s=!1;for(let i=0;i<e.length;i++){let o=e[i],a=o.dom;if(a.parentNode==t){for(;a!=r;)r=Dk(r),s=!0;r=r.nextSibling}else s=!0,t.insertBefore(a,r);if(o instanceof Xs){let l=r?r.previousSibling:t.lastChild;Lj(o.contentDOM,o.children,n),r=l?l.nextSibling:t.firstChild}}for(;r;)r=Dk(r),s=!0;s&&n.trackWrites==t&&(n.trackWrites=null)}const nc=function(t){t&&(this.nodeName=t)};nc.prototype=Object.create(null);const $i=[new nc];function tv(t,e,n){if(t.length==0)return $i;let r=n?$i[0]:new nc,s=[r];for(let i=0;i<t.length;i++){let o=t[i].type.attrs;if(o){o.nodeName&&s.push(r=new nc(o.nodeName));for(let a in o){let l=o[a];l!=null&&(n&&s.length==1&&s.push(r=new nc(e.isInline?"span":"div")),a=="class"?r.class=(r.class?r.class+" ":"")+l:a=="style"?r.style=(r.style?r.style+";":"")+l:a!="nodeName"&&(r[a]=l))}}}return s}function Dj(t,e,n,r){if(n==$i&&r==$i)return e;let s=e;for(let i=0;i<r.length;i++){let o=r[i],a=n[i];if(i){let l;a&&a.nodeName==o.nodeName&&s!=t&&(l=s.parentNode)&&l.nodeName.toLowerCase()==o.nodeName||(l=document.createElement(o.nodeName),l.pmIsDeco=!0,l.appendChild(s),a=$i[0]),s=l}DV(s,a||$i[0],o)}return s}function DV(t,e,n){for(let r in e)r!="class"&&r!="style"&&r!="nodeName"&&!(r in n)&&t.removeAttribute(r);for(let r in n)r!="class"&&r!="style"&&r!="nodeName"&&n[r]!=e[r]&&t.setAttribute(r,n[r]);if(e.class!=n.class){let r=e.class?e.class.split(" ").filter(Boolean):[],s=n.class?n.class.split(" ").filter(Boolean):[];for(let i=0;i<r.length;i++)s.indexOf(r[i])==-1&&t.classList.remove(r[i]);for(let i=0;i<s.length;i++)r.indexOf(s[i])==-1&&t.classList.add(s[i]);t.classList.length==0&&t.removeAttribute("class")}if(e.style!=n.style){if(e.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,s;for(;s=r.exec(e.style);)t.style.removeProperty(s[1])}n.style&&(t.style.cssText+=n.style)}}function $j(t,e,n){return Dj(t,t,$i,tv(e,n,t.nodeType!=1))}function Uh(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].type.eq(e[n].type))return!1;return!0}function Dk(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class $V{constructor(e,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=zV(e.node.content,e)}destroyBetween(e,n){if(e!=n){for(let r=e;r<n;r++)this.top.children[r].destroy();this.top.children.splice(e,n-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,n,r,s){let i=0,o=this.stack.length>>1,a=Math.min(o,e.length);for(;i<a&&(i==o-1?this.top:this.stack[i+1<<1]).matchesMark(e[i])&&e[i].type.spec.spanning!==!1;)i++;for(;i<o;)this.destroyRest(),this.top.dirty=jn,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<e.length;){this.stack.push(this.top,this.index+1);let l=-1,c=this.top.children.length;s<this.preMatch.index&&(c=Math.min(this.index+3,c));for(let u=this.index;u<c;u++){let h=this.top.children[u];if(h.matchesMark(e[o])&&!this.isLocked(h.dom)){l=u;break}}if(l<0&&this.index<this.top.children.length){let u=this.top.children[this.index];u instanceof Xs&&u.dirty!=er&&u.mark.type==e[o].type&&u.spec.update&&!this.isLocked(u.dom)&&u.spec.update(e[o])&&(u.mark=e[o],l=this.index,this.changed=!0)}if(l>-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let u=Xs.create(this.top,e[o],n,r);this.top.children.splice(this.index,0,u),this.top=u,this.changed=!0}this.index=0,o++}}findNodeMatch(e,n,r,s){let i=-1,o;if(s>=this.preMatch.index&&(o=this.preMatch.matches[s-this.preMatch.index]).parent==this.top&&o.matchesNode(e,n,r))i=this.top.children.indexOf(o,this.index);else for(let a=this.index,l=Math.min(this.top.children.length,a+5);a<l;a++){let c=this.top.children[a];if(c.matchesNode(e,n,r)&&!this.preMatch.matched.has(c)){i=a;break}}return i<0?!1:(this.destroyBetween(this.index,i),this.index++,!0)}updateNodeAt(e,n,r,s,i){let o=this.top.children[s];return o.dirty==er&&o.dom==o.contentDOM&&(o.dirty=Di),o.update(e,n,r,i)?(this.destroyBetween(this.index,s),this.index++,!0):!1}findIndexWithChild(e){for(;;){let n=e.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let r=e.pmViewDesc;if(r){for(let s=this.index;s<this.top.children.length;s++)if(this.top.children[s]==r)return s}return-1}e=n}}updateNextNode(e,n,r,s,i,o){for(let a=this.index;a<this.top.children.length;a++){let l=this.top.children[a];if(l instanceof Zs){let c=this.preMatch.matched.get(l);if(c!=null&&c!=i)return!1;let u=l.dom,h,p=this.isLocked(u)&&!(e.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==e.text&&l.dirty!=er&&Uh(n,l.outerDeco));if(!p&&l.update(e,n,r,s))return this.destroyBetween(this.index,a),l.dom!=u&&(this.changed=!0),this.index++,!0;if(!p&&(h=this.recreateWrapper(l,e,n,r,s,o)))return this.destroyBetween(this.index,a),this.top.children[this.index]=h,h.contentDOM&&(h.dirty=Di,h.updateChildren(s,o+1),h.dirty=jn),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,n,r,s,i,o){if(e.dirty||n.isAtom||!e.children.length||!e.node.content.eq(n.content)||!Uh(r,e.outerDeco)||!s.eq(e.innerDeco))return null;let a=Zs.create(this.top,n,r,s,i,o);if(a.contentDOM){a.children=e.children,e.children=[];for(let l of a.children)l.parent=a}return e.destroy(),a}addNode(e,n,r,s,i){let o=Zs.create(this.top,e,n,r,s,i);o.contentDOM&&o.updateChildren(s,i+1),this.top.children.splice(this.index++,0,o),this.changed=!0}placeWidget(e,n,r){let s=this.index<this.top.children.length?this.top.children[this.index]:null;if(s&&s.matchesWidget(e)&&(e==s.widget||!s.widget.type.toDOM.parentNode))this.index++;else{let i=new Pj(this.top,e,n,r);this.top.children.splice(this.index++,0,i),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],n=this.top;for(;e instanceof Xs;)n=e,e=n.children[n.children.length-1];(!e||!(e instanceof Ep)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((Rt||bt)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(e,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(e))this.index++;else{let r=document.createElement(e);e=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),e=="BR"&&(r.className="ProseMirror-trailingBreak");let s=new Ij(this.top,[],r,null);n!=this.top?n.children.push(s):n.children.splice(this.index++,0,s),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function zV(t,e){let n=e,r=n.children.length,s=t.childCount,i=new Map,o=[];e:for(;s>0;){let a;for(;;)if(r){let c=n.children[r-1];if(c instanceof Xs)n=c,r=c.children.length;else{a=c,r--;break}}else{if(n==e)break e;r=n.parent.children.indexOf(n),n=n.parent}let l=a.node;if(l){if(l!=t.child(s-1))break;--s,i.set(a,s),o.push(a)}}return{index:s,matched:i,matches:o.reverse()}}function BV(t,e){return t.type.side-e.type.side}function FV(t,e,n,r){let s=e.locals(t),i=0;if(s.length==0){for(let c=0;c<t.childCount;c++){let u=t.child(c);r(u,s,e.forChild(i,u),c),i+=u.nodeSize}return}let o=0,a=[],l=null;for(let c=0;;){let u,h;for(;o<s.length&&s[o].to==i;){let y=s[o++];y.widget&&(u?(h||(h=[u])).push(y):u=y)}if(u)if(h){h.sort(BV);for(let y=0;y<h.length;y++)n(h[y],c,!!l)}else n(u,c,!!l);let p,f;if(l)f=-1,p=l,l=null;else if(c<t.childCount)f=c,p=t.child(c++);else break;for(let y=0;y<a.length;y++)a[y].to<=i&&a.splice(y--,1);for(;o<s.length&&s[o].from<=i&&s[o].to>i;)a.push(s[o++]);let g=i+p.nodeSize;if(p.isText){let y=g;o<s.length&&s[o].from<y&&(y=s[o].from);for(let v=0;v<a.length;v++)a[v].to<y&&(y=a[v].to);y<g&&(l=p.cut(y-i),p=p.cut(0,y-i),g=y,f=-1)}else for(;o<s.length&&s[o].to<g;)o++;let m=p.isInline&&!p.isLeaf?a.filter(y=>!y.inline):a.slice();r(p,m,e.forChild(i,p),f),i=g}}function WV(t){if(t.nodeName=="UL"||t.nodeName=="OL"){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}function HV(t,e,n,r){for(let s=0,i=0;s<t.childCount&&i<=r;){let o=t.child(s++),a=i;if(i+=o.nodeSize,!o.isText)continue;let l=o.text;for(;s<t.childCount;){let c=t.child(s++);if(i+=c.nodeSize,!c.isText)break;l+=c.text}if(i>=n){if(i>=r&&l.slice(r-e.length-a,r-a)==e)return r-e.length;let c=a<r?l.lastIndexOf(e,r-a-1):-1;if(c>=0&&c+e.length+a>=n)return a+c;if(n==r&&l.length>=r+e.length-a&&l.slice(r-a,r-a+e.length)==e)return r}}return-1}function nv(t,e,n,r,s){let i=[];for(let o=0,a=0;o<t.length;o++){let l=t[o],c=a,u=a+=l.size;c>=n||u<=e?i.push(l):(c<e&&i.push(l.slice(0,e-c,r)),s&&(i.push(s),s=void 0),u>n&&i.push(l.slice(n-c,l.size,r)))}return i}function ab(t,e=null){let n=t.domSelectionRange(),r=t.state.doc;if(!n.focusNode)return null;let s=t.docView.nearestDesc(n.focusNode),i=s&&s.size==0,o=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(o<0)return null;let a=r.resolve(o),l,c;if(Cp(n)){for(l=o;s&&!s.node;)s=s.parent;let h=s.node;if(s&&h.isAtom&&X.isSelectable(h)&&s.parent&&!(h.isInline&&gV(n.focusNode,n.focusOffset,s.dom))){let p=s.posBefore;c=new X(o==p?a:r.resolve(p))}}else{if(n instanceof t.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let h=o,p=o;for(let f=0;f<n.rangeCount;f++){let g=n.getRangeAt(f);h=Math.min(h,t.docView.posFromDOM(g.startContainer,g.startOffset,1)),p=Math.max(p,t.docView.posFromDOM(g.endContainer,g.endOffset,-1))}if(h<0)return null;[l,o]=p==t.state.selection.anchor?[p,h]:[h,p],a=r.resolve(o)}else l=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(l<0)return null}let u=r.resolve(l);if(!c){let h=e=="pointer"||t.state.selection.head<a.pos&&!i?1:-1;c=lb(t,u,a,h)}return c}function zj(t){return t.editable?t.hasFocus():Fj(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function Qr(t,e=!1){let n=t.state.selection;if(Bj(t,n),!zj(t))return;let r=t.input.mouseDown;if(!e&&bt&&r){let s=t.domSelectionRange(),i=t.domObserver.currentSelection;if(s.anchorNode&&i.anchorNode&&mo(s.anchorNode,s.anchorOffset,i.anchorNode,i.anchorOffset)&&r.delaySelUpdate()){t.domObserver.setCurSelection();return}}if(t.domObserver.disconnectSelection(),t.cursorWrapper)VV(t);else{let{anchor:s,head:i}=n,o,a;$k&&!(n instanceof ee)&&(n.$from.parent.inlineContent||(o=zk(t,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(a=zk(t,n.to))),t.docView.setSelection(s,i,t,e),$k&&(o&&Bk(o),a&&Bk(a)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&UV(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}const $k=Rt||bt&&Tj<63;function zk(t,e){let{node:n,offset:r}=t.docView.domFromPos(e,0),s=r<n.childNodes.length?n.childNodes[r]:null,i=r?n.childNodes[r-1]:null;if(Rt&&s&&s.contentEditable=="false")return Gm(s);if((!s||s.contentEditable=="false")&&(!i||i.contentEditable=="false")){if(s)return Gm(s);if(i)return Gm(i)}}function Gm(t){return t.contentEditable="true",Rt&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function Bk(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function UV(t){let e=t.dom.ownerDocument;e.removeEventListener("selectionchange",t.input.hideSelectionGuard);let n=t.domSelectionRange(),r=n.anchorNode,s=n.anchorOffset;e.addEventListener("selectionchange",t.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=s)&&(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{(!zj(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function VV(t){let e=t.domSelection();if(!e)return;let n=t.cursorWrapper.dom,r=n.nodeName=="IMG";r?e.collapse(n.parentNode,yt(n)+1):e.collapse(n,0),!r&&!t.state.selection.visible&&en&&Qs<=11&&(n.disabled=!0,n.disabled=!1)}function Bj(t,e){if(e instanceof X){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(Fk(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else Fk(t)}function Fk(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function lb(t,e,n,r){return t.someProp("createSelectionBetween",s=>s(t,e,n))||ee.between(e,n,r)}function Wk(t){return t.editable&&!t.hasFocus()?!1:Fj(t)}function Fj(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function qV(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return mo(e.node,e.offset,n.anchorNode,n.anchorOffset)}function rv(t,e){let{$anchor:n,$head:r}=t.selection,s=e>0?n.max(r):n.min(r),i=s.parent.inlineContent?s.depth?t.doc.resolve(e>0?s.after():s.before()):null:s;return i&&le.findFrom(i,e)}function ks(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function Hk(t,e,n){let r=t.state.selection;if(r instanceof ee)if(n.indexOf("s")>-1){let{$head:s}=r,i=s.textOffset?null:e<0?s.nodeBefore:s.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let o=t.state.doc.resolve(s.pos+i.nodeSize*(e<0?-1:1));return ks(t,new ee(r.$anchor,o))}
vendor: 4,162 bytes, line 500
500else if(r.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let s=rv(t.state,e);return s&&s instanceof X?ks(t,s):!1}else if(!(kn&&n.indexOf("m")>-1)){let s=r.$head,i=s.textOffset?null:e<0?s.nodeBefore:s.nodeAfter,o;if(!i||i.isText)return!1;let a=e<0?s.pos-i.nodeSize:s.pos;return i.isAtom||(o=t.docView.descAt(a))&&!o.contentDOM?X.isSelectable(i)?ks(t,new X(e<0?t.state.doc.resolve(s.pos-i.nodeSize):s)):yu?ks(t,new ee(t.state.doc.resolve(e<0?a:a+i.nodeSize))):!1:!1}}else return!1;else{if(r instanceof X&&r.node.isInline)return ks(t,new ee(e>0?r.$to:r.$from));{let s=rv(t.state,e);return s?ks(t,s):!1}}}function Vh(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function rc(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function $o(t,e){return e<0?GV(t):KV(t)}function GV(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let s,i,o=!1;for(_n&&n.nodeType==1&&r<Vh(n)&&rc(n.childNodes[r],-1)&&(o=!0);;)if(r>0){if(n.nodeType!=1)break;{let a=n.childNodes[r-1];if(rc(a,-1))s=n,i=--r;else if(a.nodeType==3)n=a,r=n.nodeValue.length;else break}}else{if(Wj(n))break;{let a=n.previousSibling;for(;a&&rc(a,-1);)s=n.parentNode,i=yt(a),a=a.previousSibling;if(a)n=a,r=Vh(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}}o?sv(t,n,r):s&&sv(t,s,i)}function KV(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let s=Vh(n),i,o;for(;;)if(r<s){if(n.nodeType!=1)break;let a=n.childNodes[r];if(rc(a,1))i=n,o=++r;else break}else{if(Wj(n))break;{let a=n.nextSibling;for(;a&&rc(a,1);)i=a.parentNode,o=yt(a)+1,a=a.nextSibling;if(a)n=a,r=0,s=Vh(n);else{if(n=n.parentNode,n==t.dom)break;r=s=0}}}i&&sv(t,i,o)}function Wj(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function YV(t,e){for(;t&&e==t.childNodes.length&&!gu(t);)e=yt(t)+1,t=t.parentNode;for(;t&&e<t.childNodes.length;){let n=t.childNodes[e];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=0}}function JV(t,e){for(;t&&!e&&!gu(t);)e=yt(t),t=t.parentNode;for(;t&&e;){let n=t.childNodes[e-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=t.childNodes.length}}function sv(t,e,n){if(e.nodeType!=3){let i,o;(o=YV(e,n))?(e=o,n=0):(i=JV(e,n))&&(e=i,n=i.nodeValue.length)}let r=t.domSelection();if(!r)return;if(Cp(r)){let i=document.createRange();i.setEnd(e,n),i.setStart(e,n),r.removeAllRanges(),r.addRange(i)}else r.extend&&r.extend(e,n);t.domObserver.setCurSelection();let{state:s}=t;setTimeout(()=>{t.state==s&&Qr(t)},50)}function Uk(t,e){let n=t.state.doc.resolve(e);if(!(bt||Nj)&&n.parent.inlineContent){let s=t.coordsAtPos(e);if(e>n.start()){let i=t.coordsAtPos(e-1),o=(i.top+i.bottom)/2;if(o>s.top&&o<s.bottom&&Math.abs(i.left-s.left)>1)return i.left<s.left?"ltr":"rtl"}if(e<n.end()){let i=t.coordsAtPos(e+1),o=(i.top+i.bottom)/2;if(o>s.top&&o<s.bottom&&Math.abs(i.left-s.left)>1)return i.left>s.left?"ltr":"rtl"}}return getComputedStyle(t.dom).direction=="rtl"?"rtl":"ltr"}function Vk(t,e,n){let r=t.state.selection;if(r instanceof ee&&!r.empty||n.indexOf("s")>-1||kn&&n.indexOf("m")>-1)return!1;let{$from:s,$to:i}=r;if(!s.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let o=rv(t.state,e);if(o&&o instanceof X)return ks(t,o)}if(!s.parent.inlineContent){let o=e<0?s:i,a=r instanceof An?le.near(o,e):le.findFrom(o,e);return a?ks(t,a):!1}return!1}function qk(t,e){if(!(t.state.selection instanceof ee))return!0;let{$head:n,$anchor:r,empty:s}=t.state.selection;if(!n.sameParent(r))return!0;if(!s)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let i=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(i&&!i.isText){let o=t.state.tr;return e<0?o.delete(n.pos-i.nodeSize,n.pos):o.delete(n.pos,n.pos+i.nodeSize),t.dispatch(o),!0}return!1}function Gk(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function QV(t){if(!Rt||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(e&&e.nodeType==1&&n==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let r=e.firstChild;Gk(t,r,"true"),setTimeout(()=>Gk(t,r,"false"),20)}return!1}function XV(t){let e="";
vendor: 23,408 bytes, lines 500-503
500return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function ZV(t,e){let n=e.keyCode,r=XV(e);if(n==8||kn&&n==72&&r=="c")return qk(t,-1)||$o(t,-1);if(n==46&&!e.shiftKey||kn&&n==68&&r=="c")return qk(t,1)||$o(t,1);if(n==13||n==27)return!0;if(n==37||kn&&n==66&&r=="c"){let s=n==37?Uk(t,t.state.selection.from)=="ltr"?-1:1:-1;return Hk(t,s,r)||$o(t,s)}else if(n==39||kn&&n==70&&r=="c"){let s=n==39?Uk(t,t.state.selection.from)=="ltr"?1:-1:1;return Hk(t,s,r)||$o(t,s)}else{if(n==38||kn&&n==80&&r=="c")return Vk(t,-1,r)||$o(t,-1);if(n==40||kn&&n==78&&r=="c")return QV(t)||Vk(t,1,r)||$o(t,1);if(r==(kn?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function cb(t,e){t.someProp("transformCopied",f=>{e=f(e,t)});let n=[],{content:r,openStart:s,openEnd:i}=e;for(;s>1&&i>1&&r.childCount==1&&r.firstChild.childCount==1;){s--,i--;let f=r.firstChild;n.push(f.type.name,f.attrs!=f.type.defaultAttrs?f.attrs:null),r=f.content}let o=t.someProp("clipboardSerializer")||xo.fromSchema(t.state.schema),a=Kj(),l=a.createElement("div");l.appendChild(o.serializeFragment(r,{document:a}));let c=l.firstChild,u,h=0;for(;c&&c.nodeType==1&&(u=Gj[c.nodeName.toLowerCase()]);){for(let f=u.length-1;f>=0;f--){let g=a.createElement(u[f]);for(;l.firstChild;)g.appendChild(l.firstChild);l.appendChild(g),h++}c=l.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${s} ${i}${h?` -${h}`:""} ${JSON.stringify(n)}`);let p=t.someProp("clipboardTextSerializer",f=>f(e,t))||e.content.textBetween(0,e.content.size,` 501 502`);return{dom:l,text:p,slice:e}}function Hj(t,e,n,r,s){let i=s.parent.type.spec.code,o,a;if(!n&&!e)return null;let l=!!e&&(r||i||!n);if(l){if(t.someProp("transformPastedText",p=>{e=p(e,i||r,t)}),i)return a=new W(P.from(t.state.schema.text(e.replace(/\r\n?/g,` 503`))),0,0),t.someProp("transformPasted",p=>{a=p(a,t,!0)}),a;let h=t.someProp("clipboardTextParser",p=>p(e,s,r,t));if(h)a=h;else{let p=s.marks(),{schema:f}=t.state,g=xo.fromSchema(f);o=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(m=>{let y=o.appendChild(document.createElement("p"));m&&y.appendChild(g.serializeNode(f.text(m,p)))})}}else t.someProp("transformPastedHTML",h=>{n=h(n,t)}),o=rq(n),yu&&sq(o);let c=o&&o.querySelector("[data-pm-slice]"),u=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(u&&u[3])for(let h=+u[3];h>0;h--){let p=o.firstChild;for(;p&&p.nodeType!=1;)p=p.nextSibling;if(!p)break;o=p}if(a||(a=(t.someProp("clipboardParser")||t.someProp("domParser")||Js.fromSchema(t.state.schema)).parseSlice(o,{preserveWhitespace:!!(l||u),context:s,ruleFromNode(p){return p.nodeName=="BR"&&!p.nextSibling&&p.parentNode&&!eq.test(p.parentNode.nodeName)?{ignore:!0}:null}})),u)a=iq(Kk(a,+u[1],+u[2]),u[4]);else if(a=W.maxOpen(tq(a.content,s),!0),a.openStart||a.openEnd){let h=0,p=0;for(let f=a.content.firstChild;h<a.openStart&&!f.type.spec.isolating;h++,f=f.firstChild);for(let f=a.content.lastChild;p<a.openEnd&&!f.type.spec.isolating;p++,f=f.lastChild);a=Kk(a,h,p)}return t.someProp("transformPasted",h=>{a=h(a,t,l)}),a}const eq=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function tq(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let s=e.node(n).contentMatchAt(e.index(n)),i,o=[];if(t.forEach(a=>{if(!o)return;let l=s.findWrapping(a.type),c;if(!l)return o=null;if(c=o.length&&i.length&&Vj(l,i,a,o[o.length-1],0))o[o.length-1]=c;else{o.length&&(o[o.length-1]=qj(o[o.length-1],i.length));let u=Uj(a,l);o.push(u),s=s.matchType(u.type),i=l}}),o)return P.from(o)}return t}function Uj(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,P.from(t));return t}function Vj(t,e,n,r,s){if(s<t.length&&s<e.length&&t[s]==e[s]){let i=Vj(t,e,n,r.lastChild,s+1);if(i)return r.copy(r.content.replaceChild(r.childCount-1,i));if(r.contentMatchAt(r.childCount).matchType(s==t.length-1?n.type:t[s+1]))return r.copy(r.content.append(P.from(Uj(n,t,s+1))))}}function qj(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,qj(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(P.empty,!0);return t.copy(n.append(r))}function iv(t,e,n,r,s,i){let o=e<0?t.firstChild:t.lastChild,a=o.content;return t.childCount>1&&(i=0),s<r-1&&(a=iv(a,e,n,r,s+1,i)),s>=n&&(a=e<0?o.contentMatchAt(0).fillBefore(a,i<=s).append(a):a.append(o.contentMatchAt(o.childCount).fillBefore(P.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,o.copy(a))}function Kk(t,e,n){return e<t.openStart&&(t=new W(iv(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new W(iv(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const Gj={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};function Kj(){return document.implementation.createHTMLDocument("title")}let Km=null;function nq(t){let e=window.trustedTypes;return e?(Km||(Km=e.defaultPolicy||e.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),Km.createHTML(t)):t}function rq(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=Kj(),r=n.body,s=/<([a-z][^>\s]+)/i.exec(t),i;if((i=s&&Gj[s[1].toLowerCase()])&&(t=i.map(o=>"<"+o+">").join("")+t+i.map(o=>"</"+o+">").reverse().join("")),r.innerHTML=nq(t),i)for(let o=0;o<i.length;o++)r=r.querySelector(i[o])||r;for(let o=0;o<n.styleSheets.length;o++){let a=n.styleSheets[o];for(let l=0;l<a.rules.length;l++){let c=a.rules[l];if(c instanceof CSSStyleRule){let u=r.querySelectorAll(c.selectorText);for(let h=0;h<u.length;h++)u[h].style.cssText+=c.style.cssText}}}return r}function sq(t){let e=t.querySelectorAll(bt?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<e.length;n++){let r=e[n];r.childNodes.length==1&&r.textContent=="Â "&&r.parentNode&&r.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),r)}}function iq(t,e){if(!t.size)return t;let n=t.content.firstChild.type.schema,r;try{r=JSON.parse(e)}catch{return t}let{content:s,openStart:i,openEnd:o}=t;for(let a=r.length-2;a>=0;a-=2){let l=n.nodes[r[a]];if(!l||l.hasRequiredAttrs())break;s=P.from(l.create(r[a+1],s)),i++,o++}return new W(s,i,o)}const Bt={},Ft={},oq={touchstart:!0,touchmove:!0};class aq{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function lq(t){for(let e in Bt){let n=Bt[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=r=>{uq(t,r)&&!ub(t,r)&&(t.editable||!(r.type in Ft))&&n(t,r)},oq[e]?{passive:!0}:void 0)}Rt&&t.dom.addEventListener("input",()=>null),ov(t)}function Yr(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function cq(t){t.input.mouseDown&&t.input.mouseDown.done(),t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}function ov(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=r=>ub(t,r))})}function ub(t,e){return t.someProp("handleDOMEvents",n=>{let r=n[e.type];return r?r(t,e)||e.defaultPrevented:!1})}function uq(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target;n!=t.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function dq(t,e){!ub(t,e)&&Bt[e.type]&&(t.editable||!(e.type in Ft))&&Bt[e.type](t,e)}Ft.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!Xj(t)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!(Kr&&bt&&n.keyCode==13)))if(n.keyCode!=229&&t.domObserver.forceFlush(),Ba&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();t.input.lastIOSEnter=r,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==r&&(t.someProp("handleKeyDown",s=>s(t,_i(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",r=>r(t,n))||ZV(t,n)?n.preventDefault():Yr(t,"key")};Ft.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)};Ft.keypress=(t,e)=>{let n=e;if(Xj(t)||!n.charCode||n.ctrlKey&&!n.altKey||kn&&n.metaKey)return;if(t.someProp("handleKeyPress",s=>s(t,n))){n.preventDefault();return}let r=t.state.selection;if(!(r instanceof ee)||!r.$from.sameParent(r.$to)){let s=String.fromCharCode(n.charCode),i=()=>t.state.tr.insertText(s).scrollIntoView();!/[\r\n]/.test(s)&&!t.someProp("handleTextInput",o=>o(t,r.$from.pos,r.$to.pos,s,i))&&t.dispatch(i()),n.preventDefault()}};function bu(t){return{left:t.clientX,top:t.clientY}}function hq(t,e){let n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}function db(t,e,n,r,s){if(r==-1)return!1;let i=t.state.doc.resolve(r);for(let o=i.depth+1;o>0;o--)if(t.someProp(e,a=>o>i.depth?a(t,n,i.nodeAfter,i.before(o),s,!0):a(t,n,i.node(o),i.before(o),s,!1)))return!0;return!1}function xu(t,e,n){if(t.focused||t.focus(),t.state.selection.eq(e))return;let r=t.state.tr.setSelection(e);r.setMeta("pointer",!0),t.dispatch(r)}function fq(t,e){if(e==-1)return!1;let n=t.state.doc.resolve(e),r=n.nodeAfter;return r&&r.isAtom&&X.isSelectable(r)?(xu(t,new X(n)),!0):!1}function pq(t,e){if(e==-1)return!1;let n=t.state.selection,r,s;n instanceof X&&(r=n.node);let i=t.state.doc.resolve(e);for(let o=i.depth+1;o>0;o--){let a=o>i.depth?i.nodeAfter:i.node(o);if(X.isSelectable(a)){r&&n.$from.depth>0&&o>=n.$from.depth&&i.before(n.$from.depth+1)==n.$from.pos?s=i.before(n.$from.depth):s=i.before(o);break}}return s!=null?(xu(t,X.create(t.state.doc,s)),!0):!1}function mq(t,e,n,r,s){return db(t,"handleClickOn",e,n,r)||t.someProp("handleClick",i=>i(t,e,r))||(s?pq(t,n):fq(t,n))}function gq(t,e,n,r){return db(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",s=>s(t,e,r))}function yq(t,e,n,r){return db(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",s=>s(t,e,r))||vq(t,n,r)}function vq(t,e,n){if(n.button!=0)return!1;let r=Yj(t,e,!0),s=t.state.doc;return r?(xu(t,r),r instanceof ee&&s.eq(t.state.doc)&&(t.input.mouseDown=new xq(t,r)),!0):!1}function Yj(t,e,n){let r=t.state.doc;if(e==-1)return r.inlineContent?ee.create(r,0,r.content.size):null;let s=r.resolve(e);for(let i=s.depth+1;i>0;i--){let o=i>s.depth?s.nodeAfter:s.node(i),a=s.before(i);if(o.inlineContent)return ee.create(r,a+1,a+1+o.content.size);if(n&&X.isSelectable(o))return X.create(r,a)}return null}function hb(t){return qh(t)}const Jj=kn?"metaKey":"ctrlKey";Bt.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=hb(t),s=Date.now(),i="singleClick";s-t.input.lastClick.time<500&&hq(n,t.input.lastClick)&&!n[Jj]&&t.input.lastClick.button==n.button&&(t.input.lastClick.type=="singleClick"?i="doubleClick":t.input.lastClick.type=="doubleClick"&&(i="tripleClick")),t.input.lastClick={time:s,x:n.clientX,y:n.clientY,type:i,button:n.button},t.input.mouseDown&&t.input.mouseDown.done();let o=t.posAtCoords(bu(n));o&&(i=="singleClick"?t.input.mouseDown=new bq(t,o,n,!!r):(i=="doubleClick"?gq:yq)(t,o.pos,o.inside,n)?n.preventDefault():Yr(t,"pointer"))};class Qj{constructor(e){this.view=e,this.mightDrag=null,e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this))}up(e){this.done()}move(e){e.buttons==0&&this.done()}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.view.input.mouseDown==this&&(this.view.input.mouseDown=null)}delaySelUpdate(){return!1}}class bq extends Qj{constructor(e,n,r,s){super(e),this.pos=n,this.event=r,this.flushed=s,this.delayedSelectionSync=!1,this.startDoc=e.state.doc,this.selectNode=!!r[Jj],this.allowDefault=r.shiftKey;let i,o;if(n.inside>-1)i=e.state.doc.nodeAt(n.inside),o=n.inside;else{let u=e.state.doc.resolve(n.pos);i=u.parent,o=u.depth?u.before():0}const a=s?null:r.target,l=a?e.docView.nearestDesc(a,!0):null;this.target=l&&l.nodeDOM.nodeType==1?l.nodeDOM:null;let{selection:c}=e.state;r.button==0&&(i.type.spec.draggable&&i.type.spec.selectable!==!1||c instanceof X&&c.from<=o&&c.to>o)&&(this.mightDrag={node:i,pos:o,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&_n&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),Yr(e,"pointer")}done(){super.done(),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>{this.view.isDestroyed||Qr(this.view)})}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(bu(e))),this.updateAllowDefault(e),this.allowDefault||!n?Yr(this.view,"pointer"):mq(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||Rt&&this.mightDrag&&!this.mightDrag.node.isAtom||bt&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(xu(this.view,le.near(this.view.state.doc.resolve(n.pos))),e.preventDefault()):Yr(this.view,"pointer")}move(e){this.updateAllowDefault(e),Yr(this.view,"pointer"),super.move(e)}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}delaySelUpdate(){return this.allowDefault?(this.delayedSelectionSync=!0,!0):!1}}class xq extends Qj{constructor(e,n){super(e),this.startSelection=n,this.startDoc=e.state.doc}move(e){if(e.buttons==0||this.view.isDestroyed||!this.view.state.doc.eq(this.startDoc)){this.done();return}e.preventDefault(),Yr(this.view,"pointer");let n=this.view.posAtCoords(bu(e)),r=n&&Yj(this.view,n.inside,!1);if(!r)return;let{doc:s}=this.view.state,i=this.startSelection,[o,a]=r.from<i.from?[i.to,r.from]:[i.from,r.to];xu(this.view,ee.create(s,o,a))}}Bt.touchstart=t=>{t.input.lastTouch=Date.now(),hb(t),Yr(t,"pointer")};Bt.touchmove=t=>{t.input.lastTouch=Date.now(),Yr(t,"pointer")};Bt.contextmenu=t=>hb(t);function Xj(t,e){return t.composing?!0:Rt&&Math.abs(Date.now()-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const wq=Kr?5e3:-1;Ft.compositionstart=Ft.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof ee&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)||bt&&Nj&&kq(t)))t.markCursor=t.state.storedMarks||n.marks(),qh(t,!0),t.markCursor=null;else if(qh(t,!e.selection.empty),_n&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=t.domSelectionRange();for(let s=r.focusNode,i=r.focusOffset;s&&s.nodeType==1&&i!=0;){let o=i<0?s.lastChild:s.childNodes[i-1];if(!o)break;if(o.nodeType==3){let a=t.domSelection();a&&a.collapse(o,o.nodeValue.length);break}else s=o,i=-1}}t.input.composing=!0}Zj(t,wq)};function kq(t){let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(!e||e.nodeType!=1||n>=e.childNodes.length)return!1;let r=e.childNodes[n];return r.nodeType==1&&r.contentEditable=="false"}Ft.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=Date.now(),t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionNode=null,t.input.badSafariComposition?t.domObserver.forceFlush():t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,Zj(t,20))};function Zj(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>qh(t),e))}function eO(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=Date.now());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function Sq(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=pV(e.focusNode,e.focusOffset),r=mV(e.focusNode,e.focusOffset);if(n&&r&&n!=r){let s=r.pmViewDesc,i=t.domObserver.lastChangedTextNode;if(n==i||r==i)return i;if(!s||!s.isText(r.nodeValue))return r;if(t.input.compositionNode==r){let o=n.pmViewDesc;if(!(!o||!o.isText(n.nodeValue)))return r}}return n||r}function qh(t,e=!1){if(!(Kr&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),eO(t),e||t.docView&&t.docView.dirty){let n=ab(t),r=t.state.selection;return n&&!n.eq(r)?t.dispatch(t.state.tr.setSelection(n)):(t.markCursor||e)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?t.dispatch(t.state.tr.deleteSelection()):t.updateState(t.state),!0}return!1}}function Cq(t,e){if(!t.dom.parentNode)return;let n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),s=document.createRange();s.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(s),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()},50)}const Xc=en&&Qs<15||Ba&&bV<604;Bt.copy=Ft.cut=(t,e)=>{let n=e,r=t.state.selection,s=n.type=="cut";if(r.empty)return;let i=Xc?null:n.clipboardData,o=r.content(),{dom:a,text:l}=cb(t,o);i?(n.preventDefault(),i.clearData(),i.setData("text/html",a.innerHTML),i.setData("text/plain",l)):Cq(t,a),s&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function Eq(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function Tq(t,e){if(!t.dom.parentNode)return;let n=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,r=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let s=t.input.shiftKey&&t.input.lastKeyCode!=45;setTimeout(()=>{t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Zc(t,r.value,null,s,e):Zc(t,r.textContent,r.innerHTML,s,e)},50)}function Zc(t,e,n,r,s){let i=Hj(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",l=>l(t,s,i||W.empty)))return!0;if(!i)return!1;let o=Eq(i),a=o?t.state.tr.replaceSelectionWith(o,r):t.state.tr.replaceSelection(i);return t.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function tO(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;let n=t.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}Ft.paste=(t,e)=>{let n=e;if(t.composing&&!Kr)return;let r=Xc?null:n.clipboardData,s=t.input.shiftKey&&t.input.lastKeyCode!=45;r&&Zc(t,tO(r),r.getData("text/html"),s,n)?n.preventDefault():Tq(t,n)};class nO{constructor(e,n,r){this.slice=e,this.move=n,this.node=r}}const Nq=kn?"altKey":"ctrlKey";function rO(t,e){let n;return t.someProp("dragCopies",r=>{n=n||r(e)}),n!=null?!n:!e[Nq]}Bt.dragstart=(t,e)=>{let n=e,r=t.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let s=t.state.selection,i=s.empty?null:t.posAtCoords(bu(n)),o;if(!(i&&i.pos>=s.from&&i.pos<=(s instanceof X?s.to-1:s.to))){if(r&&r.mightDrag)o=X.create(t.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let h=t.docView.nearestDesc(n.target,!0);h&&h.node.type.spec.draggable&&h!=t.docView&&(o=X.create(t.state.doc,h.posBefore))}}let a=(o||t.state.selection).content(),{dom:l,text:c,slice:u}=cb(t,a);(!n.dataTransfer.files.length||!bt||Tj>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(Xc?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",Xc||n.dataTransfer.setData("text/plain",c),t.dragging=new nO(u,rO(t,n),o)};Bt.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)};Ft.dragover=Ft.dragenter=(t,e)=>e.preventDefault();Ft.drop=(t,e)=>{try{Aq(t,e,t.dragging)}finally{t.dragging=null}};function Aq(t,e,n){if(!e.dataTransfer)return;let r=t.posAtCoords(bu(e));if(!r)return;let s=t.state.doc.resolve(r.pos),i=n&&n.slice;i?t.someProp("transformPasted",f=>{i=f(i,t,!1)}):i=Hj(t,tO(e.dataTransfer),Xc?null:e.dataTransfer.getData("text/html"),!1,s);let o=!!(n&&rO(t,e));if(t.someProp("handleDrop",f=>f(t,e,i||W.empty,o))){e.preventDefault();return}if(!i)return;e.preventDefault();let a=i?dj(t.state.doc,s.pos,i):s.pos;a==null&&(a=s.pos);let l=t.state.tr;if(o){let{node:f}=n;f?f.replace(l):l.deleteSelection()}let c=l.mapping.map(a),u=i.openStart==0&&i.openEnd==0&&i.content.childCount==1,h=l.doc;if(u?l.replaceRangeWith(c,c,i.content.firstChild):l.replaceRange(c,c,i),l.doc.eq(h))return;let p=l.doc.resolve(c);if(u&&X.isSelectable(i.content.firstChild)&&p.nodeAfter&&p.nodeAfter.sameMarkup(i.content.firstChild))l.setSelection(new X(p));else{let f=l.mapping.map(a);l.mapping.maps[l.mapping.maps.length-1].forEach((g,m,y,v)=>f=v),l.setSelection(lb(t,p,l.doc.resolve(f)))}t.focus(),t.dispatch(l.setMeta("uiEvent","drop"))}Bt.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout(()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&Qr(t)},20))};Bt.blur=(t,e)=>{let n=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),n.relatedTarget&&t.dom.contains(n.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)};Bt.beforeinput=(t,e)=>{if(Kr&&e.inputType=="deleteContentBackward"){t.domObserver.flushSoon();let{domChangeCount:r}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=r||(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",i=>i(t,_i(8,"Backspace")))))return;let{$cursor:s}=t.state.selection;s&&s.pos>0&&t.dispatch(t.state.tr.delete(s.pos-1,s.pos).scrollIntoView())},50)}};for(let t in Ft)Bt[t]=Ft[t];function eu(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}class Gh{constructor(e,n){this.toDOM=e,this.spec=n||Zi,this.side=this.spec.side||0}map(e,n,r,s){let{pos:i,deleted:o}=e.mapResult(n.from+s,this.side<0?-1:1);return o?null:new $t(i-r,i-r,this)}valid(){return!0}eq(e){return this==e||e instanceof Gh&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&eu(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class ei{constructor(e,n){this.attrs=e,this.spec=n||Zi}map(e,n,r,s){let i=e.map(n.from+s,this.spec.inclusiveStart?-1:1)-r,o=e.map(n.to+s,this.spec.inclusiveEnd?1:-1)-r;return i>=o?null:new $t(i,o,this)}valid(e,n){return n.from<n.to}eq(e){return this==e||e instanceof ei&&eu(this.attrs,e.attrs)&&eu(this.spec,e.spec)}static is(e){return e.type instanceof ei}destroy(){}}class fb{constructor(e,n){this.attrs=e,this.spec=n||Zi}
vendor: 4,943 bytes, line 503
503map(e,n,r,s){let i=e.mapResult(n.from+s,1);if(i.deleted)return null;let o=e.mapResult(n.to+s,-1);return o.deleted||o.pos<=i.pos?null:new $t(i.pos-r,o.pos-r,this)}valid(e,n){let{index:r,offset:s}=e.content.findIndex(n.from),i;return s==n.from&&!(i=e.child(r)).isText&&s+i.nodeSize==n.to}eq(e){return this==e||e instanceof fb&&eu(this.attrs,e.attrs)&&eu(this.spec,e.spec)}destroy(){}}class $t{constructor(e,n,r){this.from=e,this.to=n,this.type=r}copy(e,n){return new $t(e,n,this.type)}eq(e,n=0){return this.type.eq(e.type)&&this.from+n==e.from&&this.to+n==e.to}map(e,n,r){return this.type.map(e,this,n,r)}static widget(e,n,r){return new $t(e,e,new Gh(n,r))}static inline(e,n,r,s){return new $t(e,n,new ei(r,s))}static node(e,n,r,s){return new $t(e,n,new fb(r,s))}get spec(){return this.type.spec}get inline(){return this.type instanceof ei}get widget(){return this.type instanceof Gh}}const Wo=[],Zi={};class Ne{constructor(e,n){this.local=e.length?e:Wo,this.children=n.length?n:Wo}static create(e,n){return n.length?Kh(n,e,0,Zi):_t}find(e,n,r){let s=[];return this.findInner(e??0,n??1e9,s,0,r),s}findInner(e,n,r,s,i){for(let o=0;o<this.local.length;o++){let a=this.local[o];a.from<=n&&a.to>=e&&(!i||i(a.spec))&&r.push(a.copy(a.from+s,a.to+s))}for(let o=0;o<this.children.length;o+=3)if(this.children[o]<n&&this.children[o+1]>e){let a=this.children[o]+1;this.children[o+2].findInner(e-a,n-a,r,s+a,i)}}map(e,n,r){return this==_t||e.maps.length==0?this:this.mapInner(e,n,0,0,r||Zi)}mapInner(e,n,r,s,i){let o;for(let a=0;a<this.local.length;a++){let l=this.local[a].map(e,r,s);l&&l.type.valid(n,l)?(o||(o=[])).push(l):i.onRemove&&i.onRemove(this.local[a].spec)}return this.children.length?_q(this.children,o||[],e,n,r,s,i):o?new Ne(o.sort(eo),Wo):_t}add(e,n){return n.length?this==_t?Ne.create(e,n):this.addInner(e,n,0):this}addInner(e,n,r){let s,i=0;e.forEach((a,l)=>{let c=l+r,u;if(u=iO(n,a,c)){for(s||(s=this.children.slice());i<s.length&&s[i]<l;)i+=3;s[i]==l?s[i+2]=s[i+2].addInner(a,u,c+1):s.splice(i,0,l,l+a.nodeSize,Kh(u,a,c+1,Zi)),i+=3}});let o=sO(i?oO(n):n,-r);for(let a=0;a<o.length;a++)o[a].type.valid(e,o[a])||o.splice(a--,1);return new Ne(o.length?this.local.concat(o).sort(eo):this.local,s||this.children)}remove(e){return e.length==0||this==_t?this:this.removeInner(e,0)}removeInner(e,n){let r=this.children,s=this.local;for(let i=0;i<r.length;i+=3){let o,a=r[i]+n,l=r[i+1]+n;for(let u=0,h;u<e.length;u++)(h=e[u])&&h.from>a&&h.to<l&&(e[u]=null,(o||(o=[])).push(h));if(!o)continue;r==this.children&&(r=this.children.slice());let c=r[i+2].removeInner(o,a+1);c!=_t?r[i+2]=c:(r.splice(i,3),i-=3)}if(s.length){for(let i=0,o;i<e.length;i++)if(o=e[i])for(let a=0;a<s.length;a++)s[a].eq(o,n)&&(s==this.local&&(s=this.local.slice()),s.splice(a--,1))}return r==this.children&&s==this.local?this:s.length||r.length?new Ne(s,r):_t}forChild(e,n){if(this==_t)return this;if(n.isLeaf)return Ne.empty;let r,s;for(let a=0;a<this.children.length;a+=3)if(this.children[a]>=e){this.children[a]==e&&(r=this.children[a+2]);break}let i=e+1,o=i+n.content.size;for(let a=0;a<this.local.length;a++){let l=this.local[a];if(l.from<o&&l.to>i&&l.type instanceof ei){let c=Math.max(i,l.from)-i,u=Math.min(o,l.to)-i;c<u&&(s||(s=[])).push(l.copy(c,u))}}if(s){let a=new Ne(s.sort(eo),Wo);return r?new _s([a,r]):a}return r||_t}eq(e){if(this==e)return!0;if(!(e instanceof Ne)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(e.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=e.children[n]||this.children[n+1]!=e.children[n+1]||!this.children[n+2].eq(e.children[n+2]))return!1;return!0}locals(e){return pb(this.localsInner(e))}localsInner(e){if(this==_t)return Wo;if(e.inlineContent||!this.local.some(ei.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof ei||n.push(this.local[r]);return n}forEachSet(e){e(this)}}Ne.empty=new Ne([],[]);Ne.removeOverlap=pb;const _t=Ne.empty;class _s{constructor(e){this.members=e}map(e,n){const r=this.members.map(s=>s.map(e,n,Zi));return _s.from(r)}forChild(e,n){if(n.isLeaf)return Ne.empty;let r=[];for(let s=0;s<this.members.length;s++){let i=this.members[s].forChild(e,n);i!=_t&&(i instanceof _s?r=r.concat(i.members):r.push(i))}return _s.from(r)}eq(e){if(!(e instanceof _s)||e.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(e.members[n]))return!1;return!0}locals(e){let n,r=!0;for(let s=0;s<this.members.length;s++){let i=this.members[s].localsInner(e);if(i.length)if(!n)n=i;else{r&&(n=n.slice(),r=!1);for(let o=0;o<i.length;o++)n.push(i[o])}}return n?pb(r?n:n.sort(eo)):Wo}static from(e){switch(e.length){case 0:return _t;case 1:return e[0];default:return new _s(e.every(n=>n instanceof Ne)?e:e.reduce((n,r)=>n.concat(r instanceof Ne?r:r.members),[]))}}forEachSet(e){for(let n=0;n<this.members.length;
vendor: 23,766 bytes, line 503
503n++)this.members[n].forEachSet(e)}}function _q(t,e,n,r,s,i,o){let a=t.slice();for(let c=0,u=i;c<n.maps.length;c++){let h=0;n.maps[c].forEach((p,f,g,m)=>{let y=m-g-(f-p);for(let v=0;v<a.length;v+=3){let b=a[v+1];if(b<0||p>b+u-h)continue;let x=a[v]+u-h;f>=x?a[v+1]=p<=x?-2:-1:p>=u&&y&&(a[v]+=y,a[v+1]+=y)}h+=y}),u=n.maps[c].map(u,-1)}let l=!1;for(let c=0;c<a.length;c+=3)if(a[c+1]<0){if(a[c+1]==-2){l=!0,a[c+1]=-1;continue}let u=n.map(t[c]+i),h=u-s;if(h<0||h>=r.content.size){l=!0;continue}let p=n.map(t[c+1]+i,-1),f=p-s,{index:g,offset:m}=r.content.findIndex(h),y=r.maybeChild(g);if(y&&m==h&&m+y.nodeSize==f){let v=a[c+2].mapInner(n,y,u+1,t[c]+i+1,o);v!=_t?(a[c]=h,a[c+1]=f,a[c+2]=v):(a[c+1]=-2,l=!0)}else l=!0}if(l){let c=jq(a,t,e,n,s,i,o),u=Kh(c,r,0,o);e=u.local;for(let h=0;h<a.length;h+=3)a[h+1]<0&&(a.splice(h,3),h-=3);for(let h=0,p=0;h<u.children.length;h+=3){let f=u.children[h];for(;p<a.length&&a[p]<f;)p+=3;a.splice(p,0,u.children[h],u.children[h+1],u.children[h+2])}}return new Ne(e.sort(eo),a)}function sO(t,e){if(!e||!t.length)return t;let n=[];for(let r=0;r<t.length;r++){let s=t[r];n.push(new $t(s.from+e,s.to+e,s.type))}return n}function jq(t,e,n,r,s,i,o){function a(l,c){for(let u=0;u<l.local.length;u++){let h=l.local[u].map(r,s,c);h?n.push(h):o.onRemove&&o.onRemove(l.local[u].spec)}for(let u=0;u<l.children.length;u+=3)a(l.children[u+2],l.children[u]+c+1)}for(let l=0;l<t.length;l+=3)t[l+1]==-1&&a(t[l+2],e[l]+i+1);return n}function iO(t,e,n){if(e.isLeaf)return null;let r=n+e.nodeSize,s=null;for(let i=0,o;i<t.length;i++)(o=t[i])&&o.from>n&&o.to<r&&((s||(s=[])).push(o),t[i]=null);return s}function oO(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function Kh(t,e,n,r){let s=[],i=!1;e.forEach((a,l)=>{let c=iO(t,a,l+n);if(c){i=!0;let u=Kh(c,a,n+l+1,r);u!=_t&&s.push(l,l+a.nodeSize,u)}});let o=sO(i?oO(t):t,-n).sort(eo);for(let a=0;a<o.length;a++)o[a].type.valid(e,o[a])||(r.onRemove&&r.onRemove(o[a].spec),o.splice(a--,1));return o.length||s.length?new Ne(o,s):_t}function eo(t,e){return t.from-e.from||t.to-e.to}function pb(t){let e=t;for(let n=0;n<e.length-1;n++){let r=e[n];if(r.from!=r.to)for(let s=n+1;s<e.length;s++){let i=e[s];if(i.from==r.from){i.to!=r.to&&(e==t&&(e=t.slice()),e[s]=i.copy(i.from,r.to),Yk(e,s+1,i.copy(r.to,i.to)));continue}else{i.from<r.to&&(e==t&&(e=t.slice()),e[n]=r.copy(r.from,i.from),Yk(e,s,r.copy(i.from,r.to)));break}}}return e}function Yk(t,e,n){for(;e<t.length&&eo(n,t[e])>0;)e++;t.splice(e,0,n)}function Ym(t){let e=[];return t.someProp("decorations",n=>{let r=n(t.state);r&&r!=_t&&e.push(r)}),t.cursorWrapper&&e.push(Ne.create(t.state.doc,[t.cursorWrapper.deco])),_s.from(e)}const Oq={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Rq=en&&Qs<=11;class Mq{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class Pq{constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Mq,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let s=0;s<r.length;s++)this.queue.push(r[s]);en&&Qs<=11&&r.some(s=>s.type=="childList"&&s.removedNodes.length||s.type=="characterData"&&s.oldValue.length>s.target.nodeValue.length)?this.flushSoon():Rt&&e.composing&&r.some(s=>s.type=="childList"&&s.target.nodeName=="TR")?(e.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),Rq&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,Oq)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let n=0;n<e.length;n++)this.queue.push(e[n]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(Wk(this.view)){if(this.suppressingSelectionUpdates)return Qr(this.view);if(en&&Qs<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&mo(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let n=new Set,r;for(let i=e.focusNode;i;i=za(i))n.add(i);for(let i=e.anchorNode;i;i=za(i))if(n.has(i)){r=i;break}let s=r&&this.view.docView.nearestDesc(r);if(s&&s.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=e.domSelectionRange(),s=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&Wk(e)&&!this.ignoreSelectionChange(r),i=-1,o=-1,a=!1,l=[];if(e.editable)for(let u=0;u<n.length;u++){let h=this.registerMutation(n[u],l);h&&(i=i<0?h.from:Math.min(h.from,i),o=o<0?h.to:Math.max(h.to,o),h.typeOver&&(a=!0))}if(l.some(u=>u.nodeName=="BR")&&(e.input.lastKeyCode==8||e.input.lastKeyCode==46||bt&&(e.composing||e.input.compositionEndedAt>Date.now()-50)&&n.some(u=>u.type=="childList"&&u.removedNodes.length))){for(let u of l)if(u.nodeName=="BR"&&u.parentNode){let h=u.nextSibling;for(;h&&h.nodeType==1;){if(h.contentEditable=="false"){u.parentNode.removeChild(u);break}h=h.firstChild}}}else if(_n&&l.length){let u=l.filter(h=>h.nodeName=="BR");if(u.length==2){let[h,p]=u;h.parentNode&&h.parentNode.parentNode==p.parentNode?p.remove():h.remove()}else{let{focusNode:h}=this.currentSelection;for(let p of u){let f=p.parentNode;f&&f.nodeName=="LI"&&(!h||Dq(e,h)!=f)&&p.remove()}}}let c=null;i<0&&s&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&Cp(r)&&(c=ab(e))&&c.eq(le.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,Qr(e),this.currentSelection.set(r),e.scrollToSelection()):(i>-1||s)&&(i>-1&&(e.docView.markDirty(i,o),Iq(e)),e.input.badSafariComposition&&(e.input.badSafariComposition=!1,$q(e,l)),this.handleDOMChange(i,o,a,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||Qr(e),this.currentSelection.set(r))}registerMutation(e,n){if(n.indexOf(e.target)>-1)return null;let r=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(r==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if(e.type=="childList"){for(let u=0;u<e.addedNodes.length;u++){let h=e.addedNodes[u];n.push(h),h.nodeType==3&&(this.lastChangedTextNode=h)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(e.target))return{from:r.posBefore,to:r.posAfter};let s=e.previousSibling,i=e.nextSibling;if(en&&Qs<=11&&e.addedNodes.length)for(let u=0;u<e.addedNodes.length;u++){let{previousSibling:h,nextSibling:p}=e.addedNodes[u];(!h||Array.prototype.indexOf.call(e.addedNodes,h)<0)&&(s=h),(!p||Array.prototype.indexOf.call(e.addedNodes,p)<0)&&(i=p)}let o=s&&s.parentNode==e.target?yt(s)+1:0,a=r.localPosFromDOM(e.target,o,-1),l=i&&i.parentNode==e.target?yt(i):e.target.childNodes.length,c=r.localPosFromDOM(e.target,l,1);return{from:a,to:c}}else return e.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:(this.lastChangedTextNode=e.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let Jk=new WeakMap,Qk=!1;function Iq(t){if(!Jk.has(t)&&(Jk.set(t,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)!==-1)){if(t.requiresGeckoHackNode=_n,Qk)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),Qk=!0}}function Xk(t,e){let n=e.startContainer,r=e.startOffset,s=e.endContainer,i=e.endOffset,o=t.domAtPos(t.state.selection.anchor);return mo(o.node,o.offset,s,i)&&([n,r,s,i]=[s,i,n,r]),{anchorNode:n,anchorOffset:r,focusNode:s,focusOffset:i}}function Lq(t,e){if(e.getComposedRanges){let s=e.getComposedRanges(t.root)[0];if(s)return Xk(t,s)}let n;function r(s){s.preventDefault(),s.stopImmediatePropagation(),n=s.getTargetRanges()[0]}return t.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),t.dom.removeEventListener("beforeinput",r,!0),n?Xk(t,n):null}function Dq(t,e){for(let n=e.parentNode;n&&n!=t.dom;n=n.parentNode){let r=t.docView.nearestDesc(n,!0);if(r&&r.node.isBlock)return n}return null}function $q(t,e){var n;let{focusNode:r,focusOffset:s}=t.domSelectionRange();for(let i of e)if(((n=i.parentNode)===null||n===void 0?void 0:n.nodeName)=="TR"){let o=i.nextSibling;for(;o&&o.nodeName!="TD"&&o.nodeName!="TH";)o=o.nextSibling;if(o){let a=o;for(;;){let l=a.firstChild;if(!l||l.nodeType!=1||l.contentEditable=="false"||/^(BR|IMG)$/.test(l.nodeName))break;a=l}a.insertBefore(i,a.firstChild),r==i&&t.domSelection().collapse(i,s)}else i.parentNode.removeChild(i)}}function zq(t,e,n,r){let{node:s,fromOffset:i,toOffset:o,from:a,to:l}=t.docView.parseRange(e,n),c=t.domSelectionRange(),u,h=c.anchorNode;if(h&&t.dom.contains(h.nodeType==1?h:h.parentNode)&&(u=[{node:h,offset:c.anchorOffset}],Cp(c)||u.push({node:c.focusNode,offset:c.focusOffset})),bt&&t.input.lastKeyCode===8)for(let v=o;v>i;v--){let b=s.childNodes[v-1],x=b.pmViewDesc;if(b.nodeName=="BR"&&!x){o=v;break}if(!x||x.size)break}let p=t.state.doc,f=t.someProp("domParser")||Js.fromSchema(t.state.schema),g=p.resolve(a),m=null,y=f.parse(s,{topNode:g.parent,topMatch:g.parent.contentMatchAt(g.index()),topOpen:!0,from:i,to:o,preserveWhitespace:g.parent.type.whitespace=="pre"?"full":!0,findPositions:u,ruleFromNode:Bq(r),context:g});if(u&&u[0].pos!=null){let v=u[0].pos,b=u[1]&&u[1].pos;b==null&&(b=v),m={anchor:v+a,head:b+a}}return{doc:y,sel:m,from:a,to:l}}const Bq=t=>e=>{let n=e.pmViewDesc;if(n)return n.parseRule(t);if(e.nodeName=="BR"&&e.parentNode){if(Rt&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let r=document.createElement("div");return r.appendChild(document.createElement("li")),{skip:r}}else if(e.parentNode.lastChild==e||Rt&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName=="IMG"&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null},Fq=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function Wq(t,e,n,r,s){let i=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let E=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,T=ab(t,E);if(T&&!t.state.selection.eq(T)){if(bt&&Kr&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",_=>_(t,_i(13,"Enter"))))return;let N=t.state.tr.setSelection(T);E=="pointer"?N.setMeta("pointer",!0):E=="key"&&N.scrollIntoView(),i&&N.setMeta("composition",i),t.dispatch(N)}return}let o=t.state.doc.resolve(e),a=o.sharedDepth(n);e=o.before(a+1),n=t.state.doc.resolve(n).after(a+1);let l=t.state.selection,c=zq(t,e,n,s),u=t.state.doc,h=u.slice(c.from,c.to),p,f;t.input.lastKeyCode===8&&Date.now()-100<t.input.lastKeyCodeTime?(p=t.state.selection.to,f="end"):(p=t.state.selection.from,f="start"),t.input.lastKeyCode=null;let g=Vq(h.content,c.doc.content,c.from,p,f);if(g&&t.input.domChangeCount++,(Ba&&t.input.lastIOSEnter>Date.now()-225||Kr)&&s.some(E=>E.nodeType==1&&!Fq.test(E.nodeName))&&(!g||g.endA>=g.endB)&&t.someProp("handleKeyDown",E=>E(t,_i(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!g)if(r&&l instanceof ee&&!l.empty&&l.$head.sameParent(l.$anchor)&&!t.composing&&!(c.sel&&c.sel.anchor!=c.sel.head))g={start:l.from,endA:l.to,endB:l.to};else{if(c.sel){let E=Zk(t,t.state.doc,c.sel);if(E&&!E.eq(t.state.selection)){let T=t.state.tr.setSelection(E);i&&T.setMeta("composition",i),t.dispatch(T)}}return}t.state.selection.from<t.state.selection.to&&g.start==g.endB&&t.state.selection instanceof ee&&(g.start>t.state.selection.from&&g.start<=t.state.selection.from+2&&t.state.selection.from>=c.from?g.start=t.state.selection.from:g.endA<t.state.selection.to&&g.endA>=t.state.selection.to-2&&t.state.selection.to<=c.to&&(g.endB+=t.state.selection.to-g.endA,g.endA=t.state.selection.to)),en&&Qs<=11&&g.endB==g.start+1&&g.endA==g.start&&g.start>c.from&&c.doc.textBetween(g.start-c.from-1,g.start-c.from+1)==" Â "&&(g.start--,g.endA--,g.endB--);let m=c.doc.resolveNoCache(g.start-c.from),y=c.doc.resolveNoCache(g.endB-c.from),v=u.resolve(g.start),b=m.sameParent(y)&&m.parent.inlineContent&&v.end()>=g.endA;if((Ba&&t.input.lastIOSEnter>Date.now()-225&&(!b||s.some(E=>E.nodeName=="DIV"||E.nodeName=="P"))||!b&&m.pos<c.doc.content.size&&(!m.sameParent(y)||!m.parent.inlineContent)&&m.pos<y.pos&&!/\S/.test(c.doc.textBetween(m.pos,y.pos,"","")))&&t.someProp("handleKeyDown",E=>E(t,_i(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>g.start&&Uq(u,g.start,g.endA,m,y)&&t.someProp("handleKeyDown",E=>E(t,_i(8,"Backspace")))){Kr&&bt&&t.domObserver.suppressSelectionUpdates();return}bt&&g.endB==g.start&&(t.input.lastChromeDelete=Date.now()),Kr&&!b&&m.start()!=y.start()&&y.parentOffset==0&&m.depth==y.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==g.endA&&(g.endB-=2,y=c.doc.resolveNoCache(g.endB-c.from),setTimeout(()=>{t.someProp("handleKeyDown",function(E){return E(t,_i(13,"Enter"))})},20));let x=g.start,k=g.endA,S=E=>{let T=E||t.state.tr.replace(x,k,c.doc.slice(g.start-c.from,g.endB-c.from));if(c.sel){let N=Zk(t,T.doc,c.sel);N&&!(bt&&t.composing&&N.empty&&(g.start!=g.endB||t.input.lastChromeDelete<Date.now()-100)&&(N.head==x||N.head==T.mapping.map(k)-1)||en&&N.empty&&N.head==x)&&T.setSelection(N)}return i&&T.setMeta("composition",i),T.scrollIntoView()},C;if(b)if(m.pos==y.pos){en&&Qs<=11&&m.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>Qr(t),20));let E=S(t.state.tr.delete(x,k)),T=u.resolve(g.start).marksAcross(u.resolve(g.endA));T&&E.ensureMarks(T),t.dispatch(E)}else if(g.endA==g.endB&&(C=Hq(m.parent.content.cut(m.parentOffset,y.parentOffset),v.parent.content.cut(v.parentOffset,g.endA-v.start())))){let E=S(t.state.tr);C.type=="add"?E.addMark(x,k,C.mark):E.removeMark(x,k,C.mark),t.dispatch(E)}else if(m.parent.child(m.index()).isText&&m.index()==y.index()-(y.textOffset?0:1)){let E=m.parent.textBetween(m.parentOffset,y.parentOffset),T=()=>S(t.state.tr.insertText(E,x,k));t.someProp("handleTextInput",N=>N(t,x,k,E,T))||t.dispatch(T())}else t.dispatch(S());else t.dispatch(S())}function Zk(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:lb(t,e.resolve(n.anchor),e.resolve(n.head))}function Hq(t,e){let n=t.firstChild.marks,r=e.firstChild.marks,s=n,i=r,o,a,l;for(let u=0;u<r.length;u++)s=r[u].removeFromSet(s);for(let u=0;u<n.length;u++)i=n[u].removeFromSet(i);if(s.length==1&&i.length==0)a=s[0],o="add",l=u=>u.mark(a.addToSet(u.marks));else if(s.length==0&&i.length==1)a=i[0],o="remove",l=u=>u.mark(a.removeFromSet(u.marks));else return null;let c=[];for(let u=0;u<e.childCount;u++)c.push(l(e.child(u)));if(P.from(c).eq(t))return{mark:a,type:o}}function Uq(t,e,n,r,s){if(n-e<=s.pos-r.pos||Jm(r,!0,!1)<s.pos)return!1;let i=t.resolve(e);if(!r.parent.isTextblock){let a=i.nodeAfter;return a!=null&&n==e+a.nodeSize}if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;let o=t.resolve(Jm(i,!0,!0));return!o.parent.isTextblock||o.pos>n||Jm(o,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(o.parent.content)}function Jm(t,e,n){let r=t.depth,s=e?t.end():t.pos;for(;r>0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,s++,e=!1;if(n){let i=t.node(r).maybeChild(t.indexAfter(r));for(;i&&!i.isLeaf;)i=i.firstChild,s++}return s}function Vq(t,e,n,r,s){let i=t.findDiffStart(e,n),o=n+t.size,a=n+e.size;if(i==null)return null;let{a:l,b:c}=t.findDiffEnd(e,o,a);if(s=="end"){let u=Math.max(0,i-Math.min(l,c));r-=l+u-i}if(l<i&&o<a){let u=r<=i&&r>=l?i-r:0;i-=u,c=i+(c-l),l=i}else if(c<i){let u=r<=i&&r>=c?i-r:0;i-=u,l=i+(l-c),c=i}return{start:i,endA:l,endB:c}}class aO{constructor(e,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new aq,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(sS),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=nS(this),tS(this),this.nodeViews=rS(this),this.docView=Lk(this.state.doc,eS(this),Ym(this),this.dom,this),this.domObserver=new Pq(this,(r,s,i,o)=>Wq(this,r,s,i,o)),this.domObserver.start(),lq(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let n in e)this._props[n]=e[n];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&ov(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(sS),this.directPlugins=e.plugins),this.updateStateInner(e.state,n)}setProps(e){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in e)n[r]=e[r];this.update(n)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,n){var r;let s=this.state,i=!1,o=!1;e.storedMarks&&this.composing&&(eO(this),o=!0),this.state=e;let a=s.plugins!=e.plugins||this._props.plugins!=n.plugins;if(a||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let f=rS(this);Gq(f,this.nodeViews)&&(this.nodeViews=f,i=!0)}(a||n.handleDOMEvents!=this._props.handleDOMEvents)&&ov(this),this.editable=nS(this),tS(this);let l=Ym(this),c=eS(this),u=s.plugins!=e.plugins&&!s.doc.eq(e.doc)?"reset":e.scrollToSelection>s.scrollToSelection?"to selection":"preserve",h=i||!this.docView.matchesNode(e.doc,c,l);(h||!e.selection.eq(s.selection))&&(o=!0);let p=u=="preserve"&&o&&this.dom.style.overflowAnchor==null&&kV(this);if(o){this.domObserver.stop();let f=h&&(en||bt)&&!this.composing&&!s.selection.empty&&!e.selection.empty&&qq(s.selection,e.selection);if(h){let m=bt?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=Sq(this)),(i||!this.docView.update(e.doc,c,l,this))&&(this.docView.updateOuterDeco(c),this.docView.destroy(),this.docView=Lk(e.doc,c,l,this.dom,this)),m&&(!this.trackWrites||!this.dom.contains(this.trackWrites))&&(f=!0)}let g=this.input.mouseDown;f||!(g&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&qV(this)&&g.delaySelUpdate())?Qr(this,f):(Bj(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(s),!((r=this.dragging)===null||r===void 0)&&r.node&&!s.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,s),u=="reset"?this.dom.scrollTop=0:u=="to selection"?this.scrollToSelection():p&&SV(p)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))){if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof X){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&Ok(this,n.getBoundingClientRect(),e)}else Ok(this,this.coordsAtPos(this.state.selection.head,1),e)}}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let r=this.directPlugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let r=this.state.plugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}else for(let n=0;n<this.pluginViews.length;n++){let r=this.pluginViews[n];r.update&&r.update(this,e)}}updateDraggedNode(e,n){let r=e.node,s=-1;if(r.from<this.state.doc.content.size&&this.state.doc.nodeAt(r.from)==r.node)s=r.from;else{let i=r.from+(this.state.doc.content.size-n.doc.content.size);(i>0&&i<this.state.doc.content.size&&this.state.doc.nodeAt(i))==r.node&&(s=i)}this.dragging=new nO(e.slice,e.move,s<0?void 0:X.create(this.state.doc,s))}someProp(e,n){let r=this._props&&this._props[e],s;if(r!=null&&(s=n?n(r):r))return s;for(let o=0;o<this.directPlugins.length;o++){let a=this.directPlugins[o].props[e];if(a!=null&&(s=n?n(a):a))return s}let i=this.state.plugins;if(i)for(let o=0;o<i.length;o++){let a=i[o].props[e];if(a!=null&&(s=n?n(a):a))return s}}hasFocus(){if(en){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&CV(this.dom),Qr(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return e||document}updateRoot(){this._root=null}posAtCoords(e){return _V(this,e)}coordsAtPos(e,n=1){return Rj(this,e,n)}domAtPos(e,n=0){return this.docView.domFromPos(e,n)}nodeDOM(e){let n=this.docView.descAt(e);return n?n.nodeDOM:null}posAtDOM(e,n,r=-1){let s=this.docView.posFromDOM(e,n,r);if(s==null)throw new RangeError("DOM position not inside the editor");return s}endOfTextblock(e,n){return PV(this,n||this.state,e)}pasteHTML(e,n){return Zc(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return Zc(this,e,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(e){return cb(this,e)}destroy(){this.docView&&(cq(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Ym(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,hV())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return dq(this,e)}domSelectionRange(){let e=this.domSelection();return e?Rt&&this.root.nodeType===11&&yV(this.dom.ownerDocument)==this.dom&&Lq(this,e)||e:{focusNode:null,focusOffset:0,anch
vendor: 4,473 bytes, line 503
503orNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}aO.prototype.dispatch=function(t){let e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))};function eS(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(t.state)),n)for(let r in n)r=="class"?e.class+=" "+n[r]:r=="style"?e.style=(e.style?e.style+";":"")+n[r]:!e[r]&&r!="contenteditable"&&r!="nodeName"&&(e[r]=String(n[r]))}),e.translate||(e.translate="no"),[$t.node(0,t.state.doc.content.size,e)]}function tS(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:$t.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function nS(t){return!t.someProp("editable",e=>e(t.state)===!1)}function qq(t,e){let n=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(n)!=e.$anchor.start(n)}function rS(t){let e=Object.create(null);function n(r){for(let s in r)Object.prototype.hasOwnProperty.call(e,s)||(e[s]=r[s])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function Gq(t,e){let n=0,r=0;for(let s in t){if(t[s]!=e[s])return!0;n++}for(let s in e)r++;return n!=r}function sS(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var oi={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Yh={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Kq=typeof navigator<"u"&&/Mac/.test(navigator.platform),Yq=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var vt=0;vt<10;vt++)oi[48+vt]=oi[96+vt]=String(vt);for(var vt=1;vt<=24;vt++)oi[vt+111]="F"+vt;for(var vt=65;vt<=90;vt++)oi[vt]=String.fromCharCode(vt+32),Yh[vt]=String.fromCharCode(vt);for(var Qm in oi)Yh.hasOwnProperty(Qm)||(Yh[Qm]=oi[Qm]);function Jq(t){var e=Kq&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||Yq&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?Yh:oi)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}const Qq=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),Xq=typeof navigator<"u"&&/Win/.test(navigator.platform);function Zq(t){let e=t.split(/-(?!$)/),n=e[e.length-1];n=="Space"&&(n=" ");let r,s,i,o;for(let a=0;a<e.length-1;a++){let l=e[a];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))s=!0;else if(/^s(hift)?$/i.test(l))i=!0;else if(/^mod$/i.test(l))Qq?o=!0:s=!0;else throw new Error("Unrecognized modifier name: "+l)}return r&&(n="Alt-"+n),s&&(n="Ctrl-"+n),o&&(n="Meta-"+n),i&&(n="Shift-"+n),n}function e7(t){let e=Object.create(null);for(let n in t)e[Zq(n)]=t[n];return e}function Xm(t,e,n=!0){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n&&e.shiftKey&&(t="Shift-"+t),t}function t7(t){return new Le({props:{handleKeyDown:lO(t)}})}function lO(t){let e=e7(t);return function(n,r){let s=Jq(r),i,o=e[Xm(s,r)];if(o&&o(n.state,n.dispatch,n))return!0;if(s.length==1&&s!=" "){if(r.shiftKey){let a=e[Xm(s,r,!1)];if(a&&a(n.state,n.dispatch,n))return!0}if((r.altKey||r.metaKey||r.ctrlKey)&&!(Xq&&r.ctrlKey&&r.altKey)&&(i=oi[r.keyCode])&&i!=s){let a=e[Xm(i,r)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}var n7=Object.defineProperty,mb=(t,e)=>{for(var n in e)n7(t,n,{get:e[n],enumerable:!0})};function Tp(t){const{state:e,transaction:n}=t;let{selection:r}=n,{doc:s}=n,{storedMarks:i}=n;
vendor: 4,358 bytes, line 503
503return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return i},get selection(){return r},get doc(){return s},get tr(){return r=n.selection,s=n.doc,i=n.storedMarks,n}}}var Np=class{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:t,editor:e,state:n}=this,{view:r}=e,{tr:s}=n,i=this.buildProps(s);return Object.fromEntries(Object.entries(t).map(([o,a])=>[o,(...c)=>{const u=a(...c)(i);return!s.getMeta("preventDispatch")&&!this.hasCustomState&&r.dispatch(s),u}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,e=!0){const{rawCommands:n,editor:r,state:s}=this,{view:i}=r,o=[],a=!!t,l=t||s.tr,c=()=>(!a&&e&&!l.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(l),o.every(h=>h===!0)),u={...Object.fromEntries(Object.entries(n).map(([h,p])=>[h,(...g)=>{const m=this.buildProps(l,e),y=p(...g)(m);return o.push(y),u}])),run:c};return u}createCan(t){const{rawCommands:e,state:n}=this,r=!1,s=t||n.tr,i=this.buildProps(s,r);return{...Object.fromEntries(Object.entries(e).map(([a,l])=>[a,(...c)=>l(...c)({...i,dispatch:void 0})])),chain:()=>this.createChain(s,r)}}buildProps(t,e=!0){const{rawCommands:n,editor:r,state:s}=this,{view:i}=r,o={tr:t,editor:r,view:i,state:Tp({state:s,transaction:t}),dispatch:e?()=>{}:void 0,chain:()=>this.createChain(t,e),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(n).map(([a,l])=>[a,(...c)=>l(...c)(o)]))}};return o}},cO={};mb(cO,{blur:()=>r7,clearContent:()=>s7,clearNodes:()=>i7,command:()=>o7,createParagraphNear:()=>a7,cut:()=>l7,deleteCurrentNode:()=>c7,deleteNode:()=>u7,deleteRange:()=>d7,deleteSelection:()=>p7,enter:()=>m7,exitCode:()=>g7,extendMarkRange:()=>y7,first:()=>v7,focus:()=>x7,forEach:()=>w7,insertContent:()=>k7,insertContentAt:()=>C7,insertDefaultBlock:()=>E7,joinBackward:()=>A7,joinDown:()=>N7,joinForward:()=>_7,joinItemBackward:()=>j7,joinItemForward:()=>O7,joinTextblockBackward:()=>R7,joinTextblockForward:()=>M7,joinUp:()=>T7,keyboardShortcut:()=>I7,lift:()=>L7,liftEmptyBlock:()=>D7,liftListItem:()=>$7,newlineInCode:()=>z7,resetAttributes:()=>B7,scrollIntoView:()=>F7,selectAll:()=>W7,selectNodeBackward:()=>H7,selectNodeForward:()=>U7,selectParentNode:()=>V7,selectTextblockEnd:()=>q7,selectTextblockStart:()=>G7,setContent:()=>K7,setMark:()=>p9,setMeta:()=>m9,setNode:()=>g9,setNodeSelection:()=>y9,setTextDirection:()=>v9,setTextSelection:()=>b9,sinkListItem:()=>x9,splitBlock:()=>w9,splitListItem:()=>k9,toggleList:()=>C9,toggleMark:()=>E9,toggleNode:()=>T9,toggleWrap:()=>N9,undoInputRule:()=>A9,unsetAllMarks:()=>_9,unsetMark:()=>j9,unsetTextDirection:()=>O9,updateAttributes:()=>R9,wrapIn:()=>M9,wrapInList:()=>P9});var r7=()=>({editor:t,view:e})=>(requestAnimationFrame(()=>{var n;t.isDestroyed||(e.dom.blur(),(n=window==null?void 0:window.getSelection())==null||n.removeAllRanges())}),!0),s7=(t=!0)=>({commands:e})=>e.setContent("",{emitUpdate:t}),i7=()=>({state:t,tr:e,dispatch:n})=>{const{selection:r}=e,{ranges:s}=r;return n&&s.forEach(({$from:i,$to:o})=>{t.doc.nodesBetween(i.pos,o.pos,(a,l)=>{if(a.type.isText)return;const{doc:c,mapping:u}=e,h=c.resolve(u.map(l)),p=c.resolve(u.map(l+a.nodeSize)),f=h.blockRange(p);if(!f)return;const g=sl(f);if(a.type.isTextblock){const{defaultType:m}=h.parent.contentMatchAt(h.index());e.setNodeMarkup(f.start,m)}(g||g===0)&&e.lift(f,g)})}),!0},o7=t=>e=>t(e),a7=()=>({state:t,dispatch:e})=>X8(t,e),l7=(t,e)=>({editor:n,tr:r})=>{const{state:s}=n,i=s.doc.slice(t.from,t.to);r.deleteRange(t.from,t.to);const o=r.mapping.map(e);return r.insert(o,i.content),r.setSelection(new ee(r.doc.resolve(Math.max(o-1,0)))),!0},c7=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,r=n.$anchor.node();if(r.content.size>0)return!1;const s=t.selection.$anchor;for(let i=s.depth;i>0;i-=1)if(s.node(i).type===r.type){if(e){const a=s.before(i),l=s.after(i);t.delete(a,l).scrollIntoView()}return!0}return!1};function st(t,e){if(typeof t=="string"){if(!e.nodes[t])throw Error(`There is no node type named '${t}'. Maybe you forgot to add the extension?`);
503return e.nodes[t]}return t}var u7=t=>({tr:e,state:n,dispatch:r})=>{const s=st(t,n.schema),i=e.selection.$anchor;for(let o=i.depth;o>0;o-=1)if(i.node(o).type===s){if(r){const l=i.before(o),c=i.after(o);e.delete(l,c).scrollIntoView()}return!0}return!1},d7=t=>({tr:e,dispatch:n})=>{const{from:r,to:s}=t;return n&&e.delete(r,s),!0},h7=t=>t.content?/^text(\*|\+)/.test(t.content):!1,iS=(t,e,n)=>{if(!t.parent.isInline||n==="left"&&t.pos>t.start()||n==="right"&&t.pos<t.end())return t.pos;const r=e.nodes[t.parent.type.name].spec;return h7(r)?n==="left"?t.start()-1:t.end()+1:t.pos},f7=(t,e,n)=>{const r=iS(t,n,"left"),s=iS(e,n,"right");return{from:r,to:s}},p7=()=>({state:t,dispatch:e})=>{if(t.selection.empty)return!1;if(e){const n=t.tr,{ranges:r}=t.selection,s=n.steps.length;r.forEach(i=>{const o=n.mapping.slice(s),a=n.doc.resolve(o.map(i.$from.pos)),l=n.doc.resolve(o.map(i.$to.pos)),{from:c,to:u}=f7(a,l,t.schema);n.deleteRange(c,u)}),n.selection.empty||n.setSelection(ee.near(n.doc.resolve(n.selection.from))),n.scrollIntoView(),e(n)}return!0},m7=()=>({commands:t})=>t.keyboardShortcut("Enter"),g7=()=>({state:t,dispatch:e})=>Q8(t,e);function gb(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function Jh(t,e,n={strict:!0}){const r=Object.keys(e);return r.length?r.every(s=>n.strict?e[s]===t[s]:gb(e[s])?e[s].test(t[s]):e[s]===t[s]):!0}function uO(t,e,n={}){return t.find(r=>r.type===e&&Jh(Object.fromEntries(Object.keys(n).map(s=>[s,r.attrs[s]])),n))}function oS(t,e,n={}){return!!uO(t,e,n)}function yb(t,e,n){if(!t||!e)return;let r=t.parent.childAfter(t.parentOffset);if((!r.node||!r.node.marks.some(c=>c.type===e))&&(r=t.parent.childBefore(t.parentOffset)),!r.node||!r.node.marks.some(c=>c.type===e))return;if(!n){const c=r.node.marks.find(u=>u.type===e);c&&(n=c.attrs)}if(!uO([...r.node.marks],e,n))return;let i=r.index,o=t.start()+r.offset,a=i+1,l=o+r.node.nodeSize;for(;i>0&&oS([...t.parent.child(i-1).marks],e,n);)i-=1,o-=t.parent.child(i).nodeSize;for(;a<t.parent.childCount&&oS([...t.parent.child(a).marks],e,n);)l+=t.parent.child(a).nodeSize,a+=1;return{from:o,to:l}}function as(t,e){if(typeof t=="string"){if(!e.marks[t])throw Error(`There is no mark type named '${t}'. Maybe you forgot to add the extension?`);return e.marks[t]}return t}var y7=(t,e)=>({tr:n,state:r,dispatch:s})=>{const i=as(t,r.schema),{doc:o,selection:a}=n,{$from:l,from:c,to:u}=a;if(s){const h=yb(l,i,e);if(h&&h.from<=c&&h.to>=u){const p=ee.create(o,h.from,h.to);n.setSelection(p)}}return!0},v7=t=>e=>{const n=typeof t=="function"?t(e):t;for(let r=0;r<n.length;r+=1)if(n[r](e))return!0;return!1};function dO(t){return t instanceof ee}function zi(t=0,e=0,n=0){return Math.min(Math.max(t,e),n)}function av(t,e=null){if(!e)return null;const n=le.atStart(t),r=le.atEnd(t);if(e==="start"||e===!0)return n;if(e==="end")return r;const s=n.from,i=r.to;return e==="all"?ee.create(t,zi(0,s,i),zi(t.content.size,s,i)):ee.create(t,zi(e,s,i),zi(e,s,i))}function aS(){return["Android"].includes(navigator.platform)||/android/i.test(navigator.userAgent)}function Qh(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function b7(){return typeof navigator<"u"?/^((?!chrome|android).)*safari/i.test(navigator.userAgent):!1}var x7=(t=null,e={})=>({editor:n,view:r,tr:s,dispatch:i})=>{e={scrollIntoView:!0,...e};const o=()=>{(Qh()||aS())&&r.dom.focus(),b7()&&!Qh()&&!aS()&&r.dom.focus({preventScroll:!0}),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),e!=null&&e.scrollIntoView&&n.commands.scrollIntoView())})};try{if(r.hasFocus()&&t===null||t===!1)return!0}catch{return!1}if(i&&t===null&&!dO(n.state.selection))return o(),!0;const a=av(s.doc,t)||n.state.selection,l=n.state.selection.eq(a);return i&&(l||s.setSelection(a),l&&s.storedMarks&&s.setStoredMarks(s.storedMarks),o()),!0},w7=(t,e)=>n=>t.every((r,s)=>e(r,{...n,index:s})),k7=(t,e)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},t,e),hO=t=>{const e=t.childNodes;for(let n=e.length-1;n>=0;n-=1){const r=e[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?t.removeChild(r):r.nodeType===1&&hO(r)}return t};function dd(t){if(typeof window>"u")throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");const e=`<body>${t}</body>`,n=new window.DOMParser().parseFromString(e,"text/html").body;return hO(n)}function Fa(t,e,n){if(t instanceof Ys||t instanceof P)return t;n={slice:!0,parseOptions:{},...n};const r=typeof t=="object"&&t!==null,s=typeof t=="string";if(r)try{if(Array.isArray(t)&&t.length>0)return P.fromArray(t.map(a=>e.nodeFromJSON(a)));const o=e.nodeFromJSON(t);return n.errorOnInvalidContent&&o.check(),o}catch(i){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:i});return console.warn("[tiptap warn]: Invalid content.","Passed value:",t,"Error:",i),Fa("",e,n)}if(s){if(n.errorOnInvalidContent){let o=!1,a="";const l=new ej({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:c=>(o=!0,a=typeof c=="string"?c:c.outerHTML,null)}]}})});if(n.slice?Js.fromSchema(l).parseSlice(dd(t),n.parseOptions):Js.fromSchema(l).parse(dd(t),n.parseOptions),n.errorOnInvalidContent&&o)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${a}`)})}const i=Js.fromSchema(e);return n.slice?i.parseSlice(dd(t),n.parseOptions).content:i.parse(dd(t),n.parseOptions)}return Fa("",e,n)}function fO(t,e,n){const r=t.steps.length-1;if(r<e)return;const s=t.steps[r];if(!(s instanceof et||s instanceof ht))return;const i=t.mapping.maps[r];let o=0;
vendor: 6,703 bytes, line 503
503i.forEach((a,l,c,u)=>{o===0&&(o=u)}),t.setSelection(le.near(t.doc.resolve(o),n))}var S7=t=>!("type"in t),C7=(t,e,n)=>({tr:r,dispatch:s,editor:i})=>{var o;if(s){n={parseOptions:i.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let a;const l=y=>{i.emit("contentError",{editor:i,error:y,disableCollaboration:()=>{"collaboration"in i.storage&&typeof i.storage.collaboration=="object"&&i.storage.collaboration&&(i.storage.collaboration.isDisabled=!0)}})},c={preserveWhitespace:"full",...n.parseOptions};if(!n.errorOnInvalidContent&&!i.options.enableContentCheck&&i.options.emitContentError)try{Fa(e,i.schema,{parseOptions:c,errorOnInvalidContent:!0})}catch(y){l(y)}try{a=Fa(e,i.schema,{parseOptions:c,errorOnInvalidContent:(o=n.errorOnInvalidContent)!=null?o:i.options.enableContentCheck})}catch(y){return l(y),!1}let{from:u,to:h}=typeof t=="number"?{from:t,to:t}:{from:t.from,to:t.to},p=!0,f=!0;if((S7(a)?a:[a]).forEach(y=>{y.check(),p=p?y.isText&&y.marks.length===0:!1,f=f?y.isBlock:!1}),u===h&&f){const{parent:y}=r.doc.resolve(u);y.isTextblock&&!y.type.spec.code&&!y.childCount&&(u-=1,h+=1)}let m;if(p){if(Array.isArray(e))m=e.map(y=>y.text||"").join("");else if(e instanceof P){let y="";e.forEach(v=>{v.text&&(y+=v.text)}),m=y}else typeof e=="object"&&e&&e.text?m=e.text:m=e;r.insertText(m,u,h)}else{m=a;const y=r.doc.resolve(u),v=y.node(),b=y.parentOffset===0,x=v.isText||v.isTextblock,k=v.content.size>0;b&&x&&k&&f&&(u=Math.max(0,u-1)),r.replaceWith(u,h,m)}n.updateSelection&&fO(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:u,text:m}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:u,text:m})}return!0};function pO(t){for(let e=0;e<t.edgeCount;e+=1){const{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}var E7=(t={})=>({tr:e,dispatch:n,editor:r})=>{const{pos:s,attrs:i,content:o,updateSelection:a=!0}=t;let l;typeof s=="number"?l=e.doc.resolve(s):s?l=s:l=e.selection.$from;const c=pO(l.parent.contentMatchAt(l.index()));if(!c)return!1;const u=Object.keys(c.spec.attrs||{}),h=i?Object.fromEntries(Object.entries(i).filter(([f])=>u.includes(f))):{};let p;if(o){const f=Fa(o,r.schema);p=c.createAndFill(h,f)}else p=c.createAndFill(h);return p?(n&&(e.insert(l.pos,p),a&&fO(e,e.steps.length-1,-1)),!0):!1},T7=()=>({state:t,dispatch:e})=>G8(t,e),N7=()=>({state:t,dispatch:e})=>K8(t,e),A7=()=>({state:t,dispatch:e})=>F8(t,e),_7=()=>({state:t,dispatch:e})=>V8(t,e),j7=()=>({state:t,dispatch:e,tr:n})=>{try{const r=wp(t.doc,t.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},O7=()=>({state:t,dispatch:e,tr:n})=>{try{const r=wp(t.doc,t.selection.$from.pos,1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},R7=()=>({state:t,dispatch:e})=>W8(t,e),M7=()=>({state:t,dispatch:e})=>H8(t,e);function mO(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function P7(t){const e=t.split(/-(?!$)/);let n=e[e.length-1];n==="Space"&&(n=" ");let r,s,i,o;for(let a=0;a<e.length-1;a+=1){const l=e[a];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))s=!0;else if(/^s(hift)?$/i.test(l))i=!0;else if(/^mod$/i.test(l))Qh()||mO()?o=!0:s=!0;else throw new Error(`Unrecognized modifier name: ${l}`)}return r&&(n=`Alt-${n}`),s&&(n=`Ctrl-${n}`),o&&(n=`Meta-${n}`),i&&(n=`Shift-${n}`),n}var I7=t=>({editor:e,view:n,tr:r,dispatch:s})=>{const i=P7(t).split(/-(?!$)/),o=i.find(c=>!["Alt","Ctrl","Meta","Shift"].includes(c)),a=new KeyboardEvent("keydown",{key:o==="Space"?" ":o,altKey:i.includes("Alt"),ctrlKey:i.includes("Ctrl"),metaKey:i.includes("Meta"),shiftKey:i.includes("Shift"),bubbles:!0,cancelable:!0}),l=e.captureTransaction(()=>{n.someProp("handleKeyDown",c=>c(n,a))});return l==null||l.steps.forEach(c=>{const u=c.map(r.mapping);u&&s&&r.maybeStep(u)}),!0};function ai(t,e,n={}){const{from:r,to:s,empty:i}=t.selection,o=e?st(e,t.schema):null,a=[];t.doc.nodesBetween(r,s,(h,p)=>{if(h.isText)return;const f=Math.max(r,p),g=Math.min(s,p+h.nodeSize);a.push({node:h,from:f,to:g})});const l=s-r,c=a.filter(h=>o?o.name===h.node.type.name:!0).filter(h=>Jh(h.node.attrs,n,{strict:!1}));return i?!!c.length:c.reduce((h,p)=>h+p.to-p.from,0)>=l}var L7=(t,e={})=>({state:n,dispatch:r})=>{const s=st(t,n.schema);return ai(n,s,e)?Y8(n,r):!1},D7=()=>({state:t,dispatch:e})=>Z8(t,e),$7=t=>({state:e,dispatch:n})=>{const r=st(t,e.schema);return lV(r)(e,n)},z7=()=>({state:t,dispatch:e})=>J8(t,e);function Ap(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function lS(t,e){const n=typeof e=="string"?[e]:e;return Object.keys(t).reduce((r,s)=>(n.includes(s)||(r[s]=t[s]),r),{})}var B7=(t,e)=>({tr:n,state:r,dispatch:s})=>{let i=null,o=null;const a=Ap(typeof t=="string"?t:t.name,r.schema);if(!a)return!1;a==="node"&&(i=st(t,r.schema)),a==="mark"&&(o=as(t,r.schema));let l=!1;return n.selection.ranges.forEach(c=>{r.doc.nodesBetween(c.$from.pos,c.$to.pos,(u,h)=>{i&&i===u.type&&(l=!0,s&&n.setNodeMarkup(h,void 0,lS(u.attrs,e))),o&&u.marks.length&&u.marks.forEach(p=>{o===p.type&&(l=!0,s&&n.addMark(h,h+u.nodeSize,o.create(lS(p.attrs,e))))})})}),l},F7=()=>({tr:t,dispatch:e})=>(e&&t.scrollIntoView(),!0),W7=()=>({tr:t,dispatch:e})=>{if(e){const n=new An(t.doc);t.setSelection(n)}return!0},H7=()=>({state:t,dispatch:e})=>U8(t,e),U7=()=>({state:t,dispatch:e})=>q8(t,e),V7=()=>({state:t,dispatch:e})=>eV(t,e),q7=()=>({state:t,dispatch:e})=>rV(t,e),G7=()=>({state:t,dispatch:e})=>nV(t,e);function lv(t,e,n={},r={}){return Fa(t,e,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}var K7=(t,{errorOnInvalidContent:e,emitUpdate:n=!0,parseOptions:r={}}={})=>({editor:s,tr:i,dispatch:o,commands:a})=>{const{doc:l}=i;if(r.preserveWhitespace!=="full"){const c=lv(t,s.schema,r,{errorOnInvalidContent:e??s.options.enableContentCheck});return o&&i.replaceWith(0,l.content.size,c).setMeta("preventUpdate",!n),!0}return o&&i.setMeta("preventUpdate",!n),a.insertContentAt({from:0,to:l.content.size},t,{parseOptions:r,errorOnInvalidContent:e??s.options.enableContentCheck})};function gO(t,e){const n=as(e,t.schema),{from:r,to:s,empty:i}=t.selection,o=[];i?(t.storedMarks&&o.push(...t.storedMarks),o.push(...t.selection.$head.marks())):t.doc.nodesBetween(r,s,l=>{o.push(...l.marks)});const a=o.find(l=>l.type.name===n.name);return a?{...a.attrs}:{}}function yO(t,e){const n=new gj(t);return e.forEach(r=>{r.steps.forEach(s=>{n.step(s)})}),n}function Y7(t,e,n){const r=[];return t.nodesBetween(e.from,e.to,(s,i)=>{n(s)&&r.push({node:s,pos:i})}),r}function J7(t,e){for(let n=t.depth;n>0;n-=1){const r=t.node(n);if(e(r))return{pos:n>0?t.before(n):0,start:t.start(n),depth:n,node:r}}}function _p(t){return e=>J7(e.$from,t)}
503function Y(t,e,n){return t.config[e]===void 0&&t.parent?Y(t.parent,e,n):typeof t.config[e]=="function"?t.config[e].bind({...n,parent:t.parent?Y(t.parent,e,n):null}):t.config[e]}function vb(t){return t.map(e=>{const n={name:e.name,options:e.options,storage:e.storage},r=Y(e,"addExtensions",n);return r?[e,...vb(r())]:e}).flat(10)}function bb(t,e){const n=xo.fromSchema(e).serializeFragment(t),s=document.implementation.createHTMLDocument().createElement("div");return s.appendChild(n),s.innerHTML}function vO(t){return typeof t=="function"}function ve(t,e=void 0,...n){return vO(t)?e?t.bind(e)(...n):t(...n):t}function Q7(t={}){return Object.keys(t).length===0&&t.constructor===Object}function Wa(t){const e=t.filter(s=>s.type==="extension"),n=t.filter(s=>s.type==="node"),r=t.filter(s=>s.type==="mark");return{baseExtensions:e,nodeExtensions:n,markExtensions:r}}function bO(t){const e=[],{nodeExtensions:n,markExtensions:r}=Wa(t),s=[...n,...r],i={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1},o=n.filter(c=>c.name!=="text").map(c=>c.name),a=r.map(c=>c.name),l=[...o,...a];return t.forEach(c=>{const u={name:c.name,options:c.options,storage:c.storage,extensions:s},h=Y(c,"addGlobalAttributes",u);if(!h)return;h().forEach(f=>{let g;Array.isArray(f.types)?g=f.types:f.types==="*"?g=l:f.types==="nodes"?g=o:f.types==="marks"?g=a:g=[],g.forEach(m=>{Object.entries(f.attributes).forEach(([y,v])=>{e.push({type:m,name:y,attribute:{...i,...v}})})})})}),s.forEach(c=>{const u={name:c.name,options:c.options,storage:c.storage},h=Y(c,"addAttributes",u);if(!h)return;const p=h();Object.entries(p).forEach(([f,g])=>{const m={...i,...g};typeof(m==null?void 0:m.default)=="function"&&(m.default=m.default()),m!=null&&m.isRequired&&(m==null?void 0:m.default)===void 0&&delete m.default,e.push({type:c.name,name:f,attribute:m})})}),e}function X7(t){const e=[];let n="",r=!1,s=!1,i=0;const o=t.length;for(let a=0;a<o;a+=1){const l=t[a];if(l==="'"&&!s){r=!r,n+=l;continue}if(l==='"'&&!r){s=!s,n+=l;continue}if(!r&&!s){if(l==="("){i+=1,n+=l;continue}if(l===")"&&i>0){i-=1,n+=l;continue}if(l===";"&&i===0){e.push(n),n="";continue}}n+=l}return n&&e.push(n),e}function cS(t){const e=[],n=X7(t||""),r=n.length;for(let s=0;s<r;s+=1){const i=n[s],o=i.indexOf(":");if(o===-1)continue;const a=i.slice(0,o).trim(),l=i.slice(o+1).trim();a&&l&&e.push([a,l])}return e}function Qe(...t){return t.filter(e=>!!e).reduce((e,n)=>{const r={...e};return Object.entries(n).forEach(([s,i])=>{if(!r[s]){r[s]=i;return}if(s==="class"){const a=i?String(i).split(" "):[],l=r[s]?r[s].split(" "):[],c=a.filter(u=>!l.includes(u));r[s]=[...l,...c].join(" ")}else if(s==="style"){const a=new Map([...cS(r[s]),...cS(i)]);r[s]=Array.from(a.entries()).map(([l,c])=>`${l}: ${c}`).join("; ")}else r[s]=i}),r},{})}function Ha(t,e){return e.filter(n=>n.type===t.type.name).filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(t.attrs)||{}:{[n.name]:t.attrs[n.name]}).reduce((n,r)=>Qe(n,r),{})}function Z7(t){return typeof t!="string"?t:t.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(t):t==="true"?!0:t==="false"?!1:t}function uS(t,e){return"style"in t?t:{...t,getAttrs:n=>{const r=t.getAttrs?t.getAttrs(n):t.attrs;if(r===!1)return!1;const s=e.reduce((i,o)=>{const a=o.attribute.parseHTML?o.attribute.parseHTML(n):Z7(n.getAttribute(o.name));return a==null?i:{...i,[o.name]:a}},{});return{...r,...s}}}}function dS(t){return Object.fromEntries(Object.entries(t).filter(([e,n])=>e==="attrs"&&Q7(n)?!1:n!=null))}function hS(t){var e,n;const r={};return!((e=t==null?void 0:t.attribute)!=null&&e.isRequired)&&"default"in((t==null?void 0:t.attribute)||{})&&(r.default=t.attribute.default),((n=t==null?void 0:t.attribute)==null?void 0:n.validate)!==void 0&&(r.validate=t.attribute.validate),[t.name,r]}function e9(t,e){var n;const r=bO(t),{nodeExtensions:s,markExtensions:i}=Wa(t),o=(n=s.find(c=>Y(c,"topNode")))==null?void 0:n.name,a=Object.fromEntries(s.map(c=>{const u=r.filter(v=>v.type===c.name),h={name:c.name,options:c.options,storage:c.storage,editor:e},p=t.reduce((v,b)=>{const x=Y(b,"extendNodeSchema",h);return{...v,...x?x(c):{}}},{}),f=dS({...p,content:ve(Y(c,"content",h)),marks:ve(Y(c,"marks",h)),group:ve(Y(c,"group",h)),inline:ve(Y(c,"inline",h)),atom:ve(Y(c,"atom",h)),selectable:ve(Y(c,"selectable",h)),draggable:ve(Y(c,"draggable",h)),code:ve(Y(c,"code",h)),whitespace:ve(Y(c,"whitespace",h)),linebreakReplacement:ve(Y(c,"linebreakReplacement",h)),defining:ve(Y(c,"defining",h)),isolating:ve(Y(c,"isolating",h)),attrs:Object.fromEntries(u.map(hS))}),g=ve(Y(c,"parseHTML",h));g&&(f.parseDOM=g.map(v=>uS(v,u)));const m=Y(c,"renderHTML",h);m&&(f.toDOM=v=>m({node:v,HTMLAttributes:Ha(v,u)}));const y=Y(c,"renderText",h);return y&&(f.toText=y),[c.name,f]})),l=Object.fromEntries(i.map(c=>{const u=r.filter(y=>y.type===c.name),h={name:c.name,options:c.options,storage:c.storage,editor:e},p=t.reduce((y,v)=>{const b=Y(v,"extendMarkSchema",h);return{...y,...b?b(c):{}}},{}),f=dS({...p,inclusive:ve(Y(c,"inclusive",h)),excludes:ve(Y(c,"excludes",h)),group:ve(Y(c,"group",h)),spanning:ve(Y(c,"spanning",h)),code:ve(Y(c,"code",h)),attrs:Object.fromEntries(u.map(hS))}),g=ve(Y(c,"parseHTML",h));g&&(f.parseDOM=g.map(y=>uS(y,u)));const m=Y(c,"renderHTML",h);return m&&(f.toDOM=y=>m({mark:y,HTMLAttributes:Ha(y,u)})),[c.name,f]}));return new ej({topNode:o,nodes:a,marks:l})}function t9(t){const e=t.filter((n,r)=>t.indexOf(n)!==r);return Array.from(new Set(e))}function sc(t){return t.sort((n,r)=>{const s=Y(n,"priority")||100,i=Y(r,"priority")||100;return s>i?-1:s<i?1:0})}
vendor: 8,624 bytes, lines 503-505
503function xO(t){const e=sc(vb(t)),n=t9(e.map(r=>r.name));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map(r=>`'${r}'`).join(", ")}]. This can lead to issues.`),e}function wO(t,e,n){const{from:r,to:s}=e,{blockSeparator:i=` 504 505`,textSerializers:o={}}=n||{};let a="";return t.nodesBetween(r,s,(l,c,u,h)=>{var p;l.isBlock&&c>r&&(a+=i);const f=o==null?void 0:o[l.type.name];if(f)return u&&(a+=f({node:l,pos:c,parent:u,index:h,range:e})),!1;l.isText&&(a+=(p=l==null?void 0:l.text)==null?void 0:p.slice(Math.max(r,c)-c,s-c))}),a}function n9(t,e){const n={from:0,to:t.content.size};return wO(t,n,e)}function kO(t){return Object.fromEntries(Object.entries(t.nodes).filter(([,e])=>e.spec.toText).map(([e,n])=>[e,n.spec.toText]))}function r9(t,e){const n=st(e,t.schema),{from:r,to:s}=t.selection,i=[];t.doc.nodesBetween(r,s,a=>{i.push(a)});const o=i.reverse().find(a=>a.type.name===n.name);return o?{...o.attrs}:{}}function SO(t,e){const n=Ap(typeof e=="string"?e:e.name,t.schema);return n==="node"?r9(t,e):n==="mark"?gO(t,e):{}}function s9(t,e=JSON.stringify){const n={};return t.filter(r=>{const s=e(r);return Object.prototype.hasOwnProperty.call(n,s)?!1:n[s]=!0})}function i9(t){const e=s9(t);return e.length===1?e:e.filter((n,r)=>!e.filter((i,o)=>o!==r).some(i=>n.oldRange.from>=i.oldRange.from&&n.oldRange.to<=i.oldRange.to&&n.newRange.from>=i.newRange.from&&n.newRange.to<=i.newRange.to))}function xb(t){const{mapping:e,steps:n}=t,r=[];return e.maps.forEach((s,i)=>{const o=[];if(s.ranges.length)s.forEach((a,l)=>{o.push({from:a,to:l})});else{const{from:a,to:l}=n[i];if(a===void 0||l===void 0)return;o.push({from:a,to:l})}o.forEach(({from:a,to:l})=>{const c=e.slice(i).map(a,-1),u=e.slice(i).map(l),h=e.invert().map(c,-1),p=e.invert().map(u);r.push({oldRange:{from:h,to:p},newRange:{from:c,to:u}})})}),i9(r)}function wb(t,e,n){const r=[];return t===e?n.resolve(t).marks().forEach(s=>{const i=n.resolve(t),o=yb(i,s.type);o&&r.push({mark:s,...o})}):n.nodesBetween(t,e,(s,i)=>{!s||(s==null?void 0:s.nodeSize)===void 0||r.push(...s.marks.map(o=>({from:i,to:i+s.nodeSize,mark:o})))}),r}var o9=(t,e,n,r=20)=>{const s=t.doc.resolve(n);let i=r,o=null;for(;i>0&&o===null;){const a=s.node(i);(a==null?void 0:a.type.name)===e?o=a:i-=1}return[o,i]};function Cl(t,e){return e.nodes[t]||e.marks[t]||null}function Kd(t,e,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const s=t.find(i=>i.type===e&&i.name===r);return s?s.attribute.keepOnSplit:!1}))}var a9=(t,e=500)=>{let n="";const r=t.parentOffset;return t.parent.nodesBetween(Math.max(0,r-e),r,(s,i,o,a)=>{var l,c;const u=((c=(l=s.type.spec).toText)==null?void 0:c.call(l,{node:s,pos:i,parent:o,index:a}))||s.textContent||"%leaf%";n+=s.isAtom&&!s.isText?u:u.slice(0,Math.max(0,r-i))}),n};function cv(t,e,n={}){const{empty:r,ranges:s}=t.selection,i=e?as(e,t.schema):null;if(r)return!!(t.storedMarks||t.selection.$from.marks()).filter(h=>i?i.name===h.type.name:!0).find(h=>Jh(h.attrs,n,{strict:!1}));let o=0;const a=[];if(s.forEach(({$from:h,$to:p})=>{const f=h.pos,g=p.pos;t.doc.nodesBetween(f,g,(m,y)=>{if(i&&m.inlineContent&&!m.type.allowsMarkType(i))return!1;if(!m.isText&&!m.marks.length)return;const v=Math.max(f,y),b=Math.min(g,y+m.nodeSize),x=b-v;o+=x,a.push(...m.marks.map(k=>({mark:k,from:v,to:b})))})}),o===0)return!1;const l=a.filter(h=>i?i.name===h.mark.type.name:!0).filter(h=>Jh(h.mark.attrs,n,{strict:!1})).reduce((h,p)=>h+p.to-p.from,0),c=a.filter(h=>i?h.mark.type!==i&&h.mark.type.excludes(i):!0).reduce((h,p)=>h+p.to-p.from,0);return(l>0?l+c:l)>=o}function l9(t,e,n={}){if(!e)return ai(t,null,n)||cv(t,null,n);const r=Ap(e,t.schema);return r==="node"?ai(t,e,n):r==="mark"?cv(t,e,n):!1}var c9=(t,e)=>{const{$from:n,$to:r,$anchor:s}=t.selection;if(e){const i=_p(a=>a.type.name===e)(t.selection);if(!i)return!1;const o=t.doc.resolve(i.pos+1);return s.pos+1===o.end()}return!(r.parentOffset<r.parent.nodeSize-2||n.pos!==r.pos)},u9=t=>{const{$from:e,$to:n}=t.selection;return!(e.parentOffset>0||e.pos!==n.pos)};function fS(t,e){return Array.isArray(e)?e.some(n=>(typeof n=="string"?n:n.name)===t.name):e}function Zm(t,e){const{nodeExtensions:n}=Wa(e),r=n.find(o=>o.name===t);if(!r)return!1;const s={name:r.name,options:r.options,storage:r.storage},i=ve(Y(r,"group",s));return typeof i!="string"?!1:i.split(" ").includes("list")}function wu(t,{checkChildren:e=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if(t.type.name==="hardBreak")return!0;if(t.isText)return!/\S/.test((r=t.text)!=null?r:"")}if(t.isText)return!t.text;if(t.isAtom||t.isLeaf)return!1;if(t.content.childCount===0)return!0;if(e){let s=!0;return t.content.forEach(i=>{s!==!1&&(wu(i,{ignoreWhitespace:n,checkChildren:e})||(s=!1))}),s}return!1}function CO(t){return t instanceof X}var EO=class TO{constructor(e){this.position=e}static fromJSON(e){return new TO(e.position)}toJSON(){return{position:this.position}}};function d9(t,e){const n=e.mapping.mapResult(t.position);return{position:new EO(n.pos),mapResult:n}}function h9(t){return new EO(t)}function f9(t,e,n){var r;const{selection:s}=e;let i=null;if(dO(s)&&(i=s.$cursor),i){const a=(r=t.storedMarks)!=null?r:i.marks();return i.parent.type.allowsMarkType(n)&&(!!n.isInSet(a)||!a.some(c=>c.type.excludes(n)))}const{ranges:o}=s;return o.some(({$from:a,$to:l})=>{let c=a.depth===0?t.doc.inlineContent&&t.doc.type.allowsMarkType(n):!1;return t.doc.nodesBetween(a.pos,l.pos,(u,h,p)=>{if(c)return!1;if(u.isInline){const f=!p||p.type.allowsMarkType(n),g=!!n.isInSet(u.marks)||!u.marks.some(m=>m.type.excludes(n));c=f&&g}return!c}),c})}var p9=(t,e={})=>({tr:n,state:r,dispatch:s})=>{const{selection:i}=n,{empty:o,ranges:a}=i,l=as(t,r.schema);if(s)if(o){const c=gO(r,l);n.addStoredMark(l.create({...c,...e}))}else a.forEach(c=>{const u=c.$from.pos,h=c.$to.pos;r.doc.nodesBetween(u,h,(p,f)=>{const g=Math.max(f,u),m=Math.min(f+p.nodeSize,h);p.marks.find(v=>v.type===l)?p.marks.forEach(v=>{l===v.type&&n.addMark(g,m,l.create({...v.attrs,...e}))}):n.addMark(g,m,l.create(e))})});return f9(r,n,l)},m9=(t,e)=>({tr:n})=>(n.setMeta(t,e),!0),g9=(t,e={})=>({state:n,dispatch:r,chain:s})=>{const i=st(t,n.schema);let o;return n.selection.$anchor.sameParent(n.selection.$head)&&(o=n.selection.$anchor.parent.attrs),i.isTextblock?s().command(({commands:a})=>Ak(i,{...o,...e})(n)?!0:a.clearNodes()).command(({state:a})=>Ak(i,{...o,...e})(a,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},y9=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,s=zi(t,0,r.content.size),i=X.create(r,s);e.setSelection(i)}return!0},v9=(t,e)=>({tr:n,state:r,dispatch:s})=>{const{selection:i}=r;let o,a;return typeof e=="number"?(o=e,a=e):e&&"from"in e&&"to"in e?(o=e.from,a=e.to):(o=i.from,a=i.to),s&&n.doc.nodesBetween(o,a,(l,c)=>{l.isText||n.setNodeMarkup(c,void 0,{...l.attrs,dir:t})}),!0},b9=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,{from:s,to:i}=typeof t=="number"?{from:t,to:t}:t,o=ee.atStart(r).from,a=ee.atEnd(r).to,l=zi(s,o,a),c=zi(i,o,a),u=ee.create(r,l,c);e.setSelection(u)}return!0},x9=t=>({state:e,dispatch:n})=>{const r=st(t,e.schema);return dV(r)(e,n)};function pS(t,e){const n=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();if(n){const r=n.filter(s=>e==null?void 0:e.includes(s.type.name));t.tr.ensureMarks(r)}}var w9=({keepMarks:t=!0}={})=>({tr:e,state:n,dispatch:r,editor:s})=>{const{selection:i,doc:o}=e,{$from:a,$to:l}=i,c=s.extensionManager.attributes,u=Kd(c,a.node().type.name,a.node().attrs);if(i instanceof X&&i.node.isBlock)return!a.parentOffset||!ga(o,a.pos)?!1:(r&&(t&&pS(n,s.extensionManager.splittableMarks),e.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;const h=l.parentOffset===l.parent.content.size,p=a.depth===0?void 0:pO(a.node(-1).contentMatchAt(a.indexAfter(-1)));let f=h&&p?[{type:p,attrs:u}]:void 0,g=ga(e.doc,e.mapping.map(a.pos),1,f);if(!f&&!g&&ga(e.doc,e.mapping.map(a.pos),1,p?[{type:p}]:void 0)&&(g=!0,f=p?[{type:p,attrs:u}]:void 0),r){if(g&&(i instanceof ee&&e.deleteSelection(),e.split(e.mapping.map(a.pos),1,f),p&&!h&&!a.parentOffset&&a.parent.type!==p)){const m=e.mapping.map(a.before()),y=e.doc.resolve(m);a.node(-1).canReplaceWith(y.index(),y.index()+1,p)&&e.setNodeMarkup(e.mapping.map(a.before()),p)}t&&pS(n,s.extensionManager.splittableMarks),e.scrollIntoView()}return g},k9=(t,e={})=>({tr:n,state:r,dispatch:s,editor:i})=>{var o;const a=st(t,r.schema),{$from:l,$to:c}=r.selection,u=r.selection.node;if(u&&u.isBlock||l.depth<2||!l.sameParent(c))return!1;const h=l.node(-1);if(h.type!==a)return!1;const p=i.extensionManager.attributes;if(l.parent.content.size===0&&l.node(-1).childCount===l.indexAfter(-1)){if
505(l.depth===2||l.node(-3).type!==a||l.index(-2)!==l.node(-2).childCount-1)return!1;if(s){let v=P.empty;const b=l.index(-1)?1:l.index(-2)?2:3;for(let T=l.depth-b;T>=l.depth-3;T-=1)v=P.from(l.node(T).copy(v));const x=l.indexAfter(-1)<l.node(-2).childCount?1:l.indexAfter(-2)<l.node(-3).childCount?2:3,k={...Kd(p,l.node().type.name,l.node().attrs),...e},S=((o=a.contentMatch.defaultType)==null?void 0:o.createAndFill(k))||void 0;v=v.append(P.from(a.createAndFill(null,S)||void 0));const C=l.before(l.depth-(b-1));n.replace(C,l.after(-x),new W(v,4-b,0));let E=-1;n.doc.nodesBetween(C,n.doc.content.size,(T,N)=>{if(E>-1)return!1;T.isTextblock&&T.content.size===0&&(E=N+1)}),E>-1&&n.setSelection(ee.near(n.doc.resolve(E))),n.scrollIntoView()}return!0}const f=c.pos===l.end()?h.contentMatchAt(0).defaultType:null,g={...Kd(p,h.type.name,h.attrs),...e},m={...Kd(p,l.node().type.name,l.node().attrs),...e};n.delete(l.pos,c.pos);const y=f?[{type:a,attrs:g},{type:f,attrs:m}]:[{type:a,attrs:g}];if(!ga(n.doc,l.pos,2))return!1;if(s){const{selection:v,storedMarks:b}=r,{splittableMarks:x}=i.extensionManager,k=b||v.$to.parentOffset&&v.$from.marks();if(n.split(l.pos,2,y).scrollIntoView(),!k||!s)return!0;const S=k.filter(C=>x.includes(C.type.name));n.ensureMarks(S)}return!0};function mS(t){return!t||t==="1"?null:t}function NO(t,e){return mS(t)===mS(e)}var eg=(t,e)=>{const n=_p(o=>o.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;const s=t.doc.nodeAt(r);return!(n.node.type===(s==null?void 0:s.type)&&gi(t.doc,n.pos))||!NO(n.node.attrs.type,s==null?void 0:s.attrs.type)||t.join(n.pos),!0},tg=(t,e)=>{const n=_p(o=>o.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;const s=t.doc.nodeAt(r);return!(n.node.type===(s==null?void 0:s.type)&&gi(t.doc,r))||!NO(n.node.attrs.type,s==null?void 0:s.attrs.type)||t.join(r),!0};function S9(t){const e=t.doc,n=e.firstChild;if(!n)return null;const r=e.resolve(1),s=e.resolve(n.nodeSize-1);return ee.between(r,s)}var C9=(t,e,n,r={})=>({editor:s,tr:i,state:o,dispatch:a,chain:l,commands:c,can:u})=>{const{extensions:h,splittableMarks:p}=s.extensionManager,f=st(t,o.schema),g=st(e,o.schema),{selection:m,storedMarks:y}=o,{$from:v,$to:b}=m,x=v.blockRange(b),k=y||m.$to.parentOffset&&m.$from.marks();if(!x)return!1;const S=_p(H=>Zm(H.type.name,h))(m),C=m.from===0&&m.to===o.doc.content.size,E=o.doc.content.content,T=E.length===1?E[0]:null,N=C&&T&&Zm(T.type.name,h)?{node:T,pos:0,depth:0}:null,_=S??N,z=!!S&&x.depth>=1&&x.depth-S.depth<=1,I=!!N;if((z||I)&&_){if(_.node.type===f)return C&&I?l().command(({tr:H,dispatch:M})=>{const U=S9(H);return U?(H.setSelection(U),M&&M(H),!0):!1}).liftListItem(g).run():c.liftListItem(g);if(Zm(_.node.type.name,h)&&f.validContent(_.node.content))return l().command(()=>(i.setNodeMarkup(_.pos,f),!0)).command(()=>eg(i,f)).command(()=>tg(i,f)).run()}return!n||!k||!a?l().command(()=>u().wrapInList(f,r)?!0:c.clearNodes()).wrapInList(f,r).command(()=>eg(i,f)).command(()=>tg(i,f)).run():l().command(()=>{const H=u().wrapInList(f,r),M=k.filter(U=>p.includes(U.type.name));return i.ensureMarks(M),H?!0:c.clearNodes()}).wrapInList(f,r).command(()=>eg(i,f)).command(()=>tg(i,f)).run()},E9=(t,e={},n={})=>({state:r,commands:s})=>{const{extendEmptyMarkRange:i=!1}=n,o=as(t,r.schema);return cv(r,o,e)?s.unsetMark(o,{extendEmptyMarkRange:i}):s.setMark(o,e)},T9=(t,e,n={})=>({state:r,commands:s})=>{const i=st(t,r.schema),o=st(e,r.schema),a=ai(r,i,n);let l;return r.selection.$anchor.sameParent(r.selection.$head)&&(l=r.selection.$anchor.parent.attrs),a?s.setNode(o,l):s.setNode(i,{...l,...n})},N9=(t,e={})=>({state:n,commands:r})=>{const s=st(t,n.schema);return ai(n,s,e)?r.lift(s):r.wrapIn(s,e)},A9=()=>({state:t,dispatch:e})=>{const n=t.plugins;for(let r=0;r<n.length;r+=1){const s=n[r];let i;if(s.spec.isInputRules&&(i=s.getState(t))){if(e){const o=t.tr,a=i.transform;for(let l=a.steps.length-1;l>=0;l-=1)o.step(a.steps[l].invert(a.docs[l]));if(i.text){const l=o.doc.resolve(i.from).marks();o.replaceWith(i.from,i.to,t.schema.text(i.text,l))}else o.delete(i.from,i.to)}return!0}}return!1},_9=(t={})=>({tr:e,dispatch:n,editor:r})=>{const{ignoreClearable:s=!1}=t,{selection:i}=e,{empty:o,ranges:a}=i;if(o)return!0;const{nonClearableMarks:l}=r.extensionManager;if(n){const c=Object.values(r.schema.marks).filter(u=>s||!l.includes(u.name));a.forEach(u=>
vendor: 18,543 bytes, lines 505-523
505{for(const h of c)e.removeMark(u.$from.pos,u.$to.pos,h)})}return!0},j9=(t,e={})=>({tr:n,state:r,dispatch:s})=>{var i;const{extendEmptyMarkRange:o=!1}=e,{selection:a}=n,l=as(t,r.schema),{$from:c,empty:u,ranges:h}=a;if(!s)return!0;if(u&&o){let{from:p,to:f}=a;const g=(i=c.marks().find(y=>y.type===l))==null?void 0:i.attrs,m=yb(c,l,g);m&&(p=m.from,f=m.to),n.removeMark(p,f,l)}else h.forEach(p=>{n.removeMark(p.$from.pos,p.$to.pos,l)});return n.removeStoredMark(l),!0},O9=t=>({tr:e,state:n,dispatch:r})=>{const{selection:s}=n;let i,o;return typeof t=="number"?(i=t,o=t):t&&"from"in t&&"to"in t?(i=t.from,o=t.to):(i=s.from,o=s.to),r&&e.doc.nodesBetween(i,o,(a,l)=>{if(a.isText)return;const c={...a.attrs};delete c.dir,e.setNodeMarkup(l,void 0,c)}),!0},R9=(t,e={})=>({tr:n,state:r,dispatch:s})=>{let i=null,o=null;const a=Ap(typeof t=="string"?t:t.name,r.schema);if(!a)return!1;a==="node"&&(i=st(t,r.schema)),a==="mark"&&(o=as(t,r.schema));let l=!1;return n.selection.ranges.forEach(c=>{const u=c.$from.pos,h=c.$to.pos;let p,f,g,m;n.selection.empty?r.doc.nodesBetween(u,h,(y,v)=>{i&&i===y.type&&(l=!0,g=Math.max(v,u),m=Math.min(v+y.nodeSize,h),p=v,f=y)}):r.doc.nodesBetween(u,h,(y,v)=>{v<u&&i&&i===y.type&&(l=!0,g=Math.max(v,u),m=Math.min(v+y.nodeSize,h),p=v,f=y),v>=u&&v<=h&&(i&&i===y.type&&(l=!0,s&&n.setNodeMarkup(v,void 0,{...y.attrs,...e})),o&&y.marks.length&&y.marks.forEach(b=>{if(o===b.type&&(l=!0,s)){const x=Math.max(v,u),k=Math.min(v+y.nodeSize,h);n.addMark(x,k,o.create({...b.attrs,...e}))}}))}),f&&(p!==void 0&&s&&n.setNodeMarkup(p,void 0,{...f.attrs,...e}),o&&f.marks.length&&f.marks.forEach(y=>{o===y.type&&s&&n.addMark(g,m,o.create({...y.attrs,...e}))}))}),l},M9=(t,e={})=>({state:n,dispatch:r})=>{const s=st(t,n.schema);return sV(s,e)(n,r)},P9=(t,e={})=>({state:n,dispatch:r})=>{const s=st(t,n.schema);return iV(s,e)(n,r)},I9=class{constructor(){this.callbacks={}}on(t,e){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e),this}emit(t,...e){const n=this.callbacks[t];return n&&n.forEach(r=>r.apply(this,e)),this}off(t,e){const n=this.callbacks[t];return n&&(e?this.callbacks[t]=n.filter(r=>r!==e):delete this.callbacks[t]),this}once(t,e){const n=(...r)=>{this.off(t,n),e.apply(this,r)};return this.on(t,n)}removeAllListeners(){this.callbacks={}}};function L9(t,e){const{selection:n}=t,{$from:r}=n;if(n instanceof X){const i=r.index();return r.parent.canReplaceWith(i,i+1,e)}let s=r.depth;for(;s>=0;){const i=r.index(s);if(r.node(s).contentMatchAt(i).matchType(e))return!0;s-=1}return!1}function D9(t,e,n){const r=document.querySelector("style[data-tiptap-style]");if(r!==null)return r;const s=document.createElement("style");return e&&s.setAttribute("nonce",e),s.setAttribute("data-tiptap-style",""),s.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(s),s}function $9(t){return typeof t=="number"}function z9(t){return Object.prototype.toString.call(t).slice(8,-1)}function hd(t){return z9(t)!=="Object"?!1:t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype}var B9={};mb(B9,{createAtomBlockMarkdownSpec:()=>F9,createBlockMarkdownSpec:()=>W9,createInlineMarkdownSpec:()=>V9,parseAttributes:()=>kb,parseIndentedBlocks:()=>uv,renderNestedMarkdownContent:()=>Cb,serializeAttributes:()=>Sb});function kb(t){if(!(t!=null&&t.trim()))return{};const e={},n=[],r=t.replace(/["']([^"']*)["']/g,c=>(n.push(c),`__QUOTED_${n.length-1}__`)),s=r.match(/(?:^|\s)\.([\w-]+)/g);if(s){const c=s.map(u=>u.trim().slice(1));e.class=c.join(" ")}const i=r.match(/(?:^|\s)#([\w-]+)/);i&&(e.id=i[1]);const o=/([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g;Array.from(r.matchAll(o)).forEach(([,c,u])=>{var h;const p=parseInt(((h=u.match(/__QUOTED_(\d+)__/))==null?void 0:h[1])||"0",10),f=n[p];f&&(e[c]=f.slice(1,-1))});const l=r.replace(/(?:^|\s)\.([\w-]+)/g,"").replace(/(?:^|\s)#([\w-]+)/g,"").replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g,"").trim();return l&&l.split(/\s+/).filter(Boolean).forEach(u=>{u.match(/^[a-zA-Z][\w-]*$/)&&(e[u]=!0)}),e}function Sb(t){if(!t||Object.keys(t).length===0)return"";const e=[];return t.class&&String(t.class).split(/\s+/).filter(Boolean).forEach(r=>e.push(`.${r}`)),t.id&&e.push(`#${t.id}`),Object.entries(t).forEach(([n,r])=>{n==="class"||n==="id"||(r===!0?e.push(n):r!==!1&&r!=null&&e.push(`${n}="${String(r)}"`))}),e.join(" ")}function F9(t){const{nodeName:e,name:n,parseAttributes:r=kb,serializeAttributes:s=Sb,defaultAttributes:i={},requiredAttributes:o=[],allowedAttributes:a}=t,l=n||e,c=u=>{if(!a)return u;const h={};return a.forEach(p=>{p in u&&(h[p]=u[p])}),h};return{parseMarkdown:(u,h)=>{const p={...i,...u.attributes};return h.createNode(e,p,[])},markdownTokenizer:{name:e,level:"block",start(u){var h;const p=new RegExp(`^:::${l}(?:\\s|$)`,"m"),f=(h=u.match(p))==null?void 0:h.index;return f!==void 0?f:-1},tokenize(u,h,p){const f=new RegExp(`^:::${l}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`),g=u.match(f);if(!g)return;const m=g[1]||"",y=r(m);if(!o.find(b=>!(b in y)))return{type:e,raw:g[0],attributes:y}}},renderMarkdown:u=>{const h=c(u.attrs||{}),p=s(h),f=p?` {${p}}`:"";return`:::${l}${f} :::`}}}function W9(t){const{nodeName:e,name:n,getContent:r,parseAttributes:s=kb,serializeAttributes:i=Sb,defaultAttributes:o={},content:a="block",allowedAttributes:l}=t,c=n||e,u=h=>{if(!l)return h;const p={};return l.forEach(f=>{f in h&&(p[f]=h[f])}),p};return{parseMarkdown:(h,p)=>{let f;if(r){const m=r(h);f=typeof m=="string"?[{type:"text",text:m}]:m}else a==="block"?f=p.parseChildren(h.tokens||[]):f=p.parseInline(h.tokens||[]);const g={...o,...h.attributes};return p.createNode(e,g,f)},markdownTokenizer:{name:e,level:"block",start(h){var p;const f=new RegExp(`^:::${c}`,"m"),g=(p=h.match(f))==null?void 0:p.index;return g!==void 0?g:-1},tokenize(h,p,f){var g;const m=new RegExp(`^:::${c}(?:\\s+\\{([^}]*)\\})?\\s*\\n`),y=h.match(m);if(!y)return;const[v,b=""]=y,x=s(b);let k=1;const S=v.length;let C="";const E=/^:::([\w-]*)(\s.*)?/gm,T=h.slice(S);for(E.lastIndex=0;;){const N=E.exec(T);if(N===null)break;const _=N.index,z=N[1];if(!((g=N[2])!=null&&g.endsWith(":::"))){if(z)k+=1;else if(k-=1,k===0){const I=T.slice(0,_);C=I.trim();const H=h.slice(0,S+_+N[0].length);let M=[];if(C)if(a==="block")for(M=f.blockTokens(I),M.forEach(U=>{U.text&&(!U.tokens||U.tokens.length===0)&&(U.tokens=f.inlineTokens(U.text))});M.length>0;){const U=M[M.length-1];if(U.type==="paragraph"&&(!U.text||U.text.trim()===""))M.pop();else break}else M=f.inlineTokens(C);return{type:e,raw:H,attributes:x,content:C,tokens:M}}}}}},renderMarkdown:(h,p)=>{const f=u(h.attrs||{}),g=i(f),m=g?` {${g}}`:"",y=p.renderChildren(h.content||[],` 506 507`);return`:::${c}${m} 508 509${y} 510 511:::`}}}function H9(t){if(!t.trim())return{};const e={},n=/(\w+)=(?:"([^"]*)"|'([^']*)')/g;let r=n.exec(t);for(;r!==null;){const[,s,i,o]=r;e[s]=i||o,r=n.exec(t)}return e}function U9(t){return Object.entries(t).filter(([,e])=>e!=null).map(([e,n])=>`${e}="${n}"`).join(" ")}function V9(t){const{nodeName:e,name:n,getContent:r,parseAttributes:s=H9,serializeAttributes:i=U9,defaultAttributes:o={},selfClosing:a=!1,allowedAttributes:l}=t,c=n||e,u=p=>{if(!l)return p;const f={};return l.forEach(g=>{const m=typeof g=="string"?g:g.name,y=typeof g=="string"?void 0:g.skipIfDefault;if(m in p){const v=p[m];if(y!==void 0&&v===y)return;f[m]=v}}),f},h=c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return{parseMarkdown:(p,f)=>{const g={...o,...p.attributes};if(a)return f.createNode(e,g);const m=r?r(p):p.content||"";return m?f.createNode(e,g,[f.createTextNode(m)]):f.createNode(e,g,[])},markdownTokenizer:{name:e,level:"inline",start(p){const f=a?new RegExp(`\\[${h}\\s*[^\\]]*\\]`):new RegExp(`\\[${h}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${h}\\]`),g=p.match(f),m=g==null?void 0:g.index;return m!==void 0?m:-1},tokenize(p,f,g){const m=a?new RegExp(`^\\[${h}\\s*([^\\]]*)\\]`):new RegExp(`^\\[${h}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${h}\\]`),y=p.match(m);if(!y)return;let v="",b="";if(a){const[,k]=y;b=k}else{const[,k,S]=y;b=k,v=S||""}const x=s(b.trim());return{type:e,raw:y[0],content:v.trim(),attributes:x}}},renderMarkdown:p=>{let f="";r?f=r(p):p.content&&p.content.length>0&&(f=p.content.filter(v=>v.type==="text").map(v=>v.text).join(""));const g=u(p.attrs||{}),m=i(g),y=m?` ${m}`:"";return a?`[${c}${y}]`:`[${c}${y}]${f}[/${c}]`}}}function uv(t,e,n){var r,s,i,o;const a=t.split(` 512`),l=[];let c="",u=0;const h=e.baseIndentSize||2;for(;u<a.length;){const p=a[u],f=p.match(e.itemPattern);if(!f){if(l.length>0)break;if(p.trim()===""){u+=1,c=`${c}${p} 513`;continue}else return}const g=e.extractItemData(f),{indentLevel:m,mainContent:y}=g;c=`${c}${p} 514`;const v=[y];for(u+=1;u<a.length;){const S=a[u];if(S.trim()===""){const E=a.slice(u+1).findIndex(_=>_.trim()!=="");if(E===-1)break;if((((s=(r=a[u+1+E].match(/^(\s*)/))==null?void 0:r[1])==null?void 0:s.length)||0)>m){v.push(S),c=`${c}${S} 515`,u+=1;continue}else break}if((((o=(i=S.match(/^(\s*)/))==null?void 0:i[1])==null?void 0:o.length)||0)>m)v.push(S),c=`${c}${S} 516`,u+=1;else break}let b;const x=v.slice(1);if(x.length>0){const S=x.map(C=>C.slice(m+h)).join(` 517`);S.trim()&&(e.customNestedParser?b=e.customNestedParser(S):b=n.blockTokens(S))}const k=e.createToken(g,b);l.push(k)}if(l.length!==0)return{items:l,raw:c}}function Cb(t,e,n,r){if(!t||!Array.isArray(t.content))return"";const s=typeof n=="function"?n(r):n,[i,...o]=t.content,a=e.renderChildren([i]);let l=`${s}${a}`;return o&&o.length>0&&o.forEach((c,u)=>{var h,p;const f=(p=(h=e.renderChild)==null?void 0:h.call(e,c,u+1))!=null?p:e.renderChildren([c]);if(f!=null){const g=f.split(` 518`).map(m=>m?e.indent(m):e.indent("")).join(` 519`);l+=c.type==="paragraph"?` 520 521${g}`:` 522${g}`}}),l}function AO(t,e){const n={...t};return hd(t)&&hd(e)&&Object.keys(e).forEach(r=>{hd(e[r])&&hd(t[r])?n[r]=AO(t[r],e[r]):n[r]=e[r]}),n}function q9(t,e,n={}){const{state:r}=e,{doc:s,tr:i}=r,o=t;s.descendants((a,l)=>{const c=i.mapping.map(l),u=i.mapping.map(l)+a.nodeSize;let h=null;if(a.marks.forEach(f=>{if(f!==o)return!1;h=f}),!h)return;let p=!1;if(Object.keys(n).forEach(f=>{n[f]!==h.attrs[f]&&(p=!0)}),p){const f=t.type.create({...t.attrs,...n});i.removeMark(c,u,t.type),i.addMark(c,u,f)}}),i.docChanged&&e.view.dispatch(i)}var ku=class{constructor(t){var e;this.find=t.find,this.handler=t.handler,this.undoable=(e=t.undoable)!=null?e:!0}},G9=(t,e)=>{if(gb(e))return e.exec(t);const n=e(t);if(!n)return null;const r=[n.text];return r.index=n.index,r.input=t,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r};function fd(t){var e;const{editor:n,from:r,to:s,text:i,rules:o,plugin:a}=t,{view:l}=n;if(l.composing)return!1;const c=l.state.doc.resolve(r);if(c.parent.type.spec.code||(e=c.nodeBefore||c.nodeAfter)!=null&&e.marks.find(p=>p.type.spec.code))return!1;let u=!1;const h=a9(c)+i;return o.forEach(p=>{if(u)return;const f=G9(h,p.find);if(!f)return;const g=f[0].length-i.length;if(g>0){const C=c.parentOffset-g;if(C<0||c.parent.textBetween(C,c.parentOffset)!==f[0].slice(0,g))return}const m=l.state.tr,y=Tp({state:l.state,transaction:m}),v={from:r-(f[0].length-i.length),to:s},{commands:b,chain:x,can:k}=new Np({editor:n,state:y});p.handler({state:y,range:v,match:f,commands:b,chain:x,can:k})===null||!m.steps.length||(p.undoable&&m.setMeta(a,{transform:m,from:r,to:s,text:i}),l.dispatch(m),u=!0)}),u}function K9(t){const{editor:e,rules:n}=t,r=new Le({state:{init(){return null},apply(s,i,o){const a=s.getMeta(r);if(a)return a;const l=s.getMeta("applyInputRules");return!!l&&setTimeout(()=>{let{text:u}=l;typeof u=="string"?u=u:u=bb(P.from(u),o.schema);const{from:h}=l,p=h+u.length;fd({editor:e,from:h,to:p,text:u,rules:n,plugin:r})}),s.selectionSet||s.docChanged?null:i}},props:{handleTextInput(s,i,o,a){return fd({editor:e,from:i,to:o,text:a,rules:n,plugin:r})},handleDOMEvents:{compositionend:s=>(setTimeout(()=>{const{$cursor:i}=s.state.selection;i&&fd({editor:e,from:i.pos,to:i.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(s,i){if(i.key!=="Enter")return!1;const{$cursor:o}=s.state.selection;return o?fd({editor:e,from:o.pos,to:o.pos,text:` 523`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}var Eb=class{constructor(t={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...t},this.name=this.config.name}get options(){return{...ve(Y(this,"addOptions",{name:this.name}))}}get storage(){return{...ve(Y(this,"addStorage",{name:this.name,options:this.options}))}}configure(t={}){const e=this.extend({...this.config,addOptions:()=>AO(this.options,t)});return e.name=this.name,e.parent=this.parent,this.child=null,e}extend(t={}){const e=new this.constructor({...this.config,...t});return e.parent=this,this.child=e,e.name="name"in t?t.name:e.parent.name,e}},wo=class _O extends Eb{constructor(){super(...arguments),this.type="mark"}static create(e={}){const n=typeof e=="function"?e():e;return new _O(n)}static handleExit({editor:e,mark:n}){const{tr:r}=e.state,s=e.state.selection.$from;if(s.pos===s.end()){const o=s.marks();if(!!!o.find(c=>(c==null?void 0:c.type.name)===n.name))return!1;const l=o.find(c=>(c==null?void 0:c.type.name)===n.name);return l&&r.removeStoredMark(l),r.insertText(" ",s.pos),e.view.dispatch(r),!0}return!1}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}},jO=class{constructor(t){this.find=t.find,this.handler=t.handler}},Y9=(t,e,n)=>{if(gb(e))return[...t.matchAll(e)];const r=e(t,n);return r?r.map(s=>{const i=[s.text];return i.index=s.index,i.input=t,i.data=s.data,s.replaceWith&&(s.text.includes(s.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),i.push(s.replaceWith)),i}):[]};function J9(t){const{editor:e,state:n,from:r,to:s,rule:i,pasteEvent:o,dropEvent:a}=t,{commands:l,chain:c,can:u}=new Np({editor:e,state:n}),h=[];return n.doc.nodesBetween(r,s,(f,g)=>{var m,y,v,b,x;if((y=(m=f.type)==null?void 0:m.spec)!=null&&y.code||!(f.isText||f.isTextblock||f.isInline))return;const k=(x=(b=(v=f.content)==null?void 0:v.size)!=null?b:f.nodeSize)!=null?x:0,S=Math.max(r,g),C=Math.min(s,g+k);if(S>=C)return;const E=f.isText?f.text||"":f.textBetween(S-g,C-g,void 0,"");Y9(E,i.find,o).forEach(N=>{if(N.index===void 0)return;const _=S+N.index+1,z=_+N[0].length,I={from:n.tr.mapping.map(_),to:n.tr.mapping.map(z)},H=i.handler({state:n,range:I,match:N,commands:l,chain:c,can:u,pasteEvent:o,dropEvent:a});h.push(H)})}),h.every(f=>f!==null)}var pd=null,Q9=t=>{var e;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=n.clipboardData)==null||e.setData("text/html",t),n};function X9(t){const{editor:e,rules:n}=t;let r=null,s=!1,i=!1,o=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,a;try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}const l=({state:u,from:h,to:p,rule:f,pasteEvt:g})=>{const m=u.tr,y=Tp({state:u,transaction:m});if(!(!J9({editor:e,state:y,from:Math.max(h-1,0),to:p.b-1,rule:f,pasteEvent:g,dropEvent:a})||!m.steps.length)){try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}return o=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,m}};return n.map(u=>new Le({view(h){const p=g=>{var m;r=(m=h.dom.parentElement)!=null&&m.contains(g.target)?h.dom.parentElement:null,r&&(pd=e)},f=()=>{pd&&(pd=null)};return window.addEventListener("dragstart",p),window.addEventListener("dragend",f),{destroy(){window.removeEventListener("dragstart",p),window.removeEventListener("dragend",f)}}},props:{handleDOMEvents:{drop:(h,p)=>{if(i=r===h.dom.parentElement,a=p,!i){const f=pd;f!=null&&f.isEditable&&setTimeout(()=>{const g=f.state.selection;g&&f.commands.deleteRange({from:g.from,to:g.to})},10)}return!1},paste:(h,p)=>{var f;const g=(f=p.clipboardData)==null?void 0:f.getData("text/html");return o=p,s=!!(g!=null&&g.includes("data-pm-slice")),!1}}},appendTransaction:(h,p,f)=>{const g=h[0],m=g.getMeta("uiEvent")==="paste"&&!s,y=g.getMeta("uiEvent")==="drop"&&!i,v=g.getMeta("applyPasteRules"),b=!!v;if(!m&&!y&&!b)return;if(b){let{text:S}=v;typeof S=="string"?S=S:S=bb(P.from(S),f.schema);const{from:C}=v,E=C+S.length,T=Q9(S);return l({rule:u,state:f,from:C,to:{b:E},pasteEvt:T})}const x=p.doc.content.findDiffStart(f.doc.content),k=p.doc.content.findDiffEnd(f.doc.content);if(!(!$9(x)||!k||x===k.b))return l({rule:u,state:f,from:x,to:k,pasteEvt:o})}}))}var jp=class{constructor(t,e){this.splittableMarks=[],this.nonClearableMarks=[],this.editor=e,this.baseExtensions=t,this.extensions=xO(t),this.schema=e9(this.extensions,e),this.setupExtensions()}get commands(){return this.extensions.reduce((t,e)=>{const n={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:Cl(e.name,this.schema)},r=Y(e,"addCommands",n);return r?{...t,...r()}:t},{})}get plugins(){const{editor:t}=this;return sc([...this.extensions].reverse()).flatMap(r=>{const s={name:r.name,options:r.options,storage:this.editor.extensionStorage[r.name],editor:t,type:Cl(r.name,this.schema)},i=[],o=Y(r,"addKeyboardShortcuts",s);let a={};if(r.type==="mark"&&Y(r,"exitable",s)&&(a.ArrowRight=()=>wo.handleExit({editor:t,mark:r})),o){const p=Object.fromEntries(Object.entries(o()).map(([f,g])=>[f,()=>g({editor:t})]));a={...a,...p}}const l=t7(a);i.push(l);const c=Y(r,"addInputRules",s);if(fS(r,t.options.enableInputRules)&&c){const p=c();if(p&&p.length){const f=K9({editor:t,rules:p}),g=Array.isArray(f)?f:[f];i.push(...g)}}const u=Y(r,"addPasteRules",s);if(fS(r,t.options.enablePasteRules)&&u){const p=u();if(p&&p.length){const f=X9({editor:t,rules:p});i.push(...f)}}const h=Y(r,"addProseMirrorPlugins",s);if(h){const p=h();i.push(...p)}return i})}get attributes(){return bO(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:e}=Wa(this.extensions);return Object.fromEntries(e.filter(n=>!!Y(n,"addNodeView")).map(n=>{const r=this.attributes.filter(l=>l.type===n.name),s={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:st(n.name,this.schema)},i=Y(n,"addNodeView",s);if(!i)return[];const o=i();if(!o)return[];const a=(l,c,u,h,p)=>{const f=Ha(l,r);return o({node:l,view:c,getPos:u,decorations:h,innerDecorations:p,editor:t,extension:n,HTMLAttributes:f})};return[n.name,a]}))}dispatchTransaction(t){const{editor:e}=this;return sc([...this.extensions].reverse()).reduceRight((r,s)=>{const i={name:s.name,options:s.options,storage:this.editor.extensionStorage[s.name],editor:e,type:Cl(s.name,this.schema)},o=Y(s,"dispatchTransaction",i);return o?a=>
523{o.call(i,{transaction:a,next:r})}:r},t)}transformPastedHTML(t){const{editor:e}=this;return sc([...this.extensions]).reduce((r,s)=>{const i={name:s.name,options:s.options,storage:this.editor.extensionStorage[s.name],editor:e,type:Cl(s.name,this.schema)},o=Y(s,"transformPastedHTML",i);return o?(a,l)=>{const c=r(a,l);return o.call(i,c)}:r},t||(r=>r))}get markViews(){const{editor:t}=this,{markExtensions:e}=Wa(this.extensions);return Object.fromEntries(e.filter(n=>!!Y(n,"addMarkView")).map(n=>{const r=this.attributes.filter(a=>a.type===n.name),s={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:as(n.name,this.schema)},i=Y(n,"addMarkView",s);if(!i)return[];const o=(a,l,c)=>{const u=Ha(a,r);return i()({mark:a,view:l,inline:c,editor:t,extension:n,HTMLAttributes:u,updateAttributes:h=>{q9(a,t,h)}})};return[n.name,o]}))}destroy(){this.extensions.forEach(t=>{let e=t;for(;e.parent;){const n=e.parent;n.child===e&&(n.child=null),e=n}}),this.extensions=[],this.baseExtensions=[],this.schema=null,this.editor=null}setupExtensions(){const t=this.extensions;this.editor.extensionStorage=Object.fromEntries(t.map(e=>[e.name,e.storage])),t.forEach(e=>{var n,r;const s={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:Cl(e.name,this.schema)};e.type==="mark"&&(((n=ve(Y(e,"keepOnSplit",s)))==null||n)&&this.splittableMarks.push(e.name),(r=ve(Y(e,"clearable",s)))==null||r||this.nonClearableMarks.push(e.name));const i=Y(e,"onBeforeCreate",s),o=Y(e,"onCreate",s),a=Y(e,"onUpdate",s),l=Y(e,"onSelectionUpdate",s),c=Y(e,"onTransaction",s),u=Y(e,"onFocus",s),h=Y(e,"onBlur",s),p=Y(e,"onDestroy",s);i&&this.editor.on("beforeCreate",i),o&&this.editor.on("create",o),a&&this.editor.on("update",a),l&&this.editor.on("selectionUpdate",l),c&&this.editor.on("transaction",c),u&&this.editor.on("focus",u),h&&this.editor.on("blur",h),p&&this.editor.on("destroy",p)})}};jp.resolve=xO;jp.sort=sc;jp.flatten=vb;var Z9={};mb(Z9,{ClipboardTextSerializer:()=>RO,Commands:()=>MO,Delete:()=>PO,Drop:()=>IO,Editable:()=>LO,FocusEvents:()=>$O,Keymap:()=>zO,Paste:()=>BO,Tabindex:()=>FO,TextDirection:()=>WO,focusEventsPluginKey:()=>DO});var Ke=class OO extends Eb{constructor(){super(...arguments),this.type="extension"}static create(e={}){const n=typeof e=="function"?e():e;return new OO(n)}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}},RO=Ke.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new Le({key:new at("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:t}=this,{state:e,schema:n}=t,{doc:r,selection:s}=e,i=kO(n),{blockSeparator:o}=this.options,a={...o!==void 0?{blockSeparator:o}:{},textSerializers:i};return[...s.ranges].sort((c,u)=>c.$from.pos-u.$from.pos).map(({$from:c,$to:u})=>wO(r,{from:c.pos,to:u.pos},a)).join(o??` 524 525`)}}})]}}),MO=Ke.create({name:"commands",addCommands(){return{...cO}}}),PO=Ke.create({name:"delete",onUpdate({transaction:t,appendedTransactions:e}){var n,r,s;const i=()=>{var o,a,l,c;if((c=(l=(a=(o=this.editor.options.coreExtensionOptions)==null?void 0:o.delete)==null?void 0:a.filterTransaction)==null?void 0:l.call(a,t))!=null?c:t.getMeta("y-sync$"))return;const u=yO(t.before,[t,...e]);xb(u).forEach(f=>{u.mapping.mapResult(f.oldRange.from).deletedAfter&&u.mapping.mapResult(f.oldRange.to).deletedBefore&&u.before.nodesBetween(f.oldRange.from,f.oldRange.to,(g,m)=>{const y=m+g.nodeSize-2,v=f.oldRange.from<=m&&y<=f.oldRange.to;this.editor.emit("delete",{type:"node",node:g,from:m,to:y,newFrom:u.mapping.map(m),newTo:u.mapping.map(y),deletedRange:f.oldRange,newRange:f.newRange,partial:!v,editor:this.editor,transaction:t,combinedTransform:u})})});const p=u.mapping;u.steps.forEach((f,g)=>{var m,y;if(f instanceof Qn){const v=p.slice(g).map(f.from,-1),b=p.slice(g).map(f.to),x=p.invert().map(v,-1),k=p.invert().map(b),S=v>0?(m=u.doc.nodeAt(v-1))==null?void 0:m.marks.some(E=>E.eq(f.mark)):!1,C=(y=u.doc.nodeAt(b))==null?void 0:y.marks.some(E=>E.eq(f.mark));this.editor.emit("delete",{type:"mark",mark:f.mark,from:f.from,to:f.to,deletedRange:{from:x,to:k},newRange:{from:v,to:b},partial:!!(C||S),editor:this.editor,transaction:t,combinedTransform:u})}})};(s=(r=(n=this.editor.options.coreExtensionOptions)==null?void 0:n.delete)==null?void 0:r.async)==null||s?setTimeout(i,0):i()}}),IO=Ke.create({name:"drop",addProseMirrorPlugins(){return[new Le({key:new at("tiptapDrop"),props:{handleDrop:(t,e,n,r)=>
vendor: 20,224 bytes, lines 525-597
525{this.editor.emit("drop",{editor:this.editor,event:e,slice:n,moved:r})}}})]}}),LO=Ke.create({name:"editable",addProseMirrorPlugins(){return[new Le({key:new at("editable"),props:{editable:()=>this.editor.options.editable}})]}}),DO=new at("focusEvents"),$O=Ke.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:t}=this;return[new Le({key:DO,props:{handleDOMEvents:{focus:(e,n)=>{t.isFocused=!0;const r=t.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,n)=>{t.isFocused=!1;const r=t.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}}),zO=Ke.create({name:"keymap",addKeyboardShortcuts(){const t=()=>this.editor.commands.first(({commands:o})=>[()=>o.undoInputRule(),()=>o.command(({tr:a})=>{const{selection:l,doc:c}=a,{empty:u,$anchor:h}=l,{pos:p,parent:f}=h,g=h.parent.isTextblock&&p>0?a.doc.resolve(p-1):h,m=g.parent.type.spec.isolating,y=h.pos-h.parentOffset,v=m&&g.parent.childCount===1?y===h.pos:le.atStart(c).from===p;return!u||!f.type.isTextblock||f.textContent.length||!v||v&&h.parent.type.name==="paragraph"?!1:o.clearNodes()}),()=>o.deleteSelection(),()=>o.joinBackward(),()=>o.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:o})=>[()=>o.deleteSelection(),()=>o.deleteCurrentNode(),()=>o.joinForward(),()=>o.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:o})=>[()=>o.newlineInCode(),()=>o.createParagraphNear(),()=>o.liftEmptyBlock(),()=>o.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:t,"Mod-Backspace":t,"Shift-Backspace":t,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},s={...r},i={...r,"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return Qh()||mO()?i:s},addProseMirrorPlugins(){return[new Le({key:new at("clearDocument"),appendTransaction:(t,e,n)=>{if(t.some(m=>m.getMeta("composition")))return;const r=t.some(m=>m.docChanged)&&!e.doc.eq(n.doc),s=t.some(m=>m.getMeta("preventClearDocument"));if(!r||s)return;const{empty:i,from:o,to:a}=e.selection,l=le.atStart(e.doc).from,c=le.atEnd(e.doc).to;if(i||!(o===l&&a===c)||!wu(n.doc))return;const p=n.tr,f=Tp({state:n,transaction:p}),{commands:g}=new Np({editor:this.editor,state:f});if(g.clearNodes(),!!p.steps.length)return p}})]}}),BO=Ke.create({name:"paste",addProseMirrorPlugins(){return[new Le({key:new at("tiptapPaste"),props:{handlePaste:(t,e,n)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:n})}}})]}}),FO=Ke.create({name:"tabindex",addOptions(){return{value:void 0}},addProseMirrorPlugins(){return[new Le({key:new at("tabindex"),props:{attributes:()=>{var t;return!this.editor.isEditable&&this.options.value===void 0?{}:{tabindex:(t=this.options.value)!=null?t:"0"}}}})]}}),WO=Ke.create({name:"textDirection",addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];const{nodeExtensions:t}=Wa(this.extensions);return[{types:t.filter(e=>e.name!=="text").map(e=>e.name),attributes:{dir:{default:this.options.direction,parseHTML:e=>{const n=e.getAttribute("dir");return n&&(n==="ltr"||n==="rtl"||n==="auto")?n:this.options.direction},renderHTML:e=>e.dir?{dir:e.dir}:{}}}}]},addProseMirrorPlugins(){return[new Le({key:new at("textDirection"),props:{attributes:()=>{const t=this.options.direction;return t?{dir:t}:{}}}})]}}),eG=class $l{constructor(e,n,r=!1,s=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=e,this.editor=n,this.currentNode=s}get name(){return this.node.type.name}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var e;return(e=this.actualDepth)!=null?e:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let n=this.from,r=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You canât set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}n=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:n,to:r},e)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;const e=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(e);return new $l(n,this.editor)}get before(){let e=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.from-3)),new $l(e,this.editor)}get after(){let e=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.to+3)),new $l(e,this.editor)}get children(){const e=[];return this.node.content.forEach((n,r)=>{const s=n.isBlock&&!n.isTextblock,i=n.isAtom&&!n.isText,o=n.isInline,a=this.pos+r+(i?0:1);if(a<0||a>this.resolvedPos.doc.nodeSize-2)return;const l=this.resolvedPos.doc.resolve(a);if(!s&&!o&&l.depth<=this.depth)return;const c=new $l(l,this.editor,s,s||o?n:null);s&&(c.actualDepth=this.depth+1),e.push(c)}),e}get firstChild(){return this.children[0]||null}get lastChild(){const e=this.children;return e[e.length-1]||null}closest(e,n={}){let r=null,s=this.parent;for(;s&&!r;){if(s.node.type.name===e)if(Object.keys(n).length>0){const i=s.node.attrs,o=Object.keys(n);for(let a=0;a<o.length;a+=1){const l=o[a];if(i[l]!==n[l])break}}else r=s;s=s.parent}return r}querySelector(e,n={}){return this.querySelectorAll(e,n,!0)[0]||null}querySelectorAll(e,n={},r=!1){let s=[];if(!this.children||this.children.length===0)return s;const i=Object.keys(n);return this.children.forEach(o=>{r&&s.length>0||(o.node.type.name===e&&i.every(l=>n[l]===o.node.attrs[l])&&s.push(o),!(r&&s.length>0)&&(s=s.concat(o.querySelectorAll(e,n,r))))}),s}setAttribute(e){const{tr:n}=this.editor.state;n.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(n)}},tG=`.ProseMirror { 526 position: relative; 527} 528 529.ProseMirror { 530 word-wrap: break-word; 531 white-space: pre-wrap; 532 white-space: break-spaces; 533 -webkit-font-variant-ligatures: none; 534 font-variant-ligatures: none; 535 font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */ 536} 537 538.ProseMirror [contenteditable="false"] { 539 white-space: normal; 540} 541 542.ProseMirror [contenteditable="false"] [contenteditable="true"] { 543 white-space: pre-wrap; 544} 545 546.ProseMirror pre { 547 white-space: pre-wrap; 548} 549 550img.ProseMirror-separator { 551 display: inline !important; 552 border: none !important; 553 margin: 0 !important; 554 width: 0 !important; 555 height: 0 !important; 556} 557 558.ProseMirror-gapcursor { 559 display: none; 560 pointer-events: none; 561 position: absolute; 562 margin: 0; 563} 564 565.ProseMirror-gapcursor:after { 566 content: ""; 567 display: block; 568 position: absolute; 569 top: -2px; 570 width: 20px; 571 border-top: 1px solid black; 572 animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite; 573} 574 575@keyframes ProseMirror-cursor-blink { 576 to { 577 visibility: hidden; 578 } 579} 580 581.ProseMirror-hideselection *::selection { 582 background: transparent; 583} 584 585.ProseMirror-hideselection *::-moz-selection { 586 background: transparent; 587} 588 589.ProseMirror-hideselection * { 590 caret-color: transparent; 591} 592 593.ProseMirror-focused .ProseMirror-gapcursor { 594 display: block; 595}`,nG=class extends I9{constructor(t={}){super(),this.css=null,this.className="tiptap",this.editorView=null,this.isFocused=!1,this.destroyed=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.options={element:typeof document<"u"?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:n})=>{throw n},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null,enableExtensionDispatchTransaction:!0},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:d9,createMappablePosition:h9},this.setOptions(t),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("mount",this.options.onMount),this.on("unmount",this.options.onUnmount),this.on("contentError",this.options.onContentError),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:n,slice:r,moved:s})=>this.options.onDrop(n,r,s)),this.on("paste",({event:n,slice:r})=>this.options.onPaste(n,r)),this.on("delete",this.options.onDelete);const e=this.createDoc();if(!this.editorState){const n=av(e,this.options.autofocus);this.editorState=Li.create({doc:e,schema:this.schema,selection:n||void 0})}this.options.element&&this.mount(this.options.element)}mount(t){if(typeof document>"u")throw new Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");this.createView(t),this.emit("mount",{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout(()=>{this.isDestroyed||(this.options.autofocus!==!1&&this.options.autofocus!==null&&this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){const t=this.editorView.dom;t!=null&&t.editor&&delete t.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{typeof this.css.remove=="function"?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch(t){console.warn("Failed to remove CSS element:",t)}this.css=null,this.emit("unmount",{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&typeof document<"u"&&(this.css=D9(tG,this.options.injectNonce))}setOptions(t={}){this.options={...this.options,...t},!(!this.editorView||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t,e=!0){this.setOptions({editable:t}),e&&this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:t=>{this.editorState=t},dispatch:t=>{this.dispatchTransaction(t)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(t,e)=>{if(this.editorView)return this.editorView[e];if(e==="state")return this.editorState;if(e in t)return Reflect.get(t,e);throw new Error(`[tiptap error]: The editor view is not available. Cannot access view['${e}']. The editor may not be mounted yet.`)}})}get state(){return this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(t,e){const n=vO(e)?e(t,[...this.state.plugins]):[...this.state.plugins,t],r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}unregisterPlugin(t){if(this.isDestroyed)return;const e=this.state.plugins;let n=e;if([].concat(t).forEach(s=>{const i=typeof s=="string"?`${s}$`:s.key;n=n.filter(o=>!o.key.startsWith(i))}),e.length===n.length)return;const r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}createExtensionManager(){var t,e,n,r;const i=[...this.options.enableCoreExtensions?[LO,RO.configure({blockSeparator:(e=(t=this.options.coreExtensionOptions)==null?void 0:t.clipboardTextSerializer)==null?void 0:e.blockSeparator}),MO,$O,zO,FO.configure({value:(r=(n=this.options.coreExtensionOptions)==null?void 0:n.tabindex)==null?void 0:r.value}),IO,BO,PO,WO.configure({direction:this.options.textDirection})].filter(o=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[o.name]!==!1:!0):[],...this.options.extensions].filter(o=>["extension","node","mark"].includes(o==null?void 0:o.type));this.extensionManager=new jp(i,this)}createCommandManager(){this.commandManager=new Np({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let t;try{t=lv(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(e){if(!(e instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(e.message))throw e;const n=lv(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1});return this.editorState=Li.create({doc:n,schema:this.schema,selection:av(n,this.options.autofocus)||void 0}),this.emit("contentError",{editor:this,error:e,disableCollaboration:()=>{"collaboration"in this.storage&&typeof this.storage.collaboration=="object"&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(r=>r.name!=="collaboration"),this.createExtensionManager()}}),this.editorState.doc}return t}createView(t){const{editorProps:e,enableExtensionDispatchTransaction:n}=this.options,r=e.dispatchTransaction||this.dispatchTransaction.bind(this),s=n?this.extensionManager.dispatchTransaction(r):r,i=e.transformPastedHTML,o=this.extensionManager.transformPastedHTML(i);this.editorView=new aO(t,{...e,attributes:{role:"textbox",...e==null?void 0:e.attributes},dispatchTransaction:s,transformPastedHTML:o,state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});const a=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(a),this.prependClass(),this.injectCSS();const l=this.view.dom;l.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`${this.className} ${this.view.dom.className}`}captureTransaction(t){this.isCapturingTransaction=!0,t(),this.isCapturingTransaction=!1;const e=this.capturedTransaction;return this.capturedTransaction=null,e}dispatchTransaction(t){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=t;return}t.steps.forEach(c=>{var u;return(u=this.capturedTransaction)==null?void 0:u.step(c)});return}const{state:e,transactions:n}=this.state.applyTransaction(t),r=!this.state.selection.eq(e.selection),s=n.includes(t),i=this.state;if(this.emit("beforeTransaction",{editor:this,transaction:t,nextState:e}),!s)return;this.view.updateState(e),this.emit("transaction",{editor:this,transaction:t,appendedTransactions:n.slice(1)}),r&&this.emit("selectionUpdate",{editor:this,transaction:t});const o=n.findLast(c=>c.getMeta("focus")||c.getMeta("blur")),a=o==null?void 0:o.getMeta("focus"),l=o==null?void 0:o.getMeta("blur");a&&this.emit("focus",{editor:this,event:a.event,transaction:o}),l&&this.emit("blur",{editor:this,event:l.event,transaction:o}),!(t.getMeta("preventUpdate")||!n.some(c=>c.docChanged)||i.doc.eq(e.doc))&&this.emit("update",{editor:this,transaction:t,appendedTransactions:n.slice(1)})}getAttributes(t){return SO(this.state,t)}isActive(t,e){const n=typeof t=="string"?t:null,r=typeof t=="string"?e:t;return l9(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return bb(this.state.doc.content,this.schema)}getText(t){const{blockSeparator:e=` 596 597`,textSerializers:n={}}=t||{};return n9(this.state.doc,{blockSeparator:e,textSerializers:{...kO(this.schema),...n}})}get isEmpty(){return wu(this.state.doc)}destroy(){this.destroyed||(this.destroyed=!0,this.emit("destroy"),this.unmount(),this.removeAllListeners(),this.extensionManager.destroy(),this.extensionManager=null,this.schema=null,this.commandManager=null,this.extensionStorage={})}get isDestroyed(){var t,e;return(e=(t=this.editorView)==null?void 0:t.isDestroyed)!=null?e:!0}$node(t,e){var n;return((n=this.$doc)==null?void 0:n.querySelector(t,e))||null}$nodes(t,e){var n;return((n=this.$doc)==null?void 0:n.querySelectorAll(t,e))||null}$pos(t){const e=this.state.doc.resolve(t),n=t>0&&e.nodeAfter&&!e.nodeAfter.isText&&e.nodeAfter.isAtom?e.nodeAfter:null;return new eG(e,this,!1,n)}get $doc(){return this.$pos(0)}};function go(t){return new ku({find:t.find,handler:({state:e,range:n,match:r})=>{const s=ve(t.getAttributes,void 0,r);if(s===!1||s===null)return null;const{tr:i}=e,o=r[r.length-1],a=r[0];if(o){const l=a.search(/\S/),c=n.from+a.indexOf(o),u=c+o.length;if(wb(n.from,n.to,e.doc).filter(f=>f.mark.type.excluded.find(m=>m===t.type&&m!==f.mark.type)).filter(f=>f.to>c).length)return null;u<n.to&&i.delete(u,n.to),c>n.from&&i.delete(n.from+l,c);const p=n.from+l+o.length;i.addMark(n.from+l,p,t.type.create(s||{})),i.removeStoredMark(t.type)}},undoable:t.undoable})}function HO(t){return new ku({find:t.find,handler:({state:e,range:n,match:r})=>{const s=ve(t.getAttributes,void 0,r)||{},{tr:i}=e,o=n.from;let a=n.to;const l=t.type.create(s);if(r[1]){const c=r[0].lastIndexOf(r[1]);let u=o+c;u>a?u=a:a=u+r[1].length;const h=r[0][r[0].length-1];i.insertText(h,o+r[0].length-1),i.replaceWith(u,a,l)}else if(r[0]){const c=t.type.isInline?o:o-1;i.insert(c,t.type.create(s)).delete(i.mapping.map(o),i.mapping.map(a))}i.scrollIntoView()},undoable:t.undoable})}function dv(t){return new ku({find:t.find,handler:({state:e,range:n,match:r})=>{const s=e.doc.resolve(n.from),i=ve(t.getAttributes,void 0,r)||{};if(!s.node(-1).canReplaceWith(s.index(-1),s.indexAfter(-1),t.type))return null;e.tr.delete(n.from,n.to).setBlockType(n.from,n.from,t.type,i)},undoable:t.undoable})}function Ua(t){return new ku({find:t.find,handler:({state:e,range:n,match:r,chain:s})=>{const i=ve(t.getAttributes,void 0,r)||{},o=e.tr.delete(n.from,n.to),l=o.doc.resolve(n.from).blockRange(),c=l&&nb(l,t.type,i);if(!c)return null;if(o.wrap(l,c),t.keepMarks&&t.editor){const{selection:h,storedMarks:p}=e,{splittableMarks:f}=t.editor.extensionManager,g=p||h.$to.parentOffset&&h.$from.marks();if(g){const m=g.filter(y=>f.includes(y.type.name));o.ensureMarks(m)}}if(t.keepAttributes){const h=t.type.name==="bulletList"||t.type.name==="orderedList"?"listItem":"taskList";s().updateAttributes(h,i).run()}const u=o.doc.resolve(n.from-1).nodeBefore;u&&u.type===t.type&&gi(o.doc,n.from-1)&&(!t.joinPredicate||t.joinPredicate(r,u))&&o.join(n.from-1)},undoable:t.undoable})}var rG=t=>"touches"in t,sG=class{constructor(t){this.directions=["bottom-left","bottom-right","top-left","top-right"],this.minSize={height:8,width:8},this.preserveAspectRatio=!1,this.classNames={container:"",wrapper:"",handle:"",resizing:""},this.initialWidth=0,this.initialHeight=0,this.aspectRatio=1,this.isResizing=!1,this.activeHandle=null,this.startX=0,this.startY=0,this.startWidth=0,this.startHeight=0,this.isShiftKeyPressed=!1,this.lastEditableState=void 0,this.handleMap=new Map,this.handleMouseMove=a=>{if(!this.isResizing||!this.activeHandle)return;const l=a.clientX-this.startX,c=a.clientY-this.startY;this.handleResize(l,c)},this.handleTouchMove=a=>{if(!this.isResizing||!this.activeHandle)return;const l=a.touches[0];if(!l)return;const c=l.clientX-this.startX,u=l.clientY-this.startY;this.handleResize(c,u)},this.handleMouseUp=()=>
597{if(!this.isResizing)return;const a=this.element.offsetWidth,l=this.element.offsetHeight;this.onCommit(a,l),this.isResizing=!1,this.activeHandle=null,this.container.dataset.resizeState="false",this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)},this.handleKeyDown=a=>{a.key==="Shift"&&(this.isShiftKeyPressed=!0)},this.handleKeyUp=a=>{a.key==="Shift"&&(this.isShiftKeyPressed=!1)};var e,n,r,s,i,o;this.node=t.node,this.editor=t.editor,this.element=t.element,this.element.draggable=!1,this.contentElement=t.contentElement,this.getPos=t.getPos,this.onResize=t.onResize,this.onCommit=t.onCommit,this.onUpdate=t.onUpdate,(e=t.options)!=null&&e.min&&(this.minSize={...this.minSize,...t.options.min}),(n=t.options)!=null&&n.max&&(this.maxSize=t.options.max),(r=t==null?void 0:t.options)!=null&&r.directions&&(this.directions=t.options.directions),(s=t.options)!=null&&s.preserveAspectRatio&&(this.preserveAspectRatio=t.options.preserveAspectRatio),(i=t.options)!=null&&i.className&&(this.classNames={container:t.options.className.container||"",wrapper:t.options.className.wrapper||"",handle:t.options.className.handle||"",resizing:t.options.className.resizing||""}),(o=t.options)!=null&&o.createCustomHandle&&(this.createCustomHandle=t.options.createCustomHandle),this.wrapper=this.createWrapper(),this.container=this.createContainer(),this.applyInitialSize(),this.attachHandles(),this.editor.on("update",this.handleEditorUpdate.bind(this))}get dom(){return this.container}get contentDOM(){var t;return(t=this.contentElement)!=null?t:null}handleEditorUpdate(){const t=this.editor.isEditable;t!==this.lastEditableState&&(this.lastEditableState=t,t?t&&this.handleMap.size===0&&this.attachHandles():this.removeHandles())}update(t,e,n){return t.type!==this.node.type?!1:(this.node=t,this.onUpdate?this.onUpdate(t,e,n):!0)}destroy(){this.isResizing&&(this.container.dataset.resizeState="false",this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp),this.isResizing=!1,this.activeHandle=null),this.editor.off("update",this.handleEditorUpdate.bind(this)),this.container.remove()}createContainer(){const t=document.createElement("div");return t.dataset.resizeContainer="",t.dataset.node=this.node.type.name,t.style.display=this.node.type.isInline?"inline-flex":"flex",this.classNames.container&&(t.className=this.classNames.container),t.appendChild(this.wrapper),t}createWrapper(){const t=document.createElement("div");return t.style.position="relative",t.style.display="block",t.dataset.resizeWrapper="",this.classNames.wrapper&&(t.className=this.classNames.wrapper),t.appendChild(this.element),t}createHandle(t){const e=document.createElement("div");return e.dataset.resizeHandle=t,e.style.position="absolute",this.classNames.handle&&(e.className=this.classNames.handle),e}positionHandle(t,e){const n=e.includes("top"),r=e.includes("bottom"),s=e.includes("left"),i=e.includes("right");n&&(t.style.top="0"),r&&(t.style.bottom="0"),s&&(t.style.left="0"),i&&(t.style.right="0"),(e==="top"||e==="bottom")&&(t.style.left="0",t.style.right="0"),(e==="left"||e==="right")&&(t.style.top="0",t.style.bottom="0")}attachHandles(){this.directions.forEach(t=>{let e;this.createCustomHandle?e=this.createCustomHandle(t):e=this.createHandle(t),e instanceof HTMLElement||(console.warn(`[ResizableNodeView] createCustomHandle("${t}") did not return an HTMLElement. Falling back to default handle.`),e=this.createHandle(t)),this.createCustomHandle||this.positionHandle(e,t),e.addEventListener("mousedown",n=>this.handleResizeStart(n,t)),e.addEventListener("touchstart",n=>this.handleResizeStart(n,t)),this.handleMap.set(t,e),this.wrapper.appendChild(e)})}
597removeHandles(){this.handleMap.forEach(t=>t.remove()),this.handleMap.clear()}applyInitialSize(){const t=this.node.attrs.width,e=this.node.attrs.height;t?(this.element.style.width=`${t}px`,this.initialWidth=t):this.initialWidth=this.element.offsetWidth,e?(this.element.style.height=`${e}px`,this.initialHeight=e):this.initialHeight=this.element.offsetHeight,this.initialWidth>0&&this.initialHeight>0&&(this.aspectRatio=this.initialWidth/this.initialHeight)}handleResizeStart(t,e){t.preventDefault(),t.stopPropagation(),this.isResizing=!0,this.activeHandle=e,rG(t)?(this.startX=t.touches[0].clientX,this.startY=t.touches[0].clientY):(this.startX=t.clientX,this.startY=t.clientY),this.startWidth=this.element.offsetWidth,this.startHeight=this.element.offsetHeight,this.startWidth>0&&this.startHeight>0&&(this.aspectRatio=this.startWidth/this.startHeight),this.getPos(),this.container.dataset.resizeState="true",this.classNames.resizing&&this.container.classList.add(this.classNames.resizing),document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("touchmove",this.handleTouchMove),document.addEventListener("mouseup",this.handleMouseUp),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}handleResize(t,e){if(!this.activeHandle)return;const n=this.preserveAspectRatio||this.isShiftKeyPressed,{width:r,height:s}=this.calculateNewDimensions(this.activeHandle,t,e),i=this.applyConstraints(r,s,n);this.element.style.width=`${i.width}px`,this.element.style.height=`${i.height}px`,this.onResize&&this.onResize(i.width,i.height)}calculateNewDimensions(t,e,n){let r=this.startWidth,s=this.startHeight;const i=t.includes("right"),o=t.includes("left"),a=t.includes("bottom"),l=t.includes("top");return i?r=this.startWidth+e:o&&(r=this.startWidth-e),a?s=this.startHeight+n:l&&(s=this.startHeight-n),(t==="right"||t==="left")&&(r=this.startWidth+(i?e:-e)),(t==="top"||t==="bottom")&&(s=this.startHeight+(a?n:-n)),this.preserveAspectRatio||this.isShiftKeyPressed?this.applyAspectRatio(r,s,t):{width:r,height:s}}applyConstraints(t,e,n){var r,s,i,o;if(!n){let c=Math.max(this.minSize.width,t),u=Math.max(this.minSize.height,e);return(r=this.maxSize)!=null&&r.width&&(c=Math.min(this.maxSize.width,c)),(s=this.maxSize)!=null&&s.height&&(u=Math.min(this.maxSize.height,u)),{width:c,height:u}}let a=t,l=e;return a<this.minSize.width&&(a=this.minSize.width,l=a/this.aspectRatio),l<this.minSize.height&&(l=this.minSize.height,a=l*this.aspectRatio),(i=this.maxSize)!=null&&i.width&&a>this.maxSize.width&&(a=this.maxSize.width,l=a/this.aspectRatio),(o=this.maxSize)!=null&&o.height&&l>this.maxSize.height&&(l=this.maxSize.height,a=l*this.aspectRatio),{width:a,height:l}}applyAspectRatio(t,e,n){const r=n==="left"||n==="right",s=n==="top"||n==="bottom";return r?{width:t,height:t/this.aspectRatio}:s?{width:e*this.aspectRatio,height:e}:{width:t,height:t/this.aspectRatio}}},tn=class UO extends Eb{constructor(){super(...arguments),this.type="node"}static create(e={}){const n=typeof e=="function"?e():e;return new UO(n)}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}};function li(t){return new jO({find:t.find,handler:({state:e,range:n,match:r,pasteEvent:s})=>{const i=ve(t.getAttributes,void 0,r,s);if(i===!1||i===null)return null;const{tr:o}=e,a=r[r.length-1],l=r[0];let c=n.to;if(a){const u=l.search(/\S/),h=n.from+l.indexOf(a),p=h+a.length;if(wb(n.from,n.to,e.doc).filter(m=>m.mark.type.excluded.find(v=>v===t.type&&v!==m.mark.type)).filter(m=>m.to>h).length)return null;p<n.to&&o.delete(p,n.to),h>n.from&&o.delete(n.from+u,h),c=n.from+u+a.length,o.addMark(n.from+u,c,t.type.create(i||{})),r.index!==void 0&&r.input!==void 0&&r.index+r[0].length>=r.input.length||o.removeStoredMark(t.type)}}})}const{getOwnPropertyNames:iG,getOwnPropertySymbols:oG}=Object,{hasOwnProperty:aG}=Object.prototype;function ng(t,e){return function(r,s,i){return t(r,s,i)&&e(r,s,i)}}function md(t){return function(n,r,s){if(!n||!r||typeof n!="object"||typeof r!="object")return t(n,r,s);const{cache:i}
vendor: 5,924 bytes, line 597
597=s,o=i.get(n),a=i.get(r);if(o&&a)return o===r&&a===n;i.set(n,r),i.set(r,n);const l=t(n,r,s);return i.delete(n),i.delete(r),l}}function lG(t){return t!=null?t[Symbol.toStringTag]:void 0}function gS(t){return iG(t).concat(oG(t))}const cG=Object.hasOwn||((t,e)=>aG.call(t,e));function ko(t,e){return t===e||!t&&!e&&t!==t&&e!==e}const uG="__v",dG="__o",hG="_owner",{getOwnPropertyDescriptor:yS,keys:vS}=Object;function fG(t,e){return t.byteLength===e.byteLength&&Xh(new Uint8Array(t),new Uint8Array(e))}function pG(t,e,n){let r=t.length;if(e.length!==r)return!1;for(;r-- >0;)if(!n.equals(t[r],e[r],r,r,t,e,n))return!1;return!0}function mG(t,e){return t.byteLength===e.byteLength&&Xh(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}function gG(t,e){return ko(t.getTime(),e.getTime())}function yG(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function vG(t,e){return t===e}function bS(t,e,n){const r=t.size;if(r!==e.size)return!1;if(!r)return!0;const s=new Array(r),i=t.entries();let o,a,l=0;for(;(o=i.next())&&!o.done;){const c=e.entries();let u=!1,h=0;for(;(a=c.next())&&!a.done;){if(s[h]){h++;continue}const p=o.value,f=a.value;if(n.equals(p[0],f[0],l,h,t,e,n)&&n.equals(p[1],f[1],p[0],f[0],t,e,n)){u=s[h]=!0;break}h++}if(!u)return!1;l++}return!0}const bG=ko;function xG(t,e,n){const r=vS(t);let s=r.length;if(vS(e).length!==s)return!1;for(;s-- >0;)if(!VO(t,e,n,r[s]))return!1;return!0}function El(t,e,n){const r=gS(t);let s=r.length;if(gS(e).length!==s)return!1;let i,o,a;for(;s-- >0;)if(i=r[s],!VO(t,e,n,i)||(o=yS(t,i),a=yS(e,i),(o||a)&&(!o||!a||o.configurable!==a.configurable||o.enumerable!==a.enumerable||o.writable!==a.writable)))return!1;return!0}function wG(t,e){return ko(t.valueOf(),e.valueOf())}function kG(t,e){return t.source===e.source&&t.flags===e.flags}function xS(t,e,n){const r=t.size;if(r!==e.size)return!1;if(!r)return!0;const s=new Array(r),i=t.values();let o,a;for(;(o=i.next())&&!o.done;){const l=e.values();let c=!1,u=0;for(;(a=l.next())&&!a.done;){if(!s[u]&&n.equals(o.value,a.value,o.value,a.value,t,e,n)){c=s[u]=!0;break}u++}if(!c)return!1}return!0}function Xh(t,e){let n=t.byteLength;if(e.byteLength!==n||t.byteOffset!==e.byteOffset)return!1;for(;n-- >0;)if(t[n]!==e[n])return!1;return!0}function SG(t,e){return t.hostname===e.hostname&&t.pathname===e.pathname&&t.protocol===e.protocol&&t.port===e.port&&t.hash===e.hash&&t.username===e.username&&t.password===e.password}function VO(t,e,n,r){return(r===hG||r===dG||r===uG)&&(t.$$typeof||e.$$typeof)?!0:cG(e,r)&&n.equals(t[r],e[r],r,r,t,e,n)}const CG="[object ArrayBuffer]",EG="[object Arguments]",TG="[object Boolean]",NG="[object DataView]",AG="[object Date]",_G="[object Error]",jG="[object Map]",OG="[object Number]",RG="[object Object]",MG="[object RegExp]",PG="[object Set]",IG="[object String]",LG={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},DG="[object URL]",$G=Object.prototype.toString;function zG({areArrayBuffersEqual:t,areArraysEqual:e,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:s,areFunctionsEqual:i,areMapsEqual:o,areNumbersEqual:a,areObjectsEqual:l,arePrimitiveWrappersEqual:c,areRegExpsEqual:u,areSetsEqual:h,areTypedArraysEqual:p,areUrlsEqual:f,unknownTagComparators:g}){return function(y,v,b){if(y===v)return!0;if(y==null||v==null)return!1;const x=typeof y;if(x!==typeof v)return!1;if(x!=="object")return x==="number"?a(y,v,b):x==="function"?i(y,v,b):!1;const k=y.constructor;if(k!==v.constructor)return!1;if(k===Object)return l(y,v,b);if(Array.isArray(y))return e(y,v,b);if(k===Date)return r(y,v,b);if(k===RegExp)return u(y,v,b);if(k===Map)return o(y,v,b);if(k===Set)return h(y,v,b);const S=$G.call(y);if(S===AG)return r(y,v,b);if(S===MG)return u(y,v,b);if(S===jG)return o(y,v,b);if(S===PG)return h(y,v,b);if(S===RG)return typeof y.then!="function"&&typeof v.then!="function"&&l(y,v,b);if(S===DG)return f(y,v,b);if(S===_G)return s(y,v,b);if(S===EG)return l(y,v,b);if(LG[S])return p(y,v,b);if(S===CG)return t(y,v,b);if(S===NG)return n(y,v,b);if(S===TG||S===OG||S===IG)return c(y,v,b);if(g){let C=g[S];if(!C){const E=lG(y);E&&(C=g[E])}if(C)return C(y,v,b)}return!1}}function BG({circular:t,createCustomConfig:e,strict:n}){let r={areArrayBuffersEqual:fG,areArraysEqual:n?El:pG,areDataViewsEqual:mG,areDatesEqual:gG,areErrorsEqual:yG,areFunctionsEqual:vG,areMapsEqual:n?ng(bS,El):bS,areNumbersEqual:bG,areObjectsEqual:n?El:xG,arePrimitiveWrappersEqual:wG,areRegExpsEqual:kG,areSetsEqual:n?ng(xS,El):xS,areTypedArraysEqual:n?ng(Xh,El):Xh,areUrlsEqual:SG,unknownTagComparators:void 0};if(e&&(r=Object.assign({},r,e(r))),t){const s=md(r.areArraysEqual),i=md(r.areMapsEqual),o=md(r.areObjectsEqual),a=md(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:s,areMapsEqual:i,areObjectsEqual:o,areSetsEqual:a})}return r}function FG(t){return function(e,n,r,s,i,o,a){return t(e,n,a)}}function WG({circular:t,comparator:e,createState:n,equals:r,strict:s}){if(n)return function(a,l){const{cache:c=t?new WeakMap:void 0,meta:u}=n();return e(a,l,{cache:c,equals:r,meta:u,strict:s})};if(t)return function(a,l){return e(a,l,{cache:new WeakMap,equals:r,meta:void 0,strict:s})};const i={cache:void 0,equals:r,meta:void 0,strict:s};return function(a,l){return e(a,l,i)}}const HG=vi();vi({strict:!0});vi({circular:!0});vi({circular:!0,strict:!0});vi({createInternalComparator:()=>ko});vi({strict:!0,createInternalComparator:()=>ko});vi({circular:!0,createInternalComparator:()=>ko});vi({circular:!0,createInternalComparator:()=>ko,strict:!0});function vi(t={}){const{circular:e=!1,createInternalComparator:n,createState:r,strict:s=!1}=t,i=BG(t),o=zG(i),a=n?n(o):FG(o);
597return WG({circular:e,comparator:o,createState:r,equals:a,strict:s})}var qO={exports:{}},GO={};/** 598 * @license React 599 * use-sync-external-store-shim/with-selector.production.js 600 * 601 * Copyright (c) Meta Platforms, Inc. and affiliates. 602 * 603 * This source code is licensed under the MIT license found in the 604 * LICENSE file in the root directory of this source tree. 605 */var Op=w,UG=Z0;function VG(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var qG=typeof Object.is=="function"?Object.is:VG,GG=UG.useSyncExternalStore,KG=Op.useRef,YG=Op.useEffect,JG=Op.useMemo,QG=Op.useDebugValue;GO.useSyncExternalStoreWithSelector=function(t,e,n,r,s){var i=KG(null);if(i.current===null){var o={hasValue:!1,value:null};i.current=o}else o=i.current;i=JG(function(){function l(f){if(!c){if(c=!0,u=f,f=r(f),s!==void 0&&o.hasValue){var g=o.value;if(s(g,f))return h=g}return h=f}if(g=h,qG(u,f))return g;var m=r(f);return s!==void 0&&s(g,m)?(u=f,g):(u=f,h=m)}var c=!1,u,h,p=n===void 0?null:n;return[function(){return l(e())},p===null?void 0:function(){return l(p())}]},[e,n,r,s]);var a=GG(t,i[0],i[1]);return YG(function(){o.hasValue=!0,o.value=a},[a]),QG(a),a};qO.exports=GO;var XG=qO.exports,ZG=(...t)=>e=>{t.forEach(n=>{typeof n=="function"?n(e):n&&(n.current=e)})},eK=({contentComponent:t})=>{const e=Z0.useSyncExternalStore(t.subscribe,t.getSnapshot,t.getServerSnapshot);return d.jsx(d.Fragment,{children:Object.values(e)})};function tK(){const t=new Set;let e={},n=!1;const r=()=>{n||!t.size||(n=!0,queueMicrotask(()=>{n=!1,t.forEach(s=>s())}))};return{subscribe(s){return t.add(s),()=>{t.delete(s)}},getSnapshot(){return e},getServerSnapshot(){return e},setRenderer(s,i){e={...e,[s]:b0.createPortal(i.reactElement,i.element,s)},r()},removeRenderer(s){const i={...e};delete i[s],e=i,r()}}}var nK=class extends R.Component{constructor(t){super(t),this.editorContentRef=R.createRef()}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){var t;const e=this.props.editor;if(e&&!e.isDestroyed&&((t=e.view.dom)!=null&&t.parentNode)){if(e.contentComponent)return;const n=this.editorContentRef.current;n.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:n}),e.contentComponent=tK(),e.createNodeViews(),e.isEditorContentInitialized=!0,this.forceUpdate()}}componentWillUnmount(){var t;const e=this.props.editor;if(e){e.isEditorContentInitialized=!1,e.isDestroyed||e.view.setProps({nodeViews:{}}),e.contentComponent=null;try{if(!((t=e.view.dom)!=null&&t.parentNode))return;const n=document.createElement("div");n.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:n})}catch{}}}render(){const{editor:t,innerRef:e,...n}=this.props;return d.jsxs(d.Fragment,{children:[d.jsx("div",{ref:ZG(e,this.editorContentRef),...n}),(t==null?void 0:t.contentComponent)&&d.jsx(eK,{contentComponent:t.contentComponent})]})}},rK=w.forwardRef((t,e)=>{const n=R.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[t.editor]);return R.createElement(nK,{key:n,innerRef:e,...t})}),KO=R.memo(rK),sK=typeof window<"u"?w.useLayoutEffect:w.useEffect,iK=class{constructor(t){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=t,this.lastSnapshot={editor:t,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(t){return this.subscribers.add(t),()=>{this.subscribers.delete(t)}}watch(t){if(this.editor=t,this.editor){let e;const n=s=>{(s==null?void 0:s.transaction)!==void 0&&s.transaction===e||(e=s==null?void 0:s.transaction,this.transactionNumber+=1,this.subscribers.forEach(i=>i()))},r=this.editor;return r.on("transaction",n),r.on("update",n),()=>{r.off("transaction",n),r.off("update",n)}}}};function oK(t){var e;const[n]=w.useState(()=>new iK(t.editor)),r=XG.useSyncExternalStoreWithSelector(n.subscribe,n.getSnapshot,n.getServerSnapshot,t.selector,(e=t.equalityFn)!=null?e:HG);return sK(()=>n.watch(t.editor),[t.editor,n]),w.useDebugValue(r),r}var aK=!1,YO=typeof window>"u",lK=YO||!!(typeof window<"u"&&window.next),cK=class JO{constructor(e){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=e,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.get
605ServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(e){this.editor=e,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(n=>n())}getInitialEditor(){const e=this.options.current.immediatelyRender;let n=e??!0;return YO?(n&&aK&&console.warn("SSR detected. `immediatelyRender` has been set to false to avoid hydration mismatches"),n=!1):lK&&e===void 0&&(n=!1),n?this.createEditor():null}createEditor(){const e={...this.options.current,onBeforeCreate:(...r)=>{var s,i;return(i=(s=this.options.current).onBeforeCreate)==null?void 0:i.call(s,...r)},onBlur:(...r)=>{var s,i;return(i=(s=this.options.current).onBlur)==null?void 0:i.call(s,...r)},onCreate:(...r)=>{var s,i;return(i=(s=this.options.current).onCreate)==null?void 0:i.call(s,...r)},onDestroy:(...r)=>{var s,i;return(i=(s=this.options.current).onDestroy)==null?void 0:i.call(s,...r)},onFocus:(...r)=>{var s,i;return(i=(s=this.options.current).onFocus)==null?void 0:i.call(s,...r)},onSelectionUpdate:(...r)=>{var s,i;return(i=(s=this.options.current).onSelectionUpdate)==null?void 0:i.call(s,...r)},onTransaction:(...r)=>{var s,i;return(i=(s=this.options.current).onTransaction)==null?void 0:i.call(s,...r)},onUpdate:(...r)=>{var s,i;return(i=(s=this.options.current).onUpdate)==null?void 0:i.call(s,...r)},onContentError:(...r)=>{var s,i;return(i=(s=this.options.current).onContentError)==null?void 0:i.call(s,...r)},onDrop:(...r)=>{var s,i;return(i=(s=this.options.current).onDrop)==null?void 0:i.call(s,...r)},onPaste:(...r)=>{var s,i;return(i=(s=this.options.current).onPaste)==null?void 0:i.call(s,...r)},onDelete:(...r)=>{var s,i;return(i=(s=this.options.current).onDelete)==null?void 0:i.call(s,...r)},onMount:(...r)=>{var s,i;return(i=(s=this.options.current).onMount)==null?void 0:i.call(s,...r)},onUnmount:(...r)=>{var s,i;return(i=(s=this.options.current).onUnmount)==null?void 0:i.call(s,...r)}};return new nG(e)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(e){return this.subscriptions.add(e),()=>{this.subscriptions.delete(e)}}static compareOptions(e,n){return Object.keys(e).every(r=>["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(r)?!0:r==="extensions"&&e.extensions&&n.extensions?e.extensions.length!==n.extensions.length?!1:e.extensions.every((s,i)=>{var o;return s===((o=n.extensions)==null?void 0:o[i])}):e[r]===n[r])}onRender(e){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&e.length===0?JO.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(e),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(e){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=e;return}if(this.previousDeps.length===e.length&&this.previousDeps.every((r,s)=>r===e[s]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=e}scheduleDestroy(){const e=this.instanceId,n=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===e){n&&n.setOptions(this.options.current);return}n&&!n.isDestroyed&&(n.destroy(),this.instanceId===e&&this.setEditor(null))},1)}};function uK(t={},e=[]){const n=w.useRef(t);n.current=t;const[r]=w.useState(()=>new cK(n)),s=Z0.useSyncExternalStore(r.subscribe,r.getEditor,r.getServerSnapshot);return w.useDebugValue(s),w.useEffect(r.onRender(e)),oK({editor:s,selector:({transactionNumber:i})=>t.shouldRerenderOnTransaction===!1||t.shouldRerenderOnTransaction===void 0?null:t.immediatelyRender&&i===0?0:i+1}),s}var QO=w.createContext({editor:null});QO.Consumer;var dK=w.createContext({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}}),hK=()=>w.useContext(dK);R.forwardRef((t,e)=>{const{onDragStart:n}=hK(),r=t.as||"div";return d.jsx(r,{...t,ref:e,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...t.style}})});R.createContext({markViewContentRef:()=>{}});var Tb=w.createContext({get editor(){throw new Error("useTiptap must be used within a <Tiptap> provider")}});Tb.displayName="TiptapContext";var fK=()=>w.useContext(Tb);function XO({children:t,...e}){const n="editor"in e?e.editor:e.instance;if(!n)throw new Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");const r=w.useMemo(()=>({editor:n}),[n]),s=w.useMemo(()=>({editor:n}),[n]);return d.jsx(QO.Provider,{value:s,children:d.jsx(Tb.Provider,{value:r,children:t})})}XO.displayName="Tiptap";function ZO({...t}){const{editor:e}=fK();return d.jsx(KO,{editor:e,...t})}ZO.displayName="Tiptap.Content";Object.assign(XO,{Content:ZO});var Zh=(t,e)=>{if(t==="slot")return 0;if(t instanceof Function)return t(e);const{children:n,...r}=e??{};if(t==="svg")throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[t,r,n]},pK=(t,e)=>{var n;const{state:r,view:s}=t,{selection:i}=r;if(!i.empty)return!1;const{$from:o}=i;if(o.parentOffset!==0)return!1;const a=o.depth-1;if(a<0)return!1;const l=o.node(a),c=o.index(a);if(c===0)return!1;if(l.type===e)return t.commands.lift(e.name);const u=l.child(c-1);if(u.type!==e||!((n=u.lastChild)!=null&&n.isTextblock))return!1;const h=o.before(),f=h-1-1,{tr:g}=r;return g.delete(h,o.after()).insert(f,o.parent.content),g.setSelection(ee.create(g.doc,f)),s.dispatch(g.scrollIntoView()),!0},mK=/^\s*>\s$/,gK=tn.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return Zh("blockquote",{...Qe(this.options.HTMLAttributes,t),children:Zh("slot",{})})},parseMarkdown:(t,e)=>{var n;const r=(n=e.parseBlockChildren)!=null?n:e.parseChildren;return e.createNode("blockquote",void 0,r(t.tokens||[]))},renderMarkdown:(t,e)=>{if(!t.content)return"";const n=">",r=[];return t.content.forEach((s,i)=>{var o,a;const u=((a=(o=e.renderChild)==null?void 0:o.call(e,s,i))!=null?a:e.renderChildren([s])).split(` 606`).map(h=>h.trim()===""?n:`${n} ${h}`);r.push(u.join(` 607`))}),r.join(` 608${n} 609`)},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}}
vendor: 2,440 bytes, line 609
609,addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote(),Backspace:()=>pK(this.editor,this.type)}},addInputRules(){return[Ua({find:mK,type:this.type})]}}),yK=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,vK=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,bK=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,xK=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,wK=wo.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:t=>t.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:t=>t.type.name===this.name},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}]},renderHTML({HTMLAttributes:t}){return Zh("strong",{...Qe(this.options.HTMLAttributes,t),children:Zh("slot",{})})},markdownTokenName:"strong",parseMarkdown:(t,e)=>e.applyMark("bold",e.parseInline(t.tokens||[])),markdownOptions:{htmlReopen:{open:"<strong>",close:"</strong>"}},renderMarkdown:(t,e)=>`**${e.renderChildren(t)}**`,addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[go({find:yK,type:this.type}),go({find:bK,type:this.type})]},addPasteRules(){return[li({find:vK,type:this.type}),li({find:xK,type:this.type})]}}),kK=t=>{const e=/`([^`]+)`(?!`)$/.exec(t);return!e||e.index>0&&t[e.index-1]==="`"?null:{index:e.index,text:e[0],replaceWith:e[1]}},SK=t=>{const e=/`([^`]+)`(?!`)/g,n=[];let r;for(;(r=e.exec(t))!==null;)r.index>0&&t[r.index-1]==="`"||n.push({index:r.index,text:r[0],replaceWith:r[1]});return n},CK=wo.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:t}){return["code",Qe(this.options.HTMLAttributes,t),0]},markdownTokenName:"codespan",parseMarkdown:(t,e)=>e.applyMark("code",[{type:"text",text:t.text||""}]),renderMarkdown:(t,e)=>t.content?`\`${e.renderChildren(t.content)}\``:"",addCommands(){return{setCode:()=>({commands:t})=>t.setMark(this.name),toggleCode:()=>({commands:t})=>t.toggleMark(this.name),unsetCode:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}}
vendor: 7,261 bytes, lines 609-630
609,addInputRules(){return[go({find:kK,type:this.type})]},addPasteRules(){return[li({find:SK,type:this.type})]}}),rg=4,EK=/^```([a-z]+)?[\s\n]$/,TK=/^~~~([a-z]+)?[\s\n]$/,NK=tn.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,exitOnArrowUp:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:rg,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:t=>{var e;const{languageClassPrefix:n}=this.options;if(!n)return null;const i=[...((e=t.firstElementChild)==null?void 0:e.classList)||[]].filter(o=>o.startsWith(n)).map(o=>o.replace(n,""))[0];return i||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:t,HTMLAttributes:e}){return["pre",Qe(this.options.HTMLAttributes,e),["code",{class:t.attrs.language?this.options.languageClassPrefix+t.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(t,e)=>{var n,r;return((n=t.raw)==null?void 0:n.startsWith("```"))===!1&&((r=t.raw)==null?void 0:r.startsWith("~~~"))===!1&&t.codeBlockStyle!=="indented"?[]:e.createNode("codeBlock",{language:t.lang||null},t.text?[e.createTextNode(t.text)]:[])},renderMarkdown:(t,e)=>{var n;let r="";const s=((n=t.attrs)==null?void 0:n.language)||"";return t.content?r=[`\`\`\`${s}`,e.renderChildren(t.content),"```"].join(` 610`):r=`\`\`\`${s} 611 612\`\`\``,r},addCommands(){return{setCodeBlock:t=>({commands:e})=>e.setNode(this.name,t),toggleCodeBlock:t=>({commands:e})=>e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:t,$anchor:e}=this.editor.state.selection,n=e.pos===1;return!t||e.parent.type.name!==this.name?!1:n||!e.parent.textContent.length?this.editor.commands.clearNodes():!1},Tab:({editor:t})=>{var e;if(!this.options.enableTabIndentation)return!1;const n=(e=this.options.tabSize)!=null?e:rg,{state:r}=t,{selection:s}=r,{$from:i,empty:o}=s;if(i.parent.type!==this.type)return!1;const a=" ".repeat(n);return o?t.commands.insertContent(a):t.commands.command(({tr:l})=>{const{from:c,to:u}=s,f=r.doc.textBetween(c,u,` 613`,` 614`).split(` 615`).map(g=>a+g).join(` 616`);return l.replaceWith(c,u,r.schema.text(f)),!0})},"Shift-Tab":({editor:t})=>{var e;if(!this.options.enableTabIndentation)return!1;const n=(e=this.options.tabSize)!=null?e:rg,{state:r}=t,{selection:s}=r,{$from:i,empty:o}=s;return i.parent.type!==this.type?!1:o?t.commands.command(({tr:a})=>{var l;const{pos:c}=i,u=i.start(),h=i.end(),f=r.doc.textBetween(u,h,` 617`,` 618`).split(` 619`);let g=0,m=0;const y=c-u;for(let C=0;C<f.length;C+=1){if(m+f[C].length>=y){g=C;break}m+=f[C].length+1}const b=((l=f[g].match(/^ */))==null?void 0:l[0])||"",x=Math.min(b.length,n);if(x===0)return!0;let k=u;for(let C=0;C<g;C+=1)k+=f[C].length+1;return a.delete(k,k+x),c-k<=x&&a.setSelection(ee.create(a.doc,k)),!0}):t.commands.command(({tr:a})=>{const{from:l,to:c}=s,p=r.doc.textBetween(l,c,` 620`,` 621`).split(` 622`).map(f=>{var g;const m=((g=f.match(/^ */))==null?void 0:g[0])||"",y=Math.min(m.length,n);return f.slice(y)}).join(` 623`);return a.replaceWith(l,c,r.schema.text(p)),!0})},Enter:({editor:t})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:e}=t,{selection:n}=e,{$from:r,empty:s}=n;if(!s||r.parent.type!==this.type)return!1;const i=r.parentOffset===r.parent.nodeSize-2,o=r.parent.textContent.endsWith(` 624 625`);return!i||!o?!1:t.chain().command(({tr:a})=>(a.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowUp:({editor:t})=>{if(!this.options.exitOnArrowUp)return!1;const{state:e}=t,{selection:n}=e,{$from:r,empty:s}=n;if(!s||r.parent.type!==this.type||r.parentOffset!==0)return!1;const i=r.before();return i>0?!1:t.commands.insertDefaultBlock({pos:i})},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=t,{selection:n,doc:r}=e,{$from:s,empty:i}=n;if(!i||s.parent.type!==this.type||!(s.parentOffset===s.parent.nodeSize-2))return!1;const a=s.after();return a===void 0?!1:r.nodeAt(a)?t.commands.command(({tr:c})=>(c.setSelection(le.near(r.resolve(a))),!0)):t.commands.exitCode()}}},addInputRules(){return[dv({find:EK,type:this.type,getAttributes:t=>({language:t[1]})}),dv({find:TK,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new Le({key:new at("codeBlockVSCodeHandler"),props:{handlePaste:(t,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;const n=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),s=r?JSON.parse(r):void 0,i=s==null?void 0:s.mode;if(!n||!i)return!1;const{tr:o,schema:a}=t.state,l=a.text(n.replace(/\r\n?/g,` 626`));return o.replaceSelectionWith(this.type.create({language:i},l)),o.selection.$from.parent.type!==this.type&&o.setSelection(ee.near(o.doc.resolve(Math.max(0,o.selection.from-2)))),o.setMeta("paste",!0),t.dispatch(o),!0}}})]}}),AK=tn.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,` 627 628`):""}),_K=tn.create({name:"hardBreak",markdownTokenName:"br",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:t}){return["br",Qe(this.options.HTMLAttributes,t)]},renderText(){return` 629`},renderMarkdown:()=>` 630`,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:s,storedMarks:i}=n;if(s.$from.parent.type.spec.isolating)return!1;const{keepMarks:o}=this.options,{splittableMarks:a}=r.extensionManager,l=i||s.$to.parentOffset&&s.$from.marks();return e().insertContent({type:this.name}).command(({tr:c,dispatch:u})=>{if(u&&l&&o){const h=l.filter(p=>a.includes(p.type.name));c.ensureMarks(h)}return!0}).scrollIntoView().run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),jK=tn.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(t=>({tag:`h${t}`,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,Qe(this.options.HTMLAttributes,e),0]},parseMarkdown:(t,e)=>e.createNode("heading",{level:t.depth||1},e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>{var n;const r=(n=t.attrs)!=null&&n.level?parseInt(t.attrs.level,10):1,s="#".repeat(r);return t.content?`${s} ${e.renderChildren(t.content)}`:""},addCommands(){return{setHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.setNode(this.name,t):!1,toggleHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.toggleNode(this.name,"paragraph",t):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>dv({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}}
630)\\s$`),type:this.type,getAttributes:{level:t}}))}}),OK=tn.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{},nextNodeType:"paragraph"}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",Qe(this.options.HTMLAttributes,t)]},markdownTokenName:"hr",parseMarkdown:(t,e)=>e.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{if(!L9(e,e.schema.nodes[this.name]))return!1;const{selection:n}=e,{$to:r}=n,s=t();return CO(n)?s.insertContentAt(r.pos,{type:this.name}):s.insertContent({type:this.name}),s.command(({state:i,tr:o,dispatch:a})=>{if(a){const{$to:l}=o.selection,c=l.end();if(l.nodeAfter)l.nodeAfter.isTextblock?o.setSelection(ee.create(o.doc,l.pos+1)):l.nodeAfter.isBlock?o.setSelection(X.create(o.doc,l.pos)):o.setSelection(ee.create(o.doc,l.pos));else{const u=i.schema.nodes[this.options.nextNodeType]||l.parent.type.contentMatch.defaultType,h=u==null?void 0:u.create();h&&(o.insert(c,h),o.setSelection(ee.create(o.doc,c+1)))}o.scrollIntoView()}return!0}).run()}}},addInputRules(){return[HO({find:/^(?:---|â-|___\s|\*\*\*\s)$/,type:this.t
vendor: 1,046 bytes, line 630
630ype})]}}),RK=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,MK=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,PK=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,IK=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,LK=wo.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",Qe(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(t,e)=>e.applyMark("italic",e.parseInline(t.tokens||[])),markdownOptions:{htmlReopen:{open:"<em>",close:"</em>"}},renderMarkdown:(t,e)=>`*${e.renderChildren(t)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}}
630,addInputRules(){return[go({find:RK,type:this.type}),go({find:PK,type:this.type})]},addPasteRules(){return[li({find:MK,type:this.type}),li({find:IK,type:this.type})]}});const DK="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2odyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rck0msd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2oodside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yac
630hts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",$K="ελ1Ï 2бг1ел3деÑи4еÑ2каÑолик6ом3мкд2он1Ñква6онлайн5Ñг3ÑÑÑ2Ñ2ÑайÑ3Ñб3ÑкÑ3Òаз3Õ°Õ¡Õµ3×שר××5×§××3Ø§Ø¨ÙØ¸Ø¨Ù5را٠ÙÙ5ÙØ§Ø±Ø¯Ù4Ø¨ØØ±ÙÙ5جزائر5Ø³Ø¹ÙØ¯ÙØ©6عÙÙØ§Ù5٠غرب5٠ارات5ÛØ±Ø§Ù5بارت2زار4ÙØªÙ3ھارت5تÙÙØ³4Ø³ÙØ¯Ø§Ù3Ø±ÙØ©5Ø´Ø¨ÙØ©4عراÙ2ب2٠اÙ4ÙÙØ³Ø·ÙÙ6ÙØ·Ø±3ÙØ§Ø«ÙÙÙÙ6ÙÙ 3٠صر2ÙÙØ³Ùا5ÙØ±ÙتاÙÙØ§7ÙØ¹4Ù٠راÙ5پاکستاÙ7ÚØ§Ø±Øª4à¤à¥à¤®3नà¥à¤3à¤à¤¾à¤°à¤¤0मà¥3à¥à¤¤5सà¤à¤à¤ न5বাà¦à¦²à¦¾5à¦à¦¾à¦°à¦¤2ৰত4à¨à¨¾à¨°à¨¤4àªàª¾àª°àª¤4à¬à¬¾à¬°à¬¤4à®à®¨à¯à®¤à®¿à®¯à®¾6லà®à¯à®à¯6à®à®¿à®à¯à®à®ªà¯à®ªà¯à®°à¯11à°à°¾à°°à°¤à±5à²à²¾à²°à²¤4à´à´¾à´°à´¤à´5à¶½à¶à¶à·4à¸à¸à¸¡3à¹à¸à¸¢3ລາວ3áá2ã¿ããª3ã¢ãã¾ã³4ã¯ã©ã¦ã4ã°ã¼ã°ã«4ã³ã 2ã¹ãã¢3ã»ã¼ã«3ãã¡ãã·ã§ã³6ãã¤ã³ã4ä¸ç2ä¸ä¿¡1å½1å1æç½3äºé©¬é3ä¼ä¸2ä½å±±2ä¿¡æ¯2å¥åº·2å «å¦2å ¬å¸1ç2å°æ¹¾1ç£2åå1åº1æ 2åé0大é åº5å¨çº¿2大æ¿2天主æ3娱ä¹2å®¶é»2广ä¸2å¾®å2æ å2æç±ä½ 3ææº2æè2æ¿å¡1åº2æ°å å¡2é»2æ¶å°2æ¸ç±2æºæ2淡马é¡3游æ2æ¾³é2ç¹ç2ç§»å¨2ç»ç»æºæ4ç½å1åº1ç«1ç»2èé2è°·æ2è´ç©2é販2éå¢2é»è¨çç§4é£å©æµ¦3é£å2é¤å 2馿 ¼éæ3港2ë·ë·1ì»´2ì¼ì±2íêµ2",hv="numeric",fv="ascii",pv="alpha",ic="asciinumeric",zl="alphanumeric",mv="domain",eR="emoji",zK="scheme",BK="slashscheme",sg="whitespace";function FK(t,e){return t in e||(e[t]=[]),e[t]}function Bi(t,e,n){e[hv]&&(e[ic]=!0,e[zl]=!0),e[fv]&&(e[ic]=!0,e[pv]=!0),e[ic]&&(e[zl]=!0),e[pv]&&(e[zl]=!0),e[zl]&&(e[mv]=!0),e[eR]&&(e[mv]=!0);for(const r in e){const s=FK(r,n);s.indexOf(t)<0&&s.push(t)}}function WK(t,e){const n={};for(const r in e)e[r].indexOf(t)>=0&&(n[r]=!0);return n}function Yt(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}Yt.groups={};Yt.prototype={accepts(){return!!this.t},go(t){const e=this,n=e.j[t];if(n)return n;for(let r=0;r<e.jr.length;r++){const s=e.jr[r][0],i=e.jr[r][1];if(i&&s.test(t))return i}return e.jd},has(t,e=!1){return e?t in this.j:!!this.go(t)},ta(t,e,n,r){for(let s=0;s<t.length;s++)this.tt(t[s],e,n,r)},tr(t,e,n,r){r=r||Yt.groups;let s;return e&&e.j?s=e:(s=new Yt(e),n&&r&&Bi(e,n,r)),this.jr.push([t,s]),s},ts(t,e,n,r){let s=this;const i=t.length;if(!i)return s;for(let o=0;o<i-1;o++)s=s.tt(t[o]);return s.tt(t[i-1],e,n,r)},tt(t,e,n,r){r=r||Yt.groups;const s=this;if(e&&e.j)return s.j[t]=e,e;const i=e;let o,a=s.go(t);if(a?(o=new Yt,Object.assign(o.j,a.j),o.jr.push.apply(o.jr,a.jr),o.jd=a.jd,o.t=a.t):o=new Yt,i){if(r)if(o.t&&typeof o.t=="string"){const l=Object.assign(WK(o.t,r),n);Bi(i,l,r)}else n&&Bi(i,n,r);o.t=i}return s.j[t]=o,o}};const ce=(t,e,n,r,s)=>t.ta(e,n,r,s),We=(t,e,n,r,s)=>t.tr(e,n,r,s),wS=(t,e,n,r,s)=>t.ts(e,n,r,s),D=(t,e,n,r,s)=>t.tt(e,n,r,s),Dr="WORD",gv="UWORD",tR="ASCIINUMERICAL",nR="ALPHANUMERICAL",tu="LOCALHOST",yv="TLD",vv="UTLD",Yd="SCHEME",Ho="SLASH_SCHEME",Nb="NUM",bv="WS",Ab="NL",oc="OPENBRACE",ac="CLOSEBRACE",ef="OPENBRACKET",tf="CLOSEBRACKET",nf="OPENPAREN",rf="CLOSEPAREN",sf="OPENANGLEBRACKET",of="CLOSEANGLEBRACKET",af="FULLWIDTHLEFTPAREN",lf="FULLWIDTHRIGHTPAREN",cf="LEFTCORNERBRACKET",uf="RIGHTCORNERBRACKET",df="LEFTWHITECORNERBRACKET",hf="RIGHTWHITECORNERBRACKET",ff="FULLWIDTHLESSTHAN",pf="FULLWIDTHGREATERTHAN",mf="AMPERSAND",gf="APOSTROPHE",yf="ASTERISK",Ss="AT",vf="BACKSLASH",bf="BACKTICK",xf="CARET",Fi="COLON",_b="COMMA",wf="DOLLAR",cr="DOT",kf="EQUALS",jb="EXCLAMATION",bn="HYPHEN",lc="PERCENT",Sf="PIPE",Cf="PLUS",Ef="POUND",cc="QUERY",Ob="QUOTE",rR="FULLWIDTHMIDDLEDOT",Rb="SEMI",ur="SLASH",uc="TILDE",Tf="UNDERSCORE",sR="EMOJI",Nf="SYM";var iR=Object.freeze({__proto__:null,ALPHANUMERICAL:nR,AMPERSAND:mf,APOSTROPHE:gf,ASCIINUMERICAL:tR,ASTERISK:yf,AT:Ss,BACKSLASH:vf,BACKTICK:bf,CARET:xf,CLOSEANGLEBRACKET:of,CLOSEBRACE:ac,CLOSEBRACKET:tf,CLOSEPAREN:rf,COLON:Fi,COMMA:_b,DOLLAR:wf,DOT:cr,EMOJI:sR,EQUALS:kf,EXCLAMATION:jb,FULLWIDTHGREATERTHAN:pf,FULLWIDTHLEFTPAREN:af,FULLWIDTHLESSTHAN:ff,FULLWIDTHMIDDLEDOT:rR,FULLWIDTHRIGHTPAREN:lf,HYPHEN:bn,LEFTCORNERBRACKET:cf,LEFTWHITECORNERBRACKET:df,LOCALHOST:tu,NL:Ab,NUM:Nb,OPENANGLEBRACKET:sf,OPENBRACE:oc,OPENBRACKET:ef,OPENPAREN:nf,PERCENT:lc,PIPE:Sf,PLUS:Cf,POUND:Ef,QUERY:cc,QUOTE:Ob,RIGHTCORNERBRACKET:uf,RIGHTWHITECORNERBRACKET:hf,SCHEME:Yd,SEMI:Rb,SLASH:ur,SLASH_SCHEME:Ho,SYM:Nf,TILDE:uc,TLD:yv,UNDERSCORE:Tf,UTLD:vv,UWORD:gv,WORD:Dr,WS:bv});const Mr=/[a-z]/,Tl=new RegExp("\\p{L}","u"),ig=new RegExp("\\p{Emoji}","u"),Pr=/\d/,og=/\s/,kS="\r",ag=` 631`,HK="ï¸",UK="â",lg="";let gd=null,yd=null;function VK(t=[]){const e={};Yt.groups=e;const n=new Yt;gd==null&&(gd=SS(DK)),yd==null&&(yd=SS($K)),D(n,"'",gf),D(n,"{",oc),D(n,"}",ac),D(n,"[",ef),D(n,"]",tf),D(n,"(",nf),D(n,")",rf),D(n,"<",sf),D(n,">",of),D(n,"ï¼",af),D(n,"ï¼",lf),D(n,"ã",cf),D(n,"ã",uf),D(n,"ã",df),D(n,"ã",hf),D(n,"ï¼",ff),D(n,"ï¼",pf),D(n,"&",mf),D(n,"*",yf),D(n,"@",Ss),D(n,"`",bf),D(n,"^",xf),D(n,":",Fi),D(n,",",_b),D(n,"$",wf),D(n,".",cr),D(n,"=",kf),D(n,"!",jb),D(n,"-",bn),D(n,"%",lc),D(n,"|",Sf),D(n,"+",Cf),D(n,"#",Ef),D(n,"?",cc),D(n,'"',Ob),D(n,"/",ur),D(n,";",Rb),D(n,"~",uc),D(n,"_",Tf),D(n,"\\",vf),D(n,"ã»",rR);const r=We(n,Pr,Nb,{[hv]:!0});We(r,Pr,r);const s=We(r,Mr,tR,{[ic]:!0}),i=We(r,Tl,nR,{[zl]:!0}),o=We(n,Mr,Dr,{[fv]:!0});We(o,Pr,s),We(o,Mr,o),We(s,Pr,s),We(s,Mr,s);const a=We(n,Tl,gv,{[pv]:!0});We(a,Mr),We(a,Pr,i),We(a,Tl,a),We(i,Pr,i),We(i,Mr),We(i,Tl,i);const l=D(n,ag,Ab,{[sg]:!0}),c=D(n,kS,bv,{[sg]:!0}),u=We(n,og,bv,{[sg]:!0});D(n,lg,u),D(c,ag,l),D(c,lg,u),We(c,og,u),D(u,kS),D(u,ag),We(u,og,u),D(u,lg,u);const h=We(n,ig,sR,{[eR]:!0});D(h,"#"),We(h,ig,h),D(h,HK,h);const p=D(h,UK);D(p,"#"),We(p,ig,h);const f=[[Mr,o],[Pr,s]],g=[[Mr,null],[Tl,a],[Pr,i]];for(let m=0;m<gd.length;m++)gs(n,gd[m],yv,Dr,f);for(let m=0;m<yd.length;m++)gs(n,yd[m],vv,gv,g);Bi(yv,{tld:!0,ascii:!0},e),Bi(vv,{utld:!0,alpha:!0},e),gs(n,"file",Yd,Dr,f),gs(n,"mailto",Yd,Dr,f),gs(n,"http",Ho,Dr,f),gs(n,"https",Ho,Dr,f),gs(n,"ftp",Ho,Dr,f),gs(n,"ftps",Ho,Dr,f),Bi(Yd,{scheme:!0,ascii:!0},e),Bi(Ho,{slashscheme:!0,ascii:!0},e),t=t.sort((m,y)=>m[0]>y[0]?1:-1);for(let m=0;m<t.length;m++){const y=t[m][0],b=t[m][1]?{[zK]:!0}:{[BK]:!0};y.indexOf("-")>=0?b[mv]=!0:Mr.test(y)?Pr.test(y)?b[ic]=!0:b[fv]=!0:b[hv]=!0,wS(n,y,y,b)}return wS(n,"localhost",tu,{ascii:!0}),n.jd=new Yt(Nf),{start:n,tokens:Object.assign({groups:e},iR)}}function oR(t,e){const n=qK(e.replace(/[A-Z]/g,a=>a.toLowerCase())),r=n.length,s=[];let i=0,o=0;for(;o<r;){let a=t,l=null,c=0,u=null,h=-1,p=-1;for(;o<r&&(l=a.go(n[o]));)a=l,a.accepts()?(h=0,p=0,u=a):h>=0&&(h+=n[o].length,p++),c+=n[o].length,i+=n[o].length,o++;i-=h,o-=p,c-=h,s.push({t:u.t,v:e.slice(i-c,i),s:i-c,e:i})}return s}function qK(t){const e=[],n=t.length;let r=0;for(;r<n;){let s=t.charCodeAt(r),i,o=s<55296||s>56319||r+1===n||(i=t.charCodeAt(r+1))<56320||i>57343?t[r]:t.slice(r,r+2);e.push(o),r+=o.length}return e}function gs(t,e,n,r,s){let i;const o=e.length;for(let a=0;a<o-1;a++){const l=e[a];t.j[l]?i=t.j[l]:(i=new Yt(r),i.jr=s.slice(),t.j[l]=i),t=i}return i=new Yt(n),i.jr=s.slice(),t.j[e[o-1]]=i,i}function SS(t){const e=[],n=[];let r=0,s="0123456789";for(;r<t.length;){let i=0;for(;s.indexOf(t[r+i])>=0;)i++;if(i>0){e.push(n.join(""));for(let o=parseInt(t.substring(r,r+i),10);o>0;o--)n.pop();r+=i}else n.push(t[r]),r++}return e}const nu={defaultProtocol:"http",events:null,format:CS,formatHref:CS,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Mb(t,e=null){let n=Object.assign({},nu);t&&(n=Object.assign(n,t instanceof Mb?t.o:t));const r=n.ignoreTags,s=[];for(let i=0;i<r.length;i++)s.push(r[i].toUpperCase());this.o=n,e&&(this.defaultRender=e),this.ignoreTags=s}Mb.prototype={o:nu,ignoreTags:[],defaultRender(t){return t},check(t){return this.get("validate",t.toString(),t)},get(t,e,n){const r=e!=null;let s=this.o[t];return s&&(typeof s=="object"?(s=n.t in s?s[n.t]:nu[t],typeof s=="function"&&r&&(s=s(e,n))):typeof s=="function"&&r&&(s=s(e,n.t,n)),s)},getObj(t,e,n){let r=this.o[t];return typeof r=="function"&&e!=null&&(r=r(e,n.t,n)),r},render(t){const e=t.render(this);return(this.get("render",null,t)||this.defaultRender)(e,t.t,t)}};function CS(t){return t}function aR(t,e){this.t="token",this.v=t,this.tk=e}aR.prototype={isLink:!1,toString(){return this.v},toHref(t){return this.toString()},toFormattedString(t){const e=this.toString(),n=t.get("truncate",e,this),r=t.get("format",e,this);return n&&r.length>n?r.substring(0,n)+"â¦":r},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t=nu.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){const e=this,n=this.toHref(t.get("defaultProtocol")),r=t.get("formatHref",n,this),s=t.get("tagName",n,e),i=this.toFormattedString(t),o={},a=t.get("className",n,e),l=t.get("target",n,e),c=t.get("rel",n,e),u=t.getObj("attributes",n,e),h=t.getObj("events",n,e);return o.href=r,a&&(o.class=a),l&&(o.target=l),c&&(o.rel=c),u&&Object.assign(o,u),{tagName:s,attributes:o,content:i,eventListeners:h}}};
vendor: 6,082 bytes, lines 631-634
631function Rp(t,e){class n extends aR{constructor(s,i){super(s,i),this.t=t}}for(const r in e)n.prototype[r]=e[r];return n.t=t,n}const GK=Rp("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),ES=Rp("text"),KK=Rp("nl"),vd=Rp("url",{isLink:!0,toHref(t=nu.defaultProtocol){return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==tu&&t[1].t===Fi}}),yn=t=>new Yt(t);function YK({groups:t}){const e=t.domain.concat([mf,yf,Ss,vf,bf,xf,wf,kf,bn,Nb,lc,Sf,Cf,Ef,ur,Nf,uc,Tf]),n=[gf,Fi,_b,cr,jb,lc,cc,Ob,Rb,sf,of,oc,ac,tf,ef,nf,rf,af,lf,cf,uf,df,hf,ff,pf],r=[mf,gf,yf,vf,bf,xf,wf,kf,bn,oc,ac,lc,Sf,Cf,Ef,cc,ur,Nf,uc,Tf],s=yn(),i=D(s,uc);ce(i,r,i),ce(i,t.domain,i);const o=yn(),a=yn(),l=yn();ce(s,t.domain,o),ce(s,t.scheme,a),ce(s,t.slashscheme,l),ce(o,r,i),ce(o,t.domain,o);const c=D(o,Ss);D(i,Ss,c),D(a,Ss,c),D(l,Ss,c);const u=D(i,cr);ce(u,r,i),ce(u,t.domain,i);const h=yn();ce(c,t.domain,h),ce(h,t.domain,h);const p=D(h,cr);ce(p,t.domain,h);const f=yn(GK);ce(p,t.tld,f),ce(p,t.utld,f),D(c,tu,f);const g=D(h,bn);D(g,bn,g),ce(g,t.domain,h),ce(f,t.domain,h),D(f,cr,p),D(f,bn,g);const m=D(o,bn),y=D(o,cr);D(m,bn,m),ce(m,t.domain,o),ce(y,r,i),ce(y,t.domain,o);const v=yn(vd);ce(y,t.tld,v),ce(y,t.utld,v),ce(v,t.domain,o),ce(v,r,i),D(v,cr,y),D(v,bn,m),D(v,Ss,c);const b=D(v,Fi),x=yn(vd);ce(b,t.numeric,x);const k=yn(vd),S=yn();ce(k,e,k),ce(k,n,S),ce(S,e,k),ce(S,n,S),D(v,ur,k),D(x,ur,k);const C=D(a,Fi),E=D(l,Fi),T=D(E,ur),N=D(T,ur);ce(a,t.domain,o),D(a,cr,y),D(a,bn,m),ce(l,t.domain,o),D(l,cr,y),D(l,bn,m),ce(C,t.domain,k),D(C,ur,k),D(C,cc,k),ce(N,t.domain,k),ce(N,e,k),D(N,ur,k);const _=[[oc,ac],[ef,tf],[nf,rf],[sf,of],[af,lf],[cf,uf],[df,hf],[ff,pf]];for(let z=0;z<_.length;z++){const[I,H]=_[z],M=D(k,I);D(S,I,M);const U=yn(vd);ce(M,e,U);const V=yn();ce(M,n,V),D(M,H,k),ce(U,e,U),ce(U,n,V),ce(V,e,U),ce(V,n,V),D(U,H,k),D(V,H,k)}return D(s,tu,v),D(s,Ab,KK),{start:s,tokens:iR}}function JK(t,e,n){let r=n.length,s=0,i=[],o=[];for(;s<r;){let a=t,l=null,c=null,u=0,h=null,p=-1;for(;s<r&&!(l=a.go(n[s].t));)o.push(n[s++]);for(;s<r&&(c=l||a.go(n[s].t));)l=null,a=c,a.accepts()?(p=0,h=a):p>=0&&p++,s++,u++;if(p<0)s-=u,s<r&&(o.push(n[s]),s++);else{o.length>0&&(i.push(cg(ES,e,o)),o=[]),s-=p,u-=p;const f=h.t,g=n.slice(s-u,s);i.push(cg(f,e,g))}}return o.length>0&&i.push(cg(ES,e,o)),i}function cg(t,e,n){const r=n[0].s,s=n[n.length-1].e,i=e.slice(r,s);return new t(i,n)}const QK=typeof console<"u"&&console&&console.warn||(()=>{}),XK="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",Re={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function ZK(){return Yt.groups={},Re.scanner=null,Re.parser=null,Re.tokenQueue=[],Re.pluginQueue=[],Re.customSchemes=[],Re.initialized=!1,Re}function TS(t,e=!1){if(Re.initialized&&QK(`linkifyjs: already initialized - will not register custom scheme "${t}" ${XK}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))throw new Error(`linkifyjs: incorrect scheme format. 6321. Must only contain digits, lowercase ASCII letters or "-" 6332. Cannot start or end with "-" 6343. "-" cannot repeat`);Re.customSchemes.push([t,e])}function eY(){Re.scanner=VK(Re.customSchemes);for(let t=0;t<Re.tokenQueue.length;t++)Re.tokenQueue[t][1]({scanner:Re.scanner});Re.parser=YK(Re.scanner.tokens);for(let t=0;t<Re.pluginQueue.length;t++)Re.pluginQueue[t][1]({scanner:Re.scanner,parser:Re.parser});return Re.initialized=!0,Re}function Pb(t){return Re.initialized||eY(),JK(Re.parser.start,t,oR(Re.scanner.start,t))}Pb.scan=oR;function lR(t,e=null,n=null){if(e&&typeof e=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);n=e,e=null}const r=new Mb(n),s=Pb(t),i=[];for(let o=0;o<s.length;o++){const a=s[o];a.isLink&&(!e||a.t===e)&&r.check(a)&&i.push(a.toFormattedObject(r))}return i}var Ib="[\0- Â áá â-\u2029âã]",tY=new RegExp(Ib),nY=new RegExp(`${Ib}$`),rY=new RegExp(Ib,"g");function sY(t){return t.length===1?t[0].isLink:t.length===3&&t[1].isLink?["()","[]"].includes(t[0].value+t[2].value):!1}function iY(t){return new Le({key:new at("autolink"),appendTransaction:(e,n,r)=>{const s=e.some(c=>c.docChanged)&&!n.doc.eq(r.doc),i=e.some(c=>c.getMeta("preventAutolink"));if(!s||i)return;const{tr:o}=r,a=yO(n.doc,[...e]);if(xb(a).forEach(({newRange:c})=>{const u=Y7(r.doc,c,f=>f.isTextblock);let h,p;if(u.length>1)h=u[0],p=r.doc.textBetween(h.pos,h.pos+h.node.nodeSize,void 0," ");else if(u.length){const f=r.doc.textBetween(c.from,c.to," "," ");if(!nY.test(f))return;h=u[0],p=r.doc.textBetween(h.pos,c.to,void 0," ")}if(h&&p){const f=p.split(tY).filter(Boolean);if(f.length<=0)return!1;const g=f[f.length-1],m=h.pos+p.lastIndexOf(g);if(!g)return!1;const y=Pb(g).map(v=>v.toObject(t.defaultProtocol));if(!sY(y))return!1;y.filter(v=>v.isLink).map(v=>({...v,from:m+v.start+1,to:m+v.end+1})).filter(v=>r.schema.marks.code?!r.doc.rangeHasMark(v.from,v.to,r.schema.marks.code):!0).filter(v=>t.validate(v.value)).filter(v=>t.shouldAutoLink(v.value)).forEach(v=>{wb(v.from,v.to,r.doc).some(b=>b.mark.type===t.type)||o.addMark(v.from,v.to,t.type.create({href:v.href}))})}}),!!o.steps.length)return o}})}function oY(t){return new Le({key:new at("handleClickLink"),props:{handleClick:(e,n,r)=>{var s,i;if(r.button!==0||!e.editable)return!1;let o=null;if(r.target instanceof HTMLAnchorElement)o=r.target;else{const l=r.target;if(!l)return!1;const c=t.editor.view.dom;o=l.closest("a"),o&&!c.contains(o)&&(o=null)}if(!o)return!1;let a=!1;if(t.enableClickSelection&&(a=t.editor.commands.extendMarkRange(t.type.name)),t.openOnClick){const l=SO(e.state,t.type.name),c=(s=o.href)!=null?s:l.href,u=(i=o.target)!=null?i:l.target;c&&(window.open(c,u),a=!0)}return a}}})}var aY=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|â(.*?)â|â(.*?)â))?\)$/,lY=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|â(.*?)â|â(.*?)â))?\)/g;function cR(t,e){let n=0;for(let r=e-1;r>=0&&t[r]==="\\";r-=1)n+=1;return n%2===1}function cY(t,e){let n=0,r=0;for(;r<e;){if(t[r]!=="`"){r+=1;continue}
634if(n===0&&cR(t,r)){r+=1;continue}let s=0;for(;r<e&&t[r]==="`";)s+=1,r+=1;n===0?n=s:s===n&&(n=0)}return n>0}function uR(t,e,n){var r,s;const[,i,o]=e;return(e.index?t[e.index-1]:void 0)==="!"||cR(t,(r=e.index)!=null?r:0)||cY(t,(s=e.index)!=null?s:0)?!1:!!i.trim()&&n(o)}function dR(t){var e,n;const[r,s,i,,o,a,l]=t,c=(e=o??a)!=null?e:l;return{index:(n=t.index)!=null?n:0,text:r,replaceWith:s,data:{href:i,title:c||null,markdown:!0}}}function uY(t,e){return t.index<e.index+e.text.length&&e.index<t.index+t.text.length}function hR(t){var e,n,r;return{href:(e=t.data)==null?void 0:e.href,title:(r=(n=t.data)==null?void 0:n.title)!=null?r:null}}function dY(t){const e=go({find:n=>{const r=aY.exec(n);return!r||!uR(n,r,t.isAllowedHref)?null:dR(r)},type:t.type,getAttributes:hR});return new ku({find:e.find,handler:n=>{const r=e.handler(n);return r!==null&&n.state.tr.steps.length&&n.state.tr.setMeta("preventAutolink",!0),r}})}function hY(t){const e=li({find:n=>{var r,s;const i=[];for(const a of n.matchAll(lY))uR(n,a,t.isAllowedHref)&&i.push(dR(a));const o=((s=(r=t.findPlainUrls)==null?void 0:r.call(t,n))!=null?s:[]).filter(a=>!i.some(l=>uY(l,a)));return[...i,...o]},type:t.type,getAttributes:hR});return new jO({find:e.find,handler:n=>{var r;const s=e.handler(n);return s!==null&&n.state.tr.steps.length&&((r=n.match.data)!=null&&r.markdown)&&n.state.tr.setMeta("preventAutolink",!0),s}})}function fY(t){return new Le({key:new at("handlePasteLink"),props:{handlePaste:(e,n,r)=>{const{shouldAutoLink:s}=t,{state:i}=e,{selection:o}=i,{empty:a}=o;if(a)return!1;let l="";r.content.forEach(u=>{l+=u.textContent});const c=lR(l,{defaultProtocol:t.defaultProtocol}).find(u=>u.isLink&&u.value===l);return!l||!c||s!==void 0&&!s(c.value)?!1:t.editor.commands.setMark(t.type,{href:c.href})}}})}function Ir(t,e){const n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(r=>{const s=typeof r=="string"?r:r.scheme;s&&n.push(s)}),!t||t.replace(rY,"").match(new RegExp(`^(?:(?:${n.map(r=>r.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")).join("|")}):|[^a-z]|[a-z0-9+.\\-]+(?:[^a-z+.\\-:]|$))`,"i"))}var fR=wo.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(t=>{if(typeof t=="string"){TS(t);return}TS(t.scheme,t.optionalSlashes)})},onDestroy(){ZK()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,markdownLinks:!1,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(t,e)=>!!Ir(t,e.protocols),validate:t=>!!t,shouldAutoLink:t=>{const e=/^[a-z][a-z0-9+.-]*:\/\//i.test(t),n=/^[a-z][a-z0-9+.-]*:/i.test(t);if(e||n&&!t.includes("@"))return!0;const s=(t.includes("@")?t.split("@").pop():t).split(/[/?#:]/)[0];return!(/^\d{1,3}(\.\d{1,3}){3}$/.test(s)||!/\./.test(s))}}},addAttributes(){var t,e,n;return{href:{default:null,parseHTML(r){return r.getAttribute("href")}},target:{default:(t=this.options.HTMLAttributes.target)!=null?t:null},rel:{default:(e=this.options.HTMLAttributes.rel)!=null?e:null},class:{default:(n=this.options.HTMLAttributes.class)!=null?n:null},title:{default:null}}},parseHTML(){return[{tag:"a[href]",getAttrs:t=>{const e=t.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:n=>!!Ir(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:t}){return this.options.isAllowedUri(t.href,{defaultValidate:e=>!!Ir(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",Qe(this.options.HTMLAttributes,t),0]:["a",Qe(this.options.HTMLAttributes,{...t,href:""}),0]},markdownTokenName:"link",parseMarkdown:(t,e)=>e.applyMark("link",e.parseInline(t.tokens||[]),{href:t.href,title:t.title||null}),renderMarkdown:(t,e)=>{var n,r,s,i;const o=(r=(n=t.attrs)==null?void 0:n.href)!=null?r:"",a=(i=(s=t.attrs)==null?void 0:s.title)!=null?i:"",l=e.renderChildren(t);return a?`[${l}](${o} "${a}")`:`[${l}](${o})`},addCommands(){return{setLink:t=>({chain:e})=>{const{href:n}=t;return this.options.isAllowedUri(n,{defaultValidate:r=>!!Ir(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().setMark(this.name,t).setMeta("preventAutolink",!0).run():!1},toggleLink:t=>({chain:e})=>{const{href:n}=t||{};return n&&!this.options.isAllowedUri(n,{defaultValidate:r=>!!Ir(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addInputRules(){return this.options.markdownLinks?[dY({type:this.t
634ype,isAllowedHref:t=>this.options.isAllowedUri(t,{defaultValidate:e=>!!Ir(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})})]:[]},addPasteRules(){const t=e=>{const n=[];if(e){const{protocols:r,defaultProtocol:s}=this.options;lR(e).filter(o=>o.isLink&&this.options.isAllowedUri(o.value,{defaultValidate:a=>!!Ir(a,r),protocols:r,defaultProtocol:s})).forEach(o=>{this.options.shouldAutoLink(o.value)&&n.push({text:o.value,data:{href:o.href},index:o.start})})}return n};return this.options.markdownLinks?[hY({type:this.type,isAllowedHref:e=>this.options.isAllowedUri(e,{defaultValidate:n=>!!Ir(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}),findPlainUrls:t})]:[li({find:t,type:this.type,getAttributes:e=>{var n;return{href:(n=e.data)==null?void 0:n.href}}})]},addProseMirrorPlugins(){const t=[],{protocols:e,defaultProtocol:n}=this.options;return this.options.autolink&&t.push(iY({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:s=>!!Ir(s,e),protocols:e,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),t.push(oY({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick==="whenNotEditable"?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&t.push(fY({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),t}}),pY=fR,mY=Object.defineProperty,gY=(t,e)=>{for(var n in e)mY(t,n,{get:e[n],enumerable:!0})},yY="listItem",NS="textStyle",AS=/^\s*([-+*])\s$/,pR=tn.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:t}){return["ul",Qe(this.options.HTMLAttributes,t),0]},markdownTokenName:"list",parseMarkdown:(t,e)=>t.type!=="list"||t.ordered?[]:{type:"bulletList",content:t.items?e.parseChildren(t.items):[]},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,` 635`):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(yY,this.editor.getAttributes(NS)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}}
635,addInputRules(){let t=Ua({find:AS,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=Ua({find:AS,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(NS),editor:this.editor})),[t]}}),vY=(t,e,n)=>{const{selection:r}=t;if(!r.empty)return null;const{$from:s}=r;if(!s.parent.isTextblock||s.parentOffset!==s.parent.content.size)return null;let i=-1;for(let f=s.depth;f>0;f-=1)if(s.node(f).type.name===e){i=f;break}if(i<0)return null;const o=s.node(i),a=s.index(i);if(a+1>=o.childCount)return null;const l=o.child(a+1);if(!n.includes(l.type.name))return null;const c=t.schema.nodes[e];let u=!1;if(l.forEach(f=>{f.type===c&&f.childCount>1&&(u=!0)}),!u)return null;const h=t.doc.resolve(s.after()).nodeAfter;if(!h||!n.includes(h.type.name))return null;const p=[];return h.forEach(f=>{p.push(f)}),p.length===0?null:{listItemDepth:i,nestedList:h,nestedListPos:s.after(),insertPos:s.after(i),items:p}},bY=(t,e,n,r)=>{const s=vY(t,n,r);if(!s)return!1;const{selection:i}=t,{nestedList:o,nestedListPos:a,insertPos:l,items:c}=s,u=t.tr;u.delete(a,a+o.nodeSize);const h=u.mapping.map(l);return u.insert(h,P.from(c)),u.setSelection(i.map(u.doc,u.mapping)),e&&e(u),!0},xY=(t,e,n)=>bY(t.state,t.view.dispatch,e,n),mR=(t,e)=>Ke.create({name:`${t}BranchingDeleteKeymap`,priority:101,addKeyboardShortcuts(){const n=()=>xY(this.editor,t,e);return{Delete:n,"Mod-Delete":n}}}),gR=[[1e3,"m"],[900,"cm"],[500,"d"],[400,"cd"],[100,"c"],[90,"xc"],[50,"l"],[40,"xl"],[10,"x"],[9,"ix"],[5,"v"],[4,"iv"],[1,"i"]],bd="abcdefghijklmnopqrstuvwxyz",wY="[a-zA-Z]{1,2}",yR=String.raw`\d+|[ivxlcdmIVXLCDM]+|${wY}`;function Mp(t){let e=t,n="";for(const[r,s]of gR)for(;e>=r;)n+=s,e-=r;return n}function Lb(t){return Mp(t).toUpperCase()}function vR(t){const e=t.toLowerCase();let n=0,r=0;for(;n<e.length;){let s=!1;for(const[i,o]of gR)if(e.startsWith(o,n)){r+=i,n+=o.length,s=!0;break}if(!s)return 0}return r}function kY(t){if(!/^[ivxlcdmIVXLCDM]+$/.test(t))return!1;const e=vR(t);return e<=0?!1:(t===t.toLowerCase()?Mp(e):Lb(e))===t}function SY(t){const e=t.toLowerCase();if(e.length===1)return e.charCodeAt(0)-97+1;if(e.length===2){const n=e.charCodeAt(0)-97,r=e.charCodeAt(1)-97;return(n+1)*26+r+1}return 0}function Af(t){if(t<=26)return bd[t-1];const e=Math.floor((t-1)/26)-1,n=(t-1)%26;return e<0?bd[n]:bd[e]+bd[n]}function Pp(t){if(!(!t||/^\d+$/.test(t))){if(kY(t))return t===t.toLowerCase()?"i":"I";if(/^[a-z]{1,2}$/.test(t))return"a";if(/^[A-Z]{1,2}$/.test(t))return"A"}}function Db(t){if(/^\d+$/.test(t))return parseInt(t,10);const e=Pp(t);if(e==="i"||e==="I")return vR(t);if(e==="a"||e==="A"){const r=SY(t);return r>0?r:1}const n=parseInt(t,10);return Number.isNaN(n)?1:n}function CY(t,e){if(t==="numeric")return String(e);switch(t){case"a":return Af(e);case"A":return Af(e).toUpperCase();case"i":return Mp(e);case"I":return Lb(e);default:return String(e)}}function EY(t){var e;if(t.length===0)return!1;const n=(e=Pp(t[0]))!=null?e:"numeric",r=Db(t[0]);if(r<1)return!1;for(let s=0;s<t.length;s++){const i=CY(n,r+s);if(t[s]!==i)return!1}return!0}function TY(t){return{type:Pp(t),start:Db(t)}}function NY(t){const{type:e,start:n}=TY(t),r={};return e&&(r.type=e),n!==1&&(r.start=n),r}function AY(t,e,n=". "){const r=e+1;if(!t||t==="1")return`${r}${n}`;switch(t){case"a":return`${Af(r)}${n}`;case"A":return`${Af(r).toUpperCase()}${n}`;case"i":return`${Mp(r)}${n}`;case"I":return`${Lb(r)}${n}`;default:return`${r}${n}`}}function _Y(t){var e,n;const r=(e=t.tokens)==null?void 0:e[0];return!!(t.text&&((n=t.tokens)==null?void 0:n.length)===1&&(r==null?void 0:r.type)==="list"&&r.ordered&&r.raw===t.text)}function jY(t,e){return e.tokenizeInline?e.parseInline(e.tokenizeInline(t)):e.parseInline([{type:"text",raw:t,text:t}])}var bR=tn.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",Qe(this.options.HTMLAttributes,t),0]},markdownTokenName:"list_item",parseMarkdown:(t,e)=>{var n;if(t.type!=="list_item")return[];const r=(n=e.parseBlockChildren)!=null?n:e.parseChildren;let s=[];if(t.tokens&&t.tokens.length>0){if(_Y(t))return{type:"listItem",content:[{type:"paragraph",content:jY(t.text||"",e)}]};if(t.tokens.some(o=>o.type==="paragraph"))s=r(t.tokens);else{const o=t.tokens[0];if(o&&o.type==="text"&&o.tokens&&o.tokens.length>0){if(s=[{type:"paragraph",content:e.parseInline(o.tokens)}],t.tokens.length>1){const l=t.tokens.slice(1),c=r(l);s.push(...c)}}else s=r(t.tokens)}}return s.length===0&&(s=[{type:"paragraph",content:[]}]),{type:"listItem",content:s}},renderMarkdown:(t,e,n)=>Cb(t,e,r=>{var s,i,o,a;if(r.parentType==="bulletList")return"- ";if(r.parentType==="orderedList"){const l=((i=(s=r.meta)==null?void 0:s.parentAttrs)==null?void 0:i.start)||1,c=(a=(o=r.meta)==null?void 0:o.parentAttrs)==null?void 0:a.type,u=l-1+(r.index||0);return AY(c,u,". ")}return"- "},n),addExtensions(){return[mR(this.name,[this.options.bulletListTypeName,this.options.orderedListTypeName])]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),OY={};gY(OY,{findListItemPos:()=>Ip,getNextListDepth:()=>$b,handleBackspace:()=>xv,handleDelete:()=>wv,hasListBefore:()=>xR,hasListItemAfter:()=>RY,hasListItemBefore:()=>MY,listItemHasSubList:()=>PY,nextListIsDeeper:()=>wR,nextListIsHigher:()=>kR});var Ip=(t,e)=>{const{$from:n}=e.selection,r=st(t,e.schema);let s=null,i=n.depth,o=n.pos,a=null;for(;i>0&&a===null;)s=n.node(i),s.type===r?a=i:(i-=1,o-=1);return a===null?null:{$pos:e.doc.resolve(o),depth:a}},$b=(t,e)=>{const n=Ip(t,e);if(!n)return!1;const[,r]=o9(e,t,n.$pos.pos+4);return r},xR=(t,e,n)=>{const{$anchor:r}=t.selection,s=Math.max(0,r.pos-2),i=t.doc.resolve(s).node();return!(!i||!n.includes(i.type.name))},xv=(t,e,n)=>{if(t.commands.undoInputRule())return!0;
635if(t.state.selection.from!==t.state.selection.to)return!1;if(!ai(t.state,e)&&xR(t.state,e,n)){const{$anchor:r}=t.state.selection,s=t.state.doc.resolve(r.before()-1),i=[];s.node().descendants((l,c)=>{l.type.name===e&&i.push({node:l,pos:c})});const o=i.at(-1);if(!o)return!1;const a=t.state.doc.resolve(s.start()+o.pos+1);return t.chain().cut({from:r.start()-1,to:r.end()+1},a.end()).joinForward().run()}return!ai(t.state,e)||!u9(t.state)?!1:t.chain().liftListItem(e).run()},wR=(t,e)=>{const n=$b(t,e),r=Ip(t,e);return!r||!n?!1:n>r.depth},kR=(t,e)=>{const n=$b(t,e),r=Ip(t,e);return!r||!n?!1:n<r.depth},wv=(t,e)=>{if(!ai(t.state,e)||!c9(t.state,e))return!1;const{selection:n}=t.state,{$from:r,$to:s}=n;return!n.empty&&r.sameParent(s)?!1:wR(e,t.state)?t.chain().focus(t.state.selection.from+4).lift(e).joinBackward().run():kR(e,t.state)?t.chain().joinForward().joinBackward().run():t.commands.joinItemForward()},RY=(t,e)=>{var n;const{$anchor:r}=e.selection,s=e.doc.resolve(r.pos-r.parentOffset-2);return!(s.index()===s.parent.childCount-1||((n=s.nodeAfter)==null?void 0:n.type.name)!==t)},MY=(t,e)=>{var n;const{$anchor:r}=e.selection,s=e.doc.resolve(r.pos-2);return!(s.index()===0||((n=s.nodeBefore)==null?void 0:n.type.name)!==t)},PY=(t,e,n)=>{if(!n)return!1;const r=st(t,e.schema);let s=!1;return n.descendants(i=>{i.type===r&&(s=!0)}),s},SR=Ke.create({name:"listKeymap",addOptions(){return{listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}},addKeyboardShortcuts(){return{Delete:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n})=>{t.state.schema.nodes[n]!==void 0&&wv(t,n)&&(e=!0)}),e},"Mod-Delete":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n})=>{t.state.schema.nodes[n]!==void 0&&wv(t,n)&&(e=!0)}),e},Backspace:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{t.state.schema.nodes[n]!==void 0&&xv(t,n,r)&&(e=!0)}),e},"Mod-Backspace":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{t.state.schema.nodes[n]!==void 0&&xv(t,n,r)&&(e=!0)}),e}}}}),kv=new RegExp(`^(\\s*)(${yR})([.)])\\s+(.*)$`),IY=/^\s/,Bl={heading:/^#{1,6}(?:\s|$)/,bulletItem:/^[-+*]\s+/,codeFence:/^(?:```|~~~)/,thematicBreak:/^(?:(?:-[ \t]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})$/};function LY(t){return kv.test(t.trimStart())}function DY(t){const e=t.trimStart();return Bl.bulletItem.test(e)||LY(e)||Bl.heading.test(e)||Bl.thematicBreak.test(e)&&!e.startsWith("-")||/^>\s?/.test(e)||Bl.codeFence.test(e)}function $Y(t){return Object.values(Bl).some(e=>e.test(t))}function zY(t){const e=[],n=[];let r=!1;return t.forEach(s=>{if(r){n.push(s);return}if(s.trim()===""){r=!0,n.push(s);return}if(e.length>0&&DY(s)){r=!0,n.push(s);return}e.push(s)}),{paragraphLines:e,blockLines:n}}function BY(t){const e=[];let n=0,r=0;for(;n<t.length;){const s=t[n],i=s.match(kv);if(!i)break;const[,o,a,l,c]=i,u=o.length,h=parseInt(a,10),p=isNaN(h)?Pp(a):void 0,f=isNaN(h)?Db(a):h,g=[c];let m=n+1;const y=[s];let v=!1;for(;m<t.length;){const b=t[m];if(b.match(kv))break;if(b.trim()==="")y.push(b),g.push(""),v=!0,m+=1;else if(b.match(IY)){const k=b.length-b.trimStart().length,S=u+a.length+1;y.push(b),g.push(b.slice(Math.min(k,S))),m+=1}else{if(v||$Y(b))break;y.push(b),g.push(b),m+=1}}e.push({indent:u,number:f,type:p,content:g.join(` 636`).trim(),contentLines:g,raw:y.join(` 637`)}),r=m,n=m}return[e,r]}var FY=new RegExp(`^(${yR})([.)])\\s+(.+)$`);function WY(t){const e=t.split(` 638`).filter(i=>i.trim().length>0);if(e.length===0)return null;const n=[];for(const i of e){const o=i.trim().match(FY);if(!o)return null;n.push({marker:o[1],content:o[3]})}const r=n.map(i=>i.marker);return EY(r)?{type:"orderedList",attrs:NY(n[0].marker),content:n.map(i=>({type:"listItem",content:[{type:"paragraph",content:[{type:"text",text:i.content}]}]}))}:null}function CR(t,e,n){const r=[];let s=0;for(;s<t.length;){const i=t[s];if(i.indent===e){const{paragraphLines:o,blockLines:a}=zY(i.contentLines),l=o.join(` 639`).trim(),c=[];l&&c.push({type:"paragraph",raw:l,tokens:n.inlineTokens(l)});const u=a.join(` 640`).trim();if(u){const f=n.blockTokens(u);c.push(...f)}let h=s+1;const p=[];for(;h<t.length&&t[h].indent>e;)p.push(t[h]),h+=1;if(p.length>0){const f=Math.min(...p.map(m=>m.indent)),g=CR(p,f,n);c.push({type:"list",ordered:!0,start:p[0].number,typeMarker:p[0].type,items:g,raw:p.map(m=>m.raw).join(` 641`)})}r.push({type:"list_item",raw:i.raw,tokens:c}),s=h}else s+=1}return r}function HY(t,e){return t.map(n=>{if(n.type!=="list_item")return e.parseChildren([n])[0];const r=[];return n.tokens&&n.tokens.length>0&&n.tokens.forEach(s=>{if(s.type==="paragraph"||s.type==="list"||s.type==="blockquote"||s.type==="code")r.push(...e.parseChildren([s]));else if(s.type==="text"&&s.tokens){const i=e.parseChildren([s]);r.push({type:"paragraph",content:i})}else{const i=e.parseChildren([s]);i.length>0&&r.push(...i)}}),{type:"listItem",content:r}})}var UY="listItem",_S="textStyle",jS=/^(\d+)\.\s$/;function OS(t){const e=t.match(/list-style-type\s*:\s*([^;]+)/i);if(!e)return null;switch(e[1].trim().toLowerCase()){case"upper-roman":return"I";case"lower-roman":return"i";case"upper-alpha":case"upper-latin":return"A";case"lower-alpha":case"lower-latin":return"a";default:return null}}var ER=tn.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1},type:{default:null,parseHTML:t=>{const e=t.getAttribute("type");if(e)return e;const n=t.getAttribute("style");if(n){const s=OS(n);if(s)return s}const r=t.querySelector("li");if(r){const s=r.getAttribute("style");if(s){const i=OS(s);if(i)return i}}return null}}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){const{start:e,type:n,...r}=t,s=Qe(this.options.HTMLAttributes,r);return e!==1&&(s.start=e),n&&n!=="1"&&(s.type=n),["ol",s,0]},markdownTokenName:"list",parseMarkdown:(t,e)=>{if(t.type!=="list"||!t.ordered)return[];const n=t.start||1,r=t.typeMarker,s=t.items?HY(t.items,e):[],i={};return n!==1&&(i.start=n),r&&(i.type=r),Object.keys(i).length>0?{type:"orderedList",attrs:i,content:s}:{type:"orderedList",content:s}},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,` 642`):"",markdownTokenizer:{name:"orderedList",level:"block",start:()=>-1,tokenize:(t,e,n)=>{var r,s;const i=t.split(` 643`),[o,a]=BY(i);if(o.length===0)return;const l=CR(o,o[0].indent,n);if(l.length===0)return;const c=((r=o[0])==null?void 0:r.number)||1,u=(s=o[0])==null?void 0:s.type;return{type:"list",ordered:!0,start:c,typeMarker:u,items:l,raw:i.slice(0,a).join(` 644`)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(UY,this.editor.getAttributes(_S)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}}
644,addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addProseMirrorPlugins(){return[new Le({props:{handlePaste:(t,e)=>{var n,r;const s=(n=e.clipboardData)==null?void 0:n.getData("text/html");if(s!=null&&s.trim())return!1;const i=(r=e.clipboardData)==null?void 0:r.getData("text/plain");if(!i)return!1;const o=WY(i);if(!o)return!1;try{const a=t.state.schema.nodeFromJSON(o),l=t.state.tr.replaceSelectionWith(a);return t.dispatch(l),!0}catch{return!1}}}})]},addInputRules(){const t=(n,r)=>(!r.attrs.type||r.attrs.type==="1")&&r.childCount+r.attrs.start===+n[1];let e=Ua({find:jS,type:this.type,getAttributes:n=>({start:+n[1]}),joinPredicate:t});return(this.options.keepMarks||this.options.keepAttributes)&&(e=Ua({find:jS,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:n=>({start:+n[1],...this.editor.getAttributes(_S)}),joinPredicate:t,editor:this.editor})),[e]}}),VY=/^\s*(\[([( |x])?\])\s$/,qY=tn.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:t=>{const e=t.getAttribute("data-checked");return e===""||e==="true"},renderHTML:t=>({"data-checked":t.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:t,HTMLAttributes:e}){return["li",Qe(this.options.HTMLAttributes,e,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:t.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(t,e)=>{const n=[];if(t.tokens&&t.tokens.length>0?n.push(e.createNode("paragraph",{},e.parseInline(t.tokens))):t.text?n.push(e.createNode("paragraph",{},[e.createNode("text",{text:t.text})])):n.push(e.createNode("paragraph",{},[])),t.nestedTokens&&t.nestedTokens.length>0){const r=e.parseChildren(t.nestedTokens);n.push(...r)}return e.createNode("taskItem",{checked:t.checked||!1},n)},renderMarkdown:(t,e)=>{var n;const s=`- [${(n=t.attrs)!=null&&n.checked?"x":" "}] `;return Cb(t,e,s)},addExtensions(){return this.options.nested?[mR(this.name,[this.options.taskListTypeName])]:[]},addKeyboardShortcuts(){const t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return({node:t,HTMLAttributes:e,getPos:n,editor:r})=>{const s=document.createElement("li"),i=document.createElement("label"),o=document.createElement("span"),a=document.createElement("input"),l=document.createElement("div"),c=h=>{var p,f;a.ariaLabel=((f=(p=this.options.a11y)==null?void 0:p.checkboxLabel)==null?void 0:f.call(p,h,a.checked))||`Task item checkbox for ${h.textContent||"empty task item"}`};c(t),i.contentEditable="false",a.type="checkbox",a.addEventListener("mousedown",h=>h.preventDefault()),a.addEventListener("change",h=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){a.checked=!a.checked;return}const{checked:p}=h.target;r.isEditable&&typeof n=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:f})=>{const g=n();if(typeof g!="number")return!1;const m=f.doc.nodeAt(g);return f.setNodeMarkup(g,void 0,{...m==null?void 0:m.attrs,checked:p}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(t,p)||(a.checked=!a.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([h,p])=>{s.setAttribute(h,p)}),s.dataset.checked=t.attrs.checked,a.checked=t.attrs.checked,i.append(a,o),s.append(i,l),Object.entries(e).forEach(([h,p])=>{s.setAttribute(h,p)});let u=new Set(Object.keys(e));return{dom:s,contentDOM:l,update:h=>{if(h.type!==this.type)return!1;s.dataset.checked=h.attrs.checked,a.checked=h.attrs.checked,c(h);const p=r.extensionManager.attributes,f=Ha(h,p),g=new Set(Object.keys(f)),m=this.options.HTMLAttributes;return u.forEach(y=>{g.has(y)||(y in m?s.setAttribute(y,m[y]):s.removeAttribute(y))}),Object.entries(f).forEach(([y,v])=>{v==null?y in m?s.setAttribute(y,m[y]):s.removeAttribute(y):s.setAttribute(y,v)}),u=g,!0}}}}
644,addInputRules(){return[Ua({find:VY,type:this.type,getAttributes:t=>({checked:t[t.length-1]==="x"})})]}}),GY=tn.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:t}){return["ul",Qe(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},parseMarkdown:(t,e)=>e.createNode("taskList",{},e.parseChildren(t.items||[])),renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,` 645`):"",markdownTokenizer:{name:"taskList",level:"block",start(t){var e;const n=(e=t.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:e.index;return n!==void 0?n:-1},tokenize(t,e,n){const r=i=>{const o=uv(i,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:a=>({indentLevel:a[1].length,mainContent:a[4],checked:a[3].toLowerCase()==="x"}),createToken:(a,l)=>({type:"taskItem",raw:"",mainContent:a.mainContent,indentLevel:a.indentLevel,checked:a.checked,text:a.mainContent,tokens:n.inlineTokens(a.mainContent),nestedTokens:l}),customNestedParser:r},n);if(o){const a={type:"taskList",raw:o.raw,items:o.items},l=i.slice(o.raw.length);return l.trim()?[a,...n.blockTokens(l)]:[a]}return n.blockTokens(i)},s=uv(t,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:i=>({indentLevel:i[1].length,mainContent:i[4],checked:i[3].toLowerCase()==="x"}),createToken:(i,o)=>({type:"taskItem",raw:"",mainContent:i.mainContent,indentLevel:i.indentLevel,checked:i.checked,text:i.mainContent,tokens:n.inlineTokens(i.mainContent),nestedTokens:o}),customNestedParser:r},n);if(s)return{type:"taskList",raw:s.raw,items:s.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:t})=>t.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});Ke.create({name:"listKit",addExtensions(){const t=[];return this.options.bulletList!==!1&&t.push(pR.configure(this.options.bulletList)),this.options.listItem!==!1&&t.push(bR.configure(this.options.listItem)),this.options.listKeymap!==!1&&t.push(SR.configure(this.options.listKeymap)),this.options.orderedList!==!1&&t.push(ER.configure(this.options.orderedList)),this.options.taskItem!==!1&&t.push(qY.configure(this.options.taskItem)),this.options.taskList!==!1&&t.push(GY.configure(this.options.taskList)),t}});var xd=" ",ug="Â ",KY=tn.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",Qe(this.options.HTMLAttributes,t),0]},parseMarkdown:(t,e)=>{const n=t.tokens||[];if(n.length===1&&n[0].type==="image")return e.parseChildren([n[0]]);const r=e.parseInline(n);return n.length===1&&n[0].type==="text"&&(n[0].raw===xd||n[0].text===xd||n[0].raw===ug||n[0].text===ug)&&r.length===1&&r[0].type==="text"&&(r[0].text===xd||r[0].text===ug)?e.createNode("paragraph",void 0,[]):e.createNode("paragraph",void 0,r)},renderMarkdown:(t,e,n)=>{var r,s;if(!t)return"";const i=Array.isArray(t.content)?t.content:[];if(i.length===0){const o=Array.isArray((r=n==null?void 0:n.previousNode)==null?void 0:r.content)?n.previousNode.content:[];return((s=n==null?void 0:n.previousNode)==null?void 0:s.type)==="paragraph"&&o.length===0?xd:""}return e.renderChildren(i)},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),YY=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,JY=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,QY=wo.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["s",Qe(this.options.HTMLAttributes,t),0]},markdownTokenName:"del",parseMarkdown:(t,e)=>e.applyMark("strike",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`~~${e.renderChildren(t)}~~`,addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}}
645,addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[go({find:YY,type:this.type})]},addPasteRules(){return[li({find:JY,type:this.type})]}}),XY=tn.create({name:"text",group:"inline",parseMarkdown:t=>({type:"text",text:t.text||""}),renderMarkdown:t=>t.text||""}),ZY=wo.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["u",Qe(this.options.HTMLAttributes,t),0]},parseMarkdown(t,e){return e.applyMark(this.name||"underline",e.parseInline(t.tokens||[]))},renderMarkdown(t,e){return`++${e.renderChildren(t)}++`},markdownTokenizer:{name:"underline",level:"inline",start(t){return t.indexOf("++")},tokenize(t,e,n){const s=/^(\+\+)([\s\S]+?)(\+\+)/.exec(t);if(!s)return;const i=s[2].trim();return{type:"underline",raw:s[0],text:i,tokens:n.inlineTokens(i)}}},addCommands(){return{setUnderline:()=>({commands:t})=>t.setMark(this.name),toggleUnderline:()=>({commands:t})=>t.toggleMark(this.name),unsetUnderline:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});function eJ(t={}){return new Le({view(e){return new tJ(e,t)}})}class tJ{constructor(e,n){var r;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.lastDragEvent=null,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(s=>{let i=o=>{this[s](o)};return e.dom.addEventListener(s,i),{name:s,handler:i}})}destroy(){this.handlers.forEach(({name:e,handler:n})=>this.editorView.dom.removeEventListener(e,n))}update(e,n){if(this.cursorPos!=null&&n.doc!=e.state.doc)if(this.lastDragEvent){let r=this.computeTarget(this.lastDragEvent);r==this.cursorPos?this.updateOverlay():this.setCursor(r)}else this.updateOverlay()}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),n=!e.parent.inlineContent,r,s=this.editorView.dom,i=s.getBoundingClientRect(),o=i.width/s.offsetWidth,a=i.height/s.offsetHeight;if(n){let h=e.nodeBefore,p=e.nodeAfter;if(h||p){let f=this.editorView.nodeDOM(this.cursorPos-(h?h.nodeSize:0));if(f){let g=f.getBoundingClientRect(),m=h?g.bottom:g.top;h&&p&&(m=(m+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let y=this.width/2*a;r={left:g.left,right:g.right,top:m-y,bottom:m+y}}}}if(!r){let h=this.editorView.coordsAtPos(this.cursorPos),p=this.width/2*o;r={left:h.left-p,right:h.left+p,top:h.top,bottom:h.bottom}}let l=this.editorView.dom.offsetParent;this.element||(this.element=l.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let c,u;if(!l||l==document.body&&getComputedStyle(l).position=="static")c=-pageXOffset,u=-pageYOffset;else{let h=l.getBoundingClientRect(),p=h.width/l.offsetWidth,f=h.height/l.offsetHeight;c=h.left-l.scrollLeft*p,u=h.top-l.scrollTop*f}this.element.style.left=(r.left-c)/o+"px",this.element.style.top=(r.top-u)/a+"px",this.element.style.width=(r.right-r.left)/o+"px",this.element.style.height=(r.bottom-r.top)/a+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}computeTarget(e){let n=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),s=r&&r.type.spec.disableDropCursor,i=typeof s=="function"?s(this.editorView,n,e):s;if(!n||i)return null;let o=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let a=dj(this.editorView.state.doc,o,this.editorView.dragging.slice);a!=null&&(o=a)}return o}dragover(e){if(!this.editorView.editable)return;this.lastDragEvent=e;let n=this.computeTarget(e);n!=null&&(this.setCursor(n),this.scheduleRemoval(5e3))}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}class qe extends le{constructor(e){super(e,e)}map(e,n){let r=e.resolve(n.map(this.head));
vendor: 15,715 bytes, line 645
645return qe.valid(r)?new qe(r):le.near(r)}content(){return W.empty}eq(e){return e instanceof qe&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new qe(e.resolve(n.pos))}getBookmark(){return new zb(this.anchor)}static valid(e){let n=e.parent;if(n.inlineContent||!nJ(e)||!rJ(e))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let s=n.contentMatchAt(e.index()).defaultType;return s&&s.isTextblock}static findGapCursorFrom(e,n,r=!1){e:for(;;){if(!r&&qe.valid(e))return e;let s=e.pos,i=null;for(let o=e.depth;;o--){let a=e.node(o);if(n>0?e.indexAfter(o)<a.childCount:e.index(o)>0){i=a.child(n>0?e.indexAfter(o):e.index(o)-1);break}else if(o==0)return null;s+=n;let l=e.doc.resolve(s);if(qe.valid(l))return l}for(;;){let o=n>0?i.firstChild:i.lastChild;if(!o){if(i.isAtom&&!i.isText&&!X.isSelectable(i)){e=e.doc.resolve(s+i.nodeSize*n),r=!1;continue e}break}i=o,s+=n;let a=e.doc.resolve(s);if(qe.valid(a))return a}return null}}}qe.prototype.visible=!1;qe.findFrom=qe.findGapCursorFrom;le.jsonID("gapcursor",qe);class zb{constructor(e){this.pos=e}map(e){return new zb(e.map(this.pos))}resolve(e){let n=e.resolve(this.pos);return qe.valid(n)?new qe(n):le.near(n)}}function TR(t){return t.isAtom||t.spec.isolating||t.spec.createGapCursor}function nJ(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),r=t.node(e);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let s=r.child(n-1);;s=s.lastChild){if(s.childCount==0&&!s.inlineContent||TR(s.type))return!0;if(s.inlineContent)return!1}}return!0}function rJ(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),r=t.node(e);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let s=r.child(n);;s=s.firstChild){if(s.childCount==0&&!s.inlineContent||TR(s.type))return!0;if(s.inlineContent)return!1}}return!0}function sJ(){return new Le({props:{decorations:lJ,createSelectionBetween(t,e,n){return e.pos==n.pos&&qe.valid(n)?new qe(n):null},handleClick:oJ,handleKeyDown:iJ,handleDOMEvents:{beforeinput:aJ}}})}const iJ=lO({ArrowLeft:wd("horiz",-1),ArrowRight:wd("horiz",1),ArrowUp:wd("vert",-1),ArrowDown:wd("vert",1)});function wd(t,e){const n=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,s,i){let o=r.selection,a=e>0?o.$to:o.$from,l=o.empty;if(o instanceof ee){if(!i.endOfTextblock(n)||a.depth==0)return!1;l=!1,a=r.doc.resolve(e>0?a.after():a.before())}let c=qe.findGapCursorFrom(a,e,l);return c?(s&&s(r.tr.setSelection(new qe(c))),!0):!1}}function oJ(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!qe.valid(r))return!1;let s=t.posAtCoords({left:n.clientX,top:n.clientY});return s&&s.inside>-1&&X.isSelectable(t.state.doc.nodeAt(s.inside))?!1:(t.dispatch(t.state.tr.setSelection(new qe(r))),!0)}function aJ(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof qe))return!1;let{$from:n}=t.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!r)return!1;let s=P.empty;for(let o=r.length-1;o>=0;o--)s=P.from(r[o].createAndFill(null,s));let i=t.state.tr.replace(n.pos,n.pos,new W(s,0,0));return i.setSelection(ee.near(i.doc.resolve(n.pos+1))),t.dispatch(i),!1}function lJ(t){if(!(t.selection instanceof qe))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",Ne.create(t.doc,[$t.widget(t.selection.head,e,{key:"gapcursor"})])}var _f=200,ft=function(){};ft.prototype.append=function(e){return e.length?(e=ft.from(e),!this.length&&e||e.length<_f&&this.leafAppend(e)||this.length<_f&&e.leafPrepend(this)||this.appendInner(e)):this};ft.prototype.prepend=function(e){return e.length?ft.from(e).append(this):this};ft.prototype.appendInner=function(e){return new cJ(this,e)};ft.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?ft.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))};ft.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};ft.prototype.forEach=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(e,n,r,0):this.forEachInvertedInner(e,n,r,0)};ft.prototype.map=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var s=[];return this.forEach(function(i,o){return s.push(e(i,o))},n,r),s};ft.from=function(e){return e instanceof ft?e:e&&e.length?new NR(e):ft.empty};var NR=function(t){function e(r){t.call(this),this.values=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(s,i){return s==0&&i==this.length?this:new e(this.values.slice(s,i))},e.prototype.getInner=function(s){return this.values[s]},e.prototype.forEachInner=function(s,i,o,a){for(var l=i;l<o;l++)if(s(this.values[l],a+l)===!1)return!1},e.prototype.forEachInvertedInner=function(s,i,o,a){for(var l=i-1;l>=o;l--)if(s(this.values[l],a+l)===!1)return!1},e.prototype.leafAppend=function(s){if(this.length+s.length<=_f)return new e(this.values.concat(s.flatten()))},e.prototype.leafPrepend=function(s){if(this.length+s.length<=_f)return new e(s.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(ft);ft.empty=new NR([]);var cJ=function(t){function e(n,r){t.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},e.prototype.forEachInner=function(r,s,i,o){var a=this.left.length;if(s<a&&this.left.forEachInner(r,s,Math.min(i,a),o)===!1||i>a&&this.right.forEachInner(r,Math.max(s-a,0),Math.min(this.length,i)-a,o+a)===!1)return!1},e.prototype.forEachInvertedInner=function(r,s,i,o){var a=this.left.length;if(s>a&&this.right.forEachInvertedInner(r,s-a,Math.max(i,a)-a,o+a)===!1||i<a&&this.left.forEachInvertedInner(r,Math.min(s,a),i,o)===!1)return!1},e.prototype.sliceInner=function(r,s){if(r==0&&s==this.length)return this;var i=this.left.length;return s<=i?this.left.slice(r,s):r>=i?this.right.slice(r-i,s-i):this.left.slice(r,i).append(this.right.slice(0,s-i))},e.prototype.leafAppend=function(r){var s=this.right.leafAppend(r);if(s)return new e(this.left,s)},e.prototype.leafPrepend=function(r){var s=this.left.leafPrepend(r);if(s)return new e(s,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e}(ft);const uJ=500;class Yn{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let s,i;n&&(s=this.remapping(r,this.items.length),i=s.maps.length);let o=e.tr,a,l,c=[],u=[];return this.items.forEach((h,p)=>{if(!h.step){s||(s=this.remapping(r,p+1),i=s.maps.length),i--,u.push(h);return}if(s){u.push(new dr(h.map));let f=h.step.map(s.slice(i)),g;f&&o.maybeStep(f).doc&&(g=o.mapping.maps[o.mapping.maps.length-1],c.push(new dr(g,void 0,void 0,c.length+u.length))),i--,g&&s.appendMap(g,i)}else o.maybeStep(h.step);if(h.selection)return a=s?h.selection.map(s.slice(i)):h.selection,l=new Yn(this.items.slice(0,r).append(u.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:o,selection:a}}addTransform(e,n,r,s){let i=[],o=this.eventCount,a=this.items,l=!s&&a.length?a.get(a.length-1):null;for(let u=0;u<e.steps.length;u++){let h=e.steps[u].invert(e.docs[u]),p=new dr(e.mapping.maps[u],h,n),f;(f=l&&l.merge(p))&&(p=f,u?i.pop():a=a.slice(0,a.length-1)),i.push(p),n&&(o++,n=void 0),s||(l=p)}let c=o-r.depth;return c>hJ&&(a=dJ(a,c),o-=c),new Yn(a.append(i),o)}remapping(e,n){let r=new Jc;return this.items.forEach((s,i)=>{let o=s.mirrorOffset!=null&&i-s.mirrorOffset>=e?r.maps.length-s.mirrorOffset:void 0;r.appendMap(s.map,o)},e,n),r}addMaps(e){return this.eventCount==0?this:new Yn(this.items.append(e.map(n=>new dr(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],s=Math.max(0,this.items.length-n),i=e.mapping,o=e.steps.length,a=this.eventCount;this.items.forEach(p=>{p.selection&&a--},s);let l=n;this.items.forEach(p=>{let f=i.getMirror(--l);if(f==null)return;o=Math.min(o,f);let g=i.maps[f];if(p.step){let m=e.steps[f].invert(e.docs[f]),y=p.selection&&p.selection.map(i.slice(l+1,f));y&&a++,r.push(new dr(g,m,y))}else r.push(new dr(g))},s);let c=[];for(let p=n;p<o;p++)c.push(new dr(i.maps[p]));let u=this.items.slice(0,s).append(c).append(r),h=new Yn(u,a);return h.emptyItemCount()>uJ&&(h=h.compress(this.items.length-r.length)),h}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),r=n.maps.length,s=[],i=0;return this.items.forEach((o,a)=>{if(a>=e)s.push(o),o.selection&&i++;else if(o.step){let l=o.step.map(n.slice(r)),c=l&&l.getMap();if(r--,c&&n.appendMap(c,r),l){let u=o.selection&&o.selection.map(n.slice(r));u&&i++;let h=new dr(c.invert(),l,u),p,f=s.length-1;(p=s.length&&s[f].merge(h))?s[f]=p:s.push(h)}}else o.map&&r--},this.items.length,0),new Yn(ft.from(s.reverse()),i)}}Yn.empty=new Yn(ft.empty,0);function dJ(t,e){let n;return t.forEach((r,s)=>{if(r.selection&&e--==0)return n=s,!1}),t.slice(n)}class dr{constructor(e,n,r,s){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=s}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new dr(n.getMap().invert(),n,this.selection)}}}class Cs{constructor(e,n,r,s,i){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=s,this.prevComposition=i}}const hJ=20;function fJ(t,e,n,r){let s=n.getMeta(to),i;if(s)return s.historyState;n.getMeta(gJ)&&(t=new Cs(t.done,t.undone,null,0,-1));let o=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(o&&o.getMeta(to))return o.getMeta(to).redo?new Cs(t.done.addTransform(n,void 0,r,Jd(e)),t.undone,RS(n.mapping.maps),t.prevTime,t.prevComposition):new Cs(t.done,t.undone.addTransform(n,void 0,r,Jd(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(o&&o.getMeta("addToHistory")===!1)){let a=n.getMeta("composition"),l=t.prevTime==0||!o&&t.prevComposition!=a&&(t.prevTime<(n.time||0)-r.newGroupDelay||!pJ(n,t.prevRanges)),c=o?dg(t.prevRanges,n.mapping):RS(n.mapping.maps);return new Cs(t.done.addTransform(n,l?e.selection.getBookmark():void 0,r,Jd(e)),Yn.empty,c,n.time,a??t.prevComposition)}else return(i=n.getMeta("rebased"))?new Cs(t.done.rebased(n,i),t.undone.rebased(n,i),dg(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new Cs(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),dg(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function pJ(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,s)=>{for(let i=0;i<e.length;i+=2)r<=e[i+1]&&s>=e[i]&&(n=!0)}),n}function RS(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((r,s,i,o)=>e.push(i,o));return e}function dg(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let s=e.map(t[r],1),i=e.map(t[r+1],-1);s<=i&&n.push(s,i)}return n}function mJ(t,e,n){let r=Jd(e),s=to.get(e).spec.config,i=(n?t.undone:t.done).popEvent(e,r);if(!i)return null;let o=i.selection.resolve(i.transform.doc),a=(n?t.done:t.undone).addTransform(i.transform,e.selection.getBookmark(),s,r),l=new Cs(n?a:i.remaining,n?i.remaining:a,null,0,-1);return i.transform.setSelection(o).setMeta(to,{redo:n,historyState:l})}let hg=!1,MS=null;function Jd(t){let e=t.plugins;if(MS!=e){hg=!1,MS=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){hg=!0;break}}return hg}const to=new at("history"),gJ=new at("closeHistory");function yJ(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new Le({key:to,state:{init(){return new Cs(Yn.empty,Yn.empty,null,0,-1)},apply(e,n,r){return fJ(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,s=r=="historyUndo"?_R:r=="historyRedo"?jR:null;return!s||!e.editable?!1:(n.preventDefault(),s(e.state,e.dispatch))}}}})}function AR(t,e){return(n,r)=>{let s=to.getState(n);if(!s||(t?s.undone:s.done).eventCount==0)return!1;if(r){let i=mJ(s,n,t);i&&r(e?i.scrollIntoView():i)}return!0}}const _R=AR(!1,!0),jR=AR(!0,!0);Ke.create({name:"characterCount",addOptions(){return{limit:null,autoTrim:!0,mode:"textSize",textCounter:t=>t.length,wordCounter:t=>t.split(" ").filter(e=>e!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=t=>{const e=(t==null?void 0:t.node)||this.editor.state.doc;if(((t==null?void 0:t.mode)||this.options.mode)==="textSize"){const r=e.textBetween(0,e.content.size,void 0," ");return this.options.textCounter(r)}return e.nodeSize},this.storage.words=t=>{const e=(t==null?void 0:t.node)||this.editor.state.doc,n=e.textBetween(0,e.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let t=!1;return[new Le({key:new at("characterCount"),appendTransaction:(e,n,r)=>{if(t)return;const s=this.options.limit,i=this.options.autoTrim;if(s==null||s===0||i===!1){t=!0;return}const o=this.storage.characters({node:r.doc});if(o>s){const a=o-s,l=0,c=a;console.warn(`[CharacterCount] Initial content exceeded limit of ${s} characters. Content was automatically trimmed.`);const u=r.tr.deleteRange(l,c);return t=!0,u}t=!0},filterTransaction:(e,n)=>{const r=this.options.limit;if(!e.docChanged||r===0||r===null||r===void 0)return!0;const s=this.storage.characters({node:n.doc}),i=this.storage.characters({node:e.doc});if(i<=r||s>r&&i>r&&i<=s)return!0;if(s>r&&i>r&&i>s||!e.getMeta("paste"))return!1;const a=e.selection.$head.pos,l=i-r,c=a-l,u=a;return e.deleteRange(c,u),!(this.storage.characters({node:e.doc})>r)}})]}});var vJ=Ke.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[eJ(this.options)]}});Ke.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new Le({key:new at("focus"),props:{decorations:({doc:t,selection:e})=>{const{isEditable:n,isFocused:r}=this.editor,{anchor:s}=e,i=[];if(!n||!r)return Ne.create(t,[]);let o=0;this.options.mode==="deepest"&&t.descendants((l,c)=>{if(l.isText)return;if(!(s>=c&&s<=c+l.nodeSize-1))return!1;o+=1});let a=0;return t.descendants((l,c)=>{if(l.isText||!(s>=c&&s<=c+l.nodeSize-1))return!1;if(a+=1,this.options.mode==="deepest"&&o-a>0||this.options.mode==="shallowest"&&a>1)return this.options.mode==="deepest";i.push($t.node(c,c+l.nodeSize,{class:this.options.className}))}),Ne.create(t,i)}}})]}});var bJ=Ke.create({name:"gapCursor",addProseMirrorPlugins(){return[sJ()]},extendNodeSchema(t){var e;const n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=ve(Y(t,"allowGapCursor",n)))!=null?e:null}}}),OR="placeholder",PS=new at("tiptap__placeholder");function RR(t){const{editor:e,placeholder:n,dataAttribute:r,pos:s,node:i,isEmptyDoc:o,hasAnchor:a,classes:{emptyNode:l,emptyEditor:c}}=t,u=[l];return o&&u.push(c),$t.node(s,s+i.nodeSize,{class:u.join(" "),[r]:typeof n=="function"?n({editor:e,node:i,pos:s,hasAnchor:a}):n})}function MR(t,e){return typeof t=="function"?t(e):t}function PR({editor:t,options:e,dataAttribute:n,doc:r,selection:s,from:i,to:o}){const{anchor:a}=s,l=[],c=t.isEmpty;return r.nodesBetween(i,o,(u,h)=>{const p=a>
645=h&&a<=h+u.nodeSize,f=!u.isLeaf&&wu(u);return u.type.isTextblock&&(p||!e.showOnlyCurrent)&&f&&l.push(RR({editor:t,isEmptyDoc:c,dataAttribute:n,hasAnchor:p,placeholder:e.placeholder,classes:{emptyEditor:e.emptyEditorClass,emptyNode:MR(e.emptyNodeClass,{editor:t,node:u,pos:h,hasAnchor:p})},node:u,pos:h})),e.includeChildren}),l}function IR({editor:t,options:e,dataAttribute:n,doc:r,selection:s}){if(!(t.isEditable||!e.showOnlyWhenEditable))return null;const{anchor:o}=s,a=[],l=t.isEmpty;if(e.showOnlyCurrent&&!e.includeChildren){const u=r.resolve(o),h=u.depth>0?u.node(1):u.nodeAfter,p=u.depth>0?u.before(1):o;if(h&&h.type.isTextblock&&wu(h)){const f=o>=p&&o<=p+h.nodeSize;a.push(RR({editor:t,isEmptyDoc:l,dataAttribute:n,hasAnchor:f,placeholder:e.placeholder,classes:{emptyEditor:e.emptyEditorClass,emptyNode:MR(e.emptyNodeClass,{editor:t,node:h,pos:p,hasAnchor:f})},node:h,pos:p}))}}else a.push(...PR({editor:t,options:e,dataAttribute:n,doc:r,selection:s,from:0,to:r.content.size}));return Ne.create(r,a)}function dc(t,e){var n;const r=t.resolve(e);if(r.depth===0){const o=(n=r.nodeAfter)!=null?n:r.nodeBefore;if(!o)return{from:e,to:e};const a=r.nodeAfter?e:e-o.nodeSize;return{from:a,to:a+o.nodeSize}}const s=r.before(1),i=r.node(1);return{from:s,to:s+i.nodeSize}}function hc(t,e){return{from:Math.max(0,e.from-1),to:Math.min(t.content.size,e.to-1)}}function xJ(t,e,n){const r=[];return t.forEach((s,i)=>{const o=i,a=o+s.nodeSize,l=o+1,c=a+1;l<n&&c>e&&r.push({from:o,to:a})}),r}function wJ(t){if(t.length===0)return[];const e=[...t].sort((r,s)=>r.from-s.from),n=[{...e[0]}];for(let r=1;r<e.length;r+=1){const s=n[n.length-1],i=e[r];i.from<=s.to?s.to=Math.max(s.to,i.to):n.push({...i})}return n}function kJ(t,e){const n=xJ(t,e.from,e.to);return n.push(hc(t,dc(t,e.from))),e.to>e.from?n.push(hc(t,dc(t,Math.min(e.to,t.content.size+1)-1))):e.from<t.content.size+1&&n.push(hc(t,dc(t,Math.min(e.from+1,t.content.size)))),n}function SJ(t,e,n){const r=[];if(t.docChanged){const s=xb(t);for(const i of s)r.push(...kJ(n.doc,i.newRange))}return t.selectionSet&&(r.push(hc(n.doc,dc(n.doc,t.mapping.map(e.selection.anchor)))),r.push(hc(n.doc,dc(n.doc,n.selection.anchor)))),wJ(r)}function CJ(t,e,n){const r=Math.max(0,Math.min(t,n.content.size)),s=Math.max(r,Math.min(e,n.content.size));return{from:r,to:s}}function EJ({decorations:t,ranges:e,editor:n,options:r,dataAttribute:s,doc:i,selection:o}){let a=t;for(const l of e){const{from:c,to:u}=CJ(l.from,l.to,i),h=a.find(c,u).filter(f=>f.from>=c&&f.to<=u);h.length&&(a=a.remove(h));const p=PR({editor:n,options:r,dataAttribute:s,doc:i,selection:o,from:c,to:u});p.length&&(a=a.add(i,p))}return a}function TJ({editor:t,options:e,dataAttribute:n}){return{init(r,s){const i=IR({editor:t,options:e,dataAttribute:n,doc:s.doc,selection:s.selection});return i??Ne.empty},apply(r,s,i,o){if(!r.docChanged&&!r.selectionSet)return s;const a=s.map(r.mapping,r.doc),l=SJ(r,i,o);return EJ({decorations:a,ranges:l,editor:t,options:e,dataAttribute:n,doc:o.doc,selection:o.selection})}}}function NJ(t){return t.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}function AJ({editor:t,options:e}){const n=e.dataAttribute?`data-${NJ(e.dataAttribute)}`:`data-${OR}`,r=e.showOnlyCurrent&&!e.includeChildren;return new Le({key:PS,...r?{}:{state:TJ({editor:t,options:e,dataAttribute:n})},props:{decorations:r?({doc:s,selection:i})=>IR({editor:t,options:e,dataAttribute:n,doc:s,selection:i}):s=>{var i;return e.showOnlyWhenEditable&&!t.isEditable?Ne.empty:(i=PS.getState(s))!=null?i:Ne.empty}}})}Ke.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:OR,placeholder:"Write something â¦",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[AJ({editor:this.editor,options:this.options})]}});function Sv(t,e){return!t.selection.empty&&!CO(t.selection)&&e.isEditable}function _J(t,e){return Sv(t,e)&&!e.isFocused&&!e.view.dragging}function jJ(){var t;(t=window.getSelection())==null||t.removeAllRanges()}function OJ(t){t.focus()}Ke.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){const{editor:t,options:e}=this;return[new Le({key:new at("selection"),props:{decorations(n){return _J(n,t)?Ne.create(n.doc,[$t.inline(n.selection.from,n.selection.to,{class:e.className})]):null},handleDOMEvents:{blur(n){return Sv(n.state,t)&&jJ(),!1},focus(n){return Sv(n.state,t)&&requestAnimationFrame(()=>{!t.isDestroyed&&n.hasFocus()&&OJ(n)}),!1}}}})]}});var RJ="skipTrailingNode";function IS({types:t,node:e}){return e&&Array.isArray(t)&&t.includes(e.type)||(e==null?void 0:e.type)===t}var MJ=Ke.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var t;const e=new at(this.name),n=this.options.node||((t=this.editor.schema.topNodeType.contentMatch.defaultType)==null?void 0:t.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(([,s])=>s).filter(s=>(this.options.notAfter||[]).concat(n).includes(s.name));return[new Le({key:e,appendTransaction:(s,i,o)=>{const{doc:a,tr:l,schema:c}=o,u=e.getState(o),h=a.content.size,p=c.nodes[n];if(!s.some(f=>f.getMeta(RJ))&&u)return l.insert(h,p.create())},state:{init:(s,i)=>{const o=i.tr.doc.lastChild;return!IS({node:o,types:r})},apply:(s,i)=>{if(!s.docChanged||s.getMeta("__uniqueIDTransaction"))return i;const o=s.doc.lastChild;return!IS({node:o,types:r})}}})]}}),PJ=Ke.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>_R(t,e),redo:()=>({state:t,dispatch:e})=>jR(t,e)}},addProseMirrorPlugins(){return[yJ(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-Ñ":()=>this.editor.commands.undo(),"Shift-Mod-Ñ":()=>this.editor.commands.redo()}}}),IJ=Ke.create({name:"starterKit",addExtensions(){var t,e,n,r;const s=[];return this.options.bold!==!1&&s.push(wK.configure(this.options.bold)),this.options.blockquote!==!1&&s.push(gK.configure(this.options.blockquote)),this.options.bulletList!==!1&&s.push(p
645R.configure(this.options.bulletList)),this.options.code!==!1&&s.push(CK.configure(this.options.code)),this.options.codeBlock!==!1&&s.push(NK.configure(this.options.codeBlock)),this.options.document!==!1&&s.push(AK.configure(this.options.document)),this.options.dropcursor!==!1&&s.push(vJ.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&s.push(bJ.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&s.push(_K.configure(this.options.hardBreak)),this.options.heading!==!1&&s.push(jK.configure(this.options.heading)),this.options.undoRedo!==!1&&s.push(PJ.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&s.push(OK.configure(this.options.horizontalRule)),this.options.italic!==!1&&s.push(LK.configure(this.options.italic)),this.options.listItem!==!1&&s.push(bR.configure(this.options.listItem)),this.options.listKeymap!==!1&&s.push(SR.configure((t=this.options)==null?void 0:t.listKeymap)),this.options.link!==!1&&s.push(fR.configure((e=this.options)==null?void 0:e.link)),this.options.orderedList!==!1&&s.push(ER.configure(this.options.orderedList)),this.options.paragraph!==!1&&s.push(KY.configure(this.options.paragraph)),this.options.strike!==!1&&s.push(QY.configure(this.options.strike)),this.options.text!==!1&&s.push(XY.configure(this.options.text)),this.options.underline!==!1&&s.push(ZY.configure((n=this.options)==null?void 0:n.underline)),this.options.trailingNode!==!1&&s.push(MJ.configure((r=this.options)==null?void 0:r.trailingNode)),s}}),LJ=IJ,DJ=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,$J=tn.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{},resize:!1}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:t}){return["img",Qe(this.options.HTMLAttributes,t)]},parseMarkdown:(t,e)=>e.createNode("image",{src:t.href,title:t.title,alt:t.text}),renderMarkdown:t=>{var e,n,r,s,i,o;const a=(n=(e=t.attrs)==null?void 0:e.src)!=null?n:"",l=(s=(r=t.attrs)==null?void 0:r.alt)!=null?s:"",c=(o=(i=t.attrs)==null?void 0:i.title)!=null?o:"";return c?``:``},addNodeView(){if(!this.options.resize||!this.options.resize.enabled||typeof document>"u")return null;const{directions:t,minWidth:e,minHeight:n,alwaysPreserveAspectRatio:r}=this.options.resize,s=new Set(["src","width","height"]);return({node:i,getPos:o,HTMLAttributes:a,editor:l})=>{const c=document.createElement("img");c.draggable=!1;const u=Qe(this.options.HTMLAttributes,a);Object.entries(u).forEach(([y,v])=>{if(v!=null)switch(y){case"src":case"width":case"height":break;default:c.setAttribute(y,v);break}}),u.src!==null&&(c.src=u.src);let h={...a};const p=y=>{if(typeof y=="string"&&y!==""){c.getAttribute("src")!==y&&(c.src=y);return}c.hasAttribute("src")&&c.removeAttribute("src"),c.src!==""&&(c.src="")};p(a.src);const f=y=>{if(y.type!==i.type)return!1;const v=l.extensionManager.attributes.filter(x=>x.type===y.type.name),b=Ha(y,v);return Object.keys(h).forEach(x=>{!s.has(x)&&!(x in b)&&c.removeAttribute(x)}),Object.entries(b).forEach(([x,k])=>{s.has(x)||(k!=null?c.setAttribute(x,k):c.removeAttribute(x))}),p(b.src),h=b,!0},g=new sG({element:c,editor:l,node:i,getPos:o,onResize:(y,v)=>{c.style.width=`${y}px`,c.style.height=`${v}px`},onCommit:(y,v)=>{const b=o();b!==void 0&&this.editor.chain().setNodeSelection(b).updateAttributes(this.name,{width:y,height:v}).run()},onUpdate:f,options:{directions:t,min:{width:e,height:n},preserveAspectRatio:r===!0}}),m=g.dom;return m.style.visibility="hidden",m.style.pointerEvents="none",c.onload=()=>{m.style.visibility="",m.style.pointerEvents=""},g}},addCommands(){return{setImage:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t})}},addInputRules(){return[HO({find:DJ,type:this.type,getAttributes:t=>{const[,,e,n,r]=t;return{src:n,alt:e,title:r}}})]}}),zJ=$J,LR="Toggle",DR=w.forwardRef((t,e)=>
645{const{pressed:n,defaultPressed:r,onPressedChange:s,...i}=t,[o,a]=Ch({prop:n,onChange:s,defaultProp:r??!1,caller:LR});return d.jsx(be.button,{type:"button","aria-pressed":o,"data-state":o?"on":"off","data-disabled":t.disabled?"":void 0,...i,ref:e,onClick:ue(t.onClick,()=>{t.disabled||a(!o)})})});DR.displayName=LR;var $R=DR;const BJ=ep("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-3",sm:"h-9 px-2.5",lg:"h-11 px-5"}},defaultVariants:{variant:"default",size:"default"}}),ar=w.forwardRef(({className:t,variant:e,size:n,...r},s)=>d.jsx($R,{ref:s,className:rt(BJ({variant:e,size:n,className:t})),...r}));ar.displayName=$R.displayName;function FJ({content:t,onChange:e}){const[n,r]=w.useState(""),[s,i]=w.useState(""),[o,a]=w.useState(!1),[l,c]=w.useState(!1),u=w.useRef(null),h=uK({extensions:[LJ.configure({heading:{levels:[1,2,3]}}),pY.configure({openOnClick:!1}),zJ],content:t||{type:"doc",content:[{type:"paragraph"}]},editorProps:{attributes:{class:"prose prose-slate max-w-none focus:outline-none min-h-[300px] p-6"}},onUpdate:({editor:m})=>{e(m.getJSON())}});if(!h)return null;const p=()=>{n?h.chain().focus().extendMarkRange("link").setLink({href:n}).run():h.chain().focus().unsetLink().run(),r(""),a(!1)},f=()=>{s&&(h.chain().focus().setImage({src:s,alt:""}).run(),i(""),c(!1))},g=async m=>{var k;const y=(k=m.target.files)==null?void 0:k[0];if(!y)return;const{data:v,error:b}=await lk(async()=>{const{data:S,error:C}=await Promise.resolve().then(()=>F1);return{data:S,error:C}},[]).then(S=>S.supabase.storage.from("blog-covers").upload(`editor/${Date.now()}-${y.name}`,y,{cacheControl:"3600",upsert:!1}));if(b){alert(b.message);return}const{data:x}=await lk(async()=>{const{data:S}=await Promise.resolve().then(()=>F1);return{data:S}},void 0).then(S=>S.supabase.storage.from("blog-covers").createSignedUrl(v.path,60*60*24*365));x!=null&&x.signedUrl&&h.chain().focus().setImage({src:x.signedUrl,alt:y.name}).run()};return d.jsxs("div",{className:"border border-border rounded-2xl overflow-hidden bg-card",children:[d.jsxs("div",{className:"flex flex-wrap items-center gap-1 px-3 py-2 border-b border-border bg-secondary",children:[d.jsx(ar,{size:"sm",pressed:h.isActive("bold"),onPressedCh
645ange:()=>h.chain().focus().toggleBold().run(),"aria-label":"Bold",children:d.jsx(n3,{className:"w-4 h-4"})}),d.jsx(ar,{size:"sm",pressed:h.isActive("italic"),onPressedChange:()=>h.chain().focus().toggleItalic().run(),"aria-label":"Italic",children:d.jsx(b3,{className:"w-4 h-4"})}),d.jsx("div",{className:"w-px h-5 bg-border mx-1"}),d.jsx(ar,{size:"sm",pressed:h.isActive("heading",{level:1}),onPressedChange:()=>h.chain().focus().toggleHeading({level:1}).run(),"aria-label":"Heading 1",children:d.jsx(f3,{className:"w-4 h-4"})}),d.jsx(ar,{size:"sm",pressed:h.isActive("heading",{level:2}),onPressedChange:()=>h.chain().focus().toggleHeading({level:2}).run(),"aria-label":"Heading 2",children:d.jsx(p3,{className:"w-4 h-4"})}),d.jsx(ar,{size:"sm",pressed:h.isActive("heading",{level:3}),onPressedChange:()=>h.chain().focus().toggleHeading({level:3}).run(),"aria-label":"Heading 3",children:d.jsx(m3,{className:"w-4 h-4"})}),d.jsx("div",{className:"w-px h-5 bg-border mx-1"}),d.jsx(ar,{size:"sm",pressed:h.isActive("bulletList"),onPressedCh
645ange:()=>h.chain().focus().toggleBulletList().run(),"aria-label":"Bullet list",children:d.jsx(S3,{className:"w-4 h-4"})}),d.jsx(ar,{size:"sm",pressed:h.isActive("orderedList"),onPressedChange:()=>h.chain().focus().toggleOrderedList().run(),"aria-label":"Ordered list",children:d.jsx(k3,{className:"w-4 h-4"})}),d.jsx(ar,{size:"sm",pressed:h.isActive("blockquote"),onPressedChange:()=>h.chain().focus().toggleBlockquote().run(),"aria-label":"Quote",children:d.jsx(_3,{className:"w-4 h-4"})}),d.jsx(ar,{size:"sm",pressed:h.isActive("codeBlock"),onPressedChange:()=>h.chain().focus().toggleCodeBlock().run(),"aria-label":"Code block",children:d.jsx(a3,{className:"w-4 h-4"})}),d.jsx("div",{className:"w-px h-5 bg-border mx-1"}),d.jsx(qt,{type:"button",variant:"ghost",size:"sm",onClick:()=>a(!o),className:h.isActive("link")?"bg-accent text-accent-foreground":"",children:d.jsx(x3,{className:"w-4 h-4"})}),d.jsx(qt,{type:"button",variant:"ghost",size:"sm",onClick:()=>c(!l),children:d.jsx(lN,{className:"w-4 h-4"})}),d.jsx("div",{className:"w-px h-5 bg-border mx-1"}),d.jsx(qt,{type:"button",variant:"ghost",size:"sm",onClick:()=>h.chain().focus().undo().run(),children:d.jsx(F3,{className:"w-4 h-4"})}),d.jsx(qt,{type:"button",variant:"ghost",size:"sm",onClick:()=>h.chain().focus().redo().run(),children:d.jsx(j3,{className:"w-4 h-4"})})]}),o&&d.jsxs("div",{className:"px-4 py-2 border-b border-border bg-secondary flex items-center gap-2",children:[d.jsx(rn,{value:n,onChange:m=>r(m.target.value),placeholder:"https://...",className:"flex-1 rounded-lg"}),d.jsx(qt,{type:"button",size:"sm",onClick:p,className:"rounded-lg bg-cta text-cta-foreground",children:"Apply"})]}),l&&d.jsxs("div",{className:"px-4 py-2 border-b border-border bg-secondary flex items-center gap-2",children:[d.jsx(rn,{value:s,onChange:m=>i(m.target.value),placeholder:"https://... or upload",className:"flex-1 rounded-lg"}),d.jsx(qt,{type:"button",size:"sm",onClick:f,className:"rounded-lg bg-cta text-cta-foreground",children:"Add"}),d.jsx(qt,{type:"button",variant:"outline",size:"sm",onClick:()=>{var m;return(m=u.current)==null?void 0:m.click()},className:"rounded-lg",children:"Upload"}),d.jsx("input",{ref:u,type:"file",accept:"image/*",className:"hidden",onChange:g})]}),d.jsx(KO,{editor:h})]})}const LS={type:"doc",content:[{type:"paragraph"}]};function DS(){const{id:t}=Jf(),e=Ja(),n=t==="new"||!t,r=w.useRef(null),[s,i]=w.useState({title:"",slug:"",excerpt:"",content:LS,cover_image:"",category:"",meta_title:"",meta_description:"",og_image:"",status:"draft",published_at:"",scheduled_at:""}),[o,a]=w.useState(""),[l,c]=w.useState(!1),[u,h]=w.useState(!n),[p,f]=w.useState(!0);w.useEffect(()=>{(async()=>{const{data:C}=await Te.auth.getSession();if(!C.session){e("/admin/login");return}const{data:E}=await Te.from("user_roles").select("role").eq("user_id",C.session.user.id).eq("role","admin").maybeSingle();if(!E){sn.error("Admin access required."),await Te.auth.signOut(),e("/admin/login");return}f(!1),!n&&t&&g(t)})()},[t,n,e]);const g=async S=>{const{data:C,error:E}=await Te.from("posts").select("*, post_tags(tags(name))").eq("id",S).single();if(E){sn.error(E.message);return}i({...C,content:C.content||LS,published_at:C.published_at?C.published_at.slice(0,16):"",scheduled_at:C.scheduled_at?C.scheduled_at.slice(0,16):""}),Array.isArray(C.post_tags)&&a(C.post_tags.map(T=>{var N;return(N=T.tags)==null?void 0:N.name}).filter(Boolean).join(", ")),h(!1)},m=S=>S.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,""),y=S=>{const C={title:S};n&&!s.slug&&(C.slug=m(S)),i(E=>({...E,...C}))},v=async S=>{var z;const C=(z=S.target.files)==null?void 0:z[0];if(!C)return;c(!0);const E=`covers/${Date.now()}-${C.name}`,{data:T,error:N}=await Te.storage.from("blog-covers").upload(E,C,{cacheControl:"3600",upsert:!1});if(N){sn.error(N.message),c(!1);return}const{data:_}=await Te.storage.from("blog-covers").createSignedUrl(T.path,60*60*24*365*10);_!=null&&_.signedUrl&&(i(I=>({...I,cover_image:_.signedUrl,og_image:I.og_image||_.signedUrl})),sn.success("Cover image uploaded.")),c(!1)},b=async S=>{c(!0);try{const C={...s,status:S||s.status,published_at:s.status==="published"&&!s.published_at?new Date().toISOString():s.published_at,scheduled_at:s.status==="scheduled"?s.scheduled_at:null};C.slug||(C.slug=m(C.title||"untitled"));let E=null;if(n){const{data:T,error:N}=await Te.from("posts").insert(C).select().single();if(N)throw N;E=T}else{const{data:T,error:N}=await Te.from("posts").update(C).eq("id",t).select().single();if(N)throw N;E=T}await x(E.id),sn.success("Post saved."),n&&E&&e(`/admin/posts/${E.id}`,{replace:!0})}catch(C){sn.error(C.message||"Failed to save post.")}finally{c(!1)}},x=async S=>{const C=o.split(",").map(E=>
645E.trim()).filter(Boolean);await Te.from("post_tags").delete().eq("post_id",S);for(const E of C){const T=E.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,""),{data:N}=await Te.from("tags").select("id").eq("slug",T).single();let _=N==null?void 0:N.id;if(!_){const{data:z,error:I}=await Te.from("tags").insert({name:E,slug:T}).select("id").single();if(I)continue;_=z.id}await Te.from("post_tags").insert({post_id:S,tag_id:_})}},k=w.useCallback(()=>{const S=s.slug||m(s.title||"preview");window.open(`/blog/${S}?preview=1`,"_blank")},[s]);return p?d.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:d.jsx(Mi,{className:"w-8 h-8 animate-spin text-accent"})}):u?d.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:d.jsx(Mi,{className:"w-8 h-8 animate-spin text-accent"})}):d.jsxs(d.Fragment,{children:[d.jsxs(du,{children:[d.jsxs("title",{children:[n?"New post":"Edit post"," | Blog Admin | Ideation Digital"]}),d.jsx("meta",{name:"robots",content:"noindex, nofollow"})]}),d.jsxs("div",{className:"min-h-screen bg-background",children:[d.jsx("div",{className:"border-b border-border bg-card sticky top-0 z-30",children:d.jsxs("div",{className:"container-wide mx-auto px-4 lg:px-8 h-20 flex items-center justify-between",children:[d.jsxs("div",{className:"flex items-center gap-4",children:[d.jsx(ne,{to:"/admin/posts",className:"p-2 rounded-lg hover:bg-secondary transition-colors text-muted-foreground",children:d.jsx(iN,{className:"w-5 h-5"})}),d.jsx("h1",{className:"font-heading font-bold text-xl text-foreground",children:n?"New post":"Edit post"})]}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsxs(qt,{type:"button",variant:"outline",onClick:k,className:"rounded-full",children:[d.jsx(u3,{className:"w-4 h-4 mr-2"})," Preview"]}),d.jsxs(qt,{type:"button",onClick:()=>b("draft"),disabled:l,variant:"outline",className:"rounded-full",children:[l&&d.jsx(Mi,{className:"w-4 h-4 mr-2 animate-spin"}),"Save draft"]}),d.jsxs(qt,{type:"button",onClick:()=>b(s.status),disabled:l,className:"rounded-full bg-cta text-cta-foreground hover:bg-cta/90 font-semibold",children:[l&&d.jsx(Mi,{className:"w-4 h-4 mr-2 animate-spin"}),d.jsx(R3,{className:"w-4 h-4 mr-2"})," Save"]})]})]})}),d.jsx("div",{className:"container-wide mx-auto px-4 lg:px-8 py-10",children:d.jsxs("div",{className:"grid lg:grid-cols-3 gap-8",children:[d.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsx(Pt,{htmlFor:"title",children:"Title"}),d.jsx(rn,{id:"title",value:s.title,onChange:S=>y(S.target.value),placeholder:"Post title",className:"rounded-xl text-lg"})]}),d.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsx(Pt,{htmlFor:"slug",children:"Slug"}),d.jsx(rn,{id:"slug",value:s.slug,onChange:S=>i(C=>({...C,slug:S.target.value})),placeholder:"post-url-slug",className:"rounded-xl"})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Pt,{htmlFor:"category",children:"Category"}),d.jsx(rn,{id:"category",value:s.category||"",onChange:S=>i(C=>({...C,category:S.target.value})),placeholder:"AI Marketing",className:"rounded-xl"})]})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Pt,{htmlFor:"excerpt",children:"Excerpt"}),d.jsx(Dy,{id:"excerpt",value:s.excerpt||"",onChange:S=>i(C=>({...C,excerpt:S.target.value})),placeholder:"Short summary shown on the blog index and social cards",className:"rounded-xl min-h-[100px]"})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Pt,{children:"Content"}),d.jsx(FJ,{content:s.content,onChange:S=>i(C=>({...C,content:S}))})]})]}),d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"bg-card border border-border rounded-3xl p-6 space-y-5",children:[d.jsx("h3",{className:"font-heading font-bold text-lg",children:"Publishing"}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Pt,{htmlFor:"status",children:"Status"}),d.jsxs(OU,{value:s.status,onValueChange:S=>i(C=>({...C,status:S})),children:[d.jsx(O_,{id:"status",className:"rounded-xl",children:d.jsx(RU,{})}),d.jsxs(P_,{children:[d.jsx(Vd,{value:"draft",children:"Draft"}),d.jsx(Vd,{value:"scheduled",children:"Scheduled"}),d.jsx(Vd,{value:"published",children:"Published"})]})]})]}),s.status==="published"&&d.jsxs("div",{className:"space-y-2",children:[d.jsx(Pt,{htmlFor:"published_at",children:"Publish date"}),d.jsx(rn,{id:"published_at",type:"datetime-local",value:s.published_at||"",onChange:S=>i(C=>({...C,published_at:S.target.value})),className:"rounded-xl"})]}),s.status==="scheduled"&&d.jsxs("div",{className:"space-y-2",children:[d.jsx(Pt,{htmlFor:"scheduled_at",children:"Schedule for"}),d.jsx(rn,{id:"scheduled_at",type:"datetime-local",value:s.scheduled_at||"",onChange:S=>i(C=>({...C,scheduled_at:S.target.value})),className:"rounded-xl"})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Pt,{htmlFor:"tags",children:"Tags (comma separated)"}),d.jsx(rn,{id:"tags",value:o,onChange:S=>a(S.target.value),placeholder:"SEO, AI, Automation",className:"rounded-xl"})]})]}),d.jsxs("div",{className:"bg-card border border-border rounded-3xl p-6 space-y-5",children:[d.jsx("h3",{className:"font-heading font-bold text-lg",children:"Cover image"}),s.cover_image&&d.jsx("div",{className:"rounded-xl overflow-hidden border border-border",children:d.jsx("img",{src:s.cover_image,alt:"Cover preview",className:"w-full aspect-video object-cover"})}),d.jsxs(qt,{type:"button",variant:"outline",onClick:()=>{var S;return(S=r.current)==null?void 0:S.click()},className:"w-full rounded-xl",children:[d.jsx(lN,{className:"w-4 h-4 mr-2"})," Upload cover"]}),d.jsx("input",{ref:r,type:"file",accept:"image/*",className:"hidden",onChange:v})]}),d.jsxs("div",{className:"bg-card border border-border rounded-3xl p-6 space-y-5",children:[d.jsx("h3",{className:"font-heading font-bold text-lg",children:"SEO"}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Pt,{htmlFor:"meta_title",children:"Meta title"}),d.jsx(rn,{id:"meta_title",value:s.meta_title||"",onChange:S=>i(C=>({...C,meta_title:S.target.value})),placeholder:"SEO title",className:"rounded-xl"})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Pt,{htmlFor:"meta_description",children:"Meta description"}),d.jsx(Dy,{id:"meta_description",value:s.meta_description||"",onChange:S=>i(C=>({...C,meta_description:S.target.value})),placeholder:"SEO description",className:"rounded-xl min-h-[80px]"})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Pt,{htmlFor:"og_image",children:"OG image URL"}),d.jsx(rn,{id:"og_image",value:s.og_image||"",onChange:S=>i(C=>({...C,og_image:S.target.value})),placeholder:"https://...",className:"rounded-xl"})]})]})]})]})})]})]})}const WJ=new bI,HJ=["growth-systems","ai-implementation","authority-visibility"],UJ=()=>d.jsx(wI,{client:WJ,children:d.jsxs(d5,{children:[d.jsx(E4,{}),d.jsx(tD,{}),d.jsx(xL,{children:d.jsxs(fL,{children:[d.jsxs(Xe,{element:d.jsx(b5,{}),children:[d.jsx(Xe,{path:"/",element:d.jsx(j5,{})}),d.jsx(Xe,{path:"/about",element:d.jsx($5,{})}),d.jsx(Xe,{path:"/services",element:d.jsx(B5,{})}),HJ.map(t=>d.jsx(Xe,{path:`/services/${t}`,element:d.jsx(sA,{})},t)),d.jsx(Xe,{path:"/services/:slug",element:d.jsx(fz,{})}),d.jsx(Xe,{path:"/contact",element:d.jsx(n1,{})}),d.jsx(Xe,{path:"/contact-us",element:d.jsx(n1,{})}),d.jsx(Xe,{path:"/calendar",element:d.jsx(yz,{})}),d.jsx(Xe,{path:"/blog",element:d.jsx(LW,{})}),d.jsx(Xe,{path:"/blog/:slug",element:d.jsx(H6,{})}),d.jsx(Xe,{path:"/charleston",element:d.jsx(K6,{})}),d.jsx(Xe,{path:"/done-with-you",element:d.jsx(Q6,{})}),d.jsx(Xe,{path:"/privacy-policy",element:d.jsx(X6,{})}),d.jsx(Xe,{path:"*",element:d.jsx(Z6,{})})]}),d.jsx(Xe,{path:"/admin/login",element:d.jsx(sH,{})}),d.jsx(Xe,{path:"/admin/posts",element:d.jsx(iH,{})}),d.jsx(Xe,{path:"/admin/posts/new",element:d.jsx(DS,{})}),d.jsx(Xe,{path:"/admin/posts/:id",element:d.jsx(DS,{})})]})})]})});sT(document.getElementById("root")).render(d.jsx(dT,{children:d.jsx(UJ,{})}));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.