diff --git a/assets/index-X-SKIyK4.js b/assets/index-yhkldBDC.js similarity index 71% rename from assets/index-X-SKIyK4.js rename to assets/index-yhkldBDC.js index f1e401aa..67a46d76 100644 --- a/assets/index-X-SKIyK4.js +++ b/assets/index-yhkldBDC.js @@ -1,4 +1,4 @@ -function Cw(t,e){for(var n=0;ni[r]})}}}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 r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&i(s)}).observe(document,{childList:!0,subtree:!0});function n(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(r){if(r.ep)return;r.ep=!0;const o=n(r);fetch(r.href,o)}})();var C1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ss(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Y$={exports:{}},bO={},G$={exports:{}},qe={};/** +function Tw(t,e){for(var n=0;ni[r]})}}}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 r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&i(s)}).observe(document,{childList:!0,subtree:!0});function n(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(r){if(r.ep)return;r.ep=!0;const o=n(r);fetch(r.href,o)}})();var T1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function as(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Y$={exports:{}},yO={},G$={exports:{}},Ye={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ function Cw(t,e){for(var n=0;n>>1,Se=X[be];if(0>>1;ber(et,A))Ber(Bt,et)?(X[be]=Bt,X[Be]=A,be=Be):(X[be]=et,X[We]=A,be=We);else if(Ber(Bt,A))X[be]=Bt,X[Be]=A,be=Be;else break e}}return ae}function r(X,ae){var A=X.sortIndex-ae.sortIndex;return A!==0?A:X.id-ae.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();t.unstable_now=function(){return s.now()-a}}var l=[],u=[],c=1,d=null,h=3,p=!1,m=!1,O=!1,y=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(X){for(var ae=n(u);ae!==null;){if(ae.callback===null)i(u);else if(ae.startTime<=X)i(u),ae.sortIndex=ae.expirationTime,e(l,ae);else break;ae=n(u)}}function k(X){if(O=!1,S(X),!m)if(n(l)!==null)m=!0,xe(x);else{var ae=n(u);ae!==null&&Oe(k,ae.startTime-X)}}function x(X,ae){m=!1,O&&(O=!1,b(D),D=-1),p=!0;var A=h;try{for(S(ae),d=n(l);d!==null&&(!(d.expirationTime>ae)||X&&!V());){var be=d.callback;if(typeof be=="function"){d.callback=null,h=d.priorityLevel;var Se=be(d.expirationTime<=ae);ae=t.unstable_now(),typeof Se=="function"?d.callback=Se:d===n(l)&&i(l),S(ae)}else i(l);d=n(l)}if(d!==null)var L=!0;else{var We=n(u);We!==null&&Oe(k,We.startTime-ae),L=!1}return L}finally{d=null,h=A,p=!1}}var _=!1,w=null,D=-1,W=5,I=-1;function V(){return!(t.unstable_now()-IX||125be?(X.sortIndex=A,e(u,X),n(l)===null&&X===n(u)&&(O?(b(D),D=-1):O=!0,Oe(k,A-be))):(X.sortIndex=Se,e(l,X),m||p||(m=!0,xe(x))),X},t.unstable_shouldYield=V,t.unstable_wrapCallback=function(X){var ae=h;return function(){var A=h;h=ae;try{return X.apply(this,arguments)}finally{h=A}}}})(uL);lL.exports=uL;var SQ=lL.exports;/** + */(function(t){function e(Z,se){var A=Z.length;Z.push(se);e:for(;0>>1,ye=Z[Oe];if(0>>1;Oer(tt,A))Ber(Qt,tt)?(Z[Oe]=Qt,Z[Be]=A,Oe=Be):(Z[Oe]=tt,Z[Ve]=A,Oe=Ve);else if(Ber(Qt,A))Z[Oe]=Qt,Z[Be]=A,Oe=Be;else break e}}return se}function r(Z,se){var A=Z.sortIndex-se.sortIndex;return A!==0?A:Z.id-se.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();t.unstable_now=function(){return s.now()-a}}var l=[],u=[],c=1,d=null,h=3,p=!1,m=!1,O=!1,y=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(Z){for(var se=n(u);se!==null;){if(se.callback===null)i(u);else if(se.startTime<=Z)i(u),se.sortIndex=se.expirationTime,e(l,se);else break;se=n(u)}}function k(Z){if(O=!1,S(Z),!m)if(n(l)!==null)m=!0,ke(x);else{var se=n(u);se!==null&&ge(k,se.startTime-Z)}}function x(Z,se){m=!1,O&&(O=!1,b(D),D=-1),p=!0;var A=h;try{for(S(se),d=n(l);d!==null&&(!(d.expirationTime>se)||Z&&!V());){var Oe=d.callback;if(typeof Oe=="function"){d.callback=null,h=d.priorityLevel;var ye=Oe(d.expirationTime<=se);se=t.unstable_now(),typeof ye=="function"?d.callback=ye:d===n(l)&&i(l),S(se)}else i(l);d=n(l)}if(d!==null)var L=!0;else{var Ve=n(u);Ve!==null&&ge(k,Ve.startTime-se),L=!1}return L}finally{d=null,h=A,p=!1}}var _=!1,w=null,D=-1,W=5,I=-1;function V(){return!(t.unstable_now()-IZ||125Oe?(Z.sortIndex=A,e(u,Z),n(l)===null&&Z===n(u)&&(O?(b(D),D=-1):O=!0,ge(k,A-Oe))):(Z.sortIndex=ye,e(l,Z),m||p||(m=!0,ke(x))),Z},t.unstable_shouldYield=V,t.unstable_wrapCallback=function(Z){var se=h;return function(){var A=h;h=se;try{return Z.apply(this,arguments)}finally{h=A}}}})(uL);lL.exports=uL;var SQ=lL.exports;/** * @license React * react-dom.production.min.js * @@ -30,14 +30,14 @@ function Cw(t,e){for(var n=0;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),P1=Object.prototype.hasOwnProperty,kQ=/^[: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]*$/,P_={},A_={};function xQ(t){return P1.call(A_,t)?!0:P1.call(P_,t)?!1:kQ.test(t)?A_[t]=!0:(P_[t]=!0,!1)}function _Q(t,e,n,i){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return i?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function EQ(t,e,n,i){if(e===null||typeof e>"u"||_Q(t,e,n,i))return!0;if(i)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 ri(t,e,n,i,r,o,s){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=i,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=o,this.removeEmptyString=s}var An={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){An[t]=new ri(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];An[e]=new ri(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){An[t]=new ri(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){An[t]=new ri(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){An[t]=new ri(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){An[t]=new ri(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){An[t]=new ri(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){An[t]=new ri(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){An[t]=new ri(t,5,!1,t.toLowerCase(),null,!1,!1)});var Iw=/[\-:]([a-z])/g;function $w(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(Iw,$w);An[e]=new ri(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(Iw,$w);An[e]=new ri(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(Iw,$w);An[e]=new ri(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){An[t]=new ri(t,1,!1,t.toLowerCase(),null,!1,!1)});An.xlinkHref=new ri("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){An[t]=new ri(t,1,!1,t.toLowerCase(),null,!0,!0)});function Lw(t,e,n,i){var r=An.hasOwnProperty(e)?An[e]:null;(r!==null?r.type!==0:i||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),A1=Object.prototype.hasOwnProperty,kQ=/^[: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]*$/,P_={},A_={};function xQ(t){return A1.call(A_,t)?!0:A1.call(P_,t)?!1:kQ.test(t)?A_[t]=!0:(P_[t]=!0,!1)}function _Q(t,e,n,i){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return i?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function EQ(t,e,n,i){if(e===null||typeof e>"u"||_Q(t,e,n,i))return!0;if(i)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 ri(t,e,n,i,r,o,s){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=i,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=o,this.removeEmptyString=s}var Pn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Pn[t]=new ri(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Pn[e]=new ri(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Pn[t]=new ri(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Pn[t]=new ri(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){Pn[t]=new ri(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Pn[t]=new ri(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Pn[t]=new ri(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Pn[t]=new ri(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Pn[t]=new ri(t,5,!1,t.toLowerCase(),null,!1,!1)});var $w=/[\-:]([a-z])/g;function Lw(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($w,Lw);Pn[e]=new ri(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($w,Lw);Pn[e]=new ri(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($w,Lw);Pn[e]=new ri(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Pn[t]=new ri(t,1,!1,t.toLowerCase(),null,!1,!1)});Pn.xlinkHref=new ri("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Pn[t]=new ri(t,1,!1,t.toLowerCase(),null,!0,!0)});function Nw(t,e,n,i){var r=Pn.hasOwnProperty(e)?Pn[e]:null;(r!==null?r.type!==0:i||!(2a||r[s]!==o[a]){var l=` -`+r[s].replace(" at new "," at ");return t.displayName&&l.includes("")&&(l=l.replace("",t.displayName)),l}while(1<=s&&0<=a);break}}}finally{zb=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?Fh(t):""}function CQ(t){switch(t.tag){case 5:return Fh(t.type);case 16:return Fh("Lazy");case 13:return Fh("Suspense");case 19:return Fh("SuspenseList");case 0:case 2:case 15:return t=Hb(t.type,!1),t;case 11:return t=Hb(t.type.render,!1),t;case 1:return t=Hb(t.type,!0),t;default:return""}}function $1(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 wc:return"Fragment";case Sc:return"Portal";case A1:return"Profiler";case Nw:return"StrictMode";case R1:return"Suspense";case I1:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case hL:return(t.displayName||"Context")+".Consumer";case dL:return(t._context.displayName||"Context")+".Provider";case Mw:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Dw:return e=t.displayName||null,e!==null?e:$1(t.type)||"Memo";case Ds:e=t._payload,t=t._init;try{return $1(t(e))}catch{}}return null}function TQ(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 $1(e);case 8:return e===Nw?"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 ua(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function pL(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function PQ(t){var e=pL(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),i=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var r=n.get,o=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return r.call(this)},set:function(s){i=""+s,o.call(this,s)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return i},setValue:function(s){i=""+s},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Yp(t){t._valueTracker||(t._valueTracker=PQ(t))}function mL(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),i="";return t&&(i=pL(t)?t.checked?"true":"false":t.value),t=i,t!==n?(e.setValue(t),!0):!1}function t0(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 L1(t,e){var n=e.checked;return Dt({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function I_(t,e){var n=e.defaultValue==null?"":e.defaultValue,i=e.checked!=null?e.checked:e.defaultChecked;n=ua(e.value!=null?e.value:n),t._wrapperState={initialChecked:i,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function gL(t,e){e=e.checked,e!=null&&Lw(t,"checked",e,!1)}function N1(t,e){gL(t,e);var n=ua(e.value),i=e.type;if(n!=null)i==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(i==="submit"||i==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?M1(t,e.type,n):e.hasOwnProperty("defaultValue")&&M1(t,e.type,ua(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function $_(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var i=e.type;if(!(i!=="submit"&&i!=="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 M1(t,e,n){(e!=="number"||t0(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var zh=Array.isArray;function Bc(t,e,n,i){if(t=t.options,e){e={};for(var r=0;r"+e.valueOf().toString()+"",e=Gp.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Ef(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var Kh={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},AQ=["Webkit","ms","Moz","O"];Object.keys(Kh).forEach(function(t){AQ.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Kh[e]=Kh[t]})});function vL(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||Kh.hasOwnProperty(t)&&Kh[t]?(""+e).trim():e+"px"}function SL(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var i=n.indexOf("--")===0,r=vL(n,e[n],i);n==="float"&&(n="cssFloat"),i?t.setProperty(n,r):t[n]=r}}var RQ=Dt({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 Q1(t,e){if(e){if(RQ[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(ee(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(ee(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(ee(61))}if(e.style!=null&&typeof e.style!="object")throw Error(ee(62))}}function F1(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 z1=null;function Bw(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var H1=null,Qc=null,Fc=null;function M_(t){if(t=xp(t)){if(typeof H1!="function")throw Error(ee(280));var e=t.stateNode;e&&(e=kO(e),H1(t.stateNode,t.type,e))}}function wL(t){Qc?Fc?Fc.push(t):Fc=[t]:Qc=t}function kL(){if(Qc){var t=Qc,e=Fc;if(Fc=Qc=null,M_(t),e)for(t=0;t>>=0,t===0?32:31-(HQ(t)/UQ|0)|0}var Kp=64,Jp=4194304;function Hh(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 o0(t,e){var n=t.pendingLanes;if(n===0)return 0;var i=0,r=t.suspendedLanes,o=t.pingedLanes,s=n&268435455;if(s!==0){var a=s&~r;a!==0?i=Hh(a):(o&=s,o!==0&&(i=Hh(o)))}else s=n&~r,s!==0?i=Hh(s):o!==0&&(i=Hh(o));if(i===0)return 0;if(e!==0&&e!==i&&!(e&r)&&(r=i&-i,o=e&-e,r>=o||r===16&&(o&4194240)!==0))return e;if(i&4&&(i|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=i;0n;n++)e.push(t);return e}function wp(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Lr(e),t[e]=n}function XQ(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 i=t.eventTimes;for(t=t.expirationTimes;0=ef),V_=" ",j_=!1;function UL(t,e){switch(t){case"keyup":return SF.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function WL(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var kc=!1;function kF(t,e){switch(t){case"compositionend":return WL(e);case"keypress":return e.which!==32?null:(j_=!0,V_);case"textInput":return t=e.data,t===V_&&j_?null:t;default:return null}}function xF(t,e){if(kc)return t==="compositionend"||!jw&&UL(t,e)?(t=zL(),Sg=Uw=Ws=null,kc=!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)return{node:n,offset:e-t};t=i}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Y_(n)}}function ZL(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?ZL(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function qL(){for(var t=window,e=t0();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=t0(t.document)}return e}function Xw(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 $F(t){var e=qL(),n=t.focusedElem,i=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&ZL(n.ownerDocument.documentElement,n)){if(i!==null&&Xw(n)){if(e=i.start,t=i.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 r=n.textContent.length,o=Math.min(i.start,r);i=i.end===void 0?o:Math.min(i.end,r),!t.extend&&o>i&&(r=i,i=o,o=r),r=G_(n,o);var s=G_(n,i);r&&s&&(t.rangeCount!==1||t.anchorNode!==r.node||t.anchorOffset!==r.offset||t.focusNode!==s.node||t.focusOffset!==s.offset)&&(e=e.createRange(),e.setStart(r.node,r.offset),t.removeAllRanges(),o>i?(t.addRange(e),t.extend(s.node,s.offset)):(e.setEnd(s.node,s.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=document.documentMode,xc=null,Z1=null,nf=null,q1=!1;function K_(t,e,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;q1||xc==null||xc!==t0(i)||(i=xc,"selectionStart"in i&&Xw(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),nf&&If(nf,i)||(nf=i,i=l0(Z1,"onSelect"),0Cc||(t.current=tv[Cc],tv[Cc]=null,Cc--)}function vt(t,e){Cc++,tv[Cc]=t.current,t.current=e}var ca={},zn=ba(ca),yi=ba(!1),ql=ca;function id(t,e){var n=t.type.contextTypes;if(!n)return ca;var i=t.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===e)return i.__reactInternalMemoizedMaskedChildContext;var r={},o;for(o in n)r[o]=e[o];return i&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=r),r}function vi(t){return t=t.childContextTypes,t!=null}function c0(){kt(yi),kt(zn)}function oE(t,e,n){if(zn.current!==ca)throw Error(ee(168));vt(zn,e),vt(yi,n)}function rN(t,e,n){var i=t.stateNode;if(e=e.childContextTypes,typeof i.getChildContext!="function")return n;i=i.getChildContext();for(var r in i)if(!(r in e))throw Error(ee(108,TQ(t)||"Unknown",r));return Dt({},n,i)}function d0(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||ca,ql=zn.current,vt(zn,t),vt(yi,yi.current),!0}function sE(t,e,n){var i=t.stateNode;if(!i)throw Error(ee(169));n?(t=rN(t,e,ql),i.__reactInternalMemoizedMergedChildContext=t,kt(yi),kt(zn),vt(zn,t)):kt(yi),vt(yi,n)}var Ho=null,xO=!1,ny=!1;function oN(t){Ho===null?Ho=[t]:Ho.push(t)}function VF(t){xO=!0,oN(t)}function ya(){if(!ny&&Ho!==null){ny=!0;var t=0,e=ct;try{var n=Ho;for(ct=1;t>=s,r-=s,Wo=1<<32-Lr(e)+r|n<D?(W=w,w=null):W=w.sibling;var I=h(b,w,S[D],k);if(I===null){w===null&&(w=W);break}t&&w&&I.alternate===null&&e(b,w),v=o(I,v,D),_===null?x=I:_.sibling=I,_=I,w=W}if(D===S.length)return n(b,w),At&&Al(b,D),x;if(w===null){for(;DD?(W=w,w=null):W=w.sibling;var V=h(b,w,I.value,k);if(V===null){w===null&&(w=W);break}t&&w&&V.alternate===null&&e(b,w),v=o(V,v,D),_===null?x=V:_.sibling=V,_=V,w=W}if(I.done)return n(b,w),At&&Al(b,D),x;if(w===null){for(;!I.done;D++,I=S.next())I=d(b,I.value,k),I!==null&&(v=o(I,v,D),_===null?x=I:_.sibling=I,_=I);return At&&Al(b,D),x}for(w=i(b,w);!I.done;D++,I=S.next())I=p(w,b,D,I.value,k),I!==null&&(t&&I.alternate!==null&&w.delete(I.key===null?D:I.key),v=o(I,v,D),_===null?x=I:_.sibling=I,_=I);return t&&w.forEach(function(B){return e(b,B)}),At&&Al(b,D),x}function y(b,v,S,k){if(typeof S=="object"&&S!==null&&S.type===wc&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case qp:e:{for(var x=S.key,_=v;_!==null;){if(_.key===x){if(x=S.type,x===wc){if(_.tag===7){n(b,_.sibling),v=r(_,S.props.children),v.return=b,b=v;break e}}else if(_.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===Ds&&uE(x)===_.type){n(b,_.sibling),v=r(_,S.props),v.ref=gh(b,_,S),v.return=b,b=v;break e}n(b,_);break}else e(b,_);_=_.sibling}S.type===wc?(v=Xl(S.props.children,b.mode,k,S.key),v.return=b,b=v):(k=Pg(S.type,S.key,S.props,null,b.mode,k),k.ref=gh(b,v,S),k.return=b,b=k)}return s(b);case Sc:e:{for(_=S.key;v!==null;){if(v.key===_)if(v.tag===4&&v.stateNode.containerInfo===S.containerInfo&&v.stateNode.implementation===S.implementation){n(b,v.sibling),v=r(v,S.children||[]),v.return=b,b=v;break e}else{n(b,v);break}else e(b,v);v=v.sibling}v=cy(S,b.mode,k),v.return=b,b=v}return s(b);case Ds:return _=S._init,y(b,v,_(S._payload),k)}if(zh(S))return m(b,v,S,k);if(dh(S))return O(b,v,S,k);sm(b,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,v!==null&&v.tag===6?(n(b,v.sibling),v=r(v,S),v.return=b,b=v):(n(b,v),v=uy(S,b.mode,k),v.return=b,b=v),s(b)):n(b,v)}return y}var od=uN(!0),cN=uN(!1),p0=ba(null),m0=null,Ac=null,Gw=null;function Kw(){Gw=Ac=m0=null}function Jw(t){var e=p0.current;kt(p0),t._currentValue=e}function rv(t,e,n){for(;t!==null;){var i=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,i!==null&&(i.childLanes|=e)):i!==null&&(i.childLanes&e)!==e&&(i.childLanes|=e),t===n)break;t=t.return}}function Hc(t,e){m0=t,Gw=Ac=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(mi=!0),t.firstContext=null)}function dr(t){var e=t._currentValue;if(Gw!==t)if(t={context:t,memoizedValue:e,next:null},Ac===null){if(m0===null)throw Error(ee(308));Ac=t,m0.dependencies={lanes:0,firstContext:t}}else Ac=Ac.next=t;return e}var Bl=null;function ek(t){Bl===null?Bl=[t]:Bl.push(t)}function dN(t,e,n,i){var r=e.interleaved;return r===null?(n.next=n,ek(e)):(n.next=r.next,r.next=n),e.interleaved=n,es(t,i)}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 Bs=!1;function tk(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function hN(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 Xo(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function ea(t,e,n){var i=t.updateQueue;if(i===null)return null;if(i=i.shared,nt&2){var r=i.pending;return r===null?e.next=e:(e.next=r.next,r.next=e),i.pending=e,es(t,n)}return r=i.interleaved,r===null?(e.next=e,ek(i)):(e.next=r.next,r.next=e),i.interleaved=e,es(t,n)}function kg(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var i=e.lanes;i&=t.pendingLanes,n|=i,e.lanes=n,Fw(t,n)}}function cE(t,e){var n=t.updateQueue,i=t.alternate;if(i!==null&&(i=i.updateQueue,n===i)){var r=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?r=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?r=o=e:o=o.next=e}else r=o=e;n={baseState:i.baseState,firstBaseUpdate:r,lastBaseUpdate:o,shared:i.shared,effects:i.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function g0(t,e,n,i){var r=t.updateQueue;Bs=!1;var o=r.firstBaseUpdate,s=r.lastBaseUpdate,a=r.shared.pending;if(a!==null){r.shared.pending=null;var l=a,u=l.next;l.next=null,s===null?o=u:s.next=u,s=l;var c=t.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==s&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(o!==null){var d=r.baseState;s=0,c=u=l=null,a=o;do{var h=a.lane,p=a.eventTime;if((i&h)===h){c!==null&&(c=c.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var m=t,O=a;switch(h=e,p=n,O.tag){case 1:if(m=O.payload,typeof m=="function"){d=m.call(p,d,h);break e}d=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=O.payload,h=typeof m=="function"?m.call(p,d,h):m,h==null)break e;d=Dt({},d,h);break e;case 2:Bs=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,h=r.effects,h===null?r.effects=[a]:h.push(a))}else p={eventTime:p,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=p,l=d):c=c.next=p,s|=h;if(a=a.next,a===null){if(a=r.shared.pending,a===null)break;h=a,a=h.next,h.next=null,r.lastBaseUpdate=h,r.shared.pending=null}}while(!0);if(c===null&&(l=d),r.baseState=l,r.firstBaseUpdate=u,r.lastBaseUpdate=c,e=r.shared.interleaved,e!==null){r=e;do s|=r.lane,r=r.next;while(r!==e)}else o===null&&(r.shared.lanes=0);Kl|=s,t.lanes=s,t.memoizedState=d}}function dE(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;en?n:4,t(!0);var i=ry.transition;ry.transition={};try{t(!1),e()}finally{ct=n,ry.transition=i}}function PN(){return hr().memoizedState}function qF(t,e,n){var i=na(t);if(n={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null},AN(t))RN(e,n);else if(n=dN(t,e,n,i),n!==null){var r=ei();Nr(n,t,i,r),IN(n,e,i)}}function YF(t,e,n){var i=na(t),r={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null};if(AN(t))RN(e,r);else{var o=t.alternate;if(t.lanes===0&&(o===null||o.lanes===0)&&(o=e.lastRenderedReducer,o!==null))try{var s=e.lastRenderedState,a=o(s,n);if(r.hasEagerState=!0,r.eagerState=a,Br(a,s)){var l=e.interleaved;l===null?(r.next=r,ek(e)):(r.next=l.next,l.next=r),e.interleaved=r;return}}catch{}finally{}n=dN(t,e,r,i),n!==null&&(r=ei(),Nr(n,t,i,r),IN(n,e,i))}}function AN(t){var e=t.alternate;return t===Mt||e!==null&&e===Mt}function RN(t,e){rf=b0=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function IN(t,e,n){if(n&4194240){var i=e.lanes;i&=t.pendingLanes,n|=i,e.lanes=n,Fw(t,n)}}var y0={readContext:dr,useCallback:Rn,useContext:Rn,useEffect:Rn,useImperativeHandle:Rn,useInsertionEffect:Rn,useLayoutEffect:Rn,useMemo:Rn,useReducer:Rn,useRef:Rn,useState:Rn,useDebugValue:Rn,useDeferredValue:Rn,useTransition:Rn,useMutableSource:Rn,useSyncExternalStore:Rn,useId:Rn,unstable_isNewReconciler:!1},GF={readContext:dr,useCallback:function(t,e){return ro().memoizedState=[t,e===void 0?null:e],t},useContext:dr,useEffect:fE,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,_g(4194308,4,xN.bind(null,e,t),n)},useLayoutEffect:function(t,e){return _g(4194308,4,t,e)},useInsertionEffect:function(t,e){return _g(4,2,t,e)},useMemo:function(t,e){var n=ro();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var i=ro();return e=n!==void 0?n(e):e,i.memoizedState=i.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},i.queue=t,t=t.dispatch=qF.bind(null,Mt,t),[i.memoizedState,t]},useRef:function(t){var e=ro();return t={current:t},e.memoizedState=t},useState:hE,useDebugValue:uk,useDeferredValue:function(t){return ro().memoizedState=t},useTransition:function(){var t=hE(!1),e=t[0];return t=ZF.bind(null,t[1]),ro().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var i=Mt,r=ro();if(At){if(n===void 0)throw Error(ee(407));n=n()}else{if(n=e(),mn===null)throw Error(ee(349));Gl&30||gN(i,e,n)}r.memoizedState=n;var o={value:n,getSnapshot:e};return r.queue=o,fE(bN.bind(null,i,o,t),[t]),i.flags|=2048,Ff(9,ON.bind(null,i,o,n,e),void 0,null),n},useId:function(){var t=ro(),e=mn.identifierPrefix;if(At){var n=Vo,i=Wo;n=(i&~(1<<32-Lr(i)-1)).toString(32)+n,e=":"+e+"R"+n,n=Bf++,0")&&(l=l.replace("",t.displayName)),l}while(1<=s&&0<=a);break}}}finally{Hb=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?zh(t):""}function CQ(t){switch(t.tag){case 5:return zh(t.type);case 16:return zh("Lazy");case 13:return zh("Suspense");case 19:return zh("SuspenseList");case 0:case 2:case 15:return t=Ub(t.type,!1),t;case 11:return t=Ub(t.type.render,!1),t;case 1:return t=Ub(t.type,!0),t;default:return""}}function L1(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 kc:return"Fragment";case wc:return"Portal";case R1:return"Profiler";case Mw:return"StrictMode";case I1:return"Suspense";case $1:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case hL:return(t.displayName||"Context")+".Consumer";case dL:return(t._context.displayName||"Context")+".Provider";case Dw:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Bw:return e=t.displayName||null,e!==null?e:L1(t.type)||"Memo";case Bs:e=t._payload,t=t._init;try{return L1(t(e))}catch{}}return null}function TQ(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 L1(e);case 8:return e===Mw?"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 ca(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function pL(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function PQ(t){var e=pL(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),i=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var r=n.get,o=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return r.call(this)},set:function(s){i=""+s,o.call(this,s)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return i},setValue:function(s){i=""+s},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Gp(t){t._valueTracker||(t._valueTracker=PQ(t))}function mL(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),i="";return t&&(i=pL(t)?t.checked?"true":"false":t.value),t=i,t!==n?(e.setValue(t),!0):!1}function n0(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 N1(t,e){var n=e.checked;return Bt({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function I_(t,e){var n=e.defaultValue==null?"":e.defaultValue,i=e.checked!=null?e.checked:e.defaultChecked;n=ca(e.value!=null?e.value:n),t._wrapperState={initialChecked:i,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function gL(t,e){e=e.checked,e!=null&&Nw(t,"checked",e,!1)}function M1(t,e){gL(t,e);var n=ca(e.value),i=e.type;if(n!=null)i==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(i==="submit"||i==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?D1(t,e.type,n):e.hasOwnProperty("defaultValue")&&D1(t,e.type,ca(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function $_(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var i=e.type;if(!(i!=="submit"&&i!=="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 D1(t,e,n){(e!=="number"||n0(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var Hh=Array.isArray;function Qc(t,e,n,i){if(t=t.options,e){e={};for(var r=0;r"+e.valueOf().toString()+"",e=Kp.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Cf(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var Jh={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},AQ=["Webkit","ms","Moz","O"];Object.keys(Jh).forEach(function(t){AQ.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Jh[e]=Jh[t]})});function vL(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||Jh.hasOwnProperty(t)&&Jh[t]?(""+e).trim():e+"px"}function SL(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var i=n.indexOf("--")===0,r=vL(n,e[n],i);n==="float"&&(n="cssFloat"),i?t.setProperty(n,r):t[n]=r}}var RQ=Bt({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 F1(t,e){if(e){if(RQ[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(ee(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(ee(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(ee(61))}if(e.style!=null&&typeof e.style!="object")throw Error(ee(62))}}function z1(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 H1=null;function Qw(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var U1=null,Fc=null,zc=null;function M_(t){if(t=_p(t)){if(typeof U1!="function")throw Error(ee(280));var e=t.stateNode;e&&(e=xO(e),U1(t.stateNode,t.type,e))}}function wL(t){Fc?zc?zc.push(t):zc=[t]:Fc=t}function kL(){if(Fc){var t=Fc,e=zc;if(zc=Fc=null,M_(t),e)for(t=0;t>>=0,t===0?32:31-(HQ(t)/UQ|0)|0}var Jp=64,em=4194304;function Uh(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 s0(t,e){var n=t.pendingLanes;if(n===0)return 0;var i=0,r=t.suspendedLanes,o=t.pingedLanes,s=n&268435455;if(s!==0){var a=s&~r;a!==0?i=Uh(a):(o&=s,o!==0&&(i=Uh(o)))}else s=n&~r,s!==0?i=Uh(s):o!==0&&(i=Uh(o));if(i===0)return 0;if(e!==0&&e!==i&&!(e&r)&&(r=i&-i,o=e&-e,r>=o||r===16&&(o&4194240)!==0))return e;if(i&4&&(i|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=i;0n;n++)e.push(t);return e}function kp(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Lr(e),t[e]=n}function XQ(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 i=t.eventTimes;for(t=t.expirationTimes;0=tf),V_=" ",j_=!1;function UL(t,e){switch(t){case"keyup":return SF.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function WL(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var xc=!1;function kF(t,e){switch(t){case"compositionend":return WL(e);case"keypress":return e.which!==32?null:(j_=!0,V_);case"textInput":return t=e.data,t===V_&&j_?null:t;default:return null}}function xF(t,e){if(xc)return t==="compositionend"||!Xw&&UL(t,e)?(t=zL(),wg=Ww=Vs=null,xc=!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)return{node:n,offset:e-t};t=i}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Y_(n)}}function ZL(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?ZL(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function qL(){for(var t=window,e=n0();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=n0(t.document)}return e}function Zw(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 $F(t){var e=qL(),n=t.focusedElem,i=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&ZL(n.ownerDocument.documentElement,n)){if(i!==null&&Zw(n)){if(e=i.start,t=i.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 r=n.textContent.length,o=Math.min(i.start,r);i=i.end===void 0?o:Math.min(i.end,r),!t.extend&&o>i&&(r=i,i=o,o=r),r=G_(n,o);var s=G_(n,i);r&&s&&(t.rangeCount!==1||t.anchorNode!==r.node||t.anchorOffset!==r.offset||t.focusNode!==s.node||t.focusOffset!==s.offset)&&(e=e.createRange(),e.setStart(r.node,r.offset),t.removeAllRanges(),o>i?(t.addRange(e),t.extend(s.node,s.offset)):(e.setEnd(s.node,s.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=document.documentMode,_c=null,q1=null,rf=null,Y1=!1;function K_(t,e,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Y1||_c==null||_c!==n0(i)||(i=_c,"selectionStart"in i&&Zw(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),rf&&$f(rf,i)||(rf=i,i=u0(q1,"onSelect"),0Tc||(t.current=nv[Tc],nv[Tc]=null,Tc--)}function St(t,e){Tc++,nv[Tc]=t.current,t.current=e}var da={},zn=ya(da),bi=ya(!1),Gl=da;function rd(t,e){var n=t.type.contextTypes;if(!n)return da;var i=t.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===e)return i.__reactInternalMemoizedMaskedChildContext;var r={},o;for(o in n)r[o]=e[o];return i&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=r),r}function yi(t){return t=t.childContextTypes,t!=null}function d0(){xt(bi),xt(zn)}function oE(t,e,n){if(zn.current!==da)throw Error(ee(168));St(zn,e),St(bi,n)}function rN(t,e,n){var i=t.stateNode;if(e=e.childContextTypes,typeof i.getChildContext!="function")return n;i=i.getChildContext();for(var r in i)if(!(r in e))throw Error(ee(108,TQ(t)||"Unknown",r));return Bt({},n,i)}function h0(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||da,Gl=zn.current,St(zn,t),St(bi,bi.current),!0}function sE(t,e,n){var i=t.stateNode;if(!i)throw Error(ee(169));n?(t=rN(t,e,Gl),i.__reactInternalMemoizedMergedChildContext=t,xt(bi),xt(zn),St(zn,t)):xt(bi),St(bi,n)}var Uo=null,_O=!1,iy=!1;function oN(t){Uo===null?Uo=[t]:Uo.push(t)}function VF(t){_O=!0,oN(t)}function va(){if(!iy&&Uo!==null){iy=!0;var t=0,e=dt;try{var n=Uo;for(dt=1;t>=s,r-=s,Vo=1<<32-Lr(e)+r|n<D?(W=w,w=null):W=w.sibling;var I=h(b,w,S[D],k);if(I===null){w===null&&(w=W);break}t&&w&&I.alternate===null&&e(b,w),v=o(I,v,D),_===null?x=I:_.sibling=I,_=I,w=W}if(D===S.length)return n(b,w),At&&Il(b,D),x;if(w===null){for(;DD?(W=w,w=null):W=w.sibling;var V=h(b,w,I.value,k);if(V===null){w===null&&(w=W);break}t&&w&&V.alternate===null&&e(b,w),v=o(V,v,D),_===null?x=V:_.sibling=V,_=V,w=W}if(I.done)return n(b,w),At&&Il(b,D),x;if(w===null){for(;!I.done;D++,I=S.next())I=d(b,I.value,k),I!==null&&(v=o(I,v,D),_===null?x=I:_.sibling=I,_=I);return At&&Il(b,D),x}for(w=i(b,w);!I.done;D++,I=S.next())I=p(w,b,D,I.value,k),I!==null&&(t&&I.alternate!==null&&w.delete(I.key===null?D:I.key),v=o(I,v,D),_===null?x=I:_.sibling=I,_=I);return t&&w.forEach(function(B){return e(b,B)}),At&&Il(b,D),x}function y(b,v,S,k){if(typeof S=="object"&&S!==null&&S.type===kc&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case Yp:e:{for(var x=S.key,_=v;_!==null;){if(_.key===x){if(x=S.type,x===kc){if(_.tag===7){n(b,_.sibling),v=r(_,S.props.children),v.return=b,b=v;break e}}else if(_.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===Bs&&uE(x)===_.type){n(b,_.sibling),v=r(_,S.props),v.ref=Oh(b,_,S),v.return=b,b=v;break e}n(b,_);break}else e(b,_);_=_.sibling}S.type===kc?(v=ql(S.props.children,b.mode,k,S.key),v.return=b,b=v):(k=Ag(S.type,S.key,S.props,null,b.mode,k),k.ref=Oh(b,v,S),k.return=b,b=k)}return s(b);case wc:e:{for(_=S.key;v!==null;){if(v.key===_)if(v.tag===4&&v.stateNode.containerInfo===S.containerInfo&&v.stateNode.implementation===S.implementation){n(b,v.sibling),v=r(v,S.children||[]),v.return=b,b=v;break e}else{n(b,v);break}else e(b,v);v=v.sibling}v=dy(S,b.mode,k),v.return=b,b=v}return s(b);case Bs:return _=S._init,y(b,v,_(S._payload),k)}if(Hh(S))return m(b,v,S,k);if(hh(S))return O(b,v,S,k);am(b,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,v!==null&&v.tag===6?(n(b,v.sibling),v=r(v,S),v.return=b,b=v):(n(b,v),v=cy(S,b.mode,k),v.return=b,b=v),s(b)):n(b,v)}return y}var sd=uN(!0),cN=uN(!1),m0=ya(null),g0=null,Rc=null,Kw=null;function Jw(){Kw=Rc=g0=null}function ek(t){var e=m0.current;xt(m0),t._currentValue=e}function ov(t,e,n){for(;t!==null;){var i=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,i!==null&&(i.childLanes|=e)):i!==null&&(i.childLanes&e)!==e&&(i.childLanes|=e),t===n)break;t=t.return}}function Uc(t,e){g0=t,Kw=Rc=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(pi=!0),t.firstContext=null)}function cr(t){var e=t._currentValue;if(Kw!==t)if(t={context:t,memoizedValue:e,next:null},Rc===null){if(g0===null)throw Error(ee(308));Rc=t,g0.dependencies={lanes:0,firstContext:t}}else Rc=Rc.next=t;return e}var Fl=null;function tk(t){Fl===null?Fl=[t]:Fl.push(t)}function dN(t,e,n,i){var r=e.interleaved;return r===null?(n.next=n,tk(e)):(n.next=r.next,r.next=n),e.interleaved=n,ts(t,i)}function ts(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 Qs=!1;function nk(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function hN(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 Zo(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function ta(t,e,n){var i=t.updateQueue;if(i===null)return null;if(i=i.shared,it&2){var r=i.pending;return r===null?e.next=e:(e.next=r.next,r.next=e),i.pending=e,ts(t,n)}return r=i.interleaved,r===null?(e.next=e,tk(i)):(e.next=r.next,r.next=e),i.interleaved=e,ts(t,n)}function xg(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var i=e.lanes;i&=t.pendingLanes,n|=i,e.lanes=n,zw(t,n)}}function cE(t,e){var n=t.updateQueue,i=t.alternate;if(i!==null&&(i=i.updateQueue,n===i)){var r=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?r=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?r=o=e:o=o.next=e}else r=o=e;n={baseState:i.baseState,firstBaseUpdate:r,lastBaseUpdate:o,shared:i.shared,effects:i.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function O0(t,e,n,i){var r=t.updateQueue;Qs=!1;var o=r.firstBaseUpdate,s=r.lastBaseUpdate,a=r.shared.pending;if(a!==null){r.shared.pending=null;var l=a,u=l.next;l.next=null,s===null?o=u:s.next=u,s=l;var c=t.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==s&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(o!==null){var d=r.baseState;s=0,c=u=l=null,a=o;do{var h=a.lane,p=a.eventTime;if((i&h)===h){c!==null&&(c=c.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var m=t,O=a;switch(h=e,p=n,O.tag){case 1:if(m=O.payload,typeof m=="function"){d=m.call(p,d,h);break e}d=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=O.payload,h=typeof m=="function"?m.call(p,d,h):m,h==null)break e;d=Bt({},d,h);break e;case 2:Qs=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,h=r.effects,h===null?r.effects=[a]:h.push(a))}else p={eventTime:p,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=p,l=d):c=c.next=p,s|=h;if(a=a.next,a===null){if(a=r.shared.pending,a===null)break;h=a,a=h.next,h.next=null,r.lastBaseUpdate=h,r.shared.pending=null}}while(!0);if(c===null&&(l=d),r.baseState=l,r.firstBaseUpdate=u,r.lastBaseUpdate=c,e=r.shared.interleaved,e!==null){r=e;do s|=r.lane,r=r.next;while(r!==e)}else o===null&&(r.shared.lanes=0);eu|=s,t.lanes=s,t.memoizedState=d}}function dE(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;en?n:4,t(!0);var i=oy.transition;oy.transition={};try{t(!1),e()}finally{dt=n,oy.transition=i}}function PN(){return dr().memoizedState}function qF(t,e,n){var i=ia(t);if(n={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null},AN(t))RN(e,n);else if(n=dN(t,e,n,i),n!==null){var r=ei();Nr(n,t,i,r),IN(n,e,i)}}function YF(t,e,n){var i=ia(t),r={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null};if(AN(t))RN(e,r);else{var o=t.alternate;if(t.lanes===0&&(o===null||o.lanes===0)&&(o=e.lastRenderedReducer,o!==null))try{var s=e.lastRenderedState,a=o(s,n);if(r.hasEagerState=!0,r.eagerState=a,Br(a,s)){var l=e.interleaved;l===null?(r.next=r,tk(e)):(r.next=l.next,l.next=r),e.interleaved=r;return}}catch{}finally{}n=dN(t,e,r,i),n!==null&&(r=ei(),Nr(n,t,i,r),IN(n,e,i))}}function AN(t){var e=t.alternate;return t===Dt||e!==null&&e===Dt}function RN(t,e){of=y0=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function IN(t,e,n){if(n&4194240){var i=e.lanes;i&=t.pendingLanes,n|=i,e.lanes=n,zw(t,n)}}var v0={readContext:cr,useCallback:Rn,useContext:Rn,useEffect:Rn,useImperativeHandle:Rn,useInsertionEffect:Rn,useLayoutEffect:Rn,useMemo:Rn,useReducer:Rn,useRef:Rn,useState:Rn,useDebugValue:Rn,useDeferredValue:Rn,useTransition:Rn,useMutableSource:Rn,useSyncExternalStore:Rn,useId:Rn,unstable_isNewReconciler:!1},GF={readContext:cr,useCallback:function(t,e){return ao().memoizedState=[t,e===void 0?null:e],t},useContext:cr,useEffect:fE,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,Eg(4194308,4,xN.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Eg(4194308,4,t,e)},useInsertionEffect:function(t,e){return Eg(4,2,t,e)},useMemo:function(t,e){var n=ao();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var i=ao();return e=n!==void 0?n(e):e,i.memoizedState=i.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},i.queue=t,t=t.dispatch=qF.bind(null,Dt,t),[i.memoizedState,t]},useRef:function(t){var e=ao();return t={current:t},e.memoizedState=t},useState:hE,useDebugValue:ck,useDeferredValue:function(t){return ao().memoizedState=t},useTransition:function(){var t=hE(!1),e=t[0];return t=ZF.bind(null,t[1]),ao().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var i=Dt,r=ao();if(At){if(n===void 0)throw Error(ee(407));n=n()}else{if(n=e(),pn===null)throw Error(ee(349));Jl&30||gN(i,e,n)}r.memoizedState=n;var o={value:n,getSnapshot:e};return r.queue=o,fE(bN.bind(null,i,o,t),[t]),i.flags|=2048,zf(9,ON.bind(null,i,o,n,e),void 0,null),n},useId:function(){var t=ao(),e=pn.identifierPrefix;if(At){var n=jo,i=Vo;n=(i&~(1<<32-Lr(i)-1)).toString(32)+n,e=":"+e+"R"+n,n=Qf++,0<\/script>",t=t.removeChild(t.firstChild)):typeof i.is=="string"?t=s.createElement(n,{is:i.is}):(t=s.createElement(n),n==="select"&&(s=t,i.multiple?s.multiple=!0:i.size&&(s.size=i.size))):t=s.createElementNS(t,n),t[lo]=e,t[Nf]=i,HN(t,e,!1,!1),e.stateNode=t;e:{switch(s=F1(n,i),n){case"dialog":St("cancel",t),St("close",t),r=i;break;case"iframe":case"object":case"embed":St("load",t),r=i;break;case"video":case"audio":for(r=0;rld&&(e.flags|=128,i=!0,Oh(o,!1),e.lanes=4194304)}else{if(!i)if(t=O0(s),t!==null){if(e.flags|=128,i=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),Oh(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!At)return In(e),null}else 2*Ut()-o.renderingStartTime>ld&&n!==1073741824&&(e.flags|=128,i=!0,Oh(o,!1),e.lanes=4194304);o.isBackwards?(s.sibling=e.child,e.child=s):(n=o.last,n!==null?n.sibling=s:e.child=s,o.last=s)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=Ut(),e.sibling=null,n=Nt.current,vt(Nt,i?n&1|2:n&1),e):(In(e),null);case 22:case 23:return mk(),i=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==i&&(e.flags|=8192),i&&e.mode&1?Ri&1073741824&&(In(e),e.subtreeFlags&6&&(e.flags|=8192)):In(e),null;case 24:return null;case 25:return null}throw Error(ee(156,e.tag))}function oz(t,e){switch(qw(e),e.tag){case 1:return vi(e.type)&&c0(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return sd(),kt(yi),kt(zn),rk(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return ik(e),null;case 13:if(kt(Nt),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(ee(340));rd()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return kt(Nt),null;case 4:return sd(),null;case 10:return Jw(e.type._context),null;case 22:case 23:return mk(),null;case 24:return null;default:return null}}var lm=!1,Mn=!1,sz=typeof WeakSet=="function"?WeakSet:Set,ce=null;function Rc(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(i){Ft(t,e,i)}else n.current=null}function fv(t,e,n){try{n()}catch(i){Ft(t,e,i)}}var xE=!1;function az(t,e){if(Y1=s0,t=qL(),Xw(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var r=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,u=0,c=0,d=t,h=null;t:for(;;){for(var p;d!==n||r!==0&&d.nodeType!==3||(a=s+r),d!==o||i!==0&&d.nodeType!==3||(l=s+i),d.nodeType===3&&(s+=d.nodeValue.length),(p=d.firstChild)!==null;)h=d,d=p;for(;;){if(d===t)break t;if(h===n&&++u===r&&(a=s),h===o&&++c===i&&(l=s),(p=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=p}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(G1={focusedElem:t,selectionRange:n},s0=!1,ce=e;ce!==null;)if(e=ce,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,ce=t;else for(;ce!==null;){e=ce;try{var m=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var O=m.memoizedProps,y=m.memoizedState,b=e.stateNode,v=b.getSnapshotBeforeUpdate(e.elementType===e.type?O:kr(e.type,O),y);b.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var S=e.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ee(163))}}catch(k){Ft(e,e.return,k)}if(t=e.sibling,t!==null){t.return=e.return,ce=t;break}ce=e.return}return m=xE,xE=!1,m}function of(t,e,n){var i=e.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var r=i=i.next;do{if((r.tag&t)===t){var o=r.destroy;r.destroy=void 0,o!==void 0&&fv(e,n,o)}r=r.next}while(r!==i)}}function CO(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 i=n.create;n.destroy=i()}n=n.next}while(n!==e)}}function pv(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 VN(t){var e=t.alternate;e!==null&&(t.alternate=null,VN(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[lo],delete e[Nf],delete e[ev],delete e[UF],delete e[WF])),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 jN(t){return t.tag===5||t.tag===3||t.tag===4}function _E(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||jN(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 mv(t,e,n){var i=t.tag;if(i===5||i===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=u0));else if(i!==4&&(t=t.child,t!==null))for(mv(t,e,n),t=t.sibling;t!==null;)mv(t,e,n),t=t.sibling}function gv(t,e,n){var i=t.tag;if(i===5||i===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(i!==4&&(t=t.child,t!==null))for(gv(t,e,n),t=t.sibling;t!==null;)gv(t,e,n),t=t.sibling}var Sn=null,xr=!1;function bs(t,e,n){for(n=n.child;n!==null;)XN(t,e,n),n=n.sibling}function XN(t,e,n){if(Oo&&typeof Oo.onCommitFiberUnmount=="function")try{Oo.onCommitFiberUnmount(yO,n)}catch{}switch(n.tag){case 5:Mn||Rc(n,e);case 6:var i=Sn,r=xr;Sn=null,bs(t,e,n),Sn=i,xr=r,Sn!==null&&(xr?(t=Sn,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):Sn.removeChild(n.stateNode));break;case 18:Sn!==null&&(xr?(t=Sn,n=n.stateNode,t.nodeType===8?ty(t.parentNode,n):t.nodeType===1&&ty(t,n),Af(t)):ty(Sn,n.stateNode));break;case 4:i=Sn,r=xr,Sn=n.stateNode.containerInfo,xr=!0,bs(t,e,n),Sn=i,xr=r;break;case 0:case 11:case 14:case 15:if(!Mn&&(i=n.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){r=i=i.next;do{var o=r,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&fv(n,e,s),r=r.next}while(r!==i)}bs(t,e,n);break;case 1:if(!Mn&&(Rc(n,e),i=n.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=n.memoizedProps,i.state=n.memoizedState,i.componentWillUnmount()}catch(a){Ft(n,e,a)}bs(t,e,n);break;case 21:bs(t,e,n);break;case 22:n.mode&1?(Mn=(i=Mn)||n.memoizedState!==null,bs(t,e,n),Mn=i):bs(t,e,n);break;default:bs(t,e,n)}}function EE(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new sz),e.forEach(function(i){var r=gz.bind(null,t,i);n.has(i)||(n.add(i),i.then(r,r))})}}function yr(t,e){var n=e.deletions;if(n!==null)for(var i=0;ir&&(r=s),i&=~o}if(i=r,i=Ut()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*uz(i/1960))-i,10t?16:t,Vs===null)var i=!1;else{if(t=Vs,Vs=null,w0=0,nt&6)throw Error(ee(331));var r=nt;for(nt|=4,ce=t.current;ce!==null;){var o=ce,s=o.child;if(ce.flags&16){var a=o.deletions;if(a!==null){for(var l=0;lUt()-fk?jl(t,0):hk|=n),Si(t,e)}function t5(t,e){e===0&&(t.mode&1?(e=Jp,Jp<<=1,!(Jp&130023424)&&(Jp=4194304)):e=1);var n=ei();t=es(t,e),t!==null&&(wp(t,e,n),Si(t,n))}function mz(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),t5(t,n)}function gz(t,e){var n=0;switch(t.tag){case 13:var i=t.stateNode,r=t.memoizedState;r!==null&&(n=r.retryLane);break;case 19:i=t.stateNode;break;default:throw Error(ee(314))}i!==null&&i.delete(e),t5(t,n)}var n5;n5=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||yi.current)mi=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return mi=!1,iz(t,e,n);mi=!!(t.flags&131072)}else mi=!1,At&&e.flags&1048576&&sN(e,f0,e.index);switch(e.lanes=0,e.tag){case 2:var i=e.type;Eg(t,e),t=e.pendingProps;var r=id(e,zn.current);Hc(e,n),r=sk(null,e,i,t,r,n);var o=ak();return e.flags|=1,typeof r=="object"&&r!==null&&typeof r.render=="function"&&r.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,vi(i)?(o=!0,d0(e)):o=!1,e.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,tk(e),r.updater=EO,e.stateNode=r,r._reactInternals=e,sv(e,i,t,n),e=uv(null,e,i,!0,o,n)):(e.tag=0,At&&o&&Zw(e),Zn(null,e,r,n),e=e.child),e;case 16:i=e.elementType;e:{switch(Eg(t,e),t=e.pendingProps,r=i._init,i=r(i._payload),e.type=i,r=e.tag=bz(i),t=kr(i,t),r){case 0:e=lv(null,e,i,t,n);break e;case 1:e=SE(null,e,i,t,n);break e;case 11:e=yE(null,e,i,t,n);break e;case 14:e=vE(null,e,i,kr(i.type,t),n);break e}throw Error(ee(306,i,""))}return e;case 0:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:kr(i,r),lv(t,e,i,r,n);case 1:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:kr(i,r),SE(t,e,i,r,n);case 3:e:{if(QN(e),t===null)throw Error(ee(387));i=e.pendingProps,o=e.memoizedState,r=o.element,hN(t,e),g0(e,i,null,n);var s=e.memoizedState;if(i=s.element,o.isDehydrated)if(o={element:i,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},e.updateQueue.baseState=o,e.memoizedState=o,e.flags&256){r=ad(Error(ee(423)),e),e=wE(t,e,i,n,r);break e}else if(i!==r){r=ad(Error(ee(424)),e),e=wE(t,e,i,n,r);break e}else for(Mi=Js(e.stateNode.containerInfo.firstChild),Fi=e,At=!0,Er=null,n=cN(e,null,i,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(rd(),i===r){e=ts(t,e,n);break e}Zn(t,e,i,n)}e=e.child}return e;case 5:return fN(e),t===null&&iv(e),i=e.type,r=e.pendingProps,o=t!==null?t.memoizedProps:null,s=r.children,K1(i,r)?s=null:o!==null&&K1(i,o)&&(e.flags|=32),BN(t,e),Zn(t,e,s,n),e.child;case 6:return t===null&&iv(e),null;case 13:return FN(t,e,n);case 4:return nk(e,e.stateNode.containerInfo),i=e.pendingProps,t===null?e.child=od(e,null,i,n):Zn(t,e,i,n),e.child;case 11:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:kr(i,r),yE(t,e,i,r,n);case 7:return Zn(t,e,e.pendingProps,n),e.child;case 8:return Zn(t,e,e.pendingProps.children,n),e.child;case 12:return Zn(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(i=e.type._context,r=e.pendingProps,o=e.memoizedProps,s=r.value,vt(p0,i._currentValue),i._currentValue=s,o!==null)if(Br(o.value,s)){if(o.children===r.children&&!yi.current){e=ts(t,e,n);break e}}else for(o=e.child,o!==null&&(o.return=e);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var l=a.firstContext;l!==null;){if(l.context===i){if(o.tag===1){l=Xo(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),rv(o.return,n,e),a.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===e.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(ee(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),rv(s,n,e),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===e){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Zn(t,e,r.children,n),e=e.child}return e;case 9:return r=e.type,i=e.pendingProps.children,Hc(e,n),r=dr(r),i=i(r),e.flags|=1,Zn(t,e,i,n),e.child;case 14:return i=e.type,r=kr(i,e.pendingProps),r=kr(i.type,r),vE(t,e,i,r,n);case 15:return MN(t,e,e.type,e.pendingProps,n);case 17:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:kr(i,r),Eg(t,e),e.tag=1,vi(i)?(t=!0,d0(e)):t=!1,Hc(e,n),$N(e,i,r),sv(e,i,r,n),uv(null,e,i,!0,t,n);case 19:return zN(t,e,n);case 22:return DN(t,e,n)}throw Error(ee(156,e.tag))};function i5(t,e){return AL(t,e)}function Oz(t,e,n,i){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=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function rr(t,e,n,i){return new Oz(t,e,n,i)}function Ok(t){return t=t.prototype,!(!t||!t.isReactComponent)}function bz(t){if(typeof t=="function")return Ok(t)?1:0;if(t!=null){if(t=t.$$typeof,t===Mw)return 11;if(t===Dw)return 14}return 2}function ia(t,e){var n=t.alternate;return n===null?(n=rr(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 Pg(t,e,n,i,r,o){var s=2;if(i=t,typeof t=="function")Ok(t)&&(s=1);else if(typeof t=="string")s=5;else e:switch(t){case wc:return Xl(n.children,r,o,e);case Nw:s=8,r|=8;break;case A1:return t=rr(12,n,e,r|2),t.elementType=A1,t.lanes=o,t;case R1:return t=rr(13,n,e,r),t.elementType=R1,t.lanes=o,t;case I1:return t=rr(19,n,e,r),t.elementType=I1,t.lanes=o,t;case fL:return PO(n,r,o,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case dL:s=10;break e;case hL:s=9;break e;case Mw:s=11;break e;case Dw:s=14;break e;case Ds:s=16,i=null;break e}throw Error(ee(130,t==null?t:typeof t,""))}return e=rr(s,n,e,r),e.elementType=t,e.type=i,e.lanes=o,e}function Xl(t,e,n,i){return t=rr(7,t,i,e),t.lanes=n,t}function PO(t,e,n,i){return t=rr(22,t,i,e),t.elementType=fL,t.lanes=n,t.stateNode={isHidden:!1},t}function uy(t,e,n){return t=rr(6,t,null,e),t.lanes=n,t}function cy(t,e,n){return e=rr(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function yz(t,e,n,i,r){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=Wb(0),this.expirationTimes=Wb(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Wb(0),this.identifierPrefix=i,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function bk(t,e,n,i,r,o,s,a,l){return t=new yz(t,e,n,a,l),e===1?(e=1,o===!0&&(e|=8)):e=0,o=rr(3,null,null,e),t.current=o,o.stateNode=t,o.memoizedState={element:i,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},tk(o),t}function vz(t,e,n){var i=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a5)}catch(t){console.error(t)}}a5(),aL.exports=Ui;var LO=aL.exports;const Ep=ss(LO),_z=Cw({__proto__:null,default:Ep},[LO]);var l5,wk,LE=LO;wk=e0.createRoot=LE.createRoot,l5=e0.hydrateRoot=LE.hydrateRoot;const Ez=Cw({__proto__:null,get createRoot(){return wk},default:e0,get hydrateRoot(){return l5}},[e0]);/** +`+o.stack}return{value:t,source:e,stack:r,digest:null}}function ly(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function lv(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var ez=typeof WeakMap=="function"?WeakMap:Map;function LN(t,e,n){n=Zo(-1,n),n.tag=3,n.payload={element:null};var i=e.value;return n.callback=function(){w0||(w0=!0,bv=i),lv(t,e)},n}function NN(t,e,n){n=Zo(-1,n),n.tag=3;var i=t.type.getDerivedStateFromError;if(typeof i=="function"){var r=e.value;n.payload=function(){return i(r)},n.callback=function(){lv(t,e)}}var o=t.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){lv(t,e),typeof i!="function"&&(na===null?na=new Set([this]):na.add(this));var s=e.stack;this.componentDidCatch(e.value,{componentStack:s!==null?s:""})}),n}function gE(t,e,n){var i=t.pingCache;if(i===null){i=t.pingCache=new ez;var r=new Set;i.set(e,r)}else r=i.get(e),r===void 0&&(r=new Set,i.set(e,r));r.has(n)||(r.add(n),t=pz.bind(null,t,e,n),e.then(t,t))}function OE(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 bE(t,e,n,i,r){return t.mode&1?(t.flags|=65536,t.lanes=r,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=Zo(-1,1),e.tag=2,ta(n,e,1))),n.lanes|=1),t)}var tz=ls.ReactCurrentOwner,pi=!1;function Zn(t,e,n,i){e.child=t===null?cN(e,null,n,i):sd(e,t.child,n,i)}function yE(t,e,n,i,r){n=n.render;var o=e.ref;return Uc(e,r),i=ak(t,e,n,i,o,r),n=lk(),t!==null&&!pi?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~r,ns(t,e,r)):(At&&n&&qw(e),e.flags|=1,Zn(t,e,i,r),e.child)}function vE(t,e,n,i,r){if(t===null){var o=n.type;return typeof o=="function"&&!bk(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=o,MN(t,e,o,i,r)):(t=Ag(n.type,null,i,e,e.mode,r),t.ref=e.ref,t.return=e,e.child=t)}if(o=t.child,!(t.lanes&r)){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:$f,n(s,i)&&t.ref===e.ref)return ns(t,e,r)}return e.flags|=1,t=ra(o,i),t.ref=e.ref,t.return=e,e.child=t}function MN(t,e,n,i,r){if(t!==null){var o=t.memoizedProps;if($f(o,i)&&t.ref===e.ref)if(pi=!1,e.pendingProps=i=o,(t.lanes&r)!==0)t.flags&131072&&(pi=!0);else return e.lanes=t.lanes,ns(t,e,r)}return uv(t,e,n,i,r)}function DN(t,e,n){var i=e.pendingProps,r=i.children,o=t!==null?t.memoizedState:null;if(i.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},St($c,Ai),Ai|=n;else{if(!(n&1073741824))return t=o!==null?o.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,St($c,Ai),Ai|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=o!==null?o.baseLanes:n,St($c,Ai),Ai|=i}else o!==null?(i=o.baseLanes|n,e.memoizedState=null):i=n,St($c,Ai),Ai|=i;return Zn(t,e,r,n),e.child}function BN(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function uv(t,e,n,i,r){var o=yi(n)?Gl:zn.current;return o=rd(e,o),Uc(e,r),n=ak(t,e,n,i,o,r),i=lk(),t!==null&&!pi?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~r,ns(t,e,r)):(At&&i&&qw(e),e.flags|=1,Zn(t,e,n,r),e.child)}function SE(t,e,n,i,r){if(yi(n)){var o=!0;h0(e)}else o=!1;if(Uc(e,r),e.stateNode===null)Cg(t,e),$N(e,n,i),av(e,n,i,r),i=!0;else if(t===null){var s=e.stateNode,a=e.memoizedProps;s.props=a;var l=s.context,u=n.contextType;typeof u=="object"&&u!==null?u=cr(u):(u=yi(n)?Gl:zn.current,u=rd(e,u));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof s.getSnapshotBeforeUpdate=="function";d||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==i||l!==u)&&mE(e,s,i,u),Qs=!1;var h=e.memoizedState;s.state=h,O0(e,i,s,r),l=e.memoizedState,a!==i||h!==l||bi.current||Qs?(typeof c=="function"&&(sv(e,n,c,i),l=e.memoizedState),(a=Qs||pE(e,n,a,i,h,l,u))?(d||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(e.flags|=4194308)):(typeof s.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=i,e.memoizedState=l),s.props=i,s.state=l,s.context=u,i=a):(typeof s.componentDidMount=="function"&&(e.flags|=4194308),i=!1)}else{s=e.stateNode,hN(t,e),a=e.memoizedProps,u=e.type===e.elementType?a:kr(e.type,a),s.props=u,d=e.pendingProps,h=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=cr(l):(l=yi(n)?Gl:zn.current,l=rd(e,l));var p=n.getDerivedStateFromProps;(c=typeof p=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==d||h!==l)&&mE(e,s,i,l),Qs=!1,h=e.memoizedState,s.state=h,O0(e,i,s,r);var m=e.memoizedState;a!==d||h!==m||bi.current||Qs?(typeof p=="function"&&(sv(e,n,p,i),m=e.memoizedState),(u=Qs||pE(e,n,u,i,h,m,l)||!1)?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(i,m,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(i,m,l)),typeof s.componentDidUpdate=="function"&&(e.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=1024),e.memoizedProps=i,e.memoizedState=m),s.props=i,s.state=m,s.context=l,i=u):(typeof s.componentDidUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=1024),i=!1)}return cv(t,e,n,i,o,r)}function cv(t,e,n,i,r,o){BN(t,e);var s=(e.flags&128)!==0;if(!i&&!s)return r&&sE(e,n,!1),ns(t,e,o);i=e.stateNode,tz.current=e;var a=s&&typeof n.getDerivedStateFromError!="function"?null:i.render();return e.flags|=1,t!==null&&s?(e.child=sd(e,t.child,null,o),e.child=sd(e,null,a,o)):Zn(t,e,a,o),e.memoizedState=i.state,r&&sE(e,n,!0),e.child}function QN(t){var e=t.stateNode;e.pendingContext?oE(t,e.pendingContext,e.pendingContext!==e.context):e.context&&oE(t,e.context,!1),ik(t,e.containerInfo)}function wE(t,e,n,i,r){return od(),Gw(r),e.flags|=256,Zn(t,e,n,i),e.child}var dv={dehydrated:null,treeContext:null,retryLane:0};function hv(t){return{baseLanes:t,cachePool:null,transitions:null}}function FN(t,e,n){var i=e.pendingProps,r=Mt.current,o=!1,s=(e.flags&128)!==0,a;if((a=s)||(a=t!==null&&t.memoizedState===null?!1:(r&2)!==0),a?(o=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(r|=1),St(Mt,r&1),t===null)return rv(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):(s=i.children,t=i.fallback,o?(i=e.mode,o=e.child,s={mode:"hidden",children:s},!(i&1)&&o!==null?(o.childLanes=0,o.pendingProps=s):o=AO(s,i,0,null),t=ql(t,i,n,null),o.return=e,t.return=e,o.sibling=t,e.child=o,e.child.memoizedState=hv(n),e.memoizedState=dv,t):dk(e,s));if(r=t.memoizedState,r!==null&&(a=r.dehydrated,a!==null))return nz(t,e,s,i,a,r,n);if(o){o=i.fallback,s=e.mode,r=t.child,a=r.sibling;var l={mode:"hidden",children:i.children};return!(s&1)&&e.child!==r?(i=e.child,i.childLanes=0,i.pendingProps=l,e.deletions=null):(i=ra(r,l),i.subtreeFlags=r.subtreeFlags&14680064),a!==null?o=ra(a,o):(o=ql(o,s,n,null),o.flags|=2),o.return=e,i.return=e,i.sibling=o,e.child=i,i=o,o=e.child,s=t.child.memoizedState,s=s===null?hv(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=t.childLanes&~n,e.memoizedState=dv,i}return o=t.child,t=o.sibling,i=ra(o,{mode:"visible",children:i.children}),!(e.mode&1)&&(i.lanes=n),i.return=e,i.sibling=null,t!==null&&(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=i,e.memoizedState=null,i}function dk(t,e){return e=AO({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function lm(t,e,n,i){return i!==null&&Gw(i),sd(e,t.child,null,n),t=dk(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function nz(t,e,n,i,r,o,s){if(n)return e.flags&256?(e.flags&=-257,i=ly(Error(ee(422))),lm(t,e,s,i)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(o=i.fallback,r=e.mode,i=AO({mode:"visible",children:i.children},r,0,null),o=ql(o,r,s,null),o.flags|=2,i.return=e,o.return=e,i.sibling=o,e.child=i,e.mode&1&&sd(e,t.child,null,s),e.child.memoizedState=hv(s),e.memoizedState=dv,o);if(!(e.mode&1))return lm(t,e,s,null);if(r.data==="$!"){if(i=r.nextSibling&&r.nextSibling.dataset,i)var a=i.dgst;return i=a,o=Error(ee(419)),i=ly(o,i,void 0),lm(t,e,s,i)}if(a=(s&t.childLanes)!==0,pi||a){if(i=pn,i!==null){switch(s&-s){case 4:r=2;break;case 16:r=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:r=32;break;case 536870912:r=268435456;break;default:r=0}r=r&(i.suspendedLanes|s)?0:r,r!==0&&r!==o.retryLane&&(o.retryLane=r,ts(t,r),Nr(i,t,r,-1))}return Ok(),i=ly(Error(ee(421))),lm(t,e,s,i)}return r.data==="$?"?(e.flags|=128,e.child=t.child,e=mz.bind(null,t),r._reactRetry=e,null):(t=o.treeContext,Ni=ea(r.nextSibling),Qi=e,At=!0,Er=null,t!==null&&(Gi[Ki++]=Vo,Gi[Ki++]=jo,Gi[Ki++]=Kl,Vo=t.id,jo=t.overflow,Kl=e),e=dk(e,i.children),e.flags|=4096,e)}function kE(t,e,n){t.lanes|=e;var i=t.alternate;i!==null&&(i.lanes|=e),ov(t.return,e,n)}function uy(t,e,n,i,r){var o=t.memoizedState;o===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:i,tail:n,tailMode:r}:(o.isBackwards=e,o.rendering=null,o.renderingStartTime=0,o.last=i,o.tail=n,o.tailMode=r)}function zN(t,e,n){var i=e.pendingProps,r=i.revealOrder,o=i.tail;if(Zn(t,e,i.children,n),i=Mt.current,i&2)i=i&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&&kE(t,n,e);else if(t.tag===19)kE(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}i&=1}if(St(Mt,i),!(e.mode&1))e.memoizedState=null;else switch(r){case"forwards":for(n=e.child,r=null;n!==null;)t=n.alternate,t!==null&&b0(t)===null&&(r=n),n=n.sibling;n=r,n===null?(r=e.child,e.child=null):(r=n.sibling,n.sibling=null),uy(e,!1,r,n,o);break;case"backwards":for(n=null,r=e.child,e.child=null;r!==null;){if(t=r.alternate,t!==null&&b0(t)===null){e.child=r;break}t=r.sibling,r.sibling=n,n=r,r=t}uy(e,!0,n,null,o);break;case"together":uy(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function Cg(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function ns(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),eu|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(ee(153));if(e.child!==null){for(t=e.child,n=ra(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=ra(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function iz(t,e,n){switch(e.tag){case 3:QN(e),od();break;case 5:fN(e);break;case 1:yi(e.type)&&h0(e);break;case 4:ik(e,e.stateNode.containerInfo);break;case 10:var i=e.type._context,r=e.memoizedProps.value;St(m0,i._currentValue),i._currentValue=r;break;case 13:if(i=e.memoizedState,i!==null)return i.dehydrated!==null?(St(Mt,Mt.current&1),e.flags|=128,null):n&e.child.childLanes?FN(t,e,n):(St(Mt,Mt.current&1),t=ns(t,e,n),t!==null?t.sibling:null);St(Mt,Mt.current&1);break;case 19:if(i=(n&e.childLanes)!==0,t.flags&128){if(i)return zN(t,e,n);e.flags|=128}if(r=e.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),St(Mt,Mt.current),i)break;return null;case 22:case 23:return e.lanes=0,DN(t,e,n)}return ns(t,e,n)}var HN,fv,UN,WN;HN=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}};fv=function(){};UN=function(t,e,n,i){var r=t.memoizedProps;if(r!==i){t=e.stateNode,zl(So.current);var o=null;switch(n){case"input":r=N1(t,r),i=N1(t,i),o=[];break;case"select":r=Bt({},r,{value:void 0}),i=Bt({},i,{value:void 0}),o=[];break;case"textarea":r=B1(t,r),i=B1(t,i),o=[];break;default:typeof r.onClick!="function"&&typeof i.onClick=="function"&&(t.onclick=c0)}F1(n,i);var s;n=null;for(u in r)if(!i.hasOwnProperty(u)&&r.hasOwnProperty(u)&&r[u]!=null)if(u==="style"){var a=r[u];for(s in a)a.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Ef.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in i){var l=i[u];if(a=r!=null?r[u]:void 0,i.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(s in a)!a.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in l)l.hasOwnProperty(s)&&a[s]!==l[s]&&(n||(n={}),n[s]=l[s])}else n||(o||(o=[]),o.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(o=o||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Ef.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&wt("scroll",t),o||a===l||(o=[])):(o=o||[]).push(u,l))}n&&(o=o||[]).push("style",n);var u=o;(e.updateQueue=u)&&(e.flags|=4)}};WN=function(t,e,n,i){n!==i&&(e.flags|=4)};function bh(t,e){if(!At)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 i=null;n!==null;)n.alternate!==null&&(i=n),n=n.sibling;i===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:i.sibling=null}}function In(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,i=0;if(e)for(var r=t.child;r!==null;)n|=r.lanes|r.childLanes,i|=r.subtreeFlags&14680064,i|=r.flags&14680064,r.return=t,r=r.sibling;else for(r=t.child;r!==null;)n|=r.lanes|r.childLanes,i|=r.subtreeFlags,i|=r.flags,r.return=t,r=r.sibling;return t.subtreeFlags|=i,t.childLanes=n,e}function rz(t,e,n){var i=e.pendingProps;switch(Yw(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return In(e),null;case 1:return yi(e.type)&&d0(),In(e),null;case 3:return i=e.stateNode,ad(),xt(bi),xt(zn),ok(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(t===null||t.child===null)&&(sm(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Er!==null&&(Sv(Er),Er=null))),fv(t,e),In(e),null;case 5:rk(e);var r=zl(Bf.current);if(n=e.type,t!==null&&e.stateNode!=null)UN(t,e,n,i,r),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!i){if(e.stateNode===null)throw Error(ee(166));return In(e),null}if(t=zl(So.current),sm(e)){i=e.stateNode,n=e.type;var o=e.memoizedProps;switch(i[ho]=e,i[Mf]=o,t=(e.mode&1)!==0,n){case"dialog":wt("cancel",i),wt("close",i);break;case"iframe":case"object":case"embed":wt("load",i);break;case"video":case"audio":for(r=0;r<\/script>",t=t.removeChild(t.firstChild)):typeof i.is=="string"?t=s.createElement(n,{is:i.is}):(t=s.createElement(n),n==="select"&&(s=t,i.multiple?s.multiple=!0:i.size&&(s.size=i.size))):t=s.createElementNS(t,n),t[ho]=e,t[Mf]=i,HN(t,e,!1,!1),e.stateNode=t;e:{switch(s=z1(n,i),n){case"dialog":wt("cancel",t),wt("close",t),r=i;break;case"iframe":case"object":case"embed":wt("load",t),r=i;break;case"video":case"audio":for(r=0;rud&&(e.flags|=128,i=!0,bh(o,!1),e.lanes=4194304)}else{if(!i)if(t=b0(s),t!==null){if(e.flags|=128,i=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),bh(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!At)return In(e),null}else 2*Wt()-o.renderingStartTime>ud&&n!==1073741824&&(e.flags|=128,i=!0,bh(o,!1),e.lanes=4194304);o.isBackwards?(s.sibling=e.child,e.child=s):(n=o.last,n!==null?n.sibling=s:e.child=s,o.last=s)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=Wt(),e.sibling=null,n=Mt.current,St(Mt,i?n&1|2:n&1),e):(In(e),null);case 22:case 23:return gk(),i=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==i&&(e.flags|=8192),i&&e.mode&1?Ai&1073741824&&(In(e),e.subtreeFlags&6&&(e.flags|=8192)):In(e),null;case 24:return null;case 25:return null}throw Error(ee(156,e.tag))}function oz(t,e){switch(Yw(e),e.tag){case 1:return yi(e.type)&&d0(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return ad(),xt(bi),xt(zn),ok(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return rk(e),null;case 13:if(xt(Mt),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(ee(340));od()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return xt(Mt),null;case 4:return ad(),null;case 10:return ek(e.type._context),null;case 22:case 23:return gk(),null;case 24:return null;default:return null}}var um=!1,Mn=!1,sz=typeof WeakSet=="function"?WeakSet:Set,ce=null;function Ic(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(i){zt(t,e,i)}else n.current=null}function pv(t,e,n){try{n()}catch(i){zt(t,e,i)}}var xE=!1;function az(t,e){if(G1=a0,t=qL(),Zw(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var r=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,u=0,c=0,d=t,h=null;t:for(;;){for(var p;d!==n||r!==0&&d.nodeType!==3||(a=s+r),d!==o||i!==0&&d.nodeType!==3||(l=s+i),d.nodeType===3&&(s+=d.nodeValue.length),(p=d.firstChild)!==null;)h=d,d=p;for(;;){if(d===t)break t;if(h===n&&++u===r&&(a=s),h===o&&++c===i&&(l=s),(p=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=p}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(K1={focusedElem:t,selectionRange:n},a0=!1,ce=e;ce!==null;)if(e=ce,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,ce=t;else for(;ce!==null;){e=ce;try{var m=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var O=m.memoizedProps,y=m.memoizedState,b=e.stateNode,v=b.getSnapshotBeforeUpdate(e.elementType===e.type?O:kr(e.type,O),y);b.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var S=e.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ee(163))}}catch(k){zt(e,e.return,k)}if(t=e.sibling,t!==null){t.return=e.return,ce=t;break}ce=e.return}return m=xE,xE=!1,m}function sf(t,e,n){var i=e.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var r=i=i.next;do{if((r.tag&t)===t){var o=r.destroy;r.destroy=void 0,o!==void 0&&pv(e,n,o)}r=r.next}while(r!==i)}}function TO(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 i=n.create;n.destroy=i()}n=n.next}while(n!==e)}}function mv(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 VN(t){var e=t.alternate;e!==null&&(t.alternate=null,VN(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[ho],delete e[Mf],delete e[tv],delete e[UF],delete e[WF])),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 jN(t){return t.tag===5||t.tag===3||t.tag===4}function _E(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||jN(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 gv(t,e,n){var i=t.tag;if(i===5||i===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=c0));else if(i!==4&&(t=t.child,t!==null))for(gv(t,e,n),t=t.sibling;t!==null;)gv(t,e,n),t=t.sibling}function Ov(t,e,n){var i=t.tag;if(i===5||i===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(i!==4&&(t=t.child,t!==null))for(Ov(t,e,n),t=t.sibling;t!==null;)Ov(t,e,n),t=t.sibling}var vn=null,xr=!1;function ys(t,e,n){for(n=n.child;n!==null;)XN(t,e,n),n=n.sibling}function XN(t,e,n){if(vo&&typeof vo.onCommitFiberUnmount=="function")try{vo.onCommitFiberUnmount(vO,n)}catch{}switch(n.tag){case 5:Mn||Ic(n,e);case 6:var i=vn,r=xr;vn=null,ys(t,e,n),vn=i,xr=r,vn!==null&&(xr?(t=vn,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):vn.removeChild(n.stateNode));break;case 18:vn!==null&&(xr?(t=vn,n=n.stateNode,t.nodeType===8?ny(t.parentNode,n):t.nodeType===1&&ny(t,n),Rf(t)):ny(vn,n.stateNode));break;case 4:i=vn,r=xr,vn=n.stateNode.containerInfo,xr=!0,ys(t,e,n),vn=i,xr=r;break;case 0:case 11:case 14:case 15:if(!Mn&&(i=n.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){r=i=i.next;do{var o=r,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&pv(n,e,s),r=r.next}while(r!==i)}ys(t,e,n);break;case 1:if(!Mn&&(Ic(n,e),i=n.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=n.memoizedProps,i.state=n.memoizedState,i.componentWillUnmount()}catch(a){zt(n,e,a)}ys(t,e,n);break;case 21:ys(t,e,n);break;case 22:n.mode&1?(Mn=(i=Mn)||n.memoizedState!==null,ys(t,e,n),Mn=i):ys(t,e,n);break;default:ys(t,e,n)}}function EE(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new sz),e.forEach(function(i){var r=gz.bind(null,t,i);n.has(i)||(n.add(i),i.then(r,r))})}}function yr(t,e){var n=e.deletions;if(n!==null)for(var i=0;ir&&(r=s),i&=~o}if(i=r,i=Wt()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*uz(i/1960))-i,10t?16:t,js===null)var i=!1;else{if(t=js,js=null,k0=0,it&6)throw Error(ee(331));var r=it;for(it|=4,ce=t.current;ce!==null;){var o=ce,s=o.child;if(ce.flags&16){var a=o.deletions;if(a!==null){for(var l=0;lWt()-pk?Zl(t,0):fk|=n),vi(t,e)}function t5(t,e){e===0&&(t.mode&1?(e=em,em<<=1,!(em&130023424)&&(em=4194304)):e=1);var n=ei();t=ts(t,e),t!==null&&(kp(t,e,n),vi(t,n))}function mz(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),t5(t,n)}function gz(t,e){var n=0;switch(t.tag){case 13:var i=t.stateNode,r=t.memoizedState;r!==null&&(n=r.retryLane);break;case 19:i=t.stateNode;break;default:throw Error(ee(314))}i!==null&&i.delete(e),t5(t,n)}var n5;n5=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||bi.current)pi=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return pi=!1,iz(t,e,n);pi=!!(t.flags&131072)}else pi=!1,At&&e.flags&1048576&&sN(e,p0,e.index);switch(e.lanes=0,e.tag){case 2:var i=e.type;Cg(t,e),t=e.pendingProps;var r=rd(e,zn.current);Uc(e,n),r=ak(null,e,i,t,r,n);var o=lk();return e.flags|=1,typeof r=="object"&&r!==null&&typeof r.render=="function"&&r.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,yi(i)?(o=!0,h0(e)):o=!1,e.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,nk(e),r.updater=CO,e.stateNode=r,r._reactInternals=e,av(e,i,t,n),e=cv(null,e,i,!0,o,n)):(e.tag=0,At&&o&&qw(e),Zn(null,e,r,n),e=e.child),e;case 16:i=e.elementType;e:{switch(Cg(t,e),t=e.pendingProps,r=i._init,i=r(i._payload),e.type=i,r=e.tag=bz(i),t=kr(i,t),r){case 0:e=uv(null,e,i,t,n);break e;case 1:e=SE(null,e,i,t,n);break e;case 11:e=yE(null,e,i,t,n);break e;case 14:e=vE(null,e,i,kr(i.type,t),n);break e}throw Error(ee(306,i,""))}return e;case 0:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:kr(i,r),uv(t,e,i,r,n);case 1:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:kr(i,r),SE(t,e,i,r,n);case 3:e:{if(QN(e),t===null)throw Error(ee(387));i=e.pendingProps,o=e.memoizedState,r=o.element,hN(t,e),O0(e,i,null,n);var s=e.memoizedState;if(i=s.element,o.isDehydrated)if(o={element:i,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},e.updateQueue.baseState=o,e.memoizedState=o,e.flags&256){r=ld(Error(ee(423)),e),e=wE(t,e,i,n,r);break e}else if(i!==r){r=ld(Error(ee(424)),e),e=wE(t,e,i,n,r);break e}else for(Ni=ea(e.stateNode.containerInfo.firstChild),Qi=e,At=!0,Er=null,n=cN(e,null,i,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(od(),i===r){e=ns(t,e,n);break e}Zn(t,e,i,n)}e=e.child}return e;case 5:return fN(e),t===null&&rv(e),i=e.type,r=e.pendingProps,o=t!==null?t.memoizedProps:null,s=r.children,J1(i,r)?s=null:o!==null&&J1(i,o)&&(e.flags|=32),BN(t,e),Zn(t,e,s,n),e.child;case 6:return t===null&&rv(e),null;case 13:return FN(t,e,n);case 4:return ik(e,e.stateNode.containerInfo),i=e.pendingProps,t===null?e.child=sd(e,null,i,n):Zn(t,e,i,n),e.child;case 11:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:kr(i,r),yE(t,e,i,r,n);case 7:return Zn(t,e,e.pendingProps,n),e.child;case 8:return Zn(t,e,e.pendingProps.children,n),e.child;case 12:return Zn(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(i=e.type._context,r=e.pendingProps,o=e.memoizedProps,s=r.value,St(m0,i._currentValue),i._currentValue=s,o!==null)if(Br(o.value,s)){if(o.children===r.children&&!bi.current){e=ns(t,e,n);break e}}else for(o=e.child,o!==null&&(o.return=e);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var l=a.firstContext;l!==null;){if(l.context===i){if(o.tag===1){l=Zo(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),ov(o.return,n,e),a.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===e.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(ee(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),ov(s,n,e),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===e){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Zn(t,e,r.children,n),e=e.child}return e;case 9:return r=e.type,i=e.pendingProps.children,Uc(e,n),r=cr(r),i=i(r),e.flags|=1,Zn(t,e,i,n),e.child;case 14:return i=e.type,r=kr(i,e.pendingProps),r=kr(i.type,r),vE(t,e,i,r,n);case 15:return MN(t,e,e.type,e.pendingProps,n);case 17:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:kr(i,r),Cg(t,e),e.tag=1,yi(i)?(t=!0,h0(e)):t=!1,Uc(e,n),$N(e,i,r),av(e,i,r,n),cv(null,e,i,!0,t,n);case 19:return zN(t,e,n);case 22:return DN(t,e,n)}throw Error(ee(156,e.tag))};function i5(t,e){return AL(t,e)}function Oz(t,e,n,i){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=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ir(t,e,n,i){return new Oz(t,e,n,i)}function bk(t){return t=t.prototype,!(!t||!t.isReactComponent)}function bz(t){if(typeof t=="function")return bk(t)?1:0;if(t!=null){if(t=t.$$typeof,t===Dw)return 11;if(t===Bw)return 14}return 2}function ra(t,e){var n=t.alternate;return n===null?(n=ir(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 Ag(t,e,n,i,r,o){var s=2;if(i=t,typeof t=="function")bk(t)&&(s=1);else if(typeof t=="string")s=5;else e:switch(t){case kc:return ql(n.children,r,o,e);case Mw:s=8,r|=8;break;case R1:return t=ir(12,n,e,r|2),t.elementType=R1,t.lanes=o,t;case I1:return t=ir(13,n,e,r),t.elementType=I1,t.lanes=o,t;case $1:return t=ir(19,n,e,r),t.elementType=$1,t.lanes=o,t;case fL:return AO(n,r,o,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case dL:s=10;break e;case hL:s=9;break e;case Dw:s=11;break e;case Bw:s=14;break e;case Bs:s=16,i=null;break e}throw Error(ee(130,t==null?t:typeof t,""))}return e=ir(s,n,e,r),e.elementType=t,e.type=i,e.lanes=o,e}function ql(t,e,n,i){return t=ir(7,t,i,e),t.lanes=n,t}function AO(t,e,n,i){return t=ir(22,t,i,e),t.elementType=fL,t.lanes=n,t.stateNode={isHidden:!1},t}function cy(t,e,n){return t=ir(6,t,null,e),t.lanes=n,t}function dy(t,e,n){return e=ir(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function yz(t,e,n,i,r){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=Vb(0),this.expirationTimes=Vb(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Vb(0),this.identifierPrefix=i,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function yk(t,e,n,i,r,o,s,a,l){return t=new yz(t,e,n,a,l),e===1?(e=1,o===!0&&(e|=8)):e=0,o=ir(3,null,null,e),t.current=o,o.stateNode=t,o.memoizedState={element:i,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},nk(o),t}function vz(t,e,n){var i=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a5)}catch(t){console.error(t)}}a5(),aL.exports=Hi;var NO=aL.exports;const Cp=as(NO),_z=Tw({__proto__:null,default:Cp},[NO]);var l5,kk,LE=NO;kk=t0.createRoot=LE.createRoot,l5=t0.hydrateRoot=LE.hydrateRoot;const Ez=Tw({__proto__:null,get createRoot(){return kk},default:t0,get hydrateRoot(){return l5}},[t0]);/** * @remix-run/router v1.16.1 * * Copyright (c) Remix Software Inc. @@ -46,8 +46,8 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Lt(){return Lt=Object.assign?Object.assign.bind():function(t){for(var e=1;e"u")throw new Error(e)}function eu(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function Tz(){return Math.random().toString(36).substr(2,8)}function ME(t,e){return{usr:t.state,key:t.key,idx:e}}function Hf(t,e,n,i){return n===void 0&&(n=null),Lt({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?ls(e):e,{state:n,key:e&&e.key||i||Tz()})}function tu(t){let{pathname:e="/",search:n="",hash:i=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),i&&i!=="#"&&(e+=i.charAt(0)==="#"?i:"#"+i),e}function ls(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let i=t.indexOf("?");i>=0&&(e.search=t.substr(i),t=t.substr(0,i)),t&&(e.pathname=t)}return e}function Pz(t,e,n,i){i===void 0&&(i={});let{window:r=document.defaultView,v5Compat:o=!1}=i,s=r.history,a=qt.Pop,l=null,u=c();u==null&&(u=0,s.replaceState(Lt({},s.state,{idx:u}),""));function c(){return(s.state||{idx:null}).idx}function d(){a=qt.Pop;let y=c(),b=y==null?null:y-u;u=y,l&&l({action:a,location:O.location,delta:b})}function h(y,b){a=qt.Push;let v=Hf(O.location,y,b);n&&n(v,y),u=c()+1;let S=ME(v,u),k=O.createHref(v);try{s.pushState(S,"",k)}catch(x){if(x instanceof DOMException&&x.name==="DataCloneError")throw x;r.location.assign(k)}o&&l&&l({action:a,location:O.location,delta:1})}function p(y,b){a=qt.Replace;let v=Hf(O.location,y,b);n&&n(v,y),u=c();let S=ME(v,u),k=O.createHref(v);s.replaceState(S,"",k),o&&l&&l({action:a,location:O.location,delta:0})}function m(y){let b=r.location.origin!=="null"?r.location.origin:r.location.href,v=typeof y=="string"?y:tu(y);return v=v.replace(/ $/,"%20"),je(b,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,b)}let O={get action(){return a},get location(){return t(r,s)},listen(y){if(l)throw new Error("A history only accepts one active listener");return r.addEventListener(NE,d),l=y,()=>{r.removeEventListener(NE,d),l=null}},createHref(y){return e(r,y)},createURL:m,encodeLocation(y){let b=m(y);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:h,replace:p,go(y){return s.go(y)}};return O}var Pt;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(Pt||(Pt={}));const Az=new Set(["lazy","caseSensitive","path","id","index","children"]);function Rz(t){return t.index===!0}function Sv(t,e,n,i){return n===void 0&&(n=[]),i===void 0&&(i={}),t.map((r,o)=>{let s=[...n,o],a=typeof r.id=="string"?r.id:s.join("-");if(je(r.index!==!0||!r.children,"Cannot specify children on an index route"),je(!i[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),Rz(r)){let l=Lt({},r,e(r),{id:a});return i[a]=l,l}else{let l=Lt({},r,e(r),{id:a,children:void 0});return i[a]=l,r.children&&(l.children=Sv(r.children,e,s,i)),l}})}function $c(t,e,n){n===void 0&&(n="/");let i=typeof e=="string"?ls(e):e,r=Ad(i.pathname||"/",n);if(r==null)return null;let o=u5(t);$z(o);let s=null;for(let a=0;s==null&&a{let l={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};l.relativePath.startsWith("/")&&(je(l.relativePath.startsWith(i),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+i+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(i.length));let u=Zo([i,l.relativePath]),c=n.concat(l);o.children&&o.children.length>0&&(je(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),u5(o.children,e,c,u)),!(o.path==null&&!o.index)&&e.push({path:u,score:Fz(u,o.index),routesMeta:c})};return t.forEach((o,s)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))r(o,s);else for(let l of c5(o.path))r(o,s,l)}),e}function c5(t){let e=t.split("/");if(e.length===0)return[];let[n,...i]=e,r=n.endsWith("?"),o=n.replace(/\?$/,"");if(i.length===0)return r?[o,""]:[o];let s=c5(i.join("/")),a=[];return a.push(...s.map(l=>l===""?o:[o,l].join("/"))),r&&a.push(...s),a.map(l=>t.startsWith("/")&&l===""?"/":l)}function $z(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:zz(e.routesMeta.map(i=>i.childrenIndex),n.routesMeta.map(i=>i.childrenIndex)))}const Lz=/^:[\w-]+$/,Nz=3,Mz=2,Dz=1,Bz=10,Qz=-2,DE=t=>t==="*";function Fz(t,e){let n=t.split("/"),i=n.length;return n.some(DE)&&(i+=Qz),e&&(i+=Mz),n.filter(r=>!DE(r)).reduce((r,o)=>r+(Lz.test(o)?Nz:o===""?Dz:Bz),i)}function zz(t,e){return t.length===e.length&&t.slice(0,-1).every((i,r)=>i===e[r])?t[t.length-1]-e[e.length-1]:0}function Hz(t,e){let{routesMeta:n}=t,i={},r="/",o=[];for(let s=0;s{let{paramName:h,isOptional:p}=c;if(h==="*"){let O=a[d]||"";s=o.slice(0,o.length-O.length).replace(/(.)\/+$/,"$1")}const m=a[d];return p&&!m?u[h]=void 0:u[h]=(m||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:s,pattern:t}}function Wz(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),eu(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 i=[],r="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,a,l)=>(i.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(i.push({paramName:"*"}),r+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?r+="\\/*$":t!==""&&t!=="/"&&(r+="(?:(?=\\/|$))"),[new RegExp(r,e?void 0:"i"),i]}function Vz(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return eu(!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 Ad(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,i=t.charAt(n);return i&&i!=="/"?null:t.slice(n)||"/"}function jz(t,e){e===void 0&&(e="/");let{pathname:n,search:i="",hash:r=""}=typeof t=="string"?ls(t):t;return{pathname:n?n.startsWith("/")?n:Xz(n,e):e,search:qz(i),hash:Yz(r)}}function Xz(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(r=>{r===".."?n.length>1&&n.pop():r!=="."&&n.push(r)}),n.length>1?n.join("/"):"/"}function dy(t,e,n,i){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(i)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function d5(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function kk(t,e){let n=d5(t);return e?n.map((i,r)=>r===t.length-1?i.pathname:i.pathnameBase):n.map(i=>i.pathnameBase)}function xk(t,e,n,i){i===void 0&&(i=!1);let r;typeof t=="string"?r=ls(t):(r=Lt({},t),je(!r.pathname||!r.pathname.includes("?"),dy("?","pathname","search",r)),je(!r.pathname||!r.pathname.includes("#"),dy("#","pathname","hash",r)),je(!r.search||!r.search.includes("#"),dy("#","search","hash",r)));let o=t===""||r.pathname==="",s=o?"/":r.pathname,a;if(s==null)a=n;else{let d=e.length-1;if(!i&&s.startsWith("..")){let h=s.split("/");for(;h[0]==="..";)h.shift(),d-=1;r.pathname=h.join("/")}a=d>=0?e[d]:"/"}let l=jz(r,a),u=s&&s!=="/"&&s.endsWith("/"),c=(o||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const Zo=t=>t.join("/").replace(/\/\/+/g,"/"),Zz=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),qz=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,Yz=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;class _k{constructor(e,n,i,r){r===void 0&&(r=!1),this.status=e,this.statusText=n||"",this.internal=r,i instanceof Error?(this.data=i.toString(),this.error=i):this.data=i}}function Ek(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const h5=["post","put","patch","delete"],Gz=new Set(h5),Kz=["get",...h5],Jz=new Set(Kz),eH=new Set([301,302,303,307,308]),tH=new Set([307,308]),hy={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},nH={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},yh={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Ck=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,iH=t=>({hasErrorBoundary:!!t.hasErrorBoundary}),f5="remix-router-transitions";function rH(t){const e=t.window?t.window:typeof window<"u"?window:void 0,n=typeof e<"u"&&typeof e.document<"u"&&typeof e.document.createElement<"u",i=!n;je(t.routes.length>0,"You must provide a non-empty routes array to createRouter");let r;if(t.mapRouteProperties)r=t.mapRouteProperties;else if(t.detectErrorBoundary){let M=t.detectErrorBoundary;r=U=>({hasErrorBoundary:M(U)})}else r=iH;let o={},s=Sv(t.routes,r,void 0,o),a,l=t.basename||"/",u=t.unstable_dataStrategy||lH,c=Lt({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,unstable_skipActionErrorRevalidation:!1},t.future),d=null,h=new Set,p=null,m=null,O=null,y=t.hydrationData!=null,b=$c(s,t.history.location,l),v=null;if(b==null){let M=Yi(404,{pathname:t.history.location.pathname}),{matches:U,route:Y}=XE(s);b=U,v={[Y.id]:M}}let S,k=b.some(M=>M.route.lazy),x=b.some(M=>M.route.loader);if(k)S=!1;else if(!x)S=!0;else if(c.v7_partialHydration){let M=t.hydrationData?t.hydrationData.loaderData:null,U=t.hydrationData?t.hydrationData.errors:null,Y=re=>re.route.loader?typeof re.route.loader=="function"&&re.route.loader.hydrate===!0?!1:M&&M[re.route.id]!==void 0||U&&U[re.route.id]!==void 0:!0;if(U){let re=b.findIndex(pe=>U[pe.route.id]!==void 0);S=b.slice(0,re+1).every(Y)}else S=b.every(Y)}else S=t.hydrationData!=null;let _,w={historyAction:t.history.action,location:t.history.location,matches:b,initialized:S,navigation:hy,restoreScrollPosition:t.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:t.hydrationData&&t.hydrationData.loaderData||{},actionData:t.hydrationData&&t.hydrationData.actionData||null,errors:t.hydrationData&&t.hydrationData.errors||v,fetchers:new Map,blockers:new Map},D=qt.Pop,W=!1,I,V=!1,B=new Map,H=null,K=!1,oe=!1,xe=[],Oe=[],X=new Map,ae=0,A=-1,be=new Map,Se=new Set,L=new Map,We=new Map,et=new Set,Be=new Map,Bt=new Map,Vn=!1;function Or(){if(d=t.history.listen(M=>{let{action:U,location:Y,delta:re}=M;if(Vn){Vn=!1;return}eu(Bt.size===0||re!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let pe=w_({currentLocation:w.location,nextLocation:Y,historyAction:U});if(pe&&re!=null){Vn=!0,t.history.go(re*-1),li(pe,{state:"blocked",location:Y,proceed(){li(pe,{state:"proceeding",proceed:void 0,reset:void 0,location:Y}),t.history.go(re)},reset(){let Fe=new Map(w.blockers);Fe.set(pe,yh),Xt({blockers:Fe})}});return}return si(U,Y)}),n){vH(e,B);let M=()=>SH(e,B);e.addEventListener("pagehide",M),H=()=>e.removeEventListener("pagehide",M)}return w.initialized||si(qt.Pop,w.location,{initialHydration:!0}),_}function Xi(){d&&d(),H&&H(),h.clear(),I&&I.abort(),w.fetchers.forEach((M,U)=>Qe(U)),w.blockers.forEach((M,U)=>Io(U))}function Ca(M){return h.add(M),()=>h.delete(M)}function Xt(M,U){U===void 0&&(U={}),w=Lt({},w,M);let Y=[],re=[];c.v7_fetcherPersist&&w.fetchers.forEach((pe,Fe)=>{pe.state==="idle"&&(et.has(Fe)?re.push(Fe):Y.push(Fe))}),[...h].forEach(pe=>pe(w,{deletedFetchers:re,unstable_viewTransitionOpts:U.viewTransitionOpts,unstable_flushSync:U.flushSync===!0})),c.v7_fetcherPersist&&(Y.forEach(pe=>w.fetchers.delete(pe)),re.forEach(pe=>Qe(pe)))}function qr(M,U,Y){var re,pe;let{flushSync:Fe}=Y===void 0?{}:Y,_e=w.actionData!=null&&w.navigation.formMethod!=null&&_r(w.navigation.formMethod)&&w.navigation.state==="loading"&&((re=M.state)==null?void 0:re._isRedirect)!==!0,ge;U.actionData?Object.keys(U.actionData).length>0?ge=U.actionData:ge=null:_e?ge=w.actionData:ge=null;let He=U.loaderData?VE(w.loaderData,U.loaderData,U.matches||[],U.errors):w.loaderData,$e=w.blockers;$e.size>0&&($e=new Map($e),$e.forEach((Ae,Et)=>$e.set(Et,yh)));let bn=W===!0||w.navigation.formMethod!=null&&_r(w.navigation.formMethod)&&((pe=M.state)==null?void 0:pe._isRedirect)!==!0;a&&(s=a,a=void 0),K||D===qt.Pop||(D===qt.Push?t.history.push(M,M.state):D===qt.Replace&&t.history.replace(M,M.state));let yn;if(D===qt.Pop){let Ae=B.get(w.location.pathname);Ae&&Ae.has(M.pathname)?yn={currentLocation:w.location,nextLocation:M}:B.has(M.pathname)&&(yn={currentLocation:M,nextLocation:w.location})}else if(V){let Ae=B.get(w.location.pathname);Ae?Ae.add(M.pathname):(Ae=new Set([M.pathname]),B.set(w.location.pathname,Ae)),yn={currentLocation:w.location,nextLocation:M}}Xt(Lt({},U,{actionData:ge,loaderData:He,historyAction:D,location:M,initialized:!0,navigation:hy,revalidation:"idle",restoreScrollPosition:x_(M,U.matches||w.matches),preventScrollReset:bn,blockers:$e}),{viewTransitionOpts:yn,flushSync:Fe===!0}),D=qt.Pop,W=!1,V=!1,K=!1,oe=!1,xe=[],Oe=[]}async function br(M,U){if(typeof M=="number"){t.history.go(M);return}let Y=wv(w.location,w.matches,l,c.v7_prependBasename,M,c.v7_relativeSplatPath,U==null?void 0:U.fromRouteId,U==null?void 0:U.relative),{path:re,submission:pe,error:Fe}=BE(c.v7_normalizeFormMethod,!1,Y,U),_e=w.location,ge=Hf(w.location,re,U&&U.state);ge=Lt({},ge,t.history.encodeLocation(ge));let He=U&&U.replace!=null?U.replace:void 0,$e=qt.Push;He===!0?$e=qt.Replace:He===!1||pe!=null&&_r(pe.formMethod)&&pe.formAction===w.location.pathname+w.location.search&&($e=qt.Replace);let bn=U&&"preventScrollReset"in U?U.preventScrollReset===!0:void 0,yn=(U&&U.unstable_flushSync)===!0,Ae=w_({currentLocation:_e,nextLocation:ge,historyAction:$e});if(Ae){li(Ae,{state:"blocked",location:ge,proceed(){li(Ae,{state:"proceeding",proceed:void 0,reset:void 0,location:ge}),br(M,U)},reset(){let Et=new Map(w.blockers);Et.set(Ae,yh),Xt({blockers:Et})}});return}return await si($e,ge,{submission:pe,pendingError:Fe,preventScrollReset:bn,replace:U&&U.replace,enableViewTransition:U&&U.unstable_viewTransition,flushSync:yn})}function Mu(){if(F(),Xt({revalidation:"loading"}),w.navigation.state!=="submitting"){if(w.navigation.state==="idle"){si(w.historyAction,w.location,{startUninterruptedRevalidation:!0});return}si(D||w.historyAction,w.navigation.location,{overrideNavigation:w.navigation})}}async function si(M,U,Y){I&&I.abort(),I=null,D=M,K=(Y&&Y.startUninterruptedRevalidation)===!0,G7(w.location,w.matches),W=(Y&&Y.preventScrollReset)===!0,V=(Y&&Y.enableViewTransition)===!0;let re=a||s,pe=Y&&Y.overrideNavigation,Fe=$c(re,U,l),_e=(Y&&Y.flushSync)===!0;if(!Fe){let Ae=Yi(404,{pathname:U.pathname}),{matches:Et,route:dn}=XE(re);Bb(),qr(U,{matches:Et,loaderData:{},errors:{[dn.id]:Ae}},{flushSync:_e});return}if(w.initialized&&!oe&&pH(w.location,U)&&!(Y&&Y.submission&&_r(Y.submission.formMethod))){qr(U,{matches:Fe},{flushSync:_e});return}I=new AbortController;let ge=Wu(t.history,U,I.signal,Y&&Y.submission),He;if(Y&&Y.pendingError)He=[lf(Fe).route.id,{type:Pt.error,error:Y.pendingError}];else if(Y&&Y.submission&&_r(Y.submission.formMethod)){let Ae=await Ao(ge,U,Y.submission,Fe,{replace:Y.replace,flushSync:_e});if(Ae.shortCircuited)return;He=Ae.pendingActionResult,pe=fy(U,Y.submission),_e=!1,ge=Wu(t.history,ge.url,ge.signal)}let{shortCircuited:$e,loaderData:bn,errors:yn}=await gs(ge,U,Fe,pe,Y&&Y.submission,Y&&Y.fetcherSubmission,Y&&Y.replace,Y&&Y.initialHydration===!0,_e,He);$e||(I=null,qr(U,Lt({matches:Fe},jE(He),{loaderData:bn,errors:yn})))}async function Ao(M,U,Y,re,pe){pe===void 0&&(pe={}),F();let Fe=bH(U,Y);Xt({navigation:Fe},{flushSync:pe.flushSync===!0});let _e,ge=xv(re,U);if(!ge.route.action&&!ge.route.lazy)_e={type:Pt.error,error:Yi(405,{method:M.method,pathname:U.pathname,routeId:ge.route.id})};else if(_e=(await ai("action",M,[ge],re))[0],M.signal.aborted)return{shortCircuited:!0};if(zl(_e)){let He;return pe&&pe.replace!=null?He=pe.replace:He=HE(_e.response.headers.get("Location"),new URL(M.url),l)===w.location.pathname+w.location.search,await nn(M,_e,{submission:Y,replace:He}),{shortCircuited:!0}}if(Fl(_e))throw Yi(400,{type:"defer-action"});if(er(_e)){let He=lf(re,ge.route.id);return(pe&&pe.replace)!==!0&&(D=qt.Push),{pendingActionResult:[He.route.id,_e]}}return{pendingActionResult:[ge.route.id,_e]}}async function gs(M,U,Y,re,pe,Fe,_e,ge,He,$e){let bn=re||fy(U,pe),yn=pe||Fe||YE(bn),Ae=a||s,[Et,dn]=QE(t.history,w,Y,yn,U,c.v7_partialHydration&&ge===!0,c.unstable_skipActionErrorRevalidation,oe,xe,Oe,et,L,Se,Ae,l,$e);if(Bb(Ge=>!(Y&&Y.some(jn=>jn.route.id===Ge))||Et&&Et.some(jn=>jn.route.id===Ge)),A=++ae,Et.length===0&&dn.length===0){let Ge=rn();return qr(U,Lt({matches:Y,loaderData:{},errors:$e&&er($e[1])?{[$e[0]]:$e[1].error}:null},jE($e),Ge?{fetchers:new Map(w.fetchers)}:{}),{flushSync:He}),{shortCircuited:!0}}if(!K&&(!c.v7_partialHydration||!ge)){dn.forEach(jn=>{let qi=w.fetchers.get(jn.key),vn=vh(void 0,qi?qi.data:void 0);w.fetchers.set(jn.key,vn)});let Ge;$e&&!er($e[1])?Ge={[$e[0]]:$e[1].data}:w.actionData&&(Object.keys(w.actionData).length===0?Ge=null:Ge=w.actionData),Xt(Lt({navigation:bn},Ge!==void 0?{actionData:Ge}:{},dn.length>0?{fetchers:new Map(w.fetchers)}:{}),{flushSync:He})}dn.forEach(Ge=>{X.has(Ge.key)&&Te(Ge.key),Ge.controller&&X.set(Ge.key,Ge.controller)});let uh=()=>dn.forEach(Ge=>Te(Ge.key));I&&I.signal.addEventListener("abort",uh);let{loaderResults:Os,fetcherResults:Fu}=await Ro(w.matches,Y,Et,dn,M);if(M.signal.aborted)return{shortCircuited:!0};I&&I.signal.removeEventListener("abort",uh),dn.forEach(Ge=>X.delete(Ge.key));let zu=ZE([...Os,...Fu]);if(zu){if(zu.idx>=Et.length){let Ge=dn[zu.idx-Et.length].key;Se.add(Ge)}return await nn(M,zu.result,{replace:_e}),{shortCircuited:!0}}let{loaderData:Hu,errors:Yr}=WE(w,Y,Et,Os,$e,dn,Fu,Be);Be.forEach((Ge,jn)=>{Ge.subscribe(qi=>{(qi||Ge.done)&&Be.delete(jn)})}),c.v7_partialHydration&&ge&&w.errors&&Object.entries(w.errors).filter(Ge=>{let[jn]=Ge;return!Et.some(qi=>qi.route.id===jn)}).forEach(Ge=>{let[jn,qi]=Ge;Yr=Object.assign(Yr||{},{[jn]:qi})});let Vp=rn(),jp=Zi(A),Xp=Vp||jp||dn.length>0;return Lt({loaderData:Hu,errors:Yr},Xp?{fetchers:new Map(w.fetchers)}:{})}function Du(M,U,Y,re){if(i)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");X.has(M)&&Te(M);let pe=(re&&re.unstable_flushSync)===!0,Fe=a||s,_e=wv(w.location,w.matches,l,c.v7_prependBasename,Y,c.v7_relativeSplatPath,U,re==null?void 0:re.relative),ge=$c(Fe,_e,l);if(!ge){te(M,U,Yi(404,{pathname:_e}),{flushSync:pe});return}let{path:He,submission:$e,error:bn}=BE(c.v7_normalizeFormMethod,!0,_e,re);if(bn){te(M,U,bn,{flushSync:pe});return}let yn=xv(ge,He);if(W=(re&&re.preventScrollReset)===!0,$e&&_r($e.formMethod)){Bu(M,U,He,yn,ge,pe,$e);return}L.set(M,{routeId:U,path:He}),Qu(M,U,He,yn,ge,pe,$e)}async function Bu(M,U,Y,re,pe,Fe,_e){if(F(),L.delete(M),!re.route.action&&!re.route.lazy){let vn=Yi(405,{method:_e.formMethod,pathname:Y,routeId:U});te(M,U,vn,{flushSync:Fe});return}let ge=w.fetchers.get(M);G(M,yH(_e,ge),{flushSync:Fe});let He=new AbortController,$e=Wu(t.history,Y,He.signal,_e);X.set(M,He);let bn=ae,Ae=(await ai("action",$e,[re],pe))[0];if($e.signal.aborted){X.get(M)===He&&X.delete(M);return}if(c.v7_fetcherPersist&&et.has(M)){if(zl(Ae)||er(Ae)){G(M,Ls(void 0));return}}else{if(zl(Ae))if(X.delete(M),A>bn){G(M,Ls(void 0));return}else return Se.add(M),G(M,vh(_e)),nn($e,Ae,{fetcherSubmission:_e});if(er(Ae)){te(M,U,Ae.error);return}}if(Fl(Ae))throw Yi(400,{type:"defer-action"});let Et=w.navigation.location||w.location,dn=Wu(t.history,Et,He.signal),uh=a||s,Os=w.navigation.state!=="idle"?$c(uh,w.navigation.location,l):w.matches;je(Os,"Didn't find any matches after fetcher action");let Fu=++ae;be.set(M,Fu);let zu=vh(_e,Ae.data);w.fetchers.set(M,zu);let[Hu,Yr]=QE(t.history,w,Os,_e,Et,!1,c.unstable_skipActionErrorRevalidation,oe,xe,Oe,et,L,Se,uh,l,[re.route.id,Ae]);Yr.filter(vn=>vn.key!==M).forEach(vn=>{let ch=vn.key,__=w.fetchers.get(ch),J7=vh(void 0,__?__.data:void 0);w.fetchers.set(ch,J7),X.has(ch)&&Te(ch),vn.controller&&X.set(ch,vn.controller)}),Xt({fetchers:new Map(w.fetchers)});let Vp=()=>Yr.forEach(vn=>Te(vn.key));He.signal.addEventListener("abort",Vp);let{loaderResults:jp,fetcherResults:Xp}=await Ro(w.matches,Os,Hu,Yr,dn);if(He.signal.aborted)return;He.signal.removeEventListener("abort",Vp),be.delete(M),X.delete(M),Yr.forEach(vn=>X.delete(vn.key));let Ge=ZE([...jp,...Xp]);if(Ge){if(Ge.idx>=Hu.length){let vn=Yr[Ge.idx-Hu.length].key;Se.add(vn)}return nn(dn,Ge.result)}let{loaderData:jn,errors:qi}=WE(w,w.matches,Hu,jp,void 0,Yr,Xp,Be);if(w.fetchers.has(M)){let vn=Ls(Ae.data);w.fetchers.set(M,vn)}Zi(Fu),w.navigation.state==="loading"&&Fu>A?(je(D,"Expected pending action"),I&&I.abort(),qr(w.navigation.location,{matches:Os,loaderData:jn,errors:qi,fetchers:new Map(w.fetchers)})):(Xt({errors:qi,loaderData:VE(w.loaderData,jn,Os,qi),fetchers:new Map(w.fetchers)}),oe=!1)}async function Qu(M,U,Y,re,pe,Fe,_e){let ge=w.fetchers.get(M);G(M,vh(_e,ge?ge.data:void 0),{flushSync:Fe});let He=new AbortController,$e=Wu(t.history,Y,He.signal);X.set(M,He);let bn=ae,Ae=(await ai("loader",$e,[re],pe))[0];if(Fl(Ae)&&(Ae=await O5(Ae,$e.signal,!0)||Ae),X.get(M)===He&&X.delete(M),!$e.signal.aborted){if(et.has(M)){G(M,Ls(void 0));return}if(zl(Ae))if(A>bn){G(M,Ls(void 0));return}else{Se.add(M),await nn($e,Ae);return}if(er(Ae)){te(M,U,Ae.error);return}je(!Fl(Ae),"Unhandled fetcher deferred data"),G(M,Ls(Ae.data))}}async function nn(M,U,Y){let{submission:re,fetcherSubmission:pe,replace:Fe}=Y===void 0?{}:Y;U.response.headers.has("X-Remix-Revalidate")&&(oe=!0);let _e=U.response.headers.get("Location");je(_e,"Expected a Location header on the redirect Response"),_e=HE(_e,new URL(M.url),l);let ge=Hf(w.location,_e,{_isRedirect:!0});if(n){let Et=!1;if(U.response.headers.has("X-Remix-Reload-Document"))Et=!0;else if(Ck.test(_e)){const dn=t.history.createURL(_e);Et=dn.origin!==e.location.origin||Ad(dn.pathname,l)==null}if(Et){Fe?e.location.replace(_e):e.location.assign(_e);return}}I=null;let He=Fe===!0?qt.Replace:qt.Push,{formMethod:$e,formAction:bn,formEncType:yn}=w.navigation;!re&&!pe&&$e&&bn&&yn&&(re=YE(w.navigation));let Ae=re||pe;if(tH.has(U.response.status)&&Ae&&_r(Ae.formMethod))await si(He,ge,{submission:Lt({},Ae,{formAction:_e}),preventScrollReset:W});else{let Et=fy(ge,re);await si(He,ge,{overrideNavigation:Et,fetcherSubmission:pe,preventScrollReset:W})}}async function ai(M,U,Y,re){try{let pe=await uH(u,M,U,Y,re,o,r);return await Promise.all(pe.map((Fe,_e)=>{if(mH(Fe)){let ge=Fe.result;return{type:Pt.redirect,response:hH(ge,U,Y[_e].route.id,re,l,c.v7_relativeSplatPath)}}return dH(Fe)}))}catch(pe){return Y.map(()=>({type:Pt.error,error:pe}))}}async function Ro(M,U,Y,re,pe){let[Fe,..._e]=await Promise.all([Y.length?ai("loader",pe,Y,U):[],...re.map(ge=>{if(ge.matches&&ge.match&&ge.controller){let He=Wu(t.history,ge.path,ge.controller.signal);return ai("loader",He,[ge.match],ge.matches).then($e=>$e[0])}else return Promise.resolve({type:Pt.error,error:Yi(404,{pathname:ge.path})})})]);return await Promise.all([qE(M,Y,Fe,Fe.map(()=>pe.signal),!1,w.loaderData),qE(M,re.map(ge=>ge.match),_e,re.map(ge=>ge.controller?ge.controller.signal:null),!0)]),{loaderResults:Fe,fetcherResults:_e}}function F(){oe=!0,xe.push(...Bb()),L.forEach((M,U)=>{X.has(U)&&(Oe.push(U),Te(U))})}function G(M,U,Y){Y===void 0&&(Y={}),w.fetchers.set(M,U),Xt({fetchers:new Map(w.fetchers)},{flushSync:(Y&&Y.flushSync)===!0})}function te(M,U,Y,re){re===void 0&&(re={});let pe=lf(w.matches,U);Qe(M),Xt({errors:{[pe.route.id]:Y},fetchers:new Map(w.fetchers)},{flushSync:(re&&re.flushSync)===!0})}function fe(M){return c.v7_fetcherPersist&&(We.set(M,(We.get(M)||0)+1),et.has(M)&&et.delete(M)),w.fetchers.get(M)||nH}function Qe(M){let U=w.fetchers.get(M);X.has(M)&&!(U&&U.state==="loading"&&be.has(M))&&Te(M),L.delete(M),be.delete(M),Se.delete(M),et.delete(M),w.fetchers.delete(M)}function _t(M){if(c.v7_fetcherPersist){let U=(We.get(M)||0)-1;U<=0?(We.delete(M),et.add(M)):We.set(M,U)}else Qe(M);Xt({fetchers:new Map(w.fetchers)})}function Te(M){let U=X.get(M);je(U,"Expected fetch controller: "+M),U.abort(),X.delete(M)}function we(M){for(let U of M){let Y=fe(U),re=Ls(Y.data);w.fetchers.set(U,re)}}function rn(){let M=[],U=!1;for(let Y of Se){let re=w.fetchers.get(Y);je(re,"Expected fetcher: "+Y),re.state==="loading"&&(Se.delete(Y),M.push(Y),U=!0)}return we(M),U}function Zi(M){let U=[];for(let[Y,re]of be)if(re0}function cn(M,U){let Y=w.blockers.get(M)||yh;return Bt.get(M)!==U&&Bt.set(M,U),Y}function Io(M){w.blockers.delete(M),Bt.delete(M)}function li(M,U){let Y=w.blockers.get(M)||yh;je(Y.state==="unblocked"&&U.state==="blocked"||Y.state==="blocked"&&U.state==="blocked"||Y.state==="blocked"&&U.state==="proceeding"||Y.state==="blocked"&&U.state==="unblocked"||Y.state==="proceeding"&&U.state==="unblocked","Invalid blocker state transition: "+Y.state+" -> "+U.state);let re=new Map(w.blockers);re.set(M,U),Xt({blockers:re})}function w_(M){let{currentLocation:U,nextLocation:Y,historyAction:re}=M;if(Bt.size===0)return;Bt.size>1&&eu(!1,"A router only supports one blocker at a time");let pe=Array.from(Bt.entries()),[Fe,_e]=pe[pe.length-1],ge=w.blockers.get(Fe);if(!(ge&&ge.state==="proceeding")&&_e({currentLocation:U,nextLocation:Y,historyAction:re}))return Fe}function Bb(M){let U=[];return Be.forEach((Y,re)=>{(!M||M(re))&&(Y.cancel(),U.push(re),Be.delete(re))}),U}function Y7(M,U,Y){if(p=M,O=U,m=Y||null,!y&&w.navigation===hy){y=!0;let re=x_(w.location,w.matches);re!=null&&Xt({restoreScrollPosition:re})}return()=>{p=null,O=null,m=null}}function k_(M,U){return m&&m(M,U.map(re=>Iz(re,w.loaderData)))||M.key}function G7(M,U){if(p&&O){let Y=k_(M,U);p[Y]=O()}}function x_(M,U){if(p){let Y=k_(M,U),re=p[Y];if(typeof re=="number")return re}return null}function K7(M){o={},a=Sv(M,r,void 0,o)}return _={get basename(){return l},get future(){return c},get state(){return w},get routes(){return s},get window(){return e},initialize:Or,subscribe:Ca,enableScrollRestoration:Y7,navigate:br,fetch:Du,revalidate:Mu,createHref:M=>t.history.createHref(M),encodeLocation:M=>t.history.encodeLocation(M),getFetcher:fe,deleteFetcher:_t,dispose:Xi,getBlocker:cn,deleteBlocker:Io,_internalFetchControllers:X,_internalActiveDeferreds:Be,_internalSetRoutes:K7},_}function oH(t){return t!=null&&("formData"in t&&t.formData!=null||"body"in t&&t.body!==void 0)}function wv(t,e,n,i,r,o,s,a){let l,u;if(s){l=[];for(let d of e)if(l.push(d),d.route.id===s){u=d;break}}else l=e,u=e[e.length-1];let c=xk(r||".",kk(l,o),Ad(t.pathname,n)||t.pathname,a==="path");return r==null&&(c.search=t.search,c.hash=t.hash),(r==null||r===""||r===".")&&u&&u.route.index&&!Tk(c.search)&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),i&&n!=="/"&&(c.pathname=c.pathname==="/"?n:Zo([n,c.pathname])),tu(c)}function BE(t,e,n,i){if(!i||!oH(i))return{path:n};if(i.formMethod&&!OH(i.formMethod))return{path:n,error:Yi(405,{method:i.formMethod})};let r=()=>({path:n,error:Yi(400,{type:"invalid-body"})}),o=i.formMethod||"get",s=t?o.toUpperCase():o.toLowerCase(),a=m5(n);if(i.body!==void 0){if(i.formEncType==="text/plain"){if(!_r(s))return r();let h=typeof i.body=="string"?i.body:i.body instanceof FormData||i.body instanceof URLSearchParams?Array.from(i.body.entries()).reduce((p,m)=>{let[O,y]=m;return""+p+O+"="+y+` -`},""):String(i.body);return{path:n,submission:{formMethod:s,formAction:a,formEncType:i.formEncType,formData:void 0,json:void 0,text:h}}}else if(i.formEncType==="application/json"){if(!_r(s))return r();try{let h=typeof i.body=="string"?JSON.parse(i.body):i.body;return{path:n,submission:{formMethod:s,formAction:a,formEncType:i.formEncType,formData:void 0,json:h,text:void 0}}}catch{return r()}}}je(typeof FormData=="function","FormData is not available in this environment");let l,u;if(i.formData)l=kv(i.formData),u=i.formData;else if(i.body instanceof FormData)l=kv(i.body),u=i.body;else if(i.body instanceof URLSearchParams)l=i.body,u=UE(l);else if(i.body==null)l=new URLSearchParams,u=new FormData;else try{l=new URLSearchParams(i.body),u=UE(l)}catch{return r()}let c={formMethod:s,formAction:a,formEncType:i&&i.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(_r(c.formMethod))return{path:n,submission:c};let d=ls(n);return e&&d.search&&Tk(d.search)&&l.append("index",""),d.search="?"+l,{path:tu(d),submission:c}}function sH(t,e){let n=t;if(e){let i=t.findIndex(r=>r.route.id===e);i>=0&&(n=t.slice(0,i))}return n}function QE(t,e,n,i,r,o,s,a,l,u,c,d,h,p,m,O){let y=O?er(O[1])?O[1].error:O[1].data:void 0,b=t.createURL(e.location),v=t.createURL(r),S=O&&er(O[1])?O[0]:void 0,k=S?sH(n,S):n,x=O?O[1].statusCode:void 0,_=s&&x&&x>=400,w=k.filter((W,I)=>{let{route:V}=W;if(V.lazy)return!0;if(V.loader==null)return!1;if(o)return typeof V.loader!="function"||V.loader.hydrate?!0:e.loaderData[V.id]===void 0&&(!e.errors||e.errors[V.id]===void 0);if(aH(e.loaderData,e.matches[I],W)||l.some(K=>K===W.route.id))return!0;let B=e.matches[I],H=W;return FE(W,Lt({currentUrl:b,currentParams:B.params,nextUrl:v,nextParams:H.params},i,{actionResult:y,unstable_actionStatus:x,defaultShouldRevalidate:_?!1:a||b.pathname+b.search===v.pathname+v.search||b.search!==v.search||p5(B,H)}))}),D=[];return d.forEach((W,I)=>{if(o||!n.some(oe=>oe.route.id===W.routeId)||c.has(I))return;let V=$c(p,W.path,m);if(!V){D.push({key:I,routeId:W.routeId,path:W.path,matches:null,match:null,controller:null});return}let B=e.fetchers.get(I),H=xv(V,W.path),K=!1;h.has(I)?K=!1:u.includes(I)?K=!0:B&&B.state!=="idle"&&B.data===void 0?K=a:K=FE(H,Lt({currentUrl:b,currentParams:e.matches[e.matches.length-1].params,nextUrl:v,nextParams:n[n.length-1].params},i,{actionResult:y,unstable_actionStatus:x,defaultShouldRevalidate:_?!1:a})),K&&D.push({key:I,routeId:W.routeId,path:W.path,matches:V,match:H,controller:new AbortController})}),[w,D]}function aH(t,e,n){let i=!e||n.route.id!==e.route.id,r=t[n.route.id]===void 0;return i||r}function p5(t,e){let n=t.route.path;return t.pathname!==e.pathname||n!=null&&n.endsWith("*")&&t.params["*"]!==e.params["*"]}function FE(t,e){if(t.route.shouldRevalidate){let n=t.route.shouldRevalidate(e);if(typeof n=="boolean")return n}return e.defaultShouldRevalidate}async function zE(t,e,n){if(!t.lazy)return;let i=await t.lazy();if(!t.lazy)return;let r=n[t.id];je(r,"No route found in manifest");let o={};for(let s in i){let l=r[s]!==void 0&&s!=="hasErrorBoundary";eu(!l,'Route "'+r.id+'" has a static property "'+s+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+s+'" will be ignored.')),!l&&!Az.has(s)&&(o[s]=i[s])}Object.assign(r,o),Object.assign(r,Lt({},e(r),{lazy:void 0}))}function lH(t){return Promise.all(t.matches.map(e=>e.resolve()))}async function uH(t,e,n,i,r,o,s,a){let l=i.reduce((d,h)=>d.add(h.route.id),new Set),u=new Set,c=await t({matches:r.map(d=>{let h=l.has(d.route.id);return Lt({},d,{shouldLoad:h,resolve:m=>(u.add(d.route.id),h?cH(e,n,d,o,s,m,a):Promise.resolve({type:Pt.data,result:void 0}))})}),request:n,params:r[0].params,context:a});return r.forEach(d=>je(u.has(d.route.id),'`match.resolve()` was not called for route id "'+d.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),c.filter((d,h)=>l.has(r[h].route.id))}async function cH(t,e,n,i,r,o,s){let a,l,u=c=>{let d,h=new Promise((O,y)=>d=y);l=()=>d(),e.signal.addEventListener("abort",l);let p=O=>typeof c!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+t+'" [routeId: '+n.route.id+"]"))):c({request:e,params:n.params,context:s},...O!==void 0?[O]:[]),m;return o?m=o(O=>p(O)):m=(async()=>{try{return{type:"data",result:await p()}}catch(O){return{type:"error",result:O}}})(),Promise.race([m,h])};try{let c=n.route[t];if(n.route.lazy)if(c){let d,[h]=await Promise.all([u(c).catch(p=>{d=p}),zE(n.route,r,i)]);if(d!==void 0)throw d;a=h}else if(await zE(n.route,r,i),c=n.route[t],c)a=await u(c);else if(t==="action"){let d=new URL(e.url),h=d.pathname+d.search;throw Yi(405,{method:e.method,pathname:h,routeId:n.route.id})}else return{type:Pt.data,result:void 0};else if(c)a=await u(c);else{let d=new URL(e.url),h=d.pathname+d.search;throw Yi(404,{pathname:h})}je(a.result!==void 0,"You defined "+(t==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+t+"` ")+"function. Please return a value or `null`.")}catch(c){return{type:Pt.error,result:c}}finally{l&&e.signal.removeEventListener("abort",l)}return a}async function dH(t){let{result:e,type:n,status:i}=t;if(g5(e)){let s;try{let a=e.headers.get("Content-Type");a&&/\bapplication\/json\b/.test(a)?e.body==null?s=null:s=await e.json():s=await e.text()}catch(a){return{type:Pt.error,error:a}}return n===Pt.error?{type:Pt.error,error:new _k(e.status,e.statusText,s),statusCode:e.status,headers:e.headers}:{type:Pt.data,data:s,statusCode:e.status,headers:e.headers}}if(n===Pt.error)return{type:Pt.error,error:e,statusCode:Ek(e)?e.status:i};if(gH(e)){var r,o;return{type:Pt.deferred,deferredData:e,statusCode:(r=e.init)==null?void 0:r.status,headers:((o=e.init)==null?void 0:o.headers)&&new Headers(e.init.headers)}}return{type:Pt.data,data:e,statusCode:i}}function hH(t,e,n,i,r,o){let s=t.headers.get("Location");if(je(s,"Redirects returned/thrown from loaders/actions must have a Location header"),!Ck.test(s)){let a=i.slice(0,i.findIndex(l=>l.route.id===n)+1);s=wv(new URL(e.url),a,r,!0,s,o),t.headers.set("Location",s)}return t}function HE(t,e,n){if(Ck.test(t)){let i=t,r=i.startsWith("//")?new URL(e.protocol+i):new URL(i),o=Ad(r.pathname,n)!=null;if(r.origin===e.origin&&o)return r.pathname+r.search+r.hash}return t}function Wu(t,e,n,i){let r=t.createURL(m5(e)).toString(),o={signal:n};if(i&&_r(i.formMethod)){let{formMethod:s,formEncType:a}=i;o.method=s.toUpperCase(),a==="application/json"?(o.headers=new Headers({"Content-Type":a}),o.body=JSON.stringify(i.json)):a==="text/plain"?o.body=i.text:a==="application/x-www-form-urlencoded"&&i.formData?o.body=kv(i.formData):o.body=i.formData}return new Request(r,o)}function kv(t){let e=new URLSearchParams;for(let[n,i]of t.entries())e.append(n,typeof i=="string"?i:i.name);return e}function UE(t){let e=new FormData;for(let[n,i]of t.entries())e.append(n,i);return e}function fH(t,e,n,i,r,o){let s={},a=null,l,u=!1,c={},d=i&&er(i[1])?i[1].error:void 0;return n.forEach((h,p)=>{let m=e[p].route.id;if(je(!zl(h),"Cannot handle redirect results in processLoaderData"),er(h)){let O=h.error;d!==void 0&&(O=d,d=void 0),a=a||{};{let y=lf(t,m);a[y.route.id]==null&&(a[y.route.id]=O)}s[m]=void 0,u||(u=!0,l=Ek(h.error)?h.error.status:500),h.headers&&(c[m]=h.headers)}else Fl(h)?(r.set(m,h.deferredData),s[m]=h.deferredData.data,h.statusCode!=null&&h.statusCode!==200&&!u&&(l=h.statusCode),h.headers&&(c[m]=h.headers)):(s[m]=h.data,h.statusCode&&h.statusCode!==200&&!u&&(l=h.statusCode),h.headers&&(c[m]=h.headers))}),d!==void 0&&i&&(a={[i[0]]:d},s[i[0]]=void 0),{loaderData:s,errors:a,statusCode:l||200,loaderHeaders:c}}function WE(t,e,n,i,r,o,s,a){let{loaderData:l,errors:u}=fH(e,n,i,r,a);for(let c=0;ci.route.id===e)+1):[...t]).reverse().find(i=>i.route.hasErrorBoundary===!0)||t[0]}function XE(t){let e=t.length===1?t[0]:t.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:e}],route:e}}function Yi(t,e){let{pathname:n,routeId:i,method:r,type:o}=e===void 0?{}:e,s="Unknown Server Error",a="Unknown @remix-run/router error";return t===400?(s="Bad Request",r&&n&&i?a="You made a "+r+' request to "'+n+'" but '+('did not provide a `loader` for route "'+i+'", ')+"so there is no way to handle the request.":o==="defer-action"?a="defer() is not supported in actions":o==="invalid-body"&&(a="Unable to encode submission body")):t===403?(s="Forbidden",a='Route "'+i+'" does not match URL "'+n+'"'):t===404?(s="Not Found",a='No route matches URL "'+n+'"'):t===405&&(s="Method Not Allowed",r&&n&&i?a="You made a "+r.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+i+'", ')+"so there is no way to handle the request.":r&&(a='Invalid request method "'+r.toUpperCase()+'"')),new _k(t||500,s,new Error(a),!0)}function ZE(t){for(let e=t.length-1;e>=0;e--){let n=t[e];if(zl(n))return{result:n,idx:e}}}function m5(t){let e=typeof t=="string"?ls(t):t;return tu(Lt({},e,{hash:""}))}function pH(t,e){return t.pathname!==e.pathname||t.search!==e.search?!1:t.hash===""?e.hash!=="":t.hash===e.hash?!0:e.hash!==""}function mH(t){return g5(t.result)&&eH.has(t.result.status)}function Fl(t){return t.type===Pt.deferred}function er(t){return t.type===Pt.error}function zl(t){return(t&&t.type)===Pt.redirect}function gH(t){let e=t;return e&&typeof e=="object"&&typeof e.data=="object"&&typeof e.subscribe=="function"&&typeof e.cancel=="function"&&typeof e.resolveData=="function"}function g5(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function OH(t){return Jz.has(t.toLowerCase())}function _r(t){return Gz.has(t.toLowerCase())}async function qE(t,e,n,i,r,o){for(let s=0;sd.route.id===l.route.id),c=u!=null&&!p5(u,l)&&(o&&o[l.route.id])!==void 0;if(Fl(a)&&(r||c)){let d=i[s];je(d,"Expected an AbortSignal for revalidating fetcher deferred result"),await O5(a,d,r).then(h=>{h&&(n[s]=h||n[s])})}}}async function O5(t,e,n){if(n===void 0&&(n=!1),!await t.deferredData.resolveData(e)){if(n)try{return{type:Pt.data,data:t.deferredData.unwrappedData}}catch(r){return{type:Pt.error,error:r}}return{type:Pt.data,data:t.deferredData.data}}}function Tk(t){return new URLSearchParams(t).getAll("index").some(e=>e==="")}function xv(t,e){let n=typeof e=="string"?ls(e).search:e.search;if(t[t.length-1].route.index&&Tk(n||""))return t[t.length-1];let i=d5(t);return i[i.length-1]}function YE(t){let{formMethod:e,formAction:n,formEncType:i,text:r,formData:o,json:s}=t;if(!(!e||!n||!i)){if(r!=null)return{formMethod:e,formAction:n,formEncType:i,formData:void 0,json:void 0,text:r};if(o!=null)return{formMethod:e,formAction:n,formEncType:i,formData:o,json:void 0,text:void 0};if(s!==void 0)return{formMethod:e,formAction:n,formEncType:i,formData:void 0,json:s,text:void 0}}}function fy(t,e){return e?{state:"loading",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}:{state:"loading",location:t,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function bH(t,e){return{state:"submitting",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}}function vh(t,e){return t?{state:"loading",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function yH(t,e){return{state:"submitting",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e?e.data:void 0}}function Ls(t){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function vH(t,e){try{let n=t.sessionStorage.getItem(f5);if(n){let i=JSON.parse(n);for(let[r,o]of Object.entries(i||{}))o&&Array.isArray(o)&&e.set(r,new Set(o||[]))}}catch{}}function SH(t,e){if(e.size>0){let n={};for(let[i,r]of e)n[i]=[...r];try{t.sessionStorage.setItem(f5,JSON.stringify(n))}catch(i){eu(!1,"Failed to save applied view transitions in sessionStorage ("+i+").")}}}/** + */function Nt(){return Nt=Object.assign?Object.assign.bind():function(t){for(var e=1;e"u")throw new Error(e)}function nu(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function Tz(){return Math.random().toString(36).substr(2,8)}function ME(t,e){return{usr:t.state,key:t.key,idx:e}}function Uf(t,e,n,i){return n===void 0&&(n=null),Nt({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?us(e):e,{state:n,key:e&&e.key||i||Tz()})}function iu(t){let{pathname:e="/",search:n="",hash:i=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),i&&i!=="#"&&(e+=i.charAt(0)==="#"?i:"#"+i),e}function us(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let i=t.indexOf("?");i>=0&&(e.search=t.substr(i),t=t.substr(0,i)),t&&(e.pathname=t)}return e}function Pz(t,e,n,i){i===void 0&&(i={});let{window:r=document.defaultView,v5Compat:o=!1}=i,s=r.history,a=Yt.Pop,l=null,u=c();u==null&&(u=0,s.replaceState(Nt({},s.state,{idx:u}),""));function c(){return(s.state||{idx:null}).idx}function d(){a=Yt.Pop;let y=c(),b=y==null?null:y-u;u=y,l&&l({action:a,location:O.location,delta:b})}function h(y,b){a=Yt.Push;let v=Uf(O.location,y,b);n&&n(v,y),u=c()+1;let S=ME(v,u),k=O.createHref(v);try{s.pushState(S,"",k)}catch(x){if(x instanceof DOMException&&x.name==="DataCloneError")throw x;r.location.assign(k)}o&&l&&l({action:a,location:O.location,delta:1})}function p(y,b){a=Yt.Replace;let v=Uf(O.location,y,b);n&&n(v,y),u=c();let S=ME(v,u),k=O.createHref(v);s.replaceState(S,"",k),o&&l&&l({action:a,location:O.location,delta:0})}function m(y){let b=r.location.origin!=="null"?r.location.origin:r.location.href,v=typeof y=="string"?y:iu(y);return v=v.replace(/ $/,"%20"),Xe(b,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,b)}let O={get action(){return a},get location(){return t(r,s)},listen(y){if(l)throw new Error("A history only accepts one active listener");return r.addEventListener(NE,d),l=y,()=>{r.removeEventListener(NE,d),l=null}},createHref(y){return e(r,y)},createURL:m,encodeLocation(y){let b=m(y);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:h,replace:p,go(y){return s.go(y)}};return O}var Pt;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(Pt||(Pt={}));const Az=new Set(["lazy","caseSensitive","path","id","index","children"]);function Rz(t){return t.index===!0}function wv(t,e,n,i){return n===void 0&&(n=[]),i===void 0&&(i={}),t.map((r,o)=>{let s=[...n,o],a=typeof r.id=="string"?r.id:s.join("-");if(Xe(r.index!==!0||!r.children,"Cannot specify children on an index route"),Xe(!i[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),Rz(r)){let l=Nt({},r,e(r),{id:a});return i[a]=l,l}else{let l=Nt({},r,e(r),{id:a,children:void 0});return i[a]=l,r.children&&(l.children=wv(r.children,e,s,i)),l}})}function Lc(t,e,n){n===void 0&&(n="/");let i=typeof e=="string"?us(e):e,r=Rd(i.pathname||"/",n);if(r==null)return null;let o=u5(t);$z(o);let s=null;for(let a=0;s==null&&a{let l={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};l.relativePath.startsWith("/")&&(Xe(l.relativePath.startsWith(i),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+i+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(i.length));let u=qo([i,l.relativePath]),c=n.concat(l);o.children&&o.children.length>0&&(Xe(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),u5(o.children,e,c,u)),!(o.path==null&&!o.index)&&e.push({path:u,score:Fz(u,o.index),routesMeta:c})};return t.forEach((o,s)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))r(o,s);else for(let l of c5(o.path))r(o,s,l)}),e}function c5(t){let e=t.split("/");if(e.length===0)return[];let[n,...i]=e,r=n.endsWith("?"),o=n.replace(/\?$/,"");if(i.length===0)return r?[o,""]:[o];let s=c5(i.join("/")),a=[];return a.push(...s.map(l=>l===""?o:[o,l].join("/"))),r&&a.push(...s),a.map(l=>t.startsWith("/")&&l===""?"/":l)}function $z(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:zz(e.routesMeta.map(i=>i.childrenIndex),n.routesMeta.map(i=>i.childrenIndex)))}const Lz=/^:[\w-]+$/,Nz=3,Mz=2,Dz=1,Bz=10,Qz=-2,DE=t=>t==="*";function Fz(t,e){let n=t.split("/"),i=n.length;return n.some(DE)&&(i+=Qz),e&&(i+=Mz),n.filter(r=>!DE(r)).reduce((r,o)=>r+(Lz.test(o)?Nz:o===""?Dz:Bz),i)}function zz(t,e){return t.length===e.length&&t.slice(0,-1).every((i,r)=>i===e[r])?t[t.length-1]-e[e.length-1]:0}function Hz(t,e){let{routesMeta:n}=t,i={},r="/",o=[];for(let s=0;s{let{paramName:h,isOptional:p}=c;if(h==="*"){let O=a[d]||"";s=o.slice(0,o.length-O.length).replace(/(.)\/+$/,"$1")}const m=a[d];return p&&!m?u[h]=void 0:u[h]=(m||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:s,pattern:t}}function Wz(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),nu(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 i=[],r="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,a,l)=>(i.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(i.push({paramName:"*"}),r+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?r+="\\/*$":t!==""&&t!=="/"&&(r+="(?:(?=\\/|$))"),[new RegExp(r,e?void 0:"i"),i]}function Vz(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return nu(!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 Rd(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,i=t.charAt(n);return i&&i!=="/"?null:t.slice(n)||"/"}function jz(t,e){e===void 0&&(e="/");let{pathname:n,search:i="",hash:r=""}=typeof t=="string"?us(t):t;return{pathname:n?n.startsWith("/")?n:Xz(n,e):e,search:qz(i),hash:Yz(r)}}function Xz(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(r=>{r===".."?n.length>1&&n.pop():r!=="."&&n.push(r)}),n.length>1?n.join("/"):"/"}function hy(t,e,n,i){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(i)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function d5(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function xk(t,e){let n=d5(t);return e?n.map((i,r)=>r===t.length-1?i.pathname:i.pathnameBase):n.map(i=>i.pathnameBase)}function _k(t,e,n,i){i===void 0&&(i=!1);let r;typeof t=="string"?r=us(t):(r=Nt({},t),Xe(!r.pathname||!r.pathname.includes("?"),hy("?","pathname","search",r)),Xe(!r.pathname||!r.pathname.includes("#"),hy("#","pathname","hash",r)),Xe(!r.search||!r.search.includes("#"),hy("#","search","hash",r)));let o=t===""||r.pathname==="",s=o?"/":r.pathname,a;if(s==null)a=n;else{let d=e.length-1;if(!i&&s.startsWith("..")){let h=s.split("/");for(;h[0]==="..";)h.shift(),d-=1;r.pathname=h.join("/")}a=d>=0?e[d]:"/"}let l=jz(r,a),u=s&&s!=="/"&&s.endsWith("/"),c=(o||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const qo=t=>t.join("/").replace(/\/\/+/g,"/"),Zz=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),qz=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,Yz=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;class Ek{constructor(e,n,i,r){r===void 0&&(r=!1),this.status=e,this.statusText=n||"",this.internal=r,i instanceof Error?(this.data=i.toString(),this.error=i):this.data=i}}function Ck(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const h5=["post","put","patch","delete"],Gz=new Set(h5),Kz=["get",...h5],Jz=new Set(Kz),eH=new Set([301,302,303,307,308]),tH=new Set([307,308]),fy={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},nH={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},vh={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Tk=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,iH=t=>({hasErrorBoundary:!!t.hasErrorBoundary}),f5="remix-router-transitions";function rH(t){const e=t.window?t.window:typeof window<"u"?window:void 0,n=typeof e<"u"&&typeof e.document<"u"&&typeof e.document.createElement<"u",i=!n;Xe(t.routes.length>0,"You must provide a non-empty routes array to createRouter");let r;if(t.mapRouteProperties)r=t.mapRouteProperties;else if(t.detectErrorBoundary){let M=t.detectErrorBoundary;r=U=>({hasErrorBoundary:M(U)})}else r=iH;let o={},s=wv(t.routes,r,void 0,o),a,l=t.basename||"/",u=t.unstable_dataStrategy||lH,c=Nt({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,unstable_skipActionErrorRevalidation:!1},t.future),d=null,h=new Set,p=null,m=null,O=null,y=t.hydrationData!=null,b=Lc(s,t.history.location,l),v=null;if(b==null){let M=qi(404,{pathname:t.history.location.pathname}),{matches:U,route:G}=XE(s);b=U,v={[G.id]:M}}let S,k=b.some(M=>M.route.lazy),x=b.some(M=>M.route.loader);if(k)S=!1;else if(!x)S=!0;else if(c.v7_partialHydration){let M=t.hydrationData?t.hydrationData.loaderData:null,U=t.hydrationData?t.hydrationData.errors:null,G=ie=>ie.route.loader?typeof ie.route.loader=="function"&&ie.route.loader.hydrate===!0?!1:M&&M[ie.route.id]!==void 0||U&&U[ie.route.id]!==void 0:!0;if(U){let ie=b.findIndex(fe=>U[fe.route.id]!==void 0);S=b.slice(0,ie+1).every(G)}else S=b.every(G)}else S=t.hydrationData!=null;let _,w={historyAction:t.history.action,location:t.history.location,matches:b,initialized:S,navigation:fy,restoreScrollPosition:t.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:t.hydrationData&&t.hydrationData.loaderData||{},actionData:t.hydrationData&&t.hydrationData.actionData||null,errors:t.hydrationData&&t.hydrationData.errors||v,fetchers:new Map,blockers:new Map},D=Yt.Pop,W=!1,I,V=!1,B=new Map,H=null,K=!1,re=!1,ke=[],ge=[],Z=new Map,se=0,A=-1,Oe=new Map,ye=new Set,L=new Map,Ve=new Map,tt=new Set,Be=new Map,Qt=new Map,Vn=!1;function gr(){if(d=t.history.listen(M=>{let{action:U,location:G,delta:ie}=M;if(Vn){Vn=!1;return}nu(Qt.size===0||ie!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let fe=Xi({currentLocation:w.location,nextLocation:G,historyAction:U});if(fe&&ie!=null){Vn=!0,t.history.go(ie*-1),br(fe,{state:"blocked",location:G,proceed(){br(fe,{state:"proceeding",proceed:void 0,reset:void 0,location:G}),t.history.go(ie)},reset(){let Qe=new Map(w.blockers);Qe.set(fe,vh),Zt({blockers:Qe})}});return}return si(U,G)}),n){vH(e,B);let M=()=>SH(e,B);e.addEventListener("pagehide",M),H=()=>e.removeEventListener("pagehide",M)}return w.initialized||si(Yt.Pop,w.location,{initialHydration:!0}),_}function Or(){d&&d(),H&&H(),h.clear(),I&&I.abort(),w.fetchers.forEach((M,U)=>Te(U)),w.blockers.forEach((M,U)=>An(U))}function Os(M){return h.add(M),()=>h.delete(M)}function Zt(M,U){U===void 0&&(U={}),w=Nt({},w,M);let G=[],ie=[];c.v7_fetcherPersist&&w.fetchers.forEach((fe,Qe)=>{fe.state==="idle"&&(tt.has(Qe)?ie.push(Qe):G.push(Qe))}),[...h].forEach(fe=>fe(w,{deletedFetchers:ie,unstable_viewTransitionOpts:U.viewTransitionOpts,unstable_flushSync:U.flushSync===!0})),c.v7_fetcherPersist&&(G.forEach(fe=>w.fetchers.delete(fe)),ie.forEach(fe=>Te(fe)))}function qr(M,U,G){var ie,fe;let{flushSync:Qe}=G===void 0?{}:G,xe=w.actionData!=null&&w.navigation.formMethod!=null&&_r(w.navigation.formMethod)&&w.navigation.state==="loading"&&((ie=M.state)==null?void 0:ie._isRedirect)!==!0,me;U.actionData?Object.keys(U.actionData).length>0?me=U.actionData:me=null:xe?me=w.actionData:me=null;let He=U.loaderData?VE(w.loaderData,U.loaderData,U.matches||[],U.errors):w.loaderData,$e=w.blockers;$e.size>0&&($e=new Map($e),$e.forEach((Ae,Et)=>$e.set(Et,vh)));let On=W===!0||w.navigation.formMethod!=null&&_r(w.navigation.formMethod)&&((fe=M.state)==null?void 0:fe._isRedirect)!==!0;a&&(s=a,a=void 0),K||D===Yt.Pop||(D===Yt.Push?t.history.push(M,M.state):D===Yt.Replace&&t.history.replace(M,M.state));let bn;if(D===Yt.Pop){let Ae=B.get(w.location.pathname);Ae&&Ae.has(M.pathname)?bn={currentLocation:w.location,nextLocation:M}:B.has(M.pathname)&&(bn={currentLocation:M,nextLocation:w.location})}else if(V){let Ae=B.get(w.location.pathname);Ae?Ae.add(M.pathname):(Ae=new Set([M.pathname]),B.set(w.location.pathname,Ae)),bn={currentLocation:w.location,nextLocation:M}}Zt(Nt({},U,{actionData:me,loaderData:He,historyAction:D,location:M,initialized:!0,navigation:fy,revalidation:"idle",restoreScrollPosition:x_(M,U.matches||w.matches),preventScrollReset:On,blockers:$e}),{viewTransitionOpts:bn,flushSync:Qe===!0}),D=Yt.Pop,W=!1,V=!1,K=!1,re=!1,ke=[],ge=[]}async function Yr(M,U){if(typeof M=="number"){t.history.go(M);return}let G=kv(w.location,w.matches,l,c.v7_prependBasename,M,c.v7_relativeSplatPath,U==null?void 0:U.fromRouteId,U==null?void 0:U.relative),{path:ie,submission:fe,error:Qe}=BE(c.v7_normalizeFormMethod,!1,G,U),xe=w.location,me=Uf(w.location,ie,U&&U.state);me=Nt({},me,t.history.encodeLocation(me));let He=U&&U.replace!=null?U.replace:void 0,$e=Yt.Push;He===!0?$e=Yt.Replace:He===!1||fe!=null&&_r(fe.formMethod)&&fe.formAction===w.location.pathname+w.location.search&&($e=Yt.Replace);let On=U&&"preventScrollReset"in U?U.preventScrollReset===!0:void 0,bn=(U&&U.unstable_flushSync)===!0,Ae=Xi({currentLocation:xe,nextLocation:me,historyAction:$e});if(Ae){br(Ae,{state:"blocked",location:me,proceed(){br(Ae,{state:"proceeding",proceed:void 0,reset:void 0,location:me}),Yr(M,U)},reset(){let Et=new Map(w.blockers);Et.set(Ae,vh),Zt({blockers:Et})}});return}return await si($e,me,{submission:fe,pendingError:Qe,preventScrollReset:On,replace:U&&U.replace,enableViewTransition:U&&U.unstable_viewTransition,flushSync:bn})}function Bu(){if(ze(),Zt({revalidation:"loading"}),w.navigation.state!=="submitting"){if(w.navigation.state==="idle"){si(w.historyAction,w.location,{startUninterruptedRevalidation:!0});return}si(D||w.historyAction,w.navigation.location,{overrideNavigation:w.navigation})}}async function si(M,U,G){I&&I.abort(),I=null,D=M,K=(G&&G.startUninterruptedRevalidation)===!0,G7(w.location,w.matches),W=(G&&G.preventScrollReset)===!0,V=(G&&G.enableViewTransition)===!0;let ie=a||s,fe=G&&G.overrideNavigation,Qe=Lc(ie,U,l),xe=(G&&G.flushSync)===!0;if(!Qe){let Ae=qi(404,{pathname:U.pathname}),{matches:Et,route:cn}=XE(ie);Qb(),qr(U,{matches:Et,loaderData:{},errors:{[cn.id]:Ae}},{flushSync:xe});return}if(w.initialized&&!re&&pH(w.location,U)&&!(G&&G.submission&&_r(G.submission.formMethod))){qr(U,{matches:Qe},{flushSync:xe});return}I=new AbortController;let me=Vu(t.history,U,I.signal,G&&G.submission),He;if(G&&G.pendingError)He=[uf(Qe).route.id,{type:Pt.error,error:G.pendingError}];else if(G&&G.submission&&_r(G.submission.formMethod)){let Ae=await Gr(me,U,G.submission,Qe,{replace:G.replace,flushSync:xe});if(Ae.shortCircuited)return;He=Ae.pendingActionResult,fe=py(U,G.submission),xe=!1,me=Vu(t.history,me.url,me.signal)}let{shortCircuited:$e,loaderData:On,errors:bn}=await Ta(me,U,Qe,fe,G&&G.submission,G&&G.fetcherSubmission,G&&G.replace,G&&G.initialHydration===!0,xe,He);$e||(I=null,qr(U,Nt({matches:Qe},jE(He),{loaderData:On,errors:bn})))}async function Gr(M,U,G,ie,fe){fe===void 0&&(fe={}),ze();let Qe=bH(U,G);Zt({navigation:Qe},{flushSync:fe.flushSync===!0});let xe,me=_v(ie,U);if(!me.route.action&&!me.route.lazy)xe={type:Pt.error,error:qi(405,{method:M.method,pathname:U.pathname,routeId:me.route.id})};else if(xe=(await ai("action",M,[me],ie))[0],M.signal.aborted)return{shortCircuited:!0};if(Ul(xe)){let He;return fe&&fe.replace!=null?He=fe.replace:He=HE(xe.response.headers.get("Location"),new URL(M.url),l)===w.location.pathname+w.location.search,await rn(M,xe,{submission:G,replace:He}),{shortCircuited:!0}}if(Hl(xe))throw qi(400,{type:"defer-action"});if(Ji(xe)){let He=uf(ie,me.route.id);return(fe&&fe.replace)!==!0&&(D=Yt.Push),{pendingActionResult:[He.route.id,xe]}}return{pendingActionResult:[me.route.id,xe]}}async function Ta(M,U,G,ie,fe,Qe,xe,me,He,$e){let On=ie||py(U,fe),bn=fe||Qe||YE(On),Ae=a||s,[Et,cn]=QE(t.history,w,G,bn,U,c.v7_partialHydration&&me===!0,c.unstable_skipActionErrorRevalidation,re,ke,ge,tt,L,ye,Ae,l,$e);if(Qb(Ke=>!(G&&G.some(jn=>jn.route.id===Ke))||Et&&Et.some(jn=>jn.route.id===Ke)),A=++se,Et.length===0&&cn.length===0){let Ke=Lt();return qr(U,Nt({matches:G,loaderData:{},errors:$e&&Ji($e[1])?{[$e[0]]:$e[1].error}:null},jE($e),Ke?{fetchers:new Map(w.fetchers)}:{}),{flushSync:He}),{shortCircuited:!0}}if(!K&&(!c.v7_partialHydration||!me)){cn.forEach(jn=>{let Zi=w.fetchers.get(jn.key),yn=Sh(void 0,Zi?Zi.data:void 0);w.fetchers.set(jn.key,yn)});let Ke;$e&&!Ji($e[1])?Ke={[$e[0]]:$e[1].data}:w.actionData&&(Object.keys(w.actionData).length===0?Ke=null:Ke=w.actionData),Zt(Nt({navigation:On},Ke!==void 0?{actionData:Ke}:{},cn.length>0?{fetchers:new Map(w.fetchers)}:{}),{flushSync:He})}cn.forEach(Ke=>{Z.has(Ke.key)&&Ce(Ke.key),Ke.controller&&Z.set(Ke.key,Ke.controller)});let ch=()=>cn.forEach(Ke=>Ce(Ke.key));I&&I.signal.addEventListener("abort",ch);let{loaderResults:bs,fetcherResults:zu}=await $o(w.matches,G,Et,cn,M);if(M.signal.aborted)return{shortCircuited:!0};I&&I.signal.removeEventListener("abort",ch),cn.forEach(Ke=>Z.delete(Ke.key));let Hu=ZE([...bs,...zu]);if(Hu){if(Hu.idx>=Et.length){let Ke=cn[Hu.idx-Et.length].key;ye.add(Ke)}return await rn(M,Hu.result,{replace:xe}),{shortCircuited:!0}}let{loaderData:Uu,errors:Jr}=WE(w,G,Et,bs,$e,cn,zu,Be);Be.forEach((Ke,jn)=>{Ke.subscribe(Zi=>{(Zi||Ke.done)&&Be.delete(jn)})}),c.v7_partialHydration&&me&&w.errors&&Object.entries(w.errors).filter(Ke=>{let[jn]=Ke;return!Et.some(Zi=>Zi.route.id===jn)}).forEach(Ke=>{let[jn,Zi]=Ke;Jr=Object.assign(Jr||{},{[jn]:Zi})});let jp=Lt(),Xp=ji(A),Zp=jp||Xp||cn.length>0;return Nt({loaderData:Uu,errors:Jr},Zp?{fetchers:new Map(w.fetchers)}:{})}function Qu(M,U,G,ie){if(i)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");Z.has(M)&&Ce(M);let fe=(ie&&ie.unstable_flushSync)===!0,Qe=a||s,xe=kv(w.location,w.matches,l,c.v7_prependBasename,G,c.v7_relativeSplatPath,U,ie==null?void 0:ie.relative),me=Lc(Qe,xe,l);if(!me){X(M,U,qi(404,{pathname:xe}),{flushSync:fe});return}let{path:He,submission:$e,error:On}=BE(c.v7_normalizeFormMethod,!0,xe,ie);if(On){X(M,U,On,{flushSync:fe});return}let bn=_v(me,He);if(W=(ie&&ie.preventScrollReset)===!0,$e&&_r($e.formMethod)){Pa(M,U,He,bn,me,fe,$e);return}L.set(M,{routeId:U,path:He}),Fu(M,U,He,bn,me,fe,$e)}async function Pa(M,U,G,ie,fe,Qe,xe){if(ze(),L.delete(M),!ie.route.action&&!ie.route.lazy){let yn=qi(405,{method:xe.formMethod,pathname:G,routeId:U});X(M,U,yn,{flushSync:Qe});return}let me=w.fetchers.get(M);F(M,yH(xe,me),{flushSync:Qe});let He=new AbortController,$e=Vu(t.history,G,He.signal,xe);Z.set(M,He);let On=se,Ae=(await ai("action",$e,[ie],fe))[0];if($e.signal.aborted){Z.get(M)===He&&Z.delete(M);return}if(c.v7_fetcherPersist&&tt.has(M)){if(Ul(Ae)||Ji(Ae)){F(M,Ns(void 0));return}}else{if(Ul(Ae))if(Z.delete(M),A>On){F(M,Ns(void 0));return}else return ye.add(M),F(M,Sh(xe)),rn($e,Ae,{fetcherSubmission:xe});if(Ji(Ae)){X(M,U,Ae.error);return}}if(Hl(Ae))throw qi(400,{type:"defer-action"});let Et=w.navigation.location||w.location,cn=Vu(t.history,Et,He.signal),ch=a||s,bs=w.navigation.state!=="idle"?Lc(ch,w.navigation.location,l):w.matches;Xe(bs,"Didn't find any matches after fetcher action");let zu=++se;Oe.set(M,zu);let Hu=Sh(xe,Ae.data);w.fetchers.set(M,Hu);let[Uu,Jr]=QE(t.history,w,bs,xe,Et,!1,c.unstable_skipActionErrorRevalidation,re,ke,ge,tt,L,ye,ch,l,[ie.route.id,Ae]);Jr.filter(yn=>yn.key!==M).forEach(yn=>{let dh=yn.key,__=w.fetchers.get(dh),J7=Sh(void 0,__?__.data:void 0);w.fetchers.set(dh,J7),Z.has(dh)&&Ce(dh),yn.controller&&Z.set(dh,yn.controller)}),Zt({fetchers:new Map(w.fetchers)});let jp=()=>Jr.forEach(yn=>Ce(yn.key));He.signal.addEventListener("abort",jp);let{loaderResults:Xp,fetcherResults:Zp}=await $o(w.matches,bs,Uu,Jr,cn);if(He.signal.aborted)return;He.signal.removeEventListener("abort",jp),Oe.delete(M),Z.delete(M),Jr.forEach(yn=>Z.delete(yn.key));let Ke=ZE([...Xp,...Zp]);if(Ke){if(Ke.idx>=Uu.length){let yn=Jr[Ke.idx-Uu.length].key;ye.add(yn)}return rn(cn,Ke.result)}let{loaderData:jn,errors:Zi}=WE(w,w.matches,Uu,Xp,void 0,Jr,Zp,Be);if(w.fetchers.has(M)){let yn=Ns(Ae.data);w.fetchers.set(M,yn)}ji(zu),w.navigation.state==="loading"&&zu>A?(Xe(D,"Expected pending action"),I&&I.abort(),qr(w.navigation.location,{matches:bs,loaderData:jn,errors:Zi,fetchers:new Map(w.fetchers)})):(Zt({errors:Zi,loaderData:VE(w.loaderData,jn,bs,Zi),fetchers:new Map(w.fetchers)}),re=!1)}async function Fu(M,U,G,ie,fe,Qe,xe){let me=w.fetchers.get(M);F(M,Sh(xe,me?me.data:void 0),{flushSync:Qe});let He=new AbortController,$e=Vu(t.history,G,He.signal);Z.set(M,He);let On=se,Ae=(await ai("loader",$e,[ie],fe))[0];if(Hl(Ae)&&(Ae=await O5(Ae,$e.signal,!0)||Ae),Z.get(M)===He&&Z.delete(M),!$e.signal.aborted){if(tt.has(M)){F(M,Ns(void 0));return}if(Ul(Ae))if(A>On){F(M,Ns(void 0));return}else{ye.add(M),await rn($e,Ae);return}if(Ji(Ae)){X(M,U,Ae.error);return}Xe(!Hl(Ae),"Unhandled fetcher deferred data"),F(M,Ns(Ae.data))}}async function rn(M,U,G){let{submission:ie,fetcherSubmission:fe,replace:Qe}=G===void 0?{}:G;U.response.headers.has("X-Remix-Revalidate")&&(re=!0);let xe=U.response.headers.get("Location");Xe(xe,"Expected a Location header on the redirect Response"),xe=HE(xe,new URL(M.url),l);let me=Uf(w.location,xe,{_isRedirect:!0});if(n){let Et=!1;if(U.response.headers.has("X-Remix-Reload-Document"))Et=!0;else if(Tk.test(xe)){const cn=t.history.createURL(xe);Et=cn.origin!==e.location.origin||Rd(cn.pathname,l)==null}if(Et){Qe?e.location.replace(xe):e.location.assign(xe);return}}I=null;let He=Qe===!0?Yt.Replace:Yt.Push,{formMethod:$e,formAction:On,formEncType:bn}=w.navigation;!ie&&!fe&&$e&&On&&bn&&(ie=YE(w.navigation));let Ae=ie||fe;if(tH.has(U.response.status)&&Ae&&_r(Ae.formMethod))await si(He,me,{submission:Nt({},Ae,{formAction:xe}),preventScrollReset:W});else{let Et=py(me,ie);await si(He,me,{overrideNavigation:Et,fetcherSubmission:fe,preventScrollReset:W})}}async function ai(M,U,G,ie){try{let fe=await uH(u,M,U,G,ie,o,r);return await Promise.all(fe.map((Qe,xe)=>{if(mH(Qe)){let me=Qe.result;return{type:Pt.redirect,response:hH(me,U,G[xe].route.id,ie,l,c.v7_relativeSplatPath)}}return dH(Qe)}))}catch(fe){return G.map(()=>({type:Pt.error,error:fe}))}}async function $o(M,U,G,ie,fe){let[Qe,...xe]=await Promise.all([G.length?ai("loader",fe,G,U):[],...ie.map(me=>{if(me.matches&&me.match&&me.controller){let He=Vu(t.history,me.path,me.controller.signal);return ai("loader",He,[me.match],me.matches).then($e=>$e[0])}else return Promise.resolve({type:Pt.error,error:qi(404,{pathname:me.path})})})]);return await Promise.all([qE(M,G,Qe,Qe.map(()=>fe.signal),!1,w.loaderData),qE(M,ie.map(me=>me.match),xe,ie.map(me=>me.controller?me.controller.signal:null),!0)]),{loaderResults:Qe,fetcherResults:xe}}function ze(){re=!0,ke.push(...Qb()),L.forEach((M,U)=>{Z.has(U)&&(ge.push(U),Ce(U))})}function F(M,U,G){G===void 0&&(G={}),w.fetchers.set(M,U),Zt({fetchers:new Map(w.fetchers)},{flushSync:(G&&G.flushSync)===!0})}function X(M,U,G,ie){ie===void 0&&(ie={});let fe=uf(w.matches,U);Te(M),Zt({errors:{[fe.route.id]:G},fetchers:new Map(w.fetchers)},{flushSync:(ie&&ie.flushSync)===!0})}function ue(M){return c.v7_fetcherPersist&&(Ve.set(M,(Ve.get(M)||0)+1),tt.has(M)&&tt.delete(M)),w.fetchers.get(M)||nH}function Te(M){let U=w.fetchers.get(M);Z.has(M)&&!(U&&U.state==="loading"&&Oe.has(M))&&Ce(M),L.delete(M),Oe.delete(M),ye.delete(M),tt.delete(M),w.fetchers.delete(M)}function Ue(M){if(c.v7_fetcherPersist){let U=(Ve.get(M)||0)-1;U<=0?(Ve.delete(M),tt.add(M)):Ve.set(M,U)}else Te(M);Zt({fetchers:new Map(w.fetchers)})}function Ce(M){let U=Z.get(M);Xe(U,"Expected fetch controller: "+M),U.abort(),Z.delete(M)}function we(M){for(let U of M){let G=ue(U),ie=Ns(G.data);w.fetchers.set(U,ie)}}function Lt(){let M=[],U=!1;for(let G of ye){let ie=w.fetchers.get(G);Xe(ie,"Expected fetcher: "+G),ie.state==="loading"&&(ye.delete(G),M.push(G),U=!0)}return we(M),U}function ji(M){let U=[];for(let[G,ie]of Oe)if(ie0}function Kr(M,U){let G=w.blockers.get(M)||vh;return Qt.get(M)!==U&&Qt.set(M,U),G}function An(M){w.blockers.delete(M),Qt.delete(M)}function br(M,U){let G=w.blockers.get(M)||vh;Xe(G.state==="unblocked"&&U.state==="blocked"||G.state==="blocked"&&U.state==="blocked"||G.state==="blocked"&&U.state==="proceeding"||G.state==="blocked"&&U.state==="unblocked"||G.state==="proceeding"&&U.state==="unblocked","Invalid blocker state transition: "+G.state+" -> "+U.state);let ie=new Map(w.blockers);ie.set(M,U),Zt({blockers:ie})}function Xi(M){let{currentLocation:U,nextLocation:G,historyAction:ie}=M;if(Qt.size===0)return;Qt.size>1&&nu(!1,"A router only supports one blocker at a time");let fe=Array.from(Qt.entries()),[Qe,xe]=fe[fe.length-1],me=w.blockers.get(Qe);if(!(me&&me.state==="proceeding")&&xe({currentLocation:U,nextLocation:G,historyAction:ie}))return Qe}function Qb(M){let U=[];return Be.forEach((G,ie)=>{(!M||M(ie))&&(G.cancel(),U.push(ie),Be.delete(ie))}),U}function Y7(M,U,G){if(p=M,O=U,m=G||null,!y&&w.navigation===fy){y=!0;let ie=x_(w.location,w.matches);ie!=null&&Zt({restoreScrollPosition:ie})}return()=>{p=null,O=null,m=null}}function k_(M,U){return m&&m(M,U.map(ie=>Iz(ie,w.loaderData)))||M.key}function G7(M,U){if(p&&O){let G=k_(M,U);p[G]=O()}}function x_(M,U){if(p){let G=k_(M,U),ie=p[G];if(typeof ie=="number")return ie}return null}function K7(M){o={},a=wv(M,r,void 0,o)}return _={get basename(){return l},get future(){return c},get state(){return w},get routes(){return s},get window(){return e},initialize:gr,subscribe:Os,enableScrollRestoration:Y7,navigate:Yr,fetch:Qu,revalidate:Bu,createHref:M=>t.history.createHref(M),encodeLocation:M=>t.history.encodeLocation(M),getFetcher:ue,deleteFetcher:Ue,dispose:Or,getBlocker:Kr,deleteBlocker:An,_internalFetchControllers:Z,_internalActiveDeferreds:Be,_internalSetRoutes:K7},_}function oH(t){return t!=null&&("formData"in t&&t.formData!=null||"body"in t&&t.body!==void 0)}function kv(t,e,n,i,r,o,s,a){let l,u;if(s){l=[];for(let d of e)if(l.push(d),d.route.id===s){u=d;break}}else l=e,u=e[e.length-1];let c=_k(r||".",xk(l,o),Rd(t.pathname,n)||t.pathname,a==="path");return r==null&&(c.search=t.search,c.hash=t.hash),(r==null||r===""||r===".")&&u&&u.route.index&&!Pk(c.search)&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),i&&n!=="/"&&(c.pathname=c.pathname==="/"?n:qo([n,c.pathname])),iu(c)}function BE(t,e,n,i){if(!i||!oH(i))return{path:n};if(i.formMethod&&!OH(i.formMethod))return{path:n,error:qi(405,{method:i.formMethod})};let r=()=>({path:n,error:qi(400,{type:"invalid-body"})}),o=i.formMethod||"get",s=t?o.toUpperCase():o.toLowerCase(),a=m5(n);if(i.body!==void 0){if(i.formEncType==="text/plain"){if(!_r(s))return r();let h=typeof i.body=="string"?i.body:i.body instanceof FormData||i.body instanceof URLSearchParams?Array.from(i.body.entries()).reduce((p,m)=>{let[O,y]=m;return""+p+O+"="+y+` +`},""):String(i.body);return{path:n,submission:{formMethod:s,formAction:a,formEncType:i.formEncType,formData:void 0,json:void 0,text:h}}}else if(i.formEncType==="application/json"){if(!_r(s))return r();try{let h=typeof i.body=="string"?JSON.parse(i.body):i.body;return{path:n,submission:{formMethod:s,formAction:a,formEncType:i.formEncType,formData:void 0,json:h,text:void 0}}}catch{return r()}}}Xe(typeof FormData=="function","FormData is not available in this environment");let l,u;if(i.formData)l=xv(i.formData),u=i.formData;else if(i.body instanceof FormData)l=xv(i.body),u=i.body;else if(i.body instanceof URLSearchParams)l=i.body,u=UE(l);else if(i.body==null)l=new URLSearchParams,u=new FormData;else try{l=new URLSearchParams(i.body),u=UE(l)}catch{return r()}let c={formMethod:s,formAction:a,formEncType:i&&i.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(_r(c.formMethod))return{path:n,submission:c};let d=us(n);return e&&d.search&&Pk(d.search)&&l.append("index",""),d.search="?"+l,{path:iu(d),submission:c}}function sH(t,e){let n=t;if(e){let i=t.findIndex(r=>r.route.id===e);i>=0&&(n=t.slice(0,i))}return n}function QE(t,e,n,i,r,o,s,a,l,u,c,d,h,p,m,O){let y=O?Ji(O[1])?O[1].error:O[1].data:void 0,b=t.createURL(e.location),v=t.createURL(r),S=O&&Ji(O[1])?O[0]:void 0,k=S?sH(n,S):n,x=O?O[1].statusCode:void 0,_=s&&x&&x>=400,w=k.filter((W,I)=>{let{route:V}=W;if(V.lazy)return!0;if(V.loader==null)return!1;if(o)return typeof V.loader!="function"||V.loader.hydrate?!0:e.loaderData[V.id]===void 0&&(!e.errors||e.errors[V.id]===void 0);if(aH(e.loaderData,e.matches[I],W)||l.some(K=>K===W.route.id))return!0;let B=e.matches[I],H=W;return FE(W,Nt({currentUrl:b,currentParams:B.params,nextUrl:v,nextParams:H.params},i,{actionResult:y,unstable_actionStatus:x,defaultShouldRevalidate:_?!1:a||b.pathname+b.search===v.pathname+v.search||b.search!==v.search||p5(B,H)}))}),D=[];return d.forEach((W,I)=>{if(o||!n.some(re=>re.route.id===W.routeId)||c.has(I))return;let V=Lc(p,W.path,m);if(!V){D.push({key:I,routeId:W.routeId,path:W.path,matches:null,match:null,controller:null});return}let B=e.fetchers.get(I),H=_v(V,W.path),K=!1;h.has(I)?K=!1:u.includes(I)?K=!0:B&&B.state!=="idle"&&B.data===void 0?K=a:K=FE(H,Nt({currentUrl:b,currentParams:e.matches[e.matches.length-1].params,nextUrl:v,nextParams:n[n.length-1].params},i,{actionResult:y,unstable_actionStatus:x,defaultShouldRevalidate:_?!1:a})),K&&D.push({key:I,routeId:W.routeId,path:W.path,matches:V,match:H,controller:new AbortController})}),[w,D]}function aH(t,e,n){let i=!e||n.route.id!==e.route.id,r=t[n.route.id]===void 0;return i||r}function p5(t,e){let n=t.route.path;return t.pathname!==e.pathname||n!=null&&n.endsWith("*")&&t.params["*"]!==e.params["*"]}function FE(t,e){if(t.route.shouldRevalidate){let n=t.route.shouldRevalidate(e);if(typeof n=="boolean")return n}return e.defaultShouldRevalidate}async function zE(t,e,n){if(!t.lazy)return;let i=await t.lazy();if(!t.lazy)return;let r=n[t.id];Xe(r,"No route found in manifest");let o={};for(let s in i){let l=r[s]!==void 0&&s!=="hasErrorBoundary";nu(!l,'Route "'+r.id+'" has a static property "'+s+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+s+'" will be ignored.')),!l&&!Az.has(s)&&(o[s]=i[s])}Object.assign(r,o),Object.assign(r,Nt({},e(r),{lazy:void 0}))}function lH(t){return Promise.all(t.matches.map(e=>e.resolve()))}async function uH(t,e,n,i,r,o,s,a){let l=i.reduce((d,h)=>d.add(h.route.id),new Set),u=new Set,c=await t({matches:r.map(d=>{let h=l.has(d.route.id);return Nt({},d,{shouldLoad:h,resolve:m=>(u.add(d.route.id),h?cH(e,n,d,o,s,m,a):Promise.resolve({type:Pt.data,result:void 0}))})}),request:n,params:r[0].params,context:a});return r.forEach(d=>Xe(u.has(d.route.id),'`match.resolve()` was not called for route id "'+d.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),c.filter((d,h)=>l.has(r[h].route.id))}async function cH(t,e,n,i,r,o,s){let a,l,u=c=>{let d,h=new Promise((O,y)=>d=y);l=()=>d(),e.signal.addEventListener("abort",l);let p=O=>typeof c!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+t+'" [routeId: '+n.route.id+"]"))):c({request:e,params:n.params,context:s},...O!==void 0?[O]:[]),m;return o?m=o(O=>p(O)):m=(async()=>{try{return{type:"data",result:await p()}}catch(O){return{type:"error",result:O}}})(),Promise.race([m,h])};try{let c=n.route[t];if(n.route.lazy)if(c){let d,[h]=await Promise.all([u(c).catch(p=>{d=p}),zE(n.route,r,i)]);if(d!==void 0)throw d;a=h}else if(await zE(n.route,r,i),c=n.route[t],c)a=await u(c);else if(t==="action"){let d=new URL(e.url),h=d.pathname+d.search;throw qi(405,{method:e.method,pathname:h,routeId:n.route.id})}else return{type:Pt.data,result:void 0};else if(c)a=await u(c);else{let d=new URL(e.url),h=d.pathname+d.search;throw qi(404,{pathname:h})}Xe(a.result!==void 0,"You defined "+(t==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+t+"` ")+"function. Please return a value or `null`.")}catch(c){return{type:Pt.error,result:c}}finally{l&&e.signal.removeEventListener("abort",l)}return a}async function dH(t){let{result:e,type:n,status:i}=t;if(g5(e)){let s;try{let a=e.headers.get("Content-Type");a&&/\bapplication\/json\b/.test(a)?e.body==null?s=null:s=await e.json():s=await e.text()}catch(a){return{type:Pt.error,error:a}}return n===Pt.error?{type:Pt.error,error:new Ek(e.status,e.statusText,s),statusCode:e.status,headers:e.headers}:{type:Pt.data,data:s,statusCode:e.status,headers:e.headers}}if(n===Pt.error)return{type:Pt.error,error:e,statusCode:Ck(e)?e.status:i};if(gH(e)){var r,o;return{type:Pt.deferred,deferredData:e,statusCode:(r=e.init)==null?void 0:r.status,headers:((o=e.init)==null?void 0:o.headers)&&new Headers(e.init.headers)}}return{type:Pt.data,data:e,statusCode:i}}function hH(t,e,n,i,r,o){let s=t.headers.get("Location");if(Xe(s,"Redirects returned/thrown from loaders/actions must have a Location header"),!Tk.test(s)){let a=i.slice(0,i.findIndex(l=>l.route.id===n)+1);s=kv(new URL(e.url),a,r,!0,s,o),t.headers.set("Location",s)}return t}function HE(t,e,n){if(Tk.test(t)){let i=t,r=i.startsWith("//")?new URL(e.protocol+i):new URL(i),o=Rd(r.pathname,n)!=null;if(r.origin===e.origin&&o)return r.pathname+r.search+r.hash}return t}function Vu(t,e,n,i){let r=t.createURL(m5(e)).toString(),o={signal:n};if(i&&_r(i.formMethod)){let{formMethod:s,formEncType:a}=i;o.method=s.toUpperCase(),a==="application/json"?(o.headers=new Headers({"Content-Type":a}),o.body=JSON.stringify(i.json)):a==="text/plain"?o.body=i.text:a==="application/x-www-form-urlencoded"&&i.formData?o.body=xv(i.formData):o.body=i.formData}return new Request(r,o)}function xv(t){let e=new URLSearchParams;for(let[n,i]of t.entries())e.append(n,typeof i=="string"?i:i.name);return e}function UE(t){let e=new FormData;for(let[n,i]of t.entries())e.append(n,i);return e}function fH(t,e,n,i,r,o){let s={},a=null,l,u=!1,c={},d=i&&Ji(i[1])?i[1].error:void 0;return n.forEach((h,p)=>{let m=e[p].route.id;if(Xe(!Ul(h),"Cannot handle redirect results in processLoaderData"),Ji(h)){let O=h.error;d!==void 0&&(O=d,d=void 0),a=a||{};{let y=uf(t,m);a[y.route.id]==null&&(a[y.route.id]=O)}s[m]=void 0,u||(u=!0,l=Ck(h.error)?h.error.status:500),h.headers&&(c[m]=h.headers)}else Hl(h)?(r.set(m,h.deferredData),s[m]=h.deferredData.data,h.statusCode!=null&&h.statusCode!==200&&!u&&(l=h.statusCode),h.headers&&(c[m]=h.headers)):(s[m]=h.data,h.statusCode&&h.statusCode!==200&&!u&&(l=h.statusCode),h.headers&&(c[m]=h.headers))}),d!==void 0&&i&&(a={[i[0]]:d},s[i[0]]=void 0),{loaderData:s,errors:a,statusCode:l||200,loaderHeaders:c}}function WE(t,e,n,i,r,o,s,a){let{loaderData:l,errors:u}=fH(e,n,i,r,a);for(let c=0;ci.route.id===e)+1):[...t]).reverse().find(i=>i.route.hasErrorBoundary===!0)||t[0]}function XE(t){let e=t.length===1?t[0]:t.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:e}],route:e}}function qi(t,e){let{pathname:n,routeId:i,method:r,type:o}=e===void 0?{}:e,s="Unknown Server Error",a="Unknown @remix-run/router error";return t===400?(s="Bad Request",r&&n&&i?a="You made a "+r+' request to "'+n+'" but '+('did not provide a `loader` for route "'+i+'", ')+"so there is no way to handle the request.":o==="defer-action"?a="defer() is not supported in actions":o==="invalid-body"&&(a="Unable to encode submission body")):t===403?(s="Forbidden",a='Route "'+i+'" does not match URL "'+n+'"'):t===404?(s="Not Found",a='No route matches URL "'+n+'"'):t===405&&(s="Method Not Allowed",r&&n&&i?a="You made a "+r.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+i+'", ')+"so there is no way to handle the request.":r&&(a='Invalid request method "'+r.toUpperCase()+'"')),new Ek(t||500,s,new Error(a),!0)}function ZE(t){for(let e=t.length-1;e>=0;e--){let n=t[e];if(Ul(n))return{result:n,idx:e}}}function m5(t){let e=typeof t=="string"?us(t):t;return iu(Nt({},e,{hash:""}))}function pH(t,e){return t.pathname!==e.pathname||t.search!==e.search?!1:t.hash===""?e.hash!=="":t.hash===e.hash?!0:e.hash!==""}function mH(t){return g5(t.result)&&eH.has(t.result.status)}function Hl(t){return t.type===Pt.deferred}function Ji(t){return t.type===Pt.error}function Ul(t){return(t&&t.type)===Pt.redirect}function gH(t){let e=t;return e&&typeof e=="object"&&typeof e.data=="object"&&typeof e.subscribe=="function"&&typeof e.cancel=="function"&&typeof e.resolveData=="function"}function g5(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function OH(t){return Jz.has(t.toLowerCase())}function _r(t){return Gz.has(t.toLowerCase())}async function qE(t,e,n,i,r,o){for(let s=0;sd.route.id===l.route.id),c=u!=null&&!p5(u,l)&&(o&&o[l.route.id])!==void 0;if(Hl(a)&&(r||c)){let d=i[s];Xe(d,"Expected an AbortSignal for revalidating fetcher deferred result"),await O5(a,d,r).then(h=>{h&&(n[s]=h||n[s])})}}}async function O5(t,e,n){if(n===void 0&&(n=!1),!await t.deferredData.resolveData(e)){if(n)try{return{type:Pt.data,data:t.deferredData.unwrappedData}}catch(r){return{type:Pt.error,error:r}}return{type:Pt.data,data:t.deferredData.data}}}function Pk(t){return new URLSearchParams(t).getAll("index").some(e=>e==="")}function _v(t,e){let n=typeof e=="string"?us(e).search:e.search;if(t[t.length-1].route.index&&Pk(n||""))return t[t.length-1];let i=d5(t);return i[i.length-1]}function YE(t){let{formMethod:e,formAction:n,formEncType:i,text:r,formData:o,json:s}=t;if(!(!e||!n||!i)){if(r!=null)return{formMethod:e,formAction:n,formEncType:i,formData:void 0,json:void 0,text:r};if(o!=null)return{formMethod:e,formAction:n,formEncType:i,formData:o,json:void 0,text:void 0};if(s!==void 0)return{formMethod:e,formAction:n,formEncType:i,formData:void 0,json:s,text:void 0}}}function py(t,e){return e?{state:"loading",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}:{state:"loading",location:t,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function bH(t,e){return{state:"submitting",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}}function Sh(t,e){return t?{state:"loading",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function yH(t,e){return{state:"submitting",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e?e.data:void 0}}function Ns(t){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function vH(t,e){try{let n=t.sessionStorage.getItem(f5);if(n){let i=JSON.parse(n);for(let[r,o]of Object.entries(i||{}))o&&Array.isArray(o)&&e.set(r,new Set(o||[]))}}catch{}}function SH(t,e){if(e.size>0){let n={};for(let[i,r]of e)n[i]=[...r];try{t.sessionStorage.setItem(f5,JSON.stringify(n))}catch(i){nu(!1,"Failed to save applied view transitions in sessionStorage ("+i+").")}}}/** * React Router v6.23.1 * * Copyright (c) Remix Software Inc. @@ -56,7 +56,7 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function _0(){return _0=Object.assign?Object.assign.bind():function(t){for(var e=1;e{a.current=!0}),T.useCallback(function(u,c){if(c===void 0&&(c={}),!a.current)return;if(typeof u=="number"){i.go(u);return}let d=xk(u,JSON.parse(s),o,c.relative==="path");t==null&&e!=="/"&&(d.pathname=d.pathname==="/"?e:Zo([e,d.pathname])),(c.replace?i.replace:i.push)(d,c.state,c)},[e,i,s,o,t])}function Rd(){let{matches:t}=T.useContext(va),e=t[t.length-1];return e?e.params:{}}function S5(t,e){let{relative:n}=e===void 0?{}:e,{future:i}=T.useContext(bu),{matches:r}=T.useContext(va),{pathname:o}=MO(),s=JSON.stringify(kk(r,i.v7_relativeSplatPath));return T.useMemo(()=>xk(t,JSON.parse(s),o,n==="path"),[t,s,o,n])}function _H(t,e,n,i){Cp()||je(!1);let{navigator:r}=T.useContext(bu),{matches:o}=T.useContext(va),s=o[o.length-1],a=s?s.params:{};s&&s.pathname;let l=s?s.pathnameBase:"/";s&&s.route;let u=MO(),c;c=u;let d=c.pathname||"/",h=d;if(l!=="/"){let O=l.replace(/^\//,"").split("/");h="/"+d.replace(/^\//,"").split("/").slice(O.length).join("/")}let p=$c(t,{pathname:h});return AH(p&&p.map(O=>Object.assign({},O,{params:Object.assign({},a,O.params),pathname:Zo([l,r.encodeLocation?r.encodeLocation(O.pathname).pathname:O.pathname]),pathnameBase:O.pathnameBase==="/"?l:Zo([l,r.encodeLocation?r.encodeLocation(O.pathnameBase).pathname:O.pathnameBase])})),o,n,i)}function EH(){let t=x5(),e=Ek(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,r={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return T.createElement(T.Fragment,null,T.createElement("h2",null,"Unexpected Application Error!"),T.createElement("h3",{style:{fontStyle:"italic"}},e),n?T.createElement("pre",{style:r},n):null,null)}const CH=T.createElement(EH,null);class TH extends T.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?T.createElement(va.Provider,{value:this.props.routeContext},T.createElement(y5.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function PH(t){let{routeContext:e,match:n,children:i}=t,r=T.useContext(NO);return r&&r.static&&r.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=n.route.id),T.createElement(va.Provider,{value:e},i)}function AH(t,e,n,i){var r;if(e===void 0&&(e=[]),n===void 0&&(n=null),i===void 0&&(i=null),t==null){var o;if((o=n)!=null&&o.errors)t=n.matches;else return null}let s=t,a=(r=n)==null?void 0:r.errors;if(a!=null){let c=s.findIndex(d=>d.route.id&&(a==null?void 0:a[d.route.id])!==void 0);c>=0||je(!1),s=s.slice(0,Math.min(s.length,c+1))}let l=!1,u=-1;if(n&&i&&i.v7_partialHydration)for(let c=0;c=0?s=s.slice(0,u+1):s=[s[0]];break}}}return s.reduceRight((c,d,h)=>{let p,m=!1,O=null,y=null;n&&(p=a&&d.route.id?a[d.route.id]:void 0,O=d.route.errorElement||CH,l&&(u<0&&h===0?(m=!0,y=null):u===h&&(m=!0,y=d.route.hydrateFallbackElement||null)));let b=e.concat(s.slice(0,h+1)),v=()=>{let S;return p?S=O:m?S=y:d.route.Component?S=T.createElement(d.route.Component,null):d.route.element?S=d.route.element:S=c,T.createElement(PH,{match:d,routeContext:{outlet:c,matches:b,isDataRoute:n!=null},children:S})};return n&&(d.route.ErrorBoundary||d.route.errorElement||h===0)?T.createElement(TH,{location:n.location,revalidation:n.revalidation,component:O,error:p,children:v(),routeContext:{outlet:null,matches:b,isDataRoute:!0}}):v()},null)}var w5=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(w5||{}),E0=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}(E0||{});function RH(t){let e=T.useContext(NO);return e||je(!1),e}function IH(t){let e=T.useContext(b5);return e||je(!1),e}function $H(t){let e=T.useContext(va);return e||je(!1),e}function k5(t){let e=$H(),n=e.matches[e.matches.length-1];return n.route.id||je(!1),n.route.id}function x5(){var t;let e=T.useContext(y5),n=IH(E0.UseRouteError),i=k5(E0.UseRouteError);return e!==void 0?e:(t=n.errors)==null?void 0:t[i]}function LH(){let{router:t}=RH(w5.UseNavigateStable),e=k5(E0.UseNavigateStable),n=T.useRef(!1);return v5(()=>{n.current=!0}),T.useCallback(function(r,o){o===void 0&&(o={}),n.current&&(typeof r=="number"?t.navigate(r):t.navigate(r,_0({fromRouteId:e},o)))},[t,e])}function NH(t){let{basename:e="/",children:n=null,location:i,navigationType:r=qt.Pop,navigator:o,static:s=!1,future:a}=t;Cp()&&je(!1);let l=e.replace(/^\/*/,"/"),u=T.useMemo(()=>({basename:l,navigator:o,static:s,future:_0({v7_relativeSplatPath:!1},a)}),[l,a,o,s]);typeof i=="string"&&(i=ls(i));let{pathname:c="/",search:d="",hash:h="",state:p=null,key:m="default"}=i,O=T.useMemo(()=>{let y=Ad(c,l);return y==null?null:{location:{pathname:y,search:d,hash:h,state:p,key:m},navigationType:r}},[l,c,d,h,p,m,r]);return O==null?null:T.createElement(bu.Provider,{value:u},T.createElement(Pk.Provider,{children:n,value:O}))}new Promise(()=>{});function MH(t){let e={hasErrorBoundary:t.ErrorBoundary!=null||t.errorElement!=null};return t.Component&&Object.assign(e,{element:T.createElement(t.Component),Component:void 0}),t.HydrateFallback&&Object.assign(e,{hydrateFallbackElement:T.createElement(t.HydrateFallback),HydrateFallback:void 0}),t.ErrorBoundary&&Object.assign(e,{errorElement:T.createElement(t.ErrorBoundary),ErrorBoundary:void 0}),e}/** + */function E0(){return E0=Object.assign?Object.assign.bind():function(t){for(var e=1;e{a.current=!0}),T.useCallback(function(u,c){if(c===void 0&&(c={}),!a.current)return;if(typeof u=="number"){i.go(u);return}let d=_k(u,JSON.parse(s),o,c.relative==="path");t==null&&e!=="/"&&(d.pathname=d.pathname==="/"?e:qo([e,d.pathname])),(c.replace?i.replace:i.push)(d,c.state,c)},[e,i,s,o,t])}function Id(){let{matches:t}=T.useContext(Sa),e=t[t.length-1];return e?e.params:{}}function S5(t,e){let{relative:n}=e===void 0?{}:e,{future:i}=T.useContext(vu),{matches:r}=T.useContext(Sa),{pathname:o}=DO(),s=JSON.stringify(xk(r,i.v7_relativeSplatPath));return T.useMemo(()=>_k(t,JSON.parse(s),o,n==="path"),[t,s,o,n])}function _H(t,e,n,i){Tp()||Xe(!1);let{navigator:r}=T.useContext(vu),{matches:o}=T.useContext(Sa),s=o[o.length-1],a=s?s.params:{};s&&s.pathname;let l=s?s.pathnameBase:"/";s&&s.route;let u=DO(),c;c=u;let d=c.pathname||"/",h=d;if(l!=="/"){let O=l.replace(/^\//,"").split("/");h="/"+d.replace(/^\//,"").split("/").slice(O.length).join("/")}let p=Lc(t,{pathname:h});return AH(p&&p.map(O=>Object.assign({},O,{params:Object.assign({},a,O.params),pathname:qo([l,r.encodeLocation?r.encodeLocation(O.pathname).pathname:O.pathname]),pathnameBase:O.pathnameBase==="/"?l:qo([l,r.encodeLocation?r.encodeLocation(O.pathnameBase).pathname:O.pathnameBase])})),o,n,i)}function EH(){let t=x5(),e=Ck(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,r={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return T.createElement(T.Fragment,null,T.createElement("h2",null,"Unexpected Application Error!"),T.createElement("h3",{style:{fontStyle:"italic"}},e),n?T.createElement("pre",{style:r},n):null,null)}const CH=T.createElement(EH,null);class TH extends T.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?T.createElement(Sa.Provider,{value:this.props.routeContext},T.createElement(y5.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function PH(t){let{routeContext:e,match:n,children:i}=t,r=T.useContext(MO);return r&&r.static&&r.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=n.route.id),T.createElement(Sa.Provider,{value:e},i)}function AH(t,e,n,i){var r;if(e===void 0&&(e=[]),n===void 0&&(n=null),i===void 0&&(i=null),t==null){var o;if((o=n)!=null&&o.errors)t=n.matches;else return null}let s=t,a=(r=n)==null?void 0:r.errors;if(a!=null){let c=s.findIndex(d=>d.route.id&&(a==null?void 0:a[d.route.id])!==void 0);c>=0||Xe(!1),s=s.slice(0,Math.min(s.length,c+1))}let l=!1,u=-1;if(n&&i&&i.v7_partialHydration)for(let c=0;c=0?s=s.slice(0,u+1):s=[s[0]];break}}}return s.reduceRight((c,d,h)=>{let p,m=!1,O=null,y=null;n&&(p=a&&d.route.id?a[d.route.id]:void 0,O=d.route.errorElement||CH,l&&(u<0&&h===0?(m=!0,y=null):u===h&&(m=!0,y=d.route.hydrateFallbackElement||null)));let b=e.concat(s.slice(0,h+1)),v=()=>{let S;return p?S=O:m?S=y:d.route.Component?S=T.createElement(d.route.Component,null):d.route.element?S=d.route.element:S=c,T.createElement(PH,{match:d,routeContext:{outlet:c,matches:b,isDataRoute:n!=null},children:S})};return n&&(d.route.ErrorBoundary||d.route.errorElement||h===0)?T.createElement(TH,{location:n.location,revalidation:n.revalidation,component:O,error:p,children:v(),routeContext:{outlet:null,matches:b,isDataRoute:!0}}):v()},null)}var w5=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(w5||{}),C0=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}(C0||{});function RH(t){let e=T.useContext(MO);return e||Xe(!1),e}function IH(t){let e=T.useContext(b5);return e||Xe(!1),e}function $H(t){let e=T.useContext(Sa);return e||Xe(!1),e}function k5(t){let e=$H(),n=e.matches[e.matches.length-1];return n.route.id||Xe(!1),n.route.id}function x5(){var t;let e=T.useContext(y5),n=IH(C0.UseRouteError),i=k5(C0.UseRouteError);return e!==void 0?e:(t=n.errors)==null?void 0:t[i]}function LH(){let{router:t}=RH(w5.UseNavigateStable),e=k5(C0.UseNavigateStable),n=T.useRef(!1);return v5(()=>{n.current=!0}),T.useCallback(function(r,o){o===void 0&&(o={}),n.current&&(typeof r=="number"?t.navigate(r):t.navigate(r,E0({fromRouteId:e},o)))},[t,e])}function NH(t){let{basename:e="/",children:n=null,location:i,navigationType:r=Yt.Pop,navigator:o,static:s=!1,future:a}=t;Tp()&&Xe(!1);let l=e.replace(/^\/*/,"/"),u=T.useMemo(()=>({basename:l,navigator:o,static:s,future:E0({v7_relativeSplatPath:!1},a)}),[l,a,o,s]);typeof i=="string"&&(i=us(i));let{pathname:c="/",search:d="",hash:h="",state:p=null,key:m="default"}=i,O=T.useMemo(()=>{let y=Rd(c,l);return y==null?null:{location:{pathname:y,search:d,hash:h,state:p,key:m},navigationType:r}},[l,c,d,h,p,m,r]);return O==null?null:T.createElement(vu.Provider,{value:u},T.createElement(Ak.Provider,{children:n,value:O}))}new Promise(()=>{});function MH(t){let e={hasErrorBoundary:t.ErrorBoundary!=null||t.errorElement!=null};return t.Component&&Object.assign(e,{element:T.createElement(t.Component),Component:void 0}),t.HydrateFallback&&Object.assign(e,{hydrateFallbackElement:T.createElement(t.HydrateFallback),HydrateFallback:void 0}),t.ErrorBoundary&&Object.assign(e,{errorElement:T.createElement(t.ErrorBoundary),ErrorBoundary:void 0}),e}/** * React Router DOM v6.23.1 * * Copyright (c) Remix Software Inc. @@ -65,111 +65,111 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Uf(){return Uf=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[r]=t[r]);return n}function BH(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function QH(t,e){return t.button===0&&(!e||e==="_self")&&!BH(t)}const FH=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],zH="6";try{window.__reactRouterVersion=zH}catch{}function HH(t,e){return rH({basename:void 0,future:Uf({},void 0,{v7_prependBasename:!0}),history:Cz({window:void 0}),hydrationData:UH(),routes:t,mapRouteProperties:MH,unstable_dataStrategy:void 0,window:void 0}).initialize()}function UH(){var t;let e=(t=window)==null?void 0:t.__staticRouterHydrationData;return e&&e.errors&&(e=Uf({},e,{errors:WH(e.errors)})),e}function WH(t){if(!t)return null;let e=Object.entries(t),n={};for(let[i,r]of e)if(r&&r.__type==="RouteErrorResponse")n[i]=new _k(r.status,r.statusText,r.data,r.internal===!0);else if(r&&r.__type==="Error"){if(r.__subType){let o=window[r.__subType];if(typeof o=="function")try{let s=new o(r.message);s.stack="",n[i]=s}catch{}}if(n[i]==null){let o=new Error(r.message);o.stack="",n[i]=o}}else n[i]=r;return n}const VH=T.createContext({isTransitioning:!1}),jH=T.createContext(new Map),XH="startTransition",GE=T1[XH],ZH="flushSync",KE=_z[ZH];function qH(t){GE?GE(t):t()}function Sh(t){KE?KE(t):t()}class YH{constructor(){this.status="pending",this.promise=new Promise((e,n)=>{this.resolve=i=>{this.status==="pending"&&(this.status="resolved",e(i))},this.reject=i=>{this.status==="pending"&&(this.status="rejected",n(i))}})}}function GH(t){let{fallbackElement:e,router:n,future:i}=t,[r,o]=T.useState(n.state),[s,a]=T.useState(),[l,u]=T.useState({isTransitioning:!1}),[c,d]=T.useState(),[h,p]=T.useState(),[m,O]=T.useState(),y=T.useRef(new Map),{v7_startTransition:b}=i||{},v=T.useCallback(w=>{b?qH(w):w()},[b]),S=T.useCallback((w,D)=>{let{deletedFetchers:W,unstable_flushSync:I,unstable_viewTransitionOpts:V}=D;W.forEach(H=>y.current.delete(H)),w.fetchers.forEach((H,K)=>{H.data!==void 0&&y.current.set(K,H.data)});let B=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!V||B){I?Sh(()=>o(w)):v(()=>o(w));return}if(I){Sh(()=>{h&&(c&&c.resolve(),h.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:V.currentLocation,nextLocation:V.nextLocation})});let H=n.window.document.startViewTransition(()=>{Sh(()=>o(w))});H.finished.finally(()=>{Sh(()=>{d(void 0),p(void 0),a(void 0),u({isTransitioning:!1})})}),Sh(()=>p(H));return}h?(c&&c.resolve(),h.skipTransition(),O({state:w,currentLocation:V.currentLocation,nextLocation:V.nextLocation})):(a(w),u({isTransitioning:!0,flushSync:!1,currentLocation:V.currentLocation,nextLocation:V.nextLocation}))},[n.window,h,c,y,v]);T.useLayoutEffect(()=>n.subscribe(S),[n,S]),T.useEffect(()=>{l.isTransitioning&&!l.flushSync&&d(new YH)},[l]),T.useEffect(()=>{if(c&&s&&n.window){let w=s,D=c.promise,W=n.window.document.startViewTransition(async()=>{v(()=>o(w)),await D});W.finished.finally(()=>{d(void 0),p(void 0),a(void 0),u({isTransitioning:!1})}),p(W)}},[v,s,c,n.window]),T.useEffect(()=>{c&&s&&r.location.key===s.location.key&&c.resolve()},[c,h,r.location,s]),T.useEffect(()=>{!l.isTransitioning&&m&&(a(m.state),u({isTransitioning:!0,flushSync:!1,currentLocation:m.currentLocation,nextLocation:m.nextLocation}),O(void 0))},[l.isTransitioning,m]),T.useEffect(()=>{},[]);let k=T.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:w=>n.navigate(w),push:(w,D,W)=>n.navigate(w,{state:D,preventScrollReset:W==null?void 0:W.preventScrollReset}),replace:(w,D,W)=>n.navigate(w,{replace:!0,state:D,preventScrollReset:W==null?void 0:W.preventScrollReset})}),[n]),x=n.basename||"/",_=T.useMemo(()=>({router:n,navigator:k,static:!1,basename:x}),[n,k,x]);return T.createElement(T.Fragment,null,T.createElement(NO.Provider,{value:_},T.createElement(b5.Provider,{value:r},T.createElement(jH.Provider,{value:y.current},T.createElement(VH.Provider,{value:l},T.createElement(NH,{basename:x,location:r.location,navigationType:r.historyAction,navigator:k,future:{v7_relativeSplatPath:n.future.v7_relativeSplatPath}},r.initialized||n.future.v7_partialHydration?T.createElement(KH,{routes:n.routes,future:n.future,state:r}):e))))),null)}function KH(t){let{routes:e,future:n,state:i}=t;return _H(e,void 0,i,n)}const JH=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",eU=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,tU=T.forwardRef(function(e,n){let{onClick:i,relative:r,reloadDocument:o,replace:s,state:a,target:l,to:u,preventScrollReset:c,unstable_viewTransition:d}=e,h=DH(e,FH),{basename:p}=T.useContext(bu),m,O=!1;if(typeof u=="string"&&eU.test(u)&&(m=u,JH))try{let S=new URL(window.location.href),k=u.startsWith("//")?new URL(S.protocol+u):new URL(u),x=Ad(k.pathname,p);k.origin===S.origin&&x!=null?u=x+k.search+k.hash:O=!0}catch{}let y=wH(u,{relative:r}),b=nU(u,{replace:s,state:a,target:l,preventScrollReset:c,relative:r,unstable_viewTransition:d});function v(S){i&&i(S),S.defaultPrevented||b(S)}return T.createElement("a",Uf({},h,{href:m||y,onClick:O||o?i:v,ref:n,target:l}))});var JE;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(JE||(JE={}));var eC;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(eC||(eC={}));function nU(t,e){let{target:n,replace:i,state:r,preventScrollReset:o,relative:s,unstable_viewTransition:a}=e===void 0?{}:e,l=kH(),u=MO(),c=S5(t,{relative:s});return T.useCallback(d=>{if(QH(d,n)){d.preventDefault();let h=i!==void 0?i:tu(u)===tu(c);l(t,{replace:h,state:r,preventScrollReset:o,relative:s,unstable_viewTransition:a})}},[u,l,c,i,r,n,t,o,s,a])}function iU(t){if(t.sheet)return t.sheet;for(var e=0;e0?kn(Id,--ki):0,ud--,Yt===10&&(ud=1,BO--),Yt}function zi(){return Yt=ki2||Vf(Yt)>3?"":" "}function gU(t,e){for(;--e&&zi()&&!(Yt<48||Yt>102||Yt>57&&Yt<65||Yt>70&&Yt<97););return Tp(t,Ag()+(e<6&&yo()==32&&zi()==32))}function Ev(t){for(;zi();)switch(Yt){case t:return ki;case 34:case 39:t!==34&&t!==39&&Ev(Yt);break;case 40:t===41&&Ev(t);break;case 92:zi();break}return ki}function OU(t,e){for(;zi()&&t+Yt!==57;)if(t+Yt===84&&yo()===47)break;return"/*"+Tp(e,ki-1)+"*"+DO(t===47?t:zi())}function bU(t){for(;!Vf(yo());)zi();return Tp(t,ki)}function yU(t){return A5(Ig("",null,null,null,[""],t=P5(t),0,[0],t))}function Ig(t,e,n,i,r,o,s,a,l){for(var u=0,c=0,d=s,h=0,p=0,m=0,O=1,y=1,b=1,v=0,S="",k=r,x=o,_=i,w=S;y;)switch(m=v,v=zi()){case 40:if(m!=108&&kn(w,d-1)==58){_v(w+=at(Rg(v),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:w+=Rg(v);break;case 9:case 10:case 13:case 32:w+=mU(m);break;case 92:w+=gU(Ag()-1,7);continue;case 47:switch(yo()){case 42:case 47:dm(vU(OU(zi(),Ag()),e,n),l);break;default:w+="/"}break;case 123*O:a[u++]=so(w)*b;case 125*O:case 59:case 0:switch(v){case 0:case 125:y=0;case 59+c:b==-1&&(w=at(w,/\f/g,"")),p>0&&so(w)-d&&dm(p>32?nC(w+";",i,n,d-1):nC(at(w," ","")+";",i,n,d-2),l);break;case 59:w+=";";default:if(dm(_=tC(w,e,n,u,c,r,a,S,k=[],x=[],d),o),v===123)if(c===0)Ig(w,e,_,_,k,o,d,a,x);else switch(h===99&&kn(w,3)===110?100:h){case 100:case 108:case 109:case 115:Ig(t,_,_,i&&dm(tC(t,_,_,0,0,r,a,S,r,k=[],d),x),r,x,d,a,i?k:x);break;default:Ig(w,_,_,_,[""],x,0,a,x)}}u=c=p=0,O=b=1,S=w="",d=s;break;case 58:d=1+so(w),p=m;default:if(O<1){if(v==123)--O;else if(v==125&&O++==0&&pU()==125)continue}switch(w+=DO(v),v*O){case 38:b=c>0?1:(w+="\f",-1);break;case 44:a[u++]=(so(w)-1)*b,b=1;break;case 64:yo()===45&&(w+=Rg(zi())),h=yo(),c=d=so(S=w+=bU(Ag())),v++;break;case 45:m===45&&so(w)==2&&(O=0)}}return o}function tC(t,e,n,i,r,o,s,a,l,u,c){for(var d=r-1,h=r===0?o:[""],p=Ik(h),m=0,O=0,y=0;m0?h[b]+" "+v:at(v,/&\f/g,h[b])))&&(l[y++]=S);return QO(t,e,n,r===0?Ak:a,l,u,c)}function vU(t,e,n){return QO(t,e,n,_5,DO(fU()),Wf(t,2,-2),0)}function nC(t,e,n,i){return QO(t,e,n,Rk,Wf(t,0,i),Wf(t,i+1,-1),i)}function Wc(t,e){for(var n="",i=Ik(t),r=0;r6)switch(kn(t,e+1)){case 109:if(kn(t,e+4)!==45)break;case 102:return at(t,/(.+:)(.+)-([^]+)/,"$1"+st+"$2-$3$1"+C0+(kn(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~_v(t,"stretch")?I5(at(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(kn(t,e+1)!==115)break;case 6444:switch(kn(t,so(t)-3-(~_v(t,"!important")&&10))){case 107:return at(t,":",":"+st)+t;case 101:return at(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+st+(kn(t,14)===45?"inline-":"")+"box$3$1"+st+"$2$3$1"+$n+"$2box$3")+t}break;case 5936:switch(kn(t,e+11)){case 114:return st+t+$n+at(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return st+t+$n+at(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return st+t+$n+at(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return st+t+$n+t+t}return t}var PU=function(e,n,i,r){if(e.length>-1&&!e.return)switch(e.type){case Rk:e.return=I5(e.value,e.length);break;case E5:return Wc([wh(e,{value:at(e.value,"@","@"+st)})],r);case Ak:if(e.length)return hU(e.props,function(o){switch(dU(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Wc([wh(e,{props:[at(o,/:(read-\w+)/,":"+C0+"$1")]})],r);case"::placeholder":return Wc([wh(e,{props:[at(o,/:(plac\w+)/,":"+st+"input-$1")]}),wh(e,{props:[at(o,/:(plac\w+)/,":"+C0+"$1")]}),wh(e,{props:[at(o,/:(plac\w+)/,$n+"input-$1")]})],r)}return""})}},AU=[PU],RU=function(e){var n=e.key;if(n==="css"){var i=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(i,function(O){var y=O.getAttribute("data-emotion");y.indexOf(" ")!==-1&&(document.head.appendChild(O),O.setAttribute("data-s",""))})}var r=e.stylisPlugins||AU,o={},s,a=[];s=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(O){for(var y=O.getAttribute("data-emotion").split(" "),b=1;b=0)&&(n[r]=t[r]);return n}function BH(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function QH(t,e){return t.button===0&&(!e||e==="_self")&&!BH(t)}const FH=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],zH="6";try{window.__reactRouterVersion=zH}catch{}function HH(t,e){return rH({basename:void 0,future:Wf({},void 0,{v7_prependBasename:!0}),history:Cz({window:void 0}),hydrationData:UH(),routes:t,mapRouteProperties:MH,unstable_dataStrategy:void 0,window:void 0}).initialize()}function UH(){var t;let e=(t=window)==null?void 0:t.__staticRouterHydrationData;return e&&e.errors&&(e=Wf({},e,{errors:WH(e.errors)})),e}function WH(t){if(!t)return null;let e=Object.entries(t),n={};for(let[i,r]of e)if(r&&r.__type==="RouteErrorResponse")n[i]=new Ek(r.status,r.statusText,r.data,r.internal===!0);else if(r&&r.__type==="Error"){if(r.__subType){let o=window[r.__subType];if(typeof o=="function")try{let s=new o(r.message);s.stack="",n[i]=s}catch{}}if(n[i]==null){let o=new Error(r.message);o.stack="",n[i]=o}}else n[i]=r;return n}const VH=T.createContext({isTransitioning:!1}),jH=T.createContext(new Map),XH="startTransition",GE=P1[XH],ZH="flushSync",KE=_z[ZH];function qH(t){GE?GE(t):t()}function wh(t){KE?KE(t):t()}class YH{constructor(){this.status="pending",this.promise=new Promise((e,n)=>{this.resolve=i=>{this.status==="pending"&&(this.status="resolved",e(i))},this.reject=i=>{this.status==="pending"&&(this.status="rejected",n(i))}})}}function GH(t){let{fallbackElement:e,router:n,future:i}=t,[r,o]=T.useState(n.state),[s,a]=T.useState(),[l,u]=T.useState({isTransitioning:!1}),[c,d]=T.useState(),[h,p]=T.useState(),[m,O]=T.useState(),y=T.useRef(new Map),{v7_startTransition:b}=i||{},v=T.useCallback(w=>{b?qH(w):w()},[b]),S=T.useCallback((w,D)=>{let{deletedFetchers:W,unstable_flushSync:I,unstable_viewTransitionOpts:V}=D;W.forEach(H=>y.current.delete(H)),w.fetchers.forEach((H,K)=>{H.data!==void 0&&y.current.set(K,H.data)});let B=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!V||B){I?wh(()=>o(w)):v(()=>o(w));return}if(I){wh(()=>{h&&(c&&c.resolve(),h.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:V.currentLocation,nextLocation:V.nextLocation})});let H=n.window.document.startViewTransition(()=>{wh(()=>o(w))});H.finished.finally(()=>{wh(()=>{d(void 0),p(void 0),a(void 0),u({isTransitioning:!1})})}),wh(()=>p(H));return}h?(c&&c.resolve(),h.skipTransition(),O({state:w,currentLocation:V.currentLocation,nextLocation:V.nextLocation})):(a(w),u({isTransitioning:!0,flushSync:!1,currentLocation:V.currentLocation,nextLocation:V.nextLocation}))},[n.window,h,c,y,v]);T.useLayoutEffect(()=>n.subscribe(S),[n,S]),T.useEffect(()=>{l.isTransitioning&&!l.flushSync&&d(new YH)},[l]),T.useEffect(()=>{if(c&&s&&n.window){let w=s,D=c.promise,W=n.window.document.startViewTransition(async()=>{v(()=>o(w)),await D});W.finished.finally(()=>{d(void 0),p(void 0),a(void 0),u({isTransitioning:!1})}),p(W)}},[v,s,c,n.window]),T.useEffect(()=>{c&&s&&r.location.key===s.location.key&&c.resolve()},[c,h,r.location,s]),T.useEffect(()=>{!l.isTransitioning&&m&&(a(m.state),u({isTransitioning:!0,flushSync:!1,currentLocation:m.currentLocation,nextLocation:m.nextLocation}),O(void 0))},[l.isTransitioning,m]),T.useEffect(()=>{},[]);let k=T.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:w=>n.navigate(w),push:(w,D,W)=>n.navigate(w,{state:D,preventScrollReset:W==null?void 0:W.preventScrollReset}),replace:(w,D,W)=>n.navigate(w,{replace:!0,state:D,preventScrollReset:W==null?void 0:W.preventScrollReset})}),[n]),x=n.basename||"/",_=T.useMemo(()=>({router:n,navigator:k,static:!1,basename:x}),[n,k,x]);return T.createElement(T.Fragment,null,T.createElement(MO.Provider,{value:_},T.createElement(b5.Provider,{value:r},T.createElement(jH.Provider,{value:y.current},T.createElement(VH.Provider,{value:l},T.createElement(NH,{basename:x,location:r.location,navigationType:r.historyAction,navigator:k,future:{v7_relativeSplatPath:n.future.v7_relativeSplatPath}},r.initialized||n.future.v7_partialHydration?T.createElement(KH,{routes:n.routes,future:n.future,state:r}):e))))),null)}function KH(t){let{routes:e,future:n,state:i}=t;return _H(e,void 0,i,n)}const JH=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",eU=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,tU=T.forwardRef(function(e,n){let{onClick:i,relative:r,reloadDocument:o,replace:s,state:a,target:l,to:u,preventScrollReset:c,unstable_viewTransition:d}=e,h=DH(e,FH),{basename:p}=T.useContext(vu),m,O=!1;if(typeof u=="string"&&eU.test(u)&&(m=u,JH))try{let S=new URL(window.location.href),k=u.startsWith("//")?new URL(S.protocol+u):new URL(u),x=Rd(k.pathname,p);k.origin===S.origin&&x!=null?u=x+k.search+k.hash:O=!0}catch{}let y=wH(u,{relative:r}),b=nU(u,{replace:s,state:a,target:l,preventScrollReset:c,relative:r,unstable_viewTransition:d});function v(S){i&&i(S),S.defaultPrevented||b(S)}return T.createElement("a",Wf({},h,{href:m||y,onClick:O||o?i:v,ref:n,target:l}))});var JE;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(JE||(JE={}));var eC;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(eC||(eC={}));function nU(t,e){let{target:n,replace:i,state:r,preventScrollReset:o,relative:s,unstable_viewTransition:a}=e===void 0?{}:e,l=kH(),u=DO(),c=S5(t,{relative:s});return T.useCallback(d=>{if(QH(d,n)){d.preventDefault();let h=i!==void 0?i:iu(u)===iu(c);l(t,{replace:h,state:r,preventScrollReset:o,relative:s,unstable_viewTransition:a})}},[u,l,c,i,r,n,t,o,s,a])}function iU(t){if(t.sheet)return t.sheet;for(var e=0;e0?wn($d,--wi):0,cd--,Gt===10&&(cd=1,QO--),Gt}function Fi(){return Gt=wi2||jf(Gt)>3?"":" "}function gU(t,e){for(;--e&&Fi()&&!(Gt<48||Gt>102||Gt>57&&Gt<65||Gt>70&&Gt<97););return Pp(t,Rg()+(e<6&&wo()==32&&Fi()==32))}function Cv(t){for(;Fi();)switch(Gt){case t:return wi;case 34:case 39:t!==34&&t!==39&&Cv(Gt);break;case 40:t===41&&Cv(t);break;case 92:Fi();break}return wi}function OU(t,e){for(;Fi()&&t+Gt!==57;)if(t+Gt===84&&wo()===47)break;return"/*"+Pp(e,wi-1)+"*"+BO(t===47?t:Fi())}function bU(t){for(;!jf(wo());)Fi();return Pp(t,wi)}function yU(t){return A5($g("",null,null,null,[""],t=P5(t),0,[0],t))}function $g(t,e,n,i,r,o,s,a,l){for(var u=0,c=0,d=s,h=0,p=0,m=0,O=1,y=1,b=1,v=0,S="",k=r,x=o,_=i,w=S;y;)switch(m=v,v=Fi()){case 40:if(m!=108&&wn(w,d-1)==58){Ev(w+=lt(Ig(v),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:w+=Ig(v);break;case 9:case 10:case 13:case 32:w+=mU(m);break;case 92:w+=gU(Rg()-1,7);continue;case 47:switch(wo()){case 42:case 47:hm(vU(OU(Fi(),Rg()),e,n),l);break;default:w+="/"}break;case 123*O:a[u++]=uo(w)*b;case 125*O:case 59:case 0:switch(v){case 0:case 125:y=0;case 59+c:b==-1&&(w=lt(w,/\f/g,"")),p>0&&uo(w)-d&&hm(p>32?nC(w+";",i,n,d-1):nC(lt(w," ","")+";",i,n,d-2),l);break;case 59:w+=";";default:if(hm(_=tC(w,e,n,u,c,r,a,S,k=[],x=[],d),o),v===123)if(c===0)$g(w,e,_,_,k,o,d,a,x);else switch(h===99&&wn(w,3)===110?100:h){case 100:case 108:case 109:case 115:$g(t,_,_,i&&hm(tC(t,_,_,0,0,r,a,S,r,k=[],d),x),r,x,d,a,i?k:x);break;default:$g(w,_,_,_,[""],x,0,a,x)}}u=c=p=0,O=b=1,S=w="",d=s;break;case 58:d=1+uo(w),p=m;default:if(O<1){if(v==123)--O;else if(v==125&&O++==0&&pU()==125)continue}switch(w+=BO(v),v*O){case 38:b=c>0?1:(w+="\f",-1);break;case 44:a[u++]=(uo(w)-1)*b,b=1;break;case 64:wo()===45&&(w+=Ig(Fi())),h=wo(),c=d=uo(S=w+=bU(Rg())),v++;break;case 45:m===45&&uo(w)==2&&(O=0)}}return o}function tC(t,e,n,i,r,o,s,a,l,u,c){for(var d=r-1,h=r===0?o:[""],p=$k(h),m=0,O=0,y=0;m0?h[b]+" "+v:lt(v,/&\f/g,h[b])))&&(l[y++]=S);return FO(t,e,n,r===0?Rk:a,l,u,c)}function vU(t,e,n){return FO(t,e,n,_5,BO(fU()),Vf(t,2,-2),0)}function nC(t,e,n,i){return FO(t,e,n,Ik,Vf(t,0,i),Vf(t,i+1,-1),i)}function Vc(t,e){for(var n="",i=$k(t),r=0;r6)switch(wn(t,e+1)){case 109:if(wn(t,e+4)!==45)break;case 102:return lt(t,/(.+:)(.+)-([^]+)/,"$1"+at+"$2-$3$1"+T0+(wn(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~Ev(t,"stretch")?I5(lt(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(wn(t,e+1)!==115)break;case 6444:switch(wn(t,uo(t)-3-(~Ev(t,"!important")&&10))){case 107:return lt(t,":",":"+at)+t;case 101:return lt(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+at+(wn(t,14)===45?"inline-":"")+"box$3$1"+at+"$2$3$1"+$n+"$2box$3")+t}break;case 5936:switch(wn(t,e+11)){case 114:return at+t+$n+lt(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return at+t+$n+lt(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return at+t+$n+lt(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return at+t+$n+t+t}return t}var PU=function(e,n,i,r){if(e.length>-1&&!e.return)switch(e.type){case Ik:e.return=I5(e.value,e.length);break;case E5:return Vc([kh(e,{value:lt(e.value,"@","@"+at)})],r);case Rk:if(e.length)return hU(e.props,function(o){switch(dU(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Vc([kh(e,{props:[lt(o,/:(read-\w+)/,":"+T0+"$1")]})],r);case"::placeholder":return Vc([kh(e,{props:[lt(o,/:(plac\w+)/,":"+at+"input-$1")]}),kh(e,{props:[lt(o,/:(plac\w+)/,":"+T0+"$1")]}),kh(e,{props:[lt(o,/:(plac\w+)/,$n+"input-$1")]})],r)}return""})}},AU=[PU],RU=function(e){var n=e.key;if(n==="css"){var i=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(i,function(O){var y=O.getAttribute("data-emotion");y.indexOf(" ")!==-1&&(document.head.appendChild(O),O.setAttribute("data-s",""))})}var r=e.stylisPlugins||AU,o={},s,a=[];s=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(O){for(var y=O.getAttribute("data-emotion").split(" "),b=1;b=4;++i,r-=4)n=t.charCodeAt(i)&255|(t.charCodeAt(++i)&255)<<8|(t.charCodeAt(++i)&255)<<16|(t.charCodeAt(++i)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(r){case 3:e^=(t.charCodeAt(i+2)&255)<<16;case 2:e^=(t.charCodeAt(i+1)&255)<<8;case 1:e^=t.charCodeAt(i)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var qU={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},YU=/[A-Z]|^ms/g,GU=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Q5=function(e){return e.charCodeAt(1)===45},lC=function(e){return e!=null&&typeof e!="boolean"},py=R5(function(t){return Q5(t)?t:t.replace(YU,"-$&").toLowerCase()}),uC=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(GU,function(i,r,o){return ao={name:r,styles:o,next:ao},r})}return qU[e]!==1&&!Q5(e)&&typeof n=="number"&&n!==0?n+"px":n};function jf(t,e,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return ao={name:n.name,styles:n.styles,next:ao},n.name;if(n.styles!==void 0){var i=n.next;if(i!==void 0)for(;i!==void 0;)ao={name:i.name,styles:i.styles,next:ao},i=i.next;var r=n.styles+";";return r}return KU(t,e,n)}case"function":{if(t!==void 0){var o=ao,s=n(t);return ao=o,jf(t,e,s)}break}}return n}function KU(t,e,n){var i="";if(Array.isArray(n))for(var r=0;rn=>{if(typeof t=="function"){const i=n.displayName||n.name,r=t(n,...e);return r.displayName=i,r}else return n}}function X5(t,e,n,i,...r){}const Ye=(t,e,...n)=>X5("error",!0,t,e,...n),Ne=(t,e,...n)=>X5("warn",!0,t,e,...n);function uf(t){if(Array.isArray(t)){const e=t.slice(0);for(let n=0;n{if(e==null)return!1;const i=gW(t,e);return i.length===1||n===i[0]}).reduce((e,n)=>{if(typeof n!="function")throw new Error("Invalid Argument Type, must only provide functions, undefined, or null.");return e===null?n:function(...r){e.apply(this,r),n.apply(this,r)}},null)}function gW(t,e){const n=[];return t.forEach((i,r)=>{i===e&&n.push(r)}),n}var OW=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var i,r,o;if(Array.isArray(e)){if(i=e.length,i!=n.length)return!1;for(r=i;r--!==0;)if(!t(e[r],n[r]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(o=Object.keys(e),i=o.length,i!==Object.keys(n).length)return!1;for(r=i;r--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[r]))return!1;for(r=i;r--!==0;){var s=o[r];if(!t(e[s],n[s]))return!1}return!0}return e!==e&&n!==n};const GO=ss(OW),Z5=(t,e)=>(e.has(t)?e.set(t,e.get(t)+1):e.set(t,0),`${t}_${e.get(t)}`),bW=Object.prototype.hasOwnProperty;function q5(t){if(typeof t!="object")return!0;for(const e in t)if(bW.call(t,e))return!1;return!0}function Y5(...t){let e={};return t.forEach(n=>{e=G5(e,n)}),e}function G5(t,e){if(my(e)){const n=[...Object.keys(e),...Object.getOwnPropertySymbols(e)],i={...t};return n.forEach(r=>{my(t[r])&&my(e[r])?i[r]=G5(t[r],e[r]):gy(e[r])&&gy(t[r])?i[r]=[...new Set([...t[r],...e[r]])]:gy(t[r])?i[r]=[...new Set([...t[r],e[r]])]:i[r]=e[r]}),i}else return{...t}}function my(t){return t&&(typeof t=="object"||typeof t=="function")&&!Array.isArray(t)}function gy(t){return Array.isArray(t)}function yW(t){if(Array.isArray(t))return t}function vW(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var i,r,o,s,a=[],l=!0,u=!1;try{if(o=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=o.call(n)).done)&&(a.push(i.value),a.length!==e);l=!0);}catch(c){u=!0,r=c}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw r}}return a}}function hC(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n0?n[1]:""]}function kW(t){if(!t||typeof t=="number")return t;const e=K5(t),n=Qr(e,2),i=n[0],r=n[1];return r==="ms"?i:r==="s"?i*1e3:i}const xW=t=>!!t&&t.ref!==void 0,_W=t=>!!t&&t.current!==void 0;function it(t){const e=typeof t=="function"?t():t;if(e&&e===document)return document.documentElement;if(e instanceof Element||e===window||e&&typeof e.nodeType<"u")return e;if(e){const n=e;if(xW(n)){const i=_W(n.ref)?n.ref.current:n.ref;return i instanceof HTMLElement?i:it(i)}else return n.constructor.componentId?n.constructor.componentId:n.constructor.name,Ep.findDOMNode(e)}}function Cr(t,e,n,i){const r=t===window||t===document?t:it(t);return r==null||r.addEventListener(e,n,i),{remove(){r==null||r.removeEventListener(e,n,i)}}}const ln=!!(typeof window<"u"&&window.document&&window.document.createElement);function EW(t,e){const n=t&&it(t),i=e&&it(e);return!n||!i?!1:!(n instanceof Window)&&!(i instanceof Window)?n.contains(i):J5(n,i)}function J5(t,e){let n=e;for(;n;){if(n===t)return!0;n=n.parentNode}return!1}const cd=ln?EW:J5;function ko(t){const e=t&&it(t);let n;e&&"ownerDocument"in e&&(n=e.ownerDocument);const i=ln?window.document:void 0;return n||i}function jt(t){const e={top:0,bottom:0,left:0,right:0,height:0,width:0};if(!ln)return e;const n=t&&it(t);if(!n)return e;if(n===window)return{left:window.pageXOffset,top:window.pageYOffset,width:window.innerWidth,height:window.innerHeight,right:window.innerWidth+window.pageXOffset,bottom:window.innerHeight+window.pageYOffset};const i=t===document?document:ko(n),r=i&&i.documentElement;if(!r||!cd(r,n))return e;const o=n.getBoundingClientRect();let s;for(s in e)e[s]=o[s];if(i!==document&&i.defaultView){const a=i.defaultView.frameElement;if(a){const l=jt(a);e.top+=l.top,e.bottom+=l.top,e.left+=l.left,e.right+=l.left}}return{top:e.top+(window.pageYOffset||r.scrollTop)-(r.clientTop||0),left:e.left+(window.pageXOffset||r.scrollLeft)-(r.clientLeft||0),width:(e.width==null?n.offsetWidth:e.width)||0,height:(e.height==null?n.offsetHeight:e.height)||0,right:i.body.clientWidth-e.width-e.left,bottom:i.body.clientHeight-e.height-e.top}}const qo=function(){let t;if(ln&&window.requestAnimationFrame&&window.cancelAnimationFrame)t=e=>{const n=window.requestAnimationFrame(e);return{cancel:()=>window.cancelAnimationFrame(n)}};else{let e=new Date().getTime();t=n=>{const i=new Date().getTime(),r=Math.max(0,16-(i-e)),o=setTimeout(n,r);return e=i,{cancel:()=>clearTimeout(o)}}}return t}();function CW(t,e){const n=it(t),i=[];let r=jt(n)||{},o=!1;function s(){if(!o){const a=jt(n)||{};(a.top!==r.top||a.left!==r.left||a.right!==r.right||a.bottom!==r.bottom||a.width!==r.width||a.height!==r.height)&&typeof e=="function"&&e(a),r=a,i.push(qo(s))}}return s(),{remove(){o=!0,i.forEach(a=>a.cancel())}}}function TW(t){return!!(t.tagName.includes("-")&&customElements.get(t.tagName.toLowerCase()))}function Vc(t){const e=(t||document).activeElement;return e&&TW(e)?e.shadowRoot.activeElement:e}function nu(t){const e=t&&it(t),n=Vc();return!!e&&(n===e||cd(e,n))}const fC=["a[href]","frame","iframe","object","input:not([type=hidden])","select","textarea","button","*[tabindex]",'[contenteditable="true"]'].join(",");function zk(t,e,n){const i=t&&it(t);if(!i||typeof i.querySelectorAll!="function")return[];let r=Array.from(i.querySelectorAll(fC));return n&&i.matches(fC)&&(r=[...r,i]),r.filter(o=>typeof e=="function"?e(o)&&pC(o):pC(o))}function PW(t){return Fr(t).display==="none"}function AW(t){var e,n;const i=["fixed","absolute"];return!!(i.includes((e=t.style.position)===null||e===void 0?void 0:e.toLowerCase())||i.includes((n=Fr(t).getPropertyValue("position"))===null||n===void 0?void 0:n.toLowerCase()))}function RW(t){let e=t;for(;e&&!(e===document.body||e instanceof ShadowRoot);){if(PW(e))return!1;if(AW(e))break;e=e.parentNode}return!0}function pC(t){return!t.disabled&&RW(t)}function Hk(t,e){return zk(t,n=>!IW(n.getAttribute("tabindex")),e)}function IW(t){return!isNaN(t)&&t<0}const $W={toArray:()=>[],contains:()=>!1,add:()=>{},remove:()=>{}};function mC(t){const e=it(t);if(!e)return $W;const n={toArray(){return[...e.classList]},contains:()=>!1,add:()=>{},remove:()=>{}};return n.add=i=>e.classList.add(i),n.remove=i=>e.classList.remove(i),n.contains=i=>e.classList.contains(i),n}function jc(t){const e=t&&it(t),n=ko(e);return n&&n.defaultView}function Fr(t,e){let n={};if(ln){const i=t&&it(t);if(i){const r=jc(t);n=r?r.getComputedStyle(i,e):{}}}return n}const gC=new WeakMap;function OC(t,e=!1){var n;if(!ln)return 16;const i=t||((n=ko(t))===null||n===void 0?void 0:n.documentElement),r=gC.get(i);if(!e&&r)return r;const o=parseInt(Fr(i).getPropertyValue("font-size"));return gC.set(i,o),o}function LW(t){const e=[];if(!ln)return e;const n=t&&it(t);if(n){let i=n;for(;(i=i.parentNode)&&i&&i.nodeType===1&&i.tagName!=="BODY";){const r=Fr(i),o=r.getPropertyValue("-webkit-transform")||r.getPropertyValue("-moz-transform")||r.getPropertyValue("-ms-transform")||r.getPropertyValue("-o-transform")||r.getPropertyValue("transform")||"none",s=o==="none"||o==="matrix(1, 0, 0, 1, 0, 0)";(r.position!=="static"||!s)&&e.push(i)}e.push(ko(n).body)}return e}function eM(t){const e=[];if(!ln)return e;const n=t&&it(t);if(n){const r=(Fr(n)||{}).position;if(r==="fixed")return[n.ownerDocument];let o=n;for(;o&&o.nodeType===1&&(o=o.parentNode);){let a;try{a=Fr(o)}catch{}if(typeof a>"u"||a===null)return e.push(o),e;const l=a,u=l.overflow,c=l.overflowX,d=l.overflowY;/(auto|scroll|overlay)/.test(u+d+c)&&(r!=="absolute"||["relative","absolute","fixed"].indexOf(a.position)>=0)&&e.push(o)}const s=n.ownerDocument;s&&(e.push(s.body),s!==document&&e.push(s.defaultView))}return e}function bC(t,e){const n=e.currentTarget,i=e.relatedTarget;(!i||i!==n&&!cd(n,i))&&t(e)}function xo(t){const e=t&&it(t);return e?Vc()===e:!1}function Pv(t,e=!0){const n=t&&it(t);if(n===window||n===document||n===document.body)return!0;const i=n.parentNode;if(n.nodeType===3)return Pv(i,e);const r=n?Fr(n):{};if(r.display==="none"||r.visibility==="hidden"||r.opacity==="0")return!1;if(r.overflow==="hidden"&&r.position==="absolute"&&r.clip!=="auto"){const o=r.clip.substring(5).slice(0,-1).split(", ");let s=!0;if(o.forEach(a=>{a!=="0px"&&(s=!1)}),s)return!1}return e&&i?Pv(i):!0}function NW(t,e){const n=it(e)||document;if(ln){const i=jc(n);return i&&i.matchMedia(t)}return null}function Yn(t,e){if(!t||typeof t=="number")return t;const n=K5(t),i=Qr(n,2),r=i[0],o=i[1];if(o==="rem")return r*OC();if(o==="em"){const s=ln?document.body:null;return r*OC(e||s)}else return r}const MW=Object.prototype.hasOwnProperty;function T0(t,e){if(yC(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;const n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(let r=0;re[1].toUpperCase())}const DW=["borders","breakpoints","colors","forms","media","shadows","spacing","stacking","transitions","typography"],nM=t=>{if(Array.isArray(t)||typeof t=="function")throw new Error;try{return"key"in t&&DW.every(e=>e in t)}catch{throw new Error}};var Av={exports:{}};(function(t,e){(function(n,i){var r="1.0.37",o="",s="?",a="function",l="undefined",u="object",c="string",d="major",h="model",p="name",m="type",O="vendor",y="version",b="architecture",v="console",S="mobile",k="tablet",x="smarttv",_="wearable",w="embedded",D=500,W="Amazon",I="Apple",V="ASUS",B="BlackBerry",H="Browser",K="Chrome",oe="Edge",xe="Firefox",Oe="Google",X="Huawei",ae="LG",A="Microsoft",be="Motorola",Se="Opera",L="Samsung",We="Sharp",et="Sony",Be="Xiaomi",Bt="Zebra",Vn="Facebook",Or="Chromium OS",Xi="Mac OS",Ca=function(F,G){var te={};for(var fe in F)G[fe]&&G[fe].length%2===0?te[fe]=G[fe].concat(F[fe]):te[fe]=F[fe];return te},Xt=function(F){for(var G={},te=0;te0?Te.length===2?typeof Te[1]==a?this[Te[0]]=Te[1].call(this,rn):this[Te[0]]=Te[1]:Te.length===3?typeof Te[1]===a&&!(Te[1].exec&&Te[1].test)?this[Te[0]]=rn?Te[1].call(this,rn,Te[2]):i:this[Te[0]]=rn?rn.replace(Te[1],Te[2]):i:Te.length===4&&(this[Te[0]]=rn?Te[3].call(this,rn.replace(Te[1],Te[2])):i):this[Te]=rn||i;te+=2}},gs=function(F,G){for(var te in G)if(typeof G[te]===u&&G[te].length>0){for(var fe=0;fe2&&(we[h]="iPad",we[m]=k),we},this.getEngine=function(){var we={};return we[p]=i,we[y]=i,Ao.call(we,fe,_t.engine),we},this.getOS=function(){var we={};return we[p]=i,we[y]=i,Ao.call(we,fe,_t.os),Te&&!we[p]&&Qe&&Qe.platform!="Unknown"&&(we[p]=Qe.platform.replace(/chrome os/i,Or).replace(/macos/i,Xi)),we},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return fe},this.setUA=function(we){return fe=typeof we===c&&we.length>D?si(we,D):we,this},this.setUA(fe),this};nn.VERSION=r,nn.BROWSER=Xt([p,y,d]),nn.CPU=Xt([b]),nn.DEVICE=Xt([h,O,m,v,S,x,k,_,w]),nn.ENGINE=nn.OS=Xt([p,y]),t.exports&&(e=t.exports=nn),e.UAParser=nn;var ai=typeof n!==l&&(n.jQuery||n.Zepto);if(ai&&!ai.ua){var Ro=new nn;ai.ua=Ro.getResult(),ai.ua.get=function(){return Ro.getUA()},ai.ua.set=function(F){Ro.setUA(F);var G=Ro.getResult();for(var te in G)ai.ua[te]=G[te]}}})(typeof window=="object"?window:C1)})(Av,Av.exports);var BW=Av.exports;const QW=ss(BW),FW=()=>new QW().getResult().browser,zW=()=>FW().name==="Safari";function $t(t,e,...n){const i=e.ref,r=t.ref,o=typeof r=="function",s=typeof i=="function",a={...e};return t.props.style&&e.style&&(a.style={...t.props.style,...e.style}),a.key=t.key||e.key,Object.keys(e).forEach(l=>{l.indexOf("on")===0&&(typeof e[l]=="function"||typeof t.props[l]=="function")&&(a[l]=lt(t.props[l],e[l]))}),r==null||i==null?z.cloneElement(t,a,...n):(Ne(o,`Cloning an element with a ref that will be overwritten because the ref is not a function. Use a composable callback-style ref instead. Ignoring ref: ${r}`),z.cloneElement(t,{...a,ref(l){s?i(l):i.current=l,r(l)}},...n))}function Hl(t,e={}){const n=T.Children.count(t);return n===0?null:typeof t=="string"&&t.length>0||n>1?z.createElement("span",e,t):$t(Array.isArray(t)?t[0]:t,e)}const HW=()=>t=>t;function vC(t){return typeof t=="string"?t:t.displayName||t.name}function oi(t,e,n){var i,r;return e.as&&e.as!==((i=t.defaultProps)===null||i===void 0?void 0:i.as)?e.as:typeof n=="function"?n():e.href?"a":e.to?(Ne(!e.as,`[${t.displayName}] \`as\` prop should be provided when using \`to\``),"a"):typeof e.onClick=="function"?"button":((r=t.defaultProps)===null||r===void 0?void 0:r.as)||"span"}function Yo({props:t={},interactionTypes:e=["disabled","readonly"]}={}){const n=t.interaction,i=t.disabled,r=t.readOnly;return n||(e.includes("disabled")&&i?"disabled":e.includes("readonly")&&r?"readonly":"enabled")}function Me(t,e=[]){return t&&t.type?e.map(i=>vC(i)).indexOf(vC(t.type))>=0:!1}function Re(t,e,n){const i=Array.isArray(e)?e:Object.keys(e||{}),r=n?i.concat(n):i;return WW(t,r)}const UW=Object.prototype.hasOwnProperty,WW=(t,e)=>{const n={};for(const i in t)i==="theme"||i==="children"||i==="className"||i==="style"||i==="styles"||i==="makeStyles"||i==="themeOverride"||i==="deterministicId"||e.includes(i)||!UW.call(t,i)||(n[i]=t[i]);return n};var VW=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,jW=R5(function(t){return VW.test(t)||t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)<91});function It(t){const e={};return Object.keys(t).filter(n=>jW(n)&&n!=="style"&&n!=="className"&&n!=="children"&&n!=="styles"&&n!=="makeStyles"&&n!=="deterministicId").forEach(n=>{e[n]=t[n]}),e}function us(t,e,n){const i=Array.isArray(e)?e:Object.keys(e||{}),r=n?i.concat(n):i;return XW(t,r)}function XW(t,e){const n={},i=e.length;let r=-1,o;for(;++rz.createElement(oM.Provider,{value:e},t);sM.defaultProps={instanceCounterMap:rM};const zt=YO(t=>{const e=T.forwardRef((n,i)=>{const r=t.componentId||t.displayName||t.name,o=T.useContext(oM),s=(a=r)=>Z5(a,o);return n.deterministicId&&Ne(!1,`Manually passing the "deterministicId" property is not allowed on the ${r} component. -`,n.deterministicId),z.createElement(t,Object.assign({ref:i,deterministicId:s},n))});return Bk(e,t),e.propTypes=t.propTypes,e.defaultProps=t.defaultProps,e.allowedProps=t.allowedProps,e.originalType=t.originalType||t,e});function ZW(t,e){if(t==null)return{};var n={};for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){if(e.indexOf(i)>=0)continue;n[i]=t[i]}return n}function Ie(t,e){if(t==null)return{};var n=ZW(t,e),i,r;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}let kh,hm,Oy;const qW=()=>{if(kh)return kh;if(ln){const t=document.documentElement;return hm=t.getAttribute("dir"),kh=hm||Fr(t).direction,Oy||(Oy=new MutationObserver(()=>{const e=t.getAttribute("dir");e&&e!==hm&&(hm=kh=e)}),Oy.observe(t,{attributes:!0})),kh}};function YW(t){if(ln)return qW()}const Rv=T.createContext(YW()||"ltr"),KO={ltr:"ltr",rtl:"rtl"},GW=["forwardedRef"],Mr=YO(t=>{class e extends z.Component{render(){const r=this.props,o=r.forwardedRef,s=Ie(r,GW);return z.createElement(Rv.Consumer,null,a=>z.createElement(t,Object.assign({ref:o,dir:a},s)))}}e.displayName="TextDirectionContextConsumerComponent";const n=T.forwardRef((i,r)=>z.createElement(e,Object.assign({},i,{forwardedRef:r})));return Bk(n,t),n.defaultProps=t.defaultProps,n.propTypes=t.propTypes,n.allowedProps=t.allowedProps,n.originalType=t.originalType||t,n});Mr.DIRECTION=KO;function SC(t){return function(e,n,i,r="",o=""){const s=e[n];return s===null||typeof s>"u"?new Error(`The prop \`${n}\` is marked as required in \`${i}\`, but its value is \`${s}\``):t(e,n,i,r,o)}}const ft={oneOf(t){function e(n,i,r){const o=z.Children.toArray(n[i]),s=t.map(a=>a&&Ta(a));for(let a=0;a{const u=Ta(l);return o[u]=0,u});for(let l=0;l{o[l]>1&&a.push(`${o[l]} children of type ${l}`),o[l]===0&&a.push(`0 children of type ${l}`)}),a.length>0?new Error(`Expected exactly one of each ${s.join(", ")} in ${i} but found:${a.join(` + */var mn=typeof Symbol=="function"&&Symbol.for,Lk=mn?Symbol.for("react.element"):60103,Nk=mn?Symbol.for("react.portal"):60106,zO=mn?Symbol.for("react.fragment"):60107,HO=mn?Symbol.for("react.strict_mode"):60108,UO=mn?Symbol.for("react.profiler"):60114,WO=mn?Symbol.for("react.provider"):60109,VO=mn?Symbol.for("react.context"):60110,Mk=mn?Symbol.for("react.async_mode"):60111,jO=mn?Symbol.for("react.concurrent_mode"):60111,XO=mn?Symbol.for("react.forward_ref"):60112,ZO=mn?Symbol.for("react.suspense"):60113,IU=mn?Symbol.for("react.suspense_list"):60120,qO=mn?Symbol.for("react.memo"):60115,YO=mn?Symbol.for("react.lazy"):60116,$U=mn?Symbol.for("react.block"):60121,LU=mn?Symbol.for("react.fundamental"):60117,NU=mn?Symbol.for("react.responder"):60118,MU=mn?Symbol.for("react.scope"):60119;function Wi(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case Lk:switch(t=t.type,t){case Mk:case jO:case zO:case UO:case HO:case ZO:return t;default:switch(t=t&&t.$$typeof,t){case VO:case XO:case YO:case qO:case WO:return t;default:return e}}case Nk:return e}}}function L5(t){return Wi(t)===jO}ht.AsyncMode=Mk;ht.ConcurrentMode=jO;ht.ContextConsumer=VO;ht.ContextProvider=WO;ht.Element=Lk;ht.ForwardRef=XO;ht.Fragment=zO;ht.Lazy=YO;ht.Memo=qO;ht.Portal=Nk;ht.Profiler=UO;ht.StrictMode=HO;ht.Suspense=ZO;ht.isAsyncMode=function(t){return L5(t)||Wi(t)===Mk};ht.isConcurrentMode=L5;ht.isContextConsumer=function(t){return Wi(t)===VO};ht.isContextProvider=function(t){return Wi(t)===WO};ht.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===Lk};ht.isForwardRef=function(t){return Wi(t)===XO};ht.isFragment=function(t){return Wi(t)===zO};ht.isLazy=function(t){return Wi(t)===YO};ht.isMemo=function(t){return Wi(t)===qO};ht.isPortal=function(t){return Wi(t)===Nk};ht.isProfiler=function(t){return Wi(t)===UO};ht.isStrictMode=function(t){return Wi(t)===HO};ht.isSuspense=function(t){return Wi(t)===ZO};ht.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===zO||t===jO||t===UO||t===HO||t===ZO||t===IU||typeof t=="object"&&t!==null&&(t.$$typeof===YO||t.$$typeof===qO||t.$$typeof===WO||t.$$typeof===VO||t.$$typeof===XO||t.$$typeof===LU||t.$$typeof===NU||t.$$typeof===MU||t.$$typeof===$U)};ht.typeOf=Wi;$5.exports=ht;var DU=$5.exports,Dk=DU,BU={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},QU={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},FU={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},N5={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Bk={};Bk[Dk.ForwardRef]=FU;Bk[Dk.Memo]=N5;function oC(t){return Dk.isMemo(t)?N5:Bk[t.$$typeof]||BU}var zU=Object.defineProperty,HU=Object.getOwnPropertyNames,sC=Object.getOwnPropertySymbols,UU=Object.getOwnPropertyDescriptor,WU=Object.getPrototypeOf,aC=Object.prototype;function M5(t,e,n){if(typeof e!="string"){if(aC){var i=WU(e);i&&i!==aC&&M5(t,i,n)}var r=HU(e);sC&&(r=r.concat(sC(e)));for(var o=oC(t),s=oC(e),a=0;a=4;++i,r-=4)n=t.charCodeAt(i)&255|(t.charCodeAt(++i)&255)<<8|(t.charCodeAt(++i)&255)<<16|(t.charCodeAt(++i)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(r){case 3:e^=(t.charCodeAt(i+2)&255)<<16;case 2:e^=(t.charCodeAt(i+1)&255)<<8;case 1:e^=t.charCodeAt(i)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var qU={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},YU=/[A-Z]|^ms/g,GU=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Q5=function(e){return e.charCodeAt(1)===45},lC=function(e){return e!=null&&typeof e!="boolean"},my=R5(function(t){return Q5(t)?t:t.replace(YU,"-$&").toLowerCase()}),uC=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(GU,function(i,r,o){return co={name:r,styles:o,next:co},r})}return qU[e]!==1&&!Q5(e)&&typeof n=="number"&&n!==0?n+"px":n};function Xf(t,e,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return co={name:n.name,styles:n.styles,next:co},n.name;if(n.styles!==void 0){var i=n.next;if(i!==void 0)for(;i!==void 0;)co={name:i.name,styles:i.styles,next:co},i=i.next;var r=n.styles+";";return r}return KU(t,e,n)}case"function":{if(t!==void 0){var o=co,s=n(t);return co=o,Xf(t,e,s)}break}}return n}function KU(t,e,n){var i="";if(Array.isArray(n))for(var r=0;rn=>{if(typeof t=="function"){const i=n.displayName||n.name,r=t(n,...e);return r.displayName=i,r}else return n}}function X5(t,e,n,i,...r){}const Ge=(t,e,...n)=>X5("error",!0,t,e,...n),Ne=(t,e,...n)=>X5("warn",!0,t,e,...n);function cf(t){if(Array.isArray(t)){const e=t.slice(0);for(let n=0;n{if(e==null)return!1;const i=gW(t,e);return i.length===1||n===i[0]}).reduce((e,n)=>{if(typeof n!="function")throw new Error("Invalid Argument Type, must only provide functions, undefined, or null.");return e===null?n:function(...r){e.apply(this,r),n.apply(this,r)}},null)}function gW(t,e){const n=[];return t.forEach((i,r)=>{i===e&&n.push(r)}),n}var OW=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var i,r,o;if(Array.isArray(e)){if(i=e.length,i!=n.length)return!1;for(r=i;r--!==0;)if(!t(e[r],n[r]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(o=Object.keys(e),i=o.length,i!==Object.keys(n).length)return!1;for(r=i;r--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[r]))return!1;for(r=i;r--!==0;){var s=o[r];if(!t(e[s],n[s]))return!1}return!0}return e!==e&&n!==n};const KO=as(OW),Z5=(t,e)=>(e.has(t)?e.set(t,e.get(t)+1):e.set(t,0),`${t}_${e.get(t)}`),bW=Object.prototype.hasOwnProperty;function q5(t){if(typeof t!="object")return!0;for(const e in t)if(bW.call(t,e))return!1;return!0}function Y5(...t){let e={};return t.forEach(n=>{e=G5(e,n)}),e}function G5(t,e){if(gy(e)){const n=[...Object.keys(e),...Object.getOwnPropertySymbols(e)],i={...t};return n.forEach(r=>{gy(t[r])&&gy(e[r])?i[r]=G5(t[r],e[r]):Oy(e[r])&&Oy(t[r])?i[r]=[...new Set([...t[r],...e[r]])]:Oy(t[r])?i[r]=[...new Set([...t[r],e[r]])]:i[r]=e[r]}),i}else return{...t}}function gy(t){return t&&(typeof t=="object"||typeof t=="function")&&!Array.isArray(t)}function Oy(t){return Array.isArray(t)}function yW(t){if(Array.isArray(t))return t}function vW(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var i,r,o,s,a=[],l=!0,u=!1;try{if(o=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=o.call(n)).done)&&(a.push(i.value),a.length!==e);l=!0);}catch(c){u=!0,r=c}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw r}}return a}}function hC(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n0?n[1]:""]}function kW(t){if(!t||typeof t=="number")return t;const e=K5(t),n=Qr(e,2),i=n[0],r=n[1];return r==="ms"?i:r==="s"?i*1e3:i}const xW=t=>!!t&&t.ref!==void 0,_W=t=>!!t&&t.current!==void 0;function rt(t){const e=typeof t=="function"?t():t;if(e&&e===document)return document.documentElement;if(e instanceof Element||e===window||e&&typeof e.nodeType<"u")return e;if(e){const n=e;if(xW(n)){const i=_W(n.ref)?n.ref.current:n.ref;return i instanceof HTMLElement?i:rt(i)}else return n.constructor.componentId?n.constructor.componentId:n.constructor.name,Cp.findDOMNode(e)}}function Cr(t,e,n,i){const r=t===window||t===document?t:rt(t);return r==null||r.addEventListener(e,n,i),{remove(){r==null||r.removeEventListener(e,n,i)}}}const ln=!!(typeof window<"u"&&window.document&&window.document.createElement);function EW(t,e){const n=t&&rt(t),i=e&&rt(e);return!n||!i?!1:!(n instanceof Window)&&!(i instanceof Window)?n.contains(i):J5(n,i)}function J5(t,e){let n=e;for(;n;){if(n===t)return!0;n=n.parentNode}return!1}const dd=ln?EW:J5;function Eo(t){const e=t&&rt(t);let n;e&&"ownerDocument"in e&&(n=e.ownerDocument);const i=ln?window.document:void 0;return n||i}function Xt(t){const e={top:0,bottom:0,left:0,right:0,height:0,width:0};if(!ln)return e;const n=t&&rt(t);if(!n)return e;if(n===window)return{left:window.pageXOffset,top:window.pageYOffset,width:window.innerWidth,height:window.innerHeight,right:window.innerWidth+window.pageXOffset,bottom:window.innerHeight+window.pageYOffset};const i=t===document?document:Eo(n),r=i&&i.documentElement;if(!r||!dd(r,n))return e;const o=n.getBoundingClientRect();let s;for(s in e)e[s]=o[s];if(i!==document&&i.defaultView){const a=i.defaultView.frameElement;if(a){const l=Xt(a);e.top+=l.top,e.bottom+=l.top,e.left+=l.left,e.right+=l.left}}return{top:e.top+(window.pageYOffset||r.scrollTop)-(r.clientTop||0),left:e.left+(window.pageXOffset||r.scrollLeft)-(r.clientLeft||0),width:(e.width==null?n.offsetWidth:e.width)||0,height:(e.height==null?n.offsetHeight:e.height)||0,right:i.body.clientWidth-e.width-e.left,bottom:i.body.clientHeight-e.height-e.top}}const Yo=function(){let t;if(ln&&window.requestAnimationFrame&&window.cancelAnimationFrame)t=e=>{const n=window.requestAnimationFrame(e);return{cancel:()=>window.cancelAnimationFrame(n)}};else{let e=new Date().getTime();t=n=>{const i=new Date().getTime(),r=Math.max(0,16-(i-e)),o=setTimeout(n,r);return e=i,{cancel:()=>clearTimeout(o)}}}return t}();function CW(t,e){const n=rt(t),i=[];let r=Xt(n)||{},o=!1;function s(){if(!o){const a=Xt(n)||{};(a.top!==r.top||a.left!==r.left||a.right!==r.right||a.bottom!==r.bottom||a.width!==r.width||a.height!==r.height)&&typeof e=="function"&&e(a),r=a,i.push(Yo(s))}}return s(),{remove(){o=!0,i.forEach(a=>a.cancel())}}}function TW(t){return!!(t.tagName.includes("-")&&customElements.get(t.tagName.toLowerCase()))}function jc(t){const e=(t||document).activeElement;return e&&TW(e)?e.shadowRoot.activeElement:e}function ru(t){const e=t&&rt(t),n=jc();return!!e&&(n===e||dd(e,n))}const fC=["a[href]","frame","iframe","object","input:not([type=hidden])","select","textarea","button","*[tabindex]",'[contenteditable="true"]'].join(",");function Hk(t,e,n){const i=t&&rt(t);if(!i||typeof i.querySelectorAll!="function")return[];let r=Array.from(i.querySelectorAll(fC));return n&&i.matches(fC)&&(r=[...r,i]),r.filter(o=>typeof e=="function"?e(o)&&pC(o):pC(o))}function PW(t){return Fr(t).display==="none"}function AW(t){var e,n;const i=["fixed","absolute"];return!!(i.includes((e=t.style.position)===null||e===void 0?void 0:e.toLowerCase())||i.includes((n=Fr(t).getPropertyValue("position"))===null||n===void 0?void 0:n.toLowerCase()))}function RW(t){let e=t;for(;e&&!(e===document.body||e instanceof ShadowRoot);){if(PW(e))return!1;if(AW(e))break;e=e.parentNode}return!0}function pC(t){return!t.disabled&&RW(t)}function Uk(t,e){return Hk(t,n=>!IW(n.getAttribute("tabindex")),e)}function IW(t){return!isNaN(t)&&t<0}const $W={toArray:()=>[],contains:()=>!1,add:()=>{},remove:()=>{}};function mC(t){const e=rt(t);if(!e)return $W;const n={toArray(){return[...e.classList]},contains:()=>!1,add:()=>{},remove:()=>{}};return n.add=i=>e.classList.add(i),n.remove=i=>e.classList.remove(i),n.contains=i=>e.classList.contains(i),n}function Xc(t){const e=t&&rt(t),n=Eo(e);return n&&n.defaultView}function Fr(t,e){let n={};if(ln){const i=t&&rt(t);if(i){const r=Xc(t);n=r?r.getComputedStyle(i,e):{}}}return n}const gC=new WeakMap;function OC(t,e=!1){var n;if(!ln)return 16;const i=t||((n=Eo(t))===null||n===void 0?void 0:n.documentElement),r=gC.get(i);if(!e&&r)return r;const o=parseInt(Fr(i).getPropertyValue("font-size"));return gC.set(i,o),o}function LW(t){const e=[];if(!ln)return e;const n=t&&rt(t);if(n){let i=n;for(;(i=i.parentNode)&&i&&i.nodeType===1&&i.tagName!=="BODY";){const r=Fr(i),o=r.getPropertyValue("-webkit-transform")||r.getPropertyValue("-moz-transform")||r.getPropertyValue("-ms-transform")||r.getPropertyValue("-o-transform")||r.getPropertyValue("transform")||"none",s=o==="none"||o==="matrix(1, 0, 0, 1, 0, 0)";(r.position!=="static"||!s)&&e.push(i)}e.push(Eo(n).body)}return e}function eM(t){const e=[];if(!ln)return e;const n=t&&rt(t);if(n){const r=(Fr(n)||{}).position;if(r==="fixed")return[n.ownerDocument];let o=n;for(;o&&o.nodeType===1&&(o=o.parentNode);){let a;try{a=Fr(o)}catch{}if(typeof a>"u"||a===null)return e.push(o),e;const l=a,u=l.overflow,c=l.overflowX,d=l.overflowY;/(auto|scroll|overlay)/.test(u+d+c)&&(r!=="absolute"||["relative","absolute","fixed"].indexOf(a.position)>=0)&&e.push(o)}const s=n.ownerDocument;s&&(e.push(s.body),s!==document&&e.push(s.defaultView))}return e}function bC(t,e){const n=e.currentTarget,i=e.relatedTarget;(!i||i!==n&&!dd(n,i))&&t(e)}function Co(t){const e=t&&rt(t);return e?jc()===e:!1}function Av(t,e=!0){const n=t&&rt(t);if(n===window||n===document||n===document.body)return!0;const i=n.parentNode;if(n.nodeType===3)return Av(i,e);const r=n?Fr(n):{};if(r.display==="none"||r.visibility==="hidden"||r.opacity==="0")return!1;if(r.overflow==="hidden"&&r.position==="absolute"&&r.clip!=="auto"){const o=r.clip.substring(5).slice(0,-1).split(", ");let s=!0;if(o.forEach(a=>{a!=="0px"&&(s=!1)}),s)return!1}return e&&i?Av(i):!0}function NW(t,e){const n=rt(e)||document;if(ln){const i=Xc(n);return i&&i.matchMedia(t)}return null}function Yn(t,e){if(!t||typeof t=="number")return t;const n=K5(t),i=Qr(n,2),r=i[0],o=i[1];if(o==="rem")return r*OC();if(o==="em"){const s=ln?document.body:null;return r*OC(e||s)}else return r}const MW=Object.prototype.hasOwnProperty;function P0(t,e){if(yC(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;const n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(let r=0;re[1].toUpperCase())}const DW=["borders","breakpoints","colors","forms","media","shadows","spacing","stacking","transitions","typography"],nM=t=>{if(Array.isArray(t)||typeof t=="function")throw new Error;try{return"key"in t&&DW.every(e=>e in t)}catch{throw new Error}};var Rv={exports:{}};(function(t,e){(function(n,i){var r="1.0.38",o="",s="?",a="function",l="undefined",u="object",c="string",d="major",h="model",p="name",m="type",O="vendor",y="version",b="architecture",v="console",S="mobile",k="tablet",x="smarttv",_="wearable",w="embedded",D=500,W="Amazon",I="Apple",V="ASUS",B="BlackBerry",H="Browser",K="Chrome",re="Edge",ke="Firefox",ge="Google",Z="Huawei",se="LG",A="Microsoft",Oe="Motorola",ye="Opera",L="Samsung",Ve="Sharp",tt="Sony",Be="Xiaomi",Qt="Zebra",Vn="Facebook",gr="Chromium OS",Or="Mac OS",Os=function(ze,F){var X={};for(var ue in ze)F[ue]&&F[ue].length%2===0?X[ue]=F[ue].concat(ze[ue]):X[ue]=ze[ue];return X},Zt=function(ze){for(var F={},X=0;X0?Ce.length===2?typeof Ce[1]==a?this[Ce[0]]=Ce[1].call(this,Lt):this[Ce[0]]=Ce[1]:Ce.length===3?typeof Ce[1]===a&&!(Ce[1].exec&&Ce[1].test)?this[Ce[0]]=Lt?Ce[1].call(this,Lt,Ce[2]):i:this[Ce[0]]=Lt?Lt.replace(Ce[1],Ce[2]):i:Ce.length===4&&(this[Ce[0]]=Lt?Ce[3].call(this,Lt.replace(Ce[1],Ce[2])):i):this[Ce]=Lt||i;X+=2}},Ta=function(ze,F){for(var X in F)if(typeof F[X]===u&&F[X].length>0){for(var ue=0;ue2&&(we[h]="iPad",we[m]=k),we},this.getEngine=function(){var we={};return we[p]=i,we[y]=i,Gr.call(we,ue,Ue.engine),we},this.getOS=function(){var we={};return we[p]=i,we[y]=i,Gr.call(we,ue,Ue.os),Ce&&!we[p]&&Te&&Te.platform&&Te.platform!="Unknown"&&(we[p]=Te.platform.replace(/chrome os/i,gr).replace(/macos/i,Or)),we},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return ue},this.setUA=function(we){return ue=typeof we===c&&we.length>D?si(we,D):we,this},this.setUA(ue),this};rn.VERSION=r,rn.BROWSER=Zt([p,y,d]),rn.CPU=Zt([b]),rn.DEVICE=Zt([h,O,m,v,S,x,k,_,w]),rn.ENGINE=rn.OS=Zt([p,y]),t.exports&&(e=t.exports=rn),e.UAParser=rn;var ai=typeof n!==l&&(n.jQuery||n.Zepto);if(ai&&!ai.ua){var $o=new rn;ai.ua=$o.getResult(),ai.ua.get=function(){return $o.getUA()},ai.ua.set=function(ze){$o.setUA(ze);var F=$o.getResult();for(var X in F)ai.ua[X]=F[X]}}})(typeof window=="object"?window:T1)})(Rv,Rv.exports);var BW=Rv.exports;const QW=as(BW),FW=()=>new QW().getResult().browser,zW=()=>FW().name==="Safari";function $t(t,e,...n){const i=e.ref,r=t.ref,o=typeof r=="function",s=typeof i=="function",a={...e};return t.props.style&&e.style&&(a.style={...t.props.style,...e.style}),a.key=t.key||e.key,Object.keys(e).forEach(l=>{l.indexOf("on")===0&&(typeof e[l]=="function"||typeof t.props[l]=="function")&&(a[l]=ut(t.props[l],e[l]))}),r==null||i==null?z.cloneElement(t,a,...n):(Ne(o,`Cloning an element with a ref that will be overwritten because the ref is not a function. Use a composable callback-style ref instead. Ignoring ref: ${r}`),z.cloneElement(t,{...a,ref(l){s?i(l):i.current=l,r(l)}},...n))}function Wl(t,e={}){const n=T.Children.count(t);return n===0?null:typeof t=="string"&&t.length>0||n>1?z.createElement("span",e,t):$t(Array.isArray(t)?t[0]:t,e)}const HW=()=>t=>t;function vC(t){return typeof t=="string"?t:t.displayName||t.name}function oi(t,e,n){var i,r;return e.as&&e.as!==((i=t.defaultProps)===null||i===void 0?void 0:i.as)?e.as:typeof n=="function"?n():e.href?"a":e.to?(Ne(!e.as,`[${t.displayName}] \`as\` prop should be provided when using \`to\``),"a"):typeof e.onClick=="function"?"button":((r=t.defaultProps)===null||r===void 0?void 0:r.as)||"span"}function Go({props:t={},interactionTypes:e=["disabled","readonly"]}={}){const n=t.interaction,i=t.disabled,r=t.readOnly;return n||(e.includes("disabled")&&i?"disabled":e.includes("readonly")&&r?"readonly":"enabled")}function Me(t,e=[]){return t&&t.type?e.map(i=>vC(i)).indexOf(vC(t.type))>=0:!1}function Re(t,e,n){const i=Array.isArray(e)?e:Object.keys(e||{}),r=n?i.concat(n):i;return WW(t,r)}const UW=Object.prototype.hasOwnProperty,WW=(t,e)=>{const n={};for(const i in t)i==="theme"||i==="children"||i==="className"||i==="style"||i==="styles"||i==="makeStyles"||i==="themeOverride"||i==="deterministicId"||e.includes(i)||!UW.call(t,i)||(n[i]=t[i]);return n};var VW=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,jW=R5(function(t){return VW.test(t)||t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)<91});function It(t){const e={};return Object.keys(t).filter(n=>jW(n)&&n!=="style"&&n!=="className"&&n!=="children"&&n!=="styles"&&n!=="makeStyles"&&n!=="deterministicId").forEach(n=>{e[n]=t[n]}),e}function cs(t,e,n){const i=Array.isArray(e)?e:Object.keys(e||{}),r=n?i.concat(n):i;return XW(t,r)}function XW(t,e){const n={},i=e.length;let r=-1,o;for(;++rz.createElement(oM.Provider,{value:e},t);sM.defaultProps={instanceCounterMap:rM};const Ht=GO(t=>{const e=T.forwardRef((n,i)=>{const r=t.componentId||t.displayName||t.name,o=T.useContext(oM),s=(a=r)=>Z5(a,o);return n.deterministicId&&Ne(!1,`Manually passing the "deterministicId" property is not allowed on the ${r} component. +`,n.deterministicId),z.createElement(t,Object.assign({ref:i,deterministicId:s},n))});return Qk(e,t),e.propTypes=t.propTypes,e.defaultProps=t.defaultProps,e.allowedProps=t.allowedProps,e.originalType=t.originalType||t,e});function ZW(t,e){if(t==null)return{};var n={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.indexOf(i)>=0)continue;n[i]=t[i]}return n}function Ie(t,e){if(t==null)return{};var n,i,r=ZW(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i=0||{}.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}let xh,fm,by;const qW=()=>{if(xh)return xh;if(ln){const t=document.documentElement;return fm=t.getAttribute("dir"),xh=fm||Fr(t).direction,by||(by=new MutationObserver(()=>{const e=t.getAttribute("dir");e&&e!==fm&&(fm=xh=e)}),by.observe(t,{attributes:!0})),xh}};function YW(t){if(ln)return qW()}const Iv=T.createContext(YW()||"ltr"),JO={ltr:"ltr",rtl:"rtl"},GW=["forwardedRef"],Mr=GO(t=>{class e extends z.Component{render(){const r=this.props,o=r.forwardedRef,s=Ie(r,GW);return z.createElement(Iv.Consumer,null,a=>z.createElement(t,Object.assign({ref:o,dir:a},s)))}}e.displayName="TextDirectionContextConsumerComponent";const n=T.forwardRef((i,r)=>z.createElement(e,Object.assign({},i,{forwardedRef:r})));return Qk(n,t),n.defaultProps=t.defaultProps,n.propTypes=t.propTypes,n.allowedProps=t.allowedProps,n.originalType=t.originalType||t,n});Mr.DIRECTION=JO;function SC(t){return function(e,n,i,r="",o=""){const s=e[n];return s===null||typeof s>"u"?new Error(`The prop \`${n}\` is marked as required in \`${i}\`, but its value is \`${s}\``):t(e,n,i,r,o)}}const pt={oneOf(t){function e(n,i,r){const o=z.Children.toArray(n[i]),s=t.map(a=>a&&Aa(a));for(let a=0;a{const u=Aa(l);return o[u]=0,u});for(let l=0;l{o[l]>1&&a.push(`${o[l]} children of type ${l}`),o[l]===0&&a.push(`0 children of type ${l}`)}),a.length>0?new Error(`Expected exactly one of each ${s.join(", ")} in ${i} but found:${a.join(` `)}`):null}},enforceOrder(...t){function e(o,s){for(let a=0;ai(o,a)).join(` -`)}function i(o,s){const a=s.map(l=>l?Ta(l):"??").map(l=>` <${l} />`).join(` +`)}function i(o,s){const a=s.map(l=>l?Aa(l):"??").map(l=>` <${l} />`).join(` `);return`<${o}> ${a} -`}function r(o,s,a){const l=z.Children.toArray(o[s]).map(u=>{if(u&&u.type)return Ta(u.type);if(u)return null});for(let u=0;ud?Ta(d):"??");if(e(l,c))return null}return new Error(`Expected children of ${a} in one of the following formats: +`}function r(o,s,a){const l=z.Children.toArray(o[s]).map(u=>{if(u&&u.type)return Aa(u.type);if(u)return null});for(let u=0;ud?Aa(d):"??");if(e(l,c))return null}return new Error(`Expected children of ${a} in one of the following formats: ${n(a,t)} Instead of: - ${i(a,l)}`)}return r.isRequired=SC(r),r}},Ta=t=>typeof t=="string"?t:t.displayName||t.name;function KW(t,e,n){if(t.as==="input"){if(e==="children"&&t.children||t.value==null)return new Error(`Prop \`value\` and not \`children\` must be supplied if \`${n} as="input"\``)}else{if(e==="value"&&t.value!=null)return new Error(`Prop \`children\` and not \`value\` must be supplied unless \`${n} as="input"\``);if(!t.children)return new Error(`Prop \`children\` should be supplied unless \`${n} as="input"\`.`)}return null}function yu(t,e="onChange",n="defaultValue"){return function(i,r,o){const s=t(i,r,o,"prop",r,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");return s||(i[r]&&typeof i[e]!="function"?new Error([`You provided a '${r}' prop without an '${e}' handler on '${o}'. This will render a controlled component. If the component should be uncontrolled and manage its own state, use '${n}'. Otherwise, set '${e}'.`].join("")):null)}}const JW=f.oneOf(["auto","default","none","context-menu","help","pointer","progress","wait","cell","crosshair","text","vertical-text","alias","copy","move","no-drop","not-allowed","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"]),eV=!!(typeof window<"u"&&window.document&&window.document.createElement),wi=eV?f.oneOfType([f.element,f.instanceOf(Element)]):f.element,tV=Object.freeze({radiusSmall:"0.125rem",radiusMedium:"0.25rem",radiusLarge:"0.5rem",widthSmall:"0.0625rem",widthMedium:"0.125rem",widthLarge:"0.25rem",style:"solid"});function nV(t){const e={textDarkest:t.licorice,textDark:t.ash,textLight:t.porcelain,textLightest:t.white,textBrand:t.brand,textLink:t.link,textAlert:t.barney,textInfo:t.brand,textSuccess:t.shamrock,textDanger:t.crimson,textWarning:t.fire},n={backgroundDarkest:t.licorice,backgroundDark:t.ash,backgroundMedium:t.tiara,backgroundLight:t.porcelain,backgroundLightest:t.white,backgroundBrand:t.brand,backgroundBrandSecondary:t.oxford,backgroundAlert:t.barney,backgroundInfo:t.brand,backgroundSuccess:t.shamrock,backgroundDanger:t.crimson,backgroundWarning:t.fire},i={borderLightest:t.white,borderLight:t.porcelain,borderMedium:t.tiara,borderDark:t.ash,borderDarkest:t.licorice,borderBrand:t.brand,borderAlert:t.barney,borderInfo:t.brand,borderSuccess:t.shamrock,borderDanger:t.crimson,borderWarning:t.fire,borderDebug:t.crimson};return{...t,...e,...n,...i,values:t,text:e,background:n,border:i}}const iV={brand:"#0374B5",link:"#0374B5",electric:"#0374B5",shamrock:"#0B874B",barney:"#BF32A4",crimson:"#E0061F",fire:"#FC5E13",licorice:"#2D3B45",oxford:"#394B58",ash:"#6B7780",slate:"#8B969E",tiara:"#C7CDD1",porcelain:"#F5F5F5",white:"#FFFFFF"},rV=Object.freeze(nV(iV)),oV=Object.freeze({duration:"300ms",timing:"ease-in-out"}),sV=Object.freeze({fontFamily:'LatoWeb, Lato, "Helvetica Neue", Helvetica, Arial, sans-serif',fontFamilyMonospace:'Menlo, Consolas, Monaco, "Andale Mono", monospace',fontSizeXSmall:"0.75rem",fontSizeSmall:"0.875rem",fontSizeMedium:"1rem",fontSizeLarge:"1.375rem",fontSizeXLarge:"1.75rem",fontSizeXXLarge:"2.375rem",fontWeightLight:300,fontWeightNormal:400,fontWeightBold:700,lineHeight:1.5,lineHeightFit:1.125,lineHeightCondensed:1.25,lineHeightDouble:2,letterSpacingNormal:0,letterSpacingCondensed:"-0.0625rem",letterSpacingExpanded:"0.0625rem"}),aV=Object.freeze({xxxSmall:"0.125rem",xxSmall:"0.375rem",xSmall:"0.5rem",small:"0.75rem",mediumSmall:"1rem",medium:"1.5rem",large:"2.25rem",xLarge:"3rem",xxLarge:"3.75rem"}),lV=Object.freeze({inputHeightSmall:"1.75rem",inputHeightMedium:"2.375rem",inputHeightLarge:"3rem"}),uV=.0625,$o={xxSmall:8,xSmall:16,small:30,medium:48,tablet:48,large:62,desktop:64,xLarge:75},$g=Object.freeze({xxSmall:`${$o.xxSmall}em`,xSmall:`${$o.xSmall}em`,small:`${$o.small}em`,medium:`${$o.medium}em`,tablet:`${$o.tablet}em`,large:`${$o.large}em`,desktop:`${$o.desktop}em`,xLarge:`${$o.xLarge}em`,maxWidth:`${$o.large-uV}em`}),cV=Object.freeze({mediumMin:`min-width: ${$g.medium}`,largeMin:`min-width: ${$g.large}`,xLargeMin:`min-width: ${$g.xLarge}`}),Vu=["0 0.0625rem 0.125rem rgba(0, 0, 0, 0.2), 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.1)","0 0.1875rem 0.375rem rgba(0, 0, 0, 0.1), 0 0.1875rem 0.375rem rgba(0, 0, 0, 0.16)","0 0.375rem 0.4375rem rgba(0, 0, 0, 0.1), 0 0.625rem 1.75rem rgba(0, 0, 0, 0.25)"],dV=Object.freeze({depth1:Vu[0],depth2:Vu[1],depth3:Vu[2],resting:Vu[0],above:Vu[1],topmost:Vu[2]}),hV=Object.freeze({topmost:9999,above:1,below:-1,deepest:-9999}),aM={colors:rV,borders:tV,transitions:oV,typography:sV,spacing:aV,forms:lV,media:cV,breakpoints:$g,shadows:dV,stacking:hV},fV=["key","description"],pV=["key","description","use"],mV="@@themeRegistryDefaultTheme",P0="__GLOBAL_THEME_REGISTRY__";globalThis[P0]?Uk(gV(globalThis[P0])):uM();function lM(){return{currentThemeKey:null,themes:{},registered:[]}}function gV(t){const e=lM();if(typeof t>"u")return e;let n=!0;return Object.keys(e).forEach(i=>{typeof t[i]>"u"&&(n=!1)}),Ye(n,"[theme-registry] Invalid global theme registry!"),t}function JO(){return globalThis[P0]}function Uk(t){globalThis[P0]=t}function uM(){Uk(lM())}function OV(){const t=JO(),e=t.currentThemeKey;if(e)return t.themes[e]}function bV(t,e){const n=JO(),i=n.themes[t];i||t!==mV&&Ye(i,`[theme-registry] Could not find theme: '${t}' in the registry.`),n.currentThemeKey=t;const r=Y5(i,e);return n.themes[t]=r,r}function yV(t){const e=t.key,n=t.description,i=Ie(t,fV),r={key:e,description:n,...i,use(o){bV(e,(o==null?void 0:o.overrides)||{})}};return new Proxy(r,{get(o,s){o.key,o.description,o.use;const a=Ie(o,pV);return s==="variables"?a:Reflect.get(o,s)}})}function vV(t){const e=JO();if(t.key&&e.themes[t.key])return e.themes[t.key];{if(!nM(t))throw Ye(!1,`[theme-registry] The theme provided to 'registerTheme' is not a valid theme object! -For it to be valid some properties have to be present, check out https://instructure.design/#canvas as a reference.`),new Error;const n=yV(t);return e.themes[n.key]=n,e.registered.push(n.key),n}}const Wk={getRegistry:JO,clearRegistry:uM,setRegistry:Uk,registerTheme:vV,getCurrentTheme:OV},xi=aM.colors,SV="canvas",wV={"ic-brand-primary":xi.textBrand,"ic-brand-font-color-dark":xi.textDarkest,"ic-link-color":xi.textLink,"ic-link-decoration":"none","ic-brand-button--primary-bgd":xi.backgroundBrand,"ic-brand-button--primary-text":xi.textLightest,"ic-brand-button--secondary-bgd":xi.backgroundDarkest,"ic-brand-button--secondary-text":xi.textLightest,"ic-brand-global-nav-bgd":xi.backgroundBrandSecondary,"ic-global-nav-link-hover":xi.backgroundDarkest,"ic-brand-global-nav-ic-icon-svg-fill":xi.textLightest,"ic-brand-global-nav-ic-icon-svg-fill--active":xi.textBrand,"ic-brand-global-nav-menu-item__text-color":xi.textLightest,"ic-brand-global-nav-menu-item__text-color--active":xi.textBrand},kV={key:SV,...aM,...wV},Vk=Wk.registerTheme(kV),xV=t=>(e={})=>{var n,i;try{if(nM(t))return t}catch{t={}}let r;Object.keys(e).length===0?r=Wk.getCurrentTheme()||Vk:r=e;const o=r.key,s=((n=t)===null||n===void 0||(i=n.themeOverrides)===null||i===void 0?void 0:i[o])||t.themeOverrides||{};return Y5(r,t,s)};function Zl({children:t,theme:e={},dir:n,instanceCounterMap:i,as:r}){const o=n||T.useContext(Rv);let s=z.createElement(sM,{instanceCounterMap:i},z.createElement(rW,{theme:xV(e)},z.createElement(Rv.Provider,{value:o},t)));if(n){const a=oi(Zl,{as:r});s=z.createElement(a,{dir:o},s)}return s}Zl.propTypes={children:f.node,theme:f.object,dir:f.oneOf(["ltr","rtl"]),instanceCounterMap:f.instanceOf(Map),as:f.string};Zl.defaultProps={theme:{},as:void 0};const _V=(t,e,n,i,r)=>{const o=e,s=n,a=i,l=a.themeOverride,u=t,c=u.componentOverrides;let d={},h={};return c&&(d=o&&c[o]||s&&c[s]||{}),l&&(typeof l=="function"?h=l(r||{},t):h=l),{...d,...h}},EV=()=>{let t=tW();if(q5(t)){const e=Wk.getCurrentTheme();if(e)return e;t=Vk}return t},by={styles:{},makeStyles:()=>{}},de=YO((t,e,n)=>{const i=t.displayName||t.name,r=T.forwardRef((o,s)=>{const a=EV();o.styles&&Ne(!1,`Manually passing the "styles" property is not allowed on the ${i} component. Using the default styles calculated by the @withStyle decorator instead. -`,o.styles),o.makeStyles&&Ne(!1,`Manually passing the "makeStyles" property is not allowed on the ${i} component. Styles are calculated by the @withStyle decorator.`);const l={...t.defaultProps,...o,...by};let u=typeof n=="function"?n(a):{};const c=_V(a,i,t.componentId,l,u);u={...u,...c};const d=T.useState(e?e(u,l,{}):{}),h=Qr(d,2),p=h[0],m=h[1],O=y=>{const b=e(u,l,y);GO(b,p)||m(b)};return z.createElement(t,Object.assign({ref:s},o,{makeStyles:O,styles:p,themeOverride:c}))});return Bk(r,t),r.originalType=t.originalType||t,r.propTypes=t.propTypes,r.defaultProps=t.defaultProps,r.allowedProps=t.allowedProps,r.generateComponentTheme=n,t.defaultProps={...t.defaultProps,makeStyles:by.makeStyles,styles:by.styles},r}),vu={SHADOW_TYPES:{resting:"resting",above:"above",topmost:"topmost",none:"none"},STACKING_TYPES:{deepest:"deepest",below:"below",resting:"resting",above:"above",topmost:"topmost"},BORDER_WIDTHS:{0:"0",none:"none",small:"small",medium:"medium",large:"large"},BORDER_RADII:{0:"0",none:"none",small:"small",medium:"medium",large:"large",circle:"circle",pill:"pill"},BACKGROUNDS:{default:"default",inverse:"inverse",transparent:"transparent"},SIZES:{xSmall:"x-small",small:"small",medium:"medium",large:"large",xLarge:"x-large"},SPACING:{0:"0",none:"none",auto:"auto",xxxSmall:"xxx-small",xxSmall:"xx-small",xSmall:"x-small",small:"small",mediumSmall:"mediumSmall",medium:"medium",large:"large",xLarge:"x-large",xxLarge:"xx-large"}},CV=vu.SHADOW_TYPES,TV=vu.STACKING_TYPES,PV=vu.BORDER_WIDTHS,AV=vu.BORDER_RADII,RV=vu.BACKGROUNDS,IV=vu.SIZES,$V=vu.SPACING,ut={shadow:f.oneOf(Object.values(CV)),stacking:f.oneOf(Object.values(TV)),borderWidth:yy(Object.values(PV)),borderRadius:yy(Object.values(AV)),background:f.oneOf(Object.values(RV)),size:f.oneOf(Object.values(IV)),spacing:yy(Object.values($V))};function yy(t){return function(e,n,i,r){const o=e[n];if(typeof o>"u")return null;if(typeof o!="string")return new Error(`Invalid ${r} \`${n}\` of type \`${typeof o}\` supplied to \`${i}\`, expected a string.`);const s=o.split(" "),a=s.length;if(a>0&&a<5){for(let l=0;l{n[tM(`${t}-${String(i)}`)]=e[i]}),n}function A0(t,e,n,i){if(!(typeof n!="string"||q5(e)))return n.split(" ").map(r=>{if(r==="auto"||r==="0")return r;if(r==="none")return"0";if(r==="circle")return"100%";if(r==="pill")return"999em";const o=tM(`${i}-${r}`),s=e[o];return Ye(typeof s<"u",`[${t}] '${o}' is an invalid '${i}' value.`),s||"0"}).join(" ").trim()}function Iv(t){if(typeof t!="string")return;const e=t.split(" ");if(e.length===4){var n=[e[3],e[1]];e[1]=n[0],e[3]=n[1]}return e.join(" ")}function LV(t){if(typeof t!="string")return;const e=t.split(" ");if(e.length===2){var n=[e[1],e[0]];e[0]=n[0],e[1]=n[1]}if(e.length===3&&e.push(e[1]),e.length===4){var i=[e[1],e[0],e[3],e[2]];e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3]}return e.join(" ")}const NV=()=>({screenReaderContent:{label:"screenReaderContent",width:"0.0625rem",height:"0.0625rem",margin:"-0.0625rem",padding:0,position:"absolute",top:0,insetInlineStart:0,overflow:"hidden",clip:"rect(0 0 0 0)",border:0}}),MV={as:f.elementType,children:f.node,elementRef:f.func},DV=["as","children","elementRef"],BV=["children","styles"];var wC,kC,Pa;let ji=(wC=de(NV,null),wC(kC=(Pa=class cM extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){const e=this.props,n=e.children,i=e.styles,r=Ie(e,BV),o=oi(cM,r);return C(o,Object.assign({},It(r),{css:i==null?void 0:i.screenReaderContent,ref:this.handleRef}),n)}},Pa.displayName="ScreenReaderContent",Pa.componentId="ScreenReaderContent",Pa.propTypes=MV,Pa.allowedProps=DV,Pa.defaultProps={as:"span",children:null},Pa))||kC);var $v={exports:{}};(function(t,e){function n(l){if(l&&typeof l=="object"){var u=l.which||l.keyCode||l.charCode;u&&(l=u)}if(typeof l=="number")return s[l];var c=String(l),d=i[c.toLowerCase()];if(d)return d;var d=r[c.toLowerCase()];if(d)return d;if(c.length===1)return c.charCodeAt(0)}n.isEventKey=function(u,c){if(u&&typeof u=="object"){var d=u.which||u.keyCode||u.charCode;if(d==null)return!1;if(typeof c=="string"){var h=i[c.toLowerCase()];if(h)return h===d;var h=r[c.toLowerCase()];if(h)return h===d}else if(typeof c=="number")return c===d;return!1}},e=t.exports=n;var i=e.code=e.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},r=e.aliases={windows:91,"⇧":16,"⌥":18,"⌃":17,"⌘":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};/*! + ${i(a,l)}`)}return r.isRequired=SC(r),r}},Aa=t=>typeof t=="string"?t:t.displayName||t.name;function KW(t,e,n){if(t.as==="input"){if(e==="children"&&t.children||t.value==null)return new Error(`Prop \`value\` and not \`children\` must be supplied if \`${n} as="input"\``)}else{if(e==="value"&&t.value!=null)return new Error(`Prop \`children\` and not \`value\` must be supplied unless \`${n} as="input"\``);if(!t.children)return new Error(`Prop \`children\` should be supplied unless \`${n} as="input"\`.`)}return null}function Su(t,e="onChange",n="defaultValue"){return function(i,r,o){const s=t(i,r,o,"prop",r,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");return s||(i[r]&&typeof i[e]!="function"?new Error([`You provided a '${r}' prop without an '${e}' handler on '${o}'. This will render a controlled component. If the component should be uncontrolled and manage its own state, use '${n}'. Otherwise, set '${e}'.`].join("")):null)}}const JW=f.oneOf(["auto","default","none","context-menu","help","pointer","progress","wait","cell","crosshair","text","vertical-text","alias","copy","move","no-drop","not-allowed","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"]),eV=!!(typeof window<"u"&&window.document&&window.document.createElement),Si=eV?f.oneOfType([f.element,f.instanceOf(Element)]):f.element,tV=Object.freeze({radiusSmall:"0.125rem",radiusMedium:"0.25rem",radiusLarge:"0.5rem",widthSmall:"0.0625rem",widthMedium:"0.125rem",widthLarge:"0.25rem",style:"solid"});function nV(t){const e={textDarkest:t.licorice,textDark:t.ash,textLight:t.porcelain,textLightest:t.white,textBrand:t.brand,textLink:t.link,textAlert:t.barney,textInfo:t.brand,textSuccess:t.shamrock,textDanger:t.crimson,textWarning:t.fire},n={backgroundDarkest:t.licorice,backgroundDark:t.ash,backgroundMedium:t.tiara,backgroundLight:t.porcelain,backgroundLightest:t.white,backgroundBrand:t.brand,backgroundBrandSecondary:t.oxford,backgroundAlert:t.barney,backgroundInfo:t.brand,backgroundSuccess:t.shamrock,backgroundDanger:t.crimson,backgroundWarning:t.fire},i={borderLightest:t.white,borderLight:t.porcelain,borderMedium:t.tiara,borderDark:t.ash,borderDarkest:t.licorice,borderBrand:t.brand,borderAlert:t.barney,borderInfo:t.brand,borderSuccess:t.shamrock,borderDanger:t.crimson,borderWarning:t.fire,borderDebug:t.crimson};return{...t,...e,...n,...i,values:t,text:e,background:n,border:i}}const iV={brand:"#0374B5",link:"#0374B5",electric:"#0374B5",shamrock:"#0B874B",barney:"#BF32A4",crimson:"#E0061F",fire:"#FC5E13",licorice:"#2D3B45",oxford:"#394B58",ash:"#6B7780",slate:"#8B969E",tiara:"#C7CDD1",porcelain:"#F5F5F5",white:"#FFFFFF"},rV=Object.freeze(nV(iV)),oV=Object.freeze({duration:"300ms",timing:"ease-in-out"}),sV=Object.freeze({fontFamily:'LatoWeb, Lato, "Helvetica Neue", Helvetica, Arial, sans-serif',fontFamilyMonospace:'Menlo, Consolas, Monaco, "Andale Mono", monospace',fontSizeXSmall:"0.75rem",fontSizeSmall:"0.875rem",fontSizeMedium:"1rem",fontSizeLarge:"1.375rem",fontSizeXLarge:"1.75rem",fontSizeXXLarge:"2.375rem",fontWeightLight:300,fontWeightNormal:400,fontWeightBold:700,lineHeight:1.5,lineHeightFit:1.125,lineHeightCondensed:1.25,lineHeightDouble:2,letterSpacingNormal:0,letterSpacingCondensed:"-0.0625rem",letterSpacingExpanded:"0.0625rem"}),aV=Object.freeze({xxxSmall:"0.125rem",xxSmall:"0.375rem",xSmall:"0.5rem",small:"0.75rem",mediumSmall:"1rem",medium:"1.5rem",large:"2.25rem",xLarge:"3rem",xxLarge:"3.75rem"}),lV=Object.freeze({inputHeightSmall:"1.75rem",inputHeightMedium:"2.375rem",inputHeightLarge:"3rem"}),uV=.0625,Lo={xxSmall:8,xSmall:16,small:30,medium:48,tablet:48,large:62,desktop:64,xLarge:75},Lg=Object.freeze({xxSmall:`${Lo.xxSmall}em`,xSmall:`${Lo.xSmall}em`,small:`${Lo.small}em`,medium:`${Lo.medium}em`,tablet:`${Lo.tablet}em`,large:`${Lo.large}em`,desktop:`${Lo.desktop}em`,xLarge:`${Lo.xLarge}em`,maxWidth:`${Lo.large-uV}em`}),cV=Object.freeze({mediumMin:`min-width: ${Lg.medium}`,largeMin:`min-width: ${Lg.large}`,xLargeMin:`min-width: ${Lg.xLarge}`}),ju=["0 0.0625rem 0.125rem rgba(0, 0, 0, 0.2), 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.1)","0 0.1875rem 0.375rem rgba(0, 0, 0, 0.1), 0 0.1875rem 0.375rem rgba(0, 0, 0, 0.16)","0 0.375rem 0.4375rem rgba(0, 0, 0, 0.1), 0 0.625rem 1.75rem rgba(0, 0, 0, 0.25)"],dV=Object.freeze({depth1:ju[0],depth2:ju[1],depth3:ju[2],resting:ju[0],above:ju[1],topmost:ju[2]}),hV=Object.freeze({topmost:9999,above:1,below:-1,deepest:-9999}),aM={colors:rV,borders:tV,transitions:oV,typography:sV,spacing:aV,forms:lV,media:cV,breakpoints:Lg,shadows:dV,stacking:hV},fV=["key","description"],pV=["key","description","use"],mV="@@themeRegistryDefaultTheme",A0="__GLOBAL_THEME_REGISTRY__";globalThis[A0]?Wk(gV(globalThis[A0])):uM();function lM(){return{currentThemeKey:null,themes:{},registered:[]}}function gV(t){const e=lM();if(typeof t>"u")return e;let n=!0;return Object.keys(e).forEach(i=>{typeof t[i]>"u"&&(n=!1)}),Ge(n,"[theme-registry] Invalid global theme registry!"),t}function eb(){return globalThis[A0]}function Wk(t){globalThis[A0]=t}function uM(){Wk(lM())}function OV(){const t=eb(),e=t.currentThemeKey;if(e)return t.themes[e]}function bV(t,e){const n=eb(),i=n.themes[t];i||t!==mV&&Ge(i,`[theme-registry] Could not find theme: '${t}' in the registry.`),n.currentThemeKey=t;const r=Y5(i,e);return n.themes[t]=r,r}function yV(t){const e=t.key,n=t.description,i=Ie(t,fV),r={key:e,description:n,...i,use(o){bV(e,(o==null?void 0:o.overrides)||{})}};return new Proxy(r,{get(o,s){o.key,o.description,o.use;const a=Ie(o,pV);return s==="variables"?a:Reflect.get(o,s)}})}function vV(t){const e=eb();if(t.key&&e.themes[t.key])return e.themes[t.key];{if(!nM(t))throw Ge(!1,`[theme-registry] The theme provided to 'registerTheme' is not a valid theme object! +For it to be valid some properties have to be present, check out https://instructure.design/#canvas as a reference.`),new Error;const n=yV(t);return e.themes[n.key]=n,e.registered.push(n.key),n}}const Vk={getRegistry:eb,clearRegistry:uM,setRegistry:Wk,registerTheme:vV,getCurrentTheme:OV},ki=aM.colors,SV="canvas",wV={"ic-brand-primary":ki.textBrand,"ic-brand-font-color-dark":ki.textDarkest,"ic-link-color":ki.textLink,"ic-link-decoration":"none","ic-brand-button--primary-bgd":ki.backgroundBrand,"ic-brand-button--primary-text":ki.textLightest,"ic-brand-button--secondary-bgd":ki.backgroundDarkest,"ic-brand-button--secondary-text":ki.textLightest,"ic-brand-global-nav-bgd":ki.backgroundBrandSecondary,"ic-global-nav-link-hover":ki.backgroundDarkest,"ic-brand-global-nav-ic-icon-svg-fill":ki.textLightest,"ic-brand-global-nav-ic-icon-svg-fill--active":ki.textBrand,"ic-brand-global-nav-menu-item__text-color":ki.textLightest,"ic-brand-global-nav-menu-item__text-color--active":ki.textBrand},kV={key:SV,...aM,...wV},jk=Vk.registerTheme(kV),xV=t=>(e={})=>{var n,i;try{if(nM(t))return t}catch{t={}}let r;Object.keys(e).length===0?r=Vk.getCurrentTheme()||jk:r=e;const o=r.key,s=((n=t)===null||n===void 0||(i=n.themeOverrides)===null||i===void 0?void 0:i[o])||t.themeOverrides||{};return Y5(r,t,s)};function Yl({children:t,theme:e={},dir:n,instanceCounterMap:i,as:r}){const o=n||T.useContext(Iv);let s=z.createElement(sM,{instanceCounterMap:i},z.createElement(rW,{theme:xV(e)},z.createElement(Iv.Provider,{value:o},t)));if(n){const a=oi(Yl,{as:r});s=z.createElement(a,{dir:o},s)}return s}Yl.propTypes={children:f.node,theme:f.object,dir:f.oneOf(["ltr","rtl"]),instanceCounterMap:f.instanceOf(Map),as:f.string};Yl.defaultProps={theme:{},as:void 0};const _V=(t,e,n,i,r)=>{const o=e,s=n,a=i,l=a.themeOverride,u=t,c=u.componentOverrides;let d={},h={};return c&&(d=o&&c[o]||s&&c[s]||{}),l&&(typeof l=="function"?h=l(r||{},t):h=l),{...d,...h}},EV=()=>{let t=tW();if(q5(t)){const e=Vk.getCurrentTheme();if(e)return e;t=jk}return t},yy={styles:{},makeStyles:()=>{}},de=GO((t,e,n)=>{const i=t.displayName||t.name,r=T.forwardRef((o,s)=>{const a=EV();o.styles&&Ne(!1,`Manually passing the "styles" property is not allowed on the ${i} component. Using the default styles calculated by the @withStyle decorator instead. +`,o.styles),o.makeStyles&&Ne(!1,`Manually passing the "makeStyles" property is not allowed on the ${i} component. Styles are calculated by the @withStyle decorator.`);const l={...t.defaultProps,...o,...yy};let u=typeof n=="function"?n(a):{};const c=_V(a,i,t.componentId,l,u);u={...u,...c};const d=T.useState(e?e(u,l,{}):{}),h=Qr(d,2),p=h[0],m=h[1],O=y=>{const b=e(u,l,y);KO(b,p)||m(b)};return z.createElement(t,Object.assign({ref:s},o,{makeStyles:O,styles:p,themeOverride:c}))});return Qk(r,t),r.originalType=t.originalType||t,r.propTypes=t.propTypes,r.defaultProps=t.defaultProps,r.allowedProps=t.allowedProps,r.generateComponentTheme=n,t.defaultProps={...t.defaultProps,makeStyles:yy.makeStyles,styles:yy.styles},r}),wu={SHADOW_TYPES:{resting:"resting",above:"above",topmost:"topmost",none:"none"},STACKING_TYPES:{deepest:"deepest",below:"below",resting:"resting",above:"above",topmost:"topmost"},BORDER_WIDTHS:{0:"0",none:"none",small:"small",medium:"medium",large:"large"},BORDER_RADII:{0:"0",none:"none",small:"small",medium:"medium",large:"large",circle:"circle",pill:"pill"},BACKGROUNDS:{default:"default",inverse:"inverse",transparent:"transparent"},SIZES:{xSmall:"x-small",small:"small",medium:"medium",large:"large",xLarge:"x-large"},SPACING:{0:"0",none:"none",auto:"auto",xxxSmall:"xxx-small",xxSmall:"xx-small",xSmall:"x-small",small:"small",mediumSmall:"mediumSmall",medium:"medium",large:"large",xLarge:"x-large",xxLarge:"xx-large"}},CV=wu.SHADOW_TYPES,TV=wu.STACKING_TYPES,PV=wu.BORDER_WIDTHS,AV=wu.BORDER_RADII,RV=wu.BACKGROUNDS,IV=wu.SIZES,$V=wu.SPACING,ct={shadow:f.oneOf(Object.values(CV)),stacking:f.oneOf(Object.values(TV)),borderWidth:vy(Object.values(PV)),borderRadius:vy(Object.values(AV)),background:f.oneOf(Object.values(RV)),size:f.oneOf(Object.values(IV)),spacing:vy(Object.values($V))};function vy(t){return function(e,n,i,r){const o=e[n];if(typeof o>"u")return null;if(typeof o!="string")return new Error(`Invalid ${r} \`${n}\` of type \`${typeof o}\` supplied to \`${i}\`, expected a string.`);const s=o.split(" "),a=s.length;if(a>0&&a<5){for(let l=0;l{n[tM(`${t}-${String(i)}`)]=e[i]}),n}function R0(t,e,n,i){if(!(typeof n!="string"||q5(e)))return n.split(" ").map(r=>{if(r==="auto"||r==="0")return r;if(r==="none")return"0";if(r==="circle")return"100%";if(r==="pill")return"999em";const o=tM(`${i}-${r}`),s=e[o];return Ge(typeof s<"u",`[${t}] '${o}' is an invalid '${i}' value.`),s||"0"}).join(" ").trim()}function $v(t){if(typeof t!="string")return;const e=t.split(" ");if(e.length===4){var n=[e[3],e[1]];e[1]=n[0],e[3]=n[1]}return e.join(" ")}function LV(t){if(typeof t!="string")return;const e=t.split(" ");if(e.length===2){var n=[e[1],e[0]];e[0]=n[0],e[1]=n[1]}if(e.length===3&&e.push(e[1]),e.length===4){var i=[e[1],e[0],e[3],e[2]];e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3]}return e.join(" ")}const NV=()=>({screenReaderContent:{label:"screenReaderContent",width:"0.0625rem",height:"0.0625rem",margin:"-0.0625rem",padding:0,position:"absolute",top:0,insetInlineStart:0,overflow:"hidden",clip:"rect(0 0 0 0)",border:0}}),MV={as:f.elementType,children:f.node,elementRef:f.func},DV=["as","children","elementRef"],BV=["children","styles"];var wC,kC,Ra;let Vi=(wC=de(NV,null),wC(kC=(Ra=class cM extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){const e=this.props,n=e.children,i=e.styles,r=Ie(e,BV),o=oi(cM,r);return C(o,Object.assign({},It(r),{css:i==null?void 0:i.screenReaderContent,ref:this.handleRef}),n)}},Ra.displayName="ScreenReaderContent",Ra.componentId="ScreenReaderContent",Ra.propTypes=MV,Ra.allowedProps=DV,Ra.defaultProps={as:"span",children:null},Ra))||kC);var Lv={exports:{}};(function(t,e){function n(l){if(l&&typeof l=="object"){var u=l.which||l.keyCode||l.charCode;u&&(l=u)}if(typeof l=="number")return s[l];var c=String(l),d=i[c.toLowerCase()];if(d)return d;var d=r[c.toLowerCase()];if(d)return d;if(c.length===1)return c.charCodeAt(0)}n.isEventKey=function(u,c){if(u&&typeof u=="object"){var d=u.which||u.keyCode||u.charCode;if(d==null)return!1;if(typeof c=="string"){var h=i[c.toLowerCase()];if(h)return h===d;var h=r[c.toLowerCase()];if(h)return h===d}else if(typeof c=="number")return c===d;return!1}},e=t.exports=n;var i=e.code=e.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},r=e.aliases={windows:91,"⇧":16,"⌥":18,"⌃":17,"⌘":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};/*! * Programatically add the following - */for(o=97;o<123;o++)i[String.fromCharCode(o)]=o-32;for(var o=48;o<58;o++)i[o-48]=o;for(o=1;o<13;o++)i["f"+o]=o+111;for(o=0;o<10;o++)i["numpad "+o]=o+96;var s=e.names=e.title={};for(o in i)s[i[o]]=o;for(var a in r)i[a]=r[a]})($v,$v.exports);var QV=$v.exports;const lr=ss(QV);let Lv=!0;try{var vy,Sy;Lv=!((vy=process)!==null&&vy!==void 0&&(Sy=vy.env)!==null&&Sy!==void 0&&Sy.ALWAYS_APPEND_UI_TESTABLE_LOCATORS)}catch(t){if(t instanceof ReferenceError)Lv=!1;else throw t}const Le=Lv?()=>t=>t:YO(t=>{const n={attribute:"data-cid",value:t.displayName||t.name},i=`[${n.attribute}~="${n.value}"]`;class r extends t{constructor(...s){super(...s),this._testableUnmounted=void 0,this._locatorTimeout=void 0}componentDidMount(){this._testableUnmounted=!1,super.componentDidMount&&super.componentDidMount(),this.appendLocatorAttribute()}componentDidUpdate(s,a,l){super.componentDidUpdate&&super.componentDidUpdate(s,a,l),this.appendLocatorAttribute()}componentWillUnmount(){this._testableUnmounted=!0,super.componentWillUnmount&&super.componentWillUnmount(),this._locatorTimeout&&clearTimeout(this._locatorTimeout)}appendLocatorAttribute(){this._locatorTimeout=setTimeout(()=>{let s;if(!this._testableUnmounted){try{s=this.DOMNode||it(this)}catch{}if(s){const a=s.getAttribute(n.attribute),l=typeof a=="string"?a.split(/\s+/):[];l.includes(n.value)||l.push(n.value),s.setAttribute(n.attribute,l.join(" "))}}})}}return r.selector=i,r}),dM="getRandomVcryp0123456789bfhijklqsuvwxzABCDEFGHIJKLMNOPQSTUWXYZ",FV=dM.length-1;function zV(t="",e=12){return`u${UV(e-1)}`}function HV(t){const e=[];for(;0{r.forEach(o=>{const s=Array.from(o.addedNodes),a=Array.from(o.removedNodes);this.hideNodes(s.filter(xC)),a.filter(xC).forEach(l=>{l.tagName.toLowerCase()!=="iframe"&&this.restoreNode(l),this.parseIframeBodies(l).forEach(c=>{this.restoreNode(c)})})})};const i=typeof n.liveRegion=="function"?n.liveRegion():n.liveRegion;this._liveRegion=Array.isArray(i)?i:[i],this._contextElement=e,this._options=n}updateElement(e){this._contextElement=e}muteNode(e){e&&e.tagName.toLowerCase()!=="script"&&(["role","aria-label","aria-hidden"].forEach(n=>{const i=e.getAttribute(n);i!==null&&(this._attributes.push([e,n,i]),e.removeAttribute(n))}),this._observer.observe(e,{childList:!0}))}hideNodes(e){e.forEach(n=>{var i;const r=typeof n.getAttribute=="function"&&((i=n.getAttribute("aria-live"))===null||i===void 0?void 0:i.toLowerCase());n&&n.nodeType===1&&n.tagName.toLowerCase()!=="script"&&r!=="assertive"&&r!=="polite"&&this._parents.indexOf(n)===-1&&this._nodes.indexOf(n)===-1&&this._liveRegion.indexOf(n)===-1&&!this._contextElement.contains(n)&&(n.tagName.toLowerCase()!=="iframe"&&this.hideNode(n),this.parseIframeBodies(n).forEach(s=>{this.hideNode(s)}))})}hideNode(e){e.getAttribute("aria-hidden")!=="true"&&(e.setAttribute("aria-hidden","true"),this._nodes.push(e))}restoreNode(e){const n=this._nodes.indexOf(e);n>=0&&(e.removeAttribute("aria-hidden"),this._nodes.splice(n,1))}parseIframeBodies(e){if(!e)return[];let n=[];return e.tagName.toLowerCase()==="iframe"?n.push(e):e.getElementsByTagName&&(n=Array.from(e.getElementsByTagName("iframe"))),n.map(i=>{let r=null;try{r=i.contentDocument.body}catch(o){Ne(!1,`[ui-a11y] could not find a document for iframe: ${o} ${i}`)}return r}).filter(i=>i!==null)}activate(){if(!this._options.shouldContainFocus)return;this._observer=new MutationObserver(this.handleDOMMutation);let e=this._contextElement;for(;e&&e.nodeType===Node.ELEMENT_NODE&&e.tagName.toLowerCase()!=="body";){const n=e.parentElement;n&&(this._parents.push(n),this.muteNode(n),this.hideNodes(Array.prototype.slice.call(n.childNodes))),e=e.parentNode}}deactivate(){this._observer&&(this._observer.disconnect(),this._observer=null),this._nodes.forEach(e=>{e.removeAttribute("aria-hidden")}),this._nodes=[],this._attributes.forEach(e=>{e[0].setAttribute(e[1],e[2]||"")}),this._attributes=[],this._parents=[]}}function VV(t,e,n){const i=it(t),r=Hk(i);if(!r.length){e.preventDefault();return}if(nu(t)){const l=Vc();l&&r.indexOf(l)===-1&&r.push(l)}const o=r[e.shiftKey?0:r.length-1];if(!(xo(o)||xo(i)||!nu(t)))return;e.preventDefault(),r[e.shiftKey?r.length-1:0].focus()}class jV{constructor(e,n){this._options=void 0,this._focusLaterElement=null,this._needToFocus=!1,this._listeners=[],this._raf=[],this._active=!1,this._wasDocumentClick=void 0,this._contextElement=void 0,this.handleKeyDown=i=>{i.keyCode===lr.codes.tab&&VV(this._contextElement,i)},this.handleClick=()=>{this._wasDocumentClick=!0},this.handleWindowBlur=()=>{if(this._wasDocumentClick){this._wasDocumentClick=!1;return}this._needToFocus=!0},this.handleFocus=()=>{if(this._needToFocus){if(this._needToFocus=!1,!this._contextElement)return;this._raf.push(qo(()=>{nu(this._contextElement)||this.focusDefaultElement()}))}},this.handleFirstTabbableKeyDown=i=>{if(i.keyCode===lr.codes.tab&&i.shiftKey){var r,o;(r=(o=this._options).onBlur)===null||r===void 0||r.call(o,i)}},this.handleLastTabbableKeyDown=i=>{if(i.keyCode===lr.codes.tab&&!i.shiftKey){var r,o;(r=(o=this._options).onBlur)===null||r===void 0||r.call(o,i)}},this._contextElement=it(e),this._options=n||{shouldContainFocus:!0,shouldReturnFocus:!0,defaultFocusElement:null},this._options.shouldReturnFocus&&(this._focusLaterElement=Vc(this.doc))}get focused(){return nu(this._contextElement)}get shouldContainFocus(){const e=this._options.shouldContainFocus;return e===!0||Array.isArray(e)&&e.includes("keyboard")}get focusable(){return zk(this._contextElement,()=>!0,!0)||[]}get tabbable(){return Hk(this._contextElement)||[]}get firstTabbable(){return this.tabbable[0]}get lastTabbable(){return this.tabbable.pop()}get firstFocusable(){return this.focusable[0]}get lastFocusable(){return this.focusable.pop()}get doc(){return ko(this._contextElement)}get win(){return jc(this._contextElement)}get defaultFocusElement(){const e=this._options.defaultFocusElement,n=it(typeof e=="function"?e():e);return n&&this._contextElement&&this._contextElement.contains(n)?n:this.firstTabbable?this.firstTabbable:this._contextElement&&this.focusable.includes(this._contextElement)?this._contextElement:null}updateElement(e){this._contextElement=it(e)}focusDefaultElement(){if(this.defaultFocusElement){const e=this.defaultFocusElement,n=e.closest("[data-position-content]");n?this.tryFocusOnPositionedElement(n,e):e.focus()}else this.shouldContainFocus&&(Vc(this.doc)&&Vc(this.doc).blur(),Ye(!0,"\n [KeyboardFocusRegion] No `defaultFocusElement` was provided and\n `shouldContainFocus` was set to `true` or `keyboard`. Focus has\n been moved to the document body instead."))}tryFocusOnPositionedElement(e,n,i=3){if(i<=0)return;const r=e.getBoundingClientRect(),o=document.documentElement.getBoundingClientRect();r.top>o.bottom||r.righto.right?this._raf.push(qo(()=>{this.tryFocusOnPositionedElement(e,n,i-1)})):n.focus()}focus(){this.focused||this._raf.push(qo(()=>{this.focusDefaultElement()}))}blur(){if(this._options.shouldReturnFocus&&this._focusLaterElement){try{this._focusLaterElement.focus()}catch(e){Ye(!1,` + */for(o=97;o<123;o++)i[String.fromCharCode(o)]=o-32;for(var o=48;o<58;o++)i[o-48]=o;for(o=1;o<13;o++)i["f"+o]=o+111;for(o=0;o<10;o++)i["numpad "+o]=o+96;var s=e.names=e.title={};for(o in i)s[i[o]]=o;for(var a in r)i[a]=r[a]})(Lv,Lv.exports);var QV=Lv.exports;const ar=as(QV);let Nv=!0;try{var Sy,wy;Nv=!((Sy=process)!==null&&Sy!==void 0&&(wy=Sy.env)!==null&&wy!==void 0&&wy.ALWAYS_APPEND_UI_TESTABLE_LOCATORS)}catch(t){if(t instanceof ReferenceError)Nv=!1;else throw t}const Le=Nv?()=>t=>t:GO(t=>{const n={attribute:"data-cid",value:t.displayName||t.name},i=`[${n.attribute}~="${n.value}"]`;class r extends t{constructor(...s){super(...s),this._testableUnmounted=void 0,this._locatorTimeout=void 0}componentDidMount(){this._testableUnmounted=!1,super.componentDidMount&&super.componentDidMount(),this.appendLocatorAttribute()}componentDidUpdate(s,a,l){super.componentDidUpdate&&super.componentDidUpdate(s,a,l),this.appendLocatorAttribute()}componentWillUnmount(){this._testableUnmounted=!0,super.componentWillUnmount&&super.componentWillUnmount(),this._locatorTimeout&&clearTimeout(this._locatorTimeout)}appendLocatorAttribute(){this._locatorTimeout=setTimeout(()=>{let s;if(!this._testableUnmounted){try{s=this.DOMNode||rt(this)}catch{}if(s){const a=s.getAttribute(n.attribute),l=typeof a=="string"?a.split(/\s+/):[];l.includes(n.value)||l.push(n.value),s.setAttribute(n.attribute,l.join(" "))}}})}}return r.selector=i,r}),dM="getRandomVcryp0123456789bfhijklqsuvwxzABCDEFGHIJKLMNOPQSTUWXYZ",FV=dM.length-1;function zV(t="",e=12){return`u${UV(e-1)}`}function HV(t){const e=[];for(;0{r.forEach(o=>{const s=Array.from(o.addedNodes),a=Array.from(o.removedNodes);this.hideNodes(s.filter(xC)),a.filter(xC).forEach(l=>{l.tagName.toLowerCase()!=="iframe"&&this.restoreNode(l),this.parseIframeBodies(l).forEach(c=>{this.restoreNode(c)})})})};const i=typeof n.liveRegion=="function"?n.liveRegion():n.liveRegion;this._liveRegion=Array.isArray(i)?i:[i],this._contextElement=e,this._options=n}updateElement(e){this._contextElement=e}muteNode(e){e&&e.tagName.toLowerCase()!=="script"&&(["role","aria-label","aria-hidden"].forEach(n=>{const i=e.getAttribute(n);i!==null&&(this._attributes.push([e,n,i]),e.removeAttribute(n))}),this._observer.observe(e,{childList:!0}))}hideNodes(e){e.forEach(n=>{var i;const r=typeof n.getAttribute=="function"&&((i=n.getAttribute("aria-live"))===null||i===void 0?void 0:i.toLowerCase());n&&n.nodeType===1&&n.tagName.toLowerCase()!=="script"&&r!=="assertive"&&r!=="polite"&&this._parents.indexOf(n)===-1&&this._nodes.indexOf(n)===-1&&this._liveRegion.indexOf(n)===-1&&!this._contextElement.contains(n)&&(n.tagName.toLowerCase()!=="iframe"&&this.hideNode(n),this.parseIframeBodies(n).forEach(s=>{this.hideNode(s)}))})}hideNode(e){e.getAttribute("aria-hidden")!=="true"&&(e.setAttribute("aria-hidden","true"),this._nodes.push(e))}restoreNode(e){const n=this._nodes.indexOf(e);n>=0&&(e.removeAttribute("aria-hidden"),this._nodes.splice(n,1))}parseIframeBodies(e){if(!e)return[];let n=[];return e.tagName.toLowerCase()==="iframe"?n.push(e):e.getElementsByTagName&&(n=Array.from(e.getElementsByTagName("iframe"))),n.map(i=>{let r=null;try{r=i.contentDocument.body}catch(o){Ne(!1,`[ui-a11y] could not find a document for iframe: ${o} ${i}`)}return r}).filter(i=>i!==null)}activate(){if(!this._options.shouldContainFocus)return;this._observer=new MutationObserver(this.handleDOMMutation);let e=this._contextElement;for(;e&&e.nodeType===Node.ELEMENT_NODE&&e.tagName.toLowerCase()!=="body";){const n=e.parentElement;n&&(this._parents.push(n),this.muteNode(n),this.hideNodes(Array.prototype.slice.call(n.childNodes))),e=e.parentNode}}deactivate(){this._observer&&(this._observer.disconnect(),this._observer=null),this._nodes.forEach(e=>{e.removeAttribute("aria-hidden")}),this._nodes=[],this._attributes.forEach(e=>{e[0].setAttribute(e[1],e[2]||"")}),this._attributes=[],this._parents=[]}}function VV(t,e,n){const i=rt(t),r=Uk(i);if(!r.length){e.preventDefault();return}if(ru(t)){const l=jc();l&&r.indexOf(l)===-1&&r.push(l)}const o=r[e.shiftKey?0:r.length-1];if(!(Co(o)||Co(i)||!ru(t)))return;e.preventDefault(),r[e.shiftKey?r.length-1:0].focus()}class jV{constructor(e,n){this._options=void 0,this._focusLaterElement=null,this._needToFocus=!1,this._listeners=[],this._raf=[],this._active=!1,this._wasDocumentClick=void 0,this._contextElement=void 0,this.handleKeyDown=i=>{i.keyCode===ar.codes.tab&&VV(this._contextElement,i)},this.handleClick=()=>{this._wasDocumentClick=!0},this.handleWindowBlur=()=>{if(this._wasDocumentClick){this._wasDocumentClick=!1;return}this._needToFocus=!0},this.handleFocus=()=>{if(this._needToFocus){if(this._needToFocus=!1,!this._contextElement)return;this._raf.push(Yo(()=>{ru(this._contextElement)||this.focusDefaultElement()}))}},this.handleFirstTabbableKeyDown=i=>{if(i.keyCode===ar.codes.tab&&i.shiftKey){var r,o;(r=(o=this._options).onBlur)===null||r===void 0||r.call(o,i)}},this.handleLastTabbableKeyDown=i=>{if(i.keyCode===ar.codes.tab&&!i.shiftKey){var r,o;(r=(o=this._options).onBlur)===null||r===void 0||r.call(o,i)}},this._contextElement=rt(e),this._options=n||{shouldContainFocus:!0,shouldReturnFocus:!0,defaultFocusElement:null},this._options.shouldReturnFocus&&(this._focusLaterElement=jc(this.doc))}get focused(){return ru(this._contextElement)}get shouldContainFocus(){const e=this._options.shouldContainFocus;return e===!0||Array.isArray(e)&&e.includes("keyboard")}get focusable(){return Hk(this._contextElement,()=>!0,!0)||[]}get tabbable(){return Uk(this._contextElement)||[]}get firstTabbable(){return this.tabbable[0]}get lastTabbable(){return this.tabbable.pop()}get firstFocusable(){return this.focusable[0]}get lastFocusable(){return this.focusable.pop()}get doc(){return Eo(this._contextElement)}get win(){return Xc(this._contextElement)}get defaultFocusElement(){const e=this._options.defaultFocusElement,n=rt(typeof e=="function"?e():e);return n&&this._contextElement&&this._contextElement.contains(n)?n:this.firstTabbable?this.firstTabbable:this._contextElement&&this.focusable.includes(this._contextElement)?this._contextElement:null}updateElement(e){this._contextElement=rt(e)}focusDefaultElement(){if(this.defaultFocusElement){const e=this.defaultFocusElement,n=e.closest("[data-position-content]");n?this.tryFocusOnPositionedElement(n,e):e.focus()}else this.shouldContainFocus&&(jc(this.doc)&&jc(this.doc).blur(),Ge(!0,"\n [KeyboardFocusRegion] No `defaultFocusElement` was provided and\n `shouldContainFocus` was set to `true` or `keyboard`. Focus has\n been moved to the document body instead."))}tryFocusOnPositionedElement(e,n,i=3){if(i<=0)return;const r=e.getBoundingClientRect(),o=document.documentElement.getBoundingClientRect();r.top>o.bottom||r.righto.right?this._raf.push(Yo(()=>{this.tryFocusOnPositionedElement(e,n,i-1)})):n.focus()}focus(){this.focused||this._raf.push(Yo(()=>{this.focusDefaultElement()}))}blur(){if(this._options.shouldReturnFocus&&this._focusLaterElement){try{this._focusLaterElement.focus()}catch(e){Ge(!1,` [KeyboardFocusRegion] You tried to return focus to ${this._focusLaterElement} but it is not in the DOM anymore: ${e} - `)}this._focusLaterElement=null}}activate(){const e=this.defaultFocusElement,n=this.shouldContainFocus;this._active||(e||n)&&(n?this._listeners.push(Cr(this.doc,"keydown",this.handleKeyDown)):(this._listeners.push(Cr(this.firstTabbable||e,"keydown",this.handleFirstTabbableKeyDown)),this._listeners.push(Cr(this.lastTabbable||e,"keydown",this.handleLastTabbableKeyDown))),this._listeners.push(Cr(this.doc,"click",this.handleClick,!0)),this._listeners.push(Cr(this.win,"blur",this.handleWindowBlur,!1)),this._listeners.push(Cr(this.doc,"focus",this.handleFocus,!0)),this._active=!0)}deactivate(){this._active&&(this._listeners.forEach(e=>{e.remove()}),this._listeners=[],this._raf.forEach(e=>e.cancel()),this._raf=[],this._active=!1)}}class hM{constructor(e,n){this._contextElement=null,this._options=void 0,this._screenReaderFocusRegion=void 0,this._keyboardFocusRegion=void 0,this._id=void 0,this._listeners=[],this._active=!1,this._documentClickTarget=null,this._contextContainsTarget=!1,this.handleDismiss=(i,r)=>{var o,s;(o=(s=this._options).onDismiss)===null||o===void 0||o.call(s,i,r)},this.captureDocumentMousedown=i=>{this._documentClickTarget=i.target,this._contextContainsTarget=cd(this._contextElement,this._documentClickTarget)},this.handleDocumentClick=i=>{this._options.shouldCloseOnDocumentClick&&i.button===0&&i.detail>0&&!this._contextContainsTarget&&this.handleDismiss(i,!0)},this.handleFrameClick=(i,r)=>{cd(this._contextElement,r)||this.handleDismiss(i,!0)},this.handleKeyUp=i=>{if(this._options.shouldCloseOnEscape&&i.keyCode===lr.codes.esc&&!i.defaultPrevented){var r;const o=(r=ko(this._contextElement))===null||r===void 0?void 0:r.activeElement;(o==null?void 0:o.tagName)==="INPUT"&&o.type==="file"?o.blur():this.handleDismiss(i)}},this._options=n||{shouldCloseOnDocumentClick:!0,shouldCloseOnEscape:!0},this._contextElement=e,this._screenReaderFocusRegion=new WV(e,n),this._keyboardFocusRegion=new jV(e,n),this._id=zV()}updateElement(e,n){this._contextElement=e,n&&(this._options=n),this._keyboardFocusRegion&&this._keyboardFocusRegion.updateElement(e),this._screenReaderFocusRegion&&this._screenReaderFocusRegion.updateElement(e)}get id(){return this._id}get focused(){return this._active}get keyboardFocusable(){return(Hk(this._contextElement)||[]).length>0}activate(){if(!this._active){const e=ko(this._contextElement);this._keyboardFocusRegion.activate(),this._screenReaderFocusRegion.activate(),this._options.shouldCloseOnDocumentClick&&(this._listeners.push(Cr(e,"mousedown",this.captureDocumentMousedown)),this._listeners.push(Cr(e,"click",this.handleDocumentClick)),Array.from(e.getElementsByTagName("iframe")).forEach(n=>{const i=n.contentDocument;i&&this._listeners.push(Cr(i,"mouseup",r=>{this.handleFrameClick(r,n)}))})),this._options.shouldCloseOnEscape&&this._listeners.push(Cr(e,"keyup",this.handleKeyUp)),this._active=!0}}deactivate({keyboard:e=!0}={}){this._active&&(this._listeners.forEach(n=>{n.remove()}),this._listeners=[],e&&this._keyboardFocusRegion.deactivate(),this._screenReaderFocusRegion.deactivate(),this._active=!1)}focus(){Ye(this._active,"[FocusRegion] Cannot call '.focus()' on a region that is not currently active."),this._keyboardFocusRegion.focus()}blur(){Ye(!this._active,"[FocusRegion] Cannot call '.blur()' on a region that is currently active."),this._keyboardFocusRegion.blur()}}var _o;let ns=[];class Jn{}_o=Jn;Jn.focusRegion=(t,e={})=>{let n;if(typeof e=="string"?n=_o.getEntry(t,e):n=_o.addEntry(t,e),n&&n.region&&typeof n.region.focus=="function")return n.region.focus(),n.region;Ye(!1,`[FocusRegionManager] Could not focus region with element: ${t}`)};Jn.activateRegion=(t,e)=>_o.addEntry(t,e).region;Jn.getActiveEntry=()=>ns.find(({region:t})=>t.focused);Jn.findEntry=(t,e)=>{let n;return e?n=ns.findIndex(i=>i.id===e):n=ns.findIndex(i=>i.element===t),n};Jn.getEntry=(t,e)=>ns[_o.findEntry(t,e)];Jn.addEntry=(t,e={})=>{const n=new hM(t,e),i=_o.getActiveEntry(),r=n.keyboardFocusable;ns.forEach(({region:s})=>{if(s){const a=s.focused&&!r?{keyboard:!1}:void 0;s.deactivate(a)}}),n.activate(),e.shouldFocusOnOpen&&n.focus();const o={id:n.id,element:t,region:n,children:[],parent:i};return ns.push(o),i&&i.children.push(o),o};Jn.removeEntry=(t,e)=>{const n=_o.findEntry(t,e),i=ns[n];return n>-1&&ns.splice(n,1),i};Jn.isFocused=(t,e)=>{const n=_o.getActiveEntry();return e?n&&n.region&&n.id===e:n&&n.region&&n.element===t};Jn.clearEntries=()=>{ns=[]};Jn.blurRegion=(t,e)=>{const n=_o.removeEntry(t,e);if(n){const i=n.children,r=n.region,o=n.parent;r&&r.deactivate(),i&&i.forEach(({id:s,element:a})=>{const l=_o.removeEntry(a,s);l&&l.region&&l.region.deactivate()}),o&&o.region&&o.region.activate(),r&&r.blur()}};function eb(t){let e=!1;return z.Children.forEach(t,n=>{n&&!Me(n,[ji])&&(e=!0)}),e}const XV=({borderRadius:t,borderWidth:e,dir:n,theme:i})=>{const r=n===KO.rtl;return{borderRadius:A0("View",i,r?LV(t):t,"borderRadius"),borderWidth:A0("View",i,r?Iv(e):e,"borderWidth")}},ZV=({margin:t,padding:e,dir:n,theme:i})=>{const r=n===KO.rtl;return{margin:A0("View",i,r?Iv(t):t,"margin"),padding:A0("View",i,r?Iv(e):e,"padding")}},qV=({insetBlockStart:t,insetBlockEnd:e,insetInlineStart:n,insetInlineEnd:i,dir:r})=>{const o=r===KO.rtl;return{...{top:t,insetBlockStart:t},...{bottom:e,insetBlockEnd:e},...{left:o?i:n,right:o?n:i}}},YV=({cursor:t,style:e})=>{const n=us(e||{},{},["top","left","position","display","transform","overflow","minWidth","minHeight","filter","flexBasis","backgroundImage","pointerEvents"]);return t&&(n.cursor=t),n},GV=(t,e)=>typeof e!="string"?!1:e.trim().split(" ").every(n=>t===n),KV=t=>{const e="focusRing--radius",n=(t||"").trim().split(" ")[0];if(GV(n,t)){const i=r=>`${r.charAt(0).toUpperCase()}${r.slice(1)}`;if(["small","medium","large"].includes(n))return`${e}${i(n)}`;if(["circle","pill"].includes(n))return`${e}Inherit`}return`${e}None`},JV=t=>{const e=t.position,n=t.display,i=t.focusPosition,r=t.withFocusOutline;return typeof r>"u"||r&&(Ye(n==="inline"||e==="relative","[View] the focus outline will only show if the `position` prop is `relative`."),Ye(n!=="inline"||i==="inset","[View] when display is set to `inline` the focus outline will only show if `focusPosition` is set to `inset`.")),r},ej=t=>{const e=t.borderWidth;return e&&e!=="0"&&e!=="none"},tj=(t,e)=>{const n=t.focusColor,i=t.focusPosition,r=t.position,o=t.shouldAnimateFocus,s=t.borderRadius,a=JV(t),l=typeof a>"u",u={offset:{top:`calc(${e.focusOutlineOffset} * -1)`,left:`calc(${e.focusOutlineOffset} * -1)`,right:`calc(${e.focusOutlineOffset} * -1)`,bottom:`calc(${e.focusOutlineOffset}* -1)`},inset:{top:`calc(${e.focusOutlineInset} * -1)`,left:`calc(${e.focusOutlineInset} * -1)`,right:`calc(${e.focusOutlineInset} * -1)`,bottom:`calc(${e.focusOutlineInset} * -1)`}},c={info:e.focusColorInfo,inverse:e.focusColorInverse,success:e.focusColorSuccess,danger:e.focusColorDanger};if(r==="relative"){const d=KV(s),h={"focusRing--radiusInherit":"inherit","focusRing--radiusNone":0},p={offset:{"focusRing--radiusSmall":{borderRadius:`calc(${e.borderRadiusSmall} + (${e.focusOutlineOffset} - ${e.focusOutlineWidth}))`},"focusRing--radiusMedium":{borderRadius:`calc(${e.borderRadiusMedium} + (${e.focusOutlineOffset} - ${e.focusOutlineWidth}))`},"focusRing--radiusLarge":{borderRadius:`calc(${e.borderRadiusLarge} + (${e.focusOutlineOffset} - ${e.focusOutlineWidth}))`}},inset:{"focusRing--radiusSmall":{borderRadius:`calc(${e.borderRadiusSmall} - (${e.focusOutlineInset} + ${e.focusOutlineWidth}))`},"focusRing--radiusMedium":{borderRadius:`calc(${e.borderRadiusMedium} - (${e.focusOutlineInset} + ${e.focusOutlineWidth}))`},"focusRing--radiusLarge":{borderRadius:`calc(${e.borderRadiusLarge} - (${e.focusOutlineInset} + ${e.focusOutlineWidth}))`}}};return{"&::before":{pointerEvents:"none",content:'""',position:"absolute",borderStyle:e.focusOutlineStyle,borderWidth:e.focusOutlineWidth,borderColor:c[n],opacity:0,borderRadius:h[d],...p[i][d],...u[i],...o?{transition:"all 0.2s",transform:"scale(0.95)"}:{},...a?{opacity:1,transform:"scale(1)"}:{}},"&:focus":{outline:"none","&::before":{...l?{opacity:1,transform:"scale(1)"}:{}}}}}return{"&::before":{borderStyle:"none"},outlineStyle:"none",outlineColor:c[n],...a?{outlineWidth:e.focusOutlineWidth,outlineStyle:e.focusOutlineStyle}:{},"&:focus":{...l?{outlineWidth:e.focusOutlineWidth,outlineStyle:e.focusOutlineStyle}:{}}}},nj=(t,e)=>{const n=e.borderRadius,i=e.borderWidth,r=e.margin,o=e.padding,s=e.position,a=e.display,l=e.focusPosition,u=e.textAlign,c=e.borderColor,d=e.background,h=e.stacking,p=e.shadow,m=e.overflowY,O=e.overflowX,y=e.overscrollBehavior,b=e.insetBlockEnd,v=e.insetBlockStart,S=e.insetInlineEnd,k=e.insetInlineStart,x=e.width,_=e.height,w=e.minWidth,D=e.minHeight,W=e.maxWidth,I=e.maxHeight,V=e.withVisualDebug,B=e.dir,H=XV({theme:t,borderRadius:n,borderWidth:i,dir:B}),K=ZV({margin:r,padding:o,theme:t,dir:B}),oe=qV({dir:B,insetBlockEnd:b,insetBlockStart:v,insetInlineEnd:S,insetInlineStart:k}),xe=s==="relative"||a==="inline"&&l==="inset",Oe={inline:{label:"view--inline",display:"inline"},block:{label:"view--block",display:"block"},"inline-block":{label:"view--inlineBlock",display:"inline-block",verticalAlign:"middle"},flex:{label:"view--flex",display:"flex"},"inline-flex":{label:"view--inlineFlex",display:"inline-flex",verticalAlign:"middle"},auto:{}},X={start:{textAlign:"start"},center:{textAlign:"center"},end:{textAlign:"end"}},ae={transparent:{borderColor:t.borderColorTransparent},primary:{borderColor:t.borderColorPrimary},secondary:{borderColor:t.borderColorSecondary},brand:{borderColor:t.borderColorBrand},info:{borderColor:t.borderColorInfo},success:{borderColor:t.borderColorSuccess},warning:{borderColor:t.borderColorWarning},alert:{borderColor:t.borderColorAlert},danger:{borderColor:t.borderColorDanger}},A={transparent:{color:t.color,background:"none"},primary:{color:t.color,background:t.backgroundPrimary},secondary:{color:t.color,background:t.backgroundSecondary},"primary-inverse":{color:t.colorPrimaryInverse,background:t.backgroundPrimaryInverse},brand:{color:t.colorPrimaryInverse,background:t.backgroundBrand},info:{color:t.colorPrimaryInverse,background:t.backgroundInfo},alert:{color:t.colorPrimaryInverse,background:t.backgroundAlert},success:{color:t.colorPrimaryInverse,background:t.backgroundSuccess},danger:{color:t.colorPrimaryInverse,background:t.backgroundDanger},warning:{color:t.colorPrimaryInverse,background:t.backgroundWarning}},be={topmost:{zIndex:t.stackingTopmost},above:{zIndex:t.stackingAbove},resting:{},below:{zIndex:t.stackingBelow},deepest:{zIndex:t.stackingDeepest}},Se={topmost:{boxShadow:t.shadowTopmost},resting:{boxShadow:t.shadowResting},above:{boxShadow:t.shadowAbove},none:{}},L=tj(e,t);return{view:{label:"view",boxSizing:"border-box",fontFamily:t.fontFamily,maxWidth:"100%",overflow:"visible",...Oe[a],...d&&A[d],...h&&be[h],...p&&Se[p],...u&&X[u],overflowX:O&&O!=="visible"?O:"",overflowY:m&&m!=="visible"?m:"",position:s!=="static"?s:"",overscrollBehavior:y||"auto",...V?{outline:`0.0625rem dashed ${t.debugOutlineColor}`}:{},...ej(e)?{borderStyle:t.borderStyle,...ae[c]}:{},...xe?L:{}},inlineStyles:{"&&&&&&&&&&":{...K,...H,...oe,width:x,height:_,minWidth:w,minHeight:D,maxWidth:W,maxHeight:I,...YV(e)}}}},ij=t=>{const e=t.colors,n=t.typography,i=t.borders,r=t.breakpoints,o=t.spacing,s=t.shadows,a=t.stacking,l=t.key,u={canvas:{color:t["ic-brand-font-color-dark"],focusColorInfo:t["ic-brand-primary"],backgroundBrand:t["ic-brand-primary"],backgroundInfo:t["ic-brand-primary"],borderColorBrand:t["ic-brand-primary"],borderColorInfo:t["ic-brand-primary"]}};return{...{fontFamily:n==null?void 0:n.fontFamily,color:e==null?void 0:e.textDarkest,colorPrimaryInverse:e==null?void 0:e.textLightest,borderColorPrimary:e==null?void 0:e.borderMedium,borderColorSecondary:e==null?void 0:e.borderDark,borderColorSuccess:e==null?void 0:e.borderSuccess,borderColorBrand:e==null?void 0:e.borderBrand,borderColorInfo:e==null?void 0:e.borderInfo,borderColorAlert:e==null?void 0:e.borderAlert,borderColorWarning:e==null?void 0:e.borderWarning,borderColorDanger:e==null?void 0:e.borderDanger,borderColorTransparent:"transparent",debugOutlineColor:e==null?void 0:e.borderDebug,backgroundPrimary:e==null?void 0:e.backgroundLightest,backgroundSecondary:e==null?void 0:e.backgroundLight,backgroundPrimaryInverse:e==null?void 0:e.backgroundDarkest,backgroundBrand:e==null?void 0:e.backgroundBrand,backgroundInfo:e==null?void 0:e.backgroundInfo,backgroundAlert:e==null?void 0:e.backgroundAlert,backgroundSuccess:e==null?void 0:e.backgroundSuccess,backgroundDanger:e==null?void 0:e.backgroundDanger,backgroundWarning:e==null?void 0:e.backgroundWarning,arrowSize:"0.5rem",focusOutlineStyle:i==null?void 0:i.style,focusOutlineWidth:i==null?void 0:i.widthMedium,focusOutlineOffset:"0.3125rem",focusOutlineInset:"0rem",focusColorInfo:e==null?void 0:e.borderInfo,focusColorDanger:e==null?void 0:e.borderDanger,focusColorSuccess:e==null?void 0:e.borderSuccess,focusColorInverse:e==null?void 0:e.borderLightest,xSmallMaxWidth:r==null?void 0:r.xSmall,smallMaxWidth:r==null?void 0:r.small,mediumMaxWidth:r==null?void 0:r.medium,largeMaxWidth:r==null?void 0:r.large,...xh("margin",o),...xh("padding",o),...xh("shadow",s),...xh("stacking",a),...xh("border",i)},...u[l]}},rj={as:f.elementType,elementRef:f.func,display:f.oneOf(["auto","inline","block","inline-block","flex","inline-flex"]),overflowX:f.oneOf(["auto","hidden","visible"]),overflowY:f.oneOf(["auto","hidden","visible"]),margin:ut.spacing,padding:ut.spacing,height:f.oneOfType([f.string,f.number]),width:f.oneOfType([f.string,f.number]),maxHeight:f.oneOfType([f.string,f.number]),maxWidth:f.oneOfType([f.string,f.number]),minHeight:f.oneOfType([f.string,f.number]),minWidth:f.oneOfType([f.string,f.number]),children:f.node,textAlign:f.oneOf(["start","center","end"]),borderWidth:ut.borderWidth,borderRadius:ut.borderRadius,borderColor:f.oneOf(["transparent","primary","secondary","brand","info","success","warning","alert","danger"]),background:f.oneOf(["transparent","primary","secondary","primary-inverse","brand","info","alert","success","danger","warning"]),shadow:ut.shadow,stacking:ut.stacking,cursor:JW,position:f.oneOf(["static","absolute","relative","sticky","fixed"]),insetInlineStart:f.string,insetInlineEnd:f.string,insetBlockStart:f.string,insetBlockEnd:f.string,withFocusOutline:f.bool,focusPosition:f.oneOf(["offset","inset"]),focusColor:f.oneOf(["info","inverse","success","danger"]),shouldAnimateFocus:f.bool,withVisualDebug:f.bool,dir:f.oneOf(Object.values(Mr.DIRECTION)),overscrollBehavior:f.oneOf(["auto","contain","none"])},oj=["as","background","borderColor","borderRadius","borderWidth","children","cursor","dir","display","elementRef","focusColor","focusPosition","height","insetBlockEnd","insetBlockStart","insetInlineEnd","insetInlineStart","margin","maxHeight","maxWidth","minHeight","minWidth","overflowX","overflowY","overscrollBehavior","padding","position","shadow","shouldAnimateFocus","stacking","textAlign","width","withFocusOutline","withVisualDebug"],sj=["children","textAlign","background","display","withVisualDebug","width","height","minWidth","minHeight","maxWidth","maxHeight","overflowX","overflowY","stacking","shadow","position","focusPosition","focusColor","shouldAnimateFocus","borderColor","className","overscrollBehavior","styles","makeStyles"];var _C,EC,fm,Lo;let ye=(_C=Mr(),EC=de(nj,ij),_C(fm=EC(fm=(Lo=class fM extends T.Component{get _element(){return this.ref}constructor(e){super(e),this.spanMarginVerified=void 0,this.ref=null,this.handleElementRef=n=>{typeof this.props.elementRef=="function"&&this.props.elementRef(n),this.ref=n},this.spanMarginVerified=!1}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){const e=this.props,n=e.children;e.textAlign,e.background,e.display,e.withVisualDebug,e.width,e.height,e.minWidth,e.minHeight,e.maxWidth,e.maxHeight,e.overflowX,e.overflowY,e.stacking,e.shadow,e.position,e.focusPosition,e.focusColor,e.shouldAnimateFocus,e.borderColor;const i=e.className;e.overscrollBehavior;const r=e.styles;e.makeStyles;const o=Ie(e,sj),s=oi(fM,this.props);return C(s,Object.assign({},It(o),{className:i,css:[r==null?void 0:r.view,r==null?void 0:r.inlineStyles],ref:this.handleElementRef}),n)}},Lo.displayName="View",Lo.componentId="View",Lo.allowedProps=oj,Lo.propTypes=rj,Lo.defaultProps={display:"auto",overflowX:"visible",overflowY:"visible",withVisualDebug:!1,borderColor:"primary",position:"static",focusPosition:"offset",focusColor:"info",shouldAnimateFocus:!0,overscrollBehavior:"auto"},Lo.omitViewProps=(t,e)=>{const n=[...Lo.allowedProps,"styles","makeStyles","themeOverride"];let i=!0;try{i=!1}catch(r){if(r instanceof ReferenceError)i=!1;else throw r}return i&&Object.keys(us(t,n)).forEach(r=>{Ye(!1,`[${e.name}] prop '${r}' is not allowed.`)}),Re(t,n)},Lo))||fm)||fm);function tb(t,e=0,n={}){let i,r,o,s,a=0,l=[];if(typeof t!="function")throw new TypeError("Expected a function");const u=!!n.leading,c="maxWait"in n,d="trailing"in n?!!n.trailing:!0,h=c?Math.max(+!n.maxWait||0,e):0;function p(w){const D=i,W=r;return i=void 0,r=void 0,a=w,o=t.apply(W,D),o}function m(w){return a=w,l.push(setTimeout(b,e)),u?p(w):o}function O(w){const D=w-s,W=w-a,I=e-D;return c?Math.min(I,h-W):I}function y(w){if(typeof s>"u")return!0;const D=w-s,W=w-a;return D>=e||D<0||c&&W>=h}function b(){const w=Date.now();y(w)?v(w):l.push(setTimeout(b,O(w)))}function v(w){return x(),d&&i?p(w):(i=r=void 0,o)}function S(){x(),a=0,i=s=r=void 0}function k(){return l.length===0?o:v(Date.now())}function x(){l.forEach(w=>clearTimeout(w)),l=[]}function _(...w){const D=Date.now(),W=y(D);if(i=w,r=this,s=D,W){if(l.length===0)return m(s);if(c)return l.push(setTimeout(b,e)),p(s)}return l.length===0&&l.push(setTimeout(b,e)),o}return _.cancel=S,_.flush=k,_}const aj={open:f.bool,onOpen:f.func,onClose:f.func,mountNode:f.oneOfType([wi,f.func]),insertAt:f.oneOf(["bottom","top"]),children:f.node,elementRef:f.func,dir:f.oneOf(Object.values(Mr.DIRECTION))},lj=["open","onOpen","onClose","mountNode","insertAt","children","elementRef","dir"],uj=["open","insertAt","onOpen","onClose","mountNode","children","elementRef","dir"];var CC,TC,ju;let pM=(CC=Mr(),CC(TC=(ju=class extends T.Component{constructor(e){super(e),this.DOMNode=null,this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,this.DOMNode=n,typeof i=="function"&&i(n)},ln&&(this.state={mountNode:this.findMountNode(e)})}componentDidMount(){ln&&this.props.open&&z.Children.count(this.props.children)>0&&this.forceUpdate(()=>{this.props.open&&typeof this.props.onOpen=="function"&&this.props.onOpen(this.DOMNode)})}componentDidUpdate(e){if(!ln)return;const n=this.findMountNode(this.props);n!==this.state.mountNode&&this.setState({mountNode:n}),this.props.open&&!e.open&&typeof this.props.onOpen=="function"&&this.props.onOpen(this.DOMNode),!this.props.open&&e.open&&typeof this.props.onClose=="function"&&this.props.onClose()}componentWillUnmount(){ln&&(this.removeNode(),this.props.open&&typeof this.props.onClose=="function"&&this.props.onClose())}removeNode(){this.DOMNode&&this.DOMNode.parentNode&&typeof this.DOMNode.parentNode.removeChild=="function"&&(this.DOMNode.parentNode.removeChild(this.DOMNode),this.handleRef(null))}insertNode(){const e=this.props;e.open;const n=e.insertAt;e.onOpen,e.onClose,e.mountNode,e.children,e.elementRef;const i=e.dir,r=Ie(e,uj);if(!this.DOMNode){const o=document.createElement("span"),s={...It(r),dir:i};Object.keys(s).forEach(a=>{o.setAttribute(a,s[a])}),this.handleRef(o)}return this.DOMNode&&this.DOMNode.parentNode!==this.state.mountNode&&(n==="bottom"?this.state.mountNode.appendChild(this.DOMNode):this.state.mountNode.insertBefore(this.DOMNode,this.state.mountNode.firstChild)),this.DOMNode}findMountNode(e){let n;return typeof e.mountNode=="function"?n=e.mountNode():e.mountNode&&(n=e.mountNode),(!n||!n.nodeName)&&(n=document.body),n}get node(){return this.DOMNode}render(){const e=this.props,n=e.children,i=e.open;return!ln&&i?n:i&&z.Children.count(n)>0?Ep.createPortal(n,this.insertNode()):null}},ju.displayName="Portal",ju.propTypes=aj,ju.allowedProps=lj,ju.defaultProps={open:!1,insertAt:"bottom",onOpen:()=>{},onClose:()=>{},mountNode:null,children:null,elementRef:()=>{}},ju))||TC);const cj=(t,e)=>({position:{label:"position",display:e.containerDisplay},zIndex:t.zIndex}),dj=t=>{const e=t.stacking;return{...{zIndex:e==null?void 0:e.topmost}}},hj=["top","bottom","start","end","top start","top center","top end","top stretch","bottom start","bottom center","bottom end","bottom stretch","start top","start center","start bottom","start stretch","end top","end center","end bottom","end stretch","center start","center end","offscreen"],Kt={placement:f.oneOf(hj),mountNode:f.oneOfType([wi,f.func]),constrain:f.oneOfType([wi,f.func,f.oneOf(["window","scroll-parent","parent","none"])])},mM={center:"center",start:"end",end:"start",top:"bottom",bottom:"top",stretch:"stretch",offscreen:"offscreen"},fj={renderTarget:f.oneOfType([f.node,f.func]),target:f.oneOfType([wi,f.func]),placement:Kt.placement,mountNode:Kt.mountNode,insertAt:f.oneOf(["bottom","top"]),constrain:Kt.constrain,offsetX:f.oneOfType([f.string,f.number]),offsetY:f.oneOfType([f.string,f.number]),id:f.string,shouldTrackPosition:f.bool,shouldPositionOverTarget:f.bool,onPositionChanged:f.func,onPositioned:f.func,children:f.node,containerDisplay:f.oneOf(["inline-block","block"]),elementRef:f.func},pj=["renderTarget","target","placement","mountNode","insertAt","constrain","offsetX","offsetY","id","shouldTrackPosition","shouldPositionOverTarget","onPositionChanged","onPositioned","children","containerDisplay","elementRef"];function gM(t,e,n){const i=Array.isArray(t)?t:t.split(" "),r=Qr(i,2),o=r[0],s=r[1],a=e(o,s).filter(l=>l);return n?a.join(n):a}function OM(t,e){return gM(t,(n,i)=>[mM[n],i],e)}function mj(t,e,n={}){if(!t||n.placement==="offscreen"){const r=!n.container&&t;return{placement:n.placement,style:{left:"-9999em",overflow:"hidden",position:"absolute",top:0,display:r?"none":null}}}const i=new gj(t,e,n);return{placement:i.placement,style:i.style}}class PC{constructor(e,n,i={top:0,left:0}){this.node=void 0,this.placement=void 0,this.rect=void 0,this._offset=void 0,this.node=it(e),typeof n=="string"?this.placement=bM(n):Array.isArray(n)?this.placement=n:this.placement=["bottom","center"],this.rect=jt(this.node),this._offset=AC(i,this.size,this.node)}get width(){return this.rect.width}get height(){return this.rect.height}get size(){return{width:this.width,height:this.height}}get position(){return{top:this.rect.top,left:this.rect.left}}get hasVerticalPlacement(){return["top","bottom"].indexOf(this.placement[0])>=0}get hasHorizontalPlacement(){return["start","end"].indexOf(this.placement[0])>=0}get shouldStretchVertically(){return this.placement[1]==="stretch"&&this.hasVerticalPlacement}get shouldStretchHorizontally(){return this.placement[1]==="stretch"&&this.hasHorizontalPlacement}get mirroredPlacement(){return OM(this.placement)}calculateOffset(e){const n={top:0,start:0,center:"50%",bottom:"100%",end:"100%",stretch:0};let i=Qr(e,2),r=i[0],o=i[1];if(["start","end"].indexOf(r)>=0){var s=[o,r];r=s[0],o=s[1]}let a=0,l=0;return typeof n[r]<"u"&&(a=n[r]),typeof n[o]<"u"&&(l=n[o]),Lg([AC({top:a,left:l},this.size,this.node),Oj(this._offset,this.placement)])}get scrollParentsOffset(){const e=eM(this.node);let n=0,i=0;for(let r=1;r1?0:jt(n==null?void 0:n.documentElement).top,r=0,o=0;for(let s=1;sd.bottom?c-d.bottom:0,left:ad.right?l-d.right:0}}constrainTo(e){if(!e)return;const n=this.overflow(e),i={top:n.top>0,bottom:n.bottom>0,left:n.left>0,right:n.right>0};this.element.hasVerticalPlacement?(this.element.placement[1]!=="stretch"&&(i.left&&i.right?(this.element.placement[1]="center",this.target.placement[1]="center"):i.left?(this.element.placement[1]="start",this.target.placement[1]="start"):i.right&&(this.element.placement[1]="end",this.target.placement[1]="end")),i.top&&i.bottom?n.bottomn.top&&(this.element.placement[0]="top",this.target.placement[0]="bottom"):i.top?(this.element.placement[0]="bottom",this.target.placement[0]="top"):i.bottom&&(this.element.placement[0]="top",this.target.placement[0]="bottom")):this.element.hasHorizontalPlacement&&(i.top&&i.bottom?(this.element.placement[1]="center",this.target.placement[1]="center"):i.top?(this.element.placement[1]="top",this.target.placement[1]="top"):i.bottom&&(this.element.placement[1]="bottom",this.target.placement[1]="bottom"),i.left&&i.right?n.left>n.right?(this.element.placement[0]="end",this.target.placement[0]="start"):n.left({top:e.top+n.top,left:e.left+n.left}),{top:0,left:0})}function Oj(t,e){let n=t.top,i=t.left;return typeof i=="string"&&(i=parseFloat(i)),typeof n=="string"&&(n=parseFloat(n)),e[0]==="bottom"&&(n=0-n),e[0]==="end"&&(i=0-i),{top:n,left:i}}function AC(t,e,n){let i=t.left,r=t.top;return typeof i=="string"&&i.indexOf("%")!==-1&&(i=parseFloat(i)/100*e.width),typeof r=="string"&&r.indexOf("%")!==-1&&(r=parseFloat(r)/100*e.height),{top:r,left:i}}function bj(t){let e=Qr(t,2),n=e[0],i=e[1];if(n==="center"||n==="stretch"){var r=[i,n];n=r[0],i=r[1]}return[n,i]}function bM(t){let e=t.split(" ");return e.length===1&&(e=[t,"center"]),bj(e)}function yj(t){return t.join(" ")}var RC,IC,$C,Xu,Kr;let LC=(RC=zt(),IC=de(cj,dj),$C=Le(),RC(Xu=IC(Xu=$C(Xu=(Kr=class mc extends T.Component{constructor(e){super(e),this.ref=null,this._id=void 0,this._timeouts=[],this._listener=null,this._content=void 0,this._target=void 0,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.handlePortalOpen=()=>{this.position(),this.props.shouldTrackPosition&&this.startTracking(),this._timeouts.push(setTimeout(()=>{this.state.positioned&&typeof this.props.onPositioned=="function"&&this.props.onPositioned({top:this.state.style.top,left:this.state.style.left,placement:this.state.placement})},0))},this.position=()=>{this.setState({positioned:!0,...this.calculatePosition(this.props)})},this.state={positioned:!1,...this.calculatePosition(e)},this.position=tb(this.position,0,{leading:!1,trailing:!0}),this._id=this.props.id||e.deterministicId()}shouldComponentUpdate(e,n,i){return!GO(this.state,n)||!T0(this.props,e)||!T0(this.context,i)}componentDidMount(){var e,n;this.toggleLocatorAttributes(!0),(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(e,n){var i,r;this.position(),this.toggleLocatorAttributes(!0),this.props.shouldTrackPosition!==e.shouldTrackPosition&&(this.props.shouldTrackPosition?this.startTracking():this.stopTracking());const o=this.state,s=o.style,a=o.placement;s&&n.style&&(a!==n.placement||s.top!==n.style.top||s.left!==n.style.left)&&typeof this.props.onPositionChanged=="function"&&this.props.onPositionChanged({top:s.top,left:s.left,placement:a}),(i=(r=this.props).makeStyles)===null||i===void 0||i.call(r)}componentWillUnmount(){this.position.cancel(),this.stopTracking(),this._timeouts.forEach(e=>clearTimeout(e)),this.toggleLocatorAttributes(!1)}toggleLocatorAttributes(e){this.toggleLocatorAttribute(it(this._content),mc.contentLocatorAttribute,e),this.toggleLocatorAttribute(it(this._target),mc.targetLocatorAttribute,e)}toggleLocatorAttribute(e,n,i){e&&e.hasAttribute&&(i&&!e.hasAttribute(n)&&e.setAttribute(n,this._id),!i&&e.hasAttribute(n)&&e.removeAttribute(n))}calculatePosition(e){return mj(this._content,this._target,{placement:e.placement,offsetX:e.offsetX,offsetY:e.offsetY,constrain:e.constrain,container:e.mountNode,over:e.shouldPositionOverTarget})}startTracking(){this._listener=this._listener||CW(this._target,this.position)}stopTracking(){this._listener&&(this._listener.remove(),this._listener=null)}renderContent(){let e=Hl(this.props.children);if(e){var n;e=$t(e,{ref:i=>{this._content=i},style:{boxSizing:"border-box",zIndex:(n=this.props.styles)===null||n===void 0?void 0:n.zIndex,...e.props.style,...this.state.style},...e.props.className&&{className:e.props.className},[mc.contentLocatorAttribute]:this._id}),e=C(pM,{open:!0,onOpen:this.handlePortalOpen,mountNode:this.props.mountNode,insertAt:this.props.insertAt},e)}return e}renderTarget(){const e=rt(this.props.renderTarget);return e?$t(e,{ref:n=>{this._target=n},[mc.targetLocatorAttribute]:this._id}):(this.props.target&&(this._target=rt(this.props.target)),null)}render(){var e;const n={[mc.locatorAttribute]:this._id};return C("span",Object.assign({},n,{css:(e=this.props.styles)===null||e===void 0?void 0:e.position,ref:this.handleRef}),this.renderTarget(),this.renderContent())}},Kr.displayName="Position",Kr.componentId="Position",Kr.allowedProps=pj,Kr.propTypes=fj,Kr.defaultProps={placement:"bottom center",mountNode:null,insertAt:"bottom",constrain:"window",offsetX:0,offsetY:0,shouldTrackPosition:!0,shouldPositionOverTarget:!1,children:null},Kr.locatorAttribute="data-position",Kr.targetLocatorAttribute="data-position-target",Kr.contentLocatorAttribute="data-position-content",Kr))||Xu)||Xu)||Xu);function Nv(t,e){return gM(t,(n,i)=>[n,i].map(r=>r==="start"||r==="end"?mM[r]:r),e)}const yM=["end center","end top","end bottom","center end","end"],vM=["start center","start top","start bottom","center start","start"],SM=["bottom","bottom end","bottom start","bottom center"],vj=["top","top start","top end","top center"],Sj=(t,e)=>yM.includes(t)?{paddingInlineStart:e==null?void 0:e.arrowSize,paddingInlineEnd:"0"}:vM.includes(t)?{paddingInlineEnd:e==null?void 0:e.arrowSize,paddingInlineStart:"0"}:SM.includes(t)?{paddingTop:e==null?void 0:e.arrowSize}:vj.includes(t)?{paddingBottom:e==null?void 0:e.arrowSize}:{position:"absolute",left:"-999em"},wj=(t,e)=>{const n=["top","bottom","top center","bottom center"],i=["top start","bottom start"],r=["top end","bottom end"],o=["start top","end top"],s=["start bottom","end bottom"];return n.includes(t)?{insetInlineStart:"50%"}:i.includes(t)?{insetInlineStart:`calc((${e==null?void 0:e.arrowSize} + ${e==null?void 0:e.arrowBorderWidth}) * 2)`,insetInlineEnd:"auto"}:r.includes(t)?{insetInlineStart:`calc(100% - (${e==null?void 0:e.arrowSize} + ${e==null?void 0:e.arrowBorderWidth}) * 2)`,insetInlineEnd:"auto"}:o.includes(t)?{top:`calc((${e==null?void 0:e.arrowSize} + ${e==null?void 0:e.arrowBorderWidth}) * 2)`}:s.includes(t)?{top:`calc(100% - (${e==null?void 0:e.arrowSize} + ${e==null?void 0:e.arrowBorderWidth}) * 2)`}:{}},kj=(t,e,n)=>{const i=OM(t," "),r=e==="inverse";return yM.includes(i)?{main:{top:"50%",insetInlineStart:"100%",insetInlineEnd:"auto",marginTop:`calc(-1 * (${n==null?void 0:n.arrowSize} + ${n==null?void 0:n.arrowBorderWidth}))`,borderInlineEndWidth:"0",borderInlineEndColor:"transparent",borderInlineStartColor:r?n==null?void 0:n.arrowBorderColorInverse:n==null?void 0:n.arrowBorderColor,borderTopColor:"transparent",borderBottomColor:"transparent",borderInlineStartWidth:n==null?void 0:n.arrowSize},__after:{insetInlineEnd:n==null?void 0:n.arrowBorderWidth,insetInlineStart:"auto",marginTop:`calc(-1 * ${n==null?void 0:n.arrowSize})`,borderInlineEndWidth:"0",borderInlineEndColor:"transparent",borderTopColor:"transparent",borderBottomColor:"transparent",borderInlineStartWidth:n==null?void 0:n.arrowSize,borderInlineStartColor:r?n==null?void 0:n.arrowBackgroundColorInverse:n==null?void 0:n.arrowBackgroundColor}}:vM.includes(i)?{main:{top:"50%",insetInlineEnd:"100%",insetInlineStart:"auto",marginTop:`calc(-1 * (${n==null?void 0:n.arrowSize} + ${n==null?void 0:n.arrowBorderWidth}))`,borderInlineStartWidth:"0",borderInlineStartColor:"transparent",borderInlineEndColor:r?n==null?void 0:n.arrowBorderColorInverse:n==null?void 0:n.arrowBorderColor,borderTopColor:"transparent",borderBottomColor:"transparent",borderInlineEndWidth:n==null?void 0:n.arrowSize},__after:{insetInlineStart:n==null?void 0:n.arrowBorderWidth,insetInlineEnd:"auto",marginTop:`calc(-1 * ${n==null?void 0:n.arrowSize})`,borderInlineStartWidth:"0",borderInlineStartColor:"transparent",borderTopColor:"transparent",borderBottomColor:"transparent",borderInlineEndWidth:n==null?void 0:n.arrowSize,borderInlineEndColor:r?n==null?void 0:n.arrowBackgroundColorInverse:n==null?void 0:n.arrowBackgroundColor}}:SM.includes(i)?{main:{top:"100%",marginInlineStart:`calc(-1 * (${n==null?void 0:n.arrowSize} + ${n==null?void 0:n.arrowBorderWidth}))`,marginInlineEnd:"0",borderBottomWidth:"0",borderBottomColor:"transparent",borderInlineStartColor:"transparent",borderInlineEndColor:"transparent"},__after:{bottom:n==null?void 0:n.arrowBorderWidth,marginInlineStart:`calc(-1 * ${n==null?void 0:n.arrowSize})`,marginInlineEnd:"0",borderBottomWidth:"0",borderBottomColor:"transparent",borderInlineStartColor:"transparent",borderInlineEndColor:"transparent",borderTopColor:r?n==null?void 0:n.arrowBackgroundColorInverse:n==null?void 0:n.arrowBackgroundColor}}:{main:{bottom:"100%",marginInlineStart:`calc(-1 * (${n==null?void 0:n.arrowSize} + ${n==null?void 0:n.arrowBorderWidth}))`,marginInlineEnd:"0",borderTopWidth:"0",borderTopColor:"transparent",borderInlineStartColor:"transparent",borderInlineEndColor:"transparent"},__after:{top:n==null?void 0:n.arrowBorderWidth,marginInlineStart:`calc(-1 * ${n==null?void 0:n.arrowSize})`,marginInlineEnd:"0",borderTopWidth:"0",borderTopColor:"transparent",borderInlineStartColor:"transparent",borderInlineEndColor:"transparent",borderBottomColor:r?n==null?void 0:n.arrowBackgroundColorInverse:n==null?void 0:n.arrowBackgroundColor}}},xj=(t,e)=>{const n=e.placement,i=e.background,r={content:'""',height:"0",width:"0",position:"absolute",display:"block",boxSizing:"border-box",pointerEvents:"none",borderStyle:"solid"},o={default:t==null?void 0:t.arrowBorderColor,inverse:t==null?void 0:t.arrowBorderColorInverse},s=kj(n,i,t);return{contextView:{label:"contextView",boxSizing:"border-box",minHeight:`calc(${t==null?void 0:t.arrowSize} * 2)`,...Sj(n,t)},contextView__content:{label:"contextView__content",position:"relative"},contextView__arrow:{label:"contextView__arrow",...r,display:"block",borderWidth:`calc(${t==null?void 0:t.arrowSize} + ${t==null?void 0:t.arrowBorderWidth})`,borderColor:o[i],...s.main,...wj(n,t),"&::after":{borderWidth:t==null?void 0:t.arrowSize,borderColor:o[i],...s.__after,...r}},arrowSize:t.arrowSize,arrowBorderWidth:t.arrowBorderWidth}},_j=t=>{var e,n,i,r;return{...{arrowSize:"0.5rem",arrowBorderWidth:t==null||(e=t.borders)===null||e===void 0?void 0:e.widthSmall,arrowBackgroundColor:t==null||(n=t.colors)===null||n===void 0?void 0:n.white,arrowBorderColor:t==null||(i=t.colors)===null||i===void 0?void 0:i.tiara,arrowBackgroundColorInverse:t==null||(r=t.colors)===null||r===void 0?void 0:r.licorice,arrowBorderColorInverse:"transparent"}}},Ej={as:f.elementType,elementRef:f.func,margin:ut.spacing,padding:ut.spacing,height:f.oneOfType([f.string,f.number]),width:f.oneOfType([f.string,f.number]),maxHeight:f.oneOfType([f.string,f.number]),maxWidth:f.oneOfType([f.string,f.number]),minHeight:f.oneOfType([f.string,f.number]),minWidth:f.oneOfType([f.string,f.number]),children:f.node,textAlign:f.oneOf(["start","center","end"]),shadow:ut.shadow,stacking:ut.stacking,background:f.oneOf(["default","inverse"]),placement:Kt.placement,debug:f.bool},Cj=["as","elementRef","margin","padding","height","width","maxHeight","maxWidth","minHeight","minWidth","children","textAlign","shadow","stacking","background","placement","debug"];var NC,MC,Aa;let Tj=(NC=de(xj,_j),NC(MC=(Aa=class wM extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){const e=this.props,n=e.as,i=e.background,r=e.children,o=e.debug,s=e.height,a=e.width,l=e.maxHeight,u=e.maxWidth,c=e.minHeight,d=e.minWidth,h=e.margin,p=e.padding,m=e.shadow,O=e.stacking,y=e.style,b=e.textAlign,v=e.styles;return C(ye,Object.assign({},Re(this.props,wM.allowedProps),{css:v==null?void 0:v.contextView,style:y,borderWidth:"none",display:"inline-block",as:n,withVisualDebug:o,elementRef:this.handleRef,margin:h,stacking:O}),C(ye,{css:v==null?void 0:v.contextView__content,display:"block",borderRadius:"medium",borderWidth:"small",borderColor:i==="default"?"primary":"transparent",background:i==="default"?"primary":"primary-inverse",withVisualDebug:o,height:s,width:a,maxHeight:l,maxWidth:u,minHeight:c,minWidth:d,padding:p,shadow:m,textAlign:b},C("span",{css:v==null?void 0:v.contextView__arrow}),r))}},Aa.displayName="ContextView",Aa.componentId="ContextView",Aa.allowedProps=Cj,Aa.propTypes=Ej,Aa.defaultProps={as:"span",elementRef:()=>{},debug:!1,width:"auto",height:"auto",children:null,textAlign:"start",background:"default",shadow:"resting",placement:"center end"},Aa))||MC);const Pj=(t,e,n)=>{const i=e.size,r=e.color,o=e.textAlign,s=e.shape,a=e.withBackground,l=e.withBorder,u=e.isCondensed,c=n.isDisabled,d=n.hasOnlyIconVisible,h={circle:{borderRadius:"50%"},rectangle:{}},p={small:{content:{fontSize:t.smallFontSize,paddingLeft:t.smallPaddingHorizontal,paddingRight:t.smallPaddingHorizontal,...d&&{paddingLeft:0,paddingRight:0,height:t.smallHeight,width:t.smallHeight}},children:{paddingTop:t.smallPaddingTop,paddingBottom:t.smallPaddingBottom},iconSVG:{fontSize:u?t.smallFontSize:t.iconSizeSmall}},medium:{content:{fontSize:t.mediumFontSize,paddingLeft:t.mediumPaddingHorizontal,paddingRight:t.mediumPaddingHorizontal,...d&&{paddingLeft:0,paddingRight:0,height:t.mediumHeight,width:t.mediumHeight}},children:{paddingTop:t.mediumPaddingTop,paddingBottom:t.mediumPaddingBottom},iconSVG:{fontSize:u?t.mediumFontSize:t.iconSizeMedium}},large:{content:{fontSize:t.largeFontSize,paddingLeft:t.largePaddingHorizontal,paddingRight:t.largePaddingHorizontal,...d&&{paddingLeft:0,paddingRight:0,height:t.largeHeight,width:t.largeHeight}},children:{paddingTop:t.largePaddingTop,paddingBottom:t.largePaddingBottom},iconSVG:{fontSize:u?t.largeFontSize:t.iconSizeLarge}}},m={primary:a?{default:{color:t.primaryColor,background:t.primaryBackground,borderColor:t.primaryBorderColor},active:{background:t.primaryActiveBackground,boxShadow:t.primaryActiveBoxShadow},hover:{background:t.primaryHoverBackground}}:{default:{color:t.primaryGhostColor,borderColor:t.primaryGhostBorderColor,background:t.primaryGhostBackground},active:{background:t.primaryGhostActiveBackground,boxShadow:t.primaryGhostActiveBoxShadow},hover:{background:t.primaryGhostHoverBackground}},secondary:a?{default:{color:t.secondaryColor,background:t.secondaryBackground,borderColor:t.secondaryBorderColor},active:{background:t.secondaryActiveBackground,boxShadow:t.secondaryActiveBoxShadow},hover:{background:t.secondaryHoverBackground}}:{default:{color:t.secondaryGhostColor,borderColor:t.secondaryGhostBorderColor,background:t.secondaryGhostBackground},active:{background:t.secondaryGhostActiveBackground,boxShadow:t.secondaryGhostActiveBoxShadow},hover:{background:t.secondaryGhostHoverBackground}},"primary-inverse":a?{default:{color:t.primaryInverseColor,background:t.primaryInverseBackground,borderColor:t.primaryInverseBorderColor},active:{background:t.primaryInverseActiveBackground,boxShadow:t.primaryInverseActiveBoxShadow},hover:{background:t.primaryInverseHoverBackground}}:{default:{color:t.primaryInverseGhostColor,borderColor:t.primaryInverseGhostBorderColor,background:t.primaryInverseGhostBackground},active:{background:t.primaryInverseGhostActiveBackground,boxShadow:t.primaryInverseGhostActiveBoxShadow},hover:{background:t.primaryInverseGhostHoverBackground}},success:a?{default:{color:t.successColor,background:t.successBackground,borderColor:t.successBorderColor},active:{background:t.successActiveBackground,boxShadow:t.successActiveBoxShadow},hover:{background:t.successHoverBackground}}:{default:{color:t.successGhostColor,borderColor:t.successGhostBorderColor,background:t.successGhostBackground},active:{background:t.successGhostActiveBackground,boxShadow:t.successGhostActiveBoxShadow},hover:{background:t.successGhostHoverBackground}},danger:a?{default:{color:t.dangerColor,background:t.dangerBackground,borderColor:t.dangerBorderColor},active:{background:t.dangerActiveBackground,boxShadow:t.dangerActiveBoxShadow},hover:{background:t.dangerHoverBackground}}:{default:{color:t.dangerGhostColor,borderColor:t.dangerGhostBorderColor,background:t.dangerGhostBackground},active:{background:t.dangerGhostActiveBackground,boxShadow:t.dangerGhostActiveBoxShadow},hover:{background:t.dangerGhostHoverBackground}}};return{baseButton:{label:"baseButton",appearance:"none",textDecoration:"none",touchAction:"manipulation","&::-moz-focus-inner":{border:"0"},"*":{pointerEvents:"none"},"&:focus":{textDecoration:"none"},"&:active > [class$=-baseButton__content]":m[r].active,"&:hover > [class$=-baseButton__content]":m[r].hover},content:{label:"baseButton__content",boxSizing:"border-box",width:"100%",display:"block",direction:"inherit",userSelect:"none",transition:"background 0.2s, transform 0.2s",transform:t.transform,fontFamily:t.fontFamily,fontWeight:t.fontWeight,textTransform:t.textTransform,letterSpacing:t.letterSpacing,borderStyle:t.borderStyle,borderWidth:t.borderWidth,borderRadius:t.borderRadius,lineHeight:t.lineHeight,textAlign:o,"&:hover":{transform:t.hoverTransform},...p[i].content,...m[r].default,...h[s],...u&&{paddingLeft:0,paddingRight:0},...c&&{opacity:.5},...d&&{lineHeight:1},...!l&&{borderStyle:"none"}},children:{label:"baseButton__children",display:"block",...p[i].children,...u&&{paddingTop:0,paddingBottom:0}},iconSVG:{label:"baseButton__iconSVG",display:"flex",alignItems:"center",...p[i].iconSVG},childrenLayout:{label:"baseButton__childrenLayout",display:"flex",height:"100%",width:"100%",justifyContent:d||o==="center"?"center":"flex-start",boxSizing:"border-box",alignItems:"center",flexDirection:"row",maxWidth:"100%",overflowX:"visible",overflowY:"visible",unicodeBidi:"isolate"},iconOnly:{label:"baseButton__iconOnly",boxSizing:"border-box",minWidth:"0.0625rem",flexShrink:0,maxWidth:"100%",overflowX:"visible",overflowY:"visible",unicodeBidi:"isolate"},iconWrapper:{label:"baseButton__iconWrapper",boxSizing:"border-box",minWidth:"0.0625rem",paddingInlineEnd:u?t.iconTextGapCondensed:t.iconTextGap,flexShrink:0,maxWidth:"100%",overflowX:"visible",overflowY:"visible",unicodeBidi:"isolate"},childrenWrapper:{label:"baseButton__childrenWrapper",boxSizing:"border-box",minWidth:"0.0625rem",flexShrink:1,maxWidth:"100%",overflowX:"visible",overflowY:"visible",unicodeBidi:"isolate"}}};function R0(t){"@babel/helpers - typeof";return R0=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},R0(t)}var Aj=/^\s+/,Rj=/\s+$/;function ke(t,e){if(t=t||"",e=e||{},t instanceof ke)return t;if(!(this instanceof ke))return new ke(t,e);var n=Ij(t);this._originalInput=t,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=e.format||n.format,this._gradientType=e.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}ke.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var e=this.toRgb(),n,i,r,o,s,a;return n=e.r/255,i=e.g/255,r=e.b/255,n<=.03928?o=n/12.92:o=Math.pow((n+.055)/1.055,2.4),i<=.03928?s=i/12.92:s=Math.pow((i+.055)/1.055,2.4),r<=.03928?a=r/12.92:a=Math.pow((r+.055)/1.055,2.4),.2126*o+.7152*s+.0722*a},setAlpha:function(e){return this._a=kM(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=BC(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=BC(this._r,this._g,this._b),n=Math.round(e.h*360),i=Math.round(e.s*100),r=Math.round(e.v*100);return this._a==1?"hsv("+n+", "+i+"%, "+r+"%)":"hsva("+n+", "+i+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=DC(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=DC(this._r,this._g,this._b),n=Math.round(e.h*360),i=Math.round(e.s*100),r=Math.round(e.l*100);return this._a==1?"hsl("+n+", "+i+"%, "+r+"%)":"hsla("+n+", "+i+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return QC(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return Mj(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(Tt(this._r,255)*100)+"%",g:Math.round(Tt(this._g,255)*100)+"%",b:Math.round(Tt(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(Tt(this._r,255)*100)+"%, "+Math.round(Tt(this._g,255)*100)+"%, "+Math.round(Tt(this._b,255)*100)+"%)":"rgba("+Math.round(Tt(this._r,255)*100)+"%, "+Math.round(Tt(this._g,255)*100)+"%, "+Math.round(Tt(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:Zj[QC(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var n="#"+FC(this._r,this._g,this._b,this._a),i=n,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=ke(e);i="#"+FC(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+n+",endColorstr="+i+")"},toString:function(e){var n=!!e;e=e||this._format;var i=!1,r=this._a<1&&this._a>=0,o=!n&&r&&(e==="hex"||e==="hex6"||e==="hex3"||e==="hex4"||e==="hex8"||e==="name");return o?e==="name"&&this._a===0?this.toName():this.toRgbString():(e==="rgb"&&(i=this.toRgbString()),e==="prgb"&&(i=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(i=this.toHexString()),e==="hex3"&&(i=this.toHexString(!0)),e==="hex4"&&(i=this.toHex8String(!0)),e==="hex8"&&(i=this.toHex8String()),e==="name"&&(i=this.toName()),e==="hsl"&&(i=this.toHslString()),e==="hsv"&&(i=this.toHsvString()),i||this.toHexString())},clone:function(){return ke(this.toString())},_applyModification:function(e,n){var i=e.apply(null,[this].concat([].slice.call(n)));return this._r=i._r,this._g=i._g,this._b=i._b,this.setAlpha(i._a),this},lighten:function(){return this._applyModification(Fj,arguments)},brighten:function(){return this._applyModification(zj,arguments)},darken:function(){return this._applyModification(Hj,arguments)},desaturate:function(){return this._applyModification(Dj,arguments)},saturate:function(){return this._applyModification(Bj,arguments)},greyscale:function(){return this._applyModification(Qj,arguments)},spin:function(){return this._applyModification(Uj,arguments)},_applyCombination:function(e,n){return e.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(jj,arguments)},complement:function(){return this._applyCombination(Wj,arguments)},monochromatic:function(){return this._applyCombination(Xj,arguments)},splitcomplement:function(){return this._applyCombination(Vj,arguments)},triad:function(){return this._applyCombination(zC,[3])},tetrad:function(){return this._applyCombination(zC,[4])}};ke.fromRatio=function(t,e){if(R0(t)=="object"){var n={};for(var i in t)t.hasOwnProperty(i)&&(i==="a"?n[i]=t[i]:n[i]=Wh(t[i]));t=n}return ke(t,e)};function Ij(t){var e={r:0,g:0,b:0},n=1,i=null,r=null,o=null,s=!1,a=!1;return typeof t=="string"&&(t=Kj(t)),R0(t)=="object"&&(No(t.r)&&No(t.g)&&No(t.b)?(e=$j(t.r,t.g,t.b),s=!0,a=String(t.r).substr(-1)==="%"?"prgb":"rgb"):No(t.h)&&No(t.s)&&No(t.v)?(i=Wh(t.s),r=Wh(t.v),e=Nj(t.h,i,r),s=!0,a="hsv"):No(t.h)&&No(t.s)&&No(t.l)&&(i=Wh(t.s),o=Wh(t.l),e=Lj(t.h,i,o),s=!0,a="hsl"),t.hasOwnProperty("a")&&(n=t.a)),n=kM(n),{ok:s,format:t.format||a,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:n}}function $j(t,e,n){return{r:Tt(t,255)*255,g:Tt(e,255)*255,b:Tt(n,255)*255}}function DC(t,e,n){t=Tt(t,255),e=Tt(e,255),n=Tt(n,255);var i=Math.max(t,e,n),r=Math.min(t,e,n),o,s,a=(i+r)/2;if(i==r)o=s=0;else{var l=i-r;switch(s=a>.5?l/(2-i-r):l/(i+r),i){case t:o=(e-n)/l+(e1&&(d-=1),d<1/6?u+(c-u)*6*d:d<1/2?c:d<2/3?u+(c-u)*(2/3-d)*6:u}if(e===0)i=r=o=n;else{var a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=s(l,a,t+1/3),r=s(l,a,t),o=s(l,a,t-1/3)}return{r:i*255,g:r*255,b:o*255}}function BC(t,e,n){t=Tt(t,255),e=Tt(e,255),n=Tt(n,255);var i=Math.max(t,e,n),r=Math.min(t,e,n),o,s,a=i,l=i-r;if(s=i===0?0:l/i,i==r)o=0;else{switch(i){case t:o=(e-n)/l+(e>1)+720)%360;--e;)i.h=(i.h+r)%360,o.push(ke(i));return o}function Xj(t,e){e=e||6;for(var n=ke(t).toHsv(),i=n.h,r=n.s,o=n.v,s=[],a=1/e;e--;)s.push(ke({h:i,s:r,v:o})),o=(o+a)%1;return s}ke.mix=function(t,e,n){n=n===0?0:n||50;var i=ke(t).toRgb(),r=ke(e).toRgb(),o=n/100,s={r:(r.r-i.r)*o+i.r,g:(r.g-i.g)*o+i.g,b:(r.b-i.b)*o+i.b,a:(r.a-i.a)*o+i.a};return ke(s)};ke.readability=function(t,e){var n=ke(t),i=ke(e);return(Math.max(n.getLuminance(),i.getLuminance())+.05)/(Math.min(n.getLuminance(),i.getLuminance())+.05)};ke.isReadable=function(t,e,n){var i=ke.readability(t,e),r,o;switch(o=!1,r=Jj(n),r.level+r.size){case"AAsmall":case"AAAlarge":o=i>=4.5;break;case"AAlarge":o=i>=3;break;case"AAAsmall":o=i>=7;break}return o};ke.mostReadable=function(t,e,n){var i=null,r=0,o,s,a,l;n=n||{},s=n.includeFallbackColors,a=n.level,l=n.size;for(var u=0;ur&&(r=o,i=ke(e[u]));return ke.isReadable(t,i,{level:a,size:l})||!s?i:(n.includeFallbackColors=!1,ke.mostReadable(t,["#fff","#000"],n))};var Mv=ke.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},Zj=ke.hexNames=qj(Mv);function qj(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}function kM(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function Tt(t,e){Yj(t)&&(t="100%");var n=Gj(t);return t=Math.min(e,Math.max(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),Math.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function nb(t){return Math.min(1,Math.max(0,t))}function Pi(t){return parseInt(t,16)}function Yj(t){return typeof t=="string"&&t.indexOf(".")!=-1&&parseFloat(t)===1}function Gj(t){return typeof t=="string"&&t.indexOf("%")!=-1}function Rr(t){return t.length==1?"0"+t:""+t}function Wh(t){return t<=1&&(t=t*100+"%"),t}function xM(t){return Math.round(parseFloat(t)*255).toString(16)}function HC(t){return Pi(t)/255}var Sr=function(){var t="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",n="(?:"+e+")|(?:"+t+")",i="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+i),rgba:new RegExp("rgba"+r),hsl:new RegExp("hsl"+i),hsla:new RegExp("hsla"+r),hsv:new RegExp("hsv"+i),hsva:new RegExp("hsva"+r),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function No(t){return!!Sr.CSS_UNIT.exec(t)}function Kj(t){t=t.replace(Aj,"").replace(Rj,"").toLowerCase();var e=!1;if(Mv[t])t=Mv[t],e=!0;else if(t=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=Sr.rgb.exec(t))?{r:n[1],g:n[2],b:n[3]}:(n=Sr.rgba.exec(t))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Sr.hsl.exec(t))?{h:n[1],s:n[2],l:n[3]}:(n=Sr.hsla.exec(t))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Sr.hsv.exec(t))?{h:n[1],s:n[2],v:n[3]}:(n=Sr.hsva.exec(t))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Sr.hex8.exec(t))?{r:Pi(n[1]),g:Pi(n[2]),b:Pi(n[3]),a:HC(n[4]),format:e?"name":"hex8"}:(n=Sr.hex6.exec(t))?{r:Pi(n[1]),g:Pi(n[2]),b:Pi(n[3]),format:e?"name":"hex"}:(n=Sr.hex4.exec(t))?{r:Pi(n[1]+""+n[1]),g:Pi(n[2]+""+n[2]),b:Pi(n[3]+""+n[3]),a:HC(n[4]+""+n[4]),format:e?"name":"hex8"}:(n=Sr.hex3.exec(t))?{r:Pi(n[1]+""+n[1]),g:Pi(n[2]+""+n[2]),b:Pi(n[3]+""+n[3]),format:e?"name":"hex"}:!1}function Jj(t){var e,n;return t=t||{level:"AA",size:"small"},e=(t.level||"AA").toUpperCase(),n=(t.size||"small").toLowerCase(),e!=="AA"&&e!=="AAA"&&(e="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:e,size:n}}function Zf(t,e){return ke(t).setAlpha(e/100).toRgbString()}function jo(t,e){return ke(t).darken(e).toRgbString()}const Dv="inset 0 0 0.1875rem 0.0625rem",Zu=({style:t,textColor:e,ghostTextColor:n,backgroundColor:i,borderColor:r,ghostBorderColor:o=r})=>({[`${t}Color`]:e,[`${t}BorderColor`]:jo(r,10),[`${t}Background`]:i,[`${t}HoverBackground`]:jo(i,10),[`${t}ActiveBackground`]:jo(i,10),[`${t}ActiveBoxShadow`]:`${Dv} ${jo(r,20)}`,[`${t}GhostColor`]:n,[`${t}GhostBorderColor`]:o,[`${t}GhostBackground`]:"transparent",[`${t}GhostHoverBackground`]:Zf(n,10),[`${t}GhostActiveBackground`]:"transparent",[`${t}GhostActiveBoxShadow`]:`${Dv} ${Zf(o,28)}`}),jk=t=>{const e=t.borders,n=t.colors,i=t.forms,r=t.spacing,o=t.typography,s=t.key,a={canvas:{...Zu({style:"primary",backgroundColor:t["ic-brand-button--primary-bgd"],borderColor:t["ic-brand-button--primary-bgd"],textColor:t["ic-brand-button--primary-text"],ghostTextColor:t["ic-brand-button--primary-bgd"]}),primaryGhostHoverBackground:Zf(t["ic-brand-button--primary-bgd"],10)},"canvas-high-contrast":{secondaryBorderColor:n==null?void 0:n.borderMedium,primaryInverseBorderColor:n==null?void 0:n.borderMedium},instructure:{borderRadius:"999em",smallPaddingTop:"0.5rem",smallPaddingBottom:"0.4375rem",mediumPaddingTop:"0.75rem",mediumPaddingBottom:"0.75rem",largePaddingTop:"1rem",largePaddingBottom:"1rem",largeFontSize:"1.125rem"}};return{...{transform:"none",hoverTransform:"none",fontFamily:o==null?void 0:o.fontFamily,fontWeight:o==null?void 0:o.fontWeightNormal,textTransform:"none",letterSpacing:"normal",borderRadius:e==null?void 0:e.radiusMedium,borderStyle:e==null?void 0:e.style,borderWidth:e==null?void 0:e.widthSmall,smallHeight:i==null?void 0:i.inputHeightSmall,smallFontSize:o==null?void 0:o.fontSizeSmall,smallPaddingHorizontal:r==null?void 0:r.xSmall,smallPaddingTop:"0.375rem",smallPaddingBottom:"0.3125rem",mediumHeight:i==null?void 0:i.inputHeightMedium,mediumFontSize:o==null?void 0:o.fontSizeMedium,mediumPaddingHorizontal:r==null?void 0:r.small,mediumPaddingTop:"0.5625rem",mediumPaddingBottom:"0.5625rem",largeHeight:i==null?void 0:i.inputHeightLarge,largeFontSize:o==null?void 0:o.fontSizeLarge,largePaddingHorizontal:r==null?void 0:r.medium,largePaddingTop:"0.6875rem",largePaddingBottom:"0.6875rem",lineHeight:o==null?void 0:o.lineHeightFit,iconSizeSmall:"1rem",iconSizeMedium:"1.25rem",iconSizeLarge:"1.625rem",iconTextGap:r.xSmall,iconTextGapCondensed:r.xxSmall,...Zu({style:"primary",backgroundColor:n==null?void 0:n.backgroundBrand,borderColor:n==null?void 0:n.borderBrand,textColor:n==null?void 0:n.textLightest,ghostTextColor:n==null?void 0:n.textBrand}),...Zu({style:"secondary",backgroundColor:n==null?void 0:n.backgroundLight,borderColor:n==null?void 0:n.borderLight,ghostBorderColor:n==null?void 0:n.borderDarkest,textColor:n==null?void 0:n.textDarkest,ghostTextColor:n==null?void 0:n.textDarkest}),...Zu({style:"success",backgroundColor:n==null?void 0:n.backgroundSuccess,borderColor:n==null?void 0:n.borderSuccess,textColor:n==null?void 0:n.textLightest,ghostTextColor:n==null?void 0:n.textSuccess}),...Zu({style:"danger",backgroundColor:n==null?void 0:n.backgroundDanger,borderColor:n==null?void 0:n.borderDanger,textColor:n==null?void 0:n.textLightest,ghostTextColor:n==null?void 0:n.textDanger}),...Zu({style:"primaryInverse",backgroundColor:n==null?void 0:n.backgroundLightest,borderColor:n==null?void 0:n.borderLightest,textColor:n==null?void 0:n.textDarkest,ghostTextColor:n==null?void 0:n.textLightest}),primaryInverseBorderColor:jo(n==null?void 0:n.borderLight,10),primaryInverseHoverBackground:jo(n==null?void 0:n.backgroundLightest,5),primaryInverseActiveBackground:n==null?void 0:n.backgroundLightest,primaryInverseActiveBoxShadow:`${Dv} ${jo(n==null?void 0:n.borderLightest,25)}`,successGhostHoverBackground:Zf(n==null?void 0:n.textSuccess,1)},...a[s]}},eX={children:f.node,type:f.oneOf(["button","submit","reset"]),size:f.oneOf(["small","medium","large"]),elementRef:f.func,as:f.elementType,interaction:f.oneOf(["enabled","disabled","readonly"]),color:f.oneOf(["primary","primary-inverse","secondary","success","danger"]),focusColor:f.oneOf(["info","inverse"]),display:f.oneOf(["inline-block","block"]),textAlign:f.oneOf(["start","center"]),shape:f.oneOf(["rectangle","circle"]),withBackground:f.bool,withBorder:f.bool,isCondensed:f.bool,margin:ut.spacing,cursor:f.string,href:f.string,onClick:f.func,onKeyDown:f.func,renderIcon:f.oneOfType([f.node,f.func]),tabIndex:f.number},tX=["as","children","color","cursor","display","elementRef","focusColor","href","interaction","isCondensed","margin","onClick","onKeyDown","renderIcon","shape","size","tabIndex","textAlign","type","withBackground","withBorder"],nX=["type","size","elementRef","as","href","color","focusColor","textAlign","shape","display","withBackground","withBorder","isCondensed","margin","cursor","onClick","renderIcon","tabIndex","styles","makeStyles"];var UC,WC,pm,Ra;let ib=(UC=de(Pj,jk),WC=Le(),UC(pm=WC(pm=(Ra=class _M extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleElementRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.handleClick=n=>{const i=this.props.onClick;if(this.interaction!=="enabled"){n.preventDefault(),n.stopPropagation();return}typeof i=="function"&&i(n)},this.handleKeyDown=n=>{const i=this.props,r=i.onClick,o=i.onKeyDown,s=i.href,a=this.interaction;typeof o=="function"&&o(n);const l=lr.codes,u=l.space,c=l.enter;this.elementType!=="button"&&[u,c].includes(n.keyCode)&&(n.preventDefault(),n.stopPropagation(),typeof r=="function"&&a==="enabled"&&r(n),s&&this.ref&&this.ref.click())}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.makeStylesVariables)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.makeStylesVariables)}get makeStylesVariables(){return{isDisabled:this.isDisabled,hasOnlyIconVisible:this.hasOnlyIconVisible}}get hasOnlyIconVisible(){const e=this.props,n=e.children;return!!(e.renderIcon&&!eb(n))}get elementType(){return oi(_M,this.props)}get interaction(){return Yo({props:this.props})}get isDisabled(){return this.interaction==="disabled"}get isReadOnly(){return this.interaction==="readonly"}get isEnabled(){return this.interaction==="enabled"}get focusColor(){const e=this.props,n=e.color,i=e.focusColor,r=e.withBackground;return i||(n==="primary-inverse"&&r?"info":n.includes("inverse")?"inverse":"info")}get focused(){return xo(this.ref)}focus(){this.ref&&this.ref.focus()}renderChildren(){const e=this.props,n=e.renderIcon,i=e.children,r=e.styles,o=C("span",{css:r==null?void 0:r.children},i);if(!n)return o;const s=this.hasOnlyIconVisible,a=C("span",{css:r==null?void 0:r.iconSVG},rt(n)),l=s?C("span",{css:r==null?void 0:r.iconOnly},a,i):[C("span",{key:"icon",css:r==null?void 0:r.iconWrapper},a),C("span",{key:"children",css:r==null?void 0:r.childrenWrapper},o)];return C("span",{css:r==null?void 0:r.childrenLayout},l)}render(){const e=this.props,n=e.type;e.size,e.elementRef;const i=e.as,r=e.href;e.color,e.focusColor,e.textAlign;const o=e.shape,s=e.display;e.withBackground,e.withBorder,e.isCondensed;const a=e.margin,l=e.cursor,u=e.onClick;e.renderIcon;const c=e.tabIndex,d=e.styles;e.makeStyles;const h=Ie(e,nX),p=this.isDisabled,m=this.isEnabled,O=this.isReadOnly;return C(ye,Object.assign({},It(h),{as:this.elementType,focusColor:this.focusColor,position:"relative",display:s,width:s==="block"?"100%":"auto",borderRadius:o==="circle"?"circle":"medium",background:"transparent",padding:"none",borderWidth:"none",margin:a,cursor:p?"not-allowed":l,href:r,type:r?void 0:n,elementRef:this.handleElementRef,onClick:this.handleClick,onKeyDown:this.handleKeyDown,role:u&&i!=="button"?"button":void 0,tabIndex:u&&i?c||0:c,disabled:p||O,css:m?d==null?void 0:d.baseButton:null}),C("span",{css:d==null?void 0:d.content},this.renderChildren()))}},Ra.displayName="BaseButton",Ra.componentId="BaseButton",Ra.propTypes=eX,Ra.allowedProps=tX,Ra.defaultProps={type:"button",size:"medium",as:"button",interaction:void 0,color:"secondary",shape:"rectangle",display:"inline-block",textAlign:"start",withBackground:!0,withBorder:!0,isCondensed:!1,margin:"0",cursor:"pointer"},Ra))||pm)||pm);const iX={children:f.node,type:f.oneOf(["button","submit","reset"]),size:f.oneOf(["small","medium","large"]),elementRef:f.func,as:f.elementType,interaction:f.oneOf(["enabled","disabled","readonly"]),color:f.oneOf(["primary","primary-inverse","secondary","success","danger"]),focusColor:f.oneOf(["info","inverse"]),display:f.oneOf(["inline-block","block"]),textAlign:f.oneOf(["start","center"]),withBackground:f.bool,margin:ut.spacing,cursor:f.string,href:f.string,renderIcon:f.oneOfType([f.node,f.func]),onClick:f.func},rX=["as","children","color","cursor","display","elementRef","focusColor","href","interaction","margin","renderIcon","size","textAlign","type","withBackground","onClick"],oX=["children","type","size","as","color","focusColor","display","textAlign","withBackground","margin","cursor","href","renderIcon"];var VC,jC,mm,Ia;let Xk=(VC=de(null,jk),jC=Le(),VC(mm=jC(mm=(Ia=class extends T.Component{constructor(...e){super(...e),this._buttonComponent=null,this.ref=null,this.handleElementRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.handleButtonRef=n=>{this._buttonComponent=n}}get focused(){return this._buttonComponent&&this._buttonComponent.focused}focus(){this._buttonComponent&&this._buttonComponent.focus()}render(){const e=this.props,n=e.children,i=e.type,r=e.size,o=e.as,s=e.color,a=e.focusColor,l=e.display,u=e.textAlign,c=e.withBackground,d=e.margin,h=e.cursor,p=e.href,m=e.renderIcon,O=Ie(e,oX),y=Yo({props:O}),b=this.props.themeOverride,v={...It(O),type:i,size:r,elementRef:this.handleElementRef,ref:this.handleButtonRef,as:o,color:s,interaction:y,focusColor:a,display:l,textAlign:u,withBackground:c,margin:d,cursor:h,href:p,renderIcon:m,themeOverride:b};return z.createElement(ib,v,n)}},Ia.displayName="Button",Ia.componentId="Button",Ia.propTypes=iX,Ia.allowedProps=rX,Ia.defaultProps={type:"button",size:"medium",as:"button",interaction:void 0,color:"secondary",display:"inline-block",textAlign:"center",withBackground:!0,margin:"0",cursor:"pointer"},Ia))||mm)||mm);const sX=(t,e)=>{const n=e.inline,i=e.color,r={inherit:{color:"inherit"},primary:{color:t.primaryColor},secondary:{color:t.secondaryColor},"primary-inverse":{color:t.primaryInverseColor},"secondary-inverse":{color:t.secondaryInverseColor},success:{color:t.successColor},brand:{color:t.brandColor},warning:{color:t.warningColor},error:{color:t.errorColor},alert:{color:t.alertColor},auto:{}};return{inlineSVG:{label:"inlineSVG",fill:"currentColor",display:n?"inline-block":"block",overflow:"visible",...r[i]}}},aX=t=>{const e=t.colors,n=t.key,i={canvas:{primaryColor:t["ic-brand-font-color-dark"],brandColor:t["ic-brand-primary"]}};return{...{primaryInverseColor:e==null?void 0:e.textLightest,primaryColor:e==null?void 0:e.textDarkest,secondaryColor:e==null?void 0:e.textDark,secondaryInverseColor:e==null?void 0:e.textLight,warningColor:e==null?void 0:e.textWarning,brandColor:e==null?void 0:e.textBrand,errorColor:e==null?void 0:e.textDanger,alertColor:e==null?void 0:e.textAlert,successColor:e==null?void 0:e.textSuccess},...i[n]}},lX={children:f.node,src:f.string,title:f.string,description:f.string,focusable:f.bool,width:f.oneOfType([f.string,f.number]),height:f.oneOfType([f.string,f.number]),inline:f.bool,color:f.oneOf(["inherit","primary","secondary","primary-inverse","secondary-inverse","success","error","alert","warning","brand","auto"]),elementRef:f.func},uX=["children","src","title","description","focusable","width","height","inline","color","elementRef"],cX=["style","title","description","focusable","children","src","styles"];var XC,ZC,qC,qu,ys;let EM=(XC=zt(),ZC=de(sX,aX),qC=Le(),XC(qu=ZC(qu=qC(qu=(ys=class Bv extends T.Component{constructor(e){super(e),this.titleId=void 0,this.descId=void 0,this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.titleId=e.deterministicId("InlineSVG-title"),this.descId=e.deterministicId("InlineSVG-desc")}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}get role(){return this.props.title?"img":"presentation"}renderTitle(){const e=this.props.title;return e?C("title",{id:this.titleId},e):null}renderDesc(e){return e?C("desc",{id:this.descId},e):null}get labelledBy(){const e=[];return this.props.title&&e.push(this.titleId),this.props.description&&e.push(this.descId),e.length>0?e.join(" "):void 0}renderContent(){if(this.props.src){const e=Bv.prepareSrc(this.props.src);return C("g",{role:"presentation",dangerouslySetInnerHTML:{__html:e}})}else return C("g",{role:"presentation"},this.props.children)}render(){const e=this.props,n=e.style,i=e.title,r=e.description,o=e.focusable;e.children;const s=e.src,a=e.styles,l=Ie(e,cX),u=this.props.width==="auto"?void 0:this.props.width,c=this.props.height==="auto"?void 0:this.props.height;return C("svg",Object.assign({},dX(s),Re(this.props,Bv.allowedProps,["inline"]),{style:{...n,width:u,height:c},width:u,height:c,"aria-hidden":i?void 0:"true","aria-labelledby":this.labelledBy,role:this.role,focusable:o?"true":"false",css:a==null?void 0:a.inlineSVG,className:l.className,ref:this.handleRef}),this.renderTitle(),this.renderDesc(r),this.renderContent())}},ys.displayName="InlineSVG",ys.componentId="InlineSVG",ys.allowedProps=uX,ys.propTypes=lX,ys.defaultProps={focusable:!1,src:"",title:"",description:"",inline:!0,width:"1em",height:"1em",color:"inherit"},ys.prepareSrc=t=>{const n=/]*>((.|[\n\r])*)<\/svg>/.exec(t);return n?n[1]:t},ys))||qu)||qu)||qu);function dX(t){const e={},n=/]*)\s*>/,i=/(\S+)=["']?((?:.(?!["']?\s+(?:\S+)=|[>"']))+.)["']?/g;if(typeof t=="string"){const r=n.exec(t),o=r?r[1]:"",s=["xmlns","xmlns:xlink","version"];let a=i.exec(o);for(;a!=null;)s.indexOf(a[1])===-1&&(e[a[1]]=a[2]||(a[3]?a[3]:a[4]?a[4]:a[5])||a[1]),a=i.exec(o)}return e}const hX=(t,e)=>{const n=e.rotate,i=e.size,r=e.bidirectional,o={0:{},90:{transform:"rotate(90deg)"},180:{transform:"rotate(180deg)"},270:{transform:"rotate(270deg)"}},s={0:{transform:"scale3d(-1, 1, 1)"},90:{transform:"scale3d(-1, 1, 1) rotate(90deg)"},180:{transform:"scale3d(-1, 1, 1) rotate(180deg)"},270:{transform:"scale3d(-1, 1, 1) rotate(270deg)"}},a={"x-small":{fontSize:t.sizeXSmall},small:{fontSize:t.sizeSmall},medium:{fontSize:t.sizeMedium},large:{fontSize:t.sizeLarge},"x-large":{fontSize:t.sizeXLarge}};return{svgIcon:{label:"svgIcon",verticalAlign:"middle",lineHeight:1,width:"1em",height:"1em",...o[n],...i&&a[i],...r&&{'[dir="rtl"] &':s[n]}}}},fX=()=>({...{sizeXSmall:"1.125rem",sizeSmall:"2rem",sizeMedium:"3rem",sizeLarge:"5rem",sizeXLarge:"10rem"}}),pX={...EM.propTypes,rotate:f.oneOf(["0","90","180","270"]),size:f.oneOf(["x-small","small","medium","large","x-large"]),bidirectional:f.bool},mX=["children","src","title","description","focusable","width","height","inline","color","elementRef","rotate","size","bidirectional"],gX=["rotate","className","themeOverride","size","bidirectional","makeStyles","styles"],OX=["sizeXSmall","sizeSmall","sizeMedium","sizeLarge","sizeXLarge"];var YC,GC,gm,$a;let se=(YC=de(hX,fX),GC=Le(),YC(gm=GC(gm=($a=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){const e=this.props,n=e.rotate,i=e.className,r=e.themeOverride;e.size,e.bidirectional,e.makeStyles;const o=e.styles,s=Ie(e,gX),a=r;a.sizeXSmall,a.sizeSmall,a.sizeMedium,a.sizeLarge,a.sizeXLarge;const l=Ie(a,OX);return C(EM,Object.assign({},s,{themeOverride:l,rotate:n,css:o==null?void 0:o.svgIcon,className:i,elementRef:this.handleRef}))}},$a.displayName="SVGIcon",$a.componentId="SVGIcon",$a.allowedProps=mX,$a.propTypes=pX,$a.defaultProps={rotate:"0",bidirectional:!1},$a))||gm)||gm);var KC;class Su extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(se,Object.assign({},this.props,{name:"IconArrowOpenDown",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),KC||(KC=z.createElement("path",{d:"m.153 526.146 92.168-92.299 867.767 867.636 867.636-867.636 92.429 92.299-960.065 959.935z",fillRule:"evenodd"})))}}Su.glyphName="arrow-open-down";Su.variant="Line";Su.displayName="IconArrowOpenDownLine";Su.propTypes={...se.propTypes};Su.allowedProps=[...se.allowedProps];var JC;class $d extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(se,Object.assign({},this.props,{name:"IconArrowOpenStart",viewBox:"0 0 1920 1920",elementRef:this.handleRef,bidirectional:!0}),JC||(JC=z.createElement("path",{d:"m1394.006 0 92.299 92.168-867.636 867.767 867.636 867.636-92.299 92.429-959.935-960.065z",fillRule:"evenodd"})))}}$d.glyphName="arrow-open-start";$d.variant="Line";$d.displayName="IconArrowOpenStartLine";$d.propTypes={...se.propTypes};$d.allowedProps=[...se.allowedProps];var e2;class wu extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(se,Object.assign({},this.props,{name:"IconArrowOpenUp",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),e2||(e2=z.createElement("path",{d:"m.153 1393.854 92.168 92.299 867.767-867.636 867.636 867.636 92.429-92.299L960.088 433.92z",fillRule:"evenodd"})))}}wu.glyphName="arrow-open-up";wu.variant="Line";wu.displayName="IconArrowOpenUpLine";wu.propTypes={...se.propTypes};wu.allowedProps=[...se.allowedProps];var t2;class ra extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(se,Object.assign({},this.props,{name:"IconCheck",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),t2||(t2=z.createElement("path",{d:"M1827.701 303.065 698.835 1431.801 92.299 825.266 0 917.564 698.835 1616.4 1919.869 395.234z",fillRule:"evenodd"})))}}ra.glyphName="check";ra.variant="Line";ra.displayName="IconCheckLine";ra.propTypes={...se.propTypes};ra.allowedProps=[...se.allowedProps];var n2;class Ld extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(se,Object.assign({},this.props,{name:"IconCopy",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),n2||(n2=z.createElement("path",{d:"M0 1919.887h1467.88V452.008H0v1467.88ZM1354.965 564.922v1242.051H112.914V564.922h1242.051ZM1920 0v1467.992h-338.741v-113.027h225.827V112.914H565.035V338.74H452.008V0H1920ZM338.741 1016.93h790.397V904.016H338.74v112.914Zm0 451.062h790.397v-113.027H338.74v113.027Zm0-225.588h564.57v-112.913H338.74v112.913Z",fillRule:"evenodd"})))}}Ld.glyphName="copy";Ld.variant="Line";Ld.displayName="IconCopyLine";Ld.propTypes={...se.propTypes};Ld.allowedProps=[...se.allowedProps];var i2;class Nd extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(se,Object.assign({},this.props,{name:"IconDiscussion",viewBox:"0 0 1920 1920",elementRef:this.handleRef,bidirectional:!0}),i2||(i2=z.createElement("path",{d:"M677.647 16v338.936h112.941V129.054h1016.47V919.53h-225.994v259.765L1321.412 919.53h-79.172V467.878H0v1016.47h338.71v418.9l417.996-418.9h485.534v-451.877h32.753l419.125 419.124v-419.124H1920V16H677.647ZM338.79 919.563h564.706v-112.94H338.79v112.94Zm0 225.883h338.936v-113.054H338.79v113.054Zm-225.85-564.74h1016.47v790.701H710.4L451.652 1631.06v-259.652h-338.71V580.706Z",fillRule:"evenodd"})))}}Nd.glyphName="discussion";Nd.variant="Line";Nd.displayName="IconDiscussionLine";Nd.propTypes={...se.propTypes};Nd.allowedProps=[...se.allowedProps];var r2;class ku extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(se,Object.assign({},this.props,{name:"IconHamburger",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),r2||(r2=z.createElement("path",{d:"M1920 1468.412v112.94H0v-112.94h1920Zm0-564.706v112.941H0V903.706h1920ZM1920 339v112.941H0V339h1920Z",fillRule:"evenodd"})))}}ku.glyphName="hamburger";ku.variant="Line";ku.displayName="IconHamburgerLine";ku.propTypes={...se.propTypes};ku.allowedProps=[...se.allowedProps];var o2;class Md extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(se,Object.assign({},this.props,{name:"IconHeart",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),o2||(o2=z.createElement("path",{d:"m1692.48 910.647-732.762 687.36-731.182-685.779c-154.616-156.875-154.616-412.122 0-568.997 74.542-75.558 173.704-117.233 279.304-117.233h.113c105.487 0 204.65 41.675 279.078 117.233l.113.113c74.767 75.783 116.103 176.865 116.103 284.385h112.941c0-107.52 41.224-208.602 116.104-284.498 74.428-75.558 173.59-117.233 279.19-117.233h.113c105.487 0 204.763 41.675 279.19 117.233 154.617 156.875 154.617 412.122 1.695 567.416m78.833-646.701c-95.887-97.355-223.737-150.89-359.718-150.89h-.113c-136.094 0-263.83 53.535-359.604 150.777-37.61 38.061-68.443 80.979-92.16 127.398-23.718-46.42-54.664-89.337-92.16-127.285-95.774-97.355-223.51-150.89-359.605-150.89h-.113c-135.981 0-263.83 53.535-359.83 150.89-197.648 200.696-197.648 526.983 1.694 729.035l810.014 759.868L1771.313 991.4c197.647-200.47 197.647-526.758 0-727.454",fillRule:"evenodd"})))}}Md.glyphName="heart";Md.variant="Line";Md.displayName="IconHeartLine";Md.propTypes={...se.propTypes};Md.allowedProps=[...se.allowedProps];var s2;class Dd extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(se,Object.assign({},this.props,{name:"IconMiniArrowDouble",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),s2||(s2=z.createElement("path",{d:"M1319.1 790.054 1020.06 355.79c-33.165-48.165-87.553-47.273-120.104 0L600.92 790.054c-33.166 48.165-12.581 87.21 46.116 87.21h625.944c58.64 0 78.67-39.938 46.12-87.21ZM600.634 1129.94l299.035 434.27c33.167 48.16 87.554 47.27 120.101 0l299.04-434.27c33.17-48.16 12.58-87.21-46.12-87.21H646.75c-58.636 0-78.668 39.94-46.116 87.21Z"})))}}Dd.glyphName="mini-arrow-double";Dd.variant="Line";Dd.displayName="IconMiniArrowDoubleLine";Dd.propTypes={...se.propTypes};Dd.allowedProps=[...se.allowedProps];var a2;class Bd extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(se,Object.assign({},this.props,{name:"IconMiniArrowDown",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),a2||(a2=z.createElement("path",{d:"M994.034 1226.26c-18.796 27.296-49.269 27.3-68.067 0L574.893 716.424C556.096 689.128 567.713 667 600.852 667h718.297c33.133 0 44.757 22.125 25.959 49.424L994.034 1226.26Z",fillRule:"evenodd"})))}}Bd.glyphName="mini-arrow-down";Bd.variant="Line";Bd.displayName="IconMiniArrowDownLine";Bd.propTypes={...se.propTypes};Bd.allowedProps=[...se.allowedProps];var l2;class Qd extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(se,Object.assign({},this.props,{name:"IconMiniArrowUp",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),l2||(l2=z.createElement("path",{d:"M994.034 694.296c-18.796-27.296-49.269-27.3-68.067 0l-351.074 509.836c-18.797 27.296-7.18 49.424 25.959 49.424h718.297c33.133 0 44.757-22.125 25.959-49.424L994.034 694.296Z",fillRule:"evenodd"})))}}Qd.glyphName="mini-arrow-up";Qd.variant="Line";Qd.displayName="IconMiniArrowUpLine";Qd.propTypes={...se.propTypes};Qd.allowedProps=[...se.allowedProps];var u2;class Fd extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(se,Object.assign({},this.props,{name:"IconMore",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),u2||(u2=z.createElement("path",{d:"M960 1468.235c93.448 0 169.412 75.965 169.412 169.412 0 93.448-75.964 169.412-169.412 169.412-93.448 0-169.412-75.964-169.412-169.412 0-93.447 75.964-169.412 169.412-169.412Zm0-677.647c93.448 0 169.412 75.964 169.412 169.412 0 93.448-75.964 169.412-169.412 169.412-93.448 0-169.412-75.964-169.412-169.412 0-93.448 75.964-169.412 169.412-169.412Zm0-677.647c93.448 0 169.412 75.964 169.412 169.412 0 93.447-75.964 169.412-169.412 169.412-93.448 0-169.412-75.965-169.412-169.412 0-93.448 75.964-169.412 169.412-169.412Z",fillRule:"evenodd"})))}}Fd.glyphName="more";Fd.variant="Line";Fd.displayName="IconMoreLine";Fd.propTypes={...se.propTypes};Fd.allowedProps=[...se.allowedProps];var c2;class zd extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(se,Object.assign({},this.props,{name:"IconQuestion",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),c2||(c2=z.createElement("path",{d:"M960 1807.059c-467.125 0-847.059-379.934-847.059-847.059 0-467.125 379.934-847.059 847.059-847.059 467.125 0 847.059 379.934 847.059 847.059 0 467.125-379.934 847.059-847.059 847.059M960 0C430.645 0 0 430.645 0 960s430.645 960 960 960 960-430.645 960-960S1489.355 0 960 0m.056 1355.181 56.471.113h-56.47v-.113ZM752.64 409.65c83.69-64.715 191.661-86.4 296.696-59.294 114.862 29.703 208.264 123.106 237.968 237.967 23.378 90.466 10.729 183.303-35.464 261.459-45.515 77.026-121.186 133.948-207.586 156.084-13.779 3.502-27.783 14.796-27.783 31.85v91.708H903.529v-91.708c0-66.07 46.306-124.123 112.716-141.29 57.6-14.682 107.971-52.63 138.353-104.018 30.833-52.292 39.19-114.749 23.378-175.85-19.651-75.67-81.204-137.223-156.875-156.875-70.927-18.184-143.548-3.953-199.341 39.303-55.68 43.144-87.642 108.311-87.642 178.673H621.176c0-105.6 47.888-203.294 131.464-268.01Zm207.416 832.704c-62.343 0-112.94 50.71-112.94 112.941 0 62.23 50.597 112.941 112.94 112.941 62.231 0 112.942-50.71 112.942-112.94 0-62.231-50.71-112.942-112.942-112.942Z",fillRule:"evenodd"})))}}zd.glyphName="question";zd.variant="Line";zd.displayName="IconQuestionLine";zd.propTypes={...se.propTypes};zd.allowedProps=[...se.allowedProps];var d2;class Hd extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(se,Object.assign({},this.props,{name:"IconRss",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),d2||(d2=z.createElement("path",{d:"M1616.875 1813.333c-27.627-820.266-689.92-1482.56-1510.187-1510.186V107.52c928.213 27.733 1678.08 777.6 1705.813 1705.813h-195.626ZM53.355 0H.02v408.853h53.334c803.733 0 1457.706 653.974 1457.706 1457.814V1920h408.96v-53.333C1920.021 837.44 1082.581 0 53.355 0Zm933.984 1813.333c-26.667-473.493-407.147-853.973-880.64-880.746V736.853c581.226 27.094 1049.28 495.254 1076.373 1076.48H987.339ZM53.365 628.907H.032v408.853h53.333c456.96 0 828.8 371.947 828.8 828.907V1920h408.854v-53.333c0-682.454-555.2-1237.76-1237.654-1237.76ZM267.19 1812.288c-88 0-159.573-71.573-159.573-159.467 0-87.893 71.573-159.466 159.573-159.466 87.894 0 159.467 71.573 159.467 159.466 0 87.894-71.573 159.467-159.467 159.467m0-425.6c-146.773 0-266.24 119.36-266.24 266.133 0 146.774 119.467 266.134 266.24 266.134 146.774 0 266.134-119.36 266.134-266.134 0-146.773-119.36-266.133-266.134-266.133",fillRule:"evenodd"})))}}Hd.glyphName="rss";Hd.variant="Line";Hd.displayName="IconRssLine";Hd.propTypes={...se.propTypes};Hd.allowedProps=[...se.allowedProps];var h2;class xu extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(se,Object.assign({},this.props,{name:"IconSearch",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),h2||(h2=z.createElement("path",{d:"M790.588 1468.235c-373.722 0-677.647-303.924-677.647-677.647 0-373.722 303.925-677.647 677.647-677.647 373.723 0 677.647 303.925 677.647 677.647 0 373.723-303.924 677.647-677.647 677.647Zm596.781-160.715c120.396-138.692 193.807-319.285 193.807-516.932C1581.176 354.748 1226.428 0 790.588 0S0 354.748 0 790.588s354.748 790.588 790.588 790.588c197.647 0 378.24-73.411 516.932-193.807l516.028 516.142 79.963-79.963-516.142-516.028Z",fillRule:"evenodd"})))}}xu.glyphName="search";xu.variant="Line";xu.displayName="IconSearchLine";xu.propTypes={...se.propTypes};xu.allowedProps=[...se.allowedProps];var f2;class Ud extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(se,Object.assign({},this.props,{name:"IconTrouble",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),f2||(f2=z.createElement("path",{d:"M961 1C431.645 1 1 431.645 1 961s430.645 960 960 960 960-430.645 960-960S1490.355 1 961 1m0 1807.059c-467.125 0-847.059-379.934-847.059-847.059 0-467.125 379.934-847.059 847.059-847.059 467.125 0 847.059 379.934 847.059 847.059 0 467.125-379.934 847.059-847.059 847.059m319.465-1246.374-319.51 319.51-319.398-319.51-79.85 79.85 319.398 319.51-319.397 319.398 79.85 79.85 319.397-319.398 319.51 319.397 79.85-79.85-319.51-319.397 319.51-319.51-79.85-79.85Z",fillRule:"evenodd"})))}}Ud.glyphName="trouble";Ud.variant="Line";Ud.displayName="IconTroubleLine";Ud.propTypes={...se.propTypes};Ud.allowedProps=[...se.allowedProps];var p2;class iu extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(se,Object.assign({},this.props,{name:"IconX",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),p2||(p2=z.createElement("path",{d:"M954.64 826.418 426.667 298.445 298.445 426.667 826.418 954.64l-527.973 527.973 128.222 128.222 527.973-527.973 527.973 527.973 128.222-128.222-527.973-527.973 527.973-527.973-128.222-128.222z"})))}}iu.glyphName="x";iu.variant="Line";iu.displayName="IconXLine";iu.propTypes={...se.propTypes};iu.allowedProps=[...se.allowedProps];var m2;class Sa extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(se,Object.assign({},this.props,{name:"IconArrowOpenDown",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),m2||(m2=z.createElement("path",{d:"m.08 568.063 176.13-176.13 783.988 783.864 783.74-783.864 176.129 176.13-959.87 960.118z",fillRule:"evenodd"})))}}Sa.glyphName="arrow-open-down";Sa.variant="Solid";Sa.displayName="IconArrowOpenDownSolid";Sa.propTypes={...se.propTypes};Sa.allowedProps=[...se.allowedProps];var g2;class wa extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(se,Object.assign({},this.props,{name:"IconArrowOpenEnd",viewBox:"0 0 1920 1920",elementRef:this.handleRef,bidirectional:!0}),g2||(g2=z.createElement("path",{d:"M568.13.012 392 176.142l783.864 783.989L392 1743.87 568.13 1920l960.118-959.87z",fillRule:"evenodd"})))}}wa.glyphName="arrow-open-end";wa.variant="Solid";wa.displayName="IconArrowOpenEndSolid";wa.propTypes={...se.propTypes};wa.allowedProps=[...se.allowedProps];var O2;class Wd extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(se,Object.assign({},this.props,{name:"IconArrowOpenStart",viewBox:"0 0 1920 1920",elementRef:this.handleRef,bidirectional:!0}),O2||(O2=z.createElement("path",{d:"m1352.005.012 176.13 176.13-783.864 783.989 783.864 783.74L1352.005 1920 391.887 960.13z",fillRule:"evenodd"})))}}Wd.glyphName="arrow-open-start";Wd.variant="Solid";Wd.displayName="IconArrowOpenStartSolid";Wd.propTypes={...se.propTypes};Wd.allowedProps=[...se.allowedProps];var b2;class _u extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(se,Object.assign({},this.props,{name:"IconArrowOpenUp",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),b2||(b2=z.createElement("path",{d:"m.08 1351.937 176.13 176.13 783.988-783.864 783.74 783.864 176.129-176.13-959.87-960.118z",fillRule:"evenodd"})))}}_u.glyphName="arrow-open-up";_u.variant="Solid";_u.displayName="IconArrowOpenUpSolid";_u.propTypes={...se.propTypes};_u.allowedProps=[...se.allowedProps];var y2;class Eu extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(se,Object.assign({},this.props,{name:"IconCheckMark",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),y2||(y2=z.createElement("path",{d:"M1743.858 267.012 710.747 1300.124 176.005 765.382 0 941.387l710.747 710.871 1209.24-1209.116z",fillRule:"evenodd"})))}}Eu.glyphName="check-mark";Eu.variant="Solid";Eu.displayName="IconCheckMarkSolid";Eu.propTypes={...se.propTypes};Eu.allowedProps=[...se.allowedProps];var v2;class Cu extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(se,Object.assign({},this.props,{name:"IconCheck",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),v2||(v2=z.createElement("path",{d:"M1743.858 267.012 710.747 1300.124 176.005 765.382 0 941.387l710.747 710.871 1209.24-1209.116z",fillRule:"evenodd"})))}}Cu.glyphName="check";Cu.variant="Solid";Cu.displayName="IconCheckSolid";Cu.propTypes={...se.propTypes};Cu.allowedProps=[...se.allowedProps];var S2;class Vd extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(se,Object.assign({},this.props,{name:"IconInfoBorderless",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),S2||(S2=z.createElement("path",{d:"M1229.93 594.767c36.644 37.975 50.015 91.328 43.72 142.909-9.128 74.877-30.737 144.983-56.093 215.657-27.129 75.623-54.66 151.09-82.332 226.512-44.263 120.685-88.874 241.237-132.65 362.1-10.877 30.018-18.635 62.072-21.732 93.784-3.376 34.532 21.462 51.526 52.648 36.203 24.977-12.278 49.288-28.992 68.845-48.768 31.952-32.31 63.766-64.776 94.805-97.98 15.515-16.605 30.86-33.397 45.912-50.438 11.993-13.583 24.318-34.02 40.779-42.28 31.17-15.642 55.226 22.846 49.582 49.794-5.39 25.773-23.135 48.383-39.462 68.957l-1.123 1.416a1559.53 1559.53 0 0 0-4.43 5.6c-54.87 69.795-115.043 137.088-183.307 193.977-67.103 55.77-141.607 103.216-223.428 133.98-26.65 10.016-53.957 18.253-81.713 24.563-53.585 12.192-112.798 11.283-167.56 3.333-40.151-5.828-76.246-31.44-93.264-68.707-29.544-64.698-8.98-144.595 6.295-210.45 18.712-80.625 46.8-157.388 75.493-234.619l2.18-5.867 1.092-2.934 2.182-5.87 2.182-5.873c33.254-89.517 67.436-178.676 101.727-267.797 31.294-81.296 62.72-162.537 93.69-243.95 2.364-6.216 5.004-12.389 7.669-18.558l1-2.313c6.835-15.806 13.631-31.617 16.176-48.092 6.109-39.537-22.406-74.738-61.985-51.947-68.42 39.4-119.656 97.992-170.437 156.944l-6.175 7.17c-15.78 18.323-31.582 36.607-47.908 54.286-16.089 17.43-35.243 39.04-62.907 19.07-29.521-21.308-20.765-48.637-3.987-71.785 93.18-128.58 205.056-248.86 350.86-316.783 60.932-28.386 146.113-57.285 225.882-58.233 59.802-.707 116.561 14.29 157.774 56.99Zm92.038-579.94c76.703 29.846 118.04 96.533 118.032 190.417-.008 169.189-182.758 284.908-335.53 212.455-78.956-37.446-117.358-126.202-98.219-227.002 26.494-139.598 183.78-227.203 315.717-175.87Z",fillRule:"evenodd"})))}}Vd.glyphName="info-borderless";Vd.variant="Solid";Vd.displayName="IconInfoBorderlessSolid";Vd.propTypes={...se.propTypes};Vd.allowedProps=[...se.allowedProps];var w2;class jd extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(se,Object.assign({},this.props,{name:"IconInstructureLogo",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),w2||(w2=z.createElement("path",{d:"M1448.57 288.052 1084.46 502.746 1448.55 718.026 1813.23 502.732 1448.57 288.052ZM959.966 429.191 1323.92 214.589 959.988 0 596.032 214.602 959.966 429.191ZM835.499 502.732 471.388 288.038 106.704 502.732 471.388 718.026 835.499 502.732ZM106.667 1416.54 960 1920 1813.33 1416.54 960 913.07 106.667 1416.54Z"})))}}jd.glyphName="instructure-logo";jd.variant="Solid";jd.displayName="IconInstructureLogoSolid";jd.propTypes={...se.propTypes};jd.allowedProps=[...se.allowedProps];var k2;class Xd extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(se,Object.assign({},this.props,{name:"IconNo",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),k2||(k2=z.createElement("path",{d:"M213.333 960c0-167.36 56-321.707 149.44-446.4L1406.4 1557.227c-124.693 93.44-279.04 149.44-446.4 149.44-411.627 0-746.667-335.04-746.667-746.667m1493.334 0c0 167.36-56 321.707-149.44 446.4L513.6 362.773c124.693-93.44 279.04-149.44 446.4-149.44 411.627 0 746.667 335.04 746.667 746.667M960 0C429.76 0 0 429.76 0 960s429.76 960 960 960 960-429.76 960-960S1490.24 0 960 0",fillRule:"evenodd"})))}}Xd.glyphName="no";Xd.variant="Solid";Xd.displayName="IconNoSolid";Xd.propTypes={...se.propTypes};Xd.allowedProps=[...se.allowedProps];var x2;class Zd extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(se,Object.assign({},this.props,{name:"IconWarningBorderless",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),x2||(x2=z.createElement("path",{d:"M994.578 1436.356c-133.365 0-241.822 108.457-241.822 241.822S861.213 1920 994.578 1920s241.822-108.457 241.822-241.822-108.457-241.822-241.822-241.822zm170.485-120.912L1310.156 0H679l145.093 1315.444z",fillRule:"evenodd"})))}}Zd.glyphName="warning-borderless";Zd.variant="Solid";Zd.displayName="IconWarningBorderlessSolid";Zd.propTypes={...se.propTypes};Zd.allowedProps=[...se.allowedProps];var _2;class Tu extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(se,Object.assign({},this.props,{name:"IconX",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),_2||(_2=z.createElement("path",{d:"M797.32 985.882 344.772 1438.43l188.561 188.562 452.549-452.549 452.548 452.549 188.562-188.562-452.549-452.548 452.549-452.549-188.562-188.561L985.882 797.32 533.333 344.772 344.772 533.333z"})))}}Tu.glyphName="x";Tu.variant="Solid";Tu.displayName="IconXSolid";Tu.propTypes={...se.propTypes};Tu.allowedProps=[...se.allowedProps];const bX=(t,e)=>{const n=e.placement,i=e.offset,r={none:0,"x-small":t.offsetXSmall,small:t.offsetSmall,medium:t.offsetMedium},o=()=>{const s=r[i];return{...s!==0&&{top:s},insetInlineStart:n==="start"?s:"auto",insetInlineEnd:n==="end"?s:"auto"}};return{closeButton:{label:"closeButton",zIndex:t.zIndex,display:"inline-block",...n==="static"?{position:"static"}:{position:"absolute",...o()}}}},yX=t=>{const e=t.spacing,n=t.stacking;return{...{offsetMedium:e==null?void 0:e.medium,offsetSmall:e==null?void 0:e.small,offsetXSmall:e==null?void 0:e.xSmall,zIndex:n==null?void 0:n.above}}},vX={screenReaderLabel:f.oneOfType([f.string,f.node]).isRequired,color:f.oneOf(["primary","primary-inverse"]),interaction:f.oneOf(["enabled","disabled","readonly"]),elementRef:f.func,size:f.oneOf(["small","medium","large"]),onClick:f.func,margin:ut.spacing,placement:f.oneOf(["start","end","static"]),offset:f.oneOf(["none","x-small","small","medium"]),type:f.oneOf(["button","submit","reset"]),as:f.elementType,href:f.string,cursor:f.string,tabIndex:f.number},SX=["as","color","cursor","elementRef","href","interaction","margin","offset","onClick","placement","screenReaderLabel","size","tabIndex","type"],wX=["screenReaderLabel","elementRef","size","onClick","margin","placement","offset","type","as","href","cursor","tabIndex","styles"];var E2,C2,Om,La;let kX=(E2=de(bX,yX),C2=Le(),E2(Om=C2(Om=(La=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;typeof i=="function"&&i(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}get interaction(){return Yo({props:this.props})}get color(){const e=this.props.color;return e==="primary"?"secondary":e}render(){const e=this.props,n=e.screenReaderLabel;e.elementRef;const i=e.size,r=e.onClick,o=e.margin;e.placement,e.offset;const s=e.type,a=e.as,l=e.href,u=e.cursor,c=e.tabIndex,d=e.styles,h=Ie(e,wX);return C("span",Object.assign({},It(h),{css:d==null?void 0:d.closeButton,ref:p=>this.ref=p}),C(ib,{renderIcon:Tu,elementRef:this.handleRef,interaction:this.interaction,type:s,color:this.color,size:i,onClick:r,margin:o,withBorder:!1,withBackground:!1,as:a,href:l,cursor:u,tabIndex:c},C(ji,null,n)))}},La.displayName="CloseButton",La.componentId="CloseButton",La.propTypes=vX,La.allowedProps=SX,La.defaultProps={interaction:void 0,type:"button",placement:"static",offset:"x-small",size:"small",margin:"0",as:"button",cursor:"pointer"},La))||Om)||Om);const xX={children:f.oneOfType([f.node,f.func]),renderIcon:f.oneOfType([f.node,f.func]),screenReaderLabel:f.string.isRequired,type:f.oneOf(["button","submit","reset"]),size:f.oneOf(["small","medium","large"]),elementRef:f.func,as:f.elementType,interaction:f.oneOf(["enabled","disabled","readonly"]),color:f.oneOf(["primary","primary-inverse","secondary","success","danger"]),focusColor:f.oneOf(["info","inverse"]),shape:f.oneOf(["rectangle","circle"]),withBackground:f.bool,withBorder:f.bool,margin:ut.spacing,cursor:f.string,href:f.string,onClick:f.func},_X=["as","children","color","cursor","elementRef","focusColor","href","interaction","margin","renderIcon","screenReaderLabel","shape","size","type","withBackground","withBorder","onClick"],EX=["children","renderIcon","screenReaderLabel","type","size","elementRef","as","interaction","color","focusColor","shape","withBackground","withBorder","margin","cursor","href"];var T2,P2,bm,Na;let I0=(T2=de(null,jk),P2=Le(),T2(bm=P2(bm=(Na=class extends T.Component{constructor(...e){super(...e),this._baseButton=null,this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}get focused(){return this._baseButton&&this._baseButton.focused}focus(){this._baseButton&&this._baseButton.focus()}render(){const e=this.props,n=e.children,i=e.renderIcon,r=e.screenReaderLabel,o=e.type,s=e.size;e.elementRef;const a=e.as,l=e.interaction,u=e.color,c=e.focusColor,d=e.shape,h=e.withBackground,p=e.withBorder,m=e.margin,O=e.cursor,y=e.href,b=Ie(e,EX),v=this.props.themeOverride;return z.createElement(ib,Object.assign({},It(b),{type:o,size:s,elementRef:this.handleRef,as:a,interaction:l,color:u,focusColor:c,shape:d,withBackground:h,withBorder:p,margin:m,cursor:O,href:y,renderIcon:n||i,themeOverride:v,ref:S=>{this._baseButton=S}}),z.createElement(ji,null,r))}},Na.displayName="IconButton",Na.componentId="IconButton",Na.propTypes=xX,Na.allowedProps=_X,Na.defaultProps={type:"button",size:"medium",as:"button",interaction:void 0,color:"secondary",shape:"rectangle",withBackground:!0,withBorder:!0,margin:"0",cursor:"pointer"},Na))||bm)||bm);const CX={children:f.node,as:f.elementType,display:f.oneOf(["auto","block","inline-block"]),label:f.string,open:f.bool,onBlur:f.func,onDismiss:f.func,defaultFocusElement:f.oneOfType([f.element,f.func]),contentElement:f.oneOfType([f.element,f.func]),liveRegion:f.oneOfType([wi,f.arrayOf(wi),f.func]),shouldContainFocus:f.oneOfType([f.bool,f.oneOf(["keyboard","screenreader"])]),shouldReturnFocus:f.bool,shouldCloseOnDocumentClick:f.bool,shouldCloseOnEscape:f.bool,shouldFocusOnOpen:f.bool,elementRef:f.func},TX=["children","as","display","label","open","onBlur","onDismiss","defaultFocusElement","contentElement","liveRegion","shouldContainFocus","shouldReturnFocus","shouldCloseOnDocumentClick","shouldCloseOnEscape","shouldFocusOnOpen","elementRef"],PX=["open","contentElement"],AX=["open","contentElement"];class zr extends T.Component{constructor(...e){super(...e),this._raf=[],this._focusRegion=null,this.ref=null,this.getRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}get _root(){return this.ref}componentDidUpdate(e){const n=this.props,i=n.open;n.contentElement;const r=Ie(n,PX);i&&!e.open?this.open():!i&&e.open&&this.close(),this._focusRegion&&this._focusRegion.updateElement(this.contentElement,r)}componentDidMount(){this.props.open&&this.open()}componentWillUnmount(){this.props.open&&this.close(),this._raf.forEach(e=>e.cancel()),this._raf=[]}open(){const e=this.props;e.open,e.contentElement;const n=Ie(e,AX);this._raf.push(qo(()=>{this._focusRegion=Jn.activateRegion(this.contentElement,{...n})}))}close(){const e=this._focusRegion,n=this.contentElement;e&&Jn.blurRegion(n,e.id)}focus(){if(!this.props.open||!this.contentElement){Ye(!1,"[Dialog] Can't focus a Dialog that isn't open.");return}this._focusRegion&&Jn.focusRegion(this.contentElement,this._focusRegion.id)}blur(){if(!this.props.open||!this.contentElement){Ye(!1,"[Dialog] Can't blur a Dialog that isn't open.");return}this.close()}get contentElement(){let e=it(this.props.contentElement);return e||(e=it(this.ref)),e}get focused(){return this.contentElement&&this._focusRegion&&Jn.isFocused(this.contentElement,this._focusRegion.id)}render(){const e=oi(zr,this.props),n=this.props.role||(this.props.label?"dialog":void 0);return this.props.open?z.createElement(e,Object.assign({},Re(this.props,zr.allowedProps),{role:n,"aria-label":this.props.label,className:this.props.className,ref:this.getRef}),this.props.children):null}}zr.displayName="Dialog";zr.componentId="Dialog";zr.propTypes=CX;zr.allowedProps=TX;zr.defaultProps={open:!1,shouldFocusOnOpen:!0,shouldContainFocus:!1,shouldReturnFocus:!1,shouldCloseOnDocumentClick:!0,shouldCloseOnEscape:!0};const RX={isShowingContent:f.bool,defaultIsShowingContent:f.bool,on:f.oneOfType([f.oneOf(["click","hover","focus"]),f.arrayOf(f.oneOf(["click","hover","focus"]))]),withArrow:f.bool,color:f.oneOf(["primary","primary-inverse"]),placement:Kt.placement,shadow:ut.shadow,stacking:ut.stacking,contentRef:f.func,defaultFocusElement:f.oneOfType([f.element,f.func]),screenReaderLabel:f.string,offsetX:f.oneOfType([f.string,f.number]),offsetY:f.oneOfType([f.string,f.number]),constrain:Kt.constrain,positionTarget:f.oneOfType([wi,f.func]),positionContainerDisplay:f.oneOf(["inline-block","block"]),mountNode:Kt.mountNode,insertAt:f.oneOf(["bottom","top"]),liveRegion:f.oneOfType([wi,f.arrayOf(wi),f.func]),id:f.string,shouldAlignArrow:f.bool,shouldTrackPosition:f.bool,shouldRenderOffscreen:f.bool,shouldContainFocus:f.bool,shouldReturnFocus:f.bool,shouldCloseOnDocumentClick:f.bool,shouldCloseOnEscape:f.bool,shouldFocusContentOnTriggerBlur:f.bool,onShowContent:f.func,onHideContent:f.func,onPositioned:f.func,onPositionChanged:f.func,onClick:f.func,onFocus:f.func,onBlur:f.func,onKeyDown:f.func,onKeyUp:f.func,onMouseOver:f.func,onMouseOut:f.func,renderTrigger:f.oneOfType([f.node,f.func]),children:f.oneOfType([f.node,f.func]),elementRef:f.func},IX=["isShowingContent","defaultIsShowingContent","on","withArrow","color","placement","shadow","stacking","contentRef","defaultFocusElement","screenReaderLabel","offsetX","offsetY","constrain","positionTarget","positionContainerDisplay","mountNode","insertAt","liveRegion","id","shouldAlignArrow","shouldTrackPosition","shouldRenderOffscreen","shouldContainFocus","shouldReturnFocus","shouldCloseOnDocumentClick","shouldCloseOnEscape","shouldFocusContentOnTriggerBlur","onShowContent","onHideContent","onPositioned","onPositionChanged","onClick","onFocus","onBlur","onKeyDown","onKeyUp","onMouseOver","onMouseOut","renderTrigger","children","elementRef"];var A2,R2,I2,Yu,Ma;let rb=(A2=zt(),R2=Mr(),I2=Le(),A2(Yu=R2(Yu=I2(Yu=(Ma=class extends T.Component{constructor(e){super(e),this._handleMouseOver=void 0,this._handleMouseOut=void 0,this._id=void 0,this._raf=[],this._trigger=null,this._view=null,this._dialog=null,this._contentElement=null,this._focusRegion=void 0,this._renderTrigger=void 0,this._renderTriggerProp=void 0,this.mouseOutTimeout=void 0,this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.show=n=>{var i,r;typeof this.props.isShowingContent>"u"&&this.setState({isShowingContent:!0}),(i=(r=this.props).onShowContent)===null||i===void 0||i.call(r,n)},this.hide=(n,i=!1)=>{const r=this.props,o=r.onHideContent,s=r.isShowingContent;typeof s>"u"?this.setState(({isShowingContent:a})=>(a&&(o==null||o(n,{documentClick:i})),{isShowingContent:!1})):s&&(o==null||o(n,{documentClick:i}))},this.toggle=n=>{this.shown?this.hide(n):this.show(n)},this.handleDialogDismiss=(n,i)=>{if(!this.props.shouldReturnFocus&&this.props.shouldFocusContentOnTriggerBlur){const r=it(this._trigger);r&&typeof r.focus=="function"&&r.focus()}this.hide(n,i)},this.handleDialogBlur=n=>{n.keyCode===lr.codes.tab&&n.shiftKey&&this.props.shouldFocusContentOnTriggerBlur||this.hide(n)},this.handleTriggerKeyDown=n=>{this.props.shouldFocusContentOnTriggerBlur&&n.keyCode===lr.codes.tab&&!n.shiftKey&&(n.preventDefault(),this._raf.push(qo(()=>{this._dialog&&this._dialog.focus()})))},this.handleTriggerKeyUp=n=>{n.keyCode===lr.codes.esc&&this.shown&&this.isTooltip&&(n.preventDefault(),this.hide(n))},this.handleTriggerBlur=n=>{const i=this.props.on;i&&i.indexOf("focus")>-1&&this._raf.push(qo(()=>{nu(this._view)||this.hide(n)}))},this.handlePositioned=n=>{var i,r;const o=n.placement;this.setState({placement:o,...this.computeOffsets(o)}),(i=(r=this.props).onPositioned)===null||i===void 0||i.call(r,n)},this.handlePositionChanged=n=>{var i,r;const o=n.placement;this.setState({placement:o,...this.computeOffsets(o)}),(i=(r=this.props).onPositionChanged)===null||i===void 0||i.call(r,n)},this._renderTriggerProp=this.props.renderTrigger,this._renderTrigger=rt(this.props.renderTrigger),this.state={placement:e.placement,offsetX:e.offsetX,offsetY:e.offsetY,isShowingContent:typeof e.isShowingContent>"u"?e.defaultIsShowingContent:void 0},this._id=this.props.id||e.deterministicId(),this._raf=[],this._handleMouseOver=bC.bind(null,n=>{this.show(n),clearTimeout(this.mouseOutTimeout)}),this._handleMouseOut=bC.bind(null,n=>{this.mouseOutTimeout=setTimeout(()=>{this.hide(n)},1)})}get isTooltip(){return this.props.shouldRenderOffscreen&&!this.props.shouldReturnFocus&&!this.props.shouldContainFocus&&!this.props.shouldFocusContentOnTriggerBlur}componentDidMount(){this.isTooltip&&(this._focusRegion=new hM(this._contentElement,{shouldCloseOnEscape:!1,shouldCloseOnDocumentClick:!1,onDismiss:this.hide}),this.shown&&this._focusRegion.activate())}componentWillUnmount(){this._raf.forEach(e=>e.cancel()),this._raf=[],this._focusRegion&&(this._focusRegion.deactivate(),this._focusRegion.blur())}shouldComponentUpdate(e,n){return!T0(this.props,e)||!T0(this.state,n)}componentDidUpdate(e,n){this._focusRegion&&this.isTooltip&&((!e.isShowingContent&&this.props.isShowingContent||!n.isShowingContent&&this.state.isShowingContent)&&(this._focusRegion.activate(),this._focusRegion.focus()),(e.isShowingContent&&!this.props.isShowingContent||n.isShowingContent&&!this.state.isShowingContent)&&this._focusRegion.deactivate()),(this.props.offsetX!==e.offsetX||this.props.offsetY!==e.offsetY||this.props.placement!==e.placement||this.props.shouldAlignArrow!==e.shouldAlignArrow||this.props.withArrow!==e.withArrow)&&this.setState({...this.computeOffsets(this.placement)})}computeOffsets(e){let n=this.props,i=n.offsetX,r=n.offsetY;if(this.props.shouldAlignArrow&&this._view){const o=bM(e)[1],s=this._view.props.styles,a=s.arrowSize,l=a===void 0?0:a,u=s.arrowBorderWidth,c=u===void 0?0:u,d=(Yn(l)+Yn(c))*2;o==="start"?i=d:o==="end"?i=-d:o==="top"?r=d:o==="bottom"&&(r=-d)}return{offsetX:i,offsetY:r}}get placement(){let e=this.props.placement;return this.props.dir===Mr.DIRECTION.rtl&&(e=Nv(e," ")),!this.shown&&this.props.shouldRenderOffscreen?"offscreen":e}get positionProps(){return{offsetX:this.state.offsetX,offsetY:this.state.offsetY,shouldTrackPosition:this.props.shouldTrackPosition&&this.shown,insertAt:this.props.insertAt,placement:this.placement,constrain:this.props.constrain,onPositioned:this.handlePositioned,onPositionChanged:this.handlePositionChanged,target:this.props.positionTarget,containerDisplay:this.props.positionContainerDisplay,mountNode:this.props.mountNode,id:this._id}}get shown(){return typeof this.props.isShowingContent>"u"?this.state.isShowingContent:this.props.isShowingContent}get defaultFocusElement(){return this.props.defaultFocusElement}renderTrigger(){this._renderTriggerProp!=this.props.renderTrigger&&(this._renderTriggerProp=this.props.renderTrigger,this._renderTrigger=rt(this.props.renderTrigger));let e=this._renderTrigger;if(e){const n=this.props,i=n.on,r=n.shouldContainFocus;let o,s,a,l,u;i&&i.indexOf("click")>-1&&(o=c=>{this.toggle(c)}),i&&i.indexOf("hover")>-1&&(Ye(i!=="hover",'[Popover] Specifying only the `"hover"` trigger limits the visibility of the Popover to just mouse users. Consider also including the `"focus"` trigger so that touch and keyboard only users can see the Popover content as well.'),l=this._handleMouseOver,a=this._handleMouseOut),i&&i.indexOf("focus")>-1&&(s=c=>{this.show(c)}),r?(u=this.shown?"true":"false","aria-expanded"in this.props&&(u=this.props["aria-expanded"])):u=void 0,e=$t(e,{ref:c=>{this._trigger=c},"aria-expanded":u,"data-popover-trigger":!0,onKeyDown:lt(this.handleTriggerKeyDown,this.props.onKeyDown),onKeyUp:lt(this.handleTriggerKeyUp,this.props.onKeyUp),onClick:lt(o,this.props.onClick),onBlur:lt(this.handleTriggerBlur,this.props.onBlur),onFocus:lt(s,this.props.onFocus),onMouseOut:lt(a,this.props.onMouseOut),onMouseOver:lt(l,this.props.onMouseOver)})}return e}renderContent(){let e=rt(this.props.children);if(this.shown&&!this.isTooltip&&(e=z.createElement(zr,{open:this.shown,label:this.props.screenReaderLabel,ref:n=>this._dialog=n,display:"block",onBlur:this.handleDialogBlur,onDismiss:this.handleDialogDismiss,liveRegion:this.props.liveRegion,defaultFocusElement:this.props.defaultFocusElement,shouldContainFocus:this.props.shouldContainFocus,shouldReturnFocus:this.props.shouldReturnFocus,shouldFocusOnOpen:!this.props.shouldFocusContentOnTriggerBlur,shouldCloseOnDocumentClick:this.props.shouldCloseOnDocumentClick,shouldCloseOnEscape:this.props.shouldCloseOnEscape},e)),this.shown||this.props.shouldRenderOffscreen){const n=this.props.color;let i={ref:o=>this._view=o,elementRef:o=>{var s,a;this._contentElement=o,(s=(a=this.props).contentRef)===null||s===void 0||s.call(a,o)},background:n,stacking:this.props.stacking,shadow:this.props.shadow,display:"block"};this.isTooltip&&(i={...i,onMouseOver:this._handleMouseOver,onMouseOut:this._handleMouseOut});const r=this.state.placement;return this.props.withArrow?(i={...i,background:n==="primary"?"default":"inverse",placement:this.props.dir===Mr.DIRECTION.rtl?Nv(r," "):r},z.createElement(Tj,i,e)):(i={...i,borderWidth:"small",borderRadius:"medium",...n==="primary-inverse"&&{borderColor:"transparent"}},z.createElement(ye,i,e))}else return null}render(){const e=this.positionProps;return this.props.positionTarget?z.createElement("span",{ref:this.handleRef},this.renderTrigger(),z.createElement(LC,e,this.renderContent())):z.createElement(LC,Object.assign({},e,{renderTarget:this.renderTrigger(),elementRef:this.handleRef}),this.renderContent())}},Ma.displayName="Popover",Ma.componentId="Popover",Ma.allowedProps=IX,Ma.propTypes=RX,Ma.defaultProps={defaultIsShowingContent:!1,placement:"bottom center",stacking:"topmost",shadow:"resting",offsetX:0,offsetY:0,color:"primary",on:["hover","focus"],withArrow:!0,constrain:"window",insertAt:"bottom",shouldAlignArrow:!1,shouldTrackPosition:!0,shouldRenderOffscreen:!1,shouldContainFocus:!1,shouldReturnFocus:!0,shouldCloseOnDocumentClick:!0,shouldFocusContentOnTriggerBlur:!1,shouldCloseOnEscape:!0},Ma))||Yu)||Yu)||Yu);const $X=t=>({tooltip:{label:"tooltip",fontFamily:t.fontFamily,fontWeight:t.fontWeight,boxSizing:"border-box",display:"block",fontSize:t.fontSize,padding:t.padding}}),LX=t=>{const e=t.typography,n=t.spacing;return{...{fontFamily:e==null?void 0:e.fontFamily,fontWeight:e==null?void 0:e.fontWeightNormal,fontSize:e==null?void 0:e.fontSizeSmall,padding:n==null?void 0:n.small}}},NX={elementRef:f.func,children:f.oneOfType([f.node,f.func]).isRequired,renderTip:f.oneOfType([f.node,f.func]).isRequired,isShowingContent:f.bool,defaultIsShowingContent:f.bool,as:f.elementType,on:f.oneOfType([f.oneOf(["click","hover","focus"]),f.arrayOf(f.oneOf(["click","hover","focus"]))]),color:f.oneOf(["primary","primary-inverse"]),placement:Kt.placement,mountNode:Kt.mountNode,constrain:Kt.constrain,offsetX:f.oneOfType([f.string,f.number]),offsetY:f.oneOfType([f.string,f.number]),positionTarget:f.oneOfType([wi,f.func]),onShowContent:f.func,onHideContent:f.func},MX=["elementRef","children","renderTip","isShowingContent","defaultIsShowingContent","as","on","color","placement","mountNode","constrain","offsetX","offsetY","positionTarget","onShowContent","onHideContent"],DX=["renderTip","isShowingContent","defaultIsShowingContent","on","color","placement","mountNode","constrain","offsetX","offsetY","positionTarget","onShowContent","onHideContent","styles"];var $2,L2,N2,Gu,Da;let CM=($2=zt(),L2=de($X,LX),N2=Le(),$2(Gu=L2(Gu=N2(Gu=(Da=class Qv extends T.Component{constructor(e){super(e),this._id=void 0,this.ref=null,this.handleRef=n=>{this.ref=n,typeof this.props.elementRef=="function"&&this.props.elementRef(n)},this.handleFocus=()=>{this.setState({hasFocus:!0})},this.handleBlur=()=>{this.setState({hasFocus:!1})},this._id=e.deterministicId(),this.state={hasFocus:!1}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}renderTrigger(){const e=this.props,n=e.children,i=e.as,r=this.state.hasFocus,o={"aria-describedby":this._id};if(i){const s=oi(Qv,this.props),a=Re(this.props,Qv.allowedProps);return C(s,Object.assign({},a,o),n)}else return typeof n=="function"?n({focused:r,getTriggerProps:s=>({...o,...s})}):Hl(n,o)}render(){const e=this.props,n=e.renderTip,i=e.isShowingContent,r=e.defaultIsShowingContent,o=e.on,s=e.color,a=e.placement,l=e.mountNode,u=e.constrain,c=e.offsetX,d=e.offsetY,h=e.positionTarget,p=e.onShowContent,m=e.onHideContent,O=e.styles,y=Ie(e,DX);return C(rb,Object.assign({},It(y),{isShowingContent:i,defaultIsShowingContent:r,on:o,shouldRenderOffscreen:!0,shouldReturnFocus:!1,placement:a,color:s==="primary"?"primary-inverse":"primary",mountNode:l,constrain:u,shadow:"none",offsetX:c,offsetY:d,positionTarget:h,renderTrigger:()=>this.renderTrigger(),onShowContent:p,onHideContent:m,onFocus:this.handleFocus,onBlur:this.handleBlur,elementRef:this.handleRef,shouldCloseOnDocumentClick:!1}),C("span",{id:this._id,css:O==null?void 0:O.tooltip,role:"tooltip"},rt(n)))}},Da.displayName="Tooltip",Da.componentId="Tooltip",Da.allowedProps=MX,Da.propTypes=NX,Da.defaultProps={defaultIsShowingContent:!1,color:"primary",placement:"top",constrain:"window",offsetX:0,offsetY:0},Da))||Gu)||Gu)||Gu);const BX=t=>({transitioning:`transition--${t}-transitioning`,exited:`transition--${t}-exited`,exiting:`transition--${t}-exiting`,entered:`transition--${t}-entered`,entering:`transition--${t}-entering`}),QX=(t,e)=>{const n=e.type,i=`opacity ${t.duration} ${t.timing}, transform ${t.duration} ${t.timing}`,r={".transition--fade-transitioning":{transition:i},".transition--fade-exiting,\n .transition--fade-exited":{opacity:.01},".transition--fade-entering,\n .transition--fade-entered":{opacity:1}},o={".transition--scale-transitioning":{transition:i},".transition--scale-exiting,\n .transition--scale-exited":{transform:"scale(0.01) translate3d(0, 0, 0)",opacity:.01},".transition--scale-entering,\n .transition--scale-entered":{transform:"scale(1) translate3d(0, 0, 0)",opacity:1}},s={".transition--slide-right-transitioning,\n .transition--slide-left-transitioning,\n .transition--slide-up-transitioning,\n .transition--slide-down-transitioning":{transition:i},".transition--slide-right-exited,\n .transition--slide-left-exited,\n .transition--slide-up-exited,\n .transition--slide-down-exited":{opacity:.01},".transition--slide-right-exiting,\n .transition--slide-right-exited":{transform:"translate3d(100%, 0, 0)"},".transition--slide-left-exiting,\n .transition--slide-left-exited":{transform:"translate3d(-100%, 0, 0)"},".transition--slide-up-exiting,\n .transition--slide-up-exited":{transform:"translate3d(0, -100%, 0)"},".transition--slide-down-exiting,\n .transition--slide-down-exited":{transform:"translate3d(0, 100%, 0)"},".transition--slide-left-entering,\n .transition--slide-right-entering,\n .transition--slide-up-entering,\n .transition--slide-down-entering,\n .transition--slide-left-entered,\n .transition--slide-right-entered,\n .transition--slide-up-entered,\n .transition--slide-down-entered":{transform:"translate3d(0, 0, 0)",opacity:1}};return{duration:t.duration,classNames:BX(n),globalStyles:{...r,...o,...s}}},FX=t=>{const e=t.transitions;return{...{duration:e==null?void 0:e.duration,timing:e==null?void 0:e.timing}}},TM={in:f.bool,unmountOnExit:f.bool,transitionOnMount:f.bool,transitionEnter:f.bool,transitionExit:f.bool,onTransition:f.func,onEnter:f.func,onEntering:f.func,onEntered:f.func,onExit:f.func,onExiting:f.func,onExited:f.func,children:f.node,elementRef:f.func},zX={...TM,enterDelay:f.number,exitDelay:f.number,transitionClassName:f.string.isRequired,exitedClassName:f.string.isRequired,exitingClassName:f.string.isRequired,enteredClassName:f.string.isRequired,enteringClassName:f.string.isRequired,className:f.string},HX=["in","unmountOnExit","transitionOnMount","transitionEnter","transitionExit","enterDelay","exitDelay","transitionClassName","exitedClassName","exitingClassName","enteredClassName","enteringClassName","onTransition","onEnter","onEntering","onEntered","onExit","onExiting","onExited","children","className","elementRef"],Qt={EXITED:-2,EXITING:-1,ENTERING:1,ENTERED:2};class ru extends z.Component{constructor(...e){super(...e),this._timeouts=[],this._unmounted=!1,this.state={transitioning:!1},this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.startTransition=(n,i)=>{const r=this.props,o=r.transitionEnter,s=r.transitionExit;n?this.enter(o&&i?Qt.EXITED:null):this.exit(s&&i?Qt.ENTERED:null)},this.transition=(n,i,r,o=0)=>{if(this._unmounted)return;const s=this.props.onTransition,a=mC(this.ref),l=this.getTransitionClassName(n),u=this.getTransitionClassName(i),c=this.props.transitionClassName;i&&o&&this.transitionEnabled(n)?c&&a.add(c):c&&a.remove(c),u&&a.remove(u),l&&a.add(l),n&&i&&typeof s=="function"&&s(n,i),this._timeouts.push(setTimeout(()=>{this._unmounted||typeof r=="function"&&r()},o))},this.enter=n=>{if(this.state.transitioning||this._unmounted)return;const i=this.props;typeof i.onEnter=="function"&&i.onEnter(),i.transitionEnter?this.setState({transitioning:!0},()=>{const r=()=>{typeof i.onEntering=="function"&&i.onEntering(),this.transition(Qt.ENTERED,Qt.ENTERING,()=>{this.setState({transitioning:!1},()=>{typeof i.onEntered=="function"&&i.onEntered()})})};n?this.transition(n,null,()=>{this.transition(Qt.ENTERING,n,r,i.enterDelay)}):r()}):this.setState({transitioning:!1},()=>{this.transition(Qt.ENTERED,Qt.EXITED),typeof i.onEntered=="function"&&i.onEntered()})},this.exit=n=>{if(this.state.transitioning)return;const i=this.props;typeof i.onExit=="function"&&i.onExit(),i.transitionExit?this.setState({transitioning:!0},()=>{const r=()=>{typeof i.onExiting=="function"&&i.onExiting(),this.transition(Qt.EXITED,Qt.EXITING,()=>{this.setState({transitioning:!1},()=>{typeof i.onExited=="function"&&i.onExited()})})};n?this.transition(n,null,()=>{this.transition(Qt.EXITING,n,r,i.exitDelay)}):r()}):this.setState({transitioning:!1},()=>{this.transition(Qt.EXITED,Qt.ENTERED),typeof i.onExited=="function"&&i.onExited()})}}componentDidMount(){this.startTransition(this.props.in,this.props.transitionOnMount),this._unmounted=!1}getSnapshotBeforeUpdate(e,n){return this.props.in!==e.in&&n.transitioning?!0:null}componentDidUpdate(e,n,i){i&&this.clearTransition(e.transitionClassName),this.props.transitionClassName!==e.transitionClassName&&this.clearTransition(e.transitionClassName),e.in!==this.props.in&&(n.transitioning?(this.clearTransition(e.transitionClassName),clearTimeout(this._timeouts.pop()),this.setState({transitioning:!1},()=>this.startTransition(this.props.in,!0))):this.startTransition(this.props.in,!0))}componentWillUnmount(){this._timeouts.forEach(e=>{clearTimeout(e)}),this._unmounted=!0}clearTransition(e){this._unmounted||this.setState({transitioning:!1},()=>{if(this._unmounted)return;const n=mC(this.ref);Object.values(Qt).forEach(i=>{const r=this.getTransitionClassName(i);r&&n.remove(r)}),n.remove(e)})}transitionEnabled(e){const n=this.props;switch(e){case Qt.EXITED:case Qt.EXITING:return n.transitionExit;case Qt.ENTERED:case Qt.ENTERING:return n.transitionEnter;default:return!1}}getTransitionClassName(e){const n=this.props;switch(e){case Qt.EXITED:return n.exitedClassName;case Qt.ENTERING:return n.enteringClassName;case Qt.ENTERED:return n.enteredClassName;case Qt.EXITING:return n.exitingClassName;default:return}}renderChildren(){return this.props.children?$t(Hl(this.props.children),{"aria-hidden":this.props.in?void 0:!0,ref:e=>{const n=it(e)||null;this.handleRef(n)}}):null}render(){return!this.props.in&&this.props.unmountOnExit&&!this.state.transitioning?null:this.renderChildren()}}ru.displayName="BaseTransition";ru.propTypes=zX;ru.allowedProps=HX;ru.defaultProps={in:!1,unmountOnExit:!1,transitionOnMount:!1,transitionEnter:!0,transitionExit:!0,enterDelay:300,exitDelay:300};ru.states=Qt;const UX=["fade","scale","slide-down","slide-up","slide-left","slide-right"],WX=f.oneOf(UX),VX={type:WX,...TM},jX=["type","children","in","unmountOnExit","transitionOnMount","transitionEnter","transitionExit","onTransition","onEnter","onEntering","onEntered","onExit","onExiting","onExited","elementRef"],XX=["type","children","styles"];var M2,D2,ym,vs;let PM=(M2=de(QX,FX),D2=Le(),M2(ym=D2(ym=(vs=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.handleExited=()=>{typeof this.props.onExited=="function"&&this.props.onExited(this.props.type)},this.handleEntered=()=>{typeof this.props.onEntered=="function"&&this.props.onEntered(this.props.type)},this.renderTransitionHelper=()=>{const n=this.props.styles;return C(U5,{styles:n==null?void 0:n.globalStyles})}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){const e=this.props;e.type;const n=e.children,i=e.styles,r=Ie(e,XX),o=kW(i.duration);return C(z.Fragment,null,this.renderTransitionHelper(),C(ru,Object.assign({},r,{enterDelay:o,exitDelay:o,transitionClassName:i.classNames.transitioning,exitedClassName:i.classNames.exited,exitingClassName:i.classNames.exiting,enteredClassName:i.classNames.entered,enteringClassName:i.classNames.entering,onEntered:this.handleEntered,onExited:this.handleExited,elementRef:this.handleRef}),n))}},vs.displayName="Transition",vs.componentId="Transition",vs.allowedProps=jX,vs.propTypes=VX,vs.defaultProps={type:"fade",in:!1,unmountOnExit:!1,transitionOnMount:!1,transitionEnter:!0,transitionExit:!0},vs.states=ru.states,vs))||ym)||ym);const ZX=(t,e)=>{const n=e.variant,i=e.hasShadow,r={error:{alert:{borderColor:t.dangerBorderColor},icon:{background:t.dangerIconBackground,borderRightColor:t.dangerIconBackground}},info:{alert:{borderColor:t.infoBorderColor},icon:{background:t.infoIconBackground,borderRightColor:t.infoIconBackground}},success:{alert:{borderColor:t.successBorderColor},icon:{backgroundColor:t.successIconBackground,borderRightColor:t.successIconBackground}},warning:{alert:{borderColor:t.warningBorderColor},icon:{background:t.warningIconBackground,borderRightColor:t.warningIconBackground}}};return{alert:{label:"alert",color:t.color,background:t.background,boxSizing:"border-box",display:"flex",minWidth:"12rem",borderWidth:t.borderWidth,borderStyle:t.borderStyle,borderRadius:t.borderRadius,...r[n].alert,...i&&{boxShadow:t.boxShadow}},icon:{color:t.iconColor,boxSizing:"border-box",flex:"0 0 2.5rem",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"1.125rem",borderRight:`${t.borderWidth} ${t.borderStyle}`,...r[n].icon},closeButton:{boxSizing:"border-box",display:"flex",alignItems:"flex-start",order:1,marginTop:t.closeButtonMarginTop,marginRight:t.closeButtonMarginRight},content:{boxSizing:"border-box",flex:1,minWidth:"0.0625rem",fontSize:t.contentFontSize,fontFamily:t.contentFontFamily,fontWeight:t.contentFontWeight,lineHeight:t.contentLineHeight,padding:t.contentPadding}}},qX=t=>{const e=t.colors,n=t.spacing,i=t.borders,r=t.typography,o=t.shadows,s=t.key,a={canvas:{color:t["ic-brand-font-color-dark"]}};return{...{background:e==null?void 0:e.backgroundLightest,color:e==null?void 0:e.textDarkest,marginTop:n==null?void 0:n.small,borderRadius:i==null?void 0:i.radiusMedium,borderWidth:i==null?void 0:i.widthMedium,borderStyle:i==null?void 0:i.style,contentPadding:`${n==null?void 0:n.small} ${n==null?void 0:n.medium}`,contentFontSize:r==null?void 0:r.fontSizeMedium,contentFontFamily:r==null?void 0:r.fontFamily,contentFontWeight:r==null?void 0:r.fontWeightNormal,contentLineHeight:r==null?void 0:r.lineHeightCondensed,closeButtonMarginTop:n==null?void 0:n.xSmall,closeButtonMarginRight:n==null?void 0:n.xxSmall,iconColor:e==null?void 0:e.textLightest,successBorderColor:e==null?void 0:e.borderSuccess,successIconBackground:e==null?void 0:e.backgroundSuccess,infoBorderColor:e==null?void 0:e.borderInfo,infoIconBackground:e==null?void 0:e.backgroundInfo,warningBorderColor:e==null?void 0:e.borderWarning,warningIconBackground:e==null?void 0:e.backgroundWarning,dangerBorderColor:e==null?void 0:e.borderDanger,dangerIconBackground:e==null?void 0:e.backgroundDanger,boxShadow:o==null?void 0:o.depth2},...a[s]}},YX={children:f.node,variant:f.oneOf(["info","success","warning","error"]),margin:ut.spacing,liveRegion:f.func,liveRegionPoliteness:f.oneOf(["polite","assertive"]),isLiveRegionAtomic:f.bool,screenReaderOnly:f.bool,timeout:f.number,renderCloseButtonLabel:f.oneOfType([f.func,f.node]),onDismiss:f.func,transition:f.oneOf(["none","fade"]),open:f.bool,hasShadow:f.bool},GX=["children","variant","margin","liveRegion","liveRegionPoliteness","isLiveRegionAtomic","screenReaderOnly","timeout","renderCloseButtonLabel","onDismiss","transition","open","hasShadow"];var B2,Q2,vm,Ba;let KX=(B2=zt(),Q2=de(ZX,qX),B2(vm=Q2(vm=(Ba=class extends T.Component{constructor(e){super(e),this._timeouts=[],this.srid=void 0,this.variantUI={error:Xd,info:Vd,success:Eu,warning:Zd},this.ref=null,this.handleRef=n=>{this.ref=n},this.handleTimeout=()=>{this.props.timeout>0&&this._timeouts.push(setTimeout(()=>{this.close()},this.props.timeout))},this.onExitTransition=()=>{this.props.onDismiss&&this.props.onDismiss()},this.close=()=>{this.clearTimeouts(),this.removeScreenreaderAlert(),this.setState({open:!1},()=>{this.props.onDismiss&&this.props.transition==="none"&&this.props.onDismiss()})},this.handleKeyUp=n=>{this.props.renderCloseButtonLabel&&n.keyCode===lr.codes.esc&&this.close()},this.srid=this.props.deterministicId(),this.state={open:!0}}clearTimeouts(){this._timeouts.forEach(e=>clearTimeout(e)),this._timeouts=[]}isDOMNode(e){return e&&typeof e=="object"&&e.nodeType===1}getLiveRegion(){let e=null;return typeof this.props.liveRegion=="function"&&(e=this.props.liveRegion()),this.isDOMNode(e)?e:null}initLiveRegion(e){Ye(e.getAttribute("role")==="alert","[Alert] live region must have role='alert' set on page load in order to announce content"),e&&(e.setAttribute("aria-live",this.props.liveRegionPoliteness),e.setAttribute("aria-relevant","additions text"),e.setAttribute("aria-atomic",`${this.props.isLiveRegionAtomic}`))}createScreenreaderContentNode(){return C(ji,null,this.props.children)}createScreenreaderAlert(){const e=this.getLiveRegion();if(e){const n=document.createElement("div");n.setAttribute("id",this.srid),e.appendChild(n)}}removeScreenreaderAlert(){const e=this.getLiveRegion();e&&document.getElementById(this.srid)&&(e.removeAttribute("aria-live"),e.removeAttribute("aria-relevant"),e.removeAttribute("aria-atomic"),this.initLiveRegion(e))}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n);const i=this.getLiveRegion();i&&this.initLiveRegion(i),this.handleTimeout()}componentWillUnmount(){this.clearTimeouts()}componentDidUpdate(e){var n,i;(n=(i=this.props).makeStyles)===null||n===void 0||n.call(i),!this.props.open&&!!this.props.open!=!!e.open&&this.close()}renderIcon(){var e;const n=this.variantUI[this.props.variant];return C("div",{css:(e=this.props.styles)===null||e===void 0?void 0:e.icon},C(n,null))}renderCloseButton(){var e;const n=this.props.renderCloseButtonLabel&&rt(this.props.renderCloseButtonLabel);return n?C("div",{css:(e=this.props.styles)===null||e===void 0?void 0:e.closeButton,key:"closeButton"},C(kX,{onClick:this.close,size:"small",screenReaderLabel:n})):null}renderAlert(){var e,n;return C(ye,{as:"div",margin:this.props.margin,css:(e=this.props.styles)===null||e===void 0?void 0:e.alert,onKeyUp:this.handleKeyUp,elementRef:this.handleRef},this.renderIcon(),C("div",{css:(n=this.props.styles)===null||n===void 0?void 0:n.content},this.props.children),this.renderCloseButton())}createScreenReaderPortal(e){return this.state.open?Ep.createPortal(C("div",{id:this.srid},this.createScreenreaderContentNode()),e):null}render(){const e=this.getLiveRegion(),n=e?this.createScreenReaderPortal(e):null;return this.props.screenReaderOnly?(Ye(!!this.getLiveRegion(),"[Alert] The 'screenReaderOnly' prop must be used in conjunction with 'liveRegion'."),n):this.props.transition==="none"?this.state.open?C(z.Fragment,null,n,this.renderAlert()):null:C(z.Fragment,null,n,C(PM,{type:this.props.transition,transitionOnMount:!0,in:this.state.open,unmountOnExit:!0,onExited:this.onExitTransition},this.renderAlert()))}},Ba.displayName="Alert",Ba.componentId="Alert",Ba.propTypes=YX,Ba.allowedProps=GX,Ba.defaultProps={variant:"info",margin:"x-small 0",timeout:0,transition:"fade",open:!0,screenReaderOnly:!1,liveRegionPoliteness:"assertive",isLiveRegionAtomic:!1,children:null,hasShadow:!0},Ba))||vm)||vm);const JX=(t,e,n)=>{const i=e.size,r=e.color,o=e.hasInverseColor,s=e.shape,a=e.src,l=e.showBorder,u=n.loaded,c={auto:{fontSize:"inherit",borderWidth:t.borderWidthSmall},"xx-small":{fontSize:"0.5rem",borderWidth:t.borderWidthSmall},"x-small":{fontSize:"0.75rem",borderWidth:t.borderWidthSmall},small:{fontSize:"1rem",borderWidth:t.borderWidthSmall},medium:{fontSize:"1.25rem",borderWidth:t.borderWidthMedium},large:{fontSize:"1.5rem",borderWidth:t.borderWidthMedium},"x-large":{fontSize:"1.75rem",borderWidth:t.borderWidthMedium},"xx-large":{fontSize:"2rem",borderWidth:t.borderWidthMedium}},d={circle:{width:"2.5em",position:"relative",borderRadius:"100%",overflow:"hidden"},rectangle:{width:"3em"}},h={default:t.color,shamrock:t.colorShamrock,barney:t.colorBarney,crimson:t.colorCrimson,fire:t.colorFire,licorice:t.colorLicorice,ash:t.colorAsh},p=o?h[r]:t.background,m=o?t.background:h[r];return{avatar:{label:"avatar",height:"2.5em",boxSizing:"border-box",backgroundColor:p,backgroundPosition:"center",backgroundSize:"cover",backgroundClip:"content-box",backgroundRepeat:"no-repeat",overflow:"hidden",lineHeight:0,textAlign:"center",borderStyle:"solid",borderColor:t.borderColor,...c[i],...d[s],...u?{backgroundImage:`url('${a}')`,...l!=="always"&&{border:0},boxShadow:`inset 0 0 ${t.boxShadowBlur} 0 ${t.boxShadowColor}`}:{backgroundImage:void 0,...o&&{border:0,padding:c[i].borderWidth,backgroundClip:"border-box"}},...l==="never"&&{border:0}},initials:{label:"avatar__initials",color:m,lineHeight:"2.375em",fontFamily:t.fontFamily,fontWeight:t.fontWeight,letterSpacing:"0.0313em"},loadImage:{label:"avatar__loadImage",display:"none"},iconSVG:{label:"avatar__iconSVG",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",width:"100%",svg:{fill:m,height:"1em",width:"1em"}}}},eZ=t=>{const e=t.colors,n=t.borders,i=t.typography,r=e.brand,o=e.shamrock,s=e.barney,a=e.crimson,l=e.fire,u=e.licorice,c=e.ash;return{...{background:e==null?void 0:e.backgroundLightest,borderWidthSmall:n==null?void 0:n.widthSmall,borderWidthMedium:n==null?void 0:n.widthMedium,borderColor:e==null?void 0:e.borderMedium,boxShadowColor:Zf(e==null?void 0:e.backgroundDarkest,12),boxShadowBlur:"1rem",fontFamily:i==null?void 0:i.fontFamily,fontWeight:i==null?void 0:i.fontWeightBold,color:r,colorShamrock:o,colorBarney:s,colorCrimson:a,colorFire:l,colorLicorice:u,colorAsh:c}}},tZ={name:f.string.isRequired,src:f.string,alt:f.string,size:f.oneOf(["auto","xx-small","x-small","small","medium","large","x-large","xx-large"]),color:f.oneOf(["default","shamrock","barney","crimson","fire","licorice","ash"]),hasInverseColor:f.bool,showBorder:f.oneOf(["auto","always","never"]),shape:f.oneOf(["circle","rectangle"]),margin:ut.spacing,display:f.oneOf(["inline-block","block"]),onImageLoaded:f.func,as:f.elementType,elementRef:f.func,renderIcon:f.oneOfType([f.node,f.func])},nZ=["name","src","alt","size","color","hasInverseColor","shape","margin","display","onImageLoaded","as","elementRef","renderIcon","showBorder"],iZ=["onImageLoaded","styles"];var F2,z2,Sm,Qa;let Zk=(F2=de(JX,eZ),z2=Le(),F2(Sm=z2(Sm=(Qa=class extends T.Component{constructor(...e){super(...e),this.state={loaded:!1},this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.handleImageLoaded=n=>{this.setState({loaded:!0}),this.props.onImageLoaded(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.state)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.state),this.state.loaded&&!this.props.src&&this.setState({loaded:!1})}makeInitialsFromName(){let e=this.props.name;if(!(!e||typeof e!="string")&&(e=e.trim(),e.length!==0))if(e.match(/\s+/)){const n=e.split(/\s+/);return(n[0][0]+n[n.length-1][0]).toUpperCase()}else return e[0].toUpperCase()}renderInitials(){var e;return C("span",{css:(e=this.props.styles)===null||e===void 0?void 0:e.initials,"aria-hidden":"true"},this.makeInitialsFromName())}renderContent(){const e=this.props,n=e.renderIcon,i=e.styles;return n?C("span",{css:i==null?void 0:i.iconSVG},rt(n)):this.renderInitials()}render(){var e;const n=this.props;n.onImageLoaded;const i=n.styles,r=Ie(n,iZ);return C(ye,Object.assign({},It(r),{"aria-label":this.props.alt?this.props.alt:void 0,role:this.props.alt?"img":void 0,as:this.props.as,elementRef:this.handleRef,margin:this.props.margin,css:i==null?void 0:i.avatar,display:this.props.display}),C("img",{src:this.props.src,css:(e=this.props.styles)===null||e===void 0?void 0:e.loadImage,alt:this.props.alt,onLoad:this.handleImageLoaded,"aria-hidden":"true"}),!this.state.loaded&&this.renderContent())}},Qa.displayName="Avatar",Qa.componentId="Avatar",Qa.propTypes=tZ,Qa.allowedProps=nZ,Qa.defaultProps={size:"medium",color:"default",hasInverseColor:!1,showBorder:"auto",shape:"circle",display:"inline-block",onImageLoaded:t=>{}},Qa))||Sm)||Sm);const rZ=(t,e)=>{const n=e.level,i=e.color,r=e.border,o={h1:{fontFamily:t.h1FontFamily,fontSize:t.h1FontSize,fontWeight:t.h1FontWeight},h2:{fontFamily:t.h2FontFamily,fontSize:t.h2FontSize,fontWeight:t.h2FontWeight},h3:{fontFamily:t.h3FontFamily,fontSize:t.h3FontSize,fontWeight:t.h3FontWeight},h4:{fontFamily:t.h4FontFamily,fontSize:t.h4FontSize,fontWeight:t.h4FontWeight},h5:{fontFamily:t.h5FontFamily,fontSize:t.h5FontSize,fontWeight:t.h5FontWeight},reset:{margin:0,fontSize:"inherit",fontWeight:"inherit",lineHeight:"inherit"}},s={inherit:{color:"inherit"},primary:{color:t.primaryColor},secondary:{color:t.secondaryColor},"primary-inverse":{color:t.primaryInverseColor},"secondary-inverse":{color:t.secondaryInverseColor}},a={top:{paddingTop:t.borderPadding,borderTop:`${t.borderWidth} ${t.borderStyle} ${t.borderColor}`},bottom:{paddingBottom:t.borderPadding,borderBottom:`${t.borderWidth} ${t.borderStyle} ${t.borderColor}`},none:{}},l={outline:0,appearance:"none",boxSizing:"border-box",background:"none",border:"none",borderRadius:0,padding:0,margin:"-0.375rem 0 0 0",color:"inherit",height:"auto",width:"100%",lineHeight:"inherit",textAlign:"start",boxShadow:"none",display:"block","&:focus":{outline:"none"}};return{heading:{label:"heading",lineHeight:t.lineHeight,margin:0,"&:is(input)[type]":l,"&:-webkit-any(input)[type]":l,...o[n],...s[i],...a[r]}}},oZ=t=>{const e=t.typography,n=t.colors,i=t.spacing,r=t.borders,o=t.key,s={canvas:{primaryColor:t["ic-brand-font-color-dark"]},instructure:{h1FontFamily:e==null?void 0:e.fontFamilyHeading,h2FontFamily:e==null?void 0:e.fontFamilyHeading,h3FontWeight:e==null?void 0:e.fontWeightBold,h3FontSize:"2.125rem",h4FontWeight:e==null?void 0:e.fontWeightBold,h4FontSize:e==null?void 0:e.fontSizeLarge,h5FontWeight:e==null?void 0:e.fontWeightBold,h5FontSize:e==null?void 0:e.fontSizeMedium}};return{...{lineHeight:e==null?void 0:e.lineHeightCondensed,h1FontSize:e==null?void 0:e.fontSizeXXLarge,h1FontWeight:e==null?void 0:e.fontWeightBold,h1FontFamily:e==null?void 0:e.fontFamily,h2FontSize:e==null?void 0:e.fontSizeXLarge,h2FontWeight:e==null?void 0:e.fontWeightNormal,h2FontFamily:e==null?void 0:e.fontFamily,h3FontSize:e==null?void 0:e.fontSizeLarge,h3FontWeight:e==null?void 0:e.fontWeightBold,h3FontFamily:e==null?void 0:e.fontFamily,h4FontSize:e==null?void 0:e.fontSizeMedium,h4FontWeight:e==null?void 0:e.fontWeightBold,h4FontFamily:e==null?void 0:e.fontFamily,h5FontSize:e==null?void 0:e.fontSizeSmall,h5FontWeight:e==null?void 0:e.fontWeightNormal,h5FontFamily:e==null?void 0:e.fontFamily,primaryInverseColor:n==null?void 0:n.textLightest,primaryColor:n==null?void 0:n.textDarkest,secondaryColor:n==null?void 0:n.textDark,secondaryInverseColor:n==null?void 0:n.textLight,borderPadding:i==null?void 0:i.xxxSmall,borderColor:n==null?void 0:n.borderMedium,borderWidth:r==null?void 0:r.widthSmall,borderStyle:r==null?void 0:r.style},...s[o]}},sZ={border:f.oneOf(["none","top","bottom"]),children:KW,color:f.oneOf(["primary","secondary","primary-inverse","secondary-inverse","inherit"]),level:f.oneOf(["h1","h2","h3","h4","h5","reset"]),as:f.elementType,margin:ut.spacing,elementRef:f.func},aZ=["border","children","color","level","as","margin","elementRef"],lZ=["border","children","color","level","margin","elementRef","makeStyles"];var H2,U2,wm,Fa;let Tr=(H2=de(rZ,oZ),U2=Le(),H2(wm=U2(wm=(Fa=class AM extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){var e;const n=this.props;n.border;const i=n.children;n.color;const r=n.level,o=n.margin;n.elementRef,n.makeStyles;const s=Ie(n,lZ),a=oi(AM,this.props,()=>r==="reset"?"span":r);return C(ye,Object.assign({},It(s),{css:(e=this.props.styles)===null||e===void 0?void 0:e.heading,as:a,elementRef:this.handleRef,margin:o}),i)}},Fa.displayName="Heading",Fa.componentId="Heading",Fa.propTypes=sZ,Fa.allowedProps=aZ,Fa.defaultProps={children:null,border:"none",color:"inherit",level:"h2"},Fa))||wm)||wm);const uZ=(t,e)=>{const n=e.size,i=e.href,r=e.onClick,o=e.disabled,s=e.hero,a=e.heading,l=i||r,u={small:{billboard:{padding:t.paddingSmall},hero:{fontSize:"3rem"},message:{fontSize:t.messageFontSizeSmall},heading:{...s&&{margin:`${t.mediumMargin} 0 0`}}},medium:{billboard:{padding:t.paddingMedium},hero:{fontSize:"5rem"},message:{fontSize:t.messageFontSizeMedium},heading:{}},large:{billboard:{padding:t.paddingLarge},hero:{fontSize:"10rem"},message:{fontSize:t.messageFontSizeLarge},heading:{}}},c=l?{appearance:"none",boxSizing:"border-box",cursor:"pointer",userSelect:"none",touchAction:"manipulation",width:"100%",margin:"0",border:`${t.buttonBorderWidth} ${t.buttonBorderStyle} transparent`,borderRadius:t.buttonBorderRadius,background:t.backgroundColor,textDecoration:"none","&:hover":{borderStyle:t.buttonHoverBorderStyle},"&:hover, &:focus":{textDecoration:"none",outline:"none",borderColor:t.iconHoverColor,"& [class$=-billboard__hero]":{color:t.iconHoverColor}},"&:active":{background:t.clickableActiveBg,borderColor:t.iconHoverColor,"& [class$=-billboard__hero], & [class$=-billboard__message]":{color:t.clickableActiveText}}}:{backgroundColor:t.backgroundColor};return{billboard:{label:"billboard",boxSizing:"border-box",position:"relative",fontFamily:t.fontFamily,marginLeft:"auto",marginRight:"auto",textAlign:"center",display:"block",...u[n].billboard,...c,...o&&{cursor:"not-allowed",pointerEvents:"none",opacity:.5}},content:{label:"billboard__content",display:"block"},hero:{label:"billboard__hero",display:"block",color:t.iconColor,...u[n].hero,"& > img, & > svg":{maxWidth:"100%",display:"block",margin:"0 auto"},"& > img":{height:"auto"}},heading:{label:"billboard__heading",display:"block",...s&&{margin:`${t.largeMargin} 0 0`},...u[n].heading},message:{label:"billboard__message",display:"block",color:l?t.messageColorClickable:t.messageColor,...(s||a)&&{margin:`${t.mediumMargin} 0 0`},...u[n].message}}},cZ=t=>{const e=t.borders,n=t.colors,i=t.spacing,r=t.typography,o=t.key,s={canvas:{iconHoverColor:t["ic-link-color"],messageColorClickable:t["ic-link-color"],clickableActiveBg:t["ic-brand-primary"]}};return{...{fontFamily:r==null?void 0:r.fontFamily,paddingSmall:i==null?void 0:i.small,paddingMedium:i==null?void 0:i.medium,paddingLarge:i==null?void 0:i.medium,iconColor:n==null?void 0:n.textDark,mediumMargin:i==null?void 0:i.small,largeMargin:i==null?void 0:i.medium,iconHoverColor:n==null?void 0:n.textLink,backgroundColor:n==null?void 0:n.backgroundLightest,iconHoverColorInverse:n==null?void 0:n.textLightest,buttonBorderWidth:e==null?void 0:e.widthMedium,buttonBorderRadius:e==null?void 0:e.radiusLarge,messageColor:n==null?void 0:n.textDark,messageColorClickable:n==null?void 0:n.textLink,messageColorInverse:n==null?void 0:n.textLight,messageFontSizeSmall:r==null?void 0:r.fontSizeSmall,messageFontSizeMedium:r==null?void 0:r.fontSizeMedium,messageFontSizeLarge:r==null?void 0:r.fontSizeLarge,clickableActiveBg:n==null?void 0:n.backgroundBrand,clickableActiveText:n==null?void 0:n.textLightest,buttonBorderStyle:e==null?void 0:e.style,buttonHoverBorderStyle:"dashed"},...s[o]}},dZ={hero:f.oneOfType([f.element,f.func]),size:f.oneOf(["small","medium","large"]),as:f.elementType,elementRef:f.func,heading:f.string,headingAs:f.oneOf(["h1","h2","h3","span"]),headingLevel:f.oneOf(["h1","h2","h3","h4"]),message:f.oneOfType([f.node,f.func]),onClick:f.func,href:f.string,disabled:f.bool,readOnly:f.bool,margin:ut.spacing},hZ=["hero","size","as","elementRef","heading","headingAs","headingLevel","message","onClick","href","disabled","readOnly","margin"];var W2,V2,za;let RM=(W2=de(uZ,cZ),W2(V2=(za=class Fv extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.handleClick=n=>{const i=this.props,r=i.readOnly,o=i.onClick;r?(n.preventDefault(),n.stopPropagation()):typeof o=="function"&&o(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}renderHeading(){const e=this.props,n=e.headingLevel,i=e.headingAs,r=e.heading,o=e.styles;return C("span",{css:o==null?void 0:o.heading},C(Tr,{level:n,as:i,color:"primary"},r))}get SVGIconSize(){const e=this.props.size;return e==="small"?"medium":e==="large"?"x-large":"large"}renderHero(){return typeof this.props.hero=="function"?this.props.hero(this.SVGIconSize):this.props.hero}renderContent(){const e=this.props,n=e.heading,i=e.message,r=e.hero,o=e.styles;return C("span",{css:o==null?void 0:o.content},r&&C("span",{css:o==null?void 0:o.hero},this.renderHero()),n&&this.renderHeading(),i&&C("span",{css:o==null?void 0:o.message},rt(i)))}render(){const e=this.props,n=e.href,i=e.disabled,r=e.readOnly,o=e.margin,s=e.styles,a=oi(Fv,this.props);return C(ye,{as:"div",margin:o},C(ye,Object.assign({},Re(this.props,[...Fv.allowedProps,...ye.allowedProps]),{type:a==="button"?"button":void 0,as:a,elementRef:this.handleRef,css:s==null?void 0:s.billboard,href:n,onClick:this.handleClick,disabled:i,"aria-disabled":i||r?"true":void 0}),this.renderContent()))}},za.displayName="Billboard",za.componentId="Billboard",za.propTypes=dZ,za.allowedProps=hZ,za.defaultProps={disabled:!1,readOnly:!1,size:"medium",headingAs:"span",headingLevel:"h1",as:"span",elementRef:()=>{}},za))||V2);const fZ=t=>({truncateText:{label:"truncateText",display:"block",overflow:"hidden",wordWrap:"break-word",whiteSpace:"normal",fontFamily:t.fontFamily},auto:{label:"truncateText__auto",height:"100%"},spacer:{label:"truncateText__spacer",visibility:"hidden",maxHeight:"0",display:"block"},lineHeight:t.lineHeight}),pZ=t=>{const e=t.typography;return{...{fontFamily:e==null?void 0:e.fontFamily,lineHeight:e==null?void 0:e.lineHeight}}};/*! + `)}this._focusLaterElement=null}}activate(){const e=this.defaultFocusElement,n=this.shouldContainFocus;this._active||(e||n)&&(n?this._listeners.push(Cr(this.doc,"keydown",this.handleKeyDown)):(this._listeners.push(Cr(this.firstTabbable||e,"keydown",this.handleFirstTabbableKeyDown)),this._listeners.push(Cr(this.lastTabbable||e,"keydown",this.handleLastTabbableKeyDown))),this._listeners.push(Cr(this.doc,"click",this.handleClick,!0)),this._listeners.push(Cr(this.win,"blur",this.handleWindowBlur,!1)),this._listeners.push(Cr(this.doc,"focus",this.handleFocus,!0)),this._active=!0)}deactivate(){this._active&&(this._listeners.forEach(e=>{e.remove()}),this._listeners=[],this._raf.forEach(e=>e.cancel()),this._raf=[],this._active=!1)}}class hM{constructor(e,n){this._contextElement=null,this._options=void 0,this._screenReaderFocusRegion=void 0,this._keyboardFocusRegion=void 0,this._id=void 0,this._listeners=[],this._active=!1,this._documentClickTarget=null,this._contextContainsTarget=!1,this.handleDismiss=(i,r)=>{var o,s;(o=(s=this._options).onDismiss)===null||o===void 0||o.call(s,i,r)},this.captureDocumentMousedown=i=>{this._documentClickTarget=i.target,this._contextContainsTarget=dd(this._contextElement,this._documentClickTarget)},this.handleDocumentClick=i=>{this._options.shouldCloseOnDocumentClick&&i.button===0&&i.detail>0&&!this._contextContainsTarget&&this.handleDismiss(i,!0)},this.handleFrameClick=(i,r)=>{dd(this._contextElement,r)||this.handleDismiss(i,!0)},this.handleKeyUp=i=>{if(this._options.shouldCloseOnEscape&&i.keyCode===ar.codes.esc&&!i.defaultPrevented){var r;const o=(r=Eo(this._contextElement))===null||r===void 0?void 0:r.activeElement;(o==null?void 0:o.tagName)==="INPUT"&&o.type==="file"?o.blur():this.handleDismiss(i)}},this._options=n||{shouldCloseOnDocumentClick:!0,shouldCloseOnEscape:!0},this._contextElement=e,this._screenReaderFocusRegion=new WV(e,n),this._keyboardFocusRegion=new jV(e,n),this._id=zV()}updateElement(e,n){this._contextElement=e,n&&(this._options=n),this._keyboardFocusRegion&&this._keyboardFocusRegion.updateElement(e),this._screenReaderFocusRegion&&this._screenReaderFocusRegion.updateElement(e)}get id(){return this._id}get focused(){return this._active}get keyboardFocusable(){return(Uk(this._contextElement)||[]).length>0}activate(){if(!this._active){const e=Eo(this._contextElement);this._keyboardFocusRegion.activate(),this._screenReaderFocusRegion.activate(),this._options.shouldCloseOnDocumentClick&&(this._listeners.push(Cr(e,"mousedown",this.captureDocumentMousedown)),this._listeners.push(Cr(e,"click",this.handleDocumentClick)),Array.from(e.getElementsByTagName("iframe")).forEach(n=>{const i=n.contentDocument;i&&this._listeners.push(Cr(i,"mouseup",r=>{this.handleFrameClick(r,n)}))})),this._options.shouldCloseOnEscape&&this._listeners.push(Cr(e,"keyup",this.handleKeyUp)),this._active=!0}}deactivate({keyboard:e=!0}={}){this._active&&(this._listeners.forEach(n=>{n.remove()}),this._listeners=[],e&&this._keyboardFocusRegion.deactivate(),this._screenReaderFocusRegion.deactivate(),this._active=!1)}focus(){Ge(this._active,"[FocusRegion] Cannot call '.focus()' on a region that is not currently active."),this._keyboardFocusRegion.focus()}blur(){Ge(!this._active,"[FocusRegion] Cannot call '.blur()' on a region that is currently active."),this._keyboardFocusRegion.blur()}}var To;let is=[];class Jn{}To=Jn;Jn.focusRegion=(t,e={})=>{let n;if(typeof e=="string"?n=To.getEntry(t,e):n=To.addEntry(t,e),n&&n.region&&typeof n.region.focus=="function")return n.region.focus(),n.region;Ge(!1,`[FocusRegionManager] Could not focus region with element: ${t}`)};Jn.activateRegion=(t,e)=>To.addEntry(t,e).region;Jn.getActiveEntry=()=>is.find(({region:t})=>t.focused);Jn.findEntry=(t,e)=>{let n;return e?n=is.findIndex(i=>i.id===e):n=is.findIndex(i=>i.element===t),n};Jn.getEntry=(t,e)=>is[To.findEntry(t,e)];Jn.addEntry=(t,e={})=>{const n=new hM(t,e),i=To.getActiveEntry(),r=n.keyboardFocusable;is.forEach(({region:s})=>{if(s){const a=s.focused&&!r?{keyboard:!1}:void 0;s.deactivate(a)}}),n.activate(),e.shouldFocusOnOpen&&n.focus();const o={id:n.id,element:t,region:n,children:[],parent:i};return is.push(o),i&&i.children.push(o),o};Jn.removeEntry=(t,e)=>{const n=To.findEntry(t,e),i=is[n];return n>-1&&is.splice(n,1),i};Jn.isFocused=(t,e)=>{const n=To.getActiveEntry();return e?n&&n.region&&n.id===e:n&&n.region&&n.element===t};Jn.clearEntries=()=>{is=[]};Jn.blurRegion=(t,e)=>{const n=To.removeEntry(t,e);if(n){const i=n.children,r=n.region,o=n.parent;r&&r.deactivate(),i&&i.forEach(({id:s,element:a})=>{const l=To.removeEntry(a,s);l&&l.region&&l.region.deactivate()}),o&&o.region&&o.region.activate(),r&&r.blur()}};function tb(t){let e=!1;return z.Children.forEach(t,n=>{n&&!Me(n,[Vi])&&(e=!0)}),e}const XV=({borderRadius:t,borderWidth:e,dir:n,theme:i})=>{const r=n===JO.rtl;return{borderRadius:R0("View",i,r?LV(t):t,"borderRadius"),borderWidth:R0("View",i,r?$v(e):e,"borderWidth")}},ZV=({margin:t,padding:e,dir:n,theme:i})=>{const r=n===JO.rtl;return{margin:R0("View",i,r?$v(t):t,"margin"),padding:R0("View",i,r?$v(e):e,"padding")}},qV=({insetBlockStart:t,insetBlockEnd:e,insetInlineStart:n,insetInlineEnd:i,dir:r})=>{const o=r===JO.rtl;return{...{top:t,insetBlockStart:t},...{bottom:e,insetBlockEnd:e},...{left:o?i:n,right:o?n:i}}},YV=({cursor:t,style:e})=>{const n=cs(e||{},{},["top","left","position","display","transform","overflow","minWidth","minHeight","filter","flexBasis","backgroundImage","pointerEvents"]);return t&&(n.cursor=t),n},GV=(t,e)=>typeof e!="string"?!1:e.trim().split(" ").every(n=>t===n),KV=t=>{const e="focusRing--radius",n=(t||"").trim().split(" ")[0];if(GV(n,t)){const i=r=>`${r.charAt(0).toUpperCase()}${r.slice(1)}`;if(["small","medium","large"].includes(n))return`${e}${i(n)}`;if(["circle","pill"].includes(n))return`${e}Inherit`}return`${e}None`},JV=t=>{const e=t.position,n=t.display,i=t.focusPosition,r=t.withFocusOutline;return typeof r>"u"||r&&(Ge(n==="inline"||e==="relative","[View] the focus outline will only show if the `position` prop is `relative`."),Ge(n!=="inline"||i==="inset","[View] when display is set to `inline` the focus outline will only show if `focusPosition` is set to `inset`.")),r},ej=t=>{const e=t.borderWidth;return e&&e!=="0"&&e!=="none"},tj=(t,e)=>{const n=t.focusColor,i=t.focusPosition,r=t.position,o=t.shouldAnimateFocus,s=t.borderRadius,a=JV(t),l=typeof a>"u",u={offset:{top:`calc(${e.focusOutlineOffset} * -1)`,left:`calc(${e.focusOutlineOffset} * -1)`,right:`calc(${e.focusOutlineOffset} * -1)`,bottom:`calc(${e.focusOutlineOffset}* -1)`},inset:{top:`calc(${e.focusOutlineInset} * -1)`,left:`calc(${e.focusOutlineInset} * -1)`,right:`calc(${e.focusOutlineInset} * -1)`,bottom:`calc(${e.focusOutlineInset} * -1)`}},c={info:e.focusColorInfo,inverse:e.focusColorInverse,success:e.focusColorSuccess,danger:e.focusColorDanger};if(r==="relative"){const d=KV(s),h={"focusRing--radiusInherit":"inherit","focusRing--radiusNone":0},p={offset:{"focusRing--radiusSmall":{borderRadius:`calc(${e.borderRadiusSmall} + (${e.focusOutlineOffset} - ${e.focusOutlineWidth}))`},"focusRing--radiusMedium":{borderRadius:`calc(${e.borderRadiusMedium} + (${e.focusOutlineOffset} - ${e.focusOutlineWidth}))`},"focusRing--radiusLarge":{borderRadius:`calc(${e.borderRadiusLarge} + (${e.focusOutlineOffset} - ${e.focusOutlineWidth}))`}},inset:{"focusRing--radiusSmall":{borderRadius:`calc(${e.borderRadiusSmall} - (${e.focusOutlineInset} + ${e.focusOutlineWidth}))`},"focusRing--radiusMedium":{borderRadius:`calc(${e.borderRadiusMedium} - (${e.focusOutlineInset} + ${e.focusOutlineWidth}))`},"focusRing--radiusLarge":{borderRadius:`calc(${e.borderRadiusLarge} - (${e.focusOutlineInset} + ${e.focusOutlineWidth}))`}}};return{"&::before":{pointerEvents:"none",content:'""',position:"absolute",borderStyle:e.focusOutlineStyle,borderWidth:e.focusOutlineWidth,borderColor:c[n],opacity:0,borderRadius:h[d],...p[i][d],...u[i],...o?{transition:"all 0.2s",transform:"scale(0.95)"}:{},...a?{opacity:1,transform:"scale(1)"}:{}},"&:focus":{outline:"none","&::before":{...l?{opacity:1,transform:"scale(1)"}:{}}}}}return{"&::before":{borderStyle:"none"},outlineStyle:"none",outlineColor:c[n],...a?{outlineWidth:e.focusOutlineWidth,outlineStyle:e.focusOutlineStyle}:{},"&:focus":{...l?{outlineWidth:e.focusOutlineWidth,outlineStyle:e.focusOutlineStyle}:{}}}},nj=(t,e)=>{const n=e.borderRadius,i=e.borderWidth,r=e.margin,o=e.padding,s=e.position,a=e.display,l=e.focusPosition,u=e.textAlign,c=e.borderColor,d=e.background,h=e.stacking,p=e.shadow,m=e.overflowY,O=e.overflowX,y=e.overscrollBehavior,b=e.insetBlockEnd,v=e.insetBlockStart,S=e.insetInlineEnd,k=e.insetInlineStart,x=e.width,_=e.height,w=e.minWidth,D=e.minHeight,W=e.maxWidth,I=e.maxHeight,V=e.withVisualDebug,B=e.dir,H=XV({theme:t,borderRadius:n,borderWidth:i,dir:B}),K=ZV({margin:r,padding:o,theme:t,dir:B}),re=qV({dir:B,insetBlockEnd:b,insetBlockStart:v,insetInlineEnd:S,insetInlineStart:k}),ke=s==="relative"||a==="inline"&&l==="inset",ge={inline:{label:"view--inline",display:"inline"},block:{label:"view--block",display:"block"},"inline-block":{label:"view--inlineBlock",display:"inline-block",verticalAlign:"middle"},flex:{label:"view--flex",display:"flex"},"inline-flex":{label:"view--inlineFlex",display:"inline-flex",verticalAlign:"middle"},auto:{}},Z={start:{textAlign:"start"},center:{textAlign:"center"},end:{textAlign:"end"}},se={transparent:{borderColor:t.borderColorTransparent},primary:{borderColor:t.borderColorPrimary},secondary:{borderColor:t.borderColorSecondary},brand:{borderColor:t.borderColorBrand},info:{borderColor:t.borderColorInfo},success:{borderColor:t.borderColorSuccess},warning:{borderColor:t.borderColorWarning},alert:{borderColor:t.borderColorAlert},danger:{borderColor:t.borderColorDanger}},A={transparent:{color:t.color,background:"none"},primary:{color:t.color,background:t.backgroundPrimary},secondary:{color:t.color,background:t.backgroundSecondary},"primary-inverse":{color:t.colorPrimaryInverse,background:t.backgroundPrimaryInverse},brand:{color:t.colorPrimaryInverse,background:t.backgroundBrand},info:{color:t.colorPrimaryInverse,background:t.backgroundInfo},alert:{color:t.colorPrimaryInverse,background:t.backgroundAlert},success:{color:t.colorPrimaryInverse,background:t.backgroundSuccess},danger:{color:t.colorPrimaryInverse,background:t.backgroundDanger},warning:{color:t.colorPrimaryInverse,background:t.backgroundWarning}},Oe={topmost:{zIndex:t.stackingTopmost},above:{zIndex:t.stackingAbove},resting:{},below:{zIndex:t.stackingBelow},deepest:{zIndex:t.stackingDeepest}},ye={topmost:{boxShadow:t.shadowTopmost},resting:{boxShadow:t.shadowResting},above:{boxShadow:t.shadowAbove},none:{}},L=tj(e,t);return{view:{label:"view",boxSizing:"border-box",fontFamily:t.fontFamily,maxWidth:"100%",overflow:"visible",...ge[a],...d&&A[d],...h&&Oe[h],...p&&ye[p],...u&&Z[u],overflowX:O&&O!=="visible"?O:"",overflowY:m&&m!=="visible"?m:"",position:s!=="static"?s:"",overscrollBehavior:y||"auto",...V?{outline:`0.0625rem dashed ${t.debugOutlineColor}`}:{},...ej(e)?{borderStyle:t.borderStyle,...se[c]}:{},...ke?L:{}},inlineStyles:{"&&&&&&&&&&":{...K,...H,...re,width:x,height:_,minWidth:w,minHeight:D,maxWidth:W,maxHeight:I,...YV(e)}}}},ij=t=>{const e=t.colors,n=t.typography,i=t.borders,r=t.breakpoints,o=t.spacing,s=t.shadows,a=t.stacking,l=t.key,u={canvas:{color:t["ic-brand-font-color-dark"],focusColorInfo:t["ic-brand-primary"],backgroundBrand:t["ic-brand-primary"],backgroundInfo:t["ic-brand-primary"],borderColorBrand:t["ic-brand-primary"],borderColorInfo:t["ic-brand-primary"]}};return{...{fontFamily:n==null?void 0:n.fontFamily,color:e==null?void 0:e.textDarkest,colorPrimaryInverse:e==null?void 0:e.textLightest,borderColorPrimary:e==null?void 0:e.borderMedium,borderColorSecondary:e==null?void 0:e.borderDark,borderColorSuccess:e==null?void 0:e.borderSuccess,borderColorBrand:e==null?void 0:e.borderBrand,borderColorInfo:e==null?void 0:e.borderInfo,borderColorAlert:e==null?void 0:e.borderAlert,borderColorWarning:e==null?void 0:e.borderWarning,borderColorDanger:e==null?void 0:e.borderDanger,borderColorTransparent:"transparent",debugOutlineColor:e==null?void 0:e.borderDebug,backgroundPrimary:e==null?void 0:e.backgroundLightest,backgroundSecondary:e==null?void 0:e.backgroundLight,backgroundPrimaryInverse:e==null?void 0:e.backgroundDarkest,backgroundBrand:e==null?void 0:e.backgroundBrand,backgroundInfo:e==null?void 0:e.backgroundInfo,backgroundAlert:e==null?void 0:e.backgroundAlert,backgroundSuccess:e==null?void 0:e.backgroundSuccess,backgroundDanger:e==null?void 0:e.backgroundDanger,backgroundWarning:e==null?void 0:e.backgroundWarning,arrowSize:"0.5rem",focusOutlineStyle:i==null?void 0:i.style,focusOutlineWidth:i==null?void 0:i.widthMedium,focusOutlineOffset:"0.3125rem",focusOutlineInset:"0rem",focusColorInfo:e==null?void 0:e.borderInfo,focusColorDanger:e==null?void 0:e.borderDanger,focusColorSuccess:e==null?void 0:e.borderSuccess,focusColorInverse:e==null?void 0:e.borderLightest,xSmallMaxWidth:r==null?void 0:r.xSmall,smallMaxWidth:r==null?void 0:r.small,mediumMaxWidth:r==null?void 0:r.medium,largeMaxWidth:r==null?void 0:r.large,..._h("margin",o),..._h("padding",o),..._h("shadow",s),..._h("stacking",a),..._h("border",i)},...u[l]}},rj={as:f.elementType,elementRef:f.func,display:f.oneOf(["auto","inline","block","inline-block","flex","inline-flex"]),overflowX:f.oneOf(["auto","hidden","visible"]),overflowY:f.oneOf(["auto","hidden","visible"]),margin:ct.spacing,padding:ct.spacing,height:f.oneOfType([f.string,f.number]),width:f.oneOfType([f.string,f.number]),maxHeight:f.oneOfType([f.string,f.number]),maxWidth:f.oneOfType([f.string,f.number]),minHeight:f.oneOfType([f.string,f.number]),minWidth:f.oneOfType([f.string,f.number]),children:f.node,textAlign:f.oneOf(["start","center","end"]),borderWidth:ct.borderWidth,borderRadius:ct.borderRadius,borderColor:f.oneOf(["transparent","primary","secondary","brand","info","success","warning","alert","danger"]),background:f.oneOf(["transparent","primary","secondary","primary-inverse","brand","info","alert","success","danger","warning"]),shadow:ct.shadow,stacking:ct.stacking,cursor:JW,position:f.oneOf(["static","absolute","relative","sticky","fixed"]),insetInlineStart:f.string,insetInlineEnd:f.string,insetBlockStart:f.string,insetBlockEnd:f.string,withFocusOutline:f.bool,focusPosition:f.oneOf(["offset","inset"]),focusColor:f.oneOf(["info","inverse","success","danger"]),shouldAnimateFocus:f.bool,withVisualDebug:f.bool,dir:f.oneOf(Object.values(Mr.DIRECTION)),overscrollBehavior:f.oneOf(["auto","contain","none"])},oj=["as","background","borderColor","borderRadius","borderWidth","children","cursor","dir","display","elementRef","focusColor","focusPosition","height","insetBlockEnd","insetBlockStart","insetInlineEnd","insetInlineStart","margin","maxHeight","maxWidth","minHeight","minWidth","overflowX","overflowY","overscrollBehavior","padding","position","shadow","shouldAnimateFocus","stacking","textAlign","width","withFocusOutline","withVisualDebug"],sj=["children","textAlign","background","display","withVisualDebug","width","height","minWidth","minHeight","maxWidth","maxHeight","overflowX","overflowY","stacking","shadow","position","focusPosition","focusColor","shouldAnimateFocus","borderColor","className","overscrollBehavior","styles","makeStyles"];var _C,EC,pm,No;let be=(_C=Mr(),EC=de(nj,ij),_C(pm=EC(pm=(No=class fM extends T.Component{get _element(){return this.ref}constructor(e){super(e),this.spanMarginVerified=void 0,this.ref=null,this.handleElementRef=n=>{typeof this.props.elementRef=="function"&&this.props.elementRef(n),this.ref=n},this.spanMarginVerified=!1}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){const e=this.props,n=e.children;e.textAlign,e.background,e.display,e.withVisualDebug,e.width,e.height,e.minWidth,e.minHeight,e.maxWidth,e.maxHeight,e.overflowX,e.overflowY,e.stacking,e.shadow,e.position,e.focusPosition,e.focusColor,e.shouldAnimateFocus,e.borderColor;const i=e.className;e.overscrollBehavior;const r=e.styles;e.makeStyles;const o=Ie(e,sj),s=oi(fM,this.props);return C(s,Object.assign({},It(o),{className:i,css:[r==null?void 0:r.view,r==null?void 0:r.inlineStyles],ref:this.handleElementRef}),n)}},No.displayName="View",No.componentId="View",No.allowedProps=oj,No.propTypes=rj,No.defaultProps={display:"auto",overflowX:"visible",overflowY:"visible",withVisualDebug:!1,borderColor:"primary",position:"static",focusPosition:"offset",focusColor:"info",shouldAnimateFocus:!0,overscrollBehavior:"auto"},No.omitViewProps=(t,e)=>{const n=[...No.allowedProps,"styles","makeStyles","themeOverride"];let i=!0;try{i=!1}catch(r){if(r instanceof ReferenceError)i=!1;else throw r}return i&&Object.keys(cs(t,n)).forEach(r=>{Ge(!1,`[${e.name}] prop '${r}' is not allowed.`)}),Re(t,n)},No))||pm)||pm);function nb(t,e=0,n={}){let i,r,o,s,a=0,l=[];if(typeof t!="function")throw new TypeError("Expected a function");const u=!!n.leading,c="maxWait"in n,d="trailing"in n?!!n.trailing:!0,h=c?Math.max(+!n.maxWait||0,e):0;function p(w){const D=i,W=r;return i=void 0,r=void 0,a=w,o=t.apply(W,D),o}function m(w){return a=w,l.push(setTimeout(b,e)),u?p(w):o}function O(w){const D=w-s,W=w-a,I=e-D;return c?Math.min(I,h-W):I}function y(w){if(typeof s>"u")return!0;const D=w-s,W=w-a;return D>=e||D<0||c&&W>=h}function b(){const w=Date.now();y(w)?v(w):l.push(setTimeout(b,O(w)))}function v(w){return x(),d&&i?p(w):(i=r=void 0,o)}function S(){x(),a=0,i=s=r=void 0}function k(){return l.length===0?o:v(Date.now())}function x(){l.forEach(w=>clearTimeout(w)),l=[]}function _(...w){const D=Date.now(),W=y(D);if(i=w,r=this,s=D,W){if(l.length===0)return m(s);if(c)return l.push(setTimeout(b,e)),p(s)}return l.length===0&&l.push(setTimeout(b,e)),o}return _.cancel=S,_.flush=k,_}const aj={open:f.bool,onOpen:f.func,onClose:f.func,mountNode:f.oneOfType([Si,f.func]),insertAt:f.oneOf(["bottom","top"]),children:f.node,elementRef:f.func,dir:f.oneOf(Object.values(Mr.DIRECTION))},lj=["open","onOpen","onClose","mountNode","insertAt","children","elementRef","dir"],uj=["open","insertAt","onOpen","onClose","mountNode","children","elementRef","dir"];var CC,TC,Xu;let pM=(CC=Mr(),CC(TC=(Xu=class extends T.Component{constructor(e){super(e),this.DOMNode=null,this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,this.DOMNode=n,typeof i=="function"&&i(n)},ln&&(this.state={mountNode:this.findMountNode(e)})}componentDidMount(){ln&&this.props.open&&z.Children.count(this.props.children)>0&&this.forceUpdate(()=>{this.props.open&&typeof this.props.onOpen=="function"&&this.props.onOpen(this.DOMNode)})}componentDidUpdate(e){if(!ln)return;const n=this.findMountNode(this.props);n!==this.state.mountNode&&this.setState({mountNode:n}),this.props.open&&!e.open&&typeof this.props.onOpen=="function"&&this.props.onOpen(this.DOMNode),!this.props.open&&e.open&&typeof this.props.onClose=="function"&&this.props.onClose()}componentWillUnmount(){ln&&(this.removeNode(),this.props.open&&typeof this.props.onClose=="function"&&this.props.onClose())}removeNode(){this.DOMNode&&this.DOMNode.parentNode&&typeof this.DOMNode.parentNode.removeChild=="function"&&(this.DOMNode.parentNode.removeChild(this.DOMNode),this.handleRef(null))}insertNode(){const e=this.props;e.open;const n=e.insertAt;e.onOpen,e.onClose,e.mountNode,e.children,e.elementRef;const i=e.dir,r=Ie(e,uj);if(!this.DOMNode){const o=document.createElement("span"),s={...It(r),dir:i};Object.keys(s).forEach(a=>{o.setAttribute(a,s[a])}),this.handleRef(o)}return this.DOMNode&&this.DOMNode.parentNode!==this.state.mountNode&&(n==="bottom"?this.state.mountNode.appendChild(this.DOMNode):this.state.mountNode.insertBefore(this.DOMNode,this.state.mountNode.firstChild)),this.DOMNode}findMountNode(e){let n;return typeof e.mountNode=="function"?n=e.mountNode():e.mountNode&&(n=e.mountNode),(!n||!n.nodeName)&&(n=document.body),n}get node(){return this.DOMNode}render(){const e=this.props,n=e.children,i=e.open;return!ln&&i?n:i&&z.Children.count(n)>0?Cp.createPortal(n,this.insertNode()):null}},Xu.displayName="Portal",Xu.propTypes=aj,Xu.allowedProps=lj,Xu.defaultProps={open:!1,insertAt:"bottom",onOpen:()=>{},onClose:()=>{},mountNode:null,children:null,elementRef:()=>{}},Xu))||TC);const cj=(t,e)=>({position:{label:"position",display:e.containerDisplay},zIndex:t.zIndex}),dj=t=>{const e=t.stacking;return{...{zIndex:e==null?void 0:e.topmost}}},hj=["top","bottom","start","end","top start","top center","top end","top stretch","bottom start","bottom center","bottom end","bottom stretch","start top","start center","start bottom","start stretch","end top","end center","end bottom","end stretch","center start","center end","offscreen"],Jt={placement:f.oneOf(hj),mountNode:f.oneOfType([Si,f.func]),constrain:f.oneOfType([Si,f.func,f.oneOf(["window","scroll-parent","parent","none"])])},mM={center:"center",start:"end",end:"start",top:"bottom",bottom:"top",stretch:"stretch",offscreen:"offscreen"},fj={renderTarget:f.oneOfType([f.node,f.func]),target:f.oneOfType([Si,f.func]),placement:Jt.placement,mountNode:Jt.mountNode,insertAt:f.oneOf(["bottom","top"]),constrain:Jt.constrain,offsetX:f.oneOfType([f.string,f.number]),offsetY:f.oneOfType([f.string,f.number]),id:f.string,shouldTrackPosition:f.bool,shouldPositionOverTarget:f.bool,onPositionChanged:f.func,onPositioned:f.func,children:f.node,containerDisplay:f.oneOf(["inline-block","block"]),elementRef:f.func},pj=["renderTarget","target","placement","mountNode","insertAt","constrain","offsetX","offsetY","id","shouldTrackPosition","shouldPositionOverTarget","onPositionChanged","onPositioned","children","containerDisplay","elementRef"];function gM(t,e,n){const i=Array.isArray(t)?t:t.split(" "),r=Qr(i,2),o=r[0],s=r[1],a=e(o,s).filter(l=>l);return n?a.join(n):a}function OM(t,e){return gM(t,(n,i)=>[mM[n],i],e)}function mj(t,e,n={}){if(!t||n.placement==="offscreen"){const r=!n.container&&t;return{placement:n.placement,style:{left:"-9999em",overflow:"hidden",position:"absolute",top:0,display:r?"none":null}}}const i=new gj(t,e,n);return{placement:i.placement,style:i.style}}class PC{constructor(e,n,i={top:0,left:0}){this.node=void 0,this.placement=void 0,this.rect=void 0,this._offset=void 0,this.node=rt(e),typeof n=="string"?this.placement=bM(n):Array.isArray(n)?this.placement=n:this.placement=["bottom","center"],this.rect=Xt(this.node),this._offset=AC(i,this.size,this.node)}get width(){return this.rect.width}get height(){return this.rect.height}get size(){return{width:this.width,height:this.height}}get position(){return{top:this.rect.top,left:this.rect.left}}get hasVerticalPlacement(){return["top","bottom"].indexOf(this.placement[0])>=0}get hasHorizontalPlacement(){return["start","end"].indexOf(this.placement[0])>=0}get shouldStretchVertically(){return this.placement[1]==="stretch"&&this.hasVerticalPlacement}get shouldStretchHorizontally(){return this.placement[1]==="stretch"&&this.hasHorizontalPlacement}get mirroredPlacement(){return OM(this.placement)}calculateOffset(e){const n={top:0,start:0,center:"50%",bottom:"100%",end:"100%",stretch:0};let i=Qr(e,2),r=i[0],o=i[1];if(["start","end"].indexOf(r)>=0){var s=[o,r];r=s[0],o=s[1]}let a=0,l=0;return typeof n[r]<"u"&&(a=n[r]),typeof n[o]<"u"&&(l=n[o]),Ng([AC({top:a,left:l},this.size,this.node),Oj(this._offset,this.placement)])}get scrollParentsOffset(){const e=eM(this.node);let n=0,i=0;for(let r=1;r1?0:Xt(n==null?void 0:n.documentElement).top,r=0,o=0;for(let s=1;sd.bottom?c-d.bottom:0,left:ad.right?l-d.right:0}}constrainTo(e){if(!e)return;const n=this.overflow(e),i={top:n.top>0,bottom:n.bottom>0,left:n.left>0,right:n.right>0};this.element.hasVerticalPlacement?(this.element.placement[1]!=="stretch"&&(i.left&&i.right?(this.element.placement[1]="center",this.target.placement[1]="center"):i.left?(this.element.placement[1]="start",this.target.placement[1]="start"):i.right&&(this.element.placement[1]="end",this.target.placement[1]="end")),i.top&&i.bottom?n.bottomn.top&&(this.element.placement[0]="top",this.target.placement[0]="bottom"):i.top?(this.element.placement[0]="bottom",this.target.placement[0]="top"):i.bottom&&(this.element.placement[0]="top",this.target.placement[0]="bottom")):this.element.hasHorizontalPlacement&&(i.top&&i.bottom?(this.element.placement[1]="center",this.target.placement[1]="center"):i.top?(this.element.placement[1]="top",this.target.placement[1]="top"):i.bottom&&(this.element.placement[1]="bottom",this.target.placement[1]="bottom"),i.left&&i.right?n.left>n.right?(this.element.placement[0]="end",this.target.placement[0]="start"):n.left({top:e.top+n.top,left:e.left+n.left}),{top:0,left:0})}function Oj(t,e){let n=t.top,i=t.left;return typeof i=="string"&&(i=parseFloat(i)),typeof n=="string"&&(n=parseFloat(n)),e[0]==="bottom"&&(n=0-n),e[0]==="end"&&(i=0-i),{top:n,left:i}}function AC(t,e,n){let i=t.left,r=t.top;return typeof i=="string"&&i.indexOf("%")!==-1&&(i=parseFloat(i)/100*e.width),typeof r=="string"&&r.indexOf("%")!==-1&&(r=parseFloat(r)/100*e.height),{top:r,left:i}}function bj(t){let e=Qr(t,2),n=e[0],i=e[1];if(n==="center"||n==="stretch"){var r=[i,n];n=r[0],i=r[1]}return[n,i]}function bM(t){let e=t.split(" ");return e.length===1&&(e=[t,"center"]),bj(e)}function yj(t){return t.join(" ")}var RC,IC,$C,Zu,to;let LC=(RC=Ht(),IC=de(cj,dj),$C=Le(),RC(Zu=IC(Zu=$C(Zu=(to=class gc extends T.Component{constructor(e){super(e),this.ref=null,this._id=void 0,this._timeouts=[],this._listener=null,this._content=void 0,this._target=void 0,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.handlePortalOpen=()=>{this.position(),this.props.shouldTrackPosition&&this.startTracking(),this._timeouts.push(setTimeout(()=>{this.state.positioned&&typeof this.props.onPositioned=="function"&&this.props.onPositioned({top:this.state.style.top,left:this.state.style.left,placement:this.state.placement})},0))},this.position=()=>{this.setState({positioned:!0,...this.calculatePosition(this.props)})},this.state={positioned:!1,...this.calculatePosition(e)},this.position=nb(this.position,0,{leading:!1,trailing:!0}),this._id=this.props.id||e.deterministicId()}shouldComponentUpdate(e,n,i){return!KO(this.state,n)||!P0(this.props,e)||!P0(this.context,i)}componentDidMount(){var e,n;this.toggleLocatorAttributes(!0),(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(e,n){var i,r;this.position(),this.toggleLocatorAttributes(!0),this.props.shouldTrackPosition!==e.shouldTrackPosition&&(this.props.shouldTrackPosition?this.startTracking():this.stopTracking());const o=this.state,s=o.style,a=o.placement;s&&n.style&&(a!==n.placement||s.top!==n.style.top||s.left!==n.style.left)&&typeof this.props.onPositionChanged=="function"&&this.props.onPositionChanged({top:s.top,left:s.left,placement:a}),(i=(r=this.props).makeStyles)===null||i===void 0||i.call(r)}componentWillUnmount(){this.position.cancel(),this.stopTracking(),this._timeouts.forEach(e=>clearTimeout(e)),this.toggleLocatorAttributes(!1)}toggleLocatorAttributes(e){this.toggleLocatorAttribute(rt(this._content),gc.contentLocatorAttribute,e),this.toggleLocatorAttribute(rt(this._target),gc.targetLocatorAttribute,e)}toggleLocatorAttribute(e,n,i){e&&e.hasAttribute&&(i&&!e.hasAttribute(n)&&e.setAttribute(n,this._id),!i&&e.hasAttribute(n)&&e.removeAttribute(n))}calculatePosition(e){return mj(this._content,this._target,{placement:e.placement,offsetX:e.offsetX,offsetY:e.offsetY,constrain:e.constrain,container:e.mountNode,over:e.shouldPositionOverTarget})}startTracking(){this._listener=this._listener||CW(this._target,this.position)}stopTracking(){this._listener&&(this._listener.remove(),this._listener=null)}renderContent(){let e=Wl(this.props.children);if(e){var n;e=$t(e,{ref:i=>{this._content=i},style:{boxSizing:"border-box",zIndex:(n=this.props.styles)===null||n===void 0?void 0:n.zIndex,...e.props.style,...this.state.style},...e.props.className&&{className:e.props.className},[gc.contentLocatorAttribute]:this._id}),e=C(pM,{open:!0,onOpen:this.handlePortalOpen,mountNode:this.props.mountNode,insertAt:this.props.insertAt},e)}return e}renderTarget(){const e=ot(this.props.renderTarget);return e?$t(e,{ref:n=>{this._target=n},[gc.targetLocatorAttribute]:this._id}):(this.props.target&&(this._target=ot(this.props.target)),null)}render(){var e;const n={[gc.locatorAttribute]:this._id};return C("span",Object.assign({},n,{css:(e=this.props.styles)===null||e===void 0?void 0:e.position,ref:this.handleRef}),this.renderTarget(),this.renderContent())}},to.displayName="Position",to.componentId="Position",to.allowedProps=pj,to.propTypes=fj,to.defaultProps={placement:"bottom center",mountNode:null,insertAt:"bottom",constrain:"window",offsetX:0,offsetY:0,shouldTrackPosition:!0,shouldPositionOverTarget:!1,children:null},to.locatorAttribute="data-position",to.targetLocatorAttribute="data-position-target",to.contentLocatorAttribute="data-position-content",to))||Zu)||Zu)||Zu);function Mv(t,e){return gM(t,(n,i)=>[n,i].map(r=>r==="start"||r==="end"?mM[r]:r),e)}const yM=["end center","end top","end bottom","center end","end"],vM=["start center","start top","start bottom","center start","start"],SM=["bottom","bottom end","bottom start","bottom center"],vj=["top","top start","top end","top center"],Sj=(t,e)=>yM.includes(t)?{paddingInlineStart:e==null?void 0:e.arrowSize,paddingInlineEnd:"0"}:vM.includes(t)?{paddingInlineEnd:e==null?void 0:e.arrowSize,paddingInlineStart:"0"}:SM.includes(t)?{paddingTop:e==null?void 0:e.arrowSize}:vj.includes(t)?{paddingBottom:e==null?void 0:e.arrowSize}:{position:"absolute",left:"-999em"},wj=(t,e)=>{const n=["top","bottom","top center","bottom center"],i=["top start","bottom start"],r=["top end","bottom end"],o=["start top","end top"],s=["start bottom","end bottom"];return n.includes(t)?{insetInlineStart:"50%"}:i.includes(t)?{insetInlineStart:`calc((${e==null?void 0:e.arrowSize} + ${e==null?void 0:e.arrowBorderWidth}) * 2)`,insetInlineEnd:"auto"}:r.includes(t)?{insetInlineStart:`calc(100% - (${e==null?void 0:e.arrowSize} + ${e==null?void 0:e.arrowBorderWidth}) * 2)`,insetInlineEnd:"auto"}:o.includes(t)?{top:`calc((${e==null?void 0:e.arrowSize} + ${e==null?void 0:e.arrowBorderWidth}) * 2)`}:s.includes(t)?{top:`calc(100% - (${e==null?void 0:e.arrowSize} + ${e==null?void 0:e.arrowBorderWidth}) * 2)`}:{}},kj=(t,e,n)=>{const i=OM(t," "),r=e==="inverse";return yM.includes(i)?{main:{top:"50%",insetInlineStart:"100%",insetInlineEnd:"auto",marginTop:`calc(-1 * (${n==null?void 0:n.arrowSize} + ${n==null?void 0:n.arrowBorderWidth}))`,borderInlineEndWidth:"0",borderInlineEndColor:"transparent",borderInlineStartColor:r?n==null?void 0:n.arrowBorderColorInverse:n==null?void 0:n.arrowBorderColor,borderTopColor:"transparent",borderBottomColor:"transparent",borderInlineStartWidth:n==null?void 0:n.arrowSize},__after:{insetInlineEnd:n==null?void 0:n.arrowBorderWidth,insetInlineStart:"auto",marginTop:`calc(-1 * ${n==null?void 0:n.arrowSize})`,borderInlineEndWidth:"0",borderInlineEndColor:"transparent",borderTopColor:"transparent",borderBottomColor:"transparent",borderInlineStartWidth:n==null?void 0:n.arrowSize,borderInlineStartColor:r?n==null?void 0:n.arrowBackgroundColorInverse:n==null?void 0:n.arrowBackgroundColor}}:vM.includes(i)?{main:{top:"50%",insetInlineEnd:"100%",insetInlineStart:"auto",marginTop:`calc(-1 * (${n==null?void 0:n.arrowSize} + ${n==null?void 0:n.arrowBorderWidth}))`,borderInlineStartWidth:"0",borderInlineStartColor:"transparent",borderInlineEndColor:r?n==null?void 0:n.arrowBorderColorInverse:n==null?void 0:n.arrowBorderColor,borderTopColor:"transparent",borderBottomColor:"transparent",borderInlineEndWidth:n==null?void 0:n.arrowSize},__after:{insetInlineStart:n==null?void 0:n.arrowBorderWidth,insetInlineEnd:"auto",marginTop:`calc(-1 * ${n==null?void 0:n.arrowSize})`,borderInlineStartWidth:"0",borderInlineStartColor:"transparent",borderTopColor:"transparent",borderBottomColor:"transparent",borderInlineEndWidth:n==null?void 0:n.arrowSize,borderInlineEndColor:r?n==null?void 0:n.arrowBackgroundColorInverse:n==null?void 0:n.arrowBackgroundColor}}:SM.includes(i)?{main:{top:"100%",marginInlineStart:`calc(-1 * (${n==null?void 0:n.arrowSize} + ${n==null?void 0:n.arrowBorderWidth}))`,marginInlineEnd:"0",borderBottomWidth:"0",borderBottomColor:"transparent",borderInlineStartColor:"transparent",borderInlineEndColor:"transparent"},__after:{bottom:n==null?void 0:n.arrowBorderWidth,marginInlineStart:`calc(-1 * ${n==null?void 0:n.arrowSize})`,marginInlineEnd:"0",borderBottomWidth:"0",borderBottomColor:"transparent",borderInlineStartColor:"transparent",borderInlineEndColor:"transparent",borderTopColor:r?n==null?void 0:n.arrowBackgroundColorInverse:n==null?void 0:n.arrowBackgroundColor}}:{main:{bottom:"100%",marginInlineStart:`calc(-1 * (${n==null?void 0:n.arrowSize} + ${n==null?void 0:n.arrowBorderWidth}))`,marginInlineEnd:"0",borderTopWidth:"0",borderTopColor:"transparent",borderInlineStartColor:"transparent",borderInlineEndColor:"transparent"},__after:{top:n==null?void 0:n.arrowBorderWidth,marginInlineStart:`calc(-1 * ${n==null?void 0:n.arrowSize})`,marginInlineEnd:"0",borderTopWidth:"0",borderTopColor:"transparent",borderInlineStartColor:"transparent",borderInlineEndColor:"transparent",borderBottomColor:r?n==null?void 0:n.arrowBackgroundColorInverse:n==null?void 0:n.arrowBackgroundColor}}},xj=(t,e)=>{const n=e.placement,i=e.background,r={content:'""',height:"0",width:"0",position:"absolute",display:"block",boxSizing:"border-box",pointerEvents:"none",borderStyle:"solid"},o={default:t==null?void 0:t.arrowBorderColor,inverse:t==null?void 0:t.arrowBorderColorInverse},s=kj(n,i,t);return{contextView:{label:"contextView",boxSizing:"border-box",minHeight:`calc(${t==null?void 0:t.arrowSize} * 2)`,...Sj(n,t)},contextView__content:{label:"contextView__content",position:"relative"},contextView__arrow:{label:"contextView__arrow",...r,display:"block",borderWidth:`calc(${t==null?void 0:t.arrowSize} + ${t==null?void 0:t.arrowBorderWidth})`,borderColor:o[i],...s.main,...wj(n,t),"&::after":{borderWidth:t==null?void 0:t.arrowSize,borderColor:o[i],...s.__after,...r}},arrowSize:t.arrowSize,arrowBorderWidth:t.arrowBorderWidth}},_j=t=>{var e,n,i,r;return{...{arrowSize:"0.5rem",arrowBorderWidth:t==null||(e=t.borders)===null||e===void 0?void 0:e.widthSmall,arrowBackgroundColor:t==null||(n=t.colors)===null||n===void 0?void 0:n.white,arrowBorderColor:t==null||(i=t.colors)===null||i===void 0?void 0:i.tiara,arrowBackgroundColorInverse:t==null||(r=t.colors)===null||r===void 0?void 0:r.licorice,arrowBorderColorInverse:"transparent"}}},Ej={as:f.elementType,elementRef:f.func,margin:ct.spacing,padding:ct.spacing,height:f.oneOfType([f.string,f.number]),width:f.oneOfType([f.string,f.number]),maxHeight:f.oneOfType([f.string,f.number]),maxWidth:f.oneOfType([f.string,f.number]),minHeight:f.oneOfType([f.string,f.number]),minWidth:f.oneOfType([f.string,f.number]),children:f.node,textAlign:f.oneOf(["start","center","end"]),shadow:ct.shadow,stacking:ct.stacking,background:f.oneOf(["default","inverse"]),placement:Jt.placement,debug:f.bool},Cj=["as","elementRef","margin","padding","height","width","maxHeight","maxWidth","minHeight","minWidth","children","textAlign","shadow","stacking","background","placement","debug"];var NC,MC,Ia;let Tj=(NC=de(xj,_j),NC(MC=(Ia=class wM extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){const e=this.props,n=e.as,i=e.background,r=e.children,o=e.debug,s=e.height,a=e.width,l=e.maxHeight,u=e.maxWidth,c=e.minHeight,d=e.minWidth,h=e.margin,p=e.padding,m=e.shadow,O=e.stacking,y=e.style,b=e.textAlign,v=e.styles;return C(be,Object.assign({},Re(this.props,wM.allowedProps),{css:v==null?void 0:v.contextView,style:y,borderWidth:"none",display:"inline-block",as:n,withVisualDebug:o,elementRef:this.handleRef,margin:h,stacking:O}),C(be,{css:v==null?void 0:v.contextView__content,display:"block",borderRadius:"medium",borderWidth:"small",borderColor:i==="default"?"primary":"transparent",background:i==="default"?"primary":"primary-inverse",withVisualDebug:o,height:s,width:a,maxHeight:l,maxWidth:u,minHeight:c,minWidth:d,padding:p,shadow:m,textAlign:b},C("span",{css:v==null?void 0:v.contextView__arrow}),r))}},Ia.displayName="ContextView",Ia.componentId="ContextView",Ia.allowedProps=Cj,Ia.propTypes=Ej,Ia.defaultProps={as:"span",elementRef:()=>{},debug:!1,width:"auto",height:"auto",children:null,textAlign:"start",background:"default",shadow:"resting",placement:"center end"},Ia))||MC);const Pj=(t,e,n)=>{const i=e.size,r=e.color,o=e.textAlign,s=e.shape,a=e.withBackground,l=e.withBorder,u=e.isCondensed,c=n.isDisabled,d=n.hasOnlyIconVisible,h={circle:{borderRadius:"50%"},rectangle:{}},p={small:{content:{fontSize:t.smallFontSize,paddingLeft:t.smallPaddingHorizontal,paddingRight:t.smallPaddingHorizontal,...d&&{paddingLeft:0,paddingRight:0,height:t.smallHeight,width:t.smallHeight}},children:{paddingTop:t.smallPaddingTop,paddingBottom:t.smallPaddingBottom},iconSVG:{fontSize:u?t.smallFontSize:t.iconSizeSmall}},medium:{content:{fontSize:t.mediumFontSize,paddingLeft:t.mediumPaddingHorizontal,paddingRight:t.mediumPaddingHorizontal,...d&&{paddingLeft:0,paddingRight:0,height:t.mediumHeight,width:t.mediumHeight}},children:{paddingTop:t.mediumPaddingTop,paddingBottom:t.mediumPaddingBottom},iconSVG:{fontSize:u?t.mediumFontSize:t.iconSizeMedium}},large:{content:{fontSize:t.largeFontSize,paddingLeft:t.largePaddingHorizontal,paddingRight:t.largePaddingHorizontal,...d&&{paddingLeft:0,paddingRight:0,height:t.largeHeight,width:t.largeHeight}},children:{paddingTop:t.largePaddingTop,paddingBottom:t.largePaddingBottom},iconSVG:{fontSize:u?t.largeFontSize:t.iconSizeLarge}}},m={primary:a?{default:{color:t.primaryColor,background:t.primaryBackground,borderColor:t.primaryBorderColor},active:{background:t.primaryActiveBackground,boxShadow:t.primaryActiveBoxShadow},hover:{background:t.primaryHoverBackground}}:{default:{color:t.primaryGhostColor,borderColor:t.primaryGhostBorderColor,background:t.primaryGhostBackground},active:{background:t.primaryGhostActiveBackground,boxShadow:t.primaryGhostActiveBoxShadow},hover:{background:t.primaryGhostHoverBackground}},secondary:a?{default:{color:t.secondaryColor,background:t.secondaryBackground,borderColor:t.secondaryBorderColor},active:{background:t.secondaryActiveBackground,boxShadow:t.secondaryActiveBoxShadow},hover:{background:t.secondaryHoverBackground}}:{default:{color:t.secondaryGhostColor,borderColor:t.secondaryGhostBorderColor,background:t.secondaryGhostBackground},active:{background:t.secondaryGhostActiveBackground,boxShadow:t.secondaryGhostActiveBoxShadow},hover:{background:t.secondaryGhostHoverBackground}},"primary-inverse":a?{default:{color:t.primaryInverseColor,background:t.primaryInverseBackground,borderColor:t.primaryInverseBorderColor},active:{background:t.primaryInverseActiveBackground,boxShadow:t.primaryInverseActiveBoxShadow},hover:{background:t.primaryInverseHoverBackground}}:{default:{color:t.primaryInverseGhostColor,borderColor:t.primaryInverseGhostBorderColor,background:t.primaryInverseGhostBackground},active:{background:t.primaryInverseGhostActiveBackground,boxShadow:t.primaryInverseGhostActiveBoxShadow},hover:{background:t.primaryInverseGhostHoverBackground}},success:a?{default:{color:t.successColor,background:t.successBackground,borderColor:t.successBorderColor},active:{background:t.successActiveBackground,boxShadow:t.successActiveBoxShadow},hover:{background:t.successHoverBackground}}:{default:{color:t.successGhostColor,borderColor:t.successGhostBorderColor,background:t.successGhostBackground},active:{background:t.successGhostActiveBackground,boxShadow:t.successGhostActiveBoxShadow},hover:{background:t.successGhostHoverBackground}},danger:a?{default:{color:t.dangerColor,background:t.dangerBackground,borderColor:t.dangerBorderColor},active:{background:t.dangerActiveBackground,boxShadow:t.dangerActiveBoxShadow},hover:{background:t.dangerHoverBackground}}:{default:{color:t.dangerGhostColor,borderColor:t.dangerGhostBorderColor,background:t.dangerGhostBackground},active:{background:t.dangerGhostActiveBackground,boxShadow:t.dangerGhostActiveBoxShadow},hover:{background:t.dangerGhostHoverBackground}}};return{baseButton:{label:"baseButton",appearance:"none",textDecoration:"none",touchAction:"manipulation","&::-moz-focus-inner":{border:"0"},"*":{pointerEvents:"none"},"&:focus":{textDecoration:"none"},"&:active > [class$=-baseButton__content]":m[r].active,"&:hover > [class$=-baseButton__content]":m[r].hover},content:{label:"baseButton__content",boxSizing:"border-box",width:"100%",display:"block",direction:"inherit",userSelect:"none",transition:"background 0.2s, transform 0.2s",transform:t.transform,fontFamily:t.fontFamily,fontWeight:t.fontWeight,textTransform:t.textTransform,letterSpacing:t.letterSpacing,borderStyle:t.borderStyle,borderWidth:t.borderWidth,borderRadius:t.borderRadius,lineHeight:t.lineHeight,textAlign:o,"&:hover":{transform:t.hoverTransform},...p[i].content,...m[r].default,...h[s],...u&&{paddingLeft:0,paddingRight:0},...c&&{opacity:.5},...d&&{lineHeight:1},...!l&&{borderStyle:"none"}},children:{label:"baseButton__children",display:"block",...p[i].children,...u&&{paddingTop:0,paddingBottom:0}},iconSVG:{label:"baseButton__iconSVG",display:"flex",alignItems:"center",...p[i].iconSVG},childrenLayout:{label:"baseButton__childrenLayout",display:"flex",height:"100%",width:"100%",justifyContent:d||o==="center"?"center":"flex-start",boxSizing:"border-box",alignItems:"center",flexDirection:"row",maxWidth:"100%",overflowX:"visible",overflowY:"visible",unicodeBidi:"isolate"},iconOnly:{label:"baseButton__iconOnly",boxSizing:"border-box",minWidth:"0.0625rem",flexShrink:0,maxWidth:"100%",overflowX:"visible",overflowY:"visible",unicodeBidi:"isolate"},iconWrapper:{label:"baseButton__iconWrapper",boxSizing:"border-box",minWidth:"0.0625rem",paddingInlineEnd:u?t.iconTextGapCondensed:t.iconTextGap,flexShrink:0,maxWidth:"100%",overflowX:"visible",overflowY:"visible",unicodeBidi:"isolate"},childrenWrapper:{label:"baseButton__childrenWrapper",boxSizing:"border-box",minWidth:"0.0625rem",flexShrink:1,maxWidth:"100%",overflowX:"visible",overflowY:"visible",unicodeBidi:"isolate"}}};function I0(t){"@babel/helpers - typeof";return I0=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},I0(t)}var Aj=/^\s+/,Rj=/\s+$/;function Se(t,e){if(t=t||"",e=e||{},t instanceof Se)return t;if(!(this instanceof Se))return new Se(t,e);var n=Ij(t);this._originalInput=t,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=e.format||n.format,this._gradientType=e.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}Se.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var e=this.toRgb(),n,i,r,o,s,a;return n=e.r/255,i=e.g/255,r=e.b/255,n<=.03928?o=n/12.92:o=Math.pow((n+.055)/1.055,2.4),i<=.03928?s=i/12.92:s=Math.pow((i+.055)/1.055,2.4),r<=.03928?a=r/12.92:a=Math.pow((r+.055)/1.055,2.4),.2126*o+.7152*s+.0722*a},setAlpha:function(e){return this._a=kM(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=BC(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=BC(this._r,this._g,this._b),n=Math.round(e.h*360),i=Math.round(e.s*100),r=Math.round(e.v*100);return this._a==1?"hsv("+n+", "+i+"%, "+r+"%)":"hsva("+n+", "+i+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=DC(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=DC(this._r,this._g,this._b),n=Math.round(e.h*360),i=Math.round(e.s*100),r=Math.round(e.l*100);return this._a==1?"hsl("+n+", "+i+"%, "+r+"%)":"hsla("+n+", "+i+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return QC(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return Mj(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(Tt(this._r,255)*100)+"%",g:Math.round(Tt(this._g,255)*100)+"%",b:Math.round(Tt(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(Tt(this._r,255)*100)+"%, "+Math.round(Tt(this._g,255)*100)+"%, "+Math.round(Tt(this._b,255)*100)+"%)":"rgba("+Math.round(Tt(this._r,255)*100)+"%, "+Math.round(Tt(this._g,255)*100)+"%, "+Math.round(Tt(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:Zj[QC(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var n="#"+FC(this._r,this._g,this._b,this._a),i=n,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=Se(e);i="#"+FC(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+n+",endColorstr="+i+")"},toString:function(e){var n=!!e;e=e||this._format;var i=!1,r=this._a<1&&this._a>=0,o=!n&&r&&(e==="hex"||e==="hex6"||e==="hex3"||e==="hex4"||e==="hex8"||e==="name");return o?e==="name"&&this._a===0?this.toName():this.toRgbString():(e==="rgb"&&(i=this.toRgbString()),e==="prgb"&&(i=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(i=this.toHexString()),e==="hex3"&&(i=this.toHexString(!0)),e==="hex4"&&(i=this.toHex8String(!0)),e==="hex8"&&(i=this.toHex8String()),e==="name"&&(i=this.toName()),e==="hsl"&&(i=this.toHslString()),e==="hsv"&&(i=this.toHsvString()),i||this.toHexString())},clone:function(){return Se(this.toString())},_applyModification:function(e,n){var i=e.apply(null,[this].concat([].slice.call(n)));return this._r=i._r,this._g=i._g,this._b=i._b,this.setAlpha(i._a),this},lighten:function(){return this._applyModification(Fj,arguments)},brighten:function(){return this._applyModification(zj,arguments)},darken:function(){return this._applyModification(Hj,arguments)},desaturate:function(){return this._applyModification(Dj,arguments)},saturate:function(){return this._applyModification(Bj,arguments)},greyscale:function(){return this._applyModification(Qj,arguments)},spin:function(){return this._applyModification(Uj,arguments)},_applyCombination:function(e,n){return e.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(jj,arguments)},complement:function(){return this._applyCombination(Wj,arguments)},monochromatic:function(){return this._applyCombination(Xj,arguments)},splitcomplement:function(){return this._applyCombination(Vj,arguments)},triad:function(){return this._applyCombination(zC,[3])},tetrad:function(){return this._applyCombination(zC,[4])}};Se.fromRatio=function(t,e){if(I0(t)=="object"){var n={};for(var i in t)t.hasOwnProperty(i)&&(i==="a"?n[i]=t[i]:n[i]=Vh(t[i]));t=n}return Se(t,e)};function Ij(t){var e={r:0,g:0,b:0},n=1,i=null,r=null,o=null,s=!1,a=!1;return typeof t=="string"&&(t=Kj(t)),I0(t)=="object"&&(Mo(t.r)&&Mo(t.g)&&Mo(t.b)?(e=$j(t.r,t.g,t.b),s=!0,a=String(t.r).substr(-1)==="%"?"prgb":"rgb"):Mo(t.h)&&Mo(t.s)&&Mo(t.v)?(i=Vh(t.s),r=Vh(t.v),e=Nj(t.h,i,r),s=!0,a="hsv"):Mo(t.h)&&Mo(t.s)&&Mo(t.l)&&(i=Vh(t.s),o=Vh(t.l),e=Lj(t.h,i,o),s=!0,a="hsl"),t.hasOwnProperty("a")&&(n=t.a)),n=kM(n),{ok:s,format:t.format||a,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:n}}function $j(t,e,n){return{r:Tt(t,255)*255,g:Tt(e,255)*255,b:Tt(n,255)*255}}function DC(t,e,n){t=Tt(t,255),e=Tt(e,255),n=Tt(n,255);var i=Math.max(t,e,n),r=Math.min(t,e,n),o,s,a=(i+r)/2;if(i==r)o=s=0;else{var l=i-r;switch(s=a>.5?l/(2-i-r):l/(i+r),i){case t:o=(e-n)/l+(e1&&(d-=1),d<1/6?u+(c-u)*6*d:d<1/2?c:d<2/3?u+(c-u)*(2/3-d)*6:u}if(e===0)i=r=o=n;else{var a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=s(l,a,t+1/3),r=s(l,a,t),o=s(l,a,t-1/3)}return{r:i*255,g:r*255,b:o*255}}function BC(t,e,n){t=Tt(t,255),e=Tt(e,255),n=Tt(n,255);var i=Math.max(t,e,n),r=Math.min(t,e,n),o,s,a=i,l=i-r;if(s=i===0?0:l/i,i==r)o=0;else{switch(i){case t:o=(e-n)/l+(e>1)+720)%360;--e;)i.h=(i.h+r)%360,o.push(Se(i));return o}function Xj(t,e){e=e||6;for(var n=Se(t).toHsv(),i=n.h,r=n.s,o=n.v,s=[],a=1/e;e--;)s.push(Se({h:i,s:r,v:o})),o=(o+a)%1;return s}Se.mix=function(t,e,n){n=n===0?0:n||50;var i=Se(t).toRgb(),r=Se(e).toRgb(),o=n/100,s={r:(r.r-i.r)*o+i.r,g:(r.g-i.g)*o+i.g,b:(r.b-i.b)*o+i.b,a:(r.a-i.a)*o+i.a};return Se(s)};Se.readability=function(t,e){var n=Se(t),i=Se(e);return(Math.max(n.getLuminance(),i.getLuminance())+.05)/(Math.min(n.getLuminance(),i.getLuminance())+.05)};Se.isReadable=function(t,e,n){var i=Se.readability(t,e),r,o;switch(o=!1,r=Jj(n),r.level+r.size){case"AAsmall":case"AAAlarge":o=i>=4.5;break;case"AAlarge":o=i>=3;break;case"AAAsmall":o=i>=7;break}return o};Se.mostReadable=function(t,e,n){var i=null,r=0,o,s,a,l;n=n||{},s=n.includeFallbackColors,a=n.level,l=n.size;for(var u=0;ur&&(r=o,i=Se(e[u]));return Se.isReadable(t,i,{level:a,size:l})||!s?i:(n.includeFallbackColors=!1,Se.mostReadable(t,["#fff","#000"],n))};var Dv=Se.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},Zj=Se.hexNames=qj(Dv);function qj(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}function kM(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function Tt(t,e){Yj(t)&&(t="100%");var n=Gj(t);return t=Math.min(e,Math.max(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),Math.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function ib(t){return Math.min(1,Math.max(0,t))}function Ti(t){return parseInt(t,16)}function Yj(t){return typeof t=="string"&&t.indexOf(".")!=-1&&parseFloat(t)===1}function Gj(t){return typeof t=="string"&&t.indexOf("%")!=-1}function Rr(t){return t.length==1?"0"+t:""+t}function Vh(t){return t<=1&&(t=t*100+"%"),t}function xM(t){return Math.round(parseFloat(t)*255).toString(16)}function HC(t){return Ti(t)/255}var Sr=function(){var t="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",n="(?:"+e+")|(?:"+t+")",i="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+i),rgba:new RegExp("rgba"+r),hsl:new RegExp("hsl"+i),hsla:new RegExp("hsla"+r),hsv:new RegExp("hsv"+i),hsva:new RegExp("hsva"+r),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Mo(t){return!!Sr.CSS_UNIT.exec(t)}function Kj(t){t=t.replace(Aj,"").replace(Rj,"").toLowerCase();var e=!1;if(Dv[t])t=Dv[t],e=!0;else if(t=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=Sr.rgb.exec(t))?{r:n[1],g:n[2],b:n[3]}:(n=Sr.rgba.exec(t))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Sr.hsl.exec(t))?{h:n[1],s:n[2],l:n[3]}:(n=Sr.hsla.exec(t))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Sr.hsv.exec(t))?{h:n[1],s:n[2],v:n[3]}:(n=Sr.hsva.exec(t))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Sr.hex8.exec(t))?{r:Ti(n[1]),g:Ti(n[2]),b:Ti(n[3]),a:HC(n[4]),format:e?"name":"hex8"}:(n=Sr.hex6.exec(t))?{r:Ti(n[1]),g:Ti(n[2]),b:Ti(n[3]),format:e?"name":"hex"}:(n=Sr.hex4.exec(t))?{r:Ti(n[1]+""+n[1]),g:Ti(n[2]+""+n[2]),b:Ti(n[3]+""+n[3]),a:HC(n[4]+""+n[4]),format:e?"name":"hex8"}:(n=Sr.hex3.exec(t))?{r:Ti(n[1]+""+n[1]),g:Ti(n[2]+""+n[2]),b:Ti(n[3]+""+n[3]),format:e?"name":"hex"}:!1}function Jj(t){var e,n;return t=t||{level:"AA",size:"small"},e=(t.level||"AA").toUpperCase(),n=(t.size||"small").toLowerCase(),e!=="AA"&&e!=="AAA"&&(e="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:e,size:n}}function qf(t,e){return Se(t).setAlpha(e/100).toRgbString()}function Xo(t,e){return Se(t).darken(e).toRgbString()}const Bv="inset 0 0 0.1875rem 0.0625rem",qu=({style:t,textColor:e,ghostTextColor:n,backgroundColor:i,borderColor:r,ghostBorderColor:o=r})=>({[`${t}Color`]:e,[`${t}BorderColor`]:Xo(r,10),[`${t}Background`]:i,[`${t}HoverBackground`]:Xo(i,10),[`${t}ActiveBackground`]:Xo(i,10),[`${t}ActiveBoxShadow`]:`${Bv} ${Xo(r,20)}`,[`${t}GhostColor`]:n,[`${t}GhostBorderColor`]:o,[`${t}GhostBackground`]:"transparent",[`${t}GhostHoverBackground`]:qf(n,10),[`${t}GhostActiveBackground`]:"transparent",[`${t}GhostActiveBoxShadow`]:`${Bv} ${qf(o,28)}`}),Xk=t=>{const e=t.borders,n=t.colors,i=t.forms,r=t.spacing,o=t.typography,s=t.key,a={canvas:{...qu({style:"primary",backgroundColor:t["ic-brand-button--primary-bgd"],borderColor:t["ic-brand-button--primary-bgd"],textColor:t["ic-brand-button--primary-text"],ghostTextColor:t["ic-brand-button--primary-bgd"]}),primaryGhostHoverBackground:qf(t["ic-brand-button--primary-bgd"],10)},"canvas-high-contrast":{secondaryBorderColor:n==null?void 0:n.borderMedium,primaryInverseBorderColor:n==null?void 0:n.borderMedium},instructure:{borderRadius:"999em",smallPaddingTop:"0.5rem",smallPaddingBottom:"0.4375rem",mediumPaddingTop:"0.75rem",mediumPaddingBottom:"0.75rem",largePaddingTop:"1rem",largePaddingBottom:"1rem",largeFontSize:"1.125rem"}};return{...{transform:"none",hoverTransform:"none",fontFamily:o==null?void 0:o.fontFamily,fontWeight:o==null?void 0:o.fontWeightNormal,textTransform:"none",letterSpacing:"normal",borderRadius:e==null?void 0:e.radiusMedium,borderStyle:e==null?void 0:e.style,borderWidth:e==null?void 0:e.widthSmall,smallHeight:i==null?void 0:i.inputHeightSmall,smallFontSize:o==null?void 0:o.fontSizeSmall,smallPaddingHorizontal:r==null?void 0:r.xSmall,smallPaddingTop:"0.375rem",smallPaddingBottom:"0.3125rem",mediumHeight:i==null?void 0:i.inputHeightMedium,mediumFontSize:o==null?void 0:o.fontSizeMedium,mediumPaddingHorizontal:r==null?void 0:r.small,mediumPaddingTop:"0.5625rem",mediumPaddingBottom:"0.5625rem",largeHeight:i==null?void 0:i.inputHeightLarge,largeFontSize:o==null?void 0:o.fontSizeLarge,largePaddingHorizontal:r==null?void 0:r.medium,largePaddingTop:"0.6875rem",largePaddingBottom:"0.6875rem",lineHeight:o==null?void 0:o.lineHeightFit,iconSizeSmall:"1rem",iconSizeMedium:"1.25rem",iconSizeLarge:"1.625rem",iconTextGap:r.xSmall,iconTextGapCondensed:r.xxSmall,...qu({style:"primary",backgroundColor:n==null?void 0:n.backgroundBrand,borderColor:n==null?void 0:n.borderBrand,textColor:n==null?void 0:n.textLightest,ghostTextColor:n==null?void 0:n.textBrand}),...qu({style:"secondary",backgroundColor:n==null?void 0:n.backgroundLight,borderColor:n==null?void 0:n.borderLight,ghostBorderColor:n==null?void 0:n.borderDarkest,textColor:n==null?void 0:n.textDarkest,ghostTextColor:n==null?void 0:n.textDarkest}),...qu({style:"success",backgroundColor:n==null?void 0:n.backgroundSuccess,borderColor:n==null?void 0:n.borderSuccess,textColor:n==null?void 0:n.textLightest,ghostTextColor:n==null?void 0:n.textSuccess}),...qu({style:"danger",backgroundColor:n==null?void 0:n.backgroundDanger,borderColor:n==null?void 0:n.borderDanger,textColor:n==null?void 0:n.textLightest,ghostTextColor:n==null?void 0:n.textDanger}),...qu({style:"primaryInverse",backgroundColor:n==null?void 0:n.backgroundLightest,borderColor:n==null?void 0:n.borderLightest,textColor:n==null?void 0:n.textDarkest,ghostTextColor:n==null?void 0:n.textLightest}),primaryInverseBorderColor:Xo(n==null?void 0:n.borderLight,10),primaryInverseHoverBackground:Xo(n==null?void 0:n.backgroundLightest,5),primaryInverseActiveBackground:n==null?void 0:n.backgroundLightest,primaryInverseActiveBoxShadow:`${Bv} ${Xo(n==null?void 0:n.borderLightest,25)}`,successGhostHoverBackground:qf(n==null?void 0:n.textSuccess,1)},...a[s]}},eX={children:f.node,type:f.oneOf(["button","submit","reset"]),size:f.oneOf(["small","medium","large"]),elementRef:f.func,as:f.elementType,interaction:f.oneOf(["enabled","disabled","readonly"]),color:f.oneOf(["primary","primary-inverse","secondary","success","danger"]),focusColor:f.oneOf(["info","inverse"]),display:f.oneOf(["inline-block","block"]),textAlign:f.oneOf(["start","center"]),shape:f.oneOf(["rectangle","circle"]),withBackground:f.bool,withBorder:f.bool,isCondensed:f.bool,margin:ct.spacing,cursor:f.string,href:f.string,onClick:f.func,onKeyDown:f.func,renderIcon:f.oneOfType([f.node,f.func]),tabIndex:f.number},tX=["as","children","color","cursor","display","elementRef","focusColor","href","interaction","isCondensed","margin","onClick","onKeyDown","renderIcon","shape","size","tabIndex","textAlign","type","withBackground","withBorder"],nX=["type","size","elementRef","as","href","color","focusColor","textAlign","shape","display","withBackground","withBorder","isCondensed","margin","cursor","onClick","renderIcon","tabIndex","styles","makeStyles"];var UC,WC,mm,$a;let rb=(UC=de(Pj,Xk),WC=Le(),UC(mm=WC(mm=($a=class _M extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleElementRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.handleClick=n=>{const i=this.props.onClick;if(this.interaction!=="enabled"){n.preventDefault(),n.stopPropagation();return}typeof i=="function"&&i(n)},this.handleKeyDown=n=>{const i=this.props,r=i.onClick,o=i.onKeyDown,s=i.href,a=this.interaction;typeof o=="function"&&o(n);const l=ar.codes,u=l.space,c=l.enter;this.elementType!=="button"&&[u,c].includes(n.keyCode)&&(n.preventDefault(),n.stopPropagation(),typeof r=="function"&&a==="enabled"&&r(n),s&&this.ref&&this.ref.click())}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.makeStylesVariables)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.makeStylesVariables)}get makeStylesVariables(){return{isDisabled:this.isDisabled,hasOnlyIconVisible:this.hasOnlyIconVisible}}get hasOnlyIconVisible(){const e=this.props,n=e.children;return!!(e.renderIcon&&!tb(n))}get elementType(){return oi(_M,this.props)}get interaction(){return Go({props:this.props})}get isDisabled(){return this.interaction==="disabled"}get isReadOnly(){return this.interaction==="readonly"}get isEnabled(){return this.interaction==="enabled"}get focusColor(){const e=this.props,n=e.color,i=e.focusColor,r=e.withBackground;return i||(n==="primary-inverse"&&r?"info":n.includes("inverse")?"inverse":"info")}get focused(){return Co(this.ref)}focus(){this.ref&&this.ref.focus()}renderChildren(){const e=this.props,n=e.renderIcon,i=e.children,r=e.styles,o=C("span",{css:r==null?void 0:r.children},i);if(!n)return o;const s=this.hasOnlyIconVisible,a=C("span",{css:r==null?void 0:r.iconSVG},ot(n)),l=s?C("span",{css:r==null?void 0:r.iconOnly},a,i):[C("span",{key:"icon",css:r==null?void 0:r.iconWrapper},a),C("span",{key:"children",css:r==null?void 0:r.childrenWrapper},o)];return C("span",{css:r==null?void 0:r.childrenLayout},l)}render(){const e=this.props,n=e.type;e.size,e.elementRef;const i=e.as,r=e.href;e.color,e.focusColor,e.textAlign;const o=e.shape,s=e.display;e.withBackground,e.withBorder,e.isCondensed;const a=e.margin,l=e.cursor,u=e.onClick;e.renderIcon;const c=e.tabIndex,d=e.styles;e.makeStyles;const h=Ie(e,nX),p=this.isDisabled,m=this.isEnabled,O=this.isReadOnly;return C(be,Object.assign({},It(h),{as:this.elementType,focusColor:this.focusColor,position:"relative",display:s,width:s==="block"?"100%":"auto",borderRadius:o==="circle"?"circle":"medium",background:"transparent",padding:"none",borderWidth:"none",margin:a,cursor:p?"not-allowed":l,href:r,type:r?void 0:n,elementRef:this.handleElementRef,onClick:this.handleClick,onKeyDown:this.handleKeyDown,role:u&&i!=="button"?"button":void 0,tabIndex:u&&i?c||0:c,disabled:p||O,css:m?d==null?void 0:d.baseButton:null}),C("span",{css:d==null?void 0:d.content},this.renderChildren()))}},$a.displayName="BaseButton",$a.componentId="BaseButton",$a.propTypes=eX,$a.allowedProps=tX,$a.defaultProps={type:"button",size:"medium",as:"button",interaction:void 0,color:"secondary",shape:"rectangle",display:"inline-block",textAlign:"start",withBackground:!0,withBorder:!0,isCondensed:!1,margin:"0",cursor:"pointer"},$a))||mm)||mm);const iX={children:f.node,type:f.oneOf(["button","submit","reset"]),size:f.oneOf(["small","medium","large"]),elementRef:f.func,as:f.elementType,interaction:f.oneOf(["enabled","disabled","readonly"]),color:f.oneOf(["primary","primary-inverse","secondary","success","danger"]),focusColor:f.oneOf(["info","inverse"]),display:f.oneOf(["inline-block","block"]),textAlign:f.oneOf(["start","center"]),withBackground:f.bool,margin:ct.spacing,cursor:f.string,href:f.string,renderIcon:f.oneOfType([f.node,f.func]),onClick:f.func},rX=["as","children","color","cursor","display","elementRef","focusColor","href","interaction","margin","renderIcon","size","textAlign","type","withBackground","onClick"],oX=["children","type","size","as","color","focusColor","display","textAlign","withBackground","margin","cursor","href","renderIcon"];var VC,jC,gm,La;let Zk=(VC=de(null,Xk),jC=Le(),VC(gm=jC(gm=(La=class extends T.Component{constructor(...e){super(...e),this._buttonComponent=null,this.ref=null,this.handleElementRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.handleButtonRef=n=>{this._buttonComponent=n}}get focused(){return this._buttonComponent&&this._buttonComponent.focused}focus(){this._buttonComponent&&this._buttonComponent.focus()}render(){const e=this.props,n=e.children,i=e.type,r=e.size,o=e.as,s=e.color,a=e.focusColor,l=e.display,u=e.textAlign,c=e.withBackground,d=e.margin,h=e.cursor,p=e.href,m=e.renderIcon,O=Ie(e,oX),y=Go({props:O}),b=this.props.themeOverride,v={...It(O),type:i,size:r,elementRef:this.handleElementRef,ref:this.handleButtonRef,as:o,color:s,interaction:y,focusColor:a,display:l,textAlign:u,withBackground:c,margin:d,cursor:h,href:p,renderIcon:m,themeOverride:b};return z.createElement(rb,v,n)}},La.displayName="Button",La.componentId="Button",La.propTypes=iX,La.allowedProps=rX,La.defaultProps={type:"button",size:"medium",as:"button",interaction:void 0,color:"secondary",display:"inline-block",textAlign:"center",withBackground:!0,margin:"0",cursor:"pointer"},La))||gm)||gm);const sX=(t,e)=>{const n=e.inline,i=e.color,r={inherit:{color:"inherit"},primary:{color:t.primaryColor},secondary:{color:t.secondaryColor},"primary-inverse":{color:t.primaryInverseColor},"secondary-inverse":{color:t.secondaryInverseColor},success:{color:t.successColor},brand:{color:t.brandColor},warning:{color:t.warningColor},error:{color:t.errorColor},alert:{color:t.alertColor},auto:{}};return{inlineSVG:{label:"inlineSVG",fill:"currentColor",display:n?"inline-block":"block",overflow:"visible",...r[i]}}},aX=t=>{const e=t.colors,n=t.key,i={canvas:{primaryColor:t["ic-brand-font-color-dark"],brandColor:t["ic-brand-primary"]}};return{...{primaryInverseColor:e==null?void 0:e.textLightest,primaryColor:e==null?void 0:e.textDarkest,secondaryColor:e==null?void 0:e.textDark,secondaryInverseColor:e==null?void 0:e.textLight,warningColor:e==null?void 0:e.textWarning,brandColor:e==null?void 0:e.textBrand,errorColor:e==null?void 0:e.textDanger,alertColor:e==null?void 0:e.textAlert,successColor:e==null?void 0:e.textSuccess},...i[n]}},lX={children:f.node,src:f.string,title:f.string,description:f.string,focusable:f.bool,width:f.oneOfType([f.string,f.number]),height:f.oneOfType([f.string,f.number]),inline:f.bool,color:f.oneOf(["inherit","primary","secondary","primary-inverse","secondary-inverse","success","error","alert","warning","brand","auto"]),elementRef:f.func},uX=["children","src","title","description","focusable","width","height","inline","color","elementRef"],cX=["style","title","description","focusable","children","src","styles"];var XC,ZC,qC,Yu,vs;let EM=(XC=Ht(),ZC=de(sX,aX),qC=Le(),XC(Yu=ZC(Yu=qC(Yu=(vs=class Qv extends T.Component{constructor(e){super(e),this.titleId=void 0,this.descId=void 0,this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.titleId=e.deterministicId("InlineSVG-title"),this.descId=e.deterministicId("InlineSVG-desc")}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}get role(){return this.props.title?"img":"presentation"}renderTitle(){const e=this.props.title;return e?C("title",{id:this.titleId},e):null}renderDesc(e){return e?C("desc",{id:this.descId},e):null}get labelledBy(){const e=[];return this.props.title&&e.push(this.titleId),this.props.description&&e.push(this.descId),e.length>0?e.join(" "):void 0}renderContent(){if(this.props.src){const e=Qv.prepareSrc(this.props.src);return C("g",{role:"presentation",dangerouslySetInnerHTML:{__html:e}})}else return C("g",{role:"presentation"},this.props.children)}render(){const e=this.props,n=e.style,i=e.title,r=e.description,o=e.focusable;e.children;const s=e.src,a=e.styles,l=Ie(e,cX),u=this.props.width==="auto"?void 0:this.props.width,c=this.props.height==="auto"?void 0:this.props.height;return C("svg",Object.assign({},dX(s),Re(this.props,Qv.allowedProps,["inline"]),{style:{...n,width:u,height:c},width:u,height:c,"aria-hidden":i?void 0:"true","aria-labelledby":this.labelledBy,role:this.role,focusable:o?"true":"false",css:a==null?void 0:a.inlineSVG,className:l.className,ref:this.handleRef}),this.renderTitle(),this.renderDesc(r),this.renderContent())}},vs.displayName="InlineSVG",vs.componentId="InlineSVG",vs.allowedProps=uX,vs.propTypes=lX,vs.defaultProps={focusable:!1,src:"",title:"",description:"",inline:!0,width:"1em",height:"1em",color:"inherit"},vs.prepareSrc=t=>{const n=/]*>((.|[\n\r])*)<\/svg>/.exec(t);return n?n[1]:t},vs))||Yu)||Yu)||Yu);function dX(t){const e={},n=/]*)\s*>/,i=/(\S+)=["']?((?:.(?!["']?\s+(?:\S+)=|[>"']))+.)["']?/g;if(typeof t=="string"){const r=n.exec(t),o=r?r[1]:"",s=["xmlns","xmlns:xlink","version"];let a=i.exec(o);for(;a!=null;)s.indexOf(a[1])===-1&&(e[a[1]]=a[2]||(a[3]?a[3]:a[4]?a[4]:a[5])||a[1]),a=i.exec(o)}return e}const hX=(t,e)=>{const n=e.rotate,i=e.size,r=e.bidirectional,o={0:{},90:{transform:"rotate(90deg)"},180:{transform:"rotate(180deg)"},270:{transform:"rotate(270deg)"}},s={0:{transform:"scale3d(-1, 1, 1)"},90:{transform:"scale3d(-1, 1, 1) rotate(90deg)"},180:{transform:"scale3d(-1, 1, 1) rotate(180deg)"},270:{transform:"scale3d(-1, 1, 1) rotate(270deg)"}},a={"x-small":{fontSize:t.sizeXSmall},small:{fontSize:t.sizeSmall},medium:{fontSize:t.sizeMedium},large:{fontSize:t.sizeLarge},"x-large":{fontSize:t.sizeXLarge}};return{svgIcon:{label:"svgIcon",verticalAlign:"middle",lineHeight:1,width:"1em",height:"1em",...o[n],...i&&a[i],...r&&{'[dir="rtl"] &':s[n]}}}},fX=()=>({...{sizeXSmall:"1.125rem",sizeSmall:"2rem",sizeMedium:"3rem",sizeLarge:"5rem",sizeXLarge:"10rem"}}),pX={...EM.propTypes,rotate:f.oneOf(["0","90","180","270"]),size:f.oneOf(["x-small","small","medium","large","x-large"]),bidirectional:f.bool},mX=["children","src","title","description","focusable","width","height","inline","color","elementRef","rotate","size","bidirectional"],gX=["rotate","className","themeOverride","size","bidirectional","makeStyles","styles"],OX=["sizeXSmall","sizeSmall","sizeMedium","sizeLarge","sizeXLarge"];var YC,GC,Om,Na;let oe=(YC=de(hX,fX),GC=Le(),YC(Om=GC(Om=(Na=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){const e=this.props,n=e.rotate,i=e.className,r=e.themeOverride;e.size,e.bidirectional,e.makeStyles;const o=e.styles,s=Ie(e,gX),a=r;a.sizeXSmall,a.sizeSmall,a.sizeMedium,a.sizeLarge,a.sizeXLarge;const l=Ie(a,OX);return C(EM,Object.assign({},s,{themeOverride:l,rotate:n,css:o==null?void 0:o.svgIcon,className:i,elementRef:this.handleRef}))}},Na.displayName="SVGIcon",Na.componentId="SVGIcon",Na.allowedProps=mX,Na.propTypes=pX,Na.defaultProps={rotate:"0",bidirectional:!1},Na))||Om)||Om);var KC;class ku extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(oe,Object.assign({},this.props,{name:"IconArrowOpenDown",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),KC||(KC=z.createElement("path",{d:"m.153 526.146 92.168-92.299 867.767 867.636 867.636-867.636 92.429 92.299-960.065 959.935z",fillRule:"evenodd"})))}}ku.glyphName="arrow-open-down";ku.variant="Line";ku.displayName="IconArrowOpenDownLine";ku.propTypes={...oe.propTypes};ku.allowedProps=[...oe.allowedProps];var JC;class Ld extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(oe,Object.assign({},this.props,{name:"IconArrowOpenStart",viewBox:"0 0 1920 1920",elementRef:this.handleRef,bidirectional:!0}),JC||(JC=z.createElement("path",{d:"m1394.006 0 92.299 92.168-867.636 867.767 867.636 867.636-92.299 92.429-959.935-960.065z",fillRule:"evenodd"})))}}Ld.glyphName="arrow-open-start";Ld.variant="Line";Ld.displayName="IconArrowOpenStartLine";Ld.propTypes={...oe.propTypes};Ld.allowedProps=[...oe.allowedProps];var e2;class xu extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(oe,Object.assign({},this.props,{name:"IconArrowOpenUp",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),e2||(e2=z.createElement("path",{d:"m.153 1393.854 92.168 92.299 867.767-867.636 867.636 867.636 92.429-92.299L960.088 433.92z",fillRule:"evenodd"})))}}xu.glyphName="arrow-open-up";xu.variant="Line";xu.displayName="IconArrowOpenUpLine";xu.propTypes={...oe.propTypes};xu.allowedProps=[...oe.allowedProps];var t2;class oa extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(oe,Object.assign({},this.props,{name:"IconCheck",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),t2||(t2=z.createElement("path",{d:"M1827.701 303.065 698.835 1431.801 92.299 825.266 0 917.564 698.835 1616.4 1919.869 395.234z",fillRule:"evenodd"})))}}oa.glyphName="check";oa.variant="Line";oa.displayName="IconCheckLine";oa.propTypes={...oe.propTypes};oa.allowedProps=[...oe.allowedProps];var n2;class Nd extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(oe,Object.assign({},this.props,{name:"IconCopy",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),n2||(n2=z.createElement("path",{d:"M0 1919.887h1467.88V452.008H0v1467.88ZM1354.965 564.922v1242.051H112.914V564.922h1242.051ZM1920 0v1467.992h-338.741v-113.027h225.827V112.914H565.035V338.74H452.008V0H1920ZM338.741 1016.93h790.397V904.016H338.74v112.914Zm0 451.062h790.397v-113.027H338.74v113.027Zm0-225.588h564.57v-112.913H338.74v112.913Z",fillRule:"evenodd"})))}}Nd.glyphName="copy";Nd.variant="Line";Nd.displayName="IconCopyLine";Nd.propTypes={...oe.propTypes};Nd.allowedProps=[...oe.allowedProps];var i2;class Md extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(oe,Object.assign({},this.props,{name:"IconDiscussion",viewBox:"0 0 1920 1920",elementRef:this.handleRef,bidirectional:!0}),i2||(i2=z.createElement("path",{d:"M677.647 16v338.936h112.941V129.054h1016.47V919.53h-225.994v259.765L1321.412 919.53h-79.172V467.878H0v1016.47h338.71v418.9l417.996-418.9h485.534v-451.877h32.753l419.125 419.124v-419.124H1920V16H677.647ZM338.79 919.563h564.706v-112.94H338.79v112.94Zm0 225.883h338.936v-113.054H338.79v113.054Zm-225.85-564.74h1016.47v790.701H710.4L451.652 1631.06v-259.652h-338.71V580.706Z",fillRule:"evenodd"})))}}Md.glyphName="discussion";Md.variant="Line";Md.displayName="IconDiscussionLine";Md.propTypes={...oe.propTypes};Md.allowedProps=[...oe.allowedProps];var r2;class _u extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(oe,Object.assign({},this.props,{name:"IconHamburger",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),r2||(r2=z.createElement("path",{d:"M1920 1468.412v112.94H0v-112.94h1920Zm0-564.706v112.941H0V903.706h1920ZM1920 339v112.941H0V339h1920Z",fillRule:"evenodd"})))}}_u.glyphName="hamburger";_u.variant="Line";_u.displayName="IconHamburgerLine";_u.propTypes={...oe.propTypes};_u.allowedProps=[...oe.allowedProps];var o2;class Dd extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(oe,Object.assign({},this.props,{name:"IconHeart",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),o2||(o2=z.createElement("path",{d:"m1692.48 910.647-732.762 687.36-731.182-685.779c-154.616-156.875-154.616-412.122 0-568.997 74.542-75.558 173.704-117.233 279.304-117.233h.113c105.487 0 204.65 41.675 279.078 117.233l.113.113c74.767 75.783 116.103 176.865 116.103 284.385h112.941c0-107.52 41.224-208.602 116.104-284.498 74.428-75.558 173.59-117.233 279.19-117.233h.113c105.487 0 204.763 41.675 279.19 117.233 154.617 156.875 154.617 412.122 1.695 567.416m78.833-646.701c-95.887-97.355-223.737-150.89-359.718-150.89h-.113c-136.094 0-263.83 53.535-359.604 150.777-37.61 38.061-68.443 80.979-92.16 127.398-23.718-46.42-54.664-89.337-92.16-127.285-95.774-97.355-223.51-150.89-359.605-150.89h-.113c-135.981 0-263.83 53.535-359.83 150.89-197.648 200.696-197.648 526.983 1.694 729.035l810.014 759.868L1771.313 991.4c197.647-200.47 197.647-526.758 0-727.454",fillRule:"evenodd"})))}}Dd.glyphName="heart";Dd.variant="Line";Dd.displayName="IconHeartLine";Dd.propTypes={...oe.propTypes};Dd.allowedProps=[...oe.allowedProps];var s2;class Bd extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(oe,Object.assign({},this.props,{name:"IconMiniArrowDouble",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),s2||(s2=z.createElement("path",{d:"M1319.1 790.054 1020.06 355.79c-33.165-48.165-87.553-47.273-120.104 0L600.92 790.054c-33.166 48.165-12.581 87.21 46.116 87.21h625.944c58.64 0 78.67-39.938 46.12-87.21ZM600.634 1129.94l299.035 434.27c33.167 48.16 87.554 47.27 120.101 0l299.04-434.27c33.17-48.16 12.58-87.21-46.12-87.21H646.75c-58.636 0-78.668 39.94-46.116 87.21Z"})))}}Bd.glyphName="mini-arrow-double";Bd.variant="Line";Bd.displayName="IconMiniArrowDoubleLine";Bd.propTypes={...oe.propTypes};Bd.allowedProps=[...oe.allowedProps];var a2;class Qd extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(oe,Object.assign({},this.props,{name:"IconMiniArrowDown",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),a2||(a2=z.createElement("path",{d:"M994.034 1226.26c-18.796 27.296-49.269 27.3-68.067 0L574.893 716.424C556.096 689.128 567.713 667 600.852 667h718.297c33.133 0 44.757 22.125 25.959 49.424L994.034 1226.26Z",fillRule:"evenodd"})))}}Qd.glyphName="mini-arrow-down";Qd.variant="Line";Qd.displayName="IconMiniArrowDownLine";Qd.propTypes={...oe.propTypes};Qd.allowedProps=[...oe.allowedProps];var l2;class Fd extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(oe,Object.assign({},this.props,{name:"IconMiniArrowUp",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),l2||(l2=z.createElement("path",{d:"M994.034 694.296c-18.796-27.296-49.269-27.3-68.067 0l-351.074 509.836c-18.797 27.296-7.18 49.424 25.959 49.424h718.297c33.133 0 44.757-22.125 25.959-49.424L994.034 694.296Z",fillRule:"evenodd"})))}}Fd.glyphName="mini-arrow-up";Fd.variant="Line";Fd.displayName="IconMiniArrowUpLine";Fd.propTypes={...oe.propTypes};Fd.allowedProps=[...oe.allowedProps];var u2;class zd extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(oe,Object.assign({},this.props,{name:"IconMore",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),u2||(u2=z.createElement("path",{d:"M960 1468.235c93.448 0 169.412 75.965 169.412 169.412 0 93.448-75.964 169.412-169.412 169.412-93.448 0-169.412-75.964-169.412-169.412 0-93.447 75.964-169.412 169.412-169.412Zm0-677.647c93.448 0 169.412 75.964 169.412 169.412 0 93.448-75.964 169.412-169.412 169.412-93.448 0-169.412-75.964-169.412-169.412 0-93.448 75.964-169.412 169.412-169.412Zm0-677.647c93.448 0 169.412 75.964 169.412 169.412 0 93.447-75.964 169.412-169.412 169.412-93.448 0-169.412-75.965-169.412-169.412 0-93.448 75.964-169.412 169.412-169.412Z",fillRule:"evenodd"})))}}zd.glyphName="more";zd.variant="Line";zd.displayName="IconMoreLine";zd.propTypes={...oe.propTypes};zd.allowedProps=[...oe.allowedProps];var c2;class Hd extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(oe,Object.assign({},this.props,{name:"IconQuestion",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),c2||(c2=z.createElement("path",{d:"M960 1807.059c-467.125 0-847.059-379.934-847.059-847.059 0-467.125 379.934-847.059 847.059-847.059 467.125 0 847.059 379.934 847.059 847.059 0 467.125-379.934 847.059-847.059 847.059M960 0C430.645 0 0 430.645 0 960s430.645 960 960 960 960-430.645 960-960S1489.355 0 960 0m.056 1355.181 56.471.113h-56.47v-.113ZM752.64 409.65c83.69-64.715 191.661-86.4 296.696-59.294 114.862 29.703 208.264 123.106 237.968 237.967 23.378 90.466 10.729 183.303-35.464 261.459-45.515 77.026-121.186 133.948-207.586 156.084-13.779 3.502-27.783 14.796-27.783 31.85v91.708H903.529v-91.708c0-66.07 46.306-124.123 112.716-141.29 57.6-14.682 107.971-52.63 138.353-104.018 30.833-52.292 39.19-114.749 23.378-175.85-19.651-75.67-81.204-137.223-156.875-156.875-70.927-18.184-143.548-3.953-199.341 39.303-55.68 43.144-87.642 108.311-87.642 178.673H621.176c0-105.6 47.888-203.294 131.464-268.01Zm207.416 832.704c-62.343 0-112.94 50.71-112.94 112.941 0 62.23 50.597 112.941 112.94 112.941 62.231 0 112.942-50.71 112.942-112.94 0-62.231-50.71-112.942-112.942-112.942Z",fillRule:"evenodd"})))}}Hd.glyphName="question";Hd.variant="Line";Hd.displayName="IconQuestionLine";Hd.propTypes={...oe.propTypes};Hd.allowedProps=[...oe.allowedProps];var d2;class Ud extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(oe,Object.assign({},this.props,{name:"IconRss",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),d2||(d2=z.createElement("path",{d:"M1616.875 1813.333c-27.627-820.266-689.92-1482.56-1510.187-1510.186V107.52c928.213 27.733 1678.08 777.6 1705.813 1705.813h-195.626ZM53.355 0H.02v408.853h53.334c803.733 0 1457.706 653.974 1457.706 1457.814V1920h408.96v-53.333C1920.021 837.44 1082.581 0 53.355 0Zm933.984 1813.333c-26.667-473.493-407.147-853.973-880.64-880.746V736.853c581.226 27.094 1049.28 495.254 1076.373 1076.48H987.339ZM53.365 628.907H.032v408.853h53.333c456.96 0 828.8 371.947 828.8 828.907V1920h408.854v-53.333c0-682.454-555.2-1237.76-1237.654-1237.76ZM267.19 1812.288c-88 0-159.573-71.573-159.573-159.467 0-87.893 71.573-159.466 159.573-159.466 87.894 0 159.467 71.573 159.467 159.466 0 87.894-71.573 159.467-159.467 159.467m0-425.6c-146.773 0-266.24 119.36-266.24 266.133 0 146.774 119.467 266.134 266.24 266.134 146.774 0 266.134-119.36 266.134-266.134 0-146.773-119.36-266.133-266.134-266.133",fillRule:"evenodd"})))}}Ud.glyphName="rss";Ud.variant="Line";Ud.displayName="IconRssLine";Ud.propTypes={...oe.propTypes};Ud.allowedProps=[...oe.allowedProps];var h2;class Eu extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(oe,Object.assign({},this.props,{name:"IconSearch",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),h2||(h2=z.createElement("path",{d:"M790.588 1468.235c-373.722 0-677.647-303.924-677.647-677.647 0-373.722 303.925-677.647 677.647-677.647 373.723 0 677.647 303.925 677.647 677.647 0 373.723-303.924 677.647-677.647 677.647Zm596.781-160.715c120.396-138.692 193.807-319.285 193.807-516.932C1581.176 354.748 1226.428 0 790.588 0S0 354.748 0 790.588s354.748 790.588 790.588 790.588c197.647 0 378.24-73.411 516.932-193.807l516.028 516.142 79.963-79.963-516.142-516.028Z",fillRule:"evenodd"})))}}Eu.glyphName="search";Eu.variant="Line";Eu.displayName="IconSearchLine";Eu.propTypes={...oe.propTypes};Eu.allowedProps=[...oe.allowedProps];var f2;class Wd extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(oe,Object.assign({},this.props,{name:"IconTrouble",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),f2||(f2=z.createElement("path",{d:"M961 1C431.645 1 1 431.645 1 961s430.645 960 960 960 960-430.645 960-960S1490.355 1 961 1m0 1807.059c-467.125 0-847.059-379.934-847.059-847.059 0-467.125 379.934-847.059 847.059-847.059 467.125 0 847.059 379.934 847.059 847.059 0 467.125-379.934 847.059-847.059 847.059m319.465-1246.374-319.51 319.51-319.398-319.51-79.85 79.85 319.398 319.51-319.397 319.398 79.85 79.85 319.397-319.398 319.51 319.397 79.85-79.85-319.51-319.397 319.51-319.51-79.85-79.85Z",fillRule:"evenodd"})))}}Wd.glyphName="trouble";Wd.variant="Line";Wd.displayName="IconTroubleLine";Wd.propTypes={...oe.propTypes};Wd.allowedProps=[...oe.allowedProps];var p2;class ou extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(oe,Object.assign({},this.props,{name:"IconX",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),p2||(p2=z.createElement("path",{d:"M954.64 826.418 426.667 298.445 298.445 426.667 826.418 954.64l-527.973 527.973 128.222 128.222 527.973-527.973 527.973 527.973 128.222-128.222-527.973-527.973 527.973-527.973-128.222-128.222z"})))}}ou.glyphName="x";ou.variant="Line";ou.displayName="IconXLine";ou.propTypes={...oe.propTypes};ou.allowedProps=[...oe.allowedProps];var m2;class wa extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(oe,Object.assign({},this.props,{name:"IconArrowOpenDown",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),m2||(m2=z.createElement("path",{d:"m.08 568.063 176.13-176.13 783.988 783.864 783.74-783.864 176.129 176.13-959.87 960.118z",fillRule:"evenodd"})))}}wa.glyphName="arrow-open-down";wa.variant="Solid";wa.displayName="IconArrowOpenDownSolid";wa.propTypes={...oe.propTypes};wa.allowedProps=[...oe.allowedProps];var g2;class ka extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(oe,Object.assign({},this.props,{name:"IconArrowOpenEnd",viewBox:"0 0 1920 1920",elementRef:this.handleRef,bidirectional:!0}),g2||(g2=z.createElement("path",{d:"M568.13.012 392 176.142l783.864 783.989L392 1743.87 568.13 1920l960.118-959.87z",fillRule:"evenodd"})))}}ka.glyphName="arrow-open-end";ka.variant="Solid";ka.displayName="IconArrowOpenEndSolid";ka.propTypes={...oe.propTypes};ka.allowedProps=[...oe.allowedProps];var O2;class Vd extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(oe,Object.assign({},this.props,{name:"IconArrowOpenStart",viewBox:"0 0 1920 1920",elementRef:this.handleRef,bidirectional:!0}),O2||(O2=z.createElement("path",{d:"m1352.005.012 176.13 176.13-783.864 783.989 783.864 783.74L1352.005 1920 391.887 960.13z",fillRule:"evenodd"})))}}Vd.glyphName="arrow-open-start";Vd.variant="Solid";Vd.displayName="IconArrowOpenStartSolid";Vd.propTypes={...oe.propTypes};Vd.allowedProps=[...oe.allowedProps];var b2;class Cu extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(oe,Object.assign({},this.props,{name:"IconArrowOpenUp",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),b2||(b2=z.createElement("path",{d:"m.08 1351.937 176.13 176.13 783.988-783.864 783.74 783.864 176.129-176.13-959.87-960.118z",fillRule:"evenodd"})))}}Cu.glyphName="arrow-open-up";Cu.variant="Solid";Cu.displayName="IconArrowOpenUpSolid";Cu.propTypes={...oe.propTypes};Cu.allowedProps=[...oe.allowedProps];var y2;class Tu extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(oe,Object.assign({},this.props,{name:"IconCheckMark",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),y2||(y2=z.createElement("path",{d:"M1743.858 267.012 710.747 1300.124 176.005 765.382 0 941.387l710.747 710.871 1209.24-1209.116z",fillRule:"evenodd"})))}}Tu.glyphName="check-mark";Tu.variant="Solid";Tu.displayName="IconCheckMarkSolid";Tu.propTypes={...oe.propTypes};Tu.allowedProps=[...oe.allowedProps];var v2;class Pu extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(oe,Object.assign({},this.props,{name:"IconCheck",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),v2||(v2=z.createElement("path",{d:"M1743.858 267.012 710.747 1300.124 176.005 765.382 0 941.387l710.747 710.871 1209.24-1209.116z",fillRule:"evenodd"})))}}Pu.glyphName="check";Pu.variant="Solid";Pu.displayName="IconCheckSolid";Pu.propTypes={...oe.propTypes};Pu.allowedProps=[...oe.allowedProps];var S2;class jd extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(oe,Object.assign({},this.props,{name:"IconInfoBorderless",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),S2||(S2=z.createElement("path",{d:"M1229.93 594.767c36.644 37.975 50.015 91.328 43.72 142.909-9.128 74.877-30.737 144.983-56.093 215.657-27.129 75.623-54.66 151.09-82.332 226.512-44.263 120.685-88.874 241.237-132.65 362.1-10.877 30.018-18.635 62.072-21.732 93.784-3.376 34.532 21.462 51.526 52.648 36.203 24.977-12.278 49.288-28.992 68.845-48.768 31.952-32.31 63.766-64.776 94.805-97.98 15.515-16.605 30.86-33.397 45.912-50.438 11.993-13.583 24.318-34.02 40.779-42.28 31.17-15.642 55.226 22.846 49.582 49.794-5.39 25.773-23.135 48.383-39.462 68.957l-1.123 1.416a1559.53 1559.53 0 0 0-4.43 5.6c-54.87 69.795-115.043 137.088-183.307 193.977-67.103 55.77-141.607 103.216-223.428 133.98-26.65 10.016-53.957 18.253-81.713 24.563-53.585 12.192-112.798 11.283-167.56 3.333-40.151-5.828-76.246-31.44-93.264-68.707-29.544-64.698-8.98-144.595 6.295-210.45 18.712-80.625 46.8-157.388 75.493-234.619l2.18-5.867 1.092-2.934 2.182-5.87 2.182-5.873c33.254-89.517 67.436-178.676 101.727-267.797 31.294-81.296 62.72-162.537 93.69-243.95 2.364-6.216 5.004-12.389 7.669-18.558l1-2.313c6.835-15.806 13.631-31.617 16.176-48.092 6.109-39.537-22.406-74.738-61.985-51.947-68.42 39.4-119.656 97.992-170.437 156.944l-6.175 7.17c-15.78 18.323-31.582 36.607-47.908 54.286-16.089 17.43-35.243 39.04-62.907 19.07-29.521-21.308-20.765-48.637-3.987-71.785 93.18-128.58 205.056-248.86 350.86-316.783 60.932-28.386 146.113-57.285 225.882-58.233 59.802-.707 116.561 14.29 157.774 56.99Zm92.038-579.94c76.703 29.846 118.04 96.533 118.032 190.417-.008 169.189-182.758 284.908-335.53 212.455-78.956-37.446-117.358-126.202-98.219-227.002 26.494-139.598 183.78-227.203 315.717-175.87Z",fillRule:"evenodd"})))}}jd.glyphName="info-borderless";jd.variant="Solid";jd.displayName="IconInfoBorderlessSolid";jd.propTypes={...oe.propTypes};jd.allowedProps=[...oe.allowedProps];var w2;class Xd extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(oe,Object.assign({},this.props,{name:"IconInstructureLogo",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),w2||(w2=z.createElement("path",{d:"M1448.57 288.052 1084.46 502.746 1448.55 718.026 1813.23 502.732 1448.57 288.052ZM959.966 429.191 1323.92 214.589 959.988 0 596.032 214.602 959.966 429.191ZM835.499 502.732 471.388 288.038 106.704 502.732 471.388 718.026 835.499 502.732ZM106.667 1416.54 960 1920 1813.33 1416.54 960 913.07 106.667 1416.54Z"})))}}Xd.glyphName="instructure-logo";Xd.variant="Solid";Xd.displayName="IconInstructureLogoSolid";Xd.propTypes={...oe.propTypes};Xd.allowedProps=[...oe.allowedProps];var k2;class Zd extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(oe,Object.assign({},this.props,{name:"IconNo",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),k2||(k2=z.createElement("path",{d:"M213.333 960c0-167.36 56-321.707 149.44-446.4L1406.4 1557.227c-124.693 93.44-279.04 149.44-446.4 149.44-411.627 0-746.667-335.04-746.667-746.667m1493.334 0c0 167.36-56 321.707-149.44 446.4L513.6 362.773c124.693-93.44 279.04-149.44 446.4-149.44 411.627 0 746.667 335.04 746.667 746.667M960 0C429.76 0 0 429.76 0 960s429.76 960 960 960 960-429.76 960-960S1490.24 0 960 0",fillRule:"evenodd"})))}}Zd.glyphName="no";Zd.variant="Solid";Zd.displayName="IconNoSolid";Zd.propTypes={...oe.propTypes};Zd.allowedProps=[...oe.allowedProps];var x2;class qd extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(oe,Object.assign({},this.props,{name:"IconWarningBorderless",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),x2||(x2=z.createElement("path",{d:"M994.578 1436.356c-133.365 0-241.822 108.457-241.822 241.822S861.213 1920 994.578 1920s241.822-108.457 241.822-241.822-108.457-241.822-241.822-241.822zm170.485-120.912L1310.156 0H679l145.093 1315.444z",fillRule:"evenodd"})))}}qd.glyphName="warning-borderless";qd.variant="Solid";qd.displayName="IconWarningBorderlessSolid";qd.propTypes={...oe.propTypes};qd.allowedProps=[...oe.allowedProps];var _2;class Au extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(oe,Object.assign({},this.props,{name:"IconX",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),_2||(_2=z.createElement("path",{d:"M797.32 985.882 344.772 1438.43l188.561 188.562 452.549-452.549 452.548 452.549 188.562-188.562-452.549-452.548 452.549-452.549-188.562-188.561L985.882 797.32 533.333 344.772 344.772 533.333z"})))}}Au.glyphName="x";Au.variant="Solid";Au.displayName="IconXSolid";Au.propTypes={...oe.propTypes};Au.allowedProps=[...oe.allowedProps];const bX=(t,e)=>{const n=e.placement,i=e.offset,r={none:0,"x-small":t.offsetXSmall,small:t.offsetSmall,medium:t.offsetMedium},o=()=>{const s=r[i];return{...s!==0&&{top:s},insetInlineStart:n==="start"?s:"auto",insetInlineEnd:n==="end"?s:"auto"}};return{closeButton:{label:"closeButton",zIndex:t.zIndex,display:"inline-block",...n==="static"?{position:"static"}:{position:"absolute",...o()}}}},yX=t=>{const e=t.spacing,n=t.stacking;return{...{offsetMedium:e==null?void 0:e.medium,offsetSmall:e==null?void 0:e.small,offsetXSmall:e==null?void 0:e.xSmall,zIndex:n==null?void 0:n.above}}},vX={screenReaderLabel:f.oneOfType([f.string,f.node]).isRequired,color:f.oneOf(["primary","primary-inverse"]),interaction:f.oneOf(["enabled","disabled","readonly"]),elementRef:f.func,size:f.oneOf(["small","medium","large"]),onClick:f.func,margin:ct.spacing,placement:f.oneOf(["start","end","static"]),offset:f.oneOf(["none","x-small","small","medium"]),type:f.oneOf(["button","submit","reset"]),as:f.elementType,href:f.string,cursor:f.string,tabIndex:f.number},SX=["as","color","cursor","elementRef","href","interaction","margin","offset","onClick","placement","screenReaderLabel","size","tabIndex","type"],wX=["screenReaderLabel","elementRef","size","onClick","margin","placement","offset","type","as","href","cursor","tabIndex","styles"];var E2,C2,bm,Ma;let kX=(E2=de(bX,yX),C2=Le(),E2(bm=C2(bm=(Ma=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;typeof i=="function"&&i(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}get interaction(){return Go({props:this.props})}get color(){const e=this.props.color;return e==="primary"?"secondary":e}render(){const e=this.props,n=e.screenReaderLabel;e.elementRef;const i=e.size,r=e.onClick,o=e.margin;e.placement,e.offset;const s=e.type,a=e.as,l=e.href,u=e.cursor,c=e.tabIndex,d=e.styles,h=Ie(e,wX);return C("span",Object.assign({},It(h),{css:d==null?void 0:d.closeButton,ref:p=>this.ref=p}),C(rb,{renderIcon:Au,elementRef:this.handleRef,interaction:this.interaction,type:s,color:this.color,size:i,onClick:r,margin:o,withBorder:!1,withBackground:!1,as:a,href:l,cursor:u,tabIndex:c},C(Vi,null,n)))}},Ma.displayName="CloseButton",Ma.componentId="CloseButton",Ma.propTypes=vX,Ma.allowedProps=SX,Ma.defaultProps={interaction:void 0,type:"button",placement:"static",offset:"x-small",size:"small",margin:"0",as:"button",cursor:"pointer"},Ma))||bm)||bm);const xX={children:f.oneOfType([f.node,f.func]),renderIcon:f.oneOfType([f.node,f.func]),screenReaderLabel:f.string.isRequired,type:f.oneOf(["button","submit","reset"]),size:f.oneOf(["small","medium","large"]),elementRef:f.func,as:f.elementType,interaction:f.oneOf(["enabled","disabled","readonly"]),color:f.oneOf(["primary","primary-inverse","secondary","success","danger"]),focusColor:f.oneOf(["info","inverse"]),shape:f.oneOf(["rectangle","circle"]),withBackground:f.bool,withBorder:f.bool,margin:ct.spacing,cursor:f.string,href:f.string,onClick:f.func},_X=["as","children","color","cursor","elementRef","focusColor","href","interaction","margin","renderIcon","screenReaderLabel","shape","size","type","withBackground","withBorder","onClick"],EX=["children","renderIcon","screenReaderLabel","type","size","elementRef","as","interaction","color","focusColor","shape","withBackground","withBorder","margin","cursor","href"];var T2,P2,ym,Da;let $0=(T2=de(null,Xk),P2=Le(),T2(ym=P2(ym=(Da=class extends T.Component{constructor(...e){super(...e),this._baseButton=null,this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}get focused(){return this._baseButton&&this._baseButton.focused}focus(){this._baseButton&&this._baseButton.focus()}render(){const e=this.props,n=e.children,i=e.renderIcon,r=e.screenReaderLabel,o=e.type,s=e.size;e.elementRef;const a=e.as,l=e.interaction,u=e.color,c=e.focusColor,d=e.shape,h=e.withBackground,p=e.withBorder,m=e.margin,O=e.cursor,y=e.href,b=Ie(e,EX),v=this.props.themeOverride;return z.createElement(rb,Object.assign({},It(b),{type:o,size:s,elementRef:this.handleRef,as:a,interaction:l,color:u,focusColor:c,shape:d,withBackground:h,withBorder:p,margin:m,cursor:O,href:y,renderIcon:n||i,themeOverride:v,ref:S=>{this._baseButton=S}}),z.createElement(Vi,null,r))}},Da.displayName="IconButton",Da.componentId="IconButton",Da.propTypes=xX,Da.allowedProps=_X,Da.defaultProps={type:"button",size:"medium",as:"button",interaction:void 0,color:"secondary",shape:"rectangle",withBackground:!0,withBorder:!0,margin:"0",cursor:"pointer"},Da))||ym)||ym);const CX={children:f.node,as:f.elementType,display:f.oneOf(["auto","block","inline-block"]),label:f.string,open:f.bool,onBlur:f.func,onDismiss:f.func,defaultFocusElement:f.oneOfType([f.element,f.func]),contentElement:f.oneOfType([f.element,f.func]),liveRegion:f.oneOfType([Si,f.arrayOf(Si),f.func]),shouldContainFocus:f.oneOfType([f.bool,f.oneOf(["keyboard","screenreader"])]),shouldReturnFocus:f.bool,shouldCloseOnDocumentClick:f.bool,shouldCloseOnEscape:f.bool,shouldFocusOnOpen:f.bool,elementRef:f.func},TX=["children","as","display","label","open","onBlur","onDismiss","defaultFocusElement","contentElement","liveRegion","shouldContainFocus","shouldReturnFocus","shouldCloseOnDocumentClick","shouldCloseOnEscape","shouldFocusOnOpen","elementRef"],PX=["open","contentElement"],AX=["open","contentElement"];class zr extends T.Component{constructor(...e){super(...e),this._raf=[],this._focusRegion=null,this.ref=null,this.getRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}get _root(){return this.ref}componentDidUpdate(e){const n=this.props,i=n.open;n.contentElement;const r=Ie(n,PX);i&&!e.open?this.open():!i&&e.open&&this.close(),this._focusRegion&&this._focusRegion.updateElement(this.contentElement,r)}componentDidMount(){this.props.open&&this.open()}componentWillUnmount(){this.props.open&&this.close(),this._raf.forEach(e=>e.cancel()),this._raf=[]}open(){const e=this.props;e.open,e.contentElement;const n=Ie(e,AX);this._raf.push(Yo(()=>{this._focusRegion=Jn.activateRegion(this.contentElement,{...n})}))}close(){const e=this._focusRegion,n=this.contentElement;e&&Jn.blurRegion(n,e.id)}focus(){if(!this.props.open||!this.contentElement){Ge(!1,"[Dialog] Can't focus a Dialog that isn't open.");return}this._focusRegion&&Jn.focusRegion(this.contentElement,this._focusRegion.id)}blur(){if(!this.props.open||!this.contentElement){Ge(!1,"[Dialog] Can't blur a Dialog that isn't open.");return}this.close()}get contentElement(){let e=rt(this.props.contentElement);return e||(e=rt(this.ref)),e}get focused(){return this.contentElement&&this._focusRegion&&Jn.isFocused(this.contentElement,this._focusRegion.id)}render(){const e=oi(zr,this.props),n=this.props.role||(this.props.label?"dialog":void 0);return this.props.open?z.createElement(e,Object.assign({},Re(this.props,zr.allowedProps),{role:n,"aria-label":this.props.label,className:this.props.className,ref:this.getRef}),this.props.children):null}}zr.displayName="Dialog";zr.componentId="Dialog";zr.propTypes=CX;zr.allowedProps=TX;zr.defaultProps={open:!1,shouldFocusOnOpen:!0,shouldContainFocus:!1,shouldReturnFocus:!1,shouldCloseOnDocumentClick:!0,shouldCloseOnEscape:!0};const RX={isShowingContent:f.bool,defaultIsShowingContent:f.bool,on:f.oneOfType([f.oneOf(["click","hover","focus"]),f.arrayOf(f.oneOf(["click","hover","focus"]))]),withArrow:f.bool,color:f.oneOf(["primary","primary-inverse"]),placement:Jt.placement,shadow:ct.shadow,stacking:ct.stacking,contentRef:f.func,defaultFocusElement:f.oneOfType([f.element,f.func]),screenReaderLabel:f.string,offsetX:f.oneOfType([f.string,f.number]),offsetY:f.oneOfType([f.string,f.number]),constrain:Jt.constrain,positionTarget:f.oneOfType([Si,f.func]),positionContainerDisplay:f.oneOf(["inline-block","block"]),mountNode:Jt.mountNode,insertAt:f.oneOf(["bottom","top"]),liveRegion:f.oneOfType([Si,f.arrayOf(Si),f.func]),id:f.string,shouldAlignArrow:f.bool,shouldTrackPosition:f.bool,shouldRenderOffscreen:f.bool,shouldContainFocus:f.bool,shouldReturnFocus:f.bool,shouldCloseOnDocumentClick:f.bool,shouldCloseOnEscape:f.bool,shouldFocusContentOnTriggerBlur:f.bool,onShowContent:f.func,onHideContent:f.func,onPositioned:f.func,onPositionChanged:f.func,onClick:f.func,onFocus:f.func,onBlur:f.func,onKeyDown:f.func,onKeyUp:f.func,onMouseOver:f.func,onMouseOut:f.func,renderTrigger:f.oneOfType([f.node,f.func]),children:f.oneOfType([f.node,f.func]),elementRef:f.func},IX=["isShowingContent","defaultIsShowingContent","on","withArrow","color","placement","shadow","stacking","contentRef","defaultFocusElement","screenReaderLabel","offsetX","offsetY","constrain","positionTarget","positionContainerDisplay","mountNode","insertAt","liveRegion","id","shouldAlignArrow","shouldTrackPosition","shouldRenderOffscreen","shouldContainFocus","shouldReturnFocus","shouldCloseOnDocumentClick","shouldCloseOnEscape","shouldFocusContentOnTriggerBlur","onShowContent","onHideContent","onPositioned","onPositionChanged","onClick","onFocus","onBlur","onKeyDown","onKeyUp","onMouseOver","onMouseOut","renderTrigger","children","elementRef"];var A2,R2,I2,Gu,Ba;let ob=(A2=Ht(),R2=Mr(),I2=Le(),A2(Gu=R2(Gu=I2(Gu=(Ba=class extends T.Component{constructor(e){super(e),this._handleMouseOver=void 0,this._handleMouseOut=void 0,this._id=void 0,this._raf=[],this._trigger=null,this._view=null,this._dialog=null,this._contentElement=null,this._focusRegion=void 0,this._renderTrigger=void 0,this._renderTriggerProp=void 0,this.mouseOutTimeout=void 0,this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.show=n=>{var i,r;typeof this.props.isShowingContent>"u"&&this.setState({isShowingContent:!0}),(i=(r=this.props).onShowContent)===null||i===void 0||i.call(r,n)},this.hide=(n,i=!1)=>{const r=this.props,o=r.onHideContent,s=r.isShowingContent;typeof s>"u"?this.setState(({isShowingContent:a})=>(a&&(o==null||o(n,{documentClick:i})),{isShowingContent:!1})):s&&(o==null||o(n,{documentClick:i}))},this.toggle=n=>{this.shown?this.hide(n):this.show(n)},this.handleDialogDismiss=(n,i)=>{if(!this.props.shouldReturnFocus&&this.props.shouldFocusContentOnTriggerBlur){const r=rt(this._trigger);r&&typeof r.focus=="function"&&r.focus()}this.hide(n,i)},this.handleDialogBlur=n=>{n.keyCode===ar.codes.tab&&n.shiftKey&&this.props.shouldFocusContentOnTriggerBlur||this.hide(n)},this.handleTriggerKeyDown=n=>{this.props.shouldFocusContentOnTriggerBlur&&n.keyCode===ar.codes.tab&&!n.shiftKey&&(n.preventDefault(),this._raf.push(Yo(()=>{this._dialog&&this._dialog.focus()})))},this.handleTriggerKeyUp=n=>{n.keyCode===ar.codes.esc&&this.shown&&this.isTooltip&&(n.preventDefault(),this.hide(n))},this.handleTriggerBlur=n=>{const i=this.props.on;i&&i.indexOf("focus")>-1&&this._raf.push(Yo(()=>{ru(this._view)||this.hide(n)}))},this.handlePositioned=n=>{var i,r;const o=n.placement;this.setState({placement:o,...this.computeOffsets(o)}),(i=(r=this.props).onPositioned)===null||i===void 0||i.call(r,n)},this.handlePositionChanged=n=>{var i,r;const o=n.placement;this.setState({placement:o,...this.computeOffsets(o)}),(i=(r=this.props).onPositionChanged)===null||i===void 0||i.call(r,n)},this._renderTriggerProp=this.props.renderTrigger,this._renderTrigger=ot(this.props.renderTrigger),this.state={placement:e.placement,offsetX:e.offsetX,offsetY:e.offsetY,isShowingContent:typeof e.isShowingContent>"u"?e.defaultIsShowingContent:void 0},this._id=this.props.id||e.deterministicId(),this._raf=[],this._handleMouseOver=bC.bind(null,n=>{this.show(n),clearTimeout(this.mouseOutTimeout)}),this._handleMouseOut=bC.bind(null,n=>{this.mouseOutTimeout=setTimeout(()=>{this.hide(n)},1)})}get isTooltip(){return this.props.shouldRenderOffscreen&&!this.props.shouldReturnFocus&&!this.props.shouldContainFocus&&!this.props.shouldFocusContentOnTriggerBlur}componentDidMount(){this.isTooltip&&(this._focusRegion=new hM(this._contentElement,{shouldCloseOnEscape:!1,shouldCloseOnDocumentClick:!1,onDismiss:this.hide}),this.shown&&this._focusRegion.activate())}componentWillUnmount(){this._raf.forEach(e=>e.cancel()),this._raf=[],this._focusRegion&&(this._focusRegion.deactivate(),this._focusRegion.blur())}shouldComponentUpdate(e,n){return!P0(this.props,e)||!P0(this.state,n)}componentDidUpdate(e,n){this._focusRegion&&this.isTooltip&&((!e.isShowingContent&&this.props.isShowingContent||!n.isShowingContent&&this.state.isShowingContent)&&(this._focusRegion.activate(),this._focusRegion.focus()),(e.isShowingContent&&!this.props.isShowingContent||n.isShowingContent&&!this.state.isShowingContent)&&this._focusRegion.deactivate()),(this.props.offsetX!==e.offsetX||this.props.offsetY!==e.offsetY||this.props.placement!==e.placement||this.props.shouldAlignArrow!==e.shouldAlignArrow||this.props.withArrow!==e.withArrow)&&this.setState({...this.computeOffsets(this.placement)})}computeOffsets(e){let n=this.props,i=n.offsetX,r=n.offsetY;if(this.props.shouldAlignArrow&&this._view){const o=bM(e)[1],s=this._view.props.styles,a=s.arrowSize,l=a===void 0?0:a,u=s.arrowBorderWidth,c=u===void 0?0:u,d=(Yn(l)+Yn(c))*2;o==="start"?i=d:o==="end"?i=-d:o==="top"?r=d:o==="bottom"&&(r=-d)}return{offsetX:i,offsetY:r}}get placement(){let e=this.props.placement;return this.props.dir===Mr.DIRECTION.rtl&&(e=Mv(e," ")),!this.shown&&this.props.shouldRenderOffscreen?"offscreen":e}get positionProps(){return{offsetX:this.state.offsetX,offsetY:this.state.offsetY,shouldTrackPosition:this.props.shouldTrackPosition&&this.shown,insertAt:this.props.insertAt,placement:this.placement,constrain:this.props.constrain,onPositioned:this.handlePositioned,onPositionChanged:this.handlePositionChanged,target:this.props.positionTarget,containerDisplay:this.props.positionContainerDisplay,mountNode:this.props.mountNode,id:this._id}}get shown(){return typeof this.props.isShowingContent>"u"?this.state.isShowingContent:this.props.isShowingContent}get defaultFocusElement(){return this.props.defaultFocusElement}renderTrigger(){this._renderTriggerProp!=this.props.renderTrigger&&(this._renderTriggerProp=this.props.renderTrigger,this._renderTrigger=ot(this.props.renderTrigger));let e=this._renderTrigger;if(e){const n=this.props,i=n.on,r=n.shouldContainFocus;let o,s,a,l,u;i&&i.indexOf("click")>-1&&(o=c=>{this.toggle(c)}),i&&i.indexOf("hover")>-1&&(Ge(i!=="hover",'[Popover] Specifying only the `"hover"` trigger limits the visibility of the Popover to just mouse users. Consider also including the `"focus"` trigger so that touch and keyboard only users can see the Popover content as well.'),l=this._handleMouseOver,a=this._handleMouseOut),i&&i.indexOf("focus")>-1&&(s=c=>{this.show(c)}),r?(u=this.shown?"true":"false","aria-expanded"in this.props&&(u=this.props["aria-expanded"])):u=void 0,e=$t(e,{ref:c=>{this._trigger=c},"aria-expanded":u,"data-popover-trigger":!0,onKeyDown:ut(this.handleTriggerKeyDown,this.props.onKeyDown),onKeyUp:ut(this.handleTriggerKeyUp,this.props.onKeyUp),onClick:ut(o,this.props.onClick),onBlur:ut(this.handleTriggerBlur,this.props.onBlur),onFocus:ut(s,this.props.onFocus),onMouseOut:ut(a,this.props.onMouseOut),onMouseOver:ut(l,this.props.onMouseOver)})}return e}renderContent(){let e=ot(this.props.children);if(this.shown&&!this.isTooltip&&(e=z.createElement(zr,{open:this.shown,label:this.props.screenReaderLabel,ref:n=>this._dialog=n,display:"block",onBlur:this.handleDialogBlur,onDismiss:this.handleDialogDismiss,liveRegion:this.props.liveRegion,defaultFocusElement:this.props.defaultFocusElement,shouldContainFocus:this.props.shouldContainFocus,shouldReturnFocus:this.props.shouldReturnFocus,shouldFocusOnOpen:!this.props.shouldFocusContentOnTriggerBlur,shouldCloseOnDocumentClick:this.props.shouldCloseOnDocumentClick,shouldCloseOnEscape:this.props.shouldCloseOnEscape},e)),this.shown||this.props.shouldRenderOffscreen){const n=this.props.color;let i={ref:o=>this._view=o,elementRef:o=>{var s,a;this._contentElement=o,(s=(a=this.props).contentRef)===null||s===void 0||s.call(a,o)},background:n,stacking:this.props.stacking,shadow:this.props.shadow,display:"block"};this.isTooltip&&(i={...i,onMouseOver:this._handleMouseOver,onMouseOut:this._handleMouseOut});const r=this.state.placement;return this.props.withArrow?(i={...i,background:n==="primary"?"default":"inverse",placement:this.props.dir===Mr.DIRECTION.rtl?Mv(r," "):r},z.createElement(Tj,i,e)):(i={...i,borderWidth:"small",borderRadius:"medium",...n==="primary-inverse"&&{borderColor:"transparent"}},z.createElement(be,i,e))}else return null}render(){const e=this.positionProps;return this.props.positionTarget?z.createElement("span",{ref:this.handleRef},this.renderTrigger(),z.createElement(LC,e,this.renderContent())):z.createElement(LC,Object.assign({},e,{renderTarget:this.renderTrigger(),elementRef:this.handleRef}),this.renderContent())}},Ba.displayName="Popover",Ba.componentId="Popover",Ba.allowedProps=IX,Ba.propTypes=RX,Ba.defaultProps={defaultIsShowingContent:!1,placement:"bottom center",stacking:"topmost",shadow:"resting",offsetX:0,offsetY:0,color:"primary",on:["hover","focus"],withArrow:!0,constrain:"window",insertAt:"bottom",shouldAlignArrow:!1,shouldTrackPosition:!0,shouldRenderOffscreen:!1,shouldContainFocus:!1,shouldReturnFocus:!0,shouldCloseOnDocumentClick:!0,shouldFocusContentOnTriggerBlur:!1,shouldCloseOnEscape:!0},Ba))||Gu)||Gu)||Gu);const $X=t=>({tooltip:{label:"tooltip",fontFamily:t.fontFamily,fontWeight:t.fontWeight,boxSizing:"border-box",display:"block",fontSize:t.fontSize,padding:t.padding}}),LX=t=>{const e=t.typography,n=t.spacing;return{...{fontFamily:e==null?void 0:e.fontFamily,fontWeight:e==null?void 0:e.fontWeightNormal,fontSize:e==null?void 0:e.fontSizeSmall,padding:n==null?void 0:n.small}}},NX={elementRef:f.func,children:f.oneOfType([f.node,f.func]).isRequired,renderTip:f.oneOfType([f.node,f.func]).isRequired,isShowingContent:f.bool,defaultIsShowingContent:f.bool,as:f.elementType,on:f.oneOfType([f.oneOf(["click","hover","focus"]),f.arrayOf(f.oneOf(["click","hover","focus"]))]),color:f.oneOf(["primary","primary-inverse"]),placement:Jt.placement,mountNode:Jt.mountNode,constrain:Jt.constrain,offsetX:f.oneOfType([f.string,f.number]),offsetY:f.oneOfType([f.string,f.number]),positionTarget:f.oneOfType([Si,f.func]),onShowContent:f.func,onHideContent:f.func},MX=["elementRef","children","renderTip","isShowingContent","defaultIsShowingContent","as","on","color","placement","mountNode","constrain","offsetX","offsetY","positionTarget","onShowContent","onHideContent"],DX=["renderTip","isShowingContent","defaultIsShowingContent","on","color","placement","mountNode","constrain","offsetX","offsetY","positionTarget","onShowContent","onHideContent","styles"];var $2,L2,N2,Ku,Qa;let CM=($2=Ht(),L2=de($X,LX),N2=Le(),$2(Ku=L2(Ku=N2(Ku=(Qa=class Fv extends T.Component{constructor(e){super(e),this._id=void 0,this.ref=null,this.handleRef=n=>{this.ref=n,typeof this.props.elementRef=="function"&&this.props.elementRef(n)},this.handleFocus=()=>{this.setState({hasFocus:!0})},this.handleBlur=()=>{this.setState({hasFocus:!1})},this._id=e.deterministicId(),this.state={hasFocus:!1}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}renderTrigger(){const e=this.props,n=e.children,i=e.as,r=this.state.hasFocus,o={"aria-describedby":this._id};if(i){const s=oi(Fv,this.props),a=Re(this.props,Fv.allowedProps);return C(s,Object.assign({},a,o),n)}else return typeof n=="function"?n({focused:r,getTriggerProps:s=>({...o,...s})}):Wl(n,o)}render(){const e=this.props,n=e.renderTip,i=e.isShowingContent,r=e.defaultIsShowingContent,o=e.on,s=e.color,a=e.placement,l=e.mountNode,u=e.constrain,c=e.offsetX,d=e.offsetY,h=e.positionTarget,p=e.onShowContent,m=e.onHideContent,O=e.styles,y=Ie(e,DX);return C(ob,Object.assign({},It(y),{isShowingContent:i,defaultIsShowingContent:r,on:o,shouldRenderOffscreen:!0,shouldReturnFocus:!1,placement:a,color:s==="primary"?"primary-inverse":"primary",mountNode:l,constrain:u,shadow:"none",offsetX:c,offsetY:d,positionTarget:h,renderTrigger:()=>this.renderTrigger(),onShowContent:p,onHideContent:m,onFocus:this.handleFocus,onBlur:this.handleBlur,elementRef:this.handleRef,shouldCloseOnDocumentClick:!1}),C("span",{id:this._id,css:O==null?void 0:O.tooltip,role:"tooltip"},ot(n)))}},Qa.displayName="Tooltip",Qa.componentId="Tooltip",Qa.allowedProps=MX,Qa.propTypes=NX,Qa.defaultProps={defaultIsShowingContent:!1,color:"primary",placement:"top",constrain:"window",offsetX:0,offsetY:0},Qa))||Ku)||Ku)||Ku);const BX=t=>({transitioning:`transition--${t}-transitioning`,exited:`transition--${t}-exited`,exiting:`transition--${t}-exiting`,entered:`transition--${t}-entered`,entering:`transition--${t}-entering`}),QX=(t,e)=>{const n=e.type,i=`opacity ${t.duration} ${t.timing}, transform ${t.duration} ${t.timing}`,r={".transition--fade-transitioning":{transition:i},".transition--fade-exiting,\n .transition--fade-exited":{opacity:.01},".transition--fade-entering,\n .transition--fade-entered":{opacity:1}},o={".transition--scale-transitioning":{transition:i},".transition--scale-exiting,\n .transition--scale-exited":{transform:"scale(0.01) translate3d(0, 0, 0)",opacity:.01},".transition--scale-entering,\n .transition--scale-entered":{transform:"scale(1) translate3d(0, 0, 0)",opacity:1}},s={".transition--slide-right-transitioning,\n .transition--slide-left-transitioning,\n .transition--slide-up-transitioning,\n .transition--slide-down-transitioning":{transition:i},".transition--slide-right-exited,\n .transition--slide-left-exited,\n .transition--slide-up-exited,\n .transition--slide-down-exited":{opacity:.01},".transition--slide-right-exiting,\n .transition--slide-right-exited":{transform:"translate3d(100%, 0, 0)"},".transition--slide-left-exiting,\n .transition--slide-left-exited":{transform:"translate3d(-100%, 0, 0)"},".transition--slide-up-exiting,\n .transition--slide-up-exited":{transform:"translate3d(0, -100%, 0)"},".transition--slide-down-exiting,\n .transition--slide-down-exited":{transform:"translate3d(0, 100%, 0)"},".transition--slide-left-entering,\n .transition--slide-right-entering,\n .transition--slide-up-entering,\n .transition--slide-down-entering,\n .transition--slide-left-entered,\n .transition--slide-right-entered,\n .transition--slide-up-entered,\n .transition--slide-down-entered":{transform:"translate3d(0, 0, 0)",opacity:1}};return{duration:t.duration,classNames:BX(n),globalStyles:{...r,...o,...s}}},FX=t=>{const e=t.transitions;return{...{duration:e==null?void 0:e.duration,timing:e==null?void 0:e.timing}}},TM={in:f.bool,unmountOnExit:f.bool,transitionOnMount:f.bool,transitionEnter:f.bool,transitionExit:f.bool,onTransition:f.func,onEnter:f.func,onEntering:f.func,onEntered:f.func,onExit:f.func,onExiting:f.func,onExited:f.func,children:f.node,elementRef:f.func},zX={...TM,enterDelay:f.number,exitDelay:f.number,transitionClassName:f.string.isRequired,exitedClassName:f.string.isRequired,exitingClassName:f.string.isRequired,enteredClassName:f.string.isRequired,enteringClassName:f.string.isRequired,className:f.string},HX=["in","unmountOnExit","transitionOnMount","transitionEnter","transitionExit","enterDelay","exitDelay","transitionClassName","exitedClassName","exitingClassName","enteredClassName","enteringClassName","onTransition","onEnter","onEntering","onEntered","onExit","onExiting","onExited","children","className","elementRef"],Ft={EXITED:-2,EXITING:-1,ENTERING:1,ENTERED:2};class su extends z.Component{constructor(...e){super(...e),this._timeouts=[],this._unmounted=!1,this.state={transitioning:!1},this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.startTransition=(n,i)=>{const r=this.props,o=r.transitionEnter,s=r.transitionExit;n?this.enter(o&&i?Ft.EXITED:null):this.exit(s&&i?Ft.ENTERED:null)},this.transition=(n,i,r,o=0)=>{if(this._unmounted)return;const s=this.props.onTransition,a=mC(this.ref),l=this.getTransitionClassName(n),u=this.getTransitionClassName(i),c=this.props.transitionClassName;i&&o&&this.transitionEnabled(n)?c&&a.add(c):c&&a.remove(c),u&&a.remove(u),l&&a.add(l),n&&i&&typeof s=="function"&&s(n,i),this._timeouts.push(setTimeout(()=>{this._unmounted||typeof r=="function"&&r()},o))},this.enter=n=>{if(this.state.transitioning||this._unmounted)return;const i=this.props;typeof i.onEnter=="function"&&i.onEnter(),i.transitionEnter?this.setState({transitioning:!0},()=>{const r=()=>{typeof i.onEntering=="function"&&i.onEntering(),this.transition(Ft.ENTERED,Ft.ENTERING,()=>{this.setState({transitioning:!1},()=>{typeof i.onEntered=="function"&&i.onEntered()})})};n?this.transition(n,null,()=>{this.transition(Ft.ENTERING,n,r,i.enterDelay)}):r()}):this.setState({transitioning:!1},()=>{this.transition(Ft.ENTERED,Ft.EXITED),typeof i.onEntered=="function"&&i.onEntered()})},this.exit=n=>{if(this.state.transitioning)return;const i=this.props;typeof i.onExit=="function"&&i.onExit(),i.transitionExit?this.setState({transitioning:!0},()=>{const r=()=>{typeof i.onExiting=="function"&&i.onExiting(),this.transition(Ft.EXITED,Ft.EXITING,()=>{this.setState({transitioning:!1},()=>{typeof i.onExited=="function"&&i.onExited()})})};n?this.transition(n,null,()=>{this.transition(Ft.EXITING,n,r,i.exitDelay)}):r()}):this.setState({transitioning:!1},()=>{this.transition(Ft.EXITED,Ft.ENTERED),typeof i.onExited=="function"&&i.onExited()})}}componentDidMount(){this.startTransition(this.props.in,this.props.transitionOnMount),this._unmounted=!1}getSnapshotBeforeUpdate(e,n){return this.props.in!==e.in&&n.transitioning?!0:null}componentDidUpdate(e,n,i){i&&this.clearTransition(e.transitionClassName),this.props.transitionClassName!==e.transitionClassName&&this.clearTransition(e.transitionClassName),e.in!==this.props.in&&(n.transitioning?(this.clearTransition(e.transitionClassName),clearTimeout(this._timeouts.pop()),this.setState({transitioning:!1},()=>this.startTransition(this.props.in,!0))):this.startTransition(this.props.in,!0))}componentWillUnmount(){this._timeouts.forEach(e=>{clearTimeout(e)}),this._unmounted=!0}clearTransition(e){this._unmounted||this.setState({transitioning:!1},()=>{if(this._unmounted)return;const n=mC(this.ref);Object.values(Ft).forEach(i=>{const r=this.getTransitionClassName(i);r&&n.remove(r)}),n.remove(e)})}transitionEnabled(e){const n=this.props;switch(e){case Ft.EXITED:case Ft.EXITING:return n.transitionExit;case Ft.ENTERED:case Ft.ENTERING:return n.transitionEnter;default:return!1}}getTransitionClassName(e){const n=this.props;switch(e){case Ft.EXITED:return n.exitedClassName;case Ft.ENTERING:return n.enteringClassName;case Ft.ENTERED:return n.enteredClassName;case Ft.EXITING:return n.exitingClassName;default:return}}renderChildren(){return this.props.children?$t(Wl(this.props.children),{"aria-hidden":this.props.in?void 0:!0,ref:e=>{const n=rt(e)||null;this.handleRef(n)}}):null}render(){return!this.props.in&&this.props.unmountOnExit&&!this.state.transitioning?null:this.renderChildren()}}su.displayName="BaseTransition";su.propTypes=zX;su.allowedProps=HX;su.defaultProps={in:!1,unmountOnExit:!1,transitionOnMount:!1,transitionEnter:!0,transitionExit:!0,enterDelay:300,exitDelay:300};su.states=Ft;const UX=["fade","scale","slide-down","slide-up","slide-left","slide-right"],WX=f.oneOf(UX),VX={type:WX,...TM},jX=["type","children","in","unmountOnExit","transitionOnMount","transitionEnter","transitionExit","onTransition","onEnter","onEntering","onEntered","onExit","onExiting","onExited","elementRef"],XX=["type","children","styles"];var M2,D2,vm,Ss;let PM=(M2=de(QX,FX),D2=Le(),M2(vm=D2(vm=(Ss=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.handleExited=()=>{typeof this.props.onExited=="function"&&this.props.onExited(this.props.type)},this.handleEntered=()=>{typeof this.props.onEntered=="function"&&this.props.onEntered(this.props.type)},this.renderTransitionHelper=()=>{const n=this.props.styles;return C(U5,{styles:n==null?void 0:n.globalStyles})}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){const e=this.props;e.type;const n=e.children,i=e.styles,r=Ie(e,XX),o=kW(i.duration);return C(z.Fragment,null,this.renderTransitionHelper(),C(su,Object.assign({},r,{enterDelay:o,exitDelay:o,transitionClassName:i.classNames.transitioning,exitedClassName:i.classNames.exited,exitingClassName:i.classNames.exiting,enteredClassName:i.classNames.entered,enteringClassName:i.classNames.entering,onEntered:this.handleEntered,onExited:this.handleExited,elementRef:this.handleRef}),n))}},Ss.displayName="Transition",Ss.componentId="Transition",Ss.allowedProps=jX,Ss.propTypes=VX,Ss.defaultProps={type:"fade",in:!1,unmountOnExit:!1,transitionOnMount:!1,transitionEnter:!0,transitionExit:!0},Ss.states=su.states,Ss))||vm)||vm);const ZX=(t,e)=>{const n=e.variant,i=e.hasShadow,r={error:{alert:{borderColor:t.dangerBorderColor},icon:{background:t.dangerIconBackground,borderRightColor:t.dangerIconBackground}},info:{alert:{borderColor:t.infoBorderColor},icon:{background:t.infoIconBackground,borderRightColor:t.infoIconBackground}},success:{alert:{borderColor:t.successBorderColor},icon:{backgroundColor:t.successIconBackground,borderRightColor:t.successIconBackground}},warning:{alert:{borderColor:t.warningBorderColor},icon:{background:t.warningIconBackground,borderRightColor:t.warningIconBackground}}};return{alert:{label:"alert",color:t.color,background:t.background,boxSizing:"border-box",display:"flex",minWidth:"12rem",borderWidth:t.borderWidth,borderStyle:t.borderStyle,borderRadius:t.borderRadius,...r[n].alert,...i&&{boxShadow:t.boxShadow}},icon:{color:t.iconColor,boxSizing:"border-box",flex:"0 0 2.5rem",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"1.125rem",borderRight:`${t.borderWidth} ${t.borderStyle}`,...r[n].icon},closeButton:{boxSizing:"border-box",display:"flex",alignItems:"flex-start",order:1,marginTop:t.closeButtonMarginTop,marginRight:t.closeButtonMarginRight},content:{boxSizing:"border-box",flex:1,minWidth:"0.0625rem",fontSize:t.contentFontSize,fontFamily:t.contentFontFamily,fontWeight:t.contentFontWeight,lineHeight:t.contentLineHeight,padding:t.contentPadding}}},qX=t=>{const e=t.colors,n=t.spacing,i=t.borders,r=t.typography,o=t.shadows,s=t.key,a={canvas:{color:t["ic-brand-font-color-dark"]}};return{...{background:e==null?void 0:e.backgroundLightest,color:e==null?void 0:e.textDarkest,marginTop:n==null?void 0:n.small,borderRadius:i==null?void 0:i.radiusMedium,borderWidth:i==null?void 0:i.widthMedium,borderStyle:i==null?void 0:i.style,contentPadding:`${n==null?void 0:n.small} ${n==null?void 0:n.medium}`,contentFontSize:r==null?void 0:r.fontSizeMedium,contentFontFamily:r==null?void 0:r.fontFamily,contentFontWeight:r==null?void 0:r.fontWeightNormal,contentLineHeight:r==null?void 0:r.lineHeightCondensed,closeButtonMarginTop:n==null?void 0:n.xSmall,closeButtonMarginRight:n==null?void 0:n.xxSmall,iconColor:e==null?void 0:e.textLightest,successBorderColor:e==null?void 0:e.borderSuccess,successIconBackground:e==null?void 0:e.backgroundSuccess,infoBorderColor:e==null?void 0:e.borderInfo,infoIconBackground:e==null?void 0:e.backgroundInfo,warningBorderColor:e==null?void 0:e.borderWarning,warningIconBackground:e==null?void 0:e.backgroundWarning,dangerBorderColor:e==null?void 0:e.borderDanger,dangerIconBackground:e==null?void 0:e.backgroundDanger,boxShadow:o==null?void 0:o.depth2},...a[s]}},YX={children:f.node,variant:f.oneOf(["info","success","warning","error"]),margin:ct.spacing,liveRegion:f.func,liveRegionPoliteness:f.oneOf(["polite","assertive"]),isLiveRegionAtomic:f.bool,screenReaderOnly:f.bool,timeout:f.number,renderCloseButtonLabel:f.oneOfType([f.func,f.node]),onDismiss:f.func,transition:f.oneOf(["none","fade"]),open:f.bool,hasShadow:f.bool},GX=["children","variant","margin","liveRegion","liveRegionPoliteness","isLiveRegionAtomic","screenReaderOnly","timeout","renderCloseButtonLabel","onDismiss","transition","open","hasShadow"];var B2,Q2,Sm,Fa;let KX=(B2=Ht(),Q2=de(ZX,qX),B2(Sm=Q2(Sm=(Fa=class extends T.Component{constructor(e){super(e),this._timeouts=[],this.srid=void 0,this.variantUI={error:Zd,info:jd,success:Tu,warning:qd},this.ref=null,this.handleRef=n=>{this.ref=n},this.handleTimeout=()=>{this.props.timeout>0&&this._timeouts.push(setTimeout(()=>{this.close()},this.props.timeout))},this.onExitTransition=()=>{this.props.onDismiss&&this.props.onDismiss()},this.close=()=>{this.clearTimeouts(),this.removeScreenreaderAlert(),this.setState({open:!1},()=>{this.props.onDismiss&&this.props.transition==="none"&&this.props.onDismiss()})},this.handleKeyUp=n=>{this.props.renderCloseButtonLabel&&n.keyCode===ar.codes.esc&&this.close()},this.srid=this.props.deterministicId(),this.state={open:!0}}clearTimeouts(){this._timeouts.forEach(e=>clearTimeout(e)),this._timeouts=[]}isDOMNode(e){return e&&typeof e=="object"&&e.nodeType===1}getLiveRegion(){let e=null;return typeof this.props.liveRegion=="function"&&(e=this.props.liveRegion()),this.isDOMNode(e)?e:null}initLiveRegion(e){Ge(e.getAttribute("role")==="alert","[Alert] live region must have role='alert' set on page load in order to announce content"),e&&(e.setAttribute("aria-live",this.props.liveRegionPoliteness),e.setAttribute("aria-relevant","additions text"),e.setAttribute("aria-atomic",`${this.props.isLiveRegionAtomic}`))}createScreenreaderContentNode(){return C(Vi,null,this.props.children)}createScreenreaderAlert(){const e=this.getLiveRegion();if(e){const n=document.createElement("div");n.setAttribute("id",this.srid),e.appendChild(n)}}removeScreenreaderAlert(){const e=this.getLiveRegion();e&&document.getElementById(this.srid)&&(e.removeAttribute("aria-live"),e.removeAttribute("aria-relevant"),e.removeAttribute("aria-atomic"),this.initLiveRegion(e))}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n);const i=this.getLiveRegion();i&&this.initLiveRegion(i),this.handleTimeout()}componentWillUnmount(){this.clearTimeouts()}componentDidUpdate(e){var n,i;(n=(i=this.props).makeStyles)===null||n===void 0||n.call(i),!this.props.open&&!!this.props.open!=!!e.open&&this.close()}renderIcon(){var e;const n=this.variantUI[this.props.variant];return C("div",{css:(e=this.props.styles)===null||e===void 0?void 0:e.icon},C(n,null))}renderCloseButton(){var e;const n=this.props.renderCloseButtonLabel&&ot(this.props.renderCloseButtonLabel);return n?C("div",{css:(e=this.props.styles)===null||e===void 0?void 0:e.closeButton,key:"closeButton"},C(kX,{onClick:this.close,size:"small",screenReaderLabel:n})):null}renderAlert(){var e,n;return C(be,{as:"div",margin:this.props.margin,css:(e=this.props.styles)===null||e===void 0?void 0:e.alert,onKeyUp:this.handleKeyUp,elementRef:this.handleRef},this.renderIcon(),C("div",{css:(n=this.props.styles)===null||n===void 0?void 0:n.content},this.props.children),this.renderCloseButton())}createScreenReaderPortal(e){return this.state.open?Cp.createPortal(C("div",{id:this.srid},this.createScreenreaderContentNode()),e):null}render(){const e=this.getLiveRegion(),n=e?this.createScreenReaderPortal(e):null;return this.props.screenReaderOnly?(Ge(!!this.getLiveRegion(),"[Alert] The 'screenReaderOnly' prop must be used in conjunction with 'liveRegion'."),n):this.props.transition==="none"?this.state.open?C(z.Fragment,null,n,this.renderAlert()):null:C(z.Fragment,null,n,C(PM,{type:this.props.transition,transitionOnMount:!0,in:this.state.open,unmountOnExit:!0,onExited:this.onExitTransition},this.renderAlert()))}},Fa.displayName="Alert",Fa.componentId="Alert",Fa.propTypes=YX,Fa.allowedProps=GX,Fa.defaultProps={variant:"info",margin:"x-small 0",timeout:0,transition:"fade",open:!0,screenReaderOnly:!1,liveRegionPoliteness:"assertive",isLiveRegionAtomic:!1,children:null,hasShadow:!0},Fa))||Sm)||Sm);const JX=(t,e,n)=>{const i=e.size,r=e.color,o=e.hasInverseColor,s=e.shape,a=e.src,l=e.showBorder,u=n.loaded,c={auto:{fontSize:"inherit",borderWidth:t.borderWidthSmall},"xx-small":{fontSize:"0.5rem",borderWidth:t.borderWidthSmall},"x-small":{fontSize:"0.75rem",borderWidth:t.borderWidthSmall},small:{fontSize:"1rem",borderWidth:t.borderWidthSmall},medium:{fontSize:"1.25rem",borderWidth:t.borderWidthMedium},large:{fontSize:"1.5rem",borderWidth:t.borderWidthMedium},"x-large":{fontSize:"1.75rem",borderWidth:t.borderWidthMedium},"xx-large":{fontSize:"2rem",borderWidth:t.borderWidthMedium}},d={circle:{width:"2.5em",position:"relative",borderRadius:"100%",overflow:"hidden"},rectangle:{width:"3em"}},h={default:t.color,shamrock:t.colorShamrock,barney:t.colorBarney,crimson:t.colorCrimson,fire:t.colorFire,licorice:t.colorLicorice,ash:t.colorAsh},p=o?h[r]:t.background,m=o?t.background:h[r];return{avatar:{label:"avatar",height:"2.5em",boxSizing:"border-box",backgroundColor:p,backgroundPosition:"center",backgroundSize:"cover",backgroundClip:"content-box",backgroundRepeat:"no-repeat",overflow:"hidden",lineHeight:0,textAlign:"center",borderStyle:"solid",borderColor:t.borderColor,...c[i],...d[s],...u?{backgroundImage:`url('${a}')`,...l!=="always"&&{border:0},boxShadow:`inset 0 0 ${t.boxShadowBlur} 0 ${t.boxShadowColor}`}:{backgroundImage:void 0,...o&&{border:0,padding:c[i].borderWidth,backgroundClip:"border-box"}},...l==="never"&&{border:0}},initials:{label:"avatar__initials",color:m,lineHeight:"2.375em",fontFamily:t.fontFamily,fontWeight:t.fontWeight,letterSpacing:"0.0313em"},loadImage:{label:"avatar__loadImage",display:"none"},iconSVG:{label:"avatar__iconSVG",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",width:"100%",svg:{fill:m,height:"1em",width:"1em"}}}},eZ=t=>{const e=t.colors,n=t.borders,i=t.typography,r=e.brand,o=e.shamrock,s=e.barney,a=e.crimson,l=e.fire,u=e.licorice,c=e.ash;return{...{background:e==null?void 0:e.backgroundLightest,borderWidthSmall:n==null?void 0:n.widthSmall,borderWidthMedium:n==null?void 0:n.widthMedium,borderColor:e==null?void 0:e.borderMedium,boxShadowColor:qf(e==null?void 0:e.backgroundDarkest,12),boxShadowBlur:"1rem",fontFamily:i==null?void 0:i.fontFamily,fontWeight:i==null?void 0:i.fontWeightBold,color:r,colorShamrock:o,colorBarney:s,colorCrimson:a,colorFire:l,colorLicorice:u,colorAsh:c}}},tZ={name:f.string.isRequired,src:f.string,alt:f.string,size:f.oneOf(["auto","xx-small","x-small","small","medium","large","x-large","xx-large"]),color:f.oneOf(["default","shamrock","barney","crimson","fire","licorice","ash"]),hasInverseColor:f.bool,showBorder:f.oneOf(["auto","always","never"]),shape:f.oneOf(["circle","rectangle"]),margin:ct.spacing,display:f.oneOf(["inline-block","block"]),onImageLoaded:f.func,as:f.elementType,elementRef:f.func,renderIcon:f.oneOfType([f.node,f.func])},nZ=["name","src","alt","size","color","hasInverseColor","shape","margin","display","onImageLoaded","as","elementRef","renderIcon","showBorder"],iZ=["onImageLoaded","styles"];var F2,z2,wm,za;let qk=(F2=de(JX,eZ),z2=Le(),F2(wm=z2(wm=(za=class extends T.Component{constructor(...e){super(...e),this.state={loaded:!1},this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.handleImageLoaded=n=>{this.setState({loaded:!0}),this.props.onImageLoaded(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.state)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.state),this.state.loaded&&!this.props.src&&this.setState({loaded:!1})}makeInitialsFromName(){let e=this.props.name;if(!(!e||typeof e!="string")&&(e=e.trim(),e.length!==0))if(e.match(/\s+/)){const n=e.split(/\s+/);return(n[0][0]+n[n.length-1][0]).toUpperCase()}else return e[0].toUpperCase()}renderInitials(){var e;return C("span",{css:(e=this.props.styles)===null||e===void 0?void 0:e.initials,"aria-hidden":"true"},this.makeInitialsFromName())}renderContent(){const e=this.props,n=e.renderIcon,i=e.styles;return n?C("span",{css:i==null?void 0:i.iconSVG},ot(n)):this.renderInitials()}render(){var e;const n=this.props;n.onImageLoaded;const i=n.styles,r=Ie(n,iZ);return C(be,Object.assign({},It(r),{"aria-label":this.props.alt?this.props.alt:void 0,role:this.props.alt?"img":void 0,as:this.props.as,elementRef:this.handleRef,margin:this.props.margin,css:i==null?void 0:i.avatar,display:this.props.display}),C("img",{src:this.props.src,css:(e=this.props.styles)===null||e===void 0?void 0:e.loadImage,alt:this.props.alt,onLoad:this.handleImageLoaded,"aria-hidden":"true"}),!this.state.loaded&&this.renderContent())}},za.displayName="Avatar",za.componentId="Avatar",za.propTypes=tZ,za.allowedProps=nZ,za.defaultProps={size:"medium",color:"default",hasInverseColor:!1,showBorder:"auto",shape:"circle",display:"inline-block",onImageLoaded:t=>{}},za))||wm)||wm);const rZ=(t,e)=>{const n=e.level,i=e.color,r=e.border,o={h1:{fontFamily:t.h1FontFamily,fontSize:t.h1FontSize,fontWeight:t.h1FontWeight},h2:{fontFamily:t.h2FontFamily,fontSize:t.h2FontSize,fontWeight:t.h2FontWeight},h3:{fontFamily:t.h3FontFamily,fontSize:t.h3FontSize,fontWeight:t.h3FontWeight},h4:{fontFamily:t.h4FontFamily,fontSize:t.h4FontSize,fontWeight:t.h4FontWeight},h5:{fontFamily:t.h5FontFamily,fontSize:t.h5FontSize,fontWeight:t.h5FontWeight},reset:{margin:0,fontSize:"inherit",fontWeight:"inherit",lineHeight:"inherit"}},s={inherit:{color:"inherit"},primary:{color:t.primaryColor},secondary:{color:t.secondaryColor},"primary-inverse":{color:t.primaryInverseColor},"secondary-inverse":{color:t.secondaryInverseColor}},a={top:{paddingTop:t.borderPadding,borderTop:`${t.borderWidth} ${t.borderStyle} ${t.borderColor}`},bottom:{paddingBottom:t.borderPadding,borderBottom:`${t.borderWidth} ${t.borderStyle} ${t.borderColor}`},none:{}},l={outline:0,appearance:"none",boxSizing:"border-box",background:"none",border:"none",borderRadius:0,padding:0,margin:"-0.375rem 0 0 0",color:"inherit",height:"auto",width:"100%",lineHeight:"inherit",textAlign:"start",boxShadow:"none",display:"block","&:focus":{outline:"none"}};return{heading:{label:"heading",lineHeight:t.lineHeight,margin:0,"&:is(input)[type]":l,"&:-webkit-any(input)[type]":l,...o[n],...s[i],...a[r]}}},oZ=t=>{const e=t.typography,n=t.colors,i=t.spacing,r=t.borders,o=t.key,s={canvas:{primaryColor:t["ic-brand-font-color-dark"]},instructure:{h1FontFamily:e==null?void 0:e.fontFamilyHeading,h2FontFamily:e==null?void 0:e.fontFamilyHeading,h3FontWeight:e==null?void 0:e.fontWeightBold,h3FontSize:"2.125rem",h4FontWeight:e==null?void 0:e.fontWeightBold,h4FontSize:e==null?void 0:e.fontSizeLarge,h5FontWeight:e==null?void 0:e.fontWeightBold,h5FontSize:e==null?void 0:e.fontSizeMedium}};return{...{lineHeight:e==null?void 0:e.lineHeightCondensed,h1FontSize:e==null?void 0:e.fontSizeXXLarge,h1FontWeight:e==null?void 0:e.fontWeightBold,h1FontFamily:e==null?void 0:e.fontFamily,h2FontSize:e==null?void 0:e.fontSizeXLarge,h2FontWeight:e==null?void 0:e.fontWeightNormal,h2FontFamily:e==null?void 0:e.fontFamily,h3FontSize:e==null?void 0:e.fontSizeLarge,h3FontWeight:e==null?void 0:e.fontWeightBold,h3FontFamily:e==null?void 0:e.fontFamily,h4FontSize:e==null?void 0:e.fontSizeMedium,h4FontWeight:e==null?void 0:e.fontWeightBold,h4FontFamily:e==null?void 0:e.fontFamily,h5FontSize:e==null?void 0:e.fontSizeSmall,h5FontWeight:e==null?void 0:e.fontWeightNormal,h5FontFamily:e==null?void 0:e.fontFamily,primaryInverseColor:n==null?void 0:n.textLightest,primaryColor:n==null?void 0:n.textDarkest,secondaryColor:n==null?void 0:n.textDark,secondaryInverseColor:n==null?void 0:n.textLight,borderPadding:i==null?void 0:i.xxxSmall,borderColor:n==null?void 0:n.borderMedium,borderWidth:r==null?void 0:r.widthSmall,borderStyle:r==null?void 0:r.style},...s[o]}},sZ={border:f.oneOf(["none","top","bottom"]),children:KW,color:f.oneOf(["primary","secondary","primary-inverse","secondary-inverse","inherit"]),level:f.oneOf(["h1","h2","h3","h4","h5","reset"]),as:f.elementType,margin:ct.spacing,elementRef:f.func},aZ=["border","children","color","level","as","margin","elementRef"],lZ=["border","children","color","level","margin","elementRef","makeStyles"];var H2,U2,km,Ha;let Tr=(H2=de(rZ,oZ),U2=Le(),H2(km=U2(km=(Ha=class AM extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){var e;const n=this.props;n.border;const i=n.children;n.color;const r=n.level,o=n.margin;n.elementRef,n.makeStyles;const s=Ie(n,lZ),a=oi(AM,this.props,()=>r==="reset"?"span":r);return C(be,Object.assign({},It(s),{css:(e=this.props.styles)===null||e===void 0?void 0:e.heading,as:a,elementRef:this.handleRef,margin:o}),i)}},Ha.displayName="Heading",Ha.componentId="Heading",Ha.propTypes=sZ,Ha.allowedProps=aZ,Ha.defaultProps={children:null,border:"none",color:"inherit",level:"h2"},Ha))||km)||km);const uZ=(t,e)=>{const n=e.size,i=e.href,r=e.onClick,o=e.disabled,s=e.hero,a=e.heading,l=i||r,u={small:{billboard:{padding:t.paddingSmall},hero:{fontSize:"3rem"},message:{fontSize:t.messageFontSizeSmall},heading:{...s&&{margin:`${t.mediumMargin} 0 0`}}},medium:{billboard:{padding:t.paddingMedium},hero:{fontSize:"5rem"},message:{fontSize:t.messageFontSizeMedium},heading:{}},large:{billboard:{padding:t.paddingLarge},hero:{fontSize:"10rem"},message:{fontSize:t.messageFontSizeLarge},heading:{}}},c=l?{appearance:"none",boxSizing:"border-box",cursor:"pointer",userSelect:"none",touchAction:"manipulation",width:"100%",margin:"0",border:`${t.buttonBorderWidth} ${t.buttonBorderStyle} transparent`,borderRadius:t.buttonBorderRadius,background:t.backgroundColor,textDecoration:"none","&:hover":{borderStyle:t.buttonHoverBorderStyle},"&:hover, &:focus":{textDecoration:"none",outline:"none",borderColor:t.iconHoverColor,"& [class$=-billboard__hero]":{color:t.iconHoverColor}},"&:active":{background:t.clickableActiveBg,borderColor:t.iconHoverColor,"& [class$=-billboard__hero], & [class$=-billboard__message]":{color:t.clickableActiveText}}}:{backgroundColor:t.backgroundColor};return{billboard:{label:"billboard",boxSizing:"border-box",position:"relative",fontFamily:t.fontFamily,marginLeft:"auto",marginRight:"auto",textAlign:"center",display:"block",...u[n].billboard,...c,...o&&{cursor:"not-allowed",pointerEvents:"none",opacity:.5}},content:{label:"billboard__content",display:"block"},hero:{label:"billboard__hero",display:"block",color:t.iconColor,...u[n].hero,"& > img, & > svg":{maxWidth:"100%",display:"block",margin:"0 auto"},"& > img":{height:"auto"}},heading:{label:"billboard__heading",display:"block",...s&&{margin:`${t.largeMargin} 0 0`},...u[n].heading},message:{label:"billboard__message",display:"block",color:l?t.messageColorClickable:t.messageColor,...(s||a)&&{margin:`${t.mediumMargin} 0 0`},...u[n].message}}},cZ=t=>{const e=t.borders,n=t.colors,i=t.spacing,r=t.typography,o=t.key,s={canvas:{iconHoverColor:t["ic-link-color"],messageColorClickable:t["ic-link-color"],clickableActiveBg:t["ic-brand-primary"]}};return{...{fontFamily:r==null?void 0:r.fontFamily,paddingSmall:i==null?void 0:i.small,paddingMedium:i==null?void 0:i.medium,paddingLarge:i==null?void 0:i.medium,iconColor:n==null?void 0:n.textDark,mediumMargin:i==null?void 0:i.small,largeMargin:i==null?void 0:i.medium,iconHoverColor:n==null?void 0:n.textLink,backgroundColor:n==null?void 0:n.backgroundLightest,iconHoverColorInverse:n==null?void 0:n.textLightest,buttonBorderWidth:e==null?void 0:e.widthMedium,buttonBorderRadius:e==null?void 0:e.radiusLarge,messageColor:n==null?void 0:n.textDark,messageColorClickable:n==null?void 0:n.textLink,messageColorInverse:n==null?void 0:n.textLight,messageFontSizeSmall:r==null?void 0:r.fontSizeSmall,messageFontSizeMedium:r==null?void 0:r.fontSizeMedium,messageFontSizeLarge:r==null?void 0:r.fontSizeLarge,clickableActiveBg:n==null?void 0:n.backgroundBrand,clickableActiveText:n==null?void 0:n.textLightest,buttonBorderStyle:e==null?void 0:e.style,buttonHoverBorderStyle:"dashed"},...s[o]}},dZ={hero:f.oneOfType([f.element,f.func]),size:f.oneOf(["small","medium","large"]),as:f.elementType,elementRef:f.func,heading:f.string,headingAs:f.oneOf(["h1","h2","h3","span"]),headingLevel:f.oneOf(["h1","h2","h3","h4"]),message:f.oneOfType([f.node,f.func]),onClick:f.func,href:f.string,disabled:f.bool,readOnly:f.bool,margin:ct.spacing},hZ=["hero","size","as","elementRef","heading","headingAs","headingLevel","message","onClick","href","disabled","readOnly","margin"];var W2,V2,Ua;let RM=(W2=de(uZ,cZ),W2(V2=(Ua=class zv extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.handleClick=n=>{const i=this.props,r=i.readOnly,o=i.onClick;r?(n.preventDefault(),n.stopPropagation()):typeof o=="function"&&o(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}renderHeading(){const e=this.props,n=e.headingLevel,i=e.headingAs,r=e.heading,o=e.styles;return C("span",{css:o==null?void 0:o.heading},C(Tr,{level:n,as:i,color:"primary"},r))}get SVGIconSize(){const e=this.props.size;return e==="small"?"medium":e==="large"?"x-large":"large"}renderHero(){return typeof this.props.hero=="function"?this.props.hero(this.SVGIconSize):this.props.hero}renderContent(){const e=this.props,n=e.heading,i=e.message,r=e.hero,o=e.styles;return C("span",{css:o==null?void 0:o.content},r&&C("span",{css:o==null?void 0:o.hero},this.renderHero()),n&&this.renderHeading(),i&&C("span",{css:o==null?void 0:o.message},ot(i)))}render(){const e=this.props,n=e.href,i=e.disabled,r=e.readOnly,o=e.margin,s=e.styles,a=oi(zv,this.props);return C(be,{as:"div",margin:o},C(be,Object.assign({},Re(this.props,[...zv.allowedProps,...be.allowedProps]),{type:a==="button"?"button":void 0,as:a,elementRef:this.handleRef,css:s==null?void 0:s.billboard,href:n,onClick:this.handleClick,disabled:i,"aria-disabled":i||r?"true":void 0}),this.renderContent()))}},Ua.displayName="Billboard",Ua.componentId="Billboard",Ua.propTypes=dZ,Ua.allowedProps=hZ,Ua.defaultProps={disabled:!1,readOnly:!1,size:"medium",headingAs:"span",headingLevel:"h1",as:"span",elementRef:()=>{}},Ua))||V2);const fZ=t=>({truncateText:{label:"truncateText",display:"block",overflow:"hidden",wordWrap:"break-word",whiteSpace:"normal",fontFamily:t.fontFamily},auto:{label:"truncateText__auto",height:"100%"},spacer:{label:"truncateText__spacer",visibility:"hidden",maxHeight:"0",display:"block"},lineHeight:t.lineHeight}),pZ=t=>{const e=t.typography;return{...{fontFamily:e==null?void 0:e.fontFamily,lineHeight:e==null?void 0:e.lineHeight}}};/*! * escape-html * Copyright(c) 2012-2013 TJ Holowaychuk * Copyright(c) 2015 Andreas Lubbe * Copyright(c) 2015 Tiancheng "Timothy" Gu * MIT Licensed - */var mZ=/["'&<>]/,gZ=OZ;function OZ(t){var e=""+t,n=mZ.exec(e);if(!n)return e;var i,r="",o=0,s=0;for(o=n.index;ol.toUpperCase())),n.letterSpacing!=="normal"&&(s=o.length*parseInt(n.letterSpacing)),a=r.measureText(o).width+s,a}function Ng(t,e,n=!0,i=!0,r=!1){let o=t;const s=o.charAt(0),a=o.slice(-1);return n&&e.indexOf(s)!==-1&&(o=o.slice(1)),i&&e.indexOf(a)!==-1&&(o=o.slice(0,-1)),r&&(o=Ng(o,e,n,i,!1)),o}function IM(t,e,n=!1){const i=e.truncate,r=e.ignore,o=e.ellipsis;let s=uf(t),a=-1,l=-1;const u=()=>{for(let c=0;c=0&&(h=s[p],!(h.length>0));)p--;if(h){const m=String(h.slice(-1));r.indexOf(m)!==-1&&(s[p].length-=1)}}}if(u(),c=s[a],c){const d=c[l+1];if(d&&r.indexOf(d)!==-1&&s[a].splice(l+1,1),!d){let h=null,p=a+1;for(;p0));)p++;if(h){const m=String(h[0]);r.indexOf(m)!==-1&&s[p].shift()}}}}else{u();const c=s[a];if(c){const d=c[l-1];if(d&&r.indexOf(d.slice(-1))!==-1&&(d.length===1?s[a].splice(l-1,1):s[a][l-1]=d.slice(0,-1)),!d){let h=null,p=a-1;for(;p>=0&&(h=s[p],!(h.length>0));)p--;if(h){const m=String(h.slice(-1)).slice(-1);if(r.indexOf(m)!==-1){const O=h.length-1;s[p][O]=h[O].slice(0,-1)}}}}}return n&&(s=IM(s,e,!1)),s}function SZ(t,e){const n=new wZ(t,e);if(n)return n.truncate()}class wZ{constructor(e,n={}){this._options=void 0,this._stage=void 0,this._parent=void 0,this._nodeMap=void 0,this._defaultStringData=void 0,this._nodeDataIndexes=void 0,this._maxHeight=void 0,this._maxWidth=void 0,this._maxLines=void 0;const i=e!=null&&e.parentElement?e==null?void 0:e.parentElement:void 0;if(this._options={parent:n.parent||i,maxLines:n.maxLines||1,position:n.position||"end",truncate:n.truncate||"character",ellipsis:n.ellipsis||"…",ignore:n.ignore||[" ",".",","],lineHeight:n.lineHeight||1.2,shouldTruncateWhenInvisible:!!n.shouldTruncateWhenInvisible},!e){Ye(!1,"[Truncator] No element to truncate.");return}if(this._stage=e,n.parent)this._parent=this._options.parent;else{const r=this._stage.parentElement?this._stage.parentElement:void 0;this._parent=this._options.maxLines==="auto"?r:this._stage}this.setup()}setup(){if(!this._stage)return;const e=this._options,n=e.maxLines,i=e.truncate,r=e.lineHeight,o=Fr(this._parent),s=o.lineHeight==="normal"?r*parseFloat(o.fontSize):parseFloat(o.lineHeight),a=this._stage.firstChild.children?this._stage.firstChild:this._stage,l=[],u=[];this._nodeMap=this.getNodeMap(a);for(let c=0;cc.node),this._parent),this._maxLines=n==="auto"?Math.round(this._maxHeight/s):n}getNodeMap(e){const n=this._options,i=n.shouldTruncateWhenInvisible,r=n.truncate,o=Array.from(e.childNodes),s=[];return o.forEach(a=>{if(a.nodeType===1||a.nodeType===3){const l=i?!0:Pv(a,!1),u=a.textContent+" ";s.push({node:a,data:r==="word"?l?u.match(/.*?[\.\s\/]+?/g):[""]:l?a.textContent.split(""):[]})}}),s}getNodeIndexes(e){const n=[];for(let i=0;i${s}`}else r.node.nodeType===3&&(n+=s)}return n}checkFit(e){const n=this.domString(e),i=this._options.maxLines==="auto"?this._stage:this._parent;let r=!0;return this._stage.innerHTML=n,jt(i).height-this._maxHeight>.5&&(r=!1),r}truncate(){const e=this._options,n=e.ellipsis,i=e.ignore,o=e.position==="middle";let s=!1,a="",l=null;if(!this._stage)return;const u=(m,O,y,b,v=null)=>{let S=m,k=O,x=v;for(;S<=k;){const _=Math.floor((S+k)/2);y(_,b)?(k=_-1,x=_):S=_+1}return x},c=(m,O,y,b)=>{let v=!1;const S=uf(O);switch(m){case 0:break;case y.length:v=!0;for(let k=0;ky[w]),_=Array(2);_[0]=k[0]+1,_[1]=y.length-m-_[0];for(let w=0;w<=x[0];w++)switch(!0){case w=x[1];w--)switch(!0){case w>x[1]:_[1]-=O[w].length;break;case w===x[1]:x[1]>x[0]&&(S[w]=O[w].slice(-_[1])),x[1]===x[0]&&(S[w]=S[w].concat(O[w].slice(-_[1])));break}for(let w=x[0]+1;wx:S[w]=[];break}}break}return{truncated:v,truncatedArray:S}},d=(m,O)=>{const y=c(m,this._defaultStringData,this._nodeDataIndexes,O),b=y.truncatedArray;return this.checkFit(b)},h=u(0,this._nodeDataIndexes.length,d,o,this._nodeDataIndexes.length);var p=c(h,this._defaultStringData,this._nodeDataIndexes,o);s=p.truncated,l=p.truncatedArray,l=IM(l,this._options,!0);for(let m=0;m{this.ref&&this.setState(this.initialState)},this.state=this.initialState}get _ref(){return this.ref}get initialState(){return{isTruncated:!1,needsSecondRender:!0,truncatedElement:void 0,truncatedText:void 0}}componentDidMount(){const e=this.props,n=e.children,i=e.makeStyles;if(i==null||i(),n){var r;this.checkChildren();const o=Hl(n);this._text=o||void 0,this.truncate(),this._debounced=tb(this.update,this.props.debounce,{leading:!0,trailing:!0}),this._prevWidth=(r=jt(this.ref))===null||r===void 0?void 0:r.width,this._resizeListener=new ResizeObserver(s=>{requestAnimationFrame(()=>{for(const a of s){const l=a.contentRect.width;this._prevWidth!==l&&(this._prevWidth=l,this.props.debounce===0?this.update():this._debounced())}})}),this._resizeListener.observe(this.ref)}}componentWillUnmount(){this._resizeListener&&this._resizeListener.disconnect(),this._debounced&&this._debounced.cancel()}componentDidUpdate(e){const n=this.props,i=n.children,r=n.onUpdate,o=n.makeStyles;o==null||o();const s=this.state,a=s.isTruncated,l=s.needsSecondRender,u=s.truncatedText;if(i){if(e!==this.props){if(e.children!==this.props.children){this.checkChildren();const c=Hl(i);this._text=c||void 0}this.setState(this.initialState);return}!l&&(a||this._wasTruncated)?(r==null||r(a,u),this._wasTruncated=a):this.truncate()}}checkChildren(){Ye(!(()=>{let e=!1;const n=Hl(this.props.children);return z.Children.forEach(n.props.children,i=>{i.props&&z.Children.forEach(i.props.children,r=>{r.props&&(e=!0)})}),e})(),"[TruncateText] Some children are too deep in the node tree and will not render.")}truncate(){if(this.state.needsSecondRender)if(ln){var e;const r=SZ(this._stage,{...this.props,parent:this.ref?this.ref:void 0,lineHeight:(e=this.props.styles)===null||e===void 0?void 0:e.lineHeight});if(r){const o=this.renderChildren(r.isTruncated,r.data,r.constraints.width);this.setState({needsSecondRender:!1,isTruncated:r.isTruncated,truncatedElement:o,truncatedText:r.text})}}else{var n,i;const r=(n=this.ref)!==null&&n!==void 0&&n.textContent?(i=this.ref)===null||i===void 0?void 0:i.textContent:void 0;this.setState({needsSecondRender:!1,isTruncated:!1,truncatedElement:this._text,truncatedText:r})}}renderChildren(e,n,i){var r;if(!e)return this._text;const o=[];for(let a=0;aa);return this._text.props?$t(this._text,this._text.props,s):s}render(){var e;const n=this.state.truncatedElement,i=this.props.children;return C("span",{css:(e=this.props.styles)===null||e===void 0?void 0:e.truncateText,ref:r=>{this.ref=r}},i&&(n?null:C("span",{ref:r=>{this._stage=r}},Hl(i))),n)}},Ha.displayName="TruncateText",Ha.componentId="TruncateText",Ha.allowedProps=xZ,Ha.propTypes=kZ,Ha.defaultProps={maxLines:1,ellipsis:"…",truncate:"character",position:"end",ignore:[" ",".",","],debounce:0},Ha))||Ku)||Ku)||Ku);const EZ=(t,e,n)=>{const i=e.isWithinText,r=e.renderIcon,o=e.iconPlacement,s=e.color,a=n.containsTruncateText,l=n.hasVisibleChildren,u=s==="link-inverse",c={boxSizing:"border-box",fontFamily:t.fontFamily,fontWeight:t.fontWeight,transition:"outline-color 0.2s",verticalAlign:"baseline",outlineColor:"transparent",outlineWidth:t.focusOutlineWidth,outlineStyle:t.focusOutlineStyle,borderRadius:t.focusOutlineBorderRadius,outlineOffset:"0.25rem",...r&&a&&l&&{alignItems:"center"},"&:focus":{outlineColor:t.focusOutlineColor},"&[aria-disabled]":{cursor:"not-allowed",pointerEvents:"none",opacity:"0.5"},"&::-moz-focus-inner":{border:0}},d={...c,cursor:"pointer",color:t.color,textDecoration:i?t.textDecorationWithinText:t.textDecorationOutsideText,"&:focus":{color:t.color,outlineColor:t.focusOutlineColor},"&:hover, &:active":{color:t.hoverColor,textDecoration:i?t.hoverTextDecorationWithinText:t.hoverTextDecorationOutsideText}},h={appearance:"none",userSelect:"text",background:"none",border:"none",cursor:"pointer",fontSize:"1em",margin:0,padding:0,textAlign:"inherit"},p={color:t.colorInverse,"&:focus":{outlineColor:t.focusInverseIconOutlineColor},"&:hover, &:focus, &:active":{color:t.colorInverse}};return{link:{label:"link",...c,"&:is(a), &:is(button)":d,"&:-webkit-any(a), &:-webkit-any(button)":d,"&:is(button)":h,"&:-webkit-any(button)":h,...u&&{...p,"&:is(a):link, &:is(a):visited, &:is(button)":p,"&:-webkit-any(a):link, &:-webkit-any(a):visited, &:-webkit-any(button)":p}},icon:{label:"icon",...r&&{fontSize:t.iconSize,boxSizing:"border-box",paddingInlineStart:o==="start"?0:t.iconPlusTextMargin,paddingInlineEnd:o==="start"?t.iconPlusTextMargin:0}}}},CZ=t=>{const e=t.colors,n=t.borders,i=t.typography,r=t.spacing,o=t.key,s={canvas:{color:t["ic-link-color"],focusOutlineColor:t["ic-brand-primary"],hoverColor:jo(t["ic-link-color"],10)},"canvas-high-contrast":{textDecorationOutsideText:"underline",hoverTextDecorationOutsideText:"none"}};return{...{fontFamily:i==null?void 0:i.fontFamily,fontWeight:i==null?void 0:i.fontWeightNormal,color:e==null?void 0:e.textLink,textDecorationWithinText:"underline",hoverTextDecorationWithinText:"none",textDecorationOutsideText:"none",hoverTextDecorationOutsideText:"underline",focusOutlineWidth:n==null?void 0:n.widthMedium,focusOutlineColor:e==null?void 0:e.borderBrand,focusOutlineStyle:n==null?void 0:n.style,focusOutlineBorderRadius:n==null?void 0:n.radiusSmall,hoverColor:jo(e==null?void 0:e.textLink,10),colorInverse:e==null?void 0:e.textLight,focusInverseOutlineColor:e==null?void 0:e.borderLightest,focusInverseIconOutlineColor:e==null?void 0:e.borderLightest,iconSize:"1.125em",iconPlusTextMargin:r==null?void 0:r.xxSmall},...s[o]}},TZ={children:f.node.isRequired,href:f.string,color:f.oneOf(["link","link-inverse"]),elementRef:f.func,as:f.elementType,role:f.string,forceButtonRole:f.bool,interaction:f.oneOf(["enabled","disabled"]),margin:ut.spacing,renderIcon:f.oneOfType([f.func,f.node]),iconPlacement:f.oneOf(["start","end"]),display:f.oneOf(["auto","block","inline-block","flex","inline-flex"]),isWithinText:f.bool,onBlur:f.func,onClick:f.func,onFocus:f.func,onMouseEnter:f.func},PZ=["children","href","color","elementRef","as","role","forceButtonRole","interaction","margin","renderIcon","iconPlacement","display","isWithinText","onBlur","onClick","onFocus","onMouseEnter"],AZ=["children","onClick","onMouseEnter","color","href","margin","renderIcon","iconPlacement","isWithinText"];var q2,Y2,km,Ua;let Di=(q2=de(EZ,CZ),Y2=Le(),q2(km=Y2(km=(Ua=class $M extends T.Component{constructor(...e){super(...e),this.state={hasFocus:!1},this.ref=null,this.makeStyleProps=()=>({containsTruncateText:this.containsTruncateText,hasVisibleChildren:this.hasVisibleChildren}),this.handleElementRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.handleClick=n=>{const i=this.props.onClick;this.interaction==="disabled"?(n.preventDefault(),n.stopPropagation()):typeof i=="function"&&i(n)},this.handleFocus=n=>{this.setState({hasFocus:!0}),typeof this.props.onFocus=="function"&&this.props.onFocus(n)},this.handleBlur=n=>{this.setState({hasFocus:!1}),typeof this.props.onBlur=="function"&&this.props.onBlur(n)}}get _link(){return this.ref}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.makeStyleProps())}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.makeStyleProps())}get containsTruncateText(){let e=!1;return z.Children.forEach(this.props.children,n=>{n&&Me(n,["TruncateText"])&&(e=!0)}),Ne(!e||this.props.display===void 0,"[Link] Using the display property with TruncateText may cause layout issues."),e}get display(){if(this.props.display)return this.props.display;const e=this.containsTruncateText;return this.props.renderIcon?e?"inline-flex":"inline-block":e?"block":"auto"}get interaction(){return Yo({props:this.props,interactionTypes:["disabled"]})}get element(){return oi($M,this.props)}get focused(){return xo(this.ref)}get focusable(){return zk(this.ref)}get hasVisibleChildren(){return eb(this.props.children)}get role(){const e=this.props,n=e.role,i=e.forceButtonRole,r=e.onClick;return i&&r&&this.element!=="button"?"button":n}focus(){this.ref&&this.ref.focus()}renderIcon(){var e;return Ne(this.props.display===void 0,"[Link] Using the display property with an icon may cause layout issues."),C("span",{css:(e=this.props.styles)===null||e===void 0?void 0:e.icon},rt(this.props.renderIcon))}render(){var e;const n=this.props,i=n.children;n.onClick;const r=n.onMouseEnter;n.color;const o=n.href,s=n.margin,a=n.renderIcon,l=n.iconPlacement;n.isWithinText;const u=Ie(n,AZ),d=this.interaction==="disabled",h=this.element==="button"||this.element==="input"?"button":void 0,p=this.role==="button"&&!d?0:void 0;return C(ye,Object.assign({},It(u),{elementRef:this.handleElementRef,as:this.element,display:this.display,margin:s,href:o,onMouseEnter:r,onClick:this.handleClick,onFocus:this.handleFocus,onBlur:this.handleBlur,"aria-disabled":d?"true":void 0,role:this.role,type:h,tabIndex:p,css:(e=this.props.styles)===null||e===void 0?void 0:e.link}),a&&l==="start"&&this.renderIcon(),i,a&&l==="end"&&this.renderIcon())}},Ua.displayName="Link",Ua.componentId="Link",Ua.propTypes=TZ,Ua.allowedProps=PZ,Ua.defaultProps={interaction:void 0,color:"link",iconPlacement:"start",isWithinText:!0,forceButtonRole:!0},Ua))||km)||km);const RZ={children:f.node.isRequired,href:f.string,onClick:f.func,onMouseEnter:f.func,size:f.oneOf(["small","medium","large"]),renderIcon:f.oneOfType([f.node,f.func]),iconPlacement:f.oneOf(["start","end"])},IZ=["children","href","iconPlacement","onClick","onMouseEnter","renderIcon","size"];var G2,K2,Wa;let LM=(G2=Le(),G2(K2=(Wa=class NM extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{this.ref=n}}render(){const e=this.props,n=e.children,i=e.href,r=e.renderIcon,o=e.iconPlacement,s=e.onClick,a=e.onMouseEnter,l=Re(this.props,NM.allowedProps);return z.createElement(Di,Object.assign({},l,{href:i,renderIcon:r,iconPlacement:o,onClick:s,onMouseEnter:a,isWithinText:!1,elementRef:this.handleRef}),z.createElement(_Z,null,n))}},Wa.displayName="BreadcrumbLink",Wa.componentId="Breadcrumb.Link",Wa.propTypes=RZ,Wa.allowedProps=IZ,Wa.defaultProps={},Wa))||K2);const $Z=(t,e)=>{const n=e.size,i={small:{fontSize:t.smallFontSize,paddingInlineEnd:`calc(${t.smallSeparatorFontSize} * 2)`,paddingInlineStart:0},medium:{fontSize:t.mediumFontSize,paddingInlineEnd:`calc(${t.mediumSeparatorFontSize} * 2)`,paddingInlineStart:0},large:{fontSize:t.largeFontSize,paddingInlineEnd:`calc(${t.largeSeparatorFontSize} * 2)`,paddingInlineStart:0}},r={small:{fontSize:t.smallSeparatorFontSize,insetInlineEnd:`calc(${t.smallSeparatorFontSize} / 2)`,insetInlineStart:"auto",marginTop:`calc(-1 * (${t.smallSeparatorFontSize} / 2))`},medium:{fontSize:t.mediumSeparatorFontSize,insetInlineEnd:`calc(${t.mediumSeparatorFontSize} / 2)`,insetInlineStart:"auto",marginTop:`calc(-1 * (${t.mediumSeparatorFontSize} / 2))`},large:{fontSize:t.largeSeparatorFontSize,insetInlineEnd:`calc(${t.largeSeparatorFontSize} / 2)`,insetInlineStart:"auto",marginTop:`calc(-1 * (${t.largeSeparatorFontSize} / 2))`}};return{breadcrumb:{label:"breadcrumb",fontFamily:t.fontFamily,margin:0,padding:0,listStyleType:"none",overflow:"visible",display:"flex",alignItems:"center"},crumb:{label:"breadcrumb__crumb",boxSizing:"border-box",position:"relative",...i[n],"&:last-child":{paddingInlineEnd:0}},separator:{label:"breadcrumb__separator",boxSizing:"border-box",position:"absolute",top:"50%",color:t.separatorColor,...r[n]}}},LZ=t=>{const e=t.colors,n=t.typography;return{...{fontFamily:n==null?void 0:n.fontFamily,separatorColor:e==null?void 0:e.borderDark,smallSeparatorFontSize:"0.5rem",smallFontSize:n==null?void 0:n.fontSizeSmall,mediumSeparatorFontSize:"0.75rem",mediumFontSize:n==null?void 0:n.fontSizeMedium,largeSeparatorFontSize:"1rem",largeFontSize:n==null?void 0:n.fontSizeLarge}}},NZ={children:ft.oneOf([LM]),label:f.string.isRequired,size:f.oneOf(["small","medium","large"]),margin:ut.spacing},MZ=["children","label","margin","size"];var J2,eT,xm,Ss;let DZ=(J2=de($Z,LZ),eT=Le(),J2(xm=eT(xm=(Ss=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{this.ref=n}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}renderChildren(){const e=this.props,n=e.styles,i=e.children,r=z.Children.count(i),o={maxWidth:`${Math.floor(100/r)}%`};return z.Children.map(i,(s,a)=>C("li",{css:n==null?void 0:n.crumb,style:o},s,a{const n=e.alignContent,i=e.size,r={top:{alignItems:"flex-start"},center:{alignItems:"center"}},o={display:"flex",background:t.background,margin:0,padding:0,fontFamily:t.fontFamily,...r[n]},s={color:t.color,margin:0,padding:0};return{byline:{label:"byline",...o,"&:is(figure)":o,"&:-webkit-any(figure)":o},figure:{label:"byline__figure",marginInlineStart:0,marginInlineEnd:t.figureMargin},caption:{label:"byline__caption",...s,"&:is(figcaption)":s,"&:-webkit-any(figcaption)":s},title:{label:"byline__title",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",display:"block",margin:t.titleMargin,fontSize:t.titleFontSize,fontWeight:t.titleFontWeight,lineHeight:t.titleLineHeight},description:{label:"byline__description",fontSize:t.descriptionFontSize,lineHeight:t.descriptionLineHeight,fontWeight:t.descriptionFontWeight},maxWidth:i&&t[i]}},QZ=t=>{const e=t.colors,n=t.spacing,i=t.typography,r=t.breakpoints,o=t.key,s={canvas:{color:t["ic-brand-font-color-dark"]}};return{...{fontFamily:i==null?void 0:i.fontFamily,background:e==null?void 0:e.backgroundLightest,color:e==null?void 0:e.textDarkest,figureMargin:n==null?void 0:n.small,titleMargin:`0 0 ${n==null?void 0:n.xSmall} 0`,titleFontSize:i==null?void 0:i.fontSizeLarge,titleFontWeight:i==null?void 0:i.fontWeightNormal,titleLineHeight:i==null?void 0:i.lineHeightFit,descriptionFontSize:i==null?void 0:i.fontSizeMedium,descriptionFontWeight:i==null?void 0:i.fontWeightNormal,descriptionLineHeight:i==null?void 0:i.lineHeightCondensed,small:r==null?void 0:r.small,medium:r==null?void 0:r.medium,large:r==null?void 0:r.large},...s[o]}},FZ={children:f.node.isRequired,title:f.node,description:f.oneOfType([f.string,f.node]),alignContent:f.oneOf(["top","center"]),margin:ut.spacing,size:f.oneOf(["small","medium","large"]),elementRef:f.func},zZ=["alignContent","children","description","elementRef","margin","size","title"];var tT,nT,Va;let HZ=(tT=de(BZ,QZ),tT(nT=(Va=class zv extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){var e,n,i,r,o,s;const a=ye.omitViewProps(Re(this.props,zv.allowedProps),zv);return C(ye,Object.assign({},a,{elementRef:this.handleRef,css:(e=this.props.styles)===null||e===void 0?void 0:e.byline,as:"figure",margin:this.props.margin,maxWidth:(n=this.props.styles)===null||n===void 0?void 0:n.maxWidth}),C("div",{css:(i=this.props.styles)===null||i===void 0?void 0:i.figure},this.props.children),C("figcaption",{css:(r=this.props.styles)===null||r===void 0?void 0:r.caption},this.props.title&&C("span",{css:(o=this.props.styles)===null||o===void 0?void 0:o.title},this.props.title),this.props.description&&C("div",{css:(s=this.props.styles)===null||s===void 0?void 0:s.description},this.props.description)))}},Va.displayName="Byline",Va.componentId="Byline",Va.propTypes=FZ,Va.allowedProps=zZ,Va.defaultProps={alignContent:"center"},Va))||nT);const UZ=(t,e)=>{const n=e.vAlign,i=e.textAlign,r=e.rowSpacing,o=e.colSpacing,s=e.isLastRow,a=e.isLastCol,l=e.startAt,u=e.visualDebug,c={small:{marginBottom:t.spacingSmall},medium:{marginBottom:t.spacingMedium},large:{marginBottom:t.spacingLarge},none:{marginBottom:0}},d=()=>{const x={small:{paddingLeft:`calc(${t.spacingSmall} / 2)`,paddingRight:`calc(${t.spacingSmall} / 2)`},medium:{paddingLeft:`calc(${t.spacingMedium} / 2)`,paddingRight:`calc(${t.spacingMedium} / 2)`},large:{paddingLeft:`calc(${t.spacingLarge} / 2)`,paddingRight:`calc(${t.spacingLarge} / 2)`},none:{}},_={top:{alignSelf:"flex-start"},middle:{alignSelf:"center"},bottom:{alignSelf:"flex-end"},stretch:{alignSelf:"stretch"}},w={start:{textAlign:"start"},end:{textAlign:"end"},center:{textAlign:"center"},inherit:{textAlign:"inherit"}};return{flexGrow:1,flexShrink:1,flexBasis:"0%",marginBottom:0,boxSizing:"border-box",...o&&x[o],...n&&_[n],...i&&w[i]}},h=()=>{const x=["small","medium","large","x-large",null];return x.slice(x.indexOf(l))},p=x=>h().includes(x),m=x=>{let _=e.width;if(_)return _&&typeof _=="object"&&(_=_[x==="x-large"?"xLarge":x]),_},O=x=>{let _=e.offset;if(_)return _&&typeof _=="object"&&(_=_[x==="x-large"?"xLarge":x]),_},y=(x="1")=>{switch(x){case"auto":return{flexGrow:0,flexShrink:0,flexBasis:"auto"};case 12:return{flex:"0 0 100%"};default:return{flexGrow:0,flexShrink:0,flexBasis:`calc(${x} / 12 * 99.999%)`,maxWidth:`calc(${x} / 12 * 99.999%)`}}},b=(x="1")=>{switch(x){case"auto":case 12:return{};default:return{marginInlineStart:`calc(${x} / 12 * 99.999%)`,marginInlineEnd:0}}},v=x=>l&&l===x?{...d()}:{},S=x=>{const _=m(x),w=O(x);return p(x)?{..._&&y(_),...w&&b(w)}:{}},k=x=>({...v(x),...S(x)});return{gridCol:{label:"gridCol",display:"block",boxSizing:"border-box",textAlign:"inherit",minWidth:"0.0625rem",...r&&c[r],...s&&a&&{marginBottom:0},...k("small"),[`@media screen and (${t.mediumMin})`]:{...k("medium")},[`@media screen and (${t.largeMin})`]:{...k("large")},[`@media screen and (${t.xLargeMin})`]:{...k("x-large")},...u&&{outline:"0.0625rem dashed red"}}}},WZ=t=>{const e=t.spacing,n=t.media;return{...{spacingSmall:e==null?void 0:e.small,spacingMedium:e==null?void 0:e.medium,spacingLarge:e==null?void 0:e.large,...n}}},Jr=f.oneOfType([f.number,f.oneOf(["auto"])]),VZ={children:f.node,colSpacing:f.oneOf(["none","small","medium","large"]),rowSpacing:f.oneOf(["none","small","medium","large"]),textAlign:f.oneOf(["start","end","center","inherit"]),hAlign:f.oneOf(["start","center","end","space-around","space-between"]),vAlign:f.oneOf(["top","middle","bottom","stretch"]),startAt:f.oneOf(["small","medium","large","x-large",null]),visualDebug:f.bool,width:f.oneOfType([Jr,f.shape({small:Jr,medium:Jr,large:Jr,xLarge:Jr})]),offset:f.oneOfType([Jr,f.shape({small:Jr,medium:Jr,large:Jr,xLarge:Jr})]),isLastRow:f.bool,isLastCol:f.bool,elementRef:f.func},jZ=["children","colSpacing","rowSpacing","textAlign","hAlign","vAlign","startAt","visualDebug","width","offset","isLastRow","isLastCol","elementRef"];var iT,rT,ja;let qk=(iT=de(UZ,WZ),iT(rT=(ja=class MM extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}widthCheck(){const e=this.props.width;let n=!1;e&&(typeof e=="number"&&e<=0&&(n=!0),typeof e=="object"&&Object.keys(e).forEach(i=>{typeof e[i]=="number"&&e[i]<=0&&(n=!0)})),n&&Ne(!1,"Col width must be positive!")}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n),this.widthCheck()}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n),this.widthCheck()}render(){const e=this.props,n=e.children,i=e.styles,r=Re(this.props,MM.allowedProps);return C("span",Object.assign({},r,{ref:this.handleRef,css:i==null?void 0:i.gridCol}),n)}},ja.displayName="GridCol",ja.componentId="Grid.Col",ja.propTypes=VZ,ja.allowedProps=jZ,ja.defaultProps={textAlign:"inherit",children:null,isLastCol:!1,isLastRow:!1},ja))||rT);const XZ=(t,e)=>{const n=e.hAlign,i=e.vAlign,r=e.rowSpacing,o=e.colSpacing,s=e.isLastRow,a=e.startAt,l=e.visualDebug,u=()=>{const d={center:{justifyContent:"center"},start:{justifyContent:"flex-start"},end:{justifyContent:"flex-end"},"space-around":{justifyContent:"space-around"},"space-between":{justifyContent:"space-between"}},h={top:{alignItems:"flex-start"},middle:{alignItems:"center"},bottom:{alignItems:"flex-end"},stretch:{alignItems:"stretch"}},p={small:{margin:`0 calc(-1 * ${t.spacingSmall} / 2)`},medium:{margin:`0 calc(-1 * ${t.spacingMedium} / 2)`},large:{margin:`0 calc(-1 * ${t.spacingLarge} / 2)`},none:{}},m={small:{marginBottom:t.spacingSmall},medium:{marginBottom:t.spacingMedium},large:{marginBottom:t.spacingLarge},none:{marginBottom:0}};return{display:"flex",flexFlow:"row nowrap",...n&&d[n],...i&&h[i],...o&&p[o],...r&&m[r],...s&&{marginBottom:0}}},c=d=>a&&a===d?{...u()}:{};return{gridRow:{label:"gridRow",display:"block",boxSizing:"border-box",...c("small"),[`@media screen and (${t.mediumMin})`]:{...c("medium")},[`@media screen and (${t.largeMin})`]:{...c("large")},[`@media screen and (${t.xLargeMin})`]:{...c("x-large")},...l&&{outline:"0.0625rem dashed blue"}}}},ZZ=t=>{const e=t.spacing,n=t.media;return{...{spacingSmall:e==null?void 0:e.small,spacingMedium:e==null?void 0:e.medium,spacingLarge:e==null?void 0:e.large,...n}}},qZ={children:ft.oneOf([qk,ji]),rowSpacing:f.oneOf(["none","small","medium","large"]),colSpacing:f.oneOf(["none","small","medium","large"]),hAlign:f.oneOf(["start","center","end","space-around","space-between"]),vAlign:f.oneOf(["top","middle","bottom","stretch"]),startAt:f.oneOf(["small","medium","large","x-large",null]),visualDebug:f.bool,isLastRow:f.bool},YZ=["children","rowSpacing","colSpacing","hAlign","vAlign","startAt","visualDebug","isLastRow"],GZ=["styles","makeStyles"],KZ=["styles"];var oT,sT,Xa;let Hv=(oT=de(XZ,ZZ),oT(sT=(Xa=class Uv extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{this.ref=n}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}renderChildren(){const e=this.props;e.styles,e.makeStyles;const n=Ie(e,GZ);return T.Children.map(this.props.children,(i,r)=>Me(i,[qk])?$t(i,{...us(n,Uv.allowedProps),...i.props,isLastRow:n.isLastRow,isLastCol:r+1===T.Children.count(this.props.children)}):i)}render(){const e=this.props,n=e.styles,i=Ie(e,KZ),r=Re(i,Uv.allowedProps);return C("span",Object.assign({},r,{css:n==null?void 0:n.gridRow,ref:this.handleRef}),this.renderChildren())}},Xa.displayName="GridRow",Xa.componentId="Grid.Row",Xa.propTypes=qZ,Xa.allowedProps=YZ,Xa.defaultProps={children:null,isLastRow:!1},Xa))||sT);const JZ=(t,e)=>{const n=e.startAt,i=e.visualDebug,r=o=>n&&n===o?{boxSizing:"border-box"}:{};return{grid:{label:"grid",display:"block",...r("small"),[`@media screen and (${t.mediumMin})`]:{...r("medium")},[`@media screen and (${t.largeMin})`]:{...r("large")},[`@media screen and (${t.xLargeMin})`]:{...r("x-large")},...i&&{outline:"0.0625rem dashed red"}}}},eq=t=>{const e=t.spacing,n=t.media;return{...{spacingSmall:e==null?void 0:e.small,spacingMedium:e==null?void 0:e.medium,spacingLarge:e==null?void 0:e.large,...n}}},tq={children:ft.oneOf([Hv,ji]),colSpacing:f.oneOf(["none","small","medium","large"]),rowSpacing:f.oneOf(["none","small","medium","large"]),hAlign:f.oneOf(["start","center","end","space-around","space-between"]),vAlign:f.oneOf(["top","middle","bottom","stretch"]),startAt:f.oneOf(["small","medium","large","x-large",null]),visualDebug:f.bool},nq=["children","colSpacing","rowSpacing","hAlign","vAlign","startAt","visualDebug"],iq=["styles","makeStyles"],rq=["styles"];var aT,lT,Mo;let qn=(aT=de(JZ,eq),aT(lT=(Mo=class Wv extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{this.ref=n}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}renderChildren(){const e=this.props;e.styles,e.makeStyles;const n=Ie(e,iq),i=T.Children.toArray(this.props.children);return i.map((r,o)=>Me(r,[Hv])?$t(r,{...us(n,Wv.allowedProps),...r.props,isLastRow:o+1===i.length}):r)}render(){const e=this.props,n=e.styles,i=Ie(e,rq),r=Re(i,Wv.allowedProps);return C("span",Object.assign({},r,{css:n==null?void 0:n.grid,ref:this.handleRef}),this.renderChildren())}},Mo.displayName="Grid",Mo.componentId="Grid",Mo.propTypes=tq,Mo.allowedProps=nq,Mo.defaultProps={colSpacing:"medium",rowSpacing:"medium",hAlign:"start",startAt:"small",vAlign:"top",visualDebug:!1,children:null},Mo.Row=Hv,Mo.Col=qk,Mo))||lT);const oq=(t,e)=>{const n=e.children,r={all:"initial",display:"block",...eb(n)&&{color:t.color,fontFamily:t.fontFamily,fontWeight:t.fontWeight,fontSize:t.fontSize,lineHeight:t.lineHeight,margin:0,textAlign:"inherit"}};return{formFieldLabel:{label:"formFieldLabel",...r,"&:is(label)":r,"&:-webkit-any(label)":r}}},sq=t=>{const e=t.colors,n=t.typography,i=t.key,r={canvas:{color:t["ic-brand-font-color-dark"]}};return{...{color:e==null?void 0:e.textDarkest,fontFamily:n==null?void 0:n.fontFamily,fontWeight:n==null?void 0:n.fontWeightBold,fontSize:n==null?void 0:n.fontSizeMedium,lineHeight:n==null?void 0:n.lineHeightFit},...r[i]}},aq={children:f.node.isRequired,as:f.elementType},lq=["as","children"];var uT,cT,Za;let uq=(uT=de(oq,sq),uT(cT=(Za=class Vv extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{this.ref=n}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){const e=oi(Vv,this.props),n=this.props,i=n.styles,r=n.children;return C(e,Object.assign({},Re(this.props,Vv.allowedProps),{css:i==null?void 0:i.formFieldLabel,ref:this.handleRef}),r)}},Za.displayName="FormFieldLabel",Za.componentId="FormFieldLabel",Za.propTypes=aq,Za.allowedProps=lq,Za.defaultProps={as:"span"},Za))||cT);const cq=(t,e)=>{const n=e.variant,i={hint:{color:t.colorHint},error:{color:t.colorError},success:{color:t.colorSuccess},"screenreader-only":{}};return{formFieldMessage:{label:"formFieldMessage",fontFamily:t.fontFamily,fontWeight:t.fontWeight,fontSize:t.fontSize,lineHeight:t.lineHeight,display:"block",...i[n]}}},dq=t=>{const e=t.colors,n=t.typography,i=t.key,r={canvas:{colorHint:t["ic-brand-font-color-dark"]}};return{...{colorHint:e==null?void 0:e.textDarkest,colorError:e==null?void 0:e.textDanger,colorSuccess:e==null?void 0:e.textSuccess,fontFamily:n==null?void 0:n.fontFamily,fontWeight:n==null?void 0:n.fontWeightNormal,fontSize:n==null?void 0:n.fontSizeSmall,lineHeight:n==null?void 0:n.lineHeight},...r[i]}},DM=f.oneOf(["error","hint","success","screenreader-only"]),BM=f.node,cs={message:f.shape({type:DM,text:BM})},hq={variant:DM,children:BM},fq=["variant","children"];var dT,hT,qa;let pq=(dT=de(cq,dq),dT(hT=(qa=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{this.ref=n}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){const e=this.props,n=e.children,i=e.styles;return this.props.variant!=="screenreader-only"?C("span",{css:i==null?void 0:i.formFieldMessage,ref:this.handleRef},n):C(ji,{elementRef:this.handleRef},n)}},qa.displayName="FormFieldMessage",qa.componentId="FormFieldMessage",qa.propTypes=hq,qa.allowedProps=fq,qa.defaultProps={variant:"hint"},qa))||hT);const mq=t=>({formFieldMessages:{label:"formFieldMessages",padding:0,display:"block",margin:`calc(-1 * ${t.topMargin}) 0 0 0`},message:{label:"formFieldMessages__message",display:"block"}}),gq=t=>{const e=t.spacing;return{...{topMargin:e==null?void 0:e.xxSmall}}},Oq={messages:f.arrayOf(cs.message)},bq=["messages"];var fT,pT,Ya;let jv=(fT=de(mq,gq),fT(pT=(Ya=class QM extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{this.ref=n}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){const e=this.props,n=e.messages,i=e.styles;return n&&n.length>0?C("span",Object.assign({css:i==null?void 0:i.formFieldMessages},Re(this.props,QM.allowedProps),{ref:this.handleRef}),n.map((r,o)=>C("span",{key:`error${o}`,css:i==null?void 0:i.message},C(pq,{variant:r.type},r.text)))):null}},Ya.displayName="FormFieldMessages",Ya.componentId="FormFieldMessages",Ya.propTypes=Oq,Ya.allowedProps=bq,Ya.defaultProps={},Ya))||pT);const yq=(t,e)=>({formFieldLayout:{label:"formFieldLayout",all:"initial",border:"0",padding:"0",margin:"0",minWidth:"0",direction:"inherit",textAlign:"start",opacity:"inherit",display:"block",width:"100%",...e.inline&&{display:"inline-block",verticalAlign:"middle",width:"auto"}}}),vq={label:f.node.isRequired,id:f.string,as:f.elementType,messages:f.arrayOf(cs.message),messagesId:f.string,children:f.node,inline:f.bool,layout:f.oneOf(["stacked","inline"]),labelAlign:f.oneOf(["start","end"]),vAlign:f.oneOf(["top","middle","bottom"]),width:f.string,inputContainerRef:f.func,elementRef:f.func},Sq=["label","id","as","messages","messagesId","children","inline","layout","labelAlign","width","inputContainerRef","elementRef"],wq=["makeStyles","styles"];var mT,gT,_m,Ga;let $0=(mT=zt(),gT=de(yq,null),mT(_m=gT(_m=(Ga=class Xv extends T.Component{constructor(e){super(e),this._messagesId=void 0,this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.handleInputContainerRef=n=>{typeof this.props.inputContainerRef=="function"&&this.props.inputContainerRef(n)},this._messagesId=e.messagesId||e.deterministicId(),Ye(typeof e.width<"u"||!e.inline||e.layout!=="inline",`[FormFieldLayout] The 'inline' prop is true, and the 'layout' is set to 'inline'. - This will cause a layout issue in Internet Explorer 11 unless you also add a value for the 'width' prop.`)}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}get hasVisibleLabel(){return this.props.label&&eb(this.props.label)}get hasMessages(){return this.props.messages&&this.props.messages.length>0}get elementType(){return oi(Xv,this.props)}get inlineContainerAndLabel(){return this.props.inline&&this.props.layout==="inline"}renderLabel(){return this.hasVisibleLabel?C(qn.Col,{textAlign:this.props.labelAlign,width:this.inlineContainerAndLabel?"auto":3},C(uq,{"aria-hidden":this.elementType==="fieldset"?"true":void 0},this.props.label)):this.elementType!=="fieldset"?this.props.label:null}renderLegend(){return C(ji,{as:"legend"},this.props.label,this.hasMessages&&C(jv,{messages:this.props.messages}))}renderVisibleMessages(){return this.hasMessages?C(qn.Row,null,C(qn.Col,{offset:this.inlineContainerAndLabel?void 0:3,textAlign:this.inlineContainerAndLabel?"end":void 0},C(jv,{id:this._messagesId,messages:this.props.messages}))):null}render(){const e=this.elementType,n=this.props;n.makeStyles;const i=n.styles,r=Ie(n,wq),o=r.width,s=r.layout,a=r.children;return C(e,Object.assign({},Re(r,[...Xv.allowedProps,...qn.allowedProps]),{css:i==null?void 0:i.formFieldLayout,style:{width:o},"aria-describedby":this.hasMessages?this._messagesId:void 0,ref:this.handleRef}),this.elementType==="fieldset"&&this.renderLegend(),C(qn,Object.assign({rowSpacing:"small",colSpacing:"small",startAt:s==="inline"&&this.hasVisibleLabel?"medium":null},us(r,qn.allowedProps)),C(qn.Row,null,this.renderLabel(),C(qn.Col,{width:this.inlineContainerAndLabel?"auto":void 0,elementRef:this.handleInputContainerRef},a)),this.renderVisibleMessages()))}},Ga.displayName="FormFieldLayout",Ga.componentId="FormFieldLayout",Ga.propTypes=vq,Ga.allowedProps=Sq,Ga.defaultProps={inline:!1,layout:"stacked",as:"label",labelAlign:"end"},Ga))||_m)||_m);const kq={label:f.node.isRequired,id:f.string.isRequired,messages:f.arrayOf(cs.message),messagesId:f.string,children:f.node,inline:f.bool,layout:f.oneOf(["stacked","inline"]),labelAlign:f.oneOf(["start","end"]),vAlign:f.oneOf(["top","middle","bottom"]),width:f.string,inputContainerRef:f.func,elementRef:f.func},xq=["label","id","messages","messagesId","children","inline","layout","labelAlign","vAlign","width","inputContainerRef","elementRef"];class ka extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement($0,Object.assign({},Re(this.props,ka.allowedProps),us(this.props,$0.allowedProps),{label:this.props.label,vAlign:this.props.vAlign,as:"label",htmlFor:this.props.id,elementRef:this.handleRef}))}}ka.displayName="FormField";ka.componentId="FormField";ka.propTypes=kq;ka.allowedProps=xq;ka.defaultProps={inline:!1,layout:"stacked",labelAlign:"end",vAlign:"middle"};const _q=(t,e,n)=>{const i=e.disabled,r=n.invalid;return{formFieldGroup:{label:"formFieldGroup",border:`${t.borderWidth} ${t.borderStyle} ${t.borderColor}`,borderRadius:t.borderRadius,display:"block",...r&&{borderColor:t.errorBorderColor,padding:t.errorFieldsPadding},...i&&{opacity:.6,cursor:"not-allowed",pointerEvents:"none"}}}},Eq=t=>{const e=t.borders,n=t.colors,i=t.spacing;return{...{borderWidth:e==null?void 0:e.widthSmall,borderStyle:e==null?void 0:e.style,borderColor:"transparent",borderRadius:e==null?void 0:e.radiusMedium,errorBorderColor:n==null?void 0:n.borderDanger,errorFieldsPadding:i==null?void 0:i.xSmall}}},Cq={description:f.node.isRequired,as:f.elementType,messages:f.arrayOf(cs.message),messagesId:f.string,disabled:f.bool,children:f.node,layout:f.oneOf(["stacked","columns","inline"]),rowSpacing:f.oneOf(["none","small","medium","large"]),colSpacing:f.oneOf(["none","small","medium","large"]),vAlign:f.oneOf(["top","middle","bottom"]),startAt:f.oneOf(["small","medium","large","x-large",null]),elementRef:f.func},Tq=["description","as","messages","messagesId","disabled","children","layout","rowSpacing","colSpacing","vAlign","startAt","elementRef"],Pq=["styles","makeStyles"];var OT,bT,Ka;let Zv=(OT=de(_q,Eq),OT(bT=(Ka=class FM extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.makeStylesVariables)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.makeStylesVariables)}get makeStylesVariables(){return{invalid:this.invalid}}get invalid(){return!!this.props.messages&&this.props.messages.findIndex(e=>e.type==="error")>=0}renderColumns(){return T.Children.map(this.props.children,(e,n)=>e?C(qn.Col,{width:e.props&&e.props.width?"auto":void 0,key:n},e):null)}renderChildren(){return C(qn,{colSpacing:this.props.colSpacing,rowSpacing:this.props.rowSpacing,vAlign:this.props.vAlign,startAt:this.props.startAt||(this.props.layout==="columns"?"medium":null)},C(qn.Row,null,this.renderColumns()))}renderFields(){const e=this.props.styles;return C("span",{key:"fields",css:e==null?void 0:e.formFieldGroup},this.renderChildren())}render(){const e=this.props;e.styles,e.makeStyles;const n=Ie(e,Pq);return C($0,Object.assign({},Re(n,FM.allowedProps),us(n,$0.allowedProps),{vAlign:n.vAlign,layout:n.layout==="inline"?"inline":"stacked",label:n.description,"aria-disabled":n.disabled?"true":void 0,"aria-invalid":this.invalid?"true":void 0,elementRef:this.handleRef}),this.renderFields())}},Ka.displayName="FormFieldGroup",Ka.componentId="FormFieldGroup",Ka.propTypes=Cq,Ka.allowedProps=Tq,Ka.defaultProps={as:"fieldset",disabled:!1,rowSpacing:"medium",colSpacing:"small",vAlign:"middle"},Ka))||bT);const Aq=(t,e)=>{const n=e.size,i=e.checked,r=e.focused,o=e.hovered,s=e.indeterminate,a=i||s,l={small:{label:{fontSize:t.labelFontSizeSmall},facade:{fontSize:t.iconSizeSmall,width:t.facadeSizeSmall,height:t.facadeSizeSmall}},medium:{label:{fontSize:t.labelFontSizeMedium},facade:{fontSize:t.iconSizeMedium,width:t.facadeSizeMedium,height:t.facadeSizeMedium}},large:{label:{fontSize:t.labelFontSizeLarge},facade:{fontSize:t.iconSizeLarge,width:t.facadeSizeLarge,height:t.facadeSizeLarge}}};return{checkboxFacade:{label:"checkboxFacade",display:"flex",alignItems:"flex-start"},facade:{label:"checkboxFacade__facade",color:t.color,background:t.background,position:"relative",display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",flexShrink:0,transition:"all 0.2s",border:`${t.borderWidth} solid ${t.borderColor}`,borderRadius:t.borderRadius,marginInlineEnd:t.marginRight,marginInlineStart:"0",padding:t.padding,...l[n].facade,"&::before":{content:'""',position:"absolute",top:"-0.3125rem",bottom:"-0.3125rem",left:"-0.3125rem",right:"-0.3125rem",boxSizing:"border-box",borderRadius:`calc(${t.borderRadius} * 1.5)`,border:`${t.focusBorderWidth} ${t.focusBorderStyle} ${t.focusBorderColor}`,transition:"all 0.2s",transform:"scale(0.75)",opacity:0,pointerEvents:"none",...r&&{transform:"scale(1)",opacity:1}},...a&&{background:t.checkedBackground,borderColor:t.checkedBorderColor},...o&&{borderColor:t.hoverBorderColor}},label:{label:"checkboxFacade__label",flex:"1 1 auto",minWidth:"0.0625rem",color:t.labelColor,fontFamily:t.labelFontFamily,fontWeight:t.labelFontWeight,lineHeight:t.labelLineHeight,...l[n].label,...a&&{color:t.checkedLabelColor}}}},Rq=t=>{const e=t.colors,n=t.borders,i=t.spacing,r=t.typography,o=t.key,s={canvas:{focusBorderColor:t["ic-brand-primary"],labelColor:t["ic-brand-font-color-dark"],checkedLabelColor:t["ic-brand-font-color-dark"],checkedBackground:t["ic-brand-font-color-dark"],checkedBorderColor:t["ic-brand-font-color-dark"],hoverBorderColor:t["ic-brand-font-color-dark"]}};return{...{color:e==null?void 0:e.textLightest,borderWidth:n==null?void 0:n.widthSmall,borderColor:e==null?void 0:e.borderMedium,borderRadius:n==null?void 0:n.radiusMedium,background:e==null?void 0:e.backgroundLightest,marginRight:i==null?void 0:i.xSmall,padding:i==null?void 0:i.xxxSmall,checkedBackground:e==null?void 0:e.backgroundDarkest,checkedBorderColor:e==null?void 0:e.borderDarkest,hoverBorderColor:e==null?void 0:e.borderDarkest,focusBorderColor:e==null?void 0:e.borderBrand,focusBorderWidth:n==null?void 0:n.widthMedium,focusBorderStyle:n==null?void 0:n.style,labelColor:e==null?void 0:e.textDarkest,checkedLabelColor:e==null?void 0:e.textDarkest,labelFontFamily:r==null?void 0:r.fontFamily,labelFontWeight:r==null?void 0:r.fontWeightNormal,labelLineHeight:r==null?void 0:r.lineHeightCondensed,facadeSizeSmall:"1rem",facadeSizeMedium:"1.25rem",facadeSizeLarge:"1.75rem",labelFontSizeSmall:r==null?void 0:r.fontSizeSmall,labelFontSizeMedium:r==null?void 0:r.fontSizeMedium,labelFontSizeLarge:r==null?void 0:r.fontSizeLarge,iconSizeSmall:"0.625rem",iconSizeMedium:"0.75rem",iconSizeLarge:"1rem"},...s[o]}},Iq={children:f.node.isRequired,checked:f.bool,focused:f.bool,hovered:f.bool,size:f.oneOf(["small","medium","large"]),indeterminate:f.bool},$q=["children","checked","focused","hovered","size","indeterminate"];var yT,vT,Ja,ST,wT;let Lq=(yT=de(Aq,Rq),yT(vT=(Ja=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{this.ref=n}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}renderIcon(){return this.props.indeterminate?ST||(ST=C(se,{viewBox:"0 0 1920 1920",inline:!1},C("rect",{x:"140",y:"820",width:"1640",height:"280"}))):this.props.checked?wT||(wT=C(Eu,{inline:!1})):null}render(){const e=this.props,n=e.children,i=e.styles;return C("span",{css:i==null?void 0:i.checkboxFacade,ref:this.handleRef},C("span",{css:i==null?void 0:i.facade,"aria-hidden":"true"},this.renderIcon()),C("span",{css:i==null?void 0:i.label},n))}},Ja.displayName="CheckboxFacade",Ja.componentId="CheckboxFacade",Ja.propTypes=Iq,Ja.allowedProps=$q,Ja.defaultProps={checked:!1,focused:!1,hovered:!1,size:"medium",indeterminate:!1},Ja))||vT);const Nq=(t,e)=>{const n=e.size,i=e.checked,r=e.focused,o=e.labelPlacement,s={start:{facade:{marginInlineEnd:"0",marginInlineStart:t.marginStart},label:{textAlign:"end"}},end:{facade:{marginInlineEnd:t.marginEnd,marginInlineStart:"0"},label:{}},top:{facade:{marginTop:t.marginVertical},label:{display:"block"}}},a={small:{fontSize:t.labelFontSizeSmall},medium:{fontSize:t.labelFontSizeMedium},large:{fontSize:t.labelFontSizeLarge}};return{toggleFacade:{label:"toggleFacade",display:"flex",alignItems:"center",...o==="top"&&{display:"block"}},facade:{label:"toggleFacade__facade",background:t.background,borderColor:t.borderColor,cursor:"pointer",display:"inline-block",userSelect:"none",position:"relative",borderRadius:"3rem",verticalAlign:"middle",boxShadow:`inset 0 0 0 ${t.borderWidth} ${t.borderColor}`,height:t.toggleSize,width:`calc(${t.toggleSize} * 1.5)`,...s[o].facade,...i&&{background:t.checkedBackground,boxShadow:"none"},"&::before":{content:'""',position:"absolute",top:"-0.25rem",left:"-0.25rem",width:"calc(100% + 0.5rem)",height:"calc(100% + 0.5rem)",boxSizing:"border-box",borderRadius:t.borderRadius,border:`${t.focusBorderWidth} ${t.focusBorderStyle} ${t.focusOutlineColor}`,transition:"all 0.2s",transform:"scale(0.75)",opacity:0,pointerEvents:"none",...r&&{transform:"scale(1)",opacity:1}}},icon:{label:"toggleFacade__icon",display:"block",textAlign:"center",position:"absolute",top:"0",insetInlineStart:"0",insetInlineEnd:"auto",transition:"all 0.2s",transform:"translate3d(0, 0, 0)",fontSize:"0.875rem",height:t.toggleSize,width:t.toggleSize,...i&&{transform:"translate3d(50%, 0, 0)",'[dir="rtl"] &':{transform:"translate3d(-50%, 0, 0)"}}},iconToggle:{label:"toggleFacade__iconToggle",position:"relative",height:"100%",width:"100%",display:"flex",alignItems:"center",justifyContent:"center","&::before":{content:'""',position:"absolute",top:t.borderWidth,left:t.borderWidth,height:`calc(100% - (${t.borderWidth} * 2))`,width:`calc(100% - (${t.borderWidth} * 2))`,background:t.toggleBackground,boxShadow:t.toggleShadow,borderRadius:"100%"}},iconSVG:{label:"toggleFacade__iconSVG",display:"block",color:t.uncheckedIconColor,position:"relative",zIndex:1,...i&&{color:t.checkedIconColor}},label:{label:"toggleFacade__label",flex:1,minWidth:"0.0625rem",color:t.labelColor,fontFamily:t.labelFontFamily,fontWeight:t.labelFontWeight,lineHeight:t.labelLineHeight,...a[n],...s[o].label}}},Mq=t=>{const e=t.colors,n=t.borders,i=t.forms,r=t.shadows,o=t.spacing,s=t.typography,a=t.key,l={canvas:{focusOutlineColor:t["ic-brand-primary"],labelColor:t["ic-brand-font-color-dark"]},"canvas-high-contrast":{background:e==null?void 0:e.backgroundDarkest,borderColor:e==null?void 0:e.borderDarkest}};return{...{color:e==null?void 0:e.textLightest,background:e==null?void 0:e.backgroundLight,borderColor:e==null?void 0:e.borderMedium,borderWidth:n==null?void 0:n.widthSmall,borderRadius:"4rem",marginEnd:o==null?void 0:o.small,marginStart:o==null?void 0:o.small,marginVertical:o==null?void 0:o.xSmall,checkedBackground:e==null?void 0:e.backgroundSuccess,uncheckedIconColor:e==null?void 0:e.textDarkest,checkedIconColor:e==null?void 0:e.textSuccess,focusOutlineColor:e==null?void 0:e.borderBrand,focusBorderWidth:n==null?void 0:n.widthMedium,focusBorderStyle:n==null?void 0:n.style,toggleBackground:e==null?void 0:e.backgroundLightest,toggleShadow:r==null?void 0:r.depth1,toggleSize:i==null?void 0:i.inputHeightSmall,labelColor:e==null?void 0:e.textDarkest,labelFontFamily:s==null?void 0:s.fontFamily,labelFontWeight:s==null?void 0:s.fontWeightNormal,labelLineHeight:s==null?void 0:s.lineHeightCondensed,labelFontSizeSmall:s==null?void 0:s.fontSizeSmall,labelFontSizeMedium:s==null?void 0:s.fontSizeMedium,labelFontSizeLarge:s==null?void 0:s.fontSizeLarge},...l[a]}},Dq={children:f.node.isRequired,checked:f.bool,disabled:f.bool,readOnly:f.bool,focused:f.bool,size:f.oneOf(["small","medium","large"]),labelPlacement:f.oneOf(["top","start","end"])},Bq=["children","checked","disabled","readOnly","focused","size","labelPlacement"];var kT,xT,el;let Qq=(kT=de(Nq,Mq),kT(xT=(el=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{this.ref=n}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}renderIcon(){const e=this.props,n=e.styles;return e.checked?C(Cu,{css:n==null?void 0:n.iconSVG}):C(Tu,{css:n==null?void 0:n.iconSVG})}renderLabel(){const e=this.props,n=e.children,i=e.styles;return C("span",{css:i==null?void 0:i.label},n)}render(){const e=this.props,n=e.labelPlacement,i=e.styles;return C("span",{css:i==null?void 0:i.toggleFacade,ref:this.handleRef},(n==="top"||n==="start")&&this.renderLabel(),C("span",{css:i==null?void 0:i.facade,"aria-hidden":"true"},C("span",{css:i==null?void 0:i.icon},C("span",{css:i==null?void 0:i.iconToggle},this.renderIcon()))),n==="end"&&this.renderLabel())}},el.displayName="ToggleFacade",el.componentId="ToggleFacade",el.propTypes=Dq,el.allowedProps=Bq,el.defaultProps={checked:!1,focused:!1,size:"medium",disabled:!1,readOnly:!1,labelPlacement:"end"},el))||xT);const Fq=(t,e)=>{const n=e.inline;return{checkbox:{label:"checkbox",position:"relative",width:"100%",...e.disabled&&{cursor:"not-allowed",pointerEvents:"none",opacity:.5},...n&&{display:"inline-block",verticalAlign:"middle",width:"auto"}},input:{label:"checkbox__input",padding:0,margin:0,fontSize:"inherit",lineHeight:"inherit",width:"auto",position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",opacity:1e-4},control:{label:"checkbox__control",all:"initial",display:"block",direction:"inherit",textAlign:"start"}}},zq={label:f.node.isRequired,id:f.string,value:f.oneOfType([f.string,f.number]),messages:f.arrayOf(cs.message),defaultChecked:f.bool,checked:yu(f.bool,"onChange","defaultChecked"),onChange:f.func,onKeyDown:f.func,onFocus:f.func,onBlur:f.func,onMouseOver:f.func,onMouseOut:f.func,disabled:f.bool,readOnly:f.bool,indeterminate:f.bool,size:f.oneOf(["small","medium","large"]),variant:f.oneOf(["simple","toggle"]),inline:f.bool,labelPlacement:f.oneOf(["top","start","end"])},Hq=["label","id","value","messages","defaultChecked","checked","onChange","onKeyDown","onFocus","onBlur","onMouseOver","onMouseOut","disabled","readOnly","indeterminate","size","variant","inline","labelPlacement"];var _T,ET,CT,Ju,tl;let Uq=(_T=zt(),ET=de(Fq,null),CT=Le(),_T(Ju=ET(Ju=CT(Ju=(tl=class zM extends T.Component{constructor(e){super(e),this._defaultId=void 0,this._input=null,this.ref=null,this.handleRef=n=>{this.ref=n},this.handleChange=n=>{const i=this.props,r=i.onChange,o=i.disabled,s=i.checked,a=i.readOnly;if(o||a){n.preventDefault();return}typeof s>"u"&&this.setState({checked:!this.state.checked}),typeof r=="function"&&r(n)},this.handleKeyDown=n=>{this.props.variant==="toggle"&&n.keyCode===lr.codes.enter&&(this._input&&this._input.click(),n.preventDefault())},this.handleFocus=()=>{this.setState({focused:!0})},this.handleBlur=()=>{this.setState({focused:!1})},this.handleMouseOver=()=>{!this.props.disabled&&this.setState({hovered:!0})},this.handleMouseOut=()=>{this.setState({hovered:!1})},this.state={focused:!1,hovered:!1,checked:typeof e.checked>"u"?!!e.defaultChecked:void 0},typeof e.checked>"u"&&(this.state.checked=!!e.defaultChecked),this._defaultId=e.deterministicId()}componentDidMount(){var e,n;this._input&&(this._input.indeterminate=this.props.indeterminate),(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(e){var n,i;e.indeterminate!==this.props.indeterminate&&this._input&&(this._input.indeterminate=this.props.indeterminate||!1),(n=(i=this.props).makeStyles)===null||n===void 0||n.call(i)}get id(){return this.props.id||this._defaultId}get checked(){return typeof this.props.checked>"u"?this.state.checked:this.props.checked}get focused(){return xo(this._input)}focus(){this._input&&this._input.focus()}renderFacade(){const e=this.props,n=e.size,i=e.disabled,r=e.variant,o=e.label,s=e.readOnly,a=e.indeterminate,l=e.labelPlacement,u=e.themeOverride,c=this.state,d=c.hovered,h=c.focused;return Ye(!(r==="simple"&&l!=="end"),"[Checkbox] The `simple` variant does not support the `labelPlacement` property. Use the `toggle` variant instead."),r==="toggle"?C(Qq,{disabled:i,size:n,focused:h,checked:this.checked,readOnly:s,labelPlacement:l,themeOverride:u},o):C(Lq,{size:n,hovered:d,focused:h,checked:this.checked,indeterminate:a,themeOverride:u},o)}renderMessages(){const e=this.props.messages;return e&&e.length>0?C(ye,{display:"block",margin:"small 0 0"},C(jv,{messages:e})):null}render(){const e=this.props,n=e.disabled,i=e.readOnly,r=e.value,o=e.onKeyDown,s=e.onFocus,a=e.onBlur,l=e.onMouseOver,u=e.onMouseOut,c=e.indeterminate,d=e.variant,h=e.styles,p=Re(this.props,zM.allowedProps);return Ye(!(d==="toggle"&&c),"[Checkbox] The `toggle` variant does not support the `indeterminate` property. Use the `simple` variant instead."),C("div",{css:h==null?void 0:h.checkbox,onMouseOver:lt(l,this.handleMouseOver),onMouseOut:lt(u,this.handleMouseOut),ref:this.handleRef},C("input",Object.assign({},p,{id:this.id,value:r,type:"checkbox",ref:m=>{this._input=m},disabled:n||i,"aria-checked":c?"mixed":void 0,css:h==null?void 0:h.input,onChange:this.handleChange,onKeyDown:lt(o,this.handleKeyDown),onFocus:lt(s,this.handleFocus),onBlur:lt(a,this.handleBlur),checked:this.checked})),C("label",{htmlFor:this.id,css:h==null?void 0:h.control},this.renderFacade(),this.renderMessages()))}},tl.displayName="Checkbox",tl.componentId="Checkbox",tl.propTypes=zq,tl.allowedProps=Hq,tl.defaultProps={size:"medium",variant:"simple",disabled:!1,inline:!1,indeterminate:!1,readOnly:!1,labelPlacement:"end"},tl))||Ju)||Ju)||Ju);const Wq="modulepreload",Vq=function(t){return"/"+t},TT={},jq=function(e,n,i){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),s=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));r=Promise.all(n.map(a=>{if(a=Vq(a),a in TT)return;TT[a]=!0;const l=a.endsWith(".css"),u=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${u}`))return;const c=document.createElement("link");if(c.rel=l?"stylesheet":Wq,l||(c.as="script",c.crossOrigin=""),c.href=a,s&&c.setAttribute("nonce",s),document.head.appendChild(c),l)return new Promise((d,h)=>{c.addEventListener("load",d),c.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${a}`)))})}))}return r.then(()=>e()).catch(o=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=o,window.dispatchEvent(s),!s.defaultPrevented)throw o})},Xq=(t,e,n)=>{const i=e.size,r=e.textAlign,o=e.shouldNotWrap,s=n.disabled,a=n.invalid,l=n.focused,u=n.beforeElementHasWidth,c=n.afterElementHasWidth,d={small:{fontSize:t.smallFontSize,height:`calc(${t.smallHeight} - (2 * ${t.borderWidth}))`,lineHeight:`calc(${t.smallHeight} - (2 * ${t.borderWidth}))`},medium:{fontSize:t.mediumFontSize,height:`calc(${t.mediumHeight} - (2 * ${t.borderWidth}))`,lineHeight:`calc(${t.mediumHeight} - (2 * ${t.borderWidth}))`},large:{fontSize:t.largeFontSize,height:`calc(${t.largeHeight} - (2 * ${t.borderWidth}))`,lineHeight:`calc(${t.largeHeight} - (2 * ${t.borderWidth}))`}},h=s?{cursor:"not-allowed",pointerEvents:"none",opacity:"0.5"}:{},p=l?{opacity:1,transform:"scale(1)"}:{opacity:0,transform:"scale(0.95)"},m=a?{borderColor:t.errorBorderColor}:{},O=a&&l?{borderColor:t.errorBorderColor}:{},y={all:"initial","&::-ms-clear":{display:"none"},WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",appearance:"none",margin:0,width:"100%",display:"block",boxSizing:"border-box",outline:"none",fontFamily:t.fontFamily,fontWeight:t.fontWeight,color:t.color,padding:`0 ${t.padding}`,background:"transparent",border:"none",verticalAlign:"baseline",'&[autocomplete="off"]::-webkit-contacts-auto-fill-button':{display:"none !important"},"&:focus":{boxShadow:"initial"},"&::placeholder":{color:t.placeholderColor},...d[i],textAlign:r},b={boxSizing:"border-box",fontFamily:t.fontFamily,maxWidth:"100%",overflow:"visible",unicodeBidi:"isolate"},v={...b,display:"flex",alignItems:"center",justifyContent:"flex-start",flexDirection:"row"},S={...b,flexShrink:0};return{textInput:{label:"textInput",...y,"&:is(input)[type]":y,"&:-webkit-any(input)[type]":y},facade:{label:"textInput__facade",position:"relative",display:"block",boxSizing:"border-box",border:`${t.borderWidth} ${t.borderStyle} ${t.borderColor}`,borderRadius:t.borderRadius,background:t.background,color:t.color,"&::before":{content:'""',pointerEvents:"none",position:"absolute",display:"block",boxSizing:"border-box",top:"-0.25rem",bottom:"-0.25rem",left:"-0.25rem",right:"-0.25rem",border:`${t.focusOutlineWidth} ${t.focusOutlineStyle} ${t.focusOutlineColor}`,borderRadius:`calc(${t.borderRadius} * 1.5)`,transition:"all 0.2s",...p,...O},...h,...m},layout:{label:"textInput__layout",...v,...!o&&{flexWrap:"wrap"}},beforeElement:{label:"textInput__beforeElement",...S,paddingInlineStart:t.padding,...u===!1&&{paddingInlineStart:0}},innerWrapper:{label:"textInput__innerWrapper",...S,minWidth:"0.0625rem",flexShrink:1,flexGrow:1},inputLayout:{label:"textInput__inputLayout",...v},afterElement:{label:"textInput__afterElement",...S,paddingInlineEnd:t.padding,...c===!1&&{paddingInlineEnd:0}}}},Zq=t=>{const e=t.colors,n=t.typography,i=t.borders,r=t.spacing,o=t.forms,s=t.key,a={canvas:{color:t["ic-brand-font-color-dark"],focusOutlineColor:t["ic-brand-primary"]}};return{...{fontFamily:n==null?void 0:n.fontFamily,fontWeight:n==null?void 0:n.fontWeightNormal,borderWidth:i==null?void 0:i.widthSmall,borderStyle:i==null?void 0:i.style,borderColor:e==null?void 0:e.borderMedium,borderRadius:i==null?void 0:i.radiusMedium,color:e==null?void 0:e.textDarkest,background:e==null?void 0:e.backgroundLightest,padding:r==null?void 0:r.small,focusOutlineWidth:i==null?void 0:i.widthMedium,focusOutlineStyle:i==null?void 0:i.style,focusOutlineColor:e==null?void 0:e.borderBrand,errorBorderColor:e==null?void 0:e.borderDanger,errorOutlineColor:e==null?void 0:e.borderDanger,placeholderColor:e==null?void 0:e.textDark,smallFontSize:n==null?void 0:n.fontSizeSmall,smallHeight:o==null?void 0:o.inputHeightSmall,mediumFontSize:n==null?void 0:n.fontSizeMedium,mediumHeight:o==null?void 0:o.inputHeightMedium,largeFontSize:n==null?void 0:n.fontSizeLarge,largeHeight:o==null?void 0:o.inputHeightLarge},...a[s]}},qq={renderLabel:f.oneOfType([f.node,f.func]),type:f.oneOf(["text","email","url","tel","search","password"]),id:f.string,value:yu(f.string),defaultValue:f.string,interaction:f.oneOf(["enabled","disabled","readonly"]),messages:f.arrayOf(cs.message),size:f.oneOf(["small","medium","large"]),textAlign:f.oneOf(["start","center"]),width:f.string,htmlSize:f.number,display:f.oneOf(["inline-block","block"]),shouldNotWrap:f.bool,placeholder:f.string,isRequired:f.bool,elementRef:f.func,inputRef:f.func,inputContainerRef:f.func,renderBeforeInput:f.oneOfType([f.node,f.func]),renderAfterInput:f.oneOfType([f.node,f.func]),onChange:f.func,onBlur:f.func,onFocus:f.func},Yq=["renderLabel","type","id","value","defaultValue","interaction","messages","size","textAlign","width","htmlSize","display","shouldNotWrap","placeholder","isRequired","elementRef","inputRef","inputContainerRef","renderBeforeInput","renderAfterInput","onChange","onBlur","onFocus"],Gq=["type","size","htmlSize","display","textAlign","placeholder","value","defaultValue","isRequired","onFocus"];var PT,AT,RT,ec,nl;let Yk=(PT=zt(),AT=de(Xq,Zq),RT=Le(),PT(ec=AT(ec=RT(ec=(nl=class extends T.Component{constructor(e){super(e),this.ref=null,this._input=null,this._beforeElement=null,this._afterElement=null,this._defaultId=void 0,this._messagesId=void 0,this._focusListener=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.makeStyleProps=()=>{const n=this.interaction,i=this.state,r=i.hasFocus,o=i.beforeElementHasWidth,s=i.afterElementHasWidth;return{disabled:n==="disabled",invalid:this.invalid,focused:r,beforeElementHasWidth:o,afterElementHasWidth:s}},this.handleInputRef=n=>{this._input=n,typeof this.props.inputRef=="function"&&this.props.inputRef(n)},this.handleChange=n=>{typeof this.props.onChange=="function"&&this.props.onChange(n,n.target.value)},this.handleBlur=n=>{typeof this.props.onBlur=="function"&&this.props.onBlur(n),this.setState({hasFocus:!1})},this.handleFocus=n=>{typeof this.props.onFocus=="function"&&this.props.onFocus(n),this.setState({hasFocus:!0})},this.state={hasFocus:!1,beforeElementHasWidth:void 0,afterElementHasWidth:void 0},this._defaultId=e.deterministicId(),this._messagesId=e.deterministicId("TextInput-messages")}componentDidMount(){var e,n;this._input&&(this._focusListener=Cr(this._input,"focus",this.handleFocus),this.setState({beforeElementHasWidth:this.getElementHasWidth(this._beforeElement),afterElementHasWidth:this.getElementHasWidth(this._afterElement)})),(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.makeStyleProps())}componentWillUnmount(){this._focusListener&&this._focusListener.remove()}componentDidUpdate(e){var n,i;e.renderBeforeInput!==this.props.renderBeforeInput&&this.setState({beforeElementHasWidth:this.getElementHasWidth(this._beforeElement)}),e.renderAfterInput!==this.props.renderAfterInput&&this.setState({afterElementHasWidth:this.getElementHasWidth(this._afterElement)}),Yo({props:e})!=="disabled"&&Yo({props:this.props})==="disabled"&&this.setState({hasFocus:!1}),(n=(i=this.props).makeStyles)===null||n===void 0||n.call(i,this.makeStyleProps())}focus(){var e;(e=this._input)===null||e===void 0||e.focus()}get interaction(){return Yo({props:this.props})}get hasMessages(){return!!this.props.messages&&this.props.messages.length>0}get invalid(){return!!this.props.messages&&this.props.messages.findIndex(e=>e.type==="error")>=0}get focused(){return xo(this._input)}get value(){var e;return(e=this._input)===null||e===void 0?void 0:e.value}get id(){return this.props.id||this._defaultId}renderInput(){var e;const n=this.props,i=n.type;n.size;const r=n.htmlSize;n.display,n.textAlign;const o=n.placeholder,s=n.value,a=n.defaultValue,l=n.isRequired;n.onFocus;const u=Ie(n,Gq),c=It(u),d=this.interaction;let h="";return c["aria-describedby"]&&(h=`${c["aria-describedby"]}`),this.hasMessages&&(h=h!==""?`${h} ${this._messagesId}`:this._messagesId),C("input",Object.assign({},c,{css:(e=this.props.styles)===null||e===void 0?void 0:e.textInput,defaultValue:a,value:s,placeholder:o,ref:this.handleInputRef,type:i,id:this.id,required:l,"aria-invalid":this.invalid?"true":void 0,disabled:d==="disabled",readOnly:d==="readonly","aria-describedby":h!==""?h:void 0,size:r,onChange:this.handleChange,onBlur:this.handleBlur}))}getElementHasWidth(e){if(!e)return;const n=getComputedStyle(e),i=n.width,r=n.paddingInlineStart,o=n.paddingInlineEnd;return i==="auto"||i===""?!0:parseFloat(i)-parseFloat(r)-parseFloat(o)>0}render(){const e=this.props,n=e.width,i=e.display,r=e.renderLabel,o=e.renderBeforeInput,s=e.renderAfterInput,a=e.messages,l=e.inputContainerRef,u=e.styles,c=o?rt(o):null,d=s?rt(s):null,h=!!c||!!d;return C(ka,{id:this.id,label:rt(r),messagesId:this._messagesId,messages:a,inline:i==="inline-block",width:n,inputContainerRef:l,layout:this.props.layout,elementRef:this.handleRef},C("span",{css:u==null?void 0:u.facade},h?C("div",null,C("span",{css:u==null?void 0:u.layout},c&&C("span",{css:u==null?void 0:u.beforeElement,ref:p=>{this._beforeElement=p}},c),C("span",{css:u==null?void 0:u.innerWrapper},C("span",{css:u==null?void 0:u.inputLayout},C("span",{css:u==null?void 0:u.innerWrapper},this.renderInput()),d&&C("span",{css:u==null?void 0:u.afterElement,ref:p=>{this._afterElement=p}},d))))):this.renderInput()))}},nl.displayName="TextInput",nl.componentId="TextInput",nl.allowedProps=Yq,nl.propTypes=qq,nl.defaultProps={type:"text",interaction:void 0,isRequired:!1,display:"block",shouldNotWrap:!1,size:"medium",textAlign:"start",messages:[]},nl))||ec)||ec)||ec);const Kq=(t,e)=>{const n=e.size,i=e.wrap,r=e.weight,o=e.fontStyle,s=e.transform,a=e.lineHeight,l=e.letterSpacing,u=e.color,c={primary:{color:t.primaryColor},secondary:{color:t.secondaryColor},"primary-inverse":{color:t.primaryInverseColor},"secondary-inverse":{color:t.secondaryInverseColor},success:{color:t.successColor},brand:{color:t.brandColor},danger:{color:t.dangerColor},alert:{color:t.alertColor}},d={overflowWrap:"break-word",wordBreak:"break-word",hyphens:"auto"},h={normal:{fontWeight:t.fontWeightNormal},light:{fontWeight:t.fontWeightLight},bold:{fontWeight:t.fontWeightBold}},p={"x-small":t.fontSizeXSmall,small:t.fontSizeSmall,medium:t.fontSizeMedium,large:t.fontSizeLarge,"x-large":t.fontSizeXLarge,"xx-large":t.fontSizeXXLarge},m={default:{lineHeight:t.lineHeight},fit:{lineHeight:t.lineHeightFit},condensed:{lineHeight:t.lineHeightCondensed},double:{lineHeight:t.lineHeightDouble}},O={normal:t.letterSpacingNormal,condensed:t.letterSpacingCondensed,expanded:t.letterSpacingExpanded},y={"&:focus":{outline:"none"},...u?c[u]:{},...i==="break-word"?d:{},...r?h[r]:{},...o?{fontStyle:o}:{},fontSize:p[n],...a?m[a]:{},letterSpacing:O[l],...s?{textTransform:s}:{}},b={...y,outline:0,appearance:"none",boxSizing:"border-box",background:"none",border:"none",borderRadius:0,padding:0,margin:0,color:"inherit",height:"auto",width:"100%",lineHeight:"inherit",textAlign:"start",boxShadow:"none",display:"block"};return{text:{label:"text",fontFamily:t.fontFamily,...y,"&:is(input)[type]":b,"&:-webkit-any(input)[type]":b,"sub, sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sup:{top:"-0.4em"},sub:{bottom:"-0.4em"},"pre, code":{all:"initial",fontFamily:t.fontFamilyMonospace},"i, em":{fontStyle:"italic"},"b, strong":{fontWeight:t.fontWeightBold},p:{display:"block",padding:0,margin:t.paragraphMargin}}}},Jq=t=>{const e=t.colors,n=t.typography,i=t.spacing,r=t.key,o={canvas:{primaryColor:t["ic-brand-font-color-dark"],brandColor:t["ic-brand-primary"]}};return{...{...n,primaryInverseColor:e==null?void 0:e.textLightest,primaryColor:e==null?void 0:e.textDarkest,secondaryColor:e==null?void 0:e.textDark,secondaryInverseColor:e==null?void 0:e.textLight,brandColor:e==null?void 0:e.textBrand,dangerColor:e==null?void 0:e.textDanger,successColor:e==null?void 0:e.textSuccess,alertColor:e==null?void 0:e.textAlert,warningColor:e==null?void 0:e.textWarning,paragraphMargin:`${i.medium} 0`},...o[r]}},eY={as:f.elementType,children:f.node,color:f.oneOf(["primary","secondary","brand","success","danger","alert","primary-inverse","secondary-inverse"]),elementRef:f.func,fontStyle:f.oneOf(["italic","normal"]),letterSpacing:f.oneOf(["normal","condensed","expanded"]),lineHeight:f.oneOf(["default","fit","condensed","double"]),size:f.oneOf(["x-small","small","medium","large","x-large","xx-large"]),transform:f.oneOf(["none","capitalize","uppercase","lowercase"]),weight:f.oneOf(["normal","light","bold"]),wrap:f.oneOf(["normal","break-word"])},tY=["as","children","color","elementRef","fontStyle","letterSpacing","lineHeight","size","transform","weight","wrap"];var IT,$T,il;let Wt=(IT=de(Kq,Jq),IT($T=(il=class HM extends T.Component{componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){var e;const n=this.props.children,i=oi(HM,this.props);return C(i,Object.assign({},It(this.props),{css:(e=this.props.styles)===null||e===void 0?void 0:e.text,ref:this.props.elementRef}),n)}},il.displayName="Text",il.componentId="Text",il.allowedProps=tY,il.propTypes=eY,il.defaultProps={as:"span",wrap:"normal",size:"medium",letterSpacing:"normal",children:null},il))||$T);const nY=t=>({options:{label:"options",boxSizing:"border-box",wordWrap:"break-word"},list:{label:"options__list",listStyleType:"none",position:"relative"},label:{label:"options__label",color:t.labelColor,cursor:"default",display:"block",fontWeight:t.labelFontWeight,padding:t.nestedLabelPadding}}),UM=t=>{const e=t.colors,n=t.typography,i=t.spacing;return{...{labelFontWeight:n==null?void 0:n.fontWeightBold,background:e==null?void 0:e.backgroundLightest,labelColor:e==null?void 0:e.textDarkest,labelPadding:`${i==null?void 0:i.xSmall} 0`,nestedLabelPadding:`${i==null?void 0:i.xSmall} ${i==null?void 0:i.small}`}}},iY=(t,e)=>{const n=e.variant,i=e.children,r=e.renderBeforeLabel,o=e.renderAfterLabel,s=e.beforeLabelContentVAlign,a=e.afterLabelContentVAlign,l=Me(i,["Options"]),u={highlighted:{background:t.highlightedBackground,color:t.highlightedLabelColor},selected:{background:t.selectedBackground,color:t.highlightedLabelColor},disabled:{cursor:"not-allowed",opacity:.5},"highlighted-disabled":{background:t.highlightedBackground,color:t.highlightedLabelColor,cursor:"not-allowed",opacity:.5},default:{}},c=p=>{const m=p==="before"?s:a,O=p==="before"?t.beforeLabelContentVOffset:t.afterLabelContentVOffset;return{start:{alignItems:"flex-start",paddingBlockStart:O},center:{alignItems:"center",paddingBlockStart:O,paddingBlockEnd:O},end:{alignItems:"flex-end",paddingBlockEnd:O}}[m]},d={textDecoration:"none",color:"currentColor"},h="background 200ms";return{item:{label:"optionItem",background:t.background,color:t.color,cursor:"pointer",display:"block",fontSize:t.fontSize,fontFamily:t.fontFamily,fontWeight:t.fontWeight,lineHeight:t.lineHeight,outline:"none",position:"relative",transition:h,userSelect:"none",...u[n],...l&&{cursor:"default"},"[class*=-optionItem] &":{...!r&&{"[class$=-optionItem__container]":{paddingInlineStart:t.nestedPadding},"[class$=-optionItem__content--before]":{insetInlineStart:t.nestedPadding}}}},container:{label:"optionItem__container",display:"block",outline:"none",padding:t.padding,...l&&{padding:"0"},...r&&{paddingInlineEnd:t.iconPadding,paddingInlineStart:`calc(${t.iconPadding} * 2 + 1em)`},...o&&{paddingInlineEnd:`calc(${t.iconPadding} * 2 + 1em)`,paddingInlineStart:t.iconPadding},...r&&o&&{paddingInlineEnd:`calc(${t.iconPadding} * 2 + 1em)`,paddingInlineStart:`calc(${t.iconPadding} * 2 + 1em)`},"&:is(a)":{"&, &:link, &:visited, &:active, &:hover, &:focus":d},"&:-webkit-any(a)":{"&, &:link, &:visited, &:active, &:hover, &:focus":d}},content:{label:"optionItem__content",display:"flex",height:"100%",boxSizing:"border-box",pointerEvents:"none",position:"absolute",top:"0"},contentBefore:{label:"optionItem__content--before",insetInlineEnd:"auto",insetInlineStart:t.iconPadding,...c("before")},contentAfter:{label:"optionItem__content--after",insetInlineEnd:t.iconPadding,insetInlineStart:"auto",...c("after")},description:{label:"optionItem__description",display:"block",transition:h,paddingBlockStart:t.descriptionPaddingStart,fontWeight:t.descriptionFontWeight,fontSize:t.descriptionFontSize,lineHeight:t.descriptionLineHeight,color:t.descriptionColor,...u[n],background:"none"}}},WM=t=>{const e=t.colors,n=t.typography,i=t.spacing,r=t.key,o={canvas:{color:t["ic-brand-font-color-dark"],highlightedBackground:t["ic-brand-primary"]}};return{...{fontSize:n==null?void 0:n.fontSizeMedium,fontFamily:n==null?void 0:n.fontFamily,fontWeight:n==null?void 0:n.fontWeightNormal,lineHeight:n==null?void 0:n.lineHeightCondensed,color:e==null?void 0:e.textDarkest,background:e==null?void 0:e.backgroundLightest,highlightedLabelColor:e==null?void 0:e.textLightest,highlightedBackground:e==null?void 0:e.backgroundBrand,selectedLabelColor:e==null?void 0:e.textLightest,selectedBackground:e==null?void 0:e.backgroundDark,padding:`${i==null?void 0:i.xSmall} ${i==null?void 0:i.small}`,iconPadding:i==null?void 0:i.small,nestedPadding:i==null?void 0:i.small,beforeLabelContentVOffset:"0.625rem",afterLabelContentVOffset:"0.625rem",descriptionFontSize:n.fontSizeSmall,descriptionFontWeight:n.fontWeightNormal,descriptionLineHeight:n.lineHeight,descriptionPaddingStart:"0.25em",descriptionColor:e.textDark},...o[r]}},rY={as:f.elementType,variant:f.oneOf(["default","highlighted","selected","disabled","highlighted-disabled"]),role:f.string,renderBeforeLabel:f.oneOfType([f.node,f.func]),renderAfterLabel:f.oneOfType([f.node,f.func]),beforeLabelContentVAlign:f.oneOf(["start","center","end"]),afterLabelContentVAlign:f.oneOf(["start","center","end"]),description:f.oneOfType([f.node,f.func]),descriptionRole:f.string,href:f.string,voiceoverRoleBugWorkaround:f.bool,elementRef:f.func,children:f.oneOfType([f.node,f.func])},oY=["as","variant","role","renderBeforeLabel","renderAfterLabel","beforeLabelContentVAlign","afterLabelContentVAlign","description","descriptionRole","voiceoverRoleBugWorkaround","href","elementRef","children"];var LT,NT,MT,tc,rl;let DT=(LT=zt(),NT=de(iY,WM),MT=Le(),LT(tc=NT(tc=MT(tc=(rl=class qv extends T.Component{constructor(e){super(e),this.ref=null,this._descriptionId=void 0,this._descriptionId=e.deterministicId("OptionsItem-description")}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}renderContent(e,n){const i=this.props,r=i.styles,o=i.variant,s=i.as,a=i.role,l=i.children;return C("span",{css:[r==null?void 0:r.content,n],role:"presentation","aria-hidden":"true"},rt(e,{variant:o,as:s,role:a,children:l}))}render(){const e=this.props,n=e.as,i=e.href,r=e.role,o=e.styles,s=e.description,a=e.descriptionRole,l=e.renderBeforeLabel,u=e.renderAfterLabel,c=e.elementRef,d=e.children,h=e.voiceoverRoleBugWorkaround,p=oi(qv,this.props,()=>n),m=i?"a":"span",O=Re(this.props,qv.allowedProps),y=rt(d),b=rt(s),v=this.props["aria-describedby"]||(b?this._descriptionId:void 0);return C(p,{role:h?r:"none",css:o==null?void 0:o.item,ref:S=>{this.ref=S,typeof c=="function"&&c(S)},"aria-describedby":h?v:void 0},C(m,Object.assign({},O,{css:o==null?void 0:o.container,role:i||h?void 0:r,href:i,"aria-describedby":h?void 0:v}),y,b&&C("span",{css:o==null?void 0:o.description,role:a,id:this._descriptionId},b)),l&&this.renderContent(l,o==null?void 0:o.contentBefore),u&&this.renderContent(u,o==null?void 0:o.contentAfter))}},rl.displayName="Item",rl.componentId="Options.Item",rl.allowedProps=oY,rl.propTypes=rY,rl.defaultProps={as:"span",variant:"default",role:"listitem",voiceoverRoleBugWorkaround:!1,beforeLabelContentVAlign:"center",afterLabelContentVAlign:"center"},rl))||tc)||tc)||tc);const sY=t=>({separator:{label:"separator",height:t.height,margin:t.margin,overflow:"hidden",background:t.background}}),VM=t=>{const e=t.borders,n=t.colors,i=t.spacing;return{...{background:n==null?void 0:n.backgroundMedium,height:e==null?void 0:e.widthSmall,margin:`0 ${i==null?void 0:i.small}`}}},aY={as:f.elementType},lY=["as"],uY=["as","styles"];var BT,QT,ol;let cY=(BT=de(sY,VM),BT(QT=(ol=class jM extends T.Component{componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){const e=this.props,n=e.as,i=e.styles,r=Ie(e,uY),o=oi(jM,this.props,()=>n);return C(o,{role:"none"},C("div",Object.assign({},Re(r,["styles","makeStyles","themeOverride"]),{css:i==null?void 0:i.separator,role:"presentation"})))}},ol.displayName="Separator",ol.componentId="Options.Separator",ol.allowedProps=lY,ol.propTypes=aY,ol.defaultProps={as:"span"},ol))||QT);const dY={as:f.elementType,role:f.string,elementRef:f.func,renderLabel:f.oneOfType([f.node,f.func]),children:ft.oneOf(["Options","Item","Separator"])},hY=["as","role","elementRef","renderLabel","children"];var FT,zT,HT,nc,Do;let hi=(FT=zt(),zT=de(nY,UM),HT=Le(),FT(nc=zT(nc=HT(nc=(Do=class Yv extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{this.ref=n},this._labelId=this.props.deterministicId("Options-label")}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}get childAs(){const e=this.props.as;if(e==="ul"||e==="ol")return"li"}renderLabel(){const e=this.props,n=e.renderLabel,i=e.styles;return C("span",{id:this._labelId,role:"presentation","aria-hidden":"true",css:i==null?void 0:i.label},rt(n))}renderSubList(e){const n=this.props.styles;return C(DT,{as:this.childAs,role:"presentation",css:n==null?void 0:n.label},e)}renderChildren(){const e=this.props.children;return T.Children.map(e,n=>{if(Me(n,["Options"]))return this.renderSubList(n);if(Me(n,["Item","Separator"]))return $t(n,{as:this.childAs||n.props.as})})}get ariaLabelledby(){if(this.props.renderLabel)return this._labelId;if(this.props["aria-labelledby"])return this.props["aria-labelledby"]}render(){const e=ye.omitViewProps(Re(this.props,Yv.allowedProps),Yv),n=this.props,i=n.as,r=n.role,o=n.renderLabel,s=n.elementRef,a=n.styles;return C("div",{css:a==null?void 0:a.options,role:"presentation",ref:this.handleRef},o&&this.renderLabel(),C(ye,Object.assign({},e,{elementRef:s,css:a==null?void 0:a.list,as:i,role:r,display:"block",margin:"none",padding:"none",background:"primary","aria-labelledby":this.ariaLabelledby}),this.renderChildren()))}},Do.displayName="Options",Do.componentId="Options",Do.allowedProps=hY,Do.propTypes=dY,Do.defaultProps={as:"span",role:"list",elementRef:()=>{},renderLabel:null,children:null},Do.Item=DT,Do.Separator=cY,Do))||nc)||nc)||nc);const fY={id:f.string,highlightedOptionId:f.string,selectedOptionId:f.oneOfType([f.string,f.array]),isShowingOptions:f.bool,onRequestShowOptions:f.func,onRequestHideOptions:f.func,onRequestHighlightOption:f.func,onRequestHighlightFirstOption:f.func,onRequestHighlightLastOption:f.func,onRequestSelectOption:f.func,children:f.func,render:f.func},pY=["id","highlightedOptionId","selectedOptionId","isShowingOptions","onRequestShowOptions","onRequestHideOptions","onRequestHighlightOption","onRequestHighlightFirstOption","onRequestHighlightLastOption","onRequestSelectOption","children","render"];var UT,WT,ic;let XM=(UT=zt(),UT(WT=(ic=class extends T.Component{constructor(...e){super(...e),this._id=this.props.id||this.props.deterministicId(),this._listId=`${this._id}-list`,this._descriptionId=`${this._id}-description`,this._trigger=null,this.isSelectedOption=n=>{const i=this.props.selectedOptionId;return Array.isArray(i)?i.indexOf(n)>-1:i===n},this.handleOpenClose=n=>{const i=this.props,r=i.isShowingOptions,o=i.onRequestShowOptions,s=i.onRequestHideOptions;n.preventDefault(),r?s==null||s(n):(xo(this._trigger)||this._trigger.focus(),o==null||o(n))},this.handleKeyDown=n=>{const i=this.props,r=i.isShowingOptions,o=i.highlightedOptionId,s=i.onRequestHighlightOption,a=i.onRequestHighlightFirstOption,l=i.onRequestHighlightLastOption,u=i.onRequestSelectOption;switch(lr.names[n.keyCode]){case"space":r||this.handleOpenClose(n);break;case"enter":o&&(n.preventDefault(),u==null||u(n,{id:o}));break;case"down":n.preventDefault(),r?s==null||s(n,{direction:1}):this.handleOpenClose(n);break;case"up":n.preventDefault(),r?s==null||s(n,{direction:-1}):this.handleOpenClose(n);break;case"home":r&&(n.preventDefault(),a==null||a(n));break;case"end":r&&(n.preventDefault(),l==null||l(n));break}},this.handleKeyUp=n=>{const i=this.props.isShowingOptions;lr.names[n.keyCode]==="esc"&&i&&this.handleOpenClose(n)}}render(){const e=this.props,n=e.isShowingOptions,i=e.highlightedOptionId,r=e.onRequestHighlightOption,o=e.onRequestSelectOption,s=e.children,a=e.render,l=a===void 0?s:a;return typeof l=="function"?l({getRootProps:({onMouseDown:u,...c}={})=>({onMouseDown:lt(d=>{d.target!==this._trigger&&n&&d.preventDefault()},u),...c}),getLabelProps:u=>({htmlFor:this._id,...u}),getTriggerProps:({ref:u,onKeyDown:c,onKeyUp:d,onClick:h,...p}={})=>({id:this._id,ref:lt(u,m=>this._trigger=m),"aria-haspopup":"listbox","aria-expanded":n,"aria-owns":n?this._listId:void 0,"aria-controls":n?this._listId:void 0,"aria-describedby":this._descriptionId,"aria-activedescendant":n?i:void 0,onKeyDown:lt(this.handleKeyDown,c),onKeyUp:lt(this.handleKeyUp,d),onClick:lt(this.handleOpenClose,h),...p}),getInputProps:({readOnly:u,...c}={})=>({role:"combobox","aria-autocomplete":u?"none":"both",autoComplete:"off",readOnly:u,...c}),getListProps:({onMouseDown:u,onClick:c,...d}={})=>({id:this._listId,role:"listbox",onMouseDown:lt(h=>{h.preventDefault()},u),onClick:lt(h=>{h.stopPropagation(),h.nativeEvent.stopImmediatePropagation()},c),...d}),getOptionProps:({id:u,onMouseOver:c,onClick:d,...h}={})=>(Ye(!!u,"[Selectable] Must provide id for each option via `getOptionProps`."),{id:u,role:"option","aria-selected":this.isSelectedOption(u)?"true":"false",onClick:lt(p=>{o==null||o(p,{id:u})},d),onMouseOver:lt(p=>{r==null||r(p,{id:u})},c),...h}),getDisabledOptionProps:u=>({"aria-disabled":"true",...u}),getDescriptionProps:u=>({id:this._descriptionId,...u})}):null}},ic.displayName="Selectable",ic.allowedProps=pY,ic.propTypes=fY,ic.defaultProps={isShowingOptions:!1},ic))||WT);const mY={id:f.string.isRequired,as:f.elementType},gY=["id","as"];var VT,jT,sl;let Lc=(VT=de(null,VM),VT(jT=(sl=class extends T.Component{render(){return null}},sl.displayName="DrilldownSeparator",sl.componentId="Drilldown.Separator",sl.propTypes=mY,sl.allowedProps=gY,sl.defaultProps={},sl))||jT);const OY={id:f.string.isRequired,children:f.oneOfType([f.node,f.func]),subPageId:f.string,disabled:f.bool,selected:f.bool,value:f.oneOfType([f.number,f.string]),href:f.string,as:f.elementType,role:f.string,renderLabelInfo:f.oneOfType([f.node,f.func]),renderBeforeLabel:f.oneOfType([f.node,f.func]),renderAfterLabel:f.oneOfType([f.node,f.func]),beforeLabelContentVAlign:f.oneOf(["start","center","end"]),afterLabelContentVAlign:f.oneOf(["start","center","end"]),description:f.oneOfType([f.node,f.func]),descriptionRole:f.string,onOptionClick:f.func,defaultSelected:f.bool,elementRef:f.func,shouldCloseOnClick:f.oneOf(["auto","always","never"])},bY=["id","children","subPageId","disabled","selected","value","href","as","role","renderLabelInfo","renderBeforeLabel","renderAfterLabel","beforeLabelContentVAlign","afterLabelContentVAlign","description","descriptionRole","onOptionClick","defaultSelected","elementRef","shouldCloseOnClick"];var XT,ZT,al;let wr=(XT=de(null,WM),XT(ZT=(al=class extends T.Component{render(){return null}},al.displayName="DrilldownOption",al.componentId="Drilldown.Option",al.propTypes=OY,al.allowedProps=bY,al.defaultProps={disabled:!1,beforeLabelContentVAlign:"start",afterLabelContentVAlign:"start",as:"li",role:"menuitem",shouldCloseOnClick:"auto"},al))||ZT);const yY={id:f.string.isRequired,children:ft.oneOf([wr,Lc]),renderGroupTitle:f.oneOfType([f.node,f.func]),withoutSeparators:f.bool,disabled:f.bool,role:f.string,as:f.elementType,elementRef:f.func,selectableType:f.oneOf(["single","multiple"]),defaultSelected:f.array,onSelect:f.func},vY=["id","children","renderGroupTitle","withoutSeparators","disabled","role","as","elementRef","selectableType","defaultSelected","onSelect"];var qT,YT,ll;let Mg=(qT=de(null,UM),qT(YT=(ll=class extends T.Component{render(){return null}},ll.displayName="DrilldownGroup",ll.componentId="Drilldown.Group",ll.propTypes=yY,ll.allowedProps=vY,ll.defaultProps={disabled:!1,withoutSeparators:!1,role:"group"},ll))||YT);const SY={id:f.string.isRequired,children:ft.oneOf([wr,Lc,Mg]),renderTitle:f.oneOfType([f.node,f.func]),renderActionLabel:f.oneOfType([f.node,f.func]),renderBackButtonLabel:f.oneOfType([f.node,f.func]),onHeaderActionClicked:f.func,onBackButtonClicked:f.func,withoutHeaderSeparator:f.bool,disabled:f.bool},wY=["id","children","renderTitle","renderActionLabel","renderBackButtonLabel","onHeaderActionClicked","onBackButtonClicked","withoutHeaderSeparator","disabled"];class Pu extends T.Component{render(){return null}}Pu.displayName="DrilldownPage";Pu.componentId="Drilldown.Page";Pu.propTypes=SY;Pu.allowedProps=wY;Pu.defaultProps={renderBackButtonLabel:"Back",disabled:!1,withoutHeaderSeparator:!1};const kY=(t,e,n)=>({drilldown:{label:"drilldown",overflow:"visible",...n.hasHighlightedOption&&{"&:focus::before":{display:"none"}}},container:{label:"drilldown__container"},headerBack:{label:"drilldown__headerBack",minHeight:"1.25em"},headerTitle:{label:"drilldown__headerTitle",fontWeight:t.headerTitleFontWeight},optionContainer:{label:"drilldown__optionContainer",alignItems:"center",display:"flex",height:"100%"},optionLabelInfo:{label:"drilldown__optionLabelInfo",display:"flex",flexShrink:0,height:"100%",alignItems:"center",paddingInlineStart:t.labelInfoPadding},optionContent:{label:"drilldown__optionContent",flexGrow:1},headerActionColor:t.headerActionColor}),xY=t=>{const e=t.colors,n=t.typography,i=t.spacing;return{...{headerTitleFontWeight:n.fontWeightBold,headerActionColor:e.textLink,labelInfoPadding:i==null?void 0:i.small}}},_Y={rootPageId:f.string.isRequired,children:ft.oneOf([Pu]),id:f.string,label:f.string,disabled:f.bool,rotateFocus:f.bool,as:f.elementType,role:f.string,elementRef:f.func,drilldownRef:f.func,overflowX:f.oneOf(["auto","hidden","visible"]),overflowY:f.oneOf(["auto","hidden","visible"]),height:f.oneOfType([f.string,f.number]),width:f.oneOfType([f.string,f.number]),minHeight:f.oneOfType([f.string,f.number]),minWidth:f.oneOfType([f.string,f.number]),maxHeight:f.oneOfType([f.string,f.number]),maxWidth:f.oneOfType([f.string,f.number]),trigger:f.node,placement:Kt.placement,defaultShow:f.bool,show:yu(f.bool,"onToggle","defaultShow"),onToggle:f.func,onSelect:f.func,onDismiss:f.func,onFocus:f.func,onMouseOver:f.func,popoverRef:f.func,mountNode:Kt.mountNode,positionTarget:Kt.mountNode,positionContainerDisplay:f.oneOf(["inline-block","block"]),constrain:Kt.constrain,shouldHideOnSelect:f.bool,shouldContainFocus:f.bool,shouldReturnFocus:f.bool,withArrow:f.bool,offsetX:f.oneOfType([f.string,f.number]),offsetY:f.oneOfType([f.string,f.number])},EY=["rootPageId","children","id","label","disabled","rotateFocus","as","role","overflowX","overflowY","height","width","minHeight","minWidth","maxHeight","maxWidth","trigger","placement","defaultShow","show","onToggle","onSelect","onDismiss","onFocus","onMouseOver","elementRef","drilldownRef","popoverRef","mountNode","positionTarget","positionContainerDisplay","constrain","shouldHideOnSelect","shouldContainFocus","shouldReturnFocus","withArrow","offsetX","offsetY"],CY=["groupProps"],TY=["groupProps"],PY=["id","themeOverride"];var GT,KT,JT,rc,vr,eP,tP,nP,iP;let Qn=(GT=zt(),KT=de(kY,xY),JT=Le(),GT(rc=KT(rc=JT(rc=(vr=class extends T.Component{constructor(e){super(e),this._drilldownRef=null,this._popover=null,this._trigger=null,this._containerElement=null,this._id=void 0,this._triggerId=void 0,this._headerBackId=void 0,this._headerTitleId=void 0,this._headerTitleLabelId=void 0,this._headerActionId=void 0,this._pageHistory=void 0,this._activeOptionsMap={},this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.handleDrilldownRef=n=>{const i=this.props.drilldownRef;this._drilldownRef=n,typeof i=="function"&&i(n),this.props.trigger||this.handleRef(n)},this.show=n=>{this._popover&&(this._popover.show(n),this.setState({isShowingPopover:!0}))},this.hide=n=>{this._popover&&(this._popover.hide(n),this.setState({isShowingPopover:!1}),this.reset())},this.handleOptionHighlight=(n,{id:i,direction:r})=>{const o=this.props.rotateFocus,s=this.state.highlightedOptionId;let a=this.getPageChildById(i)?i:void 0;if(!a){if(!s)a=this.activeOptionIds[0];else if(r){const l=this.activeOptionIds.indexOf(s),u=l+r;if(a=l>-1?this.activeOptionIds[u]:void 0,o){const c=this.activeOptionIds.length-1;u<0&&(a=this.activeOptionIds[c]),u>c&&(a=this.activeOptionIds[0])}}}a&&this.setState({highlightedOptionId:a},()=>{this.focusOption(a)})},this.goToPage=n=>{var i;if(!n){Ne(!1,"Cannot go to page because there was no page id provided.");return}if(typeof n!="string"){Ne(!1,`Cannot go to page because parameter newPageId has to be string (valid page id). Current newPageId is "${typeof n}".`);return}if(!((i=this.pageMap)!==null&&i!==void 0&&i[n])){Ne(!1,`Cannot go to page because page with id: "${n}" doesn't exist.`);return}const r=this._pageHistory[this._pageHistory.length-1],o=this._pageHistory.indexOf(n);return o<0?this._pageHistory.push(n):this._pageHistory.splice(o+1,this._pageHistory.length-1),this.setState({activePageId:n,highlightedOptionId:void 0}),{prevPageId:r,newPageId:n}},this.goToPreviousPage=()=>{if(!this.previousPage){Ne(!1,`There is no previous page to go to. The current page history is: [${this._pageHistory.join(", ")}].`);return}const n=this.goToPage(this.previousPage.id),i=n.newPageId,r=n.prevPageId;return{newPageId:i,prevPageId:r}},this.handleBackButtonClick=()=>{const n=this.currentPage,i=n.onBackButtonClicked,r=this.goToPreviousPage(),o=r.newPageId,s=r.prevPageId;typeof i=="function"&&i(o,s)},this.handleOptionSelect=(n,{id:i})=>{const r=this.getPageChildById(i);if(n.persist(),!i||!r||r.props.disabled||n.target.getAttribute("disabled")||n.target.getAttribute("aria-disabled")){n.preventDefault(),n.stopPropagation();return}const o=this.props,s=o.shouldHideOnSelect,a=o.onSelect,l=r.groupProps,u=Ie(r,CY),c=u.props,d=c.subPageId,h=c.href,p=c.value,m=c.onOptionClick;if(typeof m=="function"&&m(n,{optionId:i,drilldown:this,...this.exposedNavigationProps}),d&&this.goToPage(d),n.type==="keydown"&&h){var O;const y=(O=this._drilldownRef)===null||O===void 0?void 0:O.querySelector(`#${i}`);y.tagName.toLowerCase()==="a"&&y!==null&&y!==void 0&&y.href&&y.click()}l!=null&&l.selectableType?this.handleGroupOptionSelected(n,r):typeof a=="function"&&a(n,{value:p,isSelected:!0,selectedOption:u,drilldown:this}),s&&!d&&i!==this._headerBackId&&this.hide(n)},this.handleKeyDown=n=>{const i=n.target.id,r=this.getPageChildById(i);if([" ","space","Space"].includes(n.key)&&(n.preventDefault(),n.stopPropagation(),r&&this.handleOptionSelect(n,{id:i})),n.key==="ArrowRight"&&r!=null&&r.props.subPageId&&this.handleOptionSelect(n,{id:i}),n.key==="ArrowLeft"){var o;this._pageHistory.length>1&&this.handleBackButtonClick(),this.isOnRootPage&&(o=this._popover)!==null&&o!==void 0&&o.shown&&this._popover.hide(n)}},this.handleToggle=(n,i)=>{const r=this.props.onToggle;this.setState({isShowingPopover:i}),typeof r=="function"&&r(n,{shown:i,drilldown:this,...this.exposedNavigationProps})},this.state={isShowingPopover:e.trigger?!!e.show:!1,activePageId:e.rootPageId,highlightedOptionId:void 0,lastSelectedId:void 0,selectedGroupOptionsMap:this.setDefaultSelected()},this._pageHistory=[e.rootPageId],this._id=e.id||e.deterministicId(),this._triggerId=e.deterministicId("Drilldown-Trigger"),this._headerBackId=e.deterministicId("DrilldownHeader-Back"),this._headerTitleId=e.deterministicId("DrilldownHeader-Title"),this._headerTitleLabelId=e.deterministicId("DrilldownHeader-Title-Label"),this._headerActionId=e.deterministicId("DrilldownHeader-Action")}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.makeStylesVariables)}componentDidUpdate(e,n){var i,r;(i=(r=this.props).makeStyles)===null||i===void 0||i.call(r,this.makeStylesVariables),n.activePageId!==this.state.activePageId&&setTimeout(()=>{this.focused()||this.focus()},0),this.currentPage||(this.previousPage?this.goToPreviousPage():this.goToPage(this.props.rootPageId)),this.state.highlightedOptionId&&!this.getPageChildById(this.state.highlightedOptionId)&&this.setState({highlightedOptionId:void 0})}get makeStylesVariables(){return{hasHighlightedOption:!!this.state.highlightedOptionId}}get activeOptionIds(){return Object.keys(this._activeOptionsMap)}get activeOptions(){return Object.values(this._activeOptionsMap)}get pages(){const e=this.props.children;return z.Children.toArray(e||[])}get pageMap(){if(!this.props.children)return;const n={};return this.pages.forEach(i=>{const r=i.props,o=r.children;n[r.id]={...r,children:z.Children.toArray(o||[])}}),n}get isOnRootPage(){return this.state.activePageId===this.props.rootPageId}get currentPage(){return this.getPageById(this.state.activePageId)}get previousPage(){const e=this._pageHistory[this._pageHistory.length-2];return this.getPageById(e)}get exposedNavigationProps(){const e=this.goToPage,n=this.goToPreviousPage;return{pageHistory:[...this._pageHistory],goToPage:e,goToPreviousPage:n}}get currentPageAriaLabel(){var e;if(this.props["aria-labelledby"])return this.props["aria-labelledby"];if((e=this.currentPage)!==null&&e!==void 0&&e.renderTitle)return this._headerTitleLabelId;if(this.isOnRootPage&&this.props.trigger)return this._triggerId}getChildrenArray(e){return e?Array.isArray(e)?e:[e]:[]}getPageById(e){return this.pageMap&&e?this.pageMap[e]:void 0}getPageChildById(e){return e?this._activeOptionsMap[e]:void 0}setDefaultSelected(){const e={};return this.pages.forEach(n=>{const i=n.props.children;this.getChildrenArray(i).forEach(r=>{if(Me(r,[Mg])){var o;const s=r.props,a=s.id,l=s.selectableType,u=s.defaultSelected,c=u===void 0?[]:u,d=s.children;if(!l)return;if(l&&!e[a]&&(e[a]=new Map),l==="single"&&c.length>1){Ye(!1,`Radio type selectable groups can have only one item selected! Group with id "${a}" cannot select multiple items: [${c.join(", ")}]!`);return}e[a]=new Map,(o=this.getChildrenArray(d))===null||o===void 0||o.forEach(h=>{if(Me(h,[wr])){const p=h.props,m=p.id,O=p.value,y=p.defaultSelected;if(y===!1)return;const b=typeof O<"u"&&c.filter(v=>typeof v<"u").includes(O);(y||b)&&e[a].set(m,O)}})}})}),e}get selectedGroupOptionIdsArray(){return Object.values(this.state.selectedGroupOptionsMap).map(e=>Array.from(e.keys())).flat()}get headerChildren(){const e=this.currentPage,n=this.props,i=n.styles,r=n.deterministicId,o=[];if(!e)return o;const s=e.children,a=e.renderBackButtonLabel,l=e.renderTitle,u=e.renderActionLabel,c=e.onHeaderActionClicked,d=e.withoutHeaderSeparator;if(this.previousPage){const h=rt(this.previousPage.renderTitle),p=rt(a,h);o.push(C(wr,{id:this._headerBackId,onOptionClick:this.handleBackButtonClick},C("div",{css:i==null?void 0:i.headerBack,role:"presentation"},p)))}if(l){const h=rt(l);h&&o.push(C(wr,{id:this._headerTitleId,role:"presentation","aria-hidden":"true"},C("div",{css:i==null?void 0:i.headerTitle,id:this._headerTitleLabelId},h)))}if(u){const h=rt(u);h&&o.push(C(wr,{id:this._headerActionId,themeOverride:{color:i==null?void 0:i.headerActionColor},onOptionClick:p=>{typeof c=="function"&&c(p)}},h))}return o.length>0&&s.length>0&&!d&&o.push(C(Lc,{id:r("DrilldownHeader-Separator")})),o}get shown(){return this.props.trigger?this.state.isShowingPopover:!0}containsDuplicateChild(e){let n=!1;const i=new Map;for(const r of e)if(!i.has(r.props.id))i.set(r.props.id,!0);else return Ne(!1,`Duplicate id: "${r.props.id}"! Make sure all options have unique ids, otherwise they won't be rendered.`),n=!0;return n}reset(){this._activeOptionsMap={},this.setState({highlightedOptionId:void 0})}focus(){if(this.shown){var e,n;Ye(!!((e=this._drilldownRef)!==null&&e!==void 0&&e.focus),"[Drilldown] Could not focus the drilldown."),(n=this._drilldownRef)===null||n===void 0||n.focus()}else{var i;Ye(!!((i=this._trigger)!==null&&i!==void 0&&i.focus),"[Drilldown] Could not focus the trigger."),this._trigger.focus()}}focused(){return this.shown?nu(this._drilldownRef):nu(this._trigger)}focusOption(e){const n=this._containerElement,i=n==null?void 0:n.querySelector(`[id="${e}"]`);i==null||i.focus()}handleGroupOptionSelected(e,n){this.setState(i=>{var r;const o=n.props,s=o.id,a=o.value,l=n.groupProps,u=l.id,c=l.selectableType;let d=new Map(i.selectedGroupOptionsMap[u]);return c==="multiple"&&(!((r=i.selectedGroupOptionsMap[u])===null||r===void 0)&&r.has(s))?d.delete(s):c==="multiple"?d.set(s,a):c==="single"&&(d=new Map,d.set(s,a)),{...i,selectedGroupOptionsMap:{...i.selectedGroupOptionsMap,[u]:d}}},()=>{const i=n.props.value,r=n.groupProps,o=r.id,s=r.onSelect,a=this.props.onSelect;n.groupProps;const l=Ie(n,TY),u=[...this.state.selectedGroupOptionsMap[o].values()];typeof s=="function"&&s(e,{value:u,isSelected:u.includes(i),selectedOption:l,drilldown:this}),typeof a=="function"&&a(e,{value:u,isSelected:u.includes(i),selectedOption:l,drilldown:this})})}renderList(e,n){const i=this.currentPage,r=this.headerChildren;if(!i||this.containsDuplicateChild(i.children))return null;const o=[...r,...i.children];let s=!1;return o.map((a,l)=>{if(Me(a,[Mg])){const u=l===0,c=l===o.length-1,d=s,h=!a.props.withoutSeparators&&!u&&!d,p=!a.props.withoutSeparators&&!c;return s=p,this.renderGroup(a,e,n,h,p)}else return Me(a,[Lc])?s?null:(s=!0,this.renderSeparator(a)):Me(a,[wr])?(s=!1,this.renderOption(a,e,n)):null})}renderSeparator(e){const n=e.props,i=n.id,r=n.themeOverride,o=Ie(n,PY);return C(hi.Separator,Object.assign({},o,{id:i,key:i,role:"separator",themeOverride:r}))}renderOption(e,n,i,r){var o,s,a,l,u;const c=this.props.styles;let d=!1;const h=e.props,p=h.id,m=h.children,O=h.href,y=h.as,b=h.role,v=h.subPageId,S=h.disabled,k=h.renderLabelInfo,x=h.renderBeforeLabel,_=h.renderAfterLabel,w=h.beforeLabelContentVAlign,D=h.afterLabelContentVAlign,W=h.description,I=h.descriptionRole,V=h.elementRef,B=h.themeOverride;if(!p)return Ne(!1,"Drilldown.Option without id won't be rendered. It is needed to internally track the options."),null;let H={...Re(e.props,[...wr.allowedProps,...hi.Item.allowedProps]),...n({id:p,...b&&!["gridcell","option","row","tab","columnheader","rowheader","treeitem"].includes(b)&&{"aria-selected":void 0}}),themeOverride:B,renderBeforeLabel:x,renderAfterLabel:_,beforeLabelContentVAlign:w,afterLabelContentVAlign:D,description:W,descriptionRole:I,as:y,role:b,elementRef:V,variant:"default",tabIndex:-1};const K={groupProps:r},oe=p!==this._headerBackId&&(this.props.disabled||((o=this.currentPage)===null||o===void 0?void 0:o.disabled)||(r==null?void 0:r.disabled)||S);oe&&(H.variant="disabled",H={...H,...i()}),p!==this._headerTitleId&&(this._activeOptionsMap[p]={...e,...K});const xe=b!==wr.defaultProps.role?b:void 0;v&&(H.renderAfterLabel=eP||(eP=C(wa,null)),H["aria-haspopup"]=!0,H.role=xe||"button",Ne(!_,`The prop "renderAfterLabel" is reserved on item with id: "${p}". When it has "subPageId" provided, a navigation arrow will render after the label.`)),p===this._headerBackId&&(H.renderBeforeLabel=tP||(tP=C(Wd,null)));const Oe=typeof e.props.selected=="boolean";if((r!=null&&r.selectableType||Oe)&&r){if(Oe)d=!!e.props.selected;else{var X;d=!!(!((X=this.state.selectedGroupOptionsMap[r.id])===null||X===void 0)&&X.has(p))}H["aria-checked"]=d,H.renderBeforeLabel=C(Cu,{style:{opacity:d?1:0}}),Ne(!x,`The prop "renderBeforeLabel" is reserved on item with id: "${p}". When this option is a selectable member of a Drilldown.Group, selection indicator will render before the label.`),r.selectableType==="single"&&(H.role=xe||"menuitemradio"),r.selectableType==="multiple"&&(H.role=xe||"menuitemcheckbox")}p===this.state.highlightedOptionId&&(H.variant="highlighted",oe&&(H.variant="highlighted-disabled")),O&&(v?Ne(!1,`Drilldown.Option with id "${p}" has subPageId, so it will ignore the "href" property.`):r!=null&&r.selectableType?Ne(!1,`Drilldown.Option with id "${p}" is in a selectable group, so it will ignore the "href" property.`):H.href=O);const ae=rt(m,{id:p,variant:H.variant,isSelected:d});if(!ae)return Ne(!1,`There are no "children" prop provided for option with id: "${p}", so it won't be rendered.`),null;const A={variant:H.variant,vAlign:D,as:y,role:H.role,isSelected:d};typeof H.renderBeforeLabel=="function"&&!((s=H.renderBeforeLabel)!==null&&s!==void 0&&(a=s.prototype)!==null&&a!==void 0&&a.isReactComponent)&&(H.renderBeforeLabel=H.renderBeforeLabel.bind(null,A)),typeof H.renderAfterLabel=="function"&&!((l=H.renderAfterLabel)!==null&&l!==void 0&&(u=l.prototype)!==null&&u!==void 0&&u.isReactComponent)&&(H.renderAfterLabel=H.renderAfterLabel.bind(null,A));const be=k&&rt(k,A),Se={start:"flex-start",center:"center",end:"flex-end"},L=`${p}__label`,We=`${p}__info`,et=e.props["aria-labelledby"]||L,Be=e.props["aria-describedby"]||(be?We:void 0);return C(hi.Item,Object.assign({},H,{key:p,"aria-labelledby":et,"aria-describedby":Be}),C("div",{css:c==null?void 0:c.optionContainer,role:"none"},C("span",{css:c==null?void 0:c.optionContent,role:"none",id:L},ae),be?C("span",{css:c==null?void 0:c.optionLabelInfo,role:"presentation",style:{alignSelf:Se[D]}},C("span",{id:We},be)):null))}renderGroup(e,n,i,r,o){const s=e.props,a=s.id,l=s.children,u=s.renderGroupTitle,c=s.themeOverride,d=s.role,h=s.as,p=s.elementRef;if(!l)return null;const m=[];return r&&m.push(nP||(nP=C(hi.Separator,null))),m.push(C(hi,{id:a,key:a,role:d,as:h||this.props.as,renderLabel:u,elementRef:p,themeOverride:c},this.getChildrenArray(l).map(O=>Me(O,[Lc])?this.renderSeparator(O):Me(O,[wr])?this.renderOption(O,n,i,e.props):null))),o&&m.push(iP||(iP=C(hi.Separator,null))),m}renderPage(){const e=this.props,n=e.styles,i=e.overflowY,r=e.overflowX,o=e.height,s=e.width,a=e.minHeight,l=e.minWidth,u=e.maxHeight,c=e.maxWidth,d=e.role,h=e.as,p=e.label;return this.currentPage?C(XM,{isShowingOptions:this.shown,highlightedOptionId:this.state.highlightedOptionId,selectedOptionId:this.selectedGroupOptionIdsArray,onRequestShowOptions:this.show,onRequestHideOptions:this.hide,onRequestSelectOption:this.handleOptionSelect,onRequestHighlightOption:this.handleOptionHighlight,onRequestHighlightFirstOption:m=>{const O=this.activeOptionIds[0];this.handleOptionHighlight(m,{id:O})},onRequestHighlightLastOption:m=>{const O=this.activeOptionIds[this.activeOptionIds.length-1];this.handleOptionHighlight(m,{id:O})}},({getTriggerProps:m,getListProps:O,getOptionProps:y,getDisabledOptionProps:b})=>C(ye,Object.assign({as:"div",elementRef:this.handleDrilldownRef,tabIndex:0,css:n==null?void 0:n.drilldown,position:"relative",borderRadius:"small",width:s,minWidth:c,maxWidth:c,role:d,"aria-label":p,"aria-labelledby":this.currentPageAriaLabel},m({id:this._id,"aria-haspopup":!1,"aria-expanded":void 0,onKeyDown:this.handleKeyDown,onBlur:v=>{const S=v.currentTarget,k=v.relatedTarget,x=cd(S,k);(!k||k===this._drilldownRef||k!==S&&!x)&&this.setState({highlightedOptionId:void 0})},onMouseLeave:()=>{this.setState({highlightedOptionId:void 0})}})),C(ye,{as:"div",overflowY:i,overflowX:r,height:o,width:s,minHeight:a,minWidth:l,maxHeight:u,maxWidth:c,css:n==null?void 0:n.container,borderRadius:"small",role:"presentation",elementRef:v=>{this._containerElement=v}},C(hi,Object.assign({},O(),{role:"presentation",as:h}),this.renderList(y,b))))):null}render(){this._activeOptionsMap={};const e=this.props,n=e.show,i=e.defaultShow,r=e.placement,o=e.withArrow,s=e.shouldContainFocus,a=e.shouldReturnFocus,l=e.trigger,u=e.mountNode,c=e.constrain,d=e.positionTarget,h=e.positionContainerDisplay,p=e.popoverRef,m=e.disabled,O=e.onDismiss,y=e.onFocus,b=e.onMouseOver,v=e.offsetX,S=e.offsetY;return l?C(rb,{isShowingContent:n,defaultIsShowingContent:i,shouldCloseOnDocumentClick:!0,onHideContent:(k,{documentClick:x})=>{typeof O=="function"&&O(k,x),this.reset(),this.handleToggle(k,!1)},onShowContent:k=>this.handleToggle(k,!0),mountNode:u,placement:r,withArrow:o,positionTarget:d,positionContainerDisplay:h,constrain:c,shouldContainFocus:s,shouldReturnFocus:a,id:this._id,on:["click"],onFocus:y,onMouseOver:b,offsetX:v,offsetY:S,elementRef:k=>{this.handleRef(k)},ref:k=>{this._popover=k,typeof p=="function"&&p(k)},renderTrigger:$t(l,{ref:k=>{this._trigger=k},"aria-haspopup":this.props.role,id:this._triggerId,disabled:!!(l.props.disabled||m),"aria-disabled":l.props.disabled||m?"true":void 0})},this.renderPage()):this.renderPage()}},vr.displayName="Drilldown",vr.componentId="Drilldown",vr.propTypes=_Y,vr.allowedProps=EY,vr.defaultProps={disabled:!1,rotateFocus:!0,as:"ul",role:"menu",overflowX:"auto",overflowY:"auto",placement:"bottom center",defaultShow:!1,shouldHideOnSelect:!0,shouldContainFocus:!1,shouldReturnFocus:!0,withArrow:!0,offsetX:0,offsetY:0},vr.Group=Mg,vr.Option=wr,vr.Page=Pu,vr.Separator=Lc,vr))||rc)||rc)||rc);const AY=(t,e)=>{const n=e.size,i={small:{fontSize:t.smallIconSize},medium:{fontSize:t.mediumIconSize},large:{fontSize:t.largeIconSize}};return{select:{label:"select",fontSize:t.fontSize,fontFamily:t.fontFamily,fontWeight:t.fontWeight,color:t.color},icon:{label:"select__icon",...i[n]},assistiveText:{label:"select__assistiveText",display:"none"}}},RY=t=>{const e=t.colors,n=t.typography;return{...{fontSize:n==null?void 0:n.fontSizeMedium,fontFamily:n==null?void 0:n.fontFamily,fontWeight:n==null?void 0:n.fontWeightNormal,smallIconSize:n==null?void 0:n.fontSizeXSmall,mediumIconSize:n==null?void 0:n.fontSizeSmall,largeIconSize:n==null?void 0:n.fontSizeMedium,color:e==null?void 0:e.textDarkest,background:e==null?void 0:e.backgroundLightest}}},IY={id:f.string.isRequired,isHighlighted:f.bool,isSelected:f.bool,isDisabled:f.bool,renderBeforeLabel:f.oneOfType([f.node,f.func]),renderAfterLabel:f.oneOfType([f.node,f.func]),children:f.node},$Y=["id","isHighlighted","isSelected","isDisabled","renderBeforeLabel","renderAfterLabel","children"];let Ir=class extends T.Component{render(){return null}};Ir.displayName="Option";Ir.componentId="Select.Option";Ir.allowedProps=$Y;Ir.propTypes=IY;Ir.defaultProps={isHighlighted:!1,isSelected:!1,isDisabled:!1};const LY={renderLabel:f.oneOfType([f.node,f.func]).isRequired,children:ft.oneOf([Ir])},NY=["renderLabel","children"];let tr=class extends T.Component{render(){return null}};tr.displayName="Group";tr.componentId="Select.Group";tr.allowedProps=NY;tr.propTypes=LY;tr.defaultProps={};const MY={renderLabel:f.oneOfType([f.node,f.func]).isRequired,inputValue:f.string,id:f.string,size:f.oneOf(["small","medium","large"]),assistiveText:f.string,placeholder:f.string,interaction:f.oneOf(["enabled","disabled","readonly"]),isRequired:f.bool,isInline:f.bool,width:f.string,htmlSize:f.number,visibleOptionsCount:f.number,optionsMaxHeight:f.string,optionsMaxWidth:f.string,messages:f.arrayOf(cs.message),placement:Kt.placement,constrain:Kt.constrain,mountNode:Kt.mountNode,onFocus:f.func,onBlur:f.func,onInputChange:f.func,isShowingOptions:f.bool,onRequestShowOptions:f.func,onRequestHideOptions:f.func,onRequestHighlightOption:f.func,onRequestSelectOption:f.func,inputRef:f.func,listRef:f.func,renderBeforeInput:f.oneOfType([f.node,f.func]),renderAfterInput:f.oneOfType([f.node,f.func]),children:ft.oneOf([tr,Ir]),shouldNotWrap:f.bool,scrollToHighlightedOption:f.bool},DY=["renderLabel","inputValue","isShowingOptions","id","size","assistiveText","placeholder","interaction","isRequired","isInline","width","htmlSize","visibleOptionsCount","optionsMaxHeight","optionsMaxWidth","messages","placement","constrain","mountNode","onFocus","onBlur","onInputChange","onRequestShowOptions","onRequestHideOptions","onRequestHighlightOption","onRequestSelectOption","inputRef","listRef","renderBeforeInput","renderAfterInput","children","shouldNotWrap","scrollToHighlightedOption"],BY=["id","renderLabel","children"],QY=["renderLabel","inputValue","placeholder","isRequired","shouldNotWrap","size","isInline","width","htmlSize","messages","renderBeforeInput","renderAfterInput","onFocus","onBlur","onInputChange","onRequestHideOptions"],FY=["ref"];var rP,oP,sP,oc,Bo,aP,lP,uP,cP;const ZM=T.memo(function(e){const n=e.optionsItemProps,i=e.children;return C(hi.Item,Object.assign({as:"li"},n),i)},(t,e)=>t.selectOption.props.isHighlighted===e.selectOption.props.isHighlighted&&t.selectOption.props.isSelected===e.selectOption.props.isSelected&&t.selectOption.props.isDisabled===e.selectOption.props.isDisabled&&t.selectOption.props.children===e.selectOption.props.children&&t.selectOption.props.id===e.selectOption.props.id&&t.selectOption.props.renderBeforeLabel===e.selectOption.props.renderBeforeLabel&&t.selectOption.props.renderAfterLabel===e.selectOption.props.renderAfterLabel&&t.children===e.children);ZM.displayName="Item";let Em=(rP=zt(),oP=de(AY,RY),sP=Le(),rP(oc=oP(oc=sP(oc=(Bo=class qM extends T.Component{constructor(...e){super(...e),this.state={hasInputRef:!1},this.ref=null,this._input=null,this._defaultId=this.props.deterministicId(),this._inputContainer=null,this._listView=null,this._optionIds=[],this._optionHeight=36,this.handleInputRef=n=>{var i,r;this.state.hasInputRef||this.setState({hasInputRef:!0}),this._input=n,(i=(r=this.props).inputRef)===null||i===void 0||i.call(r,n)},this.handleListRef=n=>{var i,r;(i=(r=this.props).listRef)===null||i===void 0||i.call(r,n),n&&n.querySelector('[role="option"]')&&(this._optionHeight=n.querySelector('[role="option"]').offsetHeight)},this.handleInputContainerRef=n=>{this._inputContainer=n}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n),this.props.scrollToHighlightedOption&&requestAnimationFrame(()=>this.scrollToOption(this.highlightedOptionId))}focus(){this._input&&this._input.focus()}get childrenArray(){return T.Children.toArray(this.props.children)}getGroupChildrenArray(e){return T.Children.toArray(e.props.children)}get focused(){return this._input?xo(this._input):!1}get id(){return this.props.id||this._defaultId}get width(){return this._inputContainer?this._inputContainer.offsetWidth:void 0}get interaction(){return Yo({props:this.props})}get highlightedOptionId(){let e;return this.childrenArray.forEach(n=>{Me(n,[tr])?this.getGroupChildrenArray(n).forEach(i=>{i.props.isHighlighted&&(e=i.props.id)}):n.props.isHighlighted&&(e=n.props.id)}),e}get selectedOptionId(){const e=[];if(this.childrenArray.forEach(n=>{Me(n,[tr])?this.getGroupChildrenArray(n).forEach(i=>{i.props.isSelected&&e.push(i.props.id)}):n.props.isSelected&&e.push(n.props.id)}),e.length===1)return e[0];if(e.length!==0)return e}scrollToOption(e){if(this._listView){const n=this._listView.querySelector(`[id="${e}"]`);if(!n)return;const i=n.parentNode,r=jt(this._listView).top,o=jt(i).top,s=r+this._listView.clientHeight,a=o+(i?i.clientHeight:0);a>s?this._listView.scrollTop+=a-s:o{i==null||i(s);const a=this.selectedOptionId;a&&!Array.isArray(a)&&this.highlightOption(s,a)},onRequestHideOptions:s=>{r==null||r(s)},onRequestHighlightOption:(s,{id:a,direction:l})=>{if(!n)return;const u=this.highlightedOptionId;let c=this._optionIds.indexOf(a)>-1?a:void 0;if(!c)if(!u)c=this._optionIds[0];else{const d=this._optionIds.indexOf(u);c=d>-1?this._optionIds[d+l]:void 0}c&&this.highlightOption(s,c)},onRequestHighlightFirstOption:s=>{this.highlightOption(s,this._optionIds[0])},onRequestHighlightLastOption:s=>{this.highlightOption(s,this._optionIds[this._optionIds.length-1])},onRequestSelectOption:(s,{id:a})=>{a&&this._optionIds.indexOf(a)!==-1&&(o==null||o(s,{id:a}))}}:{}}renderOption(e,n){const i=n.getOptionProps,r=n.getDisabledOptionProps,o=e.props,s=o.id,a=o.isDisabled,l=o.isHighlighted,u=o.isSelected,c=o.renderBeforeLabel,d=o.renderAfterLabel,h=o.children,p=O=>{var y;return typeof O=="function"&&!(O!=null&&(y=O.prototype)!==null&&y!==void 0&&y.isReactComponent)?O.bind(null,{id:s,isDisabled:a,isSelected:u,isHighlighted:l,children:h}):O};let m={...Re(e.props,[...Ir.allowedProps,...hi.Item.allowedProps]),...i({id:s}),renderBeforeLabel:p(c),renderAfterLabel:p(d)};return u?m.variant="selected":l&&(m.variant="highlighted"),a?(m.variant="disabled",m={...m,...r()}):this._optionIds.push(s),C(ZM,{optionsItemProps:m,selectOption:e},h)}renderGroup(e,n){const i=n.getOptionProps,r=n.getDisabledOptionProps,o=n.isFirstChild,s=n.isLastChild,a=n.afterGroup,l=e.props,u=l.id,c=l.renderLabel,d=l.children,h=Ie(l,BY),p=[];return!o&&!a&&p.push(aP||(aP=C(hi.Separator,null))),p.push(C(hi,Object.assign({id:u,as:"ul",role:"group",renderLabel:c},Re(h,[...hi.allowedProps,...tr.allowedProps])),T.Children.map(d,m=>this.renderOption(m,{getOptionProps:i,getDisabledOptionProps:r})))),s||p.push(lP||(lP=C(hi.Separator,null))),p}renderList(e){const n=e.getListProps,i=e.getOptionProps,r=e.getDisabledOptionProps,o=this.props,s=o.isShowingOptions,a=o.optionsMaxWidth,l=o.optionsMaxHeight,u=o.visibleOptionsCount,c=o.children;let d=!1;const h=s?{display:"block",overflowY:"auto",maxHeight:l||this._optionHeight*u,maxWidth:a||this.width,background:"primary",elementRef:p=>this._listView=p}:{maxHeight:0};return C(ye,h,C(hi,n({as:"ul",elementRef:this.handleListRef}),s?T.Children.map(c,(p,m)=>{if(!(!p||!Me(p,[tr,Ir]))){if(Me(p,[Ir]))return d=!1,this.renderOption(p,{getOptionProps:i,getDisabledOptionProps:r});if(Me(p,[tr])){const O=d;return d=!0,this.renderGroup(p,{getOptionProps:i,getDisabledOptionProps:r,isFirstChild:m===0,isLastChild:m===T.Children.count(c)-1,afterGroup:O})}}}):null))}renderIcon(){const e=this.props,n=e.styles,i=e.isShowingOptions;return C("span",{css:n==null?void 0:n.icon},i?uP||(uP=C(wu,{inline:!1})):cP||(cP=C(Su,{inline:!1})))}renderInput(e){const n=e.getInputProps,i=e.getTriggerProps,r=this.props,o=r.renderLabel,s=r.inputValue,a=r.placeholder,l=r.isRequired,u=r.shouldNotWrap,c=r.size,d=r.isInline,h=r.width,p=r.htmlSize,m=r.messages,O=r.renderBeforeInput,y=r.renderAfterInput,b=r.onFocus,v=r.onBlur,S=r.onInputChange,k=r.onRequestHideOptions,x=Ie(r,QY),_=this.interaction,w=Re(x,qM.allowedProps),D=i({...w}),W=D.ref,I=Ie(D,FY),V=typeof S<"u",B=V?{}:{role:zW()?"button":"combobox",title:s,"aria-autocomplete":void 0,"aria-readonly":!0};w.autoComplete&&(B.autoComplete=w.autoComplete);const H={id:this.id,renderLabel:o,placeholder:a,size:c,width:h,htmlSize:p,messages:m,value:s,inputRef:lt(W,this.handleInputRef),inputContainerRef:this.handleInputContainerRef,interaction:_==="enabled"&&!V?"readonly":_,isRequired:l,shouldNotWrap:u,display:d?"inline-block":"block",renderBeforeInput:O,renderAfterInput:y||this.renderIcon(),onChange:typeof S=="function"?S:s?()=>{}:void 0,onFocus:b,onBlur:lt(v,k),...B};return C(Yk,Object.assign({},I,n(H)))}render(){const e=this.props,n=e.constrain,i=e.placement,r=e.mountNode,o=e.assistiveText,s=e.isShowingOptions,a=e.styles;this._optionIds=[];const l=this.highlightedOptionId,u=this.selectedOptionId;return C(XM,Object.assign({highlightedOptionId:l,isShowingOptions:s,selectedOptionId:u},this.getEventHandlers()),({getRootProps:c,getInputProps:d,getTriggerProps:h,getListProps:p,getOptionProps:m,getDisabledOptionProps:O,getDescriptionProps:y})=>C("span",Object.assign({},c({css:a==null?void 0:a.select}),{ref:b=>this.ref=b}),this.renderInput({getInputProps:d,getTriggerProps:h}),C("span",Object.assign({},y(),{css:a==null?void 0:a.assistiveText}),o),C(rb,{constrain:n,placement:i,mountNode:r,positionTarget:this._inputContainer,isShowingContent:s,shouldReturnFocus:!1,withArrow:!1},this.renderList({getListProps:p,getOptionProps:m,getDisabledOptionProps:O}))))}},Bo.displayName="Select",Bo.componentId="Select",Bo.allowedProps=DY,Bo.propTypes=MY,Bo.defaultProps={inputValue:"",isShowingOptions:!1,size:"medium",interaction:void 0,isRequired:!1,isInline:!1,visibleOptionsCount:8,placement:"bottom stretch",constrain:"window",shouldNotWrap:!1,scrollToHighlightedOption:!1},Bo.Option=Ir,Bo.Group=tr,Bo))||oc)||oc)||oc);const zY={expanded:yu(f.bool,"onToggle","defaultExpanded"),defaultExpanded:f.bool,onToggle:f.func,children:f.func,render:f.func},HY=["expanded","defaultExpanded","onToggle","children","render"];var dP,hP,sc;const UY=({expanded:t})=>({expanded:!t});let fP=(dP=zt(),dP(hP=(sc=class extends T.Component{constructor(e){super(e),this._contentId=void 0,this.handleToggle=n=>{this.isControlled()||this.setState(UY),this.props.onToggle(n,!this.expanded)},this.state={expanded:this.isControlled(e)?e.expanded:e.defaultExpanded},this._contentId=e.deterministicId()}get expanded(){return this.isControlled()?this.props.expanded:this.state.expanded}isControlled(e=this.props){return typeof e.expanded=="boolean"}static getDerivedStateFromProps(e,n){return typeof e.expanded=="boolean"&&e.expanded!==n.expanded?{expanded:e.expanded}:null}render(){const e=this.props,n=e.children,i=e.render,r=i===void 0?n:i;return typeof r=="function"?r({expanded:this.expanded,getToggleProps:(o={})=>({"aria-controls":this._contentId,"aria-expanded":this.expanded,onClick:lt(this.handleToggle,o.onClick),...o}),getDetailsProps:()=>({id:this._contentId})}):null}},sc.displayName="Expandable",sc.propTypes=zY,sc.allowedProps=HY,sc.defaultProps={defaultExpanded:!1,onToggle:function(){},children:null},sc))||hP);const WY=(t,e)=>{const n=e.overlay,i=e.withBlur,r=e.withGrayscale,o=e.constrain,s=o==="cover",a=o==="contain",l={transition:`all ${t.effectTransitionDuration}`},u=()=>{const p=[];return i&&p.push(`blur(${t.imageBlurAmount})`),r&&p.push("grayscale(1)"),p.length>0?{...l,filter:p.join(" ")}:{filter:"none"}},c={width:"100%",height:"100%"},d={objectFit:"cover",...c},h={objectFit:"contain",...c,...n&&{width:"auto",height:"auto",maxWidth:"100%",maxHeight:"100%"}};return{overlay:{label:"img__overlay",position:"absolute",top:"0px",left:"0px",width:"100%",height:"100%",...l,...n&&{backgroundColor:n.color,opacity:n.opacity*.1,mixBlendMode:n.blend?n.blend:void 0}},container:{label:"img__container",...n&&{position:"relative",overflow:"hidden"},...s&&c,...a&&{height:"inherit"}},img:{label:"img",margin:"0",padding:"0",float:"none",top:"auto",bottom:"auto",left:"auto",right:"auto",lineHeight:"normal",position:"static",transform:"none",maxHeight:"none",minHeight:"0",minWidth:"0",maxWidth:"100%",...u(),...n&&{display:"block"},...s&&d,...a&&h}}},VY=()=>({...{effectTransitionDuration:"1s",imageBlurAmount:"0.25em"}}),jY={src:f.string.isRequired,alt:f.string,display:f.oneOf(["inline-block","block"]),loading:f.oneOf(["eager","lazy"]),margin:ut.spacing,overlay:f.shape({color:f.string.isRequired,opacity:f.oneOf([0,1,2,3,4,5,6,7,8,9,10]).isRequired,blend:f.oneOf(["normal","multiply","screen","overlay","color-burn"])}),withGrayscale:f.bool,withBlur:f.bool,constrain:f.oneOf(["cover","contain"]),elementRef:f.func,height:f.oneOfType([f.string,f.number]),width:f.oneOfType([f.string,f.number])},XY=["src","alt","display","loading","margin","overlay","withGrayscale","withBlur","constrain","elementRef","height","width"],ZY=["src","alt","margin","display","overlay","withGrayscale","withBlur","constrain","width","height","elementRef","styles","loading"];var pP,mP,Cm,ul;let qY=(pP=de(WY,VY),mP=Le(),pP(Cm=mP(Cm=(ul=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){const e=this.props,n=e.src,i=e.alt,r=e.margin,o=e.display,s=e.overlay;e.withGrayscale,e.withBlur,e.constrain;const a=e.width,l=e.height;e.elementRef;const u=e.styles,c=e.loading,d=Ie(e,ZY),h={alt:i||""},p={css:u==null?void 0:u.img,src:n,loading:c},m={...It(d),width:a,height:l,margin:r,display:o,elementRef:this.handleRef};if(s){const O={...m};return C(ye,Object.assign({},O,{as:"span",css:u==null?void 0:u.container}),C("img",Object.assign({},p,h)),s&&C("span",{css:u==null?void 0:u.overlay}))}else return C(ye,Object.assign({},m,p,h,{as:"img"}))}},ul.displayName="Img",ul.componentId="Img",ul.propTypes=jY,ul.allowedProps=XY,ul.defaultProps={alt:"",display:"inline-block",withGrayscale:!1,withBlur:!1},ul))||Cm)||Cm);const YY=(t,e)=>{const n=e.size,i=e.delimiter,r=e.spacing,o=i!=="none",s=r!=="none";Ye(!(o&&s),"[InlineList] `itemSpacing` has no effect inside Lists with the `delimiter` prop set to anything other than `none`.");const a={small:{fontSize:t.fontSizeSmall},medium:{fontSize:t.fontSizeMedium},large:{fontSize:t.fontSizeLarge}},l={"xxx-small":{marginInlineStart:t.spacingXXXSmall,marginInlineEnd:t.spacingXXXSmall},"xx-small":{marginInlineStart:t.spacingXXSmall,marginInlineEnd:t.spacingXXSmall},"x-small":{marginInlineStart:t.spacingXSmall,marginInlineEnd:t.spacingXSmall},small:{marginInlineStart:t.spacingSmall,marginInlineEnd:t.spacingSmall},medium:{marginInlineStart:t.spacingMedium,marginInlineEnd:t.spacingMedium},large:{marginInlineStart:t.spacingLarge,marginInlineEnd:t.spacingLarge},"x-large":{marginInlineStart:t.spacingXLarge,marginInlineEnd:t.spacingXLarge},"xx-large":{marginInlineStart:t.spacingXXLarge,marginInlineEnd:t.spacingXXLarge},none:{}},u={none:{marginInlineStart:t.noneSpacing,marginInlineEnd:t.noneSpacing},pipe:{marginInlineStart:t.pipeSpacing,marginInlineEnd:t.pipeSpacing,"&::after":{content:'"\\007C"'}},slash:{marginInlineStart:t.slashSpacing,marginInlineEnd:t.slashSpacing,"&::after":{content:'"\\002F"'}},arrow:{marginInlineStart:t.arrowSpacing,marginInlineEnd:t.arrowSpacing,"&::after":{content:'"\\003E"'}}};return{inlineListItem:{label:"inlineListItem",fontWeight:t.fontWeight,fontFamily:t.fontFamily,verticalAlign:"middle",boxSizing:"border-box",lineHeight:t.lineHeight,color:t.color,...s&&!o&&l[r],...a[n],"&:first-of-type":{marginInlineStart:0},"&:last-of-type":{marginInlineEnd:0}},delimiter:{label:"inlineListItem__delimiter",...u[i],"[class$=-inlineListItem]:last-of-type > &:last-child::after":{content:"none"}}}},GY=t=>{const e=t.colors,n=t.spacing,i=t.typography,r=t.key,o={canvas:{color:t["ic-brand-font-color-dark"]}};return{...{fontFamily:i==null?void 0:i.fontFamily,fontWeight:i==null?void 0:i.fontWeightNormal,fontSizeSmall:i==null?void 0:i.fontSizeSmall,fontSizeMedium:i==null?void 0:i.fontSizeMedium,fontSizeLarge:i==null?void 0:i.fontSizeLarge,color:e==null?void 0:e.textDark,lineHeight:i==null?void 0:i.lineHeightCondensed,noneSpacing:n==null?void 0:n.xSmall,pipeSpacing:n==null?void 0:n.xSmall,slashSpacing:n==null?void 0:n.xSmall,arrowSpacing:n==null?void 0:n.xSmall,marginBottomDefault:n==null?void 0:n.xxxSmall,spacingXXXSmall:n==null?void 0:n.xxxSmall,spacingXXSmall:n==null?void 0:n.xxSmall,spacingXSmall:n==null?void 0:n.xSmall,spacingSmall:n==null?void 0:n.small,spacingMedium:n==null?void 0:n.medium,spacingLarge:n==null?void 0:n.large,spacingXLarge:n==null?void 0:n.xLarge,spacingXXLarge:n==null?void 0:n.xxLarge},...o[r]}},KY={children:f.oneOfType([f.node,f.func]).isRequired,delimiter:f.oneOf(["none","pipe","slash","arrow"]),size:f.oneOf(["small","medium","large"]),margin:ut.spacing,padding:ut.spacing,spacing:f.oneOf(["none","xxx-small","xx-small","x-small","small","medium","large","x-large","xx-large"]),elementRef:f.func},JY=["children","delimiter","size","margin","padding","spacing","elementRef"],eG=["delimiter","size","margin","padding","elementRef","children","spacing","styles"];var gP,OP,Tm,cl;let YM=(gP=de(YY,GY),OP=Le(),gP(Tm=OP(Tm=(cl=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){const e=this.props;e.delimiter,e.size;const n=e.margin,i=e.padding;e.elementRef;const r=e.children;e.spacing;const o=e.styles,s=Ie(e,eG);return C(ye,Object.assign({},It(s),{css:o==null?void 0:o.inlineListItem,as:"li",margin:n,padding:i,display:"inline-block",maxWidth:"100%",elementRef:this.handleRef}),r,C("span",{css:o==null?void 0:o.delimiter,"aria-hidden":"true"}))}},cl.displayName="InlineListItem",cl.componentId="InlineList.Item",cl.propTypes=KY,cl.allowedProps=JY,cl.defaultProps={padding:"none",spacing:"none",delimiter:"none",size:"medium"},cl))||Tm)||Tm);const tG={children:ft.oneOf([YM]),as:f.oneOf(["ul","ol"]),margin:ut.spacing,size:f.oneOf(["small","medium","large"]),delimiter:f.oneOf(["none","pipe","slash","arrow"]),itemSpacing:f.oneOf(["none","xxx-small","xx-small","x-small","small","medium","large","x-large","xx-large"]),elementRef:f.func},nG=["children","as","margin","size","delimiter","itemSpacing","elementRef"],iG=["as","margin","elementRef"];var bP,yP,dl;let _h=(bP=Le(),bP(yP=(dl=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}renderChildren(){return T.Children.map(this.props.children,e=>{if(e)return $t(e,{delimiter:this.props.delimiter,size:this.props.size,spacing:this.props.itemSpacing})})}render(){const e=this.props,n=e.as,i=e.margin;e.elementRef;const r=Ie(e,iG);return z.createElement(ye,Object.assign({},It(r),{as:n,margin:i,padding:"0",elementRef:this.handleRef,display:"block"}),this.renderChildren())}},dl.displayName="InlineList",dl.propTypes=tG,dl.allowedProps=nG,dl.defaultProps={itemSpacing:"none",as:"ul",margin:"none",delimiter:"none",size:"medium"},dl.Item=YM,dl))||yP);const rG=(t,e)=>{const n=e.size,i=e.delimiter,r=e.spacing,o=i!=="none",s=r!=="none";Ye(!(o&&s),"[List] `itemSpacing` has no effect inside Lists with the `delimiter` prop set to anything other than `none`.");const a={small:{fontSize:t.fontSizeSmall},medium:{fontSize:t.fontSizeMedium},large:{fontSize:t.fontSizeLarge}},l={"xxx-small":{marginTop:t.spacingXXXSmall,marginBottom:t.spacingXXXSmall},"xx-small":{marginTop:t.spacingXXSmall,marginBottom:t.spacingXXSmall},"x-small":{marginTop:t.spacingXSmall,marginBottom:t.spacingXSmall},small:{marginTop:t.spacingSmall,marginBottom:t.spacingSmall},medium:{marginTop:t.spacingMedium,marginBottom:t.spacingMedium},large:{marginTop:t.spacingLarge,marginBottom:t.spacingLarge},"x-large":{marginTop:t.spacingXLarge,marginBottom:t.spacingXLarge},"xx-large":{marginTop:t.spacingXXLarge,marginBottom:t.spacingXXLarge},none:{}},u={dashed:{listStylePosition:"inside","&:not(:first-of-type)":{borderTop:t.delimiterDashedBorder}},solid:{listStylePosition:"inside","&:not(:first-of-type)":{borderTop:t.delimiterSolidBorder}},none:{}};return{listItem:{label:"listItem",fontWeight:t.fontWeight,fontFamily:t.fontFamily,lineHeight:t.lineHeight,color:t.color,padding:0,...a[n],...s&&!o&&l[r],...o&&u[i],"&:first-of-type":{marginTop:"0"},"&:last-of-type":{marginBottom:"0"}}}},oG=t=>{const e=t.borders,n=t.colors,i=t.spacing,r=t.typography,o=t.key,s={canvas:{color:t["ic-brand-font-color-dark"]}};return{...{fontFamily:r==null?void 0:r.fontFamily,fontWeight:r==null?void 0:r.fontWeightNormal,lineHeight:r==null?void 0:r.lineHeight,fontSizeSmall:r==null?void 0:r.fontSizeSmall,fontSizeMedium:r==null?void 0:r.fontSizeMedium,fontSizeLarge:r==null?void 0:r.fontSizeLarge,color:n==null?void 0:n.textDarkest,spacingXXXSmall:i==null?void 0:i.xxxSmall,spacingXXSmall:i==null?void 0:i.xxSmall,spacingXSmall:i==null?void 0:i.xSmall,spacingSmall:i==null?void 0:i.small,spacingMedium:i==null?void 0:i.medium,spacingLarge:i==null?void 0:i.large,spacingXLarge:i==null?void 0:i.xLarge,spacingXXLarge:i==null?void 0:i.xxLarge,delimiterDashedBorder:`${e==null?void 0:e.widthSmall} dashed ${n==null?void 0:n.borderMedium}`,delimiterSolidBorder:`${e==null?void 0:e.widthSmall} solid ${n==null?void 0:n.borderMedium}`},...s[o]}},sG={children:f.oneOfType([f.node,f.func]).isRequired,delimiter:f.oneOf(["none","dashed","solid"]),size:f.oneOf(["small","medium","large"]),margin:ut.spacing,padding:ut.spacing,spacing:f.oneOf(["none","xxx-small","xx-small","x-small","small","medium","large","x-large","xx-large"]),elementRef:f.func},aG=["children","delimiter","size","margin","padding","spacing","elementRef"],lG=["delimiter","spacing","size","margin","padding","elementRef","children","styles"];var vP,SP,Pm,hl;let GM=(vP=de(rG,oG),SP=Le(),vP(Pm=SP(Pm=(hl=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){const e=this.props;e.delimiter,e.spacing,e.size;const n=e.margin,i=e.padding;e.elementRef;const r=e.children,o=e.styles,s=Ie(e,lG);return C(ye,Object.assign({},It(s),{css:o==null?void 0:o.listItem,as:"li",margin:n,padding:i,maxWidth:"100%",elementRef:this.handleRef}),r)}},hl.displayName="ListItem",hl.componentId="List.Item",hl.propTypes=sG,hl.allowedProps=aG,hl.defaultProps={padding:"none",spacing:"none",delimiter:"none",size:"medium"},hl))||Pm)||Pm);const uG=(t,e)=>{const n=e.isUnstyled,r=e.as==="ol";return{list:{label:"list",paddingInlineStart:t.listPadding,paddingInlineEnd:0,...r&&{listStyleType:"none",paddingInlineStart:`calc(${t.listPadding} / 2)`,paddingInlineEnd:0,counterReset:"ol-counter","&>li::before":{fontWeight:t.orderedNumberFontWeight,counterIncrement:"ol-counter",content:'counters(ol-counter, ".") "."',marginInlineEnd:t.orderedNumberMargin,marginInlineStart:0}},...n&&{listStyleType:"none",paddingInlineStart:0}}}},cG=t=>{const e=t.spacing,n=t.typography;return{...{listPadding:e==null?void 0:e.large,orderedNumberFontWeight:n==null?void 0:n.fontWeightBold,orderedNumberMargin:e==null?void 0:e.xSmall}}},dG={children:ft.oneOf([GM]),as:f.oneOf(["ul","ol"]),delimiter:f.oneOf(["none","dashed","solid"]),isUnstyled:f.bool,margin:ut.spacing,size:f.oneOf(["small","medium","large"]),itemSpacing:f.oneOf(["none","xxx-small","xx-small","x-small","small","medium","large","x-large","xx-large"]),elementRef:f.func},hG=["children","as","delimiter","isUnstyled","margin","size","itemSpacing","elementRef"],fG=["as","margin","isUnstyled","elementRef","styles"];var wP,kP,Am,ws;let Eh=(wP=de(uG,cG),kP=Le(),wP(Am=kP(Am=(ws=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}renderChildren(){return T.Children.map(this.props.children,e=>{if(e)return $t(e,{isUnstyled:this.props.isUnstyled,delimiter:this.props.delimiter,size:this.props.size,spacing:this.props.itemSpacing})})}render(){const e=this.props,n=e.as,i=e.margin;e.isUnstyled,e.elementRef;const r=e.styles,o=Ie(e,fG);return C(ye,Object.assign({},It(o),{css:r==null?void 0:r.list,as:n,margin:i,elementRef:this.handleRef,display:"block"}),this.renderChildren())}},ws.displayName="List",ws.componentId="List",ws.propTypes=dG,ws.allowedProps=hG,ws.defaultProps={as:"ul",delimiter:"none",isUnstyled:!1,size:"medium",itemSpacing:"none"},ws.Item=GM,ws))||Am)||Am);const pG=(t,e)=>{const n=e.itemSpacing,i=e.fixMenuTriggerWidth;return{truncateList:{label:"truncateList",boxSizing:"border-box",listStyleType:"none",margin:"0",padding:"0",overflow:"hidden",display:"flex",justifyContent:"flex-start",alignItems:"center"},listItem:{label:"truncateList__listItem",...{minWidth:"0.0625rem",flexShrink:0,flexGrow:0},"& + &":{paddingInlineStart:n}},menuTrigger:{label:"truncateList__menuTrigger",maxWidth:"100%",...i&&{width:i},paddingInlineStart:n,"&:first-of-type":{paddingInlineStart:0}}}},mG={children:f.node,visibleItemsCount:f.number,onUpdate:f.func,renderHiddenItemMenu:f.func,itemSpacing:f.string,fixMenuTriggerWidth:f.string,debounce:f.number,elementRef:f.func},xP=["children","renderHiddenItemMenu","visibleItemsCount","itemSpacing","fixMenuTriggerWidth","debounce","onUpdate","elementRef"];var _P,EP,Rm,fl;let KM=(_P=de(pG,null),EP=Le(),_P(Rm=EP(Rm=(fl=class extends T.Component{constructor(e){super(e),this.ref=null,this._menuTriggerRef=null,this._debouncedHandleResize=void 0,this._resizeListener=void 0,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.measureItems=()=>{const n=this.props,i=n.fixMenuTriggerWidth,r=n.itemSpacing,o=Yn(r),s=Yn(i||this.state.menuTriggerWidth);let a=0;if(this.ref){const l=jt(this.ref),u=l.width,c=Fr(this.ref),d=c.paddingInlineStart,h=c.paddingInlineEnd,p=u-Yn(d)-Yn(h),m=Array.from(this.ref.getElementsByTagName("li")).map(y=>jt(y).width);let O=0;for(let y=0;y{this.setState({isMeasuring:!0},()=>{const n=this.measureItems(),i=n.visibleItemsCount;typeof this.props.onUpdate=="function"&&this.props.onUpdate({visibleItemsCount:i}),this.setState({isMeasuring:!1})})},this.state={isMeasuring:!1,menuTriggerWidth:void 0}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n);const i=jt(this.ref),r=i.width;this._debouncedHandleResize=tb(this.handleResize,this.props.debounce,{leading:!0,trailing:!0}),this._resizeListener=new ResizeObserver(s=>{for(const l of s){const u=l.contentRect.width;if(r!==u){var a;(a=this._debouncedHandleResize)===null||a===void 0||a.call(this)}}});const o=this.props.fixMenuTriggerWidth?Yn(this.props.fixMenuTriggerWidth):this.calcMenuTriggerWidth();this.setState({menuTriggerWidth:o},()=>{var s,a;(s=this._resizeListener)===null||s===void 0||s.observe(this.ref),(a=this._debouncedHandleResize)===null||a===void 0||a.call(this)})}componentDidUpdate(e,n){var i,r;if((i=(r=this.props).makeStyles)===null||i===void 0||i.call(r),e.fixMenuTriggerWidth!==this.props.fixMenuTriggerWidth||e.itemSpacing!==this.props.itemSpacing){var o;(o=this._debouncedHandleResize)===null||o===void 0||o.call(this)}if(this.ref&&n.isMeasuring&&n.isMeasuring!==this.state.isMeasuring){const s=this.calcMenuTriggerWidth();s&&this.state.menuTriggerWidth!==s&&this.setState({menuTriggerWidth:s},()=>{var a;(a=this._debouncedHandleResize)===null||a===void 0||a.call(this)})}}componentWillUnmount(){this._resizeListener&&this._resizeListener.disconnect(),this._debouncedHandleResize&&this._debouncedHandleResize.cancel()}get childrenArray(){return T.Children.toArray(this.props.children)}get visibleChildren(){const e=this.props.visibleItemsCount,n=this.state,i=n.isMeasuring;if(typeof n.menuTriggerWidth>"u")return[];const o=typeof e>"u"?this.childrenArray:this.childrenArray.splice(0,e);return i?this.childrenArray:o}get hiddenChildren(){return this.state.isMeasuring?[]:this.childrenArray.splice(this.visibleChildren.length,this.childrenArray.length)}calcMenuTriggerWidth(){const e=this.props.fixMenuTriggerWidth;if(!this._menuTriggerRef)return 0;if(e)return Yn(e);const n=this._menuTriggerRef.children;let i=0;return Array.from(n).forEach(r=>{i+=jt(r).width}),i}render(){const e=this.props,n=e.styles,i=e.className,r=e.style,o=e.renderHiddenItemMenu,s=this.visibleChildren,a=this.hiddenChildren;return C("ul",Object.assign({ref:this.handleRef},Re(this.props,xP),{className:i,style:r,css:n==null?void 0:n.truncateList}),s.map((l,u)=>C("li",{key:u,css:n==null?void 0:n.listItem},l)),typeof o=="function"&&a&&a.length>0&&C("li",{key:"menuTrigger",css:[n==null?void 0:n.listItem,n==null?void 0:n.menuTrigger],ref:l=>{this._menuTriggerRef=l}},o(a)))}},fl.displayName="TruncateList",fl.componentId="TruncateList",fl.propTypes=mG,fl.allowedProps=xP,fl.defaultProps={itemSpacing:"0",debounce:300},fl))||Rm)||Rm);const gG=(t,e)=>{const n=e.disabled,i=e.variant,r=e.context,o=e.size,s=e.inline,a=p=>`[class$=-radioInput__input]:${p} + [class$=-radioInput__control] &`,l={success:{backgroundColor:t.toggleBackgroundSuccess},danger:{backgroundColor:t.toggleBackgroundDanger},warning:{backgroundColor:t.toggleBackgroundWarning},off:{backgroundColor:t.toggleBackgroundOff}},u={simple:{base:{boxSizing:"border-box",display:"block",position:"relative",marginInlineEnd:t.simpleFacadeMarginEnd,marginInlineStart:"0",flexShrink:0,minWidth:"1rem",transition:"all 0.2s ease-out",borderRadius:"100%",border:`${t.borderWidth} solid ${t.borderColor}`,background:t.background,"&::before":{content:'""',position:"absolute",top:"-0.375rem",left:"-0.375rem",width:"calc(100% + 0.75rem)",height:"calc(100% + 0.75rem)",boxSizing:"border-box",borderRadius:"100%",border:`${t.focusBorderWidth} ${t.focusBorderStyle} ${t.focusBorderColor}`,transition:"all 0.2s",transform:"scale(0.75)",opacity:0,pointerEvents:"none"},[a("hover")]:{borderColor:t.hoverBorderColor},[a("focus")]:{background:t.background,"&::before":{transform:"scale(1)",opacity:1}}},small:{width:t.simpleFacadeSmallSize,height:t.simpleFacadeSmallSize,[a("checked")]:{background:t.background,boxShadow:`inset 0 0 0 ${t.simpleCheckedInsetSmall} ${t.hoverBorderColor}`,borderColor:t.hoverBorderColor}},medium:{width:t.simpleFacadeMediumSize,height:t.simpleFacadeMediumSize,[a("checked")]:{background:t.background,boxShadow:`inset 0 0 0 ${t.simpleCheckedInsetMedium} ${t.hoverBorderColor}`,borderColor:t.hoverBorderColor}},large:{width:t.simpleFacadeLargeSize,height:t.simpleFacadeLargeSize,[a("checked")]:{background:t.background,boxShadow:`inset 0 0 0 ${t.simpleCheckedInsetLarge} ${t.hoverBorderColor}`,borderColor:t.hoverBorderColor}}},toggle:{base:{boxSizing:"border-box",visibility:"hidden",display:"block",position:"absolute",zIndex:1,top:"0",left:"0",width:"100%",height:"100%",boxShadow:t.toggleShadow,borderRadius:t.toggleBorderRadius,...l[r],"&::before":{content:'""',position:"absolute",top:"-0.25rem",left:"-0.25rem",width:"calc(100% + 0.5rem)",height:"calc(100% + 0.5rem)",boxSizing:"border-box",borderRadius:`calc(${t.toggleBorderRadius} + 0.0625rem)`,border:`${t.focusBorderWidth} ${t.focusBorderStyle} ${t.focusBorderColor}`,transition:"all 0.2s",transform:"scale(0.75)",opacity:0},[a("checked")]:{visibility:"visible"},[a("focus")]:{"&::before":{opacity:1,transform:"scale(1)"}}},small:{},medium:{},large:{}}},c={simple:{base:{display:"flex",alignItems:"flex-start"},small:{},medium:{},large:{}},toggle:{base:{display:"block",userSelect:"none",boxSizing:"border-box",position:"relative"},small:{padding:"0 0.5rem",height:t.toggleSmallHeight},medium:{padding:"0 0.875rem",height:t.toggleMediumHeight},large:{padding:"0 1rem",height:t.toggleLargeHeight}}},d={simple:{base:{},small:{fontSize:t.simpleFontSizeSmall},medium:{fontSize:t.simpleFontSizeMedium},large:{fontSize:t.simpleFontSizeLarge}},toggle:{base:{position:"relative",zIndex:1,textTransform:"uppercase",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",lineHeight:1,display:"flex",alignItems:"center",minWidth:"0.0625rem",[a("checked")]:{color:t.toggleHandleText},[a("focus")]:{textDecoration:"underline"}},small:{fontSize:t.toggleSmallFontSize,height:t.toggleSmallHeight,svg:{fontSize:`calc(${t.toggleSmallFontSize} + 0.375rem)`}},medium:{fontSize:t.toggleMediumFontSize,height:t.toggleMediumHeight,svg:{fontSize:`calc(${t.toggleMediumFontSize} + 0.375rem)`}},large:{fontSize:t.toggleLargeFontSize,height:t.toggleLargeHeight,svg:{fontSize:`calc(${t.toggleLargeFontSize} + 0.375rem)`}}}},h={padding:"0",margin:"0",fontSize:"inherit",lineHeight:"inherit",width:"auto",position:"absolute",top:"0",left:"0",opacity:1e-4};return{radioInput:{label:"radioInput",position:"relative",width:"100%",...n&&{opacity:.5},...s&&{display:"inline-block",verticalAlign:"middle",width:"auto"},"&:hover":{cursor:"default",...n&&{cursor:"not-allowed"}}},input:{label:"radioInput__input",...h,'&:is(input)[type="radio"]':h,'&:-webkit-any(input)[type="radio"]':h},control:{label:"radioInput__control",all:"initial",display:"block",direction:"inherit",textAlign:"start",...c[i].base,...c[i][o]},facade:{label:"radioInput__facade",...u[i].base,...u[i][o]},label:{label:"radioInput__label",flex:"1 1 auto",color:t.labelColor,fontFamily:t.labelFontFamily,fontWeight:t.labelFontWeight,lineHeight:t.labelLineHeight,...d[i].base,...d[i][o],cursor:"default"}}},OG=t=>{const e=t.spacing,n=t.borders,i=t.colors,r=t.forms,o=t.shadows,s=t.typography,a=t.key,l={canvas:{focusBorderColor:t["ic-brand-primary"],hoverBorderColor:t["ic-brand-font-color-dark"],labelColor:t["ic-brand-font-color-dark"]},"canvas-high-contrast":{toggleBackgroundOff:i==null?void 0:i.backgroundDarkest}};return{...{labelColor:i==null?void 0:i.textDarkest,labelFontFamily:s==null?void 0:s.fontFamily,labelFontWeight:s==null?void 0:s.fontWeightNormal,labelLineHeight:s==null?void 0:s.lineHeightCondensed,background:i==null?void 0:i.backgroundLightest,borderWidth:n==null?void 0:n.widthSmall,borderColor:i==null?void 0:i.borderMedium,hoverBorderColor:i==null?void 0:i.borderDarkest,controlSize:"0.1875rem",focusBorderColor:i==null?void 0:i.borderBrand,focusBorderWidth:n==null?void 0:n.widthMedium,focusBorderStyle:n==null?void 0:n.style,simpleFacadeSmallSize:"1rem",simpleFacadeMediumSize:"1.25rem",simpleFacadeLargeSize:"1.75rem",simpleCheckedInsetSmall:"0.1875rem",simpleCheckedInsetMedium:"0.25rem",simpleCheckedInsetLarge:"0.375rem",simpleFontSizeSmall:s==null?void 0:s.fontSizeSmall,simpleFontSizeMedium:s==null?void 0:s.fontSizeMedium,simpleFontSizeLarge:s==null?void 0:s.fontSizeLarge,simpleFacadeMarginEnd:e==null?void 0:e.xSmall,toggleBorderRadius:n==null?void 0:n.radiusSmall,toggleBorderWidth:n==null?void 0:n.widthLarge,toggleBackgroundSuccess:i==null?void 0:i.backgroundSuccess,toggleBackgroundOff:i==null?void 0:i.backgroundDark,toggleBackgroundDanger:i==null?void 0:i.backgroundDanger,toggleBackgroundWarning:i==null?void 0:i.backgroundWarning,toggleHandleText:i==null?void 0:i.textLightest,toggleSmallHeight:r==null?void 0:r.inputHeightSmall,toggleMediumHeight:r==null?void 0:r.inputHeightMedium,toggleLargeHeight:r==null?void 0:r.inputHeightLarge,toggleShadow:o==null?void 0:o.depth1,toggleSmallFontSize:s==null?void 0:s.fontSizeXSmall,toggleMediumFontSize:s==null?void 0:s.fontSizeSmall,toggleLargeFontSize:s==null?void 0:s.fontSizeMedium},...l[a]}},bG={label:f.node.isRequired,value:f.oneOfType([f.string,f.number]),id:f.string,name:f.string,checked:f.bool,disabled:f.bool,readOnly:f.bool,variant:f.oneOf(["simple","toggle"]),size:f.oneOf(["small","medium","large"]),context:f.oneOf(["success","warning","danger","off"]),inline:f.bool,onClick:f.func,onChange:f.func},yG=["label","value","id","name","checked","disabled","readOnly","variant","size","context","inline","onClick","onChange"];var CP,TP,PP,ac,pl;let Il=(CP=zt(),TP=de(gG,OG),PP=Le(),CP(ac=TP(ac=PP(ac=(pl=class JM extends T.Component{constructor(e){super(e),this.ref=null,this._defaultId=void 0,this._input=null,this.handleClick=n=>{if(this.props.disabled||this.props.readOnly){n.preventDefault();return}typeof this.props.onClick=="function"&&this.props.onClick(n)},this.handleChange=n=>{if(this.props.disabled||this.props.readOnly){n.preventDefault();return}typeof this.props.checked>"u"&&this.setState({checked:!this.state.checked}),typeof this.props.onChange=="function"&&this.props.onChange(n)},typeof e.checked>"u"&&(this.state={checked:!1}),this._defaultId=e.deterministicId()}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}focus(){var e;(e=this._input)===null||e===void 0||e.focus()}get id(){return this.props.id||this._defaultId}get focused(){return xo(this._input)}get checked(){return typeof this.props.checked>"u"?this.state.checked:this.props.checked}render(){const e=this.props,n=e.disabled,i=e.readOnly,r=e.label,o=e.value,s=e.name,a=e.styles,l=Re(this.props,JM.allowedProps);return C("div",{css:a==null?void 0:a.radioInput,ref:u=>{this.ref=u}},C("input",Object.assign({},l,{id:this.id,ref:u=>{this._input=u},value:o,name:s,checked:this.checked,type:"radio",css:a==null?void 0:a.input,disabled:n||i,"aria-disabled":n||i?"true":void 0,onChange:this.handleChange,onClick:this.handleClick})),C("label",{css:a==null?void 0:a.control,htmlFor:this.id},C("span",{css:a==null?void 0:a.facade,"aria-hidden":"true"}),C("span",{css:a==null?void 0:a.label},r)))}},pl.displayName="RadioInput",pl.componentId="RadioInput",pl.allowedProps=yG,pl.propTypes=bG,pl.defaultProps={variant:"simple",size:"medium",disabled:!1,inline:!1,context:"success",readOnly:!1},pl))||ac)||ac)||ac);const vG={name:f.string.isRequired,description:f.node.isRequired,defaultValue:f.oneOfType([f.string,f.number]),value:yu(f.oneOfType([f.string,f.number])),onChange:f.func,disabled:f.bool,readOnly:f.bool,messages:f.arrayOf(cs.message),children:f.node,variant:f.oneOf(["simple","toggle"]),size:f.oneOf(["small","medium","large"]),layout:f.oneOf(["stacked","columns","inline"])},SG=["name","description","defaultValue","value","onChange","disabled","readOnly","messages","children","variant","size","layout"];var AP,RP,Im,ml;let wy=(AP=zt(),RP=Le(),AP(Im=RP(Im=(ml=class e6 extends T.Component{constructor(e){super(e),this.ref=null,this._messagesId=void 0,this.handleRef=n=>{this.ref=n},this.handleChange=n=>{const i=n.target.value;if(this.props.disabled||this.props.readOnly){n.preventDefault();return}typeof this.props.value>"u"&&this.setState({value:i}),typeof this.props.onChange=="function"&&this.props.onChange(n,i)},typeof e.value>"u"&&(this.state={value:e.defaultValue}),this._messagesId=e.deterministicId("RadioInputGroup-messages")}get hasMessages(){return!!this.props.messages&&this.props.messages.length>0}get value(){return typeof this.props.value>"u"?this.state.value:this.props.value}renderChildren(){const e=this.props,n=e.children,i=e.name,r=e.variant,o=e.size,s=e.disabled,a=e.readOnly;return T.Children.map(n,(l,u)=>{if(Me(l,[Il])){const c=this.value===l.props.value,d=!this.value&&u===0;return $t(l,{name:i,disabled:s||l.props.disabled,variant:r,size:o,checked:c,onChange:this.handleChange,readOnly:a||l.props.readOnly,width:l.props.width||"auto","aria-describedby":this.hasMessages?this._messagesId:void 0,tabIndex:c||d?0:-1,label:l.props.label})}else return l})}render(){const e=this.props,n=e.variant,i=e.layout,r=e.description;return z.createElement(Zv,Object.assign({},Re(this.props,e6.allowedProps),us(this.props,Zv.allowedProps),{description:r,layout:i==="columns"&&n==="toggle"?"stacked":i,vAlign:n==="toggle"?"middle":"top",rowSpacing:"small",colSpacing:n==="toggle"?"none":"small",startAt:n==="toggle"?"small":void 0,messagesId:this._messagesId,elementRef:this.handleRef}),this.renderChildren())}},ml.displayName="RadioInputGroup",ml.componentId="RadioInputGroup",ml.allowedProps=SG,ml.propTypes=vG,ml.defaultProps={disabled:!1,variant:"simple",size:"medium",layout:"stacked",readOnly:!1},ml))||Im)||Im);function wG(t,e){const n={};return Object.keys(t).forEach(i=>{const r=t[i],o=r.minWidth,s=r.maxWidth,a=r.minHeight,l=r.maxHeight;n[i]={minWidth:o&&Yn(o,e)||0,maxWidth:s&&Yn(s,e)||1/0,minHeight:a&&Yn(a,e)||0,maxHeight:l&&Yn(l,e)||1/0}}),function({width:i,height:r}){const o={};return Object.entries(n).forEach(([s,a])=>{const l=a.minWidth,u=a.maxWidth,c=a.minHeight,d=a.maxHeight;o[s]=l<=i&&i<=u&&c<=r&&r<=d}),o}}const kG=(t,e,n)=>{const i=typeof e=="function"?e():e,r=jt(i),o=r.width,s=r.height;let a=[];const l=d=>{const h=t6(t,i,a,d);h&&(a=h,n(a))},u=tb(l,100,{leading:!1,trailing:!0}),c=new ResizeObserver(d=>{for(const h of d){const p=h.contentRect,m=p.width,O=p.height;o!==m&&u({width:m,height:O})}});return c.observe(i),l({width:o,height:s}),{remove(){c&&c.disconnect(),u&&u.cancel()}}};function t6(t,e,n=[],i){const r=it(e);let o=i||jt(r),s=o.width,a=o.height;s=Math.floor(s),a=Math.floor(a);const l=wG(t,r)({width:s,height:a}),u=Object.keys(l).filter(c=>l[c]).map(c=>c);return n.length!==u.length||n.filter(c=>u.indexOf(c)===-1).length>0?u:null}function n6(t,e){const n=Object.keys(t);if(n.length>4)throw new Error("Expected maximum 4 keys in query object.");let i="";const r="and";for(const o of n){const s=["minHeight","maxHeight","minWidth","maxWidth"];if(s.indexOf(o)===-1)throw new Error(`Invalid key \`${o}\` in query object. Valid keys should consist of one of the following: ${s.join(", ")} (case sensitive)`);const a=t[o];if(typeof a!="string"&&typeof a!="number")throw new Error("The value of the query object must be a string or number.");if(!a)throw new Error("No value supplied for query object");i+=`(${xG(o)}: ${Yn(a,e)}px) ${r} `}return i.slice(0,-r.length-2)}function xG(t){const e=t.toLowerCase();return e.slice(0,3)+"-"+e.slice(3)}const _G=(t,e,n,i=NW)=>{const r=typeof e=="function"?e():e,o=l=>{const u=Object.keys(l).filter(c=>l[c].matches).map(c=>c);n(u)},s={},a=()=>{o(s)};return Object.keys(t).forEach(l=>{const u=i(n6(t[l],r),r);u&&(u.addListener(a),s[l]=u)}),o(s),{remove(){s&&Object.keys(s).forEach(l=>{s[l].removeListener(a)})}}},EG={validQuery(t,e,n){try{return n6(t[e]),null}catch(i){return new Error(`Invalid query prop supplied to \`${n}\`. ${i.message}`)}}},CG={match:f.oneOf(["element","media"]),query:f.objectOf(EG.validQuery).isRequired,props:f.objectOf(f.object),render:f.func,children:f.func,display:f.oneOf(["inline","block","inline-block","flex","inline-flex"]),elementRef:f.func},TG=["match","query","props","render","children","display","elementRef"];class Pp extends T.Component{constructor(...e){super(...e),this.ref=null,this._matchListener=null,this.state={matches:[],hasRendered:!1},this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.updateMatches=(n,i)=>{this.setState({matches:n},()=>{typeof i=="function"&&i()})}}componentDidMount(){if(Ye(!!(this.props.render||this.props.children),"[Responsive] must have either a `render` prop or `children` prop."),this.props.match==="element"){const e=t6(this.props.query,this)||[];this.setState({matches:e,hasRendered:!0})}else this.setState({hasRendered:!0});this._matchListener=this.addMatchListener(this.props.query,this.updateMatches)}componentWillUnmount(){this.removeMatchListener()}componentDidUpdate(e){const n=this.props,i=n.match,r=n.query;(i!==e.match||!GO(r,e.query))&&(this.removeMatchListener(),this._matchListener=this.addMatchListener(r,this.updateMatches,i))}addMatchListener(e,n,i=this.props.match){return(i==="element"?kG:_G)(e,()=>it(this),n)}removeMatchListener(){this._matchListener&&this._matchListener.remove()}mergeProps(e,n){if(!n)return null;const i={};return e.forEach(r=>{const o=n[r];Object.keys(o).forEach(s=>{const a=i[s];Ne(!(s in i),[`[Responsive] The prop \`${s}\` is defined at 2 or more breakpoints`,`which are currently applied at the same time. Its current value, \`${a}\`,`,`will be overwritten as \`${o[s]}\`.`].join(" ")),i[s]=o[s]})}),i}render(){const e=this.state,n=e.matches,i=e.hasRendered,r=this.props,o=r.props,s=r.render,a=r.children,l=r.display;let u;return i&&(u=a||s),z.createElement("div",{ref:this.handleRef,style:{display:l}},u&&u(this.mergeProps(n,o),n))}}Pp.displayName="Responsive";Pp.allowedProps=TG;Pp.propTypes=CG;Pp.defaultProps={children:null,match:"element",props:null};const PG={id:f.string.isRequired,value:f.oneOfType([f.string,f.number]).isRequired,isDisabled:f.bool,renderBeforeLabel:f.oneOfType([f.node,f.func]),renderAfterLabel:f.oneOfType([f.node,f.func]),children:f.string},AG=["id","value","isDisabled","renderBeforeLabel","renderAfterLabel","children"];let $r=class extends T.Component{render(){return null}};$r.displayName="Option";$r.componentId="SimpleSelect.Option";$r.allowedProps=AG;$r.propTypes=PG;$r.defaultProps={isDisabled:!1};const RG={renderLabel:f.oneOfType([f.node,f.func]).isRequired,children:ft.oneOf([$r])},IG=["renderLabel","children"];class ho extends T.Component{render(){return null}}ho.displayName="Group";ho.componentId="SimpleSelect.Group";ho.allowedProps=IG;ho.propTypes=RG;ho.defaultProps={};const $G={renderLabel:f.oneOfType([f.node,f.func]).isRequired,value:f.oneOfType([f.string,f.number]),defaultValue:f.string,id:f.string,size:f.oneOf(["small","medium","large"]),assistiveText:f.string,placeholder:f.string,interaction:f.oneOf(["enabled","disabled","readonly"]),isRequired:f.bool,isInline:f.bool,width:f.string,visibleOptionsCount:f.number,optionsMaxHeight:f.string,optionsMaxWidth:f.string,messages:f.arrayOf(cs.message),placement:Kt.placement,constrain:Kt.constrain,mountNode:Kt.mountNode,onChange:f.func,onFocus:f.func,onBlur:f.func,onShowOptions:f.func,onHideOptions:f.func,inputRef:f.func,listRef:f.func,renderEmptyOption:f.oneOfType([f.node,f.func]),renderBeforeInput:f.oneOfType([f.node,f.func]),renderAfterInput:f.oneOfType([f.node,f.func]),children:ft.oneOf([ho,$r])},LG=["renderLabel","value","defaultValue","id","size","assistiveText","placeholder","interaction","isRequired","isInline","width","visibleOptionsCount","optionsMaxHeight","optionsMaxWidth","messages","placement","constrain","mountNode","onChange","onFocus","onBlur","onShowOptions","onHideOptions","inputRef","listRef","renderEmptyOption","renderBeforeInput","renderAfterInput","children"],NG=["id","value","children","renderBeforeLabel","renderAfterLabel"],MG=["id","renderLabel","children"],DG=["renderLabel","value","defaultValue","id","size","assistiveText","placeholder","interaction","isRequired","isInline","width","optionsMaxWidth","optionsMaxHeight","visibleOptionsCount","messages","placement","constrain","mountNode","inputRef","listRef","renderEmptyOption","renderBeforeInput","renderAfterInput","onFocus","onBlur","onShowOptions","onHideOptions","children"];var IP,$P,$m,Qo;let LP=(IP=zt(),$P=Le(),IP($m=$P($m=(Qo=class extends T.Component{constructor(e){super(e),this.ref=null,this._emptyOptionId=void 0,this.getOption=(i,r)=>{const o=T.Children.toArray(this.props.children);let s;for(let a=0;a{this.ref=i},this.handleBlur=i=>{this.setState({highlightedOptionId:void 0}),typeof this.props.onBlur=="function"&&this.props.onBlur(i)},this.handleShowOptions=i=>{this.setState({isShowingOptions:!0}),typeof this.props.onShowOptions=="function"&&this.props.onShowOptions(i)},this.handleHideOptions=i=>{this.setState(r=>{const o=this.getOption("id",r.selectedOptionId);return{isShowingOptions:!1,highlightedOptionId:void 0,inputValue:o?o.props.children:""}}),typeof this.props.onHideOptions=="function"&&this.props.onHideOptions(i)},this.handleHighlightOption=(i,{id:r})=>{if(r===this._emptyOptionId)return;const o=this.getOption("id",r),s=o==null?void 0:o.props.children,a=i.type==="keydown"?s:this.state.inputValue;this.setState({highlightedOptionId:r,inputValue:a})},this.handleSelectOption=(i,{id:r})=>{if(r===this._emptyOptionId){this.setState({isShowingOptions:!1});return}const o=this.getOption("id",r),s=o&&o.props.value;this.isControlled?this.setState({isShowingOptions:!1}):this.setState(a=>({isShowingOptions:!1,selectedOptionId:r,inputValue:o?o.props.children:a.inputValue})),o&&typeof this.props.onChange=="function"&&this.props.onChange(i,{value:s,id:r}),typeof this.props.onHideOptions=="function"&&this.props.onHideOptions(i)};const n=this.getInitialOption(e);this.state={inputValue:n?n.props.children:"",isShowingOptions:!1,highlightedOptionId:void 0,selectedOptionId:n?n.props.id:void 0},this._emptyOptionId=e.deterministicId("Select-EmptyOption")}get _select(){return this.ref}focus(){this.ref&&this.ref.focus()}get focused(){return this.ref?this.ref.focused:!1}get id(){return this.ref?this.ref.id:void 0}get isControlled(){return typeof this.props.value<"u"}get interaction(){return Yo({props:this.props})}componentDidUpdate(e){if(this.props.value!==e.value){let n=this.getOption("value",this.props.value);typeof this.props.value>"u"&&(n=this.getOption("value",e.value)),this.setState({inputValue:n?n.props.children:"",selectedOptionId:n?n.props.id:""})}}getInitialOption(e){const n=e.value,i=e.defaultValue,r=n||i;return typeof r=="string"||typeof r=="number"?this.getOption("value",r):this.getFirstOption()}getOptionLabelById(e){const n=this.getOption("id",e);return n?n.props.children:""}getFirstOption(){const e=T.Children.toArray(this.props.children);let n;for(let i=0;iMe(n,[$r])?this.renderOption(n):Me(n,[ho])?this.renderGroup(n):null).filter(n=>!!n),e.length===0?this.renderEmptyOption():e}renderEmptyOption(){return z.createElement(Em.Option,{id:this._emptyOptionId,isHighlighted:!1,isSelected:!1},rt(this.props.renderEmptyOption))}renderOption(e){const n=e.props,i=n.id,r=n.value,o=n.children,s=n.renderBeforeLabel,a=n.renderAfterLabel,l=Ie(n,NG),u=e.props.isDisabled,c=i===this.state.selectedOptionId,d=i===this.state.highlightedOptionId,h=p=>{var m;return typeof p=="function"&&!(p!=null&&(m=p.prototype)!==null&&m!==void 0&&m.isReactComponent)?p.bind(null,{id:i,isDisabled:u,isSelected:c,isHighlighted:d,children:o}):p};return z.createElement(Em.Option,Object.assign({id:i,value:r,key:e.key||i,isHighlighted:i===this.state.highlightedOptionId,isSelected:i===this.state.selectedOptionId,isDisabled:e.props.isDisabled,renderBeforeLabel:h(s),renderAfterLabel:h(a)},It(l)),o)}renderGroup(e){const n=e.props,i=n.id,r=n.renderLabel,o=n.children,s=Ie(n,MG);return z.createElement(Em.Group,Object.assign({renderLabel:r,key:e.key||i},It(s)),T.Children.map(o,a=>this.renderOption(a)))}render(){const e=this.props,n=e.renderLabel;e.value,e.defaultValue;const i=e.id,r=e.size,o=e.assistiveText,s=e.placeholder;e.interaction;const a=e.isRequired,l=e.isInline,u=e.width,c=e.optionsMaxWidth,d=e.optionsMaxHeight,h=e.visibleOptionsCount,p=e.messages,m=e.placement,O=e.constrain,y=e.mountNode,b=e.inputRef,v=e.listRef;e.renderEmptyOption;const S=e.renderBeforeInput,k=e.renderAfterInput,x=e.onFocus;e.onBlur,e.onShowOptions,e.onHideOptions,e.children;const _=Ie(e,DG);return z.createElement(Em,Object.assign({renderLabel:n,inputValue:this.state.inputValue,isShowingOptions:this.state.isShowingOptions,id:i,size:r,assistiveText:o,placeholder:s,interaction:this.interaction,isRequired:a,isInline:l,width:u,optionsMaxWidth:c,optionsMaxHeight:d,visibleOptionsCount:h,messages:p,placement:m,constrain:O,mountNode:y,ref:this.handleRef,inputRef:b,listRef:v,renderBeforeInput:S,renderAfterInput:k,onFocus:x,onBlur:this.handleBlur,onRequestShowOptions:this.handleShowOptions,onRequestHideOptions:this.handleHideOptions,onRequestHighlightOption:this.handleHighlightOption,onRequestSelectOption:this.handleSelectOption},It(_)),this.renderChildren())}},Qo.displayName="SimpleSelect",Qo.componentId="SimpleSelect",Qo.Option=$r,Qo.Group=ho,Qo.allowedProps=LG,Qo.propTypes=$G,Qo.defaultProps={size:"medium",isRequired:!1,isInline:!1,visibleOptionsCount:8,placement:"bottom stretch",constrain:"window",renderEmptyOption:"---"},Qo))||$m)||$m);class ot{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,n,i){[e,n]=dd(this,e,n);let r=[];return this.decompose(0,e,r,2),i.length&&i.decompose(0,i.length,r,3),this.decompose(n,this.length,r,1),uo.from(r,this.length-(n-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){[e,n]=dd(this,e,n);let i=[];return this.decompose(e,n,i,0),uo.from(i,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),r=new cf(this),o=new cf(e);for(let s=n,a=n;;){if(r.next(s),o.next(s),s=0,r.lineBreak!=o.lineBreak||r.done!=o.done||r.value!=o.value)return!1;if(a+=r.value.length,r.done||a>=i)return!0}}iter(e=1){return new cf(this,e)}iterRange(e,n=this.length){return new i6(this,e,n)}iterLines(e,n){let i;if(e==null)i=this.iter();else{n==null&&(n=this.lines+1);let r=this.line(e).from;i=this.iterRange(r,Math.max(r,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new r6(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?ot.empty:e.length<=32?new Ht(e):uo.from(Ht.split(e,[]))}}class Ht extends ot{constructor(e,n=BG(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,i,r){for(let o=0;;o++){let s=this.text[o],a=r+s.length;if((n?i:a)>=e)return new QG(r,a,i,s);r=a+1,i++}}decompose(e,n,i,r){let o=e<=0&&n>=this.length?this:new Ht(NP(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(r&1){let s=i.pop(),a=Dg(o.text,s.text.slice(),0,o.length);if(a.length<=32)i.push(new Ht(a,s.length+o.length));else{let l=a.length>>1;i.push(new Ht(a.slice(0,l)),new Ht(a.slice(l)))}}else i.push(o)}replace(e,n,i){if(!(i instanceof Ht))return super.replace(e,n,i);[e,n]=dd(this,e,n);let r=Dg(this.text,Dg(i.text,NP(this.text,0,e)),n),o=this.length+i.length-(n-e);return r.length<=32?new Ht(r,o):uo.from(Ht.split(r,[]),o)}sliceString(e,n=this.length,i=` -`){[e,n]=dd(this,e,n);let r="";for(let o=0,s=0;o<=n&&se&&s&&(r+=i),eo&&(r+=a.slice(Math.max(0,e-o),n-o)),o=l+1}return r}flatten(e){for(let n of this.text)e.push(n)}scanIdentical(){return 0}static split(e,n){let i=[],r=-1;for(let o of e)i.push(o),r+=o.length+1,i.length==32&&(n.push(new Ht(i,r)),i=[],r=-1);return r>-1&&n.push(new Ht(i,r)),n}}class uo extends ot{constructor(e,n){super(),this.children=e,this.length=n,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,n,i,r){for(let o=0;;o++){let s=this.children[o],a=r+s.length,l=i+s.lines-1;if((n?l:a)>=e)return s.lineInner(e,n,i,r);r=a+1,i=l+1}}decompose(e,n,i,r){for(let o=0,s=0;s<=n&&o=s){let u=r&((s<=e?1:0)|(l>=n?2:0));s>=e&&l<=n&&!u?i.push(a):a.decompose(e-s,n-s,i,u)}s=l+1}}replace(e,n,i){if([e,n]=dd(this,e,n),i.lines=o&&n<=a){let l=s.replace(e-o,n-o,i),u=this.lines-s.lines+l.lines;if(l.lines>4&&l.lines>u>>6){let c=this.children.slice();return c[r]=l,new uo(c,this.length-(n-e)+i.length)}return super.replace(o,a,l)}o=a+1}return super.replace(e,n,i)}sliceString(e,n=this.length,i=` -`){[e,n]=dd(this,e,n);let r="";for(let o=0,s=0;oe&&o&&(r+=i),es&&(r+=a.sliceString(e-s,n-s,i)),s=l+1}return r}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof uo))return 0;let i=0,[r,o,s,a]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=n,o+=n){if(r==s||o==a)return i;let l=this.children[r],u=e.children[o];if(l!=u)return i+l.scanIdentical(u,n);i+=l.length+1}}static from(e,n=e.reduce((i,r)=>i+r.length+1,-1)){let i=0;for(let p of e)i+=p.lines;if(i<32){let p=[];for(let m of e)m.flatten(p);return new Ht(p,n)}let r=Math.max(32,i>>5),o=r<<1,s=r>>1,a=[],l=0,u=-1,c=[];function d(p){let m;if(p.lines>o&&p instanceof uo)for(let O of p.children)d(O);else p.lines>s&&(l>s||!l)?(h(),a.push(p)):p instanceof Ht&&l&&(m=c[c.length-1])instanceof Ht&&p.lines+m.lines<=32?(l+=p.lines,u+=p.length+1,c[c.length-1]=new Ht(m.text.concat(p.text),m.length+1+p.length)):(l+p.lines>r&&h(),l+=p.lines,u+=p.length+1,c.push(p))}function h(){l!=0&&(a.push(c.length==1?c[0]:uo.from(c,u)),u=-1,l=c.length=0)}for(let p of e)d(p);return h(),a.length==1?a[0]:new uo(a,n)}}ot.empty=new Ht([""],0);function BG(t){let e=-1;for(let n of t)e+=n.length+1;return e}function Dg(t,e,n=0,i=1e9){for(let r=0,o=0,s=!0;o=n&&(l>i&&(a=a.slice(0,i-r)),r0?1:(e instanceof Ht?e.text.length:e.children.length)<<1]}nextInner(e,n){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,r=this.nodes[i],o=this.offsets[i],s=o>>1,a=r instanceof Ht?r.text.length:r.children.length;if(s==(n>0?a:0)){if(i==0)return this.done=!0,this.value="",this;n>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((o&1)==(n>0?0:1)){if(this.offsets[i]+=n,e==0)return this.lineBreak=!0,this.value=` -`,this;e--}else if(r instanceof Ht){let l=r.text[s+(n<0?-1:0)];if(this.offsets[i]+=n,l.length>Math.max(0,e))return this.value=e==0?l:n>0?l.slice(e):l.slice(0,l.length-e),this;e-=l.length}else{let l=r.children[s+(n<0?-1:0)];e>l.length?(e-=l.length,this.offsets[i]+=n):(n<0&&this.offsets[i]--,this.nodes.push(l),this.offsets.push(n>0?1:(l instanceof Ht?l.text.length:l.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class i6{constructor(e,n,i){this.value="",this.done=!1,this.cursor=new cf(e,n>i?-1:1),this.pos=n>i?e.length:0,this.from=Math.min(n,i),this.to=Math.max(n,i)}nextInner(e,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let i=n<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*n,this.value=r.length<=i?r:n<0?r.slice(r.length-i):r.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class r6{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:i,value:r}=this.inner.next(e);return n&&this.afterBreak?(this.value="",this.afterBreak=!1):n?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(ot.prototype[Symbol.iterator]=function(){return this.iter()},cf.prototype[Symbol.iterator]=i6.prototype[Symbol.iterator]=r6.prototype[Symbol.iterator]=function(){return this});let QG=class{constructor(e,n,i,r){this.from=e,this.to=n,this.number=i,this.text=r}get length(){return this.to-this.from}};function dd(t,e,n){return e=Math.max(0,Math.min(t.length,e)),[e,Math.max(e,Math.min(t.length,n))]}let Xc="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(t=>t?parseInt(t,36):1);for(let t=1;tt)return Xc[e-1]<=t;return!1}function MP(t){return t>=127462&&t<=127487}const DP=8205;function Tn(t,e,n=!0,i=!0){return(n?o6:zG)(t,e,i)}function o6(t,e,n){if(e==t.length)return e;e&&s6(t.charCodeAt(e))&&a6(t.charCodeAt(e-1))&&e--;let i=xn(t,e);for(e+=ir(i);e=0&&MP(xn(t,s));)o++,s-=2;if(o%2==0)break;e+=2}else break}return e}function zG(t,e,n){for(;e>0;){let i=o6(t,e-2,n);if(i=56320&&t<57344}function a6(t){return t>=55296&&t<56320}function xn(t,e){let n=t.charCodeAt(e);if(!a6(n)||e+1==t.length)return n;let i=t.charCodeAt(e+1);return s6(i)?(n-55296<<10)+(i-56320)+65536:n}function Gk(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function ir(t){return t<65536?1:2}const Gv=/\r\n?|\n/;var En=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(En||(En={}));class vo{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;ne)return o+(e-r);o+=a}else{if(i!=En.Simple&&u>=e&&(i==En.TrackDel&&re||i==En.TrackBefore&&re))return null;if(u>e||u==e&&n<0&&!a)return e==r||n<0?o:o+l;o+=l}r=u}if(e>r)throw new RangeError(`Position ${e} is out of range for changeset of length ${r}`);return o}touchesRange(e,n=e){for(let i=0,r=0;i=0&&r<=n&&a>=e)return rn?"cover":!0;r=a}return!1}toString(){let e="";for(let n=0;n=0?":"+r:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new vo(e)}static create(e){return new vo(e)}}class an extends vo{constructor(e,n){super(e),this.inserted=n}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Kv(this,(n,i,r,o,s)=>e=e.replace(r,r+(i-n),s),!1),e}mapDesc(e,n=!1){return Jv(this,e,n,!0)}invert(e){let n=this.sections.slice(),i=[];for(let r=0,o=0;r=0){n[r]=a,n[r+1]=s;let l=r>>1;for(;i.length0&&js(i,n,o.text),o.forward(c),a+=c}let u=e[s++];for(;a>1].toJSON()))}return e}static of(e,n,i){let r=[],o=[],s=0,a=null;function l(c=!1){if(!c&&!r.length)return;sh||d<0||h>n)throw new RangeError(`Invalid change range ${d} to ${h} (in doc of length ${n})`);let m=p?typeof p=="string"?ot.of(p.split(i||Gv)):p:ot.empty,O=m.length;if(d==h&&O==0)return;ds&&Nn(r,d-s,-1),Nn(r,h-d,O),js(o,r,m),s=h}}return u(e),l(!a),a}static empty(e){return new an(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],i=[];for(let r=0;ra&&typeof s!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(o.length==1)n.push(o[0],0);else{for(;i.length=0&&n<=0&&n==t[r+1]?t[r]+=e:e==0&&t[r]==0?t[r+1]+=n:i?(t[r]+=e,t[r+1]+=n):t.push(e,n)}function js(t,e,n){if(n.length==0)return;let i=e.length-2>>1;if(i>1])),!(n||s==t.sections.length||t.sections[s+1]<0);)a=t.sections[s++],l=t.sections[s++];e(r,u,o,c,d),r=u,o=c}}}function Jv(t,e,n,i=!1){let r=[],o=i?[]:null,s=new qf(t),a=new qf(e);for(let l=-1;;)if(s.ins==-1&&a.ins==-1){let u=Math.min(s.len,a.len);Nn(r,u,-1),s.forward(u),a.forward(u)}else if(a.ins>=0&&(s.ins<0||l==s.i||s.off==0&&(a.len=0&&l=0){let u=0,c=s.len;for(;c;)if(a.ins==-1){let d=Math.min(c,a.len);u+=d,c-=d,a.forward(d)}else if(a.ins==0&&a.lenl||s.ins>=0&&s.len>l)&&(a||i.length>u),o.forward2(l),s.forward(l)}}}}class qf{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return n>=e.length?ot.empty:e[n]}textBit(e){let{inserted:n}=this.set,i=this.i-2>>1;return i>=n.length&&!e?ot.empty:n[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class Ul{constructor(e,n,i){this.from=e,this.to=n,this.flags=i}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,n=-1){let i,r;return this.empty?i=r=e.mapPos(this.from,n):(i=e.mapPos(this.from,1),r=e.mapPos(this.to,-1)),i==this.from&&r==this.to?this:new Ul(i,r,this.flags)}extend(e,n=e){if(e<=this.anchor&&n>=this.anchor)return q.range(e,n);let i=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return q.range(this.anchor,i)}eq(e,n=!1){return this.anchor==e.anchor&&this.head==e.head&&(!n||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return q.range(e.anchor,e.head)}static create(e,n,i){return new Ul(e,n,i)}}class q{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:q.create(this.ranges.map(i=>i.map(e,n)),this.mainIndex)}eq(e,n=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let i=0;ie.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new q(e.ranges.map(n=>Ul.fromJSON(n)),e.main)}static single(e,n=e){return new q([q.range(e,n)],0)}static create(e,n=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,r=0;re?8:0)|o)}static normalized(e,n=0){let i=e[n];e.sort((r,o)=>r.from-o.from),n=e.indexOf(i);for(let r=1;ro.head?q.range(l,a):q.range(a,l))}}return new q(e,n)}}function u6(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let Kk=0;class he{constructor(e,n,i,r,o){this.combine=e,this.compareInput=n,this.compare=i,this.isStatic=r,this.id=Kk++,this.default=e([]),this.extensions=typeof o=="function"?o(this):o}get reader(){return this}static define(e={}){return new he(e.combine||(n=>n),e.compareInput||((n,i)=>n===i),e.compare||(e.combine?(n,i)=>n===i:Jk),!!e.static,e.enables)}of(e){return new Bg([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new Bg(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new Bg(e,this,2,n)}from(e,n){return n||(n=i=>i),this.compute([e],i=>n(i.field(e)))}}function Jk(t,e){return t==e||t.length==e.length&&t.every((n,i)=>n===e[i])}class Bg{constructor(e,n,i,r){this.dependencies=e,this.facet=n,this.type=i,this.value=r,this.id=Kk++}dynamicSlot(e){var n;let i=this.value,r=this.facet.compareInput,o=this.id,s=e[o]>>1,a=this.type==2,l=!1,u=!1,c=[];for(let d of this.dependencies)d=="doc"?l=!0:d=="selection"?u=!0:((n=e[d.id])!==null&&n!==void 0?n:1)&1||c.push(e[d.id]);return{create(d){return d.values[s]=i(d),1},update(d,h){if(l&&h.docChanged||u&&(h.docChanged||h.selection)||eS(d,c)){let p=i(d);if(a?!BP(p,d.values[s],r):!r(p,d.values[s]))return d.values[s]=p,1}return 0},reconfigure:(d,h)=>{let p,m=h.config.address[o];if(m!=null){let O=N0(h,m);if(this.dependencies.every(y=>y instanceof he?h.facet(y)===d.facet(y):y instanceof On?h.field(y,!1)==d.field(y,!1):!0)||(a?BP(p=i(d),O,r):r(p=i(d),O)))return d.values[s]=O,0}else p=i(d);return d.values[s]=p,1}}}}function BP(t,e,n){if(t.length!=e.length)return!1;for(let i=0;it[l.id]),r=n.map(l=>l.type),o=i.filter(l=>!(l&1)),s=t[e.id]>>1;function a(l){let u=[];for(let c=0;ci===r),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet(QP).find(i=>i.field==this);return((n==null?void 0:n.create)||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:i=>(i.values[n]=this.create(i),1),update:(i,r)=>{let o=i.values[n],s=this.updateF(o,r);return this.compareF(o,s)?0:(i.values[n]=s,1)},reconfigure:(i,r)=>r.config.address[this.id]!=null?(i.values[n]=r.field(this),0):(i.values[n]=this.create(i),1)}}init(e){return[this,QP.of({field:this,create:e})]}get extension(){return this}}const $l={lowest:4,low:3,default:2,high:1,highest:0};function Ch(t){return e=>new c6(e,t)}const ds={highest:Ch($l.highest),high:Ch($l.high),default:Ch($l.default),low:Ch($l.low),lowest:Ch($l.lowest)};class c6{constructor(e,n){this.inner=e,this.prec=n}}class ob{of(e){return new tS(this,e)}reconfigure(e){return ob.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class tS{constructor(e,n){this.compartment=e,this.inner=n}}class L0{constructor(e,n,i,r,o,s){for(this.base=e,this.compartments=n,this.dynamicSlots=i,this.address=r,this.staticValues=o,this.facets=s,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,n,i){let r=[],o=Object.create(null),s=new Map;for(let h of UG(e,n,s))h instanceof On?r.push(h):(o[h.facet.id]||(o[h.facet.id]=[])).push(h);let a=Object.create(null),l=[],u=[];for(let h of r)a[h.id]=u.length<<1,u.push(p=>h.slot(p));let c=i==null?void 0:i.config.facets;for(let h in o){let p=o[h],m=p[0].facet,O=c&&c[h]||[];if(p.every(y=>y.type==0))if(a[m.id]=l.length<<1|1,Jk(O,p))l.push(i.facet(m));else{let y=m.combine(p.map(b=>b.value));l.push(i&&m.compare(y,i.facet(m))?i.facet(m):y)}else{for(let y of p)y.type==0?(a[y.id]=l.length<<1|1,l.push(y.value)):(a[y.id]=u.length<<1,u.push(b=>y.dynamicSlot(b)));a[m.id]=u.length<<1,u.push(y=>HG(y,m,p))}}let d=u.map(h=>h(a));return new L0(e,s,d,a,l,o)}}function UG(t,e,n){let i=[[],[],[],[],[]],r=new Map;function o(s,a){let l=r.get(s);if(l!=null){if(l<=a)return;let u=i[l].indexOf(s);u>-1&&i[l].splice(u,1),s instanceof tS&&n.delete(s.compartment)}if(r.set(s,a),Array.isArray(s))for(let u of s)o(u,a);else if(s instanceof tS){if(n.has(s.compartment))throw new RangeError("Duplicate use of compartment in extensions");let u=e.get(s.compartment)||s.inner;n.set(s.compartment,u),o(u,a)}else if(s instanceof c6)o(s.inner,s.prec);else if(s instanceof On)i[a].push(s),s.provides&&o(s.provides,a);else if(s instanceof Bg)i[a].push(s),s.facet.extensions&&o(s.facet.extensions,$l.default);else{let u=s.extension;if(!u)throw new Error(`Unrecognized extension value in extension set (${s}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);o(u,a)}}return o(t,$l.default),i.reduce((s,a)=>s.concat(a))}function df(t,e){if(e&1)return 2;let n=e>>1,i=t.status[n];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;t.status[n]=4;let r=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|r}function N0(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const d6=he.define(),nS=he.define({combine:t=>t.some(e=>e),static:!0}),h6=he.define({combine:t=>t.length?t[0]:void 0,static:!0}),f6=he.define(),p6=he.define(),m6=he.define(),g6=he.define({combine:t=>t.length?t[0]:!1});class hs{constructor(e,n){this.type=e,this.value=n}static define(){return new WG}}class WG{of(e){return new hs(this,e)}}class VG{constructor(e){this.map=e}of(e){return new De(this,e)}}class De{constructor(e,n){this.type=e,this.value=n}map(e){let n=this.type.map(this.value,e);return n===void 0?void 0:n==this.value?this:new De(this.type,n)}is(e){return this.type==e}static define(e={}){return new VG(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let i=[];for(let r of e){let o=r.map(n);o&&i.push(o)}return i}}De.reconfigure=De.define();De.appendConfig=De.define();class Jt{constructor(e,n,i,r,o,s){this.startState=e,this.changes=n,this.selection=i,this.effects=r,this.annotations=o,this.scrollIntoView=s,this._doc=null,this._state=null,i&&u6(i,n.newLength),o.some(a=>a.type==Jt.time)||(this.annotations=o.concat(Jt.time.of(Date.now())))}static create(e,n,i,r,o,s){return new Jt(e,n,i,r,o,s)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let n of this.annotations)if(n.type==e)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let n=this.annotation(Jt.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}Jt.time=hs.define();Jt.userEvent=hs.define();Jt.addToHistory=hs.define();Jt.remote=hs.define();function jG(t,e){let n=[];for(let i=0,r=0;;){let o,s;if(i=t[i]))o=t[i++],s=t[i++];else if(r=0;r--){let o=i[r](t);o instanceof Jt?t=o:Array.isArray(o)&&o.length==1&&o[0]instanceof Jt?t=o[0]:t=b6(e,Zc(o),!1)}return t}function ZG(t){let e=t.startState,n=e.facet(m6),i=t;for(let r=n.length-1;r>=0;r--){let o=n[r](t);o&&Object.keys(o).length&&(i=O6(i,iS(e,o,t.changes.newLength),!0))}return i==t?t:Jt.create(e,t.changes,t.selection,i.effects,i.annotations,i.scrollIntoView)}const qG=[];function Zc(t){return t==null?qG:Array.isArray(t)?t:[t]}var Rt=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(Rt||(Rt={}));const YG=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let rS;try{rS=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function GG(t){if(rS)return rS.test(t);for(let e=0;e"€"&&(n.toUpperCase()!=n.toLowerCase()||YG.test(n)))return!0}return!1}function KG(t){return e=>{if(!/\S/.test(e))return Rt.Space;if(GG(e))return Rt.Word;for(let n=0;n-1)return Rt.Word;return Rt.Other}}class Ve{constructor(e,n,i,r,o,s){this.config=e,this.doc=n,this.selection=i,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=o,s&&(s._state=this);for(let a=0;ar.set(u,l)),n=null),r.set(a.value.compartment,a.value.extension)):a.is(De.reconfigure)?(n=null,i=a.value):a.is(De.appendConfig)&&(n=null,i=Zc(i).concat(a.value));let o;n?o=e.startState.values.slice():(n=L0.resolve(i,r,this),o=new Ve(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(l,u)=>u.reconfigure(l,this),null).values);let s=e.startState.facet(nS)?e.newSelection:e.newSelection.asSingle();new Ve(n,e.newDoc,s,o,(a,l)=>l.update(a,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:q.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,i=e(n.ranges[0]),r=this.changes(i.changes),o=[i.range],s=Zc(i.effects);for(let a=1;as.spec.fromJSON(a,l)))}}return Ve.create({doc:e.doc,selection:q.fromJSON(e.selection),extensions:n.extensions?r.concat([n.extensions]):r})}static create(e={}){let n=L0.resolve(e.extensions||[],new Map),i=e.doc instanceof ot?e.doc:ot.of((e.doc||"").split(n.staticFacet(Ve.lineSeparator)||Gv)),r=e.selection?e.selection instanceof q?e.selection:q.single(e.selection.anchor,e.selection.head):q.single(0);return u6(r,i.length),n.staticFacet(nS)||(r=r.asSingle()),new Ve(n,i,r,n.dynamicSlots.map(()=>null),(o,s)=>s.create(o),null)}get tabSize(){return this.facet(Ve.tabSize)}get lineBreak(){return this.facet(Ve.lineSeparator)||` -`}get readOnly(){return this.facet(g6)}phrase(e,...n){for(let i of this.facet(Ve.phrases))if(Object.prototype.hasOwnProperty.call(i,e)){e=i[e];break}return n.length&&(e=e.replace(/\$(\$|\d*)/g,(i,r)=>{if(r=="$")return"$";let o=+(r||1);return!o||o>n.length?i:n[o-1]})),e}languageDataAt(e,n,i=-1){let r=[];for(let o of this.facet(d6))for(let s of o(this,n,i))Object.prototype.hasOwnProperty.call(s,e)&&r.push(s[e]);return r}charCategorizer(e){return KG(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:n,from:i,length:r}=this.doc.lineAt(e),o=this.charCategorizer(e),s=e-i,a=e-i;for(;s>0;){let l=Tn(n,s,!1);if(o(n.slice(l,s))!=Rt.Word)break;s=l}for(;at.length?t[0]:4});Ve.lineSeparator=h6;Ve.readOnly=g6;Ve.phrases=he.define({compare(t,e){let n=Object.keys(t),i=Object.keys(e);return n.length==i.length&&n.every(r=>t[r]==e[r])}});Ve.languageData=d6;Ve.changeFilter=f6;Ve.transactionFilter=p6;Ve.transactionExtender=m6;ob.reconfigure=De.define();function Eo(t,e,n={}){let i={};for(let r of t)for(let o of Object.keys(r)){let s=r[o],a=i[o];if(a===void 0)i[o]=s;else if(!(a===s||s===void 0))if(Object.hasOwnProperty.call(n,o))i[o]=n[o](a,s);else throw new Error("Config merge conflict for field "+o)}for(let r in e)i[r]===void 0&&(i[r]=e[r]);return i}class ou{eq(e){return this==e}range(e,n=e){return oS.create(e,n,this)}}ou.prototype.startSide=ou.prototype.endSide=0;ou.prototype.point=!1;ou.prototype.mapMode=En.TrackDel;let oS=class y6{constructor(e,n,i){this.from=e,this.to=n,this.value=i}static create(e,n,i){return new y6(e,n,i)}};function sS(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class ex{constructor(e,n,i,r){this.from=e,this.to=n,this.value=i,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(e,n,i,r=0){let o=i?this.to:this.from;for(let s=r,a=o.length;;){if(s==a)return s;let l=s+a>>1,u=o[l]-e||(i?this.value[l].endSide:this.value[l].startSide)-n;if(l==s)return u>=0?s:a;u>=0?a=l:s=l+1}}between(e,n,i,r){for(let o=this.findIndex(n,-1e9,!0),s=this.findIndex(i,1e9,!1,o);op||h==p&&u.startSide>0&&u.endSide<=0)continue;(p-h||u.endSide-u.startSide)<0||(s<0&&(s=h),u.point&&(a=Math.max(a,p-h)),i.push(u),r.push(h-s),o.push(p-s))}return{mapped:i.length?new ex(r,o,i,a):null,pos:s}}}class tt{constructor(e,n,i,r){this.chunkPos=e,this.chunk=n,this.nextLayer=i,this.maxPoint=r}static create(e,n,i,r){return new tt(e,n,i,r)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let n of this.chunk)e+=n.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:n=[],sort:i=!1,filterFrom:r=0,filterTo:o=this.length}=e,s=e.filter;if(n.length==0&&!s)return this;if(i&&(n=n.slice().sort(sS)),this.isEmpty)return n.length?tt.of(n):this;let a=new v6(this,null,-1).goto(0),l=0,u=[],c=new da;for(;a.value||l=0){let d=n[l++];c.addInner(d.from,d.to,d.value)||u.push(d)}else a.rangeIndex==1&&a.chunkIndexthis.chunkEnd(a.chunkIndex)||oa.to||o=o&&e<=o+s.length&&s.between(o,e-o,n-o,i)===!1)return}this.nextLayer.between(e,n,i)}}iter(e=0){return Yf.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return Yf.from(e).goto(n)}static compare(e,n,i,r,o=-1){let s=e.filter(d=>d.maxPoint>0||!d.isEmpty&&d.maxPoint>=o),a=n.filter(d=>d.maxPoint>0||!d.isEmpty&&d.maxPoint>=o),l=FP(s,a,i),u=new Th(s,l,o),c=new Th(a,l,o);i.iterGaps((d,h,p)=>zP(u,d,c,h,p,r)),i.empty&&i.length==0&&zP(u,0,c,0,0,r)}static eq(e,n,i=0,r){r==null&&(r=999999999);let o=e.filter(c=>!c.isEmpty&&n.indexOf(c)<0),s=n.filter(c=>!c.isEmpty&&e.indexOf(c)<0);if(o.length!=s.length)return!1;if(!o.length)return!0;let a=FP(o,s),l=new Th(o,a,0).goto(i),u=new Th(s,a,0).goto(i);for(;;){if(l.to!=u.to||!aS(l.active,u.active)||l.point&&(!u.point||!l.point.eq(u.point)))return!1;if(l.to>r)return!0;l.next(),u.next()}}static spans(e,n,i,r,o=-1){let s=new Th(e,null,o).goto(n),a=n,l=s.openStart;for(;;){let u=Math.min(s.to,i);if(s.point){let c=s.activeForPoint(s.to),d=s.pointFroma&&(r.span(a,u,s.active,l),l=s.openEnd(u));if(s.to>i)return l+(s.point&&s.to>i?1:0);a=s.to,s.next()}}static of(e,n=!1){let i=new da;for(let r of e instanceof oS?[e]:n?JG(e):e)i.add(r.from,r.to,r.value);return i.finish()}static join(e){if(!e.length)return tt.empty;let n=e[e.length-1];for(let i=e.length-2;i>=0;i--)for(let r=e[i];r!=tt.empty;r=r.nextLayer)n=new tt(r.chunkPos,r.chunk,n,Math.max(r.maxPoint,n.maxPoint));return n}}tt.empty=new tt([],[],null,-1);function JG(t){if(t.length>1)for(let e=t[0],n=1;n0)return t.slice().sort(sS);e=i}return t}tt.empty.nextLayer=tt.empty;class da{finishChunk(e){this.chunks.push(new ex(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,n,i){this.addInner(e,n,i)||(this.nextLayer||(this.nextLayer=new da)).add(e,n,i)}addInner(e,n,i){let r=e-this.lastTo||i.startSide-this.last.endSide;if(r<=0&&(e-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return r<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(n-this.chunkStart),this.last=i,this.lastFrom=e,this.lastTo=n,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,n-e)),!0)}addChunk(e,n){if((e-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(e);let i=n.value.length-1;return this.last=n.value[i],this.lastFrom=n.from[i]+e,this.lastTo=n.to[i]+e,!0}finish(){return this.finishInner(tt.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=tt.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}}function FP(t,e,n){let i=new Map;for(let o of t)for(let s=0;s=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=i&&r.push(new v6(s,n,i,o));return r.length==1?r[0]:new Yf(r)}get startSide(){return this.value?this.value.startSide:0}goto(e,n=-1e9){for(let i of this.heap)i.goto(e,n);for(let i=this.heap.length>>1;i>=0;i--)ky(this.heap,i);return this.next(),this}forward(e,n){for(let i of this.heap)i.forward(e,n);for(let i=this.heap.length>>1;i>=0;i--)ky(this.heap,i);(this.to-e||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),ky(this.heap,0)}}}function ky(t,e){for(let n=t[e];;){let i=(e<<1)+1;if(i>=t.length)break;let r=t[i];if(i+1=0&&(r=t[i+1],i++),n.compare(r)<0)break;t[i]=n,t[e]=r,e=i}}class Th{constructor(e,n,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Yf.from(e,n,i)}goto(e,n=-1e9){return this.cursor.goto(e,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=n,this.openStart=-1,this.next(),this}forward(e,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(e,n)}removeActive(e){Lm(this.active,e),Lm(this.activeTo,e),Lm(this.activeRank,e),this.minActive=HP(this.active,this.activeTo)}addActive(e){let n=0,{value:i,to:r,rank:o}=this.cursor;for(;n0;)n++;Nm(this.active,n,i),Nm(this.activeTo,n,r),Nm(this.activeRank,n,o),e&&Nm(e,n,this.cursor.from),this.minActive=HP(this.active,this.activeTo)}next(){let e=this.to,n=this.point;this.point=null;let i=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),i&&Lm(i,r)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let o=this.cursor.value;if(!o.point)this.addActive(i),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from=0&&i[r]=0&&!(this.activeRank[i]e||this.activeTo[i]==e&&this.active[i].endSide>=this.point.endSide)&&n.push(this.active[i]);return n.reverse()}openEnd(e){let n=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>e;i--)n++;return n}}function zP(t,e,n,i,r,o){t.goto(e),n.goto(i);let s=i+r,a=i,l=i-e;for(;;){let u=t.to+l-n.to||t.endSide-n.endSide,c=u<0?t.to+l:n.to,d=Math.min(c,s);if(t.point||n.point?t.point&&n.point&&(t.point==n.point||t.point.eq(n.point))&&aS(t.activeForPoint(t.to),n.activeForPoint(n.to))||o.comparePoint(a,d,t.point,n.point):d>a&&!aS(t.active,n.active)&&o.compareRange(a,d,t.active,n.active),c>s)break;a=c,u<=0&&t.next(),u>=0&&n.next()}}function aS(t,e){if(t.length!=e.length)return!1;for(let n=0;n=e;i--)t[i+1]=t[i];t[e]=n}function HP(t,e){let n=-1,i=1e9;for(let r=0;r=e)return r;if(r==t.length)break;o+=t.charCodeAt(r)==9?n-o%n:1,r=Tn(t,r)}return i===!0?-1:t.length}const uS="ͼ",UP=typeof Symbol>"u"?"__"+uS:Symbol.for(uS),cS=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),WP=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class ha{constructor(e,n){this.rules=[];let{finish:i}=n||{};function r(s){return/^@/.test(s)?[s]:s.split(/,\s*/)}function o(s,a,l,u){let c=[],d=/^@(\w+)\b/.exec(s[0]),h=d&&d[1]=="keyframes";if(d&&a==null)return l.push(s[0]+";");for(let p in a){let m=a[p];if(/&/.test(p))o(p.split(/,\s*/).map(O=>s.map(y=>O.replace(/&/,y))).reduce((O,y)=>O.concat(y)),m,l);else if(m&&typeof m=="object"){if(!d)throw new RangeError("The value of a property ("+p+") should be a primitive value.");o(r(p),m,c,h)}else m!=null&&c.push(p.replace(/_.*/,"").replace(/[A-Z]/g,O=>"-"+O.toLowerCase())+": "+m+";")}(c.length||h)&&l.push((i&&!d&&!u?s.map(i):s).join(", ")+" {"+c.join(" ")+"}")}for(let s in e)o(r(s),e[s],this.rules)}getRules(){return this.rules.join(` -`)}static newName(){let e=WP[UP]||1;return WP[UP]=e+1,uS+e.toString(36)}static mount(e,n,i){let r=e[cS],o=i&&i.nonce;r?o&&r.setNonce(o):r=new eK(e,o),r.mount(Array.isArray(n)?n:[n],e)}}let VP=new Map;class eK{constructor(e,n){let i=e.ownerDocument||e,r=i.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let o=VP.get(i);if(o)return e[cS]=o;this.sheet=new r.CSSStyleSheet,VP.set(i,this)}else this.styleTag=i.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);this.modules=[],e[cS]=this}mount(e,n){let i=this.sheet,r=0,o=0;for(let s=0;s-1&&(this.modules.splice(l,1),o--,l=-1),l==-1){if(this.modules.splice(o++,0,a),i)for(let u=0;u",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},tK=typeof navigator<"u"&&/Mac/.test(navigator.platform),nK=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var _n=0;_n<10;_n++)fa[48+_n]=fa[96+_n]=String(_n);for(var _n=1;_n<=24;_n++)fa[_n+111]="F"+_n;for(var _n=65;_n<=90;_n++)fa[_n]=String.fromCharCode(_n+32),Gf[_n]=String.fromCharCode(_n);for(var xy in fa)Gf.hasOwnProperty(xy)||(Gf[xy]=fa[xy]);function iK(t){var e=tK&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||nK&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?Gf:fa)[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}function M0(t){let e;return t.nodeType==11?e=t.getSelection?t:t.ownerDocument:e=t,e.getSelection()}function dS(t,e){return e?t==e||t.contains(e.nodeType!=1?e.parentNode:e):!1}function rK(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function Qg(t,e){if(!e.anchorNode)return!1;try{return dS(t,e.anchorNode)}catch{return!1}}function Kf(t){return t.nodeType==3?au(t,0,t.nodeValue.length).getClientRects():t.nodeType==1?t.getClientRects():[]}function hf(t,e,n,i){return n?jP(t,e,n,i,-1)||jP(t,e,n,i,1):!1}function su(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e}function D0(t){return t.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function jP(t,e,n,i,r){for(;;){if(t==n&&e==i)return!0;if(e==(r<0?0:is(t))){if(t.nodeName=="DIV")return!1;let o=t.parentNode;if(!o||o.nodeType!=1)return!1;e=su(t)+(r<0?0:1),t=o}else if(t.nodeType==1){if(t=t.childNodes[e+(r<0?-1:0)],t.nodeType==1&&t.contentEditable=="false")return!1;e=r<0?is(t):0}else return!1}}function is(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function tx(t,e){let n=e?t.left:t.right;return{left:n,right:n,top:t.top,bottom:t.bottom}}function oK(t){let e=t.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function S6(t,e){let n=e.width/t.offsetWidth,i=e.height/t.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.width-t.offsetWidth)<1)&&(n=1),(i>.995&&i<1.005||!isFinite(i)||Math.abs(e.height-t.offsetHeight)<1)&&(i=1),{scaleX:n,scaleY:i}}function sK(t,e,n,i,r,o,s,a){let l=t.ownerDocument,u=l.defaultView||window;for(let c=t,d=!1;c&&!d;)if(c.nodeType==1){let h,p=c==l.body,m=1,O=1;if(p)h=oK(u);else{if(/^(fixed|sticky)$/.test(getComputedStyle(c).position)&&(d=!0),c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}let v=c.getBoundingClientRect();({scaleX:m,scaleY:O}=S6(c,v)),h={left:v.left,right:v.left+c.clientWidth*m,top:v.top,bottom:v.top+c.clientHeight*O}}let y=0,b=0;if(r=="nearest")e.top0&&e.bottom>h.bottom+b&&(b=e.bottom-h.bottom+b+s)):e.bottom>h.bottom&&(b=e.bottom-h.bottom+s,n<0&&e.top-b0&&e.right>h.right+y&&(y=e.right-h.right+y+o)):e.right>h.right&&(y=e.right-h.right+o,n<0&&e.leftn.clientHeight||n.scrollWidth>n.clientWidth)return n;n=n.assignedSlot||n.parentNode}else if(n.nodeType==11)n=n.host;else break;return null}class lK{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:n,focusNode:i}=e;this.set(n,Math.min(e.anchorOffset,n?is(n):0),i,Math.min(e.focusOffset,i?is(i):0))}set(e,n,i,r){this.anchorNode=e,this.anchorOffset=n,this.focusNode=i,this.focusOffset=r}}let lc=null;function w6(t){if(t.setActive)return t.setActive();if(lc)return t.focus(lc);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(lc==null?{get preventScroll(){return lc={preventScroll:!0},!0}}:void 0),!lc){lc=!1;for(let n=0;nMath.max(1,t.scrollHeight-t.clientHeight-4)}function _6(t,e){for(let n=t,i=e;;){if(n.nodeType==3&&i>0)return{node:n,offset:i};if(n.nodeType==1&&i>0){if(n.contentEditable=="false")return null;n=n.childNodes[i-1],i=is(n)}else if(n.parentNode&&!D0(n))i=su(n),n=n.parentNode;else return null}}function E6(t,e){for(let n=t,i=e;;){if(n.nodeType==3&&in)return d.domBoundsAround(e,n,u);if(h>=e&&r==-1&&(r=l,o=u),u>n&&d.dom.parentNode==this.dom){s=l,a=c;break}c=h,u=h+d.breakAfter}return{from:o,to:a<0?i+this.length:a,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:s=0?this.children[s].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let n=this.parent;n;n=n.parent){if(e&&(n.flags|=2),n.flags&1)return;n.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let n=e.parent;if(!n)return e;e=n}}replaceChildren(e,n,i=nx){this.markDirty();for(let r=e;rthis.pos||e==this.pos&&(n>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}function T6(t,e,n,i,r,o,s,a,l){let{children:u}=t,c=u.length?u[e]:null,d=o.length?o[o.length-1]:null,h=d?d.breakAfter:s;if(!(e==i&&c&&!s&&!h&&o.length<2&&c.merge(n,r,o.length?d:null,n==0,a,l))){if(i0&&(!s&&o.length&&c.merge(n,c.length,o[0],!1,a,0)?c.breakAfter=o.shift().breakAfter:(n2);var me={mac:GP||/Mac/.test(Ni.platform),windows:/Win/.test(Ni.platform),linux:/Linux|X11/.test(Ni.platform),ie:sb,ie_version:A6?hS.documentMode||6:pS?+pS[1]:fS?+fS[1]:0,gecko:qP,gecko_version:qP?+(/Firefox\/(\d+)/.exec(Ni.userAgent)||[0,0])[1]:0,chrome:!!_y,chrome_version:_y?+_y[1]:0,ios:GP,android:/Android\b/.test(Ni.userAgent),webkit:YP,safari:R6,webkit_version:YP?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:hS.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const dK=256;class Ur extends pt{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,n){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(n&&n.node==this.dom&&(n.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,n,i){return this.flags&8||i&&(!(i instanceof Ur)||this.length-(n-e)+i.length>dK||i.flags&8)?!1:(this.text=this.text.slice(0,e)+(i?i.text:"")+this.text.slice(n),this.markDirty(),!0)}split(e){let n=new Ur(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),n.flags|=this.flags&8,n}localPosFromDOM(e,n){return e==this.dom?n:n?this.text.length:0}domAtPos(e){return new Dn(this.dom,e)}domBoundsAround(e,n,i){return{from:i,to:i+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,n){return hK(this.dom,e,n)}}class rs extends pt{constructor(e,n=[],i=0){super(),this.mark=e,this.children=n,this.length=i;for(let r of n)r.setParent(this)}setAttrs(e){if(k6(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let n in this.mark.attrs)e.setAttribute(n,this.mark.attrs[n]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,n){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,n)}merge(e,n,i,r,o,s){return i&&(!(i instanceof rs&&i.mark.eq(this.mark))||e&&o<=0||ne&&n.push(i=e&&(r=o),i=l,o++}let s=this.length-e;return this.length=e,r>-1&&(this.children.length=r,this.markDirty()),new rs(this.mark,n,s)}domAtPos(e){return I6(this,e)}coordsAt(e,n){return L6(this,e,n)}}function hK(t,e,n){let i=t.nodeValue.length;e>i&&(e=i);let r=e,o=e,s=0;e==0&&n<0||e==i&&n>=0?me.chrome||me.gecko||(e?(r--,s=1):o=0)?0:a.length-1];return me.safari&&!s&&l.width==0&&(l=Array.prototype.find.call(a,u=>u.width)||l),s?tx(l,s<0):l||null}class Xs extends pt{static create(e,n,i){return new Xs(e,n,i)}constructor(e,n,i){super(),this.widget=e,this.length=n,this.side=i,this.prevWidget=null}split(e){let n=Xs.create(this.widget,this.length-e,this.side);return this.length-=e,n}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,n,i,r,o,s){return i&&(!(i instanceof Xs)||!this.widget.compare(i.widget)||e>0&&o<=0||n0)?Dn.before(this.dom):Dn.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,n){let i=this.widget.coordsAt(this.dom,e,n);if(i)return i;let r=this.dom.getClientRects(),o=null;if(!r.length)return null;let s=this.side?this.side<0:e>0;for(let a=s?r.length-1:0;o=r[a],!(e>0?a==0:a==r.length-1||o.top0?Dn.before(this.dom):Dn.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return ot.empty}get isHidden(){return!0}}Ur.prototype.children=Xs.prototype.children=hd.prototype.children=nx;function I6(t,e){let n=t.dom,{children:i}=t,r=0;for(let o=0;ro&&e0;o--){let s=i[o-1];if(s.dom.parentNode==n)return s.domAtPos(s.length)}for(let o=r;o0&&e instanceof rs&&r.length&&(i=r[r.length-1])instanceof rs&&i.mark.eq(e.mark)?$6(i,e.children[0],n-1):(r.push(e),e.setParent(t)),t.length+=e.length}function L6(t,e,n){let i=null,r=-1,o=null,s=-1;function a(u,c){for(let d=0,h=0;d=c&&(p.children.length?a(p,c-h):(!o||o.isHidden&&n>0)&&(m>c||h==m&&p.getSide()>0)?(o=p,s=c-h):(h-1?1:0)!=r.length-(n&&r.indexOf(n)>-1?1:0))return!1;for(let o of i)if(o!=n&&(r.indexOf(o)==-1||t[o]!==e[o]))return!1;return!0}function gS(t,e,n){let i=!1;if(e)for(let r in e)n&&r in n||(i=!0,r=="style"?t.style.cssText="":t.removeAttribute(r));if(n)for(let r in n)e&&e[r]==n[r]||(i=!0,r=="style"?t.style.cssText=n[r]:t.setAttribute(r,n[r]));return i}function pK(t){let e=Object.create(null);for(let n=0;n0&&this.children[i-1].length==0;)this.children[--i].destroy();return this.children.length=i,this.markDirty(),this.length=e,n}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){ix(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,n){$6(this,e,n)}addLineDeco(e){let n=e.spec.attributes,i=e.spec.class;n&&(this.attrs=mS(n,this.attrs||{})),i&&(this.attrs=mS({class:i},this.attrs||{}))}domAtPos(e){return I6(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,n){var i;this.dom?this.flags&4&&(k6(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(gS(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,n);let r=this.dom.lastChild;for(;r&&pt.get(r)instanceof rs;)r=r.lastChild;if(!r||!this.length||r.nodeName!="BR"&&((i=pt.get(r))===null||i===void 0?void 0:i.isEditable)==!1&&(!me.ios||!this.children.some(o=>o instanceof Ur))){let o=document.createElement("BR");o.cmIgnore=!0,this.dom.appendChild(o)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,n;for(let i of this.children){if(!(i instanceof Ur)||/[^ -~]/.test(i.text))return null;let r=Kf(i.dom);if(r.length!=1)return null;e+=r[0].width,n=r[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:n}:null}coordsAt(e,n){let i=L6(this,e,n);if(!this.children.length&&i&&this.parent){let{heightOracle:r}=this.parent.view.viewState,o=i.bottom-i.top;if(Math.abs(o-r.lineHeight)<2&&r.textHeight=n){if(o instanceof on)return o;if(s>n)break}r=s+o.breakAfter}return null}}class oa extends pt{constructor(e,n,i){super(),this.widget=e,this.length=n,this.deco=i,this.breakAfter=0,this.prevWidget=null}merge(e,n,i,r,o,s){return i&&(!(i instanceof oa)||!this.widget.compare(i.widget)||e>0&&o<=0||n0}}class fs{eq(e){return!1}updateDOM(e,n){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,n,i){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var ti=function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t}(ti||(ti={}));class Ce extends ou{constructor(e,n,i,r){super(),this.startSide=e,this.endSide=n,this.widget=i,this.spec=r}get heightRelevant(){return!1}static mark(e){return new Ap(e)}static widget(e){let n=Math.max(-1e4,Math.min(1e4,e.side||0)),i=!!e.block;return n+=i&&!e.inlineOrder?n>0?3e8:-4e8:n>0?1e8:-1e8,new pa(e,n,n,i,e.widget||null,!1)}static replace(e){let n=!!e.block,i,r;if(e.isBlockGap)i=-5e8,r=4e8;else{let{start:o,end:s}=N6(e,n);i=(o?n?-3e8:-1:5e8)-1,r=(s?n?2e8:1:-6e8)+1}return new pa(e,i,r,n,e.widget||null,!0)}static line(e){return new Rp(e)}static set(e,n=!1){return tt.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}Ce.none=tt.empty;class Ap extends Ce{constructor(e){let{start:n,end:i}=N6(e);super(n?-1:5e8,i?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var n,i;return this==e||e instanceof Ap&&this.tagName==e.tagName&&(this.class||((n=this.attrs)===null||n===void 0?void 0:n.class))==(e.class||((i=e.attrs)===null||i===void 0?void 0:i.class))&&ix(this.attrs,e.attrs,"class")}range(e,n=e){if(e>=n)throw new RangeError("Mark decorations may not be empty");return super.range(e,n)}}Ap.prototype.point=!1;class Rp extends Ce{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Rp&&this.spec.class==e.spec.class&&ix(this.spec.attributes,e.spec.attributes)}range(e,n=e){if(n!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,n)}}Rp.prototype.mapMode=En.TrackBefore;Rp.prototype.point=!0;class pa extends Ce{constructor(e,n,i,r,o,s){super(n,i,o,e),this.block=r,this.isReplace=s,this.mapMode=r?n<=0?En.TrackBefore:En.TrackAfter:En.TrackDel}get type(){return this.startSide!=this.endSide?ti.WidgetRange:this.startSide<=0?ti.WidgetBefore:ti.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof pa&&mK(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,n=e){if(this.isReplace&&(e>n||e==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,n)}}pa.prototype.point=!0;function N6(t,e=!1){let{inclusiveStart:n,inclusiveEnd:i}=t;return n==null&&(n=t.inclusive),i==null&&(i=t.inclusive),{start:n??e,end:i??e}}function mK(t,e){return t==e||!!(t&&e&&t.compare(e))}function OS(t,e,n,i=0){let r=n.length-1;r>=0&&n[r]+i>=t?n[r]=Math.max(n[r],e):n.push(t,e)}class ff{constructor(e,n,i,r){this.doc=e,this.pos=n,this.end=i,this.disallowBlockEffectsFor=r,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=n}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof oa&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new on),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(Mm(new hd(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof oa)&&this.getLine()}buildText(e,n,i){for(;e>0;){if(this.textOff==this.text.length){let{value:o,lineBreak:s,done:a}=this.cursor.next(this.skip);if(this.skip=0,a)throw new Error("Ran out of text content when drawing inline views");if(s){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=o,this.textOff=0}let r=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(n.slice(n.length-i)),this.getLine().append(Mm(new Ur(this.text.slice(this.textOff,this.textOff+r)),n),i),this.atCursorPos=!0,this.textOff+=r,e-=r,i=0}}span(e,n,i,r){this.buildText(n-e,i,r),this.pos=n,this.openStart<0&&(this.openStart=r)}point(e,n,i,r,o,s){if(this.disallowBlockEffectsFor[s]&&i instanceof pa){if(i.block)throw new RangeError("Block decorations may not be specified via plugins");if(n>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let a=n-e;if(i instanceof pa)if(i.block)i.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new oa(i.widget||fd.block,a,i));else{let l=Xs.create(i.widget||fd.inline,a,a?0:i.startSide),u=this.atCursorPos&&!l.isEditable&&o<=r.length&&(e0),c=!l.isEditable&&(er.length||i.startSide<=0),d=this.getLine();this.pendingBuffer==2&&!u&&!l.isEditable&&(this.pendingBuffer=0),this.flushBuffer(r),u&&(d.append(Mm(new hd(1),r),o),o=r.length+Math.max(0,o-r.length)),d.append(Mm(l,r),o),this.atCursorPos=c,this.pendingBuffer=c?er.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(i);a&&(this.textOff+a<=this.text.length?this.textOff+=a:(this.skip+=a-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=n),this.openStart<0&&(this.openStart=o)}static build(e,n,i,r,o){let s=new ff(e,n,i,o);return s.openEnd=tt.spans(r,n,i,s),s.openStart<0&&(s.openStart=s.openEnd),s.finish(s.openEnd),s}}function Mm(t,e){for(let n of e)t=new rs(n,[t],t.length);return t}class fd extends fs{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}fd.inline=new fd("span");fd.block=new fd("div");var xt=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(xt||(xt={}));const lu=xt.LTR,rx=xt.RTL;function M6(t){let e=[];for(let n=0;n=n){if(a.level==i)return s;(o<0||(r!=0?r<0?a.fromn:e[o].level>a.level))&&(o=s)}}if(o<0)throw new RangeError("Index out of range");return o}}function B6(t,e){if(t.length!=e.length)return!1;for(let n=0;n=0;O-=3)if(eo[O+1]==-p){let y=eo[O+2],b=y&2?r:y&4?y&1?o:r:0;b&&(ht[d]=ht[eo[O]]=b),a=O;break}}else{if(eo.length==189)break;eo[a++]=d,eo[a++]=h,eo[a++]=l}else if((m=ht[d])==2||m==1){let O=m==r;l=O?0:1;for(let y=a-3;y>=0;y-=3){let b=eo[y+2];if(b&2)break;if(O)eo[y+2]|=2;else{if(b&4)break;eo[y+2]|=4}}}}}function SK(t,e,n,i){for(let r=0,o=i;r<=n.length;r++){let s=r?n[r-1].to:t,a=rl;)m==y&&(m=n[--O].from,y=O?n[O-1].to:t),ht[--m]=p;l=c}else o=u,l++}}}function yS(t,e,n,i,r,o,s){let a=i%2?2:1;if(i%2==r%2)for(let l=e,u=0;ll&&s.push(new Zs(l,O.from,p));let y=O.direction==lu!=!(p%2);vS(t,y?i+1:i,r,O.inner,O.from,O.to,s),l=O.to}m=O.to}else{if(m==n||(c?ht[m]!=a:ht[m]==a))break;m++}h?yS(t,l,m,i+1,r,h,s):le;){let c=!0,d=!1;if(!u||l>o[u-1].to){let O=ht[l-1];O!=a&&(c=!1,d=O==16)}let h=!c&&a==1?[]:null,p=c?i:i+1,m=l;e:for(;;)if(u&&m==o[u-1].to){if(d)break e;let O=o[--u];if(!c)for(let y=O.from,b=u;;){if(y==e)break e;if(b&&o[b-1].to==y)y=o[--b].from;else{if(ht[y-1]==a)break e;break}}if(h)h.push(O);else{O.toht.length;)ht[ht.length]=256;let i=[],r=e==lu?0:1;return vS(t,r,r,n,0,t.length,i),i}function Q6(t){return[new Zs(0,t,0)]}let F6="";function kK(t,e,n,i,r){var o;let s=i.head-t.from,a=Zs.find(e,s,(o=i.bidiLevel)!==null&&o!==void 0?o:-1,i.assoc),l=e[a],u=l.side(r,n);if(s==u){let h=a+=r?1:-1;if(h<0||h>=e.length)return null;l=e[a=h],s=l.side(!r,n),u=l.side(r,n)}let c=Tn(t.text,s,l.forward(r,n));(cl.to)&&(c=u),F6=t.text.slice(Math.min(s,c),Math.max(s,c));let d=a==(r?e.length-1:0)?null:e[a+(r?1:-1)];return d&&c==u&&d.level+(r?0:1)t.some(e=>e)}),Z6=he.define({combine:t=>t.some(e=>e)}),q6=he.define();class Yc{constructor(e,n="nearest",i="nearest",r=5,o=5,s=!1){this.range=e,this.y=n,this.x=i,this.yMargin=r,this.xMargin=o,this.isSnapshot=s}map(e){return e.empty?this:new Yc(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new Yc(q.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const Dm=De.define({map:(t,e)=>t.map(e)});function gi(t,e,n){let i=t.facet(W6);i.length?i[0](e):window.onerror?window.onerror(String(e),n,void 0,void 0,e):n?console.error(n+":",e):console.error(e)}const ab=he.define({combine:t=>t.length?t[0]:!0});let _K=0;const Vh=he.define();class en{constructor(e,n,i,r,o){this.id=e,this.create=n,this.domEventHandlers=i,this.domEventObservers=r,this.extension=o(this)}static define(e,n){const{eventHandlers:i,eventObservers:r,provide:o,decorations:s}=n||{};return new en(_K++,e,i,r,a=>{let l=[Vh.of(a)];return s&&l.push(Jf.of(u=>{let c=u.plugin(a);return c?s(c):Ce.none})),o&&l.push(o(a)),l})}static fromClass(e,n){return en.define(i=>new e(i),n)}}class Ey{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(i){if(gi(n.state,i,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(n){gi(e.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(i){gi(e.state,i,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const Y6=he.define(),ox=he.define(),Jf=he.define(),G6=he.define(),sx=he.define(),K6=he.define();function JP(t,e){let n=t.state.facet(K6);if(!n.length)return n;let i=n.map(o=>o instanceof Function?o(t):o),r=[];return tt.spans(i,e.from,e.to,{point(){},span(o,s,a,l){let u=o-e.from,c=s-e.from,d=r;for(let h=a.length-1;h>=0;h--,l--){let p=a[h].spec.bidiIsolate,m;if(p==null&&(p=xK(e.text,u,c)),l>0&&d.length&&(m=d[d.length-1]).to==u&&m.direction==p)m.to=c,d=m.inner;else{let O={from:u,to:c,direction:p,inner:[]};d.push(O),d=O.inner}}}}),r}const J6=he.define();function eD(t){let e=0,n=0,i=0,r=0;for(let o of t.state.facet(J6)){let s=o(t);s&&(s.left!=null&&(e=Math.max(e,s.left)),s.right!=null&&(n=Math.max(n,s.right)),s.top!=null&&(i=Math.max(i,s.top)),s.bottom!=null&&(r=Math.max(r,s.bottom)))}return{left:e,right:n,top:i,bottom:r}}const jh=he.define();class ur{constructor(e,n,i,r){this.fromA=e,this.toA=n,this.fromB=i,this.toB=r}join(e){return new ur(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let n=e.length,i=this;for(;n>0;n--){let r=e[n-1];if(!(r.fromA>i.toA)){if(r.toAc)break;o+=2}if(!l)return i;new ur(l.fromA,l.toA,l.fromB,l.toB).addToSet(i),s=l.toA,a=l.toB}}}class B0{constructor(e,n,i){this.view=e,this.state=n,this.transactions=i,this.flags=0,this.startState=e.state,this.changes=an.empty(this.startState.doc.length);for(let o of i)this.changes=this.changes.compose(o.changes);let r=[];this.changes.iterChangedRanges((o,s,a,l)=>r.push(new ur(o,s,a,l))),this.changedRanges=r}static create(e,n,i){return new B0(e,n,i)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class eA extends pt{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new on],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new ur(0,0,0,e.state.doc.length)],0,null)}update(e){var n;let i=e.changedRanges;this.minWidth>0&&i.length&&(i.every(({fromA:u,toA:c})=>cthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0);let r=-1;this.view.inputState.composing>=0&&(!((n=this.domChanged)===null||n===void 0)&&n.newSel?r=this.domChanged.newSel.head:!IK(e.changes,this.hasComposition)&&!e.selectionSet&&(r=e.state.selection.main.head));let o=r>-1?CK(this.view,e.changes,r):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:u,to:c}=this.hasComposition;i=new ur(u,c,e.changes.mapPos(u,-1),e.changes.mapPos(c,1)).addToSet(i.slice())}this.hasComposition=o?{from:o.range.fromB,to:o.range.toB}:null,(me.ie||me.chrome)&&!o&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let s=this.decorations,a=this.updateDeco(),l=AK(s,a,e.changes);return i=ur.extendWithRanges(i,l),!(this.flags&7)&&i.length==0?!1:(this.updateInner(i,e.startState.doc.length,o),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,n,i){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,n,i);let{observer:r}=this.view;r.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let s=me.chrome||me.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,s),this.flags&=-8,s&&(s.written||r.selectionRange.focusNode!=s.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(s=>s.flags&=-9);let o=[];if(this.view.viewport.from||this.view.viewport.to=0?r[s]:null;if(!a)break;let{fromA:l,toA:u,fromB:c,toB:d}=a,h,p,m,O;if(i&&i.range.fromBc){let k=ff.build(this.view.state.doc,c,i.range.fromB,this.decorations,this.dynamicDecorationMap),x=ff.build(this.view.state.doc,i.range.toB,d,this.decorations,this.dynamicDecorationMap);p=k.breakAtStart,m=k.openStart,O=x.openEnd;let _=this.compositionView(i);x.breakAtStart?_.breakAfter=1:x.content.length&&_.merge(_.length,_.length,x.content[0],!1,x.openStart,0)&&(_.breakAfter=x.content[0].breakAfter,x.content.shift()),k.content.length&&_.merge(0,0,k.content[k.content.length-1],!0,0,k.openEnd)&&k.content.pop(),h=k.content.concat(_).concat(x.content)}else({content:h,breakAtStart:p,openStart:m,openEnd:O}=ff.build(this.view.state.doc,c,d,this.decorations,this.dynamicDecorationMap));let{i:y,off:b}=o.findPos(u,1),{i:v,off:S}=o.findPos(l,-1);T6(this,v,S,y,b,h,p,m,O)}i&&this.fixCompositionDOM(i)}compositionView(e){let n=new Ur(e.text.nodeValue);n.flags|=8;for(let{deco:r}of e.marks)n=new rs(r,[n],n.length);let i=new on;return i.append(n,0),i}fixCompositionDOM(e){let n=(o,s)=>{s.flags|=8|(s.children.some(l=>l.flags&7)?1:0),this.markedForComposition.add(s);let a=pt.get(o);a&&a!=s&&(a.dom=null),s.setDOM(o)},i=this.childPos(e.range.fromB,1),r=this.children[i.i];n(e.line,r);for(let o=e.marks.length-1;o>=-1;o--)i=r.childPos(i.off,1),r=r.children[i.i],n(o>=0?e.marks[o].node:e.text,r)}updateSelection(e=!1,n=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let i=this.view.root.activeElement,r=i==this.dom,o=!r&&Qg(this.dom,this.view.observer.selectionRange)&&!(i&&this.dom.contains(i));if(!(r||n||o))return;let s=this.forceSelection;this.forceSelection=!1;let a=this.view.state.selection.main,l=this.moveToLine(this.domAtPos(a.anchor)),u=a.empty?l:this.moveToLine(this.domAtPos(a.head));if(me.gecko&&a.empty&&!this.hasComposition&&EK(l)){let d=document.createTextNode("");this.view.observer.ignore(()=>l.node.insertBefore(d,l.node.childNodes[l.offset]||null)),l=u=new Dn(d,0),s=!0}let c=this.view.observer.selectionRange;(s||!c.focusNode||(!hf(l.node,l.offset,c.anchorNode,c.anchorOffset)||!hf(u.node,u.offset,c.focusNode,c.focusOffset))&&!this.suppressWidgetCursorChange(c,a))&&(this.view.observer.ignore(()=>{me.android&&me.chrome&&this.dom.contains(c.focusNode)&&RK(c.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let d=M0(this.view.root);if(d)if(a.empty){if(me.gecko){let h=TK(l.node,l.offset);if(h&&h!=3){let p=(h==1?_6:E6)(l.node,l.offset);p&&(l=new Dn(p.node,p.offset))}}d.collapse(l.node,l.offset),a.bidiLevel!=null&&d.caretBidiLevel!==void 0&&(d.caretBidiLevel=a.bidiLevel)}else if(d.extend){d.collapse(l.node,l.offset);try{d.extend(u.node,u.offset)}catch{}}else{let h=document.createRange();a.anchor>a.head&&([l,u]=[u,l]),h.setEnd(u.node,u.offset),h.setStart(l.node,l.offset),d.removeAllRanges(),d.addRange(h)}o&&this.view.root.activeElement==this.dom&&(this.dom.blur(),i&&i.focus())}),this.view.observer.setSelectionRange(l,u)),this.impreciseAnchor=l.precise?null:new Dn(c.anchorNode,c.anchorOffset),this.impreciseHead=u.precise?null:new Dn(c.focusNode,c.focusOffset)}suppressWidgetCursorChange(e,n){return this.hasComposition&&n.empty&&hf(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==n.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,n=e.state.selection.main,i=M0(e.root),{anchorNode:r,anchorOffset:o}=e.observer.selectionRange;if(!i||!n.empty||!n.assoc||!i.modify)return;let s=on.find(this,n.head);if(!s)return;let a=s.posAtStart;if(n.head==a||n.head==a+s.length)return;let l=this.coordsAt(n.head,-1),u=this.coordsAt(n.head,1);if(!l||!u||l.bottom>u.top)return;let c=this.domAtPos(n.head+n.assoc);i.collapse(c.node,c.offset),i.modify("move",n.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let d=e.observer.selectionRange;e.docView.posFromDOM(d.anchorNode,d.anchorOffset)!=n.from&&i.collapse(r,o)}moveToLine(e){let n=this.dom,i;if(e.node!=n)return e;for(let r=e.offset;!i&&r=0;r--){let o=pt.get(n.childNodes[r]);o instanceof on&&(i=o.domAtPos(o.length))}return i?new Dn(i.node,i.offset,!0):e}nearest(e){for(let n=e;n;){let i=pt.get(n);if(i&&i.rootView==this)return i;n=n.parentNode}return null}posFromDOM(e,n){let i=this.nearest(e);if(!i)throw new RangeError("Trying to find position for a DOM position outside of the document");return i.localPosFromDOM(e,n)+i.posAtStart}domAtPos(e){let{i:n,off:i}=this.childCursor().findPos(e,-1);for(;n=0;s--){let a=this.children[s],l=o-a.breakAfter,u=l-a.length;if(le||a.covers(1))&&(!i||a instanceof on&&!(i instanceof on&&n>=0))&&(i=a,r=u),o=u}return i?i.coordsAt(e-r,n):null}coordsForChar(e){let{i:n,off:i}=this.childPos(e,1),r=this.children[n];if(!(r instanceof on))return null;for(;r.children.length;){let{i:a,off:l}=r.childPos(i,1);for(;;a++){if(a==r.children.length)return null;if((r=r.children[a]).length)break}i=l}if(!(r instanceof Ur))return null;let o=Tn(r.text,i);if(o==i)return null;let s=au(r.dom,i,o).getClientRects();for(let a=0;aMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,l=this.view.textDirection==xt.LTR;for(let u=0,c=0;cr)break;if(u>=i){let p=d.dom.getBoundingClientRect();if(n.push(p.height),s){let m=d.dom.lastChild,O=m?Kf(m):[];if(O.length){let y=O[O.length-1],b=l?y.right-p.left:p.right-y.left;b>a&&(a=b,this.minWidth=o,this.minWidthFrom=u,this.minWidthTo=h)}}}u=h+d.breakAfter}return n}textDirectionAt(e){let{i:n}=this.childPos(e,1);return getComputedStyle(this.children[n].dom).direction=="rtl"?xt.RTL:xt.LTR}measureTextSize(){for(let o of this.children)if(o instanceof on){let s=o.measureTextSize();if(s)return s}let e=document.createElement("div"),n,i,r;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let o=Kf(e.firstChild)[0];n=e.getBoundingClientRect().height,i=o?o.width/27:7,r=o?o.height:n,e.remove()}),{lineHeight:n,charWidth:i,textHeight:r}}childCursor(e=this.length){let n=this.children.length;return n&&(e-=this.children[--n].length),new C6(this.children,e,n)}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let i=0,r=0;;r++){let o=r==n.viewports.length?null:n.viewports[r],s=o?o.from-1:this.length;if(s>i){let a=(n.lineBlockAt(s).bottom-n.lineBlockAt(i).top)/this.view.scaleY;e.push(Ce.replace({widget:new tA(a),block:!0,inclusive:!0,isBlockGap:!0}).range(i,s))}if(!o)break;i=o.to+1}return Ce.set(e)}updateDeco(){let e=0,n=this.view.state.facet(Jf).map(o=>(this.dynamicDecorationMap[e++]=typeof o=="function")?o(this.view):o),i=!1,r=this.view.state.facet(G6).map((o,s)=>{let a=typeof o=="function";return a&&(i=!0),a?o(this.view):o});for(r.length&&(this.dynamicDecorationMap[e++]=i,n.push(tt.join(r))),this.decorations=[...n,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];en.anchor?-1:1),r;if(!i)return;!n.empty&&(r=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(i={left:Math.min(i.left,r.left),top:Math.min(i.top,r.top),right:Math.max(i.right,r.right),bottom:Math.max(i.bottom,r.bottom)});let o=eD(this.view),s={left:i.left-o.left,top:i.top-o.top,right:i.right+o.right,bottom:i.bottom+o.bottom},{offsetWidth:a,offsetHeight:l}=this.view.scrollDOM;sK(this.view.scrollDOM,s,n.head{ie.from&&(n=!0)}),n}function $K(t,e,n=1){let i=t.charCategorizer(e),r=t.doc.lineAt(e),o=e-r.from;if(r.length==0)return q.cursor(e);o==0?n=1:o==r.length&&(n=-1);let s=o,a=o;n<0?s=Tn(r.text,o,!1):a=Tn(r.text,o);let l=i(r.text.slice(s,a));for(;s>0;){let u=Tn(r.text,s,!1);if(i(r.text.slice(u,s))!=l)break;s=u}for(;at?e.left-t:Math.max(0,t-e.right)}function NK(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function Cy(t,e){return t.tope.top+1}function nA(t,e){return et.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function wS(t,e,n){let i,r,o,s,a=!1,l,u,c,d;for(let m=t.firstChild;m;m=m.nextSibling){let O=Kf(m);for(let y=0;yS||s==S&&o>v){i=m,r=b,o=v,s=S;let k=S?n0?y0)}v==0?n>b.bottom&&(!c||c.bottomb.top)&&(u=m,d=b):c&&Cy(c,b)?c=iA(c,b.bottom):d&&Cy(d,b)&&(d=nA(d,b.top))}}if(c&&c.bottom>=n?(i=l,r=c):d&&d.top<=n&&(i=u,r=d),!i)return{node:t,offset:0};let h=Math.max(r.left,Math.min(r.right,e));if(i.nodeType==3)return rA(i,h,n);if(a&&i.contentEditable!="false")return wS(i,h,n);let p=Array.prototype.indexOf.call(t.childNodes,i)+(e>=(r.left+r.right)/2?1:0);return{node:t,offset:p}}function rA(t,e,n){let i=t.nodeValue.length,r=-1,o=1e9,s=0;for(let a=0;an?c.top-n:n-c.bottom)-1;if(c.left-1<=e&&c.right+1>=e&&d=(c.left+c.right)/2,p=h;if((me.chrome||me.gecko)&&au(t,a).getBoundingClientRect().left==c.right&&(p=!h),d<=0)return{node:t,offset:a+(p?1:0)};r=a+(p?1:0),o=d}}}return{node:t,offset:r>-1?r:s>0?t.nodeValue.length:0}}function nD(t,e,n,i=-1){var r,o;let s=t.contentDOM.getBoundingClientRect(),a=s.top+t.viewState.paddingTop,l,{docHeight:u}=t.viewState,{x:c,y:d}=e,h=d-a;if(h<0)return 0;if(h>u)return t.state.doc.length;for(let k=t.viewState.heightOracle.textHeight/2,x=!1;l=t.elementAtHeight(h),l.type!=ti.Text;)for(;h=i>0?l.bottom+k:l.top-k,!(h>=0&&h<=u);){if(x)return n?null:0;x=!0,i=-i}d=a+h;let p=l.from;if(pt.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:n?null:oA(t,s,l,c,d);let m=t.dom.ownerDocument,O=t.root.elementFromPoint?t.root:m,y=O.elementFromPoint(c,d);y&&!t.contentDOM.contains(y)&&(y=null),y||(c=Math.max(s.left+1,Math.min(s.right-1,c)),y=O.elementFromPoint(c,d),y&&!t.contentDOM.contains(y)&&(y=null));let b,v=-1;if(y&&((r=t.docView.nearest(y))===null||r===void 0?void 0:r.isEditable)!=!1){if(m.caretPositionFromPoint){let k=m.caretPositionFromPoint(c,d);k&&({offsetNode:b,offset:v}=k)}else if(m.caretRangeFromPoint){let k=m.caretRangeFromPoint(c,d);k&&({startContainer:b,startOffset:v}=k,(!t.contentDOM.contains(b)||me.safari&&MK(b,v,c)||me.chrome&&DK(b,v,c))&&(b=void 0))}}if(!b||!t.docView.dom.contains(b)){let k=on.find(t.docView,p);if(!k)return h>l.top+l.height/2?l.to:l.from;({node:b,offset:v}=wS(k.dom,c,d))}let S=t.docView.nearest(b);if(!S)return null;if(S.isWidget&&((o=S.dom)===null||o===void 0?void 0:o.nodeType)==1){let k=S.dom.getBoundingClientRect();return e.yt.defaultLineHeight*1.5){let a=t.viewState.heightOracle.textHeight,l=Math.floor((r-n.top-(t.defaultLineHeight-a)*.5)/a);o+=l*t.viewState.heightOracle.lineLength}let s=t.state.sliceDoc(n.from,n.to);return n.from+lS(s,o,t.state.tabSize)}function MK(t,e,n){let i;if(t.nodeType!=3||e!=(i=t.nodeValue.length))return!1;for(let r=t.nextSibling;r;r=r.nextSibling)if(r.nodeType!=1||r.nodeName!="BR")return!1;return au(t,i-1,i).getBoundingClientRect().left>n}function DK(t,e,n){if(e!=0)return!1;for(let r=t;;){let o=r.parentNode;if(!o||o.nodeType!=1||o.firstChild!=r)return!1;if(o.classList.contains("cm-line"))break;r=o}let i=t.nodeType==1?t.getBoundingClientRect():au(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect();return n-i.left>5}function kS(t,e){let n=t.lineBlockAt(e);if(Array.isArray(n.type)){for(let i of n.type)if(i.to>e||i.to==e&&(i.to==n.to||i.type==ti.Text))return i}return n}function BK(t,e,n,i){let r=kS(t,e.head),o=!i||r.type!=ti.Text||!(t.lineWrapping||r.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>r.from?e.head-1:e.head);if(o){let s=t.dom.getBoundingClientRect(),a=t.textDirectionAt(r.from),l=t.posAtCoords({x:n==(a==xt.LTR)?s.right-1:s.left+1,y:(o.top+o.bottom)/2});if(l!=null)return q.cursor(l,n?-1:1)}return q.cursor(n?r.to:r.from,n?-1:1)}function sA(t,e,n,i){let r=t.state.doc.lineAt(e.head),o=t.bidiSpans(r),s=t.textDirectionAt(r.from);for(let a=e,l=null;;){let u=kK(r,o,s,a,n),c=F6;if(!u){if(r.number==(n?t.state.doc.lines:1))return a;c=` -`,r=t.state.doc.line(r.number+(n?1:-1)),o=t.bidiSpans(r),u=t.visualLineSide(r,!n)}if(l){if(!l(c))return a}else{if(!i)return u;l=i(c)}a=u}}function QK(t,e,n){let i=t.state.charCategorizer(e),r=i(n);return o=>{let s=i(o);return r==Rt.Space&&(r=s),r==s}}function FK(t,e,n,i){let r=e.head,o=n?1:-1;if(r==(n?t.state.doc.length:0))return q.cursor(r,e.assoc);let s=e.goalColumn,a,l=t.contentDOM.getBoundingClientRect(),u=t.coordsAtPos(r,e.assoc||-1),c=t.documentTop;if(u)s==null&&(s=u.left-l.left),a=o<0?u.top:u.bottom;else{let p=t.viewState.lineBlockAt(r);s==null&&(s=Math.min(l.right-l.left,t.defaultCharacterWidth*(r-p.from))),a=(o<0?p.top:p.bottom)+c}let d=l.left+s,h=i??t.viewState.heightOracle.textHeight>>1;for(let p=0;;p+=10){let m=a+(h+p)*o,O=nD(t,{x:d,y:m},!1,o);if(ml.bottom||(o<0?Or)){let y=t.docView.coordsForChar(O),b=!y||m{if(e>o&&er(t)),n.from,e.head>n.from?-1:1);return i==n.from?n:q.cursor(i,inull),me.gecko&&iJ(e.contentDOM.ownerDocument)}handleEvent(e){!qK(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||this.runHandlers(e.type,e)}runHandlers(e,n){let i=this.handlers[e];if(i){for(let r of i.observers)r(this.view,n);for(let r of i.handlers){if(n.defaultPrevented)break;if(r(this.view,n)){n.preventDefault();break}}}}ensureHandlers(e){let n=HK(e),i=this.handlers,r=this.view.contentDOM;for(let o in n)if(o!="scroll"){let s=!n[o].handlers.length,a=i[o];a&&s!=!a.handlers.length&&(r.removeEventListener(o,this.handleEvent),a=null),a||r.addEventListener(o,this.handleEvent,{passive:s})}for(let o in i)o!="scroll"&&!n[o]&&r.removeEventListener(o,this.handleEvent);this.handlers=n}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&Date.now()i.keyCode==e.keyCode))&&!e.ctrlKey||UK.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=n||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let n=this.pendingIOSKey;return!n||n.key=="Enter"&&e&&e.from0?!0:me.safari&&!me.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function aA(t,e){return(n,i)=>{try{return e.call(t,i,n)}catch(r){gi(n.state,r)}}}function HK(t){let e=Object.create(null);function n(i){return e[i]||(e[i]={observers:[],handlers:[]})}for(let i of t){let r=i.spec;if(r&&r.domEventHandlers)for(let o in r.domEventHandlers){let s=r.domEventHandlers[o];s&&n(o).handlers.push(aA(i.value,s))}if(r&&r.domEventObservers)for(let o in r.domEventObservers){let s=r.domEventObservers[o];s&&n(o).observers.push(aA(i.value,s))}}for(let i in Wr)n(i).handlers.push(Wr[i]);for(let i in fr)n(i).observers.push(fr[i]);return e}const iD=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],UK="dthko",rD=[16,17,18,20,91,92,224,225],Bm=6;function Qm(t){return Math.max(0,t)*.7+8}function WK(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}class VK{constructor(e,n,i,r){this.view=e,this.startEvent=n,this.style=i,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParent=aK(e.contentDOM),this.atoms=e.state.facet(sx).map(s=>s(e));let o=e.contentDOM.ownerDocument;o.addEventListener("mousemove",this.move=this.move.bind(this)),o.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=e.state.facet(Ve.allowMultipleSelections)&&jK(e,n),this.dragging=ZK(e,n)&&lD(n)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){var n;if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&WK(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let i=0,r=0,o=((n=this.scrollParent)===null||n===void 0?void 0:n.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight},s=eD(this.view);e.clientX-s.left<=o.left+Bm?i=-Qm(o.left-e.clientX):e.clientX+s.right>=o.right-Bm&&(i=Qm(e.clientX-o.right)),e.clientY-s.top<=o.top+Bm?r=-Qm(o.top-e.clientY):e.clientY+s.bottom>=o.bottom-Bm&&(r=Qm(e.clientY-o.bottom)),this.setScrollSpeed(i,r)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,n){this.scrollSpeed={x:e,y:n},e||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let n=null;for(let i=0;ithis.select(this.lastEvent),20)}}function jK(t,e){let n=t.state.facet(z6);return n.length?n[0](e):me.mac?e.metaKey:e.ctrlKey}function XK(t,e){let n=t.state.facet(H6);return n.length?n[0](e):me.mac?!e.altKey:!e.ctrlKey}function ZK(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let i=M0(t.root);if(!i||i.rangeCount==0)return!0;let r=i.getRangeAt(0).getClientRects();for(let o=0;o=e.clientX&&s.top<=e.clientY&&s.bottom>=e.clientY)return!0}return!1}function qK(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,i;n!=t.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(i=pt.get(n))&&i.ignoreEvent(e))return!1;return!0}const Wr=Object.create(null),fr=Object.create(null),oD=me.ie&&me.ie_version<15||me.ios&&me.webkit_version<604;function YK(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{t.focus(),n.remove(),sD(t,n.value)},50)}function sD(t,e){let{state:n}=t,i,r=1,o=n.toText(e),s=o.lines==n.selection.ranges.length;if(xS!=null&&n.selection.ranges.every(l=>l.empty)&&xS==o.toString()){let l=-1;i=n.changeByRange(u=>{let c=n.doc.lineAt(u.from);if(c.from==l)return{range:u};l=c.from;let d=n.toText((s?o.line(r++).text:e)+n.lineBreak);return{changes:{from:c.from,insert:d},range:q.cursor(u.from+d.length)}})}else s?i=n.changeByRange(l=>{let u=o.line(r++);return{changes:{from:l.from,to:l.to,insert:u.text},range:q.cursor(l.from+u.length)}}):i=n.replaceSelection(o);t.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}fr.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft};Wr.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),e.keyCode==27&&(t.inputState.lastEscPress=Date.now()),!1);fr.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")};fr.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};Wr.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let i of t.state.facet(U6))if(n=i(t,e),n)break;if(!n&&e.button==0&&(n=JK(t,e)),n){let i=!t.hasFocus;t.inputState.startMouseSelection(new VK(t,e,n,i)),i&&t.observer.ignore(()=>w6(t.contentDOM));let r=t.inputState.mouseSelection;if(r)return r.start(e),r.dragging===!1}return!1};function lA(t,e,n,i){if(i==1)return q.cursor(e,n);if(i==2)return $K(t.state,e,n);{let r=on.find(t.docView,e),o=t.state.doc.lineAt(r?r.posAtEnd:e),s=r?r.posAtStart:o.from,a=r?r.posAtEnd:o.to;return at>=e.top&&t<=e.bottom,uA=(t,e,n)=>aD(e,n)&&t>=n.left&&t<=n.right;function GK(t,e,n,i){let r=on.find(t.docView,e);if(!r)return 1;let o=e-r.posAtStart;if(o==0)return 1;if(o==r.length)return-1;let s=r.coordsAt(o,-1);if(s&&uA(n,i,s))return-1;let a=r.coordsAt(o,1);return a&&uA(n,i,a)?1:s&&aD(i,s)?-1:1}function cA(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:n,bias:GK(t,n,e.clientX,e.clientY)}}const KK=me.ie&&me.ie_version<=11;let dA=null,hA=0,fA=0;function lD(t){if(!KK)return t.detail;let e=dA,n=fA;return dA=t,fA=Date.now(),hA=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(hA+1)%3:1}function JK(t,e){let n=cA(t,e),i=lD(e),r=t.state.selection;return{update(o){o.docChanged&&(n.pos=o.changes.mapPos(n.pos),r=r.map(o.changes))},get(o,s,a){let l=cA(t,o),u,c=lA(t,l.pos,l.bias,i);if(n.pos!=l.pos&&!s){let d=lA(t,n.pos,n.bias,i),h=Math.min(d.from,c.from),p=Math.max(d.to,c.to);c=h1&&(u=eJ(r,l.pos))?u:a?r.addRange(c):q.create([c])}}}function eJ(t,e){for(let n=0;n=e)return q.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}return null}Wr.dragstart=(t,e)=>{let{selection:{main:n}}=t.state;if(e.target.draggable){let r=t.docView.nearest(e.target);if(r&&r.isWidget){let o=r.posAtStart,s=o+r.length;(o>=n.to||s<=n.from)&&(n=q.range(o,s))}}let{inputState:i}=t;return i.mouseSelection&&(i.mouseSelection.dragging=!0),i.draggedContent=n,e.dataTransfer&&(e.dataTransfer.setData("Text",t.state.sliceDoc(n.from,n.to)),e.dataTransfer.effectAllowed="copyMove"),!1};Wr.dragend=t=>(t.inputState.draggedContent=null,!1);function pA(t,e,n,i){if(!n)return;let r=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:o}=t.inputState,s=i&&o&&XK(t,e)?{from:o.from,to:o.to}:null,a={from:r,insert:n},l=t.state.changes(s?[s,a]:a);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(r,-1),head:l.mapPos(r,1)},userEvent:s?"move.drop":"input.drop"}),t.inputState.draggedContent=null}Wr.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let n=e.dataTransfer.files;if(n&&n.length){let i=Array(n.length),r=0,o=()=>{++r==n.length&&pA(t,e,i.filter(s=>s!=null).join(t.state.lineBreak),!1)};for(let s=0;s{/[\x00-\x08\x0e-\x1f]{2}/.test(a.result)||(i[s]=a.result),o()},a.readAsText(n[s])}return!0}else{let i=e.dataTransfer.getData("Text");if(i)return pA(t,e,i,!0),!0}return!1};Wr.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let n=oD?null:e.clipboardData;return n?(sD(t,n.getData("text/plain")||n.getData("text/uri-list")),!0):(YK(t),!1)};function tJ(t,e){let n=t.dom.parentNode;if(!n)return;let i=n.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.value=e,i.focus(),i.selectionEnd=e.length,i.selectionStart=0,setTimeout(()=>{i.remove(),t.focus()},50)}function nJ(t){let e=[],n=[],i=!1;for(let r of t.selection.ranges)r.empty||(e.push(t.sliceDoc(r.from,r.to)),n.push(r));if(!e.length){let r=-1;for(let{from:o}of t.selection.ranges){let s=t.doc.lineAt(o);s.number>r&&(e.push(s.text),n.push({from:s.from,to:Math.min(t.doc.length,s.to+1)})),r=s.number}i=!0}return{text:e.join(t.lineBreak),ranges:n,linewise:i}}let xS=null;Wr.copy=Wr.cut=(t,e)=>{let{text:n,ranges:i,linewise:r}=nJ(t.state);if(!n&&!r)return!1;xS=r?n:null,e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"});let o=oD?null:e.clipboardData;return o?(o.clearData(),o.setData("text/plain",n),!0):(tJ(t,n),!1)};const uD=hs.define();function cD(t,e){let n=[];for(let i of t.facet(j6)){let r=i(t,e);r&&n.push(r)}return n?t.update({effects:n,annotations:uD.of(!0)}):null}function dD(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=cD(t.state,e);n?t.dispatch(n):t.update([])}},10)}fr.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),dD(t)};fr.blur=t=>{t.observer.clearSelectionRange(),dD(t)};fr.compositionstart=fr.compositionupdate=t=>{t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0)};fr.compositionend=t=>{t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,me.chrome&&me.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50)};fr.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};Wr.beforeinput=(t,e)=>{var n;let i;if(me.chrome&&me.android&&(i=iD.find(r=>r.inputType==e.inputType))&&(t.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let r=((n=window.visualViewport)===null||n===void 0?void 0:n.height)||0;setTimeout(()=>{var o;(((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0)>r+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return me.ios&&e.inputType=="deleteContentForward"&&t.observer.flushSoon(),me.safari&&e.inputType=="insertText"&&t.inputState.composing>=0&&setTimeout(()=>fr.compositionend(t,e),20),!1};const mA=new Set;function iJ(t){mA.has(t)||(mA.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}const gA=["pre-wrap","normal","pre-line","break-spaces"];class rJ{constructor(e){this.lineWrapping=e,this.doc=ot.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30,this.heightChanged=!1}heightForGap(e,n){let i=this.doc.lineAt(n).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((n-e-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return gA.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let n=!1;for(let i=0;i-1,l=Math.round(n)!=Math.round(this.lineHeight)||this.lineWrapping!=a;if(this.lineWrapping=a,this.lineHeight=n,this.charWidth=i,this.textHeight=r,this.lineLength=o,l){this.heightSamples={};for(let u=0;u0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e,n){this.height!=n&&(Math.abs(this.height-n)>zg&&(e.heightChanged=!0),this.height=n)}replace(e,n,i){return ni.of(i)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,i,r){let o=this,s=i.doc;for(let a=r.length-1;a>=0;a--){let{fromA:l,toA:u,fromB:c,toB:d}=r[a],h=o.lineAt(l,wt.ByPosNoHeight,i.setDoc(n),0,0),p=h.to>=u?h:o.lineAt(u,wt.ByPosNoHeight,i,0,0);for(d+=p.to-u,u=p.to;a>0&&h.from<=r[a-1].toA;)l=r[a-1].fromA,c=r[a-1].fromB,a--,lo*2){let a=e[n-1];a.break?e.splice(--n,1,a.left,null,a.right):e.splice(--n,1,a.left,a.right),i+=1+a.break,r-=a.size}else if(o>r*2){let a=e[i];a.break?e.splice(i,1,a.left,null,a.right):e.splice(i,1,a.left,a.right),i+=2+a.break,o-=a.size}else break;else if(r=o&&s(this.blockAt(0,i,r,o))}updateHeight(e,n=0,i=!1,r){return r&&r.from<=n&&r.more&&this.setHeight(e,r.heights[r.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Ii extends hD{constructor(e,n){super(e,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,n,i,r){return new co(r,this.length,i,this.height,this.breaks)}replace(e,n,i){let r=i[0];return i.length==1&&(r instanceof Ii||r instanceof wn&&r.flags&4)&&Math.abs(this.length-r.length)<10?(r instanceof wn?r=new Ii(r.length,this.height):r.height=this.height,this.outdated||(r.outdated=!1),r):ni.of(i)}updateHeight(e,n=0,i=!1,r){return r&&r.from<=n&&r.more?this.setHeight(e,r.heights[r.index++]):(i||this.outdated)&&this.setHeight(e,Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class wn extends ni{constructor(e){super(e,0)}heightMetrics(e,n){let i=e.doc.lineAt(n).number,r=e.doc.lineAt(n+this.length).number,o=r-i+1,s,a=0;if(e.lineWrapping){let l=Math.min(this.height,e.lineHeight*o);s=l/o,this.length>o+1&&(a=(this.height-l)/(this.length-o-1))}else s=this.height/o;return{firstLine:i,lastLine:r,perLine:s,perChar:a}}blockAt(e,n,i,r){let{firstLine:o,lastLine:s,perLine:a,perChar:l}=this.heightMetrics(n,r);if(n.lineWrapping){let u=r+(e0){let o=i[i.length-1];o instanceof wn?i[i.length-1]=new wn(o.length+r):i.push(null,new wn(r-1))}if(e>0){let o=i[0];o instanceof wn?i[0]=new wn(e+o.length):i.unshift(new wn(e-1),null)}return ni.of(i)}decomposeLeft(e,n){n.push(new wn(e-1),null)}decomposeRight(e,n){n.push(null,new wn(this.length-e-1))}updateHeight(e,n=0,i=!1,r){let o=n+this.length;if(r&&r.from<=n+this.length&&r.more){let s=[],a=Math.max(n,r.from),l=-1;for(r.from>n&&s.push(new wn(r.from-n-1).updateHeight(e,n));a<=o&&r.more;){let c=e.doc.lineAt(a).length;s.length&&s.push(null);let d=r.heights[r.index++];l==-1?l=d:Math.abs(d-l)>=zg&&(l=-2);let h=new Ii(c,d);h.outdated=!1,s.push(h),a+=c+1}a<=o&&s.push(null,new wn(o-a).updateHeight(e,a));let u=ni.of(s);return(l<0||Math.abs(u.height-this.height)>=zg||Math.abs(l-this.heightMetrics(e,n).perLine)>=zg)&&(e.heightChanged=!0),u}else(i||this.outdated)&&(this.setHeight(e,e.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class sJ extends ni{constructor(e,n,i){super(e.length+n+i.length,e.height+i.height,n|(e.outdated||i.outdated?2:0)),this.left=e,this.right=i,this.size=e.size+i.size}get break(){return this.flags&1}blockAt(e,n,i,r){let o=i+this.left.height;return ea))return u;let c=n==wt.ByPosNoHeight?wt.ByPosNoHeight:wt.ByPos;return l?u.join(this.right.lineAt(a,c,i,s,a)):this.left.lineAt(a,c,i,r,o).join(u)}forEachLine(e,n,i,r,o,s){let a=r+this.left.height,l=o+this.left.length+this.break;if(this.break)e=l&&this.right.forEachLine(e,n,i,a,l,s);else{let u=this.lineAt(l,wt.ByPos,i,r,o);e=e&&u.from<=n&&s(u),n>u.to&&this.right.forEachLine(u.to+1,n,i,a,l,s)}}replace(e,n,i){let r=this.left.length+this.break;if(nthis.left.length)return this.balanced(this.left,this.right.replace(e-r,n-r,i));let o=[];e>0&&this.decomposeLeft(e,o);let s=o.length;for(let a of i)o.push(a);if(e>0&&OA(o,s-1),n=i&&n.push(null)),e>i&&this.right.decomposeLeft(e-i,n)}decomposeRight(e,n){let i=this.left.length,r=i+this.break;if(e>=r)return this.right.decomposeRight(e-r,n);e2*n.size||n.size>2*e.size?ni.of(this.break?[e,null,n]:[e,n]):(this.left=e,this.right=n,this.height=e.height+n.height,this.outdated=e.outdated||n.outdated,this.size=e.size+n.size,this.length=e.length+this.break+n.length,this)}updateHeight(e,n=0,i=!1,r){let{left:o,right:s}=this,a=n+o.length+this.break,l=null;return r&&r.from<=n+o.length&&r.more?l=o=o.updateHeight(e,n,i,r):o.updateHeight(e,n,i),r&&r.from<=a+s.length&&r.more?l=s=s.updateHeight(e,a,i,r):s.updateHeight(e,a,i),l?this.balanced(o,s):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function OA(t,e){let n,i;t[e]==null&&(n=t[e-1])instanceof wn&&(i=t[e+1])instanceof wn&&t.splice(e-1,3,new wn(n.length+1+i.length))}const aJ=5;class ax{constructor(e,n){this.pos=e,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,n){if(this.lineStart>-1){let i=Math.min(n,this.lineEnd),r=this.nodes[this.nodes.length-1];r instanceof Ii?r.length+=i-this.pos:(i>this.pos||!this.isCovered)&&this.nodes.push(new Ii(i-this.pos,-1)),this.writtenTo=i,n>i&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(e,n,i){if(e=aJ)&&this.addLineDeco(r,o,s)}else n>e&&this.span(e,n);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=n,this.writtenToe&&this.nodes.push(new Ii(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,n){let i=new wn(n-e);return this.oracle.doc.lineAt(e).to==n&&(i.flags|=4),i}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Ii)return e;let n=new Ii(0,-1);return this.nodes.push(n),n}addBlock(e){this.enterLine();let n=e.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,n&&n.endSide>0&&(this.covering=e)}addLineDeco(e,n,i){let r=this.ensureLine();r.length+=i,r.collapsed+=i,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=n,this.writtenTo=this.pos=this.pos+i}finish(e){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof Ii)&&!this.isCovered?this.nodes.push(new Ii(0,-1)):(this.writtenToc.clientHeight||c.scrollWidth>c.clientWidth)&&d.overflow!="visible"){let h=c.getBoundingClientRect();o=Math.max(o,h.left),s=Math.min(s,h.right),a=Math.max(a,h.top),l=u==t.parentNode?h.bottom:Math.min(l,h.bottom)}u=d.position=="absolute"||d.position=="fixed"?c.offsetParent:c.parentNode}else if(u.nodeType==11)u=u.host;else break;return{left:o-n.left,right:Math.max(o,s)-n.left,top:a-(n.top+e),bottom:Math.max(a,l)-(n.top+e)}}function dJ(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class Py{constructor(e,n,i){this.from=e,this.to=n,this.size=i}static same(e,n){if(e.length!=n.length)return!1;for(let i=0;itypeof i!="function"&&i.class=="cm-lineWrapping");this.heightOracle=new rJ(n),this.stateDeco=e.facet(Jf).filter(i=>typeof i!="function"),this.heightMap=ni.empty().applyChanges(this.stateDeco,ot.empty,this.heightOracle.setDoc(e.doc),[new ur(0,0,0,e.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Ce.set(this.lineGaps.map(i=>i.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:n}=this.state.selection;for(let i=0;i<=1;i++){let r=i?n.head:n.anchor;if(!e.some(({from:o,to:s})=>r>=o&&r<=s)){let{from:o,to:s}=this.lineBlockAt(r);e.push(new Fm(o,s))}}this.viewports=e.sort((i,r)=>i.from-r.from),this.scaler=this.heightMap.height<=7e6?yA:new mJ(this.heightOracle,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(this.scaler.scale==1?e:Xh(e,this.scaler))})}update(e,n=null){this.state=e.state;let i=this.stateDeco;this.stateDeco=this.state.facet(Jf).filter(c=>typeof c!="function");let r=e.changedRanges,o=ur.extendWithRanges(r,lJ(i,this.stateDeco,e?e.changes:an.empty(this.state.doc.length))),s=this.heightMap.height,a=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),o),this.heightMap.height!=s&&(e.flags|=2),a?(this.scrollAnchorPos=e.changes.mapPos(a.from,-1),this.scrollAnchorHeight=a.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let l=o.length?this.mapViewport(this.viewport,e.changes):this.viewport;(n&&(n.range.headl.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,n));let u=!e.changes.empty||e.flags&2||l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l,this.updateForViewport(),u&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(Z6)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let n=e.contentDOM,i=window.getComputedStyle(n),r=this.heightOracle,o=i.whiteSpace;this.defaultTextDirection=i.direction=="rtl"?xt.RTL:xt.LTR;let s=this.heightOracle.mustRefreshForWrapping(o),a=n.getBoundingClientRect(),l=s||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;let u=0,c=0;if(a.width&&a.height){let{scaleX:k,scaleY:x}=S6(n,a);(k>.005&&Math.abs(this.scaleX-k)>.005||x>.005&&Math.abs(this.scaleY-x)>.005)&&(this.scaleX=k,this.scaleY=x,u|=8,s=l=!0)}let d=(parseInt(i.paddingTop)||0)*this.scaleY,h=(parseInt(i.paddingBottom)||0)*this.scaleY;(this.paddingTop!=d||this.paddingBottom!=h)&&(this.paddingTop=d,this.paddingBottom=h,u|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(l=!0),this.editorWidth=e.scrollDOM.clientWidth,u|=8);let p=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=p&&(this.scrollAnchorHeight=-1,this.scrollTop=p),this.scrolledToBottom=x6(e.scrollDOM);let m=(this.printing?dJ:cJ)(n,this.paddingTop),O=m.top-this.pixelViewport.top,y=m.bottom-this.pixelViewport.bottom;this.pixelViewport=m;let b=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(b!=this.inView&&(this.inView=b,b&&(l=!0)),!this.inView&&!this.scrollTarget)return 0;let v=a.width;if((this.contentDOMWidth!=v||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=a.width,this.editorHeight=e.scrollDOM.clientHeight,u|=8),l){let k=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(k)&&(s=!0),s||r.lineWrapping&&Math.abs(v-this.contentDOMWidth)>r.charWidth){let{lineHeight:x,charWidth:_,textHeight:w}=e.docView.measureTextSize();s=x>0&&r.refresh(o,x,_,w,v/_,k),s&&(e.docView.minWidth=0,u|=8)}O>0&&y>0?c=Math.max(O,y):O<0&&y<0&&(c=Math.min(O,y)),r.heightChanged=!1;for(let x of this.viewports){let _=x.from==this.viewport.from?k:e.docView.measureVisibleLineHeights(x);this.heightMap=(s?ni.empty().applyChanges(this.stateDeco,ot.empty,this.heightOracle,[new ur(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,s,new oJ(x.from,_))}r.heightChanged&&(u|=2)}let S=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return S&&(this.viewport=this.getViewport(c,this.scrollTarget)),this.updateForViewport(),(u&2||S)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(s?[]:this.lineGaps,e)),u|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),u}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,n){let i=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,o=this.heightOracle,{visibleTop:s,visibleBottom:a}=this,l=new Fm(r.lineAt(s-i*1e3,wt.ByHeight,o,0,0).from,r.lineAt(a+(1-i)*1e3,wt.ByHeight,o,0,0).to);if(n){let{head:u}=n.range;if(ul.to){let c=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),d=r.lineAt(u,wt.ByPos,o,0,0),h;n.y=="center"?h=(d.top+d.bottom)/2-c/2:n.y=="start"||n.y=="nearest"&&u=a+Math.max(10,Math.min(i,250)))&&r>s-2*1e3&&o>1,s=r<<1;if(this.defaultTextDirection!=xt.LTR&&!i)return[];let a=[],l=(u,c,d,h)=>{if(c-uu&&yy.from>=d.from&&y.to<=d.to&&Math.abs(y.from-u)y.fromb));if(!O){if(cy.from<=c&&y.to>=c)){let y=n.moveToLineBoundary(q.cursor(c),!1,!0).head;y>u&&(c=y)}O=new Py(u,c,this.gapSize(d,u,c,h))}a.push(O)};for(let u of this.viewportLines){if(u.lengthu.from&&l(u.from,h,u,c),pn.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let n=[];tt.spans(e,this.viewport.from,this.viewport.to,{span(r,o){n.push({from:r,to:o})},point(){}},20);let i=n.length!=this.visibleRanges.length||this.visibleRanges.some((r,o)=>r.from!=n[o].from||r.to!=n[o].to);return this.visibleRanges=n,i?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(n=>n.from<=e&&n.to>=e)||Xh(this.heightMap.lineAt(e,wt.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return Xh(this.heightMap.lineAt(this.scaler.fromDOM(e),wt.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let n=this.lineBlockAtHeight(e+8);return n.from>=this.viewport.from||this.viewportLines[0].top-e>200?n:this.viewportLines[0]}elementAtHeight(e){return Xh(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class Fm{constructor(e,n){this.from=e,this.to=n}}function fJ(t,e,n){let i=[],r=t,o=0;return tt.spans(n,t,e,{span(){},point(s,a){s>r&&(i.push({from:r,to:s}),o+=s-r),r=a}},20),r=1)return e[e.length-1].to;let i=Math.floor(t*n);for(let r=0;;r++){let{from:o,to:s}=e[r],a=s-o;if(i<=a)return o+i;i-=a}}function Hm(t,e){let n=0;for(let{from:i,to:r}of t.ranges){if(e<=r){n+=e-i;break}n+=r-i}return n/t.total}function pJ(t,e){for(let n of t)if(e(n))return n}const yA={toDOM(t){return t},fromDOM(t){return t},scale:1};class mJ{constructor(e,n,i){let r=0,o=0,s=0;this.viewports=i.map(({from:a,to:l})=>{let u=n.lineAt(a,wt.ByPos,e,0,0).top,c=n.lineAt(l,wt.ByPos,e,0,0).bottom;return r+=c-u,{from:a,to:l,top:u,bottom:c,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(n.height-r);for(let a of this.viewports)a.domTop=s+(a.top-o)*this.scale,s=a.domBottom=a.domTop+(a.bottom-a.top),o=a.bottom}toDOM(e){for(let n=0,i=0,r=0;;n++){let o=nXh(r,e)):t._content)}const Um=he.define({combine:t=>t.join(" ")}),_S=he.define({combine:t=>t.indexOf(!0)>-1}),ES=ha.newName(),fD=ha.newName(),pD=ha.newName(),mD={"&light":"."+fD,"&dark":"."+pD};function CS(t,e,n){return new ha(e,{finish(i){return/&/.test(i)?i.replace(/&\w*/,r=>{if(r=="&")return t;if(!n||!n[r])throw new RangeError(`Unsupported selector: ${r}`);return n[r]}):t+" "+i}})}const gJ=CS("."+ES,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},mD),Zh="￿";class OJ{constructor(e,n){this.points=e,this.text="",this.lineSeparator=n.facet(Ve.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=Zh}readRange(e,n){if(!e)return this;let i=e.parentNode;for(let r=e;;){this.findPointBefore(i,r);let o=this.text.length;this.readNode(r);let s=r.nextSibling;if(s==n)break;let a=pt.get(r),l=pt.get(s);(a&&l?a.breakAfter:(a?a.breakAfter:D0(r))||D0(s)&&(r.nodeName!="BR"||r.cmIgnore)&&this.text.length>o)&&this.lineBreak(),r=s}return this.findPointBefore(i,n),this}readTextNode(e){let n=e.nodeValue;for(let i of this.points)i.node==e&&(i.pos=this.text.length+Math.min(i.offset,n.length));for(let i=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let o=-1,s=1,a;if(this.lineSeparator?(o=n.indexOf(this.lineSeparator,i),s=this.lineSeparator.length):(a=r.exec(n))&&(o=a.index,s=a[0].length),this.append(n.slice(i,o<0?n.length:o)),o<0)break;if(this.lineBreak(),s>1)for(let l of this.points)l.node==e&&l.pos>this.text.length&&(l.pos-=s-1);i=o+s}}readNode(e){if(e.cmIgnore)return;let n=pt.get(e),i=n&&n.overrideDOMText;if(i!=null){this.findPointInside(e,i.length);for(let r=i.iter();!r.next().done;)r.lineBreak?this.lineBreak():this.append(r.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,n){for(let i of this.points)i.node==e&&e.childNodes[i.offset]==n&&(i.pos=this.text.length)}findPointInside(e,n){for(let i of this.points)(e.nodeType==3?i.node==e:e.contains(i.node))&&(i.pos=this.text.length+(bJ(e,i.node,i.offset)?n:0))}}function bJ(t,e,n){for(;;){if(!e||n-1)this.newSel=null;else if(n>-1&&(this.bounds=e.docView.domBoundsAround(n,i,0))){let a=o||s?[]:wJ(e),l=new OJ(a,e.state);l.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=l.text,this.newSel=kJ(a,this.bounds.from)}else{let a=e.observer.selectionRange,l=o&&o.node==a.focusNode&&o.offset==a.focusOffset||!dS(e.contentDOM,a.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(a.focusNode,a.focusOffset),u=s&&s.node==a.anchorNode&&s.offset==a.anchorOffset||!dS(e.contentDOM,a.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(a.anchorNode,a.anchorOffset),c=e.viewport;if((me.ios||me.chrome)&&e.state.selection.main.empty&&l!=u&&(c.from>0||c.toDate.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:s,to:a}=e.bounds,l=r.from,u=null;(o===8||me.android&&e.text.length=r.from&&n.to<=r.to&&(n.from!=r.from||n.to!=r.to)&&r.to-r.from-(n.to-n.from)<=4?n={from:r.from,to:r.to,insert:t.state.doc.slice(r.from,n.from).append(n.insert).append(t.state.doc.slice(n.to,r.to))}:(me.mac||me.android)&&n&&n.from==n.to&&n.from==r.head-1&&/^\. ?$/.test(n.insert.toString())&&t.contentDOM.getAttribute("autocorrect")=="off"?(i&&n.insert.length==2&&(i=q.single(i.main.anchor-1,i.main.head-1)),n={from:r.from,to:r.to,insert:ot.of([" "])}):me.chrome&&n&&n.from==n.to&&n.from==r.head&&n.insert.toString()==` - `&&t.lineWrapping&&(i&&(i=q.single(i.main.anchor-1,i.main.head-1)),n={from:r.from,to:r.to,insert:ot.of([" "])}),n){if(me.ios&&t.inputState.flushIOSKey(n)||me.android&&(n.to==r.to&&(n.from==r.from||n.from==r.from-1&&t.state.sliceDoc(n.from,r.from)==" ")&&n.insert.length==1&&n.insert.lines==2&&qc(t.contentDOM,"Enter",13)||(n.from==r.from-1&&n.to==r.to&&n.insert.length==0||o==8&&n.insert.lengthr.head)&&qc(t.contentDOM,"Backspace",8)||n.from==r.from&&n.to==r.to+1&&n.insert.length==0&&qc(t.contentDOM,"Delete",46)))return!0;let s=n.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let a,l=()=>a||(a=vJ(t,n,i));return t.state.facet(V6).some(u=>u(t,n.from,n.to,s,l))||t.dispatch(l()),!0}else if(i&&!i.main.eq(r)){let s=!1,a="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(s=!0),a=t.inputState.lastSelectionOrigin),t.dispatch({selection:i,scrollIntoView:s,userEvent:a}),!0}else return!1}function vJ(t,e,n){let i,r=t.state,o=r.selection.main;if(e.from>=o.from&&e.to<=o.to&&e.to-e.from>=(o.to-o.from)/3&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let a=o.frome.to?r.sliceDoc(e.to,o.to):"";i=r.replaceSelection(t.state.toText(a+e.insert.sliceString(0,void 0,t.state.lineBreak)+l))}else{let a=r.changes(e),l=n&&n.main.to<=a.newLength?n.main:void 0;if(r.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=o.to&&e.to>=o.to-10){let u=t.state.sliceDoc(e.from,e.to),c,d=n&&tD(t,n.main.head);if(d){let m=e.insert.length-(e.to-e.from);c={from:d.from,to:d.to-m}}else c=t.state.doc.lineAt(o.head);let h=o.to-e.to,p=o.to-o.from;i=r.changeByRange(m=>{if(m.from==o.from&&m.to==o.to)return{changes:a,range:l||m.map(a)};let O=m.to-h,y=O-u.length;if(m.to-m.from!=p||t.state.sliceDoc(y,O)!=u||m.to>=c.from&&m.from<=c.to)return{range:m};let b=r.changes({from:y,to:O,insert:e.insert}),v=m.to-o.to;return{changes:b,range:l?q.range(Math.max(0,l.anchor+v),Math.max(0,l.head+v)):m.map(b)}})}else i={changes:a,selection:l&&r.selection.replaceRange(l)}}let s="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,s+=".compose",t.inputState.compositionFirstChange&&(s+=".start",t.inputState.compositionFirstChange=!1)),r.update(i,{userEvent:s,scrollIntoView:!0})}function SJ(t,e,n,i){let r=Math.min(t.length,e.length),o=0;for(;o0&&a>0&&t.charCodeAt(s-1)==e.charCodeAt(a-1);)s--,a--;if(i=="end"){let l=Math.max(0,o-Math.min(s,a));n-=s+l-o}if(s=s?o-n:0;o-=l,a=o+(a-s),s=o}else if(a=a?o-n:0;o-=l,s=o+(s-a),a=o}return{from:o,toA:s,toB:a}}function wJ(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:i,focusNode:r,focusOffset:o}=t.observer.selectionRange;return n&&(e.push(new vA(n,i)),(r!=n||o!=i)&&e.push(new vA(r,o))),e}function kJ(t,e){if(t.length==0)return null;let n=t[0].pos,i=t.length==2?t[1].pos:n;return n>-1&&i>-1?q.single(n+e,i+e):null}const xJ={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Ay=me.ie&&me.ie_version<=11;class _J{constructor(e){this.view=e,this.active=!1,this.selectionRange=new lK,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(n=>{for(let i of n)this.queue.push(i);(me.ie&&me.ie_version<=11||me.ios&&e.composing)&&n.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),Ay&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(n=>{n.length>0&&n[n.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){e.type=="change"&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((n,i)=>n!=e[i]))){this.gapIntersection.disconnect();for(let n of e)this.gapIntersection.observe(n);this.gaps=e}}onSelectionChange(e){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,r=this.selectionRange;if(i.state.facet(ab)?i.root.activeElement!=this.dom:!Qg(i.dom,r))return;let o=r.anchorNode&&i.docView.nearest(r.anchorNode);if(o&&o.ignoreEvent(e)){n||(this.selectionChanged=!1);return}(me.ie&&me.ie_version<=11||me.android&&me.chrome)&&!i.state.selection.main.empty&&r.focusNode&&hf(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=M0(e.root);if(!n)return!1;let i=me.safari&&e.root.nodeType==11&&rK(this.dom.ownerDocument)==this.dom&&EJ(this.view,n)||n;if(!i||this.selectionRange.eq(i))return!1;let r=Qg(this.dom,i);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let o=this.delayedAndroidKey;o&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=o.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&o.force&&qc(this.dom,o.key,o.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(r)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:n,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let n=-1,i=-1,r=!1;for(let o of e){let s=this.readMutation(o);s&&(s.typeOver&&(r=!0),n==-1?{from:n,to:i}=s:(n=Math.min(s.from,n),i=Math.max(s.to,i)))}return{from:n,to:i,typeOver:r}}readChange(){let{from:e,to:n,typeOver:i}=this.processRecords(),r=this.selectionChanged&&Qg(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let o=new yJ(this.view,e,n,i);return this.view.docView.domChanged={newSel:o.newSel?o.newSel.main:null},o}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let i=this.view.state,r=gD(this.view,n);return this.view.state==i&&this.view.update([]),r}readMutation(e){let n=this.view.docView.nearest(e.target);if(!n||n.ignoreMutation(e))return null;if(n.markDirty(e.type=="attributes"),e.type=="attributes"&&(n.flags|=4),e.type=="childList"){let i=SA(n,e.previousSibling||e.target.previousSibling,-1),r=SA(n,e.nextSibling||e.target.nextSibling,1);return{from:i?n.posAfter(i):n.posAtStart,to:r?n.posBefore(r):n.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener("change",this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener("change",this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}destroy(){var e,n,i;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(i=this.resizeScroll)===null||i===void 0||i.disconnect();for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}function SA(t,e,n){for(;e;){let i=pt.get(e);if(i&&i.parent==t)return i;let r=e.parentNode;e=r!=t.dom?r:n>0?e.nextSibling:e.previousSibling}return null}function wA(t,e){let n=e.startContainer,i=e.startOffset,r=e.endContainer,o=e.endOffset,s=t.docView.domAtPos(t.state.selection.main.anchor);return hf(s.node,s.offset,r,o)&&([n,i,r,o]=[r,o,n,i]),{anchorNode:n,anchorOffset:i,focusNode:r,focusOffset:o}}function EJ(t,e){if(e.getComposedRanges){let r=e.getComposedRanges(t.root)[0];if(r)return wA(t,r)}let n=null;function i(r){r.preventDefault(),r.stopImmediatePropagation(),n=r.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",i,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",i,!0),n?wA(t,n):null}class ue{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:n}=e;this.dispatchTransactions=e.dispatchTransactions||n&&(i=>i.forEach(r=>n(r,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=e.root||uK(e.parent)||document,this.viewState=new bA(e.state||Ve.create(e)),e.scrollTo&&e.scrollTo.is(Dm)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Vh).map(i=>new Ey(i));for(let i of this.plugins)i.update(this);this.observer=new _J(this),this.inputState=new zK(this),this.inputState.ensureHandlers(this.plugins),this.docView=new eA(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure()}dispatch(...e){let n=e.length==1&&e[0]instanceof Jt?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(n,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,i=!1,r,o=this.state;for(let h of e){if(h.startState!=o)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");o=h.state}if(this.destroyed){this.viewState.state=o;return}let s=this.hasFocus,a=0,l=null;e.some(h=>h.annotation(uD))?(this.inputState.notifiedFocused=s,a=1):s!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=s,l=cD(o,s),l||(a=1));let u=this.observer.delayedAndroidKey,c=null;if(u?(this.observer.clearDelayedAndroidKey(),c=this.observer.readChange(),(c&&!this.state.doc.eq(o.doc)||!this.state.selection.eq(o.selection))&&(c=null)):this.observer.clear(),o.facet(Ve.phrases)!=this.state.facet(Ve.phrases))return this.setState(o);r=B0.create(this,o,e),r.flags|=a;let d=this.viewState.scrollTarget;try{this.updateState=2;for(let h of e){if(d&&(d=d.map(h.changes)),h.scrollIntoView){let{main:p}=h.state.selection;d=new Yc(p.empty?p:q.cursor(p.head,p.head>p.anchor?-1:1))}for(let p of h.effects)p.is(Dm)&&(d=p.value.clip(this.state))}this.viewState.update(r,d),this.bidiCache=Q0.update(this.bidiCache,r.changes),r.empty||(this.updatePlugins(r),this.inputState.update(r)),n=this.docView.update(r),this.state.facet(jh)!=this.styleModules&&this.mountStyles(),i=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(h=>h.isUserEvent("select.pointer")))}finally{this.updateState=0}if(r.startState.facet(Um)!=r.state.facet(Um)&&(this.viewState.mustMeasureContent=!0),(n||i||d||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!r.empty)for(let h of this.state.facet(SS))try{h(r)}catch(p){gi(this.state,p,"update listener")}(l||c)&&Promise.resolve().then(()=>{l&&this.state==l.startState&&this.dispatch(l),c&&!gD(this,c)&&u.force&&qc(this.contentDOM,u.key,u.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let n=this.hasFocus;try{for(let i of this.plugins)i.destroy(this);this.viewState=new bA(e),this.plugins=e.facet(Vh).map(i=>new Ey(i)),this.pluginMap.clear();for(let i of this.plugins)i.update(this);this.docView.destroy(),this.docView=new eA(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(e){let n=e.startState.facet(Vh),i=e.state.facet(Vh);if(n!=i){let r=[];for(let o of i){let s=n.indexOf(o);if(s<0)r.push(new Ey(o));else{let a=this.plugins[s];a.mustUpdate=e,r.push(a)}}for(let o of this.plugins)o.mustUpdate!=e&&o.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let r of this.plugins)r.mustUpdate=e;for(let r=0;r-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let n=null,i=this.scrollDOM,r=i.scrollTop*this.scaleY,{scrollAnchorPos:o,scrollAnchorHeight:s}=this.viewState;Math.abs(r-this.viewState.scrollTop)>1&&(s=-1),this.viewState.scrollAnchorHeight=-1;try{for(let a=0;;a++){if(s<0)if(x6(i))o=-1,s=this.viewState.heightMap.height;else{let p=this.viewState.scrollAnchorAt(r);o=p.from,s=p.top}this.updateState=1;let l=this.viewState.measure(this);if(!l&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(a>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let u=[];l&4||([this.measureRequests,u]=[u,this.measureRequests]);let c=u.map(p=>{try{return p.read(this)}catch(m){return gi(this.state,m),kA}}),d=B0.create(this,this.state,[]),h=!1;d.flags|=l,n?n.flags|=l:n=d,this.updateState=2,d.empty||(this.updatePlugins(d),this.inputState.update(d),this.updateAttrs(),h=this.docView.update(d),h&&this.docViewUpdate());for(let p=0;p1||m<-1){r=r+m,i.scrollTop=r/this.scaleY,s=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let a of this.state.facet(SS))a(n)}get themeClasses(){return ES+" "+(this.state.facet(_S)?pD:fD)+" "+this.state.facet(Um)}updateAttrs(){let e=xA(this,Y6,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(ab)?"true":"false",class:"cm-content",style:`${me.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),xA(this,ox,n);let i=this.observer.ignore(()=>{let r=gS(this.contentDOM,this.contentAttrs,n),o=gS(this.dom,this.editorAttrs,e);return r||o});return this.editorAttrs=e,this.contentAttrs=n,i}showAnnouncements(e){let n=!0;for(let i of e)for(let r of i.effects)if(r.is(ue.announce)){n&&(this.announceDOM.textContent=""),n=!1;let o=this.announceDOM.appendChild(document.createElement("div"));o.textContent=r.value}}mountStyles(){this.styleModules=this.state.facet(jh);let e=this.state.facet(ue.cspNonce);ha.mount(this.root,this.styleModules.concat(gJ).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let n=0;ni.spec==e)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,n,i){return Ty(this,e,sA(this,e,n,i))}moveByGroup(e,n){return Ty(this,e,sA(this,e,n,i=>QK(this,e.head,i)))}visualLineSide(e,n){let i=this.bidiSpans(e),r=this.textDirectionAt(e.from),o=i[n?i.length-1:0];return q.cursor(o.side(n,r)+e.from,o.forward(!n,r)?1:-1)}moveToLineBoundary(e,n,i=!0){return BK(this,e,n,i)}moveVertically(e,n,i){return Ty(this,e,FK(this,e,n,i))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,n=0){return this.docView.posFromDOM(e,n)}posAtCoords(e,n=!0){return this.readMeasured(),nD(this,e,n)}coordsAtPos(e,n=1){this.readMeasured();let i=this.docView.coordsAt(e,n);if(!i||i.left==i.right)return i;let r=this.state.doc.lineAt(e),o=this.bidiSpans(r),s=o[Zs.find(o,e-r.from,-1,n)];return tx(i,s.dir==xt.LTR==n>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(X6)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>CJ)return Q6(e.length);let n=this.textDirectionAt(e.from),i;for(let o of this.bidiCache)if(o.from==e.from&&o.dir==n&&(o.fresh||B6(o.isolates,i=JP(this,e))))return o.order;i||(i=JP(this,e));let r=wK(e.text,n,i);return this.bidiCache.push(new Q0(e.from,e.to,n,i,!0,r)),r}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||me.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{w6(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,n={}){return Dm.of(new Yc(typeof e=="number"?q.cursor(e):e,n.y,n.x,n.yMargin,n.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:n}=this.scrollDOM,i=this.viewState.scrollAnchorAt(e);return Dm.of(new Yc(q.cursor(i.from),"start","start",i.top-e,n,!0))}static domEventHandlers(e){return en.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return en.define(()=>({}),{eventObservers:e})}static theme(e,n){let i=ha.newName(),r=[Um.of(i),jh.of(CS(`.${i}`,e))];return n&&n.dark&&r.push(_S.of(!0)),r}static baseTheme(e){return ds.lowest(jh.of(CS("."+ES,e,mD)))}static findFromDOM(e){var n;let i=e.querySelector(".cm-content"),r=i&&pt.get(i)||pt.get(e);return((n=r==null?void 0:r.rootView)===null||n===void 0?void 0:n.view)||null}}ue.styleModule=jh;ue.inputHandler=V6;ue.scrollHandler=q6;ue.focusChangeEffect=j6;ue.perLineTextDirection=X6;ue.exceptionSink=W6;ue.updateListener=SS;ue.editable=ab;ue.mouseSelectionStyle=U6;ue.dragMovesSelection=H6;ue.clickAddsSelectionRange=z6;ue.decorations=Jf;ue.outerDecorations=G6;ue.atomicRanges=sx;ue.bidiIsolatedRanges=K6;ue.scrollMargins=J6;ue.darkTheme=_S;ue.cspNonce=he.define({combine:t=>t.length?t[0]:""});ue.contentAttributes=ox;ue.editorAttributes=Y6;ue.lineWrapping=ue.contentAttributes.of({class:"cm-lineWrapping"});ue.announce=De.define();const CJ=4096,kA={};class Q0{constructor(e,n,i,r,o,s){this.from=e,this.to=n,this.dir=i,this.isolates=r,this.fresh=o,this.order=s}static update(e,n){if(n.empty&&!e.some(o=>o.fresh))return e;let i=[],r=e.length?e[e.length-1].dir:xt.LTR;for(let o=Math.max(0,e.length-10);o=0;r--){let o=i[r],s=typeof o=="function"?o(t):o;s&&mS(s,n)}return n}const TJ=me.mac?"mac":me.windows?"win":me.linux?"linux":"key";function PJ(t,e){const n=t.split(/-(?!$)/);let i=n[n.length-1];i=="Space"&&(i=" ");let r,o,s,a;for(let l=0;li.concat(r),[]))),n}function RJ(t,e,n){return bD(OD(t.state),e,t,n)}let Us=null;const IJ=4e3;function $J(t,e=TJ){let n=Object.create(null),i=Object.create(null),r=(s,a)=>{let l=i[s];if(l==null)i[s]=a;else if(l!=a)throw new Error("Key binding "+s+" is used both as a regular binding and as a multi-stroke prefix")},o=(s,a,l,u,c)=>{var d,h;let p=n[s]||(n[s]=Object.create(null)),m=a.split(/ (?!$)/).map(b=>PJ(b,e));for(let b=1;b{let k=Us={view:S,prefix:v,scope:s};return setTimeout(()=>{Us==k&&(Us=null)},IJ),!0}]})}let O=m.join(" ");r(O,!1);let y=p[O]||(p[O]={preventDefault:!1,stopPropagation:!1,run:((h=(d=p._any)===null||d===void 0?void 0:d.run)===null||h===void 0?void 0:h.slice())||[]});l&&y.run.push(l),u&&(y.preventDefault=!0),c&&(y.stopPropagation=!0)};for(let s of t){let a=s.scope?s.scope.split(" "):["editor"];if(s.any)for(let u of a){let c=n[u]||(n[u]=Object.create(null));c._any||(c._any={preventDefault:!1,stopPropagation:!1,run:[]});for(let d in c)c[d].run.push(s.any)}let l=s[e]||s.key;if(l)for(let u of a)o(u,l,s.run,s.preventDefault,s.stopPropagation),s.shift&&o(u,"Shift-"+l,s.shift,s.preventDefault,s.stopPropagation)}return n}function bD(t,e,n,i){let r=iK(e),o=xn(r,0),s=ir(o)==r.length&&r!=" ",a="",l=!1,u=!1,c=!1;Us&&Us.view==n&&Us.scope==i&&(a=Us.prefix+" ",rD.indexOf(e.keyCode)<0&&(u=!0,Us=null));let d=new Set,h=y=>{if(y){for(let b of y.run)if(!d.has(b)&&(d.add(b),b(n,e)))return y.stopPropagation&&(c=!0),!0;y.preventDefault&&(y.stopPropagation&&(c=!0),u=!0)}return!1},p=t[i],m,O;return p&&(h(p[a+Wm(r,e,!s)])?l=!0:s&&(e.altKey||e.metaKey||e.ctrlKey)&&!(me.windows&&e.ctrlKey&&e.altKey)&&(m=fa[e.keyCode])&&m!=r?(h(p[a+Wm(m,e,!0)])||e.shiftKey&&(O=Gf[e.keyCode])!=r&&O!=m&&h(p[a+Wm(O,e,!1)]))&&(l=!0):s&&e.shiftKey&&h(p[a+Wm(r,e,!0)])&&(l=!0),!l&&h(p._any)&&(l=!0)),u&&(l=!0),l&&c&&e.stopPropagation(),l}class $p{constructor(e,n,i,r,o){this.className=e,this.left=n,this.top=i,this.width=r,this.height=o}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,n){return n.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,n,i){if(i.empty){let r=e.coordsAtPos(i.head,i.assoc||1);if(!r)return[];let o=yD(e);return[new $p(n,r.left-o.left,r.top-o.top,null,r.bottom-r.top)]}else return LJ(e,n,i)}}function yD(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==xt.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function EA(t,e,n){let i=q.cursor(e);return{from:Math.max(n.from,t.moveToLineBoundary(i,!1,!0).from),to:Math.min(n.to,t.moveToLineBoundary(i,!0,!0).from),type:ti.Text}}function LJ(t,e,n){if(n.to<=t.viewport.from||n.from>=t.viewport.to)return[];let i=Math.max(n.from,t.viewport.from),r=Math.min(n.to,t.viewport.to),o=t.textDirection==xt.LTR,s=t.contentDOM,a=s.getBoundingClientRect(),l=yD(t),u=s.querySelector(".cm-line"),c=u&&window.getComputedStyle(u),d=a.left+(c?parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)):0),h=a.right-(c?parseInt(c.paddingRight):0),p=kS(t,i),m=kS(t,r),O=p.type==ti.Text?p:null,y=m.type==ti.Text?m:null;if(O&&(t.lineWrapping||p.widgetLineBreaks)&&(O=EA(t,i,O)),y&&(t.lineWrapping||m.widgetLineBreaks)&&(y=EA(t,r,y)),O&&y&&O.from==y.from)return v(S(n.from,n.to,O));{let x=O?S(n.from,null,O):k(p,!1),_=y?S(null,n.to,y):k(m,!0),w=[];return(O||p).to<(y||m).from-(O&&y?1:0)||p.widgetLineBreaks>1&&x.bottom+t.defaultLineHeight/2<_.top?w.push(b(d,x.bottom,h,_.top)):x.bottom<_.top&&t.elementAtHeight((x.bottom+_.top)/2).type==ti.Text&&(x.bottom=_.top=(x.bottom+_.top)/2),v(x).concat(w).concat(v(_))}function b(x,_,w,D){return new $p(e,x-l.left,_-l.top-.01,w-x,D-_+.01)}function v({top:x,bottom:_,horizontal:w}){let D=[];for(let W=0;WB&&K.from=xe)break;A>oe&&V(Math.max(ae,oe),x==null&&ae<=B,Math.min(A,xe),_==null&&A>=H,X.dir)}if(oe=Oe.to+1,oe>=xe)break}return I.length==0&&V(B,x==null,H,_==null,t.textDirection),{top:D,bottom:W,horizontal:I}}function k(x,_){let w=a.top+(_?x.top:x.bottom);return{top:w,bottom:w,horizontal:[]}}}function NJ(t,e){return t.constructor==e.constructor&&t.eq(e)}class MJ{constructor(e,n){this.view=e,this.layer=n,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),n.above&&this.dom.classList.add("cm-layer-above"),n.class&&this.dom.classList.add(n.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,e)}update(e){e.startState.facet(Hg)!=e.state.facet(Hg)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let n=0,i=e.facet(Hg);for(;n!NJ(n,this.drawn[i]))){let n=this.dom.firstChild,i=0;for(let r of e)r.update&&n&&r.constructor&&this.drawn[i].constructor&&r.update(n,this.drawn[i])?(n=n.nextSibling,i++):this.dom.insertBefore(r.draw(),n);for(;n;){let r=n.nextSibling;n.remove(),n=r}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const Hg=he.define();function vD(t){return[en.define(e=>new MJ(e,t)),Hg.of(t)]}const SD=!me.ios,ep=he.define({combine(t){return Eo(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,n)=>Math.min(e,n),drawRangeCursor:(e,n)=>e||n})}});function DJ(t={}){return[ep.of(t),BJ,QJ,FJ,Z6.of(!0)]}function wD(t){return t.startState.facet(ep)!=t.state.facet(ep)}const BJ=vD({above:!0,markers(t){let{state:e}=t,n=e.facet(ep),i=[];for(let r of e.selection.ranges){let o=r==e.selection.main;if(r.empty?!o||SD:n.drawRangeCursor){let s=o?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",a=r.empty?r:q.cursor(r.head,r.head>r.anchor?-1:1);for(let l of $p.forRange(t,s,a))i.push(l)}}return i},update(t,e){t.transactions.some(i=>i.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=wD(t);return n&&CA(t.state,e),t.docChanged||t.selectionSet||n},mount(t,e){CA(e.state,t)},class:"cm-cursorLayer"});function CA(t,e){e.style.animationDuration=t.facet(ep).cursorBlinkRate+"ms"}const QJ=vD({above:!1,markers(t){return t.state.selection.ranges.map(e=>e.empty?[]:$p.forRange(t,"cm-selectionBackground",e)).reduce((e,n)=>e.concat(n))},update(t,e){return t.docChanged||t.selectionSet||t.viewportChanged||wD(t)},class:"cm-selectionLayer"}),TS={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};SD&&(TS[".cm-line"].caretColor="transparent !important",TS[".cm-content"]={caretColor:"transparent !important"});const FJ=ds.highest(ue.theme(TS)),kD=De.define({map(t,e){return t==null?null:e.mapPos(t)}}),qh=On.define({create(){return null},update(t,e){return t!=null&&(t=e.changes.mapPos(t)),e.effects.reduce((n,i)=>i.is(kD)?i.value:n,t)}}),zJ=en.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let n=t.state.field(qh);n==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(qh)!=n||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(qh),n=e!=null&&t.coordsAtPos(e);if(!n)return null;let i=t.scrollDOM.getBoundingClientRect();return{left:n.left-i.left+t.scrollDOM.scrollLeft*t.scaleX,top:n.top-i.top+t.scrollDOM.scrollTop*t.scaleY,height:n.bottom-n.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:n}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/n+"px",this.cursor.style.height=t.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(qh)!=t&&this.view.dispatch({effects:kD.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){(t.target==this.view.contentDOM||!this.view.contentDOM.contains(t.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function HJ(){return[qh,zJ]}function TA(t,e,n,i,r){e.lastIndex=0;for(let o=t.iterRange(n,i),s=n,a;!o.next().done;s+=o.value.length)if(!o.lineBreak)for(;a=e.exec(o.value);)r(s+a.index,a)}function UJ(t,e){let n=t.visibleRanges;if(n.length==1&&n[0].from==t.viewport.from&&n[0].to==t.viewport.to)return n;let i=[];for(let{from:r,to:o}of n)r=Math.max(t.state.doc.lineAt(r).from,r-e),o=Math.min(t.state.doc.lineAt(o).to,o+e),i.length&&i[i.length-1].to>=r?i[i.length-1].to=o:i.push({from:r,to:o});return i}class WJ{constructor(e){const{regexp:n,decoration:i,decorate:r,boundary:o,maxLength:s=1e3}=e;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,r)this.addMatch=(a,l,u,c)=>r(c,u,u+a[0].length,a,l);else if(typeof i=="function")this.addMatch=(a,l,u,c)=>{let d=i(a,l,u);d&&c(u,u+a[0].length,d)};else if(i)this.addMatch=(a,l,u,c)=>c(u,u+a[0].length,i);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=o,this.maxLength=s}createDeco(e){let n=new da,i=n.add.bind(n);for(let{from:r,to:o}of UJ(e,this.maxLength))TA(e.state.doc,this.regexp,r,o,(s,a)=>this.addMatch(a,e,s,i));return n.finish()}updateDeco(e,n){let i=1e9,r=-1;return e.docChanged&&e.changes.iterChanges((o,s,a,l)=>{l>e.view.viewport.from&&a1e3?this.createDeco(e.view):r>-1?this.updateRange(e.view,n.map(e.changes),i,r):n}updateRange(e,n,i,r){for(let o of e.visibleRanges){let s=Math.max(o.from,i),a=Math.min(o.to,r);if(a>s){let l=e.state.doc.lineAt(s),u=l.tol.from;s--)if(this.boundary.test(l.text[s-1-l.from])){c=s;break}for(;ah.push(b.range(O,y));if(l==u)for(this.regexp.lastIndex=c-l.from;(p=this.regexp.exec(l.text))&&p.indexthis.addMatch(y,e,O,m));n=n.update({filterFrom:c,filterTo:d,filter:(O,y)=>Od,add:h})}}return n}}const PS=/x/.unicode!=null?"gu":"g",VJ=new RegExp(`[\0-\b ---Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,PS),jJ={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Ry=null;function XJ(){var t;if(Ry==null&&typeof document<"u"&&document.body){let e=document.body.style;Ry=((t=e.tabSize)!==null&&t!==void 0?t:e.MozTabSize)!=null}return Ry||!1}const Ug=he.define({combine(t){let e=Eo(t,{render:null,specialChars:VJ,addSpecialChars:null});return(e.replaceTabs=!XJ())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,PS)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,PS)),e}});function ZJ(t={}){return[Ug.of(t),qJ()]}let PA=null;function qJ(){return PA||(PA=en.fromClass(class{constructor(t){this.view=t,this.decorations=Ce.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(Ug)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new WJ({regexp:t.specialChars,decoration:(e,n,i)=>{let{doc:r}=n.state,o=xn(e[0],0);if(o==9){let s=r.lineAt(i),a=n.state.tabSize,l=Hr(s.text,a,i-s.from);return Ce.replace({widget:new JJ((a-l%a)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[o]||(this.decorationCache[o]=Ce.replace({widget:new KJ(t,o)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(Ug);t.startState.facet(Ug)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))}const YJ="•";function GJ(t){return t>=32?YJ:t==10?"␤":String.fromCharCode(9216+t)}class KJ extends fs{constructor(e,n){super(),this.options=e,this.code=n}eq(e){return e.code==this.code}toDOM(e){let n=GJ(this.code),i=e.state.phrase("Control character")+" "+(jJ[this.code]||"0x"+this.code.toString(16)),r=this.options.render&&this.options.render(this.code,i,n);if(r)return r;let o=document.createElement("span");return o.textContent=n,o.title=i,o.setAttribute("aria-label",i),o.className="cm-specialChar",o}ignoreEvent(){return!1}}class JJ extends fs{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function eee(){return nee}const tee=Ce.line({class:"cm-activeLine"}),nee=en.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,n=[];for(let i of t.state.selection.ranges){let r=t.lineBlockAt(i.head);r.from>e&&(n.push(tee.range(r.from)),e=r.from)}return Ce.set(n)}},{decorations:t=>t.decorations}),AS=2e3;function iee(t,e,n){let i=Math.min(e.line,n.line),r=Math.max(e.line,n.line),o=[];if(e.off>AS||n.off>AS||e.col<0||n.col<0){let s=Math.min(e.off,n.off),a=Math.max(e.off,n.off);for(let l=i;l<=r;l++){let u=t.doc.line(l);u.length<=a&&o.push(q.range(u.from+s,u.to+a))}}else{let s=Math.min(e.col,n.col),a=Math.max(e.col,n.col);for(let l=i;l<=r;l++){let u=t.doc.line(l),c=lS(u.text,s,t.tabSize,!0);if(c<0)o.push(q.cursor(u.to));else{let d=lS(u.text,a,t.tabSize);o.push(q.range(u.from+c,u.from+d))}}}return o}function ree(t,e){let n=t.coordsAtPos(t.viewport.from);return n?Math.round(Math.abs((n.left-e)/t.defaultCharacterWidth)):-1}function AA(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1),i=t.state.doc.lineAt(n),r=n-i.from,o=r>AS?-1:r==i.length?ree(t,e.clientX):Hr(i.text,t.state.tabSize,n-i.from);return{line:i.number,col:o,off:r}}function oee(t,e){let n=AA(t,e),i=t.state.selection;return n?{update(r){if(r.docChanged){let o=r.changes.mapPos(r.startState.doc.line(n.line).from),s=r.state.doc.lineAt(o);n={line:s.number,col:n.col,off:Math.min(n.off,s.length)},i=i.map(r.changes)}},get(r,o,s){let a=AA(t,r);if(!a)return i;let l=iee(t.state,n,a);return l.length?s?q.create(l.concat(i.ranges)):q.create(l):i}}:null}function see(t){let e=n=>n.altKey&&n.button==0;return ue.mouseSelectionStyle.of((n,i)=>e(i)?oee(n,i):null)}const aee={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},lee={style:"cursor: crosshair"};function uee(t={}){let[e,n]=aee[t.key||"Alt"],i=en.fromClass(class{constructor(r){this.view=r,this.isDown=!1}set(r){this.isDown!=r&&(this.isDown=r,this.view.update([]))}},{eventObservers:{keydown(r){this.set(r.keyCode==e||n(r))},keyup(r){(r.keyCode==e||!n(r))&&this.set(!1)},mousemove(r){this.set(n(r))}}});return[i,ue.contentAttributes.of(r=>{var o;return!((o=r.plugin(i))===null||o===void 0)&&o.isDown?lee:null})]}const Ph="-10000px";class xD{constructor(e,n,i,r){this.facet=n,this.createTooltipView=i,this.removeTooltipView=r,this.input=e.state.facet(n),this.tooltips=this.input.filter(s=>s);let o=null;this.tooltipViews=this.tooltips.map(s=>o=i(s,o))}update(e,n){var i;let r=e.state.facet(this.facet),o=r.filter(l=>l);if(r===this.input){for(let l of this.tooltipViews)l.update&&l.update(e);return!1}let s=[],a=n?[]:null;for(let l=0;ln[u]=l),n.length=a.length),this.input=r,this.tooltips=o,this.tooltipViews=s,!0}}function cee(t){let{win:e}=t;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const Iy=he.define({combine:t=>{var e,n,i;return{position:me.ios?"absolute":((e=t.find(r=>r.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((n=t.find(r=>r.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((i=t.find(r=>r.tooltipSpace))===null||i===void 0?void 0:i.tooltipSpace)||cee}}}),RA=new WeakMap,lx=en.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(Iy);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new xD(t,ux,(n,i)=>this.createTooltip(n,i),n=>{this.resizeObserver&&this.resizeObserver.unobserve(n.dom),n.dom.remove()}),this.above=this.manager.tooltips.map(n=>!!n.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(n=>{Date.now()>this.lastTransaction-50&&n.length>0&&n[n.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let n=e||t.geometryChanged,i=t.state.facet(Iy);if(i.position!=this.position&&!this.madeAbsolute){this.position=i.position;for(let r of this.manager.tooltipViews)r.dom.style.position=this.position;n=!0}if(i.parent!=this.parent){this.parent&&this.container.remove(),this.parent=i.parent,this.createContainer();for(let r of this.manager.tooltipViews)this.container.appendChild(r.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(t,e){let n=t.create(this.view),i=e?e.dom:null;if(n.dom.classList.add("cm-tooltip"),t.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let r=document.createElement("div");r.className="cm-tooltip-arrow",n.dom.appendChild(r)}return n.dom.style.position=this.position,n.dom.style.top=Ph,n.dom.style.left="0px",this.container.insertBefore(n.dom,i),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var t,e,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let i of this.manager.tooltipViews)i.dom.remove(),(t=i.destroy)===null||t===void 0||t.call(i);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(n=this.intersectionObserver)===null||n===void 0||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=this.view.dom.getBoundingClientRect(),e=1,n=1,i=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:r}=this.manager.tooltipViews[0];if(me.gecko)i=r.offsetParent!=this.container.ownerDocument.body;else if(r.style.top==Ph&&r.style.left=="0px"){let o=r.getBoundingClientRect();i=Math.abs(o.top+1e4)>1||Math.abs(o.left)>1}}if(i||this.position=="absolute")if(this.parent){let r=this.parent.getBoundingClientRect();r.width&&r.height&&(e=r.width/this.parent.offsetWidth,n=r.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:n}=this.view.viewState);return{editor:t,parent:this.parent?this.container.getBoundingClientRect():t,pos:this.manager.tooltips.map((r,o)=>{let s=this.manager.tooltipViews[o];return s.getCoords?s.getCoords(r.pos):this.view.coordsAtPos(r.pos)}),size:this.manager.tooltipViews.map(({dom:r})=>r.getBoundingClientRect()),space:this.view.state.facet(Iy).tooltipSpace(this.view),scaleX:e,scaleY:n,makeAbsolute:i}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let a of this.manager.tooltipViews)a.dom.style.position="absolute"}let{editor:n,space:i,scaleX:r,scaleY:o}=t,s=[];for(let a=0;a=Math.min(n.bottom,i.bottom)||d.rightMath.min(n.right,i.right)+.1){c.style.top=Ph;continue}let p=l.arrow?u.dom.querySelector(".cm-tooltip-arrow"):null,m=p?7:0,O=h.right-h.left,y=(e=RA.get(u))!==null&&e!==void 0?e:h.bottom-h.top,b=u.offset||hee,v=this.view.textDirection==xt.LTR,S=h.width>i.right-i.left?v?i.left:i.right-h.width:v?Math.min(d.left-(p?14:0)+b.x,i.right-O):Math.max(i.left,d.left-O+(p?14:0)-b.x),k=this.above[a];!l.strictSide&&(k?d.top-(h.bottom-h.top)-b.yi.bottom)&&k==i.bottom-d.bottom>d.top-i.top&&(k=this.above[a]=!k);let x=(k?d.top-i.top:i.bottom-d.bottom)-m;if(xS&&D.top<_+y&&D.bottom>_&&(_=k?D.top-y-2-m:D.bottom+m+2);if(this.position=="absolute"?(c.style.top=(_-t.parent.top)/o+"px",c.style.left=(S-t.parent.left)/r+"px"):(c.style.top=_/o+"px",c.style.left=S/r+"px"),p){let D=d.left+(v?b.x:-b.x)-(S+14-7);p.style.left=D/r+"px"}u.overlap!==!0&&s.push({left:S,top:_,right:w,bottom:_+y}),c.classList.toggle("cm-tooltip-above",k),c.classList.toggle("cm-tooltip-below",!k),u.positioned&&u.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=Ph}},{eventObservers:{scroll(){this.maybeMeasure()}}}),dee=ue.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),hee={x:0,y:0},ux=he.define({enables:[lx,dee]}),F0=he.define({combine:t=>t.reduce((e,n)=>e.concat(n),[])});class lb{static create(e){return new lb(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new xD(e,F0,(n,i)=>this.createHostedView(n,i),n=>n.dom.remove())}createHostedView(e,n){let i=e.create(this.view);return i.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(i.dom,n?n.dom.nextSibling:this.dom.firstChild),this.mounted&&i.mount&&i.mount(this.view),i}mount(e){for(let n of this.manager.tooltipViews)n.mount&&n.mount(e);this.mounted=!0}positioned(e){for(let n of this.manager.tooltipViews)n.positioned&&n.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let n of this.manager.tooltipViews)(e=n.destroy)===null||e===void 0||e.call(n)}passProp(e){let n;for(let i of this.manager.tooltipViews){let r=i[e];if(r!==void 0){if(n===void 0)n=r;else if(n!==r)return}}return n}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const fee=ux.compute([F0],t=>{let e=t.facet(F0);return e.length===0?null:{pos:Math.min(...e.map(n=>n.pos)),end:Math.max(...e.map(n=>{var i;return(i=n.end)!==null&&i!==void 0?i:n.pos})),create:lb.create,above:e[0].above,arrow:e.some(n=>n.arrow)}});class pee{constructor(e,n,i,r,o){this.view=e,this.source=n,this.field=i,this.setHover=r,this.hoverTime=o,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;ea.bottom||n.xa.right+e.defaultCharacterWidth)return;let l=e.bidiSpans(e.state.doc.lineAt(r)).find(c=>c.from<=r&&c.to>=r),u=l&&l.dir==xt.RTL?-1:1;o=n.x{this.pending==a&&(this.pending=null,l&&!(Array.isArray(l)&&!l.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(l)?l:[l])}))},l=>gi(e.state,l,"hover tooltip"))}else s&&!(Array.isArray(s)&&!s.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(s)?s:[s])})}get tooltip(){let e=this.view.plugin(lx),n=e?e.manager.tooltips.findIndex(i=>i.create==lb.create):-1;return n>-1?e.manager.tooltipViews[n]:null}mousemove(e){var n,i;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:r,tooltip:o}=this;if(r.length&&o&&!mee(o.dom,e)||this.pending){let{pos:s}=r[0]||this.pending,a=(i=(n=r[0])===null||n===void 0?void 0:n.end)!==null&&i!==void 0?i:s;(s==a?this.view.posAtCoords(this.lastMove)!=s:!gee(this.view,s,a,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:n}=this;if(n.length){let{tooltip:i}=this;i&&i.dom.contains(e.relatedTarget)?this.watchTooltipLeave(i.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let n=i=>{e.removeEventListener("mouseleave",n),this.active.length&&!this.view.dom.contains(i.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",n)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const Vm=4;function mee(t,e){let n=t.getBoundingClientRect();return e.clientX>=n.left-Vm&&e.clientX<=n.right+Vm&&e.clientY>=n.top-Vm&&e.clientY<=n.bottom+Vm}function gee(t,e,n,i,r,o){let s=t.scrollDOM.getBoundingClientRect(),a=t.documentTop+t.documentPadding.top+t.contentHeight;if(s.left>i||s.rightr||Math.min(s.bottom,a)=e&&l<=n}function Oee(t,e={}){let n=De.define(),i=On.define({create(){return[]},update(r,o){if(r.length&&(e.hideOnChange&&(o.docChanged||o.selection)?r=[]:e.hideOn&&(r=r.filter(s=>!e.hideOn(o,s))),o.docChanged)){let s=[];for(let a of r){let l=o.changes.mapPos(a.pos,-1,En.TrackDel);if(l!=null){let u=Object.assign(Object.create(null),a);u.pos=l,u.end!=null&&(u.end=o.changes.mapPos(u.end)),s.push(u)}}r=s}for(let s of o.effects)s.is(n)&&(r=s.value),s.is(bee)&&(r=[]);return r},provide:r=>F0.from(r)});return[i,en.define(r=>new pee(r,t,i,n,e.hoverTime||300)),fee]}function _D(t,e){let n=t.plugin(lx);if(!n)return null;let i=n.manager.tooltips.indexOf(e);return i<0?null:n.manager.tooltipViews[i]}const bee=De.define(),IA=he.define({combine(t){let e,n;for(let i of t)e=e||i.topContainer,n=n||i.bottomContainer;return{topContainer:e,bottomContainer:n}}});function tp(t,e){let n=t.plugin(ED),i=n?n.specs.indexOf(e):-1;return i>-1?n.panels[i]:null}const ED=en.fromClass(class{constructor(t){this.input=t.state.facet(np),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(t));let e=t.state.facet(IA);this.top=new jm(t,!0,e.topContainer),this.bottom=new jm(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(n=>n.top)),this.bottom.sync(this.panels.filter(n=>!n.top));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(t){let e=t.state.facet(IA);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new jm(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new jm(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(np);if(n!=this.input){let i=n.filter(l=>l),r=[],o=[],s=[],a=[];for(let l of i){let u=this.specs.indexOf(l),c;u<0?(c=l(t.view),a.push(c)):(c=this.panels[u],c.update&&c.update(t)),r.push(c),(c.top?o:s).push(c)}this.specs=i,this.panels=r,this.top.sync(o),this.bottom.sync(s);for(let l of a)l.dom.classList.add("cm-panel"),l.mount&&l.mount()}else for(let i of this.panels)i.update&&i.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>ue.scrollMargins.of(e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class jm{constructor(e,n,i){this.view=e,this.top=n,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let n of this.panels)n.destroy&&e.indexOf(n)<0&&n.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let n=this.container||this.view.dom;n.insertBefore(this.dom,this.top?n.firstChild:null)}let e=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;e!=n.dom;)e=$A(e);e=e.nextSibling}else this.dom.insertBefore(n.dom,e);for(;e;)e=$A(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function $A(t){let e=t.nextSibling;return t.remove(),e}const np=he.define({enables:ED});class os extends ou{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}os.prototype.elementClass="";os.prototype.toDOM=void 0;os.prototype.mapMode=En.TrackBefore;os.prototype.startSide=os.prototype.endSide=-1;os.prototype.point=!0;const Wg=he.define(),yee={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>tt.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},pf=he.define();function vee(t){return[CD(),pf.of(Object.assign(Object.assign({},yee),t))]}const LA=he.define({combine:t=>t.some(e=>e)});function CD(t){return[See]}const See=en.fromClass(class{constructor(t){this.view=t,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(pf).map(e=>new MA(t,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!t.state.facet(LA),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}update(t){if(this.updateGutters(t)){let e=this.prevViewport,n=t.view.viewport,i=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(i<(n.to-n.from)*.8)}t.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(LA)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&this.dom.remove();let n=tt.iter(this.view.state.facet(Wg),this.view.viewport.from),i=[],r=this.gutters.map(o=>new wee(o,this.view.viewport,-this.view.documentPadding.top));for(let o of this.view.viewportLineBlocks)if(i.length&&(i=[]),Array.isArray(o.type)){let s=!0;for(let a of o.type)if(a.type==ti.Text&&s){RS(n,i,a.from);for(let l of r)l.line(this.view,a,i);s=!1}else if(a.widget)for(let l of r)l.widget(this.view,a)}else if(o.type==ti.Text){RS(n,i,o.from);for(let s of r)s.line(this.view,o,i)}else if(o.widget)for(let s of r)s.widget(this.view,o);for(let o of r)o.finish();t&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(t){let e=t.startState.facet(pf),n=t.state.facet(pf),i=t.docChanged||t.heightChanged||t.viewportChanged||!tt.eq(t.startState.facet(Wg),t.state.facet(Wg),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let r of this.gutters)r.update(t)&&(i=!0);else{i=!0;let r=[];for(let o of n){let s=e.indexOf(o);s<0?r.push(new MA(this.view,o)):(this.gutters[s].update(t),r.push(this.gutters[s]))}for(let o of this.gutters)o.dom.remove(),r.indexOf(o)<0&&o.destroy();for(let o of r)this.dom.appendChild(o.dom);this.gutters=r}return i}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove()}},{provide:t=>ue.scrollMargins.of(e=>{let n=e.plugin(t);return!n||n.gutters.length==0||!n.fixed?null:e.textDirection==xt.LTR?{left:n.dom.offsetWidth*e.scaleX}:{right:n.dom.offsetWidth*e.scaleX}})});function NA(t){return Array.isArray(t)?t:[t]}function RS(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class wee{constructor(e,n,i){this.gutter=e,this.height=i,this.i=0,this.cursor=tt.iter(e.markers,n.from)}addElement(e,n,i){let{gutter:r}=this,o=(n.top-this.height)/e.scaleY,s=n.height/e.scaleY;if(this.i==r.elements.length){let a=new TD(e,s,o,i);r.elements.push(a),r.dom.appendChild(a.dom)}else r.elements[this.i].update(e,s,o,i);this.height=n.bottom,this.i++}line(e,n,i){let r=[];RS(this.cursor,r,n.from),i.length&&(r=r.concat(i));let o=this.gutter.config.lineMarker(e,n,r);o&&r.unshift(o);let s=this.gutter;r.length==0&&!s.config.renderEmptyElements||this.addElement(e,n,r)}widget(e,n){let i=this.gutter.config.widgetMarker(e,n.widget,n);i&&this.addElement(e,n,[i])}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let n=e.elements.pop();e.dom.removeChild(n.dom),n.destroy()}}}class MA{constructor(e,n){this.view=e,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let i in n.domEventHandlers)this.dom.addEventListener(i,r=>{let o=r.target,s;if(o!=this.dom&&this.dom.contains(o)){for(;o.parentNode!=this.dom;)o=o.parentNode;let l=o.getBoundingClientRect();s=(l.top+l.bottom)/2}else s=r.clientY;let a=e.lineBlockAtHeight(s-e.documentTop);n.domEventHandlers[i](e,a,r)&&r.preventDefault()});this.markers=NA(n.markers(e)),n.initialSpacer&&(this.spacer=new TD(e,0,0,[n.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let n=this.markers;if(this.markers=NA(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let r=this.config.updateSpacer(this.spacer.markers[0],e);r!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[r])}let i=e.view.viewport;return!tt.eq(this.markers,n,i.from,i.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class TD{constructor(e,n,i,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,n,i,r)}update(e,n,i,r){this.height!=n&&(this.height=n,this.dom.style.height=n+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),kee(this.markers,r)||this.setMarkers(e,r)}setMarkers(e,n){let i="cm-gutterElement",r=this.dom.firstChild;for(let o=0,s=0;;){let a=s,l=oo(a,l,u)||s(a,l,u):s}return i}})}});class $y extends os{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function Ly(t,e){return t.state.facet(Nc).formatNumber(e,t.state)}const _ee=pf.compute([Nc],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(xee)},lineMarker(e,n,i){return i.some(r=>r.toDOM)?null:new $y(Ly(e,e.state.doc.lineAt(n.from).number))},widgetMarker:()=>null,lineMarkerChange:e=>e.startState.facet(Nc)!=e.state.facet(Nc),initialSpacer(e){return new $y(Ly(e,DA(e.state.doc.lines)))},updateSpacer(e,n){let i=Ly(n.view,DA(n.view.state.doc.lines));return i==e.number?e:new $y(i)},domEventHandlers:t.facet(Nc).domEventHandlers}));function Eee(t={}){return[Nc.of(t),CD(),_ee]}function DA(t){let e=9;for(;e{let e=[],n=-1;for(let i of t.selection.ranges){let r=t.doc.lineAt(i.head).from;r>n&&(n=r,e.push(Cee.range(r)))}return tt.of(e)});function Pee(){return Tee}const PD=1024;let Aee=0;class or{constructor(e,n){this.from=e,this.to=n}}class Pe{constructor(e={}){this.id=Aee++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=tn.match(e)),n=>{let i=e(n);return i===void 0?null:[this,i]}}}Pe.closedBy=new Pe({deserialize:t=>t.split(" ")});Pe.openedBy=new Pe({deserialize:t=>t.split(" ")});Pe.group=new Pe({deserialize:t=>t.split(" ")});Pe.isolate=new Pe({deserialize:t=>{if(t&&t!="rtl"&&t!="ltr"&&t!="auto")throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}});Pe.contextHash=new Pe({perNode:!0});Pe.lookAhead=new Pe({perNode:!0});Pe.mounted=new Pe({perNode:!0});class ip{constructor(e,n,i){this.tree=e,this.overlay=n,this.parser=i}static get(e){return e&&e.props&&e.props[Pe.mounted.id]}}const Ree=Object.create(null);class tn{constructor(e,n,i,r=0){this.name=e,this.props=n,this.id=i,this.flags=r}static define(e){let n=e.props&&e.props.length?Object.create(null):Ree,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),r=new tn(e.name||"",n,e.id,i);if(e.props){for(let o of e.props)if(Array.isArray(o)||(o=o(r)),o){if(o[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[o[0].id]=o[1]}}return r}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let n=this.prop(Pe.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let i in e)for(let r of i.split(" "))n[r]=e[i];return i=>{for(let r=i.prop(Pe.group),o=-1;o<(r?r.length:0);o++){let s=n[o<0?i.name:r[o]];if(s)return s}}}}tn.none=new tn("",Object.create(null),0,8);class qd{constructor(e){this.types=e;for(let n=0;n0;for(let l=this.cursor(s|yt.IncludeAnonymous);;){let u=!1;if(l.from<=o&&l.to>=r&&(!a&&l.type.isAnonymous||n(l)!==!1)){if(l.firstChild())continue;u=!0}for(;u&&i&&(a||!l.type.isAnonymous)&&i(l),!l.nextSibling();){if(!l.parent())return;u=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:hx(tn.none,this.children,this.positions,0,this.children.length,0,this.length,(n,i,r)=>new Ze(this.type,n,i,r,this.propValues),e.makeTree||((n,i,r)=>new Ze(tn.none,n,i,r)))}static build(e){return Nee(e)}}Ze.empty=new Ze(tn.none,[],[],0);class cx{constructor(e,n){this.buffer=e,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new cx(this.buffer,this.index)}}class ma{constructor(e,n,i){this.buffer=e,this.length=n,this.set=i}get type(){return tn.none}toString(){let e=[];for(let n=0;n0));l=s[l+3]);return a}slice(e,n,i){let r=this.buffer,o=new Uint16Array(n-e),s=0;for(let a=e,l=0;a=e&&ne;case 1:return n<=e&&i>e;case 2:return i>e;case 4:return!0}}function rp(t,e,n,i){for(var r;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to0?a.length:-1;e!=u;e+=n){let c=a[e],d=l[e]+s.from;if(AD(r,i,d,d+c.length)){if(c instanceof ma){if(o&yt.ExcludeBuffers)continue;let h=c.findChild(0,c.buffer.length,n,i-d,r);if(h>-1)return new fo(new Iee(s,c,e,d),null,h)}else if(o&yt.IncludeAnonymous||!c.type.isAnonymous||dx(c)){let h;if(!(o&yt.IgnoreMounts)&&(h=ip.get(c))&&!h.overlay)return new Fn(h.tree,d,e,s);let p=new Fn(c,d,e,s);return o&yt.IncludeAnonymous||!p.type.isAnonymous?p:p.nextChild(n<0?c.children.length-1:0,n,i,r)}}}if(o&yt.IncludeAnonymous||!s.type.isAnonymous||(s.index>=0?e=s.index+n:e=n<0?-1:s._parent._tree.children.length,s=s._parent,!s))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,n,i=0){let r;if(!(i&yt.IgnoreOverlays)&&(r=ip.get(this._tree))&&r.overlay){let o=e-this.from;for(let{from:s,to:a}of r.overlay)if((n>0?s<=o:s=o:a>o))return new Fn(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,i)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function QA(t,e,n,i){let r=t.cursor(),o=[];if(!r.firstChild())return o;if(n!=null){for(let s=!1;!s;)if(s=r.type.is(n),!r.nextSibling())return o}for(;;){if(i!=null&&r.type.is(i))return o;if(r.type.is(e)&&o.push(r.node),!r.nextSibling())return i==null?o:[]}}function IS(t,e,n=e.length-1){for(let i=t.parent;n>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[n]&&e[n]!=i.name)return!1;n--}}return!0}class Iee{constructor(e,n,i,r){this.parent=e,this.buffer=n,this.index=i,this.start=r}}class fo extends RD{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,n,i){super(),this.context=e,this._parent=n,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,n,i){let{buffer:r}=this.context,o=r.findChild(this.index+4,r.buffer[this.index+3],e,n-this.context.start,i);return o<0?null:new fo(this.context,this,o)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,n,i=0){if(i&yt.ExcludeBuffers)return null;let{buffer:r}=this.context,o=r.findChild(this.index+4,r.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return o<0?null:new fo(this.context,this,o)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new fo(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new fo(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],n=[],{buffer:i}=this.context,r=this.index+4,o=i.buffer[this.index+3];if(o>r){let s=i.buffer[this.index+1];e.push(i.slice(r,o,s)),n.push(0)}return new Ze(this.type,e,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function ID(t){if(!t.length)return null;let e=0,n=t[0];for(let o=1;on.from||s.to=e){let a=new Fn(s.tree,s.overlay[0].from+o.from,-1,o);(r||(r=[i])).push(rp(a,e,n,!1))}}return r?ID(r):i}class z0{get name(){return this.type.name}constructor(e,n=0){if(this.mode=n,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof Fn)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let i=e._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,n){this.index=e;let{start:i,buffer:r}=this.buffer;return this.type=n||r.set.types[r.buffer[e]],this.from=i+r.buffer[e+1],this.to=i+r.buffer[e+2],!0}yield(e){return e?e instanceof Fn?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,n,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,i,this.mode));let{buffer:r}=this.buffer,o=r.findChild(this.index+4,r.buffer[this.index+3],e,n-this.buffer.start,i);return o<0?!1:(this.stack.push(this.index),this.yieldBuf(o))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,n,i=this.mode){return this.buffer?i&yt.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&yt.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&yt.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:n}=this.buffer,i=this.stack.length-1;if(e<0){let r=i<0?0:this.stack[i]+4;if(this.index!=r)return this.yieldBuf(n.findChild(r,this.index,-1,0,4))}else{let r=n.buffer[this.index+3];if(r<(i<0?n.buffer.length:n.buffer[this.stack[i]+3]))return this.yieldBuf(r)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let n,i,{buffer:r}=this;if(r){if(e>0){if(this.index-1)for(let o=n+e,s=e<0?-1:i._tree.children.length;o!=s;o+=e){let a=i._tree.children[o];if(this.mode&yt.IncludeAnonymous||a instanceof ma||!a.type.isAnonymous||dx(a))return!1}return!0}move(e,n){if(n&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to=0;){for(let s=e;s;s=s._parent)if(s.index==r){if(r==this.index)return s;n=s,i=o+1;break e}r=this.stack[--o]}for(let r=i;r=0;o--){if(o<0)return IS(this.node,e,r);let s=i[n.buffer[this.stack[o]]];if(!s.isAnonymous){if(e[r]&&e[r]!=s.name)return!1;r--}}return!0}}function dx(t){return t.children.some(e=>e instanceof ma||!e.type.isAnonymous||dx(e))}function Nee(t){var e;let{buffer:n,nodeSet:i,maxBufferLength:r=PD,reused:o=[],minRepeatType:s=i.types.length}=t,a=Array.isArray(n)?new cx(n,n.length):n,l=i.types,u=0,c=0;function d(x,_,w,D,W,I){let{id:V,start:B,end:H,size:K}=a,oe=c;for(;K<0;)if(a.next(),K==-1){let A=o[V];w.push(A),D.push(B-x);return}else if(K==-3){u=V;return}else if(K==-4){c=V;return}else throw new RangeError(`Unrecognized record size: ${K}`);let xe=l[V],Oe,X,ae=B-x;if(H-B<=r&&(X=y(a.pos-_,W))){let A=new Uint16Array(X.size-X.skip),be=a.pos-X.size,Se=A.length;for(;a.pos>be;)Se=b(X.start,A,Se);Oe=new ma(A,H-X.start,i),ae=X.start-x}else{let A=a.pos-K;a.next();let be=[],Se=[],L=V>=s?V:-1,We=0,et=H;for(;a.pos>A;)L>=0&&a.id==L&&a.size>=0?(a.end<=et-r&&(m(be,Se,B,We,a.end,et,L,oe),We=be.length,et=a.end),a.next()):I>2500?h(B,A,be,Se):d(B,A,be,Se,L,I+1);if(L>=0&&We>0&&We-1&&We>0){let Be=p(xe);Oe=hx(xe,be,Se,0,be.length,0,H-B,Be,Be)}else Oe=O(xe,be,Se,H-B,oe-H)}w.push(Oe),D.push(ae)}function h(x,_,w,D){let W=[],I=0,V=-1;for(;a.pos>_;){let{id:B,start:H,end:K,size:oe}=a;if(oe>4)a.next();else{if(V>-1&&H=0;K-=3)B[oe++]=W[K],B[oe++]=W[K+1]-H,B[oe++]=W[K+2]-H,B[oe++]=oe;w.push(new ma(B,W[2]-H,i)),D.push(H-x)}}function p(x){return(_,w,D)=>{let W=0,I=_.length-1,V,B;if(I>=0&&(V=_[I])instanceof Ze){if(!I&&V.type==x&&V.length==D)return V;(B=V.prop(Pe.lookAhead))&&(W=w[I]+V.length+B)}return O(x,_,w,D,W)}}function m(x,_,w,D,W,I,V,B){let H=[],K=[];for(;x.length>D;)H.push(x.pop()),K.push(_.pop()+w-W);x.push(O(i.types[V],H,K,I-W,B-I)),_.push(W-w)}function O(x,_,w,D,W=0,I){if(u){let V=[Pe.contextHash,u];I=I?[V].concat(I):[V]}if(W>25){let V=[Pe.lookAhead,W];I=I?[V].concat(I):[V]}return new Ze(x,_,w,D,I)}function y(x,_){let w=a.fork(),D=0,W=0,I=0,V=w.end-r,B={size:0,start:0,skip:0};e:for(let H=w.pos-x;w.pos>H;){let K=w.size;if(w.id==_&&K>=0){B.size=D,B.start=W,B.skip=I,I+=4,D+=4,w.next();continue}let oe=w.pos-K;if(K<0||oe=s?4:0,Oe=w.start;for(w.next();w.pos>oe;){if(w.size<0)if(w.size==-3)xe+=4;else break e;else w.id>=s&&(xe+=4);w.next()}W=Oe,D+=K,I+=xe}return(_<0||D==x)&&(B.size=D,B.start=W,B.skip=I),B.size>4?B:void 0}function b(x,_,w){let{id:D,start:W,end:I,size:V}=a;if(a.next(),V>=0&&D4){let H=a.pos-(V-4);for(;a.pos>H;)w=b(x,_,w)}_[--w]=B,_[--w]=I-x,_[--w]=W-x,_[--w]=D}else V==-3?u=D:V==-4&&(c=D);return w}let v=[],S=[];for(;a.pos>0;)d(t.start||0,t.bufferStart||0,v,S,-1,0);let k=(e=t.length)!==null&&e!==void 0?e:v.length?S[0]+v[0].length:0;return new Ze(l[t.topID],v.reverse(),S.reverse(),k)}const FA=new WeakMap;function Vg(t,e){if(!t.isAnonymous||e instanceof ma||e.type!=t)return 1;let n=FA.get(e);if(n==null){n=1;for(let i of e.children){if(i.type!=t||!(i instanceof Ze)){n=1;break}n+=Vg(t,i)}FA.set(e,n)}return n}function hx(t,e,n,i,r,o,s,a,l){let u=0;for(let m=i;m=c)break;_+=w}if(S==k+1){if(_>c){let w=m[k];p(w.children,w.positions,0,w.children.length,O[k]+v);continue}d.push(m[k])}else{let w=O[S-1]+m[S-1].length-x;d.push(hx(t,m,O,k,S,x,w,null,l))}h.push(x+v-o)}}return p(e,n,i,r,0),(a||l)(d,h,s)}class $D{constructor(){this.map=new WeakMap}setBuffer(e,n,i){let r=this.map.get(e);r||this.map.set(e,r=new Map),r.set(n,i)}getBuffer(e,n){let i=this.map.get(e);return i&&i.get(n)}set(e,n){e instanceof fo?this.setBuffer(e.context.buffer,e.index,n):e instanceof Fn&&this.map.set(e.tree,n)}get(e){return e instanceof fo?this.getBuffer(e.context.buffer,e.index):e instanceof Fn?this.map.get(e.tree):void 0}cursorSet(e,n){e.buffer?this.setBuffer(e.buffer.buffer,e.index,n):this.map.set(e.tree,n)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class Go{constructor(e,n,i,r,o=!1,s=!1){this.from=e,this.to=n,this.tree=i,this.offset=r,this.open=(o?1:0)|(s?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,n=[],i=!1){let r=[new Go(0,e.length,e,0,!1,i)];for(let o of n)o.to>e.length&&r.push(o);return r}static applyChanges(e,n,i=128){if(!n.length)return e;let r=[],o=1,s=e.length?e[0]:null;for(let a=0,l=0,u=0;;a++){let c=a=i)for(;s&&s.from=h.from||d<=h.to||u){let p=Math.max(h.from,l)-u,m=Math.min(h.to,d)-u;h=p>=m?null:new Go(p,m,h.tree,h.offset+u,a>0,!!c)}if(h&&r.push(h),s.to>d)break;s=onew or(r.from,r.to)):[new or(0,0)]:[new or(0,e.length)],this.createParse(e,n||[],i)}parse(e,n,i){let r=this.startParse(e,n,i);for(;;){let o=r.advance();if(o)return o}}};class Mee{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}}function LD(t){return(e,n,i,r)=>new Bee(e,t,n,i,r)}class zA{constructor(e,n,i,r,o){this.parser=e,this.parse=n,this.overlay=i,this.target=r,this.from=o}}function HA(t){if(!t.length||t.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(t))}class Dee{constructor(e,n,i,r,o,s,a){this.parser=e,this.predicate=n,this.mounts=i,this.index=r,this.start=o,this.target=s,this.prev=a,this.depth=0,this.ranges=[]}}const $S=new Pe({perNode:!0});class Bee{constructor(e,n,i,r,o){this.nest=n,this.input=i,this.fragments=r,this.ranges=o,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let i=this.baseParse.advance();if(!i)return null;if(this.baseParse=null,this.baseTree=i,this.startInner(),this.stoppedAt!=null)for(let r of this.inner)r.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let i=this.baseTree;return this.stoppedAt!=null&&(i=new Ze(i.type,i.children,i.positions,i.length,i.propValues.concat([[$S,this.stoppedAt]]))),i}let e=this.inner[this.innerDone],n=e.parse.advance();if(n){this.innerDone++;let i=Object.assign(Object.create(null),e.target.props);i[Pe.mounted.id]=new ip(n,e.overlay,e.parser),e.target.props=i}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let n=this.innerDone;n=this.stoppedAt)a=!1;else if(e.hasNode(r)){if(n){let u=n.mounts.find(c=>c.frag.from<=r.from&&c.frag.to>=r.to&&c.mount.overlay);if(u)for(let c of u.mount.overlay){let d=c.from+u.pos,h=c.to+u.pos;d>=r.from&&h<=r.to&&!n.ranges.some(p=>p.fromd)&&n.ranges.push({from:d,to:h})}}a=!1}else if(i&&(s=Qee(i.ranges,r.from,r.to)))a=s!=2;else if(!r.type.isAnonymous&&(o=this.nest(r,this.input))&&(r.fromnew or(d.from-r.from,d.to-r.from)):null,r.tree,c.length?c[0].from:r.from)),o.overlay?c.length&&(i={ranges:c,depth:0,prev:i}):a=!1}}else n&&(l=n.predicate(r))&&(l===!0&&(l=new or(r.from,r.to)),l.fromnew or(c.from-n.start,c.to-n.start)),n.target,u[0].from))),n=n.prev}i&&!--i.depth&&(i=i.prev)}}}}function Qee(t,e,n){for(let i of t){if(i.from>=n)break;if(i.to>e)return i.from<=e&&i.to>=n?2:1}return 0}function UA(t,e,n,i,r,o){if(e=e&&n.enter(i,1,yt.IgnoreOverlays|yt.ExcludeBuffers)||n.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let n=this.cursor.tree;;){if(n==e.tree)return!0;if(n.children.length&&n.positions[0]==0&&n.children[0]instanceof Ze)n=n.children[0];else break}return!1}}let zee=class{constructor(e){var n;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let i=this.curFrag=e[0];this.curTo=(n=i.tree.prop($S))!==null&&n!==void 0?n:i.to,this.inner=new WA(i.tree,-i.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let n=this.curFrag=this.fragments[this.fragI];this.curTo=(e=n.tree.prop($S))!==null&&e!==void 0?e:n.to,this.inner=new WA(n.tree,-n.offset)}}findMounts(e,n){var i;let r=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let o=this.inner.cursor.node;o;o=o.parent){let s=(i=o.tree)===null||i===void 0?void 0:i.prop(Pe.mounted);if(s&&s.parser==n)for(let a=this.fragI;a=o.to)break;l.tree==this.curFrag.tree&&r.push({frag:l,pos:o.from-l.offset,mount:s})}}}return r}};function VA(t,e){let n=null,i=e;for(let r=1,o=0;r=a)break;l.to<=s||(n||(i=n=e.slice()),l.froma&&n.splice(o+1,0,new or(a,l.to))):l.to>a?n[o--]=new or(a,l.to):n.splice(o--,1))}}return i}function Hee(t,e,n,i){let r=0,o=0,s=!1,a=!1,l=-1e9,u=[];for(;;){let c=r==t.length?1e9:s?t[r].to:t[r].from,d=o==e.length?1e9:a?e[o].to:e[o].from;if(s!=a){let h=Math.max(l,n),p=Math.min(c,d,i);hnew or(h.from+i,h.to+i)),d=Hee(e,c,l,u);for(let h=0,p=l;;h++){let m=h==d.length,O=m?u:d[h].from;if(O>p&&n.push(new Go(p,O,r.tree,-s,o.from>=p||o.openStart,o.to<=O||o.openEnd)),m)break;p=d[h].to}}else n.push(new Go(l,u,r.tree,-s,o.from>=s||o.openStart,o.to<=a||o.openEnd))}return n}let Uee=0;class Pr{constructor(e,n,i){this.set=e,this.base=n,this.modified=i,this.id=Uee++}static define(e){if(e!=null&&e.base)throw new Error("Can not derive from a modified tag");let n=new Pr([],null,[]);if(n.set.push(n),e)for(let i of e.set)n.set.push(i);return n}static defineModifier(){let e=new H0;return n=>n.modified.indexOf(e)>-1?n:H0.get(n.base||n,n.modified.concat(e).sort((i,r)=>i.id-r.id))}}let Wee=0;class H0{constructor(){this.instances=[],this.id=Wee++}static get(e,n){if(!n.length)return e;let i=n[0].instances.find(a=>a.base==e&&Vee(n,a.modified));if(i)return i;let r=[],o=new Pr(r,e,n);for(let a of n)a.instances.push(o);let s=jee(n);for(let a of e.set)if(!a.modified.length)for(let l of s)r.push(H0.get(a,l));return o}}function Vee(t,e){return t.length==e.length&&t.every((n,i)=>n==e[i])}function jee(t){let e=[[]];for(let n=0;ni.length-n.length)}function Au(t){let e=Object.create(null);for(let n in t){let i=t[n];Array.isArray(i)||(i=[i]);for(let r of n.split(" "))if(r){let o=[],s=2,a=r;for(let d=0;;){if(a=="..."&&d>0&&d+3==r.length){s=1;break}let h=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!h)throw new RangeError("Invalid path: "+r);if(o.push(h[0]=="*"?"":h[0][0]=='"'?JSON.parse(h[0]):h[0]),d+=h[0].length,d==r.length)break;let p=r[d++];if(d==r.length&&p=="!"){s=0;break}if(p!="/")throw new RangeError("Invalid path: "+r);a=r.slice(d)}let l=o.length-1,u=o[l];if(!u)throw new RangeError("Invalid path: "+r);let c=new U0(i,s,l>0?o.slice(0,l):null);e[u]=c.sort(e[u])}}return ND.add(e)}const ND=new Pe;class U0{constructor(e,n,i,r){this.tags=e,this.mode=n,this.context=i,this.next=r}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let s=r;for(let a of o)for(let l of a.set){let u=n[l.id];if(u){s=s?s+" "+u:u;break}}return s},scope:i}}function Xee(t,e){let n=null;for(let i of t){let r=i.style(e);r&&(n=n?n+" "+r:r)}return n}function Zee(t,e,n,i=0,r=t.length){let o=new qee(i,Array.isArray(e)?e:[e],n);o.highlightRange(t.cursor(),i,r,"",o.highlighters),o.flush(r)}class qee{constructor(e,n,i){this.at=e,this.highlighters=n,this.span=i,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,i,r,o){let{type:s,from:a,to:l}=e;if(a>=i||l<=n)return;s.isTop&&(o=this.highlighters.filter(p=>!p.scope||p.scope(s)));let u=r,c=Yee(e)||U0.empty,d=Xee(o,c.tags);if(d&&(u&&(u+=" "),u+=d,c.mode==1&&(r+=(r?" ":"")+d)),this.startSpan(Math.max(n,a),u),c.opaque)return;let h=e.tree&&e.tree.prop(Pe.mounted);if(h&&h.overlay){let p=e.node.enter(h.overlay[0].from+a,1),m=this.highlighters.filter(y=>!y.scope||y.scope(h.tree.type)),O=e.firstChild();for(let y=0,b=a;;y++){let v=y=S||!e.nextSibling())););if(!v||S>i)break;b=v.to+a,b>n&&(this.highlightRange(p.cursor(),Math.max(n,v.from+a),Math.min(i,b),"",m),this.startSpan(Math.min(i,b),u))}O&&e.parent()}else if(e.firstChild()){h&&(r="");do if(!(e.to<=n)){if(e.from>=i)break;this.highlightRange(e,n,i,r,o),this.startSpan(Math.min(i,e.to),u)}while(e.nextSibling());e.parent()}}}function Yee(t){let e=t.type.prop(ND);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const le=Pr.define,Zm=le(),Qs=le(),XA=le(Qs),ZA=le(Qs),Fs=le(),qm=le(Fs),Ny=le(Fs),io=le(),gl=le(io),to=le(),no=le(),LS=le(),Ah=le(LS),Ym=le(),R={comment:Zm,lineComment:le(Zm),blockComment:le(Zm),docComment:le(Zm),name:Qs,variableName:le(Qs),typeName:XA,tagName:le(XA),propertyName:ZA,attributeName:le(ZA),className:le(Qs),labelName:le(Qs),namespace:le(Qs),macroName:le(Qs),literal:Fs,string:qm,docString:le(qm),character:le(qm),attributeValue:le(qm),number:Ny,integer:le(Ny),float:le(Ny),bool:le(Fs),regexp:le(Fs),escape:le(Fs),color:le(Fs),url:le(Fs),keyword:to,self:le(to),null:le(to),atom:le(to),unit:le(to),modifier:le(to),operatorKeyword:le(to),controlKeyword:le(to),definitionKeyword:le(to),moduleKeyword:le(to),operator:no,derefOperator:le(no),arithmeticOperator:le(no),logicOperator:le(no),bitwiseOperator:le(no),compareOperator:le(no),updateOperator:le(no),definitionOperator:le(no),typeOperator:le(no),controlOperator:le(no),punctuation:LS,separator:le(LS),bracket:Ah,angleBracket:le(Ah),squareBracket:le(Ah),paren:le(Ah),brace:le(Ah),content:io,heading:gl,heading1:le(gl),heading2:le(gl),heading3:le(gl),heading4:le(gl),heading5:le(gl),heading6:le(gl),contentSeparator:le(io),list:le(io),quote:le(io),emphasis:le(io),strong:le(io),link:le(io),monospace:le(io),strikethrough:le(io),inserted:le(),deleted:le(),changed:le(),invalid:le(),meta:Ym,documentMeta:le(Ym),annotation:le(Ym),processingInstruction:le(Ym),definition:Pr.defineModifier(),constant:Pr.defineModifier(),function:Pr.defineModifier(),standard:Pr.defineModifier(),local:Pr.defineModifier(),special:Pr.defineModifier()};MD([{tag:R.link,class:"tok-link"},{tag:R.heading,class:"tok-heading"},{tag:R.emphasis,class:"tok-emphasis"},{tag:R.strong,class:"tok-strong"},{tag:R.keyword,class:"tok-keyword"},{tag:R.atom,class:"tok-atom"},{tag:R.bool,class:"tok-bool"},{tag:R.url,class:"tok-url"},{tag:R.labelName,class:"tok-labelName"},{tag:R.inserted,class:"tok-inserted"},{tag:R.deleted,class:"tok-deleted"},{tag:R.literal,class:"tok-literal"},{tag:R.string,class:"tok-string"},{tag:R.number,class:"tok-number"},{tag:[R.regexp,R.escape,R.special(R.string)],class:"tok-string2"},{tag:R.variableName,class:"tok-variableName"},{tag:R.local(R.variableName),class:"tok-variableName tok-local"},{tag:R.definition(R.variableName),class:"tok-variableName tok-definition"},{tag:R.special(R.variableName),class:"tok-variableName2"},{tag:R.definition(R.propertyName),class:"tok-propertyName tok-definition"},{tag:R.typeName,class:"tok-typeName"},{tag:R.namespace,class:"tok-namespace"},{tag:R.className,class:"tok-className"},{tag:R.macroName,class:"tok-macroName"},{tag:R.propertyName,class:"tok-propertyName"},{tag:R.operator,class:"tok-operator"},{tag:R.comment,class:"tok-comment"},{tag:R.meta,class:"tok-meta"},{tag:R.invalid,class:"tok-invalid"},{tag:R.punctuation,class:"tok-punctuation"}]);var My;const qs=new Pe;function cb(t){return he.define({combine:t?e=>e.concat(t):void 0})}const fx=new Pe;class Bi{constructor(e,n,i=[],r=""){this.data=e,this.name=r,Ve.prototype.hasOwnProperty("tree")||Object.defineProperty(Ve.prototype,"tree",{get(){return gt(this)}}),this.parser=n,this.extension=[ga.of(this),Ve.languageData.of((o,s,a)=>{let l=qA(o,s,a),u=l.type.prop(qs);if(!u)return[];let c=o.facet(u),d=l.type.prop(fx);if(d){let h=l.resolve(s-l.from,a);for(let p of d)if(p.test(h,o)){let m=o.facet(p.facet);return p.type=="replace"?m:m.concat(c)}}return c})].concat(i)}isActiveAt(e,n,i=-1){return qA(e,n,i).type.prop(qs)==this.data}findRegions(e){let n=e.facet(ga);if((n==null?void 0:n.data)==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let i=[],r=(o,s)=>{if(o.prop(qs)==this.data){i.push({from:s,to:s+o.length});return}let a=o.prop(Pe.mounted);if(a){if(a.tree.prop(qs)==this.data){if(a.overlay)for(let l of a.overlay)i.push({from:l.from+s,to:l.to+s});else i.push({from:s,to:s+o.length});return}else if(a.overlay){let l=i.length;if(r(a.tree,a.overlay[0].from+s),i.length>l)return}}for(let l=0;li.isTop?n:void 0)]}),e.name)}configure(e,n){return new uu(this.data,this.parser.configure(e),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function gt(t){let e=t.field(Bi.state,!1);return e?e.tree:Ze.empty}class Gee{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,n){let i=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,n):this.string.slice(e-i,n-i)}}let Rh=null;class cu{constructor(e,n,i=[],r,o,s,a,l){this.parser=e,this.state=n,this.fragments=i,this.tree=r,this.treeLen=o,this.viewport=s,this.skipped=a,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(e,n,i){return new cu(e,n,[],Ze.empty,0,i,[],null)}startParse(){return this.parser.startParse(new Gee(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=Ze.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var i;if(typeof e=="number"){let r=Date.now()+e;e=()=>Date.now()>r}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=e,this.tree=n,this.fragments=this.withoutTempSkipped(Go.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=Rh;Rh=this;try{return e()}finally{Rh=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=YA(e,n.from,n.to);return e}changes(e,n){let{fragments:i,tree:r,treeLen:o,viewport:s,skipped:a}=this;if(this.takeTree(),!e.empty){let l=[];if(e.iterChangedRanges((u,c,d,h)=>l.push({fromA:u,toA:c,fromB:d,toB:h})),i=Go.applyChanges(i,l),r=Ze.empty,o=0,s={from:e.mapPos(s.from,-1),to:e.mapPos(s.to,1)},this.skipped.length){a=[];for(let u of this.skipped){let c=e.mapPos(u.from,1),d=e.mapPos(u.to,-1);ce.from&&(this.fragments=YA(this.fragments,r,o),this.skipped.splice(i--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,n){this.skipped.push({from:e,to:n})}static getSkippingParser(e){return new class extends ub{createParse(n,i,r){let o=r[0].from,s=r[r.length-1].to;return{parsedPos:o,advance(){let l=Rh;if(l){for(let u of r)l.tempSkipped.push(u);e&&(l.scheduleOn=l.scheduleOn?Promise.all([l.scheduleOn,e]):e)}return this.parsedPos=s,new Ze(tn.none,[],[],s-o)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let n=this.fragments;return this.treeLen>=e&&n.length&&n[0].from==0&&n[0].to>=e}static get(){return Rh}}function YA(t,e,n){return Go.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class pd{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(e.changes,e.state),i=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,i)||n.takeTree(),new pd(n)}static init(e){let n=Math.min(3e3,e.doc.length),i=cu.create(e.facet(ga).parser,e,{from:0,to:n});return i.work(20,n)||i.takeTree(),new pd(i)}}Bi.state=On.define({create:pd.init,update(t,e){for(let n of e.effects)if(n.is(Bi.setState))return n.value;return e.startState.facet(ga)!=e.state.facet(ga)?pd.init(e.state):t.apply(e)}});let DD=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(DD=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:400})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const Dy=typeof navigator<"u"&&(!((My=navigator.scheduling)===null||My===void 0)&&My.isInputPending)?()=>navigator.scheduling.isInputPending():null,Kee=en.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let n=this.view.state.field(Bi.state).context;(n.updateViewport(e.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:e}=this.view,n=e.field(Bi.state);(n.tree!=n.context.tree||!n.context.isDone(e.doc.length))&&(this.working=DD(this.work))}work(e){this.working=null;let n=Date.now();if(this.chunkEndr+1e3,l=o.context.work(()=>Dy&&Dy()||Date.now()>s,r+(a?0:1e5));this.chunkBudget-=Date.now()-n,(l||this.chunkBudget<=0)&&(o.context.takeTree(),this.view.dispatch({effects:Bi.setState.of(new pd(o.context))})),this.chunkBudget>0&&!(l&&!a)&&this.scheduleWork(),this.checkAsyncSchedule(o.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(n=>gi(this.view.state,n)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),ga=he.define({combine(t){return t.length?t[0]:null},enables:t=>[Bi.state,Kee,ue.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]});class md{constructor(e,n=[]){this.language=e,this.support=n,this.extension=[e,n]}}class W0{constructor(e,n,i,r,o,s=void 0){this.name=e,this.alias=n,this.extensions=i,this.filename=r,this.loadFunc=o,this.support=s,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then(e=>this.support=e,e=>{throw this.loading=null,e}))}static of(e){let{load:n,support:i}=e;if(!n){if(!i)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");n=()=>Promise.resolve(i)}return new W0(e.name,(e.alias||[]).concat(e.name).map(r=>r.toLowerCase()),e.extensions||[],e.filename,n,i)}static matchFilename(e,n){for(let r of e)if(r.filename&&r.filename.test(n))return r;let i=/\.([^.]+)$/.exec(n);if(i){for(let r of e)if(r.extensions.indexOf(i[1])>-1)return r}return null}static matchLanguageName(e,n,i=!0){n=n.toLowerCase();for(let r of e)if(r.alias.some(o=>o==n))return r;if(i)for(let r of e)for(let o of r.alias){let s=n.indexOf(o);if(s>-1&&(o.length>2||!/\w/.test(n[s-1])&&!/\w/.test(n[s+o.length])))return r}return null}}const BD=he.define(),Yd=he.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(n=>n!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function du(t){let e=t.facet(Yd);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function gd(t,e){let n="",i=t.tabSize,r=t.facet(Yd)[0];if(r==" "){for(;e>=i;)n+=" ",e-=i;r=" "}for(let o=0;o=e?ete(t,n,e):null}function Jee(t,e,n){let i=Object.create(null),r=new Lp(t,{overrideIndentation:s=>{var a;return(a=i[s])!==null&&a!==void 0?a:-1}}),o=[];for(let s=e;s<=n;){let a=t.doc.lineAt(s);s=a.to+1;let l=db(r,a.from);if(l==null)continue;/\S/.test(a.text)||(l=0);let u=/^\s*/.exec(a.text)[0],c=gd(t,l);u!=c&&(i[a.from]=l,o.push({from:a.from,to:a.from+u.length,insert:c}))}return t.changes(o)}class Lp{constructor(e,n={}){this.state=e,this.options=n,this.unit=du(e)}lineAt(e,n=1){let i=this.state.doc.lineAt(e),{simulateBreak:r,simulateDoubleBreak:o}=this.options;return r!=null&&r>=i.from&&r<=i.to?o&&r==e?{text:"",from:e}:(n<0?r-1&&(o+=s-this.countColumn(i,i.search(/\S|$/))),o}countColumn(e,n=e.length){return Hr(e,this.state.tabSize,n)}lineIndent(e,n=1){let{text:i,from:r}=this.lineAt(e,n),o=this.options.overrideIndentation;if(o){let s=o(r);if(s>-1)return s}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const Gd=new Pe;function ete(t,e,n){let i=e.resolveStack(n),r=i.node.enterUnfinishedNodesBefore(n);if(r!=i.node){let o=[];for(let s=r;s!=i.node;s=s.parent)o.push(s);for(let s=o.length-1;s>=0;s--)i={node:o[s],next:i}}return QD(i,t,n)}function QD(t,e,n){for(let i=t;i;i=i.next){let r=nte(i.node);if(r)return r(px.create(e,n,i))}return 0}function tte(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function nte(t){let e=t.type.prop(Gd);if(e)return e;let n=t.firstChild,i;if(n&&(i=n.type.prop(Pe.closedBy))){let r=t.lastChild,o=r&&i.indexOf(r.name)>-1;return s=>FD(s,!0,1,void 0,o&&!tte(s)?r.from:void 0)}return t.parent==null?ite:null}function ite(){return 0}class px extends Lp{constructor(e,n,i){super(e.state,e.options),this.base=e,this.pos=n,this.context=i}get node(){return this.context.node}static create(e,n,i){return new px(e,n,i)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let n=this.state.doc.lineAt(e.from);for(;;){let i=e.resolve(n.from);for(;i.parent&&i.parent.from==i.from;)i=i.parent;if(rte(i,e))break;n=this.state.doc.lineAt(i.from)}return this.lineIndent(n.from)}continue(){return QD(this.context.next,this.base,this.pos)}}function rte(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function ote(t){let e=t.node,n=e.childAfter(e.from),i=e.lastChild;if(!n)return null;let r=t.options.simulateBreak,o=t.state.doc.lineAt(n.from),s=r==null||r<=o.from?o.to:Math.min(o.to,r);for(let a=n.to;;){let l=e.childAfter(a);if(!l||l==i)return null;if(!l.type.isSkipped)return l.fromFD(i,e,n,t)}function FD(t,e,n,i,r){let o=t.textAfter,s=o.match(/^\s*/)[0].length,a=i&&o.slice(s,s+i.length)==i||r==t.pos+s,l=e?ote(t):null;return l?a?t.column(l.from):t.column(l.to):t.baseIndent+(a?0:t.unit*n)}const ate=t=>t.baseIndent;function Gc({except:t,units:e=1}={}){return n=>{let i=t&&t.test(n.textAfter);return n.baseIndent+(i?0:e*n.unit)}}const lte=200;function ute(){return Ve.transactionFilter.of(t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:i}=t.newSelection.main,r=n.lineAt(i);if(i>r.from+lte)return t;let o=n.sliceString(r.from,i);if(!e.some(u=>u.test(o)))return t;let{state:s}=t,a=-1,l=[];for(let{head:u}of s.selection.ranges){let c=s.doc.lineAt(u);if(c.from==a)continue;a=c.from;let d=db(s,c.from);if(d==null)continue;let h=/^\s*/.exec(c.text)[0],p=gd(s,d);h!=p&&l.push({from:c.from,to:c.from+h.length,insert:p})}return l.length?[t,{changes:l,sequential:!0}]:t})}const zD=he.define(),Ru=new Pe;function mx(t){let e=t.firstChild,n=t.lastChild;return e&&e.ton)continue;if(o&&a.from=e&&u.to>n&&(o=u)}}return o}function dte(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function V0(t,e,n){for(let i of t.facet(zD)){let r=i(t,e,n);if(r)return r}return cte(t,e,n)}function HD(t,e){let n=e.mapPos(t.from,1),i=e.mapPos(t.to,-1);return n>=i?void 0:{from:n,to:i}}const hb=De.define({map:HD}),Np=De.define({map:HD});function UD(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some(i=>i.from<=n&&i.to>=n)||e.push(t.lineBlockAt(n));return e}const hu=On.define({create(){return Ce.none},update(t,e){t=t.map(e.changes);for(let n of e.effects)if(n.is(hb)&&!hte(t,n.value.from,n.value.to)){let{preparePlaceholder:i}=e.state.facet(jD),r=i?Ce.replace({widget:new yte(i(e.state,n.value))}):GA;t=t.update({add:[r.range(n.value.from,n.value.to)]})}else n.is(Np)&&(t=t.update({filter:(i,r)=>n.value.from!=i||n.value.to!=r,filterFrom:n.value.from,filterTo:n.value.to}));if(e.selection){let n=!1,{head:i}=e.selection.main;t.between(i,i,(r,o)=>{ri&&(n=!0)}),n&&(t=t.update({filterFrom:i,filterTo:i,filter:(r,o)=>o<=i||r>=i}))}return t},provide:t=>ue.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,(i,r)=>{n.push(i,r)}),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n{(!r||r.from>o)&&(r={from:o,to:s})}),r}function hte(t,e,n){let i=!1;return t.between(e,e,(r,o)=>{r==e&&o==n&&(i=!0)}),i}function WD(t,e){return t.field(hu,!1)?e:e.concat(De.appendConfig.of(XD()))}const fte=t=>{for(let e of UD(t)){let n=V0(t.state,e.from,e.to);if(n)return t.dispatch({effects:WD(t.state,[hb.of(n),VD(t,n)])}),!0}return!1},pte=t=>{if(!t.state.field(hu,!1))return!1;let e=[];for(let n of UD(t)){let i=j0(t.state,n.from,n.to);i&&e.push(Np.of(i),VD(t,i,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function VD(t,e,n=!0){let i=t.state.doc.lineAt(e.from).number,r=t.state.doc.lineAt(e.to).number;return ue.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${i} ${t.state.phrase("to")} ${r}.`)}const mte=t=>{let{state:e}=t,n=[];for(let i=0;i{let e=t.state.field(hu,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,(i,r)=>{n.push(Np.of({from:i,to:r}))}),t.dispatch({effects:n}),!0},Ote=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:fte},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:pte},{key:"Ctrl-Alt-[",run:mte},{key:"Ctrl-Alt-]",run:gte}],bte={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},jD=he.define({combine(t){return Eo(t,bte)}});function XD(t){return[hu,wte]}function ZD(t,e){let{state:n}=t,i=n.facet(jD),r=s=>{let a=t.lineBlockAt(t.posAtDOM(s.target)),l=j0(t.state,a.from,a.to);l&&t.dispatch({effects:Np.of(l)}),s.preventDefault()};if(i.placeholderDOM)return i.placeholderDOM(t,r,e);let o=document.createElement("span");return o.textContent=i.placeholderText,o.setAttribute("aria-label",n.phrase("folded code")),o.title=n.phrase("unfold"),o.className="cm-foldPlaceholder",o.onclick=r,o}const GA=Ce.replace({widget:new class extends fs{toDOM(t){return ZD(t,null)}}});class yte extends fs{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return ZD(e,this.value)}}const vte={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class By extends os{constructor(e,n){super(),this.config=e,this.open=n}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let n=document.createElement("span");return n.textContent=this.open?this.config.openText:this.config.closedText,n.title=e.state.phrase(this.open?"Fold line":"Unfold line"),n}}function Ste(t={}){let e=Object.assign(Object.assign({},vte),t),n=new By(e,!0),i=new By(e,!1),r=en.fromClass(class{constructor(s){this.from=s.viewport.from,this.markers=this.buildMarkers(s)}update(s){(s.docChanged||s.viewportChanged||s.startState.facet(ga)!=s.state.facet(ga)||s.startState.field(hu,!1)!=s.state.field(hu,!1)||gt(s.startState)!=gt(s.state)||e.foldingChanged(s))&&(this.markers=this.buildMarkers(s.view))}buildMarkers(s){let a=new da;for(let l of s.viewportLineBlocks){let u=j0(s.state,l.from,l.to)?i:V0(s.state,l.from,l.to)?n:null;u&&a.add(l.from,l.from,u)}return a.finish()}}),{domEventHandlers:o}=e;return[r,vee({class:"cm-foldGutter",markers(s){var a;return((a=s.plugin(r))===null||a===void 0?void 0:a.markers)||tt.empty},initialSpacer(){return new By(e,!1)},domEventHandlers:Object.assign(Object.assign({},o),{click:(s,a,l)=>{if(o.click&&o.click(s,a,l))return!0;let u=j0(s.state,a.from,a.to);if(u)return s.dispatch({effects:Np.of(u)}),!0;let c=V0(s.state,a.from,a.to);return c?(s.dispatch({effects:hb.of(c)}),!0):!1}})}),XD()]}const wte=ue.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class Mp{constructor(e,n){this.specs=e;let i;function r(a){let l=ha.newName();return(i||(i=Object.create(null)))["."+l]=a,l}const o=typeof n.all=="string"?n.all:n.all?r(n.all):void 0,s=n.scope;this.scope=s instanceof Bi?a=>a.prop(qs)==s.data:s?a=>a==s:void 0,this.style=MD(e.map(a=>({tag:a.tag,class:a.class||r(Object.assign({},a,{tag:null}))})),{all:o}).style,this.module=i?new ha(i):null,this.themeType=n.themeType}static define(e,n){return new Mp(e,n||{})}}const NS=he.define(),qD=he.define({combine(t){return t.length?[t[0]]:null}});function Qy(t){let e=t.facet(NS);return e.length?e:t.facet(qD)}function KA(t,e){let n=[xte],i;return t instanceof Mp&&(t.module&&n.push(ue.styleModule.of(t.module)),i=t.themeType),e!=null&&e.fallback?n.push(qD.of(t)):i?n.push(NS.computeN([ue.darkTheme],r=>r.facet(ue.darkTheme)==(i=="dark")?[t]:[])):n.push(NS.of(t)),n}class kte{constructor(e){this.markCache=Object.create(null),this.tree=gt(e.state),this.decorations=this.buildDeco(e,Qy(e.state)),this.decoratedTo=e.viewport.to}update(e){let n=gt(e.state),i=Qy(e.state),r=i!=Qy(e.startState),{viewport:o}=e.view,s=e.changes.mapPos(this.decoratedTo,1);n.length=o.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=s):(n!=this.tree||e.viewportChanged||r)&&(this.tree=n,this.decorations=this.buildDeco(e.view,i),this.decoratedTo=o.to)}buildDeco(e,n){if(!n||!this.tree.length)return Ce.none;let i=new da;for(let{from:r,to:o}of e.visibleRanges)Zee(this.tree,n,(s,a,l)=>{i.add(s,a,this.markCache[l]||(this.markCache[l]=Ce.mark({class:l})))},r,o);return i.finish()}}const xte=ds.high(en.fromClass(kte,{decorations:t=>t.decorations})),_te=Mp.define([{tag:R.meta,color:"#404740"},{tag:R.link,textDecoration:"underline"},{tag:R.heading,textDecoration:"underline",fontWeight:"bold"},{tag:R.emphasis,fontStyle:"italic"},{tag:R.strong,fontWeight:"bold"},{tag:R.strikethrough,textDecoration:"line-through"},{tag:R.keyword,color:"#708"},{tag:[R.atom,R.bool,R.url,R.contentSeparator,R.labelName],color:"#219"},{tag:[R.literal,R.inserted],color:"#164"},{tag:[R.string,R.deleted],color:"#a11"},{tag:[R.regexp,R.escape,R.special(R.string)],color:"#e40"},{tag:R.definition(R.variableName),color:"#00f"},{tag:R.local(R.variableName),color:"#30a"},{tag:[R.typeName,R.namespace],color:"#085"},{tag:R.className,color:"#167"},{tag:[R.special(R.variableName),R.macroName],color:"#256"},{tag:R.definition(R.propertyName),color:"#00c"},{tag:R.comment,color:"#940"},{tag:R.invalid,color:"#f00"}]),Ete=ue.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),YD=1e4,GD="()[]{}",KD=he.define({combine(t){return Eo(t,{afterCursor:!0,brackets:GD,maxScanDistance:YD,renderMatch:Pte})}}),Cte=Ce.mark({class:"cm-matchingBracket"}),Tte=Ce.mark({class:"cm-nonmatchingBracket"});function Pte(t){let e=[],n=t.matched?Cte:Tte;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}const Ate=On.define({create(){return Ce.none},update(t,e){if(!e.docChanged&&!e.selection)return t;let n=[],i=e.state.facet(KD);for(let r of e.state.selection.ranges){if(!r.empty)continue;let o=po(e.state,r.head,-1,i)||r.head>0&&po(e.state,r.head-1,1,i)||i.afterCursor&&(po(e.state,r.head,1,i)||r.headue.decorations.from(t)}),Rte=[Ate,Ete];function Ite(t={}){return[KD.of(t),Rte]}const JD=new Pe;function MS(t,e,n){let i=t.prop(e<0?Pe.openedBy:Pe.closedBy);if(i)return i;if(t.name.length==1){let r=n.indexOf(t.name);if(r>-1&&r%2==(e<0?1:0))return[n[r+e]]}return null}function DS(t){let e=t.type.prop(JD);return e?e(t.node):t}function po(t,e,n,i={}){let r=i.maxScanDistance||YD,o=i.brackets||GD,s=gt(t),a=s.resolveInner(e,n);for(let l=a;l;l=l.parent){let u=MS(l.type,n,o);if(u&&l.from0?e>=c.from&&ec.from&&e<=c.to))return $te(t,e,n,l,c,u,o)}}return Lte(t,e,n,s,a.type,r,o)}function $te(t,e,n,i,r,o,s){let a=i.parent,l={from:r.from,to:r.to},u=0,c=a==null?void 0:a.cursor();if(c&&(n<0?c.childBefore(i.from):c.childAfter(i.to)))do if(n<0?c.to<=i.from:c.from>=i.to){if(u==0&&o.indexOf(c.type.name)>-1&&c.from0)return null;let u={from:n<0?e-1:e,to:n>0?e+1:e},c=t.doc.iterRange(e,n>0?t.doc.length:0),d=0;for(let h=0;!c.next().done&&h<=o;){let p=c.value;n<0&&(h+=p.length);let m=e+h*n;for(let O=n>0?0:p.length-1,y=n>0?p.length:-1;O!=y;O+=n){let b=s.indexOf(p[O]);if(!(b<0||i.resolveInner(m+O,1).type!=r))if(b%2==0==n>0)d++;else{if(d==1)return{start:u,end:{from:m+O,to:m+O+1},matched:b>>1==l>>1};d--}}n>0&&(h+=p.length)}return c.done?{start:u,matched:!1}:null}function JA(t,e,n,i=0,r=0){e==null&&(e=t.search(/[^\s\u00a0]/),e==-1&&(e=t.length));let o=r;for(let s=i;s=this.string.length}sol(){return this.pos==0}peek(){return this.string.charAt(this.pos)||void 0}next(){if(this.posn}eatSpace(){let e=this.pos;for(;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e}skipToEnd(){this.pos=this.string.length}skipTo(e){let n=this.string.indexOf(e,this.pos);if(n>-1)return this.pos=n,!0}backUp(e){this.pos-=e}column(){return this.lastColumnPosi?s.toLowerCase():s,o=this.string.substr(this.pos,e.length);return r(o)==r(e)?(n!==!1&&(this.pos+=e.length),!0):null}else{let r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&n!==!1&&(this.pos+=r[0].length),r)}}current(){return this.string.slice(this.start,this.pos)}}function Nte(t){return{name:t.name||"",token:t.token,blankLine:t.blankLine||(()=>{}),startState:t.startState||(()=>!0),copyState:t.copyState||Mte,indent:t.indent||(()=>null),languageData:t.languageData||{},tokenTable:t.tokenTable||Ox}}function Mte(t){if(typeof t!="object")return t;let e={};for(let n in t){let i=t[n];e[n]=i instanceof Array?i.slice():i}return e}const eR=new WeakMap;class X0 extends Bi{constructor(e){let n=cb(e.languageData),i=Nte(e),r,o=new class extends ub{createParse(s,a,l){return new Bte(r,s,a,l)}};super(n,o,[BD.of((s,a)=>this.getIndent(s,a))],e.name),this.topNode=zte(n),r=this,this.streamParser=i,this.stateAfter=new Pe({perNode:!0}),this.tokenTable=e.tokenTable?new r4(i.tokenTable):Fte}static define(e){return new X0(e)}getIndent(e,n){let i=gt(e.state),r=i.resolve(n);for(;r&&r.type!=this.topNode;)r=r.parent;if(!r)return null;let o,{overrideIndentation:s}=e.options;s&&(o=eR.get(e.state),o!=null&&o1e4)return null;for(;l=i&&n+e.length<=r&&e.prop(t.stateAfter);if(o)return{state:t.streamParser.copyState(o),pos:n+e.length};for(let s=e.children.length-1;s>=0;s--){let a=e.children[s],l=n+e.positions[s],u=a instanceof Ze&&l=e.length)return e;!r&&e.type==t.topNode&&(r=!0);for(let o=e.children.length-1;o>=0;o--){let s=e.positions[o],a=e.children[o],l;if(sn&&gx(t,r.tree,0-r.offset,n,s),l;if(a&&(l=t4(t,r.tree,n+r.offset,a.pos+r.offset,!1)))return{state:a.state,tree:l}}return{state:t.streamParser.startState(i?du(i):4),tree:Ze.empty}}let Bte=class{constructor(e,n,i,r){this.lang=e,this.input=n,this.fragments=i,this.ranges=r,this.stoppedAt=null,this.chunks=[],this.chunkPos=[],this.chunk=[],this.chunkReused=void 0,this.rangeIndex=0,this.to=r[r.length-1].to;let o=cu.get(),s=r[0].from,{state:a,tree:l}=Dte(e,i,s,o==null?void 0:o.state);this.state=a,this.parsedPos=this.chunkStart=s+l.length;for(let u=0;u=n?this.finish():e&&this.parsedPos>=e.viewport.to?(e.skipUntilInView(this.parsedPos,n),this.finish()):null}stopAt(e){this.stoppedAt=e}lineAfter(e){let n=this.input.chunk(e);if(this.input.lineChunks)n==` + */var mZ=/["'&<>]/,gZ=OZ;function OZ(t){var e=""+t,n=mZ.exec(e);if(!n)return e;var i,r="",o=0,s=0;for(o=n.index;ol.toUpperCase())),n.letterSpacing!=="normal"&&(s=o.length*parseInt(n.letterSpacing)),a=r.measureText(o).width+s,a}function Mg(t,e,n=!0,i=!0,r=!1){let o=t;const s=o.charAt(0),a=o.slice(-1);return n&&e.indexOf(s)!==-1&&(o=o.slice(1)),i&&e.indexOf(a)!==-1&&(o=o.slice(0,-1)),r&&(o=Mg(o,e,n,i,!1)),o}function IM(t,e,n=!1){const i=e.truncate,r=e.ignore,o=e.ellipsis;let s=cf(t),a=-1,l=-1;const u=()=>{for(let c=0;c=0&&(h=s[p],!(h.length>0));)p--;if(h){const m=String(h.slice(-1));r.indexOf(m)!==-1&&(s[p].length-=1)}}}if(u(),c=s[a],c){const d=c[l+1];if(d&&r.indexOf(d)!==-1&&s[a].splice(l+1,1),!d){let h=null,p=a+1;for(;p0));)p++;if(h){const m=String(h[0]);r.indexOf(m)!==-1&&s[p].shift()}}}}else{u();const c=s[a];if(c){const d=c[l-1];if(d&&r.indexOf(d.slice(-1))!==-1&&(d.length===1?s[a].splice(l-1,1):s[a][l-1]=d.slice(0,-1)),!d){let h=null,p=a-1;for(;p>=0&&(h=s[p],!(h.length>0));)p--;if(h){const m=String(h.slice(-1)).slice(-1);if(r.indexOf(m)!==-1){const O=h.length-1;s[p][O]=h[O].slice(0,-1)}}}}}return n&&(s=IM(s,e,!1)),s}function SZ(t,e){const n=new wZ(t,e);if(n)return n.truncate()}class wZ{constructor(e,n={}){this._options=void 0,this._stage=void 0,this._parent=void 0,this._nodeMap=void 0,this._defaultStringData=void 0,this._nodeDataIndexes=void 0,this._maxHeight=void 0,this._maxWidth=void 0,this._maxLines=void 0;const i=e!=null&&e.parentElement?e==null?void 0:e.parentElement:void 0;if(this._options={parent:n.parent||i,maxLines:n.maxLines||1,position:n.position||"end",truncate:n.truncate||"character",ellipsis:n.ellipsis||"…",ignore:n.ignore||[" ",".",","],lineHeight:n.lineHeight||1.2,shouldTruncateWhenInvisible:!!n.shouldTruncateWhenInvisible},!e){Ge(!1,"[Truncator] No element to truncate.");return}if(this._stage=e,n.parent)this._parent=this._options.parent;else{const r=this._stage.parentElement?this._stage.parentElement:void 0;this._parent=this._options.maxLines==="auto"?r:this._stage}this.setup()}setup(){if(!this._stage)return;const e=this._options,n=e.maxLines,i=e.truncate,r=e.lineHeight,o=Fr(this._parent),s=o.lineHeight==="normal"?r*parseFloat(o.fontSize):parseFloat(o.lineHeight),a=this._stage.firstChild.children?this._stage.firstChild:this._stage,l=[],u=[];this._nodeMap=this.getNodeMap(a);for(let c=0;cc.node),this._parent),this._maxLines=n==="auto"?Math.round(this._maxHeight/s):n}getNodeMap(e){const n=this._options,i=n.shouldTruncateWhenInvisible,r=n.truncate,o=Array.from(e.childNodes),s=[];return o.forEach(a=>{if(a.nodeType===1||a.nodeType===3){const l=i?!0:Av(a,!1),u=a.textContent+" ";s.push({node:a,data:r==="word"?l?u.match(/.*?[\.\s\/]+?/g):[""]:l?a.textContent.split(""):[]})}}),s}getNodeIndexes(e){const n=[];for(let i=0;i${s}`}else r.node.nodeType===3&&(n+=s)}return n}checkFit(e){const n=this.domString(e),i=this._options.maxLines==="auto"?this._stage:this._parent;let r=!0;return this._stage.innerHTML=n,Xt(i).height-this._maxHeight>.5&&(r=!1),r}truncate(){const e=this._options,n=e.ellipsis,i=e.ignore,o=e.position==="middle";let s=!1,a="",l=null;if(!this._stage)return;const u=(m,O,y,b,v=null)=>{let S=m,k=O,x=v;for(;S<=k;){const _=Math.floor((S+k)/2);y(_,b)?(k=_-1,x=_):S=_+1}return x},c=(m,O,y,b)=>{let v=!1;const S=cf(O);switch(m){case 0:break;case y.length:v=!0;for(let k=0;ky[w]),_=Array(2);_[0]=k[0]+1,_[1]=y.length-m-_[0];for(let w=0;w<=x[0];w++)switch(!0){case w=x[1];w--)switch(!0){case w>x[1]:_[1]-=O[w].length;break;case w===x[1]:x[1]>x[0]&&(S[w]=O[w].slice(-_[1])),x[1]===x[0]&&(S[w]=S[w].concat(O[w].slice(-_[1])));break}for(let w=x[0]+1;wx:S[w]=[];break}}break}return{truncated:v,truncatedArray:S}},d=(m,O)=>{const y=c(m,this._defaultStringData,this._nodeDataIndexes,O),b=y.truncatedArray;return this.checkFit(b)},h=u(0,this._nodeDataIndexes.length,d,o,this._nodeDataIndexes.length);var p=c(h,this._defaultStringData,this._nodeDataIndexes,o);s=p.truncated,l=p.truncatedArray,l=IM(l,this._options,!0);for(let m=0;m{this.ref&&this.setState(this.initialState)},this.state=this.initialState}get _ref(){return this.ref}get initialState(){return{isTruncated:!1,needsSecondRender:!0,truncatedElement:void 0,truncatedText:void 0}}componentDidMount(){const e=this.props,n=e.children,i=e.makeStyles;if(i==null||i(),n){var r;this.checkChildren();const o=Wl(n);this._text=o||void 0,this.truncate(),this._debounced=nb(this.update,this.props.debounce,{leading:!0,trailing:!0}),this._prevWidth=(r=Xt(this.ref))===null||r===void 0?void 0:r.width,this._resizeListener=new ResizeObserver(s=>{requestAnimationFrame(()=>{for(const a of s){const l=a.contentRect.width;this._prevWidth!==l&&(this._prevWidth=l,this.props.debounce===0?this.update():this._debounced())}})}),this._resizeListener.observe(this.ref)}}componentWillUnmount(){this._resizeListener&&this._resizeListener.disconnect(),this._debounced&&this._debounced.cancel()}componentDidUpdate(e){const n=this.props,i=n.children,r=n.onUpdate,o=n.makeStyles;o==null||o();const s=this.state,a=s.isTruncated,l=s.needsSecondRender,u=s.truncatedText;if(i){if(e!==this.props){if(e.children!==this.props.children){this.checkChildren();const c=Wl(i);this._text=c||void 0}this.setState(this.initialState);return}!l&&(a||this._wasTruncated)?(r==null||r(a,u),this._wasTruncated=a):this.truncate()}}checkChildren(){Ge(!(()=>{let e=!1;const n=Wl(this.props.children);return z.Children.forEach(n.props.children,i=>{i.props&&z.Children.forEach(i.props.children,r=>{r.props&&(e=!0)})}),e})(),"[TruncateText] Some children are too deep in the node tree and will not render.")}truncate(){if(this.state.needsSecondRender)if(ln){var e;const r=SZ(this._stage,{...this.props,parent:this.ref?this.ref:void 0,lineHeight:(e=this.props.styles)===null||e===void 0?void 0:e.lineHeight});if(r){const o=this.renderChildren(r.isTruncated,r.data,r.constraints.width);this.setState({needsSecondRender:!1,isTruncated:r.isTruncated,truncatedElement:o,truncatedText:r.text})}}else{var n,i;const r=(n=this.ref)!==null&&n!==void 0&&n.textContent?(i=this.ref)===null||i===void 0?void 0:i.textContent:void 0;this.setState({needsSecondRender:!1,isTruncated:!1,truncatedElement:this._text,truncatedText:r})}}renderChildren(e,n,i){var r;if(!e)return this._text;const o=[];for(let a=0;aa);return this._text.props?$t(this._text,this._text.props,s):s}render(){var e;const n=this.state.truncatedElement,i=this.props.children;return C("span",{css:(e=this.props.styles)===null||e===void 0?void 0:e.truncateText,ref:r=>{this.ref=r}},i&&(n?null:C("span",{ref:r=>{this._stage=r}},Wl(i))),n)}},Wa.displayName="TruncateText",Wa.componentId="TruncateText",Wa.allowedProps=xZ,Wa.propTypes=kZ,Wa.defaultProps={maxLines:1,ellipsis:"…",truncate:"character",position:"end",ignore:[" ",".",","],debounce:0},Wa))||Ju)||Ju)||Ju);const EZ=(t,e,n)=>{const i=e.isWithinText,r=e.renderIcon,o=e.iconPlacement,s=e.color,a=n.containsTruncateText,l=n.hasVisibleChildren,u=s==="link-inverse",c={boxSizing:"border-box",fontFamily:t.fontFamily,fontWeight:t.fontWeight,transition:"outline-color 0.2s",verticalAlign:"baseline",outlineColor:"transparent",outlineWidth:t.focusOutlineWidth,outlineStyle:t.focusOutlineStyle,borderRadius:t.focusOutlineBorderRadius,outlineOffset:"0.25rem",...r&&a&&l&&{alignItems:"center"},"&:focus":{outlineColor:t.focusOutlineColor},"&[aria-disabled]":{cursor:"not-allowed",pointerEvents:"none",opacity:"0.5"},"&::-moz-focus-inner":{border:0}},d={...c,cursor:"pointer",color:t.color,textDecoration:i?t.textDecorationWithinText:t.textDecorationOutsideText,"&:focus":{color:t.color,outlineColor:t.focusOutlineColor},"&:hover, &:active":{color:t.hoverColor,textDecoration:i?t.hoverTextDecorationWithinText:t.hoverTextDecorationOutsideText}},h={appearance:"none",userSelect:"text",background:"none",border:"none",cursor:"pointer",fontSize:"1em",margin:0,padding:0,textAlign:"inherit"},p={color:t.colorInverse,"&:focus":{outlineColor:t.focusInverseIconOutlineColor},"&:hover, &:focus, &:active":{color:t.colorInverse}};return{link:{label:"link",...c,"&:is(a), &:is(button)":d,"&:-webkit-any(a), &:-webkit-any(button)":d,"&:is(button)":h,"&:-webkit-any(button)":h,...u&&{...p,"&:is(a):link, &:is(a):visited, &:is(button)":p,"&:-webkit-any(a):link, &:-webkit-any(a):visited, &:-webkit-any(button)":p}},icon:{label:"icon",...r&&{fontSize:t.iconSize,boxSizing:"border-box",paddingInlineStart:o==="start"?0:t.iconPlusTextMargin,paddingInlineEnd:o==="start"?t.iconPlusTextMargin:0}}}},CZ=t=>{const e=t.colors,n=t.borders,i=t.typography,r=t.spacing,o=t.key,s={canvas:{color:t["ic-link-color"],focusOutlineColor:t["ic-brand-primary"],hoverColor:Xo(t["ic-link-color"],10)},"canvas-high-contrast":{textDecorationOutsideText:"underline",hoverTextDecorationOutsideText:"none"}};return{...{fontFamily:i==null?void 0:i.fontFamily,fontWeight:i==null?void 0:i.fontWeightNormal,color:e==null?void 0:e.textLink,textDecorationWithinText:"underline",hoverTextDecorationWithinText:"none",textDecorationOutsideText:"none",hoverTextDecorationOutsideText:"underline",focusOutlineWidth:n==null?void 0:n.widthMedium,focusOutlineColor:e==null?void 0:e.borderBrand,focusOutlineStyle:n==null?void 0:n.style,focusOutlineBorderRadius:n==null?void 0:n.radiusSmall,hoverColor:Xo(e==null?void 0:e.textLink,10),colorInverse:e==null?void 0:e.textLight,focusInverseOutlineColor:e==null?void 0:e.borderLightest,focusInverseIconOutlineColor:e==null?void 0:e.borderLightest,iconSize:"1.125em",iconPlusTextMargin:r==null?void 0:r.xxSmall},...s[o]}},TZ={children:f.node.isRequired,href:f.string,color:f.oneOf(["link","link-inverse"]),elementRef:f.func,as:f.elementType,role:f.string,forceButtonRole:f.bool,interaction:f.oneOf(["enabled","disabled"]),margin:ct.spacing,renderIcon:f.oneOfType([f.func,f.node]),iconPlacement:f.oneOf(["start","end"]),display:f.oneOf(["auto","block","inline-block","flex","inline-flex"]),isWithinText:f.bool,onBlur:f.func,onClick:f.func,onFocus:f.func,onMouseEnter:f.func},PZ=["children","href","color","elementRef","as","role","forceButtonRole","interaction","margin","renderIcon","iconPlacement","display","isWithinText","onBlur","onClick","onFocus","onMouseEnter"],AZ=["children","onClick","onMouseEnter","color","href","margin","renderIcon","iconPlacement","isWithinText"];var q2,Y2,xm,Va;let Mi=(q2=de(EZ,CZ),Y2=Le(),q2(xm=Y2(xm=(Va=class $M extends T.Component{constructor(...e){super(...e),this.state={hasFocus:!1},this.ref=null,this.makeStyleProps=()=>({containsTruncateText:this.containsTruncateText,hasVisibleChildren:this.hasVisibleChildren}),this.handleElementRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.handleClick=n=>{const i=this.props.onClick;this.interaction==="disabled"?(n.preventDefault(),n.stopPropagation()):typeof i=="function"&&i(n)},this.handleFocus=n=>{this.setState({hasFocus:!0}),typeof this.props.onFocus=="function"&&this.props.onFocus(n)},this.handleBlur=n=>{this.setState({hasFocus:!1}),typeof this.props.onBlur=="function"&&this.props.onBlur(n)}}get _link(){return this.ref}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.makeStyleProps())}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.makeStyleProps())}get containsTruncateText(){let e=!1;return z.Children.forEach(this.props.children,n=>{n&&Me(n,["TruncateText"])&&(e=!0)}),Ne(!e||this.props.display===void 0,"[Link] Using the display property with TruncateText may cause layout issues."),e}get display(){if(this.props.display)return this.props.display;const e=this.containsTruncateText;return this.props.renderIcon?e?"inline-flex":"inline-block":e?"block":"auto"}get interaction(){return Go({props:this.props,interactionTypes:["disabled"]})}get element(){return oi($M,this.props)}get focused(){return Co(this.ref)}get focusable(){return Hk(this.ref)}get hasVisibleChildren(){return tb(this.props.children)}get role(){const e=this.props,n=e.role,i=e.forceButtonRole,r=e.onClick;return i&&r&&this.element!=="button"?"button":n}focus(){this.ref&&this.ref.focus()}renderIcon(){var e;return Ne(this.props.display===void 0,"[Link] Using the display property with an icon may cause layout issues."),C("span",{css:(e=this.props.styles)===null||e===void 0?void 0:e.icon},ot(this.props.renderIcon))}render(){var e;const n=this.props,i=n.children;n.onClick;const r=n.onMouseEnter;n.color;const o=n.href,s=n.margin,a=n.renderIcon,l=n.iconPlacement;n.isWithinText;const u=Ie(n,AZ),d=this.interaction==="disabled",h=this.element==="button"||this.element==="input"?"button":void 0,p=this.role==="button"&&!d?0:void 0;return C(be,Object.assign({},It(u),{elementRef:this.handleElementRef,as:this.element,display:this.display,margin:s,href:o,onMouseEnter:r,onClick:this.handleClick,onFocus:this.handleFocus,onBlur:this.handleBlur,"aria-disabled":d?"true":void 0,role:this.role,type:h,tabIndex:p,css:(e=this.props.styles)===null||e===void 0?void 0:e.link}),a&&l==="start"&&this.renderIcon(),i,a&&l==="end"&&this.renderIcon())}},Va.displayName="Link",Va.componentId="Link",Va.propTypes=TZ,Va.allowedProps=PZ,Va.defaultProps={interaction:void 0,color:"link",iconPlacement:"start",isWithinText:!0,forceButtonRole:!0},Va))||xm)||xm);const RZ={children:f.node.isRequired,href:f.string,onClick:f.func,onMouseEnter:f.func,size:f.oneOf(["small","medium","large"]),renderIcon:f.oneOfType([f.node,f.func]),iconPlacement:f.oneOf(["start","end"])},IZ=["children","href","iconPlacement","onClick","onMouseEnter","renderIcon","size"];var G2,K2,ja;let LM=(G2=Le(),G2(K2=(ja=class NM extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{this.ref=n}}render(){const e=this.props,n=e.children,i=e.href,r=e.renderIcon,o=e.iconPlacement,s=e.onClick,a=e.onMouseEnter,l=Re(this.props,NM.allowedProps);return z.createElement(Mi,Object.assign({},l,{href:i,renderIcon:r,iconPlacement:o,onClick:s,onMouseEnter:a,isWithinText:!1,elementRef:this.handleRef}),z.createElement(_Z,null,n))}},ja.displayName="BreadcrumbLink",ja.componentId="Breadcrumb.Link",ja.propTypes=RZ,ja.allowedProps=IZ,ja.defaultProps={},ja))||K2);const $Z=(t,e)=>{const n=e.size,i={small:{fontSize:t.smallFontSize,paddingInlineEnd:`calc(${t.smallSeparatorFontSize} * 2)`,paddingInlineStart:0},medium:{fontSize:t.mediumFontSize,paddingInlineEnd:`calc(${t.mediumSeparatorFontSize} * 2)`,paddingInlineStart:0},large:{fontSize:t.largeFontSize,paddingInlineEnd:`calc(${t.largeSeparatorFontSize} * 2)`,paddingInlineStart:0}},r={small:{fontSize:t.smallSeparatorFontSize,insetInlineEnd:`calc(${t.smallSeparatorFontSize} / 2)`,insetInlineStart:"auto",marginTop:`calc(-1 * (${t.smallSeparatorFontSize} / 2))`},medium:{fontSize:t.mediumSeparatorFontSize,insetInlineEnd:`calc(${t.mediumSeparatorFontSize} / 2)`,insetInlineStart:"auto",marginTop:`calc(-1 * (${t.mediumSeparatorFontSize} / 2))`},large:{fontSize:t.largeSeparatorFontSize,insetInlineEnd:`calc(${t.largeSeparatorFontSize} / 2)`,insetInlineStart:"auto",marginTop:`calc(-1 * (${t.largeSeparatorFontSize} / 2))`}};return{breadcrumb:{label:"breadcrumb",fontFamily:t.fontFamily,margin:0,padding:0,listStyleType:"none",overflow:"visible",display:"flex",alignItems:"center"},crumb:{label:"breadcrumb__crumb",boxSizing:"border-box",position:"relative",...i[n],"&:last-child":{paddingInlineEnd:0}},separator:{label:"breadcrumb__separator",boxSizing:"border-box",position:"absolute",top:"50%",color:t.separatorColor,...r[n]}}},LZ=t=>{const e=t.colors,n=t.typography;return{...{fontFamily:n==null?void 0:n.fontFamily,separatorColor:e==null?void 0:e.borderDark,smallSeparatorFontSize:"0.5rem",smallFontSize:n==null?void 0:n.fontSizeSmall,mediumSeparatorFontSize:"0.75rem",mediumFontSize:n==null?void 0:n.fontSizeMedium,largeSeparatorFontSize:"1rem",largeFontSize:n==null?void 0:n.fontSizeLarge}}},NZ={children:pt.oneOf([LM]),label:f.string.isRequired,size:f.oneOf(["small","medium","large"]),margin:ct.spacing},MZ=["children","label","margin","size"];var J2,eT,_m,ws;let DZ=(J2=de($Z,LZ),eT=Le(),J2(_m=eT(_m=(ws=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{this.ref=n}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}renderChildren(){const e=this.props,n=e.styles,i=e.children,r=z.Children.count(i),o={maxWidth:`${Math.floor(100/r)}%`};return z.Children.map(i,(s,a)=>C("li",{css:n==null?void 0:n.crumb,style:o},s,a{const n=e.alignContent,i=e.size,r={top:{alignItems:"flex-start"},center:{alignItems:"center"}},o={display:"flex",background:t.background,margin:0,padding:0,fontFamily:t.fontFamily,...r[n]},s={color:t.color,margin:0,padding:0};return{byline:{label:"byline",...o,"&:is(figure)":o,"&:-webkit-any(figure)":o},figure:{label:"byline__figure",marginInlineStart:0,marginInlineEnd:t.figureMargin},caption:{label:"byline__caption",...s,"&:is(figcaption)":s,"&:-webkit-any(figcaption)":s},title:{label:"byline__title",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",display:"block",margin:t.titleMargin,fontSize:t.titleFontSize,fontWeight:t.titleFontWeight,lineHeight:t.titleLineHeight},description:{label:"byline__description",fontSize:t.descriptionFontSize,lineHeight:t.descriptionLineHeight,fontWeight:t.descriptionFontWeight},maxWidth:i&&t[i]}},QZ=t=>{const e=t.colors,n=t.spacing,i=t.typography,r=t.breakpoints,o=t.key,s={canvas:{color:t["ic-brand-font-color-dark"]}};return{...{fontFamily:i==null?void 0:i.fontFamily,background:e==null?void 0:e.backgroundLightest,color:e==null?void 0:e.textDarkest,figureMargin:n==null?void 0:n.small,titleMargin:`0 0 ${n==null?void 0:n.xSmall} 0`,titleFontSize:i==null?void 0:i.fontSizeLarge,titleFontWeight:i==null?void 0:i.fontWeightNormal,titleLineHeight:i==null?void 0:i.lineHeightFit,descriptionFontSize:i==null?void 0:i.fontSizeMedium,descriptionFontWeight:i==null?void 0:i.fontWeightNormal,descriptionLineHeight:i==null?void 0:i.lineHeightCondensed,small:r==null?void 0:r.small,medium:r==null?void 0:r.medium,large:r==null?void 0:r.large},...s[o]}},FZ={children:f.node.isRequired,title:f.node,description:f.oneOfType([f.string,f.node]),alignContent:f.oneOf(["top","center"]),margin:ct.spacing,size:f.oneOf(["small","medium","large"]),elementRef:f.func},zZ=["alignContent","children","description","elementRef","margin","size","title"];var tT,nT,Xa;let HZ=(tT=de(BZ,QZ),tT(nT=(Xa=class Hv extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){var e,n,i,r,o,s;const a=be.omitViewProps(Re(this.props,Hv.allowedProps),Hv);return C(be,Object.assign({},a,{elementRef:this.handleRef,css:(e=this.props.styles)===null||e===void 0?void 0:e.byline,as:"figure",margin:this.props.margin,maxWidth:(n=this.props.styles)===null||n===void 0?void 0:n.maxWidth}),C("div",{css:(i=this.props.styles)===null||i===void 0?void 0:i.figure},this.props.children),C("figcaption",{css:(r=this.props.styles)===null||r===void 0?void 0:r.caption},this.props.title&&C("span",{css:(o=this.props.styles)===null||o===void 0?void 0:o.title},this.props.title),this.props.description&&C("div",{css:(s=this.props.styles)===null||s===void 0?void 0:s.description},this.props.description)))}},Xa.displayName="Byline",Xa.componentId="Byline",Xa.propTypes=FZ,Xa.allowedProps=zZ,Xa.defaultProps={alignContent:"center"},Xa))||nT);const UZ=(t,e)=>{const n=e.vAlign,i=e.textAlign,r=e.rowSpacing,o=e.colSpacing,s=e.isLastRow,a=e.isLastCol,l=e.startAt,u=e.visualDebug,c={small:{marginBottom:t.spacingSmall},medium:{marginBottom:t.spacingMedium},large:{marginBottom:t.spacingLarge},none:{marginBottom:0}},d=()=>{const x={small:{paddingLeft:`calc(${t.spacingSmall} / 2)`,paddingRight:`calc(${t.spacingSmall} / 2)`},medium:{paddingLeft:`calc(${t.spacingMedium} / 2)`,paddingRight:`calc(${t.spacingMedium} / 2)`},large:{paddingLeft:`calc(${t.spacingLarge} / 2)`,paddingRight:`calc(${t.spacingLarge} / 2)`},none:{}},_={top:{alignSelf:"flex-start"},middle:{alignSelf:"center"},bottom:{alignSelf:"flex-end"},stretch:{alignSelf:"stretch"}},w={start:{textAlign:"start"},end:{textAlign:"end"},center:{textAlign:"center"},inherit:{textAlign:"inherit"}};return{flexGrow:1,flexShrink:1,flexBasis:"0%",marginBottom:0,boxSizing:"border-box",...o&&x[o],...n&&_[n],...i&&w[i]}},h=()=>{const x=["small","medium","large","x-large",null];return x.slice(x.indexOf(l))},p=x=>h().includes(x),m=x=>{let _=e.width;if(_)return _&&typeof _=="object"&&(_=_[x==="x-large"?"xLarge":x]),_},O=x=>{let _=e.offset;if(_)return _&&typeof _=="object"&&(_=_[x==="x-large"?"xLarge":x]),_},y=(x="1")=>{switch(x){case"auto":return{flexGrow:0,flexShrink:0,flexBasis:"auto"};case 12:return{flex:"0 0 100%"};default:return{flexGrow:0,flexShrink:0,flexBasis:`calc(${x} / 12 * 99.999%)`,maxWidth:`calc(${x} / 12 * 99.999%)`}}},b=(x="1")=>{switch(x){case"auto":case 12:return{};default:return{marginInlineStart:`calc(${x} / 12 * 99.999%)`,marginInlineEnd:0}}},v=x=>l&&l===x?{...d()}:{},S=x=>{const _=m(x),w=O(x);return p(x)?{..._&&y(_),...w&&b(w)}:{}},k=x=>({...v(x),...S(x)});return{gridCol:{label:"gridCol",display:"block",boxSizing:"border-box",textAlign:"inherit",minWidth:"0.0625rem",...r&&c[r],...s&&a&&{marginBottom:0},...k("small"),[`@media screen and (${t.mediumMin})`]:{...k("medium")},[`@media screen and (${t.largeMin})`]:{...k("large")},[`@media screen and (${t.xLargeMin})`]:{...k("x-large")},...u&&{outline:"0.0625rem dashed red"}}}},WZ=t=>{const e=t.spacing,n=t.media;return{...{spacingSmall:e==null?void 0:e.small,spacingMedium:e==null?void 0:e.medium,spacingLarge:e==null?void 0:e.large,...n}}},no=f.oneOfType([f.number,f.oneOf(["auto"])]),VZ={children:f.node,colSpacing:f.oneOf(["none","small","medium","large"]),rowSpacing:f.oneOf(["none","small","medium","large"]),textAlign:f.oneOf(["start","end","center","inherit"]),hAlign:f.oneOf(["start","center","end","space-around","space-between"]),vAlign:f.oneOf(["top","middle","bottom","stretch"]),startAt:f.oneOf(["small","medium","large","x-large",null]),visualDebug:f.bool,width:f.oneOfType([no,f.shape({small:no,medium:no,large:no,xLarge:no})]),offset:f.oneOfType([no,f.shape({small:no,medium:no,large:no,xLarge:no})]),isLastRow:f.bool,isLastCol:f.bool,elementRef:f.func},jZ=["children","colSpacing","rowSpacing","textAlign","hAlign","vAlign","startAt","visualDebug","width","offset","isLastRow","isLastCol","elementRef"];var iT,rT,Za;let Yk=(iT=de(UZ,WZ),iT(rT=(Za=class MM extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}widthCheck(){const e=this.props.width;let n=!1;e&&(typeof e=="number"&&e<=0&&(n=!0),typeof e=="object"&&Object.keys(e).forEach(i=>{typeof e[i]=="number"&&e[i]<=0&&(n=!0)})),n&&Ne(!1,"Col width must be positive!")}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n),this.widthCheck()}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n),this.widthCheck()}render(){const e=this.props,n=e.children,i=e.styles,r=Re(this.props,MM.allowedProps);return C("span",Object.assign({},r,{ref:this.handleRef,css:i==null?void 0:i.gridCol}),n)}},Za.displayName="GridCol",Za.componentId="Grid.Col",Za.propTypes=VZ,Za.allowedProps=jZ,Za.defaultProps={textAlign:"inherit",children:null,isLastCol:!1,isLastRow:!1},Za))||rT);const XZ=(t,e)=>{const n=e.hAlign,i=e.vAlign,r=e.rowSpacing,o=e.colSpacing,s=e.isLastRow,a=e.startAt,l=e.visualDebug,u=()=>{const d={center:{justifyContent:"center"},start:{justifyContent:"flex-start"},end:{justifyContent:"flex-end"},"space-around":{justifyContent:"space-around"},"space-between":{justifyContent:"space-between"}},h={top:{alignItems:"flex-start"},middle:{alignItems:"center"},bottom:{alignItems:"flex-end"},stretch:{alignItems:"stretch"}},p={small:{margin:`0 calc(-1 * ${t.spacingSmall} / 2)`},medium:{margin:`0 calc(-1 * ${t.spacingMedium} / 2)`},large:{margin:`0 calc(-1 * ${t.spacingLarge} / 2)`},none:{}},m={small:{marginBottom:t.spacingSmall},medium:{marginBottom:t.spacingMedium},large:{marginBottom:t.spacingLarge},none:{marginBottom:0}};return{display:"flex",flexFlow:"row nowrap",...n&&d[n],...i&&h[i],...o&&p[o],...r&&m[r],...s&&{marginBottom:0}}},c=d=>a&&a===d?{...u()}:{};return{gridRow:{label:"gridRow",display:"block",boxSizing:"border-box",...c("small"),[`@media screen and (${t.mediumMin})`]:{...c("medium")},[`@media screen and (${t.largeMin})`]:{...c("large")},[`@media screen and (${t.xLargeMin})`]:{...c("x-large")},...l&&{outline:"0.0625rem dashed blue"}}}},ZZ=t=>{const e=t.spacing,n=t.media;return{...{spacingSmall:e==null?void 0:e.small,spacingMedium:e==null?void 0:e.medium,spacingLarge:e==null?void 0:e.large,...n}}},qZ={children:pt.oneOf([Yk,Vi]),rowSpacing:f.oneOf(["none","small","medium","large"]),colSpacing:f.oneOf(["none","small","medium","large"]),hAlign:f.oneOf(["start","center","end","space-around","space-between"]),vAlign:f.oneOf(["top","middle","bottom","stretch"]),startAt:f.oneOf(["small","medium","large","x-large",null]),visualDebug:f.bool,isLastRow:f.bool},YZ=["children","rowSpacing","colSpacing","hAlign","vAlign","startAt","visualDebug","isLastRow"],GZ=["styles","makeStyles"],KZ=["styles"];var oT,sT,qa;let Uv=(oT=de(XZ,ZZ),oT(sT=(qa=class Wv extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{this.ref=n}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}renderChildren(){const e=this.props;e.styles,e.makeStyles;const n=Ie(e,GZ);return T.Children.map(this.props.children,(i,r)=>Me(i,[Yk])?$t(i,{...cs(n,Wv.allowedProps),...i.props,isLastRow:n.isLastRow,isLastCol:r+1===T.Children.count(this.props.children)}):i)}render(){const e=this.props,n=e.styles,i=Ie(e,KZ),r=Re(i,Wv.allowedProps);return C("span",Object.assign({},r,{css:n==null?void 0:n.gridRow,ref:this.handleRef}),this.renderChildren())}},qa.displayName="GridRow",qa.componentId="Grid.Row",qa.propTypes=qZ,qa.allowedProps=YZ,qa.defaultProps={children:null,isLastRow:!1},qa))||sT);const JZ=(t,e)=>{const n=e.startAt,i=e.visualDebug,r=o=>n&&n===o?{boxSizing:"border-box"}:{};return{grid:{label:"grid",display:"block",...r("small"),[`@media screen and (${t.mediumMin})`]:{...r("medium")},[`@media screen and (${t.largeMin})`]:{...r("large")},[`@media screen and (${t.xLargeMin})`]:{...r("x-large")},...i&&{outline:"0.0625rem dashed red"}}}},eq=t=>{const e=t.spacing,n=t.media;return{...{spacingSmall:e==null?void 0:e.small,spacingMedium:e==null?void 0:e.medium,spacingLarge:e==null?void 0:e.large,...n}}},tq={children:pt.oneOf([Uv,Vi]),colSpacing:f.oneOf(["none","small","medium","large"]),rowSpacing:f.oneOf(["none","small","medium","large"]),hAlign:f.oneOf(["start","center","end","space-around","space-between"]),vAlign:f.oneOf(["top","middle","bottom","stretch"]),startAt:f.oneOf(["small","medium","large","x-large",null]),visualDebug:f.bool},nq=["children","colSpacing","rowSpacing","hAlign","vAlign","startAt","visualDebug"],iq=["styles","makeStyles"],rq=["styles"];var aT,lT,Do;let qn=(aT=de(JZ,eq),aT(lT=(Do=class Vv extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{this.ref=n}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}renderChildren(){const e=this.props;e.styles,e.makeStyles;const n=Ie(e,iq),i=T.Children.toArray(this.props.children);return i.map((r,o)=>Me(r,[Uv])?$t(r,{...cs(n,Vv.allowedProps),...r.props,isLastRow:o+1===i.length}):r)}render(){const e=this.props,n=e.styles,i=Ie(e,rq),r=Re(i,Vv.allowedProps);return C("span",Object.assign({},r,{css:n==null?void 0:n.grid,ref:this.handleRef}),this.renderChildren())}},Do.displayName="Grid",Do.componentId="Grid",Do.propTypes=tq,Do.allowedProps=nq,Do.defaultProps={colSpacing:"medium",rowSpacing:"medium",hAlign:"start",startAt:"small",vAlign:"top",visualDebug:!1,children:null},Do.Row=Uv,Do.Col=Yk,Do))||lT);const oq=(t,e)=>{const n=e.children,r={all:"initial",display:"block",...tb(n)&&{color:t.color,fontFamily:t.fontFamily,fontWeight:t.fontWeight,fontSize:t.fontSize,lineHeight:t.lineHeight,margin:0,textAlign:"inherit"}};return{formFieldLabel:{label:"formFieldLabel",...r,"&:is(label)":r,"&:-webkit-any(label)":r}}},sq=t=>{const e=t.colors,n=t.typography,i=t.key,r={canvas:{color:t["ic-brand-font-color-dark"]}};return{...{color:e==null?void 0:e.textDarkest,fontFamily:n==null?void 0:n.fontFamily,fontWeight:n==null?void 0:n.fontWeightBold,fontSize:n==null?void 0:n.fontSizeMedium,lineHeight:n==null?void 0:n.lineHeightFit},...r[i]}},aq={children:f.node.isRequired,as:f.elementType},lq=["as","children"];var uT,cT,Ya;let uq=(uT=de(oq,sq),uT(cT=(Ya=class jv extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{this.ref=n}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){const e=oi(jv,this.props),n=this.props,i=n.styles,r=n.children;return C(e,Object.assign({},Re(this.props,jv.allowedProps),{css:i==null?void 0:i.formFieldLabel,ref:this.handleRef}),r)}},Ya.displayName="FormFieldLabel",Ya.componentId="FormFieldLabel",Ya.propTypes=aq,Ya.allowedProps=lq,Ya.defaultProps={as:"span"},Ya))||cT);const cq=(t,e)=>{const n=e.variant,i={hint:{color:t.colorHint},error:{color:t.colorError},success:{color:t.colorSuccess},"screenreader-only":{}};return{formFieldMessage:{label:"formFieldMessage",fontFamily:t.fontFamily,fontWeight:t.fontWeight,fontSize:t.fontSize,lineHeight:t.lineHeight,display:"block",...i[n]}}},dq=t=>{const e=t.colors,n=t.typography,i=t.key,r={canvas:{colorHint:t["ic-brand-font-color-dark"]}};return{...{colorHint:e==null?void 0:e.textDarkest,colorError:e==null?void 0:e.textDanger,colorSuccess:e==null?void 0:e.textSuccess,fontFamily:n==null?void 0:n.fontFamily,fontWeight:n==null?void 0:n.fontWeightNormal,fontSize:n==null?void 0:n.fontSizeSmall,lineHeight:n==null?void 0:n.lineHeight},...r[i]}},DM=f.oneOf(["error","hint","success","screenreader-only"]),BM=f.node,ds={message:f.shape({type:DM,text:BM})},hq={variant:DM,children:BM},fq=["variant","children"];var dT,hT,Ga;let pq=(dT=de(cq,dq),dT(hT=(Ga=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{this.ref=n}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){const e=this.props,n=e.children,i=e.styles;return this.props.variant!=="screenreader-only"?C("span",{css:i==null?void 0:i.formFieldMessage,ref:this.handleRef},n):C(Vi,{elementRef:this.handleRef},n)}},Ga.displayName="FormFieldMessage",Ga.componentId="FormFieldMessage",Ga.propTypes=hq,Ga.allowedProps=fq,Ga.defaultProps={variant:"hint"},Ga))||hT);const mq=t=>({formFieldMessages:{label:"formFieldMessages",padding:0,display:"block",margin:`calc(-1 * ${t.topMargin}) 0 0 0`},message:{label:"formFieldMessages__message",display:"block"}}),gq=t=>{const e=t.spacing;return{...{topMargin:e==null?void 0:e.xxSmall}}},Oq={messages:f.arrayOf(ds.message)},bq=["messages"];var fT,pT,Ka;let Xv=(fT=de(mq,gq),fT(pT=(Ka=class QM extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{this.ref=n}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){const e=this.props,n=e.messages,i=e.styles;return n&&n.length>0?C("span",Object.assign({css:i==null?void 0:i.formFieldMessages},Re(this.props,QM.allowedProps),{ref:this.handleRef}),n.map((r,o)=>C("span",{key:`error${o}`,css:i==null?void 0:i.message},C(pq,{variant:r.type},r.text)))):null}},Ka.displayName="FormFieldMessages",Ka.componentId="FormFieldMessages",Ka.propTypes=Oq,Ka.allowedProps=bq,Ka.defaultProps={},Ka))||pT);const yq=(t,e)=>({formFieldLayout:{label:"formFieldLayout",all:"initial",border:"0",padding:"0",margin:"0",minWidth:"0",direction:"inherit",textAlign:"start",opacity:"inherit",display:"block",width:"100%",...e.inline&&{display:"inline-block",verticalAlign:"middle",width:"auto"}}}),vq={label:f.node.isRequired,id:f.string,as:f.elementType,messages:f.arrayOf(ds.message),messagesId:f.string,children:f.node,inline:f.bool,layout:f.oneOf(["stacked","inline"]),labelAlign:f.oneOf(["start","end"]),vAlign:f.oneOf(["top","middle","bottom"]),width:f.string,inputContainerRef:f.func,elementRef:f.func},Sq=["label","id","as","messages","messagesId","children","inline","layout","labelAlign","width","inputContainerRef","elementRef"],wq=["makeStyles","styles"];var mT,gT,Em,Ja;let L0=(mT=Ht(),gT=de(yq,null),mT(Em=gT(Em=(Ja=class Zv extends T.Component{constructor(e){super(e),this._messagesId=void 0,this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.handleInputContainerRef=n=>{typeof this.props.inputContainerRef=="function"&&this.props.inputContainerRef(n)},this._messagesId=e.messagesId||e.deterministicId(),Ge(typeof e.width<"u"||!e.inline||e.layout!=="inline",`[FormFieldLayout] The 'inline' prop is true, and the 'layout' is set to 'inline'. + This will cause a layout issue in Internet Explorer 11 unless you also add a value for the 'width' prop.`)}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}get hasVisibleLabel(){return this.props.label&&tb(this.props.label)}get hasMessages(){return this.props.messages&&this.props.messages.length>0}get elementType(){return oi(Zv,this.props)}get inlineContainerAndLabel(){return this.props.inline&&this.props.layout==="inline"}renderLabel(){return this.hasVisibleLabel?C(qn.Col,{textAlign:this.props.labelAlign,width:this.inlineContainerAndLabel?"auto":3},C(uq,{"aria-hidden":this.elementType==="fieldset"?"true":void 0},this.props.label)):this.elementType!=="fieldset"?this.props.label:null}renderLegend(){return C(Vi,{as:"legend"},this.props.label,this.hasMessages&&C(Xv,{messages:this.props.messages}))}renderVisibleMessages(){return this.hasMessages?C(qn.Row,null,C(qn.Col,{offset:this.inlineContainerAndLabel?void 0:3,textAlign:this.inlineContainerAndLabel?"end":void 0},C(Xv,{id:this._messagesId,messages:this.props.messages}))):null}render(){const e=this.elementType,n=this.props;n.makeStyles;const i=n.styles,r=Ie(n,wq),o=r.width,s=r.layout,a=r.children;return C(e,Object.assign({},Re(r,[...Zv.allowedProps,...qn.allowedProps]),{css:i==null?void 0:i.formFieldLayout,style:{width:o},"aria-describedby":this.hasMessages?this._messagesId:void 0,ref:this.handleRef}),this.elementType==="fieldset"&&this.renderLegend(),C(qn,Object.assign({rowSpacing:"small",colSpacing:"small",startAt:s==="inline"&&this.hasVisibleLabel?"medium":null},cs(r,qn.allowedProps)),C(qn.Row,null,this.renderLabel(),C(qn.Col,{width:this.inlineContainerAndLabel?"auto":void 0,elementRef:this.handleInputContainerRef},a)),this.renderVisibleMessages()))}},Ja.displayName="FormFieldLayout",Ja.componentId="FormFieldLayout",Ja.propTypes=vq,Ja.allowedProps=Sq,Ja.defaultProps={inline:!1,layout:"stacked",as:"label",labelAlign:"end"},Ja))||Em)||Em);const kq={label:f.node.isRequired,id:f.string.isRequired,messages:f.arrayOf(ds.message),messagesId:f.string,children:f.node,inline:f.bool,layout:f.oneOf(["stacked","inline"]),labelAlign:f.oneOf(["start","end"]),vAlign:f.oneOf(["top","middle","bottom"]),width:f.string,inputContainerRef:f.func,elementRef:f.func},xq=["label","id","messages","messagesId","children","inline","layout","labelAlign","vAlign","width","inputContainerRef","elementRef"];class xa extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return z.createElement(L0,Object.assign({},Re(this.props,xa.allowedProps),cs(this.props,L0.allowedProps),{label:this.props.label,vAlign:this.props.vAlign,as:"label",htmlFor:this.props.id,elementRef:this.handleRef}))}}xa.displayName="FormField";xa.componentId="FormField";xa.propTypes=kq;xa.allowedProps=xq;xa.defaultProps={inline:!1,layout:"stacked",labelAlign:"end",vAlign:"middle"};const _q=(t,e,n)=>{const i=e.disabled,r=n.invalid;return{formFieldGroup:{label:"formFieldGroup",border:`${t.borderWidth} ${t.borderStyle} ${t.borderColor}`,borderRadius:t.borderRadius,display:"block",...r&&{borderColor:t.errorBorderColor,padding:t.errorFieldsPadding},...i&&{opacity:.6,cursor:"not-allowed",pointerEvents:"none"}}}},Eq=t=>{const e=t.borders,n=t.colors,i=t.spacing;return{...{borderWidth:e==null?void 0:e.widthSmall,borderStyle:e==null?void 0:e.style,borderColor:"transparent",borderRadius:e==null?void 0:e.radiusMedium,errorBorderColor:n==null?void 0:n.borderDanger,errorFieldsPadding:i==null?void 0:i.xSmall}}},Cq={description:f.node.isRequired,as:f.elementType,messages:f.arrayOf(ds.message),messagesId:f.string,disabled:f.bool,children:f.node,layout:f.oneOf(["stacked","columns","inline"]),rowSpacing:f.oneOf(["none","small","medium","large"]),colSpacing:f.oneOf(["none","small","medium","large"]),vAlign:f.oneOf(["top","middle","bottom"]),startAt:f.oneOf(["small","medium","large","x-large",null]),elementRef:f.func},Tq=["description","as","messages","messagesId","disabled","children","layout","rowSpacing","colSpacing","vAlign","startAt","elementRef"],Pq=["styles","makeStyles"];var OT,bT,el;let qv=(OT=de(_q,Eq),OT(bT=(el=class FM extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.makeStylesVariables)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.makeStylesVariables)}get makeStylesVariables(){return{invalid:this.invalid}}get invalid(){return!!this.props.messages&&this.props.messages.findIndex(e=>e.type==="error")>=0}renderColumns(){return T.Children.map(this.props.children,(e,n)=>e?C(qn.Col,{width:e.props&&e.props.width?"auto":void 0,key:n},e):null)}renderChildren(){return C(qn,{colSpacing:this.props.colSpacing,rowSpacing:this.props.rowSpacing,vAlign:this.props.vAlign,startAt:this.props.startAt||(this.props.layout==="columns"?"medium":null)},C(qn.Row,null,this.renderColumns()))}renderFields(){const e=this.props.styles;return C("span",{key:"fields",css:e==null?void 0:e.formFieldGroup},this.renderChildren())}render(){const e=this.props;e.styles,e.makeStyles;const n=Ie(e,Pq);return C(L0,Object.assign({},Re(n,FM.allowedProps),cs(n,L0.allowedProps),{vAlign:n.vAlign,layout:n.layout==="inline"?"inline":"stacked",label:n.description,"aria-disabled":n.disabled?"true":void 0,"aria-invalid":this.invalid?"true":void 0,elementRef:this.handleRef}),this.renderFields())}},el.displayName="FormFieldGroup",el.componentId="FormFieldGroup",el.propTypes=Cq,el.allowedProps=Tq,el.defaultProps={as:"fieldset",disabled:!1,rowSpacing:"medium",colSpacing:"small",vAlign:"middle"},el))||bT);const Aq=(t,e)=>{const n=e.size,i=e.checked,r=e.focused,o=e.hovered,s=e.indeterminate,a=i||s,l={small:{label:{fontSize:t.labelFontSizeSmall},facade:{fontSize:t.iconSizeSmall,width:t.facadeSizeSmall,height:t.facadeSizeSmall}},medium:{label:{fontSize:t.labelFontSizeMedium},facade:{fontSize:t.iconSizeMedium,width:t.facadeSizeMedium,height:t.facadeSizeMedium}},large:{label:{fontSize:t.labelFontSizeLarge},facade:{fontSize:t.iconSizeLarge,width:t.facadeSizeLarge,height:t.facadeSizeLarge}}};return{checkboxFacade:{label:"checkboxFacade",display:"flex",alignItems:"flex-start"},facade:{label:"checkboxFacade__facade",color:t.color,background:t.background,position:"relative",display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",flexShrink:0,transition:"all 0.2s",border:`${t.borderWidth} solid ${t.borderColor}`,borderRadius:t.borderRadius,marginInlineEnd:t.marginRight,marginInlineStart:"0",padding:t.padding,...l[n].facade,"&::before":{content:'""',position:"absolute",top:"-0.3125rem",bottom:"-0.3125rem",left:"-0.3125rem",right:"-0.3125rem",boxSizing:"border-box",borderRadius:`calc(${t.borderRadius} * 1.5)`,border:`${t.focusBorderWidth} ${t.focusBorderStyle} ${t.focusBorderColor}`,transition:"all 0.2s",transform:"scale(0.75)",opacity:0,pointerEvents:"none",...r&&{transform:"scale(1)",opacity:1}},...a&&{background:t.checkedBackground,borderColor:t.checkedBorderColor},...o&&{borderColor:t.hoverBorderColor}},label:{label:"checkboxFacade__label",flex:"1 1 auto",minWidth:"0.0625rem",color:t.labelColor,fontFamily:t.labelFontFamily,fontWeight:t.labelFontWeight,lineHeight:t.labelLineHeight,...l[n].label,...a&&{color:t.checkedLabelColor}}}},Rq=t=>{const e=t.colors,n=t.borders,i=t.spacing,r=t.typography,o=t.key,s={canvas:{focusBorderColor:t["ic-brand-primary"],labelColor:t["ic-brand-font-color-dark"],checkedLabelColor:t["ic-brand-font-color-dark"],checkedBackground:t["ic-brand-font-color-dark"],checkedBorderColor:t["ic-brand-font-color-dark"],hoverBorderColor:t["ic-brand-font-color-dark"]}};return{...{color:e==null?void 0:e.textLightest,borderWidth:n==null?void 0:n.widthSmall,borderColor:e==null?void 0:e.borderMedium,borderRadius:n==null?void 0:n.radiusMedium,background:e==null?void 0:e.backgroundLightest,marginRight:i==null?void 0:i.xSmall,padding:i==null?void 0:i.xxxSmall,checkedBackground:e==null?void 0:e.backgroundDarkest,checkedBorderColor:e==null?void 0:e.borderDarkest,hoverBorderColor:e==null?void 0:e.borderDarkest,focusBorderColor:e==null?void 0:e.borderBrand,focusBorderWidth:n==null?void 0:n.widthMedium,focusBorderStyle:n==null?void 0:n.style,labelColor:e==null?void 0:e.textDarkest,checkedLabelColor:e==null?void 0:e.textDarkest,labelFontFamily:r==null?void 0:r.fontFamily,labelFontWeight:r==null?void 0:r.fontWeightNormal,labelLineHeight:r==null?void 0:r.lineHeightCondensed,facadeSizeSmall:"1rem",facadeSizeMedium:"1.25rem",facadeSizeLarge:"1.75rem",labelFontSizeSmall:r==null?void 0:r.fontSizeSmall,labelFontSizeMedium:r==null?void 0:r.fontSizeMedium,labelFontSizeLarge:r==null?void 0:r.fontSizeLarge,iconSizeSmall:"0.625rem",iconSizeMedium:"0.75rem",iconSizeLarge:"1rem"},...s[o]}},Iq={children:f.node.isRequired,checked:f.bool,focused:f.bool,hovered:f.bool,size:f.oneOf(["small","medium","large"]),indeterminate:f.bool},$q=["children","checked","focused","hovered","size","indeterminate"];var yT,vT,tl,ST,wT;let Lq=(yT=de(Aq,Rq),yT(vT=(tl=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{this.ref=n}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}renderIcon(){return this.props.indeterminate?ST||(ST=C(oe,{viewBox:"0 0 1920 1920",inline:!1},C("rect",{x:"140",y:"820",width:"1640",height:"280"}))):this.props.checked?wT||(wT=C(Tu,{inline:!1})):null}render(){const e=this.props,n=e.children,i=e.styles;return C("span",{css:i==null?void 0:i.checkboxFacade,ref:this.handleRef},C("span",{css:i==null?void 0:i.facade,"aria-hidden":"true"},this.renderIcon()),C("span",{css:i==null?void 0:i.label},n))}},tl.displayName="CheckboxFacade",tl.componentId="CheckboxFacade",tl.propTypes=Iq,tl.allowedProps=$q,tl.defaultProps={checked:!1,focused:!1,hovered:!1,size:"medium",indeterminate:!1},tl))||vT);const Nq=(t,e)=>{const n=e.size,i=e.checked,r=e.focused,o=e.labelPlacement,s={start:{facade:{marginInlineEnd:"0",marginInlineStart:t.marginStart},label:{textAlign:"end"}},end:{facade:{marginInlineEnd:t.marginEnd,marginInlineStart:"0"},label:{}},top:{facade:{marginTop:t.marginVertical},label:{display:"block"}}},a={small:{fontSize:t.labelFontSizeSmall},medium:{fontSize:t.labelFontSizeMedium},large:{fontSize:t.labelFontSizeLarge}};return{toggleFacade:{label:"toggleFacade",display:"flex",alignItems:"center",...o==="top"&&{display:"block"}},facade:{label:"toggleFacade__facade",background:t.background,borderColor:t.borderColor,cursor:"pointer",display:"inline-block",userSelect:"none",position:"relative",borderRadius:"3rem",verticalAlign:"middle",boxShadow:`inset 0 0 0 ${t.borderWidth} ${t.borderColor}`,height:t.toggleSize,width:`calc(${t.toggleSize} * 1.5)`,...s[o].facade,...i&&{background:t.checkedBackground,boxShadow:"none"},"&::before":{content:'""',position:"absolute",top:"-0.25rem",left:"-0.25rem",width:"calc(100% + 0.5rem)",height:"calc(100% + 0.5rem)",boxSizing:"border-box",borderRadius:t.borderRadius,border:`${t.focusBorderWidth} ${t.focusBorderStyle} ${t.focusOutlineColor}`,transition:"all 0.2s",transform:"scale(0.75)",opacity:0,pointerEvents:"none",...r&&{transform:"scale(1)",opacity:1}}},icon:{label:"toggleFacade__icon",display:"block",textAlign:"center",position:"absolute",top:"0",insetInlineStart:"0",insetInlineEnd:"auto",transition:"all 0.2s",transform:"translate3d(0, 0, 0)",fontSize:"0.875rem",height:t.toggleSize,width:t.toggleSize,...i&&{transform:"translate3d(50%, 0, 0)",'[dir="rtl"] &':{transform:"translate3d(-50%, 0, 0)"}}},iconToggle:{label:"toggleFacade__iconToggle",position:"relative",height:"100%",width:"100%",display:"flex",alignItems:"center",justifyContent:"center","&::before":{content:'""',position:"absolute",top:t.borderWidth,left:t.borderWidth,height:`calc(100% - (${t.borderWidth} * 2))`,width:`calc(100% - (${t.borderWidth} * 2))`,background:t.toggleBackground,boxShadow:t.toggleShadow,borderRadius:"100%"}},iconSVG:{label:"toggleFacade__iconSVG",display:"block",color:t.uncheckedIconColor,position:"relative",zIndex:1,...i&&{color:t.checkedIconColor}},label:{label:"toggleFacade__label",flex:1,minWidth:"0.0625rem",color:t.labelColor,fontFamily:t.labelFontFamily,fontWeight:t.labelFontWeight,lineHeight:t.labelLineHeight,...a[n],...s[o].label}}},Mq=t=>{const e=t.colors,n=t.borders,i=t.forms,r=t.shadows,o=t.spacing,s=t.typography,a=t.key,l={canvas:{focusOutlineColor:t["ic-brand-primary"],labelColor:t["ic-brand-font-color-dark"]},"canvas-high-contrast":{background:e==null?void 0:e.backgroundDarkest,borderColor:e==null?void 0:e.borderDarkest}};return{...{color:e==null?void 0:e.textLightest,background:e==null?void 0:e.backgroundLight,borderColor:e==null?void 0:e.borderMedium,borderWidth:n==null?void 0:n.widthSmall,borderRadius:"4rem",marginEnd:o==null?void 0:o.small,marginStart:o==null?void 0:o.small,marginVertical:o==null?void 0:o.xSmall,checkedBackground:e==null?void 0:e.backgroundSuccess,uncheckedIconColor:e==null?void 0:e.textDarkest,checkedIconColor:e==null?void 0:e.textSuccess,focusOutlineColor:e==null?void 0:e.borderBrand,focusBorderWidth:n==null?void 0:n.widthMedium,focusBorderStyle:n==null?void 0:n.style,toggleBackground:e==null?void 0:e.backgroundLightest,toggleShadow:r==null?void 0:r.depth1,toggleSize:i==null?void 0:i.inputHeightSmall,labelColor:e==null?void 0:e.textDarkest,labelFontFamily:s==null?void 0:s.fontFamily,labelFontWeight:s==null?void 0:s.fontWeightNormal,labelLineHeight:s==null?void 0:s.lineHeightCondensed,labelFontSizeSmall:s==null?void 0:s.fontSizeSmall,labelFontSizeMedium:s==null?void 0:s.fontSizeMedium,labelFontSizeLarge:s==null?void 0:s.fontSizeLarge},...l[a]}},Dq={children:f.node.isRequired,checked:f.bool,disabled:f.bool,readOnly:f.bool,focused:f.bool,size:f.oneOf(["small","medium","large"]),labelPlacement:f.oneOf(["top","start","end"])},Bq=["children","checked","disabled","readOnly","focused","size","labelPlacement"];var kT,xT,nl;let Qq=(kT=de(Nq,Mq),kT(xT=(nl=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{this.ref=n}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}renderIcon(){const e=this.props,n=e.styles;return e.checked?C(Pu,{css:n==null?void 0:n.iconSVG}):C(Au,{css:n==null?void 0:n.iconSVG})}renderLabel(){const e=this.props,n=e.children,i=e.styles;return C("span",{css:i==null?void 0:i.label},n)}render(){const e=this.props,n=e.labelPlacement,i=e.styles;return C("span",{css:i==null?void 0:i.toggleFacade,ref:this.handleRef},(n==="top"||n==="start")&&this.renderLabel(),C("span",{css:i==null?void 0:i.facade,"aria-hidden":"true"},C("span",{css:i==null?void 0:i.icon},C("span",{css:i==null?void 0:i.iconToggle},this.renderIcon()))),n==="end"&&this.renderLabel())}},nl.displayName="ToggleFacade",nl.componentId="ToggleFacade",nl.propTypes=Dq,nl.allowedProps=Bq,nl.defaultProps={checked:!1,focused:!1,size:"medium",disabled:!1,readOnly:!1,labelPlacement:"end"},nl))||xT);const Fq=(t,e)=>{const n=e.inline;return{checkbox:{label:"checkbox",position:"relative",width:"100%",...e.disabled&&{cursor:"not-allowed",pointerEvents:"none",opacity:.5},...n&&{display:"inline-block",verticalAlign:"middle",width:"auto"}},input:{label:"checkbox__input",padding:0,margin:0,fontSize:"inherit",lineHeight:"inherit",width:"auto",position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",opacity:1e-4},control:{label:"checkbox__control",all:"initial",display:"block",direction:"inherit",textAlign:"start"}}},zq={label:f.node.isRequired,id:f.string,value:f.oneOfType([f.string,f.number]),messages:f.arrayOf(ds.message),defaultChecked:f.bool,checked:Su(f.bool,"onChange","defaultChecked"),onChange:f.func,onKeyDown:f.func,onFocus:f.func,onBlur:f.func,onMouseOver:f.func,onMouseOut:f.func,disabled:f.bool,readOnly:f.bool,indeterminate:f.bool,size:f.oneOf(["small","medium","large"]),variant:f.oneOf(["simple","toggle"]),inline:f.bool,labelPlacement:f.oneOf(["top","start","end"])},Hq=["label","id","value","messages","defaultChecked","checked","onChange","onKeyDown","onFocus","onBlur","onMouseOver","onMouseOut","disabled","readOnly","indeterminate","size","variant","inline","labelPlacement"];var _T,ET,CT,ec,il;let Uq=(_T=Ht(),ET=de(Fq,null),CT=Le(),_T(ec=ET(ec=CT(ec=(il=class zM extends T.Component{constructor(e){super(e),this._defaultId=void 0,this._input=null,this.ref=null,this.handleRef=n=>{this.ref=n},this.handleChange=n=>{const i=this.props,r=i.onChange,o=i.disabled,s=i.checked,a=i.readOnly;if(o||a){n.preventDefault();return}typeof s>"u"&&this.setState({checked:!this.state.checked}),typeof r=="function"&&r(n)},this.handleKeyDown=n=>{this.props.variant==="toggle"&&n.keyCode===ar.codes.enter&&(this._input&&this._input.click(),n.preventDefault())},this.handleFocus=()=>{this.setState({focused:!0})},this.handleBlur=()=>{this.setState({focused:!1})},this.handleMouseOver=()=>{!this.props.disabled&&this.setState({hovered:!0})},this.handleMouseOut=()=>{this.setState({hovered:!1})},this.state={focused:!1,hovered:!1,checked:typeof e.checked>"u"?!!e.defaultChecked:void 0},typeof e.checked>"u"&&(this.state.checked=!!e.defaultChecked),this._defaultId=e.deterministicId()}componentDidMount(){var e,n;this._input&&(this._input.indeterminate=this.props.indeterminate),(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(e){var n,i;e.indeterminate!==this.props.indeterminate&&this._input&&(this._input.indeterminate=this.props.indeterminate||!1),(n=(i=this.props).makeStyles)===null||n===void 0||n.call(i)}get id(){return this.props.id||this._defaultId}get checked(){return typeof this.props.checked>"u"?this.state.checked:this.props.checked}get focused(){return Co(this._input)}focus(){this._input&&this._input.focus()}renderFacade(){const e=this.props,n=e.size,i=e.disabled,r=e.variant,o=e.label,s=e.readOnly,a=e.indeterminate,l=e.labelPlacement,u=e.themeOverride,c=this.state,d=c.hovered,h=c.focused;return Ge(!(r==="simple"&&l!=="end"),"[Checkbox] The `simple` variant does not support the `labelPlacement` property. Use the `toggle` variant instead."),r==="toggle"?C(Qq,{disabled:i,size:n,focused:h,checked:this.checked,readOnly:s,labelPlacement:l,themeOverride:u},o):C(Lq,{size:n,hovered:d,focused:h,checked:this.checked,indeterminate:a,themeOverride:u},o)}renderMessages(){const e=this.props.messages;return e&&e.length>0?C(be,{display:"block",margin:"small 0 0"},C(Xv,{messages:e})):null}render(){const e=this.props,n=e.disabled,i=e.readOnly,r=e.value,o=e.onKeyDown,s=e.onFocus,a=e.onBlur,l=e.onMouseOver,u=e.onMouseOut,c=e.indeterminate,d=e.variant,h=e.styles,p=Re(this.props,zM.allowedProps);return Ge(!(d==="toggle"&&c),"[Checkbox] The `toggle` variant does not support the `indeterminate` property. Use the `simple` variant instead."),C("div",{css:h==null?void 0:h.checkbox,onMouseOver:ut(l,this.handleMouseOver),onMouseOut:ut(u,this.handleMouseOut),ref:this.handleRef},C("input",Object.assign({},p,{id:this.id,value:r,type:"checkbox",ref:m=>{this._input=m},disabled:n||i,"aria-checked":c?"mixed":void 0,css:h==null?void 0:h.input,onChange:this.handleChange,onKeyDown:ut(o,this.handleKeyDown),onFocus:ut(s,this.handleFocus),onBlur:ut(a,this.handleBlur),checked:this.checked})),C("label",{htmlFor:this.id,css:h==null?void 0:h.control},this.renderFacade(),this.renderMessages()))}},il.displayName="Checkbox",il.componentId="Checkbox",il.propTypes=zq,il.allowedProps=Hq,il.defaultProps={size:"medium",variant:"simple",disabled:!1,inline:!1,indeterminate:!1,readOnly:!1,labelPlacement:"end"},il))||ec)||ec)||ec);const Wq="modulepreload",Vq=function(t){return"/"+t},TT={},jq=function(e,n,i){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),s=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));r=Promise.all(n.map(a=>{if(a=Vq(a),a in TT)return;TT[a]=!0;const l=a.endsWith(".css"),u=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${u}`))return;const c=document.createElement("link");if(c.rel=l?"stylesheet":Wq,l||(c.as="script",c.crossOrigin=""),c.href=a,s&&c.setAttribute("nonce",s),document.head.appendChild(c),l)return new Promise((d,h)=>{c.addEventListener("load",d),c.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${a}`)))})}))}return r.then(()=>e()).catch(o=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=o,window.dispatchEvent(s),!s.defaultPrevented)throw o})},Xq=(t,e,n)=>{const i=e.size,r=e.textAlign,o=e.shouldNotWrap,s=n.disabled,a=n.invalid,l=n.focused,u=n.beforeElementHasWidth,c=n.afterElementHasWidth,d={small:{fontSize:t.smallFontSize,height:`calc(${t.smallHeight} - (2 * ${t.borderWidth}))`,lineHeight:`calc(${t.smallHeight} - (2 * ${t.borderWidth}))`},medium:{fontSize:t.mediumFontSize,height:`calc(${t.mediumHeight} - (2 * ${t.borderWidth}))`,lineHeight:`calc(${t.mediumHeight} - (2 * ${t.borderWidth}))`},large:{fontSize:t.largeFontSize,height:`calc(${t.largeHeight} - (2 * ${t.borderWidth}))`,lineHeight:`calc(${t.largeHeight} - (2 * ${t.borderWidth}))`}},h=s?{cursor:"not-allowed",pointerEvents:"none",opacity:"0.5"}:{},p=l?{opacity:1,transform:"scale(1)"}:{opacity:0,transform:"scale(0.95)"},m=a?{borderColor:t.errorBorderColor}:{},O=a&&l?{borderColor:t.errorBorderColor}:{},y={all:"initial","&::-ms-clear":{display:"none"},WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",appearance:"none",margin:0,width:"100%",display:"block",boxSizing:"border-box",outline:"none",fontFamily:t.fontFamily,fontWeight:t.fontWeight,color:t.color,padding:`0 ${t.padding}`,background:"transparent",border:"none",verticalAlign:"baseline",'&[autocomplete="off"]::-webkit-contacts-auto-fill-button':{display:"none !important"},"&:focus":{boxShadow:"initial"},"&::placeholder":{color:t.placeholderColor},...d[i],textAlign:r},b={boxSizing:"border-box",fontFamily:t.fontFamily,maxWidth:"100%",overflow:"visible",unicodeBidi:"isolate"},v={...b,display:"flex",alignItems:"center",justifyContent:"flex-start",flexDirection:"row"},S={...b,flexShrink:0};return{textInput:{label:"textInput",...y,"&:is(input)[type]":y,"&:-webkit-any(input)[type]":y},facade:{label:"textInput__facade",position:"relative",display:"block",boxSizing:"border-box",border:`${t.borderWidth} ${t.borderStyle} ${t.borderColor}`,borderRadius:t.borderRadius,background:t.background,color:t.color,"&::before":{content:'""',pointerEvents:"none",position:"absolute",display:"block",boxSizing:"border-box",top:"-0.25rem",bottom:"-0.25rem",left:"-0.25rem",right:"-0.25rem",border:`${t.focusOutlineWidth} ${t.focusOutlineStyle} ${t.focusOutlineColor}`,borderRadius:`calc(${t.borderRadius} * 1.5)`,transition:"all 0.2s",...p,...O},...h,...m},layout:{label:"textInput__layout",...v,...!o&&{flexWrap:"wrap"}},beforeElement:{label:"textInput__beforeElement",...S,paddingInlineStart:t.padding,...u===!1&&{paddingInlineStart:0}},innerWrapper:{label:"textInput__innerWrapper",...S,minWidth:"0.0625rem",flexShrink:1,flexGrow:1},inputLayout:{label:"textInput__inputLayout",...v},afterElement:{label:"textInput__afterElement",...S,paddingInlineEnd:t.padding,...c===!1&&{paddingInlineEnd:0}}}},Zq=t=>{const e=t.colors,n=t.typography,i=t.borders,r=t.spacing,o=t.forms,s=t.key,a={canvas:{color:t["ic-brand-font-color-dark"],focusOutlineColor:t["ic-brand-primary"]}};return{...{fontFamily:n==null?void 0:n.fontFamily,fontWeight:n==null?void 0:n.fontWeightNormal,borderWidth:i==null?void 0:i.widthSmall,borderStyle:i==null?void 0:i.style,borderColor:e==null?void 0:e.borderMedium,borderRadius:i==null?void 0:i.radiusMedium,color:e==null?void 0:e.textDarkest,background:e==null?void 0:e.backgroundLightest,padding:r==null?void 0:r.small,focusOutlineWidth:i==null?void 0:i.widthMedium,focusOutlineStyle:i==null?void 0:i.style,focusOutlineColor:e==null?void 0:e.borderBrand,errorBorderColor:e==null?void 0:e.borderDanger,errorOutlineColor:e==null?void 0:e.borderDanger,placeholderColor:e==null?void 0:e.textDark,smallFontSize:n==null?void 0:n.fontSizeSmall,smallHeight:o==null?void 0:o.inputHeightSmall,mediumFontSize:n==null?void 0:n.fontSizeMedium,mediumHeight:o==null?void 0:o.inputHeightMedium,largeFontSize:n==null?void 0:n.fontSizeLarge,largeHeight:o==null?void 0:o.inputHeightLarge},...a[s]}},qq={renderLabel:f.oneOfType([f.node,f.func]),type:f.oneOf(["text","email","url","tel","search","password"]),id:f.string,value:Su(f.string),defaultValue:f.string,interaction:f.oneOf(["enabled","disabled","readonly"]),messages:f.arrayOf(ds.message),size:f.oneOf(["small","medium","large"]),textAlign:f.oneOf(["start","center"]),width:f.string,htmlSize:f.number,display:f.oneOf(["inline-block","block"]),shouldNotWrap:f.bool,placeholder:f.string,isRequired:f.bool,elementRef:f.func,inputRef:f.func,inputContainerRef:f.func,renderBeforeInput:f.oneOfType([f.node,f.func]),renderAfterInput:f.oneOfType([f.node,f.func]),onChange:f.func,onBlur:f.func,onFocus:f.func},Yq=["renderLabel","type","id","value","defaultValue","interaction","messages","size","textAlign","width","htmlSize","display","shouldNotWrap","placeholder","isRequired","elementRef","inputRef","inputContainerRef","renderBeforeInput","renderAfterInput","onChange","onBlur","onFocus"],Gq=["type","size","htmlSize","display","textAlign","placeholder","value","defaultValue","isRequired","onFocus"];var PT,AT,RT,tc,rl;let Gk=(PT=Ht(),AT=de(Xq,Zq),RT=Le(),PT(tc=AT(tc=RT(tc=(rl=class extends T.Component{constructor(e){super(e),this.ref=null,this._input=null,this._beforeElement=null,this._afterElement=null,this._defaultId=void 0,this._messagesId=void 0,this._focusListener=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.makeStyleProps=()=>{const n=this.interaction,i=this.state,r=i.hasFocus,o=i.beforeElementHasWidth,s=i.afterElementHasWidth;return{disabled:n==="disabled",invalid:this.invalid,focused:r,beforeElementHasWidth:o,afterElementHasWidth:s}},this.handleInputRef=n=>{this._input=n,typeof this.props.inputRef=="function"&&this.props.inputRef(n)},this.handleChange=n=>{typeof this.props.onChange=="function"&&this.props.onChange(n,n.target.value)},this.handleBlur=n=>{typeof this.props.onBlur=="function"&&this.props.onBlur(n),this.setState({hasFocus:!1})},this.handleFocus=n=>{typeof this.props.onFocus=="function"&&this.props.onFocus(n),this.setState({hasFocus:!0})},this.state={hasFocus:!1,beforeElementHasWidth:void 0,afterElementHasWidth:void 0},this._defaultId=e.deterministicId(),this._messagesId=e.deterministicId("TextInput-messages")}componentDidMount(){var e,n;this._input&&(this._focusListener=Cr(this._input,"focus",this.handleFocus),this.setState({beforeElementHasWidth:this.getElementHasWidth(this._beforeElement),afterElementHasWidth:this.getElementHasWidth(this._afterElement)})),(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.makeStyleProps())}componentWillUnmount(){this._focusListener&&this._focusListener.remove()}componentDidUpdate(e){var n,i;e.renderBeforeInput!==this.props.renderBeforeInput&&this.setState({beforeElementHasWidth:this.getElementHasWidth(this._beforeElement)}),e.renderAfterInput!==this.props.renderAfterInput&&this.setState({afterElementHasWidth:this.getElementHasWidth(this._afterElement)}),Go({props:e})!=="disabled"&&Go({props:this.props})==="disabled"&&this.setState({hasFocus:!1}),(n=(i=this.props).makeStyles)===null||n===void 0||n.call(i,this.makeStyleProps())}focus(){var e;(e=this._input)===null||e===void 0||e.focus()}get interaction(){return Go({props:this.props})}get hasMessages(){return!!this.props.messages&&this.props.messages.length>0}get invalid(){return!!this.props.messages&&this.props.messages.findIndex(e=>e.type==="error")>=0}get focused(){return Co(this._input)}get value(){var e;return(e=this._input)===null||e===void 0?void 0:e.value}get id(){return this.props.id||this._defaultId}renderInput(){var e;const n=this.props,i=n.type;n.size;const r=n.htmlSize;n.display,n.textAlign;const o=n.placeholder,s=n.value,a=n.defaultValue,l=n.isRequired;n.onFocus;const u=Ie(n,Gq),c=It(u),d=this.interaction;let h="";return c["aria-describedby"]&&(h=`${c["aria-describedby"]}`),this.hasMessages&&(h=h!==""?`${h} ${this._messagesId}`:this._messagesId),C("input",Object.assign({},c,{css:(e=this.props.styles)===null||e===void 0?void 0:e.textInput,defaultValue:a,value:s,placeholder:o,ref:this.handleInputRef,type:i,id:this.id,required:l,"aria-invalid":this.invalid?"true":void 0,disabled:d==="disabled",readOnly:d==="readonly","aria-describedby":h!==""?h:void 0,size:r,onChange:this.handleChange,onBlur:this.handleBlur}))}getElementHasWidth(e){if(!e)return;const n=getComputedStyle(e),i=n.width,r=n.paddingInlineStart,o=n.paddingInlineEnd;return i==="auto"||i===""?!0:parseFloat(i)-parseFloat(r)-parseFloat(o)>0}render(){const e=this.props,n=e.width,i=e.display,r=e.renderLabel,o=e.renderBeforeInput,s=e.renderAfterInput,a=e.messages,l=e.inputContainerRef,u=e.styles,c=o?ot(o):null,d=s?ot(s):null,h=!!c||!!d;return C(xa,{id:this.id,label:ot(r),messagesId:this._messagesId,messages:a,inline:i==="inline-block",width:n,inputContainerRef:l,layout:this.props.layout,elementRef:this.handleRef},C("span",{css:u==null?void 0:u.facade},h?C("div",null,C("span",{css:u==null?void 0:u.layout},c&&C("span",{css:u==null?void 0:u.beforeElement,ref:p=>{this._beforeElement=p}},c),C("span",{css:u==null?void 0:u.innerWrapper},C("span",{css:u==null?void 0:u.inputLayout},C("span",{css:u==null?void 0:u.innerWrapper},this.renderInput()),d&&C("span",{css:u==null?void 0:u.afterElement,ref:p=>{this._afterElement=p}},d))))):this.renderInput()))}},rl.displayName="TextInput",rl.componentId="TextInput",rl.allowedProps=Yq,rl.propTypes=qq,rl.defaultProps={type:"text",interaction:void 0,isRequired:!1,display:"block",shouldNotWrap:!1,size:"medium",textAlign:"start",messages:[]},rl))||tc)||tc)||tc);const Kq=(t,e)=>{const n=e.size,i=e.wrap,r=e.weight,o=e.fontStyle,s=e.transform,a=e.lineHeight,l=e.letterSpacing,u=e.color,c={primary:{color:t.primaryColor},secondary:{color:t.secondaryColor},"primary-inverse":{color:t.primaryInverseColor},"secondary-inverse":{color:t.secondaryInverseColor},success:{color:t.successColor},brand:{color:t.brandColor},danger:{color:t.dangerColor},alert:{color:t.alertColor}},d={overflowWrap:"break-word",wordBreak:"break-word",hyphens:"auto"},h={normal:{fontWeight:t.fontWeightNormal},light:{fontWeight:t.fontWeightLight},bold:{fontWeight:t.fontWeightBold}},p={"x-small":t.fontSizeXSmall,small:t.fontSizeSmall,medium:t.fontSizeMedium,large:t.fontSizeLarge,"x-large":t.fontSizeXLarge,"xx-large":t.fontSizeXXLarge},m={default:{lineHeight:t.lineHeight},fit:{lineHeight:t.lineHeightFit},condensed:{lineHeight:t.lineHeightCondensed},double:{lineHeight:t.lineHeightDouble}},O={normal:t.letterSpacingNormal,condensed:t.letterSpacingCondensed,expanded:t.letterSpacingExpanded},y={"&:focus":{outline:"none"},...u?c[u]:{},...i==="break-word"?d:{},...r?h[r]:{},...o?{fontStyle:o}:{},fontSize:p[n],...a?m[a]:{},letterSpacing:O[l],...s?{textTransform:s}:{}},b={...y,outline:0,appearance:"none",boxSizing:"border-box",background:"none",border:"none",borderRadius:0,padding:0,margin:0,color:"inherit",height:"auto",width:"100%",lineHeight:"inherit",textAlign:"start",boxShadow:"none",display:"block"};return{text:{label:"text",fontFamily:t.fontFamily,...y,"&:is(input)[type]":b,"&:-webkit-any(input)[type]":b,"sub, sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sup:{top:"-0.4em"},sub:{bottom:"-0.4em"},"pre, code":{all:"initial",fontFamily:t.fontFamilyMonospace},"i, em":{fontStyle:"italic"},"b, strong":{fontWeight:t.fontWeightBold},p:{display:"block",padding:0,margin:t.paragraphMargin}}}},Jq=t=>{const e=t.colors,n=t.typography,i=t.spacing,r=t.key,o={canvas:{primaryColor:t["ic-brand-font-color-dark"],brandColor:t["ic-brand-primary"]}};return{...{...n,primaryInverseColor:e==null?void 0:e.textLightest,primaryColor:e==null?void 0:e.textDarkest,secondaryColor:e==null?void 0:e.textDark,secondaryInverseColor:e==null?void 0:e.textLight,brandColor:e==null?void 0:e.textBrand,dangerColor:e==null?void 0:e.textDanger,successColor:e==null?void 0:e.textSuccess,alertColor:e==null?void 0:e.textAlert,warningColor:e==null?void 0:e.textWarning,paragraphMargin:`${i.medium} 0`},...o[r]}},eY={as:f.elementType,children:f.node,color:f.oneOf(["primary","secondary","brand","success","danger","alert","primary-inverse","secondary-inverse"]),elementRef:f.func,fontStyle:f.oneOf(["italic","normal"]),letterSpacing:f.oneOf(["normal","condensed","expanded"]),lineHeight:f.oneOf(["default","fit","condensed","double"]),size:f.oneOf(["x-small","small","medium","large","x-large","xx-large"]),transform:f.oneOf(["none","capitalize","uppercase","lowercase"]),weight:f.oneOf(["normal","light","bold"]),wrap:f.oneOf(["normal","break-word"])},tY=["as","children","color","elementRef","fontStyle","letterSpacing","lineHeight","size","transform","weight","wrap"];var IT,$T,ol;let Vt=(IT=de(Kq,Jq),IT($T=(ol=class HM extends T.Component{componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){var e;const n=this.props.children,i=oi(HM,this.props);return C(i,Object.assign({},It(this.props),{css:(e=this.props.styles)===null||e===void 0?void 0:e.text,ref:this.props.elementRef}),n)}},ol.displayName="Text",ol.componentId="Text",ol.allowedProps=tY,ol.propTypes=eY,ol.defaultProps={as:"span",wrap:"normal",size:"medium",letterSpacing:"normal",children:null},ol))||$T);const nY=t=>({options:{label:"options",boxSizing:"border-box",wordWrap:"break-word"},list:{label:"options__list",listStyleType:"none",position:"relative"},label:{label:"options__label",color:t.labelColor,cursor:"default",display:"block",fontWeight:t.labelFontWeight,padding:t.nestedLabelPadding}}),UM=t=>{const e=t.colors,n=t.typography,i=t.spacing;return{...{labelFontWeight:n==null?void 0:n.fontWeightBold,background:e==null?void 0:e.backgroundLightest,labelColor:e==null?void 0:e.textDarkest,labelPadding:`${i==null?void 0:i.xSmall} 0`,nestedLabelPadding:`${i==null?void 0:i.xSmall} ${i==null?void 0:i.small}`}}},iY=(t,e)=>{const n=e.variant,i=e.children,r=e.renderBeforeLabel,o=e.renderAfterLabel,s=e.beforeLabelContentVAlign,a=e.afterLabelContentVAlign,l=Me(i,["Options"]),u={highlighted:{background:t.highlightedBackground,color:t.highlightedLabelColor},selected:{background:t.selectedBackground,color:t.highlightedLabelColor},disabled:{cursor:"not-allowed",opacity:.5},"highlighted-disabled":{background:t.highlightedBackground,color:t.highlightedLabelColor,cursor:"not-allowed",opacity:.5},default:{}},c=p=>{const m=p==="before"?s:a,O=p==="before"?t.beforeLabelContentVOffset:t.afterLabelContentVOffset;return{start:{alignItems:"flex-start",paddingBlockStart:O},center:{alignItems:"center",paddingBlockStart:O,paddingBlockEnd:O},end:{alignItems:"flex-end",paddingBlockEnd:O}}[m]},d={textDecoration:"none",color:"currentColor"},h="background 200ms";return{item:{label:"optionItem",background:t.background,color:t.color,cursor:"pointer",display:"block",fontSize:t.fontSize,fontFamily:t.fontFamily,fontWeight:t.fontWeight,lineHeight:t.lineHeight,outline:"none",position:"relative",transition:h,userSelect:"none",...u[n],...l&&{cursor:"default"},"[class*=-optionItem] &":{...!r&&{"[class$=-optionItem__container]":{paddingInlineStart:t.nestedPadding},"[class$=-optionItem__content--before]":{insetInlineStart:t.nestedPadding}}}},container:{label:"optionItem__container",display:"block",outline:"none",padding:t.padding,...l&&{padding:"0"},...r&&{paddingInlineEnd:t.iconPadding,paddingInlineStart:`calc(${t.iconPadding} * 2 + 1em)`},...o&&{paddingInlineEnd:`calc(${t.iconPadding} * 2 + 1em)`,paddingInlineStart:t.iconPadding},...r&&o&&{paddingInlineEnd:`calc(${t.iconPadding} * 2 + 1em)`,paddingInlineStart:`calc(${t.iconPadding} * 2 + 1em)`},"&:is(a)":{"&, &:link, &:visited, &:active, &:hover, &:focus":d},"&:-webkit-any(a)":{"&, &:link, &:visited, &:active, &:hover, &:focus":d}},content:{label:"optionItem__content",display:"flex",height:"100%",boxSizing:"border-box",pointerEvents:"none",position:"absolute",top:"0"},contentBefore:{label:"optionItem__content--before",insetInlineEnd:"auto",insetInlineStart:t.iconPadding,...c("before")},contentAfter:{label:"optionItem__content--after",insetInlineEnd:t.iconPadding,insetInlineStart:"auto",...c("after")},description:{label:"optionItem__description",display:"block",transition:h,paddingBlockStart:t.descriptionPaddingStart,fontWeight:t.descriptionFontWeight,fontSize:t.descriptionFontSize,lineHeight:t.descriptionLineHeight,color:t.descriptionColor,...u[n],background:"none"}}},WM=t=>{const e=t.colors,n=t.typography,i=t.spacing,r=t.key,o={canvas:{color:t["ic-brand-font-color-dark"],highlightedBackground:t["ic-brand-primary"]}};return{...{fontSize:n==null?void 0:n.fontSizeMedium,fontFamily:n==null?void 0:n.fontFamily,fontWeight:n==null?void 0:n.fontWeightNormal,lineHeight:n==null?void 0:n.lineHeightCondensed,color:e==null?void 0:e.textDarkest,background:e==null?void 0:e.backgroundLightest,highlightedLabelColor:e==null?void 0:e.textLightest,highlightedBackground:e==null?void 0:e.backgroundBrand,selectedLabelColor:e==null?void 0:e.textLightest,selectedBackground:e==null?void 0:e.backgroundDark,padding:`${i==null?void 0:i.xSmall} ${i==null?void 0:i.small}`,iconPadding:i==null?void 0:i.small,nestedPadding:i==null?void 0:i.small,beforeLabelContentVOffset:"0.625rem",afterLabelContentVOffset:"0.625rem",descriptionFontSize:n.fontSizeSmall,descriptionFontWeight:n.fontWeightNormal,descriptionLineHeight:n.lineHeight,descriptionPaddingStart:"0.25em",descriptionColor:e.textDark},...o[r]}},rY={as:f.elementType,variant:f.oneOf(["default","highlighted","selected","disabled","highlighted-disabled"]),role:f.string,renderBeforeLabel:f.oneOfType([f.node,f.func]),renderAfterLabel:f.oneOfType([f.node,f.func]),beforeLabelContentVAlign:f.oneOf(["start","center","end"]),afterLabelContentVAlign:f.oneOf(["start","center","end"]),description:f.oneOfType([f.node,f.func]),descriptionRole:f.string,href:f.string,voiceoverRoleBugWorkaround:f.bool,elementRef:f.func,children:f.oneOfType([f.node,f.func])},oY=["as","variant","role","renderBeforeLabel","renderAfterLabel","beforeLabelContentVAlign","afterLabelContentVAlign","description","descriptionRole","voiceoverRoleBugWorkaround","href","elementRef","children"];var LT,NT,MT,nc,sl;let DT=(LT=Ht(),NT=de(iY,WM),MT=Le(),LT(nc=NT(nc=MT(nc=(sl=class Yv extends T.Component{constructor(e){super(e),this.ref=null,this._descriptionId=void 0,this._descriptionId=e.deterministicId("OptionsItem-description")}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}renderContent(e,n){const i=this.props,r=i.styles,o=i.variant,s=i.as,a=i.role,l=i.children;return C("span",{css:[r==null?void 0:r.content,n],role:"presentation","aria-hidden":"true"},ot(e,{variant:o,as:s,role:a,children:l}))}render(){const e=this.props,n=e.as,i=e.href,r=e.role,o=e.styles,s=e.description,a=e.descriptionRole,l=e.renderBeforeLabel,u=e.renderAfterLabel,c=e.elementRef,d=e.children,h=e.voiceoverRoleBugWorkaround,p=oi(Yv,this.props,()=>n),m=i?"a":"span",O=Re(this.props,Yv.allowedProps),y=ot(d),b=ot(s),v=this.props["aria-describedby"]||(b?this._descriptionId:void 0);return C(p,{role:h?r:"none",css:o==null?void 0:o.item,ref:S=>{this.ref=S,typeof c=="function"&&c(S)},"aria-describedby":h?v:void 0},C(m,Object.assign({},O,{css:o==null?void 0:o.container,role:i||h?void 0:r,href:i,"aria-describedby":h?void 0:v}),y,b&&C("span",{css:o==null?void 0:o.description,role:a,id:this._descriptionId},b)),l&&this.renderContent(l,o==null?void 0:o.contentBefore),u&&this.renderContent(u,o==null?void 0:o.contentAfter))}},sl.displayName="Item",sl.componentId="Options.Item",sl.allowedProps=oY,sl.propTypes=rY,sl.defaultProps={as:"span",variant:"default",role:"listitem",voiceoverRoleBugWorkaround:!1,beforeLabelContentVAlign:"center",afterLabelContentVAlign:"center"},sl))||nc)||nc)||nc);const sY=t=>({separator:{label:"separator",height:t.height,margin:t.margin,overflow:"hidden",background:t.background}}),VM=t=>{const e=t.borders,n=t.colors,i=t.spacing;return{...{background:n==null?void 0:n.backgroundMedium,height:e==null?void 0:e.widthSmall,margin:`0 ${i==null?void 0:i.small}`}}},aY={as:f.elementType},lY=["as"],uY=["as","styles"];var BT,QT,al;let cY=(BT=de(sY,VM),BT(QT=(al=class jM extends T.Component{componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){const e=this.props,n=e.as,i=e.styles,r=Ie(e,uY),o=oi(jM,this.props,()=>n);return C(o,{role:"none"},C("div",Object.assign({},Re(r,["styles","makeStyles","themeOverride"]),{css:i==null?void 0:i.separator,role:"presentation"})))}},al.displayName="Separator",al.componentId="Options.Separator",al.allowedProps=lY,al.propTypes=aY,al.defaultProps={as:"span"},al))||QT);const dY={as:f.elementType,role:f.string,elementRef:f.func,renderLabel:f.oneOfType([f.node,f.func]),children:pt.oneOf(["Options","Item","Separator"])},hY=["as","role","elementRef","renderLabel","children"];var FT,zT,HT,ic,Bo;let di=(FT=Ht(),zT=de(nY,UM),HT=Le(),FT(ic=zT(ic=HT(ic=(Bo=class Gv extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{this.ref=n},this._labelId=this.props.deterministicId("Options-label")}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}get childAs(){const e=this.props.as;if(e==="ul"||e==="ol")return"li"}renderLabel(){const e=this.props,n=e.renderLabel,i=e.styles;return C("span",{id:this._labelId,role:"presentation","aria-hidden":"true",css:i==null?void 0:i.label},ot(n))}renderSubList(e){const n=this.props.styles;return C(DT,{as:this.childAs,role:"presentation",css:n==null?void 0:n.label},e)}renderChildren(){const e=this.props.children;return T.Children.map(e,n=>{if(Me(n,["Options"]))return this.renderSubList(n);if(Me(n,["Item","Separator"]))return $t(n,{as:this.childAs||n.props.as})})}get ariaLabelledby(){if(this.props.renderLabel)return this._labelId;if(this.props["aria-labelledby"])return this.props["aria-labelledby"]}render(){const e=be.omitViewProps(Re(this.props,Gv.allowedProps),Gv),n=this.props,i=n.as,r=n.role,o=n.renderLabel,s=n.elementRef,a=n.styles;return C("div",{css:a==null?void 0:a.options,role:"presentation",ref:this.handleRef},o&&this.renderLabel(),C(be,Object.assign({},e,{elementRef:s,css:a==null?void 0:a.list,as:i,role:r,display:"block",margin:"none",padding:"none",background:"primary","aria-labelledby":this.ariaLabelledby}),this.renderChildren()))}},Bo.displayName="Options",Bo.componentId="Options",Bo.allowedProps=hY,Bo.propTypes=dY,Bo.defaultProps={as:"span",role:"list",elementRef:()=>{},renderLabel:null,children:null},Bo.Item=DT,Bo.Separator=cY,Bo))||ic)||ic)||ic);const fY={id:f.string,highlightedOptionId:f.string,selectedOptionId:f.oneOfType([f.string,f.array]),isShowingOptions:f.bool,onRequestShowOptions:f.func,onRequestHideOptions:f.func,onRequestHighlightOption:f.func,onRequestHighlightFirstOption:f.func,onRequestHighlightLastOption:f.func,onRequestSelectOption:f.func,children:f.func,render:f.func},pY=["id","highlightedOptionId","selectedOptionId","isShowingOptions","onRequestShowOptions","onRequestHideOptions","onRequestHighlightOption","onRequestHighlightFirstOption","onRequestHighlightLastOption","onRequestSelectOption","children","render"];var UT,WT,rc;let XM=(UT=Ht(),UT(WT=(rc=class extends T.Component{constructor(...e){super(...e),this._id=this.props.id||this.props.deterministicId(),this._listId=`${this._id}-list`,this._descriptionId=`${this._id}-description`,this._trigger=null,this.isSelectedOption=n=>{const i=this.props.selectedOptionId;return Array.isArray(i)?i.indexOf(n)>-1:i===n},this.handleOpenClose=n=>{const i=this.props,r=i.isShowingOptions,o=i.onRequestShowOptions,s=i.onRequestHideOptions;n.preventDefault(),r?s==null||s(n):(Co(this._trigger)||this._trigger.focus(),o==null||o(n))},this.handleKeyDown=n=>{const i=this.props,r=i.isShowingOptions,o=i.highlightedOptionId,s=i.onRequestHighlightOption,a=i.onRequestHighlightFirstOption,l=i.onRequestHighlightLastOption,u=i.onRequestSelectOption;switch(ar.names[n.keyCode]){case"space":r||this.handleOpenClose(n);break;case"enter":o&&(n.preventDefault(),u==null||u(n,{id:o}));break;case"down":n.preventDefault(),r?s==null||s(n,{direction:1}):this.handleOpenClose(n);break;case"up":n.preventDefault(),r?s==null||s(n,{direction:-1}):this.handleOpenClose(n);break;case"home":r&&(n.preventDefault(),a==null||a(n));break;case"end":r&&(n.preventDefault(),l==null||l(n));break}},this.handleKeyUp=n=>{const i=this.props.isShowingOptions;ar.names[n.keyCode]==="esc"&&i&&this.handleOpenClose(n)}}render(){const e=this.props,n=e.isShowingOptions,i=e.highlightedOptionId,r=e.onRequestHighlightOption,o=e.onRequestSelectOption,s=e.children,a=e.render,l=a===void 0?s:a;return typeof l=="function"?l({getRootProps:({onMouseDown:u,...c}={})=>({onMouseDown:ut(d=>{d.target!==this._trigger&&n&&d.preventDefault()},u),...c}),getLabelProps:u=>({htmlFor:this._id,...u}),getTriggerProps:({ref:u,onKeyDown:c,onKeyUp:d,onClick:h,...p}={})=>({id:this._id,ref:ut(u,m=>this._trigger=m),"aria-haspopup":"listbox","aria-expanded":n,"aria-owns":n?this._listId:void 0,"aria-controls":n?this._listId:void 0,"aria-describedby":this._descriptionId,"aria-activedescendant":n?i:void 0,onKeyDown:ut(this.handleKeyDown,c),onKeyUp:ut(this.handleKeyUp,d),onClick:ut(this.handleOpenClose,h),...p}),getInputProps:({readOnly:u,...c}={})=>({role:"combobox","aria-autocomplete":u?"none":"both",autoComplete:"off",readOnly:u,...c}),getListProps:({onMouseDown:u,onClick:c,...d}={})=>({id:this._listId,role:"listbox",onMouseDown:ut(h=>{h.preventDefault()},u),onClick:ut(h=>{h.stopPropagation(),h.nativeEvent.stopImmediatePropagation()},c),...d}),getOptionProps:({id:u,onMouseOver:c,onClick:d,...h}={})=>(Ge(!!u,"[Selectable] Must provide id for each option via `getOptionProps`."),{id:u,role:"option","aria-selected":this.isSelectedOption(u)?"true":"false",onClick:ut(p=>{o==null||o(p,{id:u})},d),onMouseOver:ut(p=>{r==null||r(p,{id:u})},c),...h}),getDisabledOptionProps:u=>({"aria-disabled":"true",...u}),getDescriptionProps:u=>({id:this._descriptionId,...u})}):null}},rc.displayName="Selectable",rc.allowedProps=pY,rc.propTypes=fY,rc.defaultProps={isShowingOptions:!1},rc))||WT);const mY={id:f.string.isRequired,as:f.elementType},gY=["id","as"];var VT,jT,ll;let Nc=(VT=de(null,VM),VT(jT=(ll=class extends T.Component{render(){return null}},ll.displayName="DrilldownSeparator",ll.componentId="Drilldown.Separator",ll.propTypes=mY,ll.allowedProps=gY,ll.defaultProps={},ll))||jT);const OY={id:f.string.isRequired,children:f.oneOfType([f.node,f.func]),subPageId:f.string,disabled:f.bool,selected:f.bool,value:f.oneOfType([f.number,f.string]),href:f.string,as:f.elementType,role:f.string,renderLabelInfo:f.oneOfType([f.node,f.func]),renderBeforeLabel:f.oneOfType([f.node,f.func]),renderAfterLabel:f.oneOfType([f.node,f.func]),beforeLabelContentVAlign:f.oneOf(["start","center","end"]),afterLabelContentVAlign:f.oneOf(["start","center","end"]),description:f.oneOfType([f.node,f.func]),descriptionRole:f.string,onOptionClick:f.func,defaultSelected:f.bool,elementRef:f.func,shouldCloseOnClick:f.oneOf(["auto","always","never"])},bY=["id","children","subPageId","disabled","selected","value","href","as","role","renderLabelInfo","renderBeforeLabel","renderAfterLabel","beforeLabelContentVAlign","afterLabelContentVAlign","description","descriptionRole","onOptionClick","defaultSelected","elementRef","shouldCloseOnClick"];var XT,ZT,ul;let wr=(XT=de(null,WM),XT(ZT=(ul=class extends T.Component{render(){return null}},ul.displayName="DrilldownOption",ul.componentId="Drilldown.Option",ul.propTypes=OY,ul.allowedProps=bY,ul.defaultProps={disabled:!1,beforeLabelContentVAlign:"start",afterLabelContentVAlign:"start",as:"li",role:"menuitem",shouldCloseOnClick:"auto"},ul))||ZT);const yY={id:f.string.isRequired,children:pt.oneOf([wr,Nc]),renderGroupTitle:f.oneOfType([f.node,f.func]),withoutSeparators:f.bool,disabled:f.bool,role:f.string,as:f.elementType,elementRef:f.func,selectableType:f.oneOf(["single","multiple"]),defaultSelected:f.array,onSelect:f.func},vY=["id","children","renderGroupTitle","withoutSeparators","disabled","role","as","elementRef","selectableType","defaultSelected","onSelect"];var qT,YT,cl;let Dg=(qT=de(null,UM),qT(YT=(cl=class extends T.Component{render(){return null}},cl.displayName="DrilldownGroup",cl.componentId="Drilldown.Group",cl.propTypes=yY,cl.allowedProps=vY,cl.defaultProps={disabled:!1,withoutSeparators:!1,role:"group"},cl))||YT);const SY={id:f.string.isRequired,children:pt.oneOf([wr,Nc,Dg]),renderTitle:f.oneOfType([f.node,f.func]),renderActionLabel:f.oneOfType([f.node,f.func]),renderBackButtonLabel:f.oneOfType([f.node,f.func]),onHeaderActionClicked:f.func,onBackButtonClicked:f.func,withoutHeaderSeparator:f.bool,disabled:f.bool},wY=["id","children","renderTitle","renderActionLabel","renderBackButtonLabel","onHeaderActionClicked","onBackButtonClicked","withoutHeaderSeparator","disabled"];class Ru extends T.Component{render(){return null}}Ru.displayName="DrilldownPage";Ru.componentId="Drilldown.Page";Ru.propTypes=SY;Ru.allowedProps=wY;Ru.defaultProps={renderBackButtonLabel:"Back",disabled:!1,withoutHeaderSeparator:!1};const kY=(t,e,n)=>({drilldown:{label:"drilldown",overflow:"visible",...n.hasHighlightedOption&&{"&:focus::before":{display:"none"}}},container:{label:"drilldown__container"},headerBack:{label:"drilldown__headerBack",minHeight:"1.25em"},headerTitle:{label:"drilldown__headerTitle",fontWeight:t.headerTitleFontWeight},optionContainer:{label:"drilldown__optionContainer",alignItems:"center",display:"flex",height:"100%"},optionLabelInfo:{label:"drilldown__optionLabelInfo",display:"flex",flexShrink:0,height:"100%",alignItems:"center",paddingInlineStart:t.labelInfoPadding},optionContent:{label:"drilldown__optionContent",flexGrow:1},headerActionColor:t.headerActionColor}),xY=t=>{const e=t.colors,n=t.typography,i=t.spacing;return{...{headerTitleFontWeight:n.fontWeightBold,headerActionColor:e.textLink,labelInfoPadding:i==null?void 0:i.small}}},_Y={rootPageId:f.string.isRequired,children:pt.oneOf([Ru]),id:f.string,label:f.string,disabled:f.bool,rotateFocus:f.bool,as:f.elementType,role:f.string,elementRef:f.func,drilldownRef:f.func,overflowX:f.oneOf(["auto","hidden","visible"]),overflowY:f.oneOf(["auto","hidden","visible"]),height:f.oneOfType([f.string,f.number]),width:f.oneOfType([f.string,f.number]),minHeight:f.oneOfType([f.string,f.number]),minWidth:f.oneOfType([f.string,f.number]),maxHeight:f.oneOfType([f.string,f.number]),maxWidth:f.oneOfType([f.string,f.number]),trigger:f.node,placement:Jt.placement,defaultShow:f.bool,show:Su(f.bool,"onToggle","defaultShow"),onToggle:f.func,onSelect:f.func,onDismiss:f.func,onFocus:f.func,onMouseOver:f.func,popoverRef:f.func,mountNode:Jt.mountNode,positionTarget:Jt.mountNode,positionContainerDisplay:f.oneOf(["inline-block","block"]),constrain:Jt.constrain,shouldHideOnSelect:f.bool,shouldContainFocus:f.bool,shouldReturnFocus:f.bool,withArrow:f.bool,offsetX:f.oneOfType([f.string,f.number]),offsetY:f.oneOfType([f.string,f.number])},EY=["rootPageId","children","id","label","disabled","rotateFocus","as","role","overflowX","overflowY","height","width","minHeight","minWidth","maxHeight","maxWidth","trigger","placement","defaultShow","show","onToggle","onSelect","onDismiss","onFocus","onMouseOver","elementRef","drilldownRef","popoverRef","mountNode","positionTarget","positionContainerDisplay","constrain","shouldHideOnSelect","shouldContainFocus","shouldReturnFocus","withArrow","offsetX","offsetY"],CY=["groupProps"],TY=["groupProps"],PY=["id","themeOverride"];var GT,KT,JT,oc,vr,eP,tP,nP,iP;let Qn=(GT=Ht(),KT=de(kY,xY),JT=Le(),GT(oc=KT(oc=JT(oc=(vr=class extends T.Component{constructor(e){super(e),this._drilldownRef=null,this._popover=null,this._trigger=null,this._containerElement=null,this._id=void 0,this._triggerId=void 0,this._headerBackId=void 0,this._headerTitleId=void 0,this._headerTitleLabelId=void 0,this._headerActionId=void 0,this._pageHistory=void 0,this._activeOptionsMap={},this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.handleDrilldownRef=n=>{const i=this.props.drilldownRef;this._drilldownRef=n,typeof i=="function"&&i(n),this.props.trigger||this.handleRef(n)},this.show=n=>{this._popover&&(this._popover.show(n),this.setState({isShowingPopover:!0}))},this.hide=n=>{this._popover&&(this._popover.hide(n),this.setState({isShowingPopover:!1}),this.reset())},this.handleOptionHighlight=(n,{id:i,direction:r})=>{const o=this.props.rotateFocus,s=this.state.highlightedOptionId;let a=this.getPageChildById(i)?i:void 0;if(!a){if(!s)a=this.activeOptionIds[0];else if(r){const l=this.activeOptionIds.indexOf(s),u=l+r;if(a=l>-1?this.activeOptionIds[u]:void 0,o){const c=this.activeOptionIds.length-1;u<0&&(a=this.activeOptionIds[c]),u>c&&(a=this.activeOptionIds[0])}}}a&&this.setState({highlightedOptionId:a},()=>{this.focusOption(a)})},this.goToPage=n=>{var i;if(!n){Ne(!1,"Cannot go to page because there was no page id provided.");return}if(typeof n!="string"){Ne(!1,`Cannot go to page because parameter newPageId has to be string (valid page id). Current newPageId is "${typeof n}".`);return}if(!((i=this.pageMap)!==null&&i!==void 0&&i[n])){Ne(!1,`Cannot go to page because page with id: "${n}" doesn't exist.`);return}const r=this._pageHistory[this._pageHistory.length-1],o=this._pageHistory.indexOf(n);return o<0?this._pageHistory.push(n):this._pageHistory.splice(o+1,this._pageHistory.length-1),this.setState({activePageId:n,highlightedOptionId:void 0}),{prevPageId:r,newPageId:n}},this.goToPreviousPage=()=>{if(!this.previousPage){Ne(!1,`There is no previous page to go to. The current page history is: [${this._pageHistory.join(", ")}].`);return}const n=this.goToPage(this.previousPage.id),i=n.newPageId,r=n.prevPageId;return{newPageId:i,prevPageId:r}},this.handleBackButtonClick=()=>{const n=this.currentPage,i=n.onBackButtonClicked,r=this.goToPreviousPage(),o=r.newPageId,s=r.prevPageId;typeof i=="function"&&i(o,s)},this.handleOptionSelect=(n,{id:i})=>{const r=this.getPageChildById(i);if(n.persist(),!i||!r||r.props.disabled||n.target.getAttribute("disabled")||n.target.getAttribute("aria-disabled")){n.preventDefault(),n.stopPropagation();return}const o=this.props,s=o.shouldHideOnSelect,a=o.onSelect,l=r.groupProps,u=Ie(r,CY),c=u.props,d=c.subPageId,h=c.href,p=c.value,m=c.onOptionClick;if(typeof m=="function"&&m(n,{optionId:i,drilldown:this,...this.exposedNavigationProps}),d&&this.goToPage(d),n.type==="keydown"&&h){var O;const y=(O=this._drilldownRef)===null||O===void 0?void 0:O.querySelector(`#${i}`);y.tagName.toLowerCase()==="a"&&y!==null&&y!==void 0&&y.href&&y.click()}l!=null&&l.selectableType?this.handleGroupOptionSelected(n,r):typeof a=="function"&&a(n,{value:p,isSelected:!0,selectedOption:u,drilldown:this}),s&&!d&&i!==this._headerBackId&&this.hide(n)},this.handleKeyDown=n=>{const i=n.target.id,r=this.getPageChildById(i);if([" ","space","Space"].includes(n.key)&&(n.preventDefault(),n.stopPropagation(),r&&this.handleOptionSelect(n,{id:i})),n.key==="ArrowRight"&&r!=null&&r.props.subPageId&&this.handleOptionSelect(n,{id:i}),n.key==="ArrowLeft"){var o;this._pageHistory.length>1&&this.handleBackButtonClick(),this.isOnRootPage&&(o=this._popover)!==null&&o!==void 0&&o.shown&&this._popover.hide(n)}},this.handleToggle=(n,i)=>{const r=this.props.onToggle;this.setState({isShowingPopover:i}),typeof r=="function"&&r(n,{shown:i,drilldown:this,...this.exposedNavigationProps})},this.state={isShowingPopover:e.trigger?!!e.show:!1,activePageId:e.rootPageId,highlightedOptionId:void 0,lastSelectedId:void 0,selectedGroupOptionsMap:this.setDefaultSelected()},this._pageHistory=[e.rootPageId],this._id=e.id||e.deterministicId(),this._triggerId=e.deterministicId("Drilldown-Trigger"),this._headerBackId=e.deterministicId("DrilldownHeader-Back"),this._headerTitleId=e.deterministicId("DrilldownHeader-Title"),this._headerTitleLabelId=e.deterministicId("DrilldownHeader-Title-Label"),this._headerActionId=e.deterministicId("DrilldownHeader-Action")}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.makeStylesVariables)}componentDidUpdate(e,n){var i,r;(i=(r=this.props).makeStyles)===null||i===void 0||i.call(r,this.makeStylesVariables),n.activePageId!==this.state.activePageId&&setTimeout(()=>{this.focused()||this.focus()},0),this.currentPage||(this.previousPage?this.goToPreviousPage():this.goToPage(this.props.rootPageId)),this.state.highlightedOptionId&&!this.getPageChildById(this.state.highlightedOptionId)&&this.setState({highlightedOptionId:void 0})}get makeStylesVariables(){return{hasHighlightedOption:!!this.state.highlightedOptionId}}get activeOptionIds(){return Object.keys(this._activeOptionsMap)}get activeOptions(){return Object.values(this._activeOptionsMap)}get pages(){const e=this.props.children;return z.Children.toArray(e||[])}get pageMap(){if(!this.props.children)return;const n={};return this.pages.forEach(i=>{const r=i.props,o=r.children;n[r.id]={...r,children:z.Children.toArray(o||[])}}),n}get isOnRootPage(){return this.state.activePageId===this.props.rootPageId}get currentPage(){return this.getPageById(this.state.activePageId)}get previousPage(){const e=this._pageHistory[this._pageHistory.length-2];return this.getPageById(e)}get exposedNavigationProps(){const e=this.goToPage,n=this.goToPreviousPage;return{pageHistory:[...this._pageHistory],goToPage:e,goToPreviousPage:n}}get currentPageAriaLabel(){var e;if(this.props["aria-labelledby"])return this.props["aria-labelledby"];if((e=this.currentPage)!==null&&e!==void 0&&e.renderTitle)return this._headerTitleLabelId;if(this.isOnRootPage&&this.props.trigger)return this._triggerId}getChildrenArray(e){return e?Array.isArray(e)?e:[e]:[]}getPageById(e){return this.pageMap&&e?this.pageMap[e]:void 0}getPageChildById(e){return e?this._activeOptionsMap[e]:void 0}setDefaultSelected(){const e={};return this.pages.forEach(n=>{const i=n.props.children;this.getChildrenArray(i).forEach(r=>{if(Me(r,[Dg])){var o;const s=r.props,a=s.id,l=s.selectableType,u=s.defaultSelected,c=u===void 0?[]:u,d=s.children;if(!l)return;if(l&&!e[a]&&(e[a]=new Map),l==="single"&&c.length>1){Ge(!1,`Radio type selectable groups can have only one item selected! Group with id "${a}" cannot select multiple items: [${c.join(", ")}]!`);return}e[a]=new Map,(o=this.getChildrenArray(d))===null||o===void 0||o.forEach(h=>{if(Me(h,[wr])){const p=h.props,m=p.id,O=p.value,y=p.defaultSelected;if(y===!1)return;const b=typeof O<"u"&&c.filter(v=>typeof v<"u").includes(O);(y||b)&&e[a].set(m,O)}})}})}),e}get selectedGroupOptionIdsArray(){return Object.values(this.state.selectedGroupOptionsMap).map(e=>Array.from(e.keys())).flat()}get headerChildren(){const e=this.currentPage,n=this.props,i=n.styles,r=n.deterministicId,o=[];if(!e)return o;const s=e.children,a=e.renderBackButtonLabel,l=e.renderTitle,u=e.renderActionLabel,c=e.onHeaderActionClicked,d=e.withoutHeaderSeparator;if(this.previousPage){const h=ot(this.previousPage.renderTitle),p=ot(a,h);o.push(C(wr,{id:this._headerBackId,onOptionClick:this.handleBackButtonClick},C("div",{css:i==null?void 0:i.headerBack,role:"presentation"},p)))}if(l){const h=ot(l);h&&o.push(C(wr,{id:this._headerTitleId,role:"presentation","aria-hidden":"true"},C("div",{css:i==null?void 0:i.headerTitle,id:this._headerTitleLabelId},h)))}if(u){const h=ot(u);h&&o.push(C(wr,{id:this._headerActionId,themeOverride:{color:i==null?void 0:i.headerActionColor},onOptionClick:p=>{typeof c=="function"&&c(p)}},h))}return o.length>0&&s.length>0&&!d&&o.push(C(Nc,{id:r("DrilldownHeader-Separator")})),o}get shown(){return this.props.trigger?this.state.isShowingPopover:!0}containsDuplicateChild(e){let n=!1;const i=new Map;for(const r of e)if(!i.has(r.props.id))i.set(r.props.id,!0);else return Ne(!1,`Duplicate id: "${r.props.id}"! Make sure all options have unique ids, otherwise they won't be rendered.`),n=!0;return n}reset(){this._activeOptionsMap={},this.setState({highlightedOptionId:void 0})}focus(){if(this.shown){var e,n;Ge(!!((e=this._drilldownRef)!==null&&e!==void 0&&e.focus),"[Drilldown] Could not focus the drilldown."),(n=this._drilldownRef)===null||n===void 0||n.focus()}else{var i;Ge(!!((i=this._trigger)!==null&&i!==void 0&&i.focus),"[Drilldown] Could not focus the trigger."),this._trigger.focus()}}focused(){return this.shown?ru(this._drilldownRef):ru(this._trigger)}focusOption(e){const n=this._containerElement,i=n==null?void 0:n.querySelector(`[id="${e}"]`);i==null||i.focus()}handleGroupOptionSelected(e,n){this.setState(i=>{var r;const o=n.props,s=o.id,a=o.value,l=n.groupProps,u=l.id,c=l.selectableType;let d=new Map(i.selectedGroupOptionsMap[u]);return c==="multiple"&&(!((r=i.selectedGroupOptionsMap[u])===null||r===void 0)&&r.has(s))?d.delete(s):c==="multiple"?d.set(s,a):c==="single"&&(d=new Map,d.set(s,a)),{...i,selectedGroupOptionsMap:{...i.selectedGroupOptionsMap,[u]:d}}},()=>{const i=n.props.value,r=n.groupProps,o=r.id,s=r.onSelect,a=this.props.onSelect;n.groupProps;const l=Ie(n,TY),u=[...this.state.selectedGroupOptionsMap[o].values()];typeof s=="function"&&s(e,{value:u,isSelected:u.includes(i),selectedOption:l,drilldown:this}),typeof a=="function"&&a(e,{value:u,isSelected:u.includes(i),selectedOption:l,drilldown:this})})}renderList(e,n){const i=this.currentPage,r=this.headerChildren;if(!i||this.containsDuplicateChild(i.children))return null;const o=[...r,...i.children];let s=!1;return o.map((a,l)=>{if(Me(a,[Dg])){const u=l===0,c=l===o.length-1,d=s,h=!a.props.withoutSeparators&&!u&&!d,p=!a.props.withoutSeparators&&!c;return s=p,this.renderGroup(a,e,n,h,p)}else return Me(a,[Nc])?s?null:(s=!0,this.renderSeparator(a)):Me(a,[wr])?(s=!1,this.renderOption(a,e,n)):null})}renderSeparator(e){const n=e.props,i=n.id,r=n.themeOverride,o=Ie(n,PY);return C(di.Separator,Object.assign({},o,{id:i,key:i,role:"separator",themeOverride:r}))}renderOption(e,n,i,r){var o,s,a,l,u;const c=this.props.styles;let d=!1;const h=e.props,p=h.id,m=h.children,O=h.href,y=h.as,b=h.role,v=h.subPageId,S=h.disabled,k=h.renderLabelInfo,x=h.renderBeforeLabel,_=h.renderAfterLabel,w=h.beforeLabelContentVAlign,D=h.afterLabelContentVAlign,W=h.description,I=h.descriptionRole,V=h.elementRef,B=h.themeOverride;if(!p)return Ne(!1,"Drilldown.Option without id won't be rendered. It is needed to internally track the options."),null;let H={...Re(e.props,[...wr.allowedProps,...di.Item.allowedProps]),...n({id:p,...b&&!["gridcell","option","row","tab","columnheader","rowheader","treeitem"].includes(b)&&{"aria-selected":void 0}}),themeOverride:B,renderBeforeLabel:x,renderAfterLabel:_,beforeLabelContentVAlign:w,afterLabelContentVAlign:D,description:W,descriptionRole:I,as:y,role:b,elementRef:V,variant:"default",tabIndex:-1};const K={groupProps:r},re=p!==this._headerBackId&&(this.props.disabled||((o=this.currentPage)===null||o===void 0?void 0:o.disabled)||(r==null?void 0:r.disabled)||S);re&&(H.variant="disabled",H={...H,...i()}),p!==this._headerTitleId&&(this._activeOptionsMap[p]={...e,...K});const ke=b!==wr.defaultProps.role?b:void 0;v&&(H.renderAfterLabel=eP||(eP=C(ka,null)),H["aria-haspopup"]=!0,H.role=ke||"button",Ne(!_,`The prop "renderAfterLabel" is reserved on item with id: "${p}". When it has "subPageId" provided, a navigation arrow will render after the label.`)),p===this._headerBackId&&(H.renderBeforeLabel=tP||(tP=C(Vd,null)));const ge=typeof e.props.selected=="boolean";if((r!=null&&r.selectableType||ge)&&r){if(ge)d=!!e.props.selected;else{var Z;d=!!(!((Z=this.state.selectedGroupOptionsMap[r.id])===null||Z===void 0)&&Z.has(p))}H["aria-checked"]=d,H.renderBeforeLabel=C(Pu,{style:{opacity:d?1:0}}),Ne(!x,`The prop "renderBeforeLabel" is reserved on item with id: "${p}". When this option is a selectable member of a Drilldown.Group, selection indicator will render before the label.`),r.selectableType==="single"&&(H.role=ke||"menuitemradio"),r.selectableType==="multiple"&&(H.role=ke||"menuitemcheckbox")}p===this.state.highlightedOptionId&&(H.variant="highlighted",re&&(H.variant="highlighted-disabled")),O&&(v?Ne(!1,`Drilldown.Option with id "${p}" has subPageId, so it will ignore the "href" property.`):r!=null&&r.selectableType?Ne(!1,`Drilldown.Option with id "${p}" is in a selectable group, so it will ignore the "href" property.`):H.href=O);const se=ot(m,{id:p,variant:H.variant,isSelected:d});if(!se)return Ne(!1,`There are no "children" prop provided for option with id: "${p}", so it won't be rendered.`),null;const A={variant:H.variant,vAlign:D,as:y,role:H.role,isSelected:d};typeof H.renderBeforeLabel=="function"&&!((s=H.renderBeforeLabel)!==null&&s!==void 0&&(a=s.prototype)!==null&&a!==void 0&&a.isReactComponent)&&(H.renderBeforeLabel=H.renderBeforeLabel.bind(null,A)),typeof H.renderAfterLabel=="function"&&!((l=H.renderAfterLabel)!==null&&l!==void 0&&(u=l.prototype)!==null&&u!==void 0&&u.isReactComponent)&&(H.renderAfterLabel=H.renderAfterLabel.bind(null,A));const Oe=k&&ot(k,A),ye={start:"flex-start",center:"center",end:"flex-end"},L=`${p}__label`,Ve=`${p}__info`,tt=e.props["aria-labelledby"]||L,Be=e.props["aria-describedby"]||(Oe?Ve:void 0);return C(di.Item,Object.assign({},H,{key:p,"aria-labelledby":tt,"aria-describedby":Be}),C("div",{css:c==null?void 0:c.optionContainer,role:"none"},C("span",{css:c==null?void 0:c.optionContent,role:"none",id:L},se),Oe?C("span",{css:c==null?void 0:c.optionLabelInfo,role:"presentation",style:{alignSelf:ye[D]}},C("span",{id:Ve},Oe)):null))}renderGroup(e,n,i,r,o){const s=e.props,a=s.id,l=s.children,u=s.renderGroupTitle,c=s.themeOverride,d=s.role,h=s.as,p=s.elementRef;if(!l)return null;const m=[];return r&&m.push(nP||(nP=C(di.Separator,null))),m.push(C(di,{id:a,key:a,role:d,as:h||this.props.as,renderLabel:u,elementRef:p,themeOverride:c},this.getChildrenArray(l).map(O=>Me(O,[Nc])?this.renderSeparator(O):Me(O,[wr])?this.renderOption(O,n,i,e.props):null))),o&&m.push(iP||(iP=C(di.Separator,null))),m}renderPage(){const e=this.props,n=e.styles,i=e.overflowY,r=e.overflowX,o=e.height,s=e.width,a=e.minHeight,l=e.minWidth,u=e.maxHeight,c=e.maxWidth,d=e.role,h=e.as,p=e.label;return this.currentPage?C(XM,{isShowingOptions:this.shown,highlightedOptionId:this.state.highlightedOptionId,selectedOptionId:this.selectedGroupOptionIdsArray,onRequestShowOptions:this.show,onRequestHideOptions:this.hide,onRequestSelectOption:this.handleOptionSelect,onRequestHighlightOption:this.handleOptionHighlight,onRequestHighlightFirstOption:m=>{const O=this.activeOptionIds[0];this.handleOptionHighlight(m,{id:O})},onRequestHighlightLastOption:m=>{const O=this.activeOptionIds[this.activeOptionIds.length-1];this.handleOptionHighlight(m,{id:O})}},({getTriggerProps:m,getListProps:O,getOptionProps:y,getDisabledOptionProps:b})=>C(be,Object.assign({as:"div",elementRef:this.handleDrilldownRef,tabIndex:0,css:n==null?void 0:n.drilldown,position:"relative",borderRadius:"small",width:s,minWidth:c,maxWidth:c,role:d,"aria-label":p,"aria-labelledby":this.currentPageAriaLabel},m({id:this._id,"aria-haspopup":!1,"aria-expanded":void 0,onKeyDown:this.handleKeyDown,onBlur:v=>{const S=v.currentTarget,k=v.relatedTarget,x=dd(S,k);(!k||k===this._drilldownRef||k!==S&&!x)&&this.setState({highlightedOptionId:void 0})},onMouseLeave:()=>{this.setState({highlightedOptionId:void 0})}})),C(be,{as:"div",overflowY:i,overflowX:r,height:o,width:s,minHeight:a,minWidth:l,maxHeight:u,maxWidth:c,css:n==null?void 0:n.container,borderRadius:"small",role:"presentation",elementRef:v=>{this._containerElement=v}},C(di,Object.assign({},O(),{role:"presentation",as:h}),this.renderList(y,b))))):null}render(){this._activeOptionsMap={};const e=this.props,n=e.show,i=e.defaultShow,r=e.placement,o=e.withArrow,s=e.shouldContainFocus,a=e.shouldReturnFocus,l=e.trigger,u=e.mountNode,c=e.constrain,d=e.positionTarget,h=e.positionContainerDisplay,p=e.popoverRef,m=e.disabled,O=e.onDismiss,y=e.onFocus,b=e.onMouseOver,v=e.offsetX,S=e.offsetY;return l?C(ob,{isShowingContent:n,defaultIsShowingContent:i,shouldCloseOnDocumentClick:!0,onHideContent:(k,{documentClick:x})=>{typeof O=="function"&&O(k,x),this.reset(),this.handleToggle(k,!1)},onShowContent:k=>this.handleToggle(k,!0),mountNode:u,placement:r,withArrow:o,positionTarget:d,positionContainerDisplay:h,constrain:c,shouldContainFocus:s,shouldReturnFocus:a,id:this._id,on:["click"],onFocus:y,onMouseOver:b,offsetX:v,offsetY:S,elementRef:k=>{this.handleRef(k)},ref:k=>{this._popover=k,typeof p=="function"&&p(k)},renderTrigger:$t(l,{ref:k=>{this._trigger=k},"aria-haspopup":this.props.role,id:this._triggerId,disabled:!!(l.props.disabled||m),"aria-disabled":l.props.disabled||m?"true":void 0})},this.renderPage()):this.renderPage()}},vr.displayName="Drilldown",vr.componentId="Drilldown",vr.propTypes=_Y,vr.allowedProps=EY,vr.defaultProps={disabled:!1,rotateFocus:!0,as:"ul",role:"menu",overflowX:"auto",overflowY:"auto",placement:"bottom center",defaultShow:!1,shouldHideOnSelect:!0,shouldContainFocus:!1,shouldReturnFocus:!0,withArrow:!0,offsetX:0,offsetY:0},vr.Group=Dg,vr.Option=wr,vr.Page=Ru,vr.Separator=Nc,vr))||oc)||oc)||oc);const AY=(t,e)=>{const n=e.size,i={small:{fontSize:t.smallIconSize},medium:{fontSize:t.mediumIconSize},large:{fontSize:t.largeIconSize}};return{select:{label:"select",fontSize:t.fontSize,fontFamily:t.fontFamily,fontWeight:t.fontWeight,color:t.color},icon:{label:"select__icon",...i[n]},assistiveText:{label:"select__assistiveText",display:"none"}}},RY=t=>{const e=t.colors,n=t.typography;return{...{fontSize:n==null?void 0:n.fontSizeMedium,fontFamily:n==null?void 0:n.fontFamily,fontWeight:n==null?void 0:n.fontWeightNormal,smallIconSize:n==null?void 0:n.fontSizeXSmall,mediumIconSize:n==null?void 0:n.fontSizeSmall,largeIconSize:n==null?void 0:n.fontSizeMedium,color:e==null?void 0:e.textDarkest,background:e==null?void 0:e.backgroundLightest}}},IY={id:f.string.isRequired,isHighlighted:f.bool,isSelected:f.bool,isDisabled:f.bool,renderBeforeLabel:f.oneOfType([f.node,f.func]),renderAfterLabel:f.oneOfType([f.node,f.func]),children:f.node},$Y=["id","isHighlighted","isSelected","isDisabled","renderBeforeLabel","renderAfterLabel","children"];let Ir=class extends T.Component{render(){return null}};Ir.displayName="Option";Ir.componentId="Select.Option";Ir.allowedProps=$Y;Ir.propTypes=IY;Ir.defaultProps={isHighlighted:!1,isSelected:!1,isDisabled:!1};const LY={renderLabel:f.oneOfType([f.node,f.func]).isRequired,children:pt.oneOf([Ir])},NY=["renderLabel","children"];let er=class extends T.Component{render(){return null}};er.displayName="Group";er.componentId="Select.Group";er.allowedProps=NY;er.propTypes=LY;er.defaultProps={};const MY={renderLabel:f.oneOfType([f.node,f.func]).isRequired,inputValue:f.string,id:f.string,size:f.oneOf(["small","medium","large"]),assistiveText:f.string,placeholder:f.string,interaction:f.oneOf(["enabled","disabled","readonly"]),isRequired:f.bool,isInline:f.bool,width:f.string,htmlSize:f.number,visibleOptionsCount:f.number,optionsMaxHeight:f.string,optionsMaxWidth:f.string,messages:f.arrayOf(ds.message),placement:Jt.placement,constrain:Jt.constrain,mountNode:Jt.mountNode,onFocus:f.func,onBlur:f.func,onInputChange:f.func,isShowingOptions:f.bool,onRequestShowOptions:f.func,onRequestHideOptions:f.func,onRequestHighlightOption:f.func,onRequestSelectOption:f.func,inputRef:f.func,listRef:f.func,renderBeforeInput:f.oneOfType([f.node,f.func]),renderAfterInput:f.oneOfType([f.node,f.func]),children:pt.oneOf([er,Ir]),shouldNotWrap:f.bool,scrollToHighlightedOption:f.bool},DY=["renderLabel","inputValue","isShowingOptions","id","size","assistiveText","placeholder","interaction","isRequired","isInline","width","htmlSize","visibleOptionsCount","optionsMaxHeight","optionsMaxWidth","messages","placement","constrain","mountNode","onFocus","onBlur","onInputChange","onRequestShowOptions","onRequestHideOptions","onRequestHighlightOption","onRequestSelectOption","inputRef","listRef","renderBeforeInput","renderAfterInput","children","shouldNotWrap","scrollToHighlightedOption"],BY=["id","renderLabel","children"],QY=["renderLabel","inputValue","placeholder","isRequired","shouldNotWrap","size","isInline","width","htmlSize","messages","renderBeforeInput","renderAfterInput","onFocus","onBlur","onInputChange","onRequestHideOptions"],FY=["ref"];var rP,oP,sP,sc,Qo,aP,lP,uP,cP;const ZM=T.memo(function(e){const n=e.optionsItemProps,i=e.children;return C(di.Item,Object.assign({as:"li"},n),i)},(t,e)=>t.selectOption.props.isHighlighted===e.selectOption.props.isHighlighted&&t.selectOption.props.isSelected===e.selectOption.props.isSelected&&t.selectOption.props.isDisabled===e.selectOption.props.isDisabled&&t.selectOption.props.children===e.selectOption.props.children&&t.selectOption.props.id===e.selectOption.props.id&&t.selectOption.props.renderBeforeLabel===e.selectOption.props.renderBeforeLabel&&t.selectOption.props.renderAfterLabel===e.selectOption.props.renderAfterLabel&&t.children===e.children);ZM.displayName="Item";let Cm=(rP=Ht(),oP=de(AY,RY),sP=Le(),rP(sc=oP(sc=sP(sc=(Qo=class qM extends T.Component{constructor(...e){super(...e),this.state={hasInputRef:!1},this.ref=null,this._input=null,this._defaultId=this.props.deterministicId(),this._inputContainer=null,this._listView=null,this._optionIds=[],this._optionHeight=36,this.handleInputRef=n=>{var i,r;this.state.hasInputRef||this.setState({hasInputRef:!0}),this._input=n,(i=(r=this.props).inputRef)===null||i===void 0||i.call(r,n)},this.handleListRef=n=>{var i,r;(i=(r=this.props).listRef)===null||i===void 0||i.call(r,n),n&&n.querySelector('[role="option"]')&&(this._optionHeight=n.querySelector('[role="option"]').offsetHeight)},this.handleInputContainerRef=n=>{this._inputContainer=n}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n),this.props.scrollToHighlightedOption&&requestAnimationFrame(()=>this.scrollToOption(this.highlightedOptionId))}focus(){this._input&&this._input.focus()}get childrenArray(){return T.Children.toArray(this.props.children)}getGroupChildrenArray(e){return T.Children.toArray(e.props.children)}get focused(){return this._input?Co(this._input):!1}get id(){return this.props.id||this._defaultId}get width(){return this._inputContainer?this._inputContainer.offsetWidth:void 0}get interaction(){return Go({props:this.props})}get highlightedOptionId(){let e;return this.childrenArray.forEach(n=>{Me(n,[er])?this.getGroupChildrenArray(n).forEach(i=>{i.props.isHighlighted&&(e=i.props.id)}):n.props.isHighlighted&&(e=n.props.id)}),e}get selectedOptionId(){const e=[];if(this.childrenArray.forEach(n=>{Me(n,[er])?this.getGroupChildrenArray(n).forEach(i=>{i.props.isSelected&&e.push(i.props.id)}):n.props.isSelected&&e.push(n.props.id)}),e.length===1)return e[0];if(e.length!==0)return e}scrollToOption(e){if(this._listView){const n=this._listView.querySelector(`[id="${e}"]`);if(!n)return;const i=n.parentNode,r=Xt(this._listView).top,o=Xt(i).top,s=r+this._listView.clientHeight,a=o+(i?i.clientHeight:0);a>s?this._listView.scrollTop+=a-s:o{i==null||i(s);const a=this.selectedOptionId;a&&!Array.isArray(a)&&this.highlightOption(s,a)},onRequestHideOptions:s=>{r==null||r(s)},onRequestHighlightOption:(s,{id:a,direction:l})=>{if(!n)return;const u=this.highlightedOptionId;let c=this._optionIds.indexOf(a)>-1?a:void 0;if(!c)if(!u)c=this._optionIds[0];else{const d=this._optionIds.indexOf(u);c=d>-1?this._optionIds[d+l]:void 0}c&&this.highlightOption(s,c)},onRequestHighlightFirstOption:s=>{this.highlightOption(s,this._optionIds[0])},onRequestHighlightLastOption:s=>{this.highlightOption(s,this._optionIds[this._optionIds.length-1])},onRequestSelectOption:(s,{id:a})=>{a&&this._optionIds.indexOf(a)!==-1&&(o==null||o(s,{id:a}))}}:{}}renderOption(e,n){const i=n.getOptionProps,r=n.getDisabledOptionProps,o=e.props,s=o.id,a=o.isDisabled,l=o.isHighlighted,u=o.isSelected,c=o.renderBeforeLabel,d=o.renderAfterLabel,h=o.children,p=O=>{var y;return typeof O=="function"&&!(O!=null&&(y=O.prototype)!==null&&y!==void 0&&y.isReactComponent)?O.bind(null,{id:s,isDisabled:a,isSelected:u,isHighlighted:l,children:h}):O};let m={...Re(e.props,[...Ir.allowedProps,...di.Item.allowedProps]),...i({id:s}),renderBeforeLabel:p(c),renderAfterLabel:p(d)};return u?m.variant="selected":l&&(m.variant="highlighted"),a?(m.variant="disabled",m={...m,...r()}):this._optionIds.push(s),C(ZM,{optionsItemProps:m,selectOption:e},h)}renderGroup(e,n){const i=n.getOptionProps,r=n.getDisabledOptionProps,o=n.isFirstChild,s=n.isLastChild,a=n.afterGroup,l=e.props,u=l.id,c=l.renderLabel,d=l.children,h=Ie(l,BY),p=[];return!o&&!a&&p.push(aP||(aP=C(di.Separator,null))),p.push(C(di,Object.assign({id:u,as:"ul",role:"group",renderLabel:c},Re(h,[...di.allowedProps,...er.allowedProps])),T.Children.map(d,m=>this.renderOption(m,{getOptionProps:i,getDisabledOptionProps:r})))),s||p.push(lP||(lP=C(di.Separator,null))),p}renderList(e){const n=e.getListProps,i=e.getOptionProps,r=e.getDisabledOptionProps,o=this.props,s=o.isShowingOptions,a=o.optionsMaxWidth,l=o.optionsMaxHeight,u=o.visibleOptionsCount,c=o.children;let d=!1;const h=s?{display:"block",overflowY:"auto",maxHeight:l||this._optionHeight*u,maxWidth:a||this.width,background:"primary",elementRef:p=>this._listView=p}:{maxHeight:0};return C(be,h,C(di,n({as:"ul",elementRef:this.handleListRef}),s?T.Children.map(c,(p,m)=>{if(!(!p||!Me(p,[er,Ir]))){if(Me(p,[Ir]))return d=!1,this.renderOption(p,{getOptionProps:i,getDisabledOptionProps:r});if(Me(p,[er])){const O=d;return d=!0,this.renderGroup(p,{getOptionProps:i,getDisabledOptionProps:r,isFirstChild:m===0,isLastChild:m===T.Children.count(c)-1,afterGroup:O})}}}):null))}renderIcon(){const e=this.props,n=e.styles,i=e.isShowingOptions;return C("span",{css:n==null?void 0:n.icon},i?uP||(uP=C(xu,{inline:!1})):cP||(cP=C(ku,{inline:!1})))}renderInput(e){const n=e.getInputProps,i=e.getTriggerProps,r=this.props,o=r.renderLabel,s=r.inputValue,a=r.placeholder,l=r.isRequired,u=r.shouldNotWrap,c=r.size,d=r.isInline,h=r.width,p=r.htmlSize,m=r.messages,O=r.renderBeforeInput,y=r.renderAfterInput,b=r.onFocus,v=r.onBlur,S=r.onInputChange,k=r.onRequestHideOptions,x=Ie(r,QY),_=this.interaction,w=Re(x,qM.allowedProps),D=i({...w}),W=D.ref,I=Ie(D,FY),V=typeof S<"u",B=V?{}:{role:zW()?"button":"combobox",title:s,"aria-autocomplete":void 0,"aria-readonly":!0};w.autoComplete&&(B.autoComplete=w.autoComplete);const H={id:this.id,renderLabel:o,placeholder:a,size:c,width:h,htmlSize:p,messages:m,value:s,inputRef:ut(W,this.handleInputRef),inputContainerRef:this.handleInputContainerRef,interaction:_==="enabled"&&!V?"readonly":_,isRequired:l,shouldNotWrap:u,display:d?"inline-block":"block",renderBeforeInput:O,renderAfterInput:y||this.renderIcon(),onChange:typeof S=="function"?S:s?()=>{}:void 0,onFocus:b,onBlur:ut(v,k),...B};return C(Gk,Object.assign({},I,n(H)))}render(){const e=this.props,n=e.constrain,i=e.placement,r=e.mountNode,o=e.assistiveText,s=e.isShowingOptions,a=e.styles;this._optionIds=[];const l=this.highlightedOptionId,u=this.selectedOptionId;return C(XM,Object.assign({highlightedOptionId:l,isShowingOptions:s,selectedOptionId:u},this.getEventHandlers()),({getRootProps:c,getInputProps:d,getTriggerProps:h,getListProps:p,getOptionProps:m,getDisabledOptionProps:O,getDescriptionProps:y})=>C("span",Object.assign({},c({css:a==null?void 0:a.select}),{ref:b=>this.ref=b}),this.renderInput({getInputProps:d,getTriggerProps:h}),C("span",Object.assign({},y(),{css:a==null?void 0:a.assistiveText}),o),C(ob,{constrain:n,placement:i,mountNode:r,positionTarget:this._inputContainer,isShowingContent:s,shouldReturnFocus:!1,withArrow:!1},this.renderList({getListProps:p,getOptionProps:m,getDisabledOptionProps:O}))))}},Qo.displayName="Select",Qo.componentId="Select",Qo.allowedProps=DY,Qo.propTypes=MY,Qo.defaultProps={inputValue:"",isShowingOptions:!1,size:"medium",interaction:void 0,isRequired:!1,isInline:!1,visibleOptionsCount:8,placement:"bottom stretch",constrain:"window",shouldNotWrap:!1,scrollToHighlightedOption:!1},Qo.Option=Ir,Qo.Group=er,Qo))||sc)||sc)||sc);const zY={expanded:Su(f.bool,"onToggle","defaultExpanded"),defaultExpanded:f.bool,onToggle:f.func,children:f.func,render:f.func},HY=["expanded","defaultExpanded","onToggle","children","render"];var dP,hP,ac;const UY=({expanded:t})=>({expanded:!t});let fP=(dP=Ht(),dP(hP=(ac=class extends T.Component{constructor(e){super(e),this._contentId=void 0,this.handleToggle=n=>{this.isControlled()||this.setState(UY),this.props.onToggle(n,!this.expanded)},this.state={expanded:this.isControlled(e)?e.expanded:e.defaultExpanded},this._contentId=e.deterministicId()}get expanded(){return this.isControlled()?this.props.expanded:this.state.expanded}isControlled(e=this.props){return typeof e.expanded=="boolean"}static getDerivedStateFromProps(e,n){return typeof e.expanded=="boolean"&&e.expanded!==n.expanded?{expanded:e.expanded}:null}render(){const e=this.props,n=e.children,i=e.render,r=i===void 0?n:i;return typeof r=="function"?r({expanded:this.expanded,getToggleProps:(o={})=>({"aria-controls":this._contentId,"aria-expanded":this.expanded,onClick:ut(this.handleToggle,o.onClick),...o}),getDetailsProps:()=>({id:this._contentId})}):null}},ac.displayName="Expandable",ac.propTypes=zY,ac.allowedProps=HY,ac.defaultProps={defaultExpanded:!1,onToggle:function(){},children:null},ac))||hP);const WY=(t,e)=>{const n=e.overlay,i=e.withBlur,r=e.withGrayscale,o=e.constrain,s=o==="cover",a=o==="contain",l={transition:`all ${t.effectTransitionDuration}`},u=()=>{const p=[];return i&&p.push(`blur(${t.imageBlurAmount})`),r&&p.push("grayscale(1)"),p.length>0?{...l,filter:p.join(" ")}:{filter:"none"}},c={width:"100%",height:"100%"},d={objectFit:"cover",...c},h={objectFit:"contain",...c,...n&&{width:"auto",height:"auto",maxWidth:"100%",maxHeight:"100%"}};return{overlay:{label:"img__overlay",position:"absolute",top:"0px",left:"0px",width:"100%",height:"100%",...l,...n&&{backgroundColor:n.color,opacity:n.opacity*.1,mixBlendMode:n.blend?n.blend:void 0}},container:{label:"img__container",...n&&{position:"relative",overflow:"hidden"},...s&&c,...a&&{height:"inherit"}},img:{label:"img",margin:"0",padding:"0",float:"none",top:"auto",bottom:"auto",left:"auto",right:"auto",lineHeight:"normal",position:"static",transform:"none",maxHeight:"none",minHeight:"0",minWidth:"0",maxWidth:"100%",...u(),...n&&{display:"block"},...s&&d,...a&&h}}},VY=()=>({...{effectTransitionDuration:"1s",imageBlurAmount:"0.25em"}}),jY={src:f.string.isRequired,alt:f.string,display:f.oneOf(["inline-block","block"]),loading:f.oneOf(["eager","lazy"]),margin:ct.spacing,overlay:f.shape({color:f.string.isRequired,opacity:f.oneOf([0,1,2,3,4,5,6,7,8,9,10]).isRequired,blend:f.oneOf(["normal","multiply","screen","overlay","color-burn"])}),withGrayscale:f.bool,withBlur:f.bool,constrain:f.oneOf(["cover","contain"]),elementRef:f.func,height:f.oneOfType([f.string,f.number]),width:f.oneOfType([f.string,f.number])},XY=["src","alt","display","loading","margin","overlay","withGrayscale","withBlur","constrain","elementRef","height","width"],ZY=["src","alt","margin","display","overlay","withGrayscale","withBlur","constrain","width","height","elementRef","styles","loading"];var pP,mP,Tm,dl;let qY=(pP=de(WY,VY),mP=Le(),pP(Tm=mP(Tm=(dl=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){const e=this.props,n=e.src,i=e.alt,r=e.margin,o=e.display,s=e.overlay;e.withGrayscale,e.withBlur,e.constrain;const a=e.width,l=e.height;e.elementRef;const u=e.styles,c=e.loading,d=Ie(e,ZY),h={alt:i||""},p={css:u==null?void 0:u.img,src:n,loading:c},m={...It(d),width:a,height:l,margin:r,display:o,elementRef:this.handleRef};if(s){const O={...m};return C(be,Object.assign({},O,{as:"span",css:u==null?void 0:u.container}),C("img",Object.assign({},p,h)),s&&C("span",{css:u==null?void 0:u.overlay}))}else return C(be,Object.assign({},m,p,h,{as:"img"}))}},dl.displayName="Img",dl.componentId="Img",dl.propTypes=jY,dl.allowedProps=XY,dl.defaultProps={alt:"",display:"inline-block",withGrayscale:!1,withBlur:!1},dl))||Tm)||Tm);const YY=(t,e)=>{const n=e.size,i=e.delimiter,r=e.spacing,o=i!=="none",s=r!=="none";Ge(!(o&&s),"[InlineList] `itemSpacing` has no effect inside Lists with the `delimiter` prop set to anything other than `none`.");const a={small:{fontSize:t.fontSizeSmall},medium:{fontSize:t.fontSizeMedium},large:{fontSize:t.fontSizeLarge}},l={"xxx-small":{marginInlineStart:t.spacingXXXSmall,marginInlineEnd:t.spacingXXXSmall},"xx-small":{marginInlineStart:t.spacingXXSmall,marginInlineEnd:t.spacingXXSmall},"x-small":{marginInlineStart:t.spacingXSmall,marginInlineEnd:t.spacingXSmall},small:{marginInlineStart:t.spacingSmall,marginInlineEnd:t.spacingSmall},medium:{marginInlineStart:t.spacingMedium,marginInlineEnd:t.spacingMedium},large:{marginInlineStart:t.spacingLarge,marginInlineEnd:t.spacingLarge},"x-large":{marginInlineStart:t.spacingXLarge,marginInlineEnd:t.spacingXLarge},"xx-large":{marginInlineStart:t.spacingXXLarge,marginInlineEnd:t.spacingXXLarge},none:{}},u={none:{marginInlineStart:t.noneSpacing,marginInlineEnd:t.noneSpacing},pipe:{marginInlineStart:t.pipeSpacing,marginInlineEnd:t.pipeSpacing,"&::after":{content:'"\\007C"'}},slash:{marginInlineStart:t.slashSpacing,marginInlineEnd:t.slashSpacing,"&::after":{content:'"\\002F"'}},arrow:{marginInlineStart:t.arrowSpacing,marginInlineEnd:t.arrowSpacing,"&::after":{content:'"\\003E"'}}};return{inlineListItem:{label:"inlineListItem",fontWeight:t.fontWeight,fontFamily:t.fontFamily,verticalAlign:"middle",boxSizing:"border-box",lineHeight:t.lineHeight,color:t.color,...s&&!o&&l[r],...a[n],"&:first-of-type":{marginInlineStart:0},"&:last-of-type":{marginInlineEnd:0}},delimiter:{label:"inlineListItem__delimiter",...u[i],"[class$=-inlineListItem]:last-of-type > &:last-child::after":{content:"none"}}}},GY=t=>{const e=t.colors,n=t.spacing,i=t.typography,r=t.key,o={canvas:{color:t["ic-brand-font-color-dark"]}};return{...{fontFamily:i==null?void 0:i.fontFamily,fontWeight:i==null?void 0:i.fontWeightNormal,fontSizeSmall:i==null?void 0:i.fontSizeSmall,fontSizeMedium:i==null?void 0:i.fontSizeMedium,fontSizeLarge:i==null?void 0:i.fontSizeLarge,color:e==null?void 0:e.textDark,lineHeight:i==null?void 0:i.lineHeightCondensed,noneSpacing:n==null?void 0:n.xSmall,pipeSpacing:n==null?void 0:n.xSmall,slashSpacing:n==null?void 0:n.xSmall,arrowSpacing:n==null?void 0:n.xSmall,marginBottomDefault:n==null?void 0:n.xxxSmall,spacingXXXSmall:n==null?void 0:n.xxxSmall,spacingXXSmall:n==null?void 0:n.xxSmall,spacingXSmall:n==null?void 0:n.xSmall,spacingSmall:n==null?void 0:n.small,spacingMedium:n==null?void 0:n.medium,spacingLarge:n==null?void 0:n.large,spacingXLarge:n==null?void 0:n.xLarge,spacingXXLarge:n==null?void 0:n.xxLarge},...o[r]}},KY={children:f.oneOfType([f.node,f.func]).isRequired,delimiter:f.oneOf(["none","pipe","slash","arrow"]),size:f.oneOf(["small","medium","large"]),margin:ct.spacing,padding:ct.spacing,spacing:f.oneOf(["none","xxx-small","xx-small","x-small","small","medium","large","x-large","xx-large"]),elementRef:f.func},JY=["children","delimiter","size","margin","padding","spacing","elementRef"],eG=["delimiter","size","margin","padding","elementRef","children","spacing","styles"];var gP,OP,Pm,hl;let YM=(gP=de(YY,GY),OP=Le(),gP(Pm=OP(Pm=(hl=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){const e=this.props;e.delimiter,e.size;const n=e.margin,i=e.padding;e.elementRef;const r=e.children;e.spacing;const o=e.styles,s=Ie(e,eG);return C(be,Object.assign({},It(s),{css:o==null?void 0:o.inlineListItem,as:"li",margin:n,padding:i,display:"inline-block",maxWidth:"100%",elementRef:this.handleRef}),r,C("span",{css:o==null?void 0:o.delimiter,"aria-hidden":"true"}))}},hl.displayName="InlineListItem",hl.componentId="InlineList.Item",hl.propTypes=KY,hl.allowedProps=JY,hl.defaultProps={padding:"none",spacing:"none",delimiter:"none",size:"medium"},hl))||Pm)||Pm);const tG={children:pt.oneOf([YM]),as:f.oneOf(["ul","ol"]),margin:ct.spacing,size:f.oneOf(["small","medium","large"]),delimiter:f.oneOf(["none","pipe","slash","arrow"]),itemSpacing:f.oneOf(["none","xxx-small","xx-small","x-small","small","medium","large","x-large","xx-large"]),elementRef:f.func},nG=["children","as","margin","size","delimiter","itemSpacing","elementRef"],iG=["as","margin","elementRef"];var bP,yP,fl;let Eh=(bP=Le(),bP(yP=(fl=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}renderChildren(){return T.Children.map(this.props.children,e=>{if(e)return $t(e,{delimiter:this.props.delimiter,size:this.props.size,spacing:this.props.itemSpacing})})}render(){const e=this.props,n=e.as,i=e.margin;e.elementRef;const r=Ie(e,iG);return z.createElement(be,Object.assign({},It(r),{as:n,margin:i,padding:"0",elementRef:this.handleRef,display:"block"}),this.renderChildren())}},fl.displayName="InlineList",fl.propTypes=tG,fl.allowedProps=nG,fl.defaultProps={itemSpacing:"none",as:"ul",margin:"none",delimiter:"none",size:"medium"},fl.Item=YM,fl))||yP);const rG=(t,e)=>{const n=e.size,i=e.delimiter,r=e.spacing,o=i!=="none",s=r!=="none";Ge(!(o&&s),"[List] `itemSpacing` has no effect inside Lists with the `delimiter` prop set to anything other than `none`.");const a={small:{fontSize:t.fontSizeSmall},medium:{fontSize:t.fontSizeMedium},large:{fontSize:t.fontSizeLarge}},l={"xxx-small":{marginTop:t.spacingXXXSmall,marginBottom:t.spacingXXXSmall},"xx-small":{marginTop:t.spacingXXSmall,marginBottom:t.spacingXXSmall},"x-small":{marginTop:t.spacingXSmall,marginBottom:t.spacingXSmall},small:{marginTop:t.spacingSmall,marginBottom:t.spacingSmall},medium:{marginTop:t.spacingMedium,marginBottom:t.spacingMedium},large:{marginTop:t.spacingLarge,marginBottom:t.spacingLarge},"x-large":{marginTop:t.spacingXLarge,marginBottom:t.spacingXLarge},"xx-large":{marginTop:t.spacingXXLarge,marginBottom:t.spacingXXLarge},none:{}},u={dashed:{listStylePosition:"inside","&:not(:first-of-type)":{borderTop:t.delimiterDashedBorder}},solid:{listStylePosition:"inside","&:not(:first-of-type)":{borderTop:t.delimiterSolidBorder}},none:{}};return{listItem:{label:"listItem",fontWeight:t.fontWeight,fontFamily:t.fontFamily,lineHeight:t.lineHeight,color:t.color,padding:0,...a[n],...s&&!o&&l[r],...o&&u[i],"&:first-of-type":{marginTop:"0"},"&:last-of-type":{marginBottom:"0"}}}},oG=t=>{const e=t.borders,n=t.colors,i=t.spacing,r=t.typography,o=t.key,s={canvas:{color:t["ic-brand-font-color-dark"]}};return{...{fontFamily:r==null?void 0:r.fontFamily,fontWeight:r==null?void 0:r.fontWeightNormal,lineHeight:r==null?void 0:r.lineHeight,fontSizeSmall:r==null?void 0:r.fontSizeSmall,fontSizeMedium:r==null?void 0:r.fontSizeMedium,fontSizeLarge:r==null?void 0:r.fontSizeLarge,color:n==null?void 0:n.textDarkest,spacingXXXSmall:i==null?void 0:i.xxxSmall,spacingXXSmall:i==null?void 0:i.xxSmall,spacingXSmall:i==null?void 0:i.xSmall,spacingSmall:i==null?void 0:i.small,spacingMedium:i==null?void 0:i.medium,spacingLarge:i==null?void 0:i.large,spacingXLarge:i==null?void 0:i.xLarge,spacingXXLarge:i==null?void 0:i.xxLarge,delimiterDashedBorder:`${e==null?void 0:e.widthSmall} dashed ${n==null?void 0:n.borderMedium}`,delimiterSolidBorder:`${e==null?void 0:e.widthSmall} solid ${n==null?void 0:n.borderMedium}`},...s[o]}},sG={children:f.oneOfType([f.node,f.func]).isRequired,delimiter:f.oneOf(["none","dashed","solid"]),size:f.oneOf(["small","medium","large"]),margin:ct.spacing,padding:ct.spacing,spacing:f.oneOf(["none","xxx-small","xx-small","x-small","small","medium","large","x-large","xx-large"]),elementRef:f.func},aG=["children","delimiter","size","margin","padding","spacing","elementRef"],lG=["delimiter","spacing","size","margin","padding","elementRef","children","styles"];var vP,SP,Am,pl;let GM=(vP=de(rG,oG),SP=Le(),vP(Am=SP(Am=(pl=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){const e=this.props;e.delimiter,e.spacing,e.size;const n=e.margin,i=e.padding;e.elementRef;const r=e.children,o=e.styles,s=Ie(e,lG);return C(be,Object.assign({},It(s),{css:o==null?void 0:o.listItem,as:"li",margin:n,padding:i,maxWidth:"100%",elementRef:this.handleRef}),r)}},pl.displayName="ListItem",pl.componentId="List.Item",pl.propTypes=sG,pl.allowedProps=aG,pl.defaultProps={padding:"none",spacing:"none",delimiter:"none",size:"medium"},pl))||Am)||Am);const uG=(t,e)=>{const n=e.isUnstyled,r=e.as==="ol";return{list:{label:"list",paddingInlineStart:t.listPadding,paddingInlineEnd:0,...r&&{listStyleType:"none",paddingInlineStart:`calc(${t.listPadding} / 2)`,paddingInlineEnd:0,counterReset:"ol-counter","&>li::before":{fontWeight:t.orderedNumberFontWeight,counterIncrement:"ol-counter",content:'counters(ol-counter, ".") "."',marginInlineEnd:t.orderedNumberMargin,marginInlineStart:0}},...n&&{listStyleType:"none",paddingInlineStart:0}}}},cG=t=>{const e=t.spacing,n=t.typography;return{...{listPadding:e==null?void 0:e.large,orderedNumberFontWeight:n==null?void 0:n.fontWeightBold,orderedNumberMargin:e==null?void 0:e.xSmall}}},dG={children:pt.oneOf([GM]),as:f.oneOf(["ul","ol"]),delimiter:f.oneOf(["none","dashed","solid"]),isUnstyled:f.bool,margin:ct.spacing,size:f.oneOf(["small","medium","large"]),itemSpacing:f.oneOf(["none","xxx-small","xx-small","x-small","small","medium","large","x-large","xx-large"]),elementRef:f.func},hG=["children","as","delimiter","isUnstyled","margin","size","itemSpacing","elementRef"],fG=["as","margin","isUnstyled","elementRef","styles"];var wP,kP,Rm,ks;let Ch=(wP=de(uG,cG),kP=Le(),wP(Rm=kP(Rm=(ks=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}renderChildren(){return T.Children.map(this.props.children,e=>{if(e)return $t(e,{isUnstyled:this.props.isUnstyled,delimiter:this.props.delimiter,size:this.props.size,spacing:this.props.itemSpacing})})}render(){const e=this.props,n=e.as,i=e.margin;e.isUnstyled,e.elementRef;const r=e.styles,o=Ie(e,fG);return C(be,Object.assign({},It(o),{css:r==null?void 0:r.list,as:n,margin:i,elementRef:this.handleRef,display:"block"}),this.renderChildren())}},ks.displayName="List",ks.componentId="List",ks.propTypes=dG,ks.allowedProps=hG,ks.defaultProps={as:"ul",delimiter:"none",isUnstyled:!1,size:"medium",itemSpacing:"none"},ks.Item=GM,ks))||Rm)||Rm);const pG=(t,e)=>{const n=e.itemSpacing,i=e.fixMenuTriggerWidth;return{truncateList:{label:"truncateList",boxSizing:"border-box",listStyleType:"none",margin:"0",padding:"0",overflow:"hidden",display:"flex",justifyContent:"flex-start",alignItems:"center"},listItem:{label:"truncateList__listItem",...{minWidth:"0.0625rem",flexShrink:0,flexGrow:0},"& + &":{paddingInlineStart:n}},menuTrigger:{label:"truncateList__menuTrigger",maxWidth:"100%",...i&&{width:i},paddingInlineStart:n,"&:first-of-type":{paddingInlineStart:0}}}},mG={children:f.node,visibleItemsCount:f.number,onUpdate:f.func,renderHiddenItemMenu:f.func,itemSpacing:f.string,fixMenuTriggerWidth:f.string,debounce:f.number,elementRef:f.func},xP=["children","renderHiddenItemMenu","visibleItemsCount","itemSpacing","fixMenuTriggerWidth","debounce","onUpdate","elementRef"];var _P,EP,Im,ml;let KM=(_P=de(pG,null),EP=Le(),_P(Im=EP(Im=(ml=class extends T.Component{constructor(e){super(e),this.ref=null,this._menuTriggerRef=null,this._debouncedHandleResize=void 0,this._resizeListener=void 0,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.measureItems=()=>{const n=this.props,i=n.fixMenuTriggerWidth,r=n.itemSpacing,o=Yn(r),s=Yn(i||this.state.menuTriggerWidth);let a=0;if(this.ref){const l=Xt(this.ref),u=l.width,c=Fr(this.ref),d=c.paddingInlineStart,h=c.paddingInlineEnd,p=u-Yn(d)-Yn(h),m=Array.from(this.ref.getElementsByTagName("li")).map(y=>Xt(y).width);let O=0;for(let y=0;y{this.setState({isMeasuring:!0},()=>{const n=this.measureItems(),i=n.visibleItemsCount;typeof this.props.onUpdate=="function"&&this.props.onUpdate({visibleItemsCount:i}),this.setState({isMeasuring:!1})})},this.state={isMeasuring:!1,menuTriggerWidth:void 0}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n);const i=Xt(this.ref),r=i.width;this._debouncedHandleResize=nb(this.handleResize,this.props.debounce,{leading:!0,trailing:!0}),this._resizeListener=new ResizeObserver(s=>{for(const l of s){const u=l.contentRect.width;if(r!==u){var a;(a=this._debouncedHandleResize)===null||a===void 0||a.call(this)}}});const o=this.props.fixMenuTriggerWidth?Yn(this.props.fixMenuTriggerWidth):this.calcMenuTriggerWidth();this.setState({menuTriggerWidth:o},()=>{var s,a;(s=this._resizeListener)===null||s===void 0||s.observe(this.ref),(a=this._debouncedHandleResize)===null||a===void 0||a.call(this)})}componentDidUpdate(e,n){var i,r;if((i=(r=this.props).makeStyles)===null||i===void 0||i.call(r),e.fixMenuTriggerWidth!==this.props.fixMenuTriggerWidth||e.itemSpacing!==this.props.itemSpacing){var o;(o=this._debouncedHandleResize)===null||o===void 0||o.call(this)}if(this.ref&&n.isMeasuring&&n.isMeasuring!==this.state.isMeasuring){const s=this.calcMenuTriggerWidth();s&&this.state.menuTriggerWidth!==s&&this.setState({menuTriggerWidth:s},()=>{var a;(a=this._debouncedHandleResize)===null||a===void 0||a.call(this)})}}componentWillUnmount(){this._resizeListener&&this._resizeListener.disconnect(),this._debouncedHandleResize&&this._debouncedHandleResize.cancel()}get childrenArray(){return T.Children.toArray(this.props.children)}get visibleChildren(){const e=this.props.visibleItemsCount,n=this.state,i=n.isMeasuring;if(typeof n.menuTriggerWidth>"u")return[];const o=typeof e>"u"?this.childrenArray:this.childrenArray.splice(0,e);return i?this.childrenArray:o}get hiddenChildren(){return this.state.isMeasuring?[]:this.childrenArray.splice(this.visibleChildren.length,this.childrenArray.length)}calcMenuTriggerWidth(){const e=this.props.fixMenuTriggerWidth;if(!this._menuTriggerRef)return 0;if(e)return Yn(e);const n=this._menuTriggerRef.children;let i=0;return Array.from(n).forEach(r=>{i+=Xt(r).width}),i}render(){const e=this.props,n=e.styles,i=e.className,r=e.style,o=e.renderHiddenItemMenu,s=this.visibleChildren,a=this.hiddenChildren;return C("ul",Object.assign({ref:this.handleRef},Re(this.props,xP),{className:i,style:r,css:n==null?void 0:n.truncateList}),s.map((l,u)=>C("li",{key:u,css:n==null?void 0:n.listItem},l)),typeof o=="function"&&a&&a.length>0&&C("li",{key:"menuTrigger",css:[n==null?void 0:n.listItem,n==null?void 0:n.menuTrigger],ref:l=>{this._menuTriggerRef=l}},o(a)))}},ml.displayName="TruncateList",ml.componentId="TruncateList",ml.propTypes=mG,ml.allowedProps=xP,ml.defaultProps={itemSpacing:"0",debounce:300},ml))||Im)||Im);const gG=(t,e)=>{const n=e.disabled,i=e.variant,r=e.context,o=e.size,s=e.inline,a=p=>`[class$=-radioInput__input]:${p} + [class$=-radioInput__control] &`,l={success:{backgroundColor:t.toggleBackgroundSuccess},danger:{backgroundColor:t.toggleBackgroundDanger},warning:{backgroundColor:t.toggleBackgroundWarning},off:{backgroundColor:t.toggleBackgroundOff}},u={simple:{base:{boxSizing:"border-box",display:"block",position:"relative",marginInlineEnd:t.simpleFacadeMarginEnd,marginInlineStart:"0",flexShrink:0,minWidth:"1rem",transition:"all 0.2s ease-out",borderRadius:"100%",border:`${t.borderWidth} solid ${t.borderColor}`,background:t.background,"&::before":{content:'""',position:"absolute",top:"-0.375rem",left:"-0.375rem",width:"calc(100% + 0.75rem)",height:"calc(100% + 0.75rem)",boxSizing:"border-box",borderRadius:"100%",border:`${t.focusBorderWidth} ${t.focusBorderStyle} ${t.focusBorderColor}`,transition:"all 0.2s",transform:"scale(0.75)",opacity:0,pointerEvents:"none"},[a("hover")]:{borderColor:t.hoverBorderColor},[a("focus")]:{background:t.background,"&::before":{transform:"scale(1)",opacity:1}}},small:{width:t.simpleFacadeSmallSize,height:t.simpleFacadeSmallSize,[a("checked")]:{background:t.background,boxShadow:`inset 0 0 0 ${t.simpleCheckedInsetSmall} ${t.hoverBorderColor}`,borderColor:t.hoverBorderColor}},medium:{width:t.simpleFacadeMediumSize,height:t.simpleFacadeMediumSize,[a("checked")]:{background:t.background,boxShadow:`inset 0 0 0 ${t.simpleCheckedInsetMedium} ${t.hoverBorderColor}`,borderColor:t.hoverBorderColor}},large:{width:t.simpleFacadeLargeSize,height:t.simpleFacadeLargeSize,[a("checked")]:{background:t.background,boxShadow:`inset 0 0 0 ${t.simpleCheckedInsetLarge} ${t.hoverBorderColor}`,borderColor:t.hoverBorderColor}}},toggle:{base:{boxSizing:"border-box",visibility:"hidden",display:"block",position:"absolute",zIndex:1,top:"0",left:"0",width:"100%",height:"100%",boxShadow:t.toggleShadow,borderRadius:t.toggleBorderRadius,...l[r],"&::before":{content:'""',position:"absolute",top:"-0.25rem",left:"-0.25rem",width:"calc(100% + 0.5rem)",height:"calc(100% + 0.5rem)",boxSizing:"border-box",borderRadius:`calc(${t.toggleBorderRadius} + 0.0625rem)`,border:`${t.focusBorderWidth} ${t.focusBorderStyle} ${t.focusBorderColor}`,transition:"all 0.2s",transform:"scale(0.75)",opacity:0},[a("checked")]:{visibility:"visible"},[a("focus")]:{"&::before":{opacity:1,transform:"scale(1)"}}},small:{},medium:{},large:{}}},c={simple:{base:{display:"flex",alignItems:"flex-start"},small:{},medium:{},large:{}},toggle:{base:{display:"block",userSelect:"none",boxSizing:"border-box",position:"relative"},small:{padding:"0 0.5rem",height:t.toggleSmallHeight},medium:{padding:"0 0.875rem",height:t.toggleMediumHeight},large:{padding:"0 1rem",height:t.toggleLargeHeight}}},d={simple:{base:{},small:{fontSize:t.simpleFontSizeSmall},medium:{fontSize:t.simpleFontSizeMedium},large:{fontSize:t.simpleFontSizeLarge}},toggle:{base:{position:"relative",zIndex:1,textTransform:"uppercase",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",lineHeight:1,display:"flex",alignItems:"center",minWidth:"0.0625rem",[a("checked")]:{color:t.toggleHandleText},[a("focus")]:{textDecoration:"underline"}},small:{fontSize:t.toggleSmallFontSize,height:t.toggleSmallHeight,svg:{fontSize:`calc(${t.toggleSmallFontSize} + 0.375rem)`}},medium:{fontSize:t.toggleMediumFontSize,height:t.toggleMediumHeight,svg:{fontSize:`calc(${t.toggleMediumFontSize} + 0.375rem)`}},large:{fontSize:t.toggleLargeFontSize,height:t.toggleLargeHeight,svg:{fontSize:`calc(${t.toggleLargeFontSize} + 0.375rem)`}}}},h={padding:"0",margin:"0",fontSize:"inherit",lineHeight:"inherit",width:"auto",position:"absolute",top:"0",left:"0",opacity:1e-4};return{radioInput:{label:"radioInput",position:"relative",width:"100%",...n&&{opacity:.5},...s&&{display:"inline-block",verticalAlign:"middle",width:"auto"},"&:hover":{cursor:"default",...n&&{cursor:"not-allowed"}}},input:{label:"radioInput__input",...h,'&:is(input)[type="radio"]':h,'&:-webkit-any(input)[type="radio"]':h},control:{label:"radioInput__control",all:"initial",display:"block",direction:"inherit",textAlign:"start",...c[i].base,...c[i][o]},facade:{label:"radioInput__facade",...u[i].base,...u[i][o]},label:{label:"radioInput__label",flex:"1 1 auto",color:t.labelColor,fontFamily:t.labelFontFamily,fontWeight:t.labelFontWeight,lineHeight:t.labelLineHeight,...d[i].base,...d[i][o],cursor:"default"}}},OG=t=>{const e=t.spacing,n=t.borders,i=t.colors,r=t.forms,o=t.shadows,s=t.typography,a=t.key,l={canvas:{focusBorderColor:t["ic-brand-primary"],hoverBorderColor:t["ic-brand-font-color-dark"],labelColor:t["ic-brand-font-color-dark"]},"canvas-high-contrast":{toggleBackgroundOff:i==null?void 0:i.backgroundDarkest}};return{...{labelColor:i==null?void 0:i.textDarkest,labelFontFamily:s==null?void 0:s.fontFamily,labelFontWeight:s==null?void 0:s.fontWeightNormal,labelLineHeight:s==null?void 0:s.lineHeightCondensed,background:i==null?void 0:i.backgroundLightest,borderWidth:n==null?void 0:n.widthSmall,borderColor:i==null?void 0:i.borderMedium,hoverBorderColor:i==null?void 0:i.borderDarkest,controlSize:"0.1875rem",focusBorderColor:i==null?void 0:i.borderBrand,focusBorderWidth:n==null?void 0:n.widthMedium,focusBorderStyle:n==null?void 0:n.style,simpleFacadeSmallSize:"1rem",simpleFacadeMediumSize:"1.25rem",simpleFacadeLargeSize:"1.75rem",simpleCheckedInsetSmall:"0.1875rem",simpleCheckedInsetMedium:"0.25rem",simpleCheckedInsetLarge:"0.375rem",simpleFontSizeSmall:s==null?void 0:s.fontSizeSmall,simpleFontSizeMedium:s==null?void 0:s.fontSizeMedium,simpleFontSizeLarge:s==null?void 0:s.fontSizeLarge,simpleFacadeMarginEnd:e==null?void 0:e.xSmall,toggleBorderRadius:n==null?void 0:n.radiusSmall,toggleBorderWidth:n==null?void 0:n.widthLarge,toggleBackgroundSuccess:i==null?void 0:i.backgroundSuccess,toggleBackgroundOff:i==null?void 0:i.backgroundDark,toggleBackgroundDanger:i==null?void 0:i.backgroundDanger,toggleBackgroundWarning:i==null?void 0:i.backgroundWarning,toggleHandleText:i==null?void 0:i.textLightest,toggleSmallHeight:r==null?void 0:r.inputHeightSmall,toggleMediumHeight:r==null?void 0:r.inputHeightMedium,toggleLargeHeight:r==null?void 0:r.inputHeightLarge,toggleShadow:o==null?void 0:o.depth1,toggleSmallFontSize:s==null?void 0:s.fontSizeXSmall,toggleMediumFontSize:s==null?void 0:s.fontSizeSmall,toggleLargeFontSize:s==null?void 0:s.fontSizeMedium},...l[a]}},bG={label:f.node.isRequired,value:f.oneOfType([f.string,f.number]),id:f.string,name:f.string,checked:f.bool,disabled:f.bool,readOnly:f.bool,variant:f.oneOf(["simple","toggle"]),size:f.oneOf(["small","medium","large"]),context:f.oneOf(["success","warning","danger","off"]),inline:f.bool,onClick:f.func,onChange:f.func},yG=["label","value","id","name","checked","disabled","readOnly","variant","size","context","inline","onClick","onChange"];var CP,TP,PP,lc,gl;let Ll=(CP=Ht(),TP=de(gG,OG),PP=Le(),CP(lc=TP(lc=PP(lc=(gl=class JM extends T.Component{constructor(e){super(e),this.ref=null,this._defaultId=void 0,this._input=null,this.handleClick=n=>{if(this.props.disabled||this.props.readOnly){n.preventDefault();return}typeof this.props.onClick=="function"&&this.props.onClick(n)},this.handleChange=n=>{if(this.props.disabled||this.props.readOnly){n.preventDefault();return}typeof this.props.checked>"u"&&this.setState({checked:!this.state.checked}),typeof this.props.onChange=="function"&&this.props.onChange(n)},typeof e.checked>"u"&&(this.state={checked:!1}),this._defaultId=e.deterministicId()}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}focus(){var e;(e=this._input)===null||e===void 0||e.focus()}get id(){return this.props.id||this._defaultId}get focused(){return Co(this._input)}get checked(){return typeof this.props.checked>"u"?this.state.checked:this.props.checked}render(){const e=this.props,n=e.disabled,i=e.readOnly,r=e.label,o=e.value,s=e.name,a=e.styles,l=Re(this.props,JM.allowedProps);return C("div",{css:a==null?void 0:a.radioInput,ref:u=>{this.ref=u}},C("input",Object.assign({},l,{id:this.id,ref:u=>{this._input=u},value:o,name:s,checked:this.checked,type:"radio",css:a==null?void 0:a.input,disabled:n||i,"aria-disabled":n||i?"true":void 0,onChange:this.handleChange,onClick:this.handleClick})),C("label",{css:a==null?void 0:a.control,htmlFor:this.id},C("span",{css:a==null?void 0:a.facade,"aria-hidden":"true"}),C("span",{css:a==null?void 0:a.label},r)))}},gl.displayName="RadioInput",gl.componentId="RadioInput",gl.allowedProps=yG,gl.propTypes=bG,gl.defaultProps={variant:"simple",size:"medium",disabled:!1,inline:!1,context:"success",readOnly:!1},gl))||lc)||lc)||lc);const vG={name:f.string.isRequired,description:f.node.isRequired,defaultValue:f.oneOfType([f.string,f.number]),value:Su(f.oneOfType([f.string,f.number])),onChange:f.func,disabled:f.bool,readOnly:f.bool,messages:f.arrayOf(ds.message),children:f.node,variant:f.oneOf(["simple","toggle"]),size:f.oneOf(["small","medium","large"]),layout:f.oneOf(["stacked","columns","inline"])},SG=["name","description","defaultValue","value","onChange","disabled","readOnly","messages","children","variant","size","layout"];var AP,RP,$m,Ol;let ky=(AP=Ht(),RP=Le(),AP($m=RP($m=(Ol=class e6 extends T.Component{constructor(e){super(e),this.ref=null,this._messagesId=void 0,this.handleRef=n=>{this.ref=n},this.handleChange=n=>{const i=n.target.value;if(this.props.disabled||this.props.readOnly){n.preventDefault();return}typeof this.props.value>"u"&&this.setState({value:i}),typeof this.props.onChange=="function"&&this.props.onChange(n,i)},typeof e.value>"u"&&(this.state={value:e.defaultValue}),this._messagesId=e.deterministicId("RadioInputGroup-messages")}get hasMessages(){return!!this.props.messages&&this.props.messages.length>0}get value(){return typeof this.props.value>"u"?this.state.value:this.props.value}renderChildren(){const e=this.props,n=e.children,i=e.name,r=e.variant,o=e.size,s=e.disabled,a=e.readOnly;return T.Children.map(n,(l,u)=>{if(Me(l,[Ll])){const c=this.value===l.props.value,d=!this.value&&u===0;return $t(l,{name:i,disabled:s||l.props.disabled,variant:r,size:o,checked:c,onChange:this.handleChange,readOnly:a||l.props.readOnly,width:l.props.width||"auto","aria-describedby":this.hasMessages?this._messagesId:void 0,tabIndex:c||d?0:-1,label:l.props.label})}else return l})}render(){const e=this.props,n=e.variant,i=e.layout,r=e.description;return z.createElement(qv,Object.assign({},Re(this.props,e6.allowedProps),cs(this.props,qv.allowedProps),{description:r,layout:i==="columns"&&n==="toggle"?"stacked":i,vAlign:n==="toggle"?"middle":"top",rowSpacing:"small",colSpacing:n==="toggle"?"none":"small",startAt:n==="toggle"?"small":void 0,messagesId:this._messagesId,elementRef:this.handleRef}),this.renderChildren())}},Ol.displayName="RadioInputGroup",Ol.componentId="RadioInputGroup",Ol.allowedProps=SG,Ol.propTypes=vG,Ol.defaultProps={disabled:!1,variant:"simple",size:"medium",layout:"stacked",readOnly:!1},Ol))||$m)||$m);function wG(t,e){const n={};return Object.keys(t).forEach(i=>{const r=t[i],o=r.minWidth,s=r.maxWidth,a=r.minHeight,l=r.maxHeight;n[i]={minWidth:o&&Yn(o,e)||0,maxWidth:s&&Yn(s,e)||1/0,minHeight:a&&Yn(a,e)||0,maxHeight:l&&Yn(l,e)||1/0}}),function({width:i,height:r}){const o={};return Object.entries(n).forEach(([s,a])=>{const l=a.minWidth,u=a.maxWidth,c=a.minHeight,d=a.maxHeight;o[s]=l<=i&&i<=u&&c<=r&&r<=d}),o}}const kG=(t,e,n)=>{const i=typeof e=="function"?e():e,r=Xt(i),o=r.width,s=r.height;let a=[];const l=d=>{const h=t6(t,i,a,d);h&&(a=h,n(a))},u=nb(l,100,{leading:!1,trailing:!0}),c=new ResizeObserver(d=>{for(const h of d){const p=h.contentRect,m=p.width,O=p.height;o!==m&&u({width:m,height:O})}});return c.observe(i),l({width:o,height:s}),{remove(){c&&c.disconnect(),u&&u.cancel()}}};function t6(t,e,n=[],i){const r=rt(e);let o=i||Xt(r),s=o.width,a=o.height;s=Math.floor(s),a=Math.floor(a);const l=wG(t,r)({width:s,height:a}),u=Object.keys(l).filter(c=>l[c]).map(c=>c);return n.length!==u.length||n.filter(c=>u.indexOf(c)===-1).length>0?u:null}function n6(t,e){const n=Object.keys(t);if(n.length>4)throw new Error("Expected maximum 4 keys in query object.");let i="";const r="and";for(const o of n){const s=["minHeight","maxHeight","minWidth","maxWidth"];if(s.indexOf(o)===-1)throw new Error(`Invalid key \`${o}\` in query object. Valid keys should consist of one of the following: ${s.join(", ")} (case sensitive)`);const a=t[o];if(typeof a!="string"&&typeof a!="number")throw new Error("The value of the query object must be a string or number.");if(!a)throw new Error("No value supplied for query object");i+=`(${xG(o)}: ${Yn(a,e)}px) ${r} `}return i.slice(0,-r.length-2)}function xG(t){const e=t.toLowerCase();return e.slice(0,3)+"-"+e.slice(3)}const _G=(t,e,n,i=NW)=>{const r=typeof e=="function"?e():e,o=l=>{const u=Object.keys(l).filter(c=>l[c].matches).map(c=>c);n(u)},s={},a=()=>{o(s)};return Object.keys(t).forEach(l=>{const u=i(n6(t[l],r),r);u&&(u.addListener(a),s[l]=u)}),o(s),{remove(){s&&Object.keys(s).forEach(l=>{s[l].removeListener(a)})}}},EG={validQuery(t,e,n){try{return n6(t[e]),null}catch(i){return new Error(`Invalid query prop supplied to \`${n}\`. ${i.message}`)}}},CG={match:f.oneOf(["element","media"]),query:f.objectOf(EG.validQuery).isRequired,props:f.objectOf(f.object),render:f.func,children:f.func,display:f.oneOf(["inline","block","inline-block","flex","inline-flex"]),elementRef:f.func},TG=["match","query","props","render","children","display","elementRef"];class Ap extends T.Component{constructor(...e){super(...e),this.ref=null,this._matchListener=null,this.state={matches:[],hasRendered:!1},this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.updateMatches=(n,i)=>{this.setState({matches:n},()=>{typeof i=="function"&&i()})}}componentDidMount(){if(Ge(!!(this.props.render||this.props.children),"[Responsive] must have either a `render` prop or `children` prop."),this.props.match==="element"){const e=t6(this.props.query,this)||[];this.setState({matches:e,hasRendered:!0})}else this.setState({hasRendered:!0});this._matchListener=this.addMatchListener(this.props.query,this.updateMatches)}componentWillUnmount(){this.removeMatchListener()}componentDidUpdate(e){const n=this.props,i=n.match,r=n.query;(i!==e.match||!KO(r,e.query))&&(this.removeMatchListener(),this._matchListener=this.addMatchListener(r,this.updateMatches,i))}addMatchListener(e,n,i=this.props.match){return(i==="element"?kG:_G)(e,()=>rt(this),n)}removeMatchListener(){this._matchListener&&this._matchListener.remove()}mergeProps(e,n){if(!n)return null;const i={};return e.forEach(r=>{const o=n[r];Object.keys(o).forEach(s=>{const a=i[s];Ne(!(s in i),[`[Responsive] The prop \`${s}\` is defined at 2 or more breakpoints`,`which are currently applied at the same time. Its current value, \`${a}\`,`,`will be overwritten as \`${o[s]}\`.`].join(" ")),i[s]=o[s]})}),i}render(){const e=this.state,n=e.matches,i=e.hasRendered,r=this.props,o=r.props,s=r.render,a=r.children,l=r.display;let u;return i&&(u=a||s),z.createElement("div",{ref:this.handleRef,style:{display:l}},u&&u(this.mergeProps(n,o),n))}}Ap.displayName="Responsive";Ap.allowedProps=TG;Ap.propTypes=CG;Ap.defaultProps={children:null,match:"element",props:null};const PG={id:f.string.isRequired,value:f.oneOfType([f.string,f.number]).isRequired,isDisabled:f.bool,renderBeforeLabel:f.oneOfType([f.node,f.func]),renderAfterLabel:f.oneOfType([f.node,f.func]),children:f.string},AG=["id","value","isDisabled","renderBeforeLabel","renderAfterLabel","children"];let $r=class extends T.Component{render(){return null}};$r.displayName="Option";$r.componentId="SimpleSelect.Option";$r.allowedProps=AG;$r.propTypes=PG;$r.defaultProps={isDisabled:!1};const RG={renderLabel:f.oneOfType([f.node,f.func]).isRequired,children:pt.oneOf([$r])},IG=["renderLabel","children"];class mo extends T.Component{render(){return null}}mo.displayName="Group";mo.componentId="SimpleSelect.Group";mo.allowedProps=IG;mo.propTypes=RG;mo.defaultProps={};const $G={renderLabel:f.oneOfType([f.node,f.func]).isRequired,value:f.oneOfType([f.string,f.number]),defaultValue:f.string,id:f.string,size:f.oneOf(["small","medium","large"]),assistiveText:f.string,placeholder:f.string,interaction:f.oneOf(["enabled","disabled","readonly"]),isRequired:f.bool,isInline:f.bool,width:f.string,visibleOptionsCount:f.number,optionsMaxHeight:f.string,optionsMaxWidth:f.string,messages:f.arrayOf(ds.message),placement:Jt.placement,constrain:Jt.constrain,mountNode:Jt.mountNode,onChange:f.func,onFocus:f.func,onBlur:f.func,onShowOptions:f.func,onHideOptions:f.func,inputRef:f.func,listRef:f.func,renderEmptyOption:f.oneOfType([f.node,f.func]),renderBeforeInput:f.oneOfType([f.node,f.func]),renderAfterInput:f.oneOfType([f.node,f.func]),children:pt.oneOf([mo,$r])},LG=["renderLabel","value","defaultValue","id","size","assistiveText","placeholder","interaction","isRequired","isInline","width","visibleOptionsCount","optionsMaxHeight","optionsMaxWidth","messages","placement","constrain","mountNode","onChange","onFocus","onBlur","onShowOptions","onHideOptions","inputRef","listRef","renderEmptyOption","renderBeforeInput","renderAfterInput","children"],NG=["id","value","children","renderBeforeLabel","renderAfterLabel"],MG=["id","renderLabel","children"],DG=["renderLabel","value","defaultValue","id","size","assistiveText","placeholder","interaction","isRequired","isInline","width","optionsMaxWidth","optionsMaxHeight","visibleOptionsCount","messages","placement","constrain","mountNode","inputRef","listRef","renderEmptyOption","renderBeforeInput","renderAfterInput","onFocus","onBlur","onShowOptions","onHideOptions","children"];var IP,$P,Lm,Fo;let LP=(IP=Ht(),$P=Le(),IP(Lm=$P(Lm=(Fo=class extends T.Component{constructor(e){super(e),this.ref=null,this._emptyOptionId=void 0,this.getOption=(i,r)=>{const o=T.Children.toArray(this.props.children);let s;for(let a=0;a{this.ref=i},this.handleBlur=i=>{this.setState({highlightedOptionId:void 0}),typeof this.props.onBlur=="function"&&this.props.onBlur(i)},this.handleShowOptions=i=>{this.setState({isShowingOptions:!0}),typeof this.props.onShowOptions=="function"&&this.props.onShowOptions(i)},this.handleHideOptions=i=>{this.setState(r=>{const o=this.getOption("id",r.selectedOptionId);return{isShowingOptions:!1,highlightedOptionId:void 0,inputValue:o?o.props.children:""}}),typeof this.props.onHideOptions=="function"&&this.props.onHideOptions(i)},this.handleHighlightOption=(i,{id:r})=>{if(r===this._emptyOptionId)return;const o=this.getOption("id",r),s=o==null?void 0:o.props.children,a=i.type==="keydown"?s:this.state.inputValue;this.setState({highlightedOptionId:r,inputValue:a})},this.handleSelectOption=(i,{id:r})=>{if(r===this._emptyOptionId){this.setState({isShowingOptions:!1});return}const o=this.getOption("id",r),s=o&&o.props.value;this.isControlled?this.setState({isShowingOptions:!1}):this.setState(a=>({isShowingOptions:!1,selectedOptionId:r,inputValue:o?o.props.children:a.inputValue})),o&&typeof this.props.onChange=="function"&&this.props.onChange(i,{value:s,id:r}),typeof this.props.onHideOptions=="function"&&this.props.onHideOptions(i)};const n=this.getInitialOption(e);this.state={inputValue:n?n.props.children:"",isShowingOptions:!1,highlightedOptionId:void 0,selectedOptionId:n?n.props.id:void 0},this._emptyOptionId=e.deterministicId("Select-EmptyOption")}get _select(){return this.ref}focus(){this.ref&&this.ref.focus()}get focused(){return this.ref?this.ref.focused:!1}get id(){return this.ref?this.ref.id:void 0}get isControlled(){return typeof this.props.value<"u"}get interaction(){return Go({props:this.props})}componentDidUpdate(e){if(this.props.value!==e.value){let n=this.getOption("value",this.props.value);typeof this.props.value>"u"&&(n=this.getOption("value",e.value)),this.setState({inputValue:n?n.props.children:"",selectedOptionId:n?n.props.id:""})}}getInitialOption(e){const n=e.value,i=e.defaultValue,r=n||i;return typeof r=="string"||typeof r=="number"?this.getOption("value",r):this.getFirstOption()}getOptionLabelById(e){const n=this.getOption("id",e);return n?n.props.children:""}getFirstOption(){const e=T.Children.toArray(this.props.children);let n;for(let i=0;iMe(n,[$r])?this.renderOption(n):Me(n,[mo])?this.renderGroup(n):null).filter(n=>!!n),e.length===0?this.renderEmptyOption():e}renderEmptyOption(){return z.createElement(Cm.Option,{id:this._emptyOptionId,isHighlighted:!1,isSelected:!1},ot(this.props.renderEmptyOption))}renderOption(e){const n=e.props,i=n.id,r=n.value,o=n.children,s=n.renderBeforeLabel,a=n.renderAfterLabel,l=Ie(n,NG),u=e.props.isDisabled,c=i===this.state.selectedOptionId,d=i===this.state.highlightedOptionId,h=p=>{var m;return typeof p=="function"&&!(p!=null&&(m=p.prototype)!==null&&m!==void 0&&m.isReactComponent)?p.bind(null,{id:i,isDisabled:u,isSelected:c,isHighlighted:d,children:o}):p};return z.createElement(Cm.Option,Object.assign({id:i,value:r,key:e.key||i,isHighlighted:i===this.state.highlightedOptionId,isSelected:i===this.state.selectedOptionId,isDisabled:e.props.isDisabled,renderBeforeLabel:h(s),renderAfterLabel:h(a)},It(l)),o)}renderGroup(e){const n=e.props,i=n.id,r=n.renderLabel,o=n.children,s=Ie(n,MG);return z.createElement(Cm.Group,Object.assign({renderLabel:r,key:e.key||i},It(s)),T.Children.map(o,a=>this.renderOption(a)))}render(){const e=this.props,n=e.renderLabel;e.value,e.defaultValue;const i=e.id,r=e.size,o=e.assistiveText,s=e.placeholder;e.interaction;const a=e.isRequired,l=e.isInline,u=e.width,c=e.optionsMaxWidth,d=e.optionsMaxHeight,h=e.visibleOptionsCount,p=e.messages,m=e.placement,O=e.constrain,y=e.mountNode,b=e.inputRef,v=e.listRef;e.renderEmptyOption;const S=e.renderBeforeInput,k=e.renderAfterInput,x=e.onFocus;e.onBlur,e.onShowOptions,e.onHideOptions,e.children;const _=Ie(e,DG);return z.createElement(Cm,Object.assign({renderLabel:n,inputValue:this.state.inputValue,isShowingOptions:this.state.isShowingOptions,id:i,size:r,assistiveText:o,placeholder:s,interaction:this.interaction,isRequired:a,isInline:l,width:u,optionsMaxWidth:c,optionsMaxHeight:d,visibleOptionsCount:h,messages:p,placement:m,constrain:O,mountNode:y,ref:this.handleRef,inputRef:b,listRef:v,renderBeforeInput:S,renderAfterInput:k,onFocus:x,onBlur:this.handleBlur,onRequestShowOptions:this.handleShowOptions,onRequestHideOptions:this.handleHideOptions,onRequestHighlightOption:this.handleHighlightOption,onRequestSelectOption:this.handleSelectOption},It(_)),this.renderChildren())}},Fo.displayName="SimpleSelect",Fo.componentId="SimpleSelect",Fo.Option=$r,Fo.Group=mo,Fo.allowedProps=LG,Fo.propTypes=$G,Fo.defaultProps={size:"medium",isRequired:!1,isInline:!1,visibleOptionsCount:8,placement:"bottom stretch",constrain:"window",renderEmptyOption:"---"},Fo))||Lm)||Lm);class st{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,n,i){[e,n]=hd(this,e,n);let r=[];return this.decompose(0,e,r,2),i.length&&i.decompose(0,i.length,r,3),this.decompose(n,this.length,r,1),fo.from(r,this.length-(n-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){[e,n]=hd(this,e,n);let i=[];return this.decompose(e,n,i,0),fo.from(i,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),r=new df(this),o=new df(e);for(let s=n,a=n;;){if(r.next(s),o.next(s),s=0,r.lineBreak!=o.lineBreak||r.done!=o.done||r.value!=o.value)return!1;if(a+=r.value.length,r.done||a>=i)return!0}}iter(e=1){return new df(this,e)}iterRange(e,n=this.length){return new i6(this,e,n)}iterLines(e,n){let i;if(e==null)i=this.iter();else{n==null&&(n=this.lines+1);let r=this.line(e).from;i=this.iterRange(r,Math.max(r,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new r6(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?st.empty:e.length<=32?new Ut(e):fo.from(Ut.split(e,[]))}}class Ut extends st{constructor(e,n=BG(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,i,r){for(let o=0;;o++){let s=this.text[o],a=r+s.length;if((n?i:a)>=e)return new QG(r,a,i,s);r=a+1,i++}}decompose(e,n,i,r){let o=e<=0&&n>=this.length?this:new Ut(NP(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(r&1){let s=i.pop(),a=Bg(o.text,s.text.slice(),0,o.length);if(a.length<=32)i.push(new Ut(a,s.length+o.length));else{let l=a.length>>1;i.push(new Ut(a.slice(0,l)),new Ut(a.slice(l)))}}else i.push(o)}replace(e,n,i){if(!(i instanceof Ut))return super.replace(e,n,i);[e,n]=hd(this,e,n);let r=Bg(this.text,Bg(i.text,NP(this.text,0,e)),n),o=this.length+i.length-(n-e);return r.length<=32?new Ut(r,o):fo.from(Ut.split(r,[]),o)}sliceString(e,n=this.length,i=` +`){[e,n]=hd(this,e,n);let r="";for(let o=0,s=0;o<=n&&se&&s&&(r+=i),eo&&(r+=a.slice(Math.max(0,e-o),n-o)),o=l+1}return r}flatten(e){for(let n of this.text)e.push(n)}scanIdentical(){return 0}static split(e,n){let i=[],r=-1;for(let o of e)i.push(o),r+=o.length+1,i.length==32&&(n.push(new Ut(i,r)),i=[],r=-1);return r>-1&&n.push(new Ut(i,r)),n}}class fo extends st{constructor(e,n){super(),this.children=e,this.length=n,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,n,i,r){for(let o=0;;o++){let s=this.children[o],a=r+s.length,l=i+s.lines-1;if((n?l:a)>=e)return s.lineInner(e,n,i,r);r=a+1,i=l+1}}decompose(e,n,i,r){for(let o=0,s=0;s<=n&&o=s){let u=r&((s<=e?1:0)|(l>=n?2:0));s>=e&&l<=n&&!u?i.push(a):a.decompose(e-s,n-s,i,u)}s=l+1}}replace(e,n,i){if([e,n]=hd(this,e,n),i.lines=o&&n<=a){let l=s.replace(e-o,n-o,i),u=this.lines-s.lines+l.lines;if(l.lines>4&&l.lines>u>>6){let c=this.children.slice();return c[r]=l,new fo(c,this.length-(n-e)+i.length)}return super.replace(o,a,l)}o=a+1}return super.replace(e,n,i)}sliceString(e,n=this.length,i=` +`){[e,n]=hd(this,e,n);let r="";for(let o=0,s=0;oe&&o&&(r+=i),es&&(r+=a.sliceString(e-s,n-s,i)),s=l+1}return r}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof fo))return 0;let i=0,[r,o,s,a]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=n,o+=n){if(r==s||o==a)return i;let l=this.children[r],u=e.children[o];if(l!=u)return i+l.scanIdentical(u,n);i+=l.length+1}}static from(e,n=e.reduce((i,r)=>i+r.length+1,-1)){let i=0;for(let p of e)i+=p.lines;if(i<32){let p=[];for(let m of e)m.flatten(p);return new Ut(p,n)}let r=Math.max(32,i>>5),o=r<<1,s=r>>1,a=[],l=0,u=-1,c=[];function d(p){let m;if(p.lines>o&&p instanceof fo)for(let O of p.children)d(O);else p.lines>s&&(l>s||!l)?(h(),a.push(p)):p instanceof Ut&&l&&(m=c[c.length-1])instanceof Ut&&p.lines+m.lines<=32?(l+=p.lines,u+=p.length+1,c[c.length-1]=new Ut(m.text.concat(p.text),m.length+1+p.length)):(l+p.lines>r&&h(),l+=p.lines,u+=p.length+1,c.push(p))}function h(){l!=0&&(a.push(c.length==1?c[0]:fo.from(c,u)),u=-1,l=c.length=0)}for(let p of e)d(p);return h(),a.length==1?a[0]:new fo(a,n)}}st.empty=new Ut([""],0);function BG(t){let e=-1;for(let n of t)e+=n.length+1;return e}function Bg(t,e,n=0,i=1e9){for(let r=0,o=0,s=!0;o=n&&(l>i&&(a=a.slice(0,i-r)),r0?1:(e instanceof Ut?e.text.length:e.children.length)<<1]}nextInner(e,n){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,r=this.nodes[i],o=this.offsets[i],s=o>>1,a=r instanceof Ut?r.text.length:r.children.length;if(s==(n>0?a:0)){if(i==0)return this.done=!0,this.value="",this;n>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((o&1)==(n>0?0:1)){if(this.offsets[i]+=n,e==0)return this.lineBreak=!0,this.value=` +`,this;e--}else if(r instanceof Ut){let l=r.text[s+(n<0?-1:0)];if(this.offsets[i]+=n,l.length>Math.max(0,e))return this.value=e==0?l:n>0?l.slice(e):l.slice(0,l.length-e),this;e-=l.length}else{let l=r.children[s+(n<0?-1:0)];e>l.length?(e-=l.length,this.offsets[i]+=n):(n<0&&this.offsets[i]--,this.nodes.push(l),this.offsets.push(n>0?1:(l instanceof Ut?l.text.length:l.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class i6{constructor(e,n,i){this.value="",this.done=!1,this.cursor=new df(e,n>i?-1:1),this.pos=n>i?e.length:0,this.from=Math.min(n,i),this.to=Math.max(n,i)}nextInner(e,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let i=n<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*n,this.value=r.length<=i?r:n<0?r.slice(r.length-i):r.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class r6{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:i,value:r}=this.inner.next(e);return n&&this.afterBreak?(this.value="",this.afterBreak=!1):n?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(st.prototype[Symbol.iterator]=function(){return this.iter()},df.prototype[Symbol.iterator]=i6.prototype[Symbol.iterator]=r6.prototype[Symbol.iterator]=function(){return this});let QG=class{constructor(e,n,i,r){this.from=e,this.to=n,this.number=i,this.text=r}get length(){return this.to-this.from}};function hd(t,e,n){return e=Math.max(0,Math.min(t.length,e)),[e,Math.max(e,Math.min(t.length,n))]}let Zc="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(t=>t?parseInt(t,36):1);for(let t=1;tt)return Zc[e-1]<=t;return!1}function MP(t){return t>=127462&&t<=127487}const DP=8205;function Cn(t,e,n=!0,i=!0){return(n?o6:zG)(t,e,i)}function o6(t,e,n){if(e==t.length)return e;e&&s6(t.charCodeAt(e))&&a6(t.charCodeAt(e-1))&&e--;let i=kn(t,e);for(e+=nr(i);e=0&&MP(kn(t,s));)o++,s-=2;if(o%2==0)break;e+=2}else break}return e}function zG(t,e,n){for(;e>0;){let i=o6(t,e-2,n);if(i=56320&&t<57344}function a6(t){return t>=55296&&t<56320}function kn(t,e){let n=t.charCodeAt(e);if(!a6(n)||e+1==t.length)return n;let i=t.charCodeAt(e+1);return s6(i)?(n-55296<<10)+(i-56320)+65536:n}function Kk(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function nr(t){return t<65536?1:2}const Kv=/\r\n?|\n/;var _n=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(_n||(_n={}));class ko{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;ne)return o+(e-r);o+=a}else{if(i!=_n.Simple&&u>=e&&(i==_n.TrackDel&&re||i==_n.TrackBefore&&re))return null;if(u>e||u==e&&n<0&&!a)return e==r||n<0?o:o+l;o+=l}r=u}if(e>r)throw new RangeError(`Position ${e} is out of range for changeset of length ${r}`);return o}touchesRange(e,n=e){for(let i=0,r=0;i=0&&r<=n&&a>=e)return rn?"cover":!0;r=a}return!1}toString(){let e="";for(let n=0;n=0?":"+r:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new ko(e)}static create(e){return new ko(e)}}class an extends ko{constructor(e,n){super(e),this.inserted=n}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Jv(this,(n,i,r,o,s)=>e=e.replace(r,r+(i-n),s),!1),e}mapDesc(e,n=!1){return eS(this,e,n,!0)}invert(e){let n=this.sections.slice(),i=[];for(let r=0,o=0;r=0){n[r]=a,n[r+1]=s;let l=r>>1;for(;i.length0&&Xs(i,n,o.text),o.forward(c),a+=c}let u=e[s++];for(;a>1].toJSON()))}return e}static of(e,n,i){let r=[],o=[],s=0,a=null;function l(c=!1){if(!c&&!r.length)return;sh||d<0||h>n)throw new RangeError(`Invalid change range ${d} to ${h} (in doc of length ${n})`);let m=p?typeof p=="string"?st.of(p.split(i||Kv)):p:st.empty,O=m.length;if(d==h&&O==0)return;ds&&Nn(r,d-s,-1),Nn(r,h-d,O),Xs(o,r,m),s=h}}return u(e),l(!a),a}static empty(e){return new an(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],i=[];for(let r=0;ra&&typeof s!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(o.length==1)n.push(o[0],0);else{for(;i.length=0&&n<=0&&n==t[r+1]?t[r]+=e:e==0&&t[r]==0?t[r+1]+=n:i?(t[r]+=e,t[r+1]+=n):t.push(e,n)}function Xs(t,e,n){if(n.length==0)return;let i=e.length-2>>1;if(i>1])),!(n||s==t.sections.length||t.sections[s+1]<0);)a=t.sections[s++],l=t.sections[s++];e(r,u,o,c,d),r=u,o=c}}}function eS(t,e,n,i=!1){let r=[],o=i?[]:null,s=new Yf(t),a=new Yf(e);for(let l=-1;;)if(s.ins==-1&&a.ins==-1){let u=Math.min(s.len,a.len);Nn(r,u,-1),s.forward(u),a.forward(u)}else if(a.ins>=0&&(s.ins<0||l==s.i||s.off==0&&(a.len=0&&l=0){let u=0,c=s.len;for(;c;)if(a.ins==-1){let d=Math.min(c,a.len);u+=d,c-=d,a.forward(d)}else if(a.ins==0&&a.lenl||s.ins>=0&&s.len>l)&&(a||i.length>u),o.forward2(l),s.forward(l)}}}}class Yf{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return n>=e.length?st.empty:e[n]}textBit(e){let{inserted:n}=this.set,i=this.i-2>>1;return i>=n.length&&!e?st.empty:n[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class Vl{constructor(e,n,i){this.from=e,this.to=n,this.flags=i}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,n=-1){let i,r;return this.empty?i=r=e.mapPos(this.from,n):(i=e.mapPos(this.from,1),r=e.mapPos(this.to,-1)),i==this.from&&r==this.to?this:new Vl(i,r,this.flags)}extend(e,n=e){if(e<=this.anchor&&n>=this.anchor)return Y.range(e,n);let i=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return Y.range(this.anchor,i)}eq(e,n=!1){return this.anchor==e.anchor&&this.head==e.head&&(!n||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return Y.range(e.anchor,e.head)}static create(e,n,i){return new Vl(e,n,i)}}class Y{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:Y.create(this.ranges.map(i=>i.map(e,n)),this.mainIndex)}eq(e,n=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let i=0;ie.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new Y(e.ranges.map(n=>Vl.fromJSON(n)),e.main)}static single(e,n=e){return new Y([Y.range(e,n)],0)}static create(e,n=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,r=0;re?8:0)|o)}static normalized(e,n=0){let i=e[n];e.sort((r,o)=>r.from-o.from),n=e.indexOf(i);for(let r=1;ro.head?Y.range(l,a):Y.range(a,l))}}return new Y(e,n)}}function u6(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let Jk=0;class he{constructor(e,n,i,r,o){this.combine=e,this.compareInput=n,this.compare=i,this.isStatic=r,this.id=Jk++,this.default=e([]),this.extensions=typeof o=="function"?o(this):o}get reader(){return this}static define(e={}){return new he(e.combine||(n=>n),e.compareInput||((n,i)=>n===i),e.compare||(e.combine?(n,i)=>n===i:ex),!!e.static,e.enables)}of(e){return new Qg([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new Qg(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new Qg(e,this,2,n)}from(e,n){return n||(n=i=>i),this.compute([e],i=>n(i.field(e)))}}function ex(t,e){return t==e||t.length==e.length&&t.every((n,i)=>n===e[i])}class Qg{constructor(e,n,i,r){this.dependencies=e,this.facet=n,this.type=i,this.value=r,this.id=Jk++}dynamicSlot(e){var n;let i=this.value,r=this.facet.compareInput,o=this.id,s=e[o]>>1,a=this.type==2,l=!1,u=!1,c=[];for(let d of this.dependencies)d=="doc"?l=!0:d=="selection"?u=!0:((n=e[d.id])!==null&&n!==void 0?n:1)&1||c.push(e[d.id]);return{create(d){return d.values[s]=i(d),1},update(d,h){if(l&&h.docChanged||u&&(h.docChanged||h.selection)||tS(d,c)){let p=i(d);if(a?!BP(p,d.values[s],r):!r(p,d.values[s]))return d.values[s]=p,1}return 0},reconfigure:(d,h)=>{let p,m=h.config.address[o];if(m!=null){let O=M0(h,m);if(this.dependencies.every(y=>y instanceof he?h.facet(y)===d.facet(y):y instanceof gn?h.field(y,!1)==d.field(y,!1):!0)||(a?BP(p=i(d),O,r):r(p=i(d),O)))return d.values[s]=O,0}else p=i(d);return d.values[s]=p,1}}}}function BP(t,e,n){if(t.length!=e.length)return!1;for(let i=0;it[l.id]),r=n.map(l=>l.type),o=i.filter(l=>!(l&1)),s=t[e.id]>>1;function a(l){let u=[];for(let c=0;ci===r),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet(QP).find(i=>i.field==this);return((n==null?void 0:n.create)||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:i=>(i.values[n]=this.create(i),1),update:(i,r)=>{let o=i.values[n],s=this.updateF(o,r);return this.compareF(o,s)?0:(i.values[n]=s,1)},reconfigure:(i,r)=>r.config.address[this.id]!=null?(i.values[n]=r.field(this),0):(i.values[n]=this.create(i),1)}}init(e){return[this,QP.of({field:this,create:e})]}get extension(){return this}}const Nl={lowest:4,low:3,default:2,high:1,highest:0};function Th(t){return e=>new c6(e,t)}const hs={highest:Th(Nl.highest),high:Th(Nl.high),default:Th(Nl.default),low:Th(Nl.low),lowest:Th(Nl.lowest)};class c6{constructor(e,n){this.inner=e,this.prec=n}}class sb{of(e){return new nS(this,e)}reconfigure(e){return sb.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class nS{constructor(e,n){this.compartment=e,this.inner=n}}class N0{constructor(e,n,i,r,o,s){for(this.base=e,this.compartments=n,this.dynamicSlots=i,this.address=r,this.staticValues=o,this.facets=s,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,n,i){let r=[],o=Object.create(null),s=new Map;for(let h of UG(e,n,s))h instanceof gn?r.push(h):(o[h.facet.id]||(o[h.facet.id]=[])).push(h);let a=Object.create(null),l=[],u=[];for(let h of r)a[h.id]=u.length<<1,u.push(p=>h.slot(p));let c=i==null?void 0:i.config.facets;for(let h in o){let p=o[h],m=p[0].facet,O=c&&c[h]||[];if(p.every(y=>y.type==0))if(a[m.id]=l.length<<1|1,ex(O,p))l.push(i.facet(m));else{let y=m.combine(p.map(b=>b.value));l.push(i&&m.compare(y,i.facet(m))?i.facet(m):y)}else{for(let y of p)y.type==0?(a[y.id]=l.length<<1|1,l.push(y.value)):(a[y.id]=u.length<<1,u.push(b=>y.dynamicSlot(b)));a[m.id]=u.length<<1,u.push(y=>HG(y,m,p))}}let d=u.map(h=>h(a));return new N0(e,s,d,a,l,o)}}function UG(t,e,n){let i=[[],[],[],[],[]],r=new Map;function o(s,a){let l=r.get(s);if(l!=null){if(l<=a)return;let u=i[l].indexOf(s);u>-1&&i[l].splice(u,1),s instanceof nS&&n.delete(s.compartment)}if(r.set(s,a),Array.isArray(s))for(let u of s)o(u,a);else if(s instanceof nS){if(n.has(s.compartment))throw new RangeError("Duplicate use of compartment in extensions");let u=e.get(s.compartment)||s.inner;n.set(s.compartment,u),o(u,a)}else if(s instanceof c6)o(s.inner,s.prec);else if(s instanceof gn)i[a].push(s),s.provides&&o(s.provides,a);else if(s instanceof Qg)i[a].push(s),s.facet.extensions&&o(s.facet.extensions,Nl.default);else{let u=s.extension;if(!u)throw new Error(`Unrecognized extension value in extension set (${s}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);o(u,a)}}return o(t,Nl.default),i.reduce((s,a)=>s.concat(a))}function hf(t,e){if(e&1)return 2;let n=e>>1,i=t.status[n];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;t.status[n]=4;let r=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|r}function M0(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const d6=he.define(),iS=he.define({combine:t=>t.some(e=>e),static:!0}),h6=he.define({combine:t=>t.length?t[0]:void 0,static:!0}),f6=he.define(),p6=he.define(),m6=he.define(),g6=he.define({combine:t=>t.length?t[0]:!1});class fs{constructor(e,n){this.type=e,this.value=n}static define(){return new WG}}class WG{of(e){return new fs(this,e)}}class VG{constructor(e){this.map=e}of(e){return new De(this,e)}}class De{constructor(e,n){this.type=e,this.value=n}map(e){let n=this.type.map(this.value,e);return n===void 0?void 0:n==this.value?this:new De(this.type,n)}is(e){return this.type==e}static define(e={}){return new VG(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let i=[];for(let r of e){let o=r.map(n);o&&i.push(o)}return i}}De.reconfigure=De.define();De.appendConfig=De.define();class en{constructor(e,n,i,r,o,s){this.startState=e,this.changes=n,this.selection=i,this.effects=r,this.annotations=o,this.scrollIntoView=s,this._doc=null,this._state=null,i&&u6(i,n.newLength),o.some(a=>a.type==en.time)||(this.annotations=o.concat(en.time.of(Date.now())))}static create(e,n,i,r,o,s){return new en(e,n,i,r,o,s)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let n of this.annotations)if(n.type==e)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let n=this.annotation(en.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}en.time=fs.define();en.userEvent=fs.define();en.addToHistory=fs.define();en.remote=fs.define();function jG(t,e){let n=[];for(let i=0,r=0;;){let o,s;if(i=t[i]))o=t[i++],s=t[i++];else if(r=0;r--){let o=i[r](t);o instanceof en?t=o:Array.isArray(o)&&o.length==1&&o[0]instanceof en?t=o[0]:t=b6(e,qc(o),!1)}return t}function ZG(t){let e=t.startState,n=e.facet(m6),i=t;for(let r=n.length-1;r>=0;r--){let o=n[r](t);o&&Object.keys(o).length&&(i=O6(i,rS(e,o,t.changes.newLength),!0))}return i==t?t:en.create(e,t.changes,t.selection,i.effects,i.annotations,i.scrollIntoView)}const qG=[];function qc(t){return t==null?qG:Array.isArray(t)?t:[t]}var Rt=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(Rt||(Rt={}));const YG=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let oS;try{oS=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function GG(t){if(oS)return oS.test(t);for(let e=0;e"€"&&(n.toUpperCase()!=n.toLowerCase()||YG.test(n)))return!0}return!1}function KG(t){return e=>{if(!/\S/.test(e))return Rt.Space;if(GG(e))return Rt.Word;for(let n=0;n-1)return Rt.Word;return Rt.Other}}class je{constructor(e,n,i,r,o,s){this.config=e,this.doc=n,this.selection=i,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=o,s&&(s._state=this);for(let a=0;ar.set(u,l)),n=null),r.set(a.value.compartment,a.value.extension)):a.is(De.reconfigure)?(n=null,i=a.value):a.is(De.appendConfig)&&(n=null,i=qc(i).concat(a.value));let o;n?o=e.startState.values.slice():(n=N0.resolve(i,r,this),o=new je(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(l,u)=>u.reconfigure(l,this),null).values);let s=e.startState.facet(iS)?e.newSelection:e.newSelection.asSingle();new je(n,e.newDoc,s,o,(a,l)=>l.update(a,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:Y.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,i=e(n.ranges[0]),r=this.changes(i.changes),o=[i.range],s=qc(i.effects);for(let a=1;as.spec.fromJSON(a,l)))}}return je.create({doc:e.doc,selection:Y.fromJSON(e.selection),extensions:n.extensions?r.concat([n.extensions]):r})}static create(e={}){let n=N0.resolve(e.extensions||[],new Map),i=e.doc instanceof st?e.doc:st.of((e.doc||"").split(n.staticFacet(je.lineSeparator)||Kv)),r=e.selection?e.selection instanceof Y?e.selection:Y.single(e.selection.anchor,e.selection.head):Y.single(0);return u6(r,i.length),n.staticFacet(iS)||(r=r.asSingle()),new je(n,i,r,n.dynamicSlots.map(()=>null),(o,s)=>s.create(o),null)}get tabSize(){return this.facet(je.tabSize)}get lineBreak(){return this.facet(je.lineSeparator)||` +`}get readOnly(){return this.facet(g6)}phrase(e,...n){for(let i of this.facet(je.phrases))if(Object.prototype.hasOwnProperty.call(i,e)){e=i[e];break}return n.length&&(e=e.replace(/\$(\$|\d*)/g,(i,r)=>{if(r=="$")return"$";let o=+(r||1);return!o||o>n.length?i:n[o-1]})),e}languageDataAt(e,n,i=-1){let r=[];for(let o of this.facet(d6))for(let s of o(this,n,i))Object.prototype.hasOwnProperty.call(s,e)&&r.push(s[e]);return r}charCategorizer(e){return KG(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:n,from:i,length:r}=this.doc.lineAt(e),o=this.charCategorizer(e),s=e-i,a=e-i;for(;s>0;){let l=Cn(n,s,!1);if(o(n.slice(l,s))!=Rt.Word)break;s=l}for(;at.length?t[0]:4});je.lineSeparator=h6;je.readOnly=g6;je.phrases=he.define({compare(t,e){let n=Object.keys(t),i=Object.keys(e);return n.length==i.length&&n.every(r=>t[r]==e[r])}});je.languageData=d6;je.changeFilter=f6;je.transactionFilter=p6;je.transactionExtender=m6;sb.reconfigure=De.define();function Po(t,e,n={}){let i={};for(let r of t)for(let o of Object.keys(r)){let s=r[o],a=i[o];if(a===void 0)i[o]=s;else if(!(a===s||s===void 0))if(Object.hasOwnProperty.call(n,o))i[o]=n[o](a,s);else throw new Error("Config merge conflict for field "+o)}for(let r in e)i[r]===void 0&&(i[r]=e[r]);return i}class au{eq(e){return this==e}range(e,n=e){return sS.create(e,n,this)}}au.prototype.startSide=au.prototype.endSide=0;au.prototype.point=!1;au.prototype.mapMode=_n.TrackDel;let sS=class y6{constructor(e,n,i){this.from=e,this.to=n,this.value=i}static create(e,n,i){return new y6(e,n,i)}};function aS(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class tx{constructor(e,n,i,r){this.from=e,this.to=n,this.value=i,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(e,n,i,r=0){let o=i?this.to:this.from;for(let s=r,a=o.length;;){if(s==a)return s;let l=s+a>>1,u=o[l]-e||(i?this.value[l].endSide:this.value[l].startSide)-n;if(l==s)return u>=0?s:a;u>=0?a=l:s=l+1}}between(e,n,i,r){for(let o=this.findIndex(n,-1e9,!0),s=this.findIndex(i,1e9,!1,o);op||h==p&&u.startSide>0&&u.endSide<=0)continue;(p-h||u.endSide-u.startSide)<0||(s<0&&(s=h),u.point&&(a=Math.max(a,p-h)),i.push(u),r.push(h-s),o.push(p-s))}return{mapped:i.length?new tx(r,o,i,a):null,pos:s}}}class nt{constructor(e,n,i,r){this.chunkPos=e,this.chunk=n,this.nextLayer=i,this.maxPoint=r}static create(e,n,i,r){return new nt(e,n,i,r)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let n of this.chunk)e+=n.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:n=[],sort:i=!1,filterFrom:r=0,filterTo:o=this.length}=e,s=e.filter;if(n.length==0&&!s)return this;if(i&&(n=n.slice().sort(aS)),this.isEmpty)return n.length?nt.of(n):this;let a=new v6(this,null,-1).goto(0),l=0,u=[],c=new ha;for(;a.value||l=0){let d=n[l++];c.addInner(d.from,d.to,d.value)||u.push(d)}else a.rangeIndex==1&&a.chunkIndexthis.chunkEnd(a.chunkIndex)||oa.to||o=o&&e<=o+s.length&&s.between(o,e-o,n-o,i)===!1)return}this.nextLayer.between(e,n,i)}}iter(e=0){return Gf.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return Gf.from(e).goto(n)}static compare(e,n,i,r,o=-1){let s=e.filter(d=>d.maxPoint>0||!d.isEmpty&&d.maxPoint>=o),a=n.filter(d=>d.maxPoint>0||!d.isEmpty&&d.maxPoint>=o),l=FP(s,a,i),u=new Ph(s,l,o),c=new Ph(a,l,o);i.iterGaps((d,h,p)=>zP(u,d,c,h,p,r)),i.empty&&i.length==0&&zP(u,0,c,0,0,r)}static eq(e,n,i=0,r){r==null&&(r=999999999);let o=e.filter(c=>!c.isEmpty&&n.indexOf(c)<0),s=n.filter(c=>!c.isEmpty&&e.indexOf(c)<0);if(o.length!=s.length)return!1;if(!o.length)return!0;let a=FP(o,s),l=new Ph(o,a,0).goto(i),u=new Ph(s,a,0).goto(i);for(;;){if(l.to!=u.to||!lS(l.active,u.active)||l.point&&(!u.point||!l.point.eq(u.point)))return!1;if(l.to>r)return!0;l.next(),u.next()}}static spans(e,n,i,r,o=-1){let s=new Ph(e,null,o).goto(n),a=n,l=s.openStart;for(;;){let u=Math.min(s.to,i);if(s.point){let c=s.activeForPoint(s.to),d=s.pointFroma&&(r.span(a,u,s.active,l),l=s.openEnd(u));if(s.to>i)return l+(s.point&&s.to>i?1:0);a=s.to,s.next()}}static of(e,n=!1){let i=new ha;for(let r of e instanceof sS?[e]:n?JG(e):e)i.add(r.from,r.to,r.value);return i.finish()}static join(e){if(!e.length)return nt.empty;let n=e[e.length-1];for(let i=e.length-2;i>=0;i--)for(let r=e[i];r!=nt.empty;r=r.nextLayer)n=new nt(r.chunkPos,r.chunk,n,Math.max(r.maxPoint,n.maxPoint));return n}}nt.empty=new nt([],[],null,-1);function JG(t){if(t.length>1)for(let e=t[0],n=1;n0)return t.slice().sort(aS);e=i}return t}nt.empty.nextLayer=nt.empty;class ha{finishChunk(e){this.chunks.push(new tx(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,n,i){this.addInner(e,n,i)||(this.nextLayer||(this.nextLayer=new ha)).add(e,n,i)}addInner(e,n,i){let r=e-this.lastTo||i.startSide-this.last.endSide;if(r<=0&&(e-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return r<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(n-this.chunkStart),this.last=i,this.lastFrom=e,this.lastTo=n,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,n-e)),!0)}addChunk(e,n){if((e-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(e);let i=n.value.length-1;return this.last=n.value[i],this.lastFrom=n.from[i]+e,this.lastTo=n.to[i]+e,!0}finish(){return this.finishInner(nt.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=nt.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}}function FP(t,e,n){let i=new Map;for(let o of t)for(let s=0;s=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=i&&r.push(new v6(s,n,i,o));return r.length==1?r[0]:new Gf(r)}get startSide(){return this.value?this.value.startSide:0}goto(e,n=-1e9){for(let i of this.heap)i.goto(e,n);for(let i=this.heap.length>>1;i>=0;i--)xy(this.heap,i);return this.next(),this}forward(e,n){for(let i of this.heap)i.forward(e,n);for(let i=this.heap.length>>1;i>=0;i--)xy(this.heap,i);(this.to-e||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),xy(this.heap,0)}}}function xy(t,e){for(let n=t[e];;){let i=(e<<1)+1;if(i>=t.length)break;let r=t[i];if(i+1=0&&(r=t[i+1],i++),n.compare(r)<0)break;t[i]=n,t[e]=r,e=i}}class Ph{constructor(e,n,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Gf.from(e,n,i)}goto(e,n=-1e9){return this.cursor.goto(e,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=n,this.openStart=-1,this.next(),this}forward(e,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(e,n)}removeActive(e){Nm(this.active,e),Nm(this.activeTo,e),Nm(this.activeRank,e),this.minActive=HP(this.active,this.activeTo)}addActive(e){let n=0,{value:i,to:r,rank:o}=this.cursor;for(;n0;)n++;Mm(this.active,n,i),Mm(this.activeTo,n,r),Mm(this.activeRank,n,o),e&&Mm(e,n,this.cursor.from),this.minActive=HP(this.active,this.activeTo)}next(){let e=this.to,n=this.point;this.point=null;let i=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),i&&Nm(i,r)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let o=this.cursor.value;if(!o.point)this.addActive(i),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from=0&&i[r]=0&&!(this.activeRank[i]e||this.activeTo[i]==e&&this.active[i].endSide>=this.point.endSide)&&n.push(this.active[i]);return n.reverse()}openEnd(e){let n=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>e;i--)n++;return n}}function zP(t,e,n,i,r,o){t.goto(e),n.goto(i);let s=i+r,a=i,l=i-e;for(;;){let u=t.to+l-n.to||t.endSide-n.endSide,c=u<0?t.to+l:n.to,d=Math.min(c,s);if(t.point||n.point?t.point&&n.point&&(t.point==n.point||t.point.eq(n.point))&&lS(t.activeForPoint(t.to),n.activeForPoint(n.to))||o.comparePoint(a,d,t.point,n.point):d>a&&!lS(t.active,n.active)&&o.compareRange(a,d,t.active,n.active),c>s)break;a=c,u<=0&&t.next(),u>=0&&n.next()}}function lS(t,e){if(t.length!=e.length)return!1;for(let n=0;n=e;i--)t[i+1]=t[i];t[e]=n}function HP(t,e){let n=-1,i=1e9;for(let r=0;r=e)return r;if(r==t.length)break;o+=t.charCodeAt(r)==9?n-o%n:1,r=Cn(t,r)}return i===!0?-1:t.length}const cS="ͼ",UP=typeof Symbol>"u"?"__"+cS:Symbol.for(cS),dS=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),WP=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class fa{constructor(e,n){this.rules=[];let{finish:i}=n||{};function r(s){return/^@/.test(s)?[s]:s.split(/,\s*/)}function o(s,a,l,u){let c=[],d=/^@(\w+)\b/.exec(s[0]),h=d&&d[1]=="keyframes";if(d&&a==null)return l.push(s[0]+";");for(let p in a){let m=a[p];if(/&/.test(p))o(p.split(/,\s*/).map(O=>s.map(y=>O.replace(/&/,y))).reduce((O,y)=>O.concat(y)),m,l);else if(m&&typeof m=="object"){if(!d)throw new RangeError("The value of a property ("+p+") should be a primitive value.");o(r(p),m,c,h)}else m!=null&&c.push(p.replace(/_.*/,"").replace(/[A-Z]/g,O=>"-"+O.toLowerCase())+": "+m+";")}(c.length||h)&&l.push((i&&!d&&!u?s.map(i):s).join(", ")+" {"+c.join(" ")+"}")}for(let s in e)o(r(s),e[s],this.rules)}getRules(){return this.rules.join(` +`)}static newName(){let e=WP[UP]||1;return WP[UP]=e+1,cS+e.toString(36)}static mount(e,n,i){let r=e[dS],o=i&&i.nonce;r?o&&r.setNonce(o):r=new eK(e,o),r.mount(Array.isArray(n)?n:[n],e)}}let VP=new Map;class eK{constructor(e,n){let i=e.ownerDocument||e,r=i.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let o=VP.get(i);if(o)return e[dS]=o;this.sheet=new r.CSSStyleSheet,VP.set(i,this)}else this.styleTag=i.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);this.modules=[],e[dS]=this}mount(e,n){let i=this.sheet,r=0,o=0;for(let s=0;s-1&&(this.modules.splice(l,1),o--,l=-1),l==-1){if(this.modules.splice(o++,0,a),i)for(let u=0;u",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},tK=typeof navigator<"u"&&/Mac/.test(navigator.platform),nK=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var xn=0;xn<10;xn++)pa[48+xn]=pa[96+xn]=String(xn);for(var xn=1;xn<=24;xn++)pa[xn+111]="F"+xn;for(var xn=65;xn<=90;xn++)pa[xn]=String.fromCharCode(xn+32),Kf[xn]=String.fromCharCode(xn);for(var _y in pa)Kf.hasOwnProperty(_y)||(Kf[_y]=pa[_y]);function iK(t){var e=tK&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||nK&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?Kf:pa)[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}function D0(t){let e;return t.nodeType==11?e=t.getSelection?t:t.ownerDocument:e=t,e.getSelection()}function hS(t,e){return e?t==e||t.contains(e.nodeType!=1?e.parentNode:e):!1}function rK(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function Fg(t,e){if(!e.anchorNode)return!1;try{return hS(t,e.anchorNode)}catch{return!1}}function Jf(t){return t.nodeType==3?uu(t,0,t.nodeValue.length).getClientRects():t.nodeType==1?t.getClientRects():[]}function ff(t,e,n,i){return n?jP(t,e,n,i,-1)||jP(t,e,n,i,1):!1}function lu(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e}function B0(t){return t.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function jP(t,e,n,i,r){for(;;){if(t==n&&e==i)return!0;if(e==(r<0?0:rs(t))){if(t.nodeName=="DIV")return!1;let o=t.parentNode;if(!o||o.nodeType!=1)return!1;e=lu(t)+(r<0?0:1),t=o}else if(t.nodeType==1){if(t=t.childNodes[e+(r<0?-1:0)],t.nodeType==1&&t.contentEditable=="false")return!1;e=r<0?rs(t):0}else return!1}}function rs(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function nx(t,e){let n=e?t.left:t.right;return{left:n,right:n,top:t.top,bottom:t.bottom}}function oK(t){let e=t.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function S6(t,e){let n=e.width/t.offsetWidth,i=e.height/t.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.width-t.offsetWidth)<1)&&(n=1),(i>.995&&i<1.005||!isFinite(i)||Math.abs(e.height-t.offsetHeight)<1)&&(i=1),{scaleX:n,scaleY:i}}function sK(t,e,n,i,r,o,s,a){let l=t.ownerDocument,u=l.defaultView||window;for(let c=t,d=!1;c&&!d;)if(c.nodeType==1){let h,p=c==l.body,m=1,O=1;if(p)h=oK(u);else{if(/^(fixed|sticky)$/.test(getComputedStyle(c).position)&&(d=!0),c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}let v=c.getBoundingClientRect();({scaleX:m,scaleY:O}=S6(c,v)),h={left:v.left,right:v.left+c.clientWidth*m,top:v.top,bottom:v.top+c.clientHeight*O}}let y=0,b=0;if(r=="nearest")e.top0&&e.bottom>h.bottom+b&&(b=e.bottom-h.bottom+b+s)):e.bottom>h.bottom&&(b=e.bottom-h.bottom+s,n<0&&e.top-b0&&e.right>h.right+y&&(y=e.right-h.right+y+o)):e.right>h.right&&(y=e.right-h.right+o,n<0&&e.leftn.clientHeight||n.scrollWidth>n.clientWidth)return n;n=n.assignedSlot||n.parentNode}else if(n.nodeType==11)n=n.host;else break;return null}class lK{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:n,focusNode:i}=e;this.set(n,Math.min(e.anchorOffset,n?rs(n):0),i,Math.min(e.focusOffset,i?rs(i):0))}set(e,n,i,r){this.anchorNode=e,this.anchorOffset=n,this.focusNode=i,this.focusOffset=r}}let uc=null;function w6(t){if(t.setActive)return t.setActive();if(uc)return t.focus(uc);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(uc==null?{get preventScroll(){return uc={preventScroll:!0},!0}}:void 0),!uc){uc=!1;for(let n=0;nMath.max(1,t.scrollHeight-t.clientHeight-4)}function _6(t,e){for(let n=t,i=e;;){if(n.nodeType==3&&i>0)return{node:n,offset:i};if(n.nodeType==1&&i>0){if(n.contentEditable=="false")return null;n=n.childNodes[i-1],i=rs(n)}else if(n.parentNode&&!B0(n))i=lu(n),n=n.parentNode;else return null}}function E6(t,e){for(let n=t,i=e;;){if(n.nodeType==3&&in)return d.domBoundsAround(e,n,u);if(h>=e&&r==-1&&(r=l,o=u),u>n&&d.dom.parentNode==this.dom){s=l,a=c;break}c=h,u=h+d.breakAfter}return{from:o,to:a<0?i+this.length:a,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:s=0?this.children[s].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let n=this.parent;n;n=n.parent){if(e&&(n.flags|=2),n.flags&1)return;n.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let n=e.parent;if(!n)return e;e=n}}replaceChildren(e,n,i=ix){this.markDirty();for(let r=e;rthis.pos||e==this.pos&&(n>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}function T6(t,e,n,i,r,o,s,a,l){let{children:u}=t,c=u.length?u[e]:null,d=o.length?o[o.length-1]:null,h=d?d.breakAfter:s;if(!(e==i&&c&&!s&&!h&&o.length<2&&c.merge(n,r,o.length?d:null,n==0,a,l))){if(i0&&(!s&&o.length&&c.merge(n,c.length,o[0],!1,a,0)?c.breakAfter=o.shift().breakAfter:(n2);var pe={mac:GP||/Mac/.test(Li.platform),windows:/Win/.test(Li.platform),linux:/Linux|X11/.test(Li.platform),ie:ab,ie_version:A6?fS.documentMode||6:mS?+mS[1]:pS?+pS[1]:0,gecko:qP,gecko_version:qP?+(/Firefox\/(\d+)/.exec(Li.userAgent)||[0,0])[1]:0,chrome:!!Ey,chrome_version:Ey?+Ey[1]:0,ios:GP,android:/Android\b/.test(Li.userAgent),webkit:YP,safari:R6,webkit_version:YP?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:fS.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const dK=256;class Ur extends mt{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,n){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(n&&n.node==this.dom&&(n.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,n,i){return this.flags&8||i&&(!(i instanceof Ur)||this.length-(n-e)+i.length>dK||i.flags&8)?!1:(this.text=this.text.slice(0,e)+(i?i.text:"")+this.text.slice(n),this.markDirty(),!0)}split(e){let n=new Ur(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),n.flags|=this.flags&8,n}localPosFromDOM(e,n){return e==this.dom?n:n?this.text.length:0}domAtPos(e){return new Dn(this.dom,e)}domBoundsAround(e,n,i){return{from:i,to:i+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,n){return hK(this.dom,e,n)}}class os extends mt{constructor(e,n=[],i=0){super(),this.mark=e,this.children=n,this.length=i;for(let r of n)r.setParent(this)}setAttrs(e){if(k6(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let n in this.mark.attrs)e.setAttribute(n,this.mark.attrs[n]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,n){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,n)}merge(e,n,i,r,o,s){return i&&(!(i instanceof os&&i.mark.eq(this.mark))||e&&o<=0||ne&&n.push(i=e&&(r=o),i=l,o++}let s=this.length-e;return this.length=e,r>-1&&(this.children.length=r,this.markDirty()),new os(this.mark,n,s)}domAtPos(e){return I6(this,e)}coordsAt(e,n){return L6(this,e,n)}}function hK(t,e,n){let i=t.nodeValue.length;e>i&&(e=i);let r=e,o=e,s=0;e==0&&n<0||e==i&&n>=0?pe.chrome||pe.gecko||(e?(r--,s=1):o=0)?0:a.length-1];return pe.safari&&!s&&l.width==0&&(l=Array.prototype.find.call(a,u=>u.width)||l),s?nx(l,s<0):l||null}class Zs extends mt{static create(e,n,i){return new Zs(e,n,i)}constructor(e,n,i){super(),this.widget=e,this.length=n,this.side=i,this.prevWidget=null}split(e){let n=Zs.create(this.widget,this.length-e,this.side);return this.length-=e,n}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,n,i,r,o,s){return i&&(!(i instanceof Zs)||!this.widget.compare(i.widget)||e>0&&o<=0||n0)?Dn.before(this.dom):Dn.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,n){let i=this.widget.coordsAt(this.dom,e,n);if(i)return i;let r=this.dom.getClientRects(),o=null;if(!r.length)return null;let s=this.side?this.side<0:e>0;for(let a=s?r.length-1:0;o=r[a],!(e>0?a==0:a==r.length-1||o.top0?Dn.before(this.dom):Dn.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return st.empty}get isHidden(){return!0}}Ur.prototype.children=Zs.prototype.children=fd.prototype.children=ix;function I6(t,e){let n=t.dom,{children:i}=t,r=0;for(let o=0;ro&&e0;o--){let s=i[o-1];if(s.dom.parentNode==n)return s.domAtPos(s.length)}for(let o=r;o0&&e instanceof os&&r.length&&(i=r[r.length-1])instanceof os&&i.mark.eq(e.mark)?$6(i,e.children[0],n-1):(r.push(e),e.setParent(t)),t.length+=e.length}function L6(t,e,n){let i=null,r=-1,o=null,s=-1;function a(u,c){for(let d=0,h=0;d=c&&(p.children.length?a(p,c-h):(!o||o.isHidden&&n>0)&&(m>c||h==m&&p.getSide()>0)?(o=p,s=c-h):(h-1?1:0)!=r.length-(n&&r.indexOf(n)>-1?1:0))return!1;for(let o of i)if(o!=n&&(r.indexOf(o)==-1||t[o]!==e[o]))return!1;return!0}function OS(t,e,n){let i=!1;if(e)for(let r in e)n&&r in n||(i=!0,r=="style"?t.style.cssText="":t.removeAttribute(r));if(n)for(let r in n)e&&e[r]==n[r]||(i=!0,r=="style"?t.style.cssText=n[r]:t.setAttribute(r,n[r]));return i}function pK(t){let e=Object.create(null);for(let n=0;n0&&this.children[i-1].length==0;)this.children[--i].destroy();return this.children.length=i,this.markDirty(),this.length=e,n}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){rx(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,n){$6(this,e,n)}addLineDeco(e){let n=e.spec.attributes,i=e.spec.class;n&&(this.attrs=gS(n,this.attrs||{})),i&&(this.attrs=gS({class:i},this.attrs||{}))}domAtPos(e){return I6(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,n){var i;this.dom?this.flags&4&&(k6(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(OS(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,n);let r=this.dom.lastChild;for(;r&&mt.get(r)instanceof os;)r=r.lastChild;if(!r||!this.length||r.nodeName!="BR"&&((i=mt.get(r))===null||i===void 0?void 0:i.isEditable)==!1&&(!pe.ios||!this.children.some(o=>o instanceof Ur))){let o=document.createElement("BR");o.cmIgnore=!0,this.dom.appendChild(o)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,n;for(let i of this.children){if(!(i instanceof Ur)||/[^ -~]/.test(i.text))return null;let r=Jf(i.dom);if(r.length!=1)return null;e+=r[0].width,n=r[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:n}:null}coordsAt(e,n){let i=L6(this,e,n);if(!this.children.length&&i&&this.parent){let{heightOracle:r}=this.parent.view.viewState,o=i.bottom-i.top;if(Math.abs(o-r.lineHeight)<2&&r.textHeight=n){if(o instanceof on)return o;if(s>n)break}r=s+o.breakAfter}return null}}class sa extends mt{constructor(e,n,i){super(),this.widget=e,this.length=n,this.deco=i,this.breakAfter=0,this.prevWidget=null}merge(e,n,i,r,o,s){return i&&(!(i instanceof sa)||!this.widget.compare(i.widget)||e>0&&o<=0||n0}}class ps{eq(e){return!1}updateDOM(e,n){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,n,i){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var ti=function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t}(ti||(ti={}));class Ee extends au{constructor(e,n,i,r){super(),this.startSide=e,this.endSide=n,this.widget=i,this.spec=r}get heightRelevant(){return!1}static mark(e){return new Rp(e)}static widget(e){let n=Math.max(-1e4,Math.min(1e4,e.side||0)),i=!!e.block;return n+=i&&!e.inlineOrder?n>0?3e8:-4e8:n>0?1e8:-1e8,new ma(e,n,n,i,e.widget||null,!1)}static replace(e){let n=!!e.block,i,r;if(e.isBlockGap)i=-5e8,r=4e8;else{let{start:o,end:s}=N6(e,n);i=(o?n?-3e8:-1:5e8)-1,r=(s?n?2e8:1:-6e8)+1}return new ma(e,i,r,n,e.widget||null,!0)}static line(e){return new Ip(e)}static set(e,n=!1){return nt.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}Ee.none=nt.empty;class Rp extends Ee{constructor(e){let{start:n,end:i}=N6(e);super(n?-1:5e8,i?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var n,i;return this==e||e instanceof Rp&&this.tagName==e.tagName&&(this.class||((n=this.attrs)===null||n===void 0?void 0:n.class))==(e.class||((i=e.attrs)===null||i===void 0?void 0:i.class))&&rx(this.attrs,e.attrs,"class")}range(e,n=e){if(e>=n)throw new RangeError("Mark decorations may not be empty");return super.range(e,n)}}Rp.prototype.point=!1;class Ip extends Ee{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Ip&&this.spec.class==e.spec.class&&rx(this.spec.attributes,e.spec.attributes)}range(e,n=e){if(n!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,n)}}Ip.prototype.mapMode=_n.TrackBefore;Ip.prototype.point=!0;class ma extends Ee{constructor(e,n,i,r,o,s){super(n,i,o,e),this.block=r,this.isReplace=s,this.mapMode=r?n<=0?_n.TrackBefore:_n.TrackAfter:_n.TrackDel}get type(){return this.startSide!=this.endSide?ti.WidgetRange:this.startSide<=0?ti.WidgetBefore:ti.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof ma&&mK(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,n=e){if(this.isReplace&&(e>n||e==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,n)}}ma.prototype.point=!0;function N6(t,e=!1){let{inclusiveStart:n,inclusiveEnd:i}=t;return n==null&&(n=t.inclusive),i==null&&(i=t.inclusive),{start:n??e,end:i??e}}function mK(t,e){return t==e||!!(t&&e&&t.compare(e))}function bS(t,e,n,i=0){let r=n.length-1;r>=0&&n[r]+i>=t?n[r]=Math.max(n[r],e):n.push(t,e)}class pf{constructor(e,n,i,r){this.doc=e,this.pos=n,this.end=i,this.disallowBlockEffectsFor=r,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=n}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof sa&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new on),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(Dm(new fd(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof sa)&&this.getLine()}buildText(e,n,i){for(;e>0;){if(this.textOff==this.text.length){let{value:o,lineBreak:s,done:a}=this.cursor.next(this.skip);if(this.skip=0,a)throw new Error("Ran out of text content when drawing inline views");if(s){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=o,this.textOff=0}let r=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(n.slice(n.length-i)),this.getLine().append(Dm(new Ur(this.text.slice(this.textOff,this.textOff+r)),n),i),this.atCursorPos=!0,this.textOff+=r,e-=r,i=0}}span(e,n,i,r){this.buildText(n-e,i,r),this.pos=n,this.openStart<0&&(this.openStart=r)}point(e,n,i,r,o,s){if(this.disallowBlockEffectsFor[s]&&i instanceof ma){if(i.block)throw new RangeError("Block decorations may not be specified via plugins");if(n>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let a=n-e;if(i instanceof ma)if(i.block)i.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new sa(i.widget||pd.block,a,i));else{let l=Zs.create(i.widget||pd.inline,a,a?0:i.startSide),u=this.atCursorPos&&!l.isEditable&&o<=r.length&&(e0),c=!l.isEditable&&(er.length||i.startSide<=0),d=this.getLine();this.pendingBuffer==2&&!u&&!l.isEditable&&(this.pendingBuffer=0),this.flushBuffer(r),u&&(d.append(Dm(new fd(1),r),o),o=r.length+Math.max(0,o-r.length)),d.append(Dm(l,r),o),this.atCursorPos=c,this.pendingBuffer=c?er.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(i);a&&(this.textOff+a<=this.text.length?this.textOff+=a:(this.skip+=a-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=n),this.openStart<0&&(this.openStart=o)}static build(e,n,i,r,o){let s=new pf(e,n,i,o);return s.openEnd=nt.spans(r,n,i,s),s.openStart<0&&(s.openStart=s.openEnd),s.finish(s.openEnd),s}}function Dm(t,e){for(let n of e)t=new os(n,[t],t.length);return t}class pd extends ps{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}pd.inline=new pd("span");pd.block=new pd("div");var _t=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(_t||(_t={}));const cu=_t.LTR,ox=_t.RTL;function M6(t){let e=[];for(let n=0;n=n){if(a.level==i)return s;(o<0||(r!=0?r<0?a.fromn:e[o].level>a.level))&&(o=s)}}if(o<0)throw new RangeError("Index out of range");return o}}function B6(t,e){if(t.length!=e.length)return!1;for(let n=0;n=0;O-=3)if(io[O+1]==-p){let y=io[O+2],b=y&2?r:y&4?y&1?o:r:0;b&&(ft[d]=ft[io[O]]=b),a=O;break}}else{if(io.length==189)break;io[a++]=d,io[a++]=h,io[a++]=l}else if((m=ft[d])==2||m==1){let O=m==r;l=O?0:1;for(let y=a-3;y>=0;y-=3){let b=io[y+2];if(b&2)break;if(O)io[y+2]|=2;else{if(b&4)break;io[y+2]|=4}}}}}function SK(t,e,n,i){for(let r=0,o=i;r<=n.length;r++){let s=r?n[r-1].to:t,a=rl;)m==y&&(m=n[--O].from,y=O?n[O-1].to:t),ft[--m]=p;l=c}else o=u,l++}}}function vS(t,e,n,i,r,o,s){let a=i%2?2:1;if(i%2==r%2)for(let l=e,u=0;ll&&s.push(new qs(l,O.from,p));let y=O.direction==cu!=!(p%2);SS(t,y?i+1:i,r,O.inner,O.from,O.to,s),l=O.to}m=O.to}else{if(m==n||(c?ft[m]!=a:ft[m]==a))break;m++}h?vS(t,l,m,i+1,r,h,s):le;){let c=!0,d=!1;if(!u||l>o[u-1].to){let O=ft[l-1];O!=a&&(c=!1,d=O==16)}let h=!c&&a==1?[]:null,p=c?i:i+1,m=l;e:for(;;)if(u&&m==o[u-1].to){if(d)break e;let O=o[--u];if(!c)for(let y=O.from,b=u;;){if(y==e)break e;if(b&&o[b-1].to==y)y=o[--b].from;else{if(ft[y-1]==a)break e;break}}if(h)h.push(O);else{O.toft.length;)ft[ft.length]=256;let i=[],r=e==cu?0:1;return SS(t,r,r,n,0,t.length,i),i}function Q6(t){return[new qs(0,t,0)]}let F6="";function kK(t,e,n,i,r){var o;let s=i.head-t.from,a=qs.find(e,s,(o=i.bidiLevel)!==null&&o!==void 0?o:-1,i.assoc),l=e[a],u=l.side(r,n);if(s==u){let h=a+=r?1:-1;if(h<0||h>=e.length)return null;l=e[a=h],s=l.side(!r,n),u=l.side(r,n)}let c=Cn(t.text,s,l.forward(r,n));(cl.to)&&(c=u),F6=t.text.slice(Math.min(s,c),Math.max(s,c));let d=a==(r?e.length-1:0)?null:e[a+(r?1:-1)];return d&&c==u&&d.level+(r?0:1)t.some(e=>e)}),Z6=he.define({combine:t=>t.some(e=>e)}),q6=he.define();class Gc{constructor(e,n="nearest",i="nearest",r=5,o=5,s=!1){this.range=e,this.y=n,this.x=i,this.yMargin=r,this.xMargin=o,this.isSnapshot=s}map(e){return e.empty?this:new Gc(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new Gc(Y.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const Bm=De.define({map:(t,e)=>t.map(e)});function mi(t,e,n){let i=t.facet(W6);i.length?i[0](e):window.onerror?window.onerror(String(e),n,void 0,void 0,e):n?console.error(n+":",e):console.error(e)}const lb=he.define({combine:t=>t.length?t[0]:!0});let _K=0;const jh=he.define();class tn{constructor(e,n,i,r,o){this.id=e,this.create=n,this.domEventHandlers=i,this.domEventObservers=r,this.extension=o(this)}static define(e,n){const{eventHandlers:i,eventObservers:r,provide:o,decorations:s}=n||{};return new tn(_K++,e,i,r,a=>{let l=[jh.of(a)];return s&&l.push(ep.of(u=>{let c=u.plugin(a);return c?s(c):Ee.none})),o&&l.push(o(a)),l})}static fromClass(e,n){return tn.define(i=>new e(i),n)}}class Cy{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(i){if(mi(n.state,i,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(n){mi(e.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(i){mi(e.state,i,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const Y6=he.define(),sx=he.define(),ep=he.define(),G6=he.define(),ax=he.define(),K6=he.define();function JP(t,e){let n=t.state.facet(K6);if(!n.length)return n;let i=n.map(o=>o instanceof Function?o(t):o),r=[];return nt.spans(i,e.from,e.to,{point(){},span(o,s,a,l){let u=o-e.from,c=s-e.from,d=r;for(let h=a.length-1;h>=0;h--,l--){let p=a[h].spec.bidiIsolate,m;if(p==null&&(p=xK(e.text,u,c)),l>0&&d.length&&(m=d[d.length-1]).to==u&&m.direction==p)m.to=c,d=m.inner;else{let O={from:u,to:c,direction:p,inner:[]};d.push(O),d=O.inner}}}}),r}const J6=he.define();function eD(t){let e=0,n=0,i=0,r=0;for(let o of t.state.facet(J6)){let s=o(t);s&&(s.left!=null&&(e=Math.max(e,s.left)),s.right!=null&&(n=Math.max(n,s.right)),s.top!=null&&(i=Math.max(i,s.top)),s.bottom!=null&&(r=Math.max(r,s.bottom)))}return{left:e,right:n,top:i,bottom:r}}const Xh=he.define();class lr{constructor(e,n,i,r){this.fromA=e,this.toA=n,this.fromB=i,this.toB=r}join(e){return new lr(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let n=e.length,i=this;for(;n>0;n--){let r=e[n-1];if(!(r.fromA>i.toA)){if(r.toAc)break;o+=2}if(!l)return i;new lr(l.fromA,l.toA,l.fromB,l.toB).addToSet(i),s=l.toA,a=l.toB}}}class Q0{constructor(e,n,i){this.view=e,this.state=n,this.transactions=i,this.flags=0,this.startState=e.state,this.changes=an.empty(this.startState.doc.length);for(let o of i)this.changes=this.changes.compose(o.changes);let r=[];this.changes.iterChangedRanges((o,s,a,l)=>r.push(new lr(o,s,a,l))),this.changedRanges=r}static create(e,n,i){return new Q0(e,n,i)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class eA extends mt{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new on],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new lr(0,0,0,e.state.doc.length)],0,null)}update(e){var n;let i=e.changedRanges;this.minWidth>0&&i.length&&(i.every(({fromA:u,toA:c})=>cthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0);let r=-1;this.view.inputState.composing>=0&&(!((n=this.domChanged)===null||n===void 0)&&n.newSel?r=this.domChanged.newSel.head:!IK(e.changes,this.hasComposition)&&!e.selectionSet&&(r=e.state.selection.main.head));let o=r>-1?CK(this.view,e.changes,r):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:u,to:c}=this.hasComposition;i=new lr(u,c,e.changes.mapPos(u,-1),e.changes.mapPos(c,1)).addToSet(i.slice())}this.hasComposition=o?{from:o.range.fromB,to:o.range.toB}:null,(pe.ie||pe.chrome)&&!o&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let s=this.decorations,a=this.updateDeco(),l=AK(s,a,e.changes);return i=lr.extendWithRanges(i,l),!(this.flags&7)&&i.length==0?!1:(this.updateInner(i,e.startState.doc.length,o),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,n,i){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,n,i);let{observer:r}=this.view;r.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let s=pe.chrome||pe.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,s),this.flags&=-8,s&&(s.written||r.selectionRange.focusNode!=s.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(s=>s.flags&=-9);let o=[];if(this.view.viewport.from||this.view.viewport.to=0?r[s]:null;if(!a)break;let{fromA:l,toA:u,fromB:c,toB:d}=a,h,p,m,O;if(i&&i.range.fromBc){let k=pf.build(this.view.state.doc,c,i.range.fromB,this.decorations,this.dynamicDecorationMap),x=pf.build(this.view.state.doc,i.range.toB,d,this.decorations,this.dynamicDecorationMap);p=k.breakAtStart,m=k.openStart,O=x.openEnd;let _=this.compositionView(i);x.breakAtStart?_.breakAfter=1:x.content.length&&_.merge(_.length,_.length,x.content[0],!1,x.openStart,0)&&(_.breakAfter=x.content[0].breakAfter,x.content.shift()),k.content.length&&_.merge(0,0,k.content[k.content.length-1],!0,0,k.openEnd)&&k.content.pop(),h=k.content.concat(_).concat(x.content)}else({content:h,breakAtStart:p,openStart:m,openEnd:O}=pf.build(this.view.state.doc,c,d,this.decorations,this.dynamicDecorationMap));let{i:y,off:b}=o.findPos(u,1),{i:v,off:S}=o.findPos(l,-1);T6(this,v,S,y,b,h,p,m,O)}i&&this.fixCompositionDOM(i)}compositionView(e){let n=new Ur(e.text.nodeValue);n.flags|=8;for(let{deco:r}of e.marks)n=new os(r,[n],n.length);let i=new on;return i.append(n,0),i}fixCompositionDOM(e){let n=(o,s)=>{s.flags|=8|(s.children.some(l=>l.flags&7)?1:0),this.markedForComposition.add(s);let a=mt.get(o);a&&a!=s&&(a.dom=null),s.setDOM(o)},i=this.childPos(e.range.fromB,1),r=this.children[i.i];n(e.line,r);for(let o=e.marks.length-1;o>=-1;o--)i=r.childPos(i.off,1),r=r.children[i.i],n(o>=0?e.marks[o].node:e.text,r)}updateSelection(e=!1,n=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let i=this.view.root.activeElement,r=i==this.dom,o=!r&&Fg(this.dom,this.view.observer.selectionRange)&&!(i&&this.dom.contains(i));if(!(r||n||o))return;let s=this.forceSelection;this.forceSelection=!1;let a=this.view.state.selection.main,l=this.moveToLine(this.domAtPos(a.anchor)),u=a.empty?l:this.moveToLine(this.domAtPos(a.head));if(pe.gecko&&a.empty&&!this.hasComposition&&EK(l)){let d=document.createTextNode("");this.view.observer.ignore(()=>l.node.insertBefore(d,l.node.childNodes[l.offset]||null)),l=u=new Dn(d,0),s=!0}let c=this.view.observer.selectionRange;(s||!c.focusNode||(!ff(l.node,l.offset,c.anchorNode,c.anchorOffset)||!ff(u.node,u.offset,c.focusNode,c.focusOffset))&&!this.suppressWidgetCursorChange(c,a))&&(this.view.observer.ignore(()=>{pe.android&&pe.chrome&&this.dom.contains(c.focusNode)&&RK(c.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let d=D0(this.view.root);if(d)if(a.empty){if(pe.gecko){let h=TK(l.node,l.offset);if(h&&h!=3){let p=(h==1?_6:E6)(l.node,l.offset);p&&(l=new Dn(p.node,p.offset))}}d.collapse(l.node,l.offset),a.bidiLevel!=null&&d.caretBidiLevel!==void 0&&(d.caretBidiLevel=a.bidiLevel)}else if(d.extend){d.collapse(l.node,l.offset);try{d.extend(u.node,u.offset)}catch{}}else{let h=document.createRange();a.anchor>a.head&&([l,u]=[u,l]),h.setEnd(u.node,u.offset),h.setStart(l.node,l.offset),d.removeAllRanges(),d.addRange(h)}o&&this.view.root.activeElement==this.dom&&(this.dom.blur(),i&&i.focus())}),this.view.observer.setSelectionRange(l,u)),this.impreciseAnchor=l.precise?null:new Dn(c.anchorNode,c.anchorOffset),this.impreciseHead=u.precise?null:new Dn(c.focusNode,c.focusOffset)}suppressWidgetCursorChange(e,n){return this.hasComposition&&n.empty&&ff(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==n.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,n=e.state.selection.main,i=D0(e.root),{anchorNode:r,anchorOffset:o}=e.observer.selectionRange;if(!i||!n.empty||!n.assoc||!i.modify)return;let s=on.find(this,n.head);if(!s)return;let a=s.posAtStart;if(n.head==a||n.head==a+s.length)return;let l=this.coordsAt(n.head,-1),u=this.coordsAt(n.head,1);if(!l||!u||l.bottom>u.top)return;let c=this.domAtPos(n.head+n.assoc);i.collapse(c.node,c.offset),i.modify("move",n.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let d=e.observer.selectionRange;e.docView.posFromDOM(d.anchorNode,d.anchorOffset)!=n.from&&i.collapse(r,o)}moveToLine(e){let n=this.dom,i;if(e.node!=n)return e;for(let r=e.offset;!i&&r=0;r--){let o=mt.get(n.childNodes[r]);o instanceof on&&(i=o.domAtPos(o.length))}return i?new Dn(i.node,i.offset,!0):e}nearest(e){for(let n=e;n;){let i=mt.get(n);if(i&&i.rootView==this)return i;n=n.parentNode}return null}posFromDOM(e,n){let i=this.nearest(e);if(!i)throw new RangeError("Trying to find position for a DOM position outside of the document");return i.localPosFromDOM(e,n)+i.posAtStart}domAtPos(e){let{i:n,off:i}=this.childCursor().findPos(e,-1);for(;n=0;s--){let a=this.children[s],l=o-a.breakAfter,u=l-a.length;if(le||a.covers(1))&&(!i||a instanceof on&&!(i instanceof on&&n>=0))&&(i=a,r=u),o=u}return i?i.coordsAt(e-r,n):null}coordsForChar(e){let{i:n,off:i}=this.childPos(e,1),r=this.children[n];if(!(r instanceof on))return null;for(;r.children.length;){let{i:a,off:l}=r.childPos(i,1);for(;;a++){if(a==r.children.length)return null;if((r=r.children[a]).length)break}i=l}if(!(r instanceof Ur))return null;let o=Cn(r.text,i);if(o==i)return null;let s=uu(r.dom,i,o).getClientRects();for(let a=0;aMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,l=this.view.textDirection==_t.LTR;for(let u=0,c=0;cr)break;if(u>=i){let p=d.dom.getBoundingClientRect();if(n.push(p.height),s){let m=d.dom.lastChild,O=m?Jf(m):[];if(O.length){let y=O[O.length-1],b=l?y.right-p.left:p.right-y.left;b>a&&(a=b,this.minWidth=o,this.minWidthFrom=u,this.minWidthTo=h)}}}u=h+d.breakAfter}return n}textDirectionAt(e){let{i:n}=this.childPos(e,1);return getComputedStyle(this.children[n].dom).direction=="rtl"?_t.RTL:_t.LTR}measureTextSize(){for(let o of this.children)if(o instanceof on){let s=o.measureTextSize();if(s)return s}let e=document.createElement("div"),n,i,r;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let o=Jf(e.firstChild)[0];n=e.getBoundingClientRect().height,i=o?o.width/27:7,r=o?o.height:n,e.remove()}),{lineHeight:n,charWidth:i,textHeight:r}}childCursor(e=this.length){let n=this.children.length;return n&&(e-=this.children[--n].length),new C6(this.children,e,n)}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let i=0,r=0;;r++){let o=r==n.viewports.length?null:n.viewports[r],s=o?o.from-1:this.length;if(s>i){let a=(n.lineBlockAt(s).bottom-n.lineBlockAt(i).top)/this.view.scaleY;e.push(Ee.replace({widget:new tA(a),block:!0,inclusive:!0,isBlockGap:!0}).range(i,s))}if(!o)break;i=o.to+1}return Ee.set(e)}updateDeco(){let e=0,n=this.view.state.facet(ep).map(o=>(this.dynamicDecorationMap[e++]=typeof o=="function")?o(this.view):o),i=!1,r=this.view.state.facet(G6).map((o,s)=>{let a=typeof o=="function";return a&&(i=!0),a?o(this.view):o});for(r.length&&(this.dynamicDecorationMap[e++]=i,n.push(nt.join(r))),this.decorations=[...n,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];en.anchor?-1:1),r;if(!i)return;!n.empty&&(r=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(i={left:Math.min(i.left,r.left),top:Math.min(i.top,r.top),right:Math.max(i.right,r.right),bottom:Math.max(i.bottom,r.bottom)});let o=eD(this.view),s={left:i.left-o.left,top:i.top-o.top,right:i.right+o.right,bottom:i.bottom+o.bottom},{offsetWidth:a,offsetHeight:l}=this.view.scrollDOM;sK(this.view.scrollDOM,s,n.head{ie.from&&(n=!0)}),n}function $K(t,e,n=1){let i=t.charCategorizer(e),r=t.doc.lineAt(e),o=e-r.from;if(r.length==0)return Y.cursor(e);o==0?n=1:o==r.length&&(n=-1);let s=o,a=o;n<0?s=Cn(r.text,o,!1):a=Cn(r.text,o);let l=i(r.text.slice(s,a));for(;s>0;){let u=Cn(r.text,s,!1);if(i(r.text.slice(u,s))!=l)break;s=u}for(;at?e.left-t:Math.max(0,t-e.right)}function NK(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function Ty(t,e){return t.tope.top+1}function nA(t,e){return et.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function kS(t,e,n){let i,r,o,s,a=!1,l,u,c,d;for(let m=t.firstChild;m;m=m.nextSibling){let O=Jf(m);for(let y=0;yS||s==S&&o>v){i=m,r=b,o=v,s=S;let k=S?n0?y0)}v==0?n>b.bottom&&(!c||c.bottomb.top)&&(u=m,d=b):c&&Ty(c,b)?c=iA(c,b.bottom):d&&Ty(d,b)&&(d=nA(d,b.top))}}if(c&&c.bottom>=n?(i=l,r=c):d&&d.top<=n&&(i=u,r=d),!i)return{node:t,offset:0};let h=Math.max(r.left,Math.min(r.right,e));if(i.nodeType==3)return rA(i,h,n);if(a&&i.contentEditable!="false")return kS(i,h,n);let p=Array.prototype.indexOf.call(t.childNodes,i)+(e>=(r.left+r.right)/2?1:0);return{node:t,offset:p}}function rA(t,e,n){let i=t.nodeValue.length,r=-1,o=1e9,s=0;for(let a=0;an?c.top-n:n-c.bottom)-1;if(c.left-1<=e&&c.right+1>=e&&d=(c.left+c.right)/2,p=h;if((pe.chrome||pe.gecko)&&uu(t,a).getBoundingClientRect().left==c.right&&(p=!h),d<=0)return{node:t,offset:a+(p?1:0)};r=a+(p?1:0),o=d}}}return{node:t,offset:r>-1?r:s>0?t.nodeValue.length:0}}function nD(t,e,n,i=-1){var r,o;let s=t.contentDOM.getBoundingClientRect(),a=s.top+t.viewState.paddingTop,l,{docHeight:u}=t.viewState,{x:c,y:d}=e,h=d-a;if(h<0)return 0;if(h>u)return t.state.doc.length;for(let k=t.viewState.heightOracle.textHeight/2,x=!1;l=t.elementAtHeight(h),l.type!=ti.Text;)for(;h=i>0?l.bottom+k:l.top-k,!(h>=0&&h<=u);){if(x)return n?null:0;x=!0,i=-i}d=a+h;let p=l.from;if(pt.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:n?null:oA(t,s,l,c,d);let m=t.dom.ownerDocument,O=t.root.elementFromPoint?t.root:m,y=O.elementFromPoint(c,d);y&&!t.contentDOM.contains(y)&&(y=null),y||(c=Math.max(s.left+1,Math.min(s.right-1,c)),y=O.elementFromPoint(c,d),y&&!t.contentDOM.contains(y)&&(y=null));let b,v=-1;if(y&&((r=t.docView.nearest(y))===null||r===void 0?void 0:r.isEditable)!=!1){if(m.caretPositionFromPoint){let k=m.caretPositionFromPoint(c,d);k&&({offsetNode:b,offset:v}=k)}else if(m.caretRangeFromPoint){let k=m.caretRangeFromPoint(c,d);k&&({startContainer:b,startOffset:v}=k,(!t.contentDOM.contains(b)||pe.safari&&MK(b,v,c)||pe.chrome&&DK(b,v,c))&&(b=void 0))}}if(!b||!t.docView.dom.contains(b)){let k=on.find(t.docView,p);if(!k)return h>l.top+l.height/2?l.to:l.from;({node:b,offset:v}=kS(k.dom,c,d))}let S=t.docView.nearest(b);if(!S)return null;if(S.isWidget&&((o=S.dom)===null||o===void 0?void 0:o.nodeType)==1){let k=S.dom.getBoundingClientRect();return e.yt.defaultLineHeight*1.5){let a=t.viewState.heightOracle.textHeight,l=Math.floor((r-n.top-(t.defaultLineHeight-a)*.5)/a);o+=l*t.viewState.heightOracle.lineLength}let s=t.state.sliceDoc(n.from,n.to);return n.from+uS(s,o,t.state.tabSize)}function MK(t,e,n){let i;if(t.nodeType!=3||e!=(i=t.nodeValue.length))return!1;for(let r=t.nextSibling;r;r=r.nextSibling)if(r.nodeType!=1||r.nodeName!="BR")return!1;return uu(t,i-1,i).getBoundingClientRect().left>n}function DK(t,e,n){if(e!=0)return!1;for(let r=t;;){let o=r.parentNode;if(!o||o.nodeType!=1||o.firstChild!=r)return!1;if(o.classList.contains("cm-line"))break;r=o}let i=t.nodeType==1?t.getBoundingClientRect():uu(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect();return n-i.left>5}function xS(t,e){let n=t.lineBlockAt(e);if(Array.isArray(n.type)){for(let i of n.type)if(i.to>e||i.to==e&&(i.to==n.to||i.type==ti.Text))return i}return n}function BK(t,e,n,i){let r=xS(t,e.head),o=!i||r.type!=ti.Text||!(t.lineWrapping||r.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>r.from?e.head-1:e.head);if(o){let s=t.dom.getBoundingClientRect(),a=t.textDirectionAt(r.from),l=t.posAtCoords({x:n==(a==_t.LTR)?s.right-1:s.left+1,y:(o.top+o.bottom)/2});if(l!=null)return Y.cursor(l,n?-1:1)}return Y.cursor(n?r.to:r.from,n?-1:1)}function sA(t,e,n,i){let r=t.state.doc.lineAt(e.head),o=t.bidiSpans(r),s=t.textDirectionAt(r.from);for(let a=e,l=null;;){let u=kK(r,o,s,a,n),c=F6;if(!u){if(r.number==(n?t.state.doc.lines:1))return a;c=` +`,r=t.state.doc.line(r.number+(n?1:-1)),o=t.bidiSpans(r),u=t.visualLineSide(r,!n)}if(l){if(!l(c))return a}else{if(!i)return u;l=i(c)}a=u}}function QK(t,e,n){let i=t.state.charCategorizer(e),r=i(n);return o=>{let s=i(o);return r==Rt.Space&&(r=s),r==s}}function FK(t,e,n,i){let r=e.head,o=n?1:-1;if(r==(n?t.state.doc.length:0))return Y.cursor(r,e.assoc);let s=e.goalColumn,a,l=t.contentDOM.getBoundingClientRect(),u=t.coordsAtPos(r,e.assoc||-1),c=t.documentTop;if(u)s==null&&(s=u.left-l.left),a=o<0?u.top:u.bottom;else{let p=t.viewState.lineBlockAt(r);s==null&&(s=Math.min(l.right-l.left,t.defaultCharacterWidth*(r-p.from))),a=(o<0?p.top:p.bottom)+c}let d=l.left+s,h=i??t.viewState.heightOracle.textHeight>>1;for(let p=0;;p+=10){let m=a+(h+p)*o,O=nD(t,{x:d,y:m},!1,o);if(ml.bottom||(o<0?Or)){let y=t.docView.coordsForChar(O),b=!y||m{if(e>o&&er(t)),n.from,e.head>n.from?-1:1);return i==n.from?n:Y.cursor(i,inull),pe.gecko&&iJ(e.contentDOM.ownerDocument)}handleEvent(e){!qK(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||this.runHandlers(e.type,e)}runHandlers(e,n){let i=this.handlers[e];if(i){for(let r of i.observers)r(this.view,n);for(let r of i.handlers){if(n.defaultPrevented)break;if(r(this.view,n)){n.preventDefault();break}}}}ensureHandlers(e){let n=HK(e),i=this.handlers,r=this.view.contentDOM;for(let o in n)if(o!="scroll"){let s=!n[o].handlers.length,a=i[o];a&&s!=!a.handlers.length&&(r.removeEventListener(o,this.handleEvent),a=null),a||r.addEventListener(o,this.handleEvent,{passive:s})}for(let o in i)o!="scroll"&&!n[o]&&r.removeEventListener(o,this.handleEvent);this.handlers=n}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&Date.now()i.keyCode==e.keyCode))&&!e.ctrlKey||UK.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=n||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let n=this.pendingIOSKey;return!n||n.key=="Enter"&&e&&e.from0?!0:pe.safari&&!pe.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function aA(t,e){return(n,i)=>{try{return e.call(t,i,n)}catch(r){mi(n.state,r)}}}function HK(t){let e=Object.create(null);function n(i){return e[i]||(e[i]={observers:[],handlers:[]})}for(let i of t){let r=i.spec;if(r&&r.domEventHandlers)for(let o in r.domEventHandlers){let s=r.domEventHandlers[o];s&&n(o).handlers.push(aA(i.value,s))}if(r&&r.domEventObservers)for(let o in r.domEventObservers){let s=r.domEventObservers[o];s&&n(o).observers.push(aA(i.value,s))}}for(let i in Wr)n(i).handlers.push(Wr[i]);for(let i in hr)n(i).observers.push(hr[i]);return e}const iD=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],UK="dthko",rD=[16,17,18,20,91,92,224,225],Qm=6;function Fm(t){return Math.max(0,t)*.7+8}function WK(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}class VK{constructor(e,n,i,r){this.view=e,this.startEvent=n,this.style=i,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParent=aK(e.contentDOM),this.atoms=e.state.facet(ax).map(s=>s(e));let o=e.contentDOM.ownerDocument;o.addEventListener("mousemove",this.move=this.move.bind(this)),o.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=e.state.facet(je.allowMultipleSelections)&&jK(e,n),this.dragging=ZK(e,n)&&lD(n)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){var n;if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&WK(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let i=0,r=0,o=((n=this.scrollParent)===null||n===void 0?void 0:n.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight},s=eD(this.view);e.clientX-s.left<=o.left+Qm?i=-Fm(o.left-e.clientX):e.clientX+s.right>=o.right-Qm&&(i=Fm(e.clientX-o.right)),e.clientY-s.top<=o.top+Qm?r=-Fm(o.top-e.clientY):e.clientY+s.bottom>=o.bottom-Qm&&(r=Fm(e.clientY-o.bottom)),this.setScrollSpeed(i,r)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,n){this.scrollSpeed={x:e,y:n},e||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let n=null;for(let i=0;ithis.select(this.lastEvent),20)}}function jK(t,e){let n=t.state.facet(z6);return n.length?n[0](e):pe.mac?e.metaKey:e.ctrlKey}function XK(t,e){let n=t.state.facet(H6);return n.length?n[0](e):pe.mac?!e.altKey:!e.ctrlKey}function ZK(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let i=D0(t.root);if(!i||i.rangeCount==0)return!0;let r=i.getRangeAt(0).getClientRects();for(let o=0;o=e.clientX&&s.top<=e.clientY&&s.bottom>=e.clientY)return!0}return!1}function qK(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,i;n!=t.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(i=mt.get(n))&&i.ignoreEvent(e))return!1;return!0}const Wr=Object.create(null),hr=Object.create(null),oD=pe.ie&&pe.ie_version<15||pe.ios&&pe.webkit_version<604;function YK(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{t.focus(),n.remove(),sD(t,n.value)},50)}function sD(t,e){let{state:n}=t,i,r=1,o=n.toText(e),s=o.lines==n.selection.ranges.length;if(_S!=null&&n.selection.ranges.every(l=>l.empty)&&_S==o.toString()){let l=-1;i=n.changeByRange(u=>{let c=n.doc.lineAt(u.from);if(c.from==l)return{range:u};l=c.from;let d=n.toText((s?o.line(r++).text:e)+n.lineBreak);return{changes:{from:c.from,insert:d},range:Y.cursor(u.from+d.length)}})}else s?i=n.changeByRange(l=>{let u=o.line(r++);return{changes:{from:l.from,to:l.to,insert:u.text},range:Y.cursor(l.from+u.length)}}):i=n.replaceSelection(o);t.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}hr.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft};Wr.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),e.keyCode==27&&(t.inputState.lastEscPress=Date.now()),!1);hr.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")};hr.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};Wr.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let i of t.state.facet(U6))if(n=i(t,e),n)break;if(!n&&e.button==0&&(n=JK(t,e)),n){let i=!t.hasFocus;t.inputState.startMouseSelection(new VK(t,e,n,i)),i&&t.observer.ignore(()=>w6(t.contentDOM));let r=t.inputState.mouseSelection;if(r)return r.start(e),r.dragging===!1}return!1};function lA(t,e,n,i){if(i==1)return Y.cursor(e,n);if(i==2)return $K(t.state,e,n);{let r=on.find(t.docView,e),o=t.state.doc.lineAt(r?r.posAtEnd:e),s=r?r.posAtStart:o.from,a=r?r.posAtEnd:o.to;return at>=e.top&&t<=e.bottom,uA=(t,e,n)=>aD(e,n)&&t>=n.left&&t<=n.right;function GK(t,e,n,i){let r=on.find(t.docView,e);if(!r)return 1;let o=e-r.posAtStart;if(o==0)return 1;if(o==r.length)return-1;let s=r.coordsAt(o,-1);if(s&&uA(n,i,s))return-1;let a=r.coordsAt(o,1);return a&&uA(n,i,a)?1:s&&aD(i,s)?-1:1}function cA(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:n,bias:GK(t,n,e.clientX,e.clientY)}}const KK=pe.ie&&pe.ie_version<=11;let dA=null,hA=0,fA=0;function lD(t){if(!KK)return t.detail;let e=dA,n=fA;return dA=t,fA=Date.now(),hA=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(hA+1)%3:1}function JK(t,e){let n=cA(t,e),i=lD(e),r=t.state.selection;return{update(o){o.docChanged&&(n.pos=o.changes.mapPos(n.pos),r=r.map(o.changes))},get(o,s,a){let l=cA(t,o),u,c=lA(t,l.pos,l.bias,i);if(n.pos!=l.pos&&!s){let d=lA(t,n.pos,n.bias,i),h=Math.min(d.from,c.from),p=Math.max(d.to,c.to);c=h1&&(u=eJ(r,l.pos))?u:a?r.addRange(c):Y.create([c])}}}function eJ(t,e){for(let n=0;n=e)return Y.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}return null}Wr.dragstart=(t,e)=>{let{selection:{main:n}}=t.state;if(e.target.draggable){let r=t.docView.nearest(e.target);if(r&&r.isWidget){let o=r.posAtStart,s=o+r.length;(o>=n.to||s<=n.from)&&(n=Y.range(o,s))}}let{inputState:i}=t;return i.mouseSelection&&(i.mouseSelection.dragging=!0),i.draggedContent=n,e.dataTransfer&&(e.dataTransfer.setData("Text",t.state.sliceDoc(n.from,n.to)),e.dataTransfer.effectAllowed="copyMove"),!1};Wr.dragend=t=>(t.inputState.draggedContent=null,!1);function pA(t,e,n,i){if(!n)return;let r=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:o}=t.inputState,s=i&&o&&XK(t,e)?{from:o.from,to:o.to}:null,a={from:r,insert:n},l=t.state.changes(s?[s,a]:a);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(r,-1),head:l.mapPos(r,1)},userEvent:s?"move.drop":"input.drop"}),t.inputState.draggedContent=null}Wr.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let n=e.dataTransfer.files;if(n&&n.length){let i=Array(n.length),r=0,o=()=>{++r==n.length&&pA(t,e,i.filter(s=>s!=null).join(t.state.lineBreak),!1)};for(let s=0;s{/[\x00-\x08\x0e-\x1f]{2}/.test(a.result)||(i[s]=a.result),o()},a.readAsText(n[s])}return!0}else{let i=e.dataTransfer.getData("Text");if(i)return pA(t,e,i,!0),!0}return!1};Wr.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let n=oD?null:e.clipboardData;return n?(sD(t,n.getData("text/plain")||n.getData("text/uri-list")),!0):(YK(t),!1)};function tJ(t,e){let n=t.dom.parentNode;if(!n)return;let i=n.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.value=e,i.focus(),i.selectionEnd=e.length,i.selectionStart=0,setTimeout(()=>{i.remove(),t.focus()},50)}function nJ(t){let e=[],n=[],i=!1;for(let r of t.selection.ranges)r.empty||(e.push(t.sliceDoc(r.from,r.to)),n.push(r));if(!e.length){let r=-1;for(let{from:o}of t.selection.ranges){let s=t.doc.lineAt(o);s.number>r&&(e.push(s.text),n.push({from:s.from,to:Math.min(t.doc.length,s.to+1)})),r=s.number}i=!0}return{text:e.join(t.lineBreak),ranges:n,linewise:i}}let _S=null;Wr.copy=Wr.cut=(t,e)=>{let{text:n,ranges:i,linewise:r}=nJ(t.state);if(!n&&!r)return!1;_S=r?n:null,e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"});let o=oD?null:e.clipboardData;return o?(o.clearData(),o.setData("text/plain",n),!0):(tJ(t,n),!1)};const uD=fs.define();function cD(t,e){let n=[];for(let i of t.facet(j6)){let r=i(t,e);r&&n.push(r)}return n?t.update({effects:n,annotations:uD.of(!0)}):null}function dD(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=cD(t.state,e);n?t.dispatch(n):t.update([])}},10)}hr.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),dD(t)};hr.blur=t=>{t.observer.clearSelectionRange(),dD(t)};hr.compositionstart=hr.compositionupdate=t=>{t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0)};hr.compositionend=t=>{t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,pe.chrome&&pe.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50)};hr.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};Wr.beforeinput=(t,e)=>{var n;let i;if(pe.chrome&&pe.android&&(i=iD.find(r=>r.inputType==e.inputType))&&(t.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let r=((n=window.visualViewport)===null||n===void 0?void 0:n.height)||0;setTimeout(()=>{var o;(((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0)>r+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return pe.ios&&e.inputType=="deleteContentForward"&&t.observer.flushSoon(),pe.safari&&e.inputType=="insertText"&&t.inputState.composing>=0&&setTimeout(()=>hr.compositionend(t,e),20),!1};const mA=new Set;function iJ(t){mA.has(t)||(mA.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}const gA=["pre-wrap","normal","pre-line","break-spaces"];class rJ{constructor(e){this.lineWrapping=e,this.doc=st.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30,this.heightChanged=!1}heightForGap(e,n){let i=this.doc.lineAt(n).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((n-e-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return gA.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let n=!1;for(let i=0;i-1,l=Math.round(n)!=Math.round(this.lineHeight)||this.lineWrapping!=a;if(this.lineWrapping=a,this.lineHeight=n,this.charWidth=i,this.textHeight=r,this.lineLength=o,l){this.heightSamples={};for(let u=0;u0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e,n){this.height!=n&&(Math.abs(this.height-n)>Hg&&(e.heightChanged=!0),this.height=n)}replace(e,n,i){return ni.of(i)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,i,r){let o=this,s=i.doc;for(let a=r.length-1;a>=0;a--){let{fromA:l,toA:u,fromB:c,toB:d}=r[a],h=o.lineAt(l,kt.ByPosNoHeight,i.setDoc(n),0,0),p=h.to>=u?h:o.lineAt(u,kt.ByPosNoHeight,i,0,0);for(d+=p.to-u,u=p.to;a>0&&h.from<=r[a-1].toA;)l=r[a-1].fromA,c=r[a-1].fromB,a--,lo*2){let a=e[n-1];a.break?e.splice(--n,1,a.left,null,a.right):e.splice(--n,1,a.left,a.right),i+=1+a.break,r-=a.size}else if(o>r*2){let a=e[i];a.break?e.splice(i,1,a.left,null,a.right):e.splice(i,1,a.left,a.right),i+=2+a.break,o-=a.size}else break;else if(r=o&&s(this.blockAt(0,i,r,o))}updateHeight(e,n=0,i=!1,r){return r&&r.from<=n&&r.more&&this.setHeight(e,r.heights[r.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Ri extends hD{constructor(e,n){super(e,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,n,i,r){return new po(r,this.length,i,this.height,this.breaks)}replace(e,n,i){let r=i[0];return i.length==1&&(r instanceof Ri||r instanceof Sn&&r.flags&4)&&Math.abs(this.length-r.length)<10?(r instanceof Sn?r=new Ri(r.length,this.height):r.height=this.height,this.outdated||(r.outdated=!1),r):ni.of(i)}updateHeight(e,n=0,i=!1,r){return r&&r.from<=n&&r.more?this.setHeight(e,r.heights[r.index++]):(i||this.outdated)&&this.setHeight(e,Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Sn extends ni{constructor(e){super(e,0)}heightMetrics(e,n){let i=e.doc.lineAt(n).number,r=e.doc.lineAt(n+this.length).number,o=r-i+1,s,a=0;if(e.lineWrapping){let l=Math.min(this.height,e.lineHeight*o);s=l/o,this.length>o+1&&(a=(this.height-l)/(this.length-o-1))}else s=this.height/o;return{firstLine:i,lastLine:r,perLine:s,perChar:a}}blockAt(e,n,i,r){let{firstLine:o,lastLine:s,perLine:a,perChar:l}=this.heightMetrics(n,r);if(n.lineWrapping){let u=r+(e0){let o=i[i.length-1];o instanceof Sn?i[i.length-1]=new Sn(o.length+r):i.push(null,new Sn(r-1))}if(e>0){let o=i[0];o instanceof Sn?i[0]=new Sn(e+o.length):i.unshift(new Sn(e-1),null)}return ni.of(i)}decomposeLeft(e,n){n.push(new Sn(e-1),null)}decomposeRight(e,n){n.push(null,new Sn(this.length-e-1))}updateHeight(e,n=0,i=!1,r){let o=n+this.length;if(r&&r.from<=n+this.length&&r.more){let s=[],a=Math.max(n,r.from),l=-1;for(r.from>n&&s.push(new Sn(r.from-n-1).updateHeight(e,n));a<=o&&r.more;){let c=e.doc.lineAt(a).length;s.length&&s.push(null);let d=r.heights[r.index++];l==-1?l=d:Math.abs(d-l)>=Hg&&(l=-2);let h=new Ri(c,d);h.outdated=!1,s.push(h),a+=c+1}a<=o&&s.push(null,new Sn(o-a).updateHeight(e,a));let u=ni.of(s);return(l<0||Math.abs(u.height-this.height)>=Hg||Math.abs(l-this.heightMetrics(e,n).perLine)>=Hg)&&(e.heightChanged=!0),u}else(i||this.outdated)&&(this.setHeight(e,e.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class sJ extends ni{constructor(e,n,i){super(e.length+n+i.length,e.height+i.height,n|(e.outdated||i.outdated?2:0)),this.left=e,this.right=i,this.size=e.size+i.size}get break(){return this.flags&1}blockAt(e,n,i,r){let o=i+this.left.height;return ea))return u;let c=n==kt.ByPosNoHeight?kt.ByPosNoHeight:kt.ByPos;return l?u.join(this.right.lineAt(a,c,i,s,a)):this.left.lineAt(a,c,i,r,o).join(u)}forEachLine(e,n,i,r,o,s){let a=r+this.left.height,l=o+this.left.length+this.break;if(this.break)e=l&&this.right.forEachLine(e,n,i,a,l,s);else{let u=this.lineAt(l,kt.ByPos,i,r,o);e=e&&u.from<=n&&s(u),n>u.to&&this.right.forEachLine(u.to+1,n,i,a,l,s)}}replace(e,n,i){let r=this.left.length+this.break;if(nthis.left.length)return this.balanced(this.left,this.right.replace(e-r,n-r,i));let o=[];e>0&&this.decomposeLeft(e,o);let s=o.length;for(let a of i)o.push(a);if(e>0&&OA(o,s-1),n=i&&n.push(null)),e>i&&this.right.decomposeLeft(e-i,n)}decomposeRight(e,n){let i=this.left.length,r=i+this.break;if(e>=r)return this.right.decomposeRight(e-r,n);e2*n.size||n.size>2*e.size?ni.of(this.break?[e,null,n]:[e,n]):(this.left=e,this.right=n,this.height=e.height+n.height,this.outdated=e.outdated||n.outdated,this.size=e.size+n.size,this.length=e.length+this.break+n.length,this)}updateHeight(e,n=0,i=!1,r){let{left:o,right:s}=this,a=n+o.length+this.break,l=null;return r&&r.from<=n+o.length&&r.more?l=o=o.updateHeight(e,n,i,r):o.updateHeight(e,n,i),r&&r.from<=a+s.length&&r.more?l=s=s.updateHeight(e,a,i,r):s.updateHeight(e,a,i),l?this.balanced(o,s):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function OA(t,e){let n,i;t[e]==null&&(n=t[e-1])instanceof Sn&&(i=t[e+1])instanceof Sn&&t.splice(e-1,3,new Sn(n.length+1+i.length))}const aJ=5;class lx{constructor(e,n){this.pos=e,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,n){if(this.lineStart>-1){let i=Math.min(n,this.lineEnd),r=this.nodes[this.nodes.length-1];r instanceof Ri?r.length+=i-this.pos:(i>this.pos||!this.isCovered)&&this.nodes.push(new Ri(i-this.pos,-1)),this.writtenTo=i,n>i&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(e,n,i){if(e=aJ)&&this.addLineDeco(r,o,s)}else n>e&&this.span(e,n);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=n,this.writtenToe&&this.nodes.push(new Ri(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,n){let i=new Sn(n-e);return this.oracle.doc.lineAt(e).to==n&&(i.flags|=4),i}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Ri)return e;let n=new Ri(0,-1);return this.nodes.push(n),n}addBlock(e){this.enterLine();let n=e.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,n&&n.endSide>0&&(this.covering=e)}addLineDeco(e,n,i){let r=this.ensureLine();r.length+=i,r.collapsed+=i,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=n,this.writtenTo=this.pos=this.pos+i}finish(e){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof Ri)&&!this.isCovered?this.nodes.push(new Ri(0,-1)):(this.writtenToc.clientHeight||c.scrollWidth>c.clientWidth)&&d.overflow!="visible"){let h=c.getBoundingClientRect();o=Math.max(o,h.left),s=Math.min(s,h.right),a=Math.max(a,h.top),l=u==t.parentNode?h.bottom:Math.min(l,h.bottom)}u=d.position=="absolute"||d.position=="fixed"?c.offsetParent:c.parentNode}else if(u.nodeType==11)u=u.host;else break;return{left:o-n.left,right:Math.max(o,s)-n.left,top:a-(n.top+e),bottom:Math.max(a,l)-(n.top+e)}}function dJ(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class Ay{constructor(e,n,i){this.from=e,this.to=n,this.size=i}static same(e,n){if(e.length!=n.length)return!1;for(let i=0;itypeof i!="function"&&i.class=="cm-lineWrapping");this.heightOracle=new rJ(n),this.stateDeco=e.facet(ep).filter(i=>typeof i!="function"),this.heightMap=ni.empty().applyChanges(this.stateDeco,st.empty,this.heightOracle.setDoc(e.doc),[new lr(0,0,0,e.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Ee.set(this.lineGaps.map(i=>i.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:n}=this.state.selection;for(let i=0;i<=1;i++){let r=i?n.head:n.anchor;if(!e.some(({from:o,to:s})=>r>=o&&r<=s)){let{from:o,to:s}=this.lineBlockAt(r);e.push(new zm(o,s))}}this.viewports=e.sort((i,r)=>i.from-r.from),this.scaler=this.heightMap.height<=7e6?yA:new mJ(this.heightOracle,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(this.scaler.scale==1?e:Zh(e,this.scaler))})}update(e,n=null){this.state=e.state;let i=this.stateDeco;this.stateDeco=this.state.facet(ep).filter(c=>typeof c!="function");let r=e.changedRanges,o=lr.extendWithRanges(r,lJ(i,this.stateDeco,e?e.changes:an.empty(this.state.doc.length))),s=this.heightMap.height,a=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),o),this.heightMap.height!=s&&(e.flags|=2),a?(this.scrollAnchorPos=e.changes.mapPos(a.from,-1),this.scrollAnchorHeight=a.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let l=o.length?this.mapViewport(this.viewport,e.changes):this.viewport;(n&&(n.range.headl.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,n));let u=!e.changes.empty||e.flags&2||l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l,this.updateForViewport(),u&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(Z6)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let n=e.contentDOM,i=window.getComputedStyle(n),r=this.heightOracle,o=i.whiteSpace;this.defaultTextDirection=i.direction=="rtl"?_t.RTL:_t.LTR;let s=this.heightOracle.mustRefreshForWrapping(o),a=n.getBoundingClientRect(),l=s||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;let u=0,c=0;if(a.width&&a.height){let{scaleX:k,scaleY:x}=S6(n,a);(k>.005&&Math.abs(this.scaleX-k)>.005||x>.005&&Math.abs(this.scaleY-x)>.005)&&(this.scaleX=k,this.scaleY=x,u|=8,s=l=!0)}let d=(parseInt(i.paddingTop)||0)*this.scaleY,h=(parseInt(i.paddingBottom)||0)*this.scaleY;(this.paddingTop!=d||this.paddingBottom!=h)&&(this.paddingTop=d,this.paddingBottom=h,u|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(l=!0),this.editorWidth=e.scrollDOM.clientWidth,u|=8);let p=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=p&&(this.scrollAnchorHeight=-1,this.scrollTop=p),this.scrolledToBottom=x6(e.scrollDOM);let m=(this.printing?dJ:cJ)(n,this.paddingTop),O=m.top-this.pixelViewport.top,y=m.bottom-this.pixelViewport.bottom;this.pixelViewport=m;let b=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(b!=this.inView&&(this.inView=b,b&&(l=!0)),!this.inView&&!this.scrollTarget)return 0;let v=a.width;if((this.contentDOMWidth!=v||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=a.width,this.editorHeight=e.scrollDOM.clientHeight,u|=8),l){let k=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(k)&&(s=!0),s||r.lineWrapping&&Math.abs(v-this.contentDOMWidth)>r.charWidth){let{lineHeight:x,charWidth:_,textHeight:w}=e.docView.measureTextSize();s=x>0&&r.refresh(o,x,_,w,v/_,k),s&&(e.docView.minWidth=0,u|=8)}O>0&&y>0?c=Math.max(O,y):O<0&&y<0&&(c=Math.min(O,y)),r.heightChanged=!1;for(let x of this.viewports){let _=x.from==this.viewport.from?k:e.docView.measureVisibleLineHeights(x);this.heightMap=(s?ni.empty().applyChanges(this.stateDeco,st.empty,this.heightOracle,[new lr(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,s,new oJ(x.from,_))}r.heightChanged&&(u|=2)}let S=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return S&&(this.viewport=this.getViewport(c,this.scrollTarget)),this.updateForViewport(),(u&2||S)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(s?[]:this.lineGaps,e)),u|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),u}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,n){let i=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,o=this.heightOracle,{visibleTop:s,visibleBottom:a}=this,l=new zm(r.lineAt(s-i*1e3,kt.ByHeight,o,0,0).from,r.lineAt(a+(1-i)*1e3,kt.ByHeight,o,0,0).to);if(n){let{head:u}=n.range;if(ul.to){let c=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),d=r.lineAt(u,kt.ByPos,o,0,0),h;n.y=="center"?h=(d.top+d.bottom)/2-c/2:n.y=="start"||n.y=="nearest"&&u=a+Math.max(10,Math.min(i,250)))&&r>s-2*1e3&&o>1,s=r<<1;if(this.defaultTextDirection!=_t.LTR&&!i)return[];let a=[],l=(u,c,d,h)=>{if(c-uu&&yy.from>=d.from&&y.to<=d.to&&Math.abs(y.from-u)y.fromb));if(!O){if(cy.from<=c&&y.to>=c)){let y=n.moveToLineBoundary(Y.cursor(c),!1,!0).head;y>u&&(c=y)}O=new Ay(u,c,this.gapSize(d,u,c,h))}a.push(O)};for(let u of this.viewportLines){if(u.lengthu.from&&l(u.from,h,u,c),pn.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let n=[];nt.spans(e,this.viewport.from,this.viewport.to,{span(r,o){n.push({from:r,to:o})},point(){}},20);let i=n.length!=this.visibleRanges.length||this.visibleRanges.some((r,o)=>r.from!=n[o].from||r.to!=n[o].to);return this.visibleRanges=n,i?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(n=>n.from<=e&&n.to>=e)||Zh(this.heightMap.lineAt(e,kt.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return Zh(this.heightMap.lineAt(this.scaler.fromDOM(e),kt.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let n=this.lineBlockAtHeight(e+8);return n.from>=this.viewport.from||this.viewportLines[0].top-e>200?n:this.viewportLines[0]}elementAtHeight(e){return Zh(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class zm{constructor(e,n){this.from=e,this.to=n}}function fJ(t,e,n){let i=[],r=t,o=0;return nt.spans(n,t,e,{span(){},point(s,a){s>r&&(i.push({from:r,to:s}),o+=s-r),r=a}},20),r=1)return e[e.length-1].to;let i=Math.floor(t*n);for(let r=0;;r++){let{from:o,to:s}=e[r],a=s-o;if(i<=a)return o+i;i-=a}}function Um(t,e){let n=0;for(let{from:i,to:r}of t.ranges){if(e<=r){n+=e-i;break}n+=r-i}return n/t.total}function pJ(t,e){for(let n of t)if(e(n))return n}const yA={toDOM(t){return t},fromDOM(t){return t},scale:1};class mJ{constructor(e,n,i){let r=0,o=0,s=0;this.viewports=i.map(({from:a,to:l})=>{let u=n.lineAt(a,kt.ByPos,e,0,0).top,c=n.lineAt(l,kt.ByPos,e,0,0).bottom;return r+=c-u,{from:a,to:l,top:u,bottom:c,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(n.height-r);for(let a of this.viewports)a.domTop=s+(a.top-o)*this.scale,s=a.domBottom=a.domTop+(a.bottom-a.top),o=a.bottom}toDOM(e){for(let n=0,i=0,r=0;;n++){let o=nZh(r,e)):t._content)}const Wm=he.define({combine:t=>t.join(" ")}),ES=he.define({combine:t=>t.indexOf(!0)>-1}),CS=fa.newName(),fD=fa.newName(),pD=fa.newName(),mD={"&light":"."+fD,"&dark":"."+pD};function TS(t,e,n){return new fa(e,{finish(i){return/&/.test(i)?i.replace(/&\w*/,r=>{if(r=="&")return t;if(!n||!n[r])throw new RangeError(`Unsupported selector: ${r}`);return n[r]}):t+" "+i}})}const gJ=TS("."+CS,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},mD),qh="￿";class OJ{constructor(e,n){this.points=e,this.text="",this.lineSeparator=n.facet(je.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=qh}readRange(e,n){if(!e)return this;let i=e.parentNode;for(let r=e;;){this.findPointBefore(i,r);let o=this.text.length;this.readNode(r);let s=r.nextSibling;if(s==n)break;let a=mt.get(r),l=mt.get(s);(a&&l?a.breakAfter:(a?a.breakAfter:B0(r))||B0(s)&&(r.nodeName!="BR"||r.cmIgnore)&&this.text.length>o)&&this.lineBreak(),r=s}return this.findPointBefore(i,n),this}readTextNode(e){let n=e.nodeValue;for(let i of this.points)i.node==e&&(i.pos=this.text.length+Math.min(i.offset,n.length));for(let i=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let o=-1,s=1,a;if(this.lineSeparator?(o=n.indexOf(this.lineSeparator,i),s=this.lineSeparator.length):(a=r.exec(n))&&(o=a.index,s=a[0].length),this.append(n.slice(i,o<0?n.length:o)),o<0)break;if(this.lineBreak(),s>1)for(let l of this.points)l.node==e&&l.pos>this.text.length&&(l.pos-=s-1);i=o+s}}readNode(e){if(e.cmIgnore)return;let n=mt.get(e),i=n&&n.overrideDOMText;if(i!=null){this.findPointInside(e,i.length);for(let r=i.iter();!r.next().done;)r.lineBreak?this.lineBreak():this.append(r.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,n){for(let i of this.points)i.node==e&&e.childNodes[i.offset]==n&&(i.pos=this.text.length)}findPointInside(e,n){for(let i of this.points)(e.nodeType==3?i.node==e:e.contains(i.node))&&(i.pos=this.text.length+(bJ(e,i.node,i.offset)?n:0))}}function bJ(t,e,n){for(;;){if(!e||n-1)this.newSel=null;else if(n>-1&&(this.bounds=e.docView.domBoundsAround(n,i,0))){let a=o||s?[]:wJ(e),l=new OJ(a,e.state);l.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=l.text,this.newSel=kJ(a,this.bounds.from)}else{let a=e.observer.selectionRange,l=o&&o.node==a.focusNode&&o.offset==a.focusOffset||!hS(e.contentDOM,a.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(a.focusNode,a.focusOffset),u=s&&s.node==a.anchorNode&&s.offset==a.anchorOffset||!hS(e.contentDOM,a.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(a.anchorNode,a.anchorOffset),c=e.viewport;if((pe.ios||pe.chrome)&&e.state.selection.main.empty&&l!=u&&(c.from>0||c.toDate.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:s,to:a}=e.bounds,l=r.from,u=null;(o===8||pe.android&&e.text.length=r.from&&n.to<=r.to&&(n.from!=r.from||n.to!=r.to)&&r.to-r.from-(n.to-n.from)<=4?n={from:r.from,to:r.to,insert:t.state.doc.slice(r.from,n.from).append(n.insert).append(t.state.doc.slice(n.to,r.to))}:(pe.mac||pe.android)&&n&&n.from==n.to&&n.from==r.head-1&&/^\. ?$/.test(n.insert.toString())&&t.contentDOM.getAttribute("autocorrect")=="off"?(i&&n.insert.length==2&&(i=Y.single(i.main.anchor-1,i.main.head-1)),n={from:r.from,to:r.to,insert:st.of([" "])}):pe.chrome&&n&&n.from==n.to&&n.from==r.head&&n.insert.toString()==` + `&&t.lineWrapping&&(i&&(i=Y.single(i.main.anchor-1,i.main.head-1)),n={from:r.from,to:r.to,insert:st.of([" "])}),n){if(pe.ios&&t.inputState.flushIOSKey(n)||pe.android&&(n.to==r.to&&(n.from==r.from||n.from==r.from-1&&t.state.sliceDoc(n.from,r.from)==" ")&&n.insert.length==1&&n.insert.lines==2&&Yc(t.contentDOM,"Enter",13)||(n.from==r.from-1&&n.to==r.to&&n.insert.length==0||o==8&&n.insert.lengthr.head)&&Yc(t.contentDOM,"Backspace",8)||n.from==r.from&&n.to==r.to+1&&n.insert.length==0&&Yc(t.contentDOM,"Delete",46)))return!0;let s=n.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let a,l=()=>a||(a=vJ(t,n,i));return t.state.facet(V6).some(u=>u(t,n.from,n.to,s,l))||t.dispatch(l()),!0}else if(i&&!i.main.eq(r)){let s=!1,a="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(s=!0),a=t.inputState.lastSelectionOrigin),t.dispatch({selection:i,scrollIntoView:s,userEvent:a}),!0}else return!1}function vJ(t,e,n){let i,r=t.state,o=r.selection.main;if(e.from>=o.from&&e.to<=o.to&&e.to-e.from>=(o.to-o.from)/3&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let a=o.frome.to?r.sliceDoc(e.to,o.to):"";i=r.replaceSelection(t.state.toText(a+e.insert.sliceString(0,void 0,t.state.lineBreak)+l))}else{let a=r.changes(e),l=n&&n.main.to<=a.newLength?n.main:void 0;if(r.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=o.to&&e.to>=o.to-10){let u=t.state.sliceDoc(e.from,e.to),c,d=n&&tD(t,n.main.head);if(d){let m=e.insert.length-(e.to-e.from);c={from:d.from,to:d.to-m}}else c=t.state.doc.lineAt(o.head);let h=o.to-e.to,p=o.to-o.from;i=r.changeByRange(m=>{if(m.from==o.from&&m.to==o.to)return{changes:a,range:l||m.map(a)};let O=m.to-h,y=O-u.length;if(m.to-m.from!=p||t.state.sliceDoc(y,O)!=u||m.to>=c.from&&m.from<=c.to)return{range:m};let b=r.changes({from:y,to:O,insert:e.insert}),v=m.to-o.to;return{changes:b,range:l?Y.range(Math.max(0,l.anchor+v),Math.max(0,l.head+v)):m.map(b)}})}else i={changes:a,selection:l&&r.selection.replaceRange(l)}}let s="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,s+=".compose",t.inputState.compositionFirstChange&&(s+=".start",t.inputState.compositionFirstChange=!1)),r.update(i,{userEvent:s,scrollIntoView:!0})}function SJ(t,e,n,i){let r=Math.min(t.length,e.length),o=0;for(;o0&&a>0&&t.charCodeAt(s-1)==e.charCodeAt(a-1);)s--,a--;if(i=="end"){let l=Math.max(0,o-Math.min(s,a));n-=s+l-o}if(s=s?o-n:0;o-=l,a=o+(a-s),s=o}else if(a=a?o-n:0;o-=l,s=o+(s-a),a=o}return{from:o,toA:s,toB:a}}function wJ(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:i,focusNode:r,focusOffset:o}=t.observer.selectionRange;return n&&(e.push(new vA(n,i)),(r!=n||o!=i)&&e.push(new vA(r,o))),e}function kJ(t,e){if(t.length==0)return null;let n=t[0].pos,i=t.length==2?t[1].pos:n;return n>-1&&i>-1?Y.single(n+e,i+e):null}const xJ={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Ry=pe.ie&&pe.ie_version<=11;class _J{constructor(e){this.view=e,this.active=!1,this.selectionRange=new lK,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(n=>{for(let i of n)this.queue.push(i);(pe.ie&&pe.ie_version<=11||pe.ios&&e.composing)&&n.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),Ry&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(n=>{n.length>0&&n[n.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){e.type=="change"&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((n,i)=>n!=e[i]))){this.gapIntersection.disconnect();for(let n of e)this.gapIntersection.observe(n);this.gaps=e}}onSelectionChange(e){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,r=this.selectionRange;if(i.state.facet(lb)?i.root.activeElement!=this.dom:!Fg(i.dom,r))return;let o=r.anchorNode&&i.docView.nearest(r.anchorNode);if(o&&o.ignoreEvent(e)){n||(this.selectionChanged=!1);return}(pe.ie&&pe.ie_version<=11||pe.android&&pe.chrome)&&!i.state.selection.main.empty&&r.focusNode&&ff(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=D0(e.root);if(!n)return!1;let i=pe.safari&&e.root.nodeType==11&&rK(this.dom.ownerDocument)==this.dom&&EJ(this.view,n)||n;if(!i||this.selectionRange.eq(i))return!1;let r=Fg(this.dom,i);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let o=this.delayedAndroidKey;o&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=o.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&o.force&&Yc(this.dom,o.key,o.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(r)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:n,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let n=-1,i=-1,r=!1;for(let o of e){let s=this.readMutation(o);s&&(s.typeOver&&(r=!0),n==-1?{from:n,to:i}=s:(n=Math.min(s.from,n),i=Math.max(s.to,i)))}return{from:n,to:i,typeOver:r}}readChange(){let{from:e,to:n,typeOver:i}=this.processRecords(),r=this.selectionChanged&&Fg(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let o=new yJ(this.view,e,n,i);return this.view.docView.domChanged={newSel:o.newSel?o.newSel.main:null},o}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let i=this.view.state,r=gD(this.view,n);return this.view.state==i&&this.view.update([]),r}readMutation(e){let n=this.view.docView.nearest(e.target);if(!n||n.ignoreMutation(e))return null;if(n.markDirty(e.type=="attributes"),e.type=="attributes"&&(n.flags|=4),e.type=="childList"){let i=SA(n,e.previousSibling||e.target.previousSibling,-1),r=SA(n,e.nextSibling||e.target.nextSibling,1);return{from:i?n.posAfter(i):n.posAtStart,to:r?n.posBefore(r):n.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener("change",this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener("change",this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}destroy(){var e,n,i;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(i=this.resizeScroll)===null||i===void 0||i.disconnect();for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}function SA(t,e,n){for(;e;){let i=mt.get(e);if(i&&i.parent==t)return i;let r=e.parentNode;e=r!=t.dom?r:n>0?e.nextSibling:e.previousSibling}return null}function wA(t,e){let n=e.startContainer,i=e.startOffset,r=e.endContainer,o=e.endOffset,s=t.docView.domAtPos(t.state.selection.main.anchor);return ff(s.node,s.offset,r,o)&&([n,i,r,o]=[r,o,n,i]),{anchorNode:n,anchorOffset:i,focusNode:r,focusOffset:o}}function EJ(t,e){if(e.getComposedRanges){let r=e.getComposedRanges(t.root)[0];if(r)return wA(t,r)}let n=null;function i(r){r.preventDefault(),r.stopImmediatePropagation(),n=r.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",i,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",i,!0),n?wA(t,n):null}class le{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:n}=e;this.dispatchTransactions=e.dispatchTransactions||n&&(i=>i.forEach(r=>n(r,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=e.root||uK(e.parent)||document,this.viewState=new bA(e.state||je.create(e)),e.scrollTo&&e.scrollTo.is(Bm)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(jh).map(i=>new Cy(i));for(let i of this.plugins)i.update(this);this.observer=new _J(this),this.inputState=new zK(this),this.inputState.ensureHandlers(this.plugins),this.docView=new eA(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure()}dispatch(...e){let n=e.length==1&&e[0]instanceof en?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(n,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,i=!1,r,o=this.state;for(let h of e){if(h.startState!=o)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");o=h.state}if(this.destroyed){this.viewState.state=o;return}let s=this.hasFocus,a=0,l=null;e.some(h=>h.annotation(uD))?(this.inputState.notifiedFocused=s,a=1):s!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=s,l=cD(o,s),l||(a=1));let u=this.observer.delayedAndroidKey,c=null;if(u?(this.observer.clearDelayedAndroidKey(),c=this.observer.readChange(),(c&&!this.state.doc.eq(o.doc)||!this.state.selection.eq(o.selection))&&(c=null)):this.observer.clear(),o.facet(je.phrases)!=this.state.facet(je.phrases))return this.setState(o);r=Q0.create(this,o,e),r.flags|=a;let d=this.viewState.scrollTarget;try{this.updateState=2;for(let h of e){if(d&&(d=d.map(h.changes)),h.scrollIntoView){let{main:p}=h.state.selection;d=new Gc(p.empty?p:Y.cursor(p.head,p.head>p.anchor?-1:1))}for(let p of h.effects)p.is(Bm)&&(d=p.value.clip(this.state))}this.viewState.update(r,d),this.bidiCache=F0.update(this.bidiCache,r.changes),r.empty||(this.updatePlugins(r),this.inputState.update(r)),n=this.docView.update(r),this.state.facet(Xh)!=this.styleModules&&this.mountStyles(),i=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(h=>h.isUserEvent("select.pointer")))}finally{this.updateState=0}if(r.startState.facet(Wm)!=r.state.facet(Wm)&&(this.viewState.mustMeasureContent=!0),(n||i||d||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!r.empty)for(let h of this.state.facet(wS))try{h(r)}catch(p){mi(this.state,p,"update listener")}(l||c)&&Promise.resolve().then(()=>{l&&this.state==l.startState&&this.dispatch(l),c&&!gD(this,c)&&u.force&&Yc(this.contentDOM,u.key,u.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let n=this.hasFocus;try{for(let i of this.plugins)i.destroy(this);this.viewState=new bA(e),this.plugins=e.facet(jh).map(i=>new Cy(i)),this.pluginMap.clear();for(let i of this.plugins)i.update(this);this.docView.destroy(),this.docView=new eA(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(e){let n=e.startState.facet(jh),i=e.state.facet(jh);if(n!=i){let r=[];for(let o of i){let s=n.indexOf(o);if(s<0)r.push(new Cy(o));else{let a=this.plugins[s];a.mustUpdate=e,r.push(a)}}for(let o of this.plugins)o.mustUpdate!=e&&o.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let r of this.plugins)r.mustUpdate=e;for(let r=0;r-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let n=null,i=this.scrollDOM,r=i.scrollTop*this.scaleY,{scrollAnchorPos:o,scrollAnchorHeight:s}=this.viewState;Math.abs(r-this.viewState.scrollTop)>1&&(s=-1),this.viewState.scrollAnchorHeight=-1;try{for(let a=0;;a++){if(s<0)if(x6(i))o=-1,s=this.viewState.heightMap.height;else{let p=this.viewState.scrollAnchorAt(r);o=p.from,s=p.top}this.updateState=1;let l=this.viewState.measure(this);if(!l&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(a>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let u=[];l&4||([this.measureRequests,u]=[u,this.measureRequests]);let c=u.map(p=>{try{return p.read(this)}catch(m){return mi(this.state,m),kA}}),d=Q0.create(this,this.state,[]),h=!1;d.flags|=l,n?n.flags|=l:n=d,this.updateState=2,d.empty||(this.updatePlugins(d),this.inputState.update(d),this.updateAttrs(),h=this.docView.update(d),h&&this.docViewUpdate());for(let p=0;p1||m<-1){r=r+m,i.scrollTop=r/this.scaleY,s=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let a of this.state.facet(wS))a(n)}get themeClasses(){return CS+" "+(this.state.facet(ES)?pD:fD)+" "+this.state.facet(Wm)}updateAttrs(){let e=xA(this,Y6,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(lb)?"true":"false",class:"cm-content",style:`${pe.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),xA(this,sx,n);let i=this.observer.ignore(()=>{let r=OS(this.contentDOM,this.contentAttrs,n),o=OS(this.dom,this.editorAttrs,e);return r||o});return this.editorAttrs=e,this.contentAttrs=n,i}showAnnouncements(e){let n=!0;for(let i of e)for(let r of i.effects)if(r.is(le.announce)){n&&(this.announceDOM.textContent=""),n=!1;let o=this.announceDOM.appendChild(document.createElement("div"));o.textContent=r.value}}mountStyles(){this.styleModules=this.state.facet(Xh);let e=this.state.facet(le.cspNonce);fa.mount(this.root,this.styleModules.concat(gJ).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let n=0;ni.spec==e)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,n,i){return Py(this,e,sA(this,e,n,i))}moveByGroup(e,n){return Py(this,e,sA(this,e,n,i=>QK(this,e.head,i)))}visualLineSide(e,n){let i=this.bidiSpans(e),r=this.textDirectionAt(e.from),o=i[n?i.length-1:0];return Y.cursor(o.side(n,r)+e.from,o.forward(!n,r)?1:-1)}moveToLineBoundary(e,n,i=!0){return BK(this,e,n,i)}moveVertically(e,n,i){return Py(this,e,FK(this,e,n,i))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,n=0){return this.docView.posFromDOM(e,n)}posAtCoords(e,n=!0){return this.readMeasured(),nD(this,e,n)}coordsAtPos(e,n=1){this.readMeasured();let i=this.docView.coordsAt(e,n);if(!i||i.left==i.right)return i;let r=this.state.doc.lineAt(e),o=this.bidiSpans(r),s=o[qs.find(o,e-r.from,-1,n)];return nx(i,s.dir==_t.LTR==n>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(X6)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>CJ)return Q6(e.length);let n=this.textDirectionAt(e.from),i;for(let o of this.bidiCache)if(o.from==e.from&&o.dir==n&&(o.fresh||B6(o.isolates,i=JP(this,e))))return o.order;i||(i=JP(this,e));let r=wK(e.text,n,i);return this.bidiCache.push(new F0(e.from,e.to,n,i,!0,r)),r}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||pe.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{w6(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,n={}){return Bm.of(new Gc(typeof e=="number"?Y.cursor(e):e,n.y,n.x,n.yMargin,n.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:n}=this.scrollDOM,i=this.viewState.scrollAnchorAt(e);return Bm.of(new Gc(Y.cursor(i.from),"start","start",i.top-e,n,!0))}static domEventHandlers(e){return tn.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return tn.define(()=>({}),{eventObservers:e})}static theme(e,n){let i=fa.newName(),r=[Wm.of(i),Xh.of(TS(`.${i}`,e))];return n&&n.dark&&r.push(ES.of(!0)),r}static baseTheme(e){return hs.lowest(Xh.of(TS("."+CS,e,mD)))}static findFromDOM(e){var n;let i=e.querySelector(".cm-content"),r=i&&mt.get(i)||mt.get(e);return((n=r==null?void 0:r.rootView)===null||n===void 0?void 0:n.view)||null}}le.styleModule=Xh;le.inputHandler=V6;le.scrollHandler=q6;le.focusChangeEffect=j6;le.perLineTextDirection=X6;le.exceptionSink=W6;le.updateListener=wS;le.editable=lb;le.mouseSelectionStyle=U6;le.dragMovesSelection=H6;le.clickAddsSelectionRange=z6;le.decorations=ep;le.outerDecorations=G6;le.atomicRanges=ax;le.bidiIsolatedRanges=K6;le.scrollMargins=J6;le.darkTheme=ES;le.cspNonce=he.define({combine:t=>t.length?t[0]:""});le.contentAttributes=sx;le.editorAttributes=Y6;le.lineWrapping=le.contentAttributes.of({class:"cm-lineWrapping"});le.announce=De.define();const CJ=4096,kA={};class F0{constructor(e,n,i,r,o,s){this.from=e,this.to=n,this.dir=i,this.isolates=r,this.fresh=o,this.order=s}static update(e,n){if(n.empty&&!e.some(o=>o.fresh))return e;let i=[],r=e.length?e[e.length-1].dir:_t.LTR;for(let o=Math.max(0,e.length-10);o=0;r--){let o=i[r],s=typeof o=="function"?o(t):o;s&&gS(s,n)}return n}const TJ=pe.mac?"mac":pe.windows?"win":pe.linux?"linux":"key";function PJ(t,e){const n=t.split(/-(?!$)/);let i=n[n.length-1];i=="Space"&&(i=" ");let r,o,s,a;for(let l=0;li.concat(r),[]))),n}function RJ(t,e,n){return bD(OD(t.state),e,t,n)}let Ws=null;const IJ=4e3;function $J(t,e=TJ){let n=Object.create(null),i=Object.create(null),r=(s,a)=>{let l=i[s];if(l==null)i[s]=a;else if(l!=a)throw new Error("Key binding "+s+" is used both as a regular binding and as a multi-stroke prefix")},o=(s,a,l,u,c)=>{var d,h;let p=n[s]||(n[s]=Object.create(null)),m=a.split(/ (?!$)/).map(b=>PJ(b,e));for(let b=1;b{let k=Ws={view:S,prefix:v,scope:s};return setTimeout(()=>{Ws==k&&(Ws=null)},IJ),!0}]})}let O=m.join(" ");r(O,!1);let y=p[O]||(p[O]={preventDefault:!1,stopPropagation:!1,run:((h=(d=p._any)===null||d===void 0?void 0:d.run)===null||h===void 0?void 0:h.slice())||[]});l&&y.run.push(l),u&&(y.preventDefault=!0),c&&(y.stopPropagation=!0)};for(let s of t){let a=s.scope?s.scope.split(" "):["editor"];if(s.any)for(let u of a){let c=n[u]||(n[u]=Object.create(null));c._any||(c._any={preventDefault:!1,stopPropagation:!1,run:[]});for(let d in c)c[d].run.push(s.any)}let l=s[e]||s.key;if(l)for(let u of a)o(u,l,s.run,s.preventDefault,s.stopPropagation),s.shift&&o(u,"Shift-"+l,s.shift,s.preventDefault,s.stopPropagation)}return n}function bD(t,e,n,i){let r=iK(e),o=kn(r,0),s=nr(o)==r.length&&r!=" ",a="",l=!1,u=!1,c=!1;Ws&&Ws.view==n&&Ws.scope==i&&(a=Ws.prefix+" ",rD.indexOf(e.keyCode)<0&&(u=!0,Ws=null));let d=new Set,h=y=>{if(y){for(let b of y.run)if(!d.has(b)&&(d.add(b),b(n,e)))return y.stopPropagation&&(c=!0),!0;y.preventDefault&&(y.stopPropagation&&(c=!0),u=!0)}return!1},p=t[i],m,O;return p&&(h(p[a+Vm(r,e,!s)])?l=!0:s&&(e.altKey||e.metaKey||e.ctrlKey)&&!(pe.windows&&e.ctrlKey&&e.altKey)&&(m=pa[e.keyCode])&&m!=r?(h(p[a+Vm(m,e,!0)])||e.shiftKey&&(O=Kf[e.keyCode])!=r&&O!=m&&h(p[a+Vm(O,e,!1)]))&&(l=!0):s&&e.shiftKey&&h(p[a+Vm(r,e,!0)])&&(l=!0),!l&&h(p._any)&&(l=!0)),u&&(l=!0),l&&c&&e.stopPropagation(),l}class Lp{constructor(e,n,i,r,o){this.className=e,this.left=n,this.top=i,this.width=r,this.height=o}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,n){return n.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,n,i){if(i.empty){let r=e.coordsAtPos(i.head,i.assoc||1);if(!r)return[];let o=yD(e);return[new Lp(n,r.left-o.left,r.top-o.top,null,r.bottom-r.top)]}else return LJ(e,n,i)}}function yD(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==_t.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function EA(t,e,n){let i=Y.cursor(e);return{from:Math.max(n.from,t.moveToLineBoundary(i,!1,!0).from),to:Math.min(n.to,t.moveToLineBoundary(i,!0,!0).from),type:ti.Text}}function LJ(t,e,n){if(n.to<=t.viewport.from||n.from>=t.viewport.to)return[];let i=Math.max(n.from,t.viewport.from),r=Math.min(n.to,t.viewport.to),o=t.textDirection==_t.LTR,s=t.contentDOM,a=s.getBoundingClientRect(),l=yD(t),u=s.querySelector(".cm-line"),c=u&&window.getComputedStyle(u),d=a.left+(c?parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)):0),h=a.right-(c?parseInt(c.paddingRight):0),p=xS(t,i),m=xS(t,r),O=p.type==ti.Text?p:null,y=m.type==ti.Text?m:null;if(O&&(t.lineWrapping||p.widgetLineBreaks)&&(O=EA(t,i,O)),y&&(t.lineWrapping||m.widgetLineBreaks)&&(y=EA(t,r,y)),O&&y&&O.from==y.from)return v(S(n.from,n.to,O));{let x=O?S(n.from,null,O):k(p,!1),_=y?S(null,n.to,y):k(m,!0),w=[];return(O||p).to<(y||m).from-(O&&y?1:0)||p.widgetLineBreaks>1&&x.bottom+t.defaultLineHeight/2<_.top?w.push(b(d,x.bottom,h,_.top)):x.bottom<_.top&&t.elementAtHeight((x.bottom+_.top)/2).type==ti.Text&&(x.bottom=_.top=(x.bottom+_.top)/2),v(x).concat(w).concat(v(_))}function b(x,_,w,D){return new Lp(e,x-l.left,_-l.top-.01,w-x,D-_+.01)}function v({top:x,bottom:_,horizontal:w}){let D=[];for(let W=0;WB&&K.from=ke)break;A>re&&V(Math.max(se,re),x==null&&se<=B,Math.min(A,ke),_==null&&A>=H,Z.dir)}if(re=ge.to+1,re>=ke)break}return I.length==0&&V(B,x==null,H,_==null,t.textDirection),{top:D,bottom:W,horizontal:I}}function k(x,_){let w=a.top+(_?x.top:x.bottom);return{top:w,bottom:w,horizontal:[]}}}function NJ(t,e){return t.constructor==e.constructor&&t.eq(e)}class MJ{constructor(e,n){this.view=e,this.layer=n,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),n.above&&this.dom.classList.add("cm-layer-above"),n.class&&this.dom.classList.add(n.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,e)}update(e){e.startState.facet(Ug)!=e.state.facet(Ug)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let n=0,i=e.facet(Ug);for(;n!NJ(n,this.drawn[i]))){let n=this.dom.firstChild,i=0;for(let r of e)r.update&&n&&r.constructor&&this.drawn[i].constructor&&r.update(n,this.drawn[i])?(n=n.nextSibling,i++):this.dom.insertBefore(r.draw(),n);for(;n;){let r=n.nextSibling;n.remove(),n=r}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const Ug=he.define();function vD(t){return[tn.define(e=>new MJ(e,t)),Ug.of(t)]}const SD=!pe.ios,tp=he.define({combine(t){return Po(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,n)=>Math.min(e,n),drawRangeCursor:(e,n)=>e||n})}});function DJ(t={}){return[tp.of(t),BJ,QJ,FJ,Z6.of(!0)]}function wD(t){return t.startState.facet(tp)!=t.state.facet(tp)}const BJ=vD({above:!0,markers(t){let{state:e}=t,n=e.facet(tp),i=[];for(let r of e.selection.ranges){let o=r==e.selection.main;if(r.empty?!o||SD:n.drawRangeCursor){let s=o?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",a=r.empty?r:Y.cursor(r.head,r.head>r.anchor?-1:1);for(let l of Lp.forRange(t,s,a))i.push(l)}}return i},update(t,e){t.transactions.some(i=>i.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=wD(t);return n&&CA(t.state,e),t.docChanged||t.selectionSet||n},mount(t,e){CA(e.state,t)},class:"cm-cursorLayer"});function CA(t,e){e.style.animationDuration=t.facet(tp).cursorBlinkRate+"ms"}const QJ=vD({above:!1,markers(t){return t.state.selection.ranges.map(e=>e.empty?[]:Lp.forRange(t,"cm-selectionBackground",e)).reduce((e,n)=>e.concat(n))},update(t,e){return t.docChanged||t.selectionSet||t.viewportChanged||wD(t)},class:"cm-selectionLayer"}),PS={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};SD&&(PS[".cm-line"].caretColor="transparent !important",PS[".cm-content"]={caretColor:"transparent !important"});const FJ=hs.highest(le.theme(PS)),kD=De.define({map(t,e){return t==null?null:e.mapPos(t)}}),Yh=gn.define({create(){return null},update(t,e){return t!=null&&(t=e.changes.mapPos(t)),e.effects.reduce((n,i)=>i.is(kD)?i.value:n,t)}}),zJ=tn.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let n=t.state.field(Yh);n==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(Yh)!=n||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(Yh),n=e!=null&&t.coordsAtPos(e);if(!n)return null;let i=t.scrollDOM.getBoundingClientRect();return{left:n.left-i.left+t.scrollDOM.scrollLeft*t.scaleX,top:n.top-i.top+t.scrollDOM.scrollTop*t.scaleY,height:n.bottom-n.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:n}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/n+"px",this.cursor.style.height=t.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(Yh)!=t&&this.view.dispatch({effects:kD.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){(t.target==this.view.contentDOM||!this.view.contentDOM.contains(t.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function HJ(){return[Yh,zJ]}function TA(t,e,n,i,r){e.lastIndex=0;for(let o=t.iterRange(n,i),s=n,a;!o.next().done;s+=o.value.length)if(!o.lineBreak)for(;a=e.exec(o.value);)r(s+a.index,a)}function UJ(t,e){let n=t.visibleRanges;if(n.length==1&&n[0].from==t.viewport.from&&n[0].to==t.viewport.to)return n;let i=[];for(let{from:r,to:o}of n)r=Math.max(t.state.doc.lineAt(r).from,r-e),o=Math.min(t.state.doc.lineAt(o).to,o+e),i.length&&i[i.length-1].to>=r?i[i.length-1].to=o:i.push({from:r,to:o});return i}class WJ{constructor(e){const{regexp:n,decoration:i,decorate:r,boundary:o,maxLength:s=1e3}=e;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,r)this.addMatch=(a,l,u,c)=>r(c,u,u+a[0].length,a,l);else if(typeof i=="function")this.addMatch=(a,l,u,c)=>{let d=i(a,l,u);d&&c(u,u+a[0].length,d)};else if(i)this.addMatch=(a,l,u,c)=>c(u,u+a[0].length,i);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=o,this.maxLength=s}createDeco(e){let n=new ha,i=n.add.bind(n);for(let{from:r,to:o}of UJ(e,this.maxLength))TA(e.state.doc,this.regexp,r,o,(s,a)=>this.addMatch(a,e,s,i));return n.finish()}updateDeco(e,n){let i=1e9,r=-1;return e.docChanged&&e.changes.iterChanges((o,s,a,l)=>{l>e.view.viewport.from&&a1e3?this.createDeco(e.view):r>-1?this.updateRange(e.view,n.map(e.changes),i,r):n}updateRange(e,n,i,r){for(let o of e.visibleRanges){let s=Math.max(o.from,i),a=Math.min(o.to,r);if(a>s){let l=e.state.doc.lineAt(s),u=l.tol.from;s--)if(this.boundary.test(l.text[s-1-l.from])){c=s;break}for(;ah.push(b.range(O,y));if(l==u)for(this.regexp.lastIndex=c-l.from;(p=this.regexp.exec(l.text))&&p.indexthis.addMatch(y,e,O,m));n=n.update({filterFrom:c,filterTo:d,filter:(O,y)=>Od,add:h})}}return n}}const AS=/x/.unicode!=null?"gu":"g",VJ=new RegExp(`[\0-\b +--Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,AS),jJ={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Iy=null;function XJ(){var t;if(Iy==null&&typeof document<"u"&&document.body){let e=document.body.style;Iy=((t=e.tabSize)!==null&&t!==void 0?t:e.MozTabSize)!=null}return Iy||!1}const Wg=he.define({combine(t){let e=Po(t,{render:null,specialChars:VJ,addSpecialChars:null});return(e.replaceTabs=!XJ())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,AS)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,AS)),e}});function ZJ(t={}){return[Wg.of(t),qJ()]}let PA=null;function qJ(){return PA||(PA=tn.fromClass(class{constructor(t){this.view=t,this.decorations=Ee.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(Wg)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new WJ({regexp:t.specialChars,decoration:(e,n,i)=>{let{doc:r}=n.state,o=kn(e[0],0);if(o==9){let s=r.lineAt(i),a=n.state.tabSize,l=Hr(s.text,a,i-s.from);return Ee.replace({widget:new JJ((a-l%a)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[o]||(this.decorationCache[o]=Ee.replace({widget:new KJ(t,o)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(Wg);t.startState.facet(Wg)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))}const YJ="•";function GJ(t){return t>=32?YJ:t==10?"␤":String.fromCharCode(9216+t)}class KJ extends ps{constructor(e,n){super(),this.options=e,this.code=n}eq(e){return e.code==this.code}toDOM(e){let n=GJ(this.code),i=e.state.phrase("Control character")+" "+(jJ[this.code]||"0x"+this.code.toString(16)),r=this.options.render&&this.options.render(this.code,i,n);if(r)return r;let o=document.createElement("span");return o.textContent=n,o.title=i,o.setAttribute("aria-label",i),o.className="cm-specialChar",o}ignoreEvent(){return!1}}class JJ extends ps{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function eee(){return nee}const tee=Ee.line({class:"cm-activeLine"}),nee=tn.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,n=[];for(let i of t.state.selection.ranges){let r=t.lineBlockAt(i.head);r.from>e&&(n.push(tee.range(r.from)),e=r.from)}return Ee.set(n)}},{decorations:t=>t.decorations}),RS=2e3;function iee(t,e,n){let i=Math.min(e.line,n.line),r=Math.max(e.line,n.line),o=[];if(e.off>RS||n.off>RS||e.col<0||n.col<0){let s=Math.min(e.off,n.off),a=Math.max(e.off,n.off);for(let l=i;l<=r;l++){let u=t.doc.line(l);u.length<=a&&o.push(Y.range(u.from+s,u.to+a))}}else{let s=Math.min(e.col,n.col),a=Math.max(e.col,n.col);for(let l=i;l<=r;l++){let u=t.doc.line(l),c=uS(u.text,s,t.tabSize,!0);if(c<0)o.push(Y.cursor(u.to));else{let d=uS(u.text,a,t.tabSize);o.push(Y.range(u.from+c,u.from+d))}}}return o}function ree(t,e){let n=t.coordsAtPos(t.viewport.from);return n?Math.round(Math.abs((n.left-e)/t.defaultCharacterWidth)):-1}function AA(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1),i=t.state.doc.lineAt(n),r=n-i.from,o=r>RS?-1:r==i.length?ree(t,e.clientX):Hr(i.text,t.state.tabSize,n-i.from);return{line:i.number,col:o,off:r}}function oee(t,e){let n=AA(t,e),i=t.state.selection;return n?{update(r){if(r.docChanged){let o=r.changes.mapPos(r.startState.doc.line(n.line).from),s=r.state.doc.lineAt(o);n={line:s.number,col:n.col,off:Math.min(n.off,s.length)},i=i.map(r.changes)}},get(r,o,s){let a=AA(t,r);if(!a)return i;let l=iee(t.state,n,a);return l.length?s?Y.create(l.concat(i.ranges)):Y.create(l):i}}:null}function see(t){let e=n=>n.altKey&&n.button==0;return le.mouseSelectionStyle.of((n,i)=>e(i)?oee(n,i):null)}const aee={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},lee={style:"cursor: crosshair"};function uee(t={}){let[e,n]=aee[t.key||"Alt"],i=tn.fromClass(class{constructor(r){this.view=r,this.isDown=!1}set(r){this.isDown!=r&&(this.isDown=r,this.view.update([]))}},{eventObservers:{keydown(r){this.set(r.keyCode==e||n(r))},keyup(r){(r.keyCode==e||!n(r))&&this.set(!1)},mousemove(r){this.set(n(r))}}});return[i,le.contentAttributes.of(r=>{var o;return!((o=r.plugin(i))===null||o===void 0)&&o.isDown?lee:null})]}const Ah="-10000px";class xD{constructor(e,n,i,r){this.facet=n,this.createTooltipView=i,this.removeTooltipView=r,this.input=e.state.facet(n),this.tooltips=this.input.filter(s=>s);let o=null;this.tooltipViews=this.tooltips.map(s=>o=i(s,o))}update(e,n){var i;let r=e.state.facet(this.facet),o=r.filter(l=>l);if(r===this.input){for(let l of this.tooltipViews)l.update&&l.update(e);return!1}let s=[],a=n?[]:null;for(let l=0;ln[u]=l),n.length=a.length),this.input=r,this.tooltips=o,this.tooltipViews=s,!0}}function cee(t){let{win:e}=t;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const $y=he.define({combine:t=>{var e,n,i;return{position:pe.ios?"absolute":((e=t.find(r=>r.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((n=t.find(r=>r.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((i=t.find(r=>r.tooltipSpace))===null||i===void 0?void 0:i.tooltipSpace)||cee}}}),RA=new WeakMap,ux=tn.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet($y);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new xD(t,cx,(n,i)=>this.createTooltip(n,i),n=>{this.resizeObserver&&this.resizeObserver.unobserve(n.dom),n.dom.remove()}),this.above=this.manager.tooltips.map(n=>!!n.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(n=>{Date.now()>this.lastTransaction-50&&n.length>0&&n[n.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let n=e||t.geometryChanged,i=t.state.facet($y);if(i.position!=this.position&&!this.madeAbsolute){this.position=i.position;for(let r of this.manager.tooltipViews)r.dom.style.position=this.position;n=!0}if(i.parent!=this.parent){this.parent&&this.container.remove(),this.parent=i.parent,this.createContainer();for(let r of this.manager.tooltipViews)this.container.appendChild(r.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(t,e){let n=t.create(this.view),i=e?e.dom:null;if(n.dom.classList.add("cm-tooltip"),t.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let r=document.createElement("div");r.className="cm-tooltip-arrow",n.dom.appendChild(r)}return n.dom.style.position=this.position,n.dom.style.top=Ah,n.dom.style.left="0px",this.container.insertBefore(n.dom,i),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var t,e,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let i of this.manager.tooltipViews)i.dom.remove(),(t=i.destroy)===null||t===void 0||t.call(i);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(n=this.intersectionObserver)===null||n===void 0||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=this.view.dom.getBoundingClientRect(),e=1,n=1,i=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:r}=this.manager.tooltipViews[0];if(pe.gecko)i=r.offsetParent!=this.container.ownerDocument.body;else if(r.style.top==Ah&&r.style.left=="0px"){let o=r.getBoundingClientRect();i=Math.abs(o.top+1e4)>1||Math.abs(o.left)>1}}if(i||this.position=="absolute")if(this.parent){let r=this.parent.getBoundingClientRect();r.width&&r.height&&(e=r.width/this.parent.offsetWidth,n=r.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:n}=this.view.viewState);return{editor:t,parent:this.parent?this.container.getBoundingClientRect():t,pos:this.manager.tooltips.map((r,o)=>{let s=this.manager.tooltipViews[o];return s.getCoords?s.getCoords(r.pos):this.view.coordsAtPos(r.pos)}),size:this.manager.tooltipViews.map(({dom:r})=>r.getBoundingClientRect()),space:this.view.state.facet($y).tooltipSpace(this.view),scaleX:e,scaleY:n,makeAbsolute:i}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let a of this.manager.tooltipViews)a.dom.style.position="absolute"}let{editor:n,space:i,scaleX:r,scaleY:o}=t,s=[];for(let a=0;a=Math.min(n.bottom,i.bottom)||d.rightMath.min(n.right,i.right)+.1){c.style.top=Ah;continue}let p=l.arrow?u.dom.querySelector(".cm-tooltip-arrow"):null,m=p?7:0,O=h.right-h.left,y=(e=RA.get(u))!==null&&e!==void 0?e:h.bottom-h.top,b=u.offset||hee,v=this.view.textDirection==_t.LTR,S=h.width>i.right-i.left?v?i.left:i.right-h.width:v?Math.min(d.left-(p?14:0)+b.x,i.right-O):Math.max(i.left,d.left-O+(p?14:0)-b.x),k=this.above[a];!l.strictSide&&(k?d.top-(h.bottom-h.top)-b.yi.bottom)&&k==i.bottom-d.bottom>d.top-i.top&&(k=this.above[a]=!k);let x=(k?d.top-i.top:i.bottom-d.bottom)-m;if(xS&&D.top<_+y&&D.bottom>_&&(_=k?D.top-y-2-m:D.bottom+m+2);if(this.position=="absolute"?(c.style.top=(_-t.parent.top)/o+"px",c.style.left=(S-t.parent.left)/r+"px"):(c.style.top=_/o+"px",c.style.left=S/r+"px"),p){let D=d.left+(v?b.x:-b.x)-(S+14-7);p.style.left=D/r+"px"}u.overlap!==!0&&s.push({left:S,top:_,right:w,bottom:_+y}),c.classList.toggle("cm-tooltip-above",k),c.classList.toggle("cm-tooltip-below",!k),u.positioned&&u.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=Ah}},{eventObservers:{scroll(){this.maybeMeasure()}}}),dee=le.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),hee={x:0,y:0},cx=he.define({enables:[ux,dee]}),z0=he.define({combine:t=>t.reduce((e,n)=>e.concat(n),[])});class ub{static create(e){return new ub(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new xD(e,z0,(n,i)=>this.createHostedView(n,i),n=>n.dom.remove())}createHostedView(e,n){let i=e.create(this.view);return i.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(i.dom,n?n.dom.nextSibling:this.dom.firstChild),this.mounted&&i.mount&&i.mount(this.view),i}mount(e){for(let n of this.manager.tooltipViews)n.mount&&n.mount(e);this.mounted=!0}positioned(e){for(let n of this.manager.tooltipViews)n.positioned&&n.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let n of this.manager.tooltipViews)(e=n.destroy)===null||e===void 0||e.call(n)}passProp(e){let n;for(let i of this.manager.tooltipViews){let r=i[e];if(r!==void 0){if(n===void 0)n=r;else if(n!==r)return}}return n}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const fee=cx.compute([z0],t=>{let e=t.facet(z0);return e.length===0?null:{pos:Math.min(...e.map(n=>n.pos)),end:Math.max(...e.map(n=>{var i;return(i=n.end)!==null&&i!==void 0?i:n.pos})),create:ub.create,above:e[0].above,arrow:e.some(n=>n.arrow)}});class pee{constructor(e,n,i,r,o){this.view=e,this.source=n,this.field=i,this.setHover=r,this.hoverTime=o,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;ea.bottom||n.xa.right+e.defaultCharacterWidth)return;let l=e.bidiSpans(e.state.doc.lineAt(r)).find(c=>c.from<=r&&c.to>=r),u=l&&l.dir==_t.RTL?-1:1;o=n.x{this.pending==a&&(this.pending=null,l&&!(Array.isArray(l)&&!l.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(l)?l:[l])}))},l=>mi(e.state,l,"hover tooltip"))}else s&&!(Array.isArray(s)&&!s.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(s)?s:[s])})}get tooltip(){let e=this.view.plugin(ux),n=e?e.manager.tooltips.findIndex(i=>i.create==ub.create):-1;return n>-1?e.manager.tooltipViews[n]:null}mousemove(e){var n,i;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:r,tooltip:o}=this;if(r.length&&o&&!mee(o.dom,e)||this.pending){let{pos:s}=r[0]||this.pending,a=(i=(n=r[0])===null||n===void 0?void 0:n.end)!==null&&i!==void 0?i:s;(s==a?this.view.posAtCoords(this.lastMove)!=s:!gee(this.view,s,a,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:n}=this;if(n.length){let{tooltip:i}=this;i&&i.dom.contains(e.relatedTarget)?this.watchTooltipLeave(i.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let n=i=>{e.removeEventListener("mouseleave",n),this.active.length&&!this.view.dom.contains(i.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",n)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const jm=4;function mee(t,e){let n=t.getBoundingClientRect();return e.clientX>=n.left-jm&&e.clientX<=n.right+jm&&e.clientY>=n.top-jm&&e.clientY<=n.bottom+jm}function gee(t,e,n,i,r,o){let s=t.scrollDOM.getBoundingClientRect(),a=t.documentTop+t.documentPadding.top+t.contentHeight;if(s.left>i||s.rightr||Math.min(s.bottom,a)=e&&l<=n}function Oee(t,e={}){let n=De.define(),i=gn.define({create(){return[]},update(r,o){if(r.length&&(e.hideOnChange&&(o.docChanged||o.selection)?r=[]:e.hideOn&&(r=r.filter(s=>!e.hideOn(o,s))),o.docChanged)){let s=[];for(let a of r){let l=o.changes.mapPos(a.pos,-1,_n.TrackDel);if(l!=null){let u=Object.assign(Object.create(null),a);u.pos=l,u.end!=null&&(u.end=o.changes.mapPos(u.end)),s.push(u)}}r=s}for(let s of o.effects)s.is(n)&&(r=s.value),s.is(bee)&&(r=[]);return r},provide:r=>z0.from(r)});return[i,tn.define(r=>new pee(r,t,i,n,e.hoverTime||300)),fee]}function _D(t,e){let n=t.plugin(ux);if(!n)return null;let i=n.manager.tooltips.indexOf(e);return i<0?null:n.manager.tooltipViews[i]}const bee=De.define(),IA=he.define({combine(t){let e,n;for(let i of t)e=e||i.topContainer,n=n||i.bottomContainer;return{topContainer:e,bottomContainer:n}}});function np(t,e){let n=t.plugin(ED),i=n?n.specs.indexOf(e):-1;return i>-1?n.panels[i]:null}const ED=tn.fromClass(class{constructor(t){this.input=t.state.facet(ip),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(t));let e=t.state.facet(IA);this.top=new Xm(t,!0,e.topContainer),this.bottom=new Xm(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(n=>n.top)),this.bottom.sync(this.panels.filter(n=>!n.top));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(t){let e=t.state.facet(IA);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new Xm(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new Xm(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(ip);if(n!=this.input){let i=n.filter(l=>l),r=[],o=[],s=[],a=[];for(let l of i){let u=this.specs.indexOf(l),c;u<0?(c=l(t.view),a.push(c)):(c=this.panels[u],c.update&&c.update(t)),r.push(c),(c.top?o:s).push(c)}this.specs=i,this.panels=r,this.top.sync(o),this.bottom.sync(s);for(let l of a)l.dom.classList.add("cm-panel"),l.mount&&l.mount()}else for(let i of this.panels)i.update&&i.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>le.scrollMargins.of(e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class Xm{constructor(e,n,i){this.view=e,this.top=n,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let n of this.panels)n.destroy&&e.indexOf(n)<0&&n.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let n=this.container||this.view.dom;n.insertBefore(this.dom,this.top?n.firstChild:null)}let e=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;e!=n.dom;)e=$A(e);e=e.nextSibling}else this.dom.insertBefore(n.dom,e);for(;e;)e=$A(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function $A(t){let e=t.nextSibling;return t.remove(),e}const ip=he.define({enables:ED});class ss extends au{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}ss.prototype.elementClass="";ss.prototype.toDOM=void 0;ss.prototype.mapMode=_n.TrackBefore;ss.prototype.startSide=ss.prototype.endSide=-1;ss.prototype.point=!0;const Vg=he.define(),yee={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>nt.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},mf=he.define();function vee(t){return[CD(),mf.of(Object.assign(Object.assign({},yee),t))]}const LA=he.define({combine:t=>t.some(e=>e)});function CD(t){return[See]}const See=tn.fromClass(class{constructor(t){this.view=t,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(mf).map(e=>new MA(t,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!t.state.facet(LA),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}update(t){if(this.updateGutters(t)){let e=this.prevViewport,n=t.view.viewport,i=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(i<(n.to-n.from)*.8)}t.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(LA)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&this.dom.remove();let n=nt.iter(this.view.state.facet(Vg),this.view.viewport.from),i=[],r=this.gutters.map(o=>new wee(o,this.view.viewport,-this.view.documentPadding.top));for(let o of this.view.viewportLineBlocks)if(i.length&&(i=[]),Array.isArray(o.type)){let s=!0;for(let a of o.type)if(a.type==ti.Text&&s){IS(n,i,a.from);for(let l of r)l.line(this.view,a,i);s=!1}else if(a.widget)for(let l of r)l.widget(this.view,a)}else if(o.type==ti.Text){IS(n,i,o.from);for(let s of r)s.line(this.view,o,i)}else if(o.widget)for(let s of r)s.widget(this.view,o);for(let o of r)o.finish();t&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(t){let e=t.startState.facet(mf),n=t.state.facet(mf),i=t.docChanged||t.heightChanged||t.viewportChanged||!nt.eq(t.startState.facet(Vg),t.state.facet(Vg),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let r of this.gutters)r.update(t)&&(i=!0);else{i=!0;let r=[];for(let o of n){let s=e.indexOf(o);s<0?r.push(new MA(this.view,o)):(this.gutters[s].update(t),r.push(this.gutters[s]))}for(let o of this.gutters)o.dom.remove(),r.indexOf(o)<0&&o.destroy();for(let o of r)this.dom.appendChild(o.dom);this.gutters=r}return i}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove()}},{provide:t=>le.scrollMargins.of(e=>{let n=e.plugin(t);return!n||n.gutters.length==0||!n.fixed?null:e.textDirection==_t.LTR?{left:n.dom.offsetWidth*e.scaleX}:{right:n.dom.offsetWidth*e.scaleX}})});function NA(t){return Array.isArray(t)?t:[t]}function IS(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class wee{constructor(e,n,i){this.gutter=e,this.height=i,this.i=0,this.cursor=nt.iter(e.markers,n.from)}addElement(e,n,i){let{gutter:r}=this,o=(n.top-this.height)/e.scaleY,s=n.height/e.scaleY;if(this.i==r.elements.length){let a=new TD(e,s,o,i);r.elements.push(a),r.dom.appendChild(a.dom)}else r.elements[this.i].update(e,s,o,i);this.height=n.bottom,this.i++}line(e,n,i){let r=[];IS(this.cursor,r,n.from),i.length&&(r=r.concat(i));let o=this.gutter.config.lineMarker(e,n,r);o&&r.unshift(o);let s=this.gutter;r.length==0&&!s.config.renderEmptyElements||this.addElement(e,n,r)}widget(e,n){let i=this.gutter.config.widgetMarker(e,n.widget,n);i&&this.addElement(e,n,[i])}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let n=e.elements.pop();e.dom.removeChild(n.dom),n.destroy()}}}class MA{constructor(e,n){this.view=e,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let i in n.domEventHandlers)this.dom.addEventListener(i,r=>{let o=r.target,s;if(o!=this.dom&&this.dom.contains(o)){for(;o.parentNode!=this.dom;)o=o.parentNode;let l=o.getBoundingClientRect();s=(l.top+l.bottom)/2}else s=r.clientY;let a=e.lineBlockAtHeight(s-e.documentTop);n.domEventHandlers[i](e,a,r)&&r.preventDefault()});this.markers=NA(n.markers(e)),n.initialSpacer&&(this.spacer=new TD(e,0,0,[n.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let n=this.markers;if(this.markers=NA(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let r=this.config.updateSpacer(this.spacer.markers[0],e);r!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[r])}let i=e.view.viewport;return!nt.eq(this.markers,n,i.from,i.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class TD{constructor(e,n,i,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,n,i,r)}update(e,n,i,r){this.height!=n&&(this.height=n,this.dom.style.height=n+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),kee(this.markers,r)||this.setMarkers(e,r)}setMarkers(e,n){let i="cm-gutterElement",r=this.dom.firstChild;for(let o=0,s=0;;){let a=s,l=oo(a,l,u)||s(a,l,u):s}return i}})}});class Ly extends ss{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function Ny(t,e){return t.state.facet(Mc).formatNumber(e,t.state)}const _ee=mf.compute([Mc],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(xee)},lineMarker(e,n,i){return i.some(r=>r.toDOM)?null:new Ly(Ny(e,e.state.doc.lineAt(n.from).number))},widgetMarker:()=>null,lineMarkerChange:e=>e.startState.facet(Mc)!=e.state.facet(Mc),initialSpacer(e){return new Ly(Ny(e,DA(e.state.doc.lines)))},updateSpacer(e,n){let i=Ny(n.view,DA(n.view.state.doc.lines));return i==e.number?e:new Ly(i)},domEventHandlers:t.facet(Mc).domEventHandlers}));function Eee(t={}){return[Mc.of(t),CD(),_ee]}function DA(t){let e=9;for(;e{let e=[],n=-1;for(let i of t.selection.ranges){let r=t.doc.lineAt(i.head).from;r>n&&(n=r,e.push(Cee.range(r)))}return nt.of(e)});function Pee(){return Tee}const PD=1024;let Aee=0;class rr{constructor(e,n){this.from=e,this.to=n}}class Pe{constructor(e={}){this.id=Aee++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=nn.match(e)),n=>{let i=e(n);return i===void 0?null:[this,i]}}}Pe.closedBy=new Pe({deserialize:t=>t.split(" ")});Pe.openedBy=new Pe({deserialize:t=>t.split(" ")});Pe.group=new Pe({deserialize:t=>t.split(" ")});Pe.isolate=new Pe({deserialize:t=>{if(t&&t!="rtl"&&t!="ltr"&&t!="auto")throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}});Pe.contextHash=new Pe({perNode:!0});Pe.lookAhead=new Pe({perNode:!0});Pe.mounted=new Pe({perNode:!0});class rp{constructor(e,n,i){this.tree=e,this.overlay=n,this.parser=i}static get(e){return e&&e.props&&e.props[Pe.mounted.id]}}const Ree=Object.create(null);class nn{constructor(e,n,i,r=0){this.name=e,this.props=n,this.id=i,this.flags=r}static define(e){let n=e.props&&e.props.length?Object.create(null):Ree,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),r=new nn(e.name||"",n,e.id,i);if(e.props){for(let o of e.props)if(Array.isArray(o)||(o=o(r)),o){if(o[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[o[0].id]=o[1]}}return r}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let n=this.prop(Pe.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let i in e)for(let r of i.split(" "))n[r]=e[i];return i=>{for(let r=i.prop(Pe.group),o=-1;o<(r?r.length:0);o++){let s=n[o<0?i.name:r[o]];if(s)return s}}}}nn.none=new nn("",Object.create(null),0,8);class Yd{constructor(e){this.types=e;for(let n=0;n0;for(let l=this.cursor(s|vt.IncludeAnonymous);;){let u=!1;if(l.from<=o&&l.to>=r&&(!a&&l.type.isAnonymous||n(l)!==!1)){if(l.firstChild())continue;u=!0}for(;u&&i&&(a||!l.type.isAnonymous)&&i(l),!l.nextSibling();){if(!l.parent())return;u=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:fx(nn.none,this.children,this.positions,0,this.children.length,0,this.length,(n,i,r)=>new qe(this.type,n,i,r,this.propValues),e.makeTree||((n,i,r)=>new qe(nn.none,n,i,r)))}static build(e){return Nee(e)}}qe.empty=new qe(nn.none,[],[],0);class dx{constructor(e,n){this.buffer=e,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new dx(this.buffer,this.index)}}class ga{constructor(e,n,i){this.buffer=e,this.length=n,this.set=i}get type(){return nn.none}toString(){let e=[];for(let n=0;n0));l=s[l+3]);return a}slice(e,n,i){let r=this.buffer,o=new Uint16Array(n-e),s=0;for(let a=e,l=0;a=e&&ne;case 1:return n<=e&&i>e;case 2:return i>e;case 4:return!0}}function op(t,e,n,i){for(var r;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to0?a.length:-1;e!=u;e+=n){let c=a[e],d=l[e]+s.from;if(AD(r,i,d,d+c.length)){if(c instanceof ga){if(o&vt.ExcludeBuffers)continue;let h=c.findChild(0,c.buffer.length,n,i-d,r);if(h>-1)return new go(new Iee(s,c,e,d),null,h)}else if(o&vt.IncludeAnonymous||!c.type.isAnonymous||hx(c)){let h;if(!(o&vt.IgnoreMounts)&&(h=rp.get(c))&&!h.overlay)return new Fn(h.tree,d,e,s);let p=new Fn(c,d,e,s);return o&vt.IncludeAnonymous||!p.type.isAnonymous?p:p.nextChild(n<0?c.children.length-1:0,n,i,r)}}}if(o&vt.IncludeAnonymous||!s.type.isAnonymous||(s.index>=0?e=s.index+n:e=n<0?-1:s._parent._tree.children.length,s=s._parent,!s))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,n,i=0){let r;if(!(i&vt.IgnoreOverlays)&&(r=rp.get(this._tree))&&r.overlay){let o=e-this.from;for(let{from:s,to:a}of r.overlay)if((n>0?s<=o:s=o:a>o))return new Fn(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,i)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function QA(t,e,n,i){let r=t.cursor(),o=[];if(!r.firstChild())return o;if(n!=null){for(let s=!1;!s;)if(s=r.type.is(n),!r.nextSibling())return o}for(;;){if(i!=null&&r.type.is(i))return o;if(r.type.is(e)&&o.push(r.node),!r.nextSibling())return i==null?o:[]}}function $S(t,e,n=e.length-1){for(let i=t.parent;n>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[n]&&e[n]!=i.name)return!1;n--}}return!0}class Iee{constructor(e,n,i,r){this.parent=e,this.buffer=n,this.index=i,this.start=r}}class go extends RD{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,n,i){super(),this.context=e,this._parent=n,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,n,i){let{buffer:r}=this.context,o=r.findChild(this.index+4,r.buffer[this.index+3],e,n-this.context.start,i);return o<0?null:new go(this.context,this,o)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,n,i=0){if(i&vt.ExcludeBuffers)return null;let{buffer:r}=this.context,o=r.findChild(this.index+4,r.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return o<0?null:new go(this.context,this,o)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new go(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new go(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],n=[],{buffer:i}=this.context,r=this.index+4,o=i.buffer[this.index+3];if(o>r){let s=i.buffer[this.index+1];e.push(i.slice(r,o,s)),n.push(0)}return new qe(this.type,e,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function ID(t){if(!t.length)return null;let e=0,n=t[0];for(let o=1;on.from||s.to=e){let a=new Fn(s.tree,s.overlay[0].from+o.from,-1,o);(r||(r=[i])).push(op(a,e,n,!1))}}return r?ID(r):i}class H0{get name(){return this.type.name}constructor(e,n=0){if(this.mode=n,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof Fn)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let i=e._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,n){this.index=e;let{start:i,buffer:r}=this.buffer;return this.type=n||r.set.types[r.buffer[e]],this.from=i+r.buffer[e+1],this.to=i+r.buffer[e+2],!0}yield(e){return e?e instanceof Fn?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,n,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,i,this.mode));let{buffer:r}=this.buffer,o=r.findChild(this.index+4,r.buffer[this.index+3],e,n-this.buffer.start,i);return o<0?!1:(this.stack.push(this.index),this.yieldBuf(o))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,n,i=this.mode){return this.buffer?i&vt.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&vt.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&vt.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:n}=this.buffer,i=this.stack.length-1;if(e<0){let r=i<0?0:this.stack[i]+4;if(this.index!=r)return this.yieldBuf(n.findChild(r,this.index,-1,0,4))}else{let r=n.buffer[this.index+3];if(r<(i<0?n.buffer.length:n.buffer[this.stack[i]+3]))return this.yieldBuf(r)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let n,i,{buffer:r}=this;if(r){if(e>0){if(this.index-1)for(let o=n+e,s=e<0?-1:i._tree.children.length;o!=s;o+=e){let a=i._tree.children[o];if(this.mode&vt.IncludeAnonymous||a instanceof ga||!a.type.isAnonymous||hx(a))return!1}return!0}move(e,n){if(n&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to=0;){for(let s=e;s;s=s._parent)if(s.index==r){if(r==this.index)return s;n=s,i=o+1;break e}r=this.stack[--o]}for(let r=i;r=0;o--){if(o<0)return $S(this.node,e,r);let s=i[n.buffer[this.stack[o]]];if(!s.isAnonymous){if(e[r]&&e[r]!=s.name)return!1;r--}}return!0}}function hx(t){return t.children.some(e=>e instanceof ga||!e.type.isAnonymous||hx(e))}function Nee(t){var e;let{buffer:n,nodeSet:i,maxBufferLength:r=PD,reused:o=[],minRepeatType:s=i.types.length}=t,a=Array.isArray(n)?new dx(n,n.length):n,l=i.types,u=0,c=0;function d(x,_,w,D,W,I){let{id:V,start:B,end:H,size:K}=a,re=c;for(;K<0;)if(a.next(),K==-1){let A=o[V];w.push(A),D.push(B-x);return}else if(K==-3){u=V;return}else if(K==-4){c=V;return}else throw new RangeError(`Unrecognized record size: ${K}`);let ke=l[V],ge,Z,se=B-x;if(H-B<=r&&(Z=y(a.pos-_,W))){let A=new Uint16Array(Z.size-Z.skip),Oe=a.pos-Z.size,ye=A.length;for(;a.pos>Oe;)ye=b(Z.start,A,ye);ge=new ga(A,H-Z.start,i),se=Z.start-x}else{let A=a.pos-K;a.next();let Oe=[],ye=[],L=V>=s?V:-1,Ve=0,tt=H;for(;a.pos>A;)L>=0&&a.id==L&&a.size>=0?(a.end<=tt-r&&(m(Oe,ye,B,Ve,a.end,tt,L,re),Ve=Oe.length,tt=a.end),a.next()):I>2500?h(B,A,Oe,ye):d(B,A,Oe,ye,L,I+1);if(L>=0&&Ve>0&&Ve-1&&Ve>0){let Be=p(ke);ge=fx(ke,Oe,ye,0,Oe.length,0,H-B,Be,Be)}else ge=O(ke,Oe,ye,H-B,re-H)}w.push(ge),D.push(se)}function h(x,_,w,D){let W=[],I=0,V=-1;for(;a.pos>_;){let{id:B,start:H,end:K,size:re}=a;if(re>4)a.next();else{if(V>-1&&H=0;K-=3)B[re++]=W[K],B[re++]=W[K+1]-H,B[re++]=W[K+2]-H,B[re++]=re;w.push(new ga(B,W[2]-H,i)),D.push(H-x)}}function p(x){return(_,w,D)=>{let W=0,I=_.length-1,V,B;if(I>=0&&(V=_[I])instanceof qe){if(!I&&V.type==x&&V.length==D)return V;(B=V.prop(Pe.lookAhead))&&(W=w[I]+V.length+B)}return O(x,_,w,D,W)}}function m(x,_,w,D,W,I,V,B){let H=[],K=[];for(;x.length>D;)H.push(x.pop()),K.push(_.pop()+w-W);x.push(O(i.types[V],H,K,I-W,B-I)),_.push(W-w)}function O(x,_,w,D,W=0,I){if(u){let V=[Pe.contextHash,u];I=I?[V].concat(I):[V]}if(W>25){let V=[Pe.lookAhead,W];I=I?[V].concat(I):[V]}return new qe(x,_,w,D,I)}function y(x,_){let w=a.fork(),D=0,W=0,I=0,V=w.end-r,B={size:0,start:0,skip:0};e:for(let H=w.pos-x;w.pos>H;){let K=w.size;if(w.id==_&&K>=0){B.size=D,B.start=W,B.skip=I,I+=4,D+=4,w.next();continue}let re=w.pos-K;if(K<0||re=s?4:0,ge=w.start;for(w.next();w.pos>re;){if(w.size<0)if(w.size==-3)ke+=4;else break e;else w.id>=s&&(ke+=4);w.next()}W=ge,D+=K,I+=ke}return(_<0||D==x)&&(B.size=D,B.start=W,B.skip=I),B.size>4?B:void 0}function b(x,_,w){let{id:D,start:W,end:I,size:V}=a;if(a.next(),V>=0&&D4){let H=a.pos-(V-4);for(;a.pos>H;)w=b(x,_,w)}_[--w]=B,_[--w]=I-x,_[--w]=W-x,_[--w]=D}else V==-3?u=D:V==-4&&(c=D);return w}let v=[],S=[];for(;a.pos>0;)d(t.start||0,t.bufferStart||0,v,S,-1,0);let k=(e=t.length)!==null&&e!==void 0?e:v.length?S[0]+v[0].length:0;return new qe(l[t.topID],v.reverse(),S.reverse(),k)}const FA=new WeakMap;function jg(t,e){if(!t.isAnonymous||e instanceof ga||e.type!=t)return 1;let n=FA.get(e);if(n==null){n=1;for(let i of e.children){if(i.type!=t||!(i instanceof qe)){n=1;break}n+=jg(t,i)}FA.set(e,n)}return n}function fx(t,e,n,i,r,o,s,a,l){let u=0;for(let m=i;m=c)break;_+=w}if(S==k+1){if(_>c){let w=m[k];p(w.children,w.positions,0,w.children.length,O[k]+v);continue}d.push(m[k])}else{let w=O[S-1]+m[S-1].length-x;d.push(fx(t,m,O,k,S,x,w,null,l))}h.push(x+v-o)}}return p(e,n,i,r,0),(a||l)(d,h,s)}class $D{constructor(){this.map=new WeakMap}setBuffer(e,n,i){let r=this.map.get(e);r||this.map.set(e,r=new Map),r.set(n,i)}getBuffer(e,n){let i=this.map.get(e);return i&&i.get(n)}set(e,n){e instanceof go?this.setBuffer(e.context.buffer,e.index,n):e instanceof Fn&&this.map.set(e.tree,n)}get(e){return e instanceof go?this.getBuffer(e.context.buffer,e.index):e instanceof Fn?this.map.get(e.tree):void 0}cursorSet(e,n){e.buffer?this.setBuffer(e.buffer.buffer,e.index,n):this.map.set(e.tree,n)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class Ko{constructor(e,n,i,r,o=!1,s=!1){this.from=e,this.to=n,this.tree=i,this.offset=r,this.open=(o?1:0)|(s?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,n=[],i=!1){let r=[new Ko(0,e.length,e,0,!1,i)];for(let o of n)o.to>e.length&&r.push(o);return r}static applyChanges(e,n,i=128){if(!n.length)return e;let r=[],o=1,s=e.length?e[0]:null;for(let a=0,l=0,u=0;;a++){let c=a=i)for(;s&&s.from=h.from||d<=h.to||u){let p=Math.max(h.from,l)-u,m=Math.min(h.to,d)-u;h=p>=m?null:new Ko(p,m,h.tree,h.offset+u,a>0,!!c)}if(h&&r.push(h),s.to>d)break;s=onew rr(r.from,r.to)):[new rr(0,0)]:[new rr(0,e.length)],this.createParse(e,n||[],i)}parse(e,n,i){let r=this.startParse(e,n,i);for(;;){let o=r.advance();if(o)return o}}};class Mee{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}}function LD(t){return(e,n,i,r)=>new Bee(e,t,n,i,r)}class zA{constructor(e,n,i,r,o){this.parser=e,this.parse=n,this.overlay=i,this.target=r,this.from=o}}function HA(t){if(!t.length||t.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(t))}class Dee{constructor(e,n,i,r,o,s,a){this.parser=e,this.predicate=n,this.mounts=i,this.index=r,this.start=o,this.target=s,this.prev=a,this.depth=0,this.ranges=[]}}const LS=new Pe({perNode:!0});class Bee{constructor(e,n,i,r,o){this.nest=n,this.input=i,this.fragments=r,this.ranges=o,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let i=this.baseParse.advance();if(!i)return null;if(this.baseParse=null,this.baseTree=i,this.startInner(),this.stoppedAt!=null)for(let r of this.inner)r.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let i=this.baseTree;return this.stoppedAt!=null&&(i=new qe(i.type,i.children,i.positions,i.length,i.propValues.concat([[LS,this.stoppedAt]]))),i}let e=this.inner[this.innerDone],n=e.parse.advance();if(n){this.innerDone++;let i=Object.assign(Object.create(null),e.target.props);i[Pe.mounted.id]=new rp(n,e.overlay,e.parser),e.target.props=i}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let n=this.innerDone;n=this.stoppedAt)a=!1;else if(e.hasNode(r)){if(n){let u=n.mounts.find(c=>c.frag.from<=r.from&&c.frag.to>=r.to&&c.mount.overlay);if(u)for(let c of u.mount.overlay){let d=c.from+u.pos,h=c.to+u.pos;d>=r.from&&h<=r.to&&!n.ranges.some(p=>p.fromd)&&n.ranges.push({from:d,to:h})}}a=!1}else if(i&&(s=Qee(i.ranges,r.from,r.to)))a=s!=2;else if(!r.type.isAnonymous&&(o=this.nest(r,this.input))&&(r.fromnew rr(d.from-r.from,d.to-r.from)):null,r.tree,c.length?c[0].from:r.from)),o.overlay?c.length&&(i={ranges:c,depth:0,prev:i}):a=!1}}else n&&(l=n.predicate(r))&&(l===!0&&(l=new rr(r.from,r.to)),l.fromnew rr(c.from-n.start,c.to-n.start)),n.target,u[0].from))),n=n.prev}i&&!--i.depth&&(i=i.prev)}}}}function Qee(t,e,n){for(let i of t){if(i.from>=n)break;if(i.to>e)return i.from<=e&&i.to>=n?2:1}return 0}function UA(t,e,n,i,r,o){if(e=e&&n.enter(i,1,vt.IgnoreOverlays|vt.ExcludeBuffers)||n.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let n=this.cursor.tree;;){if(n==e.tree)return!0;if(n.children.length&&n.positions[0]==0&&n.children[0]instanceof qe)n=n.children[0];else break}return!1}}let zee=class{constructor(e){var n;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let i=this.curFrag=e[0];this.curTo=(n=i.tree.prop(LS))!==null&&n!==void 0?n:i.to,this.inner=new WA(i.tree,-i.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let n=this.curFrag=this.fragments[this.fragI];this.curTo=(e=n.tree.prop(LS))!==null&&e!==void 0?e:n.to,this.inner=new WA(n.tree,-n.offset)}}findMounts(e,n){var i;let r=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let o=this.inner.cursor.node;o;o=o.parent){let s=(i=o.tree)===null||i===void 0?void 0:i.prop(Pe.mounted);if(s&&s.parser==n)for(let a=this.fragI;a=o.to)break;l.tree==this.curFrag.tree&&r.push({frag:l,pos:o.from-l.offset,mount:s})}}}return r}};function VA(t,e){let n=null,i=e;for(let r=1,o=0;r=a)break;l.to<=s||(n||(i=n=e.slice()),l.froma&&n.splice(o+1,0,new rr(a,l.to))):l.to>a?n[o--]=new rr(a,l.to):n.splice(o--,1))}}return i}function Hee(t,e,n,i){let r=0,o=0,s=!1,a=!1,l=-1e9,u=[];for(;;){let c=r==t.length?1e9:s?t[r].to:t[r].from,d=o==e.length?1e9:a?e[o].to:e[o].from;if(s!=a){let h=Math.max(l,n),p=Math.min(c,d,i);hnew rr(h.from+i,h.to+i)),d=Hee(e,c,l,u);for(let h=0,p=l;;h++){let m=h==d.length,O=m?u:d[h].from;if(O>p&&n.push(new Ko(p,O,r.tree,-s,o.from>=p||o.openStart,o.to<=O||o.openEnd)),m)break;p=d[h].to}}else n.push(new Ko(l,u,r.tree,-s,o.from>=s||o.openStart,o.to<=a||o.openEnd))}return n}let Uee=0;class Pr{constructor(e,n,i){this.set=e,this.base=n,this.modified=i,this.id=Uee++}static define(e){if(e!=null&&e.base)throw new Error("Can not derive from a modified tag");let n=new Pr([],null,[]);if(n.set.push(n),e)for(let i of e.set)n.set.push(i);return n}static defineModifier(){let e=new U0;return n=>n.modified.indexOf(e)>-1?n:U0.get(n.base||n,n.modified.concat(e).sort((i,r)=>i.id-r.id))}}let Wee=0;class U0{constructor(){this.instances=[],this.id=Wee++}static get(e,n){if(!n.length)return e;let i=n[0].instances.find(a=>a.base==e&&Vee(n,a.modified));if(i)return i;let r=[],o=new Pr(r,e,n);for(let a of n)a.instances.push(o);let s=jee(n);for(let a of e.set)if(!a.modified.length)for(let l of s)r.push(U0.get(a,l));return o}}function Vee(t,e){return t.length==e.length&&t.every((n,i)=>n==e[i])}function jee(t){let e=[[]];for(let n=0;ni.length-n.length)}function Iu(t){let e=Object.create(null);for(let n in t){let i=t[n];Array.isArray(i)||(i=[i]);for(let r of n.split(" "))if(r){let o=[],s=2,a=r;for(let d=0;;){if(a=="..."&&d>0&&d+3==r.length){s=1;break}let h=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!h)throw new RangeError("Invalid path: "+r);if(o.push(h[0]=="*"?"":h[0][0]=='"'?JSON.parse(h[0]):h[0]),d+=h[0].length,d==r.length)break;let p=r[d++];if(d==r.length&&p=="!"){s=0;break}if(p!="/")throw new RangeError("Invalid path: "+r);a=r.slice(d)}let l=o.length-1,u=o[l];if(!u)throw new RangeError("Invalid path: "+r);let c=new W0(i,s,l>0?o.slice(0,l):null);e[u]=c.sort(e[u])}}return ND.add(e)}const ND=new Pe;class W0{constructor(e,n,i,r){this.tags=e,this.mode=n,this.context=i,this.next=r}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let s=r;for(let a of o)for(let l of a.set){let u=n[l.id];if(u){s=s?s+" "+u:u;break}}return s},scope:i}}function Xee(t,e){let n=null;for(let i of t){let r=i.style(e);r&&(n=n?n+" "+r:r)}return n}function Zee(t,e,n,i=0,r=t.length){let o=new qee(i,Array.isArray(e)?e:[e],n);o.highlightRange(t.cursor(),i,r,"",o.highlighters),o.flush(r)}class qee{constructor(e,n,i){this.at=e,this.highlighters=n,this.span=i,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,i,r,o){let{type:s,from:a,to:l}=e;if(a>=i||l<=n)return;s.isTop&&(o=this.highlighters.filter(p=>!p.scope||p.scope(s)));let u=r,c=Yee(e)||W0.empty,d=Xee(o,c.tags);if(d&&(u&&(u+=" "),u+=d,c.mode==1&&(r+=(r?" ":"")+d)),this.startSpan(Math.max(n,a),u),c.opaque)return;let h=e.tree&&e.tree.prop(Pe.mounted);if(h&&h.overlay){let p=e.node.enter(h.overlay[0].from+a,1),m=this.highlighters.filter(y=>!y.scope||y.scope(h.tree.type)),O=e.firstChild();for(let y=0,b=a;;y++){let v=y=S||!e.nextSibling())););if(!v||S>i)break;b=v.to+a,b>n&&(this.highlightRange(p.cursor(),Math.max(n,v.from+a),Math.min(i,b),"",m),this.startSpan(Math.min(i,b),u))}O&&e.parent()}else if(e.firstChild()){h&&(r="");do if(!(e.to<=n)){if(e.from>=i)break;this.highlightRange(e,n,i,r,o),this.startSpan(Math.min(i,e.to),u)}while(e.nextSibling());e.parent()}}}function Yee(t){let e=t.type.prop(ND);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const ae=Pr.define,qm=ae(),Fs=ae(),XA=ae(Fs),ZA=ae(Fs),zs=ae(),Ym=ae(zs),My=ae(zs),so=ae(),bl=ae(so),ro=ae(),oo=ae(),NS=ae(),Rh=ae(NS),Gm=ae(),R={comment:qm,lineComment:ae(qm),blockComment:ae(qm),docComment:ae(qm),name:Fs,variableName:ae(Fs),typeName:XA,tagName:ae(XA),propertyName:ZA,attributeName:ae(ZA),className:ae(Fs),labelName:ae(Fs),namespace:ae(Fs),macroName:ae(Fs),literal:zs,string:Ym,docString:ae(Ym),character:ae(Ym),attributeValue:ae(Ym),number:My,integer:ae(My),float:ae(My),bool:ae(zs),regexp:ae(zs),escape:ae(zs),color:ae(zs),url:ae(zs),keyword:ro,self:ae(ro),null:ae(ro),atom:ae(ro),unit:ae(ro),modifier:ae(ro),operatorKeyword:ae(ro),controlKeyword:ae(ro),definitionKeyword:ae(ro),moduleKeyword:ae(ro),operator:oo,derefOperator:ae(oo),arithmeticOperator:ae(oo),logicOperator:ae(oo),bitwiseOperator:ae(oo),compareOperator:ae(oo),updateOperator:ae(oo),definitionOperator:ae(oo),typeOperator:ae(oo),controlOperator:ae(oo),punctuation:NS,separator:ae(NS),bracket:Rh,angleBracket:ae(Rh),squareBracket:ae(Rh),paren:ae(Rh),brace:ae(Rh),content:so,heading:bl,heading1:ae(bl),heading2:ae(bl),heading3:ae(bl),heading4:ae(bl),heading5:ae(bl),heading6:ae(bl),contentSeparator:ae(so),list:ae(so),quote:ae(so),emphasis:ae(so),strong:ae(so),link:ae(so),monospace:ae(so),strikethrough:ae(so),inserted:ae(),deleted:ae(),changed:ae(),invalid:ae(),meta:Gm,documentMeta:ae(Gm),annotation:ae(Gm),processingInstruction:ae(Gm),definition:Pr.defineModifier(),constant:Pr.defineModifier(),function:Pr.defineModifier(),standard:Pr.defineModifier(),local:Pr.defineModifier(),special:Pr.defineModifier()};MD([{tag:R.link,class:"tok-link"},{tag:R.heading,class:"tok-heading"},{tag:R.emphasis,class:"tok-emphasis"},{tag:R.strong,class:"tok-strong"},{tag:R.keyword,class:"tok-keyword"},{tag:R.atom,class:"tok-atom"},{tag:R.bool,class:"tok-bool"},{tag:R.url,class:"tok-url"},{tag:R.labelName,class:"tok-labelName"},{tag:R.inserted,class:"tok-inserted"},{tag:R.deleted,class:"tok-deleted"},{tag:R.literal,class:"tok-literal"},{tag:R.string,class:"tok-string"},{tag:R.number,class:"tok-number"},{tag:[R.regexp,R.escape,R.special(R.string)],class:"tok-string2"},{tag:R.variableName,class:"tok-variableName"},{tag:R.local(R.variableName),class:"tok-variableName tok-local"},{tag:R.definition(R.variableName),class:"tok-variableName tok-definition"},{tag:R.special(R.variableName),class:"tok-variableName2"},{tag:R.definition(R.propertyName),class:"tok-propertyName tok-definition"},{tag:R.typeName,class:"tok-typeName"},{tag:R.namespace,class:"tok-namespace"},{tag:R.className,class:"tok-className"},{tag:R.macroName,class:"tok-macroName"},{tag:R.propertyName,class:"tok-propertyName"},{tag:R.operator,class:"tok-operator"},{tag:R.comment,class:"tok-comment"},{tag:R.meta,class:"tok-meta"},{tag:R.invalid,class:"tok-invalid"},{tag:R.punctuation,class:"tok-punctuation"}]);var Dy;const Ys=new Pe;function db(t){return he.define({combine:t?e=>e.concat(t):void 0})}const px=new Pe;class Di{constructor(e,n,i=[],r=""){this.data=e,this.name=r,je.prototype.hasOwnProperty("tree")||Object.defineProperty(je.prototype,"tree",{get(){return Ot(this)}}),this.parser=n,this.extension=[Oa.of(this),je.languageData.of((o,s,a)=>{let l=qA(o,s,a),u=l.type.prop(Ys);if(!u)return[];let c=o.facet(u),d=l.type.prop(px);if(d){let h=l.resolve(s-l.from,a);for(let p of d)if(p.test(h,o)){let m=o.facet(p.facet);return p.type=="replace"?m:m.concat(c)}}return c})].concat(i)}isActiveAt(e,n,i=-1){return qA(e,n,i).type.prop(Ys)==this.data}findRegions(e){let n=e.facet(Oa);if((n==null?void 0:n.data)==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let i=[],r=(o,s)=>{if(o.prop(Ys)==this.data){i.push({from:s,to:s+o.length});return}let a=o.prop(Pe.mounted);if(a){if(a.tree.prop(Ys)==this.data){if(a.overlay)for(let l of a.overlay)i.push({from:l.from+s,to:l.to+s});else i.push({from:s,to:s+o.length});return}else if(a.overlay){let l=i.length;if(r(a.tree,a.overlay[0].from+s),i.length>l)return}}for(let l=0;li.isTop?n:void 0)]}),e.name)}configure(e,n){return new du(this.data,this.parser.configure(e),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function Ot(t){let e=t.field(Di.state,!1);return e?e.tree:qe.empty}class Gee{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,n){let i=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,n):this.string.slice(e-i,n-i)}}let Ih=null;class hu{constructor(e,n,i=[],r,o,s,a,l){this.parser=e,this.state=n,this.fragments=i,this.tree=r,this.treeLen=o,this.viewport=s,this.skipped=a,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(e,n,i){return new hu(e,n,[],qe.empty,0,i,[],null)}startParse(){return this.parser.startParse(new Gee(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=qe.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var i;if(typeof e=="number"){let r=Date.now()+e;e=()=>Date.now()>r}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=e,this.tree=n,this.fragments=this.withoutTempSkipped(Ko.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=Ih;Ih=this;try{return e()}finally{Ih=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=YA(e,n.from,n.to);return e}changes(e,n){let{fragments:i,tree:r,treeLen:o,viewport:s,skipped:a}=this;if(this.takeTree(),!e.empty){let l=[];if(e.iterChangedRanges((u,c,d,h)=>l.push({fromA:u,toA:c,fromB:d,toB:h})),i=Ko.applyChanges(i,l),r=qe.empty,o=0,s={from:e.mapPos(s.from,-1),to:e.mapPos(s.to,1)},this.skipped.length){a=[];for(let u of this.skipped){let c=e.mapPos(u.from,1),d=e.mapPos(u.to,-1);ce.from&&(this.fragments=YA(this.fragments,r,o),this.skipped.splice(i--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,n){this.skipped.push({from:e,to:n})}static getSkippingParser(e){return new class extends cb{createParse(n,i,r){let o=r[0].from,s=r[r.length-1].to;return{parsedPos:o,advance(){let l=Ih;if(l){for(let u of r)l.tempSkipped.push(u);e&&(l.scheduleOn=l.scheduleOn?Promise.all([l.scheduleOn,e]):e)}return this.parsedPos=s,new qe(nn.none,[],[],s-o)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let n=this.fragments;return this.treeLen>=e&&n.length&&n[0].from==0&&n[0].to>=e}static get(){return Ih}}function YA(t,e,n){return Ko.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class md{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(e.changes,e.state),i=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,i)||n.takeTree(),new md(n)}static init(e){let n=Math.min(3e3,e.doc.length),i=hu.create(e.facet(Oa).parser,e,{from:0,to:n});return i.work(20,n)||i.takeTree(),new md(i)}}Di.state=gn.define({create:md.init,update(t,e){for(let n of e.effects)if(n.is(Di.setState))return n.value;return e.startState.facet(Oa)!=e.state.facet(Oa)?md.init(e.state):t.apply(e)}});let DD=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(DD=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:400})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const By=typeof navigator<"u"&&(!((Dy=navigator.scheduling)===null||Dy===void 0)&&Dy.isInputPending)?()=>navigator.scheduling.isInputPending():null,Kee=tn.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let n=this.view.state.field(Di.state).context;(n.updateViewport(e.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:e}=this.view,n=e.field(Di.state);(n.tree!=n.context.tree||!n.context.isDone(e.doc.length))&&(this.working=DD(this.work))}work(e){this.working=null;let n=Date.now();if(this.chunkEndr+1e3,l=o.context.work(()=>By&&By()||Date.now()>s,r+(a?0:1e5));this.chunkBudget-=Date.now()-n,(l||this.chunkBudget<=0)&&(o.context.takeTree(),this.view.dispatch({effects:Di.setState.of(new md(o.context))})),this.chunkBudget>0&&!(l&&!a)&&this.scheduleWork(),this.checkAsyncSchedule(o.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(n=>mi(this.view.state,n)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Oa=he.define({combine(t){return t.length?t[0]:null},enables:t=>[Di.state,Kee,le.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]});class gd{constructor(e,n=[]){this.language=e,this.support=n,this.extension=[e,n]}}class V0{constructor(e,n,i,r,o,s=void 0){this.name=e,this.alias=n,this.extensions=i,this.filename=r,this.loadFunc=o,this.support=s,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then(e=>this.support=e,e=>{throw this.loading=null,e}))}static of(e){let{load:n,support:i}=e;if(!n){if(!i)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");n=()=>Promise.resolve(i)}return new V0(e.name,(e.alias||[]).concat(e.name).map(r=>r.toLowerCase()),e.extensions||[],e.filename,n,i)}static matchFilename(e,n){for(let r of e)if(r.filename&&r.filename.test(n))return r;let i=/\.([^.]+)$/.exec(n);if(i){for(let r of e)if(r.extensions.indexOf(i[1])>-1)return r}return null}static matchLanguageName(e,n,i=!0){n=n.toLowerCase();for(let r of e)if(r.alias.some(o=>o==n))return r;if(i)for(let r of e)for(let o of r.alias){let s=n.indexOf(o);if(s>-1&&(o.length>2||!/\w/.test(n[s-1])&&!/\w/.test(n[s+o.length])))return r}return null}}const BD=he.define(),Gd=he.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(n=>n!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function fu(t){let e=t.facet(Gd);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function Od(t,e){let n="",i=t.tabSize,r=t.facet(Gd)[0];if(r==" "){for(;e>=i;)n+=" ",e-=i;r=" "}for(let o=0;o=e?ete(t,n,e):null}function Jee(t,e,n){let i=Object.create(null),r=new Np(t,{overrideIndentation:s=>{var a;return(a=i[s])!==null&&a!==void 0?a:-1}}),o=[];for(let s=e;s<=n;){let a=t.doc.lineAt(s);s=a.to+1;let l=hb(r,a.from);if(l==null)continue;/\S/.test(a.text)||(l=0);let u=/^\s*/.exec(a.text)[0],c=Od(t,l);u!=c&&(i[a.from]=l,o.push({from:a.from,to:a.from+u.length,insert:c}))}return t.changes(o)}class Np{constructor(e,n={}){this.state=e,this.options=n,this.unit=fu(e)}lineAt(e,n=1){let i=this.state.doc.lineAt(e),{simulateBreak:r,simulateDoubleBreak:o}=this.options;return r!=null&&r>=i.from&&r<=i.to?o&&r==e?{text:"",from:e}:(n<0?r-1&&(o+=s-this.countColumn(i,i.search(/\S|$/))),o}countColumn(e,n=e.length){return Hr(e,this.state.tabSize,n)}lineIndent(e,n=1){let{text:i,from:r}=this.lineAt(e,n),o=this.options.overrideIndentation;if(o){let s=o(r);if(s>-1)return s}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const Kd=new Pe;function ete(t,e,n){let i=e.resolveStack(n),r=i.node.enterUnfinishedNodesBefore(n);if(r!=i.node){let o=[];for(let s=r;s!=i.node;s=s.parent)o.push(s);for(let s=o.length-1;s>=0;s--)i={node:o[s],next:i}}return QD(i,t,n)}function QD(t,e,n){for(let i=t;i;i=i.next){let r=nte(i.node);if(r)return r(mx.create(e,n,i))}return 0}function tte(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function nte(t){let e=t.type.prop(Kd);if(e)return e;let n=t.firstChild,i;if(n&&(i=n.type.prop(Pe.closedBy))){let r=t.lastChild,o=r&&i.indexOf(r.name)>-1;return s=>FD(s,!0,1,void 0,o&&!tte(s)?r.from:void 0)}return t.parent==null?ite:null}function ite(){return 0}class mx extends Np{constructor(e,n,i){super(e.state,e.options),this.base=e,this.pos=n,this.context=i}get node(){return this.context.node}static create(e,n,i){return new mx(e,n,i)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let n=this.state.doc.lineAt(e.from);for(;;){let i=e.resolve(n.from);for(;i.parent&&i.parent.from==i.from;)i=i.parent;if(rte(i,e))break;n=this.state.doc.lineAt(i.from)}return this.lineIndent(n.from)}continue(){return QD(this.context.next,this.base,this.pos)}}function rte(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function ote(t){let e=t.node,n=e.childAfter(e.from),i=e.lastChild;if(!n)return null;let r=t.options.simulateBreak,o=t.state.doc.lineAt(n.from),s=r==null||r<=o.from?o.to:Math.min(o.to,r);for(let a=n.to;;){let l=e.childAfter(a);if(!l||l==i)return null;if(!l.type.isSkipped)return l.fromFD(i,e,n,t)}function FD(t,e,n,i,r){let o=t.textAfter,s=o.match(/^\s*/)[0].length,a=i&&o.slice(s,s+i.length)==i||r==t.pos+s,l=e?ote(t):null;return l?a?t.column(l.from):t.column(l.to):t.baseIndent+(a?0:t.unit*n)}const ate=t=>t.baseIndent;function Kc({except:t,units:e=1}={}){return n=>{let i=t&&t.test(n.textAfter);return n.baseIndent+(i?0:e*n.unit)}}const lte=200;function ute(){return je.transactionFilter.of(t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:i}=t.newSelection.main,r=n.lineAt(i);if(i>r.from+lte)return t;let o=n.sliceString(r.from,i);if(!e.some(u=>u.test(o)))return t;let{state:s}=t,a=-1,l=[];for(let{head:u}of s.selection.ranges){let c=s.doc.lineAt(u);if(c.from==a)continue;a=c.from;let d=hb(s,c.from);if(d==null)continue;let h=/^\s*/.exec(c.text)[0],p=Od(s,d);h!=p&&l.push({from:c.from,to:c.from+h.length,insert:p})}return l.length?[t,{changes:l,sequential:!0}]:t})}const zD=he.define(),$u=new Pe;function gx(t){let e=t.firstChild,n=t.lastChild;return e&&e.ton)continue;if(o&&a.from=e&&u.to>n&&(o=u)}}return o}function dte(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function j0(t,e,n){for(let i of t.facet(zD)){let r=i(t,e,n);if(r)return r}return cte(t,e,n)}function HD(t,e){let n=e.mapPos(t.from,1),i=e.mapPos(t.to,-1);return n>=i?void 0:{from:n,to:i}}const fb=De.define({map:HD}),Mp=De.define({map:HD});function UD(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some(i=>i.from<=n&&i.to>=n)||e.push(t.lineBlockAt(n));return e}const pu=gn.define({create(){return Ee.none},update(t,e){t=t.map(e.changes);for(let n of e.effects)if(n.is(fb)&&!hte(t,n.value.from,n.value.to)){let{preparePlaceholder:i}=e.state.facet(jD),r=i?Ee.replace({widget:new yte(i(e.state,n.value))}):GA;t=t.update({add:[r.range(n.value.from,n.value.to)]})}else n.is(Mp)&&(t=t.update({filter:(i,r)=>n.value.from!=i||n.value.to!=r,filterFrom:n.value.from,filterTo:n.value.to}));if(e.selection){let n=!1,{head:i}=e.selection.main;t.between(i,i,(r,o)=>{ri&&(n=!0)}),n&&(t=t.update({filterFrom:i,filterTo:i,filter:(r,o)=>o<=i||r>=i}))}return t},provide:t=>le.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,(i,r)=>{n.push(i,r)}),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n{(!r||r.from>o)&&(r={from:o,to:s})}),r}function hte(t,e,n){let i=!1;return t.between(e,e,(r,o)=>{r==e&&o==n&&(i=!0)}),i}function WD(t,e){return t.field(pu,!1)?e:e.concat(De.appendConfig.of(XD()))}const fte=t=>{for(let e of UD(t)){let n=j0(t.state,e.from,e.to);if(n)return t.dispatch({effects:WD(t.state,[fb.of(n),VD(t,n)])}),!0}return!1},pte=t=>{if(!t.state.field(pu,!1))return!1;let e=[];for(let n of UD(t)){let i=X0(t.state,n.from,n.to);i&&e.push(Mp.of(i),VD(t,i,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function VD(t,e,n=!0){let i=t.state.doc.lineAt(e.from).number,r=t.state.doc.lineAt(e.to).number;return le.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${i} ${t.state.phrase("to")} ${r}.`)}const mte=t=>{let{state:e}=t,n=[];for(let i=0;i{let e=t.state.field(pu,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,(i,r)=>{n.push(Mp.of({from:i,to:r}))}),t.dispatch({effects:n}),!0},Ote=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:fte},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:pte},{key:"Ctrl-Alt-[",run:mte},{key:"Ctrl-Alt-]",run:gte}],bte={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},jD=he.define({combine(t){return Po(t,bte)}});function XD(t){return[pu,wte]}function ZD(t,e){let{state:n}=t,i=n.facet(jD),r=s=>{let a=t.lineBlockAt(t.posAtDOM(s.target)),l=X0(t.state,a.from,a.to);l&&t.dispatch({effects:Mp.of(l)}),s.preventDefault()};if(i.placeholderDOM)return i.placeholderDOM(t,r,e);let o=document.createElement("span");return o.textContent=i.placeholderText,o.setAttribute("aria-label",n.phrase("folded code")),o.title=n.phrase("unfold"),o.className="cm-foldPlaceholder",o.onclick=r,o}const GA=Ee.replace({widget:new class extends ps{toDOM(t){return ZD(t,null)}}});class yte extends ps{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return ZD(e,this.value)}}const vte={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class Qy extends ss{constructor(e,n){super(),this.config=e,this.open=n}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let n=document.createElement("span");return n.textContent=this.open?this.config.openText:this.config.closedText,n.title=e.state.phrase(this.open?"Fold line":"Unfold line"),n}}function Ste(t={}){let e=Object.assign(Object.assign({},vte),t),n=new Qy(e,!0),i=new Qy(e,!1),r=tn.fromClass(class{constructor(s){this.from=s.viewport.from,this.markers=this.buildMarkers(s)}update(s){(s.docChanged||s.viewportChanged||s.startState.facet(Oa)!=s.state.facet(Oa)||s.startState.field(pu,!1)!=s.state.field(pu,!1)||Ot(s.startState)!=Ot(s.state)||e.foldingChanged(s))&&(this.markers=this.buildMarkers(s.view))}buildMarkers(s){let a=new ha;for(let l of s.viewportLineBlocks){let u=X0(s.state,l.from,l.to)?i:j0(s.state,l.from,l.to)?n:null;u&&a.add(l.from,l.from,u)}return a.finish()}}),{domEventHandlers:o}=e;return[r,vee({class:"cm-foldGutter",markers(s){var a;return((a=s.plugin(r))===null||a===void 0?void 0:a.markers)||nt.empty},initialSpacer(){return new Qy(e,!1)},domEventHandlers:Object.assign(Object.assign({},o),{click:(s,a,l)=>{if(o.click&&o.click(s,a,l))return!0;let u=X0(s.state,a.from,a.to);if(u)return s.dispatch({effects:Mp.of(u)}),!0;let c=j0(s.state,a.from,a.to);return c?(s.dispatch({effects:fb.of(c)}),!0):!1}})}),XD()]}const wte=le.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class Dp{constructor(e,n){this.specs=e;let i;function r(a){let l=fa.newName();return(i||(i=Object.create(null)))["."+l]=a,l}const o=typeof n.all=="string"?n.all:n.all?r(n.all):void 0,s=n.scope;this.scope=s instanceof Di?a=>a.prop(Ys)==s.data:s?a=>a==s:void 0,this.style=MD(e.map(a=>({tag:a.tag,class:a.class||r(Object.assign({},a,{tag:null}))})),{all:o}).style,this.module=i?new fa(i):null,this.themeType=n.themeType}static define(e,n){return new Dp(e,n||{})}}const MS=he.define(),qD=he.define({combine(t){return t.length?[t[0]]:null}});function Fy(t){let e=t.facet(MS);return e.length?e:t.facet(qD)}function KA(t,e){let n=[xte],i;return t instanceof Dp&&(t.module&&n.push(le.styleModule.of(t.module)),i=t.themeType),e!=null&&e.fallback?n.push(qD.of(t)):i?n.push(MS.computeN([le.darkTheme],r=>r.facet(le.darkTheme)==(i=="dark")?[t]:[])):n.push(MS.of(t)),n}class kte{constructor(e){this.markCache=Object.create(null),this.tree=Ot(e.state),this.decorations=this.buildDeco(e,Fy(e.state)),this.decoratedTo=e.viewport.to}update(e){let n=Ot(e.state),i=Fy(e.state),r=i!=Fy(e.startState),{viewport:o}=e.view,s=e.changes.mapPos(this.decoratedTo,1);n.length=o.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=s):(n!=this.tree||e.viewportChanged||r)&&(this.tree=n,this.decorations=this.buildDeco(e.view,i),this.decoratedTo=o.to)}buildDeco(e,n){if(!n||!this.tree.length)return Ee.none;let i=new ha;for(let{from:r,to:o}of e.visibleRanges)Zee(this.tree,n,(s,a,l)=>{i.add(s,a,this.markCache[l]||(this.markCache[l]=Ee.mark({class:l})))},r,o);return i.finish()}}const xte=hs.high(tn.fromClass(kte,{decorations:t=>t.decorations})),_te=Dp.define([{tag:R.meta,color:"#404740"},{tag:R.link,textDecoration:"underline"},{tag:R.heading,textDecoration:"underline",fontWeight:"bold"},{tag:R.emphasis,fontStyle:"italic"},{tag:R.strong,fontWeight:"bold"},{tag:R.strikethrough,textDecoration:"line-through"},{tag:R.keyword,color:"#708"},{tag:[R.atom,R.bool,R.url,R.contentSeparator,R.labelName],color:"#219"},{tag:[R.literal,R.inserted],color:"#164"},{tag:[R.string,R.deleted],color:"#a11"},{tag:[R.regexp,R.escape,R.special(R.string)],color:"#e40"},{tag:R.definition(R.variableName),color:"#00f"},{tag:R.local(R.variableName),color:"#30a"},{tag:[R.typeName,R.namespace],color:"#085"},{tag:R.className,color:"#167"},{tag:[R.special(R.variableName),R.macroName],color:"#256"},{tag:R.definition(R.propertyName),color:"#00c"},{tag:R.comment,color:"#940"},{tag:R.invalid,color:"#f00"}]),Ete=le.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),YD=1e4,GD="()[]{}",KD=he.define({combine(t){return Po(t,{afterCursor:!0,brackets:GD,maxScanDistance:YD,renderMatch:Pte})}}),Cte=Ee.mark({class:"cm-matchingBracket"}),Tte=Ee.mark({class:"cm-nonmatchingBracket"});function Pte(t){let e=[],n=t.matched?Cte:Tte;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}const Ate=gn.define({create(){return Ee.none},update(t,e){if(!e.docChanged&&!e.selection)return t;let n=[],i=e.state.facet(KD);for(let r of e.state.selection.ranges){if(!r.empty)continue;let o=Oo(e.state,r.head,-1,i)||r.head>0&&Oo(e.state,r.head-1,1,i)||i.afterCursor&&(Oo(e.state,r.head,1,i)||r.headle.decorations.from(t)}),Rte=[Ate,Ete];function Ite(t={}){return[KD.of(t),Rte]}const JD=new Pe;function DS(t,e,n){let i=t.prop(e<0?Pe.openedBy:Pe.closedBy);if(i)return i;if(t.name.length==1){let r=n.indexOf(t.name);if(r>-1&&r%2==(e<0?1:0))return[n[r+e]]}return null}function BS(t){let e=t.type.prop(JD);return e?e(t.node):t}function Oo(t,e,n,i={}){let r=i.maxScanDistance||YD,o=i.brackets||GD,s=Ot(t),a=s.resolveInner(e,n);for(let l=a;l;l=l.parent){let u=DS(l.type,n,o);if(u&&l.from0?e>=c.from&&ec.from&&e<=c.to))return $te(t,e,n,l,c,u,o)}}return Lte(t,e,n,s,a.type,r,o)}function $te(t,e,n,i,r,o,s){let a=i.parent,l={from:r.from,to:r.to},u=0,c=a==null?void 0:a.cursor();if(c&&(n<0?c.childBefore(i.from):c.childAfter(i.to)))do if(n<0?c.to<=i.from:c.from>=i.to){if(u==0&&o.indexOf(c.type.name)>-1&&c.from0)return null;let u={from:n<0?e-1:e,to:n>0?e+1:e},c=t.doc.iterRange(e,n>0?t.doc.length:0),d=0;for(let h=0;!c.next().done&&h<=o;){let p=c.value;n<0&&(h+=p.length);let m=e+h*n;for(let O=n>0?0:p.length-1,y=n>0?p.length:-1;O!=y;O+=n){let b=s.indexOf(p[O]);if(!(b<0||i.resolveInner(m+O,1).type!=r))if(b%2==0==n>0)d++;else{if(d==1)return{start:u,end:{from:m+O,to:m+O+1},matched:b>>1==l>>1};d--}}n>0&&(h+=p.length)}return c.done?{start:u,matched:!1}:null}function JA(t,e,n,i=0,r=0){e==null&&(e=t.search(/[^\s\u00a0]/),e==-1&&(e=t.length));let o=r;for(let s=i;s=this.string.length}sol(){return this.pos==0}peek(){return this.string.charAt(this.pos)||void 0}next(){if(this.posn}eatSpace(){let e=this.pos;for(;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e}skipToEnd(){this.pos=this.string.length}skipTo(e){let n=this.string.indexOf(e,this.pos);if(n>-1)return this.pos=n,!0}backUp(e){this.pos-=e}column(){return this.lastColumnPosi?s.toLowerCase():s,o=this.string.substr(this.pos,e.length);return r(o)==r(e)?(n!==!1&&(this.pos+=e.length),!0):null}else{let r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&n!==!1&&(this.pos+=r[0].length),r)}}current(){return this.string.slice(this.start,this.pos)}}function Nte(t){return{name:t.name||"",token:t.token,blankLine:t.blankLine||(()=>{}),startState:t.startState||(()=>!0),copyState:t.copyState||Mte,indent:t.indent||(()=>null),languageData:t.languageData||{},tokenTable:t.tokenTable||bx}}function Mte(t){if(typeof t!="object")return t;let e={};for(let n in t){let i=t[n];e[n]=i instanceof Array?i.slice():i}return e}const eR=new WeakMap;class Z0 extends Di{constructor(e){let n=db(e.languageData),i=Nte(e),r,o=new class extends cb{createParse(s,a,l){return new Bte(r,s,a,l)}};super(n,o,[BD.of((s,a)=>this.getIndent(s,a))],e.name),this.topNode=zte(n),r=this,this.streamParser=i,this.stateAfter=new Pe({perNode:!0}),this.tokenTable=e.tokenTable?new r4(i.tokenTable):Fte}static define(e){return new Z0(e)}getIndent(e,n){let i=Ot(e.state),r=i.resolve(n);for(;r&&r.type!=this.topNode;)r=r.parent;if(!r)return null;let o,{overrideIndentation:s}=e.options;s&&(o=eR.get(e.state),o!=null&&o1e4)return null;for(;l=i&&n+e.length<=r&&e.prop(t.stateAfter);if(o)return{state:t.streamParser.copyState(o),pos:n+e.length};for(let s=e.children.length-1;s>=0;s--){let a=e.children[s],l=n+e.positions[s],u=a instanceof qe&&l=e.length)return e;!r&&e.type==t.topNode&&(r=!0);for(let o=e.children.length-1;o>=0;o--){let s=e.positions[o],a=e.children[o],l;if(sn&&Ox(t,r.tree,0-r.offset,n,s),l;if(a&&(l=t4(t,r.tree,n+r.offset,a.pos+r.offset,!1)))return{state:a.state,tree:l}}return{state:t.streamParser.startState(i?fu(i):4),tree:qe.empty}}let Bte=class{constructor(e,n,i,r){this.lang=e,this.input=n,this.fragments=i,this.ranges=r,this.stoppedAt=null,this.chunks=[],this.chunkPos=[],this.chunk=[],this.chunkReused=void 0,this.rangeIndex=0,this.to=r[r.length-1].to;let o=hu.get(),s=r[0].from,{state:a,tree:l}=Dte(e,i,s,o==null?void 0:o.state);this.state=a,this.parsedPos=this.chunkStart=s+l.length;for(let u=0;u=n?this.finish():e&&this.parsedPos>=e.viewport.to?(e.skipUntilInView(this.parsedPos,n),this.finish()):null}stopAt(e){this.stoppedAt=e}lineAfter(e){let n=this.input.chunk(e);if(this.input.lineChunks)n==` `&&(n="");else{let i=n.indexOf(` -`);i>-1&&(n=n.slice(0,i))}return e+n.length<=this.to?n:n.slice(0,this.to-e)}nextLine(){let e=this.parsedPos,n=this.lineAfter(e),i=e+n.length;for(let r=this.rangeIndex;;){let o=this.ranges[r].to;if(o>=i||(n=n.slice(0,o-(i-n.length)),r++,r==this.ranges.length))break;let s=this.ranges[r].from,a=this.lineAfter(s);n+=a,i=s+a.length}return{line:n,end:i}}skipGapsTo(e,n,i){for(;;){let r=this.ranges[this.rangeIndex].to,o=e+n;if(i>0?r>o:r>=o)break;let s=this.ranges[++this.rangeIndex].from;n+=s-r}return n}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to1){o=this.skipGapsTo(n,o,1),n+=o;let s=this.chunk.length;o=this.skipGapsTo(i,o,-1),i+=o,r+=this.chunk.length-s}return this.chunk.push(e,n,i,r),o}parseLine(e){let{line:n,end:i}=this.nextLine(),r=0,{streamParser:o}=this.lang,s=new e4(n,e?e.state.tabSize:4,e?du(e.state):2);if(s.eol())o.blankLine(this.state,s.indentUnit);else for(;!s.eol();){let a=n4(o.token,s,this.state);if(a&&(r=this.emitToken(this.lang.tokenTable.resolve(a),this.parsedPos+s.start,this.parsedPos+s.pos,4,r)),s.start>1e4)break}this.parsedPos=i,this.moveRangeIndex(),this.parsedPose.start)return r}throw new Error("Stream parser failed to advance stream.")}const Ox=Object.create(null),op=[tn.none],Qte=new qd(op),tR=[],nR=Object.create(null),i4=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])i4[t]=o4(Ox,e);class r4{constructor(e){this.extra=e,this.table=Object.assign(Object.create(null),i4)}resolve(e){return e?this.table[e]||(this.table[e]=o4(this.extra,e)):0}}const Fte=new r4(Ox);function Fy(t,e){tR.indexOf(t)>-1||(tR.push(t),console.warn(e))}function o4(t,e){let n=[];for(let a of e.split(" ")){let l=[];for(let u of a.split(".")){let c=t[u]||R[u];c?typeof c=="function"?l.length?l=l.map(c):Fy(u,`Modifier ${u} used at start of tag`):l.length?Fy(u,`Tag ${u} used as modifier`):l=Array.isArray(c)?c:[c]:Fy(u,`Unknown highlighting tag ${u}`)}for(let u of l)n.push(u)}if(!n.length)return 0;let i=e.replace(/ /g,"_"),r=i+" "+n.map(a=>a.id),o=nR[r];if(o)return o.id;let s=nR[r]=tn.define({id:op.length,name:i,props:[Au({[i]:n})]});return op.push(s),s.id}function zte(t){let e=tn.define({id:op.length,name:"Document",props:[qs.add(()=>t)],top:!0});return op.push(e),e}xt.RTL,xt.LTR;class bx{constructor(e,n,i){this.state=e,this.pos=n,this.explicit=i,this.abortListeners=[]}tokenBefore(e){let n=gt(this.state).resolveInner(this.pos,-1);for(;n&&e.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(e){let n=this.state.doc.lineAt(this.pos),i=Math.max(n.from,this.pos-250),r=n.text.slice(i-n.from,this.pos-n.from),o=r.search(a4(e,!1));return o<0?null:{from:i+o,to:this.pos,text:r.slice(o)}}get aborted(){return this.abortListeners==null}addEventListener(e,n){e=="abort"&&this.abortListeners&&this.abortListeners.push(n)}}function iR(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function Hte(t){let e=Object.create(null),n=Object.create(null);for(let{label:r}of t){e[r[0]]=!0;for(let o=1;otypeof r=="string"?{label:r}:r),[n,i]=e.every(r=>/^\w+$/.test(r.label))?[/\w*$/,/\w+$/]:Hte(e);return r=>{let o=r.matchBefore(i);return o||r.explicit?{from:o?o.from:r.pos,options:e,validFor:n}:null}}function Ute(t,e){return n=>{for(let i=gt(n.state).resolveInner(n.pos,-1);i;i=i.parent){if(t.indexOf(i.name)>-1)return null;if(i.type.isTop)break}return e(n)}}class rR{constructor(e,n,i,r){this.completion=e,this.source=n,this.match=i,this.score=r}}function sa(t){return t.selection.main.from}function a4(t,e){var n;let{source:i}=t,r=e&&i[0]!="^",o=i[i.length-1]!="$";return!r&&!o?t:new RegExp(`${r?"^":""}(?:${i})${o?"$":""}`,(n=t.flags)!==null&&n!==void 0?n:t.ignoreCase?"i":"")}const yx=hs.define();function Wte(t,e,n,i){let{main:r}=t.selection,o=n-r.from,s=i-r.from;return Object.assign(Object.assign({},t.changeByRange(a=>a!=r&&n!=i&&t.sliceDoc(a.from+o,a.from+s)!=t.sliceDoc(n,i)?{range:a}:{changes:{from:a.from+o,to:i==r.from?a.to:a.from+s,insert:e},range:q.cursor(a.from+o+e.length)})),{scrollIntoView:!0,userEvent:"input.complete"})}const oR=new WeakMap;function Vte(t){if(!Array.isArray(t))return t;let e=oR.get(t);return e||oR.set(t,e=s4(t)),e}const Z0=De.define(),sp=De.define();class jte{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let n=0;n=48&&x<=57||x>=97&&x<=122?2:x>=65&&x<=90?1:0:(_=Gk(x))!=_.toLowerCase()?1:_!=_.toUpperCase()?2:0;(!v||w==1&&y||k==0&&w!=0)&&(n[d]==x||i[d]==x&&(h=!0)?s[d++]=v:s.length&&(b=!1)),k=w,v+=ir(x)}return d==l&&s[0]==0&&b?this.result(-100+(h?-200:0),s,e):p==l&&m==0?this.ret(-200-e.length+(O==e.length?0:-100),[0,O]):a>-1?this.ret(-700-e.length,[a,a+this.pattern.length]):p==l?this.ret(-900-e.length,[m,O]):d==l?this.result(-100+(h?-200:0)+-700+(b?0:-1100),s,e):n.length==2?null:this.result((r[0]?-700:0)+-200+-1100,r,e)}result(e,n,i){let r=[],o=0;for(let s of n){let a=s+(this.astral?ir(xn(i,s)):1);o&&r[o-1]==s?r[o-1]=a:(r[o++]=s,r[o++]=a)}return this.ret(e-i.length,r)}}class Xte{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:Zte,filterStrict:!1,compareCompletions:(e,n)=>e.label.localeCompare(n.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,n)=>e&&n,closeOnBlur:(e,n)=>e&&n,icons:(e,n)=>e&&n,tooltipClass:(e,n)=>i=>sR(e(i),n(i)),optionClass:(e,n)=>i=>sR(e(i),n(i)),addToOptions:(e,n)=>e.concat(n),filterStrict:(e,n)=>e||n})}});function sR(t,e){return t?e?t+" "+e:t:e}function Zte(t,e,n,i,r,o){let s=t.textDirection==xt.RTL,a=s,l=!1,u="top",c,d,h=e.left-r.left,p=r.right-e.right,m=i.right-i.left,O=i.bottom-i.top;if(a&&h=O||v>e.top?c=n.bottom-e.top:(u="bottom",c=e.bottom-n.top)}let y=(e.bottom-e.top)/o.offsetHeight,b=(e.right-e.left)/o.offsetWidth;return{style:`${u}: ${c/y}px; max-width: ${d/b}px`,class:"cm-completionInfo-"+(l?s?"left-narrow":"right-narrow":a?"left":"right")}}function qte(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(n){let i=document.createElement("div");return i.classList.add("cm-completionIcon"),n.type&&i.classList.add(...n.type.split(/\s+/g).map(r=>"cm-completionIcon-"+r)),i.setAttribute("aria-hidden","true"),i},position:20}),e.push({render(n,i,r,o){let s=document.createElement("span");s.className="cm-completionLabel";let a=n.displayLabel||n.label,l=0;for(let u=0;ul&&s.appendChild(document.createTextNode(a.slice(l,c)));let h=s.appendChild(document.createElement("span"));h.appendChild(document.createTextNode(a.slice(c,d))),h.className="cm-completionMatchedText",l=d}return ln.position-i.position).map(n=>n.render)}function zy(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let r=Math.floor(e/n);return{from:r*n,to:(r+1)*n}}let i=Math.floor((t-e)/n);return{from:t-(i+1)*n,to:t-i*n}}class Yte{constructor(e,n,i){this.view=e,this.stateField=n,this.applyCompletion=i,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:l=>this.placeInfo(l),key:this},this.space=null,this.currentClass="";let r=e.state.field(n),{options:o,selected:s}=r.open,a=e.state.facet(Cn);this.optionContent=qte(a),this.optionClass=a.optionClass,this.tooltipClass=a.tooltipClass,this.range=zy(o.length,s,a.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",l=>{let{options:u}=e.state.field(n).open;for(let c=l.target,d;c&&c!=this.dom;c=c.parentNode)if(c.nodeName=="LI"&&(d=/-(\d+)$/.exec(c.id))&&+d[1]{let u=e.state.field(this.stateField,!1);u&&u.tooltip&&e.state.facet(Cn).closeOnBlur&&l.relatedTarget!=e.contentDOM&&e.dispatch({effects:sp.of(null)})}),this.showOptions(o,r.id)}mount(){this.updateSel()}showOptions(e,n){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,n,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var n;let i=e.state.field(this.stateField),r=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),i!=r){let{options:o,selected:s,disabled:a}=i.open;(!r.open||r.open.options!=o)&&(this.range=zy(o.length,s,e.state.facet(Cn).maxRenderedOptions),this.showOptions(o,i.id)),this.updateSel(),a!=((n=r.open)===null||n===void 0?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!a)}}updateTooltipClass(e){let n=this.tooltipClass(e);if(n!=this.currentClass){for(let i of this.currentClass.split(" "))i&&this.dom.classList.remove(i);for(let i of n.split(" "))i&&this.dom.classList.add(i);this.currentClass=n}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),n=e.open;if((n.selected>-1&&n.selected=this.range.to)&&(this.range=zy(n.options.length,n.selected,this.view.state.facet(Cn).maxRenderedOptions),this.showOptions(n.options,e.id)),this.updateSelectedOption(n.selected)){this.destroyInfo();let{completion:i}=n.options[n.selected],{info:r}=i;if(!r)return;let o=typeof r=="string"?document.createTextNode(r):r(i);if(!o)return;"then"in o?o.then(s=>{s&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(s,i)}).catch(s=>gi(this.view.state,s,"completion info")):this.addInfoPane(o,i)}}addInfoPane(e,n){this.destroyInfo();let i=this.info=document.createElement("div");if(i.className="cm-tooltip cm-completionInfo",e.nodeType!=null)i.appendChild(e),this.infoDestroy=null;else{let{dom:r,destroy:o}=e;i.appendChild(r),this.infoDestroy=o||null}this.dom.appendChild(i),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let n=null;for(let i=this.list.firstChild,r=this.range.from;i;i=i.nextSibling,r++)i.nodeName!="LI"||!i.id?r--:r==e?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),n=i):i.hasAttribute("aria-selected")&&i.removeAttribute("aria-selected");return n&&Kte(this.list,n),n}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let n=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),o=this.space;if(!o){let s=this.dom.ownerDocument.defaultView||window;o={left:0,top:0,right:s.innerWidth,bottom:s.innerHeight}}return r.top>Math.min(o.bottom,n.bottom)-10||r.bottomi.from||i.from==0))if(o=h,typeof u!="string"&&u.header)r.appendChild(u.header(u));else{let p=r.appendChild(document.createElement("completion-section"));p.textContent=h}}const c=r.appendChild(document.createElement("li"));c.id=n+"-"+s,c.setAttribute("role","option");let d=this.optionClass(a);d&&(c.className=d);for(let h of this.optionContent){let p=h(a,this.view.state,this.view,l);p&&c.appendChild(p)}}return i.from&&r.classList.add("cm-completionListIncompleteTop"),i.tonew Yte(n,t,e)}function Kte(t,e){let n=t.getBoundingClientRect(),i=e.getBoundingClientRect(),r=n.height/t.offsetHeight;i.topn.bottom&&(t.scrollTop+=(i.bottom-n.bottom)/r)}function aR(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function Jte(t,e){let n=[],i=null,r=u=>{n.push(u);let{section:c}=u.completion;if(c){i||(i=[]);let d=typeof c=="string"?c:c.name;i.some(h=>h.name==d)||i.push(typeof c=="string"?{name:d}:c)}},o=e.facet(Cn);for(let u of t)if(u.hasResult()){let c=u.result.getMatch;if(u.result.filter===!1)for(let d of u.result.options)r(new rR(d,u.source,c?c(d):[],1e9-n.length));else{let d=e.sliceDoc(u.from,u.to),h,p=o.filterStrict?new Xte(d):new jte(d);for(let m of u.result.options)if(h=p.match(m.label)){let O=m.displayLabel?c?c(m,h.matched):[]:h.matched;r(new rR(m,u.source,O,h.score+(m.boost||0)))}}}if(i){let u=Object.create(null),c=0,d=(h,p)=>{var m,O;return((m=h.rank)!==null&&m!==void 0?m:1e9)-((O=p.rank)!==null&&O!==void 0?O:1e9)||(h.named.score-c.score||l(c.completion,d.completion))){let c=u.completion;!a||a.label!=c.label||a.detail!=c.detail||a.type!=null&&c.type!=null&&a.type!=c.type||a.apply!=c.apply||a.boost!=c.boost?s.push(u):aR(u.completion)>aR(a)&&(s[s.length-1]=u),a=u.completion}return s}class Mc{constructor(e,n,i,r,o,s){this.options=e,this.attrs=n,this.tooltip=i,this.timestamp=r,this.selected=o,this.disabled=s}setSelected(e,n){return e==this.selected||e>=this.options.length?this:new Mc(this.options,lR(n,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,n,i,r,o){let s=Jte(e,n);if(!s.length)return r&&e.some(l=>l.state==1)?new Mc(r.options,r.attrs,r.tooltip,r.timestamp,r.selected,!0):null;let a=n.facet(Cn).selectOnOpen?0:-1;if(r&&r.selected!=a&&r.selected!=-1){let l=r.options[r.selected].completion;for(let u=0;uu.hasResult()?Math.min(l,u.from):l,1e8),create:rne,above:o.aboveCursor},r?r.timestamp:Date.now(),a,!1)}map(e){return new Mc(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class q0{constructor(e,n,i){this.active=e,this.id=n,this.open=i}static start(){return new q0(nne,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:n}=e,i=n.facet(Cn),o=(i.override||n.languageDataAt("autocomplete",sa(n)).map(Vte)).map(a=>(this.active.find(u=>u.source==a)||new Gn(a,this.active.some(u=>u.state!=0)?1:0)).update(e,i));o.length==this.active.length&&o.every((a,l)=>a==this.active[l])&&(o=this.active);let s=this.open;s&&e.docChanged&&(s=s.map(e.changes)),e.selection||o.some(a=>a.hasResult()&&e.changes.touchesRange(a.from,a.to))||!ene(o,this.active)?s=Mc.build(o,n,this.id,s,i):s&&s.disabled&&!o.some(a=>a.state==1)&&(s=null),!s&&o.every(a=>a.state!=1)&&o.some(a=>a.hasResult())&&(o=o.map(a=>a.hasResult()?new Gn(a.source,0):a));for(let a of e.effects)a.is(u4)&&(s=s&&s.setSelected(a.value,this.id));return o==this.active&&s==this.open?this:new q0(o,this.id,s)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:tne}}function ene(t,e){if(t==e)return!0;for(let n=0,i=0;;){for(;n-1&&(n["aria-activedescendant"]=t+"-"+e),n}const nne=[];function BS(t,e){if(t.isUserEvent("input.complete")){let n=t.annotation(yx);if(n&&e.activateOnCompletion(n))return"input"}return t.isUserEvent("input.type")?"input":t.isUserEvent("delete.backward")?"delete":null}class Gn{constructor(e,n,i=-1){this.source=e,this.state=n,this.explicitPos=i}hasResult(){return!1}update(e,n){let i=BS(e,n),r=this;i?r=r.handleUserEvent(e,i,n):e.docChanged?r=r.handleChange(e):e.selection&&r.state!=0&&(r=new Gn(r.source,0));for(let o of e.effects)if(o.is(Z0))r=new Gn(r.source,1,o.value?sa(e.state):-1);else if(o.is(sp))r=new Gn(r.source,0);else if(o.is(l4))for(let s of o.value)s.source==r.source&&(r=s);return r}handleUserEvent(e,n,i){return n=="delete"||!i.activateOnTyping?this.map(e.changes):new Gn(this.source,1)}handleChange(e){return e.changes.touchesRange(sa(e.startState))?new Gn(this.source,0):this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new Gn(this.source,this.state,e.mapPos(this.explicitPos))}}class Kc extends Gn{constructor(e,n,i,r,o){super(e,2,n),this.result=i,this.from=r,this.to=o}hasResult(){return!0}handleUserEvent(e,n,i){var r;let o=this.result;o.map&&!e.changes.empty&&(o=o.map(o,e.changes));let s=e.changes.mapPos(this.from),a=e.changes.mapPos(this.to,1),l=sa(e.state);if((this.explicitPos<0?l<=s:la||!o||n=="delete"&&sa(e.startState)==this.from)return new Gn(this.source,n=="input"&&i.activateOnTyping?1:0);let u=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos);return ine(o.validFor,e.state,s,a)?new Kc(this.source,u,o,s,a):o.update&&(o=o.update(o,s,a,new bx(e.state,l,u>=0)))?new Kc(this.source,u,o,o.from,(r=o.to)!==null&&r!==void 0?r:sa(e.state)):new Gn(this.source,1,u)}handleChange(e){return e.changes.touchesRange(this.from,this.to)?new Gn(this.source,0):this.map(e.changes)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new Kc(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new Gn(this.source,0)}}function ine(t,e,n,i){if(!t)return!1;let r=e.sliceDoc(n,i);return typeof t=="function"?t(r,n,i,e):a4(t,!0).test(r)}const l4=De.define({map(t,e){return t.map(n=>n.map(e))}}),u4=De.define(),pi=On.define({create(){return q0.start()},update(t,e){return t.update(e)},provide:t=>[ux.from(t,e=>e.tooltip),ue.contentAttributes.from(t,e=>e.attrs)]});function vx(t,e){const n=e.completion.apply||e.completion.label;let i=t.state.field(pi).active.find(r=>r.source==e.source);return i instanceof Kc?(typeof n=="string"?t.dispatch(Object.assign(Object.assign({},Wte(t.state,n,i.from,i.to)),{annotations:yx.of(e.completion)})):n(t,e.completion,i.from,i.to),!0):!1}const rne=Gte(pi,vx);function Gm(t,e="option"){return n=>{let i=n.state.field(pi,!1);if(!i||!i.open||i.open.disabled||Date.now()-i.open.timestamp-1?i.open.selected+r*(t?1:-1):t?0:s-1;return a<0?a=e=="page"?0:s-1:a>=s&&(a=e=="page"?s-1:0),n.dispatch({effects:u4.of(a)}),!0}}const one=t=>{let e=t.state.field(pi,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestampt.state.field(pi,!1)?(t.dispatch({effects:Z0.of(!0)}),!0):!1,ane=t=>{let e=t.state.field(pi,!1);return!e||!e.active.some(n=>n.state!=0)?!1:(t.dispatch({effects:sp.of(null)}),!0)};class lne{constructor(e,n){this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const une=50,cne=1e3,dne=en.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(pi).active)e.state==1&&this.startQuery(e)}update(t){let e=t.state.field(pi),n=t.state.facet(Cn);if(!t.selectionSet&&!t.docChanged&&t.startState.field(pi)==e)return;let i=t.transactions.some(o=>(o.selection||o.docChanged)&&!BS(o,n));for(let o=0;oune&&Date.now()-s.time>cne){for(let a of s.context.abortListeners)try{a()}catch(l){gi(this.view.state,l)}s.context.abortListeners=null,this.running.splice(o--,1)}else s.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some(o=>o.effects.some(s=>s.is(Z0)))&&(this.pendingStart=!0);let r=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(o=>o.state==1&&!this.running.some(s=>s.active.source==o.source))?setTimeout(()=>this.startUpdate(),r):-1,this.composing!=0)for(let o of t.transactions)BS(o,n)=="input"?this.composing=2:this.composing==2&&o.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(pi);for(let n of e.active)n.state==1&&!this.running.some(i=>i.active.source==n.source)&&this.startQuery(n)}startQuery(t){let{state:e}=this.view,n=sa(e),i=new bx(e,n,t.explicitPos==n),r=new lne(t,i);this.running.push(r),Promise.resolve(t.source(i)).then(o=>{r.context.aborted||(r.done=o||null,this.scheduleAccept())},o=>{this.view.dispatch({effects:sp.of(null)}),gi(this.view.state,o)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Cn).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(Cn);for(let i=0;is.source==r.active.source);if(o&&o.state==1)if(r.done==null){let s=new Gn(r.active.source,0);for(let a of r.updates)s=s.update(a,n);s.state!=1&&e.push(s)}else this.startQuery(o)}e.length&&this.view.dispatch({effects:l4.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(pi,!1);if(e&&e.tooltip&&this.view.state.facet(Cn).closeOnBlur){let n=e.open&&_D(this.view,e.open.tooltip);(!n||!n.dom.contains(t.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:sp.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:Z0.of(!1)}),20),this.composing=0}}}),hne=typeof navigator=="object"&&/Win/.test(navigator.platform),fne=ds.highest(ue.domEventHandlers({keydown(t,e){let n=e.state.field(pi,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||t.key.length>1||t.ctrlKey&&!(hne&&t.altKey)||t.metaKey)return!1;let i=n.open.options[n.open.selected],r=n.active.find(s=>s.source==i.source),o=i.completion.commitCharacters||r.result.commitCharacters;return o&&o.indexOf(t.key)>-1&&vx(e,i),!1}})),c4=ue.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class pne{constructor(e,n,i,r){this.field=e,this.line=n,this.from=i,this.to=r}}class Sx{constructor(e,n,i){this.field=e,this.from=n,this.to=i}map(e){let n=e.mapPos(this.from,-1,En.TrackDel),i=e.mapPos(this.to,1,En.TrackDel);return n==null||i==null?null:new Sx(this.field,n,i)}}class wx{constructor(e,n){this.lines=e,this.fieldPositions=n}instantiate(e,n){let i=[],r=[n],o=e.doc.lineAt(n),s=/^\s*/.exec(o.text)[0];for(let l of this.lines){if(i.length){let u=s,c=/^\t*/.exec(l)[0].length;for(let d=0;dnew Sx(l.field,r[l.line]+l.from,r[l.line]+l.to));return{text:i,ranges:a}}static parse(e){let n=[],i=[],r=[],o;for(let s of e.split(/\r\n?|\n/)){for(;o=/[#$]\{(?:(\d+)(?::([^}]*))?|([^}]*))\}/.exec(s);){let a=o[1]?+o[1]:null,l=o[2]||o[3]||"",u=-1;for(let c=0;c=u&&d.field++}r.push(new pne(u,i.length,o.index,o.index+l.length)),s=s.slice(0,o.index)+l+s.slice(o.index+o[0].length)}for(let a;a=/\\([{}])/.exec(s);){s=s.slice(0,a.index)+a[1]+s.slice(a.index+a[0].length);for(let l of r)l.line==i.length&&l.from>a.index&&(l.from--,l.to--)}i.push(s)}return new wx(i,r)}}let mne=Ce.widget({widget:new class extends fs{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),gne=Ce.mark({class:"cm-snippetField"});class Kd{constructor(e,n){this.ranges=e,this.active=n,this.deco=Ce.set(e.map(i=>(i.from==i.to?mne:gne).range(i.from,i.to)))}map(e){let n=[];for(let i of this.ranges){let r=i.map(e);if(!r)return null;n.push(r)}return new Kd(n,this.active)}selectionInsideField(e){return e.ranges.every(n=>this.ranges.some(i=>i.field==this.active&&i.from<=n.from&&i.to>=n.to))}}const Dp=De.define({map(t,e){return t&&t.map(e)}}),One=De.define(),ap=On.define({create(){return null},update(t,e){for(let n of e.effects){if(n.is(Dp))return n.value;if(n.is(One)&&t)return new Kd(t.ranges,n.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>ue.decorations.from(t,e=>e?e.deco:Ce.none)});function kx(t,e){return q.create(t.filter(n=>n.field==e).map(n=>q.range(n.from,n.to)))}function bne(t){let e=wx.parse(t);return(n,i,r,o)=>{let{text:s,ranges:a}=e.instantiate(n.state,r),l={changes:{from:r,to:o,insert:ot.of(s)},scrollIntoView:!0,annotations:i?[yx.of(i),Jt.userEvent.of("input.complete")]:void 0};if(a.length&&(l.selection=kx(a,0)),a.some(u=>u.field>0)){let u=new Kd(a,0),c=l.effects=[Dp.of(u)];n.state.field(ap,!1)===void 0&&c.push(De.appendConfig.of([ap,kne,xne,c4]))}n.dispatch(n.state.update(l))}}function d4(t){return({state:e,dispatch:n})=>{let i=e.field(ap,!1);if(!i||t<0&&i.active==0)return!1;let r=i.active+t,o=t>0&&!i.ranges.some(s=>s.field==r+t);return n(e.update({selection:kx(i.ranges,r),effects:Dp.of(o?null:new Kd(i.ranges,r)),scrollIntoView:!0})),!0}}const yne=({state:t,dispatch:e})=>t.field(ap,!1)?(e(t.update({effects:Dp.of(null)})),!0):!1,vne=d4(1),Sne=d4(-1),wne=[{key:"Tab",run:vne,shift:Sne},{key:"Escape",run:yne}],uR=he.define({combine(t){return t.length?t[0]:wne}}),kne=ds.highest(Ip.compute([uR],t=>t.facet(uR)));function di(t,e){return Object.assign(Object.assign({},e),{apply:bne(t)})}const xne=ue.domEventHandlers({mousedown(t,e){let n=e.state.field(ap,!1),i;if(!n||(i=e.posAtCoords({x:t.clientX,y:t.clientY}))==null)return!1;let r=n.ranges.find(o=>o.from<=i&&o.to>=i);return!r||r.field==n.active?!1:(e.dispatch({selection:kx(n.ranges,r.field),effects:Dp.of(n.ranges.some(o=>o.field>r.field)?new Kd(n.ranges,r.field):null),scrollIntoView:!0}),!0)}}),lp={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Wl=De.define({map(t,e){let n=e.mapPos(t,-1,En.TrackAfter);return n??void 0}}),xx=new class extends ou{};xx.startSide=1;xx.endSide=-1;const h4=On.define({create(){return tt.empty},update(t,e){if(t=t.map(e.changes),e.selection){let n=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:i=>i>=n.from&&i<=n.to})}for(let n of e.effects)n.is(Wl)&&(t=t.update({add:[xx.range(n.value,n.value+1)]}));return t}});function _ne(){return[Cne,h4]}const Hy="()[]{}<>";function f4(t){for(let e=0;e{if((Ene?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let r=t.state.selection.main;if(i.length>2||i.length==2&&ir(xn(i,0))==1||e!=r.from||n!=r.to)return!1;let o=Ane(t.state,i);return o?(t.dispatch(o),!0):!1}),Tne=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=p4(t,t.selection.main.head).brackets||lp.brackets,r=null,o=t.changeByRange(s=>{if(s.empty){let a=Rne(t.doc,s.head);for(let l of i)if(l==a&&fb(t.doc,s.head)==f4(xn(l,0)))return{changes:{from:s.head-l.length,to:s.head+l.length},range:q.cursor(s.head-l.length)}}return{range:r=s}});return r||e(t.update(o,{scrollIntoView:!0,userEvent:"delete.backward"})),!r},Pne=[{key:"Backspace",run:Tne}];function Ane(t,e){let n=p4(t,t.selection.main.head),i=n.brackets||lp.brackets;for(let r of i){let o=f4(xn(r,0));if(e==r)return o==r?Lne(t,r,i.indexOf(r+r+r)>-1,n):Ine(t,r,o,n.before||lp.before);if(e==o&&m4(t,t.selection.main.from))return $ne(t,r,o)}return null}function m4(t,e){let n=!1;return t.field(h4).between(0,t.doc.length,i=>{i==e&&(n=!0)}),n}function fb(t,e){let n=t.sliceString(e,e+2);return n.slice(0,ir(xn(n,0)))}function Rne(t,e){let n=t.sliceString(e-2,e);return ir(xn(n,0))==n.length?n:n.slice(1)}function Ine(t,e,n,i){let r=null,o=t.changeByRange(s=>{if(!s.empty)return{changes:[{insert:e,from:s.from},{insert:n,from:s.to}],effects:Wl.of(s.to+e.length),range:q.range(s.anchor+e.length,s.head+e.length)};let a=fb(t.doc,s.head);return!a||/\s/.test(a)||i.indexOf(a)>-1?{changes:{insert:e+n,from:s.head},effects:Wl.of(s.head+e.length),range:q.cursor(s.head+e.length)}:{range:r=s}});return r?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function $ne(t,e,n){let i=null,r=t.changeByRange(o=>o.empty&&fb(t.doc,o.head)==n?{changes:{from:o.head,to:o.head+n.length,insert:n},range:q.cursor(o.head+n.length)}:i={range:o});return i?null:t.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function Lne(t,e,n,i){let r=i.stringPrefixes||lp.stringPrefixes,o=null,s=t.changeByRange(a=>{if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:e,from:a.to}],effects:Wl.of(a.to+e.length),range:q.range(a.anchor+e.length,a.head+e.length)};let l=a.head,u=fb(t.doc,l),c;if(u==e){if(cR(t,l))return{changes:{insert:e+e,from:l},effects:Wl.of(l+e.length),range:q.cursor(l+e.length)};if(m4(t,l)){let h=n&&t.sliceDoc(l,l+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:l,to:l+h.length,insert:h},range:q.cursor(l+h.length)}}}else{if(n&&t.sliceDoc(l-2*e.length,l)==e+e&&(c=dR(t,l-2*e.length,r))>-1&&cR(t,c))return{changes:{insert:e+e+e+e,from:l},effects:Wl.of(l+e.length),range:q.cursor(l+e.length)};if(t.charCategorizer(l)(u)!=Rt.Word&&dR(t,l,r)>-1&&!Nne(t,l,e,r))return{changes:{insert:e+e,from:l},effects:Wl.of(l+e.length),range:q.cursor(l+e.length)}}return{range:o=a}});return o?null:t.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function cR(t,e){let n=gt(t).resolveInner(e+1);return n.parent&&n.from==e}function Nne(t,e,n,i){let r=gt(t).resolveInner(e,-1),o=i.reduce((s,a)=>Math.max(s,a.length),0);for(let s=0;s<5;s++){let a=t.sliceDoc(r.from,Math.min(r.to,r.from+n.length+o)),l=a.indexOf(n);if(!l||l>-1&&i.indexOf(a.slice(0,l))>-1){let c=r.firstChild;for(;c&&c.from==r.from&&c.to-c.from>n.length+l;){if(t.sliceDoc(c.to-n.length,c.to)==n)return!1;c=c.firstChild}return!0}let u=r.to==e&&r.parent;if(!u)break;r=u}return!1}function dR(t,e,n){let i=t.charCategorizer(e);if(i(t.sliceDoc(e-1,e))!=Rt.Word)return e;for(let r of n){let o=e-r.length;if(t.sliceDoc(o,e)==r&&i(t.sliceDoc(o-1,o))!=Rt.Word)return o}return-1}function Mne(t={}){return[fne,pi,Cn.of(t),dne,Dne,c4]}const g4=[{key:"Ctrl-Space",run:sne},{key:"Escape",run:ane},{key:"ArrowDown",run:Gm(!0)},{key:"ArrowUp",run:Gm(!1)},{key:"PageDown",run:Gm(!0,"page")},{key:"PageUp",run:Gm(!1,"page")},{key:"Enter",run:one}],Dne=ds.highest(Ip.computeN([Cn],t=>t.facet(Cn).defaultKeymap?[g4]:[]));function bt(){var t=arguments[0];typeof t=="string"&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&typeof n=="object"&&n.nodeType==null&&!Array.isArray(n)){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var r=n[i];typeof r=="string"?t.setAttribute(i,r):r!=null&&(t[i]=r)}e++}for(;et.normalize("NFKD"):t=>t;class Od{constructor(e,n,i=0,r=e.length,o,s){this.test=s,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(i,r),this.bufferStart=i,this.normalize=o?a=>o(hR(a)):hR,this.query=this.normalize(n)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return xn(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let n=Gk(e),i=this.bufferStart+this.bufferPos;this.bufferPos+=ir(e);let r=this.normalize(n);for(let o=0,s=i;;o++){let a=r.charCodeAt(o),l=this.match(a,s,this.bufferPos+this.bufferStart);if(o==r.length-1){if(l)return this.value=l,this;break}s==i&&othis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let i=this.curLineStart+n.index,r=i+n[0].length;if(this.matchPos=Y0(this.text,r+(i==r?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(ithis.value.to)&&(!this.test||this.test(i,r,n)))return this.value={from:i,to:r,match:n},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=i||r.to<=n){let a=new Jc(n,e.sliceString(n,i));return Uy.set(e,a),a}if(r.from==n&&r.to==i)return r;let{text:o,from:s}=r;return s>n&&(o=e.sliceString(n,s)+o,s=n),r.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==e&&(this.re.lastIndex=e+1,n=this.re.exec(this.flat.text)),n){let i=this.flat.from+n.index,r=i+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(i,r,n)))return this.value={from:i,to:r,match:n},this.matchPos=Y0(this.text,r+(i==r?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Jc.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(y4.prototype[Symbol.iterator]=v4.prototype[Symbol.iterator]=function(){return this});function Bne(t){try{return new RegExp(t,_x),!0}catch{return!1}}function Y0(t,e){if(e>=t.length)return e;let n=t.lineAt(e),i;for(;e=56320&&i<57344;)e++;return e}function QS(t){let e=String(t.state.doc.lineAt(t.state.selection.main.head).number),n=bt("input",{class:"cm-textfield",name:"line",value:e}),i=bt("form",{class:"cm-gotoLine",onkeydown:o=>{o.keyCode==27?(o.preventDefault(),t.dispatch({effects:G0.of(!1)}),t.focus()):o.keyCode==13&&(o.preventDefault(),r())},onsubmit:o=>{o.preventDefault(),r()}},bt("label",t.state.phrase("Go to line"),": ",n)," ",bt("button",{class:"cm-button",type:"submit"},t.state.phrase("go")));function r(){let o=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);if(!o)return;let{state:s}=t,a=s.doc.lineAt(s.selection.main.head),[,l,u,c,d]=o,h=c?+c.slice(1):0,p=u?+u:a.number;if(u&&d){let y=p/100;l&&(y=y*(l=="-"?-1:1)+a.number/s.doc.lines),p=Math.round(s.doc.lines*y)}else u&&l&&(p=p*(l=="-"?-1:1)+a.number);let m=s.doc.line(Math.max(1,Math.min(s.doc.lines,p))),O=q.cursor(m.from+Math.max(0,Math.min(h,m.length)));t.dispatch({effects:[G0.of(!1),ue.scrollIntoView(O.from,{y:"center"})],selection:O}),t.focus()}return{dom:i}}const G0=De.define(),fR=On.define({create(){return!0},update(t,e){for(let n of e.effects)n.is(G0)&&(t=n.value);return t},provide:t=>np.from(t,e=>e?QS:null)}),Qne=t=>{let e=tp(t,QS);if(!e){let n=[G0.of(!0)];t.state.field(fR,!1)==null&&n.push(De.appendConfig.of([fR,Fne])),t.dispatch({effects:n}),e=tp(t,QS)}return e&&e.dom.querySelector("input").select(),!0},Fne=ue.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),zne={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},Hne=he.define({combine(t){return Eo(t,zne,{highlightWordAroundCursor:(e,n)=>e||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function Une(t){return[Zne,Xne]}const Wne=Ce.mark({class:"cm-selectionMatch"}),Vne=Ce.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function pR(t,e,n,i){return(n==0||t(e.sliceDoc(n-1,n))!=Rt.Word)&&(i==e.doc.length||t(e.sliceDoc(i,i+1))!=Rt.Word)}function jne(t,e,n,i){return t(e.sliceDoc(n,n+1))==Rt.Word&&t(e.sliceDoc(i-1,i))==Rt.Word}const Xne=en.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(Hne),{state:n}=t,i=n.selection;if(i.ranges.length>1)return Ce.none;let r=i.main,o,s=null;if(r.empty){if(!e.highlightWordAroundCursor)return Ce.none;let l=n.wordAt(r.head);if(!l)return Ce.none;s=n.charCategorizer(r.head),o=n.sliceDoc(l.from,l.to)}else{let l=r.to-r.from;if(l200)return Ce.none;if(e.wholeWords){if(o=n.sliceDoc(r.from,r.to),s=n.charCategorizer(r.head),!(pR(s,n,r.from,r.to)&&jne(s,n,r.from,r.to)))return Ce.none}else if(o=n.sliceDoc(r.from,r.to),!o)return Ce.none}let a=[];for(let l of t.visibleRanges){let u=new Od(n.doc,o,l.from,l.to);for(;!u.next().done;){let{from:c,to:d}=u.value;if((!s||pR(s,n,c,d))&&(r.empty&&c<=r.from&&d>=r.to?a.push(Vne.range(c,d)):(c>=r.to||d<=r.from)&&a.push(Wne.range(c,d)),a.length>e.maxMatches))return Ce.none}}return Ce.set(a)}},{decorations:t=>t.decorations}),Zne=ue.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),qne=({state:t,dispatch:e})=>{let{selection:n}=t,i=q.create(n.ranges.map(r=>t.wordAt(r.head)||q.cursor(r.head)),n.mainIndex);return i.eq(n)?!1:(e(t.update({selection:i})),!0)};function Yne(t,e){let{main:n,ranges:i}=t.selection,r=t.wordAt(n.head),o=r&&r.from==n.from&&r.to==n.to;for(let s=!1,a=new Od(t.doc,e,i[i.length-1].to);;)if(a.next(),a.done){if(s)return null;a=new Od(t.doc,e,0,Math.max(0,i[i.length-1].from-1)),s=!0}else{if(s&&i.some(l=>l.from==a.value.from))continue;if(o){let l=t.wordAt(a.value.from);if(!l||l.from!=a.value.from||l.to!=a.value.to)continue}return a.value}}const Gne=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(o=>o.from===o.to))return qne({state:t,dispatch:e});let i=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(o=>t.sliceDoc(o.from,o.to)!=i))return!1;let r=Yne(t,i);return r?(e(t.update({selection:t.selection.addRange(q.range(r.from,r.to),!1),effects:ue.scrollIntoView(r.to)})),!0):!1},Iu=he.define({combine(t){return Eo(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new cie(e),scrollToMatch:e=>ue.scrollIntoView(e)})}});function Kne(t){return t?[Iu.of(t),zS]:zS}class Ex{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||Bne(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(n,i)=>i=="n"?` -`:i=="r"?"\r":i=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new nie(this):new eie(this)}getCursor(e,n=0,i){let r=e.doc?e:Ve.create({doc:e});return i==null&&(i=r.doc.length),this.regexp?Oc(this,r,n,i):gc(this,r,n,i)}}class S4{constructor(e){this.spec=e}}function gc(t,e,n,i){return new Od(e.doc,t.unquoted,n,i,t.caseSensitive?void 0:r=>r.toLowerCase(),t.wholeWord?Jne(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function Jne(t,e){return(n,i,r,o)=>((o>n||o+r.length=n)return null;r.push(i.value)}return r}highlight(e,n,i,r){let o=gc(this.spec,e,Math.max(0,n-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,e.doc.length));for(;!o.next().done;)r(o.value.from,o.value.to)}}function Oc(t,e,n,i){return new y4(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?tie(e.charCategorizer(e.selection.main.head)):void 0},n,i)}function K0(t,e){return t.slice(Tn(t,e,!1),e)}function J0(t,e){return t.slice(e,Tn(t,e))}function tie(t){return(e,n,i)=>!i[0].length||(t(K0(i.input,i.index))!=Rt.Word||t(J0(i.input,i.index))!=Rt.Word)&&(t(J0(i.input,i.index+i[0].length))!=Rt.Word||t(K0(i.input,i.index+i[0].length))!=Rt.Word)}class nie extends S4{nextMatch(e,n,i){let r=Oc(this.spec,e,i,e.doc.length).next();return r.done&&(r=Oc(this.spec,e,0,n).next()),r.done?null:r.value}prevMatchInRange(e,n,i){for(let r=1;;r++){let o=Math.max(n,i-r*1e4),s=Oc(this.spec,e,o,i),a=null;for(;!s.next().done;)a=s.value;if(a&&(o==n||a.from>o+10))return a;if(o==n)return null}}prevMatch(e,n,i){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,i,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,(n,i)=>i=="$"?"$":i=="&"?e.match[0]:i!="0"&&+i=n)return null;r.push(i.value)}return r}highlight(e,n,i,r){let o=Oc(this.spec,e,Math.max(0,n-250),Math.min(i+250,e.doc.length));for(;!o.next().done;)r(o.value.from,o.value.to)}}const bd=De.define(),Cx=De.define(),aa=On.define({create(t){return new Wy(FS(t).create(),null)},update(t,e){for(let n of e.effects)n.is(bd)?t=new Wy(n.value.create(),t.panel):n.is(Cx)&&(t=new Wy(t.query,n.value?Tx:null));return t},provide:t=>np.from(t,e=>e.panel)});class Wy{constructor(e,n){this.query=e,this.panel=n}}const iie=Ce.mark({class:"cm-searchMatch"}),rie=Ce.mark({class:"cm-searchMatch cm-searchMatch-selected"}),oie=en.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(aa))}update(t){let e=t.state.field(aa);(e!=t.startState.field(aa)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return Ce.none;let{view:n}=this,i=new da;for(let r=0,o=n.visibleRanges,s=o.length;ro[r+1].from-2*250;)l=o[++r].to;t.highlight(n.state,a,l,(u,c)=>{let d=n.state.selection.ranges.some(h=>h.from==u&&h.to==c);i.add(u,c,d?rie:iie)})}return i.finish()}},{decorations:t=>t.decorations});function Bp(t){return e=>{let n=e.state.field(aa,!1);return n&&n.query.spec.valid?t(e,n):x4(e)}}const up=Bp((t,{query:e})=>{let{to:n}=t.state.selection.main,i=e.nextMatch(t.state,n,n);if(!i)return!1;let r=q.single(i.from,i.to),o=t.state.facet(Iu);return t.dispatch({selection:r,effects:[Ax(t,i),o.scrollToMatch(r.main,t)],userEvent:"select.search"}),k4(t),!0}),cp=Bp((t,{query:e})=>{let{state:n}=t,{from:i}=n.selection.main,r=e.prevMatch(n,i,i);if(!r)return!1;let o=q.single(r.from,r.to),s=t.state.facet(Iu);return t.dispatch({selection:o,effects:[Ax(t,r),s.scrollToMatch(o.main,t)],userEvent:"select.search"}),k4(t),!0}),sie=Bp((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:q.create(n.map(i=>q.range(i.from,i.to))),userEvent:"select.search.matches"}),!0)}),aie=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:i,to:r}=n.main,o=[],s=0;for(let a=new Od(t.doc,t.sliceDoc(i,r));!a.next().done;){if(o.length>1e3)return!1;a.value.from==i&&(s=o.length),o.push(q.range(a.value.from,a.value.to))}return e(t.update({selection:q.create(o,s),userEvent:"select.search.matches"})),!0},mR=Bp((t,{query:e})=>{let{state:n}=t,{from:i,to:r}=n.selection.main;if(n.readOnly)return!1;let o=e.nextMatch(n,i,i);if(!o)return!1;let s=[],a,l,u=[];if(o.from==i&&o.to==r&&(l=n.toText(e.getReplacement(o)),s.push({from:o.from,to:o.to,insert:l}),o=e.nextMatch(n,o.from,o.to),u.push(ue.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(i).number)+"."))),o){let c=s.length==0||s[0].from>=o.to?0:o.to-o.from-l.length;a=q.single(o.from-c,o.to-c),u.push(Ax(t,o)),u.push(n.facet(Iu).scrollToMatch(a.main,t))}return t.dispatch({changes:s,selection:a,effects:u,userEvent:"input.replace"}),!0}),lie=Bp((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map(r=>{let{from:o,to:s}=r;return{from:o,to:s,insert:e.getReplacement(r)}});if(!n.length)return!1;let i=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:ue.announce.of(i),userEvent:"input.replace.all"}),!0});function Tx(t){return t.state.facet(Iu).createPanel(t)}function FS(t,e){var n,i,r,o,s;let a=t.selection.main,l=a.empty||a.to>a.from+100?"":t.sliceDoc(a.from,a.to);if(e&&!l)return e;let u=t.facet(Iu);return new Ex({search:((n=e==null?void 0:e.literal)!==null&&n!==void 0?n:u.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:(i=e==null?void 0:e.caseSensitive)!==null&&i!==void 0?i:u.caseSensitive,literal:(r=e==null?void 0:e.literal)!==null&&r!==void 0?r:u.literal,regexp:(o=e==null?void 0:e.regexp)!==null&&o!==void 0?o:u.regexp,wholeWord:(s=e==null?void 0:e.wholeWord)!==null&&s!==void 0?s:u.wholeWord})}function w4(t){let e=tp(t,Tx);return e&&e.dom.querySelector("[main-field]")}function k4(t){let e=w4(t);e&&e==t.root.activeElement&&e.select()}const x4=t=>{let e=t.state.field(aa,!1);if(e&&e.panel){let n=w4(t);if(n&&n!=t.root.activeElement){let i=FS(t.state,e.query.spec);i.valid&&t.dispatch({effects:bd.of(i)}),n.focus(),n.select()}}else t.dispatch({effects:[Cx.of(!0),e?bd.of(FS(t.state,e.query.spec)):De.appendConfig.of(zS)]});return!0},Px=t=>{let e=t.state.field(aa,!1);if(!e||!e.panel)return!1;let n=tp(t,Tx);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:Cx.of(!1)}),!0},uie=[{key:"Mod-f",run:x4,scope:"editor search-panel"},{key:"F3",run:up,shift:cp,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:up,shift:cp,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:Px,scope:"editor search-panel"},{key:"Mod-Shift-l",run:aie},{key:"Mod-Alt-g",run:Qne},{key:"Mod-d",run:Gne,preventDefault:!0}];let cie=class{constructor(e){this.view=e;let n=this.query=e.state.field(aa).query.spec;this.commit=this.commit.bind(this),this.searchField=bt("input",{value:n.search,placeholder:_i(e,"Find"),"aria-label":_i(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=bt("input",{value:n.replace,placeholder:_i(e,"Replace"),"aria-label":_i(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=bt("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=bt("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=bt("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function i(r,o,s){return bt("button",{class:"cm-button",name:r,onclick:o,type:"button"},s)}this.dom=bt("div",{onkeydown:r=>this.keydown(r),class:"cm-search"},[this.searchField,i("next",()=>up(e),[_i(e,"next")]),i("prev",()=>cp(e),[_i(e,"previous")]),i("select",()=>sie(e),[_i(e,"all")]),bt("label",null,[this.caseField,_i(e,"match case")]),bt("label",null,[this.reField,_i(e,"regexp")]),bt("label",null,[this.wordField,_i(e,"by word")]),...e.state.readOnly?[]:[bt("br"),this.replaceField,i("replace",()=>mR(e),[_i(e,"replace")]),i("replaceAll",()=>lie(e),[_i(e,"replace all")])],bt("button",{name:"close",onclick:()=>Px(e),"aria-label":_i(e,"close"),type:"button"},["×"])])}commit(){let e=new Ex({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:bd.of(e)}))}keydown(e){RJ(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?cp:up)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),mR(this.view))}update(e){for(let n of e.transactions)for(let i of n.effects)i.is(bd)&&!i.value.eq(this.query)&&this.setQuery(i.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(Iu).top}};function _i(t,e){return t.state.phrase(e)}const Km=30,Jm=/[\s\.,:;?!]/;function Ax(t,{from:e,to:n}){let i=t.state.doc.lineAt(e),r=t.state.doc.lineAt(n).to,o=Math.max(i.from,e-Km),s=Math.min(r,n+Km),a=t.state.sliceDoc(o,s);if(o!=i.from){for(let l=0;la.length-Km;l--)if(!Jm.test(a[l-1])&&Jm.test(a[l])){a=a.slice(0,l);break}}return ue.announce.of(`${t.state.phrase("current match")}. ${a} ${t.state.phrase("on line")} ${i.number}.`)}const die=ue.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),zS=[aa,ds.low(oie),die],hie=t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),i=Ix(t.state,n.from);return i.line?fie(t):i.block?mie(t):!1};function Rx(t,e){return({state:n,dispatch:i})=>{if(n.readOnly)return!1;let r=t(e,n);return r?(i(n.update(r)),!0):!1}}const fie=Rx(bie,0),pie=Rx(_4,0),mie=Rx((t,e)=>_4(t,e,Oie(e)),0);function Ix(t,e){let n=t.languageDataAt("commentTokens",e);return n.length?n[0]:{}}const Ih=50;function gie(t,{open:e,close:n},i,r){let o=t.sliceDoc(i-Ih,i),s=t.sliceDoc(r,r+Ih),a=/\s*$/.exec(o)[0].length,l=/^\s*/.exec(s)[0].length,u=o.length-a;if(o.slice(u-e.length,u)==e&&s.slice(l,l+n.length)==n)return{open:{pos:i-a,margin:a&&1},close:{pos:r+l,margin:l&&1}};let c,d;r-i<=2*Ih?c=d=t.sliceDoc(i,r):(c=t.sliceDoc(i,i+Ih),d=t.sliceDoc(r-Ih,r));let h=/^\s*/.exec(c)[0].length,p=/\s*$/.exec(d)[0].length,m=d.length-p-n.length;return c.slice(h,h+e.length)==e&&d.slice(m,m+n.length)==n?{open:{pos:i+h+e.length,margin:/\s/.test(c.charAt(h+e.length))?1:0},close:{pos:r-p-n.length,margin:/\s/.test(d.charAt(m-1))?1:0}}:null}function Oie(t){let e=[];for(let n of t.selection.ranges){let i=t.doc.lineAt(n.from),r=n.to<=i.to?i:t.doc.lineAt(n.to),o=e.length-1;o>=0&&e[o].to>i.from?e[o].to=r.to:e.push({from:i.from+/^\s*/.exec(i.text)[0].length,to:r.to})}return e}function _4(t,e,n=e.selection.ranges){let i=n.map(o=>Ix(e,o.from).block);if(!i.every(o=>o))return null;let r=n.map((o,s)=>gie(e,i[s],o.from,o.to));if(t!=2&&!r.every(o=>o))return{changes:e.changes(n.map((o,s)=>r[s]?[]:[{from:o.from,insert:i[s].open+" "},{from:o.to,insert:" "+i[s].close}]))};if(t!=1&&r.some(o=>o)){let o=[];for(let s=0,a;sr&&(o==s||s>d.from)){r=d.from;let h=/^\s*/.exec(d.text)[0].length,p=h==d.length,m=d.text.slice(h,h+u.length)==u?h:-1;ho.comment<0&&(!o.empty||o.single))){let o=[];for(let{line:a,token:l,indent:u,empty:c,single:d}of i)(d||!c)&&o.push({from:a.from+u,insert:l+" "});let s=e.changes(o);return{changes:s,selection:e.selection.map(s,1)}}else if(t!=1&&i.some(o=>o.comment>=0)){let o=[];for(let{line:s,comment:a,token:l}of i)if(a>=0){let u=s.from+a,c=u+l.length;s.text[c-s.from]==" "&&c++,o.push({from:u,to:c})}return{changes:o}}return null}const HS=hs.define(),yie=hs.define(),vie=he.define(),E4=he.define({combine(t){return Eo(t,{minDepth:100,newGroupDelay:500,joinToEvent:(e,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,n)=>(i,r)=>e(i,r)||n(i,r)})}}),C4=On.define({create(){return mo.empty},update(t,e){let n=e.state.facet(E4),i=e.annotation(HS);if(i){let l=Oi.fromTransaction(e,i.selection),u=i.side,c=u==0?t.undone:t.done;return l?c=eO(c,c.length,n.minDepth,l):c=A4(c,e.startState.selection),new mo(u==0?i.rest:c,u==0?c:i.rest)}let r=e.annotation(yie);if((r=="full"||r=="before")&&(t=t.isolate()),e.annotation(Jt.addToHistory)===!1)return e.changes.empty?t:t.addMapping(e.changes.desc);let o=Oi.fromTransaction(e),s=e.annotation(Jt.time),a=e.annotation(Jt.userEvent);return o?t=t.addChanges(o,s,a,n,e):e.selection&&(t=t.addSelection(e.startState.selection,s,a,n.newGroupDelay)),(r=="full"||r=="after")&&(t=t.isolate()),t},toJSON(t){return{done:t.done.map(e=>e.toJSON()),undone:t.undone.map(e=>e.toJSON())}},fromJSON(t){return new mo(t.done.map(Oi.fromJSON),t.undone.map(Oi.fromJSON))}});function Sie(t={}){return[C4,E4.of(t),ue.domEventHandlers({beforeinput(e,n){let i=e.inputType=="historyUndo"?T4:e.inputType=="historyRedo"?US:null;return i?(e.preventDefault(),i(n)):!1}})]}function pb(t,e){return function({state:n,dispatch:i}){if(!e&&n.readOnly)return!1;let r=n.field(C4,!1);if(!r)return!1;let o=r.pop(t,n,e);return o?(i(o),!0):!1}}const T4=pb(0,!1),US=pb(1,!1),wie=pb(0,!0),kie=pb(1,!0);class Oi{constructor(e,n,i,r,o){this.changes=e,this.effects=n,this.mapped=i,this.startSelection=r,this.selectionsAfter=o}setSelAfter(e){return new Oi(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,n,i;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(i=this.startSelection)===null||i===void 0?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(r=>r.toJSON())}}static fromJSON(e){return new Oi(e.changes&&an.fromJSON(e.changes),[],e.mapped&&vo.fromJSON(e.mapped),e.startSelection&&q.fromJSON(e.startSelection),e.selectionsAfter.map(q.fromJSON))}static fromTransaction(e,n){let i=sr;for(let r of e.startState.facet(vie)){let o=r(e);o.length&&(i=i.concat(o))}return!i.length&&e.changes.empty?null:new Oi(e.changes.invert(e.startState.doc),i,void 0,n||e.startState.selection,sr)}static selection(e){return new Oi(void 0,sr,void 0,void 0,e)}}function eO(t,e,n,i){let r=e+1>n+20?e-n-1:0,o=t.slice(r,e);return o.push(i),o}function xie(t,e){let n=[],i=!1;return t.iterChangedRanges((r,o)=>n.push(r,o)),e.iterChangedRanges((r,o,s,a)=>{for(let l=0;l=u&&s<=c&&(i=!0)}}),i}function _ie(t,e){return t.ranges.length==e.ranges.length&&t.ranges.filter((n,i)=>n.empty!=e.ranges[i].empty).length===0}function P4(t,e){return t.length?e.length?t.concat(e):t:e}const sr=[],Eie=200;function A4(t,e){if(t.length){let n=t[t.length-1],i=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-Eie));return i.length&&i[i.length-1].eq(e)?t:(i.push(e),eO(t,t.length-1,1e9,n.setSelAfter(i)))}else return[Oi.selection([e])]}function Cie(t){let e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function Vy(t,e){if(!t.length)return t;let n=t.length,i=sr;for(;n;){let r=Tie(t[n-1],e,i);if(r.changes&&!r.changes.empty||r.effects.length){let o=t.slice(0,n);return o[n-1]=r,o}else e=r.mapped,n--,i=r.selectionsAfter}return i.length?[Oi.selection(i)]:sr}function Tie(t,e,n){let i=P4(t.selectionsAfter.length?t.selectionsAfter.map(a=>a.map(e)):sr,n);if(!t.changes)return Oi.selection(i);let r=t.changes.map(e),o=e.mapDesc(t.changes,!0),s=t.mapped?t.mapped.composeDesc(o):o;return new Oi(r,De.mapEffects(t.effects,e),s,t.startSelection.map(o),i)}const Pie=/^(input\.type|delete)($|\.)/;class mo{constructor(e,n,i=0,r=void 0){this.done=e,this.undone=n,this.prevTime=i,this.prevUserEvent=r}isolate(){return this.prevTime?new mo(this.done,this.undone):this}addChanges(e,n,i,r,o){let s=this.done,a=s[s.length-1];return a&&a.changes&&!a.changes.empty&&e.changes&&(!i||Pie.test(i))&&(!a.selectionsAfter.length&&n-this.prevTime0&&n-this.prevTimen.empty?t.moveByChar(n,e):mb(n,e))}function Hn(t){return t.textDirectionAt(t.state.selection.main.head)==xt.LTR}const $x=t=>R4(t,!Hn(t)),Lx=t=>R4(t,Hn(t));function I4(t,e){return jr(t,n=>n.empty?t.moveByGroup(n,e):mb(n,e))}const $4=t=>I4(t,!Hn(t)),L4=t=>I4(t,Hn(t));function Rie(t,e,n){if(e.type.prop(n))return!0;let i=e.to-e.from;return i&&(i>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function gb(t,e,n){let i=gt(t).resolveInner(e.head),r=n?Pe.closedBy:Pe.openedBy;for(let l=e.head;;){let u=n?i.childAfter(l):i.childBefore(l);if(!u)break;Rie(t,u,r)?i=u:l=n?u.to:u.from}let o=i.type.prop(r),s,a;return o&&(s=n?po(t,i.from,1):po(t,i.to,-1))&&s.matched?a=n?s.end.to:s.end.from:a=n?i.to:i.from,q.cursor(a,n?-1:1)}const N4=t=>jr(t,e=>gb(t.state,e,!Hn(t))),M4=t=>jr(t,e=>gb(t.state,e,Hn(t)));function D4(t,e){return jr(t,n=>{if(!n.empty)return mb(n,e);let i=t.moveVertically(n,e);return i.head!=n.head?i:t.moveToLineBoundary(n,e)})}const B4=t=>D4(t,!1),Q4=t=>D4(t,!0);function F4(t){let e=t.scrollDOM.clientHeights.empty?t.moveVertically(s,e,n.height):mb(s,e));if(r.eq(i.selection))return!1;let o;if(n.selfScroll){let s=t.coordsAtPos(i.selection.main.head),a=t.scrollDOM.getBoundingClientRect(),l=a.top+n.marginTop,u=a.bottom-n.marginBottom;s&&s.top>l&&s.bottomz4(t,!1),WS=t=>z4(t,!0);function xa(t,e,n){let i=t.lineBlockAt(e.head),r=t.moveToLineBoundary(e,n);if(r.head==e.head&&r.head!=(n?i.to:i.from)&&(r=t.moveToLineBoundary(e,n,!1)),!n&&r.head==i.from&&i.length){let o=/^\s*/.exec(t.state.sliceDoc(i.from,Math.min(i.from+100,i.to)))[0].length;o&&e.head!=i.from+o&&(r=q.cursor(i.from+o))}return r}const H4=t=>jr(t,e=>xa(t,e,!0)),U4=t=>jr(t,e=>xa(t,e,!1)),W4=t=>jr(t,e=>xa(t,e,!Hn(t))),V4=t=>jr(t,e=>xa(t,e,Hn(t))),Iie=t=>jr(t,e=>q.cursor(t.lineBlockAt(e.head).from,1)),$ie=t=>jr(t,e=>q.cursor(t.lineBlockAt(e.head).to,-1));function Lie(t,e,n){let i=!1,r=Jd(t.selection,o=>{let s=po(t,o.head,-1)||po(t,o.head,1)||o.head>0&&po(t,o.head-1,1)||o.headLie(t,e);function pr(t,e){let n=Jd(t.state.selection,i=>{let r=e(i);return q.range(i.anchor,r.head,r.goalColumn,r.bidiLevel||void 0)});return n.eq(t.state.selection)?!1:(t.dispatch(Co(t.state,n)),!0)}function j4(t,e){return pr(t,n=>t.moveByChar(n,e))}const Nx=t=>j4(t,!Hn(t)),Mx=t=>j4(t,Hn(t));function X4(t,e){return pr(t,n=>t.moveByGroup(n,e))}const Z4=t=>X4(t,!Hn(t)),q4=t=>X4(t,Hn(t)),Y4=t=>pr(t,e=>gb(t.state,e,!Hn(t))),G4=t=>pr(t,e=>gb(t.state,e,Hn(t)));function K4(t,e){return pr(t,n=>t.moveVertically(n,e))}const J4=t=>K4(t,!1),eB=t=>K4(t,!0);function tB(t,e){return pr(t,n=>t.moveVertically(n,e,F4(t).height))}const OR=t=>tB(t,!1),bR=t=>tB(t,!0),nB=t=>pr(t,e=>xa(t,e,!0)),iB=t=>pr(t,e=>xa(t,e,!1)),rB=t=>pr(t,e=>xa(t,e,!Hn(t))),oB=t=>pr(t,e=>xa(t,e,Hn(t))),Mie=t=>pr(t,e=>q.cursor(t.lineBlockAt(e.head).from)),Die=t=>pr(t,e=>q.cursor(t.lineBlockAt(e.head).to)),yR=({state:t,dispatch:e})=>(e(Co(t,{anchor:0})),!0),vR=({state:t,dispatch:e})=>(e(Co(t,{anchor:t.doc.length})),!0),SR=({state:t,dispatch:e})=>(e(Co(t,{anchor:t.selection.main.anchor,head:0})),!0),wR=({state:t,dispatch:e})=>(e(Co(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),Bie=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),Qie=({state:t,dispatch:e})=>{let n=Ob(t).map(({from:i,to:r})=>q.range(i,Math.min(r+1,t.doc.length)));return e(t.update({selection:q.create(n),userEvent:"select"})),!0},Fie=({state:t,dispatch:e})=>{let n=Jd(t.selection,i=>{var r;let o=gt(t).resolveStack(i.from,1);for(let s=o;s;s=s.next){let{node:a}=s;if((a.from=i.to||a.to>i.to&&a.from<=i.from)&&(!((r=a.parent)===null||r===void 0)&&r.parent))return q.range(a.to,a.from)}return i});return e(Co(t,n)),!0},zie=({state:t,dispatch:e})=>{let n=t.selection,i=null;return n.ranges.length>1?i=q.create([n.main]):n.main.empty||(i=q.create([q.cursor(n.main.head)])),i?(e(Co(t,i)),!0):!1};function eh(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:i}=t,r=i.changeByRange(o=>{let{from:s,to:a}=o;if(s==a){let l=e(o);ls&&(n="delete.forward",l=eg(t,l,!0)),s=Math.min(s,l),a=Math.max(a,l)}else s=eg(t,s,!1),a=eg(t,a,!0);return s==a?{range:o}:{changes:{from:s,to:a},range:q.cursor(s,sr(t)))i.between(e,e,(r,o)=>{re&&(e=n?o:r)});return e}const sB=(t,e,n)=>eh(t,i=>{let r=i.from,{state:o}=t,s=o.doc.lineAt(r),a,l;if(n&&!e&&r>s.from&&rsB(t,!1,!0),nO=t=>sB(t,!0,!1),aB=(t,e)=>eh(t,n=>{let i=n.head,{state:r}=t,o=r.doc.lineAt(i),s=r.charCategorizer(i);for(let a=null;;){if(i==(e?o.to:o.from)){i==n.head&&o.number!=(e?r.doc.lines:1)&&(i+=e?1:-1);break}let l=Tn(o.text,i-o.from,e)+o.from,u=o.text.slice(Math.min(i,l)-o.from,Math.max(i,l)-o.from),c=s(u);if(a!=null&&c!=a)break;(u!=" "||i!=n.head)&&(a=c),i=l}return i}),Dx=t=>aB(t,!1),lB=t=>aB(t,!0),uB=t=>eh(t,e=>{let n=t.lineBlockAt(e.head).to;return e.headeh(t,e=>{let n=t.lineBlockAt(e.head).from;return e.head>n?n:Math.max(0,e.head-1)}),Uie=t=>eh(t,e=>{let n=t.moveToLineBoundary(e,!1).head;return e.head>n?n:Math.max(0,e.head-1)}),Wie=t=>eh(t,e=>{let n=t.moveToLineBoundary(e,!0).head;return e.head{if(t.readOnly)return!1;let n=t.changeByRange(i=>({changes:{from:i.from,to:i.to,insert:ot.of(["",""])},range:q.cursor(i.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},jie=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(i=>{if(!i.empty||i.from==0||i.from==t.doc.length)return{range:i};let r=i.from,o=t.doc.lineAt(r),s=r==o.from?r-1:Tn(o.text,r-o.from,!1)+o.from,a=r==o.to?r+1:Tn(o.text,r-o.from,!0)+o.from;return{changes:{from:s,to:a,insert:t.doc.slice(r,a).append(t.doc.slice(s,r))},range:q.cursor(a)}});return n.changes.empty?!1:(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function Ob(t){let e=[],n=-1;for(let i of t.selection.ranges){let r=t.doc.lineAt(i.from),o=t.doc.lineAt(i.to);if(!i.empty&&i.to==o.from&&(o=t.doc.lineAt(i.to-1)),n>=r.number){let s=e[e.length-1];s.to=o.to,s.ranges.push(i)}else e.push({from:r.from,to:o.to,ranges:[i]});n=o.number+1}return e}function cB(t,e,n){if(t.readOnly)return!1;let i=[],r=[];for(let o of Ob(t)){if(n?o.to==t.doc.length:o.from==0)continue;let s=t.doc.lineAt(n?o.to+1:o.from-1),a=s.length+1;if(n){i.push({from:o.to,to:s.to},{from:o.from,insert:s.text+t.lineBreak});for(let l of o.ranges)r.push(q.range(Math.min(t.doc.length,l.anchor+a),Math.min(t.doc.length,l.head+a)))}else{i.push({from:s.from,to:o.from},{from:o.to,insert:t.lineBreak+s.text});for(let l of o.ranges)r.push(q.range(l.anchor-a,l.head-a))}}return i.length?(e(t.update({changes:i,scrollIntoView:!0,selection:q.create(r,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const Xie=({state:t,dispatch:e})=>cB(t,e,!1),Zie=({state:t,dispatch:e})=>cB(t,e,!0);function dB(t,e,n){if(t.readOnly)return!1;let i=[];for(let r of Ob(t))n?i.push({from:r.from,insert:t.doc.slice(r.from,r.to)+t.lineBreak}):i.push({from:r.to,insert:t.lineBreak+t.doc.slice(r.from,r.to)});return e(t.update({changes:i,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const qie=({state:t,dispatch:e})=>dB(t,e,!1),Yie=({state:t,dispatch:e})=>dB(t,e,!0),Gie=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(Ob(e).map(({from:r,to:o})=>(r>0?r--:o{let o;if(t.lineWrapping){let s=t.lineBlockAt(r.head),a=t.coordsAtPos(r.head,r.assoc||1);a&&(o=s.bottom+t.documentTop-a.bottom+t.defaultLineHeight/2)}return t.moveVertically(r,!0,o)}).map(n);return t.dispatch({changes:n,selection:i,scrollIntoView:!0,userEvent:"delete.line"}),!0};function Kie(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=gt(t).resolveInner(e),i=n.childBefore(e),r=n.childAfter(e),o;return i&&r&&i.to<=e&&r.from>=e&&(o=i.type.prop(Pe.closedBy))&&o.indexOf(r.name)>-1&&t.doc.lineAt(i.to).from==t.doc.lineAt(r.from).from&&!/\S/.test(t.sliceDoc(i.to,r.from))?{from:i.to,to:r.from}:null}const Jie=hB(!1),ere=hB(!0);function hB(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let i=e.changeByRange(r=>{let{from:o,to:s}=r,a=e.doc.lineAt(o),l=!t&&o==s&&Kie(e,o);t&&(o=s=(s<=a.to?a:e.doc.lineAt(s)).to);let u=new Lp(e,{simulateBreak:o,simulateDoubleBreak:!!l}),c=db(u,o);for(c==null&&(c=Hr(/^\s*/.exec(e.doc.lineAt(o).text)[0],e.tabSize));sa.from&&o{let r=[];for(let s=i.from;s<=i.to;){let a=t.doc.lineAt(s);a.number>n&&(i.empty||i.to>a.from)&&(e(a,r,i),n=a.number),s=a.to+1}let o=t.changes(r);return{changes:r,range:q.range(o.mapPos(i.anchor,1),o.mapPos(i.head,1))}})}const fB=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),i=new Lp(t,{overrideIndentation:o=>{let s=n[o];return s??-1}}),r=Bx(t,(o,s,a)=>{let l=db(i,o.from);if(l==null)return;/\S/.test(o.text)||(l=0);let u=/^\s*/.exec(o.text)[0],c=gd(t,l);(u!=c||a.fromt.readOnly?!1:(e(t.update(Bx(t,(n,i)=>{i.push({from:n.from,insert:t.facet(Yd)})}),{userEvent:"input.indent"})),!0),mB=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(Bx(t,(n,i)=>{let r=/^\s*/.exec(n.text)[0];if(!r)return;let o=Hr(r,t.tabSize),s=0,a=gd(t,Math.max(0,o-du(t)));for(;s({mac:t.key,run:t.run,shift:t.shift}))),kR=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:N4,shift:Y4},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:M4,shift:G4},{key:"Alt-ArrowUp",run:Xie},{key:"Shift-Alt-ArrowUp",run:qie},{key:"Alt-ArrowDown",run:Zie},{key:"Shift-Alt-ArrowDown",run:Yie},{key:"Escape",run:zie},{key:"Mod-Enter",run:ere},{key:"Alt-l",mac:"Ctrl-l",run:Qie},{key:"Mod-i",run:Fie,preventDefault:!0},{key:"Mod-[",run:mB},{key:"Mod-]",run:pB},{key:"Mod-Alt-\\",run:fB},{key:"Shift-Mod-k",run:Gie},{key:"Shift-Mod-\\",run:Nie},{key:"Mod-/",run:hie},{key:"Alt-A",run:pie}].concat(nre),ire={key:"Tab",run:pB,shift:mB};class rre{constructor(e,n,i){this.from=e,this.to=n,this.diagnostic=i}}class Ll{constructor(e,n,i){this.diagnostics=e,this.panel=n,this.selected=i}static init(e,n,i){let r=e,o=i.facet(dp).markerFilter;o&&(r=o(r,i));let s=Ce.set(r.map(a=>a.from==a.to||a.from==a.to-1&&i.doc.lineAt(a.from).to==a.from?Ce.widget({widget:new fre(a),diagnostic:a}).range(a.from):Ce.mark({attributes:{class:"cm-lintRange cm-lintRange-"+a.severity+(a.markClass?" "+a.markClass:"")},diagnostic:a,inclusive:!0}).range(a.from,a.to)),!0);return new Ll(s,n,yd(s))}}function yd(t,e=null,n=0){let i=null;return t.between(n,1e9,(r,o,{spec:s})=>{if(!(e&&s.diagnostic!=e))return i=new rre(r,o,s.diagnostic),!1}),i}function ore(t,e){let n=e.pos,i=e.end||n,r=t.state.facet(dp).hideOn(t,n,i);if(r!=null)return r;let o=t.startState.doc.lineAt(e.pos);return!!(t.effects.some(s=>s.is(gB))||t.changes.touchesRange(o.from,Math.max(o.to,i)))}function sre(t,e){return t.field(Qi,!1)?e:e.concat(De.appendConfig.of(gre))}const gB=De.define(),Qx=De.define(),OB=De.define(),Qi=On.define({create(){return new Ll(Ce.none,null,null)},update(t,e){if(e.docChanged&&t.diagnostics.size){let n=t.diagnostics.map(e.changes),i=null,r=t.panel;if(t.selected){let o=e.changes.mapPos(t.selected.from,1);i=yd(n,t.selected.diagnostic,o)||yd(n,null,o)}!n.size&&r&&e.state.facet(dp).autoPanel&&(r=null),t=new Ll(n,r,i)}for(let n of e.effects)if(n.is(gB)){let i=e.state.facet(dp).autoPanel?n.value.length?hp.open:null:t.panel;t=Ll.init(n.value,i,e.state)}else n.is(Qx)?t=new Ll(t.diagnostics,n.value?hp.open:null,t.selected):n.is(OB)&&(t=new Ll(t.diagnostics,t.panel,n.value));return t},provide:t=>[np.from(t,e=>e.panel),ue.decorations.from(t,e=>e.diagnostics)]}),are=Ce.mark({class:"cm-lintRange cm-lintRange-active",inclusive:!0});function lre(t,e,n){let{diagnostics:i}=t.state.field(Qi),r=[],o=2e8,s=0;i.between(e-(n<0?1:0),e+(n>0?1:0),(l,u,{spec:c})=>{e>=l&&e<=u&&(l==u||(e>l||n>0)&&(eyB(t,n,!1)))}const cre=t=>{let e=t.state.field(Qi,!1);(!e||!e.panel)&&t.dispatch({effects:sre(t.state,[Qx.of(!0)])});let n=tp(t,hp.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},xR=t=>{let e=t.state.field(Qi,!1);return!e||!e.panel?!1:(t.dispatch({effects:Qx.of(!1)}),!0)},dre=t=>{let e=t.state.field(Qi,!1);if(!e)return!1;let n=t.state.selection.main,i=e.diagnostics.iter(n.to+1);return!i.value&&(i=e.diagnostics.iter(0),!i.value||i.from==n.from&&i.to==n.to)?!1:(t.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0}),!0)},hre=[{key:"Mod-Shift-m",run:cre,preventDefault:!0},{key:"F8",run:dre}],dp=he.define({combine(t){return Object.assign({sources:t.map(e=>e.source).filter(e=>e!=null)},Eo(t.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,n)=>e?n?i=>e(i)||n(i):e:n}))}});function bB(t){let e=[];if(t)e:for(let{name:n}of t){for(let i=0;io.toLowerCase()==r.toLowerCase())){e.push(r);continue e}}e.push("")}return e}function yB(t,e,n){var i;let r=n?bB(e.actions):[];return bt("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},bt("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(t):e.message),(i=e.actions)===null||i===void 0?void 0:i.map((o,s)=>{let a=!1,l=h=>{if(h.preventDefault(),a)return;a=!0;let p=yd(t.state.field(Qi).diagnostics,e);p&&o.apply(t,p.from,p.to)},{name:u}=o,c=r[s]?u.indexOf(r[s]):-1,d=c<0?u:[u.slice(0,c),bt("u",u.slice(c,c+1)),u.slice(c+1)];return bt("button",{type:"button",class:"cm-diagnosticAction",onclick:l,onmousedown:l,"aria-label":` Action: ${u}${c<0?"":` (access key "${r[s]})"`}.`},d)}),e.source&&bt("div",{class:"cm-diagnosticSource"},e.source))}class fre extends fs{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return bt("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class _R{constructor(e,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=yB(e,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class hp{constructor(e){this.view=e,this.items=[];let n=r=>{if(r.keyCode==27)xR(this.view),this.view.focus();else if(r.keyCode==38||r.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(r.keyCode==40||r.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(r.keyCode==36)this.moveSelection(0);else if(r.keyCode==35)this.moveSelection(this.items.length-1);else if(r.keyCode==13)this.view.focus();else if(r.keyCode>=65&&r.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:o}=this.items[this.selectedIndex],s=bB(o.actions);for(let a=0;a{for(let o=0;oxR(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Qi).selected;if(!e)return-1;for(let n=0;n{let u=-1,c;for(let d=i;di&&(this.items.splice(i,u-i),r=!0)),n&&c.diagnostic==n.diagnostic?c.dom.hasAttribute("aria-selected")||(c.dom.setAttribute("aria-selected","true"),o=c):c.dom.hasAttribute("aria-selected")&&c.dom.removeAttribute("aria-selected"),i++});i({sel:o.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:s,panel:a})=>{let l=a.height/this.list.offsetHeight;s.topa.bottom&&(this.list.scrollTop+=(s.bottom-a.bottom)/l)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),r&&this.sync()}sync(){let e=this.list.firstChild;function n(){let i=e;e=i.nextSibling,i.remove()}for(let i of this.items)if(i.dom.parentNode==this.list){for(;e!=i.dom;)n();e=i.dom.nextSibling}else this.list.insertBefore(i.dom,e);for(;e;)n()}moveSelection(e){if(this.selectedIndex<0)return;let n=this.view.state.field(Qi),i=yd(n.diagnostics,this.items[e].diagnostic);i&&this.view.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0,effects:OB.of(i)})}static open(e){return new hp(e)}}function pre(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(t)}')`}function tg(t){return pre(``,'width="6" height="3"')}const mre=ue.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:tg("#d11")},".cm-lintRange-warning":{backgroundImage:tg("orange")},".cm-lintRange-info":{backgroundImage:tg("#999")},".cm-lintRange-hint":{backgroundImage:tg("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}}),gre=[Qi,ue.decorations.compute([Qi],t=>{let{selected:e,panel:n}=t.field(Qi);return!e||!n||e.from==e.to?Ce.none:Ce.set([are.range(e.from,e.to)])}),Oee(lre,{hideOn:ore}),mre];var ER={};class iO{constructor(e,n,i,r,o,s,a,l,u,c=0,d){this.p=e,this.stack=n,this.state=i,this.reducePos=r,this.pos=o,this.score=s,this.buffer=a,this.bufferBase=l,this.curContext=u,this.lookAhead=c,this.parent=d}toString(){return`[${this.stack.filter((e,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,i=0){let r=e.parser.context;return new iO(e,[],n,i,i,0,[],0,r?new CR(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let i=e>>19,r=e&65535,{parser:o}=this.p,s=o.dynamicPrecedence(r);if(s&&(this.score+=s),i==0){this.pushState(o.getGoto(this.state,r,!0),this.reducePos),r=2e3&&!(!((n=this.p.parser.nodeSet.types[r])===null||n===void 0)&&n.isAnonymous)&&(l==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSizea;)this.stack.pop();this.reduceContext(r,l)}storeNode(e,n,i,r=4,o=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&s.buffer[a-4]==0&&s.buffer[a-1]>-1){if(n==i)return;if(s.buffer[a-2]>=n){s.buffer[a-2]=i;return}}}if(!o||this.pos==i)this.buffer.push(e,n,i,r);else{let s=this.buffer.length;if(s>0&&this.buffer[s-4]!=0)for(;s>0&&this.buffer[s-2]>i;)this.buffer[s]=this.buffer[s-4],this.buffer[s+1]=this.buffer[s-3],this.buffer[s+2]=this.buffer[s-2],this.buffer[s+3]=this.buffer[s-1],s-=4,r>4&&(r-=4);this.buffer[s]=e,this.buffer[s+1]=n,this.buffer[s+2]=i,this.buffer[s+3]=r}}shift(e,n,i,r){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=r,this.shiftContext(n,i),n<=this.p.parser.maxNode&&this.buffer.push(n,i,r,4);else{let o=e,{parser:s}=this.p;(r>this.pos||n<=s.maxNode)&&(this.pos=r,s.stateFlag(o,1)||(this.reducePos=r)),this.pushState(o,i),this.shiftContext(n,i),n<=s.maxNode&&this.buffer.push(n,i,r,4)}}apply(e,n,i,r){e&65536?this.reduce(e):this.shift(e,n,i,r)}useNode(e,n){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=e)&&(this.p.reused.push(e),i++);let r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(n,r),this.buffer.push(i,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,n=e.buffer.length;for(;n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let i=e.buffer.slice(n),r=e.bufferBase+n;for(;e&&r==e.bufferBase;)e=e.parent;return new iO(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,r,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let i=e<=this.p.parser.maxNode;i&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,i?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new Ore(this);;){let i=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(i==0)return!1;if(!(i&65536))return!0;n.reduce(i)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let r=[];for(let o=0,s;ol&1&&a==s)||r.push(n[o],s)}n=r}let i=[];for(let r=0;r>19,r=n&65535,o=this.stack.length-i*3;if(o<0||e.getGoto(this.stack[o],r,!1)<0){let s=this.findForcedReduction();if(s==null)return!1;n=s}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:e}=this.p,n=[],i=(r,o)=>{if(!n.includes(r))return n.push(r),e.allActions(r,s=>{if(!(s&393216))if(s&65536){let a=(s>>19)-o;if(a>1){let l=s&65535,u=this.stack.length-a*3;if(u>=0&&e.getGoto(this.stack[u],l,!1)>=0)return a<<19|65536|l}}else{let a=i(s,o+1);if(a!=null)return a}})};return i(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let n=0;nthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class CR{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class Ore{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,i=e>>19;i==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(i-1)*3;let r=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=r}}class rO{constructor(e,n,i){this.stack=e,this.pos=n,this.index=i,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new rO(e,n,n-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new rO(this.stack,this.pos,this.index)}}function Yh(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let i=0,r=0;i=92&&s--,s>=34&&s--;let l=s-32;if(l>=46&&(l-=46,a=!0),o+=l,a)break;o*=46}n?n[r++]=o:n=new e(o)}return n}class jg{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const TR=new jg;class bre{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=TR,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let i=this.range,r=this.rangeIndex,o=this.pos+e;for(;oi.to:o>=i.to;){if(r==this.ranges.length-1)return null;let s=this.ranges[++r];o+=s.from-i.to,i=s}return o}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,i,r;if(n>=0&&n=this.chunk2Pos&&ia.to&&(this.chunk2=this.chunk2.slice(0,a.to-i)),r=this.chunk2.charCodeAt(0)}}return i>=this.token.lookAhead&&(this.token.lookAhead=i+1),r}acceptToken(e,n=0){let i=n?this.resolveOffset(n,-1):this.pos;if(i==null||i=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=TR,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let i="";for(let r of this.ranges){if(r.from>=n)break;r.to>e&&(i+=this.input.read(Math.max(r.from,e),Math.min(r.to,n)))}return i}}class ed{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:i}=n.p;vB(this.data,e,n,this.id,i.data,i.tokenPrecTable)}}ed.prototype.contextual=ed.prototype.fallback=ed.prototype.extend=!1;class oO{constructor(e,n,i){this.precTable=n,this.elseToken=i,this.data=typeof e=="string"?Yh(e):e}token(e,n){let i=e.pos,r=0;for(;;){let o=e.next<0,s=e.resolveOffset(1,1);if(vB(this.data,e,n,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(o||r++,s==null)break;e.reset(s,e.token)}r&&(e.reset(i,e.token),e.acceptToken(this.elseToken,r))}}oO.prototype.contextual=ed.prototype.fallback=ed.prototype.extend=!1;class Xr{constructor(e,n={}){this.token=e,this.contextual=!!n.contextual,this.fallback=!!n.fallback,this.extend=!!n.extend}}function vB(t,e,n,i,r,o){let s=0,a=1<0){let m=t[p];if(l.allows(m)&&(e.token.value==-1||e.token.value==m||yre(m,e.token.value,r,o))){e.acceptToken(m);break}}let c=e.next,d=0,h=t[s+2];if(e.next<0&&h>d&&t[u+h*3-3]==65535){s=t[u+h*3-1];continue e}for(;d>1,m=u+p+(p<<1),O=t[m],y=t[m+1]||65536;if(c=y)d=p+1;else{s=t[m+2],e.advance();continue e}}break}}function PR(t,e,n){for(let i=e,r;(r=t[i])!=65535;i++)if(r==n)return i-e;return-1}function yre(t,e,n,i){let r=PR(n,i,e);return r<0||PR(n,i,t)e)&&!i.type.isError)return n<0?Math.max(0,Math.min(i.to-1,e-25)):Math.min(t.length,Math.max(i.from+1,e+25));if(n<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return n<0?0:t.length}}let vre=class{constructor(e,n){this.fragments=e,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?AR(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?AR(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=s,null;if(o instanceof Ze){if(s==e){if(s=Math.max(this.safeFrom,e)&&(this.trees.push(o),this.start.push(s),this.index.push(0))}else this.index[n]++,this.nextStart=s+o.length}}};class Sre{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(i=>new jg)}getActions(e){let n=0,i=null,{parser:r}=e.p,{tokenizers:o}=r,s=r.stateSlot(e.state,3),a=e.curContext?e.curContext.hash:0,l=0;for(let u=0;ud.end+25&&(l=Math.max(d.lookAhead,l)),d.value!=0)){let h=n;if(d.extended>-1&&(n=this.addActions(e,d.extended,d.end,n)),n=this.addActions(e,d.value,d.end,n),!c.extend&&(i=d,n>h))break}}for(;this.actions.length>n;)this.actions.pop();return l&&e.setLookAhead(l),!i&&e.pos==this.stream.end&&(i=new jg,i.value=e.p.parser.eofTerm,i.start=i.end=e.pos,n=this.addActions(e,i.value,i.end,n)),this.mainToken=i,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new jg,{pos:i,p:r}=e;return n.start=i,n.end=Math.min(i+1,r.stream.end),n.value=i==r.stream.end?r.parser.eofTerm:0,n}updateCachedToken(e,n,i){let r=this.stream.clipPos(i.pos);if(n.token(this.stream.reset(r,e),i),e.value>-1){let{parser:o}=i.p;for(let s=0;s=0&&i.p.parser.dialect.allows(a>>1)){a&1?e.extended=a>>1:e.value=a>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,n,i,r){for(let o=0;oe.bufferLength*4?new vre(i,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,i=this.stacks=[],r,o;if(this.bigReductionCount>300&&e.length==1){let[s]=e;for(;s.forceReduce()&&s.stack.length&&s.stack[s.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let s=0;sn)i.push(a);else{if(this.advanceStack(a,i,e))continue;{r||(r=[],o=[]),r.push(a);let l=this.tokens.getMainToken(a);o.push(l.value,l.end)}}break}}if(!i.length){let s=r&&xre(r);if(s)return Ei&&console.log("Finish with "+this.stackID(s)),this.stackToTree(s);if(this.parser.strict)throw Ei&&r&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&r){let s=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,o,i);if(s)return Ei&&console.log("Force-finish "+this.stackID(s)),this.stackToTree(s.forceAll())}if(this.recovering){let s=this.recovering==1?1:this.recovering*3;if(i.length>s)for(i.sort((a,l)=>l.score-a.score);i.length>s;)i.pop();i.some(a=>a.reducePos>n)&&this.recovering--}else if(i.length>1){e:for(let s=0;s500&&u.buffer.length>500)if((a.score-u.score||a.buffer.length-u.buffer.length)>0)i.splice(l--,1);else{i.splice(s--,1);continue e}}}i.length>12&&i.splice(12,i.length-12)}this.minStackPos=i[0].pos;for(let s=1;s ":"";if(this.stoppedAt!=null&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let u=e.curContext&&e.curContext.tracker.strict,c=u?e.curContext.hash:0;for(let d=this.fragments.nodeAt(r);d;){let h=this.parser.nodeSet.types[d.type.id]==d.type?o.getGoto(e.state,d.type.id):-1;if(h>-1&&d.length&&(!u||(d.prop(Pe.contextHash)||0)==c))return e.useNode(d,h),Ei&&console.log(s+this.stackID(e)+` (via reuse of ${o.getName(d.type.id)})`),!0;if(!(d instanceof Ze)||d.children.length==0||d.positions[0]>0)break;let p=d.children[0];if(p instanceof Ze&&d.positions[0]==0)d=p;else break}}let a=o.stateSlot(e.state,4);if(a>0)return e.reduce(a),Ei&&console.log(s+this.stackID(e)+` (via always-reduce ${o.getName(a&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let u=0;ur?n.push(m):i.push(m)}return!1}advanceFully(e,n){let i=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>i)return RR(e,n),!0}}runRecovery(e,n,i){let r=null,o=!1;for(let s=0;s ":"";if(a.deadEnd&&(o||(o=!0,a.restart(),Ei&&console.log(c+this.stackID(a)+" (restarted)"),this.advanceFully(a,i))))continue;let d=a.split(),h=c;for(let p=0;d.forceReduce()&&p<10&&(Ei&&console.log(h+this.stackID(d)+" (via force-reduce)"),!this.advanceFully(d,i));p++)Ei&&(h=this.stackID(d)+" -> ");for(let p of a.recoverByInsert(l))Ei&&console.log(c+this.stackID(p)+" (via recover-insert)"),this.advanceFully(p,i);this.stream.end>a.pos?(u==a.pos&&(u++,l=0),a.recoverByDelete(l,u),Ei&&console.log(c+this.stackID(a)+` (via recover-delete ${this.parser.getName(l)})`),RR(a,i)):(!r||r.scoret;class SB{constructor(e){this.start=e.start,this.shift=e.shift||Xy,this.reduce=e.reduce||Xy,this.reuse=e.reuse||Xy,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class fu extends ub{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let a=0;ae.topRules[a][1]),r=[];for(let a=0;a=0)o(c,l,a[u++]);else{let d=a[u+-c];for(let h=-c;h>0;h--)o(a[u++],l,d);u++}}}this.nodeSet=new qd(n.map((a,l)=>tn.define({name:l>=this.minRepeatTerm?void 0:a,id:l,props:r[l],top:i.indexOf(l)>-1,error:l==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(l)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=PD;let s=Yh(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let a=0;atypeof a=="number"?new ed(s,a):a),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,n,i){let r=new wre(this,e,n,i);for(let o of this.wrappers)r=o(r,e,n,i);return r}getGoto(e,n,i=!1){let r=this.goto;if(n>=r[0])return-1;for(let o=r[n+1];;){let s=r[o++],a=s&1,l=r[o++];if(a&&i)return l;for(let u=o+(s>>1);o0}validAction(e,n){return!!this.allActions(e,i=>i==n?!0:null)}allActions(e,n){let i=this.stateSlot(e,4),r=i?n(i):void 0;for(let o=this.stateSlot(e,1);r==null;o+=3){if(this.data[o]==65535)if(this.data[o+1]==1)o=Uo(this.data,o+2);else break;r=n(Uo(this.data,o+1))}return r}nextStates(e){let n=[];for(let i=this.stateSlot(e,1);;i+=3){if(this.data[i]==65535)if(this.data[i+1]==1)i=Uo(this.data,i+2);else break;if(!(this.data[i+2]&1)){let r=this.data[i+1];n.some((o,s)=>s&1&&o==r)||n.push(this.data[i],r)}}return n}configure(e){let n=Object.assign(Object.create(fu.prototype),this);if(e.props&&(n.nodeSet=this.nodeSet.extend(...e.props)),e.top){let i=this.topRules[e.top];if(!i)throw new RangeError(`Invalid top rule name ${e.top}`);n.top=i}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(i=>{let r=e.tokenizers.find(o=>o.from==i);return r?r.to:i})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((i,r)=>{let o=e.specializers.find(a=>a.from==i.external);if(!o)return i;let s=Object.assign(Object.assign({},i),{external:o.to});return n.specializers[r]=IR(s),s})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),i=n.map(()=>!1);if(e)for(let o of e.split(" ")){let s=n.indexOf(o);s>=0&&(i[s]=!0)}let r=null;for(let o=0;oi)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.scoret.external(n,i)<<1|e}return t.get}const _re=312,$R=1,Ere=2,Cre=3,Tre=4,Pre=313,Are=315,Rre=316,Ire=5,$re=6,Lre=0,VS=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],wB=125,Nre=59,jS=47,Mre=42,Dre=43,Bre=45,Qre=60,Fre=44,zre=63,Hre=46,Ure=new SB({start:!1,shift(t,e){return e==Ire||e==$re||e==Are?t:e==Rre},strict:!1}),Wre=new Xr((t,e)=>{let{next:n}=t;(n==wB||n==-1||e.context)&&t.acceptToken(Pre)},{contextual:!0,fallback:!0}),Vre=new Xr((t,e)=>{let{next:n}=t,i;VS.indexOf(n)>-1||n==jS&&((i=t.peek(1))==jS||i==Mre)||n!=wB&&n!=Nre&&n!=-1&&!e.context&&t.acceptToken(_re)},{contextual:!0}),jre=new Xr((t,e)=>{let{next:n}=t;if(n==Dre||n==Bre){if(t.advance(),n==t.next){t.advance();let i=!e.context&&e.canShift($R);t.acceptToken(i?$R:Ere)}}else n==zre&&t.peek(1)==Hre&&(t.advance(),t.advance(),(t.next<48||t.next>57)&&t.acceptToken(Cre))},{contextual:!0});function Zy(t,e){return t>=65&&t<=90||t>=97&&t<=122||t==95||t>=192||!e&&t>=48&&t<=57}const Xre=new Xr((t,e)=>{if(t.next!=Qre||!e.dialectEnabled(Lre)||(t.advance(),t.next==jS))return;let n=0;for(;VS.indexOf(t.next)>-1;)t.advance(),n++;if(Zy(t.next,!0)){for(t.advance(),n++;Zy(t.next,!1);)t.advance(),n++;for(;VS.indexOf(t.next)>-1;)t.advance(),n++;if(t.next==Fre)return;for(let i=0;;i++){if(i==7){if(!Zy(t.next,!0))return;break}if(t.next!="extends".charCodeAt(i))break;t.advance(),n++}}t.acceptToken(Tre,-n)}),Zre=Au({"get set async static":R.modifier,"for while do if else switch try catch finally return throw break continue default case":R.controlKeyword,"in of await yield void typeof delete instanceof":R.operatorKeyword,"let var const using function class extends":R.definitionKeyword,"import export from":R.moduleKeyword,"with debugger as new":R.keyword,TemplateString:R.special(R.string),super:R.atom,BooleanLiteral:R.bool,this:R.self,null:R.null,Star:R.modifier,VariableName:R.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":R.function(R.variableName),VariableDefinition:R.definition(R.variableName),Label:R.labelName,PropertyName:R.propertyName,PrivatePropertyName:R.special(R.propertyName),"CallExpression/MemberExpression/PropertyName":R.function(R.propertyName),"FunctionDeclaration/VariableDefinition":R.function(R.definition(R.variableName)),"ClassDeclaration/VariableDefinition":R.definition(R.className),PropertyDefinition:R.definition(R.propertyName),PrivatePropertyDefinition:R.definition(R.special(R.propertyName)),UpdateOp:R.updateOperator,"LineComment Hashbang":R.lineComment,BlockComment:R.blockComment,Number:R.number,String:R.string,Escape:R.escape,ArithOp:R.arithmeticOperator,LogicOp:R.logicOperator,BitOp:R.bitwiseOperator,CompareOp:R.compareOperator,RegExp:R.regexp,Equals:R.definitionOperator,Arrow:R.function(R.punctuation),": Spread":R.punctuation,"( )":R.paren,"[ ]":R.squareBracket,"{ }":R.brace,"InterpolationStart InterpolationEnd":R.special(R.brace),".":R.derefOperator,", ;":R.separator,"@":R.meta,TypeName:R.typeName,TypeDefinition:R.definition(R.typeName),"type enum interface implements namespace module declare":R.definitionKeyword,"abstract global Privacy readonly override":R.modifier,"is keyof unique infer":R.operatorKeyword,JSXAttributeValue:R.attributeValue,JSXText:R.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":R.angleBracket,"JSXIdentifier JSXNameSpacedName":R.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":R.attributeName,"JSXBuiltin/JSXIdentifier":R.standard(R.tagName)}),qre={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,extends:54,this:58,true:66,false:66,null:78,void:82,typeof:86,super:102,new:136,delete:148,yield:157,await:161,class:166,public:229,private:229,protected:229,readonly:231,instanceof:250,satisfies:253,in:254,const:256,import:290,keyof:345,unique:349,infer:355,is:391,abstract:411,implements:413,type:415,let:418,var:420,using:423,interface:429,enum:433,namespace:439,module:441,declare:445,global:449,for:468,of:477,while:480,with:484,do:488,if:492,else:494,switch:498,case:504,try:510,catch:514,finally:518,return:522,throw:526,break:530,continue:534,debugger:538},Yre={__proto__:null,async:123,get:125,set:127,declare:189,public:191,private:191,protected:191,static:193,abstract:195,override:197,readonly:203,accessor:205,new:395},Gre={__proto__:null,"<":187},Kre=fu.deserialize({version:14,states:"$=dO%TQ^OOO%[Q^OOO'_Q`OOP(lOWOOO*zQ?NdO'#CiO+RO!bO'#CjO+aO#tO'#CjO+oO!0LbO'#D^O.QQ^O'#DdO.bQ^O'#DoO%[Q^O'#DwO0fQ^O'#EPOOQ?Mr'#EX'#EXO1PQWO'#EUOOQO'#Em'#EmOOQO'#Ih'#IhO1XQWO'#GpO1dQWO'#ElO1iQWO'#ElO3hQ?NdO'#JmO6[Q?NdO'#JnO6uQWO'#F[O6zQ&jO'#FsOOQ?Mr'#Fe'#FeO7VO,YO'#FeO7eQ7[O'#FzO9RQWO'#FyOOQ?Mr'#Jn'#JnOOQ?Mp'#Jm'#JmO9WQWO'#GtOOQU'#KZ'#KZO9cQWO'#IUO9hQ?MxO'#IVOOQU'#JZ'#JZOOQU'#IZ'#IZQ`Q^OOO`Q^OOO9pQMnO'#DsO9wQ^O'#D{O:OQ^O'#D}O9^QWO'#GpO:VQ7[O'#CoO:eQWO'#EkO:pQWO'#EvO:uQ7[O'#FdO;dQWO'#GpOOQO'#K['#K[O;iQWO'#K[O;wQWO'#GxO;wQWO'#GyO;wQWO'#G{O9^QWO'#HOOVQWO'#CeO>gQWO'#H_O>oQWO'#HeO>oQWO'#HgO`Q^O'#HiO>oQWO'#HkO>oQWO'#HnO>tQWO'#HtO>yQ?MyO'#HzO%[Q^O'#H|O?UQ?MyO'#IOO?aQ?MyO'#IQO9hQ?MxO'#ISO?lQ?NdO'#CiO@nQ`O'#DiQOQWOOO%[Q^O'#D}OAUQWO'#EQO:VQ7[O'#EkOAaQWO'#EkOAlQpO'#FdOOQU'#Cg'#CgOOQ?Mp'#Dn'#DnOOQ?Mp'#Jq'#JqO%[Q^O'#JqOOQO'#Jt'#JtOOQO'#Id'#IdOBlQ`O'#EdOOQ?Mp'#Ec'#EcOOQ?Mp'#Jx'#JxOChQ?NQO'#EdOCrQ`O'#ETOOQO'#Js'#JsODWQ`O'#JtOEeQ`O'#ETOCrQ`O'#EdPErO#@ItO'#CbPOOO)CDx)CDxOOOO'#I['#I[OE}O!bO,59UOOQ?Mr,59U,59UOOOO'#I]'#I]OF]O#tO,59UO%[Q^O'#D`OOOO'#I_'#I_OFkO!0LbO,59xOOQ?Mr,59x,59xOFyQ^O'#I`OG^QWO'#JoOI]QrO'#JoO+}Q^O'#JoOIdQWO,5:OOIzQWO'#EmOJXQWO'#KOOJdQWO'#J}OJdQWO'#J}OJlQWO,5;ZOJqQWO'#J|OOQ?Mv,5:Z,5:ZOJxQ^O,5:ZOLvQ?NdO,5:cOMgQWO,5:kONQQ?MxO'#J{ONXQWO'#JzO9WQWO'#JzONmQWO'#JzONuQWO,5;YONzQWO'#JzO!#PQrO'#JnOOQ?Mr'#Ci'#CiO%[Q^O'#EPO!#oQrO,5:pOOQQ'#Ju'#JuOOQO-EpOOQU'#Jc'#JcOOQU,5>q,5>qOOQU-EtQWO'#HTO9^QWO'#HVO!DgQWO'#HVO:VQ7[O'#HXO!DlQWO'#HXOOQU,5=m,5=mO!DqQWO'#HYO!ESQWO'#CoO!EXQWO,59PO!EcQWO,59PO!GhQ^O,59POOQU,59P,59PO!GxQ?MxO,59PO%[Q^O,59PO!JTQ^O'#HaOOQU'#Hb'#HbOOQU'#Hc'#HcO`Q^O,5=yO!JkQWO,5=yO`Q^O,5>PO`Q^O,5>RO!JpQWO,5>TO`Q^O,5>VO!JuQWO,5>YO!JzQ^O,5>`OOQU,5>f,5>fO%[Q^O,5>fO9hQ?MxO,5>hOOQU,5>j,5>jO# UQWO,5>jOOQU,5>l,5>lO# UQWO,5>lOOQU,5>n,5>nO# rQ`O'#D[O%[Q^O'#JqO# |Q`O'#JqO#!kQ`O'#DjO#!|Q`O'#DjO#%_Q^O'#DjO#%fQWO'#JpO#%nQWO,5:TO#%sQWO'#EqO#&RQWO'#KPO#&ZQWO,5;[O#&`Q`O'#DjO#&mQ`O'#ESOOQ?Mr,5:l,5:lO%[Q^O,5:lO#&tQWO,5:lO>tQWO,5;VO!A}Q`O,5;VO!BVQ7[O,5;VO:VQ7[O,5;VO#&|QWO,5@]O#'RQ(CYO,5:pOOQO-EzO+}Q^O,5>zOOQO,5?Q,5?QO#*ZQ^O'#I`OOQO-E<^-E<^O#*hQWO,5@ZO#*pQrO,5@ZO#*wQWO,5@iOOQ?Mr1G/j1G/jO%[Q^O,5@jO#+PQWO'#IfOOQO-EoQWO1G3oO$4tQ^O1G3qO$8xQ^O'#HpOOQU1G3t1G3tO$9VQWO'#HvO>tQWO'#HxOOQU1G3z1G3zO$9_Q^O1G3zO9hQ?MxO1G4QOOQU1G4S1G4SOOQ?Mp'#G]'#G]O9hQ?MxO1G4UO9hQ?MxO1G4WO$=fQWO,5@]O!(oQ^O,5;]O9WQWO,5;]O>tQWO,5:UO!(oQ^O,5:UO!A}Q`O,5:UO$=kQ07bO,5:UOOQO,5;],5;]O$=uQ`O'#IaO$>]QWO,5@[OOQ?Mr1G/o1G/oO$>eQ`O'#IgO$>oQWO,5@kOOQ?Mp1G0v1G0vO#!|Q`O,5:UOOQO'#Ic'#IcO$>wQ`O,5:nOOQ?Mv,5:n,5:nO#&wQWO1G0WOOQ?Mr1G0W1G0WO%[Q^O1G0WOOQ?Mr1G0q1G0qO>tQWO1G0qO!A}Q`O1G0qO!BVQ7[O1G0qOOQ?Mp1G5w1G5wO!ArQ?MxO1G0ZOOQO1G0j1G0jO%[Q^O1G0jO$?OQ?MxO1G0jO$?ZQ?MxO1G0jO!A}Q`O1G0ZOCrQ`O1G0ZO$?iQ?MxO1G0jOOQO1G0Z1G0ZO$?}Q?NdO1G0jPOOO-EzO$@kQWO1G5uO$@sQWO1G6TO$@{QrO1G6UO9WQWO,5?QO$AVQ?NdO1G6RO%[Q^O1G6RO$AgQ?MxO1G6RO$AxQWO1G6QO$AxQWO1G6QO9WQWO1G6QO$BQQWO,5?TO9WQWO,5?TOOQO,5?T,5?TO$BfQWO,5?TO$)nQWO,5?TOOQO-E[OOQU,5>[,5>[O%[Q^O'#HqO%:PQWO'#HsOOQU,5>b,5>bO9WQWO,5>bOOQU,5>d,5>dOOQU7+)f7+)fOOQU7+)l7+)lOOQU7+)p7+)pOOQU7+)r7+)rO%:UQ`O1G5wO%:jQ07bO1G0wO%:tQWO1G0wOOQO1G/p1G/pO%;PQ07bO1G/pO>tQWO1G/pO!(oQ^O'#DjOOQO,5>{,5>{OOQO-E<_-E<_OOQO,5?R,5?ROOQO-EtQWO7+&]O!A}Q`O7+&]OOQO7+%u7+%uO$?}Q?NdO7+&UOOQO7+&U7+&UO%[Q^O7+&UO%;ZQ?MxO7+&UO!ArQ?MxO7+%uO!A}Q`O7+%uO%;fQ?MxO7+&UO%;tQ?NdO7++mO%[Q^O7++mO%|O%[Q^O,5>|OOQO-E<`-E<`O%HZQWO1G5xOOQ?Mr<]OOQU,5>_,5>_O&;mQWO1G3|O9WQWO7+&cO!(oQ^O7+&cOOQO7+%[7+%[O&;rQ07bO1G6UO>tQWO7+%[OOQ?Mr<tQWO<tQWO7+)hO'){QWO<{AN>{O%[Q^OAN?[OOQO<]Q7[OG27QOOQO<mQ07bO7+*jOOQUG27iG27iO&:OQWOG27iO!&_Q7[OG27iOOQUG27kG27kO9hQ?MxOG27kOOQUG27sG27sO'>wQ07bOG25TOOQOLD*bLD*bOOQU!$(!Y!$(!YO#&wQWO!$(!YO!&_Q7[O!$(!YO'?RQ?NdOG27QOOQ?MpG26uG26uOOQULD-TLD-TO&:OQWOLD-TOOQULD-VLD-VOOQU!)9Et!)9EtO#&wQWO!)9EtOOQU!$(!o!$(!oOOQU!.K;`!.K;`O'AaQ07bOG27QO!(oQ^O'#DwO1PQWO'#EUO'CSQrO'#JmO'CZQMnO'#DsO'CbQ^O'#D{O'CiQrO'#CiO'FPQrO'#CiO!(oQ^O'#D}O'FaQ^O,5;WO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O'#IlO'HdQWO,5kOh%WOk+aO![']O%f+`O~O!d+cOa(WX![(WX'u(WX!Y(WX~Oa%lO![XO'u%lO~Oh%WO!i%cO~Oh%WO!i%cO(O%eO~O!d#vO#h(tO~Ob+nO%g+oO(O+kO(QTO(TUO!Z)TP~O!Y+pO`)SX~O[+tO~O`+uO~O![%}O(O%eO(P!lO`)SP~Oh%WO#]+zO~Oh%WOk+}O![$}O~O![,PO~O},RO![XO~O%k%tO~O!u,WO~Oe,]O~Ob,^O(O#nO(QTO(TUO!Z)RP~Oe%{O~O%g!QO(O&WO~P=RO[,cO`,bO~OPYOQYOSfOdzOeyOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO!fuO!iZO!lYO!mYO!nYO!pvO!uxO!y]O%e}O(QTO(TUO([VO(j[O(yiO~O![!eO!r!gO$V!kO(O!dO~P!EkO`,bOa%lO'u%lO~OPYOQYOSfOd!jOe!iOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![!eO!fuO!iZO!lYO!mYO!nYO!pvO!u!hO$V!kO(O!dO(QTO(TUO([VO(j[O(yiO~Oa,hO!rwO#t!OO%i!OO%j!OO%k!OO~P!HTO!i&lO~O&Y,nO~O![,pO~O&k,rO&m,sOP&haQ&haS&haY&haa&had&hae&ham&hao&hap&haq&haw&hay&ha{&ha!P&ha!T&ha!U&ha![&ha!f&ha!i&ha!l&ha!m&ha!n&ha!p&ha!r&ha!u&ha!y&ha#t&ha$V&ha%e&ha%g&ha%i&ha%j&ha%k&ha%n&ha%p&ha%s&ha%t&ha%v&ha&S&ha&Y&ha&[&ha&^&ha&`&ha&c&ha&i&ha&o&ha&q&ha&s&ha&u&ha&w&ha's&ha(O&ha(Q&ha(T&ha([&ha(j&ha(y&ha!Z&ha&a&hab&ha&f&ha~O(O,xO~Oh!bX!Y!OX!Z!OX!d!OX!d!bX!i!bX#]!OX~O!Y!bX!Z!bX~P# ZO!d,}O#],|Oh(eX!Y#eX!Y(eX!Z#eX!Z(eX!d(eX!i(eX~Oh%WO!d-PO!i%cO!Y!^X!Z!^X~Op!nO!P!oO(QTO(TUO(`!mO~OP:kOQ:kOSfOdkOg'XX!Y'XX~P!+hO!Y.wOg(ka~OSfO![3uO$c3vO~O!Z3zO~Os3{O~P#.aOa$lq!Y$lq'u$lq's$lq!V$lq!h$lqs$lq![$lq%f$lq!d$lq~P!9mO!V3|O~P#.aO}){O!P)|O(u%QOk'ea(t'ea!Y'ea#]'ea~Og'ea#}'ea~P%+]O}){O!P)|Ok'ga(t'ga(u'ga!Y'ga#]'ga~Og'ga#}'ga~P%,OO(m$ZO~P#.aO!VfX!V$xX!YfX!Y$xX!d%PX#]fX~P!/gO(O;lO~P!1_OmkO(O4OO~P.iO!P%fO!X4QO![%gO(O%eO!Y'aX!h'aX~O!Y/hO!h(za~O!Y/hO!d#vO!h(za~O!Y/hO!d#vO(m'mO!h(za~Og$zi!Y$zi#]$zi#}$zi~P!0pO!X4YO!V'cX!Y'cX~P!3^O!Y/pO!V({a~O!Y/pO!V({a~P#.aO!d#vO#s4bO~Oo4eO!d#vO(m'mO~O(t%OOk%^i}%^i!P%^i(u%^i!Y%^i#]%^i~Og%^i#}%^i~P%0^O(u%QOk%`i}%`i!P%`i(t%`i!Y%`i#]%`i~Og%`i#}%`i~P%1POg(Yi!Y(Yi~P!0pO#]4lOg(Yi!Y(Yi~P!0pO!h4oO~Oa$mq!Y$mq'u$mq's$mq!V$mq!h$mqs$mq![$mq%f$mq!d$mq~P!9mO!V4sO~O!Y4tO![(|X~P#.aOa$xX![$xX%Z]X'u$xX!Y$xX~P!/gO%Z4wOalXklX}lX!PlX![lX'ulX(tlX(ulX!YlX~O%Z4wO~Ob4}O%g5OO(O+kO(QTO(TUO!Y'pX!Z'pX~O!Y0wO!Z)Ta~O[5SO~O`5TO~Oa%lO'u%lO~P#.aO![$}O~P#.aO!Y5]O#]5_O!Z)QX~O!Z5`O~Op!nO!P5aO!_!yO!`!vO!a!vO!y:lO#Q!pO#R!pO#S!pO#T!pO#U!pO#X5fO#Y!zO(P!lO(QTO(TUO(`!mO(j!sO~O!Z5eO~P%6ZOk5kO![1aO%f5jO~Oh%WOk5kO![1aO%f5jO~Ob5rO(O#nO(QTO(TUO!Y'oX!Z'oX~O!Y1lO!Z)Ra~O(QTO(TUO(`5tO~O`5xO~O#s5{O&W5|O~PMlO!h5}O~P%[Oa6PO~Oa6PO~P%[Ob2SO!Z6UO&f2RO~P`O!d6WO~O!d6YOh(ei!Y(ei!Z(ei!d(ei!i(ei~O!Y#ei!Z#ei~P#D_O#]6ZO!Y#ei!Z#ei~O!Y!^i!Z!^i~P#D_Oa%lO#]6dO'u%lO~Oa%lO!d#vO#]6dO'u%lO~O!Y(oq!h(oqa(oq'u(oq~P!9mO!Y(fO!h(nq~O!P%fO![%gO#g6kO(O%eO~O![']O%f6nO~Ok6rO![']O%f6nO~O#h'eaP'eaR'ea['eaa'eao'ea!i'ea!m'ea#O'ea#k'ea#l'ea#m'ea#n'ea#o'ea#p'ea#q'ea#r'ea#s'ea#u'ea#w'ea#y'ea#z'ea'u'ea(['ea(m'ea!h'ea!V'ea's'eas'ea!['ea%f'ea!d'ea~P%+]O#h'gaP'gaR'ga['gaa'gao'ga!i'ga!m'ga#O'ga#k'ga#l'ga#m'ga#n'ga#o'ga#p'ga#q'ga#r'ga#s'ga#u'ga#w'ga#y'ga#z'ga'u'ga(['ga(m'ga!h'ga!V'ga's'gas'ga!['ga%f'ga!d'ga~P%,OO#h$ziP$ziR$zi[$zia$zio$zi!Y$zi!i$zi!m$zi#O$zi#k$zi#l$zi#m$zi#n$zi#o$zi#p$zi#q$zi#r$zi#s$zi#u$zi#w$zi#y$zi#z$zi'u$zi([$zi(m$zi!h$zi!V$zi's$zi#]$zis$zi![$zi%f$zi!d$zi~P#.aO#h%^iP%^iR%^i[%^ia%^io%^i!i%^i!m%^i#O%^i#k%^i#l%^i#m%^i#n%^i#o%^i#p%^i#q%^i#r%^i#s%^i#u%^i#w%^i#y%^i#z%^i'u%^i([%^i(m%^i!h%^i!V%^i's%^is%^i![%^i%f%^i!d%^i~P%0^O#h%`iP%`iR%`i[%`ia%`io%`i!i%`i!m%`i#O%`i#k%`i#l%`i#m%`i#n%`i#o%`i#p%`i#q%`i#r%`i#s%`i#u%`i#w%`i#y%`i#z%`i'u%`i([%`i(m%`i!h%`i!V%`i's%`is%`i![%`i%f%`i!d%`i~P%1PO!Y'Ua!h'Ua~P!9mO!Y.lO!h(fi~O#}#`i!Y#`i!Z#`i~P#D_OP$]OR#zO}#yO!P#{O!i#xO!m$]O([VO[#jio#ji#O#ji#l#ji#m#ji#n#ji#o#ji#p#ji#q#ji#r#ji#s#ji#u#ji#w#ji#y#ji#z#ji#}#ji(m#ji(t#ji(u#ji!Y#ji!Z#ji~O#k#ji~P%HpO#k:tO~P%HpOP$]OR#zO}#yO!P#{O!i#xO!m$]O#k:tO#l:uO#m:uO#n:uO([VO[#ji#O#ji#o#ji#p#ji#q#ji#r#ji#s#ji#u#ji#w#ji#y#ji#z#ji#}#ji(m#ji(t#ji(u#ji!Y#ji!Z#ji~Oo#ji~P%JxOo:vO~P%JxOP$]OR#zOo:vO}#yO!P#{O!i#xO!m$]O#k:tO#l:uO#m:uO#n:uO#o:wO([VO#u#ji#w#ji#y#ji#z#ji#}#ji(m#ji(t#ji(u#ji!Y#ji!Z#ji~O[#ji#O#ji#p#ji#q#ji#r#ji#s#ji~P%MQO[;SO#O:xO#p:xO#q:xO#r;RO#s:xO~P%MQOP$]OR#zO[;SOo:vO}#yO!P#{O!i#xO!m$]O#O:xO#k:tO#l:uO#m:uO#n:uO#o:wO#p:xO#q:xO#r;RO#s:xO#u:yO([VO(u#}O#y#ji#z#ji#}#ji(m#ji(t#ji!Y#ji!Z#ji~O#w:{O~P& iO#w#ji~P& iOP$]OR#zO[;SOo:vO}#yO!P#{O!i#xO!m$]O#O:xO#k:tO#l:uO#m:uO#n:uO#o:wO#p:xO#q:xO#r;RO#s:xO#u:yO([VO#y#ji#z#ji#}#ji(m#ji!Y#ji!Z#ji~O#w#ji(t#ji(u#ji~P&#qO#w:{O(t#|O(u#}O~P&#qOP$]OR#zO[;SOo:vO}#yO!P#{O!i#xO!m$]O#O:xO#k:tO#l:uO#m:uO#n:uO#o:wO#p:xO#q:xO#r;RO#s:xO#u:yO#w:{O#y:}O([VO(t#|O(u#}O~O#z#ji#}#ji(m#ji!Y#ji!Z#ji~P&&POa#{y!Y#{y'u#{y's#{y!V#{y!h#{ys#{y![#{y%f#{y!d#{y~P!9mOk < TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:376,context:Ure,nodeProps:[["isolate",-8,5,6,14,34,36,48,50,52,""],["group",-26,9,17,19,65,204,208,212,213,215,218,221,231,233,239,241,243,245,248,254,260,262,264,266,268,270,271,"Statement",-34,13,14,29,32,33,39,48,51,52,54,59,67,69,73,77,79,81,82,107,108,117,118,135,138,140,141,142,143,144,146,147,166,167,169,"Expression",-23,28,30,34,38,40,42,171,173,175,176,178,179,180,182,183,184,186,187,188,198,200,202,203,"Type",-3,85,100,106,"ClassItem"],["openedBy",23,"<",35,"InterpolationStart",53,"[",57,"{",70,"(",159,"JSXStartCloseTag"],["closedBy",24,">",37,"InterpolationEnd",47,"]",58,"}",71,")",164,"JSXEndTag"]],propSources:[Zre],skippedNodes:[0,5,6,274],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$h&j(U!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(U!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$h&j(RpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU(RpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Rp(U!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z07[+rq$h&j(Rp(U!b'w0/lOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z07[.ST(S#S$h&j'x0/lO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c07[.n_$h&j(Rp(U!b'x0/lOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)3p/x`$h&j!m),Q(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW1V`#u(Ch$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW2d_#u(Ch$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At3l_(Q':f$h&j(U!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$h&j(U!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$h&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$c`$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$c``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$c`$h&j(U!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ(U!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$c`(U!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k%9[:hh$h&j(Rp(U!bOY%ZYZ&cZq%Zqr`#P#o`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXWS$h&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSWSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWWS(U!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]WS$h&j(RpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWWS(RpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYWS(Rp(U!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%l^!Q^$h&j!U7`OY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@c!_!}!=y!}#O!CW#O#P!Dy#P#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y|#X#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#k!>|#k#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&c7`!@hX!U7`OY!@cZ!P!@c!P!Q!AT!Q!}!@c!}#O!Ar#O#P!Bq#P;'S!@c;'S;=`!CQ<%lO!@c7`!AYW!U7`#W#X!AT#Z#[!AT#]#^!AT#a#b!AT#g#h!AT#i#j!AT#j#k!AT#m#n!AT7`!AuVOY!ArZ#O!Ar#O#P!B[#P#Q!@c#Q;'S!Ar;'S;=`!Bk<%lO!Ar7`!B_SOY!ArZ;'S!Ar;'S;=`!Bk<%lO!Ar7`!BnP;=`<%l!Ar7`!BtSOY!@cZ;'S!@c;'S;=`!CQ<%lO!@c7`!CTP;=`<%l!@c^!Ezl$h&j(U!b!U7`OY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#W&}#W#X!Eq#X#Z&}#Z#[!Eq#[#]&}#]#^!Eq#^#a&}#a#b!Eq#b#g&}#g#h!Eq#h#i&}#i#j!Eq#j#k!Eq#k#m&}#m#n!Eq#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}8r!GyZ(U!b!U7`OY!GrZw!Grwx!@cx!P!Gr!P!Q!Hl!Q!}!Gr!}#O!JU#O#P!Bq#P;'S!Gr;'S;=`!J|<%lO!Gr8r!Hse(U!b!U7`OY'}Zw'}x#O'}#P#W'}#W#X!Hl#X#Z'}#Z#[!Hl#[#]'}#]#^!Hl#^#a'}#a#b!Hl#b#g'}#g#h!Hl#h#i'}#i#j!Hl#j#k!Hl#k#m'}#m#n!Hl#n;'S'};'S;=`(f<%lO'}8r!JZX(U!bOY!JUZw!JUwx!Arx#O!JU#O#P!B[#P#Q!Gr#Q;'S!JU;'S;=`!Jv<%lO!JU8r!JyP;=`<%l!JU8r!KPP;=`<%l!Gr>^!KZ^$h&j(U!bOY!KSYZ&cZw!KSwx!CWx!^!KS!^!_!JU!_#O!KS#O#P!DR#P#Q!^!LYP;=`<%l!KS>^!L`P;=`<%l!_#c#d#Bq#d#l%Z#l#m#Es#m#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#>j_$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#?rd$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#A]f$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Bzc$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Dbe$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#E|g$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Gpi$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x#Il_!d$b$h&j#})Lv(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)[#Jv_al$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f#LS^h#)`#O-qre[t]||-1},{term:338,get:t=>Yre[t]||-1},{term:92,get:t=>Gre[t]||-1}],tokenPrec:14793}),kB=[di("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),di("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),di("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),di("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),di("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),di(`try { +`);i>-1&&(n=n.slice(0,i))}return e+n.length<=this.to?n:n.slice(0,this.to-e)}nextLine(){let e=this.parsedPos,n=this.lineAfter(e),i=e+n.length;for(let r=this.rangeIndex;;){let o=this.ranges[r].to;if(o>=i||(n=n.slice(0,o-(i-n.length)),r++,r==this.ranges.length))break;let s=this.ranges[r].from,a=this.lineAfter(s);n+=a,i=s+a.length}return{line:n,end:i}}skipGapsTo(e,n,i){for(;;){let r=this.ranges[this.rangeIndex].to,o=e+n;if(i>0?r>o:r>=o)break;let s=this.ranges[++this.rangeIndex].from;n+=s-r}return n}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to1){o=this.skipGapsTo(n,o,1),n+=o;let s=this.chunk.length;o=this.skipGapsTo(i,o,-1),i+=o,r+=this.chunk.length-s}return this.chunk.push(e,n,i,r),o}parseLine(e){let{line:n,end:i}=this.nextLine(),r=0,{streamParser:o}=this.lang,s=new e4(n,e?e.state.tabSize:4,e?fu(e.state):2);if(s.eol())o.blankLine(this.state,s.indentUnit);else for(;!s.eol();){let a=n4(o.token,s,this.state);if(a&&(r=this.emitToken(this.lang.tokenTable.resolve(a),this.parsedPos+s.start,this.parsedPos+s.pos,4,r)),s.start>1e4)break}this.parsedPos=i,this.moveRangeIndex(),this.parsedPose.start)return r}throw new Error("Stream parser failed to advance stream.")}const bx=Object.create(null),sp=[nn.none],Qte=new Yd(sp),tR=[],nR=Object.create(null),i4=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])i4[t]=o4(bx,e);class r4{constructor(e){this.extra=e,this.table=Object.assign(Object.create(null),i4)}resolve(e){return e?this.table[e]||(this.table[e]=o4(this.extra,e)):0}}const Fte=new r4(bx);function zy(t,e){tR.indexOf(t)>-1||(tR.push(t),console.warn(e))}function o4(t,e){let n=[];for(let a of e.split(" ")){let l=[];for(let u of a.split(".")){let c=t[u]||R[u];c?typeof c=="function"?l.length?l=l.map(c):zy(u,`Modifier ${u} used at start of tag`):l.length?zy(u,`Tag ${u} used as modifier`):l=Array.isArray(c)?c:[c]:zy(u,`Unknown highlighting tag ${u}`)}for(let u of l)n.push(u)}if(!n.length)return 0;let i=e.replace(/ /g,"_"),r=i+" "+n.map(a=>a.id),o=nR[r];if(o)return o.id;let s=nR[r]=nn.define({id:sp.length,name:i,props:[Iu({[i]:n})]});return sp.push(s),s.id}function zte(t){let e=nn.define({id:sp.length,name:"Document",props:[Ys.add(()=>t)],top:!0});return sp.push(e),e}_t.RTL,_t.LTR;class yx{constructor(e,n,i){this.state=e,this.pos=n,this.explicit=i,this.abortListeners=[]}tokenBefore(e){let n=Ot(this.state).resolveInner(this.pos,-1);for(;n&&e.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(e){let n=this.state.doc.lineAt(this.pos),i=Math.max(n.from,this.pos-250),r=n.text.slice(i-n.from,this.pos-n.from),o=r.search(a4(e,!1));return o<0?null:{from:i+o,to:this.pos,text:r.slice(o)}}get aborted(){return this.abortListeners==null}addEventListener(e,n){e=="abort"&&this.abortListeners&&this.abortListeners.push(n)}}function iR(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function Hte(t){let e=Object.create(null),n=Object.create(null);for(let{label:r}of t){e[r[0]]=!0;for(let o=1;otypeof r=="string"?{label:r}:r),[n,i]=e.every(r=>/^\w+$/.test(r.label))?[/\w*$/,/\w+$/]:Hte(e);return r=>{let o=r.matchBefore(i);return o||r.explicit?{from:o?o.from:r.pos,options:e,validFor:n}:null}}function Ute(t,e){return n=>{for(let i=Ot(n.state).resolveInner(n.pos,-1);i;i=i.parent){if(t.indexOf(i.name)>-1)return null;if(i.type.isTop)break}return e(n)}}class rR{constructor(e,n,i,r){this.completion=e,this.source=n,this.match=i,this.score=r}}function aa(t){return t.selection.main.from}function a4(t,e){var n;let{source:i}=t,r=e&&i[0]!="^",o=i[i.length-1]!="$";return!r&&!o?t:new RegExp(`${r?"^":""}(?:${i})${o?"$":""}`,(n=t.flags)!==null&&n!==void 0?n:t.ignoreCase?"i":"")}const vx=fs.define();function Wte(t,e,n,i){let{main:r}=t.selection,o=n-r.from,s=i-r.from;return Object.assign(Object.assign({},t.changeByRange(a=>a!=r&&n!=i&&t.sliceDoc(a.from+o,a.from+s)!=t.sliceDoc(n,i)?{range:a}:{changes:{from:a.from+o,to:i==r.from?a.to:a.from+s,insert:e},range:Y.cursor(a.from+o+e.length)})),{scrollIntoView:!0,userEvent:"input.complete"})}const oR=new WeakMap;function Vte(t){if(!Array.isArray(t))return t;let e=oR.get(t);return e||oR.set(t,e=s4(t)),e}const q0=De.define(),ap=De.define();class jte{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let n=0;n=48&&x<=57||x>=97&&x<=122?2:x>=65&&x<=90?1:0:(_=Kk(x))!=_.toLowerCase()?1:_!=_.toUpperCase()?2:0;(!v||w==1&&y||k==0&&w!=0)&&(n[d]==x||i[d]==x&&(h=!0)?s[d++]=v:s.length&&(b=!1)),k=w,v+=nr(x)}return d==l&&s[0]==0&&b?this.result(-100+(h?-200:0),s,e):p==l&&m==0?this.ret(-200-e.length+(O==e.length?0:-100),[0,O]):a>-1?this.ret(-700-e.length,[a,a+this.pattern.length]):p==l?this.ret(-900-e.length,[m,O]):d==l?this.result(-100+(h?-200:0)+-700+(b?0:-1100),s,e):n.length==2?null:this.result((r[0]?-700:0)+-200+-1100,r,e)}result(e,n,i){let r=[],o=0;for(let s of n){let a=s+(this.astral?nr(kn(i,s)):1);o&&r[o-1]==s?r[o-1]=a:(r[o++]=s,r[o++]=a)}return this.ret(e-i.length,r)}}class Xte{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:Zte,filterStrict:!1,compareCompletions:(e,n)=>e.label.localeCompare(n.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,n)=>e&&n,closeOnBlur:(e,n)=>e&&n,icons:(e,n)=>e&&n,tooltipClass:(e,n)=>i=>sR(e(i),n(i)),optionClass:(e,n)=>i=>sR(e(i),n(i)),addToOptions:(e,n)=>e.concat(n),filterStrict:(e,n)=>e||n})}});function sR(t,e){return t?e?t+" "+e:t:e}function Zte(t,e,n,i,r,o){let s=t.textDirection==_t.RTL,a=s,l=!1,u="top",c,d,h=e.left-r.left,p=r.right-e.right,m=i.right-i.left,O=i.bottom-i.top;if(a&&h=O||v>e.top?c=n.bottom-e.top:(u="bottom",c=e.bottom-n.top)}let y=(e.bottom-e.top)/o.offsetHeight,b=(e.right-e.left)/o.offsetWidth;return{style:`${u}: ${c/y}px; max-width: ${d/b}px`,class:"cm-completionInfo-"+(l?s?"left-narrow":"right-narrow":a?"left":"right")}}function qte(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(n){let i=document.createElement("div");return i.classList.add("cm-completionIcon"),n.type&&i.classList.add(...n.type.split(/\s+/g).map(r=>"cm-completionIcon-"+r)),i.setAttribute("aria-hidden","true"),i},position:20}),e.push({render(n,i,r,o){let s=document.createElement("span");s.className="cm-completionLabel";let a=n.displayLabel||n.label,l=0;for(let u=0;ul&&s.appendChild(document.createTextNode(a.slice(l,c)));let h=s.appendChild(document.createElement("span"));h.appendChild(document.createTextNode(a.slice(c,d))),h.className="cm-completionMatchedText",l=d}return ln.position-i.position).map(n=>n.render)}function Hy(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let r=Math.floor(e/n);return{from:r*n,to:(r+1)*n}}let i=Math.floor((t-e)/n);return{from:t-(i+1)*n,to:t-i*n}}class Yte{constructor(e,n,i){this.view=e,this.stateField=n,this.applyCompletion=i,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:l=>this.placeInfo(l),key:this},this.space=null,this.currentClass="";let r=e.state.field(n),{options:o,selected:s}=r.open,a=e.state.facet(En);this.optionContent=qte(a),this.optionClass=a.optionClass,this.tooltipClass=a.tooltipClass,this.range=Hy(o.length,s,a.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",l=>{let{options:u}=e.state.field(n).open;for(let c=l.target,d;c&&c!=this.dom;c=c.parentNode)if(c.nodeName=="LI"&&(d=/-(\d+)$/.exec(c.id))&&+d[1]{let u=e.state.field(this.stateField,!1);u&&u.tooltip&&e.state.facet(En).closeOnBlur&&l.relatedTarget!=e.contentDOM&&e.dispatch({effects:ap.of(null)})}),this.showOptions(o,r.id)}mount(){this.updateSel()}showOptions(e,n){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,n,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var n;let i=e.state.field(this.stateField),r=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),i!=r){let{options:o,selected:s,disabled:a}=i.open;(!r.open||r.open.options!=o)&&(this.range=Hy(o.length,s,e.state.facet(En).maxRenderedOptions),this.showOptions(o,i.id)),this.updateSel(),a!=((n=r.open)===null||n===void 0?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!a)}}updateTooltipClass(e){let n=this.tooltipClass(e);if(n!=this.currentClass){for(let i of this.currentClass.split(" "))i&&this.dom.classList.remove(i);for(let i of n.split(" "))i&&this.dom.classList.add(i);this.currentClass=n}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),n=e.open;if((n.selected>-1&&n.selected=this.range.to)&&(this.range=Hy(n.options.length,n.selected,this.view.state.facet(En).maxRenderedOptions),this.showOptions(n.options,e.id)),this.updateSelectedOption(n.selected)){this.destroyInfo();let{completion:i}=n.options[n.selected],{info:r}=i;if(!r)return;let o=typeof r=="string"?document.createTextNode(r):r(i);if(!o)return;"then"in o?o.then(s=>{s&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(s,i)}).catch(s=>mi(this.view.state,s,"completion info")):this.addInfoPane(o,i)}}addInfoPane(e,n){this.destroyInfo();let i=this.info=document.createElement("div");if(i.className="cm-tooltip cm-completionInfo",e.nodeType!=null)i.appendChild(e),this.infoDestroy=null;else{let{dom:r,destroy:o}=e;i.appendChild(r),this.infoDestroy=o||null}this.dom.appendChild(i),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let n=null;for(let i=this.list.firstChild,r=this.range.from;i;i=i.nextSibling,r++)i.nodeName!="LI"||!i.id?r--:r==e?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),n=i):i.hasAttribute("aria-selected")&&i.removeAttribute("aria-selected");return n&&Kte(this.list,n),n}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let n=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),o=this.space;if(!o){let s=this.dom.ownerDocument.defaultView||window;o={left:0,top:0,right:s.innerWidth,bottom:s.innerHeight}}return r.top>Math.min(o.bottom,n.bottom)-10||r.bottomi.from||i.from==0))if(o=h,typeof u!="string"&&u.header)r.appendChild(u.header(u));else{let p=r.appendChild(document.createElement("completion-section"));p.textContent=h}}const c=r.appendChild(document.createElement("li"));c.id=n+"-"+s,c.setAttribute("role","option");let d=this.optionClass(a);d&&(c.className=d);for(let h of this.optionContent){let p=h(a,this.view.state,this.view,l);p&&c.appendChild(p)}}return i.from&&r.classList.add("cm-completionListIncompleteTop"),i.tonew Yte(n,t,e)}function Kte(t,e){let n=t.getBoundingClientRect(),i=e.getBoundingClientRect(),r=n.height/t.offsetHeight;i.topn.bottom&&(t.scrollTop+=(i.bottom-n.bottom)/r)}function aR(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function Jte(t,e){let n=[],i=null,r=u=>{n.push(u);let{section:c}=u.completion;if(c){i||(i=[]);let d=typeof c=="string"?c:c.name;i.some(h=>h.name==d)||i.push(typeof c=="string"?{name:d}:c)}},o=e.facet(En);for(let u of t)if(u.hasResult()){let c=u.result.getMatch;if(u.result.filter===!1)for(let d of u.result.options)r(new rR(d,u.source,c?c(d):[],1e9-n.length));else{let d=e.sliceDoc(u.from,u.to),h,p=o.filterStrict?new Xte(d):new jte(d);for(let m of u.result.options)if(h=p.match(m.label)){let O=m.displayLabel?c?c(m,h.matched):[]:h.matched;r(new rR(m,u.source,O,h.score+(m.boost||0)))}}}if(i){let u=Object.create(null),c=0,d=(h,p)=>{var m,O;return((m=h.rank)!==null&&m!==void 0?m:1e9)-((O=p.rank)!==null&&O!==void 0?O:1e9)||(h.named.score-c.score||l(c.completion,d.completion))){let c=u.completion;!a||a.label!=c.label||a.detail!=c.detail||a.type!=null&&c.type!=null&&a.type!=c.type||a.apply!=c.apply||a.boost!=c.boost?s.push(u):aR(u.completion)>aR(a)&&(s[s.length-1]=u),a=u.completion}return s}class Dc{constructor(e,n,i,r,o,s){this.options=e,this.attrs=n,this.tooltip=i,this.timestamp=r,this.selected=o,this.disabled=s}setSelected(e,n){return e==this.selected||e>=this.options.length?this:new Dc(this.options,lR(n,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,n,i,r,o){let s=Jte(e,n);if(!s.length)return r&&e.some(l=>l.state==1)?new Dc(r.options,r.attrs,r.tooltip,r.timestamp,r.selected,!0):null;let a=n.facet(En).selectOnOpen?0:-1;if(r&&r.selected!=a&&r.selected!=-1){let l=r.options[r.selected].completion;for(let u=0;uu.hasResult()?Math.min(l,u.from):l,1e8),create:rne,above:o.aboveCursor},r?r.timestamp:Date.now(),a,!1)}map(e){return new Dc(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class Y0{constructor(e,n,i){this.active=e,this.id=n,this.open=i}static start(){return new Y0(nne,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:n}=e,i=n.facet(En),o=(i.override||n.languageDataAt("autocomplete",aa(n)).map(Vte)).map(a=>(this.active.find(u=>u.source==a)||new Gn(a,this.active.some(u=>u.state!=0)?1:0)).update(e,i));o.length==this.active.length&&o.every((a,l)=>a==this.active[l])&&(o=this.active);let s=this.open;s&&e.docChanged&&(s=s.map(e.changes)),e.selection||o.some(a=>a.hasResult()&&e.changes.touchesRange(a.from,a.to))||!ene(o,this.active)?s=Dc.build(o,n,this.id,s,i):s&&s.disabled&&!o.some(a=>a.state==1)&&(s=null),!s&&o.every(a=>a.state!=1)&&o.some(a=>a.hasResult())&&(o=o.map(a=>a.hasResult()?new Gn(a.source,0):a));for(let a of e.effects)a.is(u4)&&(s=s&&s.setSelected(a.value,this.id));return o==this.active&&s==this.open?this:new Y0(o,this.id,s)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:tne}}function ene(t,e){if(t==e)return!0;for(let n=0,i=0;;){for(;n-1&&(n["aria-activedescendant"]=t+"-"+e),n}const nne=[];function QS(t,e){if(t.isUserEvent("input.complete")){let n=t.annotation(vx);if(n&&e.activateOnCompletion(n))return"input"}return t.isUserEvent("input.type")?"input":t.isUserEvent("delete.backward")?"delete":null}class Gn{constructor(e,n,i=-1){this.source=e,this.state=n,this.explicitPos=i}hasResult(){return!1}update(e,n){let i=QS(e,n),r=this;i?r=r.handleUserEvent(e,i,n):e.docChanged?r=r.handleChange(e):e.selection&&r.state!=0&&(r=new Gn(r.source,0));for(let o of e.effects)if(o.is(q0))r=new Gn(r.source,1,o.value?aa(e.state):-1);else if(o.is(ap))r=new Gn(r.source,0);else if(o.is(l4))for(let s of o.value)s.source==r.source&&(r=s);return r}handleUserEvent(e,n,i){return n=="delete"||!i.activateOnTyping?this.map(e.changes):new Gn(this.source,1)}handleChange(e){return e.changes.touchesRange(aa(e.startState))?new Gn(this.source,0):this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new Gn(this.source,this.state,e.mapPos(this.explicitPos))}}class Jc extends Gn{constructor(e,n,i,r,o){super(e,2,n),this.result=i,this.from=r,this.to=o}hasResult(){return!0}handleUserEvent(e,n,i){var r;let o=this.result;o.map&&!e.changes.empty&&(o=o.map(o,e.changes));let s=e.changes.mapPos(this.from),a=e.changes.mapPos(this.to,1),l=aa(e.state);if((this.explicitPos<0?l<=s:la||!o||n=="delete"&&aa(e.startState)==this.from)return new Gn(this.source,n=="input"&&i.activateOnTyping?1:0);let u=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos);return ine(o.validFor,e.state,s,a)?new Jc(this.source,u,o,s,a):o.update&&(o=o.update(o,s,a,new yx(e.state,l,u>=0)))?new Jc(this.source,u,o,o.from,(r=o.to)!==null&&r!==void 0?r:aa(e.state)):new Gn(this.source,1,u)}handleChange(e){return e.changes.touchesRange(this.from,this.to)?new Gn(this.source,0):this.map(e.changes)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new Jc(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new Gn(this.source,0)}}function ine(t,e,n,i){if(!t)return!1;let r=e.sliceDoc(n,i);return typeof t=="function"?t(r,n,i,e):a4(t,!0).test(r)}const l4=De.define({map(t,e){return t.map(n=>n.map(e))}}),u4=De.define(),fi=gn.define({create(){return Y0.start()},update(t,e){return t.update(e)},provide:t=>[cx.from(t,e=>e.tooltip),le.contentAttributes.from(t,e=>e.attrs)]});function Sx(t,e){const n=e.completion.apply||e.completion.label;let i=t.state.field(fi).active.find(r=>r.source==e.source);return i instanceof Jc?(typeof n=="string"?t.dispatch(Object.assign(Object.assign({},Wte(t.state,n,i.from,i.to)),{annotations:vx.of(e.completion)})):n(t,e.completion,i.from,i.to),!0):!1}const rne=Gte(fi,Sx);function Km(t,e="option"){return n=>{let i=n.state.field(fi,!1);if(!i||!i.open||i.open.disabled||Date.now()-i.open.timestamp-1?i.open.selected+r*(t?1:-1):t?0:s-1;return a<0?a=e=="page"?0:s-1:a>=s&&(a=e=="page"?s-1:0),n.dispatch({effects:u4.of(a)}),!0}}const one=t=>{let e=t.state.field(fi,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestampt.state.field(fi,!1)?(t.dispatch({effects:q0.of(!0)}),!0):!1,ane=t=>{let e=t.state.field(fi,!1);return!e||!e.active.some(n=>n.state!=0)?!1:(t.dispatch({effects:ap.of(null)}),!0)};class lne{constructor(e,n){this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const une=50,cne=1e3,dne=tn.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(fi).active)e.state==1&&this.startQuery(e)}update(t){let e=t.state.field(fi),n=t.state.facet(En);if(!t.selectionSet&&!t.docChanged&&t.startState.field(fi)==e)return;let i=t.transactions.some(o=>(o.selection||o.docChanged)&&!QS(o,n));for(let o=0;oune&&Date.now()-s.time>cne){for(let a of s.context.abortListeners)try{a()}catch(l){mi(this.view.state,l)}s.context.abortListeners=null,this.running.splice(o--,1)}else s.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some(o=>o.effects.some(s=>s.is(q0)))&&(this.pendingStart=!0);let r=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(o=>o.state==1&&!this.running.some(s=>s.active.source==o.source))?setTimeout(()=>this.startUpdate(),r):-1,this.composing!=0)for(let o of t.transactions)QS(o,n)=="input"?this.composing=2:this.composing==2&&o.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(fi);for(let n of e.active)n.state==1&&!this.running.some(i=>i.active.source==n.source)&&this.startQuery(n)}startQuery(t){let{state:e}=this.view,n=aa(e),i=new yx(e,n,t.explicitPos==n),r=new lne(t,i);this.running.push(r),Promise.resolve(t.source(i)).then(o=>{r.context.aborted||(r.done=o||null,this.scheduleAccept())},o=>{this.view.dispatch({effects:ap.of(null)}),mi(this.view.state,o)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(En).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(En);for(let i=0;is.source==r.active.source);if(o&&o.state==1)if(r.done==null){let s=new Gn(r.active.source,0);for(let a of r.updates)s=s.update(a,n);s.state!=1&&e.push(s)}else this.startQuery(o)}e.length&&this.view.dispatch({effects:l4.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(fi,!1);if(e&&e.tooltip&&this.view.state.facet(En).closeOnBlur){let n=e.open&&_D(this.view,e.open.tooltip);(!n||!n.dom.contains(t.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:ap.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:q0.of(!1)}),20),this.composing=0}}}),hne=typeof navigator=="object"&&/Win/.test(navigator.platform),fne=hs.highest(le.domEventHandlers({keydown(t,e){let n=e.state.field(fi,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||t.key.length>1||t.ctrlKey&&!(hne&&t.altKey)||t.metaKey)return!1;let i=n.open.options[n.open.selected],r=n.active.find(s=>s.source==i.source),o=i.completion.commitCharacters||r.result.commitCharacters;return o&&o.indexOf(t.key)>-1&&Sx(e,i),!1}})),c4=le.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class pne{constructor(e,n,i,r){this.field=e,this.line=n,this.from=i,this.to=r}}class wx{constructor(e,n,i){this.field=e,this.from=n,this.to=i}map(e){let n=e.mapPos(this.from,-1,_n.TrackDel),i=e.mapPos(this.to,1,_n.TrackDel);return n==null||i==null?null:new wx(this.field,n,i)}}class kx{constructor(e,n){this.lines=e,this.fieldPositions=n}instantiate(e,n){let i=[],r=[n],o=e.doc.lineAt(n),s=/^\s*/.exec(o.text)[0];for(let l of this.lines){if(i.length){let u=s,c=/^\t*/.exec(l)[0].length;for(let d=0;dnew wx(l.field,r[l.line]+l.from,r[l.line]+l.to));return{text:i,ranges:a}}static parse(e){let n=[],i=[],r=[],o;for(let s of e.split(/\r\n?|\n/)){for(;o=/[#$]\{(?:(\d+)(?::([^}]*))?|([^}]*))\}/.exec(s);){let a=o[1]?+o[1]:null,l=o[2]||o[3]||"",u=-1;for(let c=0;c=u&&d.field++}r.push(new pne(u,i.length,o.index,o.index+l.length)),s=s.slice(0,o.index)+l+s.slice(o.index+o[0].length)}s=s.replace(/\\([{}])/g,(a,l,u)=>{for(let c of r)c.line==i.length&&c.from>u&&(c.from--,c.to--);return l}),i.push(s)}return new kx(i,r)}}let mne=Ee.widget({widget:new class extends ps{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),gne=Ee.mark({class:"cm-snippetField"});class Jd{constructor(e,n){this.ranges=e,this.active=n,this.deco=Ee.set(e.map(i=>(i.from==i.to?mne:gne).range(i.from,i.to)))}map(e){let n=[];for(let i of this.ranges){let r=i.map(e);if(!r)return null;n.push(r)}return new Jd(n,this.active)}selectionInsideField(e){return e.ranges.every(n=>this.ranges.some(i=>i.field==this.active&&i.from<=n.from&&i.to>=n.to))}}const Bp=De.define({map(t,e){return t&&t.map(e)}}),One=De.define(),lp=gn.define({create(){return null},update(t,e){for(let n of e.effects){if(n.is(Bp))return n.value;if(n.is(One)&&t)return new Jd(t.ranges,n.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>le.decorations.from(t,e=>e?e.deco:Ee.none)});function xx(t,e){return Y.create(t.filter(n=>n.field==e).map(n=>Y.range(n.from,n.to)))}function bne(t){let e=kx.parse(t);return(n,i,r,o)=>{let{text:s,ranges:a}=e.instantiate(n.state,r),l={changes:{from:r,to:o,insert:st.of(s)},scrollIntoView:!0,annotations:i?[vx.of(i),en.userEvent.of("input.complete")]:void 0};if(a.length&&(l.selection=xx(a,0)),a.some(u=>u.field>0)){let u=new Jd(a,0),c=l.effects=[Bp.of(u)];n.state.field(lp,!1)===void 0&&c.push(De.appendConfig.of([lp,kne,xne,c4]))}n.dispatch(n.state.update(l))}}function d4(t){return({state:e,dispatch:n})=>{let i=e.field(lp,!1);if(!i||t<0&&i.active==0)return!1;let r=i.active+t,o=t>0&&!i.ranges.some(s=>s.field==r+t);return n(e.update({selection:xx(i.ranges,r),effects:Bp.of(o?null:new Jd(i.ranges,r)),scrollIntoView:!0})),!0}}const yne=({state:t,dispatch:e})=>t.field(lp,!1)?(e(t.update({effects:Bp.of(null)})),!0):!1,vne=d4(1),Sne=d4(-1),wne=[{key:"Tab",run:vne,shift:Sne},{key:"Escape",run:yne}],uR=he.define({combine(t){return t.length?t[0]:wne}}),kne=hs.highest($p.compute([uR],t=>t.facet(uR)));function ci(t,e){return Object.assign(Object.assign({},e),{apply:bne(t)})}const xne=le.domEventHandlers({mousedown(t,e){let n=e.state.field(lp,!1),i;if(!n||(i=e.posAtCoords({x:t.clientX,y:t.clientY}))==null)return!1;let r=n.ranges.find(o=>o.from<=i&&o.to>=i);return!r||r.field==n.active?!1:(e.dispatch({selection:xx(n.ranges,r.field),effects:Bp.of(n.ranges.some(o=>o.field>r.field)?new Jd(n.ranges,r.field):null),scrollIntoView:!0}),!0)}}),up={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},jl=De.define({map(t,e){let n=e.mapPos(t,-1,_n.TrackAfter);return n??void 0}}),_x=new class extends au{};_x.startSide=1;_x.endSide=-1;const h4=gn.define({create(){return nt.empty},update(t,e){if(t=t.map(e.changes),e.selection){let n=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:i=>i>=n.from&&i<=n.to})}for(let n of e.effects)n.is(jl)&&(t=t.update({add:[_x.range(n.value,n.value+1)]}));return t}});function _ne(){return[Cne,h4]}const Uy="()[]{}<>";function f4(t){for(let e=0;e{if((Ene?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let r=t.state.selection.main;if(i.length>2||i.length==2&&nr(kn(i,0))==1||e!=r.from||n!=r.to)return!1;let o=Ane(t.state,i);return o?(t.dispatch(o),!0):!1}),Tne=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=p4(t,t.selection.main.head).brackets||up.brackets,r=null,o=t.changeByRange(s=>{if(s.empty){let a=Rne(t.doc,s.head);for(let l of i)if(l==a&&pb(t.doc,s.head)==f4(kn(l,0)))return{changes:{from:s.head-l.length,to:s.head+l.length},range:Y.cursor(s.head-l.length)}}return{range:r=s}});return r||e(t.update(o,{scrollIntoView:!0,userEvent:"delete.backward"})),!r},Pne=[{key:"Backspace",run:Tne}];function Ane(t,e){let n=p4(t,t.selection.main.head),i=n.brackets||up.brackets;for(let r of i){let o=f4(kn(r,0));if(e==r)return o==r?Lne(t,r,i.indexOf(r+r+r)>-1,n):Ine(t,r,o,n.before||up.before);if(e==o&&m4(t,t.selection.main.from))return $ne(t,r,o)}return null}function m4(t,e){let n=!1;return t.field(h4).between(0,t.doc.length,i=>{i==e&&(n=!0)}),n}function pb(t,e){let n=t.sliceString(e,e+2);return n.slice(0,nr(kn(n,0)))}function Rne(t,e){let n=t.sliceString(e-2,e);return nr(kn(n,0))==n.length?n:n.slice(1)}function Ine(t,e,n,i){let r=null,o=t.changeByRange(s=>{if(!s.empty)return{changes:[{insert:e,from:s.from},{insert:n,from:s.to}],effects:jl.of(s.to+e.length),range:Y.range(s.anchor+e.length,s.head+e.length)};let a=pb(t.doc,s.head);return!a||/\s/.test(a)||i.indexOf(a)>-1?{changes:{insert:e+n,from:s.head},effects:jl.of(s.head+e.length),range:Y.cursor(s.head+e.length)}:{range:r=s}});return r?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function $ne(t,e,n){let i=null,r=t.changeByRange(o=>o.empty&&pb(t.doc,o.head)==n?{changes:{from:o.head,to:o.head+n.length,insert:n},range:Y.cursor(o.head+n.length)}:i={range:o});return i?null:t.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function Lne(t,e,n,i){let r=i.stringPrefixes||up.stringPrefixes,o=null,s=t.changeByRange(a=>{if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:e,from:a.to}],effects:jl.of(a.to+e.length),range:Y.range(a.anchor+e.length,a.head+e.length)};let l=a.head,u=pb(t.doc,l),c;if(u==e){if(cR(t,l))return{changes:{insert:e+e,from:l},effects:jl.of(l+e.length),range:Y.cursor(l+e.length)};if(m4(t,l)){let h=n&&t.sliceDoc(l,l+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:l,to:l+h.length,insert:h},range:Y.cursor(l+h.length)}}}else{if(n&&t.sliceDoc(l-2*e.length,l)==e+e&&(c=dR(t,l-2*e.length,r))>-1&&cR(t,c))return{changes:{insert:e+e+e+e,from:l},effects:jl.of(l+e.length),range:Y.cursor(l+e.length)};if(t.charCategorizer(l)(u)!=Rt.Word&&dR(t,l,r)>-1&&!Nne(t,l,e,r))return{changes:{insert:e+e,from:l},effects:jl.of(l+e.length),range:Y.cursor(l+e.length)}}return{range:o=a}});return o?null:t.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function cR(t,e){let n=Ot(t).resolveInner(e+1);return n.parent&&n.from==e}function Nne(t,e,n,i){let r=Ot(t).resolveInner(e,-1),o=i.reduce((s,a)=>Math.max(s,a.length),0);for(let s=0;s<5;s++){let a=t.sliceDoc(r.from,Math.min(r.to,r.from+n.length+o)),l=a.indexOf(n);if(!l||l>-1&&i.indexOf(a.slice(0,l))>-1){let c=r.firstChild;for(;c&&c.from==r.from&&c.to-c.from>n.length+l;){if(t.sliceDoc(c.to-n.length,c.to)==n)return!1;c=c.firstChild}return!0}let u=r.to==e&&r.parent;if(!u)break;r=u}return!1}function dR(t,e,n){let i=t.charCategorizer(e);if(i(t.sliceDoc(e-1,e))!=Rt.Word)return e;for(let r of n){let o=e-r.length;if(t.sliceDoc(o,e)==r&&i(t.sliceDoc(o-1,o))!=Rt.Word)return o}return-1}function Mne(t={}){return[fne,fi,En.of(t),dne,Dne,c4]}const g4=[{key:"Ctrl-Space",run:sne},{key:"Escape",run:ane},{key:"ArrowDown",run:Km(!0)},{key:"ArrowUp",run:Km(!1)},{key:"PageDown",run:Km(!0,"page")},{key:"PageUp",run:Km(!1,"page")},{key:"Enter",run:one}],Dne=hs.highest($p.computeN([En],t=>t.facet(En).defaultKeymap?[g4]:[]));function yt(){var t=arguments[0];typeof t=="string"&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&typeof n=="object"&&n.nodeType==null&&!Array.isArray(n)){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var r=n[i];typeof r=="string"?t.setAttribute(i,r):r!=null&&(t[i]=r)}e++}for(;et.normalize("NFKD"):t=>t;class bd{constructor(e,n,i=0,r=e.length,o,s){this.test=s,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(i,r),this.bufferStart=i,this.normalize=o?a=>o(hR(a)):hR,this.query=this.normalize(n)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return kn(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let n=Kk(e),i=this.bufferStart+this.bufferPos;this.bufferPos+=nr(e);let r=this.normalize(n);for(let o=0,s=i;;o++){let a=r.charCodeAt(o),l=this.match(a,s,this.bufferPos+this.bufferStart);if(o==r.length-1){if(l)return this.value=l,this;break}s==i&&othis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let i=this.curLineStart+n.index,r=i+n[0].length;if(this.matchPos=G0(this.text,r+(i==r?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(ithis.value.to)&&(!this.test||this.test(i,r,n)))return this.value={from:i,to:r,match:n},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=i||r.to<=n){let a=new ed(n,e.sliceString(n,i));return Wy.set(e,a),a}if(r.from==n&&r.to==i)return r;let{text:o,from:s}=r;return s>n&&(o=e.sliceString(n,s)+o,s=n),r.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==e&&(this.re.lastIndex=e+1,n=this.re.exec(this.flat.text)),n){let i=this.flat.from+n.index,r=i+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(i,r,n)))return this.value={from:i,to:r,match:n},this.matchPos=G0(this.text,r+(i==r?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=ed.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(y4.prototype[Symbol.iterator]=v4.prototype[Symbol.iterator]=function(){return this});function Bne(t){try{return new RegExp(t,Ex),!0}catch{return!1}}function G0(t,e){if(e>=t.length)return e;let n=t.lineAt(e),i;for(;e=56320&&i<57344;)e++;return e}function FS(t){let e=String(t.state.doc.lineAt(t.state.selection.main.head).number),n=yt("input",{class:"cm-textfield",name:"line",value:e}),i=yt("form",{class:"cm-gotoLine",onkeydown:o=>{o.keyCode==27?(o.preventDefault(),t.dispatch({effects:K0.of(!1)}),t.focus()):o.keyCode==13&&(o.preventDefault(),r())},onsubmit:o=>{o.preventDefault(),r()}},yt("label",t.state.phrase("Go to line"),": ",n)," ",yt("button",{class:"cm-button",type:"submit"},t.state.phrase("go")));function r(){let o=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);if(!o)return;let{state:s}=t,a=s.doc.lineAt(s.selection.main.head),[,l,u,c,d]=o,h=c?+c.slice(1):0,p=u?+u:a.number;if(u&&d){let y=p/100;l&&(y=y*(l=="-"?-1:1)+a.number/s.doc.lines),p=Math.round(s.doc.lines*y)}else u&&l&&(p=p*(l=="-"?-1:1)+a.number);let m=s.doc.line(Math.max(1,Math.min(s.doc.lines,p))),O=Y.cursor(m.from+Math.max(0,Math.min(h,m.length)));t.dispatch({effects:[K0.of(!1),le.scrollIntoView(O.from,{y:"center"})],selection:O}),t.focus()}return{dom:i}}const K0=De.define(),fR=gn.define({create(){return!0},update(t,e){for(let n of e.effects)n.is(K0)&&(t=n.value);return t},provide:t=>ip.from(t,e=>e?FS:null)}),Qne=t=>{let e=np(t,FS);if(!e){let n=[K0.of(!0)];t.state.field(fR,!1)==null&&n.push(De.appendConfig.of([fR,Fne])),t.dispatch({effects:n}),e=np(t,FS)}return e&&e.dom.querySelector("input").select(),!0},Fne=le.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),zne={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},Hne=he.define({combine(t){return Po(t,zne,{highlightWordAroundCursor:(e,n)=>e||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function Une(t){return[Zne,Xne]}const Wne=Ee.mark({class:"cm-selectionMatch"}),Vne=Ee.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function pR(t,e,n,i){return(n==0||t(e.sliceDoc(n-1,n))!=Rt.Word)&&(i==e.doc.length||t(e.sliceDoc(i,i+1))!=Rt.Word)}function jne(t,e,n,i){return t(e.sliceDoc(n,n+1))==Rt.Word&&t(e.sliceDoc(i-1,i))==Rt.Word}const Xne=tn.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(Hne),{state:n}=t,i=n.selection;if(i.ranges.length>1)return Ee.none;let r=i.main,o,s=null;if(r.empty){if(!e.highlightWordAroundCursor)return Ee.none;let l=n.wordAt(r.head);if(!l)return Ee.none;s=n.charCategorizer(r.head),o=n.sliceDoc(l.from,l.to)}else{let l=r.to-r.from;if(l200)return Ee.none;if(e.wholeWords){if(o=n.sliceDoc(r.from,r.to),s=n.charCategorizer(r.head),!(pR(s,n,r.from,r.to)&&jne(s,n,r.from,r.to)))return Ee.none}else if(o=n.sliceDoc(r.from,r.to),!o)return Ee.none}let a=[];for(let l of t.visibleRanges){let u=new bd(n.doc,o,l.from,l.to);for(;!u.next().done;){let{from:c,to:d}=u.value;if((!s||pR(s,n,c,d))&&(r.empty&&c<=r.from&&d>=r.to?a.push(Vne.range(c,d)):(c>=r.to||d<=r.from)&&a.push(Wne.range(c,d)),a.length>e.maxMatches))return Ee.none}}return Ee.set(a)}},{decorations:t=>t.decorations}),Zne=le.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),qne=({state:t,dispatch:e})=>{let{selection:n}=t,i=Y.create(n.ranges.map(r=>t.wordAt(r.head)||Y.cursor(r.head)),n.mainIndex);return i.eq(n)?!1:(e(t.update({selection:i})),!0)};function Yne(t,e){let{main:n,ranges:i}=t.selection,r=t.wordAt(n.head),o=r&&r.from==n.from&&r.to==n.to;for(let s=!1,a=new bd(t.doc,e,i[i.length-1].to);;)if(a.next(),a.done){if(s)return null;a=new bd(t.doc,e,0,Math.max(0,i[i.length-1].from-1)),s=!0}else{if(s&&i.some(l=>l.from==a.value.from))continue;if(o){let l=t.wordAt(a.value.from);if(!l||l.from!=a.value.from||l.to!=a.value.to)continue}return a.value}}const Gne=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(o=>o.from===o.to))return qne({state:t,dispatch:e});let i=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(o=>t.sliceDoc(o.from,o.to)!=i))return!1;let r=Yne(t,i);return r?(e(t.update({selection:t.selection.addRange(Y.range(r.from,r.to),!1),effects:le.scrollIntoView(r.to)})),!0):!1},Lu=he.define({combine(t){return Po(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new cie(e),scrollToMatch:e=>le.scrollIntoView(e)})}});function Kne(t){return t?[Lu.of(t),HS]:HS}class Cx{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||Bne(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(n,i)=>i=="n"?` +`:i=="r"?"\r":i=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new nie(this):new eie(this)}getCursor(e,n=0,i){let r=e.doc?e:je.create({doc:e});return i==null&&(i=r.doc.length),this.regexp?bc(this,r,n,i):Oc(this,r,n,i)}}class S4{constructor(e){this.spec=e}}function Oc(t,e,n,i){return new bd(e.doc,t.unquoted,n,i,t.caseSensitive?void 0:r=>r.toLowerCase(),t.wholeWord?Jne(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function Jne(t,e){return(n,i,r,o)=>((o>n||o+r.length=n)return null;r.push(i.value)}return r}highlight(e,n,i,r){let o=Oc(this.spec,e,Math.max(0,n-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,e.doc.length));for(;!o.next().done;)r(o.value.from,o.value.to)}}function bc(t,e,n,i){return new y4(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?tie(e.charCategorizer(e.selection.main.head)):void 0},n,i)}function J0(t,e){return t.slice(Cn(t,e,!1),e)}function eO(t,e){return t.slice(e,Cn(t,e))}function tie(t){return(e,n,i)=>!i[0].length||(t(J0(i.input,i.index))!=Rt.Word||t(eO(i.input,i.index))!=Rt.Word)&&(t(eO(i.input,i.index+i[0].length))!=Rt.Word||t(J0(i.input,i.index+i[0].length))!=Rt.Word)}class nie extends S4{nextMatch(e,n,i){let r=bc(this.spec,e,i,e.doc.length).next();return r.done&&(r=bc(this.spec,e,0,n).next()),r.done?null:r.value}prevMatchInRange(e,n,i){for(let r=1;;r++){let o=Math.max(n,i-r*1e4),s=bc(this.spec,e,o,i),a=null;for(;!s.next().done;)a=s.value;if(a&&(o==n||a.from>o+10))return a;if(o==n)return null}}prevMatch(e,n,i){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,i,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,(n,i)=>i=="$"?"$":i=="&"?e.match[0]:i!="0"&&+i=n)return null;r.push(i.value)}return r}highlight(e,n,i,r){let o=bc(this.spec,e,Math.max(0,n-250),Math.min(i+250,e.doc.length));for(;!o.next().done;)r(o.value.from,o.value.to)}}const yd=De.define(),Tx=De.define(),la=gn.define({create(t){return new Vy(zS(t).create(),null)},update(t,e){for(let n of e.effects)n.is(yd)?t=new Vy(n.value.create(),t.panel):n.is(Tx)&&(t=new Vy(t.query,n.value?Px:null));return t},provide:t=>ip.from(t,e=>e.panel)});class Vy{constructor(e,n){this.query=e,this.panel=n}}const iie=Ee.mark({class:"cm-searchMatch"}),rie=Ee.mark({class:"cm-searchMatch cm-searchMatch-selected"}),oie=tn.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(la))}update(t){let e=t.state.field(la);(e!=t.startState.field(la)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return Ee.none;let{view:n}=this,i=new ha;for(let r=0,o=n.visibleRanges,s=o.length;ro[r+1].from-2*250;)l=o[++r].to;t.highlight(n.state,a,l,(u,c)=>{let d=n.state.selection.ranges.some(h=>h.from==u&&h.to==c);i.add(u,c,d?rie:iie)})}return i.finish()}},{decorations:t=>t.decorations});function Qp(t){return e=>{let n=e.state.field(la,!1);return n&&n.query.spec.valid?t(e,n):x4(e)}}const cp=Qp((t,{query:e})=>{let{to:n}=t.state.selection.main,i=e.nextMatch(t.state,n,n);if(!i)return!1;let r=Y.single(i.from,i.to),o=t.state.facet(Lu);return t.dispatch({selection:r,effects:[Rx(t,i),o.scrollToMatch(r.main,t)],userEvent:"select.search"}),k4(t),!0}),dp=Qp((t,{query:e})=>{let{state:n}=t,{from:i}=n.selection.main,r=e.prevMatch(n,i,i);if(!r)return!1;let o=Y.single(r.from,r.to),s=t.state.facet(Lu);return t.dispatch({selection:o,effects:[Rx(t,r),s.scrollToMatch(o.main,t)],userEvent:"select.search"}),k4(t),!0}),sie=Qp((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:Y.create(n.map(i=>Y.range(i.from,i.to))),userEvent:"select.search.matches"}),!0)}),aie=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:i,to:r}=n.main,o=[],s=0;for(let a=new bd(t.doc,t.sliceDoc(i,r));!a.next().done;){if(o.length>1e3)return!1;a.value.from==i&&(s=o.length),o.push(Y.range(a.value.from,a.value.to))}return e(t.update({selection:Y.create(o,s),userEvent:"select.search.matches"})),!0},mR=Qp((t,{query:e})=>{let{state:n}=t,{from:i,to:r}=n.selection.main;if(n.readOnly)return!1;let o=e.nextMatch(n,i,i);if(!o)return!1;let s=[],a,l,u=[];if(o.from==i&&o.to==r&&(l=n.toText(e.getReplacement(o)),s.push({from:o.from,to:o.to,insert:l}),o=e.nextMatch(n,o.from,o.to),u.push(le.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(i).number)+"."))),o){let c=s.length==0||s[0].from>=o.to?0:o.to-o.from-l.length;a=Y.single(o.from-c,o.to-c),u.push(Rx(t,o)),u.push(n.facet(Lu).scrollToMatch(a.main,t))}return t.dispatch({changes:s,selection:a,effects:u,userEvent:"input.replace"}),!0}),lie=Qp((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map(r=>{let{from:o,to:s}=r;return{from:o,to:s,insert:e.getReplacement(r)}});if(!n.length)return!1;let i=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:le.announce.of(i),userEvent:"input.replace.all"}),!0});function Px(t){return t.state.facet(Lu).createPanel(t)}function zS(t,e){var n,i,r,o,s;let a=t.selection.main,l=a.empty||a.to>a.from+100?"":t.sliceDoc(a.from,a.to);if(e&&!l)return e;let u=t.facet(Lu);return new Cx({search:((n=e==null?void 0:e.literal)!==null&&n!==void 0?n:u.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:(i=e==null?void 0:e.caseSensitive)!==null&&i!==void 0?i:u.caseSensitive,literal:(r=e==null?void 0:e.literal)!==null&&r!==void 0?r:u.literal,regexp:(o=e==null?void 0:e.regexp)!==null&&o!==void 0?o:u.regexp,wholeWord:(s=e==null?void 0:e.wholeWord)!==null&&s!==void 0?s:u.wholeWord})}function w4(t){let e=np(t,Px);return e&&e.dom.querySelector("[main-field]")}function k4(t){let e=w4(t);e&&e==t.root.activeElement&&e.select()}const x4=t=>{let e=t.state.field(la,!1);if(e&&e.panel){let n=w4(t);if(n&&n!=t.root.activeElement){let i=zS(t.state,e.query.spec);i.valid&&t.dispatch({effects:yd.of(i)}),n.focus(),n.select()}}else t.dispatch({effects:[Tx.of(!0),e?yd.of(zS(t.state,e.query.spec)):De.appendConfig.of(HS)]});return!0},Ax=t=>{let e=t.state.field(la,!1);if(!e||!e.panel)return!1;let n=np(t,Px);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:Tx.of(!1)}),!0},uie=[{key:"Mod-f",run:x4,scope:"editor search-panel"},{key:"F3",run:cp,shift:dp,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:cp,shift:dp,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:Ax,scope:"editor search-panel"},{key:"Mod-Shift-l",run:aie},{key:"Mod-Alt-g",run:Qne},{key:"Mod-d",run:Gne,preventDefault:!0}];let cie=class{constructor(e){this.view=e;let n=this.query=e.state.field(la).query.spec;this.commit=this.commit.bind(this),this.searchField=yt("input",{value:n.search,placeholder:xi(e,"Find"),"aria-label":xi(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=yt("input",{value:n.replace,placeholder:xi(e,"Replace"),"aria-label":xi(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=yt("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=yt("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=yt("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function i(r,o,s){return yt("button",{class:"cm-button",name:r,onclick:o,type:"button"},s)}this.dom=yt("div",{onkeydown:r=>this.keydown(r),class:"cm-search"},[this.searchField,i("next",()=>cp(e),[xi(e,"next")]),i("prev",()=>dp(e),[xi(e,"previous")]),i("select",()=>sie(e),[xi(e,"all")]),yt("label",null,[this.caseField,xi(e,"match case")]),yt("label",null,[this.reField,xi(e,"regexp")]),yt("label",null,[this.wordField,xi(e,"by word")]),...e.state.readOnly?[]:[yt("br"),this.replaceField,i("replace",()=>mR(e),[xi(e,"replace")]),i("replaceAll",()=>lie(e),[xi(e,"replace all")])],yt("button",{name:"close",onclick:()=>Ax(e),"aria-label":xi(e,"close"),type:"button"},["×"])])}commit(){let e=new Cx({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:yd.of(e)}))}keydown(e){RJ(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?dp:cp)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),mR(this.view))}update(e){for(let n of e.transactions)for(let i of n.effects)i.is(yd)&&!i.value.eq(this.query)&&this.setQuery(i.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(Lu).top}};function xi(t,e){return t.state.phrase(e)}const Jm=30,eg=/[\s\.,:;?!]/;function Rx(t,{from:e,to:n}){let i=t.state.doc.lineAt(e),r=t.state.doc.lineAt(n).to,o=Math.max(i.from,e-Jm),s=Math.min(r,n+Jm),a=t.state.sliceDoc(o,s);if(o!=i.from){for(let l=0;la.length-Jm;l--)if(!eg.test(a[l-1])&&eg.test(a[l])){a=a.slice(0,l);break}}return le.announce.of(`${t.state.phrase("current match")}. ${a} ${t.state.phrase("on line")} ${i.number}.`)}const die=le.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),HS=[la,hs.low(oie),die],hie=t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),i=$x(t.state,n.from);return i.line?fie(t):i.block?mie(t):!1};function Ix(t,e){return({state:n,dispatch:i})=>{if(n.readOnly)return!1;let r=t(e,n);return r?(i(n.update(r)),!0):!1}}const fie=Ix(bie,0),pie=Ix(_4,0),mie=Ix((t,e)=>_4(t,e,Oie(e)),0);function $x(t,e){let n=t.languageDataAt("commentTokens",e);return n.length?n[0]:{}}const $h=50;function gie(t,{open:e,close:n},i,r){let o=t.sliceDoc(i-$h,i),s=t.sliceDoc(r,r+$h),a=/\s*$/.exec(o)[0].length,l=/^\s*/.exec(s)[0].length,u=o.length-a;if(o.slice(u-e.length,u)==e&&s.slice(l,l+n.length)==n)return{open:{pos:i-a,margin:a&&1},close:{pos:r+l,margin:l&&1}};let c,d;r-i<=2*$h?c=d=t.sliceDoc(i,r):(c=t.sliceDoc(i,i+$h),d=t.sliceDoc(r-$h,r));let h=/^\s*/.exec(c)[0].length,p=/\s*$/.exec(d)[0].length,m=d.length-p-n.length;return c.slice(h,h+e.length)==e&&d.slice(m,m+n.length)==n?{open:{pos:i+h+e.length,margin:/\s/.test(c.charAt(h+e.length))?1:0},close:{pos:r-p-n.length,margin:/\s/.test(d.charAt(m-1))?1:0}}:null}function Oie(t){let e=[];for(let n of t.selection.ranges){let i=t.doc.lineAt(n.from),r=n.to<=i.to?i:t.doc.lineAt(n.to),o=e.length-1;o>=0&&e[o].to>i.from?e[o].to=r.to:e.push({from:i.from+/^\s*/.exec(i.text)[0].length,to:r.to})}return e}function _4(t,e,n=e.selection.ranges){let i=n.map(o=>$x(e,o.from).block);if(!i.every(o=>o))return null;let r=n.map((o,s)=>gie(e,i[s],o.from,o.to));if(t!=2&&!r.every(o=>o))return{changes:e.changes(n.map((o,s)=>r[s]?[]:[{from:o.from,insert:i[s].open+" "},{from:o.to,insert:" "+i[s].close}]))};if(t!=1&&r.some(o=>o)){let o=[];for(let s=0,a;sr&&(o==s||s>d.from)){r=d.from;let h=/^\s*/.exec(d.text)[0].length,p=h==d.length,m=d.text.slice(h,h+u.length)==u?h:-1;ho.comment<0&&(!o.empty||o.single))){let o=[];for(let{line:a,token:l,indent:u,empty:c,single:d}of i)(d||!c)&&o.push({from:a.from+u,insert:l+" "});let s=e.changes(o);return{changes:s,selection:e.selection.map(s,1)}}else if(t!=1&&i.some(o=>o.comment>=0)){let o=[];for(let{line:s,comment:a,token:l}of i)if(a>=0){let u=s.from+a,c=u+l.length;s.text[c-s.from]==" "&&c++,o.push({from:u,to:c})}return{changes:o}}return null}const US=fs.define(),yie=fs.define(),vie=he.define(),E4=he.define({combine(t){return Po(t,{minDepth:100,newGroupDelay:500,joinToEvent:(e,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,n)=>(i,r)=>e(i,r)||n(i,r)})}}),C4=gn.define({create(){return bo.empty},update(t,e){let n=e.state.facet(E4),i=e.annotation(US);if(i){let l=gi.fromTransaction(e,i.selection),u=i.side,c=u==0?t.undone:t.done;return l?c=tO(c,c.length,n.minDepth,l):c=A4(c,e.startState.selection),new bo(u==0?i.rest:c,u==0?c:i.rest)}let r=e.annotation(yie);if((r=="full"||r=="before")&&(t=t.isolate()),e.annotation(en.addToHistory)===!1)return e.changes.empty?t:t.addMapping(e.changes.desc);let o=gi.fromTransaction(e),s=e.annotation(en.time),a=e.annotation(en.userEvent);return o?t=t.addChanges(o,s,a,n,e):e.selection&&(t=t.addSelection(e.startState.selection,s,a,n.newGroupDelay)),(r=="full"||r=="after")&&(t=t.isolate()),t},toJSON(t){return{done:t.done.map(e=>e.toJSON()),undone:t.undone.map(e=>e.toJSON())}},fromJSON(t){return new bo(t.done.map(gi.fromJSON),t.undone.map(gi.fromJSON))}});function Sie(t={}){return[C4,E4.of(t),le.domEventHandlers({beforeinput(e,n){let i=e.inputType=="historyUndo"?T4:e.inputType=="historyRedo"?WS:null;return i?(e.preventDefault(),i(n)):!1}})]}function mb(t,e){return function({state:n,dispatch:i}){if(!e&&n.readOnly)return!1;let r=n.field(C4,!1);if(!r)return!1;let o=r.pop(t,n,e);return o?(i(o),!0):!1}}const T4=mb(0,!1),WS=mb(1,!1),wie=mb(0,!0),kie=mb(1,!0);class gi{constructor(e,n,i,r,o){this.changes=e,this.effects=n,this.mapped=i,this.startSelection=r,this.selectionsAfter=o}setSelAfter(e){return new gi(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,n,i;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(i=this.startSelection)===null||i===void 0?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(r=>r.toJSON())}}static fromJSON(e){return new gi(e.changes&&an.fromJSON(e.changes),[],e.mapped&&ko.fromJSON(e.mapped),e.startSelection&&Y.fromJSON(e.startSelection),e.selectionsAfter.map(Y.fromJSON))}static fromTransaction(e,n){let i=or;for(let r of e.startState.facet(vie)){let o=r(e);o.length&&(i=i.concat(o))}return!i.length&&e.changes.empty?null:new gi(e.changes.invert(e.startState.doc),i,void 0,n||e.startState.selection,or)}static selection(e){return new gi(void 0,or,void 0,void 0,e)}}function tO(t,e,n,i){let r=e+1>n+20?e-n-1:0,o=t.slice(r,e);return o.push(i),o}function xie(t,e){let n=[],i=!1;return t.iterChangedRanges((r,o)=>n.push(r,o)),e.iterChangedRanges((r,o,s,a)=>{for(let l=0;l=u&&s<=c&&(i=!0)}}),i}function _ie(t,e){return t.ranges.length==e.ranges.length&&t.ranges.filter((n,i)=>n.empty!=e.ranges[i].empty).length===0}function P4(t,e){return t.length?e.length?t.concat(e):t:e}const or=[],Eie=200;function A4(t,e){if(t.length){let n=t[t.length-1],i=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-Eie));return i.length&&i[i.length-1].eq(e)?t:(i.push(e),tO(t,t.length-1,1e9,n.setSelAfter(i)))}else return[gi.selection([e])]}function Cie(t){let e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function jy(t,e){if(!t.length)return t;let n=t.length,i=or;for(;n;){let r=Tie(t[n-1],e,i);if(r.changes&&!r.changes.empty||r.effects.length){let o=t.slice(0,n);return o[n-1]=r,o}else e=r.mapped,n--,i=r.selectionsAfter}return i.length?[gi.selection(i)]:or}function Tie(t,e,n){let i=P4(t.selectionsAfter.length?t.selectionsAfter.map(a=>a.map(e)):or,n);if(!t.changes)return gi.selection(i);let r=t.changes.map(e),o=e.mapDesc(t.changes,!0),s=t.mapped?t.mapped.composeDesc(o):o;return new gi(r,De.mapEffects(t.effects,e),s,t.startSelection.map(o),i)}const Pie=/^(input\.type|delete)($|\.)/;class bo{constructor(e,n,i=0,r=void 0){this.done=e,this.undone=n,this.prevTime=i,this.prevUserEvent=r}isolate(){return this.prevTime?new bo(this.done,this.undone):this}addChanges(e,n,i,r,o){let s=this.done,a=s[s.length-1];return a&&a.changes&&!a.changes.empty&&e.changes&&(!i||Pie.test(i))&&(!a.selectionsAfter.length&&n-this.prevTime0&&n-this.prevTimen.empty?t.moveByChar(n,e):gb(n,e))}function Hn(t){return t.textDirectionAt(t.state.selection.main.head)==_t.LTR}const Lx=t=>R4(t,!Hn(t)),Nx=t=>R4(t,Hn(t));function I4(t,e){return jr(t,n=>n.empty?t.moveByGroup(n,e):gb(n,e))}const $4=t=>I4(t,!Hn(t)),L4=t=>I4(t,Hn(t));function Rie(t,e,n){if(e.type.prop(n))return!0;let i=e.to-e.from;return i&&(i>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function Ob(t,e,n){let i=Ot(t).resolveInner(e.head),r=n?Pe.closedBy:Pe.openedBy;for(let l=e.head;;){let u=n?i.childAfter(l):i.childBefore(l);if(!u)break;Rie(t,u,r)?i=u:l=n?u.to:u.from}let o=i.type.prop(r),s,a;return o&&(s=n?Oo(t,i.from,1):Oo(t,i.to,-1))&&s.matched?a=n?s.end.to:s.end.from:a=n?i.to:i.from,Y.cursor(a,n?-1:1)}const N4=t=>jr(t,e=>Ob(t.state,e,!Hn(t))),M4=t=>jr(t,e=>Ob(t.state,e,Hn(t)));function D4(t,e){return jr(t,n=>{if(!n.empty)return gb(n,e);let i=t.moveVertically(n,e);return i.head!=n.head?i:t.moveToLineBoundary(n,e)})}const B4=t=>D4(t,!1),Q4=t=>D4(t,!0);function F4(t){let e=t.scrollDOM.clientHeights.empty?t.moveVertically(s,e,n.height):gb(s,e));if(r.eq(i.selection))return!1;let o;if(n.selfScroll){let s=t.coordsAtPos(i.selection.main.head),a=t.scrollDOM.getBoundingClientRect(),l=a.top+n.marginTop,u=a.bottom-n.marginBottom;s&&s.top>l&&s.bottomz4(t,!1),VS=t=>z4(t,!0);function _a(t,e,n){let i=t.lineBlockAt(e.head),r=t.moveToLineBoundary(e,n);if(r.head==e.head&&r.head!=(n?i.to:i.from)&&(r=t.moveToLineBoundary(e,n,!1)),!n&&r.head==i.from&&i.length){let o=/^\s*/.exec(t.state.sliceDoc(i.from,Math.min(i.from+100,i.to)))[0].length;o&&e.head!=i.from+o&&(r=Y.cursor(i.from+o))}return r}const H4=t=>jr(t,e=>_a(t,e,!0)),U4=t=>jr(t,e=>_a(t,e,!1)),W4=t=>jr(t,e=>_a(t,e,!Hn(t))),V4=t=>jr(t,e=>_a(t,e,Hn(t))),Iie=t=>jr(t,e=>Y.cursor(t.lineBlockAt(e.head).from,1)),$ie=t=>jr(t,e=>Y.cursor(t.lineBlockAt(e.head).to,-1));function Lie(t,e,n){let i=!1,r=eh(t.selection,o=>{let s=Oo(t,o.head,-1)||Oo(t,o.head,1)||o.head>0&&Oo(t,o.head-1,1)||o.headLie(t,e);function fr(t,e){let n=eh(t.state.selection,i=>{let r=e(i);return Y.range(i.anchor,r.head,r.goalColumn,r.bidiLevel||void 0)});return n.eq(t.state.selection)?!1:(t.dispatch(Ao(t.state,n)),!0)}function j4(t,e){return fr(t,n=>t.moveByChar(n,e))}const Mx=t=>j4(t,!Hn(t)),Dx=t=>j4(t,Hn(t));function X4(t,e){return fr(t,n=>t.moveByGroup(n,e))}const Z4=t=>X4(t,!Hn(t)),q4=t=>X4(t,Hn(t)),Y4=t=>fr(t,e=>Ob(t.state,e,!Hn(t))),G4=t=>fr(t,e=>Ob(t.state,e,Hn(t)));function K4(t,e){return fr(t,n=>t.moveVertically(n,e))}const J4=t=>K4(t,!1),eB=t=>K4(t,!0);function tB(t,e){return fr(t,n=>t.moveVertically(n,e,F4(t).height))}const OR=t=>tB(t,!1),bR=t=>tB(t,!0),nB=t=>fr(t,e=>_a(t,e,!0)),iB=t=>fr(t,e=>_a(t,e,!1)),rB=t=>fr(t,e=>_a(t,e,!Hn(t))),oB=t=>fr(t,e=>_a(t,e,Hn(t))),Mie=t=>fr(t,e=>Y.cursor(t.lineBlockAt(e.head).from)),Die=t=>fr(t,e=>Y.cursor(t.lineBlockAt(e.head).to)),yR=({state:t,dispatch:e})=>(e(Ao(t,{anchor:0})),!0),vR=({state:t,dispatch:e})=>(e(Ao(t,{anchor:t.doc.length})),!0),SR=({state:t,dispatch:e})=>(e(Ao(t,{anchor:t.selection.main.anchor,head:0})),!0),wR=({state:t,dispatch:e})=>(e(Ao(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),Bie=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),Qie=({state:t,dispatch:e})=>{let n=bb(t).map(({from:i,to:r})=>Y.range(i,Math.min(r+1,t.doc.length)));return e(t.update({selection:Y.create(n),userEvent:"select"})),!0},Fie=({state:t,dispatch:e})=>{let n=eh(t.selection,i=>{var r;let o=Ot(t).resolveStack(i.from,1);for(let s=o;s;s=s.next){let{node:a}=s;if((a.from=i.to||a.to>i.to&&a.from<=i.from)&&(!((r=a.parent)===null||r===void 0)&&r.parent))return Y.range(a.to,a.from)}return i});return e(Ao(t,n)),!0},zie=({state:t,dispatch:e})=>{let n=t.selection,i=null;return n.ranges.length>1?i=Y.create([n.main]):n.main.empty||(i=Y.create([Y.cursor(n.main.head)])),i?(e(Ao(t,i)),!0):!1};function th(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:i}=t,r=i.changeByRange(o=>{let{from:s,to:a}=o;if(s==a){let l=e(o);ls&&(n="delete.forward",l=tg(t,l,!0)),s=Math.min(s,l),a=Math.max(a,l)}else s=tg(t,s,!1),a=tg(t,a,!0);return s==a?{range:o}:{changes:{from:s,to:a},range:Y.cursor(s,sr(t)))i.between(e,e,(r,o)=>{re&&(e=n?o:r)});return e}const sB=(t,e,n)=>th(t,i=>{let r=i.from,{state:o}=t,s=o.doc.lineAt(r),a,l;if(n&&!e&&r>s.from&&rsB(t,!1,!0),iO=t=>sB(t,!0,!1),aB=(t,e)=>th(t,n=>{let i=n.head,{state:r}=t,o=r.doc.lineAt(i),s=r.charCategorizer(i);for(let a=null;;){if(i==(e?o.to:o.from)){i==n.head&&o.number!=(e?r.doc.lines:1)&&(i+=e?1:-1);break}let l=Cn(o.text,i-o.from,e)+o.from,u=o.text.slice(Math.min(i,l)-o.from,Math.max(i,l)-o.from),c=s(u);if(a!=null&&c!=a)break;(u!=" "||i!=n.head)&&(a=c),i=l}return i}),Bx=t=>aB(t,!1),lB=t=>aB(t,!0),uB=t=>th(t,e=>{let n=t.lineBlockAt(e.head).to;return e.headth(t,e=>{let n=t.lineBlockAt(e.head).from;return e.head>n?n:Math.max(0,e.head-1)}),Uie=t=>th(t,e=>{let n=t.moveToLineBoundary(e,!1).head;return e.head>n?n:Math.max(0,e.head-1)}),Wie=t=>th(t,e=>{let n=t.moveToLineBoundary(e,!0).head;return e.head{if(t.readOnly)return!1;let n=t.changeByRange(i=>({changes:{from:i.from,to:i.to,insert:st.of(["",""])},range:Y.cursor(i.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},jie=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(i=>{if(!i.empty||i.from==0||i.from==t.doc.length)return{range:i};let r=i.from,o=t.doc.lineAt(r),s=r==o.from?r-1:Cn(o.text,r-o.from,!1)+o.from,a=r==o.to?r+1:Cn(o.text,r-o.from,!0)+o.from;return{changes:{from:s,to:a,insert:t.doc.slice(r,a).append(t.doc.slice(s,r))},range:Y.cursor(a)}});return n.changes.empty?!1:(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function bb(t){let e=[],n=-1;for(let i of t.selection.ranges){let r=t.doc.lineAt(i.from),o=t.doc.lineAt(i.to);if(!i.empty&&i.to==o.from&&(o=t.doc.lineAt(i.to-1)),n>=r.number){let s=e[e.length-1];s.to=o.to,s.ranges.push(i)}else e.push({from:r.from,to:o.to,ranges:[i]});n=o.number+1}return e}function cB(t,e,n){if(t.readOnly)return!1;let i=[],r=[];for(let o of bb(t)){if(n?o.to==t.doc.length:o.from==0)continue;let s=t.doc.lineAt(n?o.to+1:o.from-1),a=s.length+1;if(n){i.push({from:o.to,to:s.to},{from:o.from,insert:s.text+t.lineBreak});for(let l of o.ranges)r.push(Y.range(Math.min(t.doc.length,l.anchor+a),Math.min(t.doc.length,l.head+a)))}else{i.push({from:s.from,to:o.from},{from:o.to,insert:t.lineBreak+s.text});for(let l of o.ranges)r.push(Y.range(l.anchor-a,l.head-a))}}return i.length?(e(t.update({changes:i,scrollIntoView:!0,selection:Y.create(r,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const Xie=({state:t,dispatch:e})=>cB(t,e,!1),Zie=({state:t,dispatch:e})=>cB(t,e,!0);function dB(t,e,n){if(t.readOnly)return!1;let i=[];for(let r of bb(t))n?i.push({from:r.from,insert:t.doc.slice(r.from,r.to)+t.lineBreak}):i.push({from:r.to,insert:t.lineBreak+t.doc.slice(r.from,r.to)});return e(t.update({changes:i,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const qie=({state:t,dispatch:e})=>dB(t,e,!1),Yie=({state:t,dispatch:e})=>dB(t,e,!0),Gie=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(bb(e).map(({from:r,to:o})=>(r>0?r--:o{let o;if(t.lineWrapping){let s=t.lineBlockAt(r.head),a=t.coordsAtPos(r.head,r.assoc||1);a&&(o=s.bottom+t.documentTop-a.bottom+t.defaultLineHeight/2)}return t.moveVertically(r,!0,o)}).map(n);return t.dispatch({changes:n,selection:i,scrollIntoView:!0,userEvent:"delete.line"}),!0};function Kie(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=Ot(t).resolveInner(e),i=n.childBefore(e),r=n.childAfter(e),o;return i&&r&&i.to<=e&&r.from>=e&&(o=i.type.prop(Pe.closedBy))&&o.indexOf(r.name)>-1&&t.doc.lineAt(i.to).from==t.doc.lineAt(r.from).from&&!/\S/.test(t.sliceDoc(i.to,r.from))?{from:i.to,to:r.from}:null}const Jie=hB(!1),ere=hB(!0);function hB(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let i=e.changeByRange(r=>{let{from:o,to:s}=r,a=e.doc.lineAt(o),l=!t&&o==s&&Kie(e,o);t&&(o=s=(s<=a.to?a:e.doc.lineAt(s)).to);let u=new Np(e,{simulateBreak:o,simulateDoubleBreak:!!l}),c=hb(u,o);for(c==null&&(c=Hr(/^\s*/.exec(e.doc.lineAt(o).text)[0],e.tabSize));sa.from&&o{let r=[];for(let s=i.from;s<=i.to;){let a=t.doc.lineAt(s);a.number>n&&(i.empty||i.to>a.from)&&(e(a,r,i),n=a.number),s=a.to+1}let o=t.changes(r);return{changes:r,range:Y.range(o.mapPos(i.anchor,1),o.mapPos(i.head,1))}})}const fB=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),i=new Np(t,{overrideIndentation:o=>{let s=n[o];return s??-1}}),r=Qx(t,(o,s,a)=>{let l=hb(i,o.from);if(l==null)return;/\S/.test(o.text)||(l=0);let u=/^\s*/.exec(o.text)[0],c=Od(t,l);(u!=c||a.fromt.readOnly?!1:(e(t.update(Qx(t,(n,i)=>{i.push({from:n.from,insert:t.facet(Gd)})}),{userEvent:"input.indent"})),!0),mB=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(Qx(t,(n,i)=>{let r=/^\s*/.exec(n.text)[0];if(!r)return;let o=Hr(r,t.tabSize),s=0,a=Od(t,Math.max(0,o-fu(t)));for(;s({mac:t.key,run:t.run,shift:t.shift}))),kR=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:N4,shift:Y4},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:M4,shift:G4},{key:"Alt-ArrowUp",run:Xie},{key:"Shift-Alt-ArrowUp",run:qie},{key:"Alt-ArrowDown",run:Zie},{key:"Shift-Alt-ArrowDown",run:Yie},{key:"Escape",run:zie},{key:"Mod-Enter",run:ere},{key:"Alt-l",mac:"Ctrl-l",run:Qie},{key:"Mod-i",run:Fie,preventDefault:!0},{key:"Mod-[",run:mB},{key:"Mod-]",run:pB},{key:"Mod-Alt-\\",run:fB},{key:"Shift-Mod-k",run:Gie},{key:"Shift-Mod-\\",run:Nie},{key:"Mod-/",run:hie},{key:"Alt-A",run:pie}].concat(nre),ire={key:"Tab",run:pB,shift:mB};class rre{constructor(e,n,i){this.from=e,this.to=n,this.diagnostic=i}}class Ml{constructor(e,n,i){this.diagnostics=e,this.panel=n,this.selected=i}static init(e,n,i){let r=e,o=i.facet(hp).markerFilter;o&&(r=o(r,i));let s=Ee.set(r.map(a=>a.from==a.to||a.from==a.to-1&&i.doc.lineAt(a.from).to==a.from?Ee.widget({widget:new fre(a),diagnostic:a}).range(a.from):Ee.mark({attributes:{class:"cm-lintRange cm-lintRange-"+a.severity+(a.markClass?" "+a.markClass:"")},diagnostic:a,inclusive:!0}).range(a.from,a.to)),!0);return new Ml(s,n,vd(s))}}function vd(t,e=null,n=0){let i=null;return t.between(n,1e9,(r,o,{spec:s})=>{if(!(e&&s.diagnostic!=e))return i=new rre(r,o,s.diagnostic),!1}),i}function ore(t,e){let n=e.pos,i=e.end||n,r=t.state.facet(hp).hideOn(t,n,i);if(r!=null)return r;let o=t.startState.doc.lineAt(e.pos);return!!(t.effects.some(s=>s.is(gB))||t.changes.touchesRange(o.from,Math.max(o.to,i)))}function sre(t,e){return t.field(Bi,!1)?e:e.concat(De.appendConfig.of(gre))}const gB=De.define(),Fx=De.define(),OB=De.define(),Bi=gn.define({create(){return new Ml(Ee.none,null,null)},update(t,e){if(e.docChanged&&t.diagnostics.size){let n=t.diagnostics.map(e.changes),i=null,r=t.panel;if(t.selected){let o=e.changes.mapPos(t.selected.from,1);i=vd(n,t.selected.diagnostic,o)||vd(n,null,o)}!n.size&&r&&e.state.facet(hp).autoPanel&&(r=null),t=new Ml(n,r,i)}for(let n of e.effects)if(n.is(gB)){let i=e.state.facet(hp).autoPanel?n.value.length?fp.open:null:t.panel;t=Ml.init(n.value,i,e.state)}else n.is(Fx)?t=new Ml(t.diagnostics,n.value?fp.open:null,t.selected):n.is(OB)&&(t=new Ml(t.diagnostics,t.panel,n.value));return t},provide:t=>[ip.from(t,e=>e.panel),le.decorations.from(t,e=>e.diagnostics)]}),are=Ee.mark({class:"cm-lintRange cm-lintRange-active",inclusive:!0});function lre(t,e,n){let{diagnostics:i}=t.state.field(Bi),r=[],o=2e8,s=0;i.between(e-(n<0?1:0),e+(n>0?1:0),(l,u,{spec:c})=>{e>=l&&e<=u&&(l==u||(e>l||n>0)&&(eyB(t,n,!1)))}const cre=t=>{let e=t.state.field(Bi,!1);(!e||!e.panel)&&t.dispatch({effects:sre(t.state,[Fx.of(!0)])});let n=np(t,fp.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},xR=t=>{let e=t.state.field(Bi,!1);return!e||!e.panel?!1:(t.dispatch({effects:Fx.of(!1)}),!0)},dre=t=>{let e=t.state.field(Bi,!1);if(!e)return!1;let n=t.state.selection.main,i=e.diagnostics.iter(n.to+1);return!i.value&&(i=e.diagnostics.iter(0),!i.value||i.from==n.from&&i.to==n.to)?!1:(t.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0}),!0)},hre=[{key:"Mod-Shift-m",run:cre,preventDefault:!0},{key:"F8",run:dre}],hp=he.define({combine(t){return Object.assign({sources:t.map(e=>e.source).filter(e=>e!=null)},Po(t.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,n)=>e?n?i=>e(i)||n(i):e:n}))}});function bB(t){let e=[];if(t)e:for(let{name:n}of t){for(let i=0;io.toLowerCase()==r.toLowerCase())){e.push(r);continue e}}e.push("")}return e}function yB(t,e,n){var i;let r=n?bB(e.actions):[];return yt("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},yt("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(t):e.message),(i=e.actions)===null||i===void 0?void 0:i.map((o,s)=>{let a=!1,l=h=>{if(h.preventDefault(),a)return;a=!0;let p=vd(t.state.field(Bi).diagnostics,e);p&&o.apply(t,p.from,p.to)},{name:u}=o,c=r[s]?u.indexOf(r[s]):-1,d=c<0?u:[u.slice(0,c),yt("u",u.slice(c,c+1)),u.slice(c+1)];return yt("button",{type:"button",class:"cm-diagnosticAction",onclick:l,onmousedown:l,"aria-label":` Action: ${u}${c<0?"":` (access key "${r[s]})"`}.`},d)}),e.source&&yt("div",{class:"cm-diagnosticSource"},e.source))}class fre extends ps{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return yt("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class _R{constructor(e,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=yB(e,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class fp{constructor(e){this.view=e,this.items=[];let n=r=>{if(r.keyCode==27)xR(this.view),this.view.focus();else if(r.keyCode==38||r.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(r.keyCode==40||r.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(r.keyCode==36)this.moveSelection(0);else if(r.keyCode==35)this.moveSelection(this.items.length-1);else if(r.keyCode==13)this.view.focus();else if(r.keyCode>=65&&r.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:o}=this.items[this.selectedIndex],s=bB(o.actions);for(let a=0;a{for(let o=0;oxR(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Bi).selected;if(!e)return-1;for(let n=0;n{let u=-1,c;for(let d=i;di&&(this.items.splice(i,u-i),r=!0)),n&&c.diagnostic==n.diagnostic?c.dom.hasAttribute("aria-selected")||(c.dom.setAttribute("aria-selected","true"),o=c):c.dom.hasAttribute("aria-selected")&&c.dom.removeAttribute("aria-selected"),i++});i({sel:o.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:s,panel:a})=>{let l=a.height/this.list.offsetHeight;s.topa.bottom&&(this.list.scrollTop+=(s.bottom-a.bottom)/l)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),r&&this.sync()}sync(){let e=this.list.firstChild;function n(){let i=e;e=i.nextSibling,i.remove()}for(let i of this.items)if(i.dom.parentNode==this.list){for(;e!=i.dom;)n();e=i.dom.nextSibling}else this.list.insertBefore(i.dom,e);for(;e;)n()}moveSelection(e){if(this.selectedIndex<0)return;let n=this.view.state.field(Bi),i=vd(n.diagnostics,this.items[e].diagnostic);i&&this.view.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0,effects:OB.of(i)})}static open(e){return new fp(e)}}function pre(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(t)}')`}function ng(t){return pre(``,'width="6" height="3"')}const mre=le.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:ng("#d11")},".cm-lintRange-warning":{backgroundImage:ng("orange")},".cm-lintRange-info":{backgroundImage:ng("#999")},".cm-lintRange-hint":{backgroundImage:ng("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}}),gre=[Bi,le.decorations.compute([Bi],t=>{let{selected:e,panel:n}=t.field(Bi);return!e||!n||e.from==e.to?Ee.none:Ee.set([are.range(e.from,e.to)])}),Oee(lre,{hideOn:ore}),mre];var ER={};class rO{constructor(e,n,i,r,o,s,a,l,u,c=0,d){this.p=e,this.stack=n,this.state=i,this.reducePos=r,this.pos=o,this.score=s,this.buffer=a,this.bufferBase=l,this.curContext=u,this.lookAhead=c,this.parent=d}toString(){return`[${this.stack.filter((e,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,i=0){let r=e.parser.context;return new rO(e,[],n,i,i,0,[],0,r?new CR(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let i=e>>19,r=e&65535,{parser:o}=this.p,s=o.dynamicPrecedence(r);if(s&&(this.score+=s),i==0){this.pushState(o.getGoto(this.state,r,!0),this.reducePos),r=2e3&&!(!((n=this.p.parser.nodeSet.types[r])===null||n===void 0)&&n.isAnonymous)&&(l==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSizea;)this.stack.pop();this.reduceContext(r,l)}storeNode(e,n,i,r=4,o=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&s.buffer[a-4]==0&&s.buffer[a-1]>-1){if(n==i)return;if(s.buffer[a-2]>=n){s.buffer[a-2]=i;return}}}if(!o||this.pos==i)this.buffer.push(e,n,i,r);else{let s=this.buffer.length;if(s>0&&this.buffer[s-4]!=0)for(;s>0&&this.buffer[s-2]>i;)this.buffer[s]=this.buffer[s-4],this.buffer[s+1]=this.buffer[s-3],this.buffer[s+2]=this.buffer[s-2],this.buffer[s+3]=this.buffer[s-1],s-=4,r>4&&(r-=4);this.buffer[s]=e,this.buffer[s+1]=n,this.buffer[s+2]=i,this.buffer[s+3]=r}}shift(e,n,i,r){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=r,this.shiftContext(n,i),n<=this.p.parser.maxNode&&this.buffer.push(n,i,r,4);else{let o=e,{parser:s}=this.p;(r>this.pos||n<=s.maxNode)&&(this.pos=r,s.stateFlag(o,1)||(this.reducePos=r)),this.pushState(o,i),this.shiftContext(n,i),n<=s.maxNode&&this.buffer.push(n,i,r,4)}}apply(e,n,i,r){e&65536?this.reduce(e):this.shift(e,n,i,r)}useNode(e,n){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=e)&&(this.p.reused.push(e),i++);let r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(n,r),this.buffer.push(i,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,n=e.buffer.length;for(;n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let i=e.buffer.slice(n),r=e.bufferBase+n;for(;e&&r==e.bufferBase;)e=e.parent;return new rO(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,r,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let i=e<=this.p.parser.maxNode;i&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,i?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new Ore(this);;){let i=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(i==0)return!1;if(!(i&65536))return!0;n.reduce(i)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let r=[];for(let o=0,s;ol&1&&a==s)||r.push(n[o],s)}n=r}let i=[];for(let r=0;r>19,r=n&65535,o=this.stack.length-i*3;if(o<0||e.getGoto(this.stack[o],r,!1)<0){let s=this.findForcedReduction();if(s==null)return!1;n=s}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:e}=this.p,n=[],i=(r,o)=>{if(!n.includes(r))return n.push(r),e.allActions(r,s=>{if(!(s&393216))if(s&65536){let a=(s>>19)-o;if(a>1){let l=s&65535,u=this.stack.length-a*3;if(u>=0&&e.getGoto(this.stack[u],l,!1)>=0)return a<<19|65536|l}}else{let a=i(s,o+1);if(a!=null)return a}})};return i(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let n=0;nthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class CR{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class Ore{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,i=e>>19;i==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(i-1)*3;let r=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=r}}class oO{constructor(e,n,i){this.stack=e,this.pos=n,this.index=i,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new oO(e,n,n-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new oO(this.stack,this.pos,this.index)}}function Gh(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let i=0,r=0;i=92&&s--,s>=34&&s--;let l=s-32;if(l>=46&&(l-=46,a=!0),o+=l,a)break;o*=46}n?n[r++]=o:n=new e(o)}return n}class Xg{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const TR=new Xg;class bre{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=TR,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let i=this.range,r=this.rangeIndex,o=this.pos+e;for(;oi.to:o>=i.to;){if(r==this.ranges.length-1)return null;let s=this.ranges[++r];o+=s.from-i.to,i=s}return o}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,i,r;if(n>=0&&n=this.chunk2Pos&&ia.to&&(this.chunk2=this.chunk2.slice(0,a.to-i)),r=this.chunk2.charCodeAt(0)}}return i>=this.token.lookAhead&&(this.token.lookAhead=i+1),r}acceptToken(e,n=0){let i=n?this.resolveOffset(n,-1):this.pos;if(i==null||i=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=TR,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let i="";for(let r of this.ranges){if(r.from>=n)break;r.to>e&&(i+=this.input.read(Math.max(r.from,e),Math.min(r.to,n)))}return i}}class td{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:i}=n.p;vB(this.data,e,n,this.id,i.data,i.tokenPrecTable)}}td.prototype.contextual=td.prototype.fallback=td.prototype.extend=!1;class sO{constructor(e,n,i){this.precTable=n,this.elseToken=i,this.data=typeof e=="string"?Gh(e):e}token(e,n){let i=e.pos,r=0;for(;;){let o=e.next<0,s=e.resolveOffset(1,1);if(vB(this.data,e,n,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(o||r++,s==null)break;e.reset(s,e.token)}r&&(e.reset(i,e.token),e.acceptToken(this.elseToken,r))}}sO.prototype.contextual=td.prototype.fallback=td.prototype.extend=!1;class Xr{constructor(e,n={}){this.token=e,this.contextual=!!n.contextual,this.fallback=!!n.fallback,this.extend=!!n.extend}}function vB(t,e,n,i,r,o){let s=0,a=1<0){let m=t[p];if(l.allows(m)&&(e.token.value==-1||e.token.value==m||yre(m,e.token.value,r,o))){e.acceptToken(m);break}}let c=e.next,d=0,h=t[s+2];if(e.next<0&&h>d&&t[u+h*3-3]==65535){s=t[u+h*3-1];continue e}for(;d>1,m=u+p+(p<<1),O=t[m],y=t[m+1]||65536;if(c=y)d=p+1;else{s=t[m+2],e.advance();continue e}}break}}function PR(t,e,n){for(let i=e,r;(r=t[i])!=65535;i++)if(r==n)return i-e;return-1}function yre(t,e,n,i){let r=PR(n,i,e);return r<0||PR(n,i,t)e)&&!i.type.isError)return n<0?Math.max(0,Math.min(i.to-1,e-25)):Math.min(t.length,Math.max(i.from+1,e+25));if(n<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return n<0?0:t.length}}let vre=class{constructor(e,n){this.fragments=e,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?AR(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?AR(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=s,null;if(o instanceof qe){if(s==e){if(s=Math.max(this.safeFrom,e)&&(this.trees.push(o),this.start.push(s),this.index.push(0))}else this.index[n]++,this.nextStart=s+o.length}}};class Sre{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(i=>new Xg)}getActions(e){let n=0,i=null,{parser:r}=e.p,{tokenizers:o}=r,s=r.stateSlot(e.state,3),a=e.curContext?e.curContext.hash:0,l=0;for(let u=0;ud.end+25&&(l=Math.max(d.lookAhead,l)),d.value!=0)){let h=n;if(d.extended>-1&&(n=this.addActions(e,d.extended,d.end,n)),n=this.addActions(e,d.value,d.end,n),!c.extend&&(i=d,n>h))break}}for(;this.actions.length>n;)this.actions.pop();return l&&e.setLookAhead(l),!i&&e.pos==this.stream.end&&(i=new Xg,i.value=e.p.parser.eofTerm,i.start=i.end=e.pos,n=this.addActions(e,i.value,i.end,n)),this.mainToken=i,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new Xg,{pos:i,p:r}=e;return n.start=i,n.end=Math.min(i+1,r.stream.end),n.value=i==r.stream.end?r.parser.eofTerm:0,n}updateCachedToken(e,n,i){let r=this.stream.clipPos(i.pos);if(n.token(this.stream.reset(r,e),i),e.value>-1){let{parser:o}=i.p;for(let s=0;s=0&&i.p.parser.dialect.allows(a>>1)){a&1?e.extended=a>>1:e.value=a>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,n,i,r){for(let o=0;oe.bufferLength*4?new vre(i,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,i=this.stacks=[],r,o;if(this.bigReductionCount>300&&e.length==1){let[s]=e;for(;s.forceReduce()&&s.stack.length&&s.stack[s.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let s=0;sn)i.push(a);else{if(this.advanceStack(a,i,e))continue;{r||(r=[],o=[]),r.push(a);let l=this.tokens.getMainToken(a);o.push(l.value,l.end)}}break}}if(!i.length){let s=r&&xre(r);if(s)return _i&&console.log("Finish with "+this.stackID(s)),this.stackToTree(s);if(this.parser.strict)throw _i&&r&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&r){let s=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,o,i);if(s)return _i&&console.log("Force-finish "+this.stackID(s)),this.stackToTree(s.forceAll())}if(this.recovering){let s=this.recovering==1?1:this.recovering*3;if(i.length>s)for(i.sort((a,l)=>l.score-a.score);i.length>s;)i.pop();i.some(a=>a.reducePos>n)&&this.recovering--}else if(i.length>1){e:for(let s=0;s500&&u.buffer.length>500)if((a.score-u.score||a.buffer.length-u.buffer.length)>0)i.splice(l--,1);else{i.splice(s--,1);continue e}}}i.length>12&&i.splice(12,i.length-12)}this.minStackPos=i[0].pos;for(let s=1;s ":"";if(this.stoppedAt!=null&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let u=e.curContext&&e.curContext.tracker.strict,c=u?e.curContext.hash:0;for(let d=this.fragments.nodeAt(r);d;){let h=this.parser.nodeSet.types[d.type.id]==d.type?o.getGoto(e.state,d.type.id):-1;if(h>-1&&d.length&&(!u||(d.prop(Pe.contextHash)||0)==c))return e.useNode(d,h),_i&&console.log(s+this.stackID(e)+` (via reuse of ${o.getName(d.type.id)})`),!0;if(!(d instanceof qe)||d.children.length==0||d.positions[0]>0)break;let p=d.children[0];if(p instanceof qe&&d.positions[0]==0)d=p;else break}}let a=o.stateSlot(e.state,4);if(a>0)return e.reduce(a),_i&&console.log(s+this.stackID(e)+` (via always-reduce ${o.getName(a&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let u=0;ur?n.push(m):i.push(m)}return!1}advanceFully(e,n){let i=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>i)return RR(e,n),!0}}runRecovery(e,n,i){let r=null,o=!1;for(let s=0;s ":"";if(a.deadEnd&&(o||(o=!0,a.restart(),_i&&console.log(c+this.stackID(a)+" (restarted)"),this.advanceFully(a,i))))continue;let d=a.split(),h=c;for(let p=0;d.forceReduce()&&p<10&&(_i&&console.log(h+this.stackID(d)+" (via force-reduce)"),!this.advanceFully(d,i));p++)_i&&(h=this.stackID(d)+" -> ");for(let p of a.recoverByInsert(l))_i&&console.log(c+this.stackID(p)+" (via recover-insert)"),this.advanceFully(p,i);this.stream.end>a.pos?(u==a.pos&&(u++,l=0),a.recoverByDelete(l,u),_i&&console.log(c+this.stackID(a)+` (via recover-delete ${this.parser.getName(l)})`),RR(a,i)):(!r||r.scoret;class SB{constructor(e){this.start=e.start,this.shift=e.shift||Zy,this.reduce=e.reduce||Zy,this.reuse=e.reuse||Zy,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class mu extends cb{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let a=0;ae.topRules[a][1]),r=[];for(let a=0;a=0)o(c,l,a[u++]);else{let d=a[u+-c];for(let h=-c;h>0;h--)o(a[u++],l,d);u++}}}this.nodeSet=new Yd(n.map((a,l)=>nn.define({name:l>=this.minRepeatTerm?void 0:a,id:l,props:r[l],top:i.indexOf(l)>-1,error:l==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(l)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=PD;let s=Gh(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let a=0;atypeof a=="number"?new td(s,a):a),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,n,i){let r=new wre(this,e,n,i);for(let o of this.wrappers)r=o(r,e,n,i);return r}getGoto(e,n,i=!1){let r=this.goto;if(n>=r[0])return-1;for(let o=r[n+1];;){let s=r[o++],a=s&1,l=r[o++];if(a&&i)return l;for(let u=o+(s>>1);o0}validAction(e,n){return!!this.allActions(e,i=>i==n?!0:null)}allActions(e,n){let i=this.stateSlot(e,4),r=i?n(i):void 0;for(let o=this.stateSlot(e,1);r==null;o+=3){if(this.data[o]==65535)if(this.data[o+1]==1)o=Wo(this.data,o+2);else break;r=n(Wo(this.data,o+1))}return r}nextStates(e){let n=[];for(let i=this.stateSlot(e,1);;i+=3){if(this.data[i]==65535)if(this.data[i+1]==1)i=Wo(this.data,i+2);else break;if(!(this.data[i+2]&1)){let r=this.data[i+1];n.some((o,s)=>s&1&&o==r)||n.push(this.data[i],r)}}return n}configure(e){let n=Object.assign(Object.create(mu.prototype),this);if(e.props&&(n.nodeSet=this.nodeSet.extend(...e.props)),e.top){let i=this.topRules[e.top];if(!i)throw new RangeError(`Invalid top rule name ${e.top}`);n.top=i}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(i=>{let r=e.tokenizers.find(o=>o.from==i);return r?r.to:i})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((i,r)=>{let o=e.specializers.find(a=>a.from==i.external);if(!o)return i;let s=Object.assign(Object.assign({},i),{external:o.to});return n.specializers[r]=IR(s),s})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),i=n.map(()=>!1);if(e)for(let o of e.split(" ")){let s=n.indexOf(o);s>=0&&(i[s]=!0)}let r=null;for(let o=0;oi)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.scoret.external(n,i)<<1|e}return t.get}const _re=312,$R=1,Ere=2,Cre=3,Tre=4,Pre=313,Are=315,Rre=316,Ire=5,$re=6,Lre=0,jS=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],wB=125,Nre=59,XS=47,Mre=42,Dre=43,Bre=45,Qre=60,Fre=44,zre=63,Hre=46,Ure=new SB({start:!1,shift(t,e){return e==Ire||e==$re||e==Are?t:e==Rre},strict:!1}),Wre=new Xr((t,e)=>{let{next:n}=t;(n==wB||n==-1||e.context)&&t.acceptToken(Pre)},{contextual:!0,fallback:!0}),Vre=new Xr((t,e)=>{let{next:n}=t,i;jS.indexOf(n)>-1||n==XS&&((i=t.peek(1))==XS||i==Mre)||n!=wB&&n!=Nre&&n!=-1&&!e.context&&t.acceptToken(_re)},{contextual:!0}),jre=new Xr((t,e)=>{let{next:n}=t;if(n==Dre||n==Bre){if(t.advance(),n==t.next){t.advance();let i=!e.context&&e.canShift($R);t.acceptToken(i?$R:Ere)}}else n==zre&&t.peek(1)==Hre&&(t.advance(),t.advance(),(t.next<48||t.next>57)&&t.acceptToken(Cre))},{contextual:!0});function qy(t,e){return t>=65&&t<=90||t>=97&&t<=122||t==95||t>=192||!e&&t>=48&&t<=57}const Xre=new Xr((t,e)=>{if(t.next!=Qre||!e.dialectEnabled(Lre)||(t.advance(),t.next==XS))return;let n=0;for(;jS.indexOf(t.next)>-1;)t.advance(),n++;if(qy(t.next,!0)){for(t.advance(),n++;qy(t.next,!1);)t.advance(),n++;for(;jS.indexOf(t.next)>-1;)t.advance(),n++;if(t.next==Fre)return;for(let i=0;;i++){if(i==7){if(!qy(t.next,!0))return;break}if(t.next!="extends".charCodeAt(i))break;t.advance(),n++}}t.acceptToken(Tre,-n)}),Zre=Iu({"get set async static":R.modifier,"for while do if else switch try catch finally return throw break continue default case":R.controlKeyword,"in of await yield void typeof delete instanceof":R.operatorKeyword,"let var const using function class extends":R.definitionKeyword,"import export from":R.moduleKeyword,"with debugger as new":R.keyword,TemplateString:R.special(R.string),super:R.atom,BooleanLiteral:R.bool,this:R.self,null:R.null,Star:R.modifier,VariableName:R.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":R.function(R.variableName),VariableDefinition:R.definition(R.variableName),Label:R.labelName,PropertyName:R.propertyName,PrivatePropertyName:R.special(R.propertyName),"CallExpression/MemberExpression/PropertyName":R.function(R.propertyName),"FunctionDeclaration/VariableDefinition":R.function(R.definition(R.variableName)),"ClassDeclaration/VariableDefinition":R.definition(R.className),PropertyDefinition:R.definition(R.propertyName),PrivatePropertyDefinition:R.definition(R.special(R.propertyName)),UpdateOp:R.updateOperator,"LineComment Hashbang":R.lineComment,BlockComment:R.blockComment,Number:R.number,String:R.string,Escape:R.escape,ArithOp:R.arithmeticOperator,LogicOp:R.logicOperator,BitOp:R.bitwiseOperator,CompareOp:R.compareOperator,RegExp:R.regexp,Equals:R.definitionOperator,Arrow:R.function(R.punctuation),": Spread":R.punctuation,"( )":R.paren,"[ ]":R.squareBracket,"{ }":R.brace,"InterpolationStart InterpolationEnd":R.special(R.brace),".":R.derefOperator,", ;":R.separator,"@":R.meta,TypeName:R.typeName,TypeDefinition:R.definition(R.typeName),"type enum interface implements namespace module declare":R.definitionKeyword,"abstract global Privacy readonly override":R.modifier,"is keyof unique infer":R.operatorKeyword,JSXAttributeValue:R.attributeValue,JSXText:R.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":R.angleBracket,"JSXIdentifier JSXNameSpacedName":R.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":R.attributeName,"JSXBuiltin/JSXIdentifier":R.standard(R.tagName)}),qre={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,extends:54,this:58,true:66,false:66,null:78,void:82,typeof:86,super:102,new:136,delete:148,yield:157,await:161,class:166,public:229,private:229,protected:229,readonly:231,instanceof:250,satisfies:253,in:254,const:256,import:290,keyof:345,unique:349,infer:355,is:391,abstract:411,implements:413,type:415,let:418,var:420,using:423,interface:429,enum:433,namespace:439,module:441,declare:445,global:449,for:468,of:477,while:480,with:484,do:488,if:492,else:494,switch:498,case:504,try:510,catch:514,finally:518,return:522,throw:526,break:530,continue:534,debugger:538},Yre={__proto__:null,async:123,get:125,set:127,declare:189,public:191,private:191,protected:191,static:193,abstract:195,override:197,readonly:203,accessor:205,new:395},Gre={__proto__:null,"<":187},Kre=mu.deserialize({version:14,states:"$=dO%TQ^OOO%[Q^OOO'_Q`OOP(lOWOOO*zQ?NdO'#CiO+RO!bO'#CjO+aO#tO'#CjO+oO!0LbO'#D^O.QQ^O'#DdO.bQ^O'#DoO%[Q^O'#DwO0fQ^O'#EPOOQ?Mr'#EX'#EXO1PQWO'#EUOOQO'#Em'#EmOOQO'#Ih'#IhO1XQWO'#GpO1dQWO'#ElO1iQWO'#ElO3hQ?NdO'#JmO6[Q?NdO'#JnO6uQWO'#F[O6zQ&jO'#FsOOQ?Mr'#Fe'#FeO7VO,YO'#FeO7eQ7[O'#FzO9RQWO'#FyOOQ?Mr'#Jn'#JnOOQ?Mp'#Jm'#JmO9WQWO'#GtOOQU'#KZ'#KZO9cQWO'#IUO9hQ?MxO'#IVOOQU'#JZ'#JZOOQU'#IZ'#IZQ`Q^OOO`Q^OOO9pQMnO'#DsO9wQ^O'#D{O:OQ^O'#D}O9^QWO'#GpO:VQ7[O'#CoO:eQWO'#EkO:pQWO'#EvO:uQ7[O'#FdO;dQWO'#GpOOQO'#K['#K[O;iQWO'#K[O;wQWO'#GxO;wQWO'#GyO;wQWO'#G{O9^QWO'#HOOVQWO'#CeO>gQWO'#H_O>oQWO'#HeO>oQWO'#HgO`Q^O'#HiO>oQWO'#HkO>oQWO'#HnO>tQWO'#HtO>yQ?MyO'#HzO%[Q^O'#H|O?UQ?MyO'#IOO?aQ?MyO'#IQO9hQ?MxO'#ISO?lQ?NdO'#CiO@nQ`O'#DiQOQWOOO%[Q^O'#D}OAUQWO'#EQO:VQ7[O'#EkOAaQWO'#EkOAlQpO'#FdOOQU'#Cg'#CgOOQ?Mp'#Dn'#DnOOQ?Mp'#Jq'#JqO%[Q^O'#JqOOQO'#Jt'#JtOOQO'#Id'#IdOBlQ`O'#EdOOQ?Mp'#Ec'#EcOOQ?Mp'#Jx'#JxOChQ?NQO'#EdOCrQ`O'#ETOOQO'#Js'#JsODWQ`O'#JtOEeQ`O'#ETOCrQ`O'#EdPErO#@ItO'#CbPOOO)CDx)CDxOOOO'#I['#I[OE}O!bO,59UOOQ?Mr,59U,59UOOOO'#I]'#I]OF]O#tO,59UO%[Q^O'#D`OOOO'#I_'#I_OFkO!0LbO,59xOOQ?Mr,59x,59xOFyQ^O'#I`OG^QWO'#JoOI]QrO'#JoO+}Q^O'#JoOIdQWO,5:OOIzQWO'#EmOJXQWO'#KOOJdQWO'#J}OJdQWO'#J}OJlQWO,5;ZOJqQWO'#J|OOQ?Mv,5:Z,5:ZOJxQ^O,5:ZOLvQ?NdO,5:cOMgQWO,5:kONQQ?MxO'#J{ONXQWO'#JzO9WQWO'#JzONmQWO'#JzONuQWO,5;YONzQWO'#JzO!#PQrO'#JnOOQ?Mr'#Ci'#CiO%[Q^O'#EPO!#oQrO,5:pOOQQ'#Ju'#JuOOQO-EpOOQU'#Jc'#JcOOQU,5>q,5>qOOQU-EtQWO'#HTO9^QWO'#HVO!DgQWO'#HVO:VQ7[O'#HXO!DlQWO'#HXOOQU,5=m,5=mO!DqQWO'#HYO!ESQWO'#CoO!EXQWO,59PO!EcQWO,59PO!GhQ^O,59POOQU,59P,59PO!GxQ?MxO,59PO%[Q^O,59PO!JTQ^O'#HaOOQU'#Hb'#HbOOQU'#Hc'#HcO`Q^O,5=yO!JkQWO,5=yO`Q^O,5>PO`Q^O,5>RO!JpQWO,5>TO`Q^O,5>VO!JuQWO,5>YO!JzQ^O,5>`OOQU,5>f,5>fO%[Q^O,5>fO9hQ?MxO,5>hOOQU,5>j,5>jO# UQWO,5>jOOQU,5>l,5>lO# UQWO,5>lOOQU,5>n,5>nO# rQ`O'#D[O%[Q^O'#JqO# |Q`O'#JqO#!kQ`O'#DjO#!|Q`O'#DjO#%_Q^O'#DjO#%fQWO'#JpO#%nQWO,5:TO#%sQWO'#EqO#&RQWO'#KPO#&ZQWO,5;[O#&`Q`O'#DjO#&mQ`O'#ESOOQ?Mr,5:l,5:lO%[Q^O,5:lO#&tQWO,5:lO>tQWO,5;VO!A}Q`O,5;VO!BVQ7[O,5;VO:VQ7[O,5;VO#&|QWO,5@]O#'RQ(CYO,5:pOOQO-EzO+}Q^O,5>zOOQO,5?Q,5?QO#*ZQ^O'#I`OOQO-E<^-E<^O#*hQWO,5@ZO#*pQrO,5@ZO#*wQWO,5@iOOQ?Mr1G/j1G/jO%[Q^O,5@jO#+PQWO'#IfOOQO-EoQWO1G3oO$4tQ^O1G3qO$8xQ^O'#HpOOQU1G3t1G3tO$9VQWO'#HvO>tQWO'#HxOOQU1G3z1G3zO$9_Q^O1G3zO9hQ?MxO1G4QOOQU1G4S1G4SOOQ?Mp'#G]'#G]O9hQ?MxO1G4UO9hQ?MxO1G4WO$=fQWO,5@]O!(oQ^O,5;]O9WQWO,5;]O>tQWO,5:UO!(oQ^O,5:UO!A}Q`O,5:UO$=kQ07bO,5:UOOQO,5;],5;]O$=uQ`O'#IaO$>]QWO,5@[OOQ?Mr1G/o1G/oO$>eQ`O'#IgO$>oQWO,5@kOOQ?Mp1G0v1G0vO#!|Q`O,5:UOOQO'#Ic'#IcO$>wQ`O,5:nOOQ?Mv,5:n,5:nO#&wQWO1G0WOOQ?Mr1G0W1G0WO%[Q^O1G0WOOQ?Mr1G0q1G0qO>tQWO1G0qO!A}Q`O1G0qO!BVQ7[O1G0qOOQ?Mp1G5w1G5wO!ArQ?MxO1G0ZOOQO1G0j1G0jO%[Q^O1G0jO$?OQ?MxO1G0jO$?ZQ?MxO1G0jO!A}Q`O1G0ZOCrQ`O1G0ZO$?iQ?MxO1G0jOOQO1G0Z1G0ZO$?}Q?NdO1G0jPOOO-EzO$@kQWO1G5uO$@sQWO1G6TO$@{QrO1G6UO9WQWO,5?QO$AVQ?NdO1G6RO%[Q^O1G6RO$AgQ?MxO1G6RO$AxQWO1G6QO$AxQWO1G6QO9WQWO1G6QO$BQQWO,5?TO9WQWO,5?TOOQO,5?T,5?TO$BfQWO,5?TO$)nQWO,5?TOOQO-E[OOQU,5>[,5>[O%[Q^O'#HqO%:PQWO'#HsOOQU,5>b,5>bO9WQWO,5>bOOQU,5>d,5>dOOQU7+)f7+)fOOQU7+)l7+)lOOQU7+)p7+)pOOQU7+)r7+)rO%:UQ`O1G5wO%:jQ07bO1G0wO%:tQWO1G0wOOQO1G/p1G/pO%;PQ07bO1G/pO>tQWO1G/pO!(oQ^O'#DjOOQO,5>{,5>{OOQO-E<_-E<_OOQO,5?R,5?ROOQO-EtQWO7+&]O!A}Q`O7+&]OOQO7+%u7+%uO$?}Q?NdO7+&UOOQO7+&U7+&UO%[Q^O7+&UO%;ZQ?MxO7+&UO!ArQ?MxO7+%uO!A}Q`O7+%uO%;fQ?MxO7+&UO%;tQ?NdO7++mO%[Q^O7++mO%|O%[Q^O,5>|OOQO-E<`-E<`O%HZQWO1G5xOOQ?Mr<]OOQU,5>_,5>_O&;mQWO1G3|O9WQWO7+&cO!(oQ^O7+&cOOQO7+%[7+%[O&;rQ07bO1G6UO>tQWO7+%[OOQ?Mr<tQWO<tQWO7+)hO'){QWO<{AN>{O%[Q^OAN?[OOQO<]Q7[OG27QOOQO<mQ07bO7+*jOOQUG27iG27iO&:OQWOG27iO!&_Q7[OG27iOOQUG27kG27kO9hQ?MxOG27kOOQUG27sG27sO'>wQ07bOG25TOOQOLD*bLD*bOOQU!$(!Y!$(!YO#&wQWO!$(!YO!&_Q7[O!$(!YO'?RQ?NdOG27QOOQ?MpG26uG26uOOQULD-TLD-TO&:OQWOLD-TOOQULD-VLD-VOOQU!)9Et!)9EtO#&wQWO!)9EtOOQU!$(!o!$(!oOOQU!.K;`!.K;`O'AaQ07bOG27QO!(oQ^O'#DwO1PQWO'#EUO'CSQrO'#JmO'CZQMnO'#DsO'CbQ^O'#D{O'CiQrO'#CiO'FPQrO'#CiO!(oQ^O'#D}O'FaQ^O,5;WO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O'#IlO'HdQWO,5kOh%WOk+aO![']O%f+`O~O!d+cOa(WX![(WX'u(WX!Y(WX~Oa%lO![XO'u%lO~Oh%WO!i%cO~Oh%WO!i%cO(O%eO~O!d#vO#h(tO~Ob+nO%g+oO(O+kO(QTO(TUO!Z)TP~O!Y+pO`)SX~O[+tO~O`+uO~O![%}O(O%eO(P!lO`)SP~Oh%WO#]+zO~Oh%WOk+}O![$}O~O![,PO~O},RO![XO~O%k%tO~O!u,WO~Oe,]O~Ob,^O(O#nO(QTO(TUO!Z)RP~Oe%{O~O%g!QO(O&WO~P=RO[,cO`,bO~OPYOQYOSfOdzOeyOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO!fuO!iZO!lYO!mYO!nYO!pvO!uxO!y]O%e}O(QTO(TUO([VO(j[O(yiO~O![!eO!r!gO$V!kO(O!dO~P!EkO`,bOa%lO'u%lO~OPYOQYOSfOd!jOe!iOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![!eO!fuO!iZO!lYO!mYO!nYO!pvO!u!hO$V!kO(O!dO(QTO(TUO([VO(j[O(yiO~Oa,hO!rwO#t!OO%i!OO%j!OO%k!OO~P!HTO!i&lO~O&Y,nO~O![,pO~O&k,rO&m,sOP&haQ&haS&haY&haa&had&hae&ham&hao&hap&haq&haw&hay&ha{&ha!P&ha!T&ha!U&ha![&ha!f&ha!i&ha!l&ha!m&ha!n&ha!p&ha!r&ha!u&ha!y&ha#t&ha$V&ha%e&ha%g&ha%i&ha%j&ha%k&ha%n&ha%p&ha%s&ha%t&ha%v&ha&S&ha&Y&ha&[&ha&^&ha&`&ha&c&ha&i&ha&o&ha&q&ha&s&ha&u&ha&w&ha's&ha(O&ha(Q&ha(T&ha([&ha(j&ha(y&ha!Z&ha&a&hab&ha&f&ha~O(O,xO~Oh!bX!Y!OX!Z!OX!d!OX!d!bX!i!bX#]!OX~O!Y!bX!Z!bX~P# ZO!d,}O#],|Oh(eX!Y#eX!Y(eX!Z#eX!Z(eX!d(eX!i(eX~Oh%WO!d-PO!i%cO!Y!^X!Z!^X~Op!nO!P!oO(QTO(TUO(`!mO~OP:kOQ:kOSfOdkOg'XX!Y'XX~P!+hO!Y.wOg(ka~OSfO![3uO$c3vO~O!Z3zO~Os3{O~P#.aOa$lq!Y$lq'u$lq's$lq!V$lq!h$lqs$lq![$lq%f$lq!d$lq~P!9mO!V3|O~P#.aO}){O!P)|O(u%QOk'ea(t'ea!Y'ea#]'ea~Og'ea#}'ea~P%+]O}){O!P)|Ok'ga(t'ga(u'ga!Y'ga#]'ga~Og'ga#}'ga~P%,OO(m$ZO~P#.aO!VfX!V$xX!YfX!Y$xX!d%PX#]fX~P!/gO(O;lO~P!1_OmkO(O4OO~P.iO!P%fO!X4QO![%gO(O%eO!Y'aX!h'aX~O!Y/hO!h(za~O!Y/hO!d#vO!h(za~O!Y/hO!d#vO(m'mO!h(za~Og$zi!Y$zi#]$zi#}$zi~P!0pO!X4YO!V'cX!Y'cX~P!3^O!Y/pO!V({a~O!Y/pO!V({a~P#.aO!d#vO#s4bO~Oo4eO!d#vO(m'mO~O(t%OOk%^i}%^i!P%^i(u%^i!Y%^i#]%^i~Og%^i#}%^i~P%0^O(u%QOk%`i}%`i!P%`i(t%`i!Y%`i#]%`i~Og%`i#}%`i~P%1POg(Yi!Y(Yi~P!0pO#]4lOg(Yi!Y(Yi~P!0pO!h4oO~Oa$mq!Y$mq'u$mq's$mq!V$mq!h$mqs$mq![$mq%f$mq!d$mq~P!9mO!V4sO~O!Y4tO![(|X~P#.aOa$xX![$xX%Z]X'u$xX!Y$xX~P!/gO%Z4wOalXklX}lX!PlX![lX'ulX(tlX(ulX!YlX~O%Z4wO~Ob4}O%g5OO(O+kO(QTO(TUO!Y'pX!Z'pX~O!Y0wO!Z)Ta~O[5SO~O`5TO~Oa%lO'u%lO~P#.aO![$}O~P#.aO!Y5]O#]5_O!Z)QX~O!Z5`O~Op!nO!P5aO!_!yO!`!vO!a!vO!y:lO#Q!pO#R!pO#S!pO#T!pO#U!pO#X5fO#Y!zO(P!lO(QTO(TUO(`!mO(j!sO~O!Z5eO~P%6ZOk5kO![1aO%f5jO~Oh%WOk5kO![1aO%f5jO~Ob5rO(O#nO(QTO(TUO!Y'oX!Z'oX~O!Y1lO!Z)Ra~O(QTO(TUO(`5tO~O`5xO~O#s5{O&W5|O~PMlO!h5}O~P%[Oa6PO~Oa6PO~P%[Ob2SO!Z6UO&f2RO~P`O!d6WO~O!d6YOh(ei!Y(ei!Z(ei!d(ei!i(ei~O!Y#ei!Z#ei~P#D_O#]6ZO!Y#ei!Z#ei~O!Y!^i!Z!^i~P#D_Oa%lO#]6dO'u%lO~Oa%lO!d#vO#]6dO'u%lO~O!Y(oq!h(oqa(oq'u(oq~P!9mO!Y(fO!h(nq~O!P%fO![%gO#g6kO(O%eO~O![']O%f6nO~Ok6rO![']O%f6nO~O#h'eaP'eaR'ea['eaa'eao'ea!i'ea!m'ea#O'ea#k'ea#l'ea#m'ea#n'ea#o'ea#p'ea#q'ea#r'ea#s'ea#u'ea#w'ea#y'ea#z'ea'u'ea(['ea(m'ea!h'ea!V'ea's'eas'ea!['ea%f'ea!d'ea~P%+]O#h'gaP'gaR'ga['gaa'gao'ga!i'ga!m'ga#O'ga#k'ga#l'ga#m'ga#n'ga#o'ga#p'ga#q'ga#r'ga#s'ga#u'ga#w'ga#y'ga#z'ga'u'ga(['ga(m'ga!h'ga!V'ga's'gas'ga!['ga%f'ga!d'ga~P%,OO#h$ziP$ziR$zi[$zia$zio$zi!Y$zi!i$zi!m$zi#O$zi#k$zi#l$zi#m$zi#n$zi#o$zi#p$zi#q$zi#r$zi#s$zi#u$zi#w$zi#y$zi#z$zi'u$zi([$zi(m$zi!h$zi!V$zi's$zi#]$zis$zi![$zi%f$zi!d$zi~P#.aO#h%^iP%^iR%^i[%^ia%^io%^i!i%^i!m%^i#O%^i#k%^i#l%^i#m%^i#n%^i#o%^i#p%^i#q%^i#r%^i#s%^i#u%^i#w%^i#y%^i#z%^i'u%^i([%^i(m%^i!h%^i!V%^i's%^is%^i![%^i%f%^i!d%^i~P%0^O#h%`iP%`iR%`i[%`ia%`io%`i!i%`i!m%`i#O%`i#k%`i#l%`i#m%`i#n%`i#o%`i#p%`i#q%`i#r%`i#s%`i#u%`i#w%`i#y%`i#z%`i'u%`i([%`i(m%`i!h%`i!V%`i's%`is%`i![%`i%f%`i!d%`i~P%1PO!Y'Ua!h'Ua~P!9mO!Y.lO!h(fi~O#}#`i!Y#`i!Z#`i~P#D_OP$]OR#zO}#yO!P#{O!i#xO!m$]O([VO[#jio#ji#O#ji#l#ji#m#ji#n#ji#o#ji#p#ji#q#ji#r#ji#s#ji#u#ji#w#ji#y#ji#z#ji#}#ji(m#ji(t#ji(u#ji!Y#ji!Z#ji~O#k#ji~P%HpO#k:tO~P%HpOP$]OR#zO}#yO!P#{O!i#xO!m$]O#k:tO#l:uO#m:uO#n:uO([VO[#ji#O#ji#o#ji#p#ji#q#ji#r#ji#s#ji#u#ji#w#ji#y#ji#z#ji#}#ji(m#ji(t#ji(u#ji!Y#ji!Z#ji~Oo#ji~P%JxOo:vO~P%JxOP$]OR#zOo:vO}#yO!P#{O!i#xO!m$]O#k:tO#l:uO#m:uO#n:uO#o:wO([VO#u#ji#w#ji#y#ji#z#ji#}#ji(m#ji(t#ji(u#ji!Y#ji!Z#ji~O[#ji#O#ji#p#ji#q#ji#r#ji#s#ji~P%MQO[;SO#O:xO#p:xO#q:xO#r;RO#s:xO~P%MQOP$]OR#zO[;SOo:vO}#yO!P#{O!i#xO!m$]O#O:xO#k:tO#l:uO#m:uO#n:uO#o:wO#p:xO#q:xO#r;RO#s:xO#u:yO([VO(u#}O#y#ji#z#ji#}#ji(m#ji(t#ji!Y#ji!Z#ji~O#w:{O~P& iO#w#ji~P& iOP$]OR#zO[;SOo:vO}#yO!P#{O!i#xO!m$]O#O:xO#k:tO#l:uO#m:uO#n:uO#o:wO#p:xO#q:xO#r;RO#s:xO#u:yO([VO#y#ji#z#ji#}#ji(m#ji!Y#ji!Z#ji~O#w#ji(t#ji(u#ji~P&#qO#w:{O(t#|O(u#}O~P&#qOP$]OR#zO[;SOo:vO}#yO!P#{O!i#xO!m$]O#O:xO#k:tO#l:uO#m:uO#n:uO#o:wO#p:xO#q:xO#r;RO#s:xO#u:yO#w:{O#y:}O([VO(t#|O(u#}O~O#z#ji#}#ji(m#ji!Y#ji!Z#ji~P&&POa#{y!Y#{y'u#{y's#{y!V#{y!h#{ys#{y![#{y%f#{y!d#{y~P!9mOk < TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:376,context:Ure,nodeProps:[["isolate",-8,5,6,14,34,36,48,50,52,""],["group",-26,9,17,19,65,204,208,212,213,215,218,221,231,233,239,241,243,245,248,254,260,262,264,266,268,270,271,"Statement",-34,13,14,29,32,33,39,48,51,52,54,59,67,69,73,77,79,81,82,107,108,117,118,135,138,140,141,142,143,144,146,147,166,167,169,"Expression",-23,28,30,34,38,40,42,171,173,175,176,178,179,180,182,183,184,186,187,188,198,200,202,203,"Type",-3,85,100,106,"ClassItem"],["openedBy",23,"<",35,"InterpolationStart",53,"[",57,"{",70,"(",159,"JSXStartCloseTag"],["closedBy",24,">",37,"InterpolationEnd",47,"]",58,"}",71,")",164,"JSXEndTag"]],propSources:[Zre],skippedNodes:[0,5,6,274],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$h&j(U!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(U!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$h&j(RpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU(RpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Rp(U!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z07[+rq$h&j(Rp(U!b'w0/lOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z07[.ST(S#S$h&j'x0/lO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c07[.n_$h&j(Rp(U!b'x0/lOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)3p/x`$h&j!m),Q(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW1V`#u(Ch$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW2d_#u(Ch$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At3l_(Q':f$h&j(U!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$h&j(U!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$h&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$c`$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$c``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$c`$h&j(U!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ(U!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$c`(U!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k%9[:hh$h&j(Rp(U!bOY%ZYZ&cZq%Zqr`#P#o`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXWS$h&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSWSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWWS(U!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]WS$h&j(RpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWWS(RpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYWS(Rp(U!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%l^!Q^$h&j!U7`OY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@c!_!}!=y!}#O!CW#O#P!Dy#P#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y|#X#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#k!>|#k#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&c7`!@hX!U7`OY!@cZ!P!@c!P!Q!AT!Q!}!@c!}#O!Ar#O#P!Bq#P;'S!@c;'S;=`!CQ<%lO!@c7`!AYW!U7`#W#X!AT#Z#[!AT#]#^!AT#a#b!AT#g#h!AT#i#j!AT#j#k!AT#m#n!AT7`!AuVOY!ArZ#O!Ar#O#P!B[#P#Q!@c#Q;'S!Ar;'S;=`!Bk<%lO!Ar7`!B_SOY!ArZ;'S!Ar;'S;=`!Bk<%lO!Ar7`!BnP;=`<%l!Ar7`!BtSOY!@cZ;'S!@c;'S;=`!CQ<%lO!@c7`!CTP;=`<%l!@c^!Ezl$h&j(U!b!U7`OY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#W&}#W#X!Eq#X#Z&}#Z#[!Eq#[#]&}#]#^!Eq#^#a&}#a#b!Eq#b#g&}#g#h!Eq#h#i&}#i#j!Eq#j#k!Eq#k#m&}#m#n!Eq#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}8r!GyZ(U!b!U7`OY!GrZw!Grwx!@cx!P!Gr!P!Q!Hl!Q!}!Gr!}#O!JU#O#P!Bq#P;'S!Gr;'S;=`!J|<%lO!Gr8r!Hse(U!b!U7`OY'}Zw'}x#O'}#P#W'}#W#X!Hl#X#Z'}#Z#[!Hl#[#]'}#]#^!Hl#^#a'}#a#b!Hl#b#g'}#g#h!Hl#h#i'}#i#j!Hl#j#k!Hl#k#m'}#m#n!Hl#n;'S'};'S;=`(f<%lO'}8r!JZX(U!bOY!JUZw!JUwx!Arx#O!JU#O#P!B[#P#Q!Gr#Q;'S!JU;'S;=`!Jv<%lO!JU8r!JyP;=`<%l!JU8r!KPP;=`<%l!Gr>^!KZ^$h&j(U!bOY!KSYZ&cZw!KSwx!CWx!^!KS!^!_!JU!_#O!KS#O#P!DR#P#Q!^!LYP;=`<%l!KS>^!L`P;=`<%l!_#c#d#Bq#d#l%Z#l#m#Es#m#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#>j_$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#?rd$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#A]f$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Bzc$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Dbe$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#E|g$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Gpi$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x#Il_!d$b$h&j#})Lv(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)[#Jv_al$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f#LS^h#)`#O-qre[t]||-1},{term:338,get:t=>Yre[t]||-1},{term:92,get:t=>Gre[t]||-1}],tokenPrec:14793}),kB=[ci("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),ci("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),ci("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),ci("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),ci("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),ci(`try { \${} } catch (\${error}) { \${} -}`,{label:"try",detail:"/ catch block",type:"keyword"}),di("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),di(`if (\${}) { +}`,{label:"try",detail:"/ catch block",type:"keyword"}),ci("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),ci(`if (\${}) { \${} } else { \${} -}`,{label:"if",detail:"/ else block",type:"keyword"}),di(`class \${name} { +}`,{label:"if",detail:"/ else block",type:"keyword"}),ci(`class \${name} { constructor(\${params}) { \${} } -}`,{label:"class",detail:"definition",type:"keyword"}),di('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),di('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],Jre=kB.concat([di("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),di("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),di("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),LR=new $D,xB=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function $h(t){return(e,n)=>{let i=e.node.getChild("VariableDefinition");return i&&n(i,t),!0}}const eoe=["FunctionDeclaration"],toe={FunctionDeclaration:$h("function"),ClassDeclaration:$h("class"),ClassExpression:()=>!0,EnumDeclaration:$h("constant"),TypeAliasDeclaration:$h("type"),NamespaceDeclaration:$h("namespace"),VariableDefinition(t,e){t.matchContext(eoe)||e(t,"variable")},TypeDefinition(t,e){e(t,"type")},__proto__:null};function _B(t,e){let n=LR.get(e);if(n)return n;let i=[],r=!0;function o(s,a){let l=t.sliceString(s.from,s.to);i.push({label:l,type:a})}return e.cursor(yt.IncludeAnonymous).iterate(s=>{if(r)r=!1;else if(s.name){let a=toe[s.name];if(a&&a(s,o)||xB.has(s.name))return!1}else if(s.to-s.from>8192){for(let a of _B(t,s.node))i.push(a);return!1}}),LR.set(e,i),i}const NR=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,EB=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName",".","?."];function noe(t){let e=gt(t.state).resolveInner(t.pos,-1);if(EB.indexOf(e.name)>-1)return null;let n=e.name=="VariableName"||e.to-e.from<20&&NR.test(t.state.sliceDoc(e.from,e.to));if(!n&&!t.explicit)return null;let i=[];for(let r=e;r;r=r.parent)xB.has(r.name)&&(i=i.concat(_B(t.state.doc,r)));return{options:i,from:n?e.from:t.pos,validFor:NR}}const So=uu.define({name:"javascript",parser:Kre.configure({props:[Gd.add({IfStatement:Gc({except:/^\s*({|else\b)/}),TryStatement:Gc({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:ate,SwitchBody:t=>{let e=t.textAfter,n=/^\s*\}/.test(e),i=/^\s*(case|default)\b/.test(e);return t.baseIndent+(n?0:i?1:2)*t.unit},Block:ste({closing:"}"}),ArrowFunction:t=>t.baseIndent+t.unit,"TemplateString BlockComment":()=>null,"Statement Property":Gc({except:/^{/}),JSXElement(t){let e=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},JSXEscape(t){let e=/\s*\}/.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},"JSXOpenTag JSXSelfClosingTag"(t){return t.column(t.node.from)+t.unit}}),Ru.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":mx,BlockComment(t){return{from:t.from+2,to:t.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),CB={test:t=>/^JSX/.test(t.name),facet:cb({commentTokens:{block:{open:"{/*",close:"*/}"}}})},TB=So.configure({dialect:"ts"},"typescript"),PB=So.configure({dialect:"jsx",props:[fx.add(t=>t.isTop?[CB]:void 0)]}),AB=So.configure({dialect:"jsx ts",props:[fx.add(t=>t.isTop?[CB]:void 0)]},"typescript");let RB=t=>({label:t,type:"keyword"});const IB="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(RB),ioe=IB.concat(["declare","implements","private","protected","public"].map(RB));function XS(t={}){let e=t.jsx?t.typescript?AB:PB:t.typescript?TB:So,n=t.typescript?Jre.concat(ioe):kB.concat(IB);return new md(e,[So.data.of({autocomplete:Ute(EB,s4(n))}),So.data.of({autocomplete:noe}),t.jsx?soe:[]])}function roe(t){for(;;){if(t.name=="JSXOpenTag"||t.name=="JSXSelfClosingTag"||t.name=="JSXFragmentTag")return t;if(t.name=="JSXEscape"||!t.parent)return null;t=t.parent}}function MR(t,e,n=t.length){for(let i=e==null?void 0:e.firstChild;i;i=i.nextSibling)if(i.name=="JSXIdentifier"||i.name=="JSXBuiltin"||i.name=="JSXNamespacedName"||i.name=="JSXMemberExpression")return t.sliceString(i.from,Math.min(i.to,n));return""}const ooe=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),soe=ue.inputHandler.of((t,e,n,i,r)=>{if((ooe?t.composing:t.compositionStarted)||t.state.readOnly||e!=n||i!=">"&&i!="/"||!So.isActiveAt(t.state,e,-1))return!1;let o=r(),{state:s}=o,a=s.changeByRange(l=>{var u;let{head:c}=l,d=gt(s).resolveInner(c-1,-1),h;if(d.name=="JSXStartTag"&&(d=d.parent),!(s.doc.sliceString(c-1,c)!=i||d.name=="JSXAttributeValue"&&d.to>c)){if(i==">"&&d.name=="JSXFragmentTag")return{range:l,changes:{from:c,insert:""}};if(i=="/"&&d.name=="JSXStartCloseTag"){let p=d.parent,m=p.parent;if(m&&p.from==c-2&&((h=MR(s.doc,m.firstChild,c))||((u=m.firstChild)===null||u===void 0?void 0:u.name)=="JSXFragmentTag")){let O=`${h}>`;return{range:q.cursor(c+O.length,-1),changes:{from:c,insert:O}}}}else if(i==">"){let p=roe(d);if(p&&p.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(s.doc.sliceString(c,c+2))&&(h=MR(s.doc,p,c)))return{range:l,changes:{from:c,insert:``}}}}return{range:l}});return a.changes.empty?!1:(t.dispatch([o,s.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),aoe=54,loe=1,uoe=55,coe=2,doe=56,hoe=3,DR=4,foe=5,sO=6,$B=7,LB=8,NB=9,MB=10,poe=11,moe=12,goe=13,qy=57,Ooe=14,BR=58,DB=20,boe=22,BB=23,yoe=24,ZS=26,QB=27,voe=28,Soe=31,woe=34,koe=36,xoe=37,_oe=0,Eoe=1,Coe={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},Toe={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},QR={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function Poe(t){return t==45||t==46||t==58||t>=65&&t<=90||t==95||t>=97&&t<=122||t>=161}function FB(t){return t==9||t==10||t==13||t==32}let FR=null,zR=null,HR=0;function qS(t,e){let n=t.pos+e;if(HR==n&&zR==t)return FR;let i=t.peek(e);for(;FB(i);)i=t.peek(++e);let r="";for(;Poe(i);)r+=String.fromCharCode(i),i=t.peek(++e);return zR=t,HR=n,FR=r?r.toLowerCase():i==Aoe||i==Roe?void 0:null}const zB=60,aO=62,Fx=47,Aoe=63,Roe=33,Ioe=45;function UR(t,e){this.name=t,this.parent=e,this.hash=e?e.hash:0;for(let n=0;n-1?new UR(qS(i,1)||"",t):t},reduce(t,e){return e==DB&&t?t.parent:t},reuse(t,e,n,i){let r=e.type.id;return r==sO||r==koe?new UR(qS(i,1)||"",t):t},hash(t){return t?t.hash:0},strict:!1}),Noe=new Xr((t,e)=>{if(t.next!=zB){t.next<0&&e.context&&t.acceptToken(qy);return}t.advance();let n=t.next==Fx;n&&t.advance();let i=qS(t,0);if(i===void 0)return;if(!i)return t.acceptToken(n?Ooe:sO);let r=e.context?e.context.name:null;if(n){if(i==r)return t.acceptToken(poe);if(r&&Toe[r])return t.acceptToken(qy,-2);if(e.dialectEnabled(_oe))return t.acceptToken(moe);for(let o=e.context;o;o=o.parent)if(o.name==i)return;t.acceptToken(goe)}else{if(i=="script")return t.acceptToken($B);if(i=="style")return t.acceptToken(LB);if(i=="textarea")return t.acceptToken(NB);if(Coe.hasOwnProperty(i))return t.acceptToken(MB);r&&QR[r]&&QR[r][i]?t.acceptToken(qy,-1):t.acceptToken(sO)}},{contextual:!0}),Moe=new Xr(t=>{for(let e=0,n=0;;n++){if(t.next<0){n&&t.acceptToken(BR);break}if(t.next==Ioe)e++;else if(t.next==aO&&e>=2){n>=3&&t.acceptToken(BR,-2);break}else e=0;t.advance()}});function Doe(t){for(;t;t=t.parent)if(t.name=="svg"||t.name=="math")return!0;return!1}const Boe=new Xr((t,e)=>{if(t.next==Fx&&t.peek(1)==aO){let n=e.dialectEnabled(Eoe)||Doe(e.context);t.acceptToken(n?foe:DR,2)}else t.next==aO&&t.acceptToken(DR,1)});function zx(t,e,n){let i=2+t.length;return new Xr(r=>{for(let o=0,s=0,a=0;;a++){if(r.next<0){a&&r.acceptToken(e);break}if(o==0&&r.next==zB||o==1&&r.next==Fx||o>=2&&os?r.acceptToken(e,-s):r.acceptToken(n,-(s-2));break}else if((r.next==10||r.next==13)&&a){r.acceptToken(e,1);break}else o=s=0;r.advance()}})}const Qoe=zx("script",aoe,loe),Foe=zx("style",uoe,coe),zoe=zx("textarea",doe,hoe),Hoe=Au({"Text RawText":R.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":R.angleBracket,TagName:R.tagName,"MismatchedCloseTag/TagName":[R.tagName,R.invalid],AttributeName:R.attributeName,"AttributeValue UnquotedAttributeValue":R.attributeValue,Is:R.definitionOperator,"EntityReference CharacterReference":R.character,Comment:R.blockComment,ProcessingInst:R.processingInstruction,DoctypeDecl:R.documentMeta}),Uoe=fu.deserialize({version:14,states:",xOVO!rOOO!WQ#tO'#CqO!]Q#tO'#CzO!bQ#tO'#C}O!gQ#tO'#DQO!lQ#tO'#DSO!qOaO'#CpO!|ObO'#CpO#XOdO'#CpO$eO!rO'#CpOOO`'#Cp'#CpO$lO$fO'#DTO$tQ#tO'#DVO$yQ#tO'#DWOOO`'#Dk'#DkOOO`'#DY'#DYQVO!rOOO%OQ&rO,59]O%ZQ&rO,59fO%fQ&rO,59iO%qQ&rO,59lO%|Q&rO,59nOOOa'#D^'#D^O&XOaO'#CxO&dOaO,59[OOOb'#D_'#D_O&lObO'#C{O&wObO,59[OOOd'#D`'#D`O'POdO'#DOO'[OdO,59[OOO`'#Da'#DaO'dO!rO,59[O'kQ#tO'#DROOO`,59[,59[OOOp'#Db'#DbO'pO$fO,59oOOO`,59o,59oO'xQ#|O,59qO'}Q#|O,59rOOO`-E7W-E7WO(SQ&rO'#CsOOQW'#DZ'#DZO(bQ&rO1G.wOOOa1G.w1G.wOOO`1G/Y1G/YO(mQ&rO1G/QOOOb1G/Q1G/QO(xQ&rO1G/TOOOd1G/T1G/TO)TQ&rO1G/WOOO`1G/W1G/WO)`Q&rO1G/YOOOa-E7[-E7[O)kQ#tO'#CyOOO`1G.v1G.vOOOb-E7]-E7]O)pQ#tO'#C|OOOd-E7^-E7^O)uQ#tO'#DPOOO`-E7_-E7_O)zQ#|O,59mOOOp-E7`-E7`OOO`1G/Z1G/ZOOO`1G/]1G/]OOO`1G/^1G/^O*PQ,UO,59_OOQW-E7X-E7XOOOa7+$c7+$cOOO`7+$t7+$tOOOb7+$l7+$lOOOd7+$o7+$oOOO`7+$r7+$rO*[Q#|O,59eO*aQ#|O,59hO*fQ#|O,59kOOO`1G/X1G/XO*kO7[O'#CvO*|OMhO'#CvOOQW1G.y1G.yOOO`1G/P1G/POOO`1G/S1G/SOOO`1G/V1G/VOOOO'#D['#D[O+_O7[O,59bOOQW,59b,59bOOOO'#D]'#D]O+pOMhO,59bOOOO-E7Y-E7YOOQW1G.|1G.|OOOO-E7Z-E7Z",stateData:",]~O!^OS~OUSOVPOWQOXROYTO[]O][O^^O`^Oa^Ob^Oc^Ox^O{_O!dZO~OfaO~OfbO~OfcO~OfdO~OfeO~O!WfOPlP!ZlP~O!XiOQoP!ZoP~O!YlORrP!ZrP~OUSOVPOWQOXROYTOZqO[]O][O^^O`^Oa^Ob^Oc^Ox^O!dZO~O!ZrO~P#dO![sO!euO~OfvO~OfwO~OS|OT}OhyO~OS!POT}OhyO~OS!ROT}OhyO~OS!TOT}OhyO~OS}OT}OhyO~O!WfOPlX!ZlX~OP!WO!Z!XO~O!XiOQoX!ZoX~OQ!ZO!Z!XO~O!YlORrX!ZrX~OR!]O!Z!XO~O!Z!XO~P#dOf!_O~O![sO!e!aO~OS!bO~OS!cO~Oi!dOSgXTgXhgX~OS!fOT!gOhyO~OS!hOT!gOhyO~OS!iOT!gOhyO~OS!jOT!gOhyO~OS!gOT!gOhyO~Of!kO~Of!lO~Of!mO~OS!nO~Ok!qO!`!oO!b!pO~OS!rO~OS!sO~OS!tO~Oa!uOb!uOc!uO!`!wO!a!uO~Oa!xOb!xOc!xO!b!wO!c!xO~Oa!uOb!uOc!uO!`!{O!a!uO~Oa!xOb!xOc!xO!b!{O!c!xO~OT~bac!dx{!d~",goto:"%p!`PPPPPPPPPPPPPPPPPPPP!a!gP!mPP!yP!|#P#S#Y#]#`#f#i#l#r#x!aP!a!aP$O$U$l$r$x%O%U%[%bPPPPPPPP%hX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:Loe,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,21,30,33,36,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,29,32,35,37,"OpenTag"],["group",-9,14,17,18,19,20,39,40,41,42,"Entity",16,"Entity TextContent",-3,28,31,34,"TextContent Entity"],["isolate",-11,21,29,30,32,33,35,36,37,38,41,42,"ltr",-3,26,27,39,""]],propSources:[Hoe],skippedNodes:[0],repeatNodeCount:9,tokenData:"!]tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^/^!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!Z5zbkWOX5uXZ7SZ[5u[^7S^p5uqr5urs7Sst+Ptw5uwx7Sx!]5u!]!^7w!^!a7S!a#S5u#S#T7S#T;'S5u;'S;=`8n<%lO5u!R7VVOp7Sqs7St!]7S!]!^7l!^;'S7S;'S;=`7q<%lO7S!R7qOa!R!R7tP;=`<%l7S!Z8OYkWa!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!Z8qP;=`<%l5u!_8{ihSkWOX5uXZ7SZ[5u[^7S^p5uqr8trs7Sst/^tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^:j!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!_:sbhSkWa!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!VP<%l?Ah;{?Ah?BY7S?BY?Mn;{?MnO7S!V=dXhSa!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!V>SP;=`<%l;{!_>YP;=`<%l8t!_>dhhSkWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^/^!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!Z@TakWOX@OXZAYZ[@O[^AY^p@Oqr@OrsAYsw@OwxAYx!]@O!]!^Az!^!aAY!a#S@O#S#TAY#T;'S@O;'S;=`Bq<%lO@O!RA]UOpAYq!]AY!]!^Ao!^;'SAY;'S;=`At<%lOAY!RAtOb!R!RAwP;=`<%lAY!ZBRYkWb!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!ZBtP;=`<%l@O!_COhhSkWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^Dj!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!_DsbhSkWb!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!VFQbhSOpAYqrE{rsAYswE{wxAYx!PE{!P!QAY!Q!]E{!]!^GY!^!aAY!a#sE{#s$fAY$f;'SE{;'S;=`G|<%l?AhE{?Ah?BYAY?BY?MnE{?MnOAY!VGaXhSb!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!VHPP;=`<%lE{!_HVP;=`<%lBw!ZHcW!bx`P!a`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t!aIYlhS`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OKQ!O!P-_!P!Q$q!Q!^-_!^!_*V!_!a&X!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!aK_khS`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_*V!_!`&X!`!aMS!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!TM_X`P!a`!cp!eQOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!aNZ!ZhSfQ`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OMz!O!PMz!P!Q$q!Q![Mz![!]Mz!]!^-_!^!_*V!_!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f$}-_$}%OMz%O%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4UMz4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Je-_$Je$JgMz$Jg$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!a!$PP;=`<%lMz!R!$ZY!a`!cpOq*Vqr!$yrs(Vsv*Vwx)ex!a*V!a!b!4t!b;'S*V;'S;=`*s<%lO*V!R!%Q]!a`!cpOr*Vrs(Vsv*Vwx)ex}*V}!O!%y!O!f*V!f!g!']!g#W*V#W#X!0`#X;'S*V;'S;=`*s<%lO*V!R!&QX!a`!cpOr*Vrs(Vsv*Vwx)ex}*V}!O!&m!O;'S*V;'S;=`*s<%lO*V!R!&vV!a`!cp!dPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!'dX!a`!cpOr*Vrs(Vsv*Vwx)ex!q*V!q!r!(P!r;'S*V;'S;=`*s<%lO*V!R!(WX!a`!cpOr*Vrs(Vsv*Vwx)ex!e*V!e!f!(s!f;'S*V;'S;=`*s<%lO*V!R!(zX!a`!cpOr*Vrs(Vsv*Vwx)ex!v*V!v!w!)g!w;'S*V;'S;=`*s<%lO*V!R!)nX!a`!cpOr*Vrs(Vsv*Vwx)ex!{*V!{!|!*Z!|;'S*V;'S;=`*s<%lO*V!R!*bX!a`!cpOr*Vrs(Vsv*Vwx)ex!r*V!r!s!*}!s;'S*V;'S;=`*s<%lO*V!R!+UX!a`!cpOr*Vrs(Vsv*Vwx)ex!g*V!g!h!+q!h;'S*V;'S;=`*s<%lO*V!R!+xY!a`!cpOr!+qrs!,hsv!+qvw!-Swx!.[x!`!+q!`!a!/j!a;'S!+q;'S;=`!0Y<%lO!+qq!,mV!cpOv!,hvx!-Sx!`!,h!`!a!-q!a;'S!,h;'S;=`!.U<%lO!,hP!-VTO!`!-S!`!a!-f!a;'S!-S;'S;=`!-k<%lO!-SP!-kO{PP!-nP;=`<%l!-Sq!-xS!cp{POv(Vx;'S(V;'S;=`(h<%lO(Vq!.XP;=`<%l!,ha!.aX!a`Or!.[rs!-Ssv!.[vw!-Sw!`!.[!`!a!.|!a;'S!.[;'S;=`!/d<%lO!.[a!/TT!a`{POr)esv)ew;'S)e;'S;=`)y<%lO)ea!/gP;=`<%l!.[!R!/sV!a`!cp{POr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!0]P;=`<%l!+q!R!0gX!a`!cpOr*Vrs(Vsv*Vwx)ex#c*V#c#d!1S#d;'S*V;'S;=`*s<%lO*V!R!1ZX!a`!cpOr*Vrs(Vsv*Vwx)ex#V*V#V#W!1v#W;'S*V;'S;=`*s<%lO*V!R!1}X!a`!cpOr*Vrs(Vsv*Vwx)ex#h*V#h#i!2j#i;'S*V;'S;=`*s<%lO*V!R!2qX!a`!cpOr*Vrs(Vsv*Vwx)ex#m*V#m#n!3^#n;'S*V;'S;=`*s<%lO*V!R!3eX!a`!cpOr*Vrs(Vsv*Vwx)ex#d*V#d#e!4Q#e;'S*V;'S;=`*s<%lO*V!R!4XX!a`!cpOr*Vrs(Vsv*Vwx)ex#X*V#X#Y!+q#Y;'S*V;'S;=`*s<%lO*V!R!4{Y!a`!cpOr!4trs!5ksv!4tvw!6Vwx!8]x!a!4t!a!b!:]!b;'S!4t;'S;=`!;r<%lO!4tq!5pV!cpOv!5kvx!6Vx!a!5k!a!b!7W!b;'S!5k;'S;=`!8V<%lO!5kP!6YTO!a!6V!a!b!6i!b;'S!6V;'S;=`!7Q<%lO!6VP!6lTO!`!6V!`!a!6{!a;'S!6V;'S;=`!7Q<%lO!6VP!7QOxPP!7TP;=`<%l!6Vq!7]V!cpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!cpxPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!a`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!a`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!a`xPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!a`!cpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!a`!cpxPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!{let u=a.type.id;if(u==voe)return Yy(a,l,n);if(u==Soe)return Yy(a,l,i);if(u==woe)return Yy(a,l,r);if(u==DB&&o.length){let c=a.node,d=c.firstChild,h=d&&WR(d,l),p;if(h){for(let m of o)if(m.tag==h&&(!m.attrs||m.attrs(p||(p=HB(c,l))))){let O=c.lastChild,y=O.type.id==xoe?O.from:c.to;if(y>d.to)return{parser:m.parser,overlay:[{from:d.to,to:y}]}}}}if(s&&u==BB){let c=a.node,d;if(d=c.firstChild){let h=s[l.read(d.from,d.to)];if(h)for(let p of h){if(p.tagName&&p.tagName!=WR(c.parent,l))continue;let m=c.lastChild;if(m.type.id==ZS){let O=m.from+1,y=m.lastChild,b=m.to-(y&&y.isError?0:1);if(b>O)return{parser:p.parser,overlay:[{from:O,to:b}]}}else if(m.type.id==QB)return{parser:p.parser,overlay:[{from:m.from,to:m.to}]}}}}return null})}const Woe=99,VR=1,Voe=100,joe=101,jR=2,WB=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],Xoe=58,Zoe=40,VB=95,qoe=91,Xg=45,Yoe=46,Goe=35,Koe=37,Joe=38,ese=92,tse=10;function fp(t){return t>=65&&t<=90||t>=97&&t<=122||t>=161}function jB(t){return t>=48&&t<=57}const nse=new Xr((t,e)=>{for(let n=!1,i=0,r=0;;r++){let{next:o}=t;if(fp(o)||o==Xg||o==VB||n&&jB(o))!n&&(o!=Xg||r>0)&&(n=!0),i===r&&o==Xg&&i++,t.advance();else if(o==ese&&t.peek(1)!=tse)t.advance(),t.next>-1&&t.advance(),n=!0;else{n&&t.acceptToken(o==Zoe?Voe:i==2&&e.canShift(jR)?jR:joe);break}}}),ise=new Xr(t=>{if(WB.includes(t.peek(-1))){let{next:e}=t;(fp(e)||e==VB||e==Goe||e==Yoe||e==qoe||e==Xoe&&fp(t.peek(1))||e==Xg||e==Joe)&&t.acceptToken(Woe)}}),rse=new Xr(t=>{if(!WB.includes(t.peek(-1))){let{next:e}=t;if(e==Koe&&(t.advance(),t.acceptToken(VR)),fp(e)){do t.advance();while(fp(t.next)||jB(t.next));t.acceptToken(VR)}}}),ose=Au({"AtKeyword import charset namespace keyframes media supports":R.definitionKeyword,"from to selector":R.keyword,NamespaceName:R.namespace,KeyframeName:R.labelName,KeyframeRangeName:R.operatorKeyword,TagName:R.tagName,ClassName:R.className,PseudoClassName:R.constant(R.className),IdName:R.labelName,"FeatureName PropertyName":R.propertyName,AttributeName:R.attributeName,NumberLiteral:R.number,KeywordQuery:R.keyword,UnaryQueryOp:R.operatorKeyword,"CallTag ValueName":R.atom,VariableName:R.variableName,Callee:R.operatorKeyword,Unit:R.unit,"UniversalSelector NestingSelector":R.definitionOperator,MatchOp:R.compareOperator,"ChildOp SiblingOp, LogicOp":R.logicOperator,BinOp:R.arithmeticOperator,Important:R.modifier,Comment:R.blockComment,ColorLiteral:R.color,"ParenthesizedContent StringLiteral":R.string,":":R.punctuation,"PseudoOp #":R.derefOperator,"; ,":R.separator,"( )":R.paren,"[ ]":R.squareBracket,"{ }":R.brace}),sse={__proto__:null,lang:32,"nth-child":32,"nth-last-child":32,"nth-of-type":32,"nth-last-of-type":32,dir:32,"host-context":32,url:60,"url-prefix":60,domain:60,regexp:60,selector:138},ase={__proto__:null,"@import":118,"@media":142,"@charset":146,"@namespace":150,"@keyframes":156,"@supports":168},lse={__proto__:null,not:132,only:132},use=fu.deserialize({version:14,states:":^QYQ[OOO#_Q[OOP#fOWOOOOQP'#Cd'#CdOOQP'#Cc'#CcO#kQ[O'#CfO$_QXO'#CaO$fQ[O'#ChO$qQ[O'#DTO$vQ[O'#DWOOQP'#Em'#EmO${QdO'#DgO%jQ[O'#DtO${QdO'#DvO%{Q[O'#DxO&WQ[O'#D{O&`Q[O'#ERO&nQ[O'#ETOOQS'#El'#ElOOQS'#EW'#EWQYQ[OOO&uQXO'#CdO'jQWO'#DcO'oQWO'#EsO'zQ[O'#EsQOQWOOP(UO#tO'#C_POOO)C@[)C@[OOQP'#Cg'#CgOOQP,59Q,59QO#kQ[O,59QO(aQ[O'#E[O({QWO,58{O)TQ[O,59SO$qQ[O,59oO$vQ[O,59rO(aQ[O,59uO(aQ[O,59wO(aQ[O,59xO)`Q[O'#DbOOQS,58{,58{OOQP'#Ck'#CkOOQO'#DR'#DROOQP,59S,59SO)gQWO,59SO)lQWO,59SOOQP'#DV'#DVOOQP,59o,59oOOQO'#DX'#DXO)qQ`O,59rOOQS'#Cp'#CpO${QdO'#CqO)yQvO'#CsO+ZQtO,5:ROOQO'#Cx'#CxO)lQWO'#CwO+oQWO'#CyO+tQ[O'#DOOOQS'#Ep'#EpOOQO'#Dj'#DjO+|Q[O'#DqO,[QWO'#EtO&`Q[O'#DoO,jQWO'#DrOOQO'#Eu'#EuO)OQWO,5:`O,oQpO,5:bOOQS'#Dz'#DzO,wQWO,5:dO,|Q[O,5:dOOQO'#D}'#D}O-UQWO,5:gO-ZQWO,5:mO-cQWO,5:oOOQS-E8U-E8UO${QdO,59}O-kQ[O'#E^O-xQWO,5;_O-xQWO,5;_POOO'#EV'#EVP.TO#tO,58yPOOO,58y,58yOOQP1G.l1G.lO.zQXO,5:vOOQO-E8Y-E8YOOQS1G.g1G.gOOQP1G.n1G.nO)gQWO1G.nO)lQWO1G.nOOQP1G/Z1G/ZO/XQ`O1G/^O/rQXO1G/aO0YQXO1G/cO0pQXO1G/dO1WQWO,59|O1]Q[O'#DSO1dQdO'#CoOOQP1G/^1G/^O${QdO1G/^O1kQpO,59]OOQS,59_,59_O${QdO,59aO1sQWO1G/mOOQS,59c,59cO1xQ!bO,59eOOQS'#DP'#DPOOQS'#EY'#EYO2QQ[O,59jOOQS,59j,59jO2YQWO'#DjO2eQWO,5:VO2jQWO,5:]O&`Q[O,5:XO&`Q[O'#E_O2rQWO,5;`O2}QWO,5:ZO(aQ[O,5:^OOQS1G/z1G/zOOQS1G/|1G/|OOQS1G0O1G0OO3`QWO1G0OO3eQdO'#EOOOQS1G0R1G0ROOQS1G0X1G0XOOQS1G0Z1G0ZO3pQtO1G/iOOQO,5:x,5:xO4WQ[O,5:xOOQO-E8[-E8[O4eQWO1G0yPOOO-E8T-E8TPOOO1G.e1G.eOOQP7+$Y7+$YOOQP7+$x7+$xO${QdO7+$xOOQS1G/h1G/hO4pQXO'#ErO4wQWO,59nO4|QtO'#EXO5tQdO'#EoO6OQWO,59ZO6TQpO7+$xOOQS1G.w1G.wOOQS1G.{1G.{OOQS7+%X7+%XO6]QWO1G/POOQS-E8W-E8WOOQS1G/U1G/UO${QdO1G/qOOQO1G/w1G/wOOQO1G/s1G/sO6bQWO,5:yOOQO-E8]-E8]O6pQXO1G/xOOQS7+%j7+%jO6wQYO'#CsOOQO'#EQ'#EQO7SQ`O'#EPOOQO'#EP'#EPO7_QWO'#E`O7gQdO,5:jOOQS,5:j,5:jO7rQtO'#E]O${QdO'#E]O8sQdO7+%TOOQO7+%T7+%TOOQO1G0d1G0dO9WQpO<OAN>OO:xQdO,5:uOOQO-E8X-E8XOOQO<T![;'S%^;'S;=`%o<%lO%^l;TUo`Oy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^l;nYo`#e[Oy%^z!Q%^!Q![;g![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^l[[o`#e[Oy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^n?VSt^Oy%^z;'S%^;'S;=`%o<%lO%^l?hWjWOy%^z!O%^!O!P;O!P!Q%^!Q![>T![;'S%^;'S;=`%o<%lO%^n@VU#bQOy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^~@nTjWOy%^z{@}{;'S%^;'S;=`%o<%lO%^~AUSo`#[~Oy%^z;'S%^;'S;=`%o<%lO%^lAg[#e[Oy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^bBbU]QOy%^z![%^![!]Bt!];'S%^;'S;=`%o<%lO%^bB{S^Qo`Oy%^z;'S%^;'S;=`%o<%lO%^nC^S!Y^Oy%^z;'S%^;'S;=`%o<%lO%^dCoS|SOy%^z;'S%^;'S;=`%o<%lO%^bDQU!OQOy%^z!`%^!`!aDd!a;'S%^;'S;=`%o<%lO%^bDkS!OQo`Oy%^z;'S%^;'S;=`%o<%lO%^bDzWOy%^z!c%^!c!}Ed!}#T%^#T#oEd#o;'S%^;'S;=`%o<%lO%^bEk[![Qo`Oy%^z}%^}!OEd!O!Q%^!Q![Ed![!c%^!c!}Ed!}#T%^#T#oEd#o;'S%^;'S;=`%o<%lO%^nFfSq^Oy%^z;'S%^;'S;=`%o<%lO%^nFwSp^Oy%^z;'S%^;'S;=`%o<%lO%^bGWUOy%^z#b%^#b#cGj#c;'S%^;'S;=`%o<%lO%^bGoUo`Oy%^z#W%^#W#XHR#X;'S%^;'S;=`%o<%lO%^bHYS!bQo`Oy%^z;'S%^;'S;=`%o<%lO%^bHiUOy%^z#f%^#f#gHR#g;'S%^;'S;=`%o<%lO%^fIQS!TUOy%^z;'S%^;'S;=`%o<%lO%^nIcS!S^Oy%^z;'S%^;'S;=`%o<%lO%^fItU!RQOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^`JZP;=`<%l$}",tokenizers:[ise,rse,nse,1,2,3,4,new oO("m~RRYZ[z{a~~g~aO#^~~dP!P!Qg~lO#_~~",28,105)],topRules:{StyleSheet:[0,4],Styles:[1,86]},specialized:[{term:100,get:t=>sse[t]||-1},{term:58,get:t=>ase[t]||-1},{term:101,get:t=>lse[t]||-1}],tokenPrec:1200});let Gy=null;function Ky(){if(!Gy&&typeof document=="object"&&document.body){let{style:t}=document.body,e=[],n=new Set;for(let i in t)i!="cssText"&&i!="cssFloat"&&typeof t[i]=="string"&&(/[A-Z]/.test(i)&&(i=i.replace(/[A-Z]/g,r=>"-"+r.toLowerCase())),n.has(i)||(e.push(i),n.add(i)));Gy=e.sort().map(i=>({type:"property",label:i}))}return Gy||[]}const XR=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(t=>({type:"class",label:t})),ZR=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(t=>({type:"keyword",label:t})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(t=>({type:"constant",label:t}))),cse=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(t=>({type:"type",label:t})),ks=/^(\w[\w-]*|-\w[\w-]*|)$/,dse=/^-(-[\w-]*)?$/;function hse(t,e){var n;if((t.name=="("||t.type.isError)&&(t=t.parent||t),t.name!="ArgList")return!1;let i=(n=t.parent)===null||n===void 0?void 0:n.firstChild;return(i==null?void 0:i.name)!="Callee"?!1:e.sliceString(i.from,i.to)=="var"}const qR=new $D,fse=["Declaration"];function pse(t){for(let e=t;;){if(e.type.isTop)return e;if(!(e=e.parent))return t}}function XB(t,e,n){if(e.to-e.from>4096){let i=qR.get(e);if(i)return i;let r=[],o=new Set,s=e.cursor(yt.IncludeAnonymous);if(s.firstChild())do for(let a of XB(t,s.node,n))o.has(a.label)||(o.add(a.label),r.push(a));while(s.nextSibling());return qR.set(e,r),r}else{let i=[],r=new Set;return e.cursor().iterate(o=>{var s;if(n(o)&&o.matchContext(fse)&&((s=o.node.nextSibling)===null||s===void 0?void 0:s.name)==":"){let a=t.sliceString(o.from,o.to);r.has(a)||(r.add(a),i.push({label:a,type:"variable"}))}}),i}}const mse=t=>e=>{let{state:n,pos:i}=e,r=gt(n).resolveInner(i,-1),o=r.type.isError&&r.from==r.to-1&&n.doc.sliceString(r.from,r.to)=="-";if(r.name=="PropertyName"||(o||r.name=="TagName")&&/^(Block|Styles)$/.test(r.resolve(r.to).name))return{from:r.from,options:Ky(),validFor:ks};if(r.name=="ValueName")return{from:r.from,options:ZR,validFor:ks};if(r.name=="PseudoClassName")return{from:r.from,options:XR,validFor:ks};if(t(r)||(e.explicit||o)&&hse(r,n.doc))return{from:t(r)||o?r.from:i,options:XB(n.doc,pse(r),t),validFor:dse};if(r.name=="TagName"){for(let{parent:l}=r;l;l=l.parent)if(l.name=="Block")return{from:r.from,options:Ky(),validFor:ks};return{from:r.from,options:cse,validFor:ks}}if(!e.explicit)return null;let s=r.resolve(i),a=s.childBefore(i);return a&&a.name==":"&&s.name=="PseudoClassSelector"?{from:i,options:XR,validFor:ks}:a&&a.name==":"&&s.name=="Declaration"||s.name=="ArgList"?{from:i,options:ZR,validFor:ks}:s.name=="Block"||s.name=="Styles"?{from:i,options:Ky(),validFor:ks}:null},gse=mse(t=>t.name=="VariableName"),lO=uu.define({name:"css",parser:use.configure({props:[Gd.add({Declaration:Gc()}),Ru.add({"Block KeyframeList":mx})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function ZB(){return new md(lO,lO.data.of({autocomplete:gse}))}const Lh=["_blank","_self","_top","_parent"],Jy=["ascii","utf-8","utf-16","latin1","latin1"],e1=["get","post","put","delete"],t1=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],Ci=["true","false"],ve={},Ose={a:{attrs:{href:null,ping:null,type:null,media:null,target:Lh,hreflang:null}},abbr:ve,address:ve,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:ve,aside:ve,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:ve,base:{attrs:{href:null,target:Lh}},bdi:ve,bdo:ve,blockquote:{attrs:{cite:null}},body:ve,br:ve,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:t1,formmethod:e1,formnovalidate:["novalidate"],formtarget:Lh,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:ve,center:ve,cite:ve,code:ve,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:ve,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:ve,div:ve,dl:ve,dt:ve,em:ve,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:ve,figure:ve,footer:ve,form:{attrs:{action:null,name:null,"accept-charset":Jy,autocomplete:["on","off"],enctype:t1,method:e1,novalidate:["novalidate"],target:Lh}},h1:ve,h2:ve,h3:ve,h4:ve,h5:ve,h6:ve,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:ve,hgroup:ve,hr:ve,html:{attrs:{manifest:null}},i:ve,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:t1,formmethod:e1,formnovalidate:["novalidate"],formtarget:Lh,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:ve,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:ve,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:ve,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:Jy,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:ve,noscript:ve,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:ve,param:{attrs:{name:null,value:null}},pre:ve,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:ve,rt:ve,ruby:ve,samp:ve,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:Jy}},section:ve,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:ve,source:{attrs:{src:null,type:null,media:null}},span:ve,strong:ve,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:ve,summary:ve,sup:ve,table:ve,tbody:ve,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:ve,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:ve,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:ve,time:{attrs:{datetime:null}},title:ve,tr:ve,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:ve,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:ve},qB={accesskey:null,class:null,contenteditable:Ci,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:Ci,autocorrect:Ci,autocapitalize:Ci,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":Ci,"aria-autocomplete":["inline","list","both","none"],"aria-busy":Ci,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":Ci,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":Ci,"aria-hidden":Ci,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":Ci,"aria-multiselectable":Ci,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":Ci,"aria-relevant":null,"aria-required":Ci,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},YB="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(t=>"on"+t);for(let t of YB)qB[t]=null;let pp=class{constructor(e,n){this.tags=Object.assign(Object.assign({},Ose),e),this.globalAttrs=Object.assign(Object.assign({},qB),n),this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}};pp.default=new pp;function vd(t,e,n=t.length){if(!e)return"";let i=e.firstChild,r=i&&i.getChild("TagName");return r?t.sliceString(r.from,Math.min(r.to,n)):""}function Sd(t,e=!1){for(;t;t=t.parent)if(t.name=="Element")if(e)e=!1;else return t;return null}function GB(t,e,n){let i=n.tags[vd(t,Sd(e))];return(i==null?void 0:i.children)||n.allTags}function Hx(t,e){let n=[];for(let i=Sd(e);i&&!i.type.isTop;i=Sd(i.parent)){let r=vd(t,i);if(r&&i.lastChild.name=="CloseTag")break;r&&n.indexOf(r)<0&&(e.name=="EndTag"||e.from>=i.firstChild.to)&&n.push(r)}return n}const KB=/^[:\-\.\w\u00b7-\uffff]*$/;function YR(t,e,n,i,r){let o=/\s*>/.test(t.sliceDoc(r,r+5))?"":">",s=Sd(n,!0);return{from:i,to:r,options:GB(t.doc,s,e).map(a=>({label:a,type:"type"})).concat(Hx(t.doc,n).map((a,l)=>({label:"/"+a,apply:"/"+a+o,type:"type",boost:99-l}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function GR(t,e,n,i){let r=/\s*>/.test(t.sliceDoc(i,i+5))?"":">";return{from:n,to:i,options:Hx(t.doc,e).map((o,s)=>({label:o,apply:o+r,type:"type",boost:99-s})),validFor:KB}}function bse(t,e,n,i){let r=[],o=0;for(let s of GB(t.doc,n,e))r.push({label:"<"+s,type:"type"});for(let s of Hx(t.doc,n))r.push({label:"",type:"type",boost:99-o++});return{from:i,to:i,options:r,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function yse(t,e,n,i,r){let o=Sd(n),s=o?e.tags[vd(t.doc,o)]:null,a=s&&s.attrs?Object.keys(s.attrs):[],l=s&&s.globalAttrs===!1?a:a.length?a.concat(e.globalAttrNames):e.globalAttrNames;return{from:i,to:r,options:l.map(u=>({label:u,type:"property"})),validFor:KB}}function vse(t,e,n,i,r){var o;let s=(o=n.parent)===null||o===void 0?void 0:o.getChild("AttributeName"),a=[],l;if(s){let u=t.sliceDoc(s.from,s.to),c=e.globalAttrs[u];if(!c){let d=Sd(n),h=d?e.tags[vd(t.doc,d)]:null;c=(h==null?void 0:h.attrs)&&h.attrs[u]}if(c){let d=t.sliceDoc(i,r).toLowerCase(),h='"',p='"';/^['"]/.test(d)?(l=d[0]=='"'?/^[^"]*$/:/^[^']*$/,h="",p=t.sliceDoc(r,r+1)==d[0]?"":d[0],d=d.slice(1),i++):l=/^[^\s<>='"]*$/;for(let m of c)a.push({label:m,apply:h+m+p,type:"constant"})}}return{from:i,to:r,options:a,validFor:l}}function JB(t,e){let{state:n,pos:i}=e,r=gt(n).resolveInner(i,-1),o=r.resolve(i);for(let s=i,a;o==r&&(a=r.childBefore(s));){let l=a.lastChild;if(!l||!l.type.isError||l.fromJB(i,r)}const kse=So.parser.configure({top:"SingleExpression"}),e8=[{tag:"script",attrs:t=>t.type=="text/typescript"||t.lang=="ts",parser:TB.parser},{tag:"script",attrs:t=>t.type=="text/babel"||t.type=="text/jsx",parser:PB.parser},{tag:"script",attrs:t=>t.type=="text/typescript-jsx",parser:AB.parser},{tag:"script",attrs(t){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(t.type)},parser:kse},{tag:"script",attrs(t){return!t.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(t.type)},parser:So.parser},{tag:"style",attrs(t){return(!t.lang||t.lang=="css")&&(!t.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(t.type))},parser:lO.parser}],t8=[{name:"style",parser:lO.parser.configure({top:"Styles"})}].concat(YB.map(t=>({name:t,parser:So.parser}))),n8=uu.define({name:"html",parser:Uoe.configure({props:[Gd.add({Element(t){let e=/^(\s*)(<\/)?/.exec(t.textAfter);return t.node.to<=t.pos+e[0].length?t.continue():t.lineIndent(t.node.from)+(e[2]?0:t.unit)},"OpenTag CloseTag SelfClosingTag"(t){return t.column(t.node.from)+t.unit},Document(t){if(t.pos+/\s*/.exec(t.textAfter)[0].lengtht.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:""}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-._"}}),Zg=n8.configure({wrap:UB(e8,t8)});function i8(t={}){let e="",n;t.matchClosingTags===!1&&(e="noMatch"),t.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(t.nestedLanguages&&t.nestedLanguages.length||t.nestedAttributes&&t.nestedAttributes.length)&&(n=UB((t.nestedLanguages||[]).concat(e8),(t.nestedAttributes||[]).concat(t8)));let i=n?n8.configure({wrap:n,dialect:e}):e?Zg.configure({dialect:e}):Zg;return new md(i,[Zg.data.of({autocomplete:wse(t)}),t.autoCloseTags!==!1?xse:[],XS().support,ZB().support])}const KR=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),xse=ue.inputHandler.of((t,e,n,i,r)=>{if(t.composing||t.state.readOnly||e!=n||i!=">"&&i!="/"||!Zg.isActiveAt(t.state,e,-1))return!1;let o=r(),{state:s}=o,a=s.changeByRange(l=>{var u,c,d;let h=s.doc.sliceString(l.from-1,l.to)==i,{head:p}=l,m=gt(s).resolveInner(p,-1),O;if(h&&i==">"&&m.name=="EndTag"){let y=m.parent;if(((c=(u=y.parent)===null||u===void 0?void 0:u.lastChild)===null||c===void 0?void 0:c.name)!="CloseTag"&&(O=vd(s.doc,y.parent,p))&&!KR.has(O)){let b=p+(s.doc.sliceString(p,p+1)===">"?1:0),v=``;return{range:l,changes:{from:p,to:b,insert:v}}}}else if(h&&i=="/"&&m.name=="IncompleteCloseTag"){let y=m.parent;if(m.from==p-2&&((d=y.lastChild)===null||d===void 0?void 0:d.name)!="CloseTag"&&(O=vd(s.doc,y,p))&&!KR.has(O)){let b=p+(s.doc.sliceString(p,p+1)===">"?1:0),v=`${O}>`;return{range:q.cursor(p+v.length,-1),changes:{from:p,to:b,insert:v}}}}return{range:l}});return a.changes.empty?!1:(t.dispatch([o,s.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});class uO{static create(e,n,i,r,o){let s=r+(r<<8)+e+(n<<4)|0;return new uO(e,n,i,s,o,[],[])}constructor(e,n,i,r,o,s,a){this.type=e,this.value=n,this.from=i,this.hash=r,this.end=o,this.children=s,this.positions=a,this.hashProp=[[Pe.contextHash,r]]}addChild(e,n){e.prop(Pe.contextHash)!=this.hash&&(e=new Ze(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(n)}toTree(e,n=this.end){let i=this.children.length-1;return i>=0&&(n=Math.max(n,this.positions[i]+this.children[i].length+this.from)),new Ze(e.types[this.type],this.children,this.positions,n-this.from).balance({makeTree:(r,o,s)=>new Ze(tn.none,r,o,s,this.hashProp)})}}var ie;(function(t){t[t.Document=1]="Document",t[t.CodeBlock=2]="CodeBlock",t[t.FencedCode=3]="FencedCode",t[t.Blockquote=4]="Blockquote",t[t.HorizontalRule=5]="HorizontalRule",t[t.BulletList=6]="BulletList",t[t.OrderedList=7]="OrderedList",t[t.ListItem=8]="ListItem",t[t.ATXHeading1=9]="ATXHeading1",t[t.ATXHeading2=10]="ATXHeading2",t[t.ATXHeading3=11]="ATXHeading3",t[t.ATXHeading4=12]="ATXHeading4",t[t.ATXHeading5=13]="ATXHeading5",t[t.ATXHeading6=14]="ATXHeading6",t[t.SetextHeading1=15]="SetextHeading1",t[t.SetextHeading2=16]="SetextHeading2",t[t.HTMLBlock=17]="HTMLBlock",t[t.LinkReference=18]="LinkReference",t[t.Paragraph=19]="Paragraph",t[t.CommentBlock=20]="CommentBlock",t[t.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",t[t.Escape=22]="Escape",t[t.Entity=23]="Entity",t[t.HardBreak=24]="HardBreak",t[t.Emphasis=25]="Emphasis",t[t.StrongEmphasis=26]="StrongEmphasis",t[t.Link=27]="Link",t[t.Image=28]="Image",t[t.InlineCode=29]="InlineCode",t[t.HTMLTag=30]="HTMLTag",t[t.Comment=31]="Comment",t[t.ProcessingInstruction=32]="ProcessingInstruction",t[t.Autolink=33]="Autolink",t[t.HeaderMark=34]="HeaderMark",t[t.QuoteMark=35]="QuoteMark",t[t.ListMark=36]="ListMark",t[t.LinkMark=37]="LinkMark",t[t.EmphasisMark=38]="EmphasisMark",t[t.CodeMark=39]="CodeMark",t[t.CodeText=40]="CodeText",t[t.CodeInfo=41]="CodeInfo",t[t.LinkTitle=42]="LinkTitle",t[t.LinkLabel=43]="LinkLabel",t[t.URL=44]="URL"})(ie||(ie={}));class _se{constructor(e,n){this.start=e,this.content=n,this.marks=[],this.parsers=[]}}class Ese{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return mf(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,n=0,i=0){for(let r=n;r=e.stack[n.depth+1].value+n.baseIndent)return!0;if(n.indent>=n.baseIndent+4)return!1;let i=(t.type==ie.OrderedList?Vx:Wx)(n,e,!1);return i>0&&(t.type!=ie.BulletList||Ux(n,e,!1)<0)&&n.text.charCodeAt(n.pos+i-1)==t.value}const r8={[ie.Blockquote](t,e,n){return n.next!=62?!1:(n.markers.push(Ke(ie.QuoteMark,e.lineStart+n.pos,e.lineStart+n.pos+1)),n.moveBase(n.pos+(mr(n.text.charCodeAt(n.pos+1))?2:1)),t.end=e.lineStart+n.text.length,!0)},[ie.ListItem](t,e,n){return n.indent-1?!1:(n.moveBaseColumn(n.baseIndent+t.value),!0)},[ie.OrderedList]:JR,[ie.BulletList]:JR,[ie.Document](){return!0}};function mr(t){return t==32||t==9||t==10||t==13}function mf(t,e=0){for(;en&&mr(t.charCodeAt(e-1));)e--;return e}function o8(t){if(t.next!=96&&t.next!=126)return-1;let e=t.pos+1;for(;e-1&&t.depth==e.stack.length||i<3?-1:1}function a8(t,e){for(let n=t.stack.length-1;n>=0;n--)if(t.stack[n].type==e)return!0;return!1}function Wx(t,e,n){return(t.next==45||t.next==43||t.next==42)&&(t.pos==t.text.length-1||mr(t.text.charCodeAt(t.pos+1)))&&(!n||a8(e,ie.BulletList)||t.skipSpace(t.pos+2)=48&&r<=57;){i++;if(i==t.text.length)return-1;r=t.text.charCodeAt(i)}return i==t.pos||i>t.pos+9||r!=46&&r!=41||it.pos+1||t.next!=49)?-1:i+1-t.pos}function l8(t){if(t.next!=35)return-1;let e=t.pos+1;for(;e6?-1:n}function u8(t){if(t.next!=45&&t.next!=61||t.indent>=t.baseIndent+4)return-1;let e=t.pos+1;for(;e/,d8=/\?>/,GS=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-._"}}),qg=n8.configure({wrap:UB(e8,t8)});function i8(t={}){let e="",n;t.matchClosingTags===!1&&(e="noMatch"),t.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(t.nestedLanguages&&t.nestedLanguages.length||t.nestedAttributes&&t.nestedAttributes.length)&&(n=UB((t.nestedLanguages||[]).concat(e8),(t.nestedAttributes||[]).concat(t8)));let i=n?n8.configure({wrap:n,dialect:e}):e?qg.configure({dialect:e}):qg;return new gd(i,[qg.data.of({autocomplete:wse(t)}),t.autoCloseTags!==!1?xse:[],ZS().support,ZB().support])}const KR=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),xse=le.inputHandler.of((t,e,n,i,r)=>{if(t.composing||t.state.readOnly||e!=n||i!=">"&&i!="/"||!qg.isActiveAt(t.state,e,-1))return!1;let o=r(),{state:s}=o,a=s.changeByRange(l=>{var u,c,d;let h=s.doc.sliceString(l.from-1,l.to)==i,{head:p}=l,m=Ot(s).resolveInner(p,-1),O;if(h&&i==">"&&m.name=="EndTag"){let y=m.parent;if(((c=(u=y.parent)===null||u===void 0?void 0:u.lastChild)===null||c===void 0?void 0:c.name)!="CloseTag"&&(O=Sd(s.doc,y.parent,p))&&!KR.has(O)){let b=p+(s.doc.sliceString(p,p+1)===">"?1:0),v=``;return{range:l,changes:{from:p,to:b,insert:v}}}}else if(h&&i=="/"&&m.name=="IncompleteCloseTag"){let y=m.parent;if(m.from==p-2&&((d=y.lastChild)===null||d===void 0?void 0:d.name)!="CloseTag"&&(O=Sd(s.doc,y,p))&&!KR.has(O)){let b=p+(s.doc.sliceString(p,p+1)===">"?1:0),v=`${O}>`;return{range:Y.cursor(p+v.length,-1),changes:{from:p,to:b,insert:v}}}}return{range:l}});return a.changes.empty?!1:(t.dispatch([o,s.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});class cO{static create(e,n,i,r,o){let s=r+(r<<8)+e+(n<<4)|0;return new cO(e,n,i,s,o,[],[])}constructor(e,n,i,r,o,s,a){this.type=e,this.value=n,this.from=i,this.hash=r,this.end=o,this.children=s,this.positions=a,this.hashProp=[[Pe.contextHash,r]]}addChild(e,n){e.prop(Pe.contextHash)!=this.hash&&(e=new qe(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(n)}toTree(e,n=this.end){let i=this.children.length-1;return i>=0&&(n=Math.max(n,this.positions[i]+this.children[i].length+this.from)),new qe(e.types[this.type],this.children,this.positions,n-this.from).balance({makeTree:(r,o,s)=>new qe(nn.none,r,o,s,this.hashProp)})}}var ne;(function(t){t[t.Document=1]="Document",t[t.CodeBlock=2]="CodeBlock",t[t.FencedCode=3]="FencedCode",t[t.Blockquote=4]="Blockquote",t[t.HorizontalRule=5]="HorizontalRule",t[t.BulletList=6]="BulletList",t[t.OrderedList=7]="OrderedList",t[t.ListItem=8]="ListItem",t[t.ATXHeading1=9]="ATXHeading1",t[t.ATXHeading2=10]="ATXHeading2",t[t.ATXHeading3=11]="ATXHeading3",t[t.ATXHeading4=12]="ATXHeading4",t[t.ATXHeading5=13]="ATXHeading5",t[t.ATXHeading6=14]="ATXHeading6",t[t.SetextHeading1=15]="SetextHeading1",t[t.SetextHeading2=16]="SetextHeading2",t[t.HTMLBlock=17]="HTMLBlock",t[t.LinkReference=18]="LinkReference",t[t.Paragraph=19]="Paragraph",t[t.CommentBlock=20]="CommentBlock",t[t.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",t[t.Escape=22]="Escape",t[t.Entity=23]="Entity",t[t.HardBreak=24]="HardBreak",t[t.Emphasis=25]="Emphasis",t[t.StrongEmphasis=26]="StrongEmphasis",t[t.Link=27]="Link",t[t.Image=28]="Image",t[t.InlineCode=29]="InlineCode",t[t.HTMLTag=30]="HTMLTag",t[t.Comment=31]="Comment",t[t.ProcessingInstruction=32]="ProcessingInstruction",t[t.Autolink=33]="Autolink",t[t.HeaderMark=34]="HeaderMark",t[t.QuoteMark=35]="QuoteMark",t[t.ListMark=36]="ListMark",t[t.LinkMark=37]="LinkMark",t[t.EmphasisMark=38]="EmphasisMark",t[t.CodeMark=39]="CodeMark",t[t.CodeText=40]="CodeText",t[t.CodeInfo=41]="CodeInfo",t[t.LinkTitle=42]="LinkTitle",t[t.LinkLabel=43]="LinkLabel",t[t.URL=44]="URL"})(ne||(ne={}));class _se{constructor(e,n){this.start=e,this.content=n,this.marks=[],this.parsers=[]}}class Ese{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return gf(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,n=0,i=0){for(let r=n;r=e.stack[n.depth+1].value+n.baseIndent)return!0;if(n.indent>=n.baseIndent+4)return!1;let i=(t.type==ne.OrderedList?jx:Vx)(n,e,!1);return i>0&&(t.type!=ne.BulletList||Wx(n,e,!1)<0)&&n.text.charCodeAt(n.pos+i-1)==t.value}const r8={[ne.Blockquote](t,e,n){return n.next!=62?!1:(n.markers.push(Je(ne.QuoteMark,e.lineStart+n.pos,e.lineStart+n.pos+1)),n.moveBase(n.pos+(pr(n.text.charCodeAt(n.pos+1))?2:1)),t.end=e.lineStart+n.text.length,!0)},[ne.ListItem](t,e,n){return n.indent-1?!1:(n.moveBaseColumn(n.baseIndent+t.value),!0)},[ne.OrderedList]:JR,[ne.BulletList]:JR,[ne.Document](){return!0}};function pr(t){return t==32||t==9||t==10||t==13}function gf(t,e=0){for(;en&&pr(t.charCodeAt(e-1));)e--;return e}function o8(t){if(t.next!=96&&t.next!=126)return-1;let e=t.pos+1;for(;e-1&&t.depth==e.stack.length||i<3?-1:1}function a8(t,e){for(let n=t.stack.length-1;n>=0;n--)if(t.stack[n].type==e)return!0;return!1}function Vx(t,e,n){return(t.next==45||t.next==43||t.next==42)&&(t.pos==t.text.length-1||pr(t.text.charCodeAt(t.pos+1)))&&(!n||a8(e,ne.BulletList)||t.skipSpace(t.pos+2)=48&&r<=57;){i++;if(i==t.text.length)return-1;r=t.text.charCodeAt(i)}return i==t.pos||i>t.pos+9||r!=46&&r!=41||it.pos+1||t.next!=49)?-1:i+1-t.pos}function l8(t){if(t.next!=35)return-1;let e=t.pos+1;for(;e6?-1:n}function u8(t){if(t.next!=45&&t.next!=61||t.indent>=t.baseIndent+4)return-1;let e=t.pos+1;for(;e/,d8=/\?>/,KS=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*/i.exec(i);if(o)return t.append(Ke(ie.Comment,n,n+1+o[0].length));let s=/^\?[^]*?\?>/.exec(i);if(s)return t.append(Ke(ie.ProcessingInstruction,n,n+1+s[0].length));let a=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(i);return a?t.append(Ke(ie.HTMLTag,n,n+1+a[0].length)):-1},Emphasis(t,e,n){if(e!=95&&e!=42)return-1;let i=n+1;for(;t.char(i)==e;)i++;let r=t.slice(n-1,n),o=t.slice(i,i+1),s=gp.test(r),a=gp.test(o),l=/\s|^$/.test(r),u=/\s|^$/.test(o),c=!u&&(!a||l||s),d=!l&&(!s||u||a),h=c&&(e==42||!d||s),p=d&&(e==42||!c||a);return t.append(new Gi(e==95?O8:b8,n,i,(h?1:0)|(p?2:0)))},HardBreak(t,e,n){if(e==92&&t.char(n+1)==10)return t.append(Ke(ie.HardBreak,n,n+2));if(e==32){let i=n+1;for(;t.char(i)==32;)i++;if(t.char(i)==10&&i>=n+2)return t.append(Ke(ie.HardBreak,n,i+1))}return-1},Link(t,e,n){return e==91?t.append(new Gi(bc,n,n+1,1)):-1},Image(t,e,n){return e==33&&t.char(n+1)==91?t.append(new Gi(JS,n,n+2,1)):-1},LinkEnd(t,e,n){if(e!=93)return-1;for(let i=t.parts.length-1;i>=0;i--){let r=t.parts[i];if(r instanceof Gi&&(r.type==bc||r.type==JS)){if(!r.side||t.skipSpace(r.to)==n&&!/[(\[]/.test(t.slice(n+1,n+2)))return t.parts[i]=null,-1;let o=t.takeContent(i),s=t.parts[i]=$se(t,o,r.type==bc?ie.Link:ie.Image,r.from,n+1);if(r.type==bc)for(let a=0;ae?Ke(ie.URL,e+n,o+n):o==t.length?null:!1}}function v8(t,e,n){let i=t.charCodeAt(e);if(i!=39&&i!=34&&i!=40)return!1;let r=i==40?41:i;for(let o=e+1,s=!1;o=this.end?-1:this.text.charCodeAt(e-this.offset)}get end(){return this.offset+this.text.length}slice(e,n){return this.text.slice(e-this.offset,n-this.offset)}append(e){return this.parts.push(e),e.to}addDelimiter(e,n,i,r,o){return this.append(new Gi(e,n,i,(r?1:0)|(o?2:0)))}get hasOpenLink(){for(let e=this.parts.length-1;e>=0;e--){let n=this.parts[e];if(n instanceof Gi&&(n.type==bc||n.type==JS))return!0}return!1}addElement(e){return this.append(e)}resolveMarkers(e){for(let i=e;i=e;l--){let O=this.parts[l];if(O instanceof Gi&&O.side&1&&O.type==r.type&&!(o&&(r.side&1||O.side&2)&&(O.to-O.from+s)%3==0&&((O.to-O.from)%3||s%3))){a=O;break}}if(!a)continue;let u=r.type.resolve,c=[],d=a.from,h=r.to;if(o){let O=Math.min(2,a.to-a.from,s);d=a.to-O,h=r.from+O,u=O==1?"Emphasis":"StrongEmphasis"}a.type.mark&&c.push(this.elt(a.type.mark,d,a.to));for(let O=l+1;O=0;n--){let i=this.parts[n];if(i instanceof Gi&&i.type==e)return n}return null}takeContent(e){let n=this.resolveMarkers(e);return this.parts.length=e,n}skipSpace(e){return mf(this.text,e-this.offset)+this.offset}elt(e,n,i,r){return typeof e=="string"?Ke(this.parser.getNodeType(e),n,i,r):new g8(e,n)}}function ew(t,e){if(!e.length)return t;if(!t.length)return e;let n=t.slice(),i=0;for(let r of e){for(;i(e?e-1:0))return!1;if(this.fragmentEnd<0){let o=this.fragment.to;for(;o>0&&this.input.read(o-1,o)!=` -`;)o--;this.fragmentEnd=o?o-1:0}let i=this.cursor;i||(i=this.cursor=this.fragment.tree.cursor(),i.firstChild());let r=e+this.fragment.offset;for(;i.to<=r;)if(!i.parent())return!1;for(;;){if(i.from>=r)return this.fragment.from<=n;if(!i.childAfter(r))return!1}}matches(e){let n=this.cursor.tree;return n&&n.prop(Pe.contextHash)==e}takeNodes(e){let n=this.cursor,i=this.fragment.offset,r=this.fragmentEnd-(this.fragment.openEnd?1:0),o=e.absoluteLineStart,s=o,a=e.block.children.length,l=s,u=a;for(;;){if(n.to-i>r){if(n.type.isAnonymous&&n.firstChild())continue;break}let c=w8(n.from-i,e.ranges);if(n.to-i<=e.ranges[e.rangeI].to)e.addNode(n.tree,c);else{let d=new Ze(e.parser.nodeSet.types[ie.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(d,n.tree),e.addNode(d,c)}if(n.type.is("Block")&&(Nse.indexOf(n.type.id)<0?(s=n.to-i,a=e.block.children.length):(s=l,a=u,l=n.to-i,u=e.block.children.length)),!n.nextSibling())break}for(;e.block.children.length>a;)e.block.children.pop(),e.block.positions.pop();return s-o}}function w8(t,e){let n=t;for(let i=1;ing[t]),Object.keys(ng).map(t=>Pse[t]),Object.keys(ng),Ase,r8,Object.keys(i1).map(t=>i1[t]),Object.keys(i1),[]);function Qse(t,e,n){let i=[];for(let r=t.firstChild,o=e;;r=r.nextSibling){let s=r?r.from:n;if(s>o&&i.push({from:o,to:s}),!r)break;o=r.to}return i}function Fse(t){let{codeParser:e,htmlParser:n}=t;return{wrap:LD((r,o)=>{let s=r.type.id;if(e&&(s==ie.CodeBlock||s==ie.FencedCode)){let a="";if(s==ie.FencedCode){let u=r.node.getChild(ie.CodeInfo);u&&(a=o.read(u.from,u.to))}let l=e(a);if(l)return{parser:l,overlay:u=>u.type.id==ie.CodeText}}else if(n&&(s==ie.HTMLBlock||s==ie.HTMLTag))return{parser:n,overlay:Qse(r.node,r.from,r.to)};return null})}}const zse={resolve:"Strikethrough",mark:"StrikethroughMark"},Hse={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":R.strikethrough}},{name:"StrikethroughMark",style:R.processingInstruction}],parseInline:[{name:"Strikethrough",parse(t,e,n){if(e!=126||t.char(n+1)!=126||t.char(n+2)==126)return-1;let i=t.slice(n-1,n),r=t.slice(n+2,n+3),o=/\s|^$/.test(i),s=/\s|^$/.test(r),a=gp.test(i),l=gp.test(r);return t.addDelimiter(zse,n,n+2,!s&&(!l||o||a),!o&&(!a||s||l))},after:"Emphasis"}]};function gf(t,e,n=0,i,r=0){let o=0,s=!0,a=-1,l=-1,u=!1,c=()=>{i.push(t.elt("TableCell",r+a,r+l,t.parser.parseInline(e.slice(a,l),r+a)))};for(let d=n;d-1)&&o++,s=!1,i&&(a>-1&&c(),i.push(t.elt("TableDelimiter",d+r,d+r+1))),a=l=-1):(u||h!=32&&h!=9)&&(a<0&&(a=d),l=d+1),u=!u&&h==92}return a>-1&&(o++,i&&c()),o}function iI(t,e){for(let n=e;nr instanceof rI)||!iI(e.text,e.basePos))return!1;let i=t.scanLine(t.absoluteLineEnd+1).text;return k8.test(i)&&gf(t,e.text,e.basePos)==gf(t,i,e.basePos)},before:"SetextHeading"}]};class Wse{nextLine(){return!1}finish(e,n){return e.addLeafElement(n,e.elt("Task",n.start,n.start+n.content.length,[e.elt("TaskMarker",n.start,n.start+3),...e.parser.parseInline(n.content.slice(3),n.start+3)])),!0}}const Vse={defineNodes:[{name:"Task",block:!0,style:R.list},{name:"TaskMarker",style:R.atom}],parseBlock:[{name:"TaskList",leaf(t,e){return/^\[[ xX]\][ \t]/.test(e.content)&&t.parentType().name=="ListItem"?new Wse:null},after:"SetextHeading"}]},oI=/(www\.)|(https?:\/\/)|([\w.+-]+@)|(mailto:|xmpp:)/gy,sI=/[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy,jse=/[\w-]+\.[\w-]+($|\/)/,aI=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,lI=/\/[a-zA-Z\d@.]+/gy;function uI(t,e,n,i){let r=0;for(let o=e;o-1)return-1;let i=e+n[0].length;for(;;){let r=t[i-1],o;if(/[?!.,:*_~]/.test(r)||r==")"&&uI(t,e,i,")")>uI(t,e,i,"("))i--;else if(r==";"&&(o=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(t.slice(e,i))))i=e+o.index;else break}return i}function cI(t,e){aI.lastIndex=e;let n=aI.exec(t);if(!n)return-1;let i=n[0][n[0].length-1];return i=="_"||i=="-"?-1:e+n[0].length-(i=="."?1:0)}const Zse={parseInline:[{name:"Autolink",parse(t,e,n){let i=n-t.offset;oI.lastIndex=i;let r=oI.exec(t.text),o=-1;if(!r)return-1;if(r[1]||r[2]){if(o=Xse(t.text,i+r[0].length),o>-1&&t.hasOpenLink){let s=/([^\[\]]|\[[^\]]*\])*/.exec(t.text.slice(i,o));o=i+s[0].length}}else r[3]?o=cI(t.text,i):(o=cI(t.text,i+r[0].length),o>-1&&r[0]=="xmpp:"&&(lI.lastIndex=o,r=lI.exec(t.text),r&&(o=r.index+r[0].length)));return o<0?-1:(t.addElement(t.elt("URL",n,o+t.offset)),o+t.offset)}}]},qse=[Use,Vse,Hse,Zse];function x8(t,e,n){return(i,r,o)=>{if(r!=t||i.char(o+1)==t)return-1;let s=[i.elt(n,o,o+1)];for(let a=o+1;a"}}}),E8=new Pe,C8=Bse.configure({props:[Ru.add(t=>!t.is("Block")||t.is("Document")||tw(t)!=null||Jse(t)?void 0:(e,n)=>({from:n.doc.lineAt(e.from).to,to:e.to})),E8.add(tw),Gd.add({Document:()=>null}),qs.add({Document:_8})]});function tw(t){let e=/^(?:ATX|Setext)Heading(\d)$/.exec(t.name);return e?+e[1]:void 0}function Jse(t){return t.name=="OrderedList"||t.name=="BulletList"}function eae(t,e){let n=t;for(;;){let i=n.nextSibling,r;if(!i||(r=tw(i.type))!=null&&r<=e)break;n=i}return n.to}const tae=zD.of((t,e,n)=>{for(let i=gt(t).resolveInner(n,-1);i&&!(i.fromn)return{from:n,to:o}}return null});function jx(t){return new Bi(_8,t,[tae],"markdown")}const nae=jx(C8),iae=C8.configure([qse,Gse,Yse,Kse,{props:[Ru.add({Table:(t,e)=>({from:e.doc.lineAt(t.from).to,to:t.to})})]}]),T8=jx(iae);function rae(t,e){return n=>{if(n&&t){let i=null;if(n=/\S*/.exec(n)[0],typeof t=="function"?i=t(n):i=W0.matchLanguageName(t,n,!0),i instanceof W0)return i.support?i.support.language.parser:cu.getSkippingParser(i.load());if(i)return i.parser}return e?e.parser:null}}class rg{constructor(e,n,i,r,o,s,a){this.node=e,this.from=n,this.to=i,this.spaceBefore=r,this.spaceAfter=o,this.type=s,this.item=a}blank(e,n=!0){let i=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(e!=null){for(;i.length0;r--)i+=" ";return i+(n?this.spaceAfter:"")}}marker(e,n){let i=this.node.name=="OrderedList"?String(+A8(this.item,e)[2]+n):"";return this.spaceBefore+i+this.type+this.spaceAfter}}function P8(t,e){let n=[];for(let r=t;r&&r.name!="Document";r=r.parent)(r.name=="ListItem"||r.name=="Blockquote"||r.name=="FencedCode")&&n.push(r);let i=[];for(let r=n.length-1;r>=0;r--){let o=n[r],s,a=e.lineAt(o.from),l=o.from-a.from;if(o.name=="FencedCode")i.push(new rg(o,l,l,"","","",null));else if(o.name=="Blockquote"&&(s=/^ *>( ?)/.exec(a.text.slice(l))))i.push(new rg(o,l,l+s[0].length,"",s[1],">",null));else if(o.name=="ListItem"&&o.parent.name=="OrderedList"&&(s=/^( *)\d+([.)])( *)/.exec(a.text.slice(l)))){let u=s[3],c=s[0].length;u.length>=4&&(u=u.slice(0,u.length-4),c-=4),i.push(new rg(o.parent,l,l+c,s[1],u,s[2],o))}else if(o.name=="ListItem"&&o.parent.name=="BulletList"&&(s=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(a.text.slice(l)))){let u=s[4],c=s[0].length;u.length>4&&(u=u.slice(0,u.length-4),c-=4);let d=s[2];s[3]&&(d+=s[3].replace(/[xX]/," ")),i.push(new rg(o.parent,l,l+c,s[1],u,d,o))}}return i}function A8(t,e){return/^(\s*)(\d+)(?=[.)])/.exec(e.sliceString(t.from,t.from+10))}function r1(t,e,n,i=0){for(let r=-1,o=t;;){if(o.name=="ListItem"){let a=A8(o,e),l=+a[2];if(r>=0){if(l!=r+1)return;n.push({from:o.from+a[1].length,to:o.from+a[0].length,insert:String(r+2+i)})}r=l}let s=o.nextSibling;if(!s)break;o=s}}function Xx(t,e){let n=/^[ \t]*/.exec(t)[0].length;if(!n||e.facet(Yd)!=" ")return t;let i=Hr(t,4,n),r="";for(let o=i;o>0;)o>=4?(r+=" ",o-=4):(r+=" ",o--);return r+t.slice(n)}const oae=({state:t,dispatch:e})=>{let n=gt(t),{doc:i}=t,r=null,o=t.changeByRange(s=>{if(!s.empty||!T8.isActiveAt(t,s.from))return r={range:s};let a=s.from,l=i.lineAt(a),u=P8(n.resolveInner(a,-1),i);for(;u.length&&u[u.length-1].from>a-l.from;)u.pop();if(!u.length)return r={range:s};let c=u[u.length-1];if(c.to-c.spaceAfter.length>a-l.from)return r={range:s};let d=a>=c.to-c.spaceAfter.length&&!/\S/.test(l.text.slice(c.to));if(c.item&&d){let y=c.node.firstChild,b=c.node.getChild("ListItem","ListItem");if(y.to>=a||b&&b.to0&&!/[^\s>]/.test(i.lineAt(l.from-1).text)){let v=u.length>1?u[u.length-2]:null,S,k="";v&&v.item?(S=l.from+v.from,k=v.marker(i,1)):S=l.from+(v?v.to:0);let x=[{from:S,to:a,insert:k}];return c.node.name=="OrderedList"&&r1(c.item,i,x,-2),v&&v.node.name=="OrderedList"&&r1(v.item,i,x),{range:q.cursor(S+k.length),changes:x}}else{let v=hI(u,t,l);return{range:q.cursor(a+v.length+1),changes:{from:l.from,insert:v+t.lineBreak}}}}if(c.node.name=="Blockquote"&&d&&l.from){let y=i.lineAt(l.from-1),b=/>\s*$/.exec(y.text);if(b&&b.index==c.from){let v=t.changes([{from:y.from+b.index,to:y.to},{from:l.from+c.from,to:l.to}]);return{range:s.map(v),changes:v}}}let h=[];c.node.name=="OrderedList"&&r1(c.item,i,h);let p=c.item&&c.item.from]*/.exec(l.text)[0].length>=c.to)for(let y=0,b=u.length-1;y<=b;y++)m+=y==b&&!p?u[y].marker(i,1):u[y].blank(yl.from&&/\s/.test(l.text.charAt(O-l.from-1));)O--;return m=Xx(m,t),sae(c.node,t.doc)&&(m=hI(u,t,l)+t.lineBreak+m),h.push({from:O,to:a,insert:t.lineBreak+m}),{range:q.cursor(O+m.length+1),changes:h}});return r?!1:(e(t.update(o,{scrollIntoView:!0,userEvent:"input"})),!0)};function dI(t){return t.name=="QuoteMark"||t.name=="ListMark"}function sae(t,e){if(t.name!="OrderedList"&&t.name!="BulletList")return!1;let n=t.firstChild,i=t.getChild("ListItem","ListItem");if(!i)return!1;let r=e.lineAt(n.to),o=e.lineAt(i.from),s=/^[\s>]*$/.test(r.text);return r.number+(s?0:1){let n=gt(t),i=null,r=t.changeByRange(o=>{let s=o.from,{doc:a}=t;if(o.empty&&T8.isActiveAt(t,o.from)){let l=a.lineAt(s),u=P8(aae(n,s),a);if(u.length){let c=u[u.length-1],d=c.to-c.spaceAfter.length+(c.spaceAfter?1:0);if(s-l.from>d&&!/\S/.test(l.text.slice(d,s-l.from)))return{range:q.cursor(l.from+d),changes:{from:l.from+d,to:s}};if(s-l.from==d&&(!c.item||l.from<=c.item.from||!/\S/.test(l.text.slice(0,c.to)))){let h=l.from+c.from;if(c.item&&c.node.from1&&t.eat("$");var n=t.next();return/['"({]/.test(n)?(e.tokens[0]=yb(n,n=="("?"quote":n=="{"?"def":"string"),kd(t,e)):(/\d/.test(n)||t.eatWhile(/\w/),e.tokens.shift(),"def")};function yae(t){return function(e,n){return e.sol()&&e.string==t&&n.tokens.shift(),e.skipToEnd(),"string.special"}}function kd(t,e){return(e.tokens[0]||Oae)(t,e)}const vae={name:"shell",startState:function(){return{tokens:[]}},token:function(t,e){return kd(t,e)},languageData:{autocomplete:R8.concat(I8,$8),closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"#"}}};var Sae=["true","false","on","off","yes","no"],wae=new RegExp("\\b(("+Sae.join(")|(")+"))$","i");const kae={name:"yaml",token:function(t,e){var n=t.peek(),i=e.escaped;if(e.escaped=!1,n=="#"&&(t.pos==0||/\s/.test(t.string.charAt(t.pos-1))))return t.skipToEnd(),"comment";if(t.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))return"string";if(e.literal&&t.indentation()>e.keyCol)return t.skipToEnd(),"string";if(e.literal&&(e.literal=!1),t.sol()){if(e.keyCol=0,e.pair=!1,e.pairStart=!1,t.match("---")||t.match("..."))return"def";if(t.match(/^\s*-\s+/))return"meta"}if(t.match(/^(\{|\}|\[|\])/))return n=="{"?e.inlinePairs++:n=="}"?e.inlinePairs--:n=="["?e.inlineList++:e.inlineList--,"meta";if(e.inlineList>0&&!i&&n==",")return t.next(),"meta";if(e.inlinePairs>0&&!i&&n==",")return e.keyCol=0,e.pair=!1,e.pairStart=!1,t.next(),"meta";if(e.pairStart){if(t.match(/^\s*(\||\>)\s*/))return e.literal=!0,"meta";if(t.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable";if(e.inlinePairs==0&&t.match(/^\s*-?[0-9\.\,]+\s?$/)||e.inlinePairs>0&&t.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(t.match(wae))return"keyword"}return!e.pair&&t.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)?(e.pair=!0,e.keyCol=t.indentation(),"atom"):e.pair&&t.match(/^:\s*/)?(e.pairStart=!0,"meta"):(e.pairStart=!1,e.escaped=n=="\\",t.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}},languageData:{commentTokens:{line:"#"}}};var fI,pI,mI;function gI({view:t,searchConfig:e}){const n=T.useState(""),i=Qr(n,2),r=i[0],o=i[1],s=(h,p)=>{o(p),a(p)},a=h=>{t.dispatch({effects:bd.of(new Ex({search:h}))})},l=h=>{h.key==="Enter"&&(h.shiftKey?d():c())},u=h=>{h.key==="Escape"&&Px(t)},c=()=>{a(r),up(t)},d=()=>{a(r),cp(t)};return z.createElement(Yk,{renderLabel:"",inputRef:h=>{setTimeout(()=>h==null?void 0:h.focus(),0)},size:"small",display:"inline-block",width:"20rem",placeholder:e.placeholder,onChange:s,onKeyDown:l,onKeyUp:u,renderBeforeInput:fI||(fI=z.createElement(xu,{size:"x-small"})),renderAfterInput:z.createElement("span",null,z.createElement(I0,{size:"small",withBorder:!1,withBackground:!1,onClick:c,screenReaderLabel:e.nextResultLabel},pI||(pI=z.createElement(Su,null))),z.createElement(I0,{size:"small",withBorder:!1,withBackground:!1,onClick:d,screenReaderLabel:e.prevResultLabel},mI||(mI=z.createElement(wu,null))))})}function xae(t){return t?Kne({createPanel:e=>{var n;const i=document.createElement("div");return i.style.padding="8px",Number(z.version.split(".")[0])>=18?jq(()=>Promise.resolve().then(()=>Ez),void 0).then(o=>{o.createRoot(i).render(n||(n=z.createElement(gI,{view:e,searchConfig:t})))}).catch(o=>{}):Ep.render(z.createElement(gI,{view:e,searchConfig:t}),i),{dom:i}}}):[]}const _ae=(t,e)=>{const n=e.attachment,i=e.height,r=e.width,o={top:{borderBottomLeftRadius:0,borderBottomRightRadius:0},bottom:{borderTopLeftRadius:0,borderTopRightRadius:0}},s={top:{marginBottom:0,marginTop:"0.25rem"},bottom:{borderTopLeftRadius:0,borderTopRightRadius:0,marginBottom:"0.25rem"}},a=1.4375;return{codeEditor:{label:"codeEditor",position:"relative",boxSizing:"border-box",height:i||"auto",width:r},label:{label:"label",height:"100%",width:"100%"},codeEditorContainer:{label:"codeEditorContainer",height:"100%",width:"100%",borderColor:t==null?void 0:t.borderColor,borderStyle:"solid",borderWidth:t==null?void 0:t.borderWidth,borderRadius:t.borderRadius,marginBottom:"1rem",...n&&{...s[n],...o[n]}},theme:{"&":{overflow:"hidden",background:t.background,fontFamily:t.fontFamily,fontSize:t.fontSize,color:t.color,border:0,height:"100%",width:"100%",minHeight:`${a}rem`,lineHeight:a,borderRadius:t.borderRadius,...n&&{...o[n]}},"&.cm-editor.cm-focused":{outline:`${t==null?void 0:t.borderWidth} solid ${t==null?void 0:t.focusBorderColor}`},".cm-content":{padding:`${t.verticalPadding} 0`},".cm-scroller":{fontFamily:t.fontFamily,lineHeight:1.4375},".cm-gutters":{background:t.gutterBackground,borderColor:t.borderColor},".cm-line":{padding:`0 ${t.horizontalPadding}`},".cm-selectionBackground":{background:"transparent"},".cm-focused .cm-selectionBackground":{background:"#d7d4f0"},".cm-placeholder":{color:"#707070"}},highlightStyle:[{tag:R.link,textDecoration:"underline"},{tag:R.heading,textDecoration:"underline",fontWeight:"bold"},{tag:R.emphasis,fontStyle:"italic"},{tag:R.strong,fontWeight:"bold"},{tag:R.strikethrough,textDecoration:"line-through"},{tag:R.keyword,color:"#708"},{tag:[R.atom,R.bool,R.url,R.contentSeparator,R.labelName],color:"#219"},{tag:[R.literal,R.inserted],color:"#164"},{tag:[R.string,R.deleted],color:"#a11"},{tag:R.definition(R.variableName),color:"#00f"},{tag:R.local(R.variableName),color:"#30a"},{tag:R.className,color:"#167"},{tag:[R.special(R.variableName),R.macroName],color:"#256"},{tag:R.definition(R.propertyName),color:"#00c"},{tag:R.comment,color:"#940"},{tag:R.meta,color:"#757075"},{tag:[R.regexp,R.escape,R.special(R.string)],color:"#d13b00"},{tag:[R.typeName,R.namespace],color:"#008051"},{tag:R.invalid,color:"#e60000"}]}},Eae=t=>{const e=t.colors,n=t.borders,i=t.typography,r=t.spacing;return{...{fontFamily:i==null?void 0:i.fontFamilyMonospace,fontSize:i==null?void 0:i.fontSizeSmall,background:e==null?void 0:e.backgroundLightest,color:e==null?void 0:e.textDarkest,gutterBackground:e==null?void 0:e.backgroundLight,borderWidth:n==null?void 0:n.widthSmall,borderColor:e==null?void 0:e.borderMedium,borderRadius:n==null?void 0:n.radiusMedium,focusBorderColor:e==null?void 0:e.borderBrand,horizontalPadding:r==null?void 0:r.xSmall,verticalPadding:r==null?void 0:r.xxSmall}}},OI=[{key:"ArrowLeft",run:Lx,shift:Mx,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:L4,shift:q4},{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:M4,shift:G4},{mac:"Cmd-ArrowLeft",run:V4,shift:oB},{key:"Home",run:H4,shift:nB},{key:"ArrowRight",run:$x,shift:Nx,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:$4,shift:Z4},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:N4,shift:Y4},{mac:"Cmd-ArrowRight",run:W4,shift:rB},{key:"End",run:U4,shift:iB},{key:"Delete",run:tO},{key:"Mod-Delete",mac:"Alt-Delete",run:Dx},{key:"Backspace",run:nO,shift:nO},{key:"Mod-Backspace",mac:"Alt-Backspace",run:lB},{mac:"Mod-Delete",run:Hie},{mac:"Mod-Backspace",run:uB}],Cae={label:f.string.isRequired,language:f.oneOf(["sh","js","json","javascript","jsx","shell","css","html","markdown","yaml","yml","bash"]),readOnly:f.bool,editable:f.bool,lineNumbers:f.bool,foldGutter:f.bool,highlightActiveLineGutter:f.bool,highlightActiveLine:f.bool,lineWrapping:f.bool,autofocus:f.bool,spellcheck:f.bool,direction:f.oneOf(["ltr","rtl"]),rtlMoveVisually:f.bool,indentOnLoad:f.bool,indentWithTab:f.bool,indentUnit:f.string,defaultValue:f.string,value:yu(f.string,"onChange","defaultValue"),onChange:f.func,onFocus:f.func,onBlur:f.func,attachment:f.oneOf(["bottom","top"]),height:f.string,width:f.string,elementRef:f.func,containerRef:f.func,searchConfig:f.object},Tae=["label","language","readOnly","editable","lineNumbers","foldGutter","highlightActiveLineGutter","highlightActiveLine","lineWrapping","autofocus","spellcheck","direction","rtlMoveVisually","indentOnLoad","indentWithTab","indentUnit","defaultValue","value","onChange","onFocus","onBlur","attachment","height","width","elementRef","containerRef","searchConfig"],Pae=["label","styles"];var bI,yI,vI,SI,xs,bl;let N8=(bI=zt(),yI=de(_ae,Eae),vI=Mr(),SI=Le(),bI(xs=yI(xs=vI(xs=SI(xs=(bl=class M8 extends T.Component{addAnimationFrame(e){typeof e=="function"&&this._raf.push(qo(e))}cancelAnimationFrames(){this._raf.forEach(e=>e.cancel()),this._raf=[]}focus(){this.addAnimationFrame(()=>{var e;(e=this._editorView)===null||e===void 0||e.focus()})}get hasFocus(){var e;return(e=this._editorView)===null||e===void 0?void 0:e.hasFocus}selectAll(){this._editorView&&this.addAnimationFrame(()=>{var e;this.dispatchViewSelection({anchor:0,head:(e=this.currentDocValue)===null||e===void 0?void 0:e.length})})}deselectAll(){this._editorView&&this.addAnimationFrame(()=>{this.dispatchViewSelection({anchor:0,head:0})})}indentCurrentSelection(){this.addAnimationFrame(()=>{this._editorView&&fB({state:this._editorView.state,dispatch:e=>{var n;(n=this._editorView)===null||n===void 0||n.update([e])}})})}indentAll(){this.addAnimationFrame(()=>{this._editorView&&this.currentDocValue&&this.indentCodeRange(0,this.currentDocValue.length)})}indentCodeRange(e,n){this.addAnimationFrame(()=>{this._editorView&&this.currentDocValue&&this.dispatchViewChanges({changes:Jee(this._editorView.state,e,n)})})}dispatchViewEffects(e){!this._editorView||!e||this._editorView.dispatch({effects:e})}dispatchViewChanges({changes:e,selection:n,userEvent:i}){!this._editorView||!e||this._editorView.dispatch({changes:e,...n?{selection:n}:void 0,...i?{userEvent:i}:void 0})}dispatchViewSelection(e){!this._editorView||!e||this._editorView.dispatch({selection:e})}get currentDocValue(){var e;return(e=this._editorView)===null||e===void 0?void 0:e.state.doc}get isControlled(){return typeof this.props.value=="string"}constructor(e){super(e),this._id=void 0,this.ref=null,this._containerRef=void 0,this._editorView=void 0,this._raf=[],this._newSelectionAfterValueChange=void 0,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.handleContainerRef=n=>{const i=this.props.containerRef;this._containerRef=n||void 0,typeof i=="function"&&i(n)},this._id=e.deterministicId()}componentDidMount(){var e,n;const i=this.props,r=i.value,o=i.defaultValue,s=i.autofocus,a=i.indentOnLoad;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n);const l=Ve.create({doc:r||o,extensions:this.extensions});this._editorView=new ue({state:l,parent:this._containerRef}),s&&this.focus(),a&&this.indentAll()}componentWillUnmount(){var e;(e=this._editorView)===null||e===void 0||e.destroy(),this.cancelAnimationFrames()}componentDidUpdate(e){var n,i;(n=(i=this.props).makeStyles)===null||n===void 0||n.call(i),this._editorView&&(this.props.value!==e.value&&this.refreshEditorValue(),this.shouldUpdateExtensions(e)&&this.refreshExtensions())}shouldUpdateExtensions(e){const n=["styles","themeOverride","language","readOnly","editable","lineNumbers","highlightActiveLineGutter","foldGutter","lineWrapping","autofocus","spellcheck","direction","dir","rtlMoveVisually","indentOnLoad","indentWithTab","indentUnit","highlightActiveLine","attachment"];for(const i of n)if(!GO(this.props[i],e[i]))return!0;return!1}get direction(){return this.props.direction||this.props.dir}get extensions(){const e=[...this.baseExtensions,this.languageExtension,this.onChangeExtension,this.focusListenerExtension,this.announceLineNumberExtension];return this.themeExtension&&e.push(this.themeExtension),this.props.lineNumbers&&e.push(Eee()),this.props.highlightActiveLine&&e.push(eee()),this.props.highlightActiveLineGutter&&e.push(Pee()),this.props.foldGutter&&e.push(Ste()),this.props.lineWrapping&&e.push(ue.lineWrapping),this.props.editable===!1&&e.push(ue.editable.of(!1)),this.props.readOnly&&e.push(Ve.readOnly.of(!0)),this.props.spellcheck&&e.push(ue.contentAttributes.of({spellcheck:"true"})),this.direction&&e.push(ue.contentAttributes.of({dir:this.direction})),this.props.indentUnit&&e.push(Yd.of(this.props.indentUnit)),e}get baseExtensions(){return[ZJ(),Sie(),DJ(),HJ(),Ve.allowMultipleSelections.of(!0),KA(_te,{fallback:!0}),Ite(),_ne(),Mne(),see(),uee(),Une(),ute(),xae(this.props.searchConfig),Ip.of(this.keymaps)]}get keymaps(){const e=[...Pne,...this.commandKeybinding,...Aie,...Ote,...g4,...hre,...this.props.searchConfig?uie:[]];return this.props.indentWithTab&&e.push(ire),e}get commandKeybinding(){const e=this.props.rtlMoveVisually;if(this.direction==="rtl"&&!e){const n=OI.map(r=>r.key?r.key:r.mac?r.mac:r);return[...kR.filter(r=>r.key?n.indexOf(r.key)<0:r.mac?n.indexOf(r.mac)<0:!1),...OI]}return kR}get themeExtension(){const e=this.props.styles;if(!(e!=null&&e.theme)||!e.highlightStyle)return;const n=ue.theme(e==null?void 0:e.theme),i=KA(Mp.define(e==null?void 0:e.highlightStyle));return[n,i]}get languageExtension(){switch(this.props.language){case"json":return gae();case"js":case"jsx":case"javascript":return XS({jsx:!0,typescript:!0});case"html":return i8({matchClosingTags:!0,autoCloseTags:!0});case"css":return ZB();case"markdown":return cae();case"sh":case"shell":case"bash":return X0.define(vae);case"yml":case"yaml":return X0.define(kae);default:return XS({jsx:!0,typescript:!0})}}callOnChangeHandler(e){const n=this.props,i=n.onChange,r=n.value;this.addAnimationFrame(()=>{typeof i=="function"&&e!==r&&i(e)})}get onChangeExtension(){return Ve.changeFilter.of(e=>{if(!this._editorView)return!1;if(e.docChanged){const n=e.newDoc.toString();if(this.isControlled)return n!==this.props.value?(this._newSelectionAfterValueChange=e.selection,this.cancelAnimationFrames(),this.callOnChangeHandler(n),!1):!0;this.callOnChangeHandler(n)}return!0})}get focusListenerExtension(){const e=this.props,n=e.onFocus,i=e.onBlur;return ue.updateListener.of(r=>{r.focusChanged&&this._editorView&&(this.hasFocus?typeof n=="function"&&n():typeof i=="function"&&i())})}get announceLineNumberExtension(){return Ve.transactionExtender.of(e=>{const n=e.selection,i=e.startState.selection.main;if(n&&n.main.empty&&i.empty){const r=e.startState.doc.lineAt(i.head),o=e.newDoc.lineAt(n.main.head);if(r.number!=o.number)return{effects:ue.announce.of(e.startState.phrase("line ")+o.number+".")}}return null})}refreshExtensions(){this.dispatchViewEffects(De.reconfigure.of(this.extensions))}refreshEditorValue(){if(!this._editorView)return;const e=this.props.value,n=this._editorView.state.doc.toString();if(typeof e<"u"&&n!==e){let i;const r=e.length-n.length;r===1?i="input.type":r===-1&&(i="delete.backward"),this.dispatchViewChanges({changes:{from:0,to:n.length,insert:e||""},selection:this._newSelectionAfterValueChange,userEvent:i}),this._newSelectionAfterValueChange=void 0}this.props.indentOnLoad&&this.indentAll()}render(){const e=this.props,n=e.label,i=e.styles,r=Ie(e,Pae);return C("div",Object.assign({ref:this.handleRef,css:i==null?void 0:i.codeEditor},It(Re(r,M8.allowedProps))),C("label",{css:i==null?void 0:i.label,htmlFor:this._id},C(ji,null,n),C("div",{ref:this.handleContainerRef,css:i==null?void 0:i.codeEditorContainer})))}},bl.displayName="SourceCodeEditor",bl.componentId="SourceCodeEditor",bl.propTypes=Cae,bl.allowedProps=Tae,bl.defaultProps={language:"jsx",readOnly:!1,editable:!0,lineNumbers:!1,foldGutter:!1,highlightActiveLine:!1,highlightActiveLineGutter:!1,lineWrapping:!1,autofocus:!1,spellcheck:!1,rtlMoveVisually:!0,indentOnLoad:!1,indentWithTab:!1,defaultValue:"",height:"auto"},bl))||xs)||xs)||xs)||xs);const Aae=(t,e)=>{const n=e.layout;return{table:{label:"table",fontSize:t.fontSize,fontFamily:t.fontFamily,fontWeight:t.fontWeight,color:t.color,background:t.background,display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,...n==="fixed"&&{tableLayout:"fixed"},caption:{textAlign:"start"}}}},Rae=t=>{const e=t.colors,n=t.typography,i=t.key,r={canvas:{color:t["ic-brand-font-color-dark"]}};return{...{fontSize:n==null?void 0:n.fontSizeMedium,fontFamily:n==null?void 0:n.fontFamily,fontWeight:n==null?void 0:n.fontWeightNormal,color:e==null?void 0:e.textDarkest,background:e==null?void 0:e.backgroundLightest},...r[i]}},Iae=t=>({head:{label:"head",fontSize:t.fontSize,fontFamily:t.fontFamily,fontWeight:t.fontWeight,color:t.color,background:t.background}}),$ae=t=>{const e=t.colors,n=t.typography;return{...{fontSize:n==null?void 0:n.fontSizeMedium,fontFamily:n==null?void 0:n.fontFamily,fontWeight:n==null?void 0:n.fontWeightNormal,color:e==null?void 0:e.textDarkest,background:e==null?void 0:e.backgroundLightest}}},Lae=(t,e)=>{const n=e.hover,i=e.isStacked;return{row:{label:"row",fontSize:t.fontSize,fontFamily:t.fontFamily,fontWeight:t.fontWeight,color:t.color,background:t.background,boxSizing:"border-box",borderBottomStyle:"solid",borderBottomWidth:"0.0625rem",borderBottomColor:t.borderColor,...n&&{borderLeft:"0.1875rem solid transparent",borderRight:"0.1875rem solid transparent","&:hover":{borderLeftColor:t.hoverBorderColor,borderRightColor:t.hoverBorderColor}},...i&&{padding:t.padding}}}},Nae=t=>{const e=t.colors,n=t.typography,i=t.spacing,r=t.key,o={canvas:{hoverBorderColor:t["ic-brand-primary"]}};return{...{fontSize:n==null?void 0:n.fontSizeMedium,fontFamily:n==null?void 0:n.fontFamily,fontWeight:n==null?void 0:n.fontWeightNormal,color:e==null?void 0:e.textDarkest,background:e==null?void 0:e.backgroundLightest,borderColor:e==null?void 0:e.borderMedium,hoverBorderColor:e==null?void 0:e.borderBrand,padding:`${i==null?void 0:i.xSmall} 0`},...o[r]}},Mae=(t,e)=>{const n=e.onRequestSort,i=e.textAlign,r={color:t.color,fontSize:t.fontSize,fontFamily:t.fontFamily,fontWeight:"bold",lineHeight:t.lineHeight,padding:t.padding},o={start:{flexDirection:"row"},center:{justifyContent:"center"},end:{flexDirection:"row-reverse"}};return{colHeader:{label:"colHeader",background:t.background,verticalAlign:"middle",boxSizing:"border-box",...!n&&r,textAlign:i},button:{label:"colHeader__button",...r,display:"flex",alignItems:"center",boxSizing:"border-box",border:"none",width:"100%",height:"100%",background:"transparent",cursor:"pointer",outline:"none","&::-moz-focus-inner":{border:0},"&:focus":{outline:`${t.focusOutlineWidth} ${t.focusOutlineStyle} ${t.focusOutlineColor}`},...o[i]},buttonContent:{label:"colHeader__buttonContent",display:"flex",alignItems:"center"}}},Dae=t=>{const e=t.typography,n=t.colors,i=t.borders,r=t.spacing;return{...{fontSize:e==null?void 0:e.fontSizeMedium,fontFamily:e==null?void 0:e.fontFamily,color:n==null?void 0:n.textDarkest,background:n==null?void 0:n.backgroundLightest,borderColor:n==null?void 0:n.borderMedium,lineHeight:e==null?void 0:e.lineHeightCondensed,padding:`${r==null?void 0:r.xSmall} ${r==null?void 0:r.small}`,focusOutlineColor:n==null?void 0:n.borderBrand,focusOutlineWidth:i==null?void 0:i.widthMedium,focusOutlineStyle:i==null?void 0:i.style}}},Bae={id:f.string.isRequired,stackedSortByLabel:f.string,children:f.oneOfType([f.node,f.func]),width:f.oneOfType([f.string,f.number]),textAlign:f.oneOf(["start","center","end"]),sortDirection:f.oneOf(["none","ascending","descending"]),onRequestSort:f.func,scope:f.oneOf(["row","col","rowgroup","colgroup","auto"])},Qae=["id","stackedSortByLabel","children","width","textAlign","sortDirection","onRequestSort","scope"];var wI,kI,yl,xI,_I;let xd=(wI=de(Mae,Dae),wI(kI=(yl=class D8 extends T.Component{constructor(...e){super(...e),this.handleClick=n=>{const i=this.props,r=i.id,o=i.onRequestSort;o&&o(n,{id:r})}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}renderSortArrow(){const e=this.props,n=e.sortDirection,i=e.onRequestSort;if(n==="ascending")return xI||(xI=C(Qd,null));if(n==="descending")return _I||(_I=C(Bd,null));if(i)return C(Dd,{css:{opacity:"30%"}})}render(){const e=this.props,n=e.onRequestSort,i=e.width,r=e.children,o=e.sortDirection,s=e.scope,a=e.styles;return C("th",Object.assign({},Re(this.props,D8.allowedProps),{css:a==null?void 0:a.colHeader,style:{width:i},scope:s,"aria-sort":o}),n&&C("button",{onClick:this.handleClick,css:a==null?void 0:a.button},C("div",{css:a==null?void 0:a.buttonContent},rt(r),this.renderSortArrow())),!n&&r,!n&&this.renderSortArrow())}},yl.displayName="ColHeader",yl.componentId="Table.ColHeader",yl.allowedProps=Qae,yl.propTypes=Bae,yl.defaultProps={textAlign:"start",sortDirection:"none",children:null,scope:"col"},yl))||kI);const Fae=(t,e)=>{const n=e.textAlign;return{rowHeader:{label:"rowHeader",fontSize:t.fontSize,fontFamily:t.fontFamily,fontWeight:"bold",color:t.color,background:t.background,boxSizing:"border-box",verticalAlign:"middle",lineHeight:t.lineHeight,padding:t.padding,...n&&{textAlign:n}}}},zae=t=>{const e=t.colors,n=t.typography,i=t.spacing;return{...{fontSize:n==null?void 0:n.fontSizeMedium,fontFamily:n==null?void 0:n.fontFamily,fontWeight:n==null?void 0:n.fontWeightNormal,color:e==null?void 0:e.textDarkest,background:e==null?void 0:e.backgroundLightest,borderColor:e==null?void 0:e.borderMedium,lineHeight:n==null?void 0:n.lineHeightCondensed,padding:`${i==null?void 0:i.xSmall} ${i==null?void 0:i.small}`}}},Hae={children:f.oneOfType([f.node,f.func]),isStacked:f.bool,textAlign:f.oneOf(["start","center","end"])},Uae=["children","isStacked","textAlign"];var EI,CI,vl;let qx=(EI=de(Fae,zae),EI(CI=(vl=class rw extends T.Component{componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){const e=this.props,n=e.children,i=e.isStacked,r=e.styles;return C(ye,Object.assign({},ye.omitViewProps(Re(this.props,rw.allowedProps),rw),{as:i?"div":"th",css:r==null?void 0:r.rowHeader,scope:"row",role:i?"rowheader":void 0}),rt(n))}},vl.displayName="RowHeader",vl.componentId="Table.RowHeader",vl.allowedProps=Uae,vl.propTypes=Hae,vl.defaultProps={textAlign:"start",children:null},vl))||CI);const Wae=(t,e)=>{const n=e.textAlign;return{cell:{label:"cell",fontSize:t.fontSize,fontFamily:t.fontFamily,fontWeight:t.fontWeight,color:t.color,background:t.background,boxSizing:"border-box",verticalAlign:"middle",lineHeight:t.lineHeight,padding:t.padding,...n&&{textAlign:n}}}},Vae=t=>{const e=t.colors,n=t.typography,i=t.spacing;return{...{fontSize:n==null?void 0:n.fontSizeMedium,fontFamily:n==null?void 0:n.fontFamily,fontWeight:n==null?void 0:n.fontWeightNormal,color:e==null?void 0:e.textDarkest,background:e==null?void 0:e.backgroundLightest,borderColor:e==null?void 0:e.borderMedium,lineHeight:n==null?void 0:n.lineHeightCondensed,padding:`${i==null?void 0:i.xSmall} ${i==null?void 0:i.small}`}}},jae={children:f.oneOfType([f.node,f.func]),isStacked:f.bool,header:f.oneOfType([f.node,f.func]),textAlign:f.oneOf(["start","center","end"])},Xae=["children","isStacked","header","textAlign"];var TI,PI,Sl;let Yx=(TI=de(Wae,Vae),TI(PI=(Sl=class ow extends T.Component{componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){const e=this.props,n=e.children,i=e.styles,r=e.isStacked,o=e.header;return C(ye,Object.assign({},ye.omitViewProps(Re(this.props,ow.allowedProps),ow),{as:r?"div":"td",css:i==null?void 0:i.cell,role:r?"cell":void 0}),o&&rt(o),o&&": ",rt(n))}},Sl.displayName="Cell",Sl.componentId="Table.Cell",Sl.allowedProps=Xae,Sl.propTypes=jae,Sl.defaultProps={textAlign:"start",children:null},Sl))||PI);const Zae={children:ft.oneOf([xd,qx,Yx]),hover:f.bool,isStacked:f.bool,headers:f.arrayOf(f.oneOfType([f.node,f.func]))},qae=["children","hover","isStacked","headers"];var AI,RI,wl;let pu=(AI=de(Lae,Nae),AI(RI=(wl=class sw extends T.Component{componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){const e=this.props,n=e.children,i=e.styles,r=e.isStacked,o=e.headers;return C(ye,Object.assign({},ye.omitViewProps(Re(this.props,sw.allowedProps),sw),{as:r?"div":"tr",css:i==null?void 0:i.row,role:r?"row":void 0}),T.Children.toArray(n).filter(Boolean).map((s,a)=>Me(s,[xd])?s:Me(s,[qx])?$t(s,{key:s.props.name,isStacked:r}):Me(s,[Yx])?$t(s,{key:s.props.name,isStacked:r,header:o&&o[a]}):null))}},wl.displayName="Row",wl.componentId="Table.Row",wl.allowedProps=qae,wl.propTypes=Zae,wl.defaultProps={children:null},wl))||RI);const Yae={children:ft.oneOf([pu]),isStacked:f.bool,renderSortLabel:f.oneOfType([f.node,f.func])},Gae=["children","isStacked","renderSortLabel"];var II,$I,kl,LI;let qg=(II=de(Iae,$ae),II($I=(kl=class B8 extends T.Component{get isSortable(){const e=T.Children.toArray(this.props.children),n=Qr(e,1),i=n[0];let r=!1;return i&&T.Children.forEach(i.props.children,o=>{Me(o,[xd])&&o.props.onRequestSort&&(r=!0)}),r}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;this.isSortable&&typeof this.props.renderSortLabel>"u"&&Ne(!1,"[Table.Head] The `renderSortLabel` prop should be provided when Table is sortable."),(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}renderSelect(){const e=this.props,n=e.children,i=e.renderSortLabel,r=T.Children.toArray(n),o=Qr(r,1),s=o[0];if(!Me(s,[pu]))return null;const a=[],l={};let u,c=0;if(T.Children.forEach(s.props.children,h=>{if(c+=1,Me(h,[xd])){const p=h.props,m=p.id,O=p.stackedSortByLabel,y=p.sortDirection,b=p.onRequestSort,v=O||m;b&&(a.push({id:m,label:v}),l[m]=b,y!=="none"&&(u=m))}}),!a.length)return null;const d=(h,{value:p})=>{p&&typeof l[p]=="function"&&l[p](h,{id:`${p}`})};return C("div",{role:"rowgroup"},C("div",{role:"row"},C("div",{role:"cell","aria-colspan":c},C(LP,{renderLabel:i?rt(i):LI||(LI=C(ji,null)),renderBeforeInput:u&&ra,value:u,onChange:d},a.map(({id:h,label:p})=>C(LP.Option,{id:h,key:h,value:h,renderBeforeLabel:h===u?ra:()=>C(ra,{style:{color:"transparent"}})},p))))))}render(){const e=this.props,n=e.children,i=e.isStacked,r=e.styles;return i?this.renderSelect():C("thead",Object.assign({},Re(this.props,B8.allowedProps),{css:r==null?void 0:r.head}),T.Children.map(n,o=>Me(o,[pu])?o:null))}},kl.displayName="Head",kl.componentId="Table.Head",kl.allowedProps=Gae,kl.propTypes=Yae,kl.defaultProps={children:null},kl))||$I);const Kae=t=>({body:{label:"body",fontSize:t.fontSize,fontFamily:t.fontFamily,fontWeight:t.fontWeight,color:t.color,background:t.background}}),Jae=t=>{const e=t.colors,n=t.typography;return{...{fontSize:n==null?void 0:n.fontSizeMedium,fontFamily:n==null?void 0:n.fontFamily,fontWeight:n==null?void 0:n.fontWeightNormal,color:e==null?void 0:e.textDarkest,background:e==null?void 0:e.backgroundLightest}}},ele={children:ft.oneOf([pu]),hover:f.bool,isStacked:f.bool,headers:f.arrayOf(f.oneOfType([f.node,f.func]))},tle=["children","hover","isStacked","headers"];var NI,MI,xl;let aw=(NI=de(Kae,Jae),NI(MI=(xl=class lw extends T.Component{componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){const e=this.props,n=e.children,i=e.hover,r=e.isStacked,o=e.headers,s=e.styles;return C(ye,Object.assign({},ye.omitViewProps(Re(this.props,lw.allowedProps),lw),{as:r?"div":"tbody",css:s==null?void 0:s.body,role:r?"rowgroup":void 0}),T.Children.map(n,a=>Me(a,[pu])?$t(a,{key:a.props.name,hover:i,isStacked:r,headers:o}):null))}},xl.displayName="Body",xl.componentId="Table.Body",xl.allowedProps=tle,xl.propTypes=ele,xl.defaultProps={children:null},xl))||MI);const nle={caption:f.node.isRequired,children:ft.oneOf([qg,aw]),margin:ut.spacing,elementRef:f.func,hover:f.bool,layout:f.oneOf(["auto","fixed","stacked"])},ile=["caption","children","margin","elementRef","hover","layout"];var DI,BI,Ti;let Ln=(DI=de(Aae,Rae),DI(BI=(Ti=class uw extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}getHeaders(){const e=this.props.children,n=T.Children.toArray(e),i=Qr(n,1),r=i[0];if(Me(r,[qg])){const o=T.Children.toArray(r.props.children),s=Qr(o,1),a=s[0];if(Me(a,[pu]))return T.Children.map(a.props.children,l=>Me(l,[xd])?l.props.children:void 0)}}render(){const e=this.props,n=e.margin,i=e.layout,r=e.caption,o=e.children,s=e.hover,a=e.styles,l=i==="stacked",u=l?this.getHeaders():void 0;return C(ye,Object.assign({},ye.omitViewProps(Re(this.props,uw.allowedProps),uw),{as:l?"div":"table",margin:n,elementRef:this.handleRef,css:a==null?void 0:a.table,role:l?"table":void 0,"aria-label":l?r:void 0}),!l&&C("caption",null,C(ji,null,r)),T.Children.map(o,c=>Me(c,[qg])?$t(c,{key:c.props.name,isStacked:l}):Me(c,[aw])?$t(c,{key:c.props.name,isStacked:l,hover:s,headers:u}):null))}},Ti.displayName="Table",Ti.componentId="Table",Ti.allowedProps=ile,Ti.propTypes=nle,Ti.defaultProps={children:null,hover:!1,layout:"auto"},Ti.Head=qg,Ti.Body=aw,Ti.Row=pu,Ti.ColHeader=xd,Ti.RowHeader=qx,Ti.Cell=Yx,Ti))||BI);const rle=cW` +`);i=r<0?n:n.slice(0,r)}return e+i.length>this.to?i.slice(0,this.to-e):i}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(e,n,i=0){this.block=cO.create(e,i,this.lineStart+n,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(e,n,i=0){this.startContext(this.parser.getNodeType(e),n,i)}addNode(e,n,i){typeof e=="number"&&(e=new qe(this.parser.nodeSet.types[e],kd,kd,(i??this.prevLineEnd())-n)),this.block.addChild(e,n-this.block.from)}addElement(e){this.block.addChild(e.toTree(this.parser.nodeSet),e.from-this.block.from)}addLeafElement(e,n){this.addNode(this.buffer.writeElements(tw(n.children,e.marks),-n.from).finish(n.type,n.to-n.from),n.from)}finishContext(){let e=this.stack.pop(),n=this.stack[this.stack.length-1];n.addChild(e.toTree(this.parser.nodeSet),e.from-n.from),this.block=n}finish(){for(;this.stack.length>1;)this.finishContext();return this.addGaps(this.block.toTree(this.parser.nodeSet,this.lineStart))}addGaps(e){return this.ranges.length>1?f8(this.ranges,0,e.topNode,this.ranges[0].from,this.reusePlaceholders):e}finishLeaf(e){for(let i of e.parsers)if(i.finish(this,e))return;let n=tw(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(n,-e.start).finish(ne.Paragraph,e.content.length),e.start)}elt(e,n,i,r){return typeof e=="string"?Je(this.parser.getNodeType(e),n,i,r):new g8(e,n)}get buffer(){return new m8(this.parser.nodeSet)}}function f8(t,e,n,i,r){let o=t[e].to,s=[],a=[],l=n.from+i;function u(c,d){for(;d?c>=o:c>o;){let h=t[e+1].from-o;i+=h,c+=h,e++,o=t[e].to}}for(let c=n.firstChild;c;c=c.nextSibling){u(c.from+i,!0);let d=c.from+i,h,p=r.get(c.tree);p?h=p:c.to+i>o?(h=f8(t,e,c,i,r),u(c.to+i,!1)):h=c.toTree(),s.push(h),a.push(d-l)}return u(n.to+i,!1),new qe(n.type,s,a,n.to+i-l,n.tree?n.tree.propValues:void 0)}class yb extends cb{constructor(e,n,i,r,o,s,a,l,u){super(),this.nodeSet=e,this.blockParsers=n,this.leafBlockParsers=i,this.blockNames=r,this.endLeafBlock=o,this.skipContextMarkup=s,this.inlineParsers=a,this.inlineNames=l,this.wrappers=u,this.nodeTypes=Object.create(null);for(let c of e.types)this.nodeTypes[c.name]=c.id}createParse(e,n,i){let r=new Ise(this,e,n,i);for(let o of this.wrappers)r=o(r,e,n,i);return r}configure(e){let n=JS(e);if(!n)return this;let{nodeSet:i,skipContextMarkup:r}=this,o=this.blockParsers.slice(),s=this.leafBlockParsers.slice(),a=this.blockNames.slice(),l=this.inlineParsers.slice(),u=this.inlineNames.slice(),c=this.endLeafBlock.slice(),d=this.wrappers;if(Mh(n.defineNodes)){r=Object.assign({},r);let h=i.types.slice(),p;for(let m of n.defineNodes){let{name:O,block:y,composite:b,style:v}=typeof m=="string"?{name:m}:m;if(h.some(x=>x.name==O))continue;b&&(r[h.length]=(x,_,w)=>b(_,w,x.value));let S=h.length,k=b?["Block","BlockContext"]:y?S>=ne.ATXHeading1&&S<=ne.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"]:void 0;h.push(nn.define({id:S,name:O,props:k&&[[Pe.group,k]]})),v&&(p||(p={}),Array.isArray(v)||v instanceof Pr?p[O]=v:Object.assign(p,v))}i=new Yd(h),p&&(i=i.extend(Iu(p)))}if(Mh(n.props)&&(i=i.extend(...n.props)),Mh(n.remove))for(let h of n.remove){let p=this.blockNames.indexOf(h),m=this.inlineNames.indexOf(h);p>-1&&(o[p]=s[p]=void 0),m>-1&&(l[m]=void 0)}if(Mh(n.parseBlock))for(let h of n.parseBlock){let p=a.indexOf(h.name);if(p>-1)o[p]=h.parse,s[p]=h.leaf;else{let m=h.before?rg(a,h.before):h.after?rg(a,h.after)+1:a.length-1;o.splice(m,0,h.parse),s.splice(m,0,h.leaf),a.splice(m,0,h.name)}h.endLeaf&&c.push(h.endLeaf)}if(Mh(n.parseInline))for(let h of n.parseInline){let p=u.indexOf(h.name);if(p>-1)l[p]=h.parse;else{let m=h.before?rg(u,h.before):h.after?rg(u,h.after)+1:u.length-1;l.splice(m,0,h.parse),u.splice(m,0,h.name)}}return n.wrap&&(d=d.concat(n.wrap)),new yb(i,o,s,a,c,r,l,u,d)}getNodeType(e){let n=this.nodeTypes[e];if(n==null)throw new RangeError(`Unknown node type '${e}'`);return n}parseInline(e,n){let i=new Lse(this,e,n);e:for(let r=n;r=0){r=a;continue e}}r++}return i.resolveMarkers(0)}}function Mh(t){return t!=null&&t.length>0}function JS(t){if(!Array.isArray(t))return t;if(t.length==0)return null;let e=JS(t[0]);if(t.length==1)return e;let n=JS(t.slice(1));if(!n||!e)return e||n;let i=(s,a)=>(s||kd).concat(a||kd),r=e.wrap,o=n.wrap;return{props:i(e.props,n.props),defineNodes:i(e.defineNodes,n.defineNodes),parseBlock:i(e.parseBlock,n.parseBlock),parseInline:i(e.parseInline,n.parseInline),remove:i(e.remove,n.remove),wrap:r?o?(s,a,l,u)=>r(o(s,a,l,u),a,l,u):r:o}}function rg(t,e){let n=t.indexOf(e);if(n<0)throw new RangeError(`Position specified relative to unknown parser ${e}`);return n}let p8=[nn.none];for(let t=1,e;e=ne[t];t++)p8[t]=nn.define({id:t,name:e,props:t>=ne.Escape?[]:[[Pe.group,t in r8?["Block","BlockContext"]:["Block","LeafBlock"]]],top:e=="Document"});const kd=[];class m8{constructor(e){this.nodeSet=e,this.content=[],this.nodes=[]}write(e,n,i,r=0){return this.content.push(e,n,i,4+r*4),this}writeElements(e,n=0){for(let i of e)i.writeTo(this,n);return this}finish(e,n){return qe.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:e,length:n})}}let gp=class{constructor(e,n,i,r=kd){this.type=e,this.from=n,this.to=i,this.children=r}writeTo(e,n){let i=e.content.length;e.writeElements(this.children,n),e.content.push(this.type,this.from+n,this.to+n,e.content.length+4-i)}toTree(e){return new m8(e).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}};class g8{constructor(e,n){this.tree=e,this.from=n}get to(){return this.from+this.tree.length}get type(){return this.tree.type.id}get children(){return kd}writeTo(e,n){e.nodes.push(this.tree),e.content.push(e.nodes.length-1,this.from+n,this.to+n,-1)}toTree(){return this.tree}}function Je(t,e,n,i){return new gp(t,e,n,i)}const O8={resolve:"Emphasis",mark:"EmphasisMark"},b8={resolve:"Emphasis",mark:"EmphasisMark"},yc={},ew={};class Yi{constructor(e,n,i,r){this.type=e,this.from=n,this.to=i,this.side=r}}const nI="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~";let Op=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{Op=new RegExp("[\\p{Pc}|\\p{Pd}|\\p{Pe}|\\p{Pf}|\\p{Pi}|\\p{Po}|\\p{Ps}]","u")}catch{}const r1={Escape(t,e,n){if(e!=92||n==t.end-1)return-1;let i=t.char(n+1);for(let r=0;r]+|[a-z\d.!#$%&'*+/=?^_`{|}~-]+@[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?(?:\.[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?)*)>/i.exec(i);if(r)return t.append(Je(ne.Autolink,n,n+1+r[0].length,[Je(ne.LinkMark,n,n+1),Je(ne.URL,n+1,n+r[0].length),Je(ne.LinkMark,n+r[0].length,n+1+r[0].length)]));let o=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(i);if(o)return t.append(Je(ne.Comment,n,n+1+o[0].length));let s=/^\?[^]*?\?>/.exec(i);if(s)return t.append(Je(ne.ProcessingInstruction,n,n+1+s[0].length));let a=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(i);return a?t.append(Je(ne.HTMLTag,n,n+1+a[0].length)):-1},Emphasis(t,e,n){if(e!=95&&e!=42)return-1;let i=n+1;for(;t.char(i)==e;)i++;let r=t.slice(n-1,n),o=t.slice(i,i+1),s=Op.test(r),a=Op.test(o),l=/\s|^$/.test(r),u=/\s|^$/.test(o),c=!u&&(!a||l||s),d=!l&&(!s||u||a),h=c&&(e==42||!d||s),p=d&&(e==42||!c||a);return t.append(new Yi(e==95?O8:b8,n,i,(h?1:0)|(p?2:0)))},HardBreak(t,e,n){if(e==92&&t.char(n+1)==10)return t.append(Je(ne.HardBreak,n,n+2));if(e==32){let i=n+1;for(;t.char(i)==32;)i++;if(t.char(i)==10&&i>=n+2)return t.append(Je(ne.HardBreak,n,i+1))}return-1},Link(t,e,n){return e==91?t.append(new Yi(yc,n,n+1,1)):-1},Image(t,e,n){return e==33&&t.char(n+1)==91?t.append(new Yi(ew,n,n+2,1)):-1},LinkEnd(t,e,n){if(e!=93)return-1;for(let i=t.parts.length-1;i>=0;i--){let r=t.parts[i];if(r instanceof Yi&&(r.type==yc||r.type==ew)){if(!r.side||t.skipSpace(r.to)==n&&!/[(\[]/.test(t.slice(n+1,n+2)))return t.parts[i]=null,-1;let o=t.takeContent(i),s=t.parts[i]=$se(t,o,r.type==yc?ne.Link:ne.Image,r.from,n+1);if(r.type==yc)for(let a=0;ae?Je(ne.URL,e+n,o+n):o==t.length?null:!1}}function v8(t,e,n){let i=t.charCodeAt(e);if(i!=39&&i!=34&&i!=40)return!1;let r=i==40?41:i;for(let o=e+1,s=!1;o=this.end?-1:this.text.charCodeAt(e-this.offset)}get end(){return this.offset+this.text.length}slice(e,n){return this.text.slice(e-this.offset,n-this.offset)}append(e){return this.parts.push(e),e.to}addDelimiter(e,n,i,r,o){return this.append(new Yi(e,n,i,(r?1:0)|(o?2:0)))}get hasOpenLink(){for(let e=this.parts.length-1;e>=0;e--){let n=this.parts[e];if(n instanceof Yi&&(n.type==yc||n.type==ew))return!0}return!1}addElement(e){return this.append(e)}resolveMarkers(e){for(let i=e;i=e;l--){let O=this.parts[l];if(O instanceof Yi&&O.side&1&&O.type==r.type&&!(o&&(r.side&1||O.side&2)&&(O.to-O.from+s)%3==0&&((O.to-O.from)%3||s%3))){a=O;break}}if(!a)continue;let u=r.type.resolve,c=[],d=a.from,h=r.to;if(o){let O=Math.min(2,a.to-a.from,s);d=a.to-O,h=r.from+O,u=O==1?"Emphasis":"StrongEmphasis"}a.type.mark&&c.push(this.elt(a.type.mark,d,a.to));for(let O=l+1;O=0;n--){let i=this.parts[n];if(i instanceof Yi&&i.type==e)return n}return null}takeContent(e){let n=this.resolveMarkers(e);return this.parts.length=e,n}skipSpace(e){return gf(this.text,e-this.offset)+this.offset}elt(e,n,i,r){return typeof e=="string"?Je(this.parser.getNodeType(e),n,i,r):new g8(e,n)}}function tw(t,e){if(!e.length)return t;if(!t.length)return e;let n=t.slice(),i=0;for(let r of e){for(;i(e?e-1:0))return!1;if(this.fragmentEnd<0){let o=this.fragment.to;for(;o>0&&this.input.read(o-1,o)!=` +`;)o--;this.fragmentEnd=o?o-1:0}let i=this.cursor;i||(i=this.cursor=this.fragment.tree.cursor(),i.firstChild());let r=e+this.fragment.offset;for(;i.to<=r;)if(!i.parent())return!1;for(;;){if(i.from>=r)return this.fragment.from<=n;if(!i.childAfter(r))return!1}}matches(e){let n=this.cursor.tree;return n&&n.prop(Pe.contextHash)==e}takeNodes(e){let n=this.cursor,i=this.fragment.offset,r=this.fragmentEnd-(this.fragment.openEnd?1:0),o=e.absoluteLineStart,s=o,a=e.block.children.length,l=s,u=a;for(;;){if(n.to-i>r){if(n.type.isAnonymous&&n.firstChild())continue;break}let c=w8(n.from-i,e.ranges);if(n.to-i<=e.ranges[e.rangeI].to)e.addNode(n.tree,c);else{let d=new qe(e.parser.nodeSet.types[ne.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(d,n.tree),e.addNode(d,c)}if(n.type.is("Block")&&(Nse.indexOf(n.type.id)<0?(s=n.to-i,a=e.block.children.length):(s=l,a=u,l=n.to-i,u=e.block.children.length)),!n.nextSibling())break}for(;e.block.children.length>a;)e.block.children.pop(),e.block.positions.pop();return s-o}}function w8(t,e){let n=t;for(let i=1;iig[t]),Object.keys(ig).map(t=>Pse[t]),Object.keys(ig),Ase,r8,Object.keys(r1).map(t=>r1[t]),Object.keys(r1),[]);function Qse(t,e,n){let i=[];for(let r=t.firstChild,o=e;;r=r.nextSibling){let s=r?r.from:n;if(s>o&&i.push({from:o,to:s}),!r)break;o=r.to}return i}function Fse(t){let{codeParser:e,htmlParser:n}=t;return{wrap:LD((r,o)=>{let s=r.type.id;if(e&&(s==ne.CodeBlock||s==ne.FencedCode)){let a="";if(s==ne.FencedCode){let u=r.node.getChild(ne.CodeInfo);u&&(a=o.read(u.from,u.to))}let l=e(a);if(l)return{parser:l,overlay:u=>u.type.id==ne.CodeText}}else if(n&&(s==ne.HTMLBlock||s==ne.HTMLTag))return{parser:n,overlay:Qse(r.node,r.from,r.to)};return null})}}const zse={resolve:"Strikethrough",mark:"StrikethroughMark"},Hse={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":R.strikethrough}},{name:"StrikethroughMark",style:R.processingInstruction}],parseInline:[{name:"Strikethrough",parse(t,e,n){if(e!=126||t.char(n+1)!=126||t.char(n+2)==126)return-1;let i=t.slice(n-1,n),r=t.slice(n+2,n+3),o=/\s|^$/.test(i),s=/\s|^$/.test(r),a=Op.test(i),l=Op.test(r);return t.addDelimiter(zse,n,n+2,!s&&(!l||o||a),!o&&(!a||s||l))},after:"Emphasis"}]};function Of(t,e,n=0,i,r=0){let o=0,s=!0,a=-1,l=-1,u=!1,c=()=>{i.push(t.elt("TableCell",r+a,r+l,t.parser.parseInline(e.slice(a,l),r+a)))};for(let d=n;d-1)&&o++,s=!1,i&&(a>-1&&c(),i.push(t.elt("TableDelimiter",d+r,d+r+1))),a=l=-1):(u||h!=32&&h!=9)&&(a<0&&(a=d),l=d+1),u=!u&&h==92}return a>-1&&(o++,i&&c()),o}function iI(t,e){for(let n=e;nr instanceof rI)||!iI(e.text,e.basePos))return!1;let i=t.scanLine(t.absoluteLineEnd+1).text;return k8.test(i)&&Of(t,e.text,e.basePos)==Of(t,i,e.basePos)},before:"SetextHeading"}]};class Wse{nextLine(){return!1}finish(e,n){return e.addLeafElement(n,e.elt("Task",n.start,n.start+n.content.length,[e.elt("TaskMarker",n.start,n.start+3),...e.parser.parseInline(n.content.slice(3),n.start+3)])),!0}}const Vse={defineNodes:[{name:"Task",block:!0,style:R.list},{name:"TaskMarker",style:R.atom}],parseBlock:[{name:"TaskList",leaf(t,e){return/^\[[ xX]\][ \t]/.test(e.content)&&t.parentType().name=="ListItem"?new Wse:null},after:"SetextHeading"}]},oI=/(www\.)|(https?:\/\/)|([\w.+-]+@)|(mailto:|xmpp:)/gy,sI=/[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy,jse=/[\w-]+\.[\w-]+($|\/)/,aI=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,lI=/\/[a-zA-Z\d@.]+/gy;function uI(t,e,n,i){let r=0;for(let o=e;o-1)return-1;let i=e+n[0].length;for(;;){let r=t[i-1],o;if(/[?!.,:*_~]/.test(r)||r==")"&&uI(t,e,i,")")>uI(t,e,i,"("))i--;else if(r==";"&&(o=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(t.slice(e,i))))i=e+o.index;else break}return i}function cI(t,e){aI.lastIndex=e;let n=aI.exec(t);if(!n)return-1;let i=n[0][n[0].length-1];return i=="_"||i=="-"?-1:e+n[0].length-(i=="."?1:0)}const Zse={parseInline:[{name:"Autolink",parse(t,e,n){let i=n-t.offset;oI.lastIndex=i;let r=oI.exec(t.text),o=-1;if(!r)return-1;if(r[1]||r[2]){if(o=Xse(t.text,i+r[0].length),o>-1&&t.hasOpenLink){let s=/([^\[\]]|\[[^\]]*\])*/.exec(t.text.slice(i,o));o=i+s[0].length}}else r[3]?o=cI(t.text,i):(o=cI(t.text,i+r[0].length),o>-1&&r[0]=="xmpp:"&&(lI.lastIndex=o,r=lI.exec(t.text),r&&(o=r.index+r[0].length)));return o<0?-1:(t.addElement(t.elt("URL",n,o+t.offset)),o+t.offset)}}]},qse=[Use,Vse,Hse,Zse];function x8(t,e,n){return(i,r,o)=>{if(r!=t||i.char(o+1)==t)return-1;let s=[i.elt(n,o,o+1)];for(let a=o+1;a"}}}),E8=new Pe,C8=Bse.configure({props:[$u.add(t=>!t.is("Block")||t.is("Document")||nw(t)!=null||Jse(t)?void 0:(e,n)=>({from:n.doc.lineAt(e.from).to,to:e.to})),E8.add(nw),Kd.add({Document:()=>null}),Ys.add({Document:_8})]});function nw(t){let e=/^(?:ATX|Setext)Heading(\d)$/.exec(t.name);return e?+e[1]:void 0}function Jse(t){return t.name=="OrderedList"||t.name=="BulletList"}function eae(t,e){let n=t;for(;;){let i=n.nextSibling,r;if(!i||(r=nw(i.type))!=null&&r<=e)break;n=i}return n.to}const tae=zD.of((t,e,n)=>{for(let i=Ot(t).resolveInner(n,-1);i&&!(i.fromn)return{from:n,to:o}}return null});function Xx(t){return new Di(_8,t,[tae],"markdown")}const nae=Xx(C8),iae=C8.configure([qse,Gse,Yse,Kse,{props:[$u.add({Table:(t,e)=>({from:e.doc.lineAt(t.from).to,to:t.to})})]}]),T8=Xx(iae);function rae(t,e){return n=>{if(n&&t){let i=null;if(n=/\S*/.exec(n)[0],typeof t=="function"?i=t(n):i=V0.matchLanguageName(t,n,!0),i instanceof V0)return i.support?i.support.language.parser:hu.getSkippingParser(i.load());if(i)return i.parser}return e?e.parser:null}}class og{constructor(e,n,i,r,o,s,a){this.node=e,this.from=n,this.to=i,this.spaceBefore=r,this.spaceAfter=o,this.type=s,this.item=a}blank(e,n=!0){let i=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(e!=null){for(;i.length0;r--)i+=" ";return i+(n?this.spaceAfter:"")}}marker(e,n){let i=this.node.name=="OrderedList"?String(+A8(this.item,e)[2]+n):"";return this.spaceBefore+i+this.type+this.spaceAfter}}function P8(t,e){let n=[];for(let r=t;r&&r.name!="Document";r=r.parent)(r.name=="ListItem"||r.name=="Blockquote"||r.name=="FencedCode")&&n.push(r);let i=[];for(let r=n.length-1;r>=0;r--){let o=n[r],s,a=e.lineAt(o.from),l=o.from-a.from;if(o.name=="FencedCode")i.push(new og(o,l,l,"","","",null));else if(o.name=="Blockquote"&&(s=/^ *>( ?)/.exec(a.text.slice(l))))i.push(new og(o,l,l+s[0].length,"",s[1],">",null));else if(o.name=="ListItem"&&o.parent.name=="OrderedList"&&(s=/^( *)\d+([.)])( *)/.exec(a.text.slice(l)))){let u=s[3],c=s[0].length;u.length>=4&&(u=u.slice(0,u.length-4),c-=4),i.push(new og(o.parent,l,l+c,s[1],u,s[2],o))}else if(o.name=="ListItem"&&o.parent.name=="BulletList"&&(s=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(a.text.slice(l)))){let u=s[4],c=s[0].length;u.length>4&&(u=u.slice(0,u.length-4),c-=4);let d=s[2];s[3]&&(d+=s[3].replace(/[xX]/," ")),i.push(new og(o.parent,l,l+c,s[1],u,d,o))}}return i}function A8(t,e){return/^(\s*)(\d+)(?=[.)])/.exec(e.sliceString(t.from,t.from+10))}function o1(t,e,n,i=0){for(let r=-1,o=t;;){if(o.name=="ListItem"){let a=A8(o,e),l=+a[2];if(r>=0){if(l!=r+1)return;n.push({from:o.from+a[1].length,to:o.from+a[0].length,insert:String(r+2+i)})}r=l}let s=o.nextSibling;if(!s)break;o=s}}function Zx(t,e){let n=/^[ \t]*/.exec(t)[0].length;if(!n||e.facet(Gd)!=" ")return t;let i=Hr(t,4,n),r="";for(let o=i;o>0;)o>=4?(r+=" ",o-=4):(r+=" ",o--);return r+t.slice(n)}const oae=({state:t,dispatch:e})=>{let n=Ot(t),{doc:i}=t,r=null,o=t.changeByRange(s=>{if(!s.empty||!T8.isActiveAt(t,s.from))return r={range:s};let a=s.from,l=i.lineAt(a),u=P8(n.resolveInner(a,-1),i);for(;u.length&&u[u.length-1].from>a-l.from;)u.pop();if(!u.length)return r={range:s};let c=u[u.length-1];if(c.to-c.spaceAfter.length>a-l.from)return r={range:s};let d=a>=c.to-c.spaceAfter.length&&!/\S/.test(l.text.slice(c.to));if(c.item&&d){let y=c.node.firstChild,b=c.node.getChild("ListItem","ListItem");if(y.to>=a||b&&b.to0&&!/[^\s>]/.test(i.lineAt(l.from-1).text)){let v=u.length>1?u[u.length-2]:null,S,k="";v&&v.item?(S=l.from+v.from,k=v.marker(i,1)):S=l.from+(v?v.to:0);let x=[{from:S,to:a,insert:k}];return c.node.name=="OrderedList"&&o1(c.item,i,x,-2),v&&v.node.name=="OrderedList"&&o1(v.item,i,x),{range:Y.cursor(S+k.length),changes:x}}else{let v=hI(u,t,l);return{range:Y.cursor(a+v.length+1),changes:{from:l.from,insert:v+t.lineBreak}}}}if(c.node.name=="Blockquote"&&d&&l.from){let y=i.lineAt(l.from-1),b=/>\s*$/.exec(y.text);if(b&&b.index==c.from){let v=t.changes([{from:y.from+b.index,to:y.to},{from:l.from+c.from,to:l.to}]);return{range:s.map(v),changes:v}}}let h=[];c.node.name=="OrderedList"&&o1(c.item,i,h);let p=c.item&&c.item.from]*/.exec(l.text)[0].length>=c.to)for(let y=0,b=u.length-1;y<=b;y++)m+=y==b&&!p?u[y].marker(i,1):u[y].blank(yl.from&&/\s/.test(l.text.charAt(O-l.from-1));)O--;return m=Zx(m,t),sae(c.node,t.doc)&&(m=hI(u,t,l)+t.lineBreak+m),h.push({from:O,to:a,insert:t.lineBreak+m}),{range:Y.cursor(O+m.length+1),changes:h}});return r?!1:(e(t.update(o,{scrollIntoView:!0,userEvent:"input"})),!0)};function dI(t){return t.name=="QuoteMark"||t.name=="ListMark"}function sae(t,e){if(t.name!="OrderedList"&&t.name!="BulletList")return!1;let n=t.firstChild,i=t.getChild("ListItem","ListItem");if(!i)return!1;let r=e.lineAt(n.to),o=e.lineAt(i.from),s=/^[\s>]*$/.test(r.text);return r.number+(s?0:1){let n=Ot(t),i=null,r=t.changeByRange(o=>{let s=o.from,{doc:a}=t;if(o.empty&&T8.isActiveAt(t,o.from)){let l=a.lineAt(s),u=P8(aae(n,s),a);if(u.length){let c=u[u.length-1],d=c.to-c.spaceAfter.length+(c.spaceAfter?1:0);if(s-l.from>d&&!/\S/.test(l.text.slice(d,s-l.from)))return{range:Y.cursor(l.from+d),changes:{from:l.from+d,to:s}};if(s-l.from==d&&(!c.item||l.from<=c.item.from||!/\S/.test(l.text.slice(0,c.to)))){let h=l.from+c.from;if(c.item&&c.node.from1&&t.eat("$");var n=t.next();return/['"({]/.test(n)?(e.tokens[0]=vb(n,n=="("?"quote":n=="{"?"def":"string"),xd(t,e)):(/\d/.test(n)||t.eatWhile(/\w/),e.tokens.shift(),"def")};function yae(t){return function(e,n){return e.sol()&&e.string==t&&n.tokens.shift(),e.skipToEnd(),"string.special"}}function xd(t,e){return(e.tokens[0]||Oae)(t,e)}const vae={name:"shell",startState:function(){return{tokens:[]}},token:function(t,e){return xd(t,e)},languageData:{autocomplete:R8.concat(I8,$8),closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"#"}}};var Sae=["true","false","on","off","yes","no"],wae=new RegExp("\\b(("+Sae.join(")|(")+"))$","i");const kae={name:"yaml",token:function(t,e){var n=t.peek(),i=e.escaped;if(e.escaped=!1,n=="#"&&(t.pos==0||/\s/.test(t.string.charAt(t.pos-1))))return t.skipToEnd(),"comment";if(t.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))return"string";if(e.literal&&t.indentation()>e.keyCol)return t.skipToEnd(),"string";if(e.literal&&(e.literal=!1),t.sol()){if(e.keyCol=0,e.pair=!1,e.pairStart=!1,t.match("---")||t.match("..."))return"def";if(t.match(/^\s*-\s+/))return"meta"}if(t.match(/^(\{|\}|\[|\])/))return n=="{"?e.inlinePairs++:n=="}"?e.inlinePairs--:n=="["?e.inlineList++:e.inlineList--,"meta";if(e.inlineList>0&&!i&&n==",")return t.next(),"meta";if(e.inlinePairs>0&&!i&&n==",")return e.keyCol=0,e.pair=!1,e.pairStart=!1,t.next(),"meta";if(e.pairStart){if(t.match(/^\s*(\||\>)\s*/))return e.literal=!0,"meta";if(t.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable";if(e.inlinePairs==0&&t.match(/^\s*-?[0-9\.\,]+\s?$/)||e.inlinePairs>0&&t.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(t.match(wae))return"keyword"}return!e.pair&&t.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)?(e.pair=!0,e.keyCol=t.indentation(),"atom"):e.pair&&t.match(/^:\s*/)?(e.pairStart=!0,"meta"):(e.pairStart=!1,e.escaped=n=="\\",t.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}},languageData:{commentTokens:{line:"#"}}};var fI,pI,mI;function gI({view:t,searchConfig:e}){const n=T.useState(""),i=Qr(n,2),r=i[0],o=i[1],s=(h,p)=>{o(p),a(p)},a=h=>{t.dispatch({effects:yd.of(new Cx({search:h}))})},l=h=>{h.key==="Enter"&&(h.shiftKey?d():c())},u=h=>{h.key==="Escape"&&Ax(t)},c=()=>{a(r),cp(t)},d=()=>{a(r),dp(t)};return z.createElement(Gk,{renderLabel:"",inputRef:h=>{setTimeout(()=>h==null?void 0:h.focus(),0)},size:"small",display:"inline-block",width:"20rem",placeholder:e.placeholder,onChange:s,onKeyDown:l,onKeyUp:u,renderBeforeInput:fI||(fI=z.createElement(Eu,{size:"x-small"})),renderAfterInput:z.createElement("span",null,z.createElement($0,{size:"small",withBorder:!1,withBackground:!1,onClick:c,screenReaderLabel:e.nextResultLabel},pI||(pI=z.createElement(ku,null))),z.createElement($0,{size:"small",withBorder:!1,withBackground:!1,onClick:d,screenReaderLabel:e.prevResultLabel},mI||(mI=z.createElement(xu,null))))})}function xae(t){return t?Kne({createPanel:e=>{var n;const i=document.createElement("div");return i.style.padding="8px",Number(z.version.split(".")[0])>=18?jq(()=>Promise.resolve().then(()=>Ez),void 0).then(o=>{o.createRoot(i).render(n||(n=z.createElement(gI,{view:e,searchConfig:t})))}).catch(o=>{}):Cp.render(z.createElement(gI,{view:e,searchConfig:t}),i),{dom:i}}}):[]}const _ae=(t,e)=>{const n=e.attachment,i=e.height,r=e.width,o={top:{borderBottomLeftRadius:0,borderBottomRightRadius:0},bottom:{borderTopLeftRadius:0,borderTopRightRadius:0}},s={top:{marginBottom:0,marginTop:"0.25rem"},bottom:{borderTopLeftRadius:0,borderTopRightRadius:0,marginBottom:"0.25rem"}},a=1.4375;return{codeEditor:{label:"codeEditor",position:"relative",boxSizing:"border-box",height:i||"auto",width:r},label:{label:"label",height:"100%",width:"100%"},codeEditorContainer:{label:"codeEditorContainer",height:"100%",width:"100%",borderColor:t==null?void 0:t.borderColor,borderStyle:"solid",borderWidth:t==null?void 0:t.borderWidth,borderRadius:t.borderRadius,marginBottom:"1rem",...n&&{...s[n],...o[n]}},theme:{"&":{overflow:"hidden",background:t.background,fontFamily:t.fontFamily,fontSize:t.fontSize,color:t.color,border:0,height:"100%",width:"100%",minHeight:`${a}rem`,lineHeight:a,borderRadius:t.borderRadius,...n&&{...o[n]}},"&.cm-editor.cm-focused":{outline:`${t==null?void 0:t.borderWidth} solid ${t==null?void 0:t.focusBorderColor}`},".cm-content":{padding:`${t.verticalPadding} 0`},".cm-scroller":{fontFamily:t.fontFamily,lineHeight:1.4375},".cm-gutters":{background:t.gutterBackground,borderColor:t.borderColor},".cm-line":{padding:`0 ${t.horizontalPadding}`},".cm-selectionBackground":{background:"transparent"},".cm-focused .cm-selectionBackground":{background:"#d7d4f0"},".cm-placeholder":{color:"#707070"}},highlightStyle:[{tag:R.link,textDecoration:"underline"},{tag:R.heading,textDecoration:"underline",fontWeight:"bold"},{tag:R.emphasis,fontStyle:"italic"},{tag:R.strong,fontWeight:"bold"},{tag:R.strikethrough,textDecoration:"line-through"},{tag:R.keyword,color:"#708"},{tag:[R.atom,R.bool,R.url,R.contentSeparator,R.labelName],color:"#219"},{tag:[R.literal,R.inserted],color:"#164"},{tag:[R.string,R.deleted],color:"#a11"},{tag:R.definition(R.variableName),color:"#00f"},{tag:R.local(R.variableName),color:"#30a"},{tag:R.className,color:"#167"},{tag:[R.special(R.variableName),R.macroName],color:"#256"},{tag:R.definition(R.propertyName),color:"#00c"},{tag:R.comment,color:"#940"},{tag:R.meta,color:"#757075"},{tag:[R.regexp,R.escape,R.special(R.string)],color:"#d13b00"},{tag:[R.typeName,R.namespace],color:"#008051"},{tag:R.invalid,color:"#e60000"}]}},Eae=t=>{const e=t.colors,n=t.borders,i=t.typography,r=t.spacing;return{...{fontFamily:i==null?void 0:i.fontFamilyMonospace,fontSize:i==null?void 0:i.fontSizeSmall,background:e==null?void 0:e.backgroundLightest,color:e==null?void 0:e.textDarkest,gutterBackground:e==null?void 0:e.backgroundLight,borderWidth:n==null?void 0:n.widthSmall,borderColor:e==null?void 0:e.borderMedium,borderRadius:n==null?void 0:n.radiusMedium,focusBorderColor:e==null?void 0:e.borderBrand,horizontalPadding:r==null?void 0:r.xSmall,verticalPadding:r==null?void 0:r.xxSmall}}},OI=[{key:"ArrowLeft",run:Nx,shift:Dx,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:L4,shift:q4},{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:M4,shift:G4},{mac:"Cmd-ArrowLeft",run:V4,shift:oB},{key:"Home",run:H4,shift:nB},{key:"ArrowRight",run:Lx,shift:Mx,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:$4,shift:Z4},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:N4,shift:Y4},{mac:"Cmd-ArrowRight",run:W4,shift:rB},{key:"End",run:U4,shift:iB},{key:"Delete",run:nO},{key:"Mod-Delete",mac:"Alt-Delete",run:Bx},{key:"Backspace",run:iO,shift:iO},{key:"Mod-Backspace",mac:"Alt-Backspace",run:lB},{mac:"Mod-Delete",run:Hie},{mac:"Mod-Backspace",run:uB}],Cae={label:f.string.isRequired,language:f.oneOf(["sh","js","json","javascript","jsx","shell","css","html","markdown","yaml","yml","bash"]),readOnly:f.bool,editable:f.bool,lineNumbers:f.bool,foldGutter:f.bool,highlightActiveLineGutter:f.bool,highlightActiveLine:f.bool,lineWrapping:f.bool,autofocus:f.bool,spellcheck:f.bool,direction:f.oneOf(["ltr","rtl"]),rtlMoveVisually:f.bool,indentOnLoad:f.bool,indentWithTab:f.bool,indentUnit:f.string,defaultValue:f.string,value:Su(f.string,"onChange","defaultValue"),onChange:f.func,onFocus:f.func,onBlur:f.func,attachment:f.oneOf(["bottom","top"]),height:f.string,width:f.string,elementRef:f.func,containerRef:f.func,searchConfig:f.object},Tae=["label","language","readOnly","editable","lineNumbers","foldGutter","highlightActiveLineGutter","highlightActiveLine","lineWrapping","autofocus","spellcheck","direction","rtlMoveVisually","indentOnLoad","indentWithTab","indentUnit","defaultValue","value","onChange","onFocus","onBlur","attachment","height","width","elementRef","containerRef","searchConfig"],Pae=["label","styles"];var bI,yI,vI,SI,_s,vl;let N8=(bI=Ht(),yI=de(_ae,Eae),vI=Mr(),SI=Le(),bI(_s=yI(_s=vI(_s=SI(_s=(vl=class M8 extends T.Component{addAnimationFrame(e){typeof e=="function"&&this._raf.push(Yo(e))}cancelAnimationFrames(){this._raf.forEach(e=>e.cancel()),this._raf=[]}focus(){this.addAnimationFrame(()=>{var e;(e=this._editorView)===null||e===void 0||e.focus()})}get hasFocus(){var e;return(e=this._editorView)===null||e===void 0?void 0:e.hasFocus}selectAll(){this._editorView&&this.addAnimationFrame(()=>{var e;this.dispatchViewSelection({anchor:0,head:(e=this.currentDocValue)===null||e===void 0?void 0:e.length})})}deselectAll(){this._editorView&&this.addAnimationFrame(()=>{this.dispatchViewSelection({anchor:0,head:0})})}indentCurrentSelection(){this.addAnimationFrame(()=>{this._editorView&&fB({state:this._editorView.state,dispatch:e=>{var n;(n=this._editorView)===null||n===void 0||n.update([e])}})})}indentAll(){this.addAnimationFrame(()=>{this._editorView&&this.currentDocValue&&this.indentCodeRange(0,this.currentDocValue.length)})}indentCodeRange(e,n){this.addAnimationFrame(()=>{this._editorView&&this.currentDocValue&&this.dispatchViewChanges({changes:Jee(this._editorView.state,e,n)})})}dispatchViewEffects(e){!this._editorView||!e||this._editorView.dispatch({effects:e})}dispatchViewChanges({changes:e,selection:n,userEvent:i}){!this._editorView||!e||this._editorView.dispatch({changes:e,...n?{selection:n}:void 0,...i?{userEvent:i}:void 0})}dispatchViewSelection(e){!this._editorView||!e||this._editorView.dispatch({selection:e})}get currentDocValue(){var e;return(e=this._editorView)===null||e===void 0?void 0:e.state.doc}get isControlled(){return typeof this.props.value=="string"}constructor(e){super(e),this._id=void 0,this.ref=null,this._containerRef=void 0,this._editorView=void 0,this._raf=[],this._newSelectionAfterValueChange=void 0,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.handleContainerRef=n=>{const i=this.props.containerRef;this._containerRef=n||void 0,typeof i=="function"&&i(n)},this._id=e.deterministicId()}componentDidMount(){var e,n;const i=this.props,r=i.value,o=i.defaultValue,s=i.autofocus,a=i.indentOnLoad;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n);const l=je.create({doc:r||o,extensions:this.extensions});this._editorView=new le({state:l,parent:this._containerRef}),s&&this.focus(),a&&this.indentAll()}componentWillUnmount(){var e;(e=this._editorView)===null||e===void 0||e.destroy(),this.cancelAnimationFrames()}componentDidUpdate(e){var n,i;(n=(i=this.props).makeStyles)===null||n===void 0||n.call(i),this._editorView&&(this.props.value!==e.value&&this.refreshEditorValue(),this.shouldUpdateExtensions(e)&&this.refreshExtensions())}shouldUpdateExtensions(e){const n=["styles","themeOverride","language","readOnly","editable","lineNumbers","highlightActiveLineGutter","foldGutter","lineWrapping","autofocus","spellcheck","direction","dir","rtlMoveVisually","indentOnLoad","indentWithTab","indentUnit","highlightActiveLine","attachment"];for(const i of n)if(!KO(this.props[i],e[i]))return!0;return!1}get direction(){return this.props.direction||this.props.dir}get extensions(){const e=[...this.baseExtensions,this.languageExtension,this.onChangeExtension,this.focusListenerExtension,this.announceLineNumberExtension];return this.themeExtension&&e.push(this.themeExtension),this.props.lineNumbers&&e.push(Eee()),this.props.highlightActiveLine&&e.push(eee()),this.props.highlightActiveLineGutter&&e.push(Pee()),this.props.foldGutter&&e.push(Ste()),this.props.lineWrapping&&e.push(le.lineWrapping),this.props.editable===!1&&e.push(le.editable.of(!1)),this.props.readOnly&&e.push(je.readOnly.of(!0)),this.props.spellcheck&&e.push(le.contentAttributes.of({spellcheck:"true"})),this.direction&&e.push(le.contentAttributes.of({dir:this.direction})),this.props.indentUnit&&e.push(Gd.of(this.props.indentUnit)),e}get baseExtensions(){return[ZJ(),Sie(),DJ(),HJ(),je.allowMultipleSelections.of(!0),KA(_te,{fallback:!0}),Ite(),_ne(),Mne(),see(),uee(),Une(),ute(),xae(this.props.searchConfig),$p.of(this.keymaps)]}get keymaps(){const e=[...Pne,...this.commandKeybinding,...Aie,...Ote,...g4,...hre,...this.props.searchConfig?uie:[]];return this.props.indentWithTab&&e.push(ire),e}get commandKeybinding(){const e=this.props.rtlMoveVisually;if(this.direction==="rtl"&&!e){const n=OI.map(r=>r.key?r.key:r.mac?r.mac:r);return[...kR.filter(r=>r.key?n.indexOf(r.key)<0:r.mac?n.indexOf(r.mac)<0:!1),...OI]}return kR}get themeExtension(){const e=this.props.styles;if(!(e!=null&&e.theme)||!e.highlightStyle)return;const n=le.theme(e==null?void 0:e.theme),i=KA(Dp.define(e==null?void 0:e.highlightStyle));return[n,i]}get languageExtension(){switch(this.props.language){case"json":return gae();case"js":case"jsx":case"javascript":return ZS({jsx:!0,typescript:!0});case"html":return i8({matchClosingTags:!0,autoCloseTags:!0});case"css":return ZB();case"markdown":return cae();case"sh":case"shell":case"bash":return Z0.define(vae);case"yml":case"yaml":return Z0.define(kae);default:return ZS({jsx:!0,typescript:!0})}}callOnChangeHandler(e){const n=this.props,i=n.onChange,r=n.value;this.addAnimationFrame(()=>{typeof i=="function"&&e!==r&&i(e)})}get onChangeExtension(){return je.changeFilter.of(e=>{if(!this._editorView)return!1;if(e.docChanged){const n=e.newDoc.toString();if(this.isControlled)return n!==this.props.value?(this._newSelectionAfterValueChange=e.selection,this.cancelAnimationFrames(),this.callOnChangeHandler(n),!1):!0;this.callOnChangeHandler(n)}return!0})}get focusListenerExtension(){const e=this.props,n=e.onFocus,i=e.onBlur;return le.updateListener.of(r=>{r.focusChanged&&this._editorView&&(this.hasFocus?typeof n=="function"&&n():typeof i=="function"&&i())})}get announceLineNumberExtension(){return je.transactionExtender.of(e=>{const n=e.selection,i=e.startState.selection.main;if(n&&n.main.empty&&i.empty){const r=e.startState.doc.lineAt(i.head),o=e.newDoc.lineAt(n.main.head);if(r.number!=o.number)return{effects:le.announce.of(e.startState.phrase("line ")+o.number+".")}}return null})}refreshExtensions(){this.dispatchViewEffects(De.reconfigure.of(this.extensions))}refreshEditorValue(){if(!this._editorView)return;const e=this.props.value,n=this._editorView.state.doc.toString();if(typeof e<"u"&&n!==e){let i;const r=e.length-n.length;r===1?i="input.type":r===-1&&(i="delete.backward"),this.dispatchViewChanges({changes:{from:0,to:n.length,insert:e||""},selection:this._newSelectionAfterValueChange,userEvent:i}),this._newSelectionAfterValueChange=void 0}this.props.indentOnLoad&&this.indentAll()}render(){const e=this.props,n=e.label,i=e.styles,r=Ie(e,Pae);return C("div",Object.assign({ref:this.handleRef,css:i==null?void 0:i.codeEditor},It(Re(r,M8.allowedProps))),C("label",{css:i==null?void 0:i.label,htmlFor:this._id},C(Vi,null,n),C("div",{ref:this.handleContainerRef,css:i==null?void 0:i.codeEditorContainer})))}},vl.displayName="SourceCodeEditor",vl.componentId="SourceCodeEditor",vl.propTypes=Cae,vl.allowedProps=Tae,vl.defaultProps={language:"jsx",readOnly:!1,editable:!0,lineNumbers:!1,foldGutter:!1,highlightActiveLine:!1,highlightActiveLineGutter:!1,lineWrapping:!1,autofocus:!1,spellcheck:!1,rtlMoveVisually:!0,indentOnLoad:!1,indentWithTab:!1,defaultValue:"",height:"auto"},vl))||_s)||_s)||_s)||_s);const Aae=(t,e)=>{const n=e.layout;return{table:{label:"table",fontSize:t.fontSize,fontFamily:t.fontFamily,fontWeight:t.fontWeight,color:t.color,background:t.background,display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,...n==="fixed"&&{tableLayout:"fixed"},caption:{textAlign:"start"}}}},Rae=t=>{const e=t.colors,n=t.typography,i=t.key,r={canvas:{color:t["ic-brand-font-color-dark"]}};return{...{fontSize:n==null?void 0:n.fontSizeMedium,fontFamily:n==null?void 0:n.fontFamily,fontWeight:n==null?void 0:n.fontWeightNormal,color:e==null?void 0:e.textDarkest,background:e==null?void 0:e.backgroundLightest},...r[i]}},Iae=t=>({head:{label:"head",fontSize:t.fontSize,fontFamily:t.fontFamily,fontWeight:t.fontWeight,color:t.color,background:t.background}}),$ae=t=>{const e=t.colors,n=t.typography;return{...{fontSize:n==null?void 0:n.fontSizeMedium,fontFamily:n==null?void 0:n.fontFamily,fontWeight:n==null?void 0:n.fontWeightNormal,color:e==null?void 0:e.textDarkest,background:e==null?void 0:e.backgroundLightest}}},Lae=(t,e)=>{const n=e.hover,i=e.isStacked;return{row:{label:"row",fontSize:t.fontSize,fontFamily:t.fontFamily,fontWeight:t.fontWeight,color:t.color,background:t.background,boxSizing:"border-box",borderBottomStyle:"solid",borderBottomWidth:"0.0625rem",borderBottomColor:t.borderColor,...n&&{borderLeft:"0.1875rem solid transparent",borderRight:"0.1875rem solid transparent","&:hover":{borderLeftColor:t.hoverBorderColor,borderRightColor:t.hoverBorderColor}},...i&&{padding:t.padding}}}},Nae=t=>{const e=t.colors,n=t.typography,i=t.spacing,r=t.key,o={canvas:{hoverBorderColor:t["ic-brand-primary"]}};return{...{fontSize:n==null?void 0:n.fontSizeMedium,fontFamily:n==null?void 0:n.fontFamily,fontWeight:n==null?void 0:n.fontWeightNormal,color:e==null?void 0:e.textDarkest,background:e==null?void 0:e.backgroundLightest,borderColor:e==null?void 0:e.borderMedium,hoverBorderColor:e==null?void 0:e.borderBrand,padding:`${i==null?void 0:i.xSmall} 0`},...o[r]}},Mae=(t,e)=>{const n=e.onRequestSort,i=e.textAlign,r={color:t.color,fontSize:t.fontSize,fontFamily:t.fontFamily,fontWeight:"bold",lineHeight:t.lineHeight,padding:t.padding},o={start:{flexDirection:"row"},center:{justifyContent:"center"},end:{flexDirection:"row-reverse"}};return{colHeader:{label:"colHeader",background:t.background,verticalAlign:"middle",boxSizing:"border-box",...!n&&r,textAlign:i},button:{label:"colHeader__button",...r,display:"flex",alignItems:"center",boxSizing:"border-box",border:"none",width:"100%",height:"100%",background:"transparent",cursor:"pointer",outline:"none","&::-moz-focus-inner":{border:0},"&:focus":{outline:`${t.focusOutlineWidth} ${t.focusOutlineStyle} ${t.focusOutlineColor}`},...o[i]},buttonContent:{label:"colHeader__buttonContent",display:"flex",alignItems:"center"}}},Dae=t=>{const e=t.typography,n=t.colors,i=t.borders,r=t.spacing;return{...{fontSize:e==null?void 0:e.fontSizeMedium,fontFamily:e==null?void 0:e.fontFamily,color:n==null?void 0:n.textDarkest,background:n==null?void 0:n.backgroundLightest,borderColor:n==null?void 0:n.borderMedium,lineHeight:e==null?void 0:e.lineHeightCondensed,padding:`${r==null?void 0:r.xSmall} ${r==null?void 0:r.small}`,focusOutlineColor:n==null?void 0:n.borderBrand,focusOutlineWidth:i==null?void 0:i.widthMedium,focusOutlineStyle:i==null?void 0:i.style}}},Bae={id:f.string.isRequired,stackedSortByLabel:f.string,children:f.oneOfType([f.node,f.func]),width:f.oneOfType([f.string,f.number]),textAlign:f.oneOf(["start","center","end"]),sortDirection:f.oneOf(["none","ascending","descending"]),onRequestSort:f.func,scope:f.oneOf(["row","col","rowgroup","colgroup","auto"])},Qae=["id","stackedSortByLabel","children","width","textAlign","sortDirection","onRequestSort","scope"];var wI,kI,Sl,xI,_I;let _d=(wI=de(Mae,Dae),wI(kI=(Sl=class D8 extends T.Component{constructor(...e){super(...e),this.handleClick=n=>{const i=this.props,r=i.id,o=i.onRequestSort;o&&o(n,{id:r})}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}renderSortArrow(){const e=this.props,n=e.sortDirection,i=e.onRequestSort;if(n==="ascending")return xI||(xI=C(Fd,null));if(n==="descending")return _I||(_I=C(Qd,null));if(i)return C(Bd,{css:{opacity:"30%"}})}render(){const e=this.props,n=e.onRequestSort,i=e.width,r=e.children,o=e.sortDirection,s=e.scope,a=e.styles;return C("th",Object.assign({},Re(this.props,D8.allowedProps),{css:a==null?void 0:a.colHeader,style:{width:i},scope:s,"aria-sort":o}),n&&C("button",{onClick:this.handleClick,css:a==null?void 0:a.button},C("div",{css:a==null?void 0:a.buttonContent},ot(r),this.renderSortArrow())),!n&&r,!n&&this.renderSortArrow())}},Sl.displayName="ColHeader",Sl.componentId="Table.ColHeader",Sl.allowedProps=Qae,Sl.propTypes=Bae,Sl.defaultProps={textAlign:"start",sortDirection:"none",children:null,scope:"col"},Sl))||kI);const Fae=(t,e)=>{const n=e.textAlign;return{rowHeader:{label:"rowHeader",fontSize:t.fontSize,fontFamily:t.fontFamily,fontWeight:"bold",color:t.color,background:t.background,boxSizing:"border-box",verticalAlign:"middle",lineHeight:t.lineHeight,padding:t.padding,...n&&{textAlign:n}}}},zae=t=>{const e=t.colors,n=t.typography,i=t.spacing;return{...{fontSize:n==null?void 0:n.fontSizeMedium,fontFamily:n==null?void 0:n.fontFamily,fontWeight:n==null?void 0:n.fontWeightNormal,color:e==null?void 0:e.textDarkest,background:e==null?void 0:e.backgroundLightest,borderColor:e==null?void 0:e.borderMedium,lineHeight:n==null?void 0:n.lineHeightCondensed,padding:`${i==null?void 0:i.xSmall} ${i==null?void 0:i.small}`}}},Hae={children:f.oneOfType([f.node,f.func]),isStacked:f.bool,textAlign:f.oneOf(["start","center","end"])},Uae=["children","isStacked","textAlign"];var EI,CI,wl;let Yx=(EI=de(Fae,zae),EI(CI=(wl=class ow extends T.Component{componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){const e=this.props,n=e.children,i=e.isStacked,r=e.styles;return C(be,Object.assign({},be.omitViewProps(Re(this.props,ow.allowedProps),ow),{as:i?"div":"th",css:r==null?void 0:r.rowHeader,scope:"row",role:i?"rowheader":void 0}),ot(n))}},wl.displayName="RowHeader",wl.componentId="Table.RowHeader",wl.allowedProps=Uae,wl.propTypes=Hae,wl.defaultProps={textAlign:"start",children:null},wl))||CI);const Wae=(t,e)=>{const n=e.textAlign;return{cell:{label:"cell",fontSize:t.fontSize,fontFamily:t.fontFamily,fontWeight:t.fontWeight,color:t.color,background:t.background,boxSizing:"border-box",verticalAlign:"middle",lineHeight:t.lineHeight,padding:t.padding,...n&&{textAlign:n}}}},Vae=t=>{const e=t.colors,n=t.typography,i=t.spacing;return{...{fontSize:n==null?void 0:n.fontSizeMedium,fontFamily:n==null?void 0:n.fontFamily,fontWeight:n==null?void 0:n.fontWeightNormal,color:e==null?void 0:e.textDarkest,background:e==null?void 0:e.backgroundLightest,borderColor:e==null?void 0:e.borderMedium,lineHeight:n==null?void 0:n.lineHeightCondensed,padding:`${i==null?void 0:i.xSmall} ${i==null?void 0:i.small}`}}},jae={children:f.oneOfType([f.node,f.func]),isStacked:f.bool,header:f.oneOfType([f.node,f.func]),textAlign:f.oneOf(["start","center","end"])},Xae=["children","isStacked","header","textAlign"];var TI,PI,kl;let Gx=(TI=de(Wae,Vae),TI(PI=(kl=class sw extends T.Component{componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){const e=this.props,n=e.children,i=e.styles,r=e.isStacked,o=e.header;return C(be,Object.assign({},be.omitViewProps(Re(this.props,sw.allowedProps),sw),{as:r?"div":"td",css:i==null?void 0:i.cell,role:r?"cell":void 0}),o&&ot(o),o&&": ",ot(n))}},kl.displayName="Cell",kl.componentId="Table.Cell",kl.allowedProps=Xae,kl.propTypes=jae,kl.defaultProps={textAlign:"start",children:null},kl))||PI);const Zae={children:pt.oneOf([_d,Yx,Gx]),hover:f.bool,isStacked:f.bool,headers:f.arrayOf(f.oneOfType([f.node,f.func]))},qae=["children","hover","isStacked","headers"];var AI,RI,xl;let gu=(AI=de(Lae,Nae),AI(RI=(xl=class aw extends T.Component{componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){const e=this.props,n=e.children,i=e.styles,r=e.isStacked,o=e.headers;return C(be,Object.assign({},be.omitViewProps(Re(this.props,aw.allowedProps),aw),{as:r?"div":"tr",css:i==null?void 0:i.row,role:r?"row":void 0}),T.Children.toArray(n).filter(Boolean).map((s,a)=>Me(s,[_d])?s:Me(s,[Yx])?$t(s,{key:s.props.name,isStacked:r}):Me(s,[Gx])?$t(s,{key:s.props.name,isStacked:r,header:o&&o[a]}):null))}},xl.displayName="Row",xl.componentId="Table.Row",xl.allowedProps=qae,xl.propTypes=Zae,xl.defaultProps={children:null},xl))||RI);const Yae={children:pt.oneOf([gu]),isStacked:f.bool,renderSortLabel:f.oneOfType([f.node,f.func])},Gae=["children","isStacked","renderSortLabel"];var II,$I,_l,LI;let Yg=(II=de(Iae,$ae),II($I=(_l=class B8 extends T.Component{get isSortable(){const e=T.Children.toArray(this.props.children),n=Qr(e,1),i=n[0];let r=!1;return i&&T.Children.forEach(i.props.children,o=>{Me(o,[_d])&&o.props.onRequestSort&&(r=!0)}),r}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;this.isSortable&&typeof this.props.renderSortLabel>"u"&&Ne(!1,"[Table.Head] The `renderSortLabel` prop should be provided when Table is sortable."),(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}renderSelect(){const e=this.props,n=e.children,i=e.renderSortLabel,r=T.Children.toArray(n),o=Qr(r,1),s=o[0];if(!Me(s,[gu]))return null;const a=[],l={};let u,c=0;if(T.Children.forEach(s.props.children,h=>{if(c+=1,Me(h,[_d])){const p=h.props,m=p.id,O=p.stackedSortByLabel,y=p.sortDirection,b=p.onRequestSort,v=O||m;b&&(a.push({id:m,label:v}),l[m]=b,y!=="none"&&(u=m))}}),!a.length)return null;const d=(h,{value:p})=>{p&&typeof l[p]=="function"&&l[p](h,{id:`${p}`})};return C("div",{role:"rowgroup"},C("div",{role:"row"},C("div",{role:"cell","aria-colspan":c},C(LP,{renderLabel:i?ot(i):LI||(LI=C(Vi,null)),renderBeforeInput:u&&oa,value:u,onChange:d},a.map(({id:h,label:p})=>C(LP.Option,{id:h,key:h,value:h,renderBeforeLabel:h===u?oa:()=>C(oa,{style:{color:"transparent"}})},p))))))}render(){const e=this.props,n=e.children,i=e.isStacked,r=e.styles;return i?this.renderSelect():C("thead",Object.assign({},Re(this.props,B8.allowedProps),{css:r==null?void 0:r.head}),T.Children.map(n,o=>Me(o,[gu])?o:null))}},_l.displayName="Head",_l.componentId="Table.Head",_l.allowedProps=Gae,_l.propTypes=Yae,_l.defaultProps={children:null},_l))||$I);const Kae=t=>({body:{label:"body",fontSize:t.fontSize,fontFamily:t.fontFamily,fontWeight:t.fontWeight,color:t.color,background:t.background}}),Jae=t=>{const e=t.colors,n=t.typography;return{...{fontSize:n==null?void 0:n.fontSizeMedium,fontFamily:n==null?void 0:n.fontFamily,fontWeight:n==null?void 0:n.fontWeightNormal,color:e==null?void 0:e.textDarkest,background:e==null?void 0:e.backgroundLightest}}},ele={children:pt.oneOf([gu]),hover:f.bool,isStacked:f.bool,headers:f.arrayOf(f.oneOfType([f.node,f.func]))},tle=["children","hover","isStacked","headers"];var NI,MI,El;let lw=(NI=de(Kae,Jae),NI(MI=(El=class uw extends T.Component{componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){const e=this.props,n=e.children,i=e.hover,r=e.isStacked,o=e.headers,s=e.styles;return C(be,Object.assign({},be.omitViewProps(Re(this.props,uw.allowedProps),uw),{as:r?"div":"tbody",css:s==null?void 0:s.body,role:r?"rowgroup":void 0}),T.Children.map(n,a=>Me(a,[gu])?$t(a,{key:a.props.name,hover:i,isStacked:r,headers:o}):null))}},El.displayName="Body",El.componentId="Table.Body",El.allowedProps=tle,El.propTypes=ele,El.defaultProps={children:null},El))||MI);const nle={caption:f.node.isRequired,children:pt.oneOf([Yg,lw]),margin:ct.spacing,elementRef:f.func,hover:f.bool,layout:f.oneOf(["auto","fixed","stacked"])},ile=["caption","children","margin","elementRef","hover","layout"];var DI,BI,Ci;let Ln=(DI=de(Aae,Rae),DI(BI=(Ci=class cw extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}getHeaders(){const e=this.props.children,n=T.Children.toArray(e),i=Qr(n,1),r=i[0];if(Me(r,[Yg])){const o=T.Children.toArray(r.props.children),s=Qr(o,1),a=s[0];if(Me(a,[gu]))return T.Children.map(a.props.children,l=>Me(l,[_d])?l.props.children:void 0)}}render(){const e=this.props,n=e.margin,i=e.layout,r=e.caption,o=e.children,s=e.hover,a=e.styles,l=i==="stacked",u=l?this.getHeaders():void 0;return C(be,Object.assign({},be.omitViewProps(Re(this.props,cw.allowedProps),cw),{as:l?"div":"table",margin:n,elementRef:this.handleRef,css:a==null?void 0:a.table,role:l?"table":void 0,"aria-label":l?r:void 0}),!l&&C("caption",null,C(Vi,null,r)),T.Children.map(o,c=>Me(c,[Yg])?$t(c,{key:c.props.name,isStacked:l}):Me(c,[lw])?$t(c,{key:c.props.name,isStacked:l,hover:s,headers:u}):null))}},Ci.displayName="Table",Ci.componentId="Table",Ci.allowedProps=ile,Ci.propTypes=nle,Ci.defaultProps={children:null,hover:!1,layout:"auto"},Ci.Head=Yg,Ci.Body=lw,Ci.Row=gu,Ci.ColHeader=_d,Ci.RowHeader=Yx,Ci.Cell=Gx,Ci))||BI);const rle=cW` to { opacity: 1; - }`,ole=(t,e,n)=>{const i=e.fluidWidth,r=e.iconPosition,o=e.size,s=e.variant,a=n.animate,l=r==="end"&&(s==="filled"||i),u=i?{display:"block",width:"100%"}:{},c={start:{marginInlineEnd:t.iconMargin,marginInlineStart:0},end:{marginInlineStart:t.iconMargin,marginInlineEnd:0}},d={small:{fontSize:t.fontSizeSmall},medium:{fontSize:t.fontSizeMedium},large:{fontSize:t.fontSizeLarge}},h={small:{fontSize:t.smallIconSize},medium:{fontSize:t.mediumIconSize},large:{fontSize:t.largeIconSize}},p=r==="start"&&!i?{small:{paddingInlineStart:`calc(${t.smallIconSize} + ${t.togglePadding})`,paddingInlineEnd:"0"},medium:{paddingInlineStart:`calc(${t.mediumIconSize} + ${t.togglePadding})`,paddingInlineEnd:"0"},large:{paddingInlineStart:`calc(${t.largeIconSize} + ${t.togglePadding})`,paddingInlineEnd:"0"}}:{small:{},medium:{},large:{}};return{toggleDetails:{label:"toggleDetails",fontFamily:t.fontFamily,fontWeight:t.fontWeight,lineHeight:t.lineHeight},summary:{label:"toggleDetails__summary",position:"relative",display:"flex",alignItems:"center",boxSizing:"border-box",textAlign:"start"},summaryText:{label:"toggleDetails__summaryText",minWidth:"0.0625rem",flexGrow:1,...l?{flex:1}:{}},toggle:{label:"toggleDetails__toggle",fontFamily:t.fontFamily,appearance:"none",cursor:"pointer",userSelect:"none",touchAction:"manipulation",position:"relative",overflow:"visible",boxSizing:"border-box",padding:"0",margin:"0",outline:"none",border:"none",background:"transparent",color:t.textColor,"&::-moz-focus-inner":{padding:"0",margin:"0"},"&::before":{content:'""',position:"absolute",top:"-0.375rem",left:"-0.375rem",right:"-0.375rem",bottom:"-0.375rem",border:`${t.toggleBorderWidth} ${t.toggleBorderStyle} ${t.toggleFocusBorderColor}`,borderRadius:`calc(${t.toggleBorderRadius} * 1.5)`,opacity:0,pointerEvents:"none"},"&:focus":{"&::before":{opacity:1}},"&:focus, &:hover, &:active":{textDecoration:"none",color:t.textColor},textDecoration:"none",...u,...d[o]},icon:{label:"toggleDetails__icon","& > svg":{display:"block"},...c[r],...h[o]},details:{label:"toggleDetails__details",boxSizing:"border-box",paddingTop:t.togglePadding,color:t.textColor,...d[o],...p[o]},content:a?{label:"toggleDetails__content",opacity:.01,animationName:rle,animationFillMode:"forwards",animationDuration:".3s"}:{}}},sle=t=>{const e=t.colors,n=t.spacing,i=t.borders,r=t.typography,o=t.key,s={canvas:{toggleFocusBorderColor:t["ic-brand-primary"],iconColor:t["ic-brand-font-color-dark"],textColor:t["ic-brand-font-color-dark"]}};return{...{fontFamily:r==null?void 0:r.fontFamily,fontWeight:r==null?void 0:r.fontWeightNormal,lineHeight:r==null?void 0:r.lineHeight,textColor:e==null?void 0:e.textDarkest,fontSizeSmall:r==null?void 0:r.fontSizeSmall,fontSizeMedium:r==null?void 0:r.fontSizeMedium,fontSizeLarge:r==null?void 0:r.fontSizeLarge,smallIconSize:"0.5rem",mediumIconSize:"0.75rem",largeIconSize:"1rem",iconMargin:n==null?void 0:n.xxSmall,iconColor:e==null?void 0:e.textDarkest,togglePadding:n==null?void 0:n.xxSmall,toggleBorderRadius:i==null?void 0:i.radiusMedium,toggleBorderWidth:i==null?void 0:i.widthMedium,toggleBorderStyle:i==null?void 0:i.style,toggleFocusBorderColor:e==null?void 0:e.borderBrand,filledBackgroundColor:e==null?void 0:e.backgroundLight,filledBorderWidth:i==null?void 0:i.widthSmall,filledBorderStyle:i==null?void 0:i.style,filledBorderColor:e==null?void 0:e.borderMedium,filledBorderRadius:i==null?void 0:i.radiusMedium,filledPadding:n==null?void 0:n.small},...s[o]}},ale={variant:f.oneOf(["default","filled"]),summary:f.node.isRequired,expanded:yu(f.bool,"onToggle","defaultExpanded"),defaultExpanded:f.bool,onToggle:f.func,icon:f.func,iconExpanded:f.func,iconPosition:f.oneOf(["start","end"]),fluidWidth:f.bool,children:f.node,size:f.oneOf(["small","medium","large"])},lle=["variant","summary","expanded","defaultExpanded","onToggle","icon","iconExpanded","iconPosition","fluidWidth","children","size"];var QI,FI,og,_l;let Q8=(QI=de(ole,sle),FI=Le(),QI(og=FI(og=(_l=class F8 extends T.Component{constructor(...e){super(...e),this.ref=null,this._button=null,this.getButtonRef=n=>this._button=n,this.handleToggle=(n,i)=>{var r,o;typeof this.props.onToggle=="function"&&this.props.onToggle(n,i),(r=(o=this.props).makeStyles)===null||r===void 0||r.call(o,{animate:!0})}}get focused(){return xo(this._button)}focus(){var e;(e=this._button)===null||e===void 0||e.focus()}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,{animate:!1})}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,{animate:!0})}renderSummary(e){var n,i;const r=this.props,o=r.summary,s=r.iconPosition;return C("span",{css:(n=this.props.styles)===null||n===void 0?void 0:n.summary},s==="start"&&this.renderIcon(e),C("span",{css:(i=this.props.styles)===null||i===void 0?void 0:i.summaryText},o),s==="end"&&this.renderIcon(e))}renderToggle(e,n){const i=this.props.variant,r={...Re(this.props,F8.allowedProps),...e,children:this.renderSummary(n)},o=this.renderSummary(n);if(i==="filled")return C(Xk,Object.assign({},r,{display:"block",textAlign:"start",elementRef:this.getButtonRef}),o);if(r.href){var s;return C("a",Object.assign({},r,{css:(s=this.props.styles)===null||s===void 0?void 0:s.toggle,ref:this.getButtonRef}),o)}else{var a;return C("button",Object.assign({},r,{type:"button",css:(a=this.props.styles)===null||a===void 0?void 0:a.toggle,ref:this.getButtonRef}),o)}}renderIcon(e){var n;const i=e?this.props.iconExpanded:this.props.icon;return this.props.children&&i?C("span",{css:(n=this.props.styles)===null||n===void 0?void 0:n.icon},C(i,null)):null}renderDetails(e,n){var i;const r=this.props.children,o=e?{display:"block"}:{display:"none"};return C("div",Object.assign({},n,{css:[(i=this.props.styles)===null||i===void 0?void 0:i.details,o]}),r&&e&&this.renderContent())}renderContent(){var e;return C("div",{css:(e=this.props.styles)===null||e===void 0?void 0:e.content},this.props.children)}render(){return C(fP,Object.assign({},us(this.props,fP.allowedProps),{onToggle:this.handleToggle}),({expanded:e,getToggleProps:n,getDetailsProps:i})=>{var r;return C("div",{css:(r=this.props.styles)===null||r===void 0?void 0:r.toggleDetails,ref:o=>{this.ref=o}},this.renderToggle(n(),e),this.renderDetails(e,i()))})}},_l.displayName="ToggleDetails",_l.componentId="ToggleDetails",_l.allowedProps=lle,_l.propTypes=ale,_l.defaultProps={variant:"default",size:"medium",fluidWidth:!1,icon:wa,iconExpanded:Sa,iconPosition:"start",defaultExpanded:!1,children:null},_l))||og)||og);const Vr=T.createContext({layout:"desktop",inverseColor:!1}),ule=(t,e,n)=>{const i=e.status,r=e.variant,o=e.renderSubmenu,s=e.renderAvatar,a=e.customPopoverConfig,l=n.layout,u=n.inverseColor,c=l==="smallViewport",d=s?!1:i==="active"&&r==="default",h=o||a,p=`calc(${t.itemInlinePadding} - ${t.activeItemIndicatorSpacing})`;return{topNavBarItem:{label:"topNavBarItem",padding:`0 calc(${t.itemSpacing} / 2)`,height:"100%",display:"flex",justifyContent:"center",alignItems:h?"stretch":"center"},container:{label:"topNavBarItem__container",display:"flex",alignItems:"center",justifyContent:"center",position:"relative",...d&&{"&::after":{content:'""',position:"absolute",insetBlockEnd:0,insetInlineStart:p,insetInlineEnd:p,height:t.activeIndicatorWidth,background:u?t.activeIndicatorColorInverse:t.activeIndicatorColor,display:"block"}},"& a":{textDecoration:"none"}},content:{label:"topNavBarItem__content",fontSize:t.fontSize,fontFamily:t.fontFamily,fontWeight:t.fontWeight,appearance:"none",border:0,outline:0,margin:0,textDecoration:"none",whiteSpace:"nowrap",display:"flex",justifyContent:"center",alignItems:"center",color:u?t.colorInverse:t.color,...d&&{fontWeight:t.activeItemFontWeight},"*":{pointerEvents:"none"}},avatarContainer:{label:"topNavBarItem__avatarContainer",display:"flex",alignItems:"center",paddingInlineEnd:`calc(${t.iconTextGap} * 1.5)`},submenuTriggerContainer:{label:"topNavBarItem__submenuTriggerContainer",height:"100%",display:"flex",alignItems:"center"},submenuIcon:{label:"topNavBarItem__submenuIcon",fontSize:"0.875em",display:"flex",alignItems:"center",paddingInlineStart:t.iconTextGap},focusOutlineOffset:c?"0.375rem":"0.625rem",itemInlinePadding:t.itemInlinePadding}},cle=t=>{const e=t.colors,n=t.spacing,i=t.typography,r=t.borders;return{...{fontSize:i==null?void 0:i.fontSizeMedium,fontFamily:i==null?void 0:i.fontFamily,fontWeight:i==null?void 0:i.fontWeightNormal,color:"inherit",colorInverse:"inherit",itemInlinePadding:n==null?void 0:n.xSmall,itemSpacing:n==null?void 0:n.xSmall,iconTextGap:n==null?void 0:n.xSmall,activeItemFontWeight:i==null?void 0:i.fontWeightBold,activeItemIndicatorSpacing:"0.25rem",activeIndicatorWidth:r==null?void 0:r.widthMedium,activeIndicatorColor:e==null?void 0:e.textLightest,activeIndicatorColorInverse:e.textDarkest}}},Gx=f.oneOfType([f.string,f.shape({renderTip:f.oneOfType([f.node,f.func]).isRequired,color:f.oneOf(["primary","primary-inverse"]),placement:f.string,offsetX:f.oneOfType([f.string,f.number]),offsetY:f.oneOfType([f.string,f.number]),onShowContent:f.func,onHideContent:f.func})]),dle={id:f.string.isRequired,as:f.elementType,children:f.node.isRequired,variant:f.oneOf(["default","button","icon","avatar"]),status:f.oneOf(["default","active","disabled"]),renderSubmenu:ft.oneOf([Qn]),showSubmenuChevron:f.bool,customPopoverConfig:f.object,tooltip:Gx,renderAvatar:f.shape({avatarName:f.string.isRequired,avatarSrc:f.string,avatarAlt:f.string}),renderIcon:f.oneOfType([f.node,f.func]),href:f.string,onClick:f.func,onHiddenClick:f.func,onSubmenuToggle:f.func,onMouseOver:f.func,onMouseOut:f.func,onFocus:f.func,onBlur:f.func,onKeyDown:f.func,onKeyUp:f.func,elementRef:f.func,itemRef:f.func,shouldCloseOnClick:f.oneOf(["auto","always","never"])},zI=["id","as","children","variant","status","renderSubmenu","showSubmenuChevron","customPopoverConfig","tooltip","renderAvatar","renderIcon","href","onClick","onHiddenClick","onSubmenuToggle","onMouseOver","onMouseOut","onFocus","onBlur","onKeyDown","onKeyUp","elementRef","itemRef","shouldCloseOnClick"];var HI,UI,WI,uc,_s,VI,jI;const z8=1e4,XI=z8+1,hle=z8+2;let wo=(HI=zt(),UI=de(ule,cle),WI=Le(),HI(uc=UI(uc=WI(uc=(_s=class extends T.Component{constructor(e){super(e),this.ref=null,this._itemRef=null,this._tooltipContentId=void 0,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.handleItemRef=n=>{const i=this.props.itemRef;this._itemRef=n,typeof i=="function"&&i(n)},this.handleKeyDown=n=>{if(n.key==="ArrowDown"&&(this.shouldRenderSubmenu&&!this.state.isSubmenuOpen||this.shouldRenderPopover&&!this.state.isPopoverOpen)){var i;n.preventDefault(),(i=this._itemRef)===null||i===void 0||i.click()}n.key==="Tab"&&this.state.isPopoverOpen&&!this.isCustomPopoverControlled&&this.setState({isPopoverOpen:!1})},this.handleMenuToggle=(n,i)=>{this.setState({isSubmenuOpen:i.shown}),typeof this.props.onSubmenuToggle=="function"&&this.props.onSubmenuToggle(n,i)},this._tooltipContentId=e.deterministicId("TopNavBarItem-tooltip"),this.state={isSubmenuOpen:!1,isPopoverOpen:!1}}componentDidMount(){const e=this.props,n=e.makeStyles,i=e.customPopoverConfig;n==null||n(this.makeStylesVariables),i&&this.isCustomPopoverControlled&&this.setState({isPopoverOpen:!!i.isShowingContent})}componentDidUpdate(){const e=this.props,n=e.makeStyles,i=e.customPopoverConfig;n==null||n(this.makeStylesVariables),i&&this.isCustomPopoverControlled&&i.isShowingContent!==this.state.isPopoverOpen&&this.setState({isPopoverOpen:!!i.isShowingContent})}get makeStylesVariables(){const e=this.context,n=e.layout,i=e.inverseColor;return{layout:n,inverseColor:i}}get shouldRenderSubmenu(){const e=this.props.renderSubmenu;return!!e&&Me(e,[Qn])}get shouldRenderPopover(){const e=this.props,n=e.id,i=e.renderSubmenu,r=e.customPopoverConfig;return r?r.children?r&&i?(Ne(!1,`TopNavBar.Items are not allowed to have both the "renderSubmenu" and "customPopoverConfig" props. For submenus, pass a Drilldown component via the "renderSubmenu" prop, and only use "customPopoverConfig" for custom features. Item with id: "${n}" will ignore the "customPopoverConfig" prop.`),!1):!0:(Ne(!1,`Pass the content of the custom Popover as "customPopoverConfig.children" for the item with id: "${n}".`),!1):!1}get isCustomPopoverControlled(){const e=this.props.customPopoverConfig;return e&&typeof e.isShowingContent<"u"}get hasOpenPopover(){return this.state.isSubmenuOpen||this.state.isPopoverOpen}get isDefaultVariant(){return this.props.variant==="default"||this.props.variant==="forceIconWithLabel"}get isButtonVariant(){return this.props.variant==="button"}get isIconVariant(){return this.props.variant==="icon"}get isAvatarOnlyVariant(){return this.props.variant==="avatar"}get hasAvatar(){const e=this.props,n=e.id,i=e.renderIcon,r=e.renderAvatar,o=e.variant,s=!!r;return this.isAvatarOnlyVariant&&!s?(Ne(!1,`The "renderAvatar" config is required for the 'variant="avatar"' type components, but received none for the item with id "${n}".`),!1):s&&(i||o==="icon")?(Ne(!1,` components with icons cannot display avatars, so the "renderAvatar" config prop will be ignored for item with id "${n}".`),!1):s}get submenuIcon(){var e;return!(this.shouldRenderSubmenu||this.shouldRenderPopover)||!this.props.showSubmenuChevron?null:C("span",{css:(e=this.props.styles)===null||e===void 0?void 0:e.submenuIcon},this.shouldRenderSubmenu&&this.state.isSubmenuOpen||this.shouldRenderPopover&&this.state.isPopoverOpen?VI||(VI=C(_u,null)):jI||(jI=C(Sa,null)))}get buttonThemeOverride(){const e=this.props.styles,n={};return(this.isDefaultVariant||this.hasAvatar)&&(n.mediumPaddingHorizontal=e==null?void 0:e.itemInlinePadding),this.hasAvatar&&(n.mediumPaddingTop="0.125rem",n.mediumPaddingBottom="0.125rem"),this.isAvatarOnlyVariant&&!this.submenuIcon&&(n.mediumPaddingHorizontal="0",n.mediumPaddingTop="0",n.mediumPaddingBottom="0"),Object.keys(n).length>0?n:void 0}get colorProps(){let e="primary-inverse",n="inverse";return this.context.inverseColor&&(e="secondary",n="info",this.isButtonVariant&&(e="primary")),{color:e,focusColor:n}}get ariaProps(){let e,n;return this.shouldRenderSubmenu&&(e="menu",n=this.state.isSubmenuOpen),this.shouldRenderPopover&&(e="true",n=this.state.isPopoverOpen),{"aria-haspopup":e,"aria-expanded":n}}get itemProps(){const e=this.props,n=e.id,i=e.as,r=e.variant,o=e.href,s=e.onClick,a=e.onMouseOver,l=e.onMouseOut,u=e.onFocus,c=e.onBlur,d=e.onKeyDown,h=e.onKeyUp,p=e.renderSubmenu,m=e.status,O=e.renderAvatar,y=e.renderIcon;let b=o,v=s,S=m;if(p&&(b&&(Ne(!1,`TopNavBar.Items with submenus are not allowed to have 'href' property, but received href "${b}" for item with the id: "${n}".`),b=void 0),v&&(Ne(!1,`TopNavBar.Items with submenus are not allowed to have 'onClick' property, but received onClick for item with the id: "${n}".Use the \`onSubmenuToggle\` prop instead. OnClick: ${v}`),v=void 0)),S==="active"&&!this.isDefaultVariant&&(Ne(!1,`Only \`variant="default"\` components can be set to active, but item with id "${n}" has variant: "${r}".`),S="default"),this.hasAvatar){if(!(O!=null&&O.avatarName))return Ye(!1,`The "avatarName" prop is required for for components with avatar, but the item with id "${n}" is missing it.`),null;S==="active"&&(Ne(!1,` components with avatar cannot have "active" status, so the "active" status on the item with id "${n}" will be ignored.`),S="default")}return this.isIconVariant&&!y?(Ye(!1,`The "renderIcon" prop is required for the \`variant="icon"\` type components, but the item with id "${n}" is missing it.`),null):{id:n,as:i,...this.colorProps,...this.ariaProps,size:"medium",withBorder:this.isButtonVariant,withBackground:this.isButtonVariant,interaction:S==="disabled"?"disabled":void 0,"aria-disabled":S==="disabled"?"true":void 0,shape:this.isAvatarOnlyVariant&&!this.submenuIcon?"circle":"rectangle",href:b,onClick:v,onMouseOver:a,onMouseOut:l,onFocus:u,onBlur:c,onKeyDown:lt(d,this.handleKeyDown),onKeyUp:h,renderIcon:y,themeOverride:this.buttonThemeOverride,elementRef:k=>{this.handleItemRef(k)}}}renderContent(){var e;const n=this.props,i=n.children,r=n.styles,o=this.itemProps;if(!o)return null;let s=i;this.isAvatarOnlyVariant?s=this.renderAvatar():this.isIconVariant&&(s=C(ji,null,s));const a=C(ib,Object.assign({},o,It(Re(this.props,zI))),this.isIconVariant&&!this.submenuIcon?s:C("div",{css:r==null?void 0:r.content},this.hasAvatar&&!this.isAvatarOnlyVariant&&C("span",{css:(e=this.props.styles)===null||e===void 0?void 0:e.avatarContainer},this.renderAvatar()),s,this.submenuIcon));return C("div",{css:r==null?void 0:r.container},this.props.tooltip?this.wrapButtonInTooltip(a,i):a)}wrapButtonInTooltip(e,n){const i=this.props,r=i.tooltip,o=i.styles;if(!r)return e;let s={placement:"bottom",color:this.context.inverseColor?"primary":"primary-inverse"};typeof r=="string"?s.renderTip=r:s={...s,...r};const a=rt(s.renderTip);if(!a)return e;const l=a===n;return C(Zl,{theme:{componentOverrides:{View:{stackingTopmost:hle}}}},C(CM,Object.assign({},s,{renderTip:l?a:C("div",{id:this._tooltipContentId},a),positionContainerDisplay:"block"}),C("div",{css:o==null?void 0:o.submenuTriggerContainer},l?e:$t(e,{"aria-describedby":this._tooltipContentId}))))}renderAvatar(){if(!this.hasAvatar)return null;const e=this.props,n=e.id,i=e.children,o=e.renderAvatar,s=o.avatarName,a=o.avatarSrc,u=o.avatarAlt||(typeof i=="string"?i:void 0);return u||Ne(!1,`Please supply a label for the avatar with either the "renderAvatar.avatarAlt" or the "children" (as string) prop. It is needed for screen reader support, but missing on the item with the id: "${n}".`),s?C(Zk,{name:s,src:a,alt:u,size:"small"}):null}renderDropdownMenu(){var e,n,i;const r=this.props,o=r.id,s=r.renderSubmenu,a=r.status,l=r.styles;return!s||!this.shouldRenderSubmenu?null:(typeof s.props.show<"u"&&Ne(!1,`TopNavBar.Item Drilldown submenus are controlled by the component. The "show" prop will be ignored on the submenu of the item with id: "${o}".`),s.props.trigger&&Ne(!1,`TopNavBar.Item submenus have the item itself as their trigger. The "trigger" prop will be ignored on the Drilldown submenu of item with id: "${o}".`),$t(s,{trigger:C("div",{css:l==null?void 0:l.submenuTriggerContainer},this.renderContent()),show:this.state.isSubmenuOpen,onToggle:lt((e=s.props)===null||e===void 0?void 0:e.onToggle,this.handleMenuToggle),positionContainerDisplay:"block",placement:"bottom start",withArrow:!1,minWidth:((n=s.props)===null||n===void 0?void 0:n.minWidth)||"18.5rem",maxHeight:((i=s.props)===null||i===void 0?void 0:i.maxHeight)||"calc(100vh - 10rem)",...a==="disabled"&&{disabled:!0,show:!1,onToggle:void 0}}))}renderPopover(){const e=this.props,n=e.id,i=e.customPopoverConfig,r=e.styles;if(!i||!this.shouldRenderPopover)return null;i.renderTrigger&&Ne(!1,`TopNavBar.Item popovers have the item itself as their trigger. The "renderTrigger" prop will be ignored on the popover of item with id: "${n}".`);const o={placement:"bottom start",withArrow:!0,shouldReturnFocus:!0,shouldContainFocus:!1,...i,positionContainerDisplay:"block",renderTrigger:C("div",{css:r==null?void 0:r.submenuTriggerContainer},this.renderContent()),onShowContent:lt(i.onShowContent,()=>{this.isCustomPopoverControlled||this.setState({isPopoverOpen:!0})}),onHideContent:lt(i.onHideContent,()=>{this.isCustomPopoverControlled||this.setState({isPopoverOpen:!1})}),isShowingContent:this.state.isPopoverOpen,"aria-expanded":void 0};return C(rb,o,i.children)}render(){const e=this.props.styles;let n;return this.shouldRenderPopover?n=C(Zl,{theme:{componentOverrides:{View:{stackingTopmost:XI}}}},this.renderPopover()):this.shouldRenderSubmenu?n=C(Zl,{theme:{componentOverrides:{View:{stackingTopmost:XI}}}},this.renderDropdownMenu()):n=this.renderContent(),C("div",{ref:this.handleRef,css:e==null?void 0:e.topNavBarItem},n)}},_s.displayName="TopNavBarItem",_s.componentId="TopNavBar.Item",_s.propTypes=dle,_s.allowedProps=zI,_s.defaultProps={status:"default",variant:"default",showSubmenuChevron:!0,shouldCloseOnClick:"auto"},_s.contextType=Vr,_s))||uc)||uc)||uc);const cO=(t,e={})=>{const n=[],i=e.currentPageId,r=e.renderOptionContent,o=iM();return T.Children.forEach(t,s=>{if(!s||!Me(s,[wo]))return;const a=s.props,l=a.renderSubmenu,u=a.customPopoverConfig,c=a.id,d=a.children,h=a.status,p=a.variant,m=a.href,O=a.onClick,y=a.shouldCloseOnClick;let b=l,v=u,S,k;const x=[];b&&(Me(b,[Qn])||(Ne(!1,`The "renderSubmenu" prop accepts only Drilldown components, but the item with id "${c}" received: "${l}".`),b=void 0),b&&(k=b.props.rootPageId,x.push(...T.Children.toArray(b.props.children)))),v&&(v.children||(Ne(!1,`Pass the content of the custom Popover as "customPopoverConfig.children" for the item with id: "${c}".`),v=void 0),b&&(Ne(!1,`TopNavBar.Items are not allowed to have both the "renderSubmenu" and "customPopoverConfig" props. For submenus, pass a Drilldown component via the "renderSubmenu" prop, and only use "customPopoverConfig" for custom features. Item with id: "${c}" will ignore the "customPopoverConfig" prop.`),v=void 0),v&&(S=Z5("TopNavBarItem__customPopoverOption",o),k=S,x.push(z.createElement(Qn.Page,{id:S,key:S},z.createElement(Qn.Option,{id:`${S}__option`},v.children)))));let _=s.props["aria-current"]||(c===i?"page":void 0);_&&(p!=="default"&&(Ne(!1,`Only \`variant="default"\` items can be set to current/active, but the item with id "${c}" is "${p}" variant.`),_=void 0),h==="disabled"&&(Ne(!1,`Disabled items can not be set to current/active, but the item with id "${c}" is disabled.`),_=void 0)),n.push({item:s,submenuPages:x,optionData:{id:c,disabled:h==="disabled",href:m,onOptionClick:w=>{O==null||O(w)},children:typeof r=="function"?r(d,{...s.props,status:_==="page"?"active":s.props.status}):d,subPageId:k,"aria-current":_,shouldCloseOnClick:y}})}),n},Kx=t=>t.map(n=>n.submenuPages).filter(n=>!!n).flat(),dO=t=>t.map(e=>{const n=e.optionData,r=e.item.props.onHiddenClick;return r&&(n.onOptionClick=r),z.createElement(Qn.Option,Object.assign({},n,{key:n.id,afterLabelContentVAlign:"center"}),n.children)}),fle=(t,e,n)=>{const i={display:"inline-block",padding:`0 ${t.smallViewportDropdownMenuActiveOptionIndicatorSpacing}`};return{topNavBarActionItems:{label:"topNavBarActionItems",boxSizing:"border-box",listStyleType:"none",margin:"0",padding:"0",flex:"0 0",display:"flex",flexDirection:"row",alignItems:"stretch",justifyContent:"flex-end",...n.layout==="smallViewport"&&{flex:"1 1",marginInlineStart:t.smallViewportActionItemContainerMargin,maxWidth:t.smallViewportActionItemContainerMaxWidth}},listItem:{label:"topNavBarActionItems__listItem",flex:"0 0"},dropdownMenuOption:{label:"topNavBarActionItems__dropdownMenuOption",...i},dropdownMenuOptionActive:{label:"topNavBarActionItems__dropdownMenuOptionActive",...i,fontWeight:t.smallViewportDropdownMenuActiveOptionFontWeight,paddingBlockEnd:t.smallViewportDropdownMenuActiveOptionIndicatorSpacing,borderBottom:`${t.smallViewportDropdownMenuActiveOptionIndicatorWidth} solid ${t.smallViewportDropdownMenuActiveOptionIndicatorColor}`}}},ple=t=>{const e=t.typography,n=t.spacing,i=t.borders;return{...{smallViewportActionItemContainerMargin:n==null?void 0:n.xxLarge,smallViewportActionItemContainerMaxWidth:"50%",smallViewportDropdownMenuActiveOptionFontWeight:e==null?void 0:e.fontWeightBold,smallViewportDropdownMenuActiveOptionIndicatorSpacing:"0.25rem",smallViewportDropdownMenuActiveOptionIndicatorWidth:i==null?void 0:i.widthMedium,smallViewportDropdownMenuActiveOptionIndicatorColor:"currentColor"}}},mle={children:ft.oneOf([wo]),listLabel:f.string,renderHiddenItemsMenuTriggerLabel:f.oneOfType([f.string,f.func]).isRequired,renderHiddenItemsMenuTriggerTooltip:f.oneOfType([Gx,f.func]),elementRef:f.func},s1=["children","listLabel","renderHiddenItemsMenuTriggerLabel","renderHiddenItemsMenuTriggerTooltip","elementRef"];var ZI,qI,YI,cc,Es;let H8=(ZI=zt(),qI=de(fle,ple),YI=Le(),ZI(cc=qI(cc=YI(cc=(Es=class extends T.Component{constructor(e){super(e),this.ref=null,this._hiddenActionItemsMenuId=void 0,this._hiddenActionItemsMenuTriggerId=void 0,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.renderOptionContent=(n,i)=>{const r=this.props.styles,o=i.status;return C("span",{css:o==="active"?r==null?void 0:r.dropdownMenuOptionActive:r==null?void 0:r.dropdownMenuOption},n)},this._hiddenActionItemsMenuId=e.deterministicId("TopNavBarActionItems-hiddenActionItemsMenu"),this._hiddenActionItemsMenuTriggerId=e.deterministicId("TopNavBarActionItems-hiddenActionItemsMenuTrigger"),this.state={key:0,visibleActionItemsCount:void 0}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.makeStylesVariables)}componentDidUpdate(e){var n,i;(n=(i=this.props).makeStyles)===null||n===void 0||n.call(i,this.makeStylesVariables),this.context.layout==="smallViewport"&&z.Children.count(e.children)!==z.Children.count(this.props.children)&&this.setState({key:this.state.key+1})}get makeStylesVariables(){return{layout:this.context.layout}}get childrenArray(){return z.Children.toArray(this.props.children).map(n=>{if(!(n!=null&&n.props))return null;const i=n.props,r=i.id,o=i.renderAvatar,s=i.renderIcon,a=i.variant;return o?(Ne(!1,`Items in are not allowed to have avatars, please remove it from item with the id "${r}".`),$t(n,{renderAvatar:void 0,variant:"default"})):this.context.layout==="smallViewport"&&a!=="icon"?s?$t(n,{variant:a==="forceIconWithLabel"?"default":"icon"}):(Ye(!1,`Items in are required to have the \`renderIcon\` prop, because only the icons are displayed due to the lack of space. Please add an icon to the item with the id "${r}".`),null):n})}renderHiddenActionItemsMenu(e){const n=this.props,i=n.renderHiddenItemsMenuTriggerLabel,r=n.renderHiddenItemsMenuTriggerTooltip,o=cO(e,{renderOptionContent:this.renderOptionContent}),s=Kx(o),a=dO(o),l=typeof i=="function"?i(e.length):i,u=typeof r=="function"?r(e.length):r;return C(wo,{id:this._hiddenActionItemsMenuTriggerId,renderIcon:Fd,variant:"icon",tooltip:u,showSubmenuChevron:!1,renderSubmenu:C(Qn,{rootPageId:this._hiddenActionItemsMenuId},[C(Qn.Page,{id:this._hiddenActionItemsMenuId,key:this._hiddenActionItemsMenuId},a),...s])},l)}renderTruncatedActionItemList(){const e=this.props,n=e.listLabel,i=e.styles;return C(KM,Object.assign({},It(Re(this.props,s1)),{key:this.state.key,elementRef:this.handleRef,css:i==null?void 0:i.topNavBarActionItems,visibleItemsCount:this.state.visibleActionItemsCount,onUpdate:({visibleItemsCount:r})=>{this.setState({visibleActionItemsCount:r})},renderHiddenItemMenu:r=>this.renderHiddenActionItemsMenu(r),"aria-label":n}),this.childrenArray)}render(){const e=this.props,n=e.listLabel,i=e.styles;return this.childrenArray.length?this.context.layout==="smallViewport"?this.renderTruncatedActionItemList():C("ul",Object.assign({},Re(this.props,s1),{ref:this.handleRef,css:i==null?void 0:i.topNavBarActionItems,"aria-label":n}),this.childrenArray.map(r=>C("li",{css:i==null?void 0:i.listItem,key:r.props.id},r))):null}},Es.displayName="TopNavBarActionItems",Es.componentId="TopNavBar.ActionItems",Es.propTypes=mle,Es.allowedProps=s1,Es.defaultProps={},Es.contextType=Vr,Es))||cc)||cc)||cc);const gle=(t,e,n)=>{const i=e.iconBackground,r=n.layout==="desktop";return{topNavBarBrand:{label:"topNavBarBrand",display:"flex",alignItems:"stretch"},container:{label:"topNavBarBrand__container",display:"flex",justifyContent:"flex-start",alignItems:"stretch",border:0,outline:0,padding:0,margin:0,appearance:"none",textDecoration:"none"},name:{label:"topNavBarBrand__name",display:"flex",alignItems:"center",height:t.logoHeight},iconContainer:{label:"topNavBarBrand__iconContainer",display:"flex",justifyContent:"center",alignItems:"center",pointerEvents:"none",padding:t.iconPadding,background:r?i:void 0},icon:{label:"topNavBarBrand__icon",display:"flex",justifyContent:"center",alignItems:"center"},focusOutlineInset:t.focusOutlineInset}},Ole=t=>{const e=t.spacing;return{...{logoHeight:"2.25rem",logoPadding:e.small,iconPadding:e.small,focusOutlineInset:"-0.25rem"}}},ble={screenReaderLabel:f.string.isRequired,renderIcon:f.node,iconBackground:f.string,href:f.string,onClick:f.func,as:f.elementType,elementRef:f.func},GI=["screenReaderLabel","renderIcon","iconBackground","href","onClick","as","elementRef"];var KI,JI,sg,Cs;let U8=(KI=de(gle,Ole),JI=Le(),KI(sg=JI(sg=(Cs=class W8 extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){var e,n;"renderName"in this.props,"nameBackground"in this.props,(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.makeStylesVariables)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.makeStylesVariables)}get makeStylesVariables(){return{layout:this.context.layout}}render(){const e=this.props,n=e.screenReaderLabel,i=e.renderIcon,r=e.href,o=e.onClick,s=e.styles,a=oi(W8,this.props);return C("div",{ref:this.handleRef,css:s==null?void 0:s.topNavBarBrand},i&&C(ye,Object.assign({},Re(this.props,GI),{css:s==null?void 0:s.container,as:a,href:r,onClick:o,position:"relative",focusColor:this.context.inverseColor?"info":"inverse",focusPosition:"inset",borderRadius:"medium",themeOverride:{focusOutlineInset:s==null?void 0:s.focusOutlineInset}}),C(ji,null,n),i&&this.context.layout!=="smallViewport"&&C("div",{css:s==null?void 0:s.iconContainer,role:"presentation","aria-hidden":"true"},i)))}},Cs.displayName="TopNavBarBrand",Cs.componentId="TopNavBar.Brand",Cs.propTypes=ble,Cs.allowedProps=GI,Cs.defaultProps={},Cs.contextType=Vr,Cs))||sg)||sg);const V8=t=>{const e=t.colors,n=t.stacking,i=t.typography,r=t.spacing,o=t.borders;return{...{desktopFontSize:i==null?void 0:i.fontSizeMedium,desktopFontFamily:i==null?void 0:i.fontFamily,desktopFontWeight:i==null?void 0:i.fontWeightNormal,desktopBackground:e==null?void 0:e.backgroundBrandSecondary,desktopBackgroundInverse:e==null?void 0:e.backgroundLight,desktopBottomBorder:"none",desktopBottomBorderInverse:`${o==null?void 0:o.widthSmall} ${o==null?void 0:o.style} ${e==null?void 0:e.borderMedium}`,desktopHeight:"4rem",desktopZIndex:(n==null?void 0:n.topmost)+1,desktopInlinePadding:r.small,desktopBrandContainerInlineMargin:`0 ${r.medium}`,desktopMenuItemsContainerInlineMargin:`0 ${r.large}`,desktopActionItemsContainerInlineMargin:`${r.xSmall} 0`,desktopUserContainerInlineMargin:`${r.xSmall} 0`,desktopUserSeparatorGap:r==null?void 0:r.xSmall,desktopUserSeparatorHeight:"1.5rem",desktopUserSeparatorWidth:o==null?void 0:o.widthSmall,desktopUserSeparatorColor:e.borderMedium,desktopUserSeparatorColorInverse:e.borderMedium}}},j8=t=>{const e=t.colors,n=t.stacking,i=t.typography,r=t.spacing,o=t.borders;return{...{smallViewportFontSize:i==null?void 0:i.fontSizeMedium,smallViewportFontFamily:i==null?void 0:i.fontFamily,smallViewportFontWeight:i==null?void 0:i.fontWeightNormal,smallViewportBackground:e==null?void 0:e.backgroundBrandSecondary,smallViewportBackgroundInverse:e==null?void 0:e.backgroundLight,smallViewportBottomBorder:"none",smallViewportBottomBorderInverse:`${o==null?void 0:o.widthSmall} ${o==null?void 0:o.style} ${e==null?void 0:e.borderMedium}`,smallViewportHeight:"3.5rem",smallViewportInlinePadding:"0.25rem",smallViewportZIndex:(n==null?void 0:n.topmost)+1,smallViewportTrayPosition:"fixed",smallViewportTrayFixTopPosition:void 0,smallViewportTrayZIndex:(n==null?void 0:n.topmost)+1,smallViewportDropdownMenuActiveOptionFontWeight:i==null?void 0:i.fontWeightBold,smallViewportDropdownMenuActiveOptionIndicatorSpacing:"0.25rem",smallViewportDropdownMenuActiveOptionIndicatorWidth:o==null?void 0:o.widthMedium,smallViewportDropdownMenuActiveOptionIndicatorColor:"currentColor",smallViewportAlternativeTitleInlineMargin:r==null?void 0:r.xxSmall,smallViewportAlternativeTitleBlockMargin:"0"}}},yle=t=>({...{...V8(t),...j8(t)}}),vle=(t,e)=>{const n=e.border,i=e.shadow,r=e.size,o=e.placement,s={borderWidth:0,borderColor:t.borderColor,borderStyle:t.borderStyle},a=i?{boxShadow:t.boxShadow}:{},l=o==="start"||o==="end"||o==="center"?{label:"tray__content",minHeight:"100vh"}:{},u={top:{insetInlineStart:0,insetInlineEnd:0,top:0},bottom:{insetInlineStart:0,insetInlineEnd:0,bottom:0},start:{top:0,bottom:0,insetInlineStart:0,insetInlineEnd:"auto"},end:{top:0,bottom:0,insetInlineEnd:0,insetInlineStart:"auto"},center:{left:0,right:0,top:0,bottom:0}},c=n?{start:{borderInlineEndWidth:t.borderWidth},end:{borderInlineStartWidth:t.borderWidth},top:{borderBottomWidth:t.borderWidth},bottom:{borderTopWidth:t.borderWidth},center:{}}:{},d={"x-small":t.xSmallWidth,small:t.smallWidth,regular:t.regularWidth,medium:t.mediumWidth,large:t.largeWidth},h=o==="start"||o==="end"?{width:d[r]}:{};return{tray:{label:"tray",backgroundColor:t.background,position:t.position,overflowY:"auto",overflowX:"hidden",boxSizing:"border-box",zIndex:t.zIndex,maxWidth:"100vw",maxHeight:"100vh",...a,...u[o],...n&&s,...n&&c[o],...h},content:{label:"tray__content",...l}}},Sle=t=>{const e=t.colors,n=t.borders,i=t.shadows,r=t.breakpoints,o=t.stacking;return{...{background:e==null?void 0:e.backgroundLightest,borderColor:e==null?void 0:e.borderMedium,borderWidth:n==null?void 0:n.widthSmall,borderStyle:n==null?void 0:n.style,boxShadow:i==null?void 0:i.depth3,xSmallWidth:r==null?void 0:r.xSmall,smallWidth:"20em",regularWidth:r==null?void 0:r.small,mediumWidth:r==null?void 0:r.medium,largeWidth:r==null?void 0:r.large,zIndex:o==null?void 0:o.topmost,position:"fixed"}}},wle={label:f.string.isRequired,children:f.node,size:f.oneOf(["x-small","small","regular","medium","large"]),placement:f.oneOf(["top","bottom","start","end","center"]),open:f.bool,defaultFocusElement:f.oneOfType([f.element,f.func]),contentRef:f.func,shouldContainFocus:f.bool,shouldReturnFocus:f.bool,shouldCloseOnDocumentClick:f.bool,onOpen:f.func,onClose:f.func,onDismiss:f.func,mountNode:f.oneOfType([wi,f.func]),insertAt:f.oneOf(["bottom","top"]),liveRegion:f.oneOfType([wi,f.arrayOf(wi),f.func]),onTransition:f.func,onEnter:f.func,onEntering:f.func,onEntered:f.func,onExit:f.func,onExiting:f.func,onExited:f.func,transitionOnMount:f.bool,transitionEnter:f.bool,transitionExit:f.bool,border:f.bool,shadow:f.bool},kle=["label","children","size","placement","open","defaultFocusElement","contentRef","shouldContainFocus","shouldReturnFocus","shouldCloseOnDocumentClick","onOpen","onClose","onDismiss","mountNode","insertAt","liveRegion","onTransition","onEnter","onEntering","onEntered","onExit","onExiting","onExited","transitionOnMount","transitionEnter","transitionExit","border","shadow"],xle=["label","children","size","placement","open","defaultFocusElement","contentRef","shouldContainFocus","shouldReturnFocus","shouldCloseOnDocumentClick","onOpen","onClose","onDismiss","mountNode","insertAt","liveRegion","onEnter","onEntering","onEntered","onExit","onExiting","onExited","onTransition","transitionOnMount","transitionEnter","transitionExit","border","shadow","role"];var e3,t3,n3,dc,El;let _le=(e3=de(vle,Sle),t3=Mr(),n3=Le(),e3(dc=t3(dc=n3(dc=(El=class X8 extends T.Component{constructor(e){var n;super(e),this.ref=null,this.dialogRef=null,this.state=void 0,this.handleTransitionComplete=i=>{this.setState({transitioning:!1})},this.handlePortalOpen=i=>{i&&(this.DOMNode=i)},this.state={transitioning:!1,open:(n=e.open)!==null&&n!==void 0?n:!1}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(e,n){var i,r;if(this.props.open!==e.open){if(!this.props.open){var o;(o=this.dialogRef)===null||o===void 0||o.close()}this.setState({transitioning:!0,open:this.props.open})}(i=(r=this.props).makeStyles)===null||i===void 0||i.call(r)}get placement(){const e=this.props,n=e.placement;return e.dir===Mr.DIRECTION.rtl?Nv(n," "):n}get direction(){switch(this.placement){case"top":return"up";case"bottom":return"down";case"end":return"right";default:return"left"}}get transition(){return`slide-${this.direction}`}get DOMNode(){return this.ref}set DOMNode(e){this.ref=e||null}render(){var e,n;const i=this.props,r=i.label,o=i.children;i.size,i.placement;const s=i.open,a=i.defaultFocusElement,l=i.contentRef,u=i.shouldContainFocus,c=i.shouldReturnFocus,d=i.shouldCloseOnDocumentClick,h=i.onOpen,p=i.onClose,m=i.onDismiss,O=i.mountNode,y=i.insertAt,b=i.liveRegion,v=i.onEnter,S=i.onEntering,k=i.onEntered,x=i.onExit,_=i.onExiting,w=i.onExited,D=i.onTransition,W=i.transitionOnMount,I=i.transitionEnter,V=i.transitionExit;i.border,i.shadow;const B=i.role,H=Ie(i,xle),K=this.state.open||this.state.transitioning;return C(pM,{open:K,onOpen:this.handlePortalOpen,insertAt:y,mountNode:O},C(PM,{in:s,type:this.transition,onTransition:D,onEnter:v,onEntering:S,onEntered:lt(this.handleTransitionComplete,k,h),onExit:x,onExiting:_,onExited:lt(this.handleTransitionComplete,w,p),transitionOnMount:W,transitionEnter:I,transitionExit:V},C("span",Object.assign({},Re(H,X8.allowedProps),{css:(e=this.props.styles)===null||e===void 0?void 0:e.tray,ref:l}),C(zr,{ref:oe=>this.dialogRef=oe,as:"div",label:r,defaultFocusElement:a,open:!0,shouldContainFocus:u,shouldReturnFocus:c,shouldCloseOnDocumentClick:d,shouldCloseOnEscape:!0,liveRegion:b,onDismiss:m,role:B},C("div",{css:(n=this.props.styles)===null||n===void 0?void 0:n.content},o)))))}},El.displayName="Tray",El.componentId="Tray",El.allowedProps=kle,El.propTypes=wle,El.defaultProps={defaultFocusElement:null,open:!1,insertAt:"bottom",shouldCloseOnDocumentClick:!1,shouldContainFocus:!0,shouldReturnFocus:!0,size:"small",placement:"start",transitionOnMount:!0,transitionEnter:!0,transitionExit:!0,shadow:!0,border:!1},El))||dc)||dc)||dc);const Ele=(t,e,n)=>{const i=n.isDropdownMenuVisible,r=n.drilldownId,o=n.trayId,s=n.menuBottomPosition,a=n.inverseColor,l=t.smallViewportTrayFixTopPosition||`${s}px`,u={display:"inline-block",padding:`0 ${t.smallViewportDropdownMenuActiveOptionIndicatorSpacing}`},c={fontSize:t.smallViewportFontSize,fontFamily:t.smallViewportFontFamily,fontWeight:t.smallViewportFontWeight,background:a?t.smallViewportBackgroundInverse:t.smallViewportBackground,borderBlockEnd:a?t.smallViewportBottomBorderInverse:t.smallViewportBottomBorder,height:t.smallViewportHeight,maxWidth:"100%",paddingBlock:0,paddingInline:t.smallViewportInlinePadding,position:"relative",zIndex:t.smallViewportZIndex,display:"flex",justifyContent:"space-between",alignItems:"stretch",overflow:"hidden"};return{topNavBarSmallViewportLayout:{label:"topNavBarSmallViewportLayout"},navbar:{label:"topNavBarSmallViewportLayout__navbar",...c},inPlaceDialogContainer:{label:"topNavBarSmallViewportLayout__inPlaceDialogContainer",...c,alignItems:"center"},inPlaceDialogContainerContent:{label:"topNavBarSmallViewportLayout__inPlaceDialogContainerContent",flex:"1 1"},inPlaceDialogContainerButton:{label:"topNavBarSmallViewportLayout__inPlaceDialogContainerButton",flex:"0 0"},menuTriggerContainer:{label:"topNavBarSmallViewportLayout__menuTriggerContainer",display:"flex",alignItems:"stretch",justifyContent:"flex-start",flex:"1 1"},menuTrigger:{label:"topNavBarSmallViewportLayout__menuTrigger",display:"flex",alignItems:"center",justifyContent:"flex-start"},alternativeTitleContainer:{label:"topNavBarSmallViewportLayout__alternativeTitleContainer",marginBlock:t.smallViewportAlternativeTitleBlockMargin,marginInline:t.smallViewportAlternativeTitleInlineMargin},dropdownMenuOption:{label:"topNavBarSmallViewportLayout__dropdownMenuOption",...u},dropdownMenuOptionActive:{label:"topNavBarSmallViewportLayout__dropdownMenuOptionActive",...u,fontWeight:t.smallViewportDropdownMenuActiveOptionFontWeight,paddingBlockEnd:t.smallViewportDropdownMenuActiveOptionIndicatorSpacing,borderBottom:`${t.smallViewportDropdownMenuActiveOptionIndicatorWidth} solid ${t.smallViewportDropdownMenuActiveOptionIndicatorColor}`},dropdownMenuOptionWithAvatar:{label:"topNavBarSmallViewportLayout__dropdownMenuOptionWithAvatar",...u,display:"flex",alignItems:"center"},brandContainer:{label:"topNavBarSmallViewportLayout__brandContainer",display:"flex",alignItems:"stretch"},trayContainer:{label:"topNavBarSmallViewportLayout__trayContainer",width:"100%",position:t.smallViewportTrayPosition,insetBlockStart:l,insetInlineStart:"0px",zIndex:t.smallViewportTrayZIndex,...i&&{height:`calc(100% - ${l})`}},globalStyles:{[`#${o}`]:{height:"100%"},[`#${r}`]:{height:"100%","&::before":{top:"4px",left:"4px",right:"4px",bottom:"4px",zIndex:1}}},navbarHeight:t.smallViewportHeight}},Cle=t=>{const e={display:"inline-block",padding:`0 ${t.desktopSubmenuActiveOptionIndicatorSpacing}`};return{topNavBarMenuItems:{label:"topNavBarMenuItems",flex:"1 1",display:"flex",flexDirection:"row",alignItems:"stretch",padding:"0 0.125rem"},submenuOption:{label:"topNavBarMenuItems__submenuOption",...e},submenuOptionActive:{label:"topNavBarMenuItems__submenuOptionActive",...e,fontWeight:t.desktopSubmenuActiveOptionFontWeight,paddingBlockEnd:t.desktopSubmenuActiveOptionIndicatorSpacing,borderBottom:`${t.desktopSubmenuActiveOptionIndicatorWidth} solid ${t.desktopSubmenuActiveOptionIndicatorColor}`},itemSpacing:t.desktopItemSpacing}},Tle=t=>{const e=t.borders,n=t.typography;return{...{desktopItemSpacing:"1rem",desktopMaxWidth:"100%",desktopSubmenuActiveOptionFontWeight:n==null?void 0:n.fontWeightBold,desktopSubmenuActiveOptionIndicatorSpacing:"0.25rem",desktopSubmenuActiveOptionIndicatorWidth:e==null?void 0:e.widthMedium,desktopSubmenuActiveOptionIndicatorColor:"currentColor"}}},Ple={children:ft.oneOf([wo]),currentPageId:f.string,renderHiddenItemsMenuTriggerLabel:f.oneOfType([f.func,f.string]).isRequired,listLabel:f.string,elementRef:f.func},i3=["children","currentPageId","renderHiddenItemsMenuTriggerLabel","listLabel","elementRef"];var r3,o3,s3,hc,Ts,a3;let Z8=(r3=zt(),o3=de(Cle,Tle),s3=Le(),r3(hc=o3(hc=s3(hc=(Ts=class extends T.Component{constructor(e){super(e),this._hiddenMenuItemsMenuTriggerId=void 0,this._hiddenItemsMenuId=void 0,this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.renderOptionContent=(n,i)=>{const r=this.props.styles;return C("span",{css:(i==null?void 0:i.status)==="active"?r==null?void 0:r.submenuOptionActive:r==null?void 0:r.submenuOption},n)},this._hiddenMenuItemsMenuTriggerId=e.deterministicId("TopNavBarMenuItems-hiddenMenuItemsMenuTrigger"),this._hiddenItemsMenuId=e.deterministicId("TopNavBarSmallViewportLayout-drilldown"),this.state={key:0,visibleItemsCount:void 0}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(e){var n,i;(n=(i=this.props).makeStyles)===null||n===void 0||n.call(i),z.Children.count(e.children)!==this.childrenArray.length&&this.setState({key:this.state.key+1})}get childrenArray(){return z.Children.toArray(this.props.children)}renderHiddenItemsMenu(e){const n=this.props,i=n.renderHiddenItemsMenuTriggerLabel,r=n.currentPageId;if(!e.length)return a3||(a3=C("span",null));const o=cO(e,{renderOptionContent:this.renderOptionContent,currentPageId:r}),s=Kx(o),a=dO(o),l=e.find(u=>u.props.status==="active");return C(wo,{id:this._hiddenMenuItemsMenuTriggerId,status:l?"active":"default",renderSubmenu:C(Qn,{rootPageId:this._hiddenItemsMenuId},[C(Qn.Page,{id:this._hiddenItemsMenuId,key:this._hiddenItemsMenuId},a),...s])},i(e.length))}renderChildren(){const e=this.props.currentPageId;return this.childrenArray.map(n=>{if(!n)return;const i=n.props,r=i.id,o=i.status,s=i.variant,a=i.renderSubmenu,l=i.renderAvatar,u=e===r;return l?(Ye(!1,`Items in are not allowed to have avatars, but item with id: "${r}" has \`renderAvatar\` prop.`),null):u?s!=="default"?(Ne(!1,`Only \`variant="default"\` items can be set to current/active, but the item with id "${r}" is "${s}" variant.`),n):o==="disabled"?(Ne(!1,`Disabled items can not be set to current/active, but the item with id "${r}" is disabled.`),n):$t(n,{status:"active","aria-current":a?void 0:"page"}):n})}render(){const e=this.props,n=e.listLabel,i=e.styles;return!this.childrenArray.length||this.context.layout==="smallViewport"?null:C(KM,Object.assign({},Re(this.props,i3),{key:this.state.key,elementRef:this.handleRef,css:i==null?void 0:i.topNavBarMenuItems,visibleItemsCount:this.state.visibleItemsCount,onUpdate:({visibleItemsCount:r})=>{this.setState({visibleItemsCount:r})},renderHiddenItemMenu:r=>this.renderHiddenItemsMenu(r)},(i==null?void 0:i.itemSpacing)&&{itemSpacing:i.itemSpacing},{"aria-label":n}),this.renderChildren())}},Ts.displayName="TopNavBarMenuItems",Ts.componentId="TopNavBar.MenuItems",Ts.propTypes=Ple,Ts.allowedProps=i3,Ts.defaultProps={},Ts.contextType=Vr,Ts))||hc)||hc)||hc);const Ale=()=>({topNavBarUser:{label:"topNavBarUser",flex:"0 0",display:"flex"}}),Rle={children:ft.oneOf([wo]).isRequired,elementRef:f.func},l3=["children","elementRef"];var u3,c3,ag,Ps;let q8=(u3=de(Ale,null),c3=Le(),u3(ag=c3(ag=(Ps=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}get content(){const e=z.Children.toArray(this.props.children),n=["default","button","avatar"];return T.Children.map(e,i=>{const r=i.props,o=r.id,s=r.variant;return s&&!n.includes(s)?(Ye(!1,`Item with id "${o}" has "${s}" variant, but only the following variants are allowed in : ${n.join(", ")}.`),null):i})}render(){const e=this.props.styles;return!this.content||this.content.length===0||this.context.layout==="smallViewport"?null:C("div",Object.assign({},Re(this.props,l3),{ref:this.handleRef,css:e==null?void 0:e.topNavBarUser}),this.content)}},Ps.displayName="TopNavBarUser",Ps.componentId="TopNavBar.User",Ps.propTypes=Rle,Ps.allowedProps=l3,Ps.defaultProps={},Ps.contextType=Vr,Ps))||ag)||ag);const Ile={onClick:f.func,elementRef:f.func,children:ft.oneOf([DZ])},$le=["children","onClick","elementRef"],Lle=(t,e)=>({topNavBarBreadcrumb:{label:"topNavBarBreadcrumb",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",flexGrow:1,border:0,outline:0,padding:0,margin:0,appearance:"none",textDecoration:"none"},iconContainer:{label:"topNavBarBreadcrumb__iconContainer",display:"flex",justifyContent:"center",alignItems:"center"},icon:{label:"topNavBarBreadcrumb__icon",display:"flex",justifyContent:"center",alignItems:"center"},breadcrumbContainer:{label:"topNavBarBreadcrumb__breadCrumbContainer",appearance:"none",textDecoration:"none",marginLeft:"0.75rem",flexGrow:1},linkContainer:{label:"topNavBarBreadcrumb__linkContainer",marginLeft:"0.5rem"}});var d3,h3,lg,Cl,f3;let Y8=(d3=de(Lle,null),h3=Le(),d3(lg=h3(lg=(Cl=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,{inverseColor:this.context.inverseColor})}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,{inverseColor:this.context.inverseColor})}renderMenu(){var e;const n=this.props.onClick;return C("div",{css:(e=this.props.styles)===null||e===void 0?void 0:e.icon},C(Fo.Item,{id:"iconItem",variant:"icon",renderIcon:f3||(f3=C(ku,null)),onClick:n},"Hamburger menu"))}render(){const e=this.props,n=e.children,i=e.styles;this.context.inverseColor||Ye(!1,"[TopNavBarBreadcrumb] If the inverseColor prop is not set to true, TopNavBarBreadcrumb fails to render.");const o=z.Children.toArray(n)[0].props.children,s=z.Children.toArray(o)[z.Children.count(o)-2];return this.context.inverseColor&&(this.context.layout==="desktop"?C("div",{ref:this.handleRef,css:i==null?void 0:i.topNavBarBreadcrumb},C("div",{css:i==null?void 0:i.iconContainer},this.renderMenu()),C("div",{css:i==null?void 0:i.breadcrumbContainer},n)):C("div",{ref:this.handleRef,css:i==null?void 0:i.topNavBarBreadcrumb},C("div",{css:i==null?void 0:i.linkContainer},C(Di,{href:s.props.href,isWithinText:!1,renderIcon:$d},s.props.children))))}},Cl.displayName="TopNavBarBreadcrumb",Cl.propTypes=Ile,Cl.allowedProps=$le,Cl.defaultProps={},Cl.contextType=Vr,Cl))||lg)||lg);const Jx={renderBrand:ft.oneOf([U8]),renderMenuItems:ft.oneOf([Z8]),renderActionItems:ft.oneOf([H8]),renderUser:ft.oneOf([q8]),renderBreadcrumb:ft.oneOf([Y8]),navLabel:f.string,elementRef:f.func},Nle={hideActionsUserSeparator:f.bool},G8={dropdownMenuToggleButtonLabel:f.string.isRequired,dropdownMenuToggleButtonTooltip:Gx,dropdownMenuLabel:f.string,alternativeTitle:f.node,renderInPlaceDialogConfig:f.shape({open:f.bool.isRequired,onClose:f.func.isRequired,closeButtonLabel:f.string.isRequired,content:f.oneOfType([f.node,f.func]),returnFocusElement:f.func,shouldContainFocus:f.bool,shouldCloseOnDocumentClick:f.bool,shouldCloseOnEscape:f.bool}),trayMountNode:f.oneOfType([wi,f.func]),onDropdownMenuToggle:f.func,onDropdownMenuSelect:f.func},Mle={...Jx,smallViewportConfig:f.shape(G8).isRequired},e_=["renderBrand","renderMenuItems","renderActionItems","renderUser","renderBreadcrumb","navLabel","elementRef"],Dle=["hideActionsUserSeparator"],Ble=["dropdownMenuToggleButtonLabel","dropdownMenuToggleButtonTooltip","dropdownMenuLabel","alternativeTitle","renderInPlaceDialogConfig","trayMountNode","onDropdownMenuToggle","onDropdownMenuSelect"],Qle=[...e_,"smallViewportConfig"],Fle={...Jx,...G8},p3=[...e_,...Ble];var m3,g3,O3,fc,As,b3,y3;let zle=(m3=zt(),g3=de(Ele,j8),O3=Le(),m3(fc=g3(fc=O3(fc=(As=class extends T.Component{constructor(e){var n;super(e),this.ref=null,this._trayContainerId=void 0,this._trayId=void 0,this._drilldownId=void 0,this._menuTriggerId=void 0,this._menuId=void 0,this._inPlaceDialogId=void 0,this._inPlaceDialogCloseButtonId=void 0,this._separatorId=void 0,this._raf=[],this.handleRef=i=>{const r=this.props.elementRef;this.ref=i,typeof r=="function"&&r(i)},this.renderOptionContent=(i,r)=>{const o=this.props.styles,s=r.status,a=r.renderAvatar;let l=i,u=s==="active"?o==null?void 0:o.dropdownMenuOptionActive:o==null?void 0:o.dropdownMenuOption;if(a){const c=a.avatarName,d=a.avatarSrc,p=a.avatarAlt||(typeof i=="string"?i:void 0);u=o==null?void 0:o.dropdownMenuOptionWithAvatar,l=C(z.Fragment,null,C(Zk,{name:c,src:d,alt:p,size:"small",margin:"0 small 0 0",role:"presentation","aria-hidden":"true"}),i)}return C("span",{css:u},l)},this._trayContainerId=e.deterministicId("TopNavBarSmallViewportLayout-trayContainer"),this._trayId=e.deterministicId("TopNavBarSmallViewportLayout-tray"),this._menuId=e.deterministicId("TopNavBarSmallViewportLayout-menu"),this._menuTriggerId=e.deterministicId("TopNavBarSmallViewportLayout-menuTrigger"),this._drilldownId=e.deterministicId("TopNavBarSmallViewportLayout-drilldown"),this._inPlaceDialogId=e.deterministicId("TopNavBarSmallViewportLayout-inPlaceDialog"),this._inPlaceDialogCloseButtonId=e.deterministicId("TopNavBarSmallViewportLayout-inPlaceDialogCloseButton"),this._separatorId=e.deterministicId("TopNavBarSmallViewportLayout-separator"),this.state={isDropdownMenuOpen:!1,isDropdownMenuVisible:!1,menuBottomPosition:Yn(((n=e.styles)===null||n===void 0?void 0:n.navbarHeight)||0)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.makeStylesVariables),this.updateMenuBottomPosition()}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.makeStylesVariables)}componentWillUnmount(){this._raf.forEach(e=>e.cancel()),this.state.isDropdownMenuOpen&&this.toggleDropdownMenu()}get makeStylesVariables(){return{isDropdownMenuVisible:this.state.isDropdownMenuVisible,drilldownId:this._drilldownId,trayId:this._trayId,menuBottomPosition:this.state.menuBottomPosition,inverseColor:this.context.inverseColor}}hasBrandBlock(e){return!!e&&!!e.props.renderIcon}hasMenuItemsBlock(e){return!!e&&z.Children.count(e.props.children)>0}hasActionItemsBlock(e){return!!e&&z.Children.count(e.props.children)>0}hasUserBlock(e){return!!e&&z.Children.count(e.props.children)>0}get hasSubmenu(){return(this.dropdownMenuContent||[]).length>0}get hasBreadcrumbBlock(){const e=this.props.renderBreadcrumb;return!!e&&z.Children.count(e.props.children)>0}get isInPlaceDialogOpen(){var e;return(e=this.props.renderInPlaceDialogConfig)===null||e===void 0?void 0:e.open}get mappedUserOptions(){const e=this.props.renderUser;if(!this.hasUserBlock(e))return[];const n=z.Children.toArray(e.props.children);return cO(n,{renderOptionContent:this.renderOptionContent})}get mappedMenuItemsOptions(){const e=this.props.renderMenuItems;if(!this.hasMenuItemsBlock(e))return[];const n=z.Children.toArray(e.props.children);return cO(n,{renderOptionContent:this.renderOptionContent,currentPageId:e.props.currentPageId})}get extractDrilldownSubpages(){return Kx([...this.mappedUserOptions,...this.mappedMenuItemsOptions])}updateMenuBottomPosition(){const e=jt(this.ref);this.setState({menuBottomPosition:e.top+e.height})}toggleDropdownMenu(){const e=this.props.onDropdownMenuToggle,n=this.state.isDropdownMenuOpen;n||this.updateMenuBottomPosition(),typeof e=="function"&&e(!n),this.setState({isDropdownMenuOpen:!n})}renderMenuTrigger(){const e=this.props,n=e.dropdownMenuToggleButtonLabel,i=e.dropdownMenuToggleButtonTooltip,r=e.renderBrand,o=e.alternativeTitle,s=e.styles,a=this.state.isDropdownMenuOpen;let l;const u=[s==null?void 0:s.menuTrigger,...o?[s==null?void 0:s.alternativeTitleContainer]:[]];if(!this.hasSubmenu)l=null,o&&Ne(!1,"There are no menu items or user menu to display in the dropdown menu! The menu trigger and the alternative title will not display.");else{const c={id:this._menuTriggerId,onClick:()=>{this.toggleDropdownMenu()},tooltip:i,themeOverride:{itemSpacing:"0.375rem"},"aria-haspopup":"menu","aria-expanded":a},d={size:"x-small",style:{marginInlineEnd:"0.5em"}};l=C("div",{css:u},o?C(wo,Object.assign({},c,{"aria-label":n}),C(a?_u:Sa,d),o):C(wo,Object.assign({},c,{variant:"icon",renderIcon:a?b3||(b3=C(iu,null)):y3||(y3=C(ku,null))}),n))}return C("div",{css:s==null?void 0:s.menuTriggerContainer},l,this.hasBrandBlock(r)&&!o&&C("div",{css:s==null?void 0:s.brandContainer},r))}get dropdownMenuContent(){const e=this.props,n=e.renderUser,i=e.renderMenuItems,r=this.hasMenuItemsBlock(i),o=this.hasUserBlock(n);let s=[];return o&&(s=dO(this.mappedUserOptions),r&&s.push(C(Qn.Separator,{id:this._separatorId,key:this._separatorId}))),r&&(s=[...s,...dO(this.mappedMenuItemsOptions)]),s.length?s:void 0}renderDropdownMenu(){const e=this.props,n=e.dropdownMenuLabel,i=e.onDropdownMenuSelect;return C(Qn,{id:this._drilldownId,rootPageId:this._menuId,label:n,height:"100%",width:"100%",onSelect:(r,o)=>{typeof i=="function"&&i(r,o),(o.selectedOption.props.shouldCloseOnClick==="auto"&&o.selectedOption.props.href||o.selectedOption.props.shouldCloseOnClick==="always")&&this.toggleDropdownMenu()}},[C(Qn.Page,{id:this._menuId,key:this._menuId},this.dropdownMenuContent),...this.extractDrilldownSubpages])}renderDropdownMenuTray(){const e=this.props.trayMountNode;return this.hasSubmenu?C(_le,{id:this._trayId,label:"",role:"none",open:this.state.isDropdownMenuOpen,transitionExit:!1,onDismiss:()=>{this.toggleDropdownMenu()},onKeyUp:n=>{n.key==="Escape"&&this.toggleDropdownMenu()},onEnter:()=>{this.setState({isDropdownMenuVisible:!0})},onExited:()=>{this.setState({isDropdownMenuVisible:!1})},shouldCloseOnDocumentClick:!0,placement:"top",shadow:!1,mountNode:e||document.getElementById(this._trayContainerId),defaultFocusElement:()=>document.getElementById(this._drilldownId),themeOverride:{position:"absolute"}},this.renderDropdownMenu()):null}renderInPlaceDialog(){const e=this.props,n=e.renderInPlaceDialogConfig,i=e.styles;if(!n)return null;const r=n.content,o=n.open,s=n.onClose,a=n.closeButtonLabel,l=n.shouldContainFocus,u=n.shouldCloseOnEscape,c=n.shouldCloseOnDocumentClick,d=n.returnFocusElement,h=()=>{typeof s=="function"&&s(),d&&this._raf.push(qo(()=>{var m;(m=d())===null||m===void 0||m.focus()}))};return C(zr,{display:"block",open:o,shouldContainFocus:l,shouldCloseOnEscape:u,shouldCloseOnDocumentClick:c,onDismiss:h},C("div",{id:this._inPlaceDialogId,css:i==null?void 0:i.inPlaceDialogContainer},C("div",{css:i==null?void 0:i.inPlaceDialogContainerContent},rt(r,{closeInPlaceDialog:h})),C("div",{css:i==null?void 0:i.inPlaceDialogContainerButton},C(wo,{id:this._inPlaceDialogCloseButtonId,renderIcon:iu,variant:"icon",onClick:h},a))))}render(){const e=this.props,n=e.trayMountNode,i=e.navLabel,r=e.renderActionItems,o=e.renderBreadcrumb,s=e.styles;return C("nav",Object.assign({},Re(this.props,p3),{ref:this.handleRef,"aria-label":i}),C(U5,{styles:s==null?void 0:s.globalStyles}),this.hasBreadcrumbBlock&&C("div",{css:s==null?void 0:s.navbar},o),!this.hasBreadcrumbBlock&&!this.isInPlaceDialogOpen&&C("div",{css:s==null?void 0:s.navbar},this.renderMenuTrigger(),this.hasActionItemsBlock(r)&&r),!this.hasBreadcrumbBlock&&this.renderInPlaceDialog(),!this.hasBreadcrumbBlock&&!n&&C("div",{css:s==null?void 0:s.trayContainer,id:this._trayContainerId}),!this.hasBreadcrumbBlock&&this.renderDropdownMenuTray())}},As.displayName="TopNavBarSmallViewportLayout",As.componentId="TopNavBar.SmallViewportLayout",As.propTypes=Fle,As.allowedProps=p3,As.defaultProps={},As.contextType=Vr,As))||fc)||fc)||fc);const Hle=(t,e,n)=>{const i=n.inverseColor,r=n.hasBrandBlock,o=n.hasActionItemsBlock,s=n.hasUserBlock,a=o&&s;return{topNavBarDesktopLayout:{label:"topNavBarDesktopLayout",flowMode:"logical",fontSize:t.desktopFontSize,fontFamily:t.desktopFontFamily,fontWeight:t.desktopFontWeight,background:i?t.desktopBackgroundInverse:t.desktopBackground,borderBlockEnd:i?t.desktopBottomBorderInverse:t.desktopBottomBorder,display:"flex",alignItems:"stretch",justifyContent:"space-between",height:t.desktopHeight,zIndex:t.desktopZIndex,maxWidth:"100%",overflow:"hidden",paddingInline:t.desktopInlinePadding,paddingBlock:0,...r&&{paddingInlineStart:0}},brandContainer:{label:"topNavBarDesktopLayout__brandContainer",display:"flex",flexGrow:0,flexShrink:0,marginBlock:0,marginInline:t.desktopBrandContainerInlineMargin},menuItemsContainer:{label:"topNavBarDesktopLayout__menuItemsContainer",display:"flex",flexGrow:1,flexShrink:1,marginBlock:0,marginInline:t.desktopMenuItemsContainerInlineMargin,overflow:"hidden"},actionItemsContainer:{label:"topNavBarDesktopLayout__actionItemsContainer",display:"flex",flexGrow:0,flexShrink:0,marginBlock:0,marginInline:t.desktopActionItemsContainerInlineMargin},spacer:{flexGrow:"1"},userContainer:{label:"topNavBarDesktopLayout__userContainer",display:"flex",flexGrow:0,flexShrink:0,marginBlock:0,marginInline:t.desktopUserContainerInlineMargin,...a&&{position:"relative",paddingInlineStart:t.desktopUserSeparatorGap,"&::before":{content:'""',position:"absolute",insetInlineStart:0,insetBlockStart:"50%",marginBlockStart:`calc(-${t.desktopUserSeparatorHeight} / 2)`,height:t.desktopUserSeparatorHeight,width:t.desktopUserSeparatorWidth,background:i?t.desktopUserSeparatorColorInverse:t.desktopUserSeparatorColor,display:"block"}}},breadcrumbContainer:{label:"topNavBarDesktopLayout__breadcrumbContainer",display:"flex",flexGrow:0,flexShrink:0,marginBlock:0,alignItems:"center"}}},Ule={...Jx,...Nle},v3=[...e_,...Dle];var S3,w3,ug,Rs;let Wle=(S3=de(Hle,V8),w3=Le(),S3(ug=w3(ug=(Rs=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.makeStylesVariables)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.makeStylesVariables)}get makeStylesVariables(){return{inverseColor:this.context.inverseColor,hasBrandBlock:this.hasBrandBlock,hasActionItemsBlock:this.hasActionItemsBlock,hasUserBlock:this.hasUserBlock}}get hasBrandBlock(){const e=this.props.renderBrand;return!!e&&!!e.props.renderIcon}get hasActionItemsBlock(){const e=this.props.renderActionItems;return!!e&&z.Children.count(e.props.children)>0}get hasUserBlock(){const e=this.props.renderUser;return!!e&&z.Children.count(e.props.children)>0}get hasMenuItemsBlock(){const e=this.props.renderMenuItems;return!!e&&z.Children.count(e.props.children)>0}get hasBreadcrumbBlock(){const e=this.props.renderBreadcrumb;return!!e&&z.Children.count(e.props.children)>0}render(){const e=this.props,n=e.renderBrand,i=e.renderMenuItems,r=e.renderActionItems,o=e.renderUser,s=e.renderBreadcrumb,a=e.navLabel,l=e.styles,u=!(this.hasBrandBlock||this.hasMenuItemsBlock)&&this.hasBreadcrumbBlock;return C("nav",Object.assign({},Re(this.props,v3),{ref:this.handleRef,css:l==null?void 0:l.topNavBarDesktopLayout,"aria-label":a}),this.hasBrandBlock&&C("div",{css:l==null?void 0:l.brandContainer},n),this.hasMenuItemsBlock&&C("div",{css:l==null?void 0:l.menuItemsContainer},i),u&&s,C("span",{css:l==null?void 0:l.spacer}),this.hasActionItemsBlock&&C("div",{css:l==null?void 0:l.actionItemsContainer},r),this.hasUserBlock&&C("div",{css:l==null?void 0:l.userContainer},o))}},Rs.displayName="TopNavBarDesktopLayout",Rs.componentId="TopNavBar.DesktopLayout",Rs.propTypes=Ule,Rs.allowedProps=v3,Rs.defaultProps={},Rs.contextType=Vr,Rs))||ug)||ug);const Vle=["smallViewportConfig","styles","makeStyles"];var k3,x3,cg,Is;let _3=(k3=de(null,yle),x3=Le(),k3(cg=x3(cg=(Is=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){"desktopConfig"in this.props}get sortedThemeOverride(){const e=this.props.themeOverride;if(!e||typeof e=="function")return{desktopThemeOverride:e,smallViewportThemeOverride:e};const n={},i={};for(const r in e)if(r.startsWith("smallViewport")){const o=r;i[o]=e[o]}else if(r.startsWith("desktop")){const o=r;n[o]=e[o]}return{desktopThemeOverride:n,smallViewportThemeOverride:i}}render(){const e=this.props,n=e.smallViewportConfig;e.styles,e.makeStyles;const i=Ie(e,Vle);return this.context.layout==="smallViewport"?C(zle,Object.assign({},n,i,{themeOverride:this.sortedThemeOverride.smallViewportThemeOverride,elementRef:this.handleRef})):C(Wle,Object.assign({},i,{themeOverride:this.sortedThemeOverride.desktopThemeOverride,elementRef:this.handleRef}))}},Is.displayName="TopNavBarLayout",Is.componentId="TopNavBar.Layout",Is.propTypes=Mle,Is.allowedProps=Qle,Is.defaultProps={smallViewportConfig:{}},Is.contextType=Vr,Is))||cg)||cg);const jle={children:f.func,breakpoint:f.oneOfType([f.string,f.number]),mediaQueryMatch:f.oneOf(["element","media"]),inverseColor:f.oneOfType([f.bool,f.func]),elementRef:f.func},Xle=["children","breakpoint","mediaQueryMatch","inverseColor","elementRef"];var E3,C3,Xn;let Fo=(E3=Le(),E3(C3=(Xn=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}get breakpoint(){return Yn(this.props.breakpoint)}render(){const e=this.props,n=e.children,i=e.mediaQueryMatch,r=e.inverseColor;return z.createElement(Pp,{elementRef:this.handleRef,match:i,query:{smallViewport:{maxWidth:this.breakpoint-1},desktop:{minWidth:this.breakpoint}},render:(o,s)=>{const a=s?s[0]:"smallViewport",l=typeof r=="function"?r(a):!!r,u=n({currentLayout:a,inverseColor:l});return Me(u,[_3])||Ye(!1,"The `children` function prop of TopNavBar has to return a child of type , but it returned:",u),z.createElement(Vr.Provider,{value:{layout:a,inverseColor:l}},u)}})}},Xn.displayName="TopNavBar",Xn.componentId="TopNavBar",Xn.ActionItems=H8,Xn.Brand=U8,Xn.Item=wo,Xn.Layout=_3,Xn.MenuItems=Z8,Xn.User=q8,Xn.Breadcrumb=Y8,Xn.contextType=Vr,Xn.propTypes=jle,Xn.allowedProps=Xle,Xn.defaultProps={breakpoint:1024,mediaQueryMatch:"media",inverseColor:!1},Xn))||C3);const Zle={made_with:{EN:"Made with",ES_LA:"Hecho con",PT_BR:"Feito com",DE:"Mit"},love:{EN:"love",ES_LA:"amor",PT_BR:"amor",DE:"liebe"},by:{EN:"by",ES_LA:"por",PT_BR:"por",DE:"gemacht von"}},cw=["EN","ES_LA","PT_BR","DE"],K8=[{lang:"English",local:"English",code:"EN"},{lang:"Spanish",local:"Español",code:"ES_LA"},{lang:"Portuguese",local:"Português",code:"PT_BR"},{lang:"German",local:"Deutsch",code:"DE"}];function th(t="EN"){return cw.find(e=>e.includes(t.toUpperCase()))||"EN"}function ps(t,e="EN"){return Object.fromEntries(Object.entries(t).map(([n,i])=>[n,i[e]||i.EN]))}function nh({language:t}){const n=ps(Zle,t);return N.jsx(ye,{id:"footer",as:"div",textAlign:"center",padding:"small",position:"absolute",insetBlockEnd:"0",margin:"0 auto",width:"100%",borderWidth:"small none none",children:N.jsxs(Wt,{transform:"uppercase",letterSpacing:"expanded",color:"primary-inverse",size:"small",children:[n.made_with," ",N.jsx(Md,{color:"primary-inverse",title:n.love})," ",n.by," ",N.jsx(Di,{color:"link-inverse",href:"https://www.instructure.com",children:"Instructure"})]})})}const qle="isp-site",Yle="3.1.1+1716567855",Gle="https://inst.bid/#/",Kle="module",Jle={app:"echo $npm_package_version",dev:"vite",build:"vite build",preview:"vite build && vite preview",predeploy:"make all && pnpm build",push:'pnpm predeploy && gh-pages -t -m "Deploy v$(pnpm -s app)" -d dist',"biome-apply":"pnpm lint && pnpm check && pnpm format",lint:"biome lint ./",check:"biome check --apply ./",format:"biome format --write ./",rage:"biome rage"},eue={"@instructure/browserslist-config-canvas-lms":"^2.0.0","@instructure/ui":"^9.0.1","gh-pages":"^6.1.1",react:"^18.3.1","react-dom":"^18.3.1","react-markdown":"^9.0.1","react-router-dom":"^6.23.1","rehype-raw":"^7.0.0","remark-gemoji":"^8.0.0","remark-gfm":"^4.0.0"},tue={"@biomejs/biome":"1.7.3","@types/react":"^18.3.3","@types/react-dom":"^18.3.0","@vitejs/plugin-react":"^4.3.0",vite:"^5.2.11"},nue={node:">=22.0.0",pnpm:">=9.1.2"},iue="pnpm@9.1.2+sha256.19c17528f9ca20bd442e4ca42f00f1b9808a9cb419383cd04ba32ef19322aba7",rue={overrides:{"@instructure/ui-test-sandbox>sinon":"^17.0.1"}},oue=["extends @instructure/browserslist-config-canvas-lms"],sue={name:qle,version:Yle,homepage:Gle,private:!0,type:Kle,scripts:Jle,dependencies:eue,devDependencies:tue,engines:nue,packageManager:iue,pnpm:rue,browserslist:oue},bi={owner:"thedannywahl",repo:"instructure-security-package",branch:"main",url:sue.homepage.replace("/#/",""),api:"https://api.github.com",raw:"https://raw.githubusercontent.com"},Tl=`${bi.raw}/${bi.owner}/${bi.repo}/${bi.branch}/README`,$i=["Instructure","Canvas","Mastery","Elevate","Impact","LearnPlatform","Parchment"],a1=[...$i,"Canvas LMS","Canvas Mobile","Canvas Studio","Canvas Credentials","Canvas Catalog","Canvas Commons","Canvas Data","Mastery Connect","Mastery Item Bank","Mastery View Assessments","Elevate K-12 Analytics","Elevate Data Quality","Elevate Data Sync","Learn Platform"],J8=[{brandName:$i[0],get title(){return this.brandName.toLowerCase()},route:"/",readme:`${Tl}.md`,color:"#287A9F"},{brandName:$i[1],get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title}`},get readme(){return`${Tl}-${this.brandName}.md`},color:"#E72429"},{brandName:$i[2],get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title}`},get readme(){return`${Tl}-${this.brandName}.md`},color:"#24A159"},{brandName:$i[3],get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title}`},get readme(){return`${Tl}-${this.brandName}.md`},color:"#0097D3"},{brandName:$i[4],get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title}`},get readme(){return`${Tl}-${this.brandName}.md`},color:"#F76400"},{brandName:$i[5],get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title}`},get readme(){return`${Tl}-${this.brandName}.md`},color:"#0077CC"},{brandName:$i[6],get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title}`},get readme(){return`${Tl}-${this.brandName}.md`},color:"#0093b2"}],T3=(t,e)=>{const n=document.querySelector("body");for(const i of e)i.removeAttribute("aria-current"),i.classList.remove("active");if(t!==null&&t.hash!=="#/"&&(t.setAttribute("aria-current","page"),t.classList.add("active")),n.classList.remove(...$i.map(i=>i.toLowerCase())),t!=null&&t.id.length){n.classList.add(t.id);const i=$i.find(r=>r.toLowerCase()===t.id);document.title=`${i} Compliance Package`}else n.classList.add("instructure"),document.title="Instructure Compliance Packages"};window.addEventListener("load",()=>{let t=document.location.href.split("#")[1];const e=document.querySelectorAll("nav a");t!==void 0&&t!=="/"&&t!==null&&(t=document.getElementById(t.split("/")[1]),T3(t,e));for(const n of e)n.onclick=()=>{T3(n,e)}});const aue={language:{EN:"Language",ES_LA:"Idioma",PT_BR:"Idioma",DE:"Sprache"},help:{EN:"Help",ES_LA:"Ayuda",PT_BR:"Ajuda",DE:"Hilfe"},toggle_menu:{EN:"Toggle menu",ES_LA:"Alternar menú",PT_BR:"Alternar menu",DE:"Menü umschalten"},main_menu:{EN:"Main menu",ES_LA:"Menú principal",PT_BR:"Menu principal",DE:"Hauptmenü"},page_navigation:{EN:"Page navigation",ES_LA:"Navegación de la página",PT_BR:"Navegação da página",DE:"Seitenavigation"},more:{EN:"More",ES_LA:"Más",PT_BR:"Mais",DE:"Mehr"},actions:{EN:"Actions",ES_LA:"Acciones",PT_BR:"Ações",DE:"Aktionen"},more_actions:{EN:"More actions",ES_LA:"Más acciones",PT_BR:"Mais ações",DE:"Mehr Aktionen"},contact_info:{EN:"Contact Information",ES_LA:"Información de Contacto",PT_BR:"Informações de Contato",DE:"Kontaktinformationen"},info_overview:{EN:"This site and its contents are maintained by Instructure, inc.",ES_LA:"Este sitio y su contenido son mantenidos por Instructure, inc.",PT_BR:"Este site e seu conteúdo são mantidos pela Instructure, inc.",DE:"Diese Website und ihre Inhalte werden von Instructure, inc. gepflegt."},current_customers:{EN:"Current customers",ES_LA:"Clientes actuales",PT_BR:"Clientes atuais",DE:"Aktuelle kunden"},contact_csm:{EN:"Reach out to your CSM.",ES_LA:"Comuníquese con su CSM.",PT_BR:"Entre em contato com seu CSM.",DE:"Kontaktieren Sie Ihren CSM."},prospects:{EN:"Prospective customers",ES_LA:"Clientes potenciales",PT_BR:"Clientes em potencial",DE:"Potenzielle Kunden"},contact_sales:{EN:"Reach out to your sales contact.",ES_LA:"Comuníquese con su contacto de ventas.",PT_BR:"Entre em contato com seu contato de vendas.",DE:"Kontaktieren Sie Ihren Vertriebskontakt."},contact_general:{EN:"For general inquiries email",ES_LA:"Para consultas generales envíe un correo electrónico a",PT_BR:"Para perguntas gerais, envie um e-mail para",DE:"Für allgemeine Anfragen senden Sie eine E-Mail an"},redirects:{EN:"Redirects",ES_LA:"Redirecciones",PT_BR:"Redirecionamentos",DE:"Weiterleitungen"},releases:{EN:"Releases",ES_LA:"Lanzamientos",PT_BR:"Lançamentos",DE:"Veröffentlichungen"},contact:{EN:"Contact",ES_LA:"Contacto",PT_BR:"Contato",DE:"Kontakt"}};function ih({language:t}){const e=t,n=ps(aue,e),i=[...J8];return i.shift(),N.jsx(ye,{id:"nav",as:"div",tabIndex:0,children:N.jsx(Fo,{inverseColor:!0,children:()=>N.jsx(Fo.Layout,{navLabel:"main",smallViewportConfig:{dropdownMenuToggleButtonLabel:n.toggle_menu,dropdownMenuLabel:n.main_menu},themeOverride:{desktopBackgroundInverse:"#FFF",smallViewportBackgroundInverse:"#FFF"},renderBrand:N.jsx(Fo.Brand,{screenReaderLabel:"Instructure",renderIcon:N.jsx(jd,{size:"small",color:"primary-inverse",height:"2.5rem",width:"2.5rem"}),iconBackground:"#287A9F",href:`#/${e==="EN"?"":e.toLowerCase().split("_")[0]}`}),renderMenuItems:N.jsx(Fo.MenuItems,{listLabel:n.page_navigation,currentPageId:"",renderHiddenItemsMenuTriggerLabel:r=>`${r} ${n.more}`,children:i.map(r=>N.jsx(Fo.Item,{id:r.title,href:`#${r.route}${e==="EN"?"":`/${e.toLowerCase().split("_")[0]}`}`,themeOverride:{activeIndicatorColor:r.color},children:r.brandName},r.title))}),renderActionItems:N.jsxs(Fo.ActionItems,{listLabel:n.actions,renderHiddenItemsMenuTriggerLabel:r=>`${r} ${n.more_actions}`,children:[N.jsx(Fo.Item,{id:"langSwitcher",showSubmenuChevron:!0,tooltip:n.language,renderIcon:N.jsx(Nd,{}),renderSubmenu:N.jsx(Qn,{id:"language",rootPageId:"language",children:N.jsx(Qn.Page,{id:"language",children:K8.map(r=>N.jsx(Qn.Option,{id:r.lang,disabled:r.code===e,children:r.code===e?r.local:N.jsx(tU,{className:"lang",to:`./${r.code!=="EN"?r.code.toLowerCase().split("_")[0]:""}`,children:r.local})},r.code))})}),children:n.language}),N.jsx(Fo.Item,{id:"info",showSubmenuChevron:!1,tooltip:n.help,renderIcon:N.jsx(zd,{}),customPopoverConfig:{on:"click",placement:"bottom end",shouldContainFocus:!0,children:N.jsxs(ye,{id:"help",as:"div",padding:"medium",width:"25rem",role:"dialog",tabIndex:0,"aria-label":n.contact_info,position:"relative",borderRadius:"small",children:[N.jsx(Tr,{level:"h3",children:n.contact_info}),N.jsx(Wt,{children:n.info_overview}),N.jsxs(ye,{as:"div",margin:"medium 0 0",children:[N.jsx(Wt,{weight:"bold",children:n.current_customers}),N.jsx("br",{}),N.jsx(Wt,{children:n.contact_csm})]}),N.jsxs(ye,{as:"div",margin:"medium 0 0",children:[N.jsx(Wt,{weight:"bold",children:n.prospects}),N.jsx("br",{}),N.jsx(Wt,{children:n.contact_sales}),N.jsx("br",{}),N.jsxs(Wt,{children:[n.contact_general," "]})]}),N.jsx(ye,{as:"hr",shadow:"topmost",borderWidth:"small",margin:"small none",padding:"none",borderColor:"primary"}),N.jsxs(_h,{delimiter:"pipe",size:"small",children:[N.jsx(_h.Item,{children:N.jsx(Di,{href:`#/links${e!=="EN"?`/${e.toLowerCase().split("_")[0]}`:""}`,children:n.redirects})}),N.jsx(_h.Item,{children:N.jsx(Di,{href:`#/releases${e!=="EN"?`/${e.toLowerCase().split("_")[0]}`:""}`,children:n.releases})}),N.jsx(_h.Item,{children:N.jsx(Di,{href:`#/mdui${e!=="EN"?`/${e.toLowerCase().split("_")[0]}`:""}`,children:"MDUI"})}),N.jsx(_h.Item,{children:N.jsx(Di,{href:{EN:"https://www.instructure.com/contact-us",ES_LA:"https://www.instructure.com/es/contact-us",PT_BR:"https://www.instructure.com/pt-br/contato",DE:"https://www.instructure.com/de/contact-us"}[e],children:n.contact})})]})]})},children:n.help})]})})})})}const lue={awkward:{EN:"Well, this is awkward.",ES_LA:"Esto es incómodo.",PT_BR:"Isso é constrangedor.",DE:"Das ist peinlich."},not_your_fault:{EN:"I'm not sure what happened, but I'm pretty sure it's not your fault.",ES_LA:"No estoy seguro de qué pasó, pero estoy bastante seguro de que no es tu culpa.",PT_BR:"Não tenho certeza do que aconteceu, mas tenho certeza de que não é sua culpa.",DE:"Ich bin mir nicht sicher, was passiert ist, aber ich bin mir ziemlich sicher, dass es nicht deine Schuld ist."},uhm:{EN:"Uhm...",ES_LA:"Ehm...",PT_BR:"Hã...",DE:"Ähm..."},class_dismissed:{EN:"class dismissed",ES_LA:"clase despedida",PT_BR:"classe dispensada",DE:"Klasse entlassen"}};function Op(){const t=th(Rd().language),e=ps(lue,t),n=x5();console.error(n);let i=e.not_your_fault;return n&&(i=` + }`,ole=(t,e,n)=>{const i=e.fluidWidth,r=e.iconPosition,o=e.size,s=e.variant,a=n.animate,l=r==="end"&&(s==="filled"||i),u=i?{display:"block",width:"100%"}:{},c={start:{marginInlineEnd:t.iconMargin,marginInlineStart:0},end:{marginInlineStart:t.iconMargin,marginInlineEnd:0}},d={small:{fontSize:t.fontSizeSmall},medium:{fontSize:t.fontSizeMedium},large:{fontSize:t.fontSizeLarge}},h={small:{fontSize:t.smallIconSize},medium:{fontSize:t.mediumIconSize},large:{fontSize:t.largeIconSize}},p=r==="start"&&!i?{small:{paddingInlineStart:`calc(${t.smallIconSize} + ${t.togglePadding})`,paddingInlineEnd:"0"},medium:{paddingInlineStart:`calc(${t.mediumIconSize} + ${t.togglePadding})`,paddingInlineEnd:"0"},large:{paddingInlineStart:`calc(${t.largeIconSize} + ${t.togglePadding})`,paddingInlineEnd:"0"}}:{small:{},medium:{},large:{}};return{toggleDetails:{label:"toggleDetails",fontFamily:t.fontFamily,fontWeight:t.fontWeight,lineHeight:t.lineHeight},summary:{label:"toggleDetails__summary",position:"relative",display:"flex",alignItems:"center",boxSizing:"border-box",textAlign:"start"},summaryText:{label:"toggleDetails__summaryText",minWidth:"0.0625rem",flexGrow:1,...l?{flex:1}:{}},toggle:{label:"toggleDetails__toggle",fontFamily:t.fontFamily,appearance:"none",cursor:"pointer",userSelect:"none",touchAction:"manipulation",position:"relative",overflow:"visible",boxSizing:"border-box",padding:"0",margin:"0",outline:"none",border:"none",background:"transparent",color:t.textColor,"&::-moz-focus-inner":{padding:"0",margin:"0"},"&::before":{content:'""',position:"absolute",top:"-0.375rem",left:"-0.375rem",right:"-0.375rem",bottom:"-0.375rem",border:`${t.toggleBorderWidth} ${t.toggleBorderStyle} ${t.toggleFocusBorderColor}`,borderRadius:`calc(${t.toggleBorderRadius} * 1.5)`,opacity:0,pointerEvents:"none"},"&:focus":{"&::before":{opacity:1}},"&:focus, &:hover, &:active":{textDecoration:"none",color:t.textColor},textDecoration:"none",...u,...d[o]},icon:{label:"toggleDetails__icon","& > svg":{display:"block"},...c[r],...h[o]},details:{label:"toggleDetails__details",boxSizing:"border-box",paddingTop:t.togglePadding,color:t.textColor,...d[o],...p[o]},content:a?{label:"toggleDetails__content",opacity:.01,animationName:rle,animationFillMode:"forwards",animationDuration:".3s"}:{}}},sle=t=>{const e=t.colors,n=t.spacing,i=t.borders,r=t.typography,o=t.key,s={canvas:{toggleFocusBorderColor:t["ic-brand-primary"],iconColor:t["ic-brand-font-color-dark"],textColor:t["ic-brand-font-color-dark"]}};return{...{fontFamily:r==null?void 0:r.fontFamily,fontWeight:r==null?void 0:r.fontWeightNormal,lineHeight:r==null?void 0:r.lineHeight,textColor:e==null?void 0:e.textDarkest,fontSizeSmall:r==null?void 0:r.fontSizeSmall,fontSizeMedium:r==null?void 0:r.fontSizeMedium,fontSizeLarge:r==null?void 0:r.fontSizeLarge,smallIconSize:"0.5rem",mediumIconSize:"0.75rem",largeIconSize:"1rem",iconMargin:n==null?void 0:n.xxSmall,iconColor:e==null?void 0:e.textDarkest,togglePadding:n==null?void 0:n.xxSmall,toggleBorderRadius:i==null?void 0:i.radiusMedium,toggleBorderWidth:i==null?void 0:i.widthMedium,toggleBorderStyle:i==null?void 0:i.style,toggleFocusBorderColor:e==null?void 0:e.borderBrand,filledBackgroundColor:e==null?void 0:e.backgroundLight,filledBorderWidth:i==null?void 0:i.widthSmall,filledBorderStyle:i==null?void 0:i.style,filledBorderColor:e==null?void 0:e.borderMedium,filledBorderRadius:i==null?void 0:i.radiusMedium,filledPadding:n==null?void 0:n.small},...s[o]}},ale={variant:f.oneOf(["default","filled"]),summary:f.node.isRequired,expanded:Su(f.bool,"onToggle","defaultExpanded"),defaultExpanded:f.bool,onToggle:f.func,icon:f.func,iconExpanded:f.func,iconPosition:f.oneOf(["start","end"]),fluidWidth:f.bool,children:f.node,size:f.oneOf(["small","medium","large"])},lle=["variant","summary","expanded","defaultExpanded","onToggle","icon","iconExpanded","iconPosition","fluidWidth","children","size"];var QI,FI,sg,Cl;let Q8=(QI=de(ole,sle),FI=Le(),QI(sg=FI(sg=(Cl=class F8 extends T.Component{constructor(...e){super(...e),this.ref=null,this._button=null,this.getButtonRef=n=>this._button=n,this.handleToggle=(n,i)=>{var r,o;typeof this.props.onToggle=="function"&&this.props.onToggle(n,i),(r=(o=this.props).makeStyles)===null||r===void 0||r.call(o,{animate:!0})}}get focused(){return Co(this._button)}focus(){var e;(e=this._button)===null||e===void 0||e.focus()}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,{animate:!1})}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,{animate:!0})}renderSummary(e){var n,i;const r=this.props,o=r.summary,s=r.iconPosition;return C("span",{css:(n=this.props.styles)===null||n===void 0?void 0:n.summary},s==="start"&&this.renderIcon(e),C("span",{css:(i=this.props.styles)===null||i===void 0?void 0:i.summaryText},o),s==="end"&&this.renderIcon(e))}renderToggle(e,n){const i=this.props.variant,r={...Re(this.props,F8.allowedProps),...e,children:this.renderSummary(n)},o=this.renderSummary(n);if(i==="filled")return C(Zk,Object.assign({},r,{display:"block",textAlign:"start",elementRef:this.getButtonRef}),o);if(r.href){var s;return C("a",Object.assign({},r,{css:(s=this.props.styles)===null||s===void 0?void 0:s.toggle,ref:this.getButtonRef}),o)}else{var a;return C("button",Object.assign({},r,{type:"button",css:(a=this.props.styles)===null||a===void 0?void 0:a.toggle,ref:this.getButtonRef}),o)}}renderIcon(e){var n;const i=e?this.props.iconExpanded:this.props.icon;return this.props.children&&i?C("span",{css:(n=this.props.styles)===null||n===void 0?void 0:n.icon},C(i,null)):null}renderDetails(e,n){var i;const r=this.props.children,o=e?{display:"block"}:{display:"none"};return C("div",Object.assign({},n,{css:[(i=this.props.styles)===null||i===void 0?void 0:i.details,o]}),r&&e&&this.renderContent())}renderContent(){var e;return C("div",{css:(e=this.props.styles)===null||e===void 0?void 0:e.content},this.props.children)}render(){return C(fP,Object.assign({},cs(this.props,fP.allowedProps),{onToggle:this.handleToggle}),({expanded:e,getToggleProps:n,getDetailsProps:i})=>{var r;return C("div",{css:(r=this.props.styles)===null||r===void 0?void 0:r.toggleDetails,ref:o=>{this.ref=o}},this.renderToggle(n(),e),this.renderDetails(e,i()))})}},Cl.displayName="ToggleDetails",Cl.componentId="ToggleDetails",Cl.allowedProps=lle,Cl.propTypes=ale,Cl.defaultProps={variant:"default",size:"medium",fluidWidth:!1,icon:ka,iconExpanded:wa,iconPosition:"start",defaultExpanded:!1,children:null},Cl))||sg)||sg);const Vr=T.createContext({layout:"desktop",inverseColor:!1}),ule=(t,e,n)=>{const i=e.status,r=e.variant,o=e.renderSubmenu,s=e.renderAvatar,a=e.customPopoverConfig,l=n.layout,u=n.inverseColor,c=l==="smallViewport",d=s?!1:i==="active"&&r==="default",h=o||a,p=`calc(${t.itemInlinePadding} - ${t.activeItemIndicatorSpacing})`;return{topNavBarItem:{label:"topNavBarItem",padding:`0 calc(${t.itemSpacing} / 2)`,height:"100%",display:"flex",justifyContent:"center",alignItems:h?"stretch":"center"},container:{label:"topNavBarItem__container",display:"flex",alignItems:"center",justifyContent:"center",position:"relative",...d&&{"&::after":{content:'""',position:"absolute",insetBlockEnd:0,insetInlineStart:p,insetInlineEnd:p,height:t.activeIndicatorWidth,background:u?t.activeIndicatorColorInverse:t.activeIndicatorColor,display:"block"}},"& a":{textDecoration:"none"}},content:{label:"topNavBarItem__content",fontSize:t.fontSize,fontFamily:t.fontFamily,fontWeight:t.fontWeight,appearance:"none",border:0,outline:0,margin:0,textDecoration:"none",whiteSpace:"nowrap",display:"flex",justifyContent:"center",alignItems:"center",color:u?t.colorInverse:t.color,...d&&{fontWeight:t.activeItemFontWeight},"*":{pointerEvents:"none"}},avatarContainer:{label:"topNavBarItem__avatarContainer",display:"flex",alignItems:"center",paddingInlineEnd:`calc(${t.iconTextGap} * 1.5)`},submenuTriggerContainer:{label:"topNavBarItem__submenuTriggerContainer",height:"100%",display:"flex",alignItems:"center"},submenuIcon:{label:"topNavBarItem__submenuIcon",fontSize:"0.875em",display:"flex",alignItems:"center",paddingInlineStart:t.iconTextGap},focusOutlineOffset:c?"0.375rem":"0.625rem",itemInlinePadding:t.itemInlinePadding}},cle=t=>{const e=t.colors,n=t.spacing,i=t.typography,r=t.borders;return{...{fontSize:i==null?void 0:i.fontSizeMedium,fontFamily:i==null?void 0:i.fontFamily,fontWeight:i==null?void 0:i.fontWeightNormal,color:"inherit",colorInverse:"inherit",itemInlinePadding:n==null?void 0:n.xSmall,itemSpacing:n==null?void 0:n.xSmall,iconTextGap:n==null?void 0:n.xSmall,activeItemFontWeight:i==null?void 0:i.fontWeightBold,activeItemIndicatorSpacing:"0.25rem",activeIndicatorWidth:r==null?void 0:r.widthMedium,activeIndicatorColor:e==null?void 0:e.textLightest,activeIndicatorColorInverse:e.textDarkest}}},Kx=f.oneOfType([f.string,f.shape({renderTip:f.oneOfType([f.node,f.func]).isRequired,color:f.oneOf(["primary","primary-inverse"]),placement:f.string,offsetX:f.oneOfType([f.string,f.number]),offsetY:f.oneOfType([f.string,f.number]),onShowContent:f.func,onHideContent:f.func})]),dle={id:f.string.isRequired,as:f.elementType,children:f.node.isRequired,variant:f.oneOf(["default","button","icon","avatar"]),status:f.oneOf(["default","active","disabled"]),renderSubmenu:pt.oneOf([Qn]),showSubmenuChevron:f.bool,customPopoverConfig:f.object,tooltip:Kx,renderAvatar:f.shape({avatarName:f.string.isRequired,avatarSrc:f.string,avatarAlt:f.string}),renderIcon:f.oneOfType([f.node,f.func]),href:f.string,onClick:f.func,onHiddenClick:f.func,onSubmenuToggle:f.func,onMouseOver:f.func,onMouseOut:f.func,onFocus:f.func,onBlur:f.func,onKeyDown:f.func,onKeyUp:f.func,elementRef:f.func,itemRef:f.func,shouldCloseOnClick:f.oneOf(["auto","always","never"])},zI=["id","as","children","variant","status","renderSubmenu","showSubmenuChevron","customPopoverConfig","tooltip","renderAvatar","renderIcon","href","onClick","onHiddenClick","onSubmenuToggle","onMouseOver","onMouseOut","onFocus","onBlur","onKeyDown","onKeyUp","elementRef","itemRef","shouldCloseOnClick"];var HI,UI,WI,cc,Es,VI,jI;const z8=1e4,XI=z8+1,hle=z8+2;let _o=(HI=Ht(),UI=de(ule,cle),WI=Le(),HI(cc=UI(cc=WI(cc=(Es=class extends T.Component{constructor(e){super(e),this.ref=null,this._itemRef=null,this._tooltipContentId=void 0,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.handleItemRef=n=>{const i=this.props.itemRef;this._itemRef=n,typeof i=="function"&&i(n)},this.handleKeyDown=n=>{if(n.key==="ArrowDown"&&(this.shouldRenderSubmenu&&!this.state.isSubmenuOpen||this.shouldRenderPopover&&!this.state.isPopoverOpen)){var i;n.preventDefault(),(i=this._itemRef)===null||i===void 0||i.click()}n.key==="Tab"&&this.state.isPopoverOpen&&!this.isCustomPopoverControlled&&this.setState({isPopoverOpen:!1})},this.handleMenuToggle=(n,i)=>{this.setState({isSubmenuOpen:i.shown}),typeof this.props.onSubmenuToggle=="function"&&this.props.onSubmenuToggle(n,i)},this._tooltipContentId=e.deterministicId("TopNavBarItem-tooltip"),this.state={isSubmenuOpen:!1,isPopoverOpen:!1}}componentDidMount(){const e=this.props,n=e.makeStyles,i=e.customPopoverConfig;n==null||n(this.makeStylesVariables),i&&this.isCustomPopoverControlled&&this.setState({isPopoverOpen:!!i.isShowingContent})}componentDidUpdate(){const e=this.props,n=e.makeStyles,i=e.customPopoverConfig;n==null||n(this.makeStylesVariables),i&&this.isCustomPopoverControlled&&i.isShowingContent!==this.state.isPopoverOpen&&this.setState({isPopoverOpen:!!i.isShowingContent})}get makeStylesVariables(){const e=this.context,n=e.layout,i=e.inverseColor;return{layout:n,inverseColor:i}}get shouldRenderSubmenu(){const e=this.props.renderSubmenu;return!!e&&Me(e,[Qn])}get shouldRenderPopover(){const e=this.props,n=e.id,i=e.renderSubmenu,r=e.customPopoverConfig;return r?r.children?r&&i?(Ne(!1,`TopNavBar.Items are not allowed to have both the "renderSubmenu" and "customPopoverConfig" props. For submenus, pass a Drilldown component via the "renderSubmenu" prop, and only use "customPopoverConfig" for custom features. Item with id: "${n}" will ignore the "customPopoverConfig" prop.`),!1):!0:(Ne(!1,`Pass the content of the custom Popover as "customPopoverConfig.children" for the item with id: "${n}".`),!1):!1}get isCustomPopoverControlled(){const e=this.props.customPopoverConfig;return e&&typeof e.isShowingContent<"u"}get hasOpenPopover(){return this.state.isSubmenuOpen||this.state.isPopoverOpen}get isDefaultVariant(){return this.props.variant==="default"||this.props.variant==="forceIconWithLabel"}get isButtonVariant(){return this.props.variant==="button"}get isIconVariant(){return this.props.variant==="icon"}get isAvatarOnlyVariant(){return this.props.variant==="avatar"}get hasAvatar(){const e=this.props,n=e.id,i=e.renderIcon,r=e.renderAvatar,o=e.variant,s=!!r;return this.isAvatarOnlyVariant&&!s?(Ne(!1,`The "renderAvatar" config is required for the 'variant="avatar"' type components, but received none for the item with id "${n}".`),!1):s&&(i||o==="icon")?(Ne(!1,` components with icons cannot display avatars, so the "renderAvatar" config prop will be ignored for item with id "${n}".`),!1):s}get submenuIcon(){var e;return!(this.shouldRenderSubmenu||this.shouldRenderPopover)||!this.props.showSubmenuChevron?null:C("span",{css:(e=this.props.styles)===null||e===void 0?void 0:e.submenuIcon},this.shouldRenderSubmenu&&this.state.isSubmenuOpen||this.shouldRenderPopover&&this.state.isPopoverOpen?VI||(VI=C(Cu,null)):jI||(jI=C(wa,null)))}get buttonThemeOverride(){const e=this.props.styles,n={};return(this.isDefaultVariant||this.hasAvatar)&&(n.mediumPaddingHorizontal=e==null?void 0:e.itemInlinePadding),this.hasAvatar&&(n.mediumPaddingTop="0.125rem",n.mediumPaddingBottom="0.125rem"),this.isAvatarOnlyVariant&&!this.submenuIcon&&(n.mediumPaddingHorizontal="0",n.mediumPaddingTop="0",n.mediumPaddingBottom="0"),Object.keys(n).length>0?n:void 0}get colorProps(){let e="primary-inverse",n="inverse";return this.context.inverseColor&&(e="secondary",n="info",this.isButtonVariant&&(e="primary")),{color:e,focusColor:n}}get ariaProps(){let e,n;return this.shouldRenderSubmenu&&(e="menu",n=this.state.isSubmenuOpen),this.shouldRenderPopover&&(e="true",n=this.state.isPopoverOpen),{"aria-haspopup":e,"aria-expanded":n}}get itemProps(){const e=this.props,n=e.id,i=e.as,r=e.variant,o=e.href,s=e.onClick,a=e.onMouseOver,l=e.onMouseOut,u=e.onFocus,c=e.onBlur,d=e.onKeyDown,h=e.onKeyUp,p=e.renderSubmenu,m=e.status,O=e.renderAvatar,y=e.renderIcon;let b=o,v=s,S=m;if(p&&(b&&(Ne(!1,`TopNavBar.Items with submenus are not allowed to have 'href' property, but received href "${b}" for item with the id: "${n}".`),b=void 0),v&&(Ne(!1,`TopNavBar.Items with submenus are not allowed to have 'onClick' property, but received onClick for item with the id: "${n}".Use the \`onSubmenuToggle\` prop instead. OnClick: ${v}`),v=void 0)),S==="active"&&!this.isDefaultVariant&&(Ne(!1,`Only \`variant="default"\` components can be set to active, but item with id "${n}" has variant: "${r}".`),S="default"),this.hasAvatar){if(!(O!=null&&O.avatarName))return Ge(!1,`The "avatarName" prop is required for for components with avatar, but the item with id "${n}" is missing it.`),null;S==="active"&&(Ne(!1,` components with avatar cannot have "active" status, so the "active" status on the item with id "${n}" will be ignored.`),S="default")}return this.isIconVariant&&!y?(Ge(!1,`The "renderIcon" prop is required for the \`variant="icon"\` type components, but the item with id "${n}" is missing it.`),null):{id:n,as:i,...this.colorProps,...this.ariaProps,size:"medium",withBorder:this.isButtonVariant,withBackground:this.isButtonVariant,interaction:S==="disabled"?"disabled":void 0,"aria-disabled":S==="disabled"?"true":void 0,shape:this.isAvatarOnlyVariant&&!this.submenuIcon?"circle":"rectangle",href:b,onClick:v,onMouseOver:a,onMouseOut:l,onFocus:u,onBlur:c,onKeyDown:ut(d,this.handleKeyDown),onKeyUp:h,renderIcon:y,themeOverride:this.buttonThemeOverride,elementRef:k=>{this.handleItemRef(k)}}}renderContent(){var e;const n=this.props,i=n.children,r=n.styles,o=this.itemProps;if(!o)return null;let s=i;this.isAvatarOnlyVariant?s=this.renderAvatar():this.isIconVariant&&(s=C(Vi,null,s));const a=C(rb,Object.assign({},o,It(Re(this.props,zI))),this.isIconVariant&&!this.submenuIcon?s:C("div",{css:r==null?void 0:r.content},this.hasAvatar&&!this.isAvatarOnlyVariant&&C("span",{css:(e=this.props.styles)===null||e===void 0?void 0:e.avatarContainer},this.renderAvatar()),s,this.submenuIcon));return C("div",{css:r==null?void 0:r.container},this.props.tooltip?this.wrapButtonInTooltip(a,i):a)}wrapButtonInTooltip(e,n){const i=this.props,r=i.tooltip,o=i.styles;if(!r)return e;let s={placement:"bottom",color:this.context.inverseColor?"primary":"primary-inverse"};typeof r=="string"?s.renderTip=r:s={...s,...r};const a=ot(s.renderTip);if(!a)return e;const l=a===n;return C(Yl,{theme:{componentOverrides:{View:{stackingTopmost:hle}}}},C(CM,Object.assign({},s,{renderTip:l?a:C("div",{id:this._tooltipContentId},a),positionContainerDisplay:"block"}),C("div",{css:o==null?void 0:o.submenuTriggerContainer},l?e:$t(e,{"aria-describedby":this._tooltipContentId}))))}renderAvatar(){if(!this.hasAvatar)return null;const e=this.props,n=e.id,i=e.children,o=e.renderAvatar,s=o.avatarName,a=o.avatarSrc,u=o.avatarAlt||(typeof i=="string"?i:void 0);return u||Ne(!1,`Please supply a label for the avatar with either the "renderAvatar.avatarAlt" or the "children" (as string) prop. It is needed for screen reader support, but missing on the item with the id: "${n}".`),s?C(qk,{name:s,src:a,alt:u,size:"small"}):null}renderDropdownMenu(){var e,n,i;const r=this.props,o=r.id,s=r.renderSubmenu,a=r.status,l=r.styles;return!s||!this.shouldRenderSubmenu?null:(typeof s.props.show<"u"&&Ne(!1,`TopNavBar.Item Drilldown submenus are controlled by the component. The "show" prop will be ignored on the submenu of the item with id: "${o}".`),s.props.trigger&&Ne(!1,`TopNavBar.Item submenus have the item itself as their trigger. The "trigger" prop will be ignored on the Drilldown submenu of item with id: "${o}".`),$t(s,{trigger:C("div",{css:l==null?void 0:l.submenuTriggerContainer},this.renderContent()),show:this.state.isSubmenuOpen,onToggle:ut((e=s.props)===null||e===void 0?void 0:e.onToggle,this.handleMenuToggle),positionContainerDisplay:"block",placement:"bottom start",withArrow:!1,minWidth:((n=s.props)===null||n===void 0?void 0:n.minWidth)||"18.5rem",maxHeight:((i=s.props)===null||i===void 0?void 0:i.maxHeight)||"calc(100vh - 10rem)",...a==="disabled"&&{disabled:!0,show:!1,onToggle:void 0}}))}renderPopover(){const e=this.props,n=e.id,i=e.customPopoverConfig,r=e.styles;if(!i||!this.shouldRenderPopover)return null;i.renderTrigger&&Ne(!1,`TopNavBar.Item popovers have the item itself as their trigger. The "renderTrigger" prop will be ignored on the popover of item with id: "${n}".`);const o={placement:"bottom start",withArrow:!0,shouldReturnFocus:!0,shouldContainFocus:!1,...i,positionContainerDisplay:"block",renderTrigger:C("div",{css:r==null?void 0:r.submenuTriggerContainer},this.renderContent()),onShowContent:ut(i.onShowContent,()=>{this.isCustomPopoverControlled||this.setState({isPopoverOpen:!0})}),onHideContent:ut(i.onHideContent,()=>{this.isCustomPopoverControlled||this.setState({isPopoverOpen:!1})}),isShowingContent:this.state.isPopoverOpen,"aria-expanded":void 0};return C(ob,o,i.children)}render(){const e=this.props.styles;let n;return this.shouldRenderPopover?n=C(Yl,{theme:{componentOverrides:{View:{stackingTopmost:XI}}}},this.renderPopover()):this.shouldRenderSubmenu?n=C(Yl,{theme:{componentOverrides:{View:{stackingTopmost:XI}}}},this.renderDropdownMenu()):n=this.renderContent(),C("div",{ref:this.handleRef,css:e==null?void 0:e.topNavBarItem},n)}},Es.displayName="TopNavBarItem",Es.componentId="TopNavBar.Item",Es.propTypes=dle,Es.allowedProps=zI,Es.defaultProps={status:"default",variant:"default",showSubmenuChevron:!0,shouldCloseOnClick:"auto"},Es.contextType=Vr,Es))||cc)||cc)||cc);const dO=(t,e={})=>{const n=[],i=e.currentPageId,r=e.renderOptionContent,o=iM();return T.Children.forEach(t,s=>{if(!s||!Me(s,[_o]))return;const a=s.props,l=a.renderSubmenu,u=a.customPopoverConfig,c=a.id,d=a.children,h=a.status,p=a.variant,m=a.href,O=a.onClick,y=a.shouldCloseOnClick;let b=l,v=u,S,k;const x=[];b&&(Me(b,[Qn])||(Ne(!1,`The "renderSubmenu" prop accepts only Drilldown components, but the item with id "${c}" received: "${l}".`),b=void 0),b&&(k=b.props.rootPageId,x.push(...T.Children.toArray(b.props.children)))),v&&(v.children||(Ne(!1,`Pass the content of the custom Popover as "customPopoverConfig.children" for the item with id: "${c}".`),v=void 0),b&&(Ne(!1,`TopNavBar.Items are not allowed to have both the "renderSubmenu" and "customPopoverConfig" props. For submenus, pass a Drilldown component via the "renderSubmenu" prop, and only use "customPopoverConfig" for custom features. Item with id: "${c}" will ignore the "customPopoverConfig" prop.`),v=void 0),v&&(S=Z5("TopNavBarItem__customPopoverOption",o),k=S,x.push(z.createElement(Qn.Page,{id:S,key:S},z.createElement(Qn.Option,{id:`${S}__option`},v.children)))));let _=s.props["aria-current"]||(c===i?"page":void 0);_&&(p!=="default"&&(Ne(!1,`Only \`variant="default"\` items can be set to current/active, but the item with id "${c}" is "${p}" variant.`),_=void 0),h==="disabled"&&(Ne(!1,`Disabled items can not be set to current/active, but the item with id "${c}" is disabled.`),_=void 0)),n.push({item:s,submenuPages:x,optionData:{id:c,disabled:h==="disabled",href:m,onOptionClick:w=>{O==null||O(w)},children:typeof r=="function"?r(d,{...s.props,status:_==="page"?"active":s.props.status}):d,subPageId:k,"aria-current":_,shouldCloseOnClick:y}})}),n},Jx=t=>t.map(n=>n.submenuPages).filter(n=>!!n).flat(),hO=t=>t.map(e=>{const n=e.optionData,r=e.item.props.onHiddenClick;return r&&(n.onOptionClick=r),z.createElement(Qn.Option,Object.assign({},n,{key:n.id,afterLabelContentVAlign:"center"}),n.children)}),fle=(t,e,n)=>{const i={display:"inline-block",padding:`0 ${t.smallViewportDropdownMenuActiveOptionIndicatorSpacing}`};return{topNavBarActionItems:{label:"topNavBarActionItems",boxSizing:"border-box",listStyleType:"none",margin:"0",padding:"0",flex:"0 0",display:"flex",flexDirection:"row",alignItems:"stretch",justifyContent:"flex-end",...n.layout==="smallViewport"&&{flex:"1 1",marginInlineStart:t.smallViewportActionItemContainerMargin,maxWidth:t.smallViewportActionItemContainerMaxWidth}},listItem:{label:"topNavBarActionItems__listItem",flex:"0 0"},dropdownMenuOption:{label:"topNavBarActionItems__dropdownMenuOption",...i},dropdownMenuOptionActive:{label:"topNavBarActionItems__dropdownMenuOptionActive",...i,fontWeight:t.smallViewportDropdownMenuActiveOptionFontWeight,paddingBlockEnd:t.smallViewportDropdownMenuActiveOptionIndicatorSpacing,borderBottom:`${t.smallViewportDropdownMenuActiveOptionIndicatorWidth} solid ${t.smallViewportDropdownMenuActiveOptionIndicatorColor}`}}},ple=t=>{const e=t.typography,n=t.spacing,i=t.borders;return{...{smallViewportActionItemContainerMargin:n==null?void 0:n.xxLarge,smallViewportActionItemContainerMaxWidth:"50%",smallViewportDropdownMenuActiveOptionFontWeight:e==null?void 0:e.fontWeightBold,smallViewportDropdownMenuActiveOptionIndicatorSpacing:"0.25rem",smallViewportDropdownMenuActiveOptionIndicatorWidth:i==null?void 0:i.widthMedium,smallViewportDropdownMenuActiveOptionIndicatorColor:"currentColor"}}},mle={children:pt.oneOf([_o]),listLabel:f.string,renderHiddenItemsMenuTriggerLabel:f.oneOfType([f.string,f.func]).isRequired,renderHiddenItemsMenuTriggerTooltip:f.oneOfType([Kx,f.func]),elementRef:f.func},a1=["children","listLabel","renderHiddenItemsMenuTriggerLabel","renderHiddenItemsMenuTriggerTooltip","elementRef"];var ZI,qI,YI,dc,Cs;let H8=(ZI=Ht(),qI=de(fle,ple),YI=Le(),ZI(dc=qI(dc=YI(dc=(Cs=class extends T.Component{constructor(e){super(e),this.ref=null,this._hiddenActionItemsMenuId=void 0,this._hiddenActionItemsMenuTriggerId=void 0,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.renderOptionContent=(n,i)=>{const r=this.props.styles,o=i.status;return C("span",{css:o==="active"?r==null?void 0:r.dropdownMenuOptionActive:r==null?void 0:r.dropdownMenuOption},n)},this._hiddenActionItemsMenuId=e.deterministicId("TopNavBarActionItems-hiddenActionItemsMenu"),this._hiddenActionItemsMenuTriggerId=e.deterministicId("TopNavBarActionItems-hiddenActionItemsMenuTrigger"),this.state={key:0,visibleActionItemsCount:void 0}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.makeStylesVariables)}componentDidUpdate(e){var n,i;(n=(i=this.props).makeStyles)===null||n===void 0||n.call(i,this.makeStylesVariables),this.context.layout==="smallViewport"&&z.Children.count(e.children)!==z.Children.count(this.props.children)&&this.setState({key:this.state.key+1})}get makeStylesVariables(){return{layout:this.context.layout}}get childrenArray(){return z.Children.toArray(this.props.children).map(n=>{if(!(n!=null&&n.props))return null;const i=n.props,r=i.id,o=i.renderAvatar,s=i.renderIcon,a=i.variant;return o?(Ne(!1,`Items in are not allowed to have avatars, please remove it from item with the id "${r}".`),$t(n,{renderAvatar:void 0,variant:"default"})):this.context.layout==="smallViewport"&&a!=="icon"?s?$t(n,{variant:a==="forceIconWithLabel"?"default":"icon"}):(Ge(!1,`Items in are required to have the \`renderIcon\` prop, because only the icons are displayed due to the lack of space. Please add an icon to the item with the id "${r}".`),null):n})}renderHiddenActionItemsMenu(e){const n=this.props,i=n.renderHiddenItemsMenuTriggerLabel,r=n.renderHiddenItemsMenuTriggerTooltip,o=dO(e,{renderOptionContent:this.renderOptionContent}),s=Jx(o),a=hO(o),l=typeof i=="function"?i(e.length):i,u=typeof r=="function"?r(e.length):r;return C(_o,{id:this._hiddenActionItemsMenuTriggerId,renderIcon:zd,variant:"icon",tooltip:u,showSubmenuChevron:!1,renderSubmenu:C(Qn,{rootPageId:this._hiddenActionItemsMenuId},[C(Qn.Page,{id:this._hiddenActionItemsMenuId,key:this._hiddenActionItemsMenuId},a),...s])},l)}renderTruncatedActionItemList(){const e=this.props,n=e.listLabel,i=e.styles;return C(KM,Object.assign({},It(Re(this.props,a1)),{key:this.state.key,elementRef:this.handleRef,css:i==null?void 0:i.topNavBarActionItems,visibleItemsCount:this.state.visibleActionItemsCount,onUpdate:({visibleItemsCount:r})=>{this.setState({visibleActionItemsCount:r})},renderHiddenItemMenu:r=>this.renderHiddenActionItemsMenu(r),"aria-label":n}),this.childrenArray)}render(){const e=this.props,n=e.listLabel,i=e.styles;return this.childrenArray.length?this.context.layout==="smallViewport"?this.renderTruncatedActionItemList():C("ul",Object.assign({},Re(this.props,a1),{ref:this.handleRef,css:i==null?void 0:i.topNavBarActionItems,"aria-label":n}),this.childrenArray.map(r=>C("li",{css:i==null?void 0:i.listItem,key:r.props.id},r))):null}},Cs.displayName="TopNavBarActionItems",Cs.componentId="TopNavBar.ActionItems",Cs.propTypes=mle,Cs.allowedProps=a1,Cs.defaultProps={},Cs.contextType=Vr,Cs))||dc)||dc)||dc);const gle=(t,e,n)=>{const i=e.iconBackground,r=n.layout==="desktop";return{topNavBarBrand:{label:"topNavBarBrand",display:"flex",alignItems:"stretch"},container:{label:"topNavBarBrand__container",display:"flex",justifyContent:"flex-start",alignItems:"stretch",border:0,outline:0,padding:0,margin:0,appearance:"none",textDecoration:"none"},name:{label:"topNavBarBrand__name",display:"flex",alignItems:"center",height:t.logoHeight},iconContainer:{label:"topNavBarBrand__iconContainer",display:"flex",justifyContent:"center",alignItems:"center",pointerEvents:"none",padding:t.iconPadding,background:r?i:void 0},icon:{label:"topNavBarBrand__icon",display:"flex",justifyContent:"center",alignItems:"center"},focusOutlineInset:t.focusOutlineInset}},Ole=t=>{const e=t.spacing;return{...{logoHeight:"2.25rem",logoPadding:e.small,iconPadding:e.small,focusOutlineInset:"-0.25rem"}}},ble={screenReaderLabel:f.string.isRequired,renderIcon:f.node,iconBackground:f.string,href:f.string,onClick:f.func,as:f.elementType,elementRef:f.func},GI=["screenReaderLabel","renderIcon","iconBackground","href","onClick","as","elementRef"];var KI,JI,ag,Ts;let U8=(KI=de(gle,Ole),JI=Le(),KI(ag=JI(ag=(Ts=class W8 extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){var e,n;"renderName"in this.props,"nameBackground"in this.props,(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.makeStylesVariables)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.makeStylesVariables)}get makeStylesVariables(){return{layout:this.context.layout}}render(){const e=this.props,n=e.screenReaderLabel,i=e.renderIcon,r=e.href,o=e.onClick,s=e.styles,a=oi(W8,this.props);return C("div",{ref:this.handleRef,css:s==null?void 0:s.topNavBarBrand},i&&C(be,Object.assign({},Re(this.props,GI),{css:s==null?void 0:s.container,as:a,href:r,onClick:o,position:"relative",focusColor:this.context.inverseColor?"info":"inverse",focusPosition:"inset",borderRadius:"medium",themeOverride:{focusOutlineInset:s==null?void 0:s.focusOutlineInset}}),C(Vi,null,n),i&&this.context.layout!=="smallViewport"&&C("div",{css:s==null?void 0:s.iconContainer,role:"presentation","aria-hidden":"true"},i)))}},Ts.displayName="TopNavBarBrand",Ts.componentId="TopNavBar.Brand",Ts.propTypes=ble,Ts.allowedProps=GI,Ts.defaultProps={},Ts.contextType=Vr,Ts))||ag)||ag);const V8=t=>{const e=t.colors,n=t.stacking,i=t.typography,r=t.spacing,o=t.borders;return{...{desktopFontSize:i==null?void 0:i.fontSizeMedium,desktopFontFamily:i==null?void 0:i.fontFamily,desktopFontWeight:i==null?void 0:i.fontWeightNormal,desktopBackground:e==null?void 0:e.backgroundBrandSecondary,desktopBackgroundInverse:e==null?void 0:e.backgroundLight,desktopBottomBorder:"none",desktopBottomBorderInverse:`${o==null?void 0:o.widthSmall} ${o==null?void 0:o.style} ${e==null?void 0:e.borderMedium}`,desktopHeight:"4rem",desktopZIndex:(n==null?void 0:n.topmost)+1,desktopInlinePadding:r.small,desktopBrandContainerInlineMargin:`0 ${r.medium}`,desktopMenuItemsContainerInlineMargin:`0 ${r.large}`,desktopActionItemsContainerInlineMargin:`${r.xSmall} 0`,desktopUserContainerInlineMargin:`${r.xSmall} 0`,desktopUserSeparatorGap:r==null?void 0:r.xSmall,desktopUserSeparatorHeight:"1.5rem",desktopUserSeparatorWidth:o==null?void 0:o.widthSmall,desktopUserSeparatorColor:e.borderMedium,desktopUserSeparatorColorInverse:e.borderMedium}}},j8=t=>{const e=t.colors,n=t.stacking,i=t.typography,r=t.spacing,o=t.borders;return{...{smallViewportFontSize:i==null?void 0:i.fontSizeMedium,smallViewportFontFamily:i==null?void 0:i.fontFamily,smallViewportFontWeight:i==null?void 0:i.fontWeightNormal,smallViewportBackground:e==null?void 0:e.backgroundBrandSecondary,smallViewportBackgroundInverse:e==null?void 0:e.backgroundLight,smallViewportBottomBorder:"none",smallViewportBottomBorderInverse:`${o==null?void 0:o.widthSmall} ${o==null?void 0:o.style} ${e==null?void 0:e.borderMedium}`,smallViewportHeight:"3.5rem",smallViewportInlinePadding:"0.25rem",smallViewportZIndex:(n==null?void 0:n.topmost)+1,smallViewportTrayPosition:"fixed",smallViewportTrayFixTopPosition:void 0,smallViewportTrayZIndex:(n==null?void 0:n.topmost)+1,smallViewportDropdownMenuActiveOptionFontWeight:i==null?void 0:i.fontWeightBold,smallViewportDropdownMenuActiveOptionIndicatorSpacing:"0.25rem",smallViewportDropdownMenuActiveOptionIndicatorWidth:o==null?void 0:o.widthMedium,smallViewportDropdownMenuActiveOptionIndicatorColor:"currentColor",smallViewportAlternativeTitleInlineMargin:r==null?void 0:r.xxSmall,smallViewportAlternativeTitleBlockMargin:"0"}}},yle=t=>({...{...V8(t),...j8(t)}}),vle=(t,e)=>{const n=e.border,i=e.shadow,r=e.size,o=e.placement,s={borderWidth:0,borderColor:t.borderColor,borderStyle:t.borderStyle},a=i?{boxShadow:t.boxShadow}:{},l=o==="start"||o==="end"||o==="center"?{label:"tray__content",minHeight:"100vh"}:{},u={top:{insetInlineStart:0,insetInlineEnd:0,top:0},bottom:{insetInlineStart:0,insetInlineEnd:0,bottom:0},start:{top:0,bottom:0,insetInlineStart:0,insetInlineEnd:"auto"},end:{top:0,bottom:0,insetInlineEnd:0,insetInlineStart:"auto"},center:{left:0,right:0,top:0,bottom:0}},c=n?{start:{borderInlineEndWidth:t.borderWidth},end:{borderInlineStartWidth:t.borderWidth},top:{borderBottomWidth:t.borderWidth},bottom:{borderTopWidth:t.borderWidth},center:{}}:{},d={"x-small":t.xSmallWidth,small:t.smallWidth,regular:t.regularWidth,medium:t.mediumWidth,large:t.largeWidth},h=o==="start"||o==="end"?{width:d[r]}:{};return{tray:{label:"tray",backgroundColor:t.background,position:t.position,overflowY:"auto",overflowX:"hidden",boxSizing:"border-box",zIndex:t.zIndex,maxWidth:"100vw",maxHeight:"100vh",...a,...u[o],...n&&s,...n&&c[o],...h},content:{label:"tray__content",...l}}},Sle=t=>{const e=t.colors,n=t.borders,i=t.shadows,r=t.breakpoints,o=t.stacking;return{...{background:e==null?void 0:e.backgroundLightest,borderColor:e==null?void 0:e.borderMedium,borderWidth:n==null?void 0:n.widthSmall,borderStyle:n==null?void 0:n.style,boxShadow:i==null?void 0:i.depth3,xSmallWidth:r==null?void 0:r.xSmall,smallWidth:"20em",regularWidth:r==null?void 0:r.small,mediumWidth:r==null?void 0:r.medium,largeWidth:r==null?void 0:r.large,zIndex:o==null?void 0:o.topmost,position:"fixed"}}},wle={label:f.string.isRequired,children:f.node,size:f.oneOf(["x-small","small","regular","medium","large"]),placement:f.oneOf(["top","bottom","start","end","center"]),open:f.bool,defaultFocusElement:f.oneOfType([f.element,f.func]),contentRef:f.func,shouldContainFocus:f.bool,shouldReturnFocus:f.bool,shouldCloseOnDocumentClick:f.bool,onOpen:f.func,onClose:f.func,onDismiss:f.func,mountNode:f.oneOfType([Si,f.func]),insertAt:f.oneOf(["bottom","top"]),liveRegion:f.oneOfType([Si,f.arrayOf(Si),f.func]),onTransition:f.func,onEnter:f.func,onEntering:f.func,onEntered:f.func,onExit:f.func,onExiting:f.func,onExited:f.func,transitionOnMount:f.bool,transitionEnter:f.bool,transitionExit:f.bool,border:f.bool,shadow:f.bool},kle=["label","children","size","placement","open","defaultFocusElement","contentRef","shouldContainFocus","shouldReturnFocus","shouldCloseOnDocumentClick","onOpen","onClose","onDismiss","mountNode","insertAt","liveRegion","onTransition","onEnter","onEntering","onEntered","onExit","onExiting","onExited","transitionOnMount","transitionEnter","transitionExit","border","shadow"],xle=["label","children","size","placement","open","defaultFocusElement","contentRef","shouldContainFocus","shouldReturnFocus","shouldCloseOnDocumentClick","onOpen","onClose","onDismiss","mountNode","insertAt","liveRegion","onEnter","onEntering","onEntered","onExit","onExiting","onExited","onTransition","transitionOnMount","transitionEnter","transitionExit","border","shadow","role"];var e3,t3,n3,hc,Tl;let _le=(e3=de(vle,Sle),t3=Mr(),n3=Le(),e3(hc=t3(hc=n3(hc=(Tl=class X8 extends T.Component{constructor(e){var n;super(e),this.ref=null,this.dialogRef=null,this.state=void 0,this.handleTransitionComplete=i=>{this.setState({transitioning:!1})},this.handlePortalOpen=i=>{i&&(this.DOMNode=i)},this.state={transitioning:!1,open:(n=e.open)!==null&&n!==void 0?n:!1}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(e,n){var i,r;if(this.props.open!==e.open){if(!this.props.open){var o;(o=this.dialogRef)===null||o===void 0||o.close()}this.setState({transitioning:!0,open:this.props.open})}(i=(r=this.props).makeStyles)===null||i===void 0||i.call(r)}get placement(){const e=this.props,n=e.placement;return e.dir===Mr.DIRECTION.rtl?Mv(n," "):n}get direction(){switch(this.placement){case"top":return"up";case"bottom":return"down";case"end":return"right";default:return"left"}}get transition(){return`slide-${this.direction}`}get DOMNode(){return this.ref}set DOMNode(e){this.ref=e||null}render(){var e,n;const i=this.props,r=i.label,o=i.children;i.size,i.placement;const s=i.open,a=i.defaultFocusElement,l=i.contentRef,u=i.shouldContainFocus,c=i.shouldReturnFocus,d=i.shouldCloseOnDocumentClick,h=i.onOpen,p=i.onClose,m=i.onDismiss,O=i.mountNode,y=i.insertAt,b=i.liveRegion,v=i.onEnter,S=i.onEntering,k=i.onEntered,x=i.onExit,_=i.onExiting,w=i.onExited,D=i.onTransition,W=i.transitionOnMount,I=i.transitionEnter,V=i.transitionExit;i.border,i.shadow;const B=i.role,H=Ie(i,xle),K=this.state.open||this.state.transitioning;return C(pM,{open:K,onOpen:this.handlePortalOpen,insertAt:y,mountNode:O},C(PM,{in:s,type:this.transition,onTransition:D,onEnter:v,onEntering:S,onEntered:ut(this.handleTransitionComplete,k,h),onExit:x,onExiting:_,onExited:ut(this.handleTransitionComplete,w,p),transitionOnMount:W,transitionEnter:I,transitionExit:V},C("span",Object.assign({},Re(H,X8.allowedProps),{css:(e=this.props.styles)===null||e===void 0?void 0:e.tray,ref:l}),C(zr,{ref:re=>this.dialogRef=re,as:"div",label:r,defaultFocusElement:a,open:!0,shouldContainFocus:u,shouldReturnFocus:c,shouldCloseOnDocumentClick:d,shouldCloseOnEscape:!0,liveRegion:b,onDismiss:m,role:B},C("div",{css:(n=this.props.styles)===null||n===void 0?void 0:n.content},o)))))}},Tl.displayName="Tray",Tl.componentId="Tray",Tl.allowedProps=kle,Tl.propTypes=wle,Tl.defaultProps={defaultFocusElement:null,open:!1,insertAt:"bottom",shouldCloseOnDocumentClick:!1,shouldContainFocus:!0,shouldReturnFocus:!0,size:"small",placement:"start",transitionOnMount:!0,transitionEnter:!0,transitionExit:!0,shadow:!0,border:!1},Tl))||hc)||hc)||hc);const Ele=(t,e,n)=>{const i=n.isDropdownMenuVisible,r=n.drilldownId,o=n.trayId,s=n.menuBottomPosition,a=n.inverseColor,l=t.smallViewportTrayFixTopPosition||`${s}px`,u={display:"inline-block",padding:`0 ${t.smallViewportDropdownMenuActiveOptionIndicatorSpacing}`},c={fontSize:t.smallViewportFontSize,fontFamily:t.smallViewportFontFamily,fontWeight:t.smallViewportFontWeight,background:a?t.smallViewportBackgroundInverse:t.smallViewportBackground,borderBlockEnd:a?t.smallViewportBottomBorderInverse:t.smallViewportBottomBorder,height:t.smallViewportHeight,maxWidth:"100%",paddingBlock:0,paddingInline:t.smallViewportInlinePadding,position:"relative",zIndex:t.smallViewportZIndex,display:"flex",justifyContent:"space-between",alignItems:"stretch",overflow:"hidden"};return{topNavBarSmallViewportLayout:{label:"topNavBarSmallViewportLayout"},navbar:{label:"topNavBarSmallViewportLayout__navbar",...c},inPlaceDialogContainer:{label:"topNavBarSmallViewportLayout__inPlaceDialogContainer",...c,alignItems:"center"},inPlaceDialogContainerContent:{label:"topNavBarSmallViewportLayout__inPlaceDialogContainerContent",flex:"1 1"},inPlaceDialogContainerButton:{label:"topNavBarSmallViewportLayout__inPlaceDialogContainerButton",flex:"0 0"},menuTriggerContainer:{label:"topNavBarSmallViewportLayout__menuTriggerContainer",display:"flex",alignItems:"stretch",justifyContent:"flex-start",flex:"1 1"},menuTrigger:{label:"topNavBarSmallViewportLayout__menuTrigger",display:"flex",alignItems:"center",justifyContent:"flex-start"},alternativeTitleContainer:{label:"topNavBarSmallViewportLayout__alternativeTitleContainer",marginBlock:t.smallViewportAlternativeTitleBlockMargin,marginInline:t.smallViewportAlternativeTitleInlineMargin},dropdownMenuOption:{label:"topNavBarSmallViewportLayout__dropdownMenuOption",...u},dropdownMenuOptionActive:{label:"topNavBarSmallViewportLayout__dropdownMenuOptionActive",...u,fontWeight:t.smallViewportDropdownMenuActiveOptionFontWeight,paddingBlockEnd:t.smallViewportDropdownMenuActiveOptionIndicatorSpacing,borderBottom:`${t.smallViewportDropdownMenuActiveOptionIndicatorWidth} solid ${t.smallViewportDropdownMenuActiveOptionIndicatorColor}`},dropdownMenuOptionWithAvatar:{label:"topNavBarSmallViewportLayout__dropdownMenuOptionWithAvatar",...u,display:"flex",alignItems:"center"},brandContainer:{label:"topNavBarSmallViewportLayout__brandContainer",display:"flex",alignItems:"stretch"},trayContainer:{label:"topNavBarSmallViewportLayout__trayContainer",width:"100%",position:t.smallViewportTrayPosition,insetBlockStart:l,insetInlineStart:"0px",zIndex:t.smallViewportTrayZIndex,...i&&{height:`calc(100% - ${l})`}},globalStyles:{[`#${o}`]:{height:"100%"},[`#${r}`]:{height:"100%","&::before":{top:"4px",left:"4px",right:"4px",bottom:"4px",zIndex:1}}},navbarHeight:t.smallViewportHeight}},Cle=t=>{const e={display:"inline-block",padding:`0 ${t.desktopSubmenuActiveOptionIndicatorSpacing}`};return{topNavBarMenuItems:{label:"topNavBarMenuItems",flex:"1 1",display:"flex",flexDirection:"row",alignItems:"stretch",padding:"0 0.125rem"},submenuOption:{label:"topNavBarMenuItems__submenuOption",...e},submenuOptionActive:{label:"topNavBarMenuItems__submenuOptionActive",...e,fontWeight:t.desktopSubmenuActiveOptionFontWeight,paddingBlockEnd:t.desktopSubmenuActiveOptionIndicatorSpacing,borderBottom:`${t.desktopSubmenuActiveOptionIndicatorWidth} solid ${t.desktopSubmenuActiveOptionIndicatorColor}`},itemSpacing:t.desktopItemSpacing}},Tle=t=>{const e=t.borders,n=t.typography;return{...{desktopItemSpacing:"1rem",desktopMaxWidth:"100%",desktopSubmenuActiveOptionFontWeight:n==null?void 0:n.fontWeightBold,desktopSubmenuActiveOptionIndicatorSpacing:"0.25rem",desktopSubmenuActiveOptionIndicatorWidth:e==null?void 0:e.widthMedium,desktopSubmenuActiveOptionIndicatorColor:"currentColor"}}},Ple={children:pt.oneOf([_o]),currentPageId:f.string,renderHiddenItemsMenuTriggerLabel:f.oneOfType([f.func,f.string]).isRequired,listLabel:f.string,elementRef:f.func},i3=["children","currentPageId","renderHiddenItemsMenuTriggerLabel","listLabel","elementRef"];var r3,o3,s3,fc,Ps,a3;let Z8=(r3=Ht(),o3=de(Cle,Tle),s3=Le(),r3(fc=o3(fc=s3(fc=(Ps=class extends T.Component{constructor(e){super(e),this._hiddenMenuItemsMenuTriggerId=void 0,this._hiddenItemsMenuId=void 0,this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.renderOptionContent=(n,i)=>{const r=this.props.styles;return C("span",{css:(i==null?void 0:i.status)==="active"?r==null?void 0:r.submenuOptionActive:r==null?void 0:r.submenuOption},n)},this._hiddenMenuItemsMenuTriggerId=e.deterministicId("TopNavBarMenuItems-hiddenMenuItemsMenuTrigger"),this._hiddenItemsMenuId=e.deterministicId("TopNavBarSmallViewportLayout-drilldown"),this.state={key:0,visibleItemsCount:void 0}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(e){var n,i;(n=(i=this.props).makeStyles)===null||n===void 0||n.call(i),z.Children.count(e.children)!==this.childrenArray.length&&this.setState({key:this.state.key+1})}get childrenArray(){return z.Children.toArray(this.props.children)}renderHiddenItemsMenu(e){const n=this.props,i=n.renderHiddenItemsMenuTriggerLabel,r=n.currentPageId;if(!e.length)return a3||(a3=C("span",null));const o=dO(e,{renderOptionContent:this.renderOptionContent,currentPageId:r}),s=Jx(o),a=hO(o),l=e.find(u=>u.props.status==="active");return C(_o,{id:this._hiddenMenuItemsMenuTriggerId,status:l?"active":"default",renderSubmenu:C(Qn,{rootPageId:this._hiddenItemsMenuId},[C(Qn.Page,{id:this._hiddenItemsMenuId,key:this._hiddenItemsMenuId},a),...s])},i(e.length))}renderChildren(){const e=this.props.currentPageId;return this.childrenArray.map(n=>{if(!n)return;const i=n.props,r=i.id,o=i.status,s=i.variant,a=i.renderSubmenu,l=i.renderAvatar,u=e===r;return l?(Ge(!1,`Items in are not allowed to have avatars, but item with id: "${r}" has \`renderAvatar\` prop.`),null):u?s!=="default"?(Ne(!1,`Only \`variant="default"\` items can be set to current/active, but the item with id "${r}" is "${s}" variant.`),n):o==="disabled"?(Ne(!1,`Disabled items can not be set to current/active, but the item with id "${r}" is disabled.`),n):$t(n,{status:"active","aria-current":a?void 0:"page"}):n})}render(){const e=this.props,n=e.listLabel,i=e.styles;return!this.childrenArray.length||this.context.layout==="smallViewport"?null:C(KM,Object.assign({},Re(this.props,i3),{key:this.state.key,elementRef:this.handleRef,css:i==null?void 0:i.topNavBarMenuItems,visibleItemsCount:this.state.visibleItemsCount,onUpdate:({visibleItemsCount:r})=>{this.setState({visibleItemsCount:r})},renderHiddenItemMenu:r=>this.renderHiddenItemsMenu(r)},(i==null?void 0:i.itemSpacing)&&{itemSpacing:i.itemSpacing},{"aria-label":n}),this.renderChildren())}},Ps.displayName="TopNavBarMenuItems",Ps.componentId="TopNavBar.MenuItems",Ps.propTypes=Ple,Ps.allowedProps=i3,Ps.defaultProps={},Ps.contextType=Vr,Ps))||fc)||fc)||fc);const Ale=()=>({topNavBarUser:{label:"topNavBarUser",flex:"0 0",display:"flex"}}),Rle={children:pt.oneOf([_o]).isRequired,elementRef:f.func},l3=["children","elementRef"];var u3,c3,lg,As;let q8=(u3=de(Ale,null),c3=Le(),u3(lg=c3(lg=(As=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}get content(){const e=z.Children.toArray(this.props.children),n=["default","button","avatar"];return T.Children.map(e,i=>{const r=i.props,o=r.id,s=r.variant;return s&&!n.includes(s)?(Ge(!1,`Item with id "${o}" has "${s}" variant, but only the following variants are allowed in : ${n.join(", ")}.`),null):i})}render(){const e=this.props.styles;return!this.content||this.content.length===0||this.context.layout==="smallViewport"?null:C("div",Object.assign({},Re(this.props,l3),{ref:this.handleRef,css:e==null?void 0:e.topNavBarUser}),this.content)}},As.displayName="TopNavBarUser",As.componentId="TopNavBar.User",As.propTypes=Rle,As.allowedProps=l3,As.defaultProps={},As.contextType=Vr,As))||lg)||lg);const Ile={onClick:f.func,elementRef:f.func,children:pt.oneOf([DZ])},$le=["children","onClick","elementRef"],Lle=(t,e)=>({topNavBarBreadcrumb:{label:"topNavBarBreadcrumb",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",flexGrow:1,border:0,outline:0,padding:0,margin:0,appearance:"none",textDecoration:"none"},iconContainer:{label:"topNavBarBreadcrumb__iconContainer",display:"flex",justifyContent:"center",alignItems:"center"},icon:{label:"topNavBarBreadcrumb__icon",display:"flex",justifyContent:"center",alignItems:"center"},breadcrumbContainer:{label:"topNavBarBreadcrumb__breadCrumbContainer",appearance:"none",textDecoration:"none",marginLeft:"0.75rem",flexGrow:1},linkContainer:{label:"topNavBarBreadcrumb__linkContainer",marginLeft:"0.5rem"}});var d3,h3,ug,Pl,f3;let Y8=(d3=de(Lle,null),h3=Le(),d3(ug=h3(ug=(Pl=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,{inverseColor:this.context.inverseColor})}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,{inverseColor:this.context.inverseColor})}renderMenu(){var e;const n=this.props.onClick;return C("div",{css:(e=this.props.styles)===null||e===void 0?void 0:e.icon},C(zo.Item,{id:"iconItem",variant:"icon",renderIcon:f3||(f3=C(_u,null)),onClick:n},"Hamburger menu"))}render(){const e=this.props,n=e.children,i=e.styles;this.context.inverseColor||Ge(!1,"[TopNavBarBreadcrumb] If the inverseColor prop is not set to true, TopNavBarBreadcrumb fails to render.");const o=z.Children.toArray(n)[0].props.children,s=z.Children.toArray(o)[z.Children.count(o)-2];return this.context.inverseColor&&(this.context.layout==="desktop"?C("div",{ref:this.handleRef,css:i==null?void 0:i.topNavBarBreadcrumb},C("div",{css:i==null?void 0:i.iconContainer},this.renderMenu()),C("div",{css:i==null?void 0:i.breadcrumbContainer},n)):C("div",{ref:this.handleRef,css:i==null?void 0:i.topNavBarBreadcrumb},C("div",{css:i==null?void 0:i.linkContainer},C(Mi,{href:s.props.href,isWithinText:!1,renderIcon:Ld},s.props.children))))}},Pl.displayName="TopNavBarBreadcrumb",Pl.propTypes=Ile,Pl.allowedProps=$le,Pl.defaultProps={},Pl.contextType=Vr,Pl))||ug)||ug);const e_={renderBrand:pt.oneOf([U8]),renderMenuItems:pt.oneOf([Z8]),renderActionItems:pt.oneOf([H8]),renderUser:pt.oneOf([q8]),renderBreadcrumb:pt.oneOf([Y8]),navLabel:f.string,elementRef:f.func},Nle={hideActionsUserSeparator:f.bool},G8={dropdownMenuToggleButtonLabel:f.string.isRequired,dropdownMenuToggleButtonTooltip:Kx,dropdownMenuLabel:f.string,alternativeTitle:f.node,renderInPlaceDialogConfig:f.shape({open:f.bool.isRequired,onClose:f.func.isRequired,closeButtonLabel:f.string.isRequired,content:f.oneOfType([f.node,f.func]),returnFocusElement:f.func,shouldContainFocus:f.bool,shouldCloseOnDocumentClick:f.bool,shouldCloseOnEscape:f.bool}),trayMountNode:f.oneOfType([Si,f.func]),onDropdownMenuToggle:f.func,onDropdownMenuSelect:f.func},Mle={...e_,smallViewportConfig:f.shape(G8).isRequired},t_=["renderBrand","renderMenuItems","renderActionItems","renderUser","renderBreadcrumb","navLabel","elementRef"],Dle=["hideActionsUserSeparator"],Ble=["dropdownMenuToggleButtonLabel","dropdownMenuToggleButtonTooltip","dropdownMenuLabel","alternativeTitle","renderInPlaceDialogConfig","trayMountNode","onDropdownMenuToggle","onDropdownMenuSelect"],Qle=[...t_,"smallViewportConfig"],Fle={...e_,...G8},p3=[...t_,...Ble];var m3,g3,O3,pc,Rs,b3,y3;let zle=(m3=Ht(),g3=de(Ele,j8),O3=Le(),m3(pc=g3(pc=O3(pc=(Rs=class extends T.Component{constructor(e){var n;super(e),this.ref=null,this._trayContainerId=void 0,this._trayId=void 0,this._drilldownId=void 0,this._menuTriggerId=void 0,this._menuId=void 0,this._inPlaceDialogId=void 0,this._inPlaceDialogCloseButtonId=void 0,this._separatorId=void 0,this._raf=[],this.handleRef=i=>{const r=this.props.elementRef;this.ref=i,typeof r=="function"&&r(i)},this.renderOptionContent=(i,r)=>{const o=this.props.styles,s=r.status,a=r.renderAvatar;let l=i,u=s==="active"?o==null?void 0:o.dropdownMenuOptionActive:o==null?void 0:o.dropdownMenuOption;if(a){const c=a.avatarName,d=a.avatarSrc,p=a.avatarAlt||(typeof i=="string"?i:void 0);u=o==null?void 0:o.dropdownMenuOptionWithAvatar,l=C(z.Fragment,null,C(qk,{name:c,src:d,alt:p,size:"small",margin:"0 small 0 0",role:"presentation","aria-hidden":"true"}),i)}return C("span",{css:u},l)},this._trayContainerId=e.deterministicId("TopNavBarSmallViewportLayout-trayContainer"),this._trayId=e.deterministicId("TopNavBarSmallViewportLayout-tray"),this._menuId=e.deterministicId("TopNavBarSmallViewportLayout-menu"),this._menuTriggerId=e.deterministicId("TopNavBarSmallViewportLayout-menuTrigger"),this._drilldownId=e.deterministicId("TopNavBarSmallViewportLayout-drilldown"),this._inPlaceDialogId=e.deterministicId("TopNavBarSmallViewportLayout-inPlaceDialog"),this._inPlaceDialogCloseButtonId=e.deterministicId("TopNavBarSmallViewportLayout-inPlaceDialogCloseButton"),this._separatorId=e.deterministicId("TopNavBarSmallViewportLayout-separator"),this.state={isDropdownMenuOpen:!1,isDropdownMenuVisible:!1,menuBottomPosition:Yn(((n=e.styles)===null||n===void 0?void 0:n.navbarHeight)||0)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.makeStylesVariables),this.updateMenuBottomPosition()}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.makeStylesVariables)}componentWillUnmount(){this._raf.forEach(e=>e.cancel()),this.state.isDropdownMenuOpen&&this.toggleDropdownMenu()}get makeStylesVariables(){return{isDropdownMenuVisible:this.state.isDropdownMenuVisible,drilldownId:this._drilldownId,trayId:this._trayId,menuBottomPosition:this.state.menuBottomPosition,inverseColor:this.context.inverseColor}}hasBrandBlock(e){return!!e&&!!e.props.renderIcon}hasMenuItemsBlock(e){return!!e&&z.Children.count(e.props.children)>0}hasActionItemsBlock(e){return!!e&&z.Children.count(e.props.children)>0}hasUserBlock(e){return!!e&&z.Children.count(e.props.children)>0}get hasSubmenu(){return(this.dropdownMenuContent||[]).length>0}get hasBreadcrumbBlock(){const e=this.props.renderBreadcrumb;return!!e&&z.Children.count(e.props.children)>0}get isInPlaceDialogOpen(){var e;return(e=this.props.renderInPlaceDialogConfig)===null||e===void 0?void 0:e.open}get mappedUserOptions(){const e=this.props.renderUser;if(!this.hasUserBlock(e))return[];const n=z.Children.toArray(e.props.children);return dO(n,{renderOptionContent:this.renderOptionContent})}get mappedMenuItemsOptions(){const e=this.props.renderMenuItems;if(!this.hasMenuItemsBlock(e))return[];const n=z.Children.toArray(e.props.children);return dO(n,{renderOptionContent:this.renderOptionContent,currentPageId:e.props.currentPageId})}get extractDrilldownSubpages(){return Jx([...this.mappedUserOptions,...this.mappedMenuItemsOptions])}updateMenuBottomPosition(){const e=Xt(this.ref);this.setState({menuBottomPosition:e.top+e.height})}toggleDropdownMenu(){const e=this.props.onDropdownMenuToggle,n=this.state.isDropdownMenuOpen;n||this.updateMenuBottomPosition(),typeof e=="function"&&e(!n),this.setState({isDropdownMenuOpen:!n})}renderMenuTrigger(){const e=this.props,n=e.dropdownMenuToggleButtonLabel,i=e.dropdownMenuToggleButtonTooltip,r=e.renderBrand,o=e.alternativeTitle,s=e.styles,a=this.state.isDropdownMenuOpen;let l;const u=[s==null?void 0:s.menuTrigger,...o?[s==null?void 0:s.alternativeTitleContainer]:[]];if(!this.hasSubmenu)l=null,o&&Ne(!1,"There are no menu items or user menu to display in the dropdown menu! The menu trigger and the alternative title will not display.");else{const c={id:this._menuTriggerId,onClick:()=>{this.toggleDropdownMenu()},tooltip:i,themeOverride:{itemSpacing:"0.375rem"},"aria-haspopup":"menu","aria-expanded":a},d={size:"x-small",style:{marginInlineEnd:"0.5em"}};l=C("div",{css:u},o?C(_o,Object.assign({},c,{"aria-label":n}),C(a?Cu:wa,d),o):C(_o,Object.assign({},c,{variant:"icon",renderIcon:a?b3||(b3=C(ou,null)):y3||(y3=C(_u,null))}),n))}return C("div",{css:s==null?void 0:s.menuTriggerContainer},l,this.hasBrandBlock(r)&&!o&&C("div",{css:s==null?void 0:s.brandContainer},r))}get dropdownMenuContent(){const e=this.props,n=e.renderUser,i=e.renderMenuItems,r=this.hasMenuItemsBlock(i),o=this.hasUserBlock(n);let s=[];return o&&(s=hO(this.mappedUserOptions),r&&s.push(C(Qn.Separator,{id:this._separatorId,key:this._separatorId}))),r&&(s=[...s,...hO(this.mappedMenuItemsOptions)]),s.length?s:void 0}renderDropdownMenu(){const e=this.props,n=e.dropdownMenuLabel,i=e.onDropdownMenuSelect;return C(Qn,{id:this._drilldownId,rootPageId:this._menuId,label:n,height:"100%",width:"100%",onSelect:(r,o)=>{typeof i=="function"&&i(r,o),(o.selectedOption.props.shouldCloseOnClick==="auto"&&o.selectedOption.props.href||o.selectedOption.props.shouldCloseOnClick==="always")&&this.toggleDropdownMenu()}},[C(Qn.Page,{id:this._menuId,key:this._menuId},this.dropdownMenuContent),...this.extractDrilldownSubpages])}renderDropdownMenuTray(){const e=this.props.trayMountNode;return this.hasSubmenu?C(_le,{id:this._trayId,label:"",role:"none",open:this.state.isDropdownMenuOpen,transitionExit:!1,onDismiss:()=>{this.toggleDropdownMenu()},onKeyUp:n=>{n.key==="Escape"&&this.toggleDropdownMenu()},onEnter:()=>{this.setState({isDropdownMenuVisible:!0})},onExited:()=>{this.setState({isDropdownMenuVisible:!1})},shouldCloseOnDocumentClick:!0,placement:"top",shadow:!1,mountNode:e||document.getElementById(this._trayContainerId),defaultFocusElement:()=>document.getElementById(this._drilldownId),themeOverride:{position:"absolute"}},this.renderDropdownMenu()):null}renderInPlaceDialog(){const e=this.props,n=e.renderInPlaceDialogConfig,i=e.styles;if(!n)return null;const r=n.content,o=n.open,s=n.onClose,a=n.closeButtonLabel,l=n.shouldContainFocus,u=n.shouldCloseOnEscape,c=n.shouldCloseOnDocumentClick,d=n.returnFocusElement,h=()=>{typeof s=="function"&&s(),d&&this._raf.push(Yo(()=>{var m;(m=d())===null||m===void 0||m.focus()}))};return C(zr,{display:"block",open:o,shouldContainFocus:l,shouldCloseOnEscape:u,shouldCloseOnDocumentClick:c,onDismiss:h},C("div",{id:this._inPlaceDialogId,css:i==null?void 0:i.inPlaceDialogContainer},C("div",{css:i==null?void 0:i.inPlaceDialogContainerContent},ot(r,{closeInPlaceDialog:h})),C("div",{css:i==null?void 0:i.inPlaceDialogContainerButton},C(_o,{id:this._inPlaceDialogCloseButtonId,renderIcon:ou,variant:"icon",onClick:h},a))))}render(){const e=this.props,n=e.trayMountNode,i=e.navLabel,r=e.renderActionItems,o=e.renderBreadcrumb,s=e.styles;return C("nav",Object.assign({},Re(this.props,p3),{ref:this.handleRef,"aria-label":i}),C(U5,{styles:s==null?void 0:s.globalStyles}),this.hasBreadcrumbBlock&&C("div",{css:s==null?void 0:s.navbar},o),!this.hasBreadcrumbBlock&&!this.isInPlaceDialogOpen&&C("div",{css:s==null?void 0:s.navbar},this.renderMenuTrigger(),this.hasActionItemsBlock(r)&&r),!this.hasBreadcrumbBlock&&this.renderInPlaceDialog(),!this.hasBreadcrumbBlock&&!n&&C("div",{css:s==null?void 0:s.trayContainer,id:this._trayContainerId}),!this.hasBreadcrumbBlock&&this.renderDropdownMenuTray())}},Rs.displayName="TopNavBarSmallViewportLayout",Rs.componentId="TopNavBar.SmallViewportLayout",Rs.propTypes=Fle,Rs.allowedProps=p3,Rs.defaultProps={},Rs.contextType=Vr,Rs))||pc)||pc)||pc);const Hle=(t,e,n)=>{const i=n.inverseColor,r=n.hasBrandBlock,o=n.hasActionItemsBlock,s=n.hasUserBlock,a=o&&s;return{topNavBarDesktopLayout:{label:"topNavBarDesktopLayout",flowMode:"logical",fontSize:t.desktopFontSize,fontFamily:t.desktopFontFamily,fontWeight:t.desktopFontWeight,background:i?t.desktopBackgroundInverse:t.desktopBackground,borderBlockEnd:i?t.desktopBottomBorderInverse:t.desktopBottomBorder,display:"flex",alignItems:"stretch",justifyContent:"space-between",height:t.desktopHeight,zIndex:t.desktopZIndex,maxWidth:"100%",overflow:"hidden",paddingInline:t.desktopInlinePadding,paddingBlock:0,...r&&{paddingInlineStart:0}},brandContainer:{label:"topNavBarDesktopLayout__brandContainer",display:"flex",flexGrow:0,flexShrink:0,marginBlock:0,marginInline:t.desktopBrandContainerInlineMargin},menuItemsContainer:{label:"topNavBarDesktopLayout__menuItemsContainer",display:"flex",flexGrow:1,flexShrink:1,marginBlock:0,marginInline:t.desktopMenuItemsContainerInlineMargin,overflow:"hidden"},actionItemsContainer:{label:"topNavBarDesktopLayout__actionItemsContainer",display:"flex",flexGrow:0,flexShrink:0,marginBlock:0,marginInline:t.desktopActionItemsContainerInlineMargin},spacer:{flexGrow:"1"},userContainer:{label:"topNavBarDesktopLayout__userContainer",display:"flex",flexGrow:0,flexShrink:0,marginBlock:0,marginInline:t.desktopUserContainerInlineMargin,...a&&{position:"relative",paddingInlineStart:t.desktopUserSeparatorGap,"&::before":{content:'""',position:"absolute",insetInlineStart:0,insetBlockStart:"50%",marginBlockStart:`calc(-${t.desktopUserSeparatorHeight} / 2)`,height:t.desktopUserSeparatorHeight,width:t.desktopUserSeparatorWidth,background:i?t.desktopUserSeparatorColorInverse:t.desktopUserSeparatorColor,display:"block"}}},breadcrumbContainer:{label:"topNavBarDesktopLayout__breadcrumbContainer",display:"flex",flexGrow:0,flexShrink:0,marginBlock:0,alignItems:"center"}}},Ule={...e_,...Nle},v3=[...t_,...Dle];var S3,w3,cg,Is;let Wle=(S3=de(Hle,V8),w3=Le(),S3(cg=w3(cg=(Is=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.makeStylesVariables)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.makeStylesVariables)}get makeStylesVariables(){return{inverseColor:this.context.inverseColor,hasBrandBlock:this.hasBrandBlock,hasActionItemsBlock:this.hasActionItemsBlock,hasUserBlock:this.hasUserBlock}}get hasBrandBlock(){const e=this.props.renderBrand;return!!e&&!!e.props.renderIcon}get hasActionItemsBlock(){const e=this.props.renderActionItems;return!!e&&z.Children.count(e.props.children)>0}get hasUserBlock(){const e=this.props.renderUser;return!!e&&z.Children.count(e.props.children)>0}get hasMenuItemsBlock(){const e=this.props.renderMenuItems;return!!e&&z.Children.count(e.props.children)>0}get hasBreadcrumbBlock(){const e=this.props.renderBreadcrumb;return!!e&&z.Children.count(e.props.children)>0}render(){const e=this.props,n=e.renderBrand,i=e.renderMenuItems,r=e.renderActionItems,o=e.renderUser,s=e.renderBreadcrumb,a=e.navLabel,l=e.styles,u=!(this.hasBrandBlock||this.hasMenuItemsBlock)&&this.hasBreadcrumbBlock;return C("nav",Object.assign({},Re(this.props,v3),{ref:this.handleRef,css:l==null?void 0:l.topNavBarDesktopLayout,"aria-label":a}),this.hasBrandBlock&&C("div",{css:l==null?void 0:l.brandContainer},n),this.hasMenuItemsBlock&&C("div",{css:l==null?void 0:l.menuItemsContainer},i),u&&s,C("span",{css:l==null?void 0:l.spacer}),this.hasActionItemsBlock&&C("div",{css:l==null?void 0:l.actionItemsContainer},r),this.hasUserBlock&&C("div",{css:l==null?void 0:l.userContainer},o))}},Is.displayName="TopNavBarDesktopLayout",Is.componentId="TopNavBar.DesktopLayout",Is.propTypes=Ule,Is.allowedProps=v3,Is.defaultProps={},Is.contextType=Vr,Is))||cg)||cg);const Vle=["smallViewportConfig","styles","makeStyles"];var k3,x3,dg,$s;let _3=(k3=de(null,yle),x3=Le(),k3(dg=x3(dg=($s=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){"desktopConfig"in this.props}get sortedThemeOverride(){const e=this.props.themeOverride;if(!e||typeof e=="function")return{desktopThemeOverride:e,smallViewportThemeOverride:e};const n={},i={};for(const r in e)if(r.startsWith("smallViewport")){const o=r;i[o]=e[o]}else if(r.startsWith("desktop")){const o=r;n[o]=e[o]}return{desktopThemeOverride:n,smallViewportThemeOverride:i}}render(){const e=this.props,n=e.smallViewportConfig;e.styles,e.makeStyles;const i=Ie(e,Vle);return this.context.layout==="smallViewport"?C(zle,Object.assign({},n,i,{themeOverride:this.sortedThemeOverride.smallViewportThemeOverride,elementRef:this.handleRef})):C(Wle,Object.assign({},i,{themeOverride:this.sortedThemeOverride.desktopThemeOverride,elementRef:this.handleRef}))}},$s.displayName="TopNavBarLayout",$s.componentId="TopNavBar.Layout",$s.propTypes=Mle,$s.allowedProps=Qle,$s.defaultProps={smallViewportConfig:{}},$s.contextType=Vr,$s))||dg)||dg);const jle={children:f.func,breakpoint:f.oneOfType([f.string,f.number]),mediaQueryMatch:f.oneOf(["element","media"]),inverseColor:f.oneOfType([f.bool,f.func]),elementRef:f.func},Xle=["children","breakpoint","mediaQueryMatch","inverseColor","elementRef"];var E3,C3,Xn;let zo=(E3=Le(),E3(C3=(Xn=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}get breakpoint(){return Yn(this.props.breakpoint)}render(){const e=this.props,n=e.children,i=e.mediaQueryMatch,r=e.inverseColor;return z.createElement(Ap,{elementRef:this.handleRef,match:i,query:{smallViewport:{maxWidth:this.breakpoint-1},desktop:{minWidth:this.breakpoint}},render:(o,s)=>{const a=s?s[0]:"smallViewport",l=typeof r=="function"?r(a):!!r,u=n({currentLayout:a,inverseColor:l});return Me(u,[_3])||Ge(!1,"The `children` function prop of TopNavBar has to return a child of type , but it returned:",u),z.createElement(Vr.Provider,{value:{layout:a,inverseColor:l}},u)}})}},Xn.displayName="TopNavBar",Xn.componentId="TopNavBar",Xn.ActionItems=H8,Xn.Brand=U8,Xn.Item=_o,Xn.Layout=_3,Xn.MenuItems=Z8,Xn.User=q8,Xn.Breadcrumb=Y8,Xn.contextType=Vr,Xn.propTypes=jle,Xn.allowedProps=Xle,Xn.defaultProps={breakpoint:1024,mediaQueryMatch:"media",inverseColor:!1},Xn))||C3);const Zle={made_with:{EN:"Made with",ES_LA:"Hecho con",PT_BR:"Feito com",DE:"Mit"},love:{EN:"love",ES_LA:"amor",PT_BR:"amor",DE:"liebe"},by:{EN:"by",ES_LA:"por",PT_BR:"por",DE:"gemacht von"}},dw=["EN","ES_LA","PT_BR","DE"],K8=[{lang:"English",local:"English",code:"EN"},{lang:"Spanish",local:"Español",code:"ES_LA"},{lang:"Portuguese",local:"Português",code:"PT_BR"},{lang:"German",local:"Deutsch",code:"DE"}];function nh(t="EN"){return dw.find(e=>e.includes(t.toUpperCase()))||"EN"}function ms(t,e="EN"){return Object.fromEntries(Object.entries(t).map(([n,i])=>[n,i[e]||i.EN]))}function ih({language:t}){const n=ms(Zle,t);return N.jsx(be,{id:"footer",as:"div",textAlign:"center",padding:"small",position:"absolute",insetBlockEnd:"0",margin:"0 auto",width:"100%",borderWidth:"small none none",children:N.jsxs(Vt,{transform:"uppercase",letterSpacing:"expanded",color:"primary-inverse",size:"small",children:[n.made_with," ",N.jsx(Dd,{color:"primary-inverse",title:n.love})," ",n.by," ",N.jsx(Mi,{color:"link-inverse",href:"https://www.instructure.com",children:"Instructure"})]})})}const qle="isp-site",Yle="3.1.2+1716989342",Gle="https://inst.bid/#/",Kle="module",Jle={app:"echo $npm_package_version",dev:"vite",build:"vite build",preview:"vite build && vite preview",predeploy:"make all && pnpm build",push:'pnpm predeploy && gh-pages -t -m "Deploy v$(pnpm -s app)" -d dist',"push-test":'pnpm predeploy && gh-pages -t -m "Deploy test v$(pnpm -s app)" -b test-gh-pages -d dist',"biome-apply":"pnpm lint && pnpm check && pnpm format",lint:"biome lint ./",check:"biome check --apply ./",format:"biome format --write ./",rage:"biome rage"},eue={"@instructure/browserslist-config-canvas-lms":"^2.0.0","@instructure/ui":"^9.0.1","gh-pages":"^6.1.1",react:"^18.3.1","react-dom":"^18.3.1","react-markdown":"^9.0.1","react-router-dom":"^6.23.1","rehype-raw":"^7.0.0","remark-gemoji":"^8.0.0","remark-gfm":"^4.0.0"},tue={"@biomejs/biome":"1.7.3","@types/react":"^18.3.3","@types/react-dom":"^18.3.0","@vitejs/plugin-react":"^4.3.0",vite:"^5.2.12"},nue={node:">=22.0.0",pnpm:">=9.1.2"},iue="pnpm@9.1.3+sha256.7f63001edc077f1cff96cacba901f350796287a2800dfa83fe898f94183e4f5f",rue={overrides:{"@instructure/ui-test-sandbox>sinon":"^17.0.1","gh-pages>globby":"11.1.0"}},oue=["extends @instructure/browserslist-config-canvas-lms"],sue={name:qle,version:Yle,homepage:Gle,private:!0,type:Kle,scripts:Jle,dependencies:eue,devDependencies:tue,engines:nue,packageManager:iue,pnpm:rue,browserslist:oue},Oi={owner:"thedannywahl",repo:"instructure-security-package",branch:"main",url:sue.homepage.replace("/#/",""),api:"https://api.github.com",raw:"https://raw.githubusercontent.com"},Al=`${Oi.raw}/${Oi.owner}/${Oi.repo}/${Oi.branch}/README`,Ii=["Instructure","Canvas","Mastery","Elevate","Impact","LearnPlatform","Parchment"],l1=[...Ii,"Canvas LMS","Canvas Mobile","Canvas Studio","Canvas Credentials","Canvas Catalog","Canvas Commons","Canvas Data","Mastery Connect","Mastery Item Bank","Mastery View Assessments","Elevate K-12 Analytics","Elevate Data Quality","Elevate Data Sync","Learn Platform"],J8=[{brandName:Ii[0],get title(){return this.brandName.toLowerCase()},route:"/",readme:`${Al}.md`,color:"#287A9F"},{brandName:Ii[1],get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title}`},get readme(){return`${Al}-${this.brandName}.md`},color:"#E72429"},{brandName:Ii[2],get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title}`},get readme(){return`${Al}-${this.brandName}.md`},color:"#24A159"},{brandName:Ii[3],get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title}`},get readme(){return`${Al}-${this.brandName}.md`},color:"#0097D3"},{brandName:Ii[4],get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title}`},get readme(){return`${Al}-${this.brandName}.md`},color:"#F76400"},{brandName:Ii[5],get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title}`},get readme(){return`${Al}-${this.brandName}.md`},color:"#0077CC"},{brandName:Ii[6],get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title}`},get readme(){return`${Al}-${this.brandName}.md`},color:"#0093b2"}],T3=(t,e)=>{const n=document.querySelector("body");for(const i of e)i.removeAttribute("aria-current"),i.classList.remove("active");if(t!==null&&t.hash!=="#/"&&(t.setAttribute("aria-current","page"),t.classList.add("active")),n.classList.remove(...Ii.map(i=>i.toLowerCase())),t!=null&&t.id.length){n.classList.add(t.id);const i=Ii.find(r=>r.toLowerCase()===t.id);document.title=`${i} Compliance Package`}else n.classList.add("instructure"),document.title="Instructure Compliance Packages"};window.addEventListener("load",()=>{let t=document.location.href.split("#")[1];const e=document.querySelectorAll("nav a");t!==void 0&&t!=="/"&&t!==null&&(t=document.getElementById(t.split("/")[1]),T3(t,e));for(const n of e)n.onclick=()=>{T3(n,e)}});const aue={language:{EN:"Language",ES_LA:"Idioma",PT_BR:"Idioma",DE:"Sprache"},help:{EN:"Help",ES_LA:"Ayuda",PT_BR:"Ajuda",DE:"Hilfe"},toggle_menu:{EN:"Toggle menu",ES_LA:"Alternar menú",PT_BR:"Alternar menu",DE:"Menü umschalten"},main_menu:{EN:"Main menu",ES_LA:"Menú principal",PT_BR:"Menu principal",DE:"Hauptmenü"},page_navigation:{EN:"Page navigation",ES_LA:"Navegación de la página",PT_BR:"Navegação da página",DE:"Seitenavigation"},more:{EN:"More",ES_LA:"Más",PT_BR:"Mais",DE:"Mehr"},actions:{EN:"Actions",ES_LA:"Acciones",PT_BR:"Ações",DE:"Aktionen"},more_actions:{EN:"More actions",ES_LA:"Más acciones",PT_BR:"Mais ações",DE:"Mehr Aktionen"},contact_info:{EN:"Contact Information",ES_LA:"Información de Contacto",PT_BR:"Informações de Contato",DE:"Kontaktinformationen"},info_overview:{EN:"This site and its contents are maintained by Instructure, inc.",ES_LA:"Este sitio y su contenido son mantenidos por Instructure, inc.",PT_BR:"Este site e seu conteúdo são mantidos pela Instructure, inc.",DE:"Diese Website und ihre Inhalte werden von Instructure, inc. gepflegt."},current_customers:{EN:"Current customers",ES_LA:"Clientes actuales",PT_BR:"Clientes atuais",DE:"Aktuelle kunden"},contact_csm:{EN:"Reach out to your CSM.",ES_LA:"Comuníquese con su CSM.",PT_BR:"Entre em contato com seu CSM.",DE:"Kontaktieren Sie Ihren CSM."},prospects:{EN:"Prospective customers",ES_LA:"Clientes potenciales",PT_BR:"Clientes em potencial",DE:"Potenzielle Kunden"},contact_sales:{EN:"Reach out to your sales contact.",ES_LA:"Comuníquese con su contacto de ventas.",PT_BR:"Entre em contato com seu contato de vendas.",DE:"Kontaktieren Sie Ihren Vertriebskontakt."},contact_general:{EN:"For general inquiries email",ES_LA:"Para consultas generales envíe un correo electrónico a",PT_BR:"Para perguntas gerais, envie um e-mail para",DE:"Für allgemeine Anfragen senden Sie eine E-Mail an"},redirects:{EN:"Redirects",ES_LA:"Redirecciones",PT_BR:"Redirecionamentos",DE:"Weiterleitungen"},releases:{EN:"Releases",ES_LA:"Lanzamientos",PT_BR:"Lançamentos",DE:"Veröffentlichungen"},contact:{EN:"Contact",ES_LA:"Contacto",PT_BR:"Contato",DE:"Kontakt"}};function rh({language:t}){const e=t,n=ms(aue,e),i=[...J8];return i.shift(),N.jsx(be,{id:"nav",as:"div",tabIndex:0,children:N.jsx(zo,{inverseColor:!0,children:()=>N.jsx(zo.Layout,{navLabel:"main",smallViewportConfig:{dropdownMenuToggleButtonLabel:n.toggle_menu,dropdownMenuLabel:n.main_menu},themeOverride:{desktopBackgroundInverse:"#FFF",smallViewportBackgroundInverse:"#FFF"},renderBrand:N.jsx(zo.Brand,{screenReaderLabel:"Instructure",renderIcon:N.jsx(Xd,{size:"small",color:"primary-inverse",height:"2.5rem",width:"2.5rem"}),iconBackground:"#287A9F",href:`#/${e==="EN"?"":e.toLowerCase().split("_")[0]}`}),renderMenuItems:N.jsx(zo.MenuItems,{listLabel:n.page_navigation,currentPageId:"",renderHiddenItemsMenuTriggerLabel:r=>`${r} ${n.more}`,children:i.map(r=>N.jsx(zo.Item,{id:r.title,href:`#${r.route}${e==="EN"?"":`/${e.toLowerCase().split("_")[0]}`}`,themeOverride:{activeIndicatorColor:r.color},children:r.brandName},r.title))}),renderActionItems:N.jsxs(zo.ActionItems,{listLabel:n.actions,renderHiddenItemsMenuTriggerLabel:r=>`${r} ${n.more_actions}`,children:[N.jsx(zo.Item,{id:"langSwitcher",showSubmenuChevron:!0,tooltip:n.language,renderIcon:N.jsx(Md,{}),renderSubmenu:N.jsx(Qn,{id:"language",rootPageId:"language",children:N.jsx(Qn.Page,{id:"language",children:K8.map(r=>N.jsx(Qn.Option,{id:r.lang,disabled:r.code===e,children:r.code===e?r.local:N.jsx(tU,{className:"lang",to:`./${r.code!=="EN"?r.code.toLowerCase().split("_")[0]:""}`,children:r.local})},r.code))})}),children:n.language}),N.jsx(zo.Item,{id:"info",showSubmenuChevron:!1,tooltip:n.help,renderIcon:N.jsx(Hd,{}),customPopoverConfig:{on:"click",placement:"bottom end",shouldContainFocus:!0,children:N.jsxs(be,{id:"help",as:"div",padding:"medium",width:"25rem",role:"dialog",tabIndex:0,"aria-label":n.contact_info,position:"relative",borderRadius:"small",children:[N.jsx(Tr,{level:"h3",children:n.contact_info}),N.jsx(Vt,{children:n.info_overview}),N.jsxs(be,{as:"div",margin:"medium 0 0",children:[N.jsx(Vt,{weight:"bold",children:n.current_customers}),N.jsx("br",{}),N.jsx(Vt,{children:n.contact_csm})]}),N.jsxs(be,{as:"div",margin:"medium 0 0",children:[N.jsx(Vt,{weight:"bold",children:n.prospects}),N.jsx("br",{}),N.jsx(Vt,{children:n.contact_sales}),N.jsx("br",{}),N.jsxs(Vt,{children:[n.contact_general," "]})]}),N.jsx(be,{as:"hr",shadow:"topmost",borderWidth:"small",margin:"small none",padding:"none",borderColor:"primary"}),N.jsxs(Eh,{delimiter:"pipe",size:"small",children:[N.jsx(Eh.Item,{children:N.jsx(Mi,{href:`#/links${e!=="EN"?`/${e.toLowerCase().split("_")[0]}`:""}`,children:n.redirects})}),N.jsx(Eh.Item,{children:N.jsx(Mi,{href:`#/releases${e!=="EN"?`/${e.toLowerCase().split("_")[0]}`:""}`,children:n.releases})}),N.jsx(Eh.Item,{children:N.jsx(Mi,{href:`#/mdui${e!=="EN"?`/${e.toLowerCase().split("_")[0]}`:""}`,children:"MDUI"})}),N.jsx(Eh.Item,{children:N.jsx(Mi,{href:{EN:"https://www.instructure.com/contact-us",ES_LA:"https://www.instructure.com/es/contact-us",PT_BR:"https://www.instructure.com/pt-br/contato",DE:"https://www.instructure.com/de/contact-us"}[e],children:n.contact})})]})]})},children:n.help})]})})})})}const lue={awkward:{EN:"Well, this is awkward.",ES_LA:"Esto es incómodo.",PT_BR:"Isso é constrangedor.",DE:"Das ist peinlich."},not_your_fault:{EN:"I'm not sure what happened, but I'm pretty sure it's not your fault.",ES_LA:"No estoy seguro de qué pasó, pero estoy bastante seguro de que no es tu culpa.",PT_BR:"Não tenho certeza do que aconteceu, mas tenho certeza de que não é sua culpa.",DE:"Ich bin mir nicht sicher, was passiert ist, aber ich bin mir ziemlich sicher, dass es nicht deine Schuld ist."},uhm:{EN:"Uhm...",ES_LA:"Ehm...",PT_BR:"Hã...",DE:"Ähm..."},class_dismissed:{EN:"class dismissed",ES_LA:"clase despedida",PT_BR:"classe dispensada",DE:"Klasse entlassen"}};function bp(){const t=nh(Id().language),e=ms(lue,t),n=x5();console.error(n);let i=e.not_your_fault;return n&&(i=` ${n.status?`${n.status} ${n.statusText}
`:""} ${n.message?n.message:e.not_your_fault} - `),N.jsxs(N.Fragment,{children:[N.jsx(ih,{language:t}),N.jsx(ye,{id:"main",as:"div",padding:"medium medium xx-large",minWidth:"20rem",maxWidth:"59.25rem",margin:"0 auto",children:N.jsx(RM,{size:"medium",heading:e.awkward,headingAs:"h1",message:N.jsxs(N.Fragment,{children:[N.jsx(Wt,{as:"p",children:N.jsx("i",{children:i})}),N.jsxs(Wt,{as:"p",children:[e.uhm," ",N.jsx(Di,{href:"./#/",children:e.class_dismissed}),"."]})]})})}),N.jsx(nh,{language:t})]})}const uue={header:{EN:"Redirect Links",ES_LA:"Enlaces de Redirección",PT_BR:"Links de Redirecionamento",DE:"Weiterleitungslinks"},description:{EN:"This page provides a collection of shortened URLs for use in RFP responses. Each row has a short URL and the original URL. Click on the copy icon and the short URL will be added to your clipboard.",ES_LA:"Esta página proporciona una colección de URL abreviadas para usar en las respuestas a RFP. Cada fila tiene una URL corta y la URL original. Haga clic en la copia y la URL corta se agregará a su portapapeles.",PT_BR:"Esta página fornece uma coleção de URLs abreviados para uso em respostas de RFP. Cada linha possui um URL curto e o URL original. Clique na cópia ícone e o URL curto serão adicionados à sua área de transferência.",DE:"Diese Seite bietet eine Sammlung verkürzter URLs zur Verwendung in RFP-Antworten. Jede Zeile enthält eine Kurz-URL und die Original-URL. Klicken Sie auf die Kopie-Symbol und die Kurz-URL wird Ihrer Zwischenablage hinzugefügt."},filters:{EN:"Filters",ES_LA:"Filtros",PT_BR:"Filtros",DE:"filter"},toggleShow:{EN:"Show filters",ES_LA:"Mostrar filtros",PT_BR:"Mostrar filtros",DE:"Filter anzeigen"},toggleHide:{EN:"Hide filters",ES_LA:"Ocultar filtros",PT_BR:"Ocultar filtros",DE:"Filter ausblenden"},search:{EN:"Search",ES_LA:"Buscar",PT_BR:"Procurar",DE:"Suche"},clearSearch:{EN:"Clear search",ES_LA:"Borrar búsqueda",PT_BR:"Limpar pesquisa",DE:"Suche löschen"},placeholder:{EN:"community",ES_LA:"comunidad",PT_BR:"comunidade",DE:"Gemeinschaft"},brands:{EN:"Brands",ES_LA:"Marcas",PT_BR:"Marcas",DE:"Marken"},products:{EN:"Products",ES_LA:"Productos",PT_BR:"Produtos",DE:"Produkte"},language:{EN:"Language",ES_LA:"Idioma",PT_BR:"Idioma",DE:"Sprache"},title:{EN:"Title",ES_LA:"Título",PT_BR:"Título",DE:"Titel"},link:{EN:"Link",ES_LA:"Enlace",PT_BR:"Link",DE:"Link"},copy:{EN:"Copy",ES_LA:"Copiar",PT_BR:"Copiar",DE:"Kopieren"},copy_url:{EN:"Copy URL to clipboard",ES_LA:"Copiar URL al portapapeles",PT_BR:"Copiar URL para a área de transferência",DE:"Kopieren Sie die URL in die Zwischenablage"}},cue=[{title:"CAIQ",from:"/aws/caiq/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Amazon%20Web%20Services/AWS%20CAIQ%20v4.0.2.pdf"},{title:"Cyber Essentials+ Certificate",from:"/aws/ce/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Amazon%20Web%20Services/AWS%20CE%20Plus%20Certificate.pdf"},{title:"CSA Star Level 2 Certificate",from:"/aws/csa/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Amazon%20Web%20Services/AWS%20CSA%20Star%20Level%202%20Certificate.pdf"},{title:"ISO 27001 Certificate",from:"/aws/iso/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Amazon%20Web%20Services/AWS%20ISO%2027001%20Certificate.pdf"},{title:"ISO 9001 Certificate",from:"/aws/iso9001/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Amazon%20Web%20Services/AWS%20ISO%209001%20Certificate.pdf"},{title:"SOC 3 Report",from:"/aws/soc/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Amazon%20Web%20Services/AWS%20SOC%203.pdf"}],due=cue.map(t=>({...t,lang:"EN"})),hue={brand:"AWS",links:due},fue=[{title:"Gemeinschaft",from:"/de/canvas/gemeinschaft",to:"https://community.canvaslms.com/t5/Ressourcen-auf-Deutsch-German/ct-p/german_resources"}],pue=fue.map(t=>({...t,lang:"DE"})),mue=[{title:"Security Audit Report",from:"/canvas/audit/dl",to:"https://github.com/thedannywahl/instructure-security-package/raw/canvas-lms/Canvas%20LMS/Canvas%20Security%20Audit%20Report.pdf"},{title:"Try Canvas (FFT)",from:"/try-canvas",to:"https://www.instructure.com/try-canvas"},{title:"Community",from:"/canvas/community",to:"https://community.canvaslms.com/t5/Canvas/ct-p/canvas"},{title:"Roadmap",from:"/canvas/roadmap",to:"https://community.canvaslms.com/t5/Canvas-Product-Roadmap/ct-p/canvas-product-roadmap"},{title:"Ideas",from:"/canvas/ideas",to:"https://community.canvaslms.com/t5/Canvas-Ideas-and-Themes/ct-p/canvas-ideas-themes?tab=identified"}],gue=mue.map(t=>({...t,lang:"EN"})),Oue=[{title:"Communidad",from:"/es-la/canvas/lms/communidad",to:"https://community.canvaslms.com/t5/Recursos-en-Espa%C3%B1ol-Spanish/ct-p/espanol_resources"}],bue=Oue.map(t=>({...t,lang:"ES_LA"})),yue=[{title:"Comunidade",from:"/pt-br/canvas/comunidade",to:"https://community.canvaslms.com/t5/Recursos-em-Portugu%C3%AAs-Portuguese/ct-p/portuguese_resources"}],vue=yue.map(t=>({...t,lang:"PT_BR"})),Sue={brand:"Canvas",links:[...gue,...bue,...vue,...pue]},wue=[{title:"Compliance Package",from:"/canvas/catalog/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/canvas-catalog.zip"},{title:"PCI AOC SAQ",from:"/canvas/catalog/aoc/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-catalog/Canvas%20Catalog/2023%20Instructure%20PCI%20DSS%20v3.2.1%20AOC%20SAQ-D%20Service%20Provider.pdf"},{title:"Architecture Paper",from:"/canvas/catalog/architecture/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-catalog/Canvas%20Catalog/Canvas%20Catalog%20Architecture.pdf"},{title:"HECVAT Lite",from:"/canvas/catalog/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-catalog/Canvas%20Catalog/Canvas%20Catalog%20HECVAT%20Lite.xlsx"},{title:"PCI Shared Responsibility Matrix",from:"/canvas/catalog/pci/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-catalog/Canvas%20Catalog/Canvas%20Catalog%20PCI%20Responsibility%20Matrix.pdf"},{title:"TX-RAMP Certification",from:"/canvas/catalog/tx-ramp/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-catalog/Canvas%20Catalog/Canvas%20Catalog%20TX-RAMP%20Provisional%20Certificate.pdf"},{title:"Payment Redirector",from:"/canvas/catalog/payments/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-catalog/Canvas%20Catalog/Catalog%20Payment%20Redirector.png"},{title:"Home (HE)",from:"/canvas/catalog",to:"https://www.instructure.com/higher-education/products/canvas/canvas-catalog/"},{title:"Home (K12)",from:"/canvas/catalog/k12",to:"https://www.instructure.com/k12/products/canvas/canvas-catalog/"},{title:"Guides",from:"/canvas/catalog/guides",to:"https://community.canvaslms.com/t5/Canvas-Catalog/ct-p/canvas_catalog"},{title:"Release Notes",from:"/canvas/catalog/releases",to:"https://community.canvaslms.com/t5/Catalog-Releases/ct-p/catalog_releases"},{title:"API",from:"/canvas/catalog/api",to:"https://api.catalog.instructure.com/api/docs"}],kue=wue.map(t=>({...t,lang:"EN"})),xue={brand:"Canvas Catalog",links:kue},_ue=[{title:"Home",from:"/canvas/commons",to:"https://lor.instructure.com/"},{title:"Guides",from:"/canvas/commons/guides",to:"https://community.canvaslms.com/t5/Canvas-Commons/tkb-p/commons"},{title:"API",from:"/canvas/commons/api",to:"https://lor.instructure.com/docs/api/"}],Eue=_ue.map(t=>({...t,lang:"EN"})),Cue={brand:"Canvas Commons",links:Eue},Tue=[{title:"Compliance Package",from:"/canvas/credentials/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/canvas-credentials.zip"},{title:"VPAT",from:"/canvas/credentials/vpat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-credentials/Canvas%20Credentials/Canvas%20Credentials%20(formerly%20Badgr)%20VPAT.pdf"},{title:"Architecture Paper",from:"/canvas/credentials/architecture/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-credentials/Canvas%20Credentials/Canvas%20Credentials%20Architecture.pdf"},{title:"HECVAT",from:"/canvas/credentials/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-credentials/Canvas%20Credentials/Canvas%20Credentials%20HECVAT%20Full.xlsx"},{title:"TX-RAMP Certification",from:"/canvas/credentials/tx-ramp/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-credentials/Canvas%20Credentials/Canvas%20Credentials%20TX-RAMP%20Level%202%20Certification.pdf"},{title:"Home (HE)",from:"/canvas/credentials",to:"https://www.instructure.com/higher-education/products/canvas/canvas-credentials-digital-badges/"},{title:"Home (K12)",from:"/canvas/credentials/k12",to:"https://www.instructure.com/k12/products/canvas/canvas-credentials-digital-badges/"},{title:"Guides",from:"/canvas/credentials/guides",to:"https://community.canvaslms.com/t5/Canvas-Credentials-Badges-Badgr/ct-p/canvas-credentials-badges"},{title:"Release Notes",from:"/canvas/credentials/releases",to:"https://community.canvaslms.com/t5/Badges-Credentials-Releases/tkb-p/badges-release"},{title:"API",from:"/canvas/credentials/api",to:"https://api.badgr.io/docs/v2/"}],Pue=Tue.map(t=>({...t,lang:"EN"})),Aue=[{title:"Compliance Package",from:"/es-la/canvas/credentials/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/canvas-credentials-ES_LA.zip"},{title:"VPAT",from:"/es-la/canvas/credentials/vpat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-credentials-ES_LA/Canvas%20Credentials/Canvas%20Credentials%20(formerly%20Badgr)%20VPAT.pdf"},{title:"Papel de Arquitectura",from:"/es-la/canvas/credentials/arquitectura/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-credentials-ES_LA/Canvas%20Credentials/Canvas%20Credentials%20Architecture_ES.pdf"},{title:"HECVAT",from:"/es-la/canvas/credentials/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-credentials-ES_LA/Canvas%20Credentials/Canvas%20Credentials%20HECVAT%20Full.xlsx"},{title:"Certificado de Nivel 2 de TX-RAMP",from:"/es-la/canvas/credentials/tx-ramp/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-credentials-ES_LA/Canvas%20Credentials/Canvas%20Credentials%20TX-RAMP%20Level%202%20Certification.pdf"}],Rue=Aue.map(t=>({...t,lang:"ES_LA"})),Iue=[{title:"Compliance Package",from:"/pt-br/canvas/credentials/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/canvas-credentials-PT_BR.zip"},{title:"VPAT",from:"/pt-br/canvas/credentials/vpat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-credentials-PT_BR/Canvas%20Credentials/Canvas%20Credentials%20(formerly%20Badgr)%20VPAT.pdf"},{title:"Papel de Arquitectura",from:"/pt-br/canvas/credentials/arquitectura/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-credentials-PT_BR/Canvas%20Credentials/Canvas%20Credentials%20Architecture_PT.pdf"},{title:"HECVAT",from:"/pt-br/canvas/credentials/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-credentials-PT_BR/Canvas%20Credentials/Canvas%20Credentials%20HECVAT%20Full.xlsx"},{title:"Certificado de Nível 2 de TX-RAMP",from:"/pt-br/canvas/credentials/tx-ramp/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-credentials-PT_BR/Canvas%20Credentials/Canvas%20Credentials%20TX-RAMP%20Level%202%20Certification.pdf"}],$ue=Iue.map(t=>({...t,lang:"PT_BR"})),Lue={brand:"Canvas Credentials",links:[...Pue,...Rue,...$ue]},Nue=[{title:"Guides",from:"/canvas/data/guides",to:"https://community.canvaslms.com/t5/Canvas-Data-Users/gh-p/data"},{title:"API",from:"/canvas/data/api",to:"https://portal.inshosteddata.com/docs"}],Mue=Nue.map(t=>({...t,lang:"EN"})),Due={brand:"Canvas Data",links:Mue},Bue=[{title:"Startseite",from:"/de/canvas/lms",to:"https://www.instructure.com/de/hochschule/produkt/canvas/canvas-lms/"},{title:"Handbücher",from:"/de/canvas/handbuch",to:"https://community.canvaslms.com/t5/Ressourcen-auf-Deutsch-German/ct-p/german_resources"}],Que=Bue.map(t=>({...t,lang:"DE"})),Fue=[{title:"Compliance Package",from:"/canvas/lms/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/canvas-lms.zip"},{title:"Architecture Paper",from:"/canvas/lms/architecture/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Canvas%20LMS/Canvas%20LMS%20Architecture.pdf"},{title:"HECVAT",from:"/canvas/lms/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Canvas%20LMS/Canvas%20LMS%20HECVAT%20Full.xlsx"},{title:"K12CVAT",from:"/canvas/lms/k12cvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Canvas%20LMS/Canvas%20LMS%20K12CVAT%20Full.xlsx"},{title:"SOC 3 Report",from:"/canvas/lms/soc/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Canvas%20LMS/Canvas%20LMS%20SOC%203.pdf"},{title:"TX-RAMP Level 2 Certificate",from:"/canvas/lms/txramp/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Canvas%20LMS/Canvas%20LMS%20TX-RAMP%20Level%202%20Certification.pdf"},{title:"Home (HE)",from:"/canvas/lms",to:"https://www.instructure.com/higher-education/products/canvas/canvas-lms/"},{title:"Home (K12)",from:"/canvas/lms/k12",to:"https://www.instructure.com/k12/products/canvas/canvas-lms/"},{title:"VPAT",from:"/canvas/lms/vpat",to:"https://www.instructure.com/products/canvas/accessibility/"},{title:"Guides",from:"/canvas/lms/guides",to:"https://community.canvaslms.com/t5/Canvas-Guides/ct-p/canvas_guides/"},{title:"Release Notes",from:"/canvas/lms/releases",to:"https://community.canvaslms.com/t5/Canvas-Releases/tkb-p/canvas-release"},{title:"API",from:"/canvas/lms/api",to:"https://canvas.instructure.com/doc/api/index.html"}],zue=Fue.map(t=>({...t,lang:"EN"})),Hue=[{title:"Compliance Package (ES-LA)",from:"/es-la/canvas/lms/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/canvas-lms-ES_LA.zip"},{title:"Papel de Arquitectura",from:"/es-la/canvas/lms/arquitectura/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms-ES_LA/Canvas%20LMS/Canvas%20LMS%20Architecture_ES.pdf"},{title:"HECVAT",from:"/es-la/canvas/lms/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms-ES_LA/Canvas%20LMS/Canvas%20LMS%20HECVAT%20Full.xlsx"},{title:"K12CVAT",from:"/es-la/canvas/lms/k12cvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms-ES_LA/Canvas%20LMS/Canvas%20LMS%20K-12CVAT-Lite.xlsx"},{title:"Informe SOC 3",from:"/es-la/canvas/lms/soc/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms-ES_LA/Canvas%20LMS/Canvas%20LMS%20SOC%203.pdf"},{title:"Certificado de Nivel 2 de TX-RAMP",from:"/es-la/canvas/lms/txramp/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms-ES_LA/Canvas%20LMS/Canvas%20LMS%20TX-RAMP%20Level%202%20Certification.pdf"},{title:"Página de inicio (HE)",from:"/es-la/canvas/lms",to:"https://www.instructure.com/es/canvas/educacion-superior/"},{title:"Página de inicio (K12)",from:"/es-la/canvas/lms/basica",to:"https://www.instructure.com/es/educacion-basica/"},{title:"Guías",from:"/es-la/canvas/guias",to:"https://community.canvaslms.com/t5/Recursos-en-Espa%C3%B1ol-Spanish/ct-p/espanol_resources"},{title:"Notas de implementación",from:"/es-la/canvas/lms/publicacion",to:"https://community.canvaslms.com/t5/Espa%C3%B1ol/tkb-p/canvas-release-espanol"}],Uue=Hue.map(t=>({...t,lang:"ES_LA"})),Wue=[{title:"Compliance Package",from:"/pt-br/canvas/lms/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/canvas-lms-PT_BR.zip"},{title:"Papel de Arquitetura",from:"/pt-br/canvas/lms/arquitetura/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms-PT_BR/Canvas%20LMS/Canvas%20LMS%20Architecture_PT.pdf"},{title:"HECVAT",from:"/pt-br/canvas/lms/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms-PT_BR/Canvas%20LMS/Canvas%20LMS%20HECVAT%20Full.xlsx"},{title:"K12CVAT",from:"/pt-br/canvas/lms/k12cvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms-PT_BR/Canvas%20LMS/Canvas%20LMS%20K-12CVAT-Lite.xlsx"},{title:"Relatório SOC 3",from:"/pt-br/canvas/lms/soc/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms-PT_BR/Canvas%20LMS/Canvas%20LMS%20SOC%203.pdf"},{title:"Certificado de Nível 2 do TX-RAMP",from:"/pt-br/canvas/lms/txramp/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms-PT_BR/Canvas%20LMS/Canvas%20LMS%20TX-RAMP%20Level%202%20Certification.pdf"},{title:"Página inicial (HE)",from:"/canvas/lms/pt",to:"https://www.instructure.com/pt-br/canvas/ensino-superior/"},{title:"Página inicial (K12)",from:"/canvas/lms/pt/basica",to:"https://www.instructure.com/pt-br/ensino-fundamental-e-medio/"},{title:"Guias",from:"/pt-br/canvas/guias",to:"https://community.canvaslms.com/t5/Recursos-en-Espa%C3%B1ol-Spanish/ct-p/espanol_resources"},{title:"Notas de lançamento (Canvas LMS)",from:"/canvas/lms/lancamentos",to:"https://community.canvaslms.com/t5/Portugues/tkb-p/canvas-release-portugues"}],Vue=Wue.map(t=>({...t,lang:"PT_BR"})),jue={brand:"Canvas LMS",links:[...zue,...Uue,...Vue,...Que]},Xue=[{title:"Mobile Apps (Android)",from:"/canvas/mobile/android",to:"https://play.google.com/store/apps/developer?id=Instructure"},{title:"Mobile Apps (iOS)",from:"/canvas/mobile/ios",to:"https://apps.apple.com/us/developer/instructure-inc/id418441198"},{title:"Release Notes",from:"/canvas/mobile/releases",to:"https://community.canvaslms.com/t5/Canvas-Mobile-Releases/tkb-p/CanvasMobileReleases"},{title:"Guides",from:"/canvas/mobile/guides",to:"https://community.canvaslms.com/t5/Canvas-Mobile-Users/gh-p/mobile"}],Zue=Xue.map(t=>({...t,lang:"EN"})),que={brand:"Canvas Mobile",links:Zue},Yue=[{title:"Compliance Package",from:"/canvas/studio/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/canvas-studio.zip"},{title:"Architecture Paper",from:"/canvas/studio/architecture/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-studio/Canvas%20Studio/Canvas%20Studio%20Architecture.pdf"},{title:"HECVAT",from:"/canvas/studio/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-studio/Canvas%20Studio/Canvas%20Studio%20HECVAT%20Lite.xlsx"},{title:"Home (HE)",from:"/canvas/studio",to:"https://www.instructure.com/higher-education/products/canvas/canvas-studio/"},{title:"Home (K12)",from:"/canvas/studio/k12",to:"https://www.instructure.com/k12/products/canvas/canvas-studio/"},{title:"VPAT",from:"/canvas/studio/vpat",to:"https://www.instructure.com/accessibility/canvas/canvas-studio-vpat/"},{title:"Guides",from:"/canvas/studio/guides",to:"https://community.canvaslms.com/t5/Canvas-Studio/ct-p/studio_guides"},{title:"Release Notes",from:"/canvas/studio/releases",to:"https://community.canvaslms.com/t5/Studio-Releases/ct-p/studio_releases"},{title:"API",from:"/canvas/studio/api",to:"https://canvas.instructuremedia.com/api/public/docs/#/"}],Gue=Yue.map(t=>({...t,lang:"EN"})),Kue={brand:"Canvas Studio",links:Gue},Jue=[{title:"Community",from:"/elevate/community",to:"https://community.canvaslms.com/t5/Elevate/ct-p/elevate"},{title:"Roadmap",from:"/elevate/roadmap",to:"https://community.canvaslms.com/t5/Elevate-Product-Roadmap/ct-p/elevate-product-roadmap"}],ece=Jue.map(t=>({...t,lang:"EN"})),tce={brand:"Elevate",links:ece},nce=[{title:"Home",from:"/elevate/dataquality",to:"https://www.instructure.com/k12/products/elevate/elevate-data-quality/"},{title:"Guides",from:"/elevate/dataquality/guides",to:"https://community.canvaslms.com/t5/Elevate-Data-Quality/ct-p/certify"}],ice=nce.map(t=>({...t,lang:"EN"})),rce={brand:"Elevate Data Quality",links:ice},oce=[{title:"Guides",from:"/elevate/datasync/guides",to:"https://community.canvaslms.com/t5/Elevate-Data-Sync/ct-p/elevate_data_sync"}],sce=oce.map(t=>({...t,lang:"EN"})),ace={brand:"Elevate Data Sync",links:sce},lce=[{title:"Compliance Package",from:"/elevate/k12-analytics/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/elevate-k12-analytics.zip"},{title:"Home",from:"/elevate/k12-analytics",to:"https://www.instructure.com/k12/products/elevate/elevate-k12-analytics"},{title:"Release Notes",from:"/elevate/k12-analytics/releases",to:"https://community.canvaslms.com/t5/Elevate-K-12-Analytics-Releases/tkb-p/v_release"},{title:"Guides",from:"/elevate/k12analytics/guides",to:"https://community.canvaslms.com/t5/Elevate-K-12-Analytics/ct-p/videri"}],uce=lce.map(t=>({...t,lang:"EN"})),cce={brand:"Elevate K-12 Analytics",links:uce},dce=[{title:"Compliance Package",from:"/elevate/standards-alignment/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/elevate-standards-alignment.zip"},{title:"HECVAT Lite",from:"/elevate/standards-alignment/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/elevate-standards-alignment/Elevate%20Standards%20Alignment/Elevate%20Standards%20Alignment%20HECVAT%20Lite.xlsx"},{title:"Home",from:"/elevate/standards-alignment",to:"https://www.instructure.com/corporate-education/products/elevate/elevate-standards-alignment"},{title:"Release Notes",from:"/elevate/standards-alignment/releases",to:"https://community.canvaslms.com/t5/Elevate-Standards-Alignment/tkb-p/esa_releases"},{title:"Guides",from:"/elevate/standards-alignment/guides",to:"https://community.canvaslms.com/t5/Elevate-Standards-Alignment/tkb-p/ab_basics"}],hce=dce.map(t=>({...t,lang:"EN"})),fce={brand:"Elevate Standards Alignment",links:hce},pce=[{title:"Compliance Package",from:"/impact/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/impact.zip"},{title:"Architecture Paper",from:"/impact/architecture/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/impact/Impact/Impact%20Architecture.pdf"},{title:"HECVAT Lite",from:"/impact/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/impact/Impact/Impact%20HECVAT%20Lite.xlsx"},{title:"TX-RAMP Level 2 Certification",from:"/impact/tx-ramp/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/impact/Impact/Impact%20TX-RAMP%20Level%202%20Certification.pdf"},{title:"Home (HE)",from:"/impact/he",to:"https://www.instructure.com/higher-education/products/impact/"},{title:"Home (K12)",from:"/impact/k12",to:"https://www.instructure.com/k12/products/impact/"},{title:"Community",from:"/impact/community",to:"https://community.canvaslms.com/t5/Impact/ct-p/impact"},{title:"Guides",from:"/impact/guides",to:"https://community.canvaslms.com/t5/Impact-Guides/tkb-p/impact_guides"},{title:"Release Notes",from:"/impact/releases",to:"https://community.canvaslms.com/t5/Impact-Releases/ct-p/impact_releases"}],mce=pce.map(t=>({...t,lang:"EN"})),gce=[{title:"Compliance Package",from:"/es-la/impact/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/impact-ES_LA.zip",lang:"ES_LA"},{title:"Papel de Arquitectura",from:"/es-la/impact/arquitectura/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/impact-ES_LA/Impact/Impact%20Architecture_ES.pdf"},{title:"HECVAT Lite",from:"/es-la/impact/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/impact-ES_LA/Impact/Impact%20HECVAT%20Lite.xlsx"},{title:"Certificado de Nivel 2 de TX-RAMP",from:"/es-la/impact/tx-ramp/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/impact-ES_LA/Impact/Impact%20TX-RAMP%20Level%202%20Certification.pdf"}],Oce=gce.map(t=>({...t,lang:"ES_LA"})),bce=[{title:"Compliance Package",from:"/pt-br/impact/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/impact-PT_BR.zip",lang:"PT_BR"},{title:"Papel de Arquitetura",from:"/pt-br/impact/arquitetura/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/impact-PT_BR/Impact/Impact%20Architecture_PT.pdf"},{title:"HECVAT Lite",from:"/pt-br/impact/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/impact-PT_BR/Impact/Impact%20HECVAT%20Lite.xlsx"},{title:"Certificado de Nível 2 do TX-RAMP",from:"/pt-br/impact/tx-ramp/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/impact-PT_BR/Impact/Impact%20TX-RAMP%20Level%202%20Certification.pdf"}],yce=bce.map(t=>({...t,lang:"PT_BR"})),vce={brand:"Impact",links:[...mce,...Oce,...yce]},Sce=[{title:"Startseite",from:"/de/home",to:"https://www.instructure.com/de"},{title:"Contato",from:"/pt-br/contato",to:"https://www.instructure.com/pt-br/contato/"},{title:"Kontakt",from:"/kontakt",to:"https://www.instructure.com/de/contact-us"}],wce=Sce.map(t=>({...t,lang:"DE"})),kce=[{title:"Security White Paper",from:"/security/dl",to:"https://github.com/thedannywahl/instructure-security-package/raw/main/Instructure/Instructure%20Security%20Overview.pdf"},{title:"Business Continuity White Paper",from:"/bc/dl",to:"https://github.com/thedannywahl/instructure-security-package/raw/main/Instructure/Instructure%20Business%20Continuity%20%26%20Disaster%20Recovery.pdf"},{title:"CAIQ",from:"/caiq/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Instructure/Instructure%20ESG%20Report%20FY2023.pdf"},{title:"CSA Star Certificate",from:"/csa/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Instructure/Instructure%20CSA%20STAR%20Certificate.pdf"},{title:"Cyber Essentials+ Certificate",from:"/ce/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Instructure/Instructure%20Cyber%20Essentials%20Plus.pdf"},{title:"Environmental, Social, and Governance Report",from:"/esg/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Instructure/Instructure%20ESG%20Report%20FY2023.pdf"},{title:"Instructure, Inc. Certificate of Insurance",from:"/coi/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Instructure/Instructure%20Inc%20COI.pdf"},{title:"Instructure Global Certificate of Insurance",from:"/coi-global/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Instructure/Instructure%20Global%20COI.pdf"},{title:"ISO 27001 Certificate",from:"/iso/dl",to:"https://github.com/thedannywahl/instructure-security-package/raw/main/Instructure/Instructure%20ISO%2027001%20Compliance%20Certificate.pdf"},{title:"Quality Assurance Program",from:"/qa/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Instructure/Instructure%20Quality%20Assurance%20Program.pdf"},{title:"Home",from:"/home",to:"https://www.instructure.com/"},{title:"Roadmap",from:"/roadmap",to:"https://community.canvaslms.com/t5/Instructure-Roadmap/ct-p/instructure-roadmap/"},{title:"Accessibility",from:"/a11y",to:"https://www.instructure.com/accessibility/"},{title:"Contact",from:"/contact",to:"https://www.instructure.com/contact-us/"},{title:"Privacy",from:"/privacy",to:"https://www.instructure.com/canvas/privacy/"},{title:"Security",from:"/security",to:"https://www.instructure.com/products/canvas/security/"},{title:"Trust Center",from:"/trust",to:"https://www.instructure.com/trust-center/"},{title:"Community",from:"/community",to:"https://community.canvaslms.com/"},{title:"Terms & Conditions",from:"/tos",to:"https://www.instructure.com/policies/master-terms-conditions/"},{title:"Global Terms & Conditions",from:"/tos/global",to:"https://www.instructure.com/policies/global/master-terms-and-conditions/"},{title:"Acceptable Use Policy",from:"/aup",to:"https://www.instructure.com/policies/acceptable-use/"},{title:"Data Privacy Addendum",from:"/dpa",to:"https://www.instructure.com/policies/data-processing/"},{title:"Investor Relations",from:"/investors",to:"https://ir.instructure.com/overview/default.aspx"},{title:"Status",from:"/status",to:"https://status.instructure.com/"},{title:"CSA Star Registration",from:"/csa",to:"https://cloudsecurityalliance.org/star/registry/instructure/"},{title:"1EdTech Registrations",from:"/1edtech",to:"https://site.imsglobal.org/certifications?query=instructure"},{title:"Our Story",from:"/story",to:"https://www.instructure.com/about/our-story"},{title:"Study Hall",from:"/resources",to:"https://www.instructure.com/resources/"},{title:"EduAppCenter",from:"/apps",to:"https://www.eduappcenter.com/"},{title:"ESG Report (online)",from:"/esg",to:"https://instructure.com/esg-report"}],xce=kce.map(t=>({...t,lang:"EN"})),_ce=[{title:"Página de inicio",from:"/es-la/home",to:"https://www.instructure.com/es/"},{title:"Contáctenos",from:"/es-la/contactenos",to:"https://www.instructure.com/es/contactenos/"},{title:"Privacidad",from:"/es-la/privicidad",to:"https://www.instructure.com/es/canvas/privacidad/"},{title:"Seguridad",from:"/es-la/seguridad",to:"https://www.instructure.com/es/canvas/seguridad/"},{title:"Nuestra Historia",from:"/es-la/historia",to:"https://www.instructure.com/es/sobre/nuestra-historia"}],Ece=_ce.map(t=>({...t,lang:"ES_LA"})),Cce=[{title:"Pagina inicial",from:"/pt-br/home",to:"https://www.instructure.com/pt-br/"},{title:"Contato",from:"/pt-br/contato",to:"https://www.instructure.com/pt-br/contato/"},{title:"Contato",from:"/pt-br/contato",to:"https://www.instructure.com/pt-br/contato/"},{title:"Privacidade",from:"/pt-br/privacidade",to:"https://www.instructure.com/pt-br/canvas/privacidade/"},{title:"Segurança",from:"/pt-br/seguranca",to:"https://www.instructure.com/pt-br/canvas/seguranca/"},{title:"Nossa História",from:"/pt-br/historia",to:"https://www.instructure.com/pt-br/sobre/nossa-historia"}],Tce=Cce.map(t=>({...t,lang:"PT_BR"})),Pce={brand:"Instructure",links:[...xce,...Ece,...Tce,...wce]},Ace=[{title:"Compliance Package",from:"/learnplatform/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/learnplatform.zip"},{title:"EdTech Top 40 Report",from:"/learnplatform/top40/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/learnplatform/LearnPlatform/EdTech%20Top%2040.pdf"},{title:"Architecture Paper",from:"/learnplatform/architecture/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/learnplatform/LearnPlatform/LearnPlatform%20Architecture%20Overview.pdf"},{title:"HECVAT Lite",from:"/learnplatform/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/learnplatform/LearnPlatform/LearnPlatform%20HECVAT%20Lite.xlsx"},{title:"Home",from:"/learnplatform",to:"https://www.instructure.com/k12/products/learnplatform/"},{title:"Terms of Service",from:"/learnplatform/tos",to:"https://www.instructure.com/policies/learnplatform-terms-of-service/"},{title:"Privacy",from:"/learnplatform/privacy",to:"https://www.instructure.com/policies/privacy-learnplatform/"},{title:"Data Processing Agreement",from:"/learnplatform/dpa",to:"https://www.instructure.com/policies/learnplatform-data-processing-agreement/"},{title:"Statement of Neutrality",from:"/learnplatform/neutrality",to:"https://www.instructure.com/policies/learnplatform-neutrality/"}],Rce=Ace.map(t=>({...t,lang:"EN"})),Ice={brand:"Learnplatform",links:Rce},$ce=[{title:"Community",from:"/mastery/community",to:"https://community.canvaslms.com/t5/Mastery/ct-p/mastery"},{title:"Roadmap",from:"/mastery/roadmap",to:"https://community.canvaslms.com/t5/Mastery-Product-Roadmap/ct-p/mastery-product-roadmap"}],Lce=$ce.map(t=>({...t,lang:"EN"})),Nce={brand:"Mastery",links:Lce},Mce=[{title:"Compliance Package",from:"/mastery/connect/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/mastery-connect.zip"},{title:"Architecture Paper",from:"/mastery/connect/architecture/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/mastery-connect/Mastery%20Connect/Mastery%20Connect%20Architecture.pdf"},{title:"HECVAT Lite",from:"/mastery/connect/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/mastery-connect/Mastery%20Connect/Mastery%20Connect%20HECVAT%20Lite.xlsx"},{title:"Home",from:"/mastery/connect",to:"https://www.instructure.com/k12/products/mastery/mastery-connect"},{title:"Guides",from:"/mastery/connect/guides",to:"https://community.canvaslms.com/t5/Mastery-Connect/ct-p/masteryconnect"},{title:"Release Notes",from:"/mastery/connect/releases",to:"https://community.canvaslms.com/t5/Mastery-Connect-Releases/tkb-p/masteryconnect"},{title:"API",from:"/mastery/connect/api",to:"https://docs.google.com/document/d/19TxyeRzF6nyJDY6ej2dZozbE87JdUygw"},{title:"Mobile App (Android)",from:"/mastery/connect/android",to:"https://play.google.com/store/apps/dev?id=8869528477632015729&hl=EN&gl=US"},{title:"Mobile App (iOS)",from:"/canvas/lms/ios",to:"https://apps.apple.com/us/developer/masteryconnect/id413937396"}],Dce=Mce.map(t=>({...t,lang:"EN"})),Bce={brand:"Mastery Connect",links:Dce},Qce=[{title:"Home",from:"/mastery/itembank",to:"https://www.instructure.com/k12/products/mastery/mastery-item-bank/"},{title:"Guides",from:"/mastery/itembank/guides",to:"https://community.canvaslms.com/t5/Mastery-Item-Bank/ct-p/mastery-item-bank/"}],Fce=Qce.map(t=>({...t,lang:"EN"})),zce={brand:"Mastery Item Bank",links:Fce},Hce=[{title:"Formatives Home",from:"mastery/view/formative",to:"https://www.instructure.com/k12/products/mastery/mastery-view-formative-assessments/"},{title:"Predictives Home",from:"/mastery/view/predictive",to:"https://www.instructure.com/k12/products/mastery/mastery-view-predictive-assessments/"}],Uce=Hce.map(t=>({...t,lang:"EN"})),Wce={brand:"Mastery View Assessments",links:Uce},Vce=[],jce=Vce.map(t=>({...t,lang:"EN"})),Xce={brand:"Parchment",links:jce},dw=[hue,Pce,Sue,jue,que,Kue,xue,Cue,Due,Nce,Bce,zce,Wce,Lue,Ice,Xce,tce,cce,fce,rce,ace,vce];function P3(){const t=th(Rd().language),e=ps(uue,t),n=bi.url.replace("https://",""),[i,r]=T.useState({search:""}),[o,s]=T.useState({codes:t}),[a,l]=T.useState("all"),[u,c]=T.useState({list:a1}),[d,h]=T.useState("all"),[p,m]=T.useState({list:$i}),[O,y]=T.useState({list:dw.map(B=>({...B,links:B.links.filter(H=>H.lang.toUpperCase()===t)}))}),[b,v]=T.useState({expanded:!1,text:e.toggleShow}),S=(B,H)=>{r({search:H}),w(o.codes,H,u.list,d)},k=(B,H)=>{const K=[];H==="all"?(K.push(...cw),x(B,"all")):K.push(...cw.filter(oe=>oe.toUpperCase().includes(H.toUpperCase()))),s({codes:K}),w(K,i.search,u.list,d)},x=(B,H)=>{h(H),w(o.codes,i.search,u.list,H)},_=(B,H)=>{const K=[];H==="all"?K.push(...a1):K.push(...["AWS",...a1].filter(oe=>oe.toLowerCase().includes(H.toLowerCase()))),l(H),c({list:K}),x(B,"all"),m({list:K}),w(o.codes,i.search,K,"all")},w=(B,H,K,oe)=>{const xe=dw.map(Oe=>({...Oe,links:Oe.links.filter(X=>`${`${Oe.brand} ${X.title}`}`.toLowerCase().includes(H.toLowerCase())).filter(X=>B.includes(X.lang.toUpperCase()))})).filter(Oe=>Oe.links.length>0).filter(Oe=>K.includes(Oe.brand)).filter(Oe=>oe!=="all"?Oe.brand===p.list[0]||Oe.brand===oe:!0);y({list:xe})},D=()=>{const B=b.expanded?e.toggleShow:e.toggleHide;v({expanded:!b.expanded,text:B})},W=B=>{if(i.search.length)return N.jsx(I0,{type:"button",size:"small",withBackground:!1,withBorder:!1,screenReaderLabel:e.clearSearch,onClick:I,children:N.jsx(Ud,{})})},I=B=>{B.stopPropagation(),S(B,"")};async function V(B){try{await navigator.clipboard.writeText(B)}catch(H){console.error(H.message)}}return N.jsxs(N.Fragment,{children:[N.jsx(ih,{language:t}),N.jsxs(ye,{id:"main",as:"div",padding:"medium medium xx-large",minWidth:"20rem",maxWidth:"59.25rem",margin:"0 auto",children:[N.jsxs(ye,{as:"div",margin:"none none x-large",children:[N.jsx(Tr,{level:"h1",children:e.header}),N.jsx(Wt,{as:"p",children:e.description}),N.jsx(Xk,{onClick:D,children:b.text}),N.jsx(Q8,{id:"toggleFilters",summary:e.filters,onToggle:D,expanded:b.expanded,children:N.jsx(ye,{as:"div",margin:"large none none",children:N.jsx("form",{name:"searchFilters",autoComplete:"off",children:N.jsxs(Zv,{label:"",description:"",layout:"stacked",children:[N.jsx(Yk,{type:"search",renderLabel:e.search,placeholder:e.placeholder,onChange:S,renderBeforeInput:N.jsx(xu,{inline:!1}),renderAfterInput:W,value:i.search}),N.jsxs(wy,{name:"brand",description:e.brands,defaultValue:"all",layout:"columns",variant:"toggle",onChange:_,children:[N.jsx(Il,{value:"all",label:"All",context:"off"},"all"),["AWS",...$i].map(B=>N.jsx(Il,{value:B,label:B,context:"off"},B))]}),a!=="all"&&p.list.length>1&&N.jsxs(wy,{name:"product",description:e.products,defaultValue:"all",layout:"columns",variant:"toggle",onChange:x,children:[N.jsx(Il,{value:"all",label:"All",context:"off",id:"allProducts",checked:d==="all"},"all"),p.list.filter(B=>B!==a).map(B=>N.jsx(Il,{value:B,label:B,context:"off"},B))]}),N.jsxs(wy,{name:"language",description:e.language,defaultValue:t,layout:"columns",variant:"toggle",onChange:k,children:[N.jsx(Il,{value:"all",label:"All",context:"off"},"all"),K8.map(B=>N.jsx(Il,{value:B.code,label:B.local,context:"off"},B.code))]})]})})})})]}),O.list.map(B=>{if(B.links.length){const H=B.brand;return N.jsxs(ye,{as:"div",margin:"none none xx-large",children:[N.jsx(Tr,{level:$i.includes(H)?"h2":"h3",id:H,children:H}),N.jsxs(Ln,{hover:!0,caption:H,children:[N.jsx(Ln.Head,{children:N.jsxs(Ln.Row,{children:[N.jsx(Ln.ColHeader,{id:"Title",width:"25%",children:e.title}),N.jsx(Ln.ColHeader,{id:"URLs",children:e.link})]})}),N.jsx(Ln.Body,{children:B.links.map(K=>N.jsxs(Ln.Row,{children:[N.jsx(Ln.Cell,{children:N.jsx(Wt,{children:K.title})}),N.jsxs(Ln.Cell,{children:[N.jsx(Di,{href:`https://${n}${K.from}`,children:`${n}${K.from}`}),"  ",N.jsx(CM,{renderTip:e.copy,on:["hover","focus"],placement:"top",color:"primary-inverse",children:N.jsx(I0,{withBackground:!1,withBorder:!1,screenReaderLabel:e.copy_url,onClick:()=>{V(`https://${n}${K.from}`)},children:N.jsx(Ld,{})})}),N.jsx("br",{}),N.jsx(Wt,{size:"small",color:"secondary",children:K.to.split("?")[0]})]})]},K.title))})]})]},H)}return null})]}),N.jsx(nh,{language:t})]})}function A3(t){const e=[],n=String(t||"");let i=n.indexOf(","),r=0,o=!1;for(;!o;){i===-1&&(i=n.length,o=!0);const s=n.slice(r,i).trim();(s||!o)&&e.push(s),r=i+1,i=n.indexOf(",",r)}return e}function e9(t,e){const n={};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Zce=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,qce=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Yce={};function R3(t,e){return(Yce.jsx?qce:Zce).test(t)}const Gce=/[ \t\n\f\r]/g;function Kce(t){return typeof t=="object"?t.type==="text"?I3(t.value):!1:I3(t)}function I3(t){return t.replace(Gce,"")===""}class Qp{constructor(e,n,i){this.property=e,this.normal=n,i&&(this.space=i)}}Qp.prototype.property={};Qp.prototype.normal={};Qp.prototype.space=null;function t9(t,e){const n={},i={};let r=-1;for(;++r4&&n.slice(0,4)==="data"&&ide.test(e)){if(e.charAt(4)==="-"){const o=e.slice(5).replace(L3,sde);i="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=e.slice(4);if(!L3.test(o)){let s=o.replace(rde,ode);s.charAt(0)!=="-"&&(s="-"+s),e="data"+s}}r=t_}return new r(i,e)}function ode(t){return"-"+t.toLowerCase()}function sde(t){return t.charAt(1).toUpperCase()}const ade={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Fp=t9([r9,i9,a9,l9,tde],"html"),_a=t9([r9,i9,a9,l9,nde],"svg");function N3(t){const e=String(t||"").trim();return e?e.split(/[ \t\n\r\f]+/g):[]}function u9(t){return t.join(" ").trim()}var c9={},M3=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,lde=/\n/g,ude=/^\s*/,cde=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,dde=/^:\s*/,hde=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,fde=/^[;\s]*/,pde=/^\s+|\s+$/g,mde=` -`,D3="/",B3="*",Nl="",gde="comment",Ode="declaration",bde=function(t,e){if(typeof t!="string")throw new TypeError("First argument must be a string");if(!t)return[];e=e||{};var n=1,i=1;function r(m){var O=m.match(lde);O&&(n+=O.length);var y=m.lastIndexOf(mde);i=~y?m.length-y:i+m.length}function o(){var m={line:n,column:i};return function(O){return O.position=new s(m),u(),O}}function s(m){this.start=m,this.end={line:n,column:i},this.source=e.source}s.prototype.content=t;function a(m){var O=new Error(e.source+":"+n+":"+i+": "+m);if(O.reason=m,O.filename=e.source,O.line=n,O.column=i,O.source=t,!e.silent)throw O}function l(m){var O=m.exec(t);if(O){var y=O[0];return r(y),t=t.slice(y.length),O}}function u(){l(ude)}function c(m){var O;for(m=m||[];O=d();)O!==!1&&m.push(O);return m}function d(){var m=o();if(!(D3!=t.charAt(0)||B3!=t.charAt(1))){for(var O=2;Nl!=t.charAt(O)&&(B3!=t.charAt(O)||D3!=t.charAt(O+1));)++O;if(O+=2,Nl===t.charAt(O-1))return a("End of comment missing");var y=t.slice(2,O-2);return i+=2,r(y),t=t.slice(O),i+=2,m({type:gde,comment:y})}}function h(){var m=o(),O=l(cde);if(O){if(d(),!l(dde))return a("property missing ':'");var y=l(hde),b=m({type:Ode,property:Q3(O[0].replace(M3,Nl)),value:y?Q3(y[0].replace(M3,Nl)):Nl});return l(fde),b}}function p(){var m=[];c(m);for(var O;O=h();)O!==!1&&(m.push(O),c(m));return m}return u(),p()};function Q3(t){return t?t.replace(pde,Nl):Nl}var yde=C1&&C1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(c9,"__esModule",{value:!0});var vde=yde(bde);function Sde(t,e){var n=null;if(!t||typeof t!="string")return n;var i=(0,vde.default)(t),r=typeof e=="function";return i.forEach(function(o){if(o.type==="declaration"){var s=o.property,a=o.value;r?e(s,a,o):a&&(n=n||{},n[s]=a)}}),n}var F3=c9.default=Sde;const wde=F3.default||F3,Sb=d9("end"),To=d9("start");function d9(t){return e;function e(n){const i=n&&n.position&&n.position[t]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function kde(t){const e=To(t),n=Sb(t);if(e&&n)return{start:e,end:n}}function Of(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?z3(t.position):"start"in t||"end"in t?z3(t):"line"in t||"column"in t?fw(t):""}function fw(t){return H3(t&&t.line)+":"+H3(t&&t.column)}function z3(t){return fw(t&&t.start)+"-"+fw(t&&t.end)}function H3(t){return t&&typeof t=="number"?t:1}class Un extends Error{constructor(e,n,i){super(),typeof n=="string"&&(i=n,n=void 0);let r="",o={},s=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof e=="string"?r=e:!o.cause&&e&&(s=!0,r=e.message,o.cause=e),!o.ruleId&&!o.source&&typeof i=="string"){const l=i.indexOf(":");l===-1?o.ruleId=i:(o.source=i.slice(0,l),o.ruleId=i.slice(l+1))}if(!o.place&&o.ancestors&&o.ancestors){const l=o.ancestors[o.ancestors.length-1];l&&(o.place=l.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file,this.message=r,this.line=a?a.line:void 0,this.name=Of(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=s&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}Un.prototype.file="";Un.prototype.name="";Un.prototype.reason="";Un.prototype.message="";Un.prototype.stack="";Un.prototype.column=void 0;Un.prototype.line=void 0;Un.prototype.ancestors=void 0;Un.prototype.cause=void 0;Un.prototype.fatal=void 0;Un.prototype.place=void 0;Un.prototype.ruleId=void 0;Un.prototype.source=void 0;const n_={}.hasOwnProperty,xde=new Map,_de=/[A-Z]/g,Ede=/-([a-z])/g,Cde=new Set(["table","tbody","thead","tfoot","tr"]),Tde=new Set(["td","th"]),h9="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Pde(t,e){if(!e||e.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=e.filePath||void 0;let i;if(e.development){if(typeof e.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=Dde(n,e.jsxDEV)}else{if(typeof e.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof e.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=Mde(n,e.jsx,e.jsxs)}const r={Fragment:e.Fragment,ancestors:[],components:e.components||{},create:i,elementAttributeNameCase:e.elementAttributeNameCase||"react",evaluater:e.createEvaluater?e.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:e.ignoreInvalidStyle||!1,passKeys:e.passKeys!==!1,passNode:e.passNode||!1,schema:e.space==="svg"?_a:Fp,stylePropertyNameCase:e.stylePropertyNameCase||"dom",tableCellAlignToStyle:e.tableCellAlignToStyle!==!1},o=f9(r,t,void 0);return o&&typeof o!="string"?o:r.create(t,r.Fragment,{children:o||void 0},void 0)}function f9(t,e,n){if(e.type==="element")return Ade(t,e,n);if(e.type==="mdxFlowExpression"||e.type==="mdxTextExpression")return Rde(t,e);if(e.type==="mdxJsxFlowElement"||e.type==="mdxJsxTextElement")return $de(t,e,n);if(e.type==="mdxjsEsm")return Ide(t,e);if(e.type==="root")return Lde(t,e,n);if(e.type==="text")return Nde(t,e)}function Ade(t,e,n){const i=t.schema;let r=i;e.tagName.toLowerCase()==="svg"&&i.space==="html"&&(r=_a,t.schema=r),t.ancestors.push(e);const o=m9(t,e.tagName,!1),s=Bde(t,e);let a=r_(t,e);return Cde.has(e.tagName)&&(a=a.filter(function(l){return typeof l=="string"?!Kce(l):!0})),p9(t,s,o,e),i_(s,a),t.ancestors.pop(),t.schema=i,t.create(e,o,s,n)}function Rde(t,e){if(e.data&&e.data.estree&&t.evaluater){const i=e.data.estree.body[0];return i.type,t.evaluater.evaluateExpression(i.expression)}yp(t,e.position)}function Ide(t,e){if(e.data&&e.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(e.data.estree);yp(t,e.position)}function $de(t,e,n){const i=t.schema;let r=i;e.name==="svg"&&i.space==="html"&&(r=_a,t.schema=r),t.ancestors.push(e);const o=e.name===null?t.Fragment:m9(t,e.name,!0),s=Qde(t,e),a=r_(t,e);return p9(t,s,o,e),i_(s,a),t.ancestors.pop(),t.schema=i,t.create(e,o,s,n)}function Lde(t,e,n){const i={};return i_(i,r_(t,e)),t.create(e,t.Fragment,i,n)}function Nde(t,e){return e.value}function p9(t,e,n,i){typeof n!="string"&&n!==t.Fragment&&t.passNode&&(e.node=i)}function i_(t,e){if(e.length>0){const n=e.length>1?e:e[0];n&&(t.children=n)}}function Mde(t,e,n){return i;function i(r,o,s,a){const u=Array.isArray(s.children)?n:e;return a?u(o,s,a):u(o,s)}}function Dde(t,e){return n;function n(i,r,o,s){const a=Array.isArray(o.children),l=To(i);return e(r,o,s,a,{columnNumber:l?l.column-1:void 0,fileName:t,lineNumber:l?l.line:void 0},void 0)}}function Bde(t,e){const n={};let i,r;for(r in e.properties)if(r!=="children"&&n_.call(e.properties,r)){const o=Fde(t,r,e.properties[r]);if(o){const[s,a]=o;t.tableCellAlignToStyle&&s==="align"&&typeof a=="string"&&Tde.has(e.tagName)?i=a:n[s]=a}}if(i){const o=n.style||(n.style={});o[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return n}function Qde(t,e){const n={};for(const i of e.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&t.evaluater){const o=i.data.estree.body[0];o.type;const s=o.expression;s.type;const a=s.properties[0];a.type,Object.assign(n,t.evaluater.evaluateExpression(a.argument))}else yp(t,e.position);else{const r=i.name;let o;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&t.evaluater){const a=i.value.data.estree.body[0];a.type,o=t.evaluater.evaluateExpression(a.expression)}else yp(t,e.position);else o=i.value===null?!0:i.value;n[r]=o}return n}function r_(t,e){const n=[];let i=-1;const r=t.passKeys?new Map:xde;for(;++ir?0:r+e:e=e>r?r:e,n=n>0?n:0,i.length<1e4)s=Array.from(i),s.unshift(e,n),t.splice(...s);else for(n&&t.splice(e,n);o0?(cr(t,t.length,0,e),t):e}const V3={}.hasOwnProperty;function O9(t){const e={};let n=-1;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Dr(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Kn=Ea(/[A-Za-z]/),Bn=Ea(/[\dA-Za-z]/),Yde=Ea(/[#-'*+\--9=?A-Z^-~]/);function hO(t){return t!==null&&(t<32||t===127)}const pw=Ea(/\d/),Gde=Ea(/[\dA-Fa-f]/),Kde=Ea(/[!-/:-@[-`{-~]/);function Ee(t){return t!==null&&t<-2}function mt(t){return t!==null&&(t<0||t===32)}function Xe(t){return t===-2||t===-1||t===32}const wb=Ea(new RegExp("\\p{P}|\\p{S}","u")),mu=Ea(/\s/);function Ea(t){return e;function e(n){return n!==null&&n>-1&&t.test(String.fromCharCode(n))}}function oh(t){const e=[];let n=-1,i=0,r=0;for(;++n55295&&o<57344){const a=t.charCodeAt(n+1);o<56320&&a>56319&&a<57344?(s=String.fromCharCode(o,a),r=1):s="�"}else s=String.fromCharCode(o);s&&(e.push(t.slice(i,n),encodeURIComponent(s)),i=n+r+1,s=""),r&&(n+=r,r=0)}return e.join("")+t.slice(i)}function Je(t,e,n,i){const r=i?i-1:Number.POSITIVE_INFINITY;let o=0;return s;function s(l){return Xe(l)?(t.enter(n),a(l)):e(l)}function a(l){return Xe(l)&&o++s))return;const w=e.events.length;let D=w,W,I;for(;D--;)if(e.events[D][0]==="exit"&&e.events[D][1].type==="chunkFlow"){if(W){I=e.events[D][1].end;break}W=!0}for(b(i),_=w;_S;){const x=n[k];e.containerState=x[1],x[0].exit.call(e,t)}n.length=S}function v(){r.write([null]),o=void 0,r=void 0,e.containerState._closeFlow=void 0}}function ihe(t,e,n){return Je(t,t.attempt(this.parser.constructs.document,e,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function fO(t){if(t===null||mt(t)||mu(t))return 1;if(wb(t))return 2}function kb(t,e,n){const i=[];let r=-1;for(;++r1&&t[n][1].end.offset-t[n][1].start.offset>1?2:1;const d=Object.assign({},t[i][1].end),h=Object.assign({},t[n][1].start);X3(d,-l),X3(h,l),s={type:l>1?"strongSequence":"emphasisSequence",start:d,end:Object.assign({},t[i][1].end)},a={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},t[n][1].start),end:h},o={type:l>1?"strongText":"emphasisText",start:Object.assign({},t[i][1].end),end:Object.assign({},t[n][1].start)},r={type:l>1?"strong":"emphasis",start:Object.assign({},s.start),end:Object.assign({},a.end)},t[i][1].end=Object.assign({},s.start),t[n][1].start=Object.assign({},a.end),u=[],t[i][1].end.offset-t[i][1].start.offset&&(u=nr(u,[["enter",t[i][1],e],["exit",t[i][1],e]])),u=nr(u,[["enter",r,e],["enter",s,e],["exit",s,e],["enter",o,e]]),u=nr(u,kb(e.parser.constructs.insideSpan.null,t.slice(i+1,n),e)),u=nr(u,[["exit",o,e],["enter",a,e],["exit",a,e],["exit",r,e]]),t[n][1].end.offset-t[n][1].start.offset?(c=2,u=nr(u,[["enter",t[n][1],e],["exit",t[n][1],e]])):c=0,cr(t,i-1,n-i+3,u),n=i+u.length-c-2;break}}for(n=-1;++n0&&Xe(_)?Je(t,v,"linePrefix",o+1)(_):v(_)}function v(_){return _===null||Ee(_)?t.check(Z3,O,k)(_):(t.enter("codeFlowValue"),S(_))}function S(_){return _===null||Ee(_)?(t.exit("codeFlowValue"),v(_)):(t.consume(_),S)}function k(_){return t.exit("codeFenced"),e(_)}function x(_,w,D){let W=0;return I;function I(oe){return _.enter("lineEnding"),_.consume(oe),_.exit("lineEnding"),V}function V(oe){return _.enter("codeFencedFence"),Xe(oe)?Je(_,B,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(oe):B(oe)}function B(oe){return oe===a?(_.enter("codeFencedFenceSequence"),H(oe)):D(oe)}function H(oe){return oe===a?(W++,_.consume(oe),H):W>=s?(_.exit("codeFencedFenceSequence"),Xe(oe)?Je(_,K,"whitespace")(oe):K(oe)):D(oe)}function K(oe){return oe===null||Ee(oe)?(_.exit("codeFencedFence"),w(oe)):D(oe)}}}function mhe(t,e,n){const i=this;return r;function r(s){return s===null?n(s):(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),o)}function o(s){return i.parser.lazy[i.now().line]?n(s):e(s)}}const c1={name:"codeIndented",tokenize:Ohe},ghe={tokenize:bhe,partial:!0};function Ohe(t,e,n){const i=this;return r;function r(u){return t.enter("codeIndented"),Je(t,o,"linePrefix",5)(u)}function o(u){const c=i.events[i.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?s(u):n(u)}function s(u){return u===null?l(u):Ee(u)?t.attempt(ghe,s,l)(u):(t.enter("codeFlowValue"),a(u))}function a(u){return u===null||Ee(u)?(t.exit("codeFlowValue"),s(u)):(t.consume(u),a)}function l(u){return t.exit("codeIndented"),e(u)}}function bhe(t,e,n){const i=this;return r;function r(s){return i.parser.lazy[i.now().line]?n(s):Ee(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),r):Je(t,o,"linePrefix",5)(s)}function o(s){const a=i.events[i.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(s):Ee(s)?r(s):n(s)}}const yhe={name:"codeText",tokenize:whe,resolve:vhe,previous:She};function vhe(t){let e=t.length-4,n=3,i,r;if((t[n][1].type==="lineEnding"||t[n][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(i=n;++i=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return ethis.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(e,n,i){const r=n||0;this.setCursor(Math.trunc(e));const o=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return i&&Mh(this.left,i),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),Mh(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Mh(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e=4?e(s):t.interrupt(i.parser.constructs.flow,n,e)(s)}}function k9(t,e,n,i,r,o,s,a,l){const u=l||Number.POSITIVE_INFINITY;let c=0;return d;function d(b){return b===60?(t.enter(i),t.enter(r),t.enter(o),t.consume(b),t.exit(o),h):b===null||b===32||b===41||hO(b)?n(b):(t.enter(i),t.enter(s),t.enter(a),t.enter("chunkString",{contentType:"string"}),O(b))}function h(b){return b===62?(t.enter(o),t.consume(b),t.exit(o),t.exit(r),t.exit(i),e):(t.enter(a),t.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===62?(t.exit("chunkString"),t.exit(a),h(b)):b===null||b===60||Ee(b)?n(b):(t.consume(b),b===92?m:p)}function m(b){return b===60||b===62||b===92?(t.consume(b),p):p(b)}function O(b){return!c&&(b===null||b===41||mt(b))?(t.exit("chunkString"),t.exit(a),t.exit(s),t.exit(i),e(b)):c999||p===null||p===91||p===93&&!l||p===94&&!a&&"_hiddenFootnoteSupport"in s.parser.constructs?n(p):p===93?(t.exit(o),t.enter(r),t.consume(p),t.exit(r),t.exit(i),e):Ee(p)?(t.enter("lineEnding"),t.consume(p),t.exit("lineEnding"),c):(t.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===null||p===91||p===93||Ee(p)||a++>999?(t.exit("chunkString"),c(p)):(t.consume(p),l||(l=!Xe(p)),p===92?h:d)}function h(p){return p===91||p===92||p===93?(t.consume(p),a++,d):d(p)}}function _9(t,e,n,i,r,o){let s;return a;function a(h){return h===34||h===39||h===40?(t.enter(i),t.enter(r),t.consume(h),t.exit(r),s=h===40?41:h,l):n(h)}function l(h){return h===s?(t.enter(r),t.consume(h),t.exit(r),t.exit(i),e):(t.enter(o),u(h))}function u(h){return h===s?(t.exit(o),l(s)):h===null?n(h):Ee(h)?(t.enter("lineEnding"),t.consume(h),t.exit("lineEnding"),Je(t,u,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),c(h))}function c(h){return h===s||h===null||Ee(h)?(t.exit("chunkString"),u(h)):(t.consume(h),h===92?d:c)}function d(h){return h===s||h===92?(t.consume(h),c):c(h)}}function bf(t,e){let n;return i;function i(r){return Ee(r)?(t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),n=!0,i):Xe(r)?Je(t,i,n?"linePrefix":"lineSuffix")(r):e(r)}}const Ahe={name:"definition",tokenize:Ihe},Rhe={tokenize:$he,partial:!0};function Ihe(t,e,n){const i=this;let r;return o;function o(p){return t.enter("definition"),s(p)}function s(p){return x9.call(i,t,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return r=Dr(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),p===58?(t.enter("definitionMarker"),t.consume(p),t.exit("definitionMarker"),l):n(p)}function l(p){return mt(p)?bf(t,u)(p):u(p)}function u(p){return k9(t,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function c(p){return t.attempt(Rhe,d,d)(p)}function d(p){return Xe(p)?Je(t,h,"whitespace")(p):h(p)}function h(p){return p===null||Ee(p)?(t.exit("definition"),i.parser.defined.push(r),e(p)):n(p)}}function $he(t,e,n){return i;function i(a){return mt(a)?bf(t,r)(a):n(a)}function r(a){return _9(t,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return Xe(a)?Je(t,s,"whitespace")(a):s(a)}function s(a){return a===null||Ee(a)?e(a):n(a)}}const Lhe={name:"hardBreakEscape",tokenize:Nhe};function Nhe(t,e,n){return i;function i(o){return t.enter("hardBreakEscape"),t.consume(o),r}function r(o){return Ee(o)?(t.exit("hardBreakEscape"),e(o)):n(o)}}const Mhe={name:"headingAtx",tokenize:Bhe,resolve:Dhe};function Dhe(t,e){let n=t.length-2,i=3,r,o;return t[i][1].type==="whitespace"&&(i+=2),n-2>i&&t[n][1].type==="whitespace"&&(n-=2),t[n][1].type==="atxHeadingSequence"&&(i===n-1||n-4>i&&t[n-2][1].type==="whitespace")&&(n-=i+1===n?2:4),n>i&&(r={type:"atxHeadingText",start:t[i][1].start,end:t[n][1].end},o={type:"chunkText",start:t[i][1].start,end:t[n][1].end,contentType:"text"},cr(t,i,n-i+1,[["enter",r,e],["enter",o,e],["exit",o,e],["exit",r,e]])),t}function Bhe(t,e,n){let i=0;return r;function r(c){return t.enter("atxHeading"),o(c)}function o(c){return t.enter("atxHeadingSequence"),s(c)}function s(c){return c===35&&i++<6?(t.consume(c),s):c===null||mt(c)?(t.exit("atxHeadingSequence"),a(c)):n(c)}function a(c){return c===35?(t.enter("atxHeadingSequence"),l(c)):c===null||Ee(c)?(t.exit("atxHeading"),e(c)):Xe(c)?Je(t,a,"whitespace")(c):(t.enter("atxHeadingText"),u(c))}function l(c){return c===35?(t.consume(c),l):(t.exit("atxHeadingSequence"),a(c))}function u(c){return c===null||c===35||mt(c)?(t.exit("atxHeadingText"),a(c)):(t.consume(c),u)}}const Qhe=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Y3=["pre","script","style","textarea"],Fhe={name:"htmlFlow",tokenize:Whe,resolveTo:Uhe,concrete:!0},zhe={tokenize:jhe,partial:!0},Hhe={tokenize:Vhe,partial:!0};function Uhe(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function Whe(t,e,n){const i=this;let r,o,s,a,l;return u;function u(L){return c(L)}function c(L){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(L),d}function d(L){return L===33?(t.consume(L),h):L===47?(t.consume(L),o=!0,O):L===63?(t.consume(L),r=3,i.interrupt?e:A):Kn(L)?(t.consume(L),s=String.fromCharCode(L),y):n(L)}function h(L){return L===45?(t.consume(L),r=2,p):L===91?(t.consume(L),r=5,a=0,m):Kn(L)?(t.consume(L),r=4,i.interrupt?e:A):n(L)}function p(L){return L===45?(t.consume(L),i.interrupt?e:A):n(L)}function m(L){const We="CDATA[";return L===We.charCodeAt(a++)?(t.consume(L),a===We.length?i.interrupt?e:B:m):n(L)}function O(L){return Kn(L)?(t.consume(L),s=String.fromCharCode(L),y):n(L)}function y(L){if(L===null||L===47||L===62||mt(L)){const We=L===47,et=s.toLowerCase();return!We&&!o&&Y3.includes(et)?(r=1,i.interrupt?e(L):B(L)):Qhe.includes(s.toLowerCase())?(r=6,We?(t.consume(L),b):i.interrupt?e(L):B(L)):(r=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(L):o?v(L):S(L))}return L===45||Bn(L)?(t.consume(L),s+=String.fromCharCode(L),y):n(L)}function b(L){return L===62?(t.consume(L),i.interrupt?e:B):n(L)}function v(L){return Xe(L)?(t.consume(L),v):I(L)}function S(L){return L===47?(t.consume(L),I):L===58||L===95||Kn(L)?(t.consume(L),k):Xe(L)?(t.consume(L),S):I(L)}function k(L){return L===45||L===46||L===58||L===95||Bn(L)?(t.consume(L),k):x(L)}function x(L){return L===61?(t.consume(L),_):Xe(L)?(t.consume(L),x):S(L)}function _(L){return L===null||L===60||L===61||L===62||L===96?n(L):L===34||L===39?(t.consume(L),l=L,w):Xe(L)?(t.consume(L),_):D(L)}function w(L){return L===l?(t.consume(L),l=null,W):L===null||Ee(L)?n(L):(t.consume(L),w)}function D(L){return L===null||L===34||L===39||L===47||L===60||L===61||L===62||L===96||mt(L)?x(L):(t.consume(L),D)}function W(L){return L===47||L===62||Xe(L)?S(L):n(L)}function I(L){return L===62?(t.consume(L),V):n(L)}function V(L){return L===null||Ee(L)?B(L):Xe(L)?(t.consume(L),V):n(L)}function B(L){return L===45&&r===2?(t.consume(L),xe):L===60&&r===1?(t.consume(L),Oe):L===62&&r===4?(t.consume(L),be):L===63&&r===3?(t.consume(L),A):L===93&&r===5?(t.consume(L),ae):Ee(L)&&(r===6||r===7)?(t.exit("htmlFlowData"),t.check(zhe,Se,H)(L)):L===null||Ee(L)?(t.exit("htmlFlowData"),H(L)):(t.consume(L),B)}function H(L){return t.check(Hhe,K,Se)(L)}function K(L){return t.enter("lineEnding"),t.consume(L),t.exit("lineEnding"),oe}function oe(L){return L===null||Ee(L)?H(L):(t.enter("htmlFlowData"),B(L))}function xe(L){return L===45?(t.consume(L),A):B(L)}function Oe(L){return L===47?(t.consume(L),s="",X):B(L)}function X(L){if(L===62){const We=s.toLowerCase();return Y3.includes(We)?(t.consume(L),be):B(L)}return Kn(L)&&s.length<8?(t.consume(L),s+=String.fromCharCode(L),X):B(L)}function ae(L){return L===93?(t.consume(L),A):B(L)}function A(L){return L===62?(t.consume(L),be):L===45&&r===2?(t.consume(L),A):B(L)}function be(L){return L===null||Ee(L)?(t.exit("htmlFlowData"),Se(L)):(t.consume(L),be)}function Se(L){return t.exit("htmlFlow"),e(L)}}function Vhe(t,e,n){const i=this;return r;function r(s){return Ee(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),o):n(s)}function o(s){return i.parser.lazy[i.now().line]?n(s):e(s)}}function jhe(t,e,n){return i;function i(r){return t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),t.attempt(zp,e,n)}}const Xhe={name:"htmlText",tokenize:Zhe};function Zhe(t,e,n){const i=this;let r,o,s;return a;function a(A){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(A),l}function l(A){return A===33?(t.consume(A),u):A===47?(t.consume(A),x):A===63?(t.consume(A),S):Kn(A)?(t.consume(A),D):n(A)}function u(A){return A===45?(t.consume(A),c):A===91?(t.consume(A),o=0,m):Kn(A)?(t.consume(A),v):n(A)}function c(A){return A===45?(t.consume(A),p):n(A)}function d(A){return A===null?n(A):A===45?(t.consume(A),h):Ee(A)?(s=d,Oe(A)):(t.consume(A),d)}function h(A){return A===45?(t.consume(A),p):d(A)}function p(A){return A===62?xe(A):A===45?h(A):d(A)}function m(A){const be="CDATA[";return A===be.charCodeAt(o++)?(t.consume(A),o===be.length?O:m):n(A)}function O(A){return A===null?n(A):A===93?(t.consume(A),y):Ee(A)?(s=O,Oe(A)):(t.consume(A),O)}function y(A){return A===93?(t.consume(A),b):O(A)}function b(A){return A===62?xe(A):A===93?(t.consume(A),b):O(A)}function v(A){return A===null||A===62?xe(A):Ee(A)?(s=v,Oe(A)):(t.consume(A),v)}function S(A){return A===null?n(A):A===63?(t.consume(A),k):Ee(A)?(s=S,Oe(A)):(t.consume(A),S)}function k(A){return A===62?xe(A):S(A)}function x(A){return Kn(A)?(t.consume(A),_):n(A)}function _(A){return A===45||Bn(A)?(t.consume(A),_):w(A)}function w(A){return Ee(A)?(s=w,Oe(A)):Xe(A)?(t.consume(A),w):xe(A)}function D(A){return A===45||Bn(A)?(t.consume(A),D):A===47||A===62||mt(A)?W(A):n(A)}function W(A){return A===47?(t.consume(A),xe):A===58||A===95||Kn(A)?(t.consume(A),I):Ee(A)?(s=W,Oe(A)):Xe(A)?(t.consume(A),W):xe(A)}function I(A){return A===45||A===46||A===58||A===95||Bn(A)?(t.consume(A),I):V(A)}function V(A){return A===61?(t.consume(A),B):Ee(A)?(s=V,Oe(A)):Xe(A)?(t.consume(A),V):W(A)}function B(A){return A===null||A===60||A===61||A===62||A===96?n(A):A===34||A===39?(t.consume(A),r=A,H):Ee(A)?(s=B,Oe(A)):Xe(A)?(t.consume(A),B):(t.consume(A),K)}function H(A){return A===r?(t.consume(A),r=void 0,oe):A===null?n(A):Ee(A)?(s=H,Oe(A)):(t.consume(A),H)}function K(A){return A===null||A===34||A===39||A===60||A===61||A===96?n(A):A===47||A===62||mt(A)?W(A):(t.consume(A),K)}function oe(A){return A===47||A===62||mt(A)?W(A):n(A)}function xe(A){return A===62?(t.consume(A),t.exit("htmlTextData"),t.exit("htmlText"),e):n(A)}function Oe(A){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(A),t.exit("lineEnding"),X}function X(A){return Xe(A)?Je(t,ae,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):ae(A)}function ae(A){return t.enter("htmlTextData"),s(A)}}const a_={name:"labelEnd",tokenize:efe,resolveTo:Jhe,resolveAll:Khe},qhe={tokenize:tfe},Yhe={tokenize:nfe},Ghe={tokenize:ife};function Khe(t){let e=-1;for(;++e=3&&(u===null||Ee(u))?(t.exit("thematicBreak"),e(u)):n(u)}function l(u){return u===r?(t.consume(u),i++,l):(t.exit("thematicBreakSequence"),Xe(u)?Je(t,a,"whitespace")(u):a(u))}}const ci={name:"list",tokenize:hfe,continuation:{tokenize:ffe},exit:mfe},cfe={tokenize:gfe,partial:!0},dfe={tokenize:pfe,partial:!0};function hfe(t,e,n){const i=this,r=i.events[i.events.length-1];let o=r&&r[1].type==="linePrefix"?r[2].sliceSerialize(r[1],!0).length:0,s=0;return a;function a(p){const m=i.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!i.containerState.marker||p===i.containerState.marker:pw(p)){if(i.containerState.type||(i.containerState.type=m,t.enter(m,{_container:!0})),m==="listUnordered")return t.enter("listItemPrefix"),p===42||p===45?t.check(Yg,n,u)(p):u(p);if(!i.interrupt||p===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),l(p)}return n(p)}function l(p){return pw(p)&&++s<10?(t.consume(p),l):(!i.interrupt||s<2)&&(i.containerState.marker?p===i.containerState.marker:p===41||p===46)?(t.exit("listItemValue"),u(p)):n(p)}function u(p){return t.enter("listItemMarker"),t.consume(p),t.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||p,t.check(zp,i.interrupt?n:c,t.attempt(cfe,h,d))}function c(p){return i.containerState.initialBlankLine=!0,o++,h(p)}function d(p){return Xe(p)?(t.enter("listItemPrefixWhitespace"),t.consume(p),t.exit("listItemPrefixWhitespace"),h):n(p)}function h(p){return i.containerState.size=o+i.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(p)}}function ffe(t,e,n){const i=this;return i.containerState._closeFlow=void 0,t.check(zp,r,o);function r(a){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,Je(t,e,"listItemIndent",i.containerState.size+1)(a)}function o(a){return i.containerState.furtherBlankLines||!Xe(a)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,s(a)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,t.attempt(dfe,e,s)(a))}function s(a){return i.containerState._closeFlow=!0,i.interrupt=void 0,Je(t,t.attempt(ci,e,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function pfe(t,e,n){const i=this;return Je(t,r,"listItemIndent",i.containerState.size+1);function r(o){const s=i.events[i.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===i.containerState.size?e(o):n(o)}}function mfe(t){t.exit(this.containerState.type)}function gfe(t,e,n){const i=this;return Je(t,r,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function r(o){const s=i.events[i.events.length-1];return!Xe(o)&&s&&s[1].type==="listItemPrefixWhitespace"?e(o):n(o)}}const G3={name:"setextUnderline",tokenize:bfe,resolveTo:Ofe};function Ofe(t,e){let n=t.length,i,r,o;for(;n--;)if(t[n][0]==="enter"){if(t[n][1].type==="content"){i=n;break}t[n][1].type==="paragraph"&&(r=n)}else t[n][1].type==="content"&&t.splice(n,1),!o&&t[n][1].type==="definition"&&(o=n);const s={type:"setextHeading",start:Object.assign({},t[r][1].start),end:Object.assign({},t[t.length-1][1].end)};return t[r][1].type="setextHeadingText",o?(t.splice(r,0,["enter",s,e]),t.splice(o+1,0,["exit",t[i][1],e]),t[i][1].end=Object.assign({},t[o][1].end)):t[i][1]=s,t.push(["exit",s,e]),t}function bfe(t,e,n){const i=this;let r;return o;function o(u){let c=i.events.length,d;for(;c--;)if(i.events[c][1].type!=="lineEnding"&&i.events[c][1].type!=="linePrefix"&&i.events[c][1].type!=="content"){d=i.events[c][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||d)?(t.enter("setextHeadingLine"),r=u,s(u)):n(u)}function s(u){return t.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===r?(t.consume(u),a):(t.exit("setextHeadingLineSequence"),Xe(u)?Je(t,l,"lineSuffix")(u):l(u))}function l(u){return u===null||Ee(u)?(t.exit("setextHeadingLine"),e(u)):n(u)}}const yfe={tokenize:vfe};function vfe(t){const e=this,n=t.attempt(zp,i,t.attempt(this.parser.constructs.flowInitial,r,Je(t,t.attempt(this.parser.constructs.flow,r,t.attempt(_he,r)),"linePrefix")));return n;function i(o){if(o===null){t.consume(o);return}return t.enter("lineEndingBlank"),t.consume(o),t.exit("lineEndingBlank"),e.currentConstruct=void 0,n}function r(o){if(o===null){t.consume(o);return}return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),e.currentConstruct=void 0,n}}const Sfe={resolveAll:C9()},wfe=E9("string"),kfe=E9("text");function E9(t){return{tokenize:e,resolveAll:C9(t==="text"?xfe:void 0)};function e(n){const i=this,r=this.parser.constructs[t],o=n.attempt(r,s,a);return s;function s(c){return u(c)?o(c):a(c)}function a(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),l}function l(c){return u(c)?(n.exit("data"),o(c)):(n.consume(c),l)}function u(c){if(c===null)return!0;const d=r[c];let h=-1;if(d)for(;++h-1){const a=s[0];typeof a=="string"?s[0]=a.slice(i):s.shift()}o>0&&s.push(t[r].slice(0,o))}return s}function Cfe(t,e){let n=-1;const i=[];let r;for(;++n({...t,lang:"EN"})),hue={brand:"AWS",links:due},fue=[{title:"Gemeinschaft",from:"/de/canvas/gemeinschaft",to:"https://community.canvaslms.com/t5/Ressourcen-auf-Deutsch-German/ct-p/german_resources"}],pue=fue.map(t=>({...t,lang:"DE"})),mue=[{title:"Security Audit Report",from:"/canvas/audit/dl",to:"https://github.com/thedannywahl/instructure-security-package/raw/canvas-lms/Canvas%20LMS/Canvas%20Security%20Audit%20Report.pdf"},{title:"Try Canvas (FFT)",from:"/try-canvas",to:"https://www.instructure.com/try-canvas"},{title:"Community",from:"/canvas/community",to:"https://community.canvaslms.com/t5/Canvas/ct-p/canvas"},{title:"Roadmap",from:"/canvas/roadmap",to:"https://community.canvaslms.com/t5/Canvas-Product-Roadmap/ct-p/canvas-product-roadmap"},{title:"Ideas",from:"/canvas/ideas",to:"https://community.canvaslms.com/t5/Canvas-Ideas-and-Themes/ct-p/canvas-ideas-themes?tab=identified"}],gue=mue.map(t=>({...t,lang:"EN"})),Oue=[{title:"Communidad",from:"/es-la/canvas/lms/communidad",to:"https://community.canvaslms.com/t5/Recursos-en-Espa%C3%B1ol-Spanish/ct-p/espanol_resources"}],bue=Oue.map(t=>({...t,lang:"ES_LA"})),yue=[{title:"Comunidade",from:"/pt-br/canvas/comunidade",to:"https://community.canvaslms.com/t5/Recursos-em-Portugu%C3%AAs-Portuguese/ct-p/portuguese_resources"}],vue=yue.map(t=>({...t,lang:"PT_BR"})),Sue={brand:"Canvas",links:[...gue,...bue,...vue,...pue]},wue=[{title:"Compliance Package",from:"/canvas/catalog/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/canvas-catalog.zip"},{title:"PCI AOC SAQ",from:"/canvas/catalog/aoc/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-catalog/Canvas%20Catalog/2023%20Instructure%20PCI%20DSS%20v3.2.1%20AOC%20SAQ-D%20Service%20Provider.pdf"},{title:"Architecture Paper",from:"/canvas/catalog/architecture/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-catalog/Canvas%20Catalog/Canvas%20Catalog%20Architecture.pdf"},{title:"HECVAT Lite",from:"/canvas/catalog/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-catalog/Canvas%20Catalog/Canvas%20Catalog%20HECVAT%20Lite.xlsx"},{title:"PCI Shared Responsibility Matrix",from:"/canvas/catalog/pci/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-catalog/Canvas%20Catalog/Canvas%20Catalog%20PCI%20Responsibility%20Matrix.pdf"},{title:"TX-RAMP Certification",from:"/canvas/catalog/tx-ramp/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-catalog/Canvas%20Catalog/Canvas%20Catalog%20TX-RAMP%20Provisional%20Certificate.pdf"},{title:"Payment Redirector",from:"/canvas/catalog/payments/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-catalog/Canvas%20Catalog/Catalog%20Payment%20Redirector.png"},{title:"Home (HE)",from:"/canvas/catalog",to:"https://www.instructure.com/higher-education/products/canvas/canvas-catalog/"},{title:"Home (K12)",from:"/canvas/catalog/k12",to:"https://www.instructure.com/k12/products/canvas/canvas-catalog/"},{title:"Guides",from:"/canvas/catalog/guides",to:"https://community.canvaslms.com/t5/Canvas-Catalog/ct-p/canvas_catalog"},{title:"Release Notes",from:"/canvas/catalog/releases",to:"https://community.canvaslms.com/t5/Catalog-Releases/ct-p/catalog_releases"},{title:"API",from:"/canvas/catalog/api",to:"https://api.catalog.instructure.com/api/docs"}],kue=wue.map(t=>({...t,lang:"EN"})),xue={brand:"Canvas Catalog",links:kue},_ue=[{title:"Home",from:"/canvas/commons",to:"https://lor.instructure.com/"},{title:"Guides",from:"/canvas/commons/guides",to:"https://community.canvaslms.com/t5/Canvas-Commons/tkb-p/commons"},{title:"API",from:"/canvas/commons/api",to:"https://lor.instructure.com/docs/api/"}],Eue=_ue.map(t=>({...t,lang:"EN"})),Cue={brand:"Canvas Commons",links:Eue},Tue=[{title:"Compliance Package",from:"/canvas/credentials/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/canvas-credentials.zip"},{title:"VPAT",from:"/canvas/credentials/vpat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-credentials/Canvas%20Credentials/Canvas%20Credentials%20(formerly%20Badgr)%20VPAT.pdf"},{title:"Architecture Paper",from:"/canvas/credentials/architecture/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-credentials/Canvas%20Credentials/Canvas%20Credentials%20Architecture.pdf"},{title:"HECVAT",from:"/canvas/credentials/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-credentials/Canvas%20Credentials/Canvas%20Credentials%20HECVAT%20Full.xlsx"},{title:"TX-RAMP Certification",from:"/canvas/credentials/tx-ramp/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-credentials/Canvas%20Credentials/Canvas%20Credentials%20TX-RAMP%20Level%202%20Certification.pdf"},{title:"Home (HE)",from:"/canvas/credentials",to:"https://www.instructure.com/higher-education/products/canvas/canvas-credentials-digital-badges/"},{title:"Home (K12)",from:"/canvas/credentials/k12",to:"https://www.instructure.com/k12/products/canvas/canvas-credentials-digital-badges/"},{title:"Guides",from:"/canvas/credentials/guides",to:"https://community.canvaslms.com/t5/Canvas-Credentials-Badges-Badgr/ct-p/canvas-credentials-badges"},{title:"Release Notes",from:"/canvas/credentials/releases",to:"https://community.canvaslms.com/t5/Badges-Credentials-Releases/tkb-p/badges-release"},{title:"API",from:"/canvas/credentials/api",to:"https://api.badgr.io/docs/v2/"}],Pue=Tue.map(t=>({...t,lang:"EN"})),Aue=[{title:"Compliance Package",from:"/es-la/canvas/credentials/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/canvas-credentials-ES_LA.zip"},{title:"VPAT",from:"/es-la/canvas/credentials/vpat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-credentials-ES_LA/Canvas%20Credentials/Canvas%20Credentials%20(formerly%20Badgr)%20VPAT.pdf"},{title:"Papel de Arquitectura",from:"/es-la/canvas/credentials/arquitectura/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-credentials-ES_LA/Canvas%20Credentials/Canvas%20Credentials%20Architecture_ES.pdf"},{title:"HECVAT",from:"/es-la/canvas/credentials/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-credentials-ES_LA/Canvas%20Credentials/Canvas%20Credentials%20HECVAT%20Full.xlsx"},{title:"Certificado de Nivel 2 de TX-RAMP",from:"/es-la/canvas/credentials/tx-ramp/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-credentials-ES_LA/Canvas%20Credentials/Canvas%20Credentials%20TX-RAMP%20Level%202%20Certification.pdf"}],Rue=Aue.map(t=>({...t,lang:"ES_LA"})),Iue=[{title:"Compliance Package",from:"/pt-br/canvas/credentials/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/canvas-credentials-PT_BR.zip"},{title:"VPAT",from:"/pt-br/canvas/credentials/vpat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-credentials-PT_BR/Canvas%20Credentials/Canvas%20Credentials%20(formerly%20Badgr)%20VPAT.pdf"},{title:"Papel de Arquitectura",from:"/pt-br/canvas/credentials/arquitectura/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-credentials-PT_BR/Canvas%20Credentials/Canvas%20Credentials%20Architecture_PT.pdf"},{title:"HECVAT",from:"/pt-br/canvas/credentials/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-credentials-PT_BR/Canvas%20Credentials/Canvas%20Credentials%20HECVAT%20Full.xlsx"},{title:"Certificado de Nível 2 de TX-RAMP",from:"/pt-br/canvas/credentials/tx-ramp/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-credentials-PT_BR/Canvas%20Credentials/Canvas%20Credentials%20TX-RAMP%20Level%202%20Certification.pdf"}],$ue=Iue.map(t=>({...t,lang:"PT_BR"})),Lue={brand:"Canvas Credentials",links:[...Pue,...Rue,...$ue]},Nue=[{title:"Guides",from:"/canvas/data/guides",to:"https://community.canvaslms.com/t5/Canvas-Data-Users/gh-p/data"},{title:"API",from:"/canvas/data/api",to:"https://portal.inshosteddata.com/docs"}],Mue=Nue.map(t=>({...t,lang:"EN"})),Due={brand:"Canvas Data",links:Mue},Bue=[{title:"Startseite",from:"/de/canvas/lms",to:"https://www.instructure.com/de/hochschule/produkt/canvas/canvas-lms/"},{title:"Handbücher",from:"/de/canvas/handbuch",to:"https://community.canvaslms.com/t5/Ressourcen-auf-Deutsch-German/ct-p/german_resources"}],Que=Bue.map(t=>({...t,lang:"DE"})),Fue=[{title:"Compliance Package",from:"/canvas/lms/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/canvas-lms.zip"},{title:"Architecture Paper",from:"/canvas/lms/architecture/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Canvas%20LMS/Canvas%20LMS%20Architecture.pdf"},{title:"HECVAT",from:"/canvas/lms/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Canvas%20LMS/Canvas%20LMS%20HECVAT%20Full.xlsx"},{title:"K12CVAT",from:"/canvas/lms/k12cvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Canvas%20LMS/Canvas%20LMS%20K12CVAT%20Full.xlsx"},{title:"SOC 3 Report",from:"/canvas/lms/soc/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Canvas%20LMS/Canvas%20LMS%20SOC%203.pdf"},{title:"TX-RAMP Level 2 Certificate",from:"/canvas/lms/txramp/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Canvas%20LMS/Canvas%20LMS%20TX-RAMP%20Level%202%20Certification.pdf"},{title:"Home (HE)",from:"/canvas/lms",to:"https://www.instructure.com/higher-education/products/canvas/canvas-lms/"},{title:"Home (K12)",from:"/canvas/lms/k12",to:"https://www.instructure.com/k12/products/canvas/canvas-lms/"},{title:"VPAT",from:"/canvas/lms/vpat",to:"https://www.instructure.com/products/canvas/accessibility/"},{title:"Guides",from:"/canvas/lms/guides",to:"https://community.canvaslms.com/t5/Canvas-Guides/ct-p/canvas_guides/"},{title:"Release Notes",from:"/canvas/lms/releases",to:"https://community.canvaslms.com/t5/Canvas-Releases/tkb-p/canvas-release"},{title:"API",from:"/canvas/lms/api",to:"https://canvas.instructure.com/doc/api/index.html"}],zue=Fue.map(t=>({...t,lang:"EN"})),Hue=[{title:"Compliance Package (ES-LA)",from:"/es-la/canvas/lms/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/canvas-lms-ES_LA.zip"},{title:"Papel de Arquitectura",from:"/es-la/canvas/lms/arquitectura/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms-ES_LA/Canvas%20LMS/Canvas%20LMS%20Architecture_ES.pdf"},{title:"HECVAT",from:"/es-la/canvas/lms/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms-ES_LA/Canvas%20LMS/Canvas%20LMS%20HECVAT%20Full.xlsx"},{title:"K12CVAT",from:"/es-la/canvas/lms/k12cvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms-ES_LA/Canvas%20LMS/Canvas%20LMS%20K-12CVAT-Lite.xlsx"},{title:"Informe SOC 3",from:"/es-la/canvas/lms/soc/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms-ES_LA/Canvas%20LMS/Canvas%20LMS%20SOC%203.pdf"},{title:"Certificado de Nivel 2 de TX-RAMP",from:"/es-la/canvas/lms/txramp/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms-ES_LA/Canvas%20LMS/Canvas%20LMS%20TX-RAMP%20Level%202%20Certification.pdf"},{title:"Página de inicio (HE)",from:"/es-la/canvas/lms",to:"https://www.instructure.com/es/canvas/educacion-superior/"},{title:"Página de inicio (K12)",from:"/es-la/canvas/lms/basica",to:"https://www.instructure.com/es/educacion-basica/"},{title:"Guías",from:"/es-la/canvas/guias",to:"https://community.canvaslms.com/t5/Recursos-en-Espa%C3%B1ol-Spanish/ct-p/espanol_resources"},{title:"Notas de implementación",from:"/es-la/canvas/lms/publicacion",to:"https://community.canvaslms.com/t5/Espa%C3%B1ol/tkb-p/canvas-release-espanol"}],Uue=Hue.map(t=>({...t,lang:"ES_LA"})),Wue=[{title:"Compliance Package",from:"/pt-br/canvas/lms/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/canvas-lms-PT_BR.zip"},{title:"Papel de Arquitetura",from:"/pt-br/canvas/lms/arquitetura/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms-PT_BR/Canvas%20LMS/Canvas%20LMS%20Architecture_PT.pdf"},{title:"HECVAT",from:"/pt-br/canvas/lms/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms-PT_BR/Canvas%20LMS/Canvas%20LMS%20HECVAT%20Full.xlsx"},{title:"K12CVAT",from:"/pt-br/canvas/lms/k12cvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms-PT_BR/Canvas%20LMS/Canvas%20LMS%20K-12CVAT-Lite.xlsx"},{title:"Relatório SOC 3",from:"/pt-br/canvas/lms/soc/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms-PT_BR/Canvas%20LMS/Canvas%20LMS%20SOC%203.pdf"},{title:"Certificado de Nível 2 do TX-RAMP",from:"/pt-br/canvas/lms/txramp/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms-PT_BR/Canvas%20LMS/Canvas%20LMS%20TX-RAMP%20Level%202%20Certification.pdf"},{title:"Página inicial (HE)",from:"/canvas/lms/pt",to:"https://www.instructure.com/pt-br/canvas/ensino-superior/"},{title:"Página inicial (K12)",from:"/canvas/lms/pt/basica",to:"https://www.instructure.com/pt-br/ensino-fundamental-e-medio/"},{title:"Guias",from:"/pt-br/canvas/guias",to:"https://community.canvaslms.com/t5/Recursos-en-Espa%C3%B1ol-Spanish/ct-p/espanol_resources"},{title:"Notas de lançamento (Canvas LMS)",from:"/canvas/lms/lancamentos",to:"https://community.canvaslms.com/t5/Portugues/tkb-p/canvas-release-portugues"}],Vue=Wue.map(t=>({...t,lang:"PT_BR"})),jue={brand:"Canvas LMS",links:[...zue,...Uue,...Vue,...Que]},Xue=[{title:"Mobile Apps (Android)",from:"/canvas/mobile/android",to:"https://play.google.com/store/apps/developer?id=Instructure"},{title:"Mobile Apps (iOS)",from:"/canvas/mobile/ios",to:"https://apps.apple.com/us/developer/instructure-inc/id418441198"},{title:"Release Notes",from:"/canvas/mobile/releases",to:"https://community.canvaslms.com/t5/Canvas-Mobile-Releases/tkb-p/CanvasMobileReleases"},{title:"Guides",from:"/canvas/mobile/guides",to:"https://community.canvaslms.com/t5/Canvas-Mobile-Users/gh-p/mobile"}],Zue=Xue.map(t=>({...t,lang:"EN"})),que={brand:"Canvas Mobile",links:Zue},Yue=[{title:"Compliance Package",from:"/canvas/studio/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/canvas-studio.zip"},{title:"Architecture Paper",from:"/canvas/studio/architecture/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-studio/Canvas%20Studio/Canvas%20Studio%20Architecture.pdf"},{title:"HECVAT",from:"/canvas/studio/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-studio/Canvas%20Studio/Canvas%20Studio%20HECVAT%20Lite.xlsx"},{title:"Home (HE)",from:"/canvas/studio",to:"https://www.instructure.com/higher-education/products/canvas/canvas-studio/"},{title:"Home (K12)",from:"/canvas/studio/k12",to:"https://www.instructure.com/k12/products/canvas/canvas-studio/"},{title:"VPAT",from:"/canvas/studio/vpat",to:"https://www.instructure.com/accessibility/canvas/canvas-studio-vpat/"},{title:"Guides",from:"/canvas/studio/guides",to:"https://community.canvaslms.com/t5/Canvas-Studio/ct-p/studio_guides"},{title:"Release Notes",from:"/canvas/studio/releases",to:"https://community.canvaslms.com/t5/Studio-Releases/ct-p/studio_releases"},{title:"API",from:"/canvas/studio/api",to:"https://canvas.instructuremedia.com/api/public/docs/#/"}],Gue=Yue.map(t=>({...t,lang:"EN"})),Kue={brand:"Canvas Studio",links:Gue},Jue=[{title:"Community",from:"/elevate/community",to:"https://community.canvaslms.com/t5/Elevate/ct-p/elevate"},{title:"Roadmap",from:"/elevate/roadmap",to:"https://community.canvaslms.com/t5/Elevate-Product-Roadmap/ct-p/elevate-product-roadmap"}],ece=Jue.map(t=>({...t,lang:"EN"})),tce={brand:"Elevate",links:ece},nce=[{title:"Home",from:"/elevate/dataquality",to:"https://www.instructure.com/k12/products/elevate/elevate-data-quality/"},{title:"Guides",from:"/elevate/dataquality/guides",to:"https://community.canvaslms.com/t5/Elevate-Data-Quality/ct-p/certify"}],ice=nce.map(t=>({...t,lang:"EN"})),rce={brand:"Elevate Data Quality",links:ice},oce=[{title:"Guides",from:"/elevate/datasync/guides",to:"https://community.canvaslms.com/t5/Elevate-Data-Sync/ct-p/elevate_data_sync"}],sce=oce.map(t=>({...t,lang:"EN"})),ace={brand:"Elevate Data Sync",links:sce},lce=[{title:"Compliance Package",from:"/elevate/k12-analytics/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/elevate-k12-analytics.zip"},{title:"Home",from:"/elevate/k12-analytics",to:"https://www.instructure.com/k12/products/elevate/elevate-k12-analytics"},{title:"Release Notes",from:"/elevate/k12-analytics/releases",to:"https://community.canvaslms.com/t5/Elevate-K-12-Analytics-Releases/tkb-p/v_release"},{title:"Guides",from:"/elevate/k12analytics/guides",to:"https://community.canvaslms.com/t5/Elevate-K-12-Analytics/ct-p/videri"}],uce=lce.map(t=>({...t,lang:"EN"})),cce={brand:"Elevate K-12 Analytics",links:uce},dce=[{title:"Compliance Package",from:"/elevate/standards-alignment/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/elevate-standards-alignment.zip"},{title:"HECVAT Lite",from:"/elevate/standards-alignment/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/elevate-standards-alignment/Elevate%20Standards%20Alignment/Elevate%20Standards%20Alignment%20HECVAT%20Lite.xlsx"},{title:"Home",from:"/elevate/standards-alignment",to:"https://www.instructure.com/corporate-education/products/elevate/elevate-standards-alignment"},{title:"Release Notes",from:"/elevate/standards-alignment/releases",to:"https://community.canvaslms.com/t5/Elevate-Standards-Alignment/tkb-p/esa_releases"},{title:"Guides",from:"/elevate/standards-alignment/guides",to:"https://community.canvaslms.com/t5/Elevate-Standards-Alignment/tkb-p/ab_basics"}],hce=dce.map(t=>({...t,lang:"EN"})),fce={brand:"Elevate Standards Alignment",links:hce},pce=[{title:"Compliance Package",from:"/impact/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/impact.zip"},{title:"Architecture Paper",from:"/impact/architecture/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/impact/Impact/Impact%20Architecture.pdf"},{title:"HECVAT Lite",from:"/impact/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/impact/Impact/Impact%20HECVAT%20Lite.xlsx"},{title:"TX-RAMP Level 2 Certification",from:"/impact/tx-ramp/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/impact/Impact/Impact%20TX-RAMP%20Level%202%20Certification.pdf"},{title:"Home (HE)",from:"/impact/he",to:"https://www.instructure.com/higher-education/products/impact/"},{title:"Home (K12)",from:"/impact/k12",to:"https://www.instructure.com/k12/products/impact/"},{title:"Community",from:"/impact/community",to:"https://community.canvaslms.com/t5/Impact/ct-p/impact"},{title:"Guides",from:"/impact/guides",to:"https://community.canvaslms.com/t5/Impact-Guides/tkb-p/impact_guides"},{title:"Release Notes",from:"/impact/releases",to:"https://community.canvaslms.com/t5/Impact-Releases/ct-p/impact_releases"}],mce=pce.map(t=>({...t,lang:"EN"})),gce=[{title:"Compliance Package",from:"/es-la/impact/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/impact-ES_LA.zip",lang:"ES_LA"},{title:"Papel de Arquitectura",from:"/es-la/impact/arquitectura/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/impact-ES_LA/Impact/Impact%20Architecture_ES.pdf"},{title:"HECVAT Lite",from:"/es-la/impact/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/impact-ES_LA/Impact/Impact%20HECVAT%20Lite.xlsx"},{title:"Certificado de Nivel 2 de TX-RAMP",from:"/es-la/impact/tx-ramp/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/impact-ES_LA/Impact/Impact%20TX-RAMP%20Level%202%20Certification.pdf"}],Oce=gce.map(t=>({...t,lang:"ES_LA"})),bce=[{title:"Compliance Package",from:"/pt-br/impact/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/impact-PT_BR.zip",lang:"PT_BR"},{title:"Papel de Arquitetura",from:"/pt-br/impact/arquitetura/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/impact-PT_BR/Impact/Impact%20Architecture_PT.pdf"},{title:"HECVAT Lite",from:"/pt-br/impact/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/impact-PT_BR/Impact/Impact%20HECVAT%20Lite.xlsx"},{title:"Certificado de Nível 2 do TX-RAMP",from:"/pt-br/impact/tx-ramp/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/impact-PT_BR/Impact/Impact%20TX-RAMP%20Level%202%20Certification.pdf"}],yce=bce.map(t=>({...t,lang:"PT_BR"})),vce={brand:"Impact",links:[...mce,...Oce,...yce]},Sce=[{title:"Startseite",from:"/de/home",to:"https://www.instructure.com/de"},{title:"Contato",from:"/pt-br/contato",to:"https://www.instructure.com/pt-br/contato/"},{title:"Kontakt",from:"/kontakt",to:"https://www.instructure.com/de/contact-us"}],wce=Sce.map(t=>({...t,lang:"DE"})),kce=[{title:"Security White Paper",from:"/security/dl",to:"https://github.com/thedannywahl/instructure-security-package/raw/main/Instructure/Instructure%20Security%20Overview.pdf"},{title:"Business Continuity White Paper",from:"/bc/dl",to:"https://github.com/thedannywahl/instructure-security-package/raw/main/Instructure/Instructure%20Business%20Continuity%20%26%20Disaster%20Recovery.pdf"},{title:"CAIQ",from:"/caiq/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Instructure/Instructure%20ESG%20Report%20FY2023.pdf"},{title:"CSA Star Certificate",from:"/csa/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Instructure/Instructure%20CSA%20STAR%20Certificate.pdf"},{title:"Cyber Essentials+ Certificate",from:"/ce/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Instructure/Instructure%20Cyber%20Essentials%20Plus.pdf"},{title:"Environmental, Social, and Governance Report",from:"/esg/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Instructure/Instructure%20ESG%20Report%20FY2023.pdf"},{title:"Instructure, Inc. Certificate of Insurance",from:"/coi/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Instructure/Instructure%20Inc%20COI.pdf"},{title:"Instructure Global Certificate of Insurance",from:"/coi-global/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Instructure/Instructure%20Global%20COI.pdf"},{title:"ISO 27001 Certificate",from:"/iso/dl",to:"https://github.com/thedannywahl/instructure-security-package/raw/main/Instructure/Instructure%20ISO%2027001%20Compliance%20Certificate.pdf"},{title:"Quality Assurance Program",from:"/qa/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Instructure/Instructure%20Quality%20Assurance%20Program.pdf"},{title:"Home",from:"/home",to:"https://www.instructure.com/"},{title:"Roadmap",from:"/roadmap",to:"https://community.canvaslms.com/t5/Instructure-Roadmap/ct-p/instructure-roadmap/"},{title:"Accessibility",from:"/a11y",to:"https://www.instructure.com/accessibility/"},{title:"Contact",from:"/contact",to:"https://www.instructure.com/contact-us/"},{title:"Privacy",from:"/privacy",to:"https://www.instructure.com/canvas/privacy/"},{title:"Security",from:"/security",to:"https://www.instructure.com/products/canvas/security/"},{title:"Trust Center",from:"/trust",to:"https://www.instructure.com/trust-center/"},{title:"Community",from:"/community",to:"https://community.canvaslms.com/"},{title:"Terms & Conditions",from:"/tos",to:"https://www.instructure.com/policies/master-terms-conditions/"},{title:"Global Terms & Conditions",from:"/tos/global",to:"https://www.instructure.com/policies/global/master-terms-and-conditions/"},{title:"Acceptable Use Policy",from:"/aup",to:"https://www.instructure.com/policies/acceptable-use/"},{title:"Data Privacy Addendum",from:"/dpa",to:"https://www.instructure.com/policies/data-processing/"},{title:"Investor Relations",from:"/investors",to:"https://ir.instructure.com/overview/default.aspx"},{title:"Status",from:"/status",to:"https://status.instructure.com/"},{title:"CSA Star Registration",from:"/csa",to:"https://cloudsecurityalliance.org/star/registry/instructure/"},{title:"1EdTech Registrations",from:"/1edtech",to:"https://site.imsglobal.org/certifications?query=instructure"},{title:"Our Story",from:"/story",to:"https://www.instructure.com/about/our-story"},{title:"Study Hall",from:"/resources",to:"https://www.instructure.com/resources/"},{title:"EduAppCenter",from:"/apps",to:"https://www.eduappcenter.com/"},{title:"ESG Report (online)",from:"/esg",to:"https://instructure.com/esg-report"}],xce=kce.map(t=>({...t,lang:"EN"})),_ce=[{title:"Página de inicio",from:"/es-la/home",to:"https://www.instructure.com/es/"},{title:"Contáctenos",from:"/es-la/contactenos",to:"https://www.instructure.com/es/contactenos/"},{title:"Privacidad",from:"/es-la/privicidad",to:"https://www.instructure.com/es/canvas/privacidad/"},{title:"Seguridad",from:"/es-la/seguridad",to:"https://www.instructure.com/es/canvas/seguridad/"},{title:"Nuestra Historia",from:"/es-la/historia",to:"https://www.instructure.com/es/sobre/nuestra-historia"}],Ece=_ce.map(t=>({...t,lang:"ES_LA"})),Cce=[{title:"Pagina inicial",from:"/pt-br/home",to:"https://www.instructure.com/pt-br/"},{title:"Contato",from:"/pt-br/contato",to:"https://www.instructure.com/pt-br/contato/"},{title:"Contato",from:"/pt-br/contato",to:"https://www.instructure.com/pt-br/contato/"},{title:"Privacidade",from:"/pt-br/privacidade",to:"https://www.instructure.com/pt-br/canvas/privacidade/"},{title:"Segurança",from:"/pt-br/seguranca",to:"https://www.instructure.com/pt-br/canvas/seguranca/"},{title:"Nossa História",from:"/pt-br/historia",to:"https://www.instructure.com/pt-br/sobre/nossa-historia"}],Tce=Cce.map(t=>({...t,lang:"PT_BR"})),Pce={brand:"Instructure",links:[...xce,...Ece,...Tce,...wce]},Ace=[{title:"Compliance Package",from:"/learnplatform/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/learnplatform.zip"},{title:"EdTech Top 40 Report",from:"/learnplatform/top40/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/learnplatform/LearnPlatform/EdTech%20Top%2040.pdf"},{title:"Architecture Paper",from:"/learnplatform/architecture/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/learnplatform/LearnPlatform/LearnPlatform%20Architecture%20Overview.pdf"},{title:"HECVAT Lite",from:"/learnplatform/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/learnplatform/LearnPlatform/LearnPlatform%20HECVAT%20Lite.xlsx"},{title:"Home",from:"/learnplatform",to:"https://www.instructure.com/k12/products/learnplatform/"},{title:"Terms of Service",from:"/learnplatform/tos",to:"https://www.instructure.com/policies/learnplatform-terms-of-service/"},{title:"Privacy",from:"/learnplatform/privacy",to:"https://www.instructure.com/policies/privacy-learnplatform/"},{title:"Data Processing Agreement",from:"/learnplatform/dpa",to:"https://www.instructure.com/policies/learnplatform-data-processing-agreement/"},{title:"Statement of Neutrality",from:"/learnplatform/neutrality",to:"https://www.instructure.com/policies/learnplatform-neutrality/"}],Rce=Ace.map(t=>({...t,lang:"EN"})),Ice={brand:"Learnplatform",links:Rce},$ce=[{title:"Community",from:"/mastery/community",to:"https://community.canvaslms.com/t5/Mastery/ct-p/mastery"},{title:"Roadmap",from:"/mastery/roadmap",to:"https://community.canvaslms.com/t5/Mastery-Product-Roadmap/ct-p/mastery-product-roadmap"}],Lce=$ce.map(t=>({...t,lang:"EN"})),Nce={brand:"Mastery",links:Lce},Mce=[{title:"Compliance Package",from:"/mastery/connect/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/mastery-connect.zip"},{title:"Architecture Paper",from:"/mastery/connect/architecture/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/mastery-connect/Mastery%20Connect/Mastery%20Connect%20Architecture.pdf"},{title:"HECVAT Lite",from:"/mastery/connect/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/mastery-connect/Mastery%20Connect/Mastery%20Connect%20HECVAT%20Lite.xlsx"},{title:"Home",from:"/mastery/connect",to:"https://www.instructure.com/k12/products/mastery/mastery-connect"},{title:"Guides",from:"/mastery/connect/guides",to:"https://community.canvaslms.com/t5/Mastery-Connect/ct-p/masteryconnect"},{title:"Release Notes",from:"/mastery/connect/releases",to:"https://community.canvaslms.com/t5/Mastery-Connect-Releases/tkb-p/masteryconnect"},{title:"API",from:"/mastery/connect/api",to:"https://docs.google.com/document/d/19TxyeRzF6nyJDY6ej2dZozbE87JdUygw"},{title:"Mobile App (Android)",from:"/mastery/connect/android",to:"https://play.google.com/store/apps/dev?id=8869528477632015729&hl=EN&gl=US"},{title:"Mobile App (iOS)",from:"/canvas/lms/ios",to:"https://apps.apple.com/us/developer/masteryconnect/id413937396"}],Dce=Mce.map(t=>({...t,lang:"EN"})),Bce={brand:"Mastery Connect",links:Dce},Qce=[{title:"Home",from:"/mastery/itembank",to:"https://www.instructure.com/k12/products/mastery/mastery-item-bank/"},{title:"Guides",from:"/mastery/itembank/guides",to:"https://community.canvaslms.com/t5/Mastery-Item-Bank/ct-p/mastery-item-bank/"}],Fce=Qce.map(t=>({...t,lang:"EN"})),zce={brand:"Mastery Item Bank",links:Fce},Hce=[{title:"Formatives Home",from:"mastery/view/formative",to:"https://www.instructure.com/k12/products/mastery/mastery-view-formative-assessments/"},{title:"Predictives Home",from:"/mastery/view/predictive",to:"https://www.instructure.com/k12/products/mastery/mastery-view-predictive-assessments/"}],Uce=Hce.map(t=>({...t,lang:"EN"})),Wce={brand:"Mastery View Assessments",links:Uce},Vce=[],jce=Vce.map(t=>({...t,lang:"EN"})),Xce={brand:"Parchment",links:jce},hw=[hue,Pce,Sue,jue,que,Kue,xue,Cue,Due,Nce,Bce,zce,Wce,Lue,Ice,Xce,tce,cce,fce,rce,ace,vce];function P3(){const t=nh(Id().language),e=ms(uue,t),n=Oi.url.replace("https://",""),[i,r]=T.useState({search:""}),[o,s]=T.useState({codes:t}),[a,l]=T.useState("all"),[u,c]=T.useState({list:l1}),[d,h]=T.useState("all"),[p,m]=T.useState({list:Ii}),[O,y]=T.useState({list:hw.map(B=>({...B,links:B.links.filter(H=>H.lang.toUpperCase()===t)}))}),[b,v]=T.useState({expanded:!1,text:e.toggleShow}),S=(B,H)=>{r({search:H}),w(o.codes,H,u.list,d)},k=(B,H)=>{const K=[];H==="all"?(K.push(...dw),x(B,"all")):K.push(...dw.filter(re=>re.toUpperCase().includes(H.toUpperCase()))),s({codes:K}),w(K,i.search,u.list,d)},x=(B,H)=>{h(H),w(o.codes,i.search,u.list,H)},_=(B,H)=>{const K=[];H==="all"?K.push(...l1):K.push(...["AWS",...l1].filter(re=>re.toLowerCase().includes(H.toLowerCase()))),l(H),c({list:K}),x(B,"all"),m({list:K}),w(o.codes,i.search,K,"all")},w=(B,H,K,re)=>{const ke=hw.map(ge=>({...ge,links:ge.links.filter(Z=>`${`${ge.brand} ${Z.title}`}`.toLowerCase().includes(H.toLowerCase())).filter(Z=>B.includes(Z.lang.toUpperCase()))})).filter(ge=>ge.links.length>0).filter(ge=>K.includes(ge.brand)).filter(ge=>re!=="all"?ge.brand===p.list[0]||ge.brand===re:!0);y({list:ke})},D=()=>{const B=b.expanded?e.toggleShow:e.toggleHide;v({expanded:!b.expanded,text:B})},W=B=>{if(i.search.length)return N.jsx($0,{type:"button",size:"small",withBackground:!1,withBorder:!1,screenReaderLabel:e.clearSearch,onClick:I,children:N.jsx(Wd,{})})},I=B=>{B.stopPropagation(),S(B,"")};async function V(B){try{await navigator.clipboard.writeText(B)}catch(H){console.error(H.message)}}return N.jsxs(N.Fragment,{children:[N.jsx(rh,{language:t}),N.jsxs(be,{id:"main",as:"div",padding:"medium medium xx-large",minWidth:"20rem",maxWidth:"59.25rem",margin:"0 auto",children:[N.jsxs(be,{as:"div",margin:"none none x-large",children:[N.jsx(Tr,{level:"h1",children:e.header}),N.jsx(Vt,{as:"p",children:e.description}),N.jsx(Zk,{onClick:D,children:b.text}),N.jsx(Q8,{id:"toggleFilters",summary:e.filters,onToggle:D,expanded:b.expanded,children:N.jsx(be,{as:"div",margin:"large none none",children:N.jsx("form",{name:"searchFilters",autoComplete:"off",children:N.jsxs(qv,{label:"",description:"",layout:"stacked",children:[N.jsx(Gk,{type:"search",renderLabel:e.search,placeholder:e.placeholder,onChange:S,renderBeforeInput:N.jsx(Eu,{inline:!1}),renderAfterInput:W,value:i.search}),N.jsxs(ky,{name:"brand",description:e.brands,defaultValue:"all",layout:"columns",variant:"toggle",onChange:_,children:[N.jsx(Ll,{value:"all",label:"All",context:"off"},"all"),["AWS",...Ii].map(B=>N.jsx(Ll,{value:B,label:B,context:"off"},B))]}),a!=="all"&&p.list.length>1&&N.jsxs(ky,{name:"product",description:e.products,defaultValue:"all",layout:"columns",variant:"toggle",onChange:x,children:[N.jsx(Ll,{value:"all",label:"All",context:"off",id:"allProducts",checked:d==="all"},"all"),p.list.filter(B=>B!==a).map(B=>N.jsx(Ll,{value:B,label:B,context:"off"},B))]}),N.jsxs(ky,{name:"language",description:e.language,defaultValue:t,layout:"columns",variant:"toggle",onChange:k,children:[N.jsx(Ll,{value:"all",label:"All",context:"off"},"all"),K8.map(B=>N.jsx(Ll,{value:B.code,label:B.local,context:"off"},B.code))]})]})})})})]}),O.list.map(B=>{if(B.links.length){const H=B.brand;return N.jsxs(be,{as:"div",margin:"none none xx-large",children:[N.jsx(Tr,{level:Ii.includes(H)?"h2":"h3",id:H,children:H}),N.jsxs(Ln,{hover:!0,caption:H,children:[N.jsx(Ln.Head,{children:N.jsxs(Ln.Row,{children:[N.jsx(Ln.ColHeader,{id:"Title",width:"25%",children:e.title}),N.jsx(Ln.ColHeader,{id:"URLs",children:e.link})]})}),N.jsx(Ln.Body,{children:B.links.map(K=>N.jsxs(Ln.Row,{children:[N.jsx(Ln.Cell,{children:N.jsx(Vt,{children:K.title})}),N.jsxs(Ln.Cell,{children:[N.jsx(Mi,{href:`https://${n}${K.from}`,children:`${n}${K.from}`}),"  ",N.jsx(CM,{renderTip:e.copy,on:["hover","focus"],placement:"top",color:"primary-inverse",children:N.jsx($0,{withBackground:!1,withBorder:!1,screenReaderLabel:e.copy_url,onClick:()=>{V(`https://${n}${K.from}`)},children:N.jsx(Nd,{})})}),N.jsx("br",{}),N.jsx(Vt,{size:"small",color:"secondary",children:K.to.split("?")[0]})]})]},K.title))})]})]},H)}return null})]}),N.jsx(ih,{language:t})]})}function A3(t){const e=[],n=String(t||"");let i=n.indexOf(","),r=0,o=!1;for(;!o;){i===-1&&(i=n.length,o=!0);const s=n.slice(r,i).trim();(s||!o)&&e.push(s),r=i+1,i=n.indexOf(",",r)}return e}function e9(t,e){const n={};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Zce=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,qce=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Yce={};function R3(t,e){return(Yce.jsx?qce:Zce).test(t)}const Gce=/[ \t\n\f\r]/g;function Kce(t){return typeof t=="object"?t.type==="text"?I3(t.value):!1:I3(t)}function I3(t){return t.replace(Gce,"")===""}class Fp{constructor(e,n,i){this.property=e,this.normal=n,i&&(this.space=i)}}Fp.prototype.property={};Fp.prototype.normal={};Fp.prototype.space=null;function t9(t,e){const n={},i={};let r=-1;for(;++r4&&n.slice(0,4)==="data"&&ide.test(e)){if(e.charAt(4)==="-"){const o=e.slice(5).replace(L3,sde);i="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=e.slice(4);if(!L3.test(o)){let s=o.replace(rde,ode);s.charAt(0)!=="-"&&(s="-"+s),e="data"+s}}r=n_}return new r(i,e)}function ode(t){return"-"+t.toLowerCase()}function sde(t){return t.charAt(1).toUpperCase()}const ade={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},zp=t9([r9,i9,a9,l9,tde],"html"),Ea=t9([r9,i9,a9,l9,nde],"svg");function N3(t){const e=String(t||"").trim();return e?e.split(/[ \t\n\r\f]+/g):[]}function u9(t){return t.join(" ").trim()}var c9={},M3=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,lde=/\n/g,ude=/^\s*/,cde=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,dde=/^:\s*/,hde=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,fde=/^[;\s]*/,pde=/^\s+|\s+$/g,mde=` +`,D3="/",B3="*",Dl="",gde="comment",Ode="declaration",bde=function(t,e){if(typeof t!="string")throw new TypeError("First argument must be a string");if(!t)return[];e=e||{};var n=1,i=1;function r(m){var O=m.match(lde);O&&(n+=O.length);var y=m.lastIndexOf(mde);i=~y?m.length-y:i+m.length}function o(){var m={line:n,column:i};return function(O){return O.position=new s(m),u(),O}}function s(m){this.start=m,this.end={line:n,column:i},this.source=e.source}s.prototype.content=t;function a(m){var O=new Error(e.source+":"+n+":"+i+": "+m);if(O.reason=m,O.filename=e.source,O.line=n,O.column=i,O.source=t,!e.silent)throw O}function l(m){var O=m.exec(t);if(O){var y=O[0];return r(y),t=t.slice(y.length),O}}function u(){l(ude)}function c(m){var O;for(m=m||[];O=d();)O!==!1&&m.push(O);return m}function d(){var m=o();if(!(D3!=t.charAt(0)||B3!=t.charAt(1))){for(var O=2;Dl!=t.charAt(O)&&(B3!=t.charAt(O)||D3!=t.charAt(O+1));)++O;if(O+=2,Dl===t.charAt(O-1))return a("End of comment missing");var y=t.slice(2,O-2);return i+=2,r(y),t=t.slice(O),i+=2,m({type:gde,comment:y})}}function h(){var m=o(),O=l(cde);if(O){if(d(),!l(dde))return a("property missing ':'");var y=l(hde),b=m({type:Ode,property:Q3(O[0].replace(M3,Dl)),value:y?Q3(y[0].replace(M3,Dl)):Dl});return l(fde),b}}function p(){var m=[];c(m);for(var O;O=h();)O!==!1&&(m.push(O),c(m));return m}return u(),p()};function Q3(t){return t?t.replace(pde,Dl):Dl}var yde=T1&&T1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(c9,"__esModule",{value:!0});var vde=yde(bde);function Sde(t,e){var n=null;if(!t||typeof t!="string")return n;var i=(0,vde.default)(t),r=typeof e=="function";return i.forEach(function(o){if(o.type==="declaration"){var s=o.property,a=o.value;r?e(s,a,o):a&&(n=n||{},n[s]=a)}}),n}var F3=c9.default=Sde;const wde=F3.default||F3,wb=d9("end"),Ro=d9("start");function d9(t){return e;function e(n){const i=n&&n.position&&n.position[t]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function kde(t){const e=Ro(t),n=wb(t);if(e&&n)return{start:e,end:n}}function bf(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?z3(t.position):"start"in t||"end"in t?z3(t):"line"in t||"column"in t?pw(t):""}function pw(t){return H3(t&&t.line)+":"+H3(t&&t.column)}function z3(t){return pw(t&&t.start)+"-"+pw(t&&t.end)}function H3(t){return t&&typeof t=="number"?t:1}class Un extends Error{constructor(e,n,i){super(),typeof n=="string"&&(i=n,n=void 0);let r="",o={},s=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof e=="string"?r=e:!o.cause&&e&&(s=!0,r=e.message,o.cause=e),!o.ruleId&&!o.source&&typeof i=="string"){const l=i.indexOf(":");l===-1?o.ruleId=i:(o.source=i.slice(0,l),o.ruleId=i.slice(l+1))}if(!o.place&&o.ancestors&&o.ancestors){const l=o.ancestors[o.ancestors.length-1];l&&(o.place=l.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file,this.message=r,this.line=a?a.line:void 0,this.name=bf(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=s&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}Un.prototype.file="";Un.prototype.name="";Un.prototype.reason="";Un.prototype.message="";Un.prototype.stack="";Un.prototype.column=void 0;Un.prototype.line=void 0;Un.prototype.ancestors=void 0;Un.prototype.cause=void 0;Un.prototype.fatal=void 0;Un.prototype.place=void 0;Un.prototype.ruleId=void 0;Un.prototype.source=void 0;const i_={}.hasOwnProperty,xde=new Map,_de=/[A-Z]/g,Ede=/-([a-z])/g,Cde=new Set(["table","tbody","thead","tfoot","tr"]),Tde=new Set(["td","th"]),h9="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Pde(t,e){if(!e||e.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=e.filePath||void 0;let i;if(e.development){if(typeof e.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=Dde(n,e.jsxDEV)}else{if(typeof e.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof e.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=Mde(n,e.jsx,e.jsxs)}const r={Fragment:e.Fragment,ancestors:[],components:e.components||{},create:i,elementAttributeNameCase:e.elementAttributeNameCase||"react",evaluater:e.createEvaluater?e.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:e.ignoreInvalidStyle||!1,passKeys:e.passKeys!==!1,passNode:e.passNode||!1,schema:e.space==="svg"?Ea:zp,stylePropertyNameCase:e.stylePropertyNameCase||"dom",tableCellAlignToStyle:e.tableCellAlignToStyle!==!1},o=f9(r,t,void 0);return o&&typeof o!="string"?o:r.create(t,r.Fragment,{children:o||void 0},void 0)}function f9(t,e,n){if(e.type==="element")return Ade(t,e,n);if(e.type==="mdxFlowExpression"||e.type==="mdxTextExpression")return Rde(t,e);if(e.type==="mdxJsxFlowElement"||e.type==="mdxJsxTextElement")return $de(t,e,n);if(e.type==="mdxjsEsm")return Ide(t,e);if(e.type==="root")return Lde(t,e,n);if(e.type==="text")return Nde(t,e)}function Ade(t,e,n){const i=t.schema;let r=i;e.tagName.toLowerCase()==="svg"&&i.space==="html"&&(r=Ea,t.schema=r),t.ancestors.push(e);const o=m9(t,e.tagName,!1),s=Bde(t,e);let a=o_(t,e);return Cde.has(e.tagName)&&(a=a.filter(function(l){return typeof l=="string"?!Kce(l):!0})),p9(t,s,o,e),r_(s,a),t.ancestors.pop(),t.schema=i,t.create(e,o,s,n)}function Rde(t,e){if(e.data&&e.data.estree&&t.evaluater){const i=e.data.estree.body[0];return i.type,t.evaluater.evaluateExpression(i.expression)}vp(t,e.position)}function Ide(t,e){if(e.data&&e.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(e.data.estree);vp(t,e.position)}function $de(t,e,n){const i=t.schema;let r=i;e.name==="svg"&&i.space==="html"&&(r=Ea,t.schema=r),t.ancestors.push(e);const o=e.name===null?t.Fragment:m9(t,e.name,!0),s=Qde(t,e),a=o_(t,e);return p9(t,s,o,e),r_(s,a),t.ancestors.pop(),t.schema=i,t.create(e,o,s,n)}function Lde(t,e,n){const i={};return r_(i,o_(t,e)),t.create(e,t.Fragment,i,n)}function Nde(t,e){return e.value}function p9(t,e,n,i){typeof n!="string"&&n!==t.Fragment&&t.passNode&&(e.node=i)}function r_(t,e){if(e.length>0){const n=e.length>1?e:e[0];n&&(t.children=n)}}function Mde(t,e,n){return i;function i(r,o,s,a){const u=Array.isArray(s.children)?n:e;return a?u(o,s,a):u(o,s)}}function Dde(t,e){return n;function n(i,r,o,s){const a=Array.isArray(o.children),l=Ro(i);return e(r,o,s,a,{columnNumber:l?l.column-1:void 0,fileName:t,lineNumber:l?l.line:void 0},void 0)}}function Bde(t,e){const n={};let i,r;for(r in e.properties)if(r!=="children"&&i_.call(e.properties,r)){const o=Fde(t,r,e.properties[r]);if(o){const[s,a]=o;t.tableCellAlignToStyle&&s==="align"&&typeof a=="string"&&Tde.has(e.tagName)?i=a:n[s]=a}}if(i){const o=n.style||(n.style={});o[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return n}function Qde(t,e){const n={};for(const i of e.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&t.evaluater){const o=i.data.estree.body[0];o.type;const s=o.expression;s.type;const a=s.properties[0];a.type,Object.assign(n,t.evaluater.evaluateExpression(a.argument))}else vp(t,e.position);else{const r=i.name;let o;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&t.evaluater){const a=i.value.data.estree.body[0];a.type,o=t.evaluater.evaluateExpression(a.expression)}else vp(t,e.position);else o=i.value===null?!0:i.value;n[r]=o}return n}function o_(t,e){const n=[];let i=-1;const r=t.passKeys?new Map:xde;for(;++ir?0:r+e:e=e>r?r:e,n=n>0?n:0,i.length<1e4)s=Array.from(i),s.unshift(e,n),t.splice(...s);else for(n&&t.splice(e,n);o0?(ur(t,t.length,0,e),t):e}const V3={}.hasOwnProperty;function O9(t){const e={};let n=-1;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Dr(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Kn=Ca(/[A-Za-z]/),Bn=Ca(/[\dA-Za-z]/),Yde=Ca(/[#-'*+\--9=?A-Z^-~]/);function fO(t){return t!==null&&(t<32||t===127)}const mw=Ca(/\d/),Gde=Ca(/[\dA-Fa-f]/),Kde=Ca(/[!-/:-@[-`{-~]/);function _e(t){return t!==null&&t<-2}function gt(t){return t!==null&&(t<0||t===32)}function Ze(t){return t===-2||t===-1||t===32}const kb=Ca(new RegExp("\\p{P}|\\p{S}","u")),Ou=Ca(/\s/);function Ca(t){return e;function e(n){return n!==null&&n>-1&&t.test(String.fromCharCode(n))}}function sh(t){const e=[];let n=-1,i=0,r=0;for(;++n55295&&o<57344){const a=t.charCodeAt(n+1);o<56320&&a>56319&&a<57344?(s=String.fromCharCode(o,a),r=1):s="�"}else s=String.fromCharCode(o);s&&(e.push(t.slice(i,n),encodeURIComponent(s)),i=n+r+1,s=""),r&&(n+=r,r=0)}return e.join("")+t.slice(i)}function et(t,e,n,i){const r=i?i-1:Number.POSITIVE_INFINITY;let o=0;return s;function s(l){return Ze(l)?(t.enter(n),a(l)):e(l)}function a(l){return Ze(l)&&o++s))return;const w=e.events.length;let D=w,W,I;for(;D--;)if(e.events[D][0]==="exit"&&e.events[D][1].type==="chunkFlow"){if(W){I=e.events[D][1].end;break}W=!0}for(b(i),_=w;_S;){const x=n[k];e.containerState=x[1],x[0].exit.call(e,t)}n.length=S}function v(){r.write([null]),o=void 0,r=void 0,e.containerState._closeFlow=void 0}}function ihe(t,e,n){return et(t,t.attempt(this.parser.constructs.document,e,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function pO(t){if(t===null||gt(t)||Ou(t))return 1;if(kb(t))return 2}function xb(t,e,n){const i=[];let r=-1;for(;++r1&&t[n][1].end.offset-t[n][1].start.offset>1?2:1;const d=Object.assign({},t[i][1].end),h=Object.assign({},t[n][1].start);X3(d,-l),X3(h,l),s={type:l>1?"strongSequence":"emphasisSequence",start:d,end:Object.assign({},t[i][1].end)},a={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},t[n][1].start),end:h},o={type:l>1?"strongText":"emphasisText",start:Object.assign({},t[i][1].end),end:Object.assign({},t[n][1].start)},r={type:l>1?"strong":"emphasis",start:Object.assign({},s.start),end:Object.assign({},a.end)},t[i][1].end=Object.assign({},s.start),t[n][1].start=Object.assign({},a.end),u=[],t[i][1].end.offset-t[i][1].start.offset&&(u=tr(u,[["enter",t[i][1],e],["exit",t[i][1],e]])),u=tr(u,[["enter",r,e],["enter",s,e],["exit",s,e],["enter",o,e]]),u=tr(u,xb(e.parser.constructs.insideSpan.null,t.slice(i+1,n),e)),u=tr(u,[["exit",o,e],["enter",a,e],["exit",a,e],["exit",r,e]]),t[n][1].end.offset-t[n][1].start.offset?(c=2,u=tr(u,[["enter",t[n][1],e],["exit",t[n][1],e]])):c=0,ur(t,i-1,n-i+3,u),n=i+u.length-c-2;break}}for(n=-1;++n0&&Ze(_)?et(t,v,"linePrefix",o+1)(_):v(_)}function v(_){return _===null||_e(_)?t.check(Z3,O,k)(_):(t.enter("codeFlowValue"),S(_))}function S(_){return _===null||_e(_)?(t.exit("codeFlowValue"),v(_)):(t.consume(_),S)}function k(_){return t.exit("codeFenced"),e(_)}function x(_,w,D){let W=0;return I;function I(re){return _.enter("lineEnding"),_.consume(re),_.exit("lineEnding"),V}function V(re){return _.enter("codeFencedFence"),Ze(re)?et(_,B,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(re):B(re)}function B(re){return re===a?(_.enter("codeFencedFenceSequence"),H(re)):D(re)}function H(re){return re===a?(W++,_.consume(re),H):W>=s?(_.exit("codeFencedFenceSequence"),Ze(re)?et(_,K,"whitespace")(re):K(re)):D(re)}function K(re){return re===null||_e(re)?(_.exit("codeFencedFence"),w(re)):D(re)}}}function mhe(t,e,n){const i=this;return r;function r(s){return s===null?n(s):(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),o)}function o(s){return i.parser.lazy[i.now().line]?n(s):e(s)}}const d1={name:"codeIndented",tokenize:Ohe},ghe={tokenize:bhe,partial:!0};function Ohe(t,e,n){const i=this;return r;function r(u){return t.enter("codeIndented"),et(t,o,"linePrefix",5)(u)}function o(u){const c=i.events[i.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?s(u):n(u)}function s(u){return u===null?l(u):_e(u)?t.attempt(ghe,s,l)(u):(t.enter("codeFlowValue"),a(u))}function a(u){return u===null||_e(u)?(t.exit("codeFlowValue"),s(u)):(t.consume(u),a)}function l(u){return t.exit("codeIndented"),e(u)}}function bhe(t,e,n){const i=this;return r;function r(s){return i.parser.lazy[i.now().line]?n(s):_e(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),r):et(t,o,"linePrefix",5)(s)}function o(s){const a=i.events[i.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(s):_e(s)?r(s):n(s)}}const yhe={name:"codeText",tokenize:whe,resolve:vhe,previous:She};function vhe(t){let e=t.length-4,n=3,i,r;if((t[n][1].type==="lineEnding"||t[n][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(i=n;++i=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return ethis.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(e,n,i){const r=n||0;this.setCursor(Math.trunc(e));const o=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return i&&Dh(this.left,i),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),Dh(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Dh(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e=4?e(s):t.interrupt(i.parser.constructs.flow,n,e)(s)}}function k9(t,e,n,i,r,o,s,a,l){const u=l||Number.POSITIVE_INFINITY;let c=0;return d;function d(b){return b===60?(t.enter(i),t.enter(r),t.enter(o),t.consume(b),t.exit(o),h):b===null||b===32||b===41||fO(b)?n(b):(t.enter(i),t.enter(s),t.enter(a),t.enter("chunkString",{contentType:"string"}),O(b))}function h(b){return b===62?(t.enter(o),t.consume(b),t.exit(o),t.exit(r),t.exit(i),e):(t.enter(a),t.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===62?(t.exit("chunkString"),t.exit(a),h(b)):b===null||b===60||_e(b)?n(b):(t.consume(b),b===92?m:p)}function m(b){return b===60||b===62||b===92?(t.consume(b),p):p(b)}function O(b){return!c&&(b===null||b===41||gt(b))?(t.exit("chunkString"),t.exit(a),t.exit(s),t.exit(i),e(b)):c999||p===null||p===91||p===93&&!l||p===94&&!a&&"_hiddenFootnoteSupport"in s.parser.constructs?n(p):p===93?(t.exit(o),t.enter(r),t.consume(p),t.exit(r),t.exit(i),e):_e(p)?(t.enter("lineEnding"),t.consume(p),t.exit("lineEnding"),c):(t.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===null||p===91||p===93||_e(p)||a++>999?(t.exit("chunkString"),c(p)):(t.consume(p),l||(l=!Ze(p)),p===92?h:d)}function h(p){return p===91||p===92||p===93?(t.consume(p),a++,d):d(p)}}function _9(t,e,n,i,r,o){let s;return a;function a(h){return h===34||h===39||h===40?(t.enter(i),t.enter(r),t.consume(h),t.exit(r),s=h===40?41:h,l):n(h)}function l(h){return h===s?(t.enter(r),t.consume(h),t.exit(r),t.exit(i),e):(t.enter(o),u(h))}function u(h){return h===s?(t.exit(o),l(s)):h===null?n(h):_e(h)?(t.enter("lineEnding"),t.consume(h),t.exit("lineEnding"),et(t,u,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),c(h))}function c(h){return h===s||h===null||_e(h)?(t.exit("chunkString"),u(h)):(t.consume(h),h===92?d:c)}function d(h){return h===s||h===92?(t.consume(h),c):c(h)}}function yf(t,e){let n;return i;function i(r){return _e(r)?(t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),n=!0,i):Ze(r)?et(t,i,n?"linePrefix":"lineSuffix")(r):e(r)}}const Ahe={name:"definition",tokenize:Ihe},Rhe={tokenize:$he,partial:!0};function Ihe(t,e,n){const i=this;let r;return o;function o(p){return t.enter("definition"),s(p)}function s(p){return x9.call(i,t,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return r=Dr(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),p===58?(t.enter("definitionMarker"),t.consume(p),t.exit("definitionMarker"),l):n(p)}function l(p){return gt(p)?yf(t,u)(p):u(p)}function u(p){return k9(t,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function c(p){return t.attempt(Rhe,d,d)(p)}function d(p){return Ze(p)?et(t,h,"whitespace")(p):h(p)}function h(p){return p===null||_e(p)?(t.exit("definition"),i.parser.defined.push(r),e(p)):n(p)}}function $he(t,e,n){return i;function i(a){return gt(a)?yf(t,r)(a):n(a)}function r(a){return _9(t,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return Ze(a)?et(t,s,"whitespace")(a):s(a)}function s(a){return a===null||_e(a)?e(a):n(a)}}const Lhe={name:"hardBreakEscape",tokenize:Nhe};function Nhe(t,e,n){return i;function i(o){return t.enter("hardBreakEscape"),t.consume(o),r}function r(o){return _e(o)?(t.exit("hardBreakEscape"),e(o)):n(o)}}const Mhe={name:"headingAtx",tokenize:Bhe,resolve:Dhe};function Dhe(t,e){let n=t.length-2,i=3,r,o;return t[i][1].type==="whitespace"&&(i+=2),n-2>i&&t[n][1].type==="whitespace"&&(n-=2),t[n][1].type==="atxHeadingSequence"&&(i===n-1||n-4>i&&t[n-2][1].type==="whitespace")&&(n-=i+1===n?2:4),n>i&&(r={type:"atxHeadingText",start:t[i][1].start,end:t[n][1].end},o={type:"chunkText",start:t[i][1].start,end:t[n][1].end,contentType:"text"},ur(t,i,n-i+1,[["enter",r,e],["enter",o,e],["exit",o,e],["exit",r,e]])),t}function Bhe(t,e,n){let i=0;return r;function r(c){return t.enter("atxHeading"),o(c)}function o(c){return t.enter("atxHeadingSequence"),s(c)}function s(c){return c===35&&i++<6?(t.consume(c),s):c===null||gt(c)?(t.exit("atxHeadingSequence"),a(c)):n(c)}function a(c){return c===35?(t.enter("atxHeadingSequence"),l(c)):c===null||_e(c)?(t.exit("atxHeading"),e(c)):Ze(c)?et(t,a,"whitespace")(c):(t.enter("atxHeadingText"),u(c))}function l(c){return c===35?(t.consume(c),l):(t.exit("atxHeadingSequence"),a(c))}function u(c){return c===null||c===35||gt(c)?(t.exit("atxHeadingText"),a(c)):(t.consume(c),u)}}const Qhe=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Y3=["pre","script","style","textarea"],Fhe={name:"htmlFlow",tokenize:Whe,resolveTo:Uhe,concrete:!0},zhe={tokenize:jhe,partial:!0},Hhe={tokenize:Vhe,partial:!0};function Uhe(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function Whe(t,e,n){const i=this;let r,o,s,a,l;return u;function u(L){return c(L)}function c(L){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(L),d}function d(L){return L===33?(t.consume(L),h):L===47?(t.consume(L),o=!0,O):L===63?(t.consume(L),r=3,i.interrupt?e:A):Kn(L)?(t.consume(L),s=String.fromCharCode(L),y):n(L)}function h(L){return L===45?(t.consume(L),r=2,p):L===91?(t.consume(L),r=5,a=0,m):Kn(L)?(t.consume(L),r=4,i.interrupt?e:A):n(L)}function p(L){return L===45?(t.consume(L),i.interrupt?e:A):n(L)}function m(L){const Ve="CDATA[";return L===Ve.charCodeAt(a++)?(t.consume(L),a===Ve.length?i.interrupt?e:B:m):n(L)}function O(L){return Kn(L)?(t.consume(L),s=String.fromCharCode(L),y):n(L)}function y(L){if(L===null||L===47||L===62||gt(L)){const Ve=L===47,tt=s.toLowerCase();return!Ve&&!o&&Y3.includes(tt)?(r=1,i.interrupt?e(L):B(L)):Qhe.includes(s.toLowerCase())?(r=6,Ve?(t.consume(L),b):i.interrupt?e(L):B(L)):(r=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(L):o?v(L):S(L))}return L===45||Bn(L)?(t.consume(L),s+=String.fromCharCode(L),y):n(L)}function b(L){return L===62?(t.consume(L),i.interrupt?e:B):n(L)}function v(L){return Ze(L)?(t.consume(L),v):I(L)}function S(L){return L===47?(t.consume(L),I):L===58||L===95||Kn(L)?(t.consume(L),k):Ze(L)?(t.consume(L),S):I(L)}function k(L){return L===45||L===46||L===58||L===95||Bn(L)?(t.consume(L),k):x(L)}function x(L){return L===61?(t.consume(L),_):Ze(L)?(t.consume(L),x):S(L)}function _(L){return L===null||L===60||L===61||L===62||L===96?n(L):L===34||L===39?(t.consume(L),l=L,w):Ze(L)?(t.consume(L),_):D(L)}function w(L){return L===l?(t.consume(L),l=null,W):L===null||_e(L)?n(L):(t.consume(L),w)}function D(L){return L===null||L===34||L===39||L===47||L===60||L===61||L===62||L===96||gt(L)?x(L):(t.consume(L),D)}function W(L){return L===47||L===62||Ze(L)?S(L):n(L)}function I(L){return L===62?(t.consume(L),V):n(L)}function V(L){return L===null||_e(L)?B(L):Ze(L)?(t.consume(L),V):n(L)}function B(L){return L===45&&r===2?(t.consume(L),ke):L===60&&r===1?(t.consume(L),ge):L===62&&r===4?(t.consume(L),Oe):L===63&&r===3?(t.consume(L),A):L===93&&r===5?(t.consume(L),se):_e(L)&&(r===6||r===7)?(t.exit("htmlFlowData"),t.check(zhe,ye,H)(L)):L===null||_e(L)?(t.exit("htmlFlowData"),H(L)):(t.consume(L),B)}function H(L){return t.check(Hhe,K,ye)(L)}function K(L){return t.enter("lineEnding"),t.consume(L),t.exit("lineEnding"),re}function re(L){return L===null||_e(L)?H(L):(t.enter("htmlFlowData"),B(L))}function ke(L){return L===45?(t.consume(L),A):B(L)}function ge(L){return L===47?(t.consume(L),s="",Z):B(L)}function Z(L){if(L===62){const Ve=s.toLowerCase();return Y3.includes(Ve)?(t.consume(L),Oe):B(L)}return Kn(L)&&s.length<8?(t.consume(L),s+=String.fromCharCode(L),Z):B(L)}function se(L){return L===93?(t.consume(L),A):B(L)}function A(L){return L===62?(t.consume(L),Oe):L===45&&r===2?(t.consume(L),A):B(L)}function Oe(L){return L===null||_e(L)?(t.exit("htmlFlowData"),ye(L)):(t.consume(L),Oe)}function ye(L){return t.exit("htmlFlow"),e(L)}}function Vhe(t,e,n){const i=this;return r;function r(s){return _e(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),o):n(s)}function o(s){return i.parser.lazy[i.now().line]?n(s):e(s)}}function jhe(t,e,n){return i;function i(r){return t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),t.attempt(Hp,e,n)}}const Xhe={name:"htmlText",tokenize:Zhe};function Zhe(t,e,n){const i=this;let r,o,s;return a;function a(A){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(A),l}function l(A){return A===33?(t.consume(A),u):A===47?(t.consume(A),x):A===63?(t.consume(A),S):Kn(A)?(t.consume(A),D):n(A)}function u(A){return A===45?(t.consume(A),c):A===91?(t.consume(A),o=0,m):Kn(A)?(t.consume(A),v):n(A)}function c(A){return A===45?(t.consume(A),p):n(A)}function d(A){return A===null?n(A):A===45?(t.consume(A),h):_e(A)?(s=d,ge(A)):(t.consume(A),d)}function h(A){return A===45?(t.consume(A),p):d(A)}function p(A){return A===62?ke(A):A===45?h(A):d(A)}function m(A){const Oe="CDATA[";return A===Oe.charCodeAt(o++)?(t.consume(A),o===Oe.length?O:m):n(A)}function O(A){return A===null?n(A):A===93?(t.consume(A),y):_e(A)?(s=O,ge(A)):(t.consume(A),O)}function y(A){return A===93?(t.consume(A),b):O(A)}function b(A){return A===62?ke(A):A===93?(t.consume(A),b):O(A)}function v(A){return A===null||A===62?ke(A):_e(A)?(s=v,ge(A)):(t.consume(A),v)}function S(A){return A===null?n(A):A===63?(t.consume(A),k):_e(A)?(s=S,ge(A)):(t.consume(A),S)}function k(A){return A===62?ke(A):S(A)}function x(A){return Kn(A)?(t.consume(A),_):n(A)}function _(A){return A===45||Bn(A)?(t.consume(A),_):w(A)}function w(A){return _e(A)?(s=w,ge(A)):Ze(A)?(t.consume(A),w):ke(A)}function D(A){return A===45||Bn(A)?(t.consume(A),D):A===47||A===62||gt(A)?W(A):n(A)}function W(A){return A===47?(t.consume(A),ke):A===58||A===95||Kn(A)?(t.consume(A),I):_e(A)?(s=W,ge(A)):Ze(A)?(t.consume(A),W):ke(A)}function I(A){return A===45||A===46||A===58||A===95||Bn(A)?(t.consume(A),I):V(A)}function V(A){return A===61?(t.consume(A),B):_e(A)?(s=V,ge(A)):Ze(A)?(t.consume(A),V):W(A)}function B(A){return A===null||A===60||A===61||A===62||A===96?n(A):A===34||A===39?(t.consume(A),r=A,H):_e(A)?(s=B,ge(A)):Ze(A)?(t.consume(A),B):(t.consume(A),K)}function H(A){return A===r?(t.consume(A),r=void 0,re):A===null?n(A):_e(A)?(s=H,ge(A)):(t.consume(A),H)}function K(A){return A===null||A===34||A===39||A===60||A===61||A===96?n(A):A===47||A===62||gt(A)?W(A):(t.consume(A),K)}function re(A){return A===47||A===62||gt(A)?W(A):n(A)}function ke(A){return A===62?(t.consume(A),t.exit("htmlTextData"),t.exit("htmlText"),e):n(A)}function ge(A){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(A),t.exit("lineEnding"),Z}function Z(A){return Ze(A)?et(t,se,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):se(A)}function se(A){return t.enter("htmlTextData"),s(A)}}const l_={name:"labelEnd",tokenize:efe,resolveTo:Jhe,resolveAll:Khe},qhe={tokenize:tfe},Yhe={tokenize:nfe},Ghe={tokenize:ife};function Khe(t){let e=-1;for(;++e=3&&(u===null||_e(u))?(t.exit("thematicBreak"),e(u)):n(u)}function l(u){return u===r?(t.consume(u),i++,l):(t.exit("thematicBreakSequence"),Ze(u)?et(t,a,"whitespace")(u):a(u))}}const ui={name:"list",tokenize:hfe,continuation:{tokenize:ffe},exit:mfe},cfe={tokenize:gfe,partial:!0},dfe={tokenize:pfe,partial:!0};function hfe(t,e,n){const i=this,r=i.events[i.events.length-1];let o=r&&r[1].type==="linePrefix"?r[2].sliceSerialize(r[1],!0).length:0,s=0;return a;function a(p){const m=i.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!i.containerState.marker||p===i.containerState.marker:mw(p)){if(i.containerState.type||(i.containerState.type=m,t.enter(m,{_container:!0})),m==="listUnordered")return t.enter("listItemPrefix"),p===42||p===45?t.check(Gg,n,u)(p):u(p);if(!i.interrupt||p===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),l(p)}return n(p)}function l(p){return mw(p)&&++s<10?(t.consume(p),l):(!i.interrupt||s<2)&&(i.containerState.marker?p===i.containerState.marker:p===41||p===46)?(t.exit("listItemValue"),u(p)):n(p)}function u(p){return t.enter("listItemMarker"),t.consume(p),t.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||p,t.check(Hp,i.interrupt?n:c,t.attempt(cfe,h,d))}function c(p){return i.containerState.initialBlankLine=!0,o++,h(p)}function d(p){return Ze(p)?(t.enter("listItemPrefixWhitespace"),t.consume(p),t.exit("listItemPrefixWhitespace"),h):n(p)}function h(p){return i.containerState.size=o+i.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(p)}}function ffe(t,e,n){const i=this;return i.containerState._closeFlow=void 0,t.check(Hp,r,o);function r(a){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,et(t,e,"listItemIndent",i.containerState.size+1)(a)}function o(a){return i.containerState.furtherBlankLines||!Ze(a)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,s(a)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,t.attempt(dfe,e,s)(a))}function s(a){return i.containerState._closeFlow=!0,i.interrupt=void 0,et(t,t.attempt(ui,e,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function pfe(t,e,n){const i=this;return et(t,r,"listItemIndent",i.containerState.size+1);function r(o){const s=i.events[i.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===i.containerState.size?e(o):n(o)}}function mfe(t){t.exit(this.containerState.type)}function gfe(t,e,n){const i=this;return et(t,r,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function r(o){const s=i.events[i.events.length-1];return!Ze(o)&&s&&s[1].type==="listItemPrefixWhitespace"?e(o):n(o)}}const G3={name:"setextUnderline",tokenize:bfe,resolveTo:Ofe};function Ofe(t,e){let n=t.length,i,r,o;for(;n--;)if(t[n][0]==="enter"){if(t[n][1].type==="content"){i=n;break}t[n][1].type==="paragraph"&&(r=n)}else t[n][1].type==="content"&&t.splice(n,1),!o&&t[n][1].type==="definition"&&(o=n);const s={type:"setextHeading",start:Object.assign({},t[r][1].start),end:Object.assign({},t[t.length-1][1].end)};return t[r][1].type="setextHeadingText",o?(t.splice(r,0,["enter",s,e]),t.splice(o+1,0,["exit",t[i][1],e]),t[i][1].end=Object.assign({},t[o][1].end)):t[i][1]=s,t.push(["exit",s,e]),t}function bfe(t,e,n){const i=this;let r;return o;function o(u){let c=i.events.length,d;for(;c--;)if(i.events[c][1].type!=="lineEnding"&&i.events[c][1].type!=="linePrefix"&&i.events[c][1].type!=="content"){d=i.events[c][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||d)?(t.enter("setextHeadingLine"),r=u,s(u)):n(u)}function s(u){return t.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===r?(t.consume(u),a):(t.exit("setextHeadingLineSequence"),Ze(u)?et(t,l,"lineSuffix")(u):l(u))}function l(u){return u===null||_e(u)?(t.exit("setextHeadingLine"),e(u)):n(u)}}const yfe={tokenize:vfe};function vfe(t){const e=this,n=t.attempt(Hp,i,t.attempt(this.parser.constructs.flowInitial,r,et(t,t.attempt(this.parser.constructs.flow,r,t.attempt(_he,r)),"linePrefix")));return n;function i(o){if(o===null){t.consume(o);return}return t.enter("lineEndingBlank"),t.consume(o),t.exit("lineEndingBlank"),e.currentConstruct=void 0,n}function r(o){if(o===null){t.consume(o);return}return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),e.currentConstruct=void 0,n}}const Sfe={resolveAll:C9()},wfe=E9("string"),kfe=E9("text");function E9(t){return{tokenize:e,resolveAll:C9(t==="text"?xfe:void 0)};function e(n){const i=this,r=this.parser.constructs[t],o=n.attempt(r,s,a);return s;function s(c){return u(c)?o(c):a(c)}function a(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),l}function l(c){return u(c)?(n.exit("data"),o(c)):(n.consume(c),l)}function u(c){if(c===null)return!0;const d=r[c];let h=-1;if(d)for(;++h-1){const a=s[0];typeof a=="string"?s[0]=a.slice(i):s.shift()}o>0&&s.push(t[r].slice(0,o))}return s}function Cfe(t,e){let n=-1;const i=[];let r;for(;++n0){const _t=te.tokenStack[te.tokenStack.length-1];(_t[1]||J3).call(te,void 0,_t[0])}for(G.position={start:$s(F.length>0?F[0][1].start:{line:1,column:1,offset:0}),end:$s(F.length>0?F[F.length-2][1].end:{line:1,column:1,offset:0})},Qe=-1;++Qe0){const Ce=ue.tokenStack[ue.tokenStack.length-1];(Ce[1]||J3).call(ue,void 0,Ce[0])}for(X.position={start:Ls(F.length>0?F[0][1].start:{line:1,column:1,offset:0}),end:Ls(F.length>0?F[F.length-2][1].end:{line:1,column:1,offset:0})},Ue=-1;++Ue1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};t.patch(e,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return t.patch(e,u),t.applyData(e,u)}function epe(t,e){const n={type:"element",tagName:"h"+e.depth,properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function tpe(t,e){if(t.options.allowDangerousHtml){const n={type:"raw",value:e.value};return t.patch(e,n),t.applyData(e,n)}}function A9(t,e){const n=e.referenceType;let i="]";if(n==="collapsed"?i+="[]":n==="full"&&(i+="["+(e.label||e.identifier)+"]"),e.type==="imageReference")return[{type:"text",value:"!["+e.alt+i}];const r=t.all(e),o=r[0];o&&o.type==="text"?o.value="["+o.value:r.unshift({type:"text",value:"["});const s=r[r.length-1];return s&&s.type==="text"?s.value+=i:r.push({type:"text",value:i}),r}function npe(t,e){const n=String(e.identifier).toUpperCase(),i=t.definitionById.get(n);if(!i)return A9(t,e);const r={src:oh(i.url||""),alt:e.alt};i.title!==null&&i.title!==void 0&&(r.title=i.title);const o={type:"element",tagName:"img",properties:r,children:[]};return t.patch(e,o),t.applyData(e,o)}function ipe(t,e){const n={src:oh(e.url)};e.alt!==null&&e.alt!==void 0&&(n.alt=e.alt),e.title!==null&&e.title!==void 0&&(n.title=e.title);const i={type:"element",tagName:"img",properties:n,children:[]};return t.patch(e,i),t.applyData(e,i)}function rpe(t,e){const n={type:"text",value:e.value.replace(/\r?\n|\r/g," ")};t.patch(e,n);const i={type:"element",tagName:"code",properties:{},children:[n]};return t.patch(e,i),t.applyData(e,i)}function ope(t,e){const n=String(e.identifier).toUpperCase(),i=t.definitionById.get(n);if(!i)return A9(t,e);const r={href:oh(i.url||"")};i.title!==null&&i.title!==void 0&&(r.title=i.title);const o={type:"element",tagName:"a",properties:r,children:t.all(e)};return t.patch(e,o),t.applyData(e,o)}function spe(t,e){const n={href:oh(e.url)};e.title!==null&&e.title!==void 0&&(n.title=e.title);const i={type:"element",tagName:"a",properties:n,children:t.all(e)};return t.patch(e,i),t.applyData(e,i)}function ape(t,e,n){const i=t.all(e),r=n?lpe(n):R9(e),o={},s=[];if(typeof e.checked=="boolean"){const c=i[0];let d;c&&c.type==="element"&&c.tagName==="p"?d=c:(d={type:"element",tagName:"p",properties:{},children:[]},i.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:e.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let a=-1;for(;++a1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};t.patch(e,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return t.patch(e,u),t.applyData(e,u)}function epe(t,e){const n={type:"element",tagName:"h"+e.depth,properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function tpe(t,e){if(t.options.allowDangerousHtml){const n={type:"raw",value:e.value};return t.patch(e,n),t.applyData(e,n)}}function A9(t,e){const n=e.referenceType;let i="]";if(n==="collapsed"?i+="[]":n==="full"&&(i+="["+(e.label||e.identifier)+"]"),e.type==="imageReference")return[{type:"text",value:"!["+e.alt+i}];const r=t.all(e),o=r[0];o&&o.type==="text"?o.value="["+o.value:r.unshift({type:"text",value:"["});const s=r[r.length-1];return s&&s.type==="text"?s.value+=i:r.push({type:"text",value:i}),r}function npe(t,e){const n=String(e.identifier).toUpperCase(),i=t.definitionById.get(n);if(!i)return A9(t,e);const r={src:sh(i.url||""),alt:e.alt};i.title!==null&&i.title!==void 0&&(r.title=i.title);const o={type:"element",tagName:"img",properties:r,children:[]};return t.patch(e,o),t.applyData(e,o)}function ipe(t,e){const n={src:sh(e.url)};e.alt!==null&&e.alt!==void 0&&(n.alt=e.alt),e.title!==null&&e.title!==void 0&&(n.title=e.title);const i={type:"element",tagName:"img",properties:n,children:[]};return t.patch(e,i),t.applyData(e,i)}function rpe(t,e){const n={type:"text",value:e.value.replace(/\r?\n|\r/g," ")};t.patch(e,n);const i={type:"element",tagName:"code",properties:{},children:[n]};return t.patch(e,i),t.applyData(e,i)}function ope(t,e){const n=String(e.identifier).toUpperCase(),i=t.definitionById.get(n);if(!i)return A9(t,e);const r={href:sh(i.url||"")};i.title!==null&&i.title!==void 0&&(r.title=i.title);const o={type:"element",tagName:"a",properties:r,children:t.all(e)};return t.patch(e,o),t.applyData(e,o)}function spe(t,e){const n={href:sh(e.url)};e.title!==null&&e.title!==void 0&&(n.title=e.title);const i={type:"element",tagName:"a",properties:n,children:t.all(e)};return t.patch(e,i),t.applyData(e,i)}function ape(t,e,n){const i=t.all(e),r=n?lpe(n):R9(e),o={},s=[];if(typeof e.checked=="boolean"){const c=i[0];let d;c&&c.type==="element"&&c.tagName==="p"?d=c:(d={type:"element",tagName:"p",properties:{},children:[]},i.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:e.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let a=-1;for(;++a1}function upe(t,e){const n={},i=t.all(e);let r=-1;for(typeof e.start=="number"&&e.start!==1&&(n.start=e.start);++r0){const s={type:"element",tagName:"tbody",properties:{},children:t.wrap(n,!0)},a=To(e.children[1]),l=Sb(e.children[e.children.length-1]);a&&l&&(s.position={start:a,end:l}),r.push(s)}const o={type:"element",tagName:"table",properties:{},children:t.wrap(r,!0)};return t.patch(e,o),t.applyData(e,o)}function ppe(t,e,n){const i=n?n.children:void 0,o=(i?i.indexOf(e):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,a=s?s.length:e.children.length;let l=-1;const u=[];for(;++l0,!0),i[0]),r=i.index+i[0].length,i=n.exec(e);return o.push(n$(e.slice(r),r>0,!1)),o.join("")}function n$(t,e,n){let i=0,r=t.length;if(e){let o=t.codePointAt(i);for(;o===e$||o===t$;)i++,o=t.codePointAt(i)}if(n){let o=t.codePointAt(r-1);for(;o===e$||o===t$;)r--,o=t.codePointAt(r-1)}return r>i?t.slice(i,r):""}function Ope(t,e){const n={type:"text",value:gpe(String(e.value))};return t.patch(e,n),t.applyData(e,n)}function bpe(t,e){const n={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(e,n),t.applyData(e,n)}const ype={blockquote:Zfe,break:qfe,code:Yfe,delete:Gfe,emphasis:Kfe,footnoteReference:Jfe,heading:epe,html:tpe,imageReference:npe,image:ipe,inlineCode:rpe,linkReference:ope,link:spe,listItem:ape,list:upe,paragraph:cpe,root:dpe,strong:hpe,table:fpe,tableCell:mpe,tableRow:ppe,text:Ope,thematicBreak:bpe,toml:dg,yaml:dg,definition:dg,footnoteDefinition:dg};function dg(){}const I9=-1,xb=0,pO=1,mO=2,l_=3,u_=4,c_=5,d_=6,$9=7,L9=8,i$=typeof self=="object"?self:globalThis,vpe=(t,e)=>{const n=(r,o)=>(t.set(o,r),r),i=r=>{if(t.has(r))return t.get(r);const[o,s]=e[r];switch(o){case xb:case I9:return n(s,r);case pO:{const a=n([],r);for(const l of s)a.push(i(l));return a}case mO:{const a=n({},r);for(const[l,u]of s)a[i(l)]=i(u);return a}case l_:return n(new Date(s),r);case u_:{const{source:a,flags:l}=s;return n(new RegExp(a,l),r)}case c_:{const a=n(new Map,r);for(const[l,u]of s)a.set(i(l),i(u));return a}case d_:{const a=n(new Set,r);for(const l of s)a.add(i(l));return a}case $9:{const{name:a,message:l}=s;return n(new i$[a](l),r)}case L9:return n(BigInt(s),r);case"BigInt":return n(Object(BigInt(s)),r)}return n(new i$[o](s),r)};return i},r$=t=>vpe(new Map,t)(0),pc="",{toString:Spe}={},{keys:wpe}=Object,Dh=t=>{const e=typeof t;if(e!=="object"||!t)return[xb,e];const n=Spe.call(t).slice(8,-1);switch(n){case"Array":return[pO,pc];case"Object":return[mO,pc];case"Date":return[l_,pc];case"RegExp":return[u_,pc];case"Map":return[c_,pc];case"Set":return[d_,pc]}return n.includes("Array")?[pO,n]:n.includes("Error")?[$9,n]:[mO,n]},hg=([t,e])=>t===xb&&(e==="function"||e==="symbol"),kpe=(t,e,n,i)=>{const r=(s,a)=>{const l=i.push(s)-1;return n.set(a,l),l},o=s=>{if(n.has(s))return n.get(s);let[a,l]=Dh(s);switch(a){case xb:{let c=s;switch(l){case"bigint":a=L9,c=s.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+l);c=null;break;case"undefined":return r([I9],s)}return r([a,c],s)}case pO:{if(l)return r([l,[...s]],s);const c=[],d=r([a,c],s);for(const h of s)c.push(o(h));return d}case mO:{if(l)switch(l){case"BigInt":return r([l,s.toString()],s);case"Boolean":case"Number":case"String":return r([l,s.valueOf()],s)}if(e&&"toJSON"in s)return o(s.toJSON());const c=[],d=r([a,c],s);for(const h of wpe(s))(t||!hg(Dh(s[h])))&&c.push([o(h),o(s[h])]);return d}case l_:return r([a,s.toISOString()],s);case u_:{const{source:c,flags:d}=s;return r([a,{source:c,flags:d}],s)}case c_:{const c=[],d=r([a,c],s);for(const[h,p]of s)(t||!(hg(Dh(h))||hg(Dh(p))))&&c.push([o(h),o(p)]);return d}case d_:{const c=[],d=r([a,c],s);for(const h of s)(t||!hg(Dh(h)))&&c.push(o(h));return d}}const{message:u}=s;return r([a,{name:l,message:u}],s)};return o},o$=(t,{json:e,lossy:n}={})=>{const i=[];return kpe(!(e||n),!!e,new Map,i)(t),i},_d=typeof structuredClone=="function"?(t,e)=>e&&("json"in e||"lossy"in e)?r$(o$(t,e)):structuredClone(t):(t,e)=>r$(o$(t,e));function xpe(t,e){const n=[{type:"text",value:"↩"}];return e>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(e)}]}),n}function _pe(t,e){return"Back to reference "+(t+1)+(e>1?"-"+e:"")}function Epe(t){const e=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",n=t.options.footnoteBackContent||xpe,i=t.options.footnoteBackLabel||_pe,r=t.options.footnoteLabel||"Footnotes",o=t.options.footnoteLabelTagName||"h2",s=t.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let l=-1;for(;++l0&&m.push({type:"text",value:" "});let v=typeof n=="string"?n:n(l,p);typeof v=="string"&&(v={type:"text",value:v}),m.push({type:"element",tagName:"a",properties:{href:"#"+e+"fnref-"+h+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(l,p),className:["data-footnote-backref"]},children:Array.isArray(v)?v:[v]})}const y=c[c.length-1];if(y&&y.type==="element"&&y.tagName==="p"){const v=y.children[y.children.length-1];v&&v.type==="text"?v.value+=" ":y.children.push({type:"text",value:" "}),y.children.push(...m)}else c.push(...m);const b={type:"element",tagName:"li",properties:{id:e+"fn-"+h},children:t.wrap(c,!0)};t.patch(u,b),a.push(b)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{..._d(s),id:"footnote-label"},children:[{type:"text",value:r}]},{type:"text",value:` +`});const u={type:"element",tagName:"li",properties:o,children:s};return t.patch(e,u),t.applyData(e,u)}function lpe(t){let e=!1;if(t.type==="list"){e=t.spread||!1;const n=t.children;let i=-1;for(;!e&&++i1}function upe(t,e){const n={},i=t.all(e);let r=-1;for(typeof e.start=="number"&&e.start!==1&&(n.start=e.start);++r0){const s={type:"element",tagName:"tbody",properties:{},children:t.wrap(n,!0)},a=Ro(e.children[1]),l=wb(e.children[e.children.length-1]);a&&l&&(s.position={start:a,end:l}),r.push(s)}const o={type:"element",tagName:"table",properties:{},children:t.wrap(r,!0)};return t.patch(e,o),t.applyData(e,o)}function ppe(t,e,n){const i=n?n.children:void 0,o=(i?i.indexOf(e):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,a=s?s.length:e.children.length;let l=-1;const u=[];for(;++l0,!0),i[0]),r=i.index+i[0].length,i=n.exec(e);return o.push(n$(e.slice(r),r>0,!1)),o.join("")}function n$(t,e,n){let i=0,r=t.length;if(e){let o=t.codePointAt(i);for(;o===e$||o===t$;)i++,o=t.codePointAt(i)}if(n){let o=t.codePointAt(r-1);for(;o===e$||o===t$;)r--,o=t.codePointAt(r-1)}return r>i?t.slice(i,r):""}function Ope(t,e){const n={type:"text",value:gpe(String(e.value))};return t.patch(e,n),t.applyData(e,n)}function bpe(t,e){const n={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(e,n),t.applyData(e,n)}const ype={blockquote:Zfe,break:qfe,code:Yfe,delete:Gfe,emphasis:Kfe,footnoteReference:Jfe,heading:epe,html:tpe,imageReference:npe,image:ipe,inlineCode:rpe,linkReference:ope,link:spe,listItem:ape,list:upe,paragraph:cpe,root:dpe,strong:hpe,table:fpe,tableCell:mpe,tableRow:ppe,text:Ope,thematicBreak:bpe,toml:hg,yaml:hg,definition:hg,footnoteDefinition:hg};function hg(){}const I9=-1,_b=0,mO=1,gO=2,u_=3,c_=4,d_=5,h_=6,$9=7,L9=8,i$=typeof self=="object"?self:globalThis,vpe=(t,e)=>{const n=(r,o)=>(t.set(o,r),r),i=r=>{if(t.has(r))return t.get(r);const[o,s]=e[r];switch(o){case _b:case I9:return n(s,r);case mO:{const a=n([],r);for(const l of s)a.push(i(l));return a}case gO:{const a=n({},r);for(const[l,u]of s)a[i(l)]=i(u);return a}case u_:return n(new Date(s),r);case c_:{const{source:a,flags:l}=s;return n(new RegExp(a,l),r)}case d_:{const a=n(new Map,r);for(const[l,u]of s)a.set(i(l),i(u));return a}case h_:{const a=n(new Set,r);for(const l of s)a.add(i(l));return a}case $9:{const{name:a,message:l}=s;return n(new i$[a](l),r)}case L9:return n(BigInt(s),r);case"BigInt":return n(Object(BigInt(s)),r)}return n(new i$[o](s),r)};return i},r$=t=>vpe(new Map,t)(0),mc="",{toString:Spe}={},{keys:wpe}=Object,Bh=t=>{const e=typeof t;if(e!=="object"||!t)return[_b,e];const n=Spe.call(t).slice(8,-1);switch(n){case"Array":return[mO,mc];case"Object":return[gO,mc];case"Date":return[u_,mc];case"RegExp":return[c_,mc];case"Map":return[d_,mc];case"Set":return[h_,mc]}return n.includes("Array")?[mO,n]:n.includes("Error")?[$9,n]:[gO,n]},fg=([t,e])=>t===_b&&(e==="function"||e==="symbol"),kpe=(t,e,n,i)=>{const r=(s,a)=>{const l=i.push(s)-1;return n.set(a,l),l},o=s=>{if(n.has(s))return n.get(s);let[a,l]=Bh(s);switch(a){case _b:{let c=s;switch(l){case"bigint":a=L9,c=s.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+l);c=null;break;case"undefined":return r([I9],s)}return r([a,c],s)}case mO:{if(l)return r([l,[...s]],s);const c=[],d=r([a,c],s);for(const h of s)c.push(o(h));return d}case gO:{if(l)switch(l){case"BigInt":return r([l,s.toString()],s);case"Boolean":case"Number":case"String":return r([l,s.valueOf()],s)}if(e&&"toJSON"in s)return o(s.toJSON());const c=[],d=r([a,c],s);for(const h of wpe(s))(t||!fg(Bh(s[h])))&&c.push([o(h),o(s[h])]);return d}case u_:return r([a,s.toISOString()],s);case c_:{const{source:c,flags:d}=s;return r([a,{source:c,flags:d}],s)}case d_:{const c=[],d=r([a,c],s);for(const[h,p]of s)(t||!(fg(Bh(h))||fg(Bh(p))))&&c.push([o(h),o(p)]);return d}case h_:{const c=[],d=r([a,c],s);for(const h of s)(t||!fg(Bh(h)))&&c.push(o(h));return d}}const{message:u}=s;return r([a,{name:l,message:u}],s)};return o},o$=(t,{json:e,lossy:n}={})=>{const i=[];return kpe(!(e||n),!!e,new Map,i)(t),i},Ed=typeof structuredClone=="function"?(t,e)=>e&&("json"in e||"lossy"in e)?r$(o$(t,e)):structuredClone(t):(t,e)=>r$(o$(t,e));function xpe(t,e){const n=[{type:"text",value:"↩"}];return e>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(e)}]}),n}function _pe(t,e){return"Back to reference "+(t+1)+(e>1?"-"+e:"")}function Epe(t){const e=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",n=t.options.footnoteBackContent||xpe,i=t.options.footnoteBackLabel||_pe,r=t.options.footnoteLabel||"Footnotes",o=t.options.footnoteLabelTagName||"h2",s=t.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let l=-1;for(;++l0&&m.push({type:"text",value:" "});let v=typeof n=="string"?n:n(l,p);typeof v=="string"&&(v={type:"text",value:v}),m.push({type:"element",tagName:"a",properties:{href:"#"+e+"fnref-"+h+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(l,p),className:["data-footnote-backref"]},children:Array.isArray(v)?v:[v]})}const y=c[c.length-1];if(y&&y.type==="element"&&y.tagName==="p"){const v=y.children[y.children.length-1];v&&v.type==="text"?v.value+=" ":y.children.push({type:"text",value:" "}),y.children.push(...m)}else c.push(...m);const b={type:"element",tagName:"li",properties:{id:e+"fn-"+h},children:t.wrap(c,!0)};t.patch(u,b),a.push(b)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Ed(s),id:"footnote-label"},children:[{type:"text",value:r}]},{type:"text",value:` `},{type:"element",tagName:"ol",properties:{},children:t.wrap(a,!0)},{type:"text",value:` -`}]}}const _b=function(t){if(t==null)return Ape;if(typeof t=="function")return Eb(t);if(typeof t=="object")return Array.isArray(t)?Cpe(t):Tpe(t);if(typeof t=="string")return Ppe(t);throw new Error("Expected function, string, or object as test")};function Cpe(t){const e=[];let n=-1;for(;++n":""))+")"})}return h;function h(){let p=N9,m,O,y;if((!e||o(l,u,c[c.length-1]||void 0))&&(p=Lpe(n(l,c)),p[0]===gw))return p;if("children"in l&&l.children){const b=l;if(b.children&&p[0]!==$pe)for(O=(i?b.children.length:-1)+s,y=c.concat(b);O>-1&&O":""))+")"})}return h;function h(){let p=N9,m,O,y;if((!e||o(l,u,c[c.length-1]||void 0))&&(p=Lpe(n(l,c)),p[0]===Ow))return p;if("children"in l&&l.children){const b=l;if(b.children&&p[0]!==$pe)for(O=(i?b.children.length:-1)+s,y=c.concat(b);O>-1&&O0&&n.push({type:"text",value:` `}),n}function s$(t){let e=0,n=t.charCodeAt(e);for(;n===9||n===32;)e++,n=t.charCodeAt(e);return t.slice(e)}function a$(t,e){const n=Mpe(t,e),i=n.one(t,void 0),r=Epe(n),o=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return r&&o.children.push({type:"text",value:` -`},r),o}function zpe(t,e){return t&&"run"in t?async function(n,i){const r=a$(n,{file:i,...e});await t.run(r,i)}:function(n,i){return a$(n,{file:i,...e||t})}}function l$(t){if(t)throw t}var Gg=Object.prototype.hasOwnProperty,D9=Object.prototype.toString,u$=Object.defineProperty,c$=Object.getOwnPropertyDescriptor,d$=function(e){return typeof Array.isArray=="function"?Array.isArray(e):D9.call(e)==="[object Array]"},h$=function(e){if(!e||D9.call(e)!=="[object Object]")return!1;var n=Gg.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&Gg.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!i)return!1;var r;for(r in e);return typeof r>"u"||Gg.call(e,r)},f$=function(e,n){u$&&n.name==="__proto__"?u$(e,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):e[n.name]=n.newValue},p$=function(e,n){if(n==="__proto__")if(Gg.call(e,n)){if(c$)return c$(e,n).value}else return;return e[n]},Hpe=function t(){var e,n,i,r,o,s,a=arguments[0],l=1,u=arguments.length,c=!1;for(typeof a=="boolean"&&(c=a,a=arguments[1]||{},l=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});ls.length;let l;a&&s.push(r);try{l=t.apply(this,s)}catch(u){const c=u;if(a&&n)throw c;return r(c)}a||(l&&l.then&&typeof l.then=="function"?l.then(o,r):l instanceof Error?r(l):o(l))}function r(s,...a){n||(n=!0,e(s,...a))}function o(s){r(null,s)}}const oo={basename:Vpe,dirname:jpe,extname:Xpe,join:Zpe,sep:"/"};function Vpe(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');Hp(t);let n=0,i=-1,r=t.length,o;if(e===void 0||e.length===0||e.length>t.length){for(;r--;)if(t.codePointAt(r)===47){if(o){n=r+1;break}}else i<0&&(o=!0,i=r+1);return i<0?"":t.slice(n,i)}if(e===t)return"";let s=-1,a=e.length-1;for(;r--;)if(t.codePointAt(r)===47){if(o){n=r+1;break}}else s<0&&(o=!0,s=r+1),a>-1&&(t.codePointAt(r)===e.codePointAt(a--)?a<0&&(i=r):(a=-1,i=s));return n===i?i=s:i<0&&(i=t.length),t.slice(n,i)}function jpe(t){if(Hp(t),t.length===0)return".";let e=-1,n=t.length,i;for(;--n;)if(t.codePointAt(n)===47){if(i){e=n;break}}else i||(i=!0);return e<0?t.codePointAt(0)===47?"/":".":e===1&&t.codePointAt(0)===47?"//":t.slice(0,e)}function Xpe(t){Hp(t);let e=t.length,n=-1,i=0,r=-1,o=0,s;for(;e--;){const a=t.codePointAt(e);if(a===47){if(s){i=e+1;break}continue}n<0&&(s=!0,n=e+1),a===46?r<0?r=e:o!==1&&(o=1):r>-1&&(o=-1)}return r<0||n<0||o===0||o===1&&r===n-1&&r===i+1?"":t.slice(r,n)}function Zpe(...t){let e=-1,n;for(;++e0&&t.codePointAt(t.length-1)===47&&(n+="/"),e?"/"+n:n}function Ype(t,e){let n="",i=0,r=-1,o=0,s=-1,a,l;for(;++s<=t.length;){if(s2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",i=0):(n=n.slice(0,l),i=n.length-1-n.lastIndexOf("/")),r=s,o=0;continue}}else if(n.length>0){n="",i=0,r=s,o=0;continue}}e&&(n=n.length>0?n+"/..":"..",i=2)}else n.length>0?n+="/"+t.slice(r+1,s):n=t.slice(r+1,s),i=s-r-1;r=s,o=0}else a===46&&o>-1?o++:o=-1}return n}function Hp(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const Gpe={cwd:Kpe};function Kpe(){return"/"}function yw(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function Jpe(t){if(typeof t=="string")t=new URL(t);else if(!yw(t)){const e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(t.protocol!=="file:"){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return eme(t)}function eme(t){if(t.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const e=t.pathname;let n=-1;for(;++n0){let[p,...m]=c;const O=i[h][1];bw(O)&&bw(p)&&(p=h1(!0,O,p)),i[h]=[u,p,...m]}}}}const rme=new h_().freeze();function g1(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function O1(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function b1(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function g$(t){if(!bw(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function O$(t,e,n){if(!n)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function fg(t){return ome(t)?t:new B9(t)}function ome(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function sme(t){return typeof t=="string"||ame(t)}function ame(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const lme="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",b$=[],y$={allowDangerousHtml:!0},ume=/^(https?|ircs?|mailto|xmpp)$/i,cme=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Tb(t){const e=t.allowedElements,n=t.allowElement,i=t.children||"",r=t.className,o=t.components,s=t.disallowedElements,a=t.rehypePlugins||b$,l=t.remarkPlugins||b$,u=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...y$}:y$,c=t.skipHtml,d=t.unwrapDisallowed,h=t.urlTransform||dme,p=rme().use(Xfe).use(l).use(zpe,u).use(a),m=new B9;typeof i=="string"&&(m.value=i);for(const v of cme)Object.hasOwn(t,v.from)&&(""+v.from+(v.to?"use `"+v.to+"` instead":"remove it")+lme+v.id,void 0);const O=p.parse(m);let y=p.runSync(O,m);return r&&(y={type:"element",tagName:"div",properties:{className:r},children:y.type==="root"?y.children:[y]}),Cb(y,b),Pde(y,{Fragment:N.Fragment,components:o,ignoreInvalidStyle:!0,jsx:N.jsx,jsxs:N.jsxs,passKeys:!0,passNode:!0});function b(v,S,k){if(v.type==="raw"&&k&&typeof S=="number")return c?k.children.splice(S,1):k.children[S]={type:"text",value:v.value},S;if(v.type==="element"){let x;for(x in u1)if(Object.hasOwn(u1,x)&&Object.hasOwn(v.properties,x)){const _=v.properties[x],w=u1[x];(w===null||w.includes(v.tagName))&&(v.properties[x]=h(String(_||""),x,v))}}if(v.type==="element"){let x=e?!e.includes(v.tagName):s?s.includes(v.tagName):!1;if(!x&&n&&typeof S=="number"&&(x=!n(v,S,k)),x&&k&&typeof S=="number")return d&&v.children?k.children.splice(S,1,...v.children):k.children.splice(S,1),S}}}function dme(t){const e=t.indexOf(":"),n=t.indexOf("?"),i=t.indexOf("#"),r=t.indexOf("/");return e<0||r>-1&&e>r||n>-1&&e>n||i>-1&&e>i||ume.test(t.slice(0,e))?t:""}const v$=/[#.]/g;function hme(t,e){const n=t||"",i={};let r=0,o,s;for(;r-1&&oo)return{line:s+1,column:o-(s>0?n[s-1]:0)+1,offset:o}}}function r(o){const s=o&&o.line,a=o&&o.column;if(typeof s=="number"&&typeof a=="number"&&!Number.isNaN(s)&&!Number.isNaN(a)&&s-1 in n){const l=(n[s-2]||0)+a-1||0;if(l>-1&&l=55296&&t<=57343}function Bme(t){return t>=56320&&t<=57343}function Qme(t,e){return(t-55296)*1024+9216+e}function V9(t){return t!==32&&t!==10&&t!==13&&t!==9&&t!==12&&t>=1&&t<=31||t>=127&&t<=159}function j9(t){return t>=64976&&t<=65007||Dme.has(t)}var j;(function(t){t.controlCharacterInInputStream="control-character-in-input-stream",t.noncharacterInInputStream="noncharacter-in-input-stream",t.surrogateInInputStream="surrogate-in-input-stream",t.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",t.endTagWithAttributes="end-tag-with-attributes",t.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",t.unexpectedSolidusInTag="unexpected-solidus-in-tag",t.unexpectedNullCharacter="unexpected-null-character",t.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",t.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",t.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",t.missingEndTagName="missing-end-tag-name",t.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",t.unknownNamedCharacterReference="unknown-named-character-reference",t.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",t.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",t.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",t.eofBeforeTagName="eof-before-tag-name",t.eofInTag="eof-in-tag",t.missingAttributeValue="missing-attribute-value",t.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",t.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",t.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",t.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",t.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",t.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",t.missingDoctypePublicIdentifier="missing-doctype-public-identifier",t.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",t.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",t.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",t.cdataInHtmlContent="cdata-in-html-content",t.incorrectlyOpenedComment="incorrectly-opened-comment",t.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",t.eofInDoctype="eof-in-doctype",t.nestedComment="nested-comment",t.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",t.eofInComment="eof-in-comment",t.incorrectlyClosedComment="incorrectly-closed-comment",t.eofInCdata="eof-in-cdata",t.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",t.nullCharacterReference="null-character-reference",t.surrogateCharacterReference="surrogate-character-reference",t.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",t.controlCharacterReference="control-character-reference",t.noncharacterCharacterReference="noncharacter-character-reference",t.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",t.missingDoctypeName="missing-doctype-name",t.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",t.duplicateAttribute="duplicate-attribute",t.nonConformingDoctype="non-conforming-doctype",t.missingDoctype="missing-doctype",t.misplacedDoctype="misplaced-doctype",t.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",t.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",t.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",t.openElementsLeftAfterEof="open-elements-left-after-eof",t.abandonedHeadElementChild="abandoned-head-element-child",t.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",t.nestedNoscriptInHead="nested-noscript-in-head",t.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(j=j||(j={}));const Fme=65536;class zme{constructor(e){this.handler=e,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=Fme,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e){const{line:n,col:i,offset:r}=this;return{code:e,startLine:n,endLine:n,startCol:i,endCol:i,startOffset:r,endOffset:r}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(Bme(n))return this.pos++,this._addGap(),Qme(e,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,E.EOF;return this._err(j.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,n){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,n){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(e,this.pos);for(let i=0;i=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,E.EOF;const i=this.html.charCodeAt(n);return i===E.CARRIAGE_RETURN?E.LINE_FEED:i}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,E.EOF;let e=this.html.charCodeAt(this.pos);return e===E.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,E.LINE_FEED):e===E.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,W9(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===E.LINE_FEED||e===E.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){V9(e)?this._err(j.controlCharacterInInputStream):j9(e)&&this._err(j.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos=0;n--)if(t.attrs[n].name===e)return t.attrs[n].value;return null}const Ns=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(t=>t.charCodeAt(0))),Hme=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(t=>t.charCodeAt(0)));var v1;const Ume=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),Wme=(v1=String.fromCodePoint)!==null&&v1!==void 0?v1:function(t){let e="";return t>65535&&(t-=65536,e+=String.fromCharCode(t>>>10&1023|55296),t=56320|t&1023),e+=String.fromCharCode(t),e};function Vme(t){var e;return t>=55296&&t<=57343||t>1114111?65533:(e=Ume.get(t))!==null&&e!==void 0?e:t}var pn;(function(t){t[t.NUM=35]="NUM",t[t.SEMI=59]="SEMI",t[t.EQUALS=61]="EQUALS",t[t.ZERO=48]="ZERO",t[t.NINE=57]="NINE",t[t.LOWER_A=97]="LOWER_A",t[t.LOWER_F=102]="LOWER_F",t[t.LOWER_X=120]="LOWER_X",t[t.LOWER_Z=122]="LOWER_Z",t[t.UPPER_A=65]="UPPER_A",t[t.UPPER_F=70]="UPPER_F",t[t.UPPER_Z=90]="UPPER_Z"})(pn||(pn={}));const jme=32;var go;(function(t){t[t.VALUE_LENGTH=49152]="VALUE_LENGTH",t[t.BRANCH_LENGTH=16256]="BRANCH_LENGTH",t[t.JUMP_TABLE=127]="JUMP_TABLE"})(go||(go={}));function ww(t){return t>=pn.ZERO&&t<=pn.NINE}function Xme(t){return t>=pn.UPPER_A&&t<=pn.UPPER_F||t>=pn.LOWER_A&&t<=pn.LOWER_F}function Zme(t){return t>=pn.UPPER_A&&t<=pn.UPPER_Z||t>=pn.LOWER_A&&t<=pn.LOWER_Z||ww(t)}function qme(t){return t===pn.EQUALS||Zme(t)}var hn;(function(t){t[t.EntityStart=0]="EntityStart",t[t.NumericStart=1]="NumericStart",t[t.NumericDecimal=2]="NumericDecimal",t[t.NumericHex=3]="NumericHex",t[t.NamedEntity=4]="NamedEntity"})(hn||(hn={}));var Ml;(function(t){t[t.Legacy=0]="Legacy",t[t.Strict=1]="Strict",t[t.Attribute=2]="Attribute"})(Ml||(Ml={}));class Yme{constructor(e,n,i){this.decodeTree=e,this.emitCodePoint=n,this.errors=i,this.state=hn.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Ml.Strict}startEntity(e){this.decodeMode=e,this.state=hn.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,n){switch(this.state){case hn.EntityStart:return e.charCodeAt(n)===pn.NUM?(this.state=hn.NumericStart,this.consumed+=1,this.stateNumericStart(e,n+1)):(this.state=hn.NamedEntity,this.stateNamedEntity(e,n));case hn.NumericStart:return this.stateNumericStart(e,n);case hn.NumericDecimal:return this.stateNumericDecimal(e,n);case hn.NumericHex:return this.stateNumericHex(e,n);case hn.NamedEntity:return this.stateNamedEntity(e,n)}}stateNumericStart(e,n){return n>=e.length?-1:(e.charCodeAt(n)|jme)===pn.LOWER_X?(this.state=hn.NumericHex,this.consumed+=1,this.stateNumericHex(e,n+1)):(this.state=hn.NumericDecimal,this.stateNumericDecimal(e,n))}addToNumericResult(e,n,i,r){if(n!==i){const o=i-n;this.result=this.result*Math.pow(r,o)+parseInt(e.substr(n,o),r),this.consumed+=o}}stateNumericHex(e,n){const i=n;for(;n>14;for(;n>14,o!==0){if(s===pn.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==Ml.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:n,decodeTree:i}=this,r=(i[n]&go.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,r,this.consumed),(e=this.errors)===null||e===void 0||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,n,i){const{decodeTree:r}=this;return this.emitCodePoint(n===1?r[e]&~go.VALUE_LENGTH:r[e+1],i),n===3&&this.emitCodePoint(r[e+2],i),i}end(){var e;switch(this.state){case hn.NamedEntity:return this.result!==0&&(this.decodeMode!==Ml.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case hn.NumericDecimal:return this.emitNumericEntity(0,2);case hn.NumericHex:return this.emitNumericEntity(0,3);case hn.NumericStart:return(e=this.errors)===null||e===void 0||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case hn.EntityStart:return 0}}}function Z9(t){let e="";const n=new Yme(t,i=>e+=Wme(i));return function(r,o){let s=0,a=0;for(;(a=r.indexOf("&",a))>=0;){e+=r.slice(s,a),n.startEntity(o);const u=n.write(r,a+1);if(u<0){s=a+n.end();break}s=a+u,a=u===0?s+1:s}const l=e+r.slice(s);return e="",l}}function q9(t,e,n,i){const r=(e&go.BRANCH_LENGTH)>>7,o=e&go.JUMP_TABLE;if(r===0)return o!==0&&i===o?n:-1;if(o){const l=i-o;return l<0||l>=r?-1:t[n+l]-1}let s=n,a=s+r-1;for(;s<=a;){const l=s+a>>>1,u=t[l];if(ui)a=l-1;else return t[l+r]}return-1}Z9(Ns);Z9(Hme);var Z;(function(t){t.HTML="http://www.w3.org/1999/xhtml",t.MATHML="http://www.w3.org/1998/Math/MathML",t.SVG="http://www.w3.org/2000/svg",t.XLINK="http://www.w3.org/1999/xlink",t.XML="http://www.w3.org/XML/1998/namespace",t.XMLNS="http://www.w3.org/2000/xmlns/"})(Z=Z||(Z={}));var la;(function(t){t.TYPE="type",t.ACTION="action",t.ENCODING="encoding",t.PROMPT="prompt",t.NAME="name",t.COLOR="color",t.FACE="face",t.SIZE="size"})(la=la||(la={}));var Li;(function(t){t.NO_QUIRKS="no-quirks",t.QUIRKS="quirks",t.LIMITED_QUIRKS="limited-quirks"})(Li=Li||(Li={}));var Q;(function(t){t.A="a",t.ADDRESS="address",t.ANNOTATION_XML="annotation-xml",t.APPLET="applet",t.AREA="area",t.ARTICLE="article",t.ASIDE="aside",t.B="b",t.BASE="base",t.BASEFONT="basefont",t.BGSOUND="bgsound",t.BIG="big",t.BLOCKQUOTE="blockquote",t.BODY="body",t.BR="br",t.BUTTON="button",t.CAPTION="caption",t.CENTER="center",t.CODE="code",t.COL="col",t.COLGROUP="colgroup",t.DD="dd",t.DESC="desc",t.DETAILS="details",t.DIALOG="dialog",t.DIR="dir",t.DIV="div",t.DL="dl",t.DT="dt",t.EM="em",t.EMBED="embed",t.FIELDSET="fieldset",t.FIGCAPTION="figcaption",t.FIGURE="figure",t.FONT="font",t.FOOTER="footer",t.FOREIGN_OBJECT="foreignObject",t.FORM="form",t.FRAME="frame",t.FRAMESET="frameset",t.H1="h1",t.H2="h2",t.H3="h3",t.H4="h4",t.H5="h5",t.H6="h6",t.HEAD="head",t.HEADER="header",t.HGROUP="hgroup",t.HR="hr",t.HTML="html",t.I="i",t.IMG="img",t.IMAGE="image",t.INPUT="input",t.IFRAME="iframe",t.KEYGEN="keygen",t.LABEL="label",t.LI="li",t.LINK="link",t.LISTING="listing",t.MAIN="main",t.MALIGNMARK="malignmark",t.MARQUEE="marquee",t.MATH="math",t.MENU="menu",t.META="meta",t.MGLYPH="mglyph",t.MI="mi",t.MO="mo",t.MN="mn",t.MS="ms",t.MTEXT="mtext",t.NAV="nav",t.NOBR="nobr",t.NOFRAMES="noframes",t.NOEMBED="noembed",t.NOSCRIPT="noscript",t.OBJECT="object",t.OL="ol",t.OPTGROUP="optgroup",t.OPTION="option",t.P="p",t.PARAM="param",t.PLAINTEXT="plaintext",t.PRE="pre",t.RB="rb",t.RP="rp",t.RT="rt",t.RTC="rtc",t.RUBY="ruby",t.S="s",t.SCRIPT="script",t.SECTION="section",t.SELECT="select",t.SOURCE="source",t.SMALL="small",t.SPAN="span",t.STRIKE="strike",t.STRONG="strong",t.STYLE="style",t.SUB="sub",t.SUMMARY="summary",t.SUP="sup",t.TABLE="table",t.TBODY="tbody",t.TEMPLATE="template",t.TEXTAREA="textarea",t.TFOOT="tfoot",t.TD="td",t.TH="th",t.THEAD="thead",t.TITLE="title",t.TR="tr",t.TRACK="track",t.TT="tt",t.U="u",t.UL="ul",t.SVG="svg",t.VAR="var",t.WBR="wbr",t.XMP="xmp"})(Q=Q||(Q={}));var g;(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.A=1]="A",t[t.ADDRESS=2]="ADDRESS",t[t.ANNOTATION_XML=3]="ANNOTATION_XML",t[t.APPLET=4]="APPLET",t[t.AREA=5]="AREA",t[t.ARTICLE=6]="ARTICLE",t[t.ASIDE=7]="ASIDE",t[t.B=8]="B",t[t.BASE=9]="BASE",t[t.BASEFONT=10]="BASEFONT",t[t.BGSOUND=11]="BGSOUND",t[t.BIG=12]="BIG",t[t.BLOCKQUOTE=13]="BLOCKQUOTE",t[t.BODY=14]="BODY",t[t.BR=15]="BR",t[t.BUTTON=16]="BUTTON",t[t.CAPTION=17]="CAPTION",t[t.CENTER=18]="CENTER",t[t.CODE=19]="CODE",t[t.COL=20]="COL",t[t.COLGROUP=21]="COLGROUP",t[t.DD=22]="DD",t[t.DESC=23]="DESC",t[t.DETAILS=24]="DETAILS",t[t.DIALOG=25]="DIALOG",t[t.DIR=26]="DIR",t[t.DIV=27]="DIV",t[t.DL=28]="DL",t[t.DT=29]="DT",t[t.EM=30]="EM",t[t.EMBED=31]="EMBED",t[t.FIELDSET=32]="FIELDSET",t[t.FIGCAPTION=33]="FIGCAPTION",t[t.FIGURE=34]="FIGURE",t[t.FONT=35]="FONT",t[t.FOOTER=36]="FOOTER",t[t.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",t[t.FORM=38]="FORM",t[t.FRAME=39]="FRAME",t[t.FRAMESET=40]="FRAMESET",t[t.H1=41]="H1",t[t.H2=42]="H2",t[t.H3=43]="H3",t[t.H4=44]="H4",t[t.H5=45]="H5",t[t.H6=46]="H6",t[t.HEAD=47]="HEAD",t[t.HEADER=48]="HEADER",t[t.HGROUP=49]="HGROUP",t[t.HR=50]="HR",t[t.HTML=51]="HTML",t[t.I=52]="I",t[t.IMG=53]="IMG",t[t.IMAGE=54]="IMAGE",t[t.INPUT=55]="INPUT",t[t.IFRAME=56]="IFRAME",t[t.KEYGEN=57]="KEYGEN",t[t.LABEL=58]="LABEL",t[t.LI=59]="LI",t[t.LINK=60]="LINK",t[t.LISTING=61]="LISTING",t[t.MAIN=62]="MAIN",t[t.MALIGNMARK=63]="MALIGNMARK",t[t.MARQUEE=64]="MARQUEE",t[t.MATH=65]="MATH",t[t.MENU=66]="MENU",t[t.META=67]="META",t[t.MGLYPH=68]="MGLYPH",t[t.MI=69]="MI",t[t.MO=70]="MO",t[t.MN=71]="MN",t[t.MS=72]="MS",t[t.MTEXT=73]="MTEXT",t[t.NAV=74]="NAV",t[t.NOBR=75]="NOBR",t[t.NOFRAMES=76]="NOFRAMES",t[t.NOEMBED=77]="NOEMBED",t[t.NOSCRIPT=78]="NOSCRIPT",t[t.OBJECT=79]="OBJECT",t[t.OL=80]="OL",t[t.OPTGROUP=81]="OPTGROUP",t[t.OPTION=82]="OPTION",t[t.P=83]="P",t[t.PARAM=84]="PARAM",t[t.PLAINTEXT=85]="PLAINTEXT",t[t.PRE=86]="PRE",t[t.RB=87]="RB",t[t.RP=88]="RP",t[t.RT=89]="RT",t[t.RTC=90]="RTC",t[t.RUBY=91]="RUBY",t[t.S=92]="S",t[t.SCRIPT=93]="SCRIPT",t[t.SECTION=94]="SECTION",t[t.SELECT=95]="SELECT",t[t.SOURCE=96]="SOURCE",t[t.SMALL=97]="SMALL",t[t.SPAN=98]="SPAN",t[t.STRIKE=99]="STRIKE",t[t.STRONG=100]="STRONG",t[t.STYLE=101]="STYLE",t[t.SUB=102]="SUB",t[t.SUMMARY=103]="SUMMARY",t[t.SUP=104]="SUP",t[t.TABLE=105]="TABLE",t[t.TBODY=106]="TBODY",t[t.TEMPLATE=107]="TEMPLATE",t[t.TEXTAREA=108]="TEXTAREA",t[t.TFOOT=109]="TFOOT",t[t.TD=110]="TD",t[t.TH=111]="TH",t[t.THEAD=112]="THEAD",t[t.TITLE=113]="TITLE",t[t.TR=114]="TR",t[t.TRACK=115]="TRACK",t[t.TT=116]="TT",t[t.U=117]="U",t[t.UL=118]="UL",t[t.SVG=119]="SVG",t[t.VAR=120]="VAR",t[t.WBR=121]="WBR",t[t.XMP=122]="XMP"})(g=g||(g={}));const Gme=new Map([[Q.A,g.A],[Q.ADDRESS,g.ADDRESS],[Q.ANNOTATION_XML,g.ANNOTATION_XML],[Q.APPLET,g.APPLET],[Q.AREA,g.AREA],[Q.ARTICLE,g.ARTICLE],[Q.ASIDE,g.ASIDE],[Q.B,g.B],[Q.BASE,g.BASE],[Q.BASEFONT,g.BASEFONT],[Q.BGSOUND,g.BGSOUND],[Q.BIG,g.BIG],[Q.BLOCKQUOTE,g.BLOCKQUOTE],[Q.BODY,g.BODY],[Q.BR,g.BR],[Q.BUTTON,g.BUTTON],[Q.CAPTION,g.CAPTION],[Q.CENTER,g.CENTER],[Q.CODE,g.CODE],[Q.COL,g.COL],[Q.COLGROUP,g.COLGROUP],[Q.DD,g.DD],[Q.DESC,g.DESC],[Q.DETAILS,g.DETAILS],[Q.DIALOG,g.DIALOG],[Q.DIR,g.DIR],[Q.DIV,g.DIV],[Q.DL,g.DL],[Q.DT,g.DT],[Q.EM,g.EM],[Q.EMBED,g.EMBED],[Q.FIELDSET,g.FIELDSET],[Q.FIGCAPTION,g.FIGCAPTION],[Q.FIGURE,g.FIGURE],[Q.FONT,g.FONT],[Q.FOOTER,g.FOOTER],[Q.FOREIGN_OBJECT,g.FOREIGN_OBJECT],[Q.FORM,g.FORM],[Q.FRAME,g.FRAME],[Q.FRAMESET,g.FRAMESET],[Q.H1,g.H1],[Q.H2,g.H2],[Q.H3,g.H3],[Q.H4,g.H4],[Q.H5,g.H5],[Q.H6,g.H6],[Q.HEAD,g.HEAD],[Q.HEADER,g.HEADER],[Q.HGROUP,g.HGROUP],[Q.HR,g.HR],[Q.HTML,g.HTML],[Q.I,g.I],[Q.IMG,g.IMG],[Q.IMAGE,g.IMAGE],[Q.INPUT,g.INPUT],[Q.IFRAME,g.IFRAME],[Q.KEYGEN,g.KEYGEN],[Q.LABEL,g.LABEL],[Q.LI,g.LI],[Q.LINK,g.LINK],[Q.LISTING,g.LISTING],[Q.MAIN,g.MAIN],[Q.MALIGNMARK,g.MALIGNMARK],[Q.MARQUEE,g.MARQUEE],[Q.MATH,g.MATH],[Q.MENU,g.MENU],[Q.META,g.META],[Q.MGLYPH,g.MGLYPH],[Q.MI,g.MI],[Q.MO,g.MO],[Q.MN,g.MN],[Q.MS,g.MS],[Q.MTEXT,g.MTEXT],[Q.NAV,g.NAV],[Q.NOBR,g.NOBR],[Q.NOFRAMES,g.NOFRAMES],[Q.NOEMBED,g.NOEMBED],[Q.NOSCRIPT,g.NOSCRIPT],[Q.OBJECT,g.OBJECT],[Q.OL,g.OL],[Q.OPTGROUP,g.OPTGROUP],[Q.OPTION,g.OPTION],[Q.P,g.P],[Q.PARAM,g.PARAM],[Q.PLAINTEXT,g.PLAINTEXT],[Q.PRE,g.PRE],[Q.RB,g.RB],[Q.RP,g.RP],[Q.RT,g.RT],[Q.RTC,g.RTC],[Q.RUBY,g.RUBY],[Q.S,g.S],[Q.SCRIPT,g.SCRIPT],[Q.SECTION,g.SECTION],[Q.SELECT,g.SELECT],[Q.SOURCE,g.SOURCE],[Q.SMALL,g.SMALL],[Q.SPAN,g.SPAN],[Q.STRIKE,g.STRIKE],[Q.STRONG,g.STRONG],[Q.STYLE,g.STYLE],[Q.SUB,g.SUB],[Q.SUMMARY,g.SUMMARY],[Q.SUP,g.SUP],[Q.TABLE,g.TABLE],[Q.TBODY,g.TBODY],[Q.TEMPLATE,g.TEMPLATE],[Q.TEXTAREA,g.TEXTAREA],[Q.TFOOT,g.TFOOT],[Q.TD,g.TD],[Q.TH,g.TH],[Q.THEAD,g.THEAD],[Q.TITLE,g.TITLE],[Q.TR,g.TR],[Q.TRACK,g.TRACK],[Q.TT,g.TT],[Q.U,g.U],[Q.UL,g.UL],[Q.SVG,g.SVG],[Q.VAR,g.VAR],[Q.WBR,g.WBR],[Q.XMP,g.XMP]]);function ah(t){var e;return(e=Gme.get(t))!==null&&e!==void 0?e:g.UNKNOWN}const J=g,Kme={[Z.HTML]:new Set([J.ADDRESS,J.APPLET,J.AREA,J.ARTICLE,J.ASIDE,J.BASE,J.BASEFONT,J.BGSOUND,J.BLOCKQUOTE,J.BODY,J.BR,J.BUTTON,J.CAPTION,J.CENTER,J.COL,J.COLGROUP,J.DD,J.DETAILS,J.DIR,J.DIV,J.DL,J.DT,J.EMBED,J.FIELDSET,J.FIGCAPTION,J.FIGURE,J.FOOTER,J.FORM,J.FRAME,J.FRAMESET,J.H1,J.H2,J.H3,J.H4,J.H5,J.H6,J.HEAD,J.HEADER,J.HGROUP,J.HR,J.HTML,J.IFRAME,J.IMG,J.INPUT,J.LI,J.LINK,J.LISTING,J.MAIN,J.MARQUEE,J.MENU,J.META,J.NAV,J.NOEMBED,J.NOFRAMES,J.NOSCRIPT,J.OBJECT,J.OL,J.P,J.PARAM,J.PLAINTEXT,J.PRE,J.SCRIPT,J.SECTION,J.SELECT,J.SOURCE,J.STYLE,J.SUMMARY,J.TABLE,J.TBODY,J.TD,J.TEMPLATE,J.TEXTAREA,J.TFOOT,J.TH,J.THEAD,J.TITLE,J.TR,J.TRACK,J.UL,J.WBR,J.XMP]),[Z.MATHML]:new Set([J.MI,J.MO,J.MN,J.MS,J.MTEXT,J.ANNOTATION_XML]),[Z.SVG]:new Set([J.TITLE,J.FOREIGN_OBJECT,J.DESC]),[Z.XLINK]:new Set,[Z.XML]:new Set,[Z.XMLNS]:new Set};function Y9(t){return t===J.H1||t===J.H2||t===J.H3||t===J.H4||t===J.H5||t===J.H6}Q.STYLE,Q.SCRIPT,Q.XMP,Q.IFRAME,Q.NOEMBED,Q.NOFRAMES,Q.PLAINTEXT;const Jme=new Map([[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);var P;(function(t){t[t.DATA=0]="DATA",t[t.RCDATA=1]="RCDATA",t[t.RAWTEXT=2]="RAWTEXT",t[t.SCRIPT_DATA=3]="SCRIPT_DATA",t[t.PLAINTEXT=4]="PLAINTEXT",t[t.TAG_OPEN=5]="TAG_OPEN",t[t.END_TAG_OPEN=6]="END_TAG_OPEN",t[t.TAG_NAME=7]="TAG_NAME",t[t.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",t[t.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",t[t.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",t[t.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",t[t.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",t[t.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",t[t.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",t[t.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",t[t.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",t[t.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",t[t.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",t[t.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",t[t.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",t[t.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",t[t.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",t[t.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",t[t.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",t[t.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",t[t.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",t[t.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",t[t.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",t[t.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",t[t.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",t[t.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",t[t.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",t[t.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",t[t.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",t[t.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",t[t.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",t[t.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",t[t.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",t[t.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",t[t.BOGUS_COMMENT=40]="BOGUS_COMMENT",t[t.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",t[t.COMMENT_START=42]="COMMENT_START",t[t.COMMENT_START_DASH=43]="COMMENT_START_DASH",t[t.COMMENT=44]="COMMENT",t[t.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",t[t.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",t[t.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",t[t.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",t[t.COMMENT_END_DASH=49]="COMMENT_END_DASH",t[t.COMMENT_END=50]="COMMENT_END",t[t.COMMENT_END_BANG=51]="COMMENT_END_BANG",t[t.DOCTYPE=52]="DOCTYPE",t[t.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",t[t.DOCTYPE_NAME=54]="DOCTYPE_NAME",t[t.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",t[t.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",t[t.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",t[t.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",t[t.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",t[t.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",t[t.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",t[t.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",t[t.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",t[t.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",t[t.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",t[t.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",t[t.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",t[t.CDATA_SECTION=68]="CDATA_SECTION",t[t.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",t[t.CDATA_SECTION_END=70]="CDATA_SECTION_END",t[t.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",t[t.NAMED_CHARACTER_REFERENCE=72]="NAMED_CHARACTER_REFERENCE",t[t.AMBIGUOUS_AMPERSAND=73]="AMBIGUOUS_AMPERSAND",t[t.NUMERIC_CHARACTER_REFERENCE=74]="NUMERIC_CHARACTER_REFERENCE",t[t.HEXADEMICAL_CHARACTER_REFERENCE_START=75]="HEXADEMICAL_CHARACTER_REFERENCE_START",t[t.HEXADEMICAL_CHARACTER_REFERENCE=76]="HEXADEMICAL_CHARACTER_REFERENCE",t[t.DECIMAL_CHARACTER_REFERENCE=77]="DECIMAL_CHARACTER_REFERENCE",t[t.NUMERIC_CHARACTER_REFERENCE_END=78]="NUMERIC_CHARACTER_REFERENCE_END"})(P||(P={}));const Vt={DATA:P.DATA,RCDATA:P.RCDATA,RAWTEXT:P.RAWTEXT,SCRIPT_DATA:P.SCRIPT_DATA,PLAINTEXT:P.PLAINTEXT,CDATA_SECTION:P.CDATA_SECTION};function yf(t){return t>=E.DIGIT_0&&t<=E.DIGIT_9}function Gh(t){return t>=E.LATIN_CAPITAL_A&&t<=E.LATIN_CAPITAL_Z}function ege(t){return t>=E.LATIN_SMALL_A&&t<=E.LATIN_SMALL_Z}function Ms(t){return ege(t)||Gh(t)}function kw(t){return Ms(t)||yf(t)}function G9(t){return t>=E.LATIN_CAPITAL_A&&t<=E.LATIN_CAPITAL_F}function K9(t){return t>=E.LATIN_SMALL_A&&t<=E.LATIN_SMALL_F}function tge(t){return yf(t)||G9(t)||K9(t)}function pg(t){return t+32}function J9(t){return t===E.SPACE||t===E.LINE_FEED||t===E.TABULATION||t===E.FORM_FEED}function nge(t){return t===E.EQUALS_SIGN||kw(t)}function x$(t){return J9(t)||t===E.SOLIDUS||t===E.GREATER_THAN_SIGN}class ige{constructor(e,n){this.options=e,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=P.DATA,this.returnState=P.DATA,this.charRefCode=-1,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new zme(n),this.currentLocation=this.getCurrentLocation(-1)}_err(e){var n,i;(i=(n=this.handler).onParseError)===null||i===void 0||i.call(n,this.preprocessor.getError(e))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||e==null||e())}write(e,n,i){this.active=!0,this.preprocessor.write(e,n),this._runParsingLoop(),this.paused||i==null||i()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this._unconsume(this.consumedAfterSnapshot),this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_unconsume(e){this.consumedAfterSnapshot-=e,this.preprocessor.retreat(e)}_reconsumeInState(e,n){this.state=e,this._callState(n)}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let n=0;n0&&this._err(j.endTagWithAttributes),e.selfClosing&&this._err(j.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case Ue.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Ue.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Ue.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:Ue.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type!==e)this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();else{this.currentCharacterToken.chars+=n;return}this._createCharacterToken(e,n)}_emitCodePoint(e){const n=J9(e)?Ue.WHITESPACE_CHARACTER:e===E.NULL?Ue.NULL_CHARACTER:Ue.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(Ue.CHARACTER,e)}_matchNamedCharacterReference(e){let n=null,i=0,r=!1;for(let o=0,s=Ns[0];o>=0&&(o=q9(Ns,s,o+1,e),!(o<0));e=this._consume()){i+=1,s=Ns[o];const a=s&go.VALUE_LENGTH;if(a){const l=(a>>14)-1;if(e!==E.SEMICOLON&&this._isCharacterReferenceInAttribute()&&nge(this.preprocessor.peek(1))?(n=[E.AMPERSAND],o+=l):(n=l===0?[Ns[o]&~go.VALUE_LENGTH]:l===1?[Ns[++o]]:[Ns[++o],Ns[++o]],i=0,r=e!==E.SEMICOLON),l===0){this._consume();break}}}return this._unconsume(i),r&&!this.preprocessor.endOfChunkHit&&this._err(j.missingSemicolonAfterCharacterReference),this._unconsume(1),n}_isCharacterReferenceInAttribute(){return this.returnState===P.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===P.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===P.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case P.DATA:{this._stateData(e);break}case P.RCDATA:{this._stateRcdata(e);break}case P.RAWTEXT:{this._stateRawtext(e);break}case P.SCRIPT_DATA:{this._stateScriptData(e);break}case P.PLAINTEXT:{this._statePlaintext(e);break}case P.TAG_OPEN:{this._stateTagOpen(e);break}case P.END_TAG_OPEN:{this._stateEndTagOpen(e);break}case P.TAG_NAME:{this._stateTagName(e);break}case P.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(e);break}case P.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(e);break}case P.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(e);break}case P.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(e);break}case P.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(e);break}case P.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(e);break}case P.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(e);break}case P.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(e);break}case P.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(e);break}case P.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(e);break}case P.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(e);break}case P.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(e);break}case P.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(e);break}case P.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(e);break}case P.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(e);break}case P.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(e);break}case P.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(e);break}case P.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(e);break}case P.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(e);break}case P.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(e);break}case P.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(e);break}case P.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(e);break}case P.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(e);break}case P.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(e);break}case P.ATTRIBUTE_NAME:{this._stateAttributeName(e);break}case P.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(e);break}case P.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(e);break}case P.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(e);break}case P.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(e);break}case P.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(e);break}case P.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(e);break}case P.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(e);break}case P.BOGUS_COMMENT:{this._stateBogusComment(e);break}case P.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(e);break}case P.COMMENT_START:{this._stateCommentStart(e);break}case P.COMMENT_START_DASH:{this._stateCommentStartDash(e);break}case P.COMMENT:{this._stateComment(e);break}case P.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(e);break}case P.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(e);break}case P.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(e);break}case P.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(e);break}case P.COMMENT_END_DASH:{this._stateCommentEndDash(e);break}case P.COMMENT_END:{this._stateCommentEnd(e);break}case P.COMMENT_END_BANG:{this._stateCommentEndBang(e);break}case P.DOCTYPE:{this._stateDoctype(e);break}case P.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(e);break}case P.DOCTYPE_NAME:{this._stateDoctypeName(e);break}case P.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(e);break}case P.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(e);break}case P.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(e);break}case P.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(e);break}case P.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(e);break}case P.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(e);break}case P.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break}case P.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(e);break}case P.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(e);break}case P.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(e);break}case P.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(e);break}case P.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(e);break}case P.BOGUS_DOCTYPE:{this._stateBogusDoctype(e);break}case P.CDATA_SECTION:{this._stateCdataSection(e);break}case P.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(e);break}case P.CDATA_SECTION_END:{this._stateCdataSectionEnd(e);break}case P.CHARACTER_REFERENCE:{this._stateCharacterReference(e);break}case P.NAMED_CHARACTER_REFERENCE:{this._stateNamedCharacterReference(e);break}case P.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(e);break}case P.NUMERIC_CHARACTER_REFERENCE:{this._stateNumericCharacterReference(e);break}case P.HEXADEMICAL_CHARACTER_REFERENCE_START:{this._stateHexademicalCharacterReferenceStart(e);break}case P.HEXADEMICAL_CHARACTER_REFERENCE:{this._stateHexademicalCharacterReference(e);break}case P.DECIMAL_CHARACTER_REFERENCE:{this._stateDecimalCharacterReference(e);break}case P.NUMERIC_CHARACTER_REFERENCE_END:{this._stateNumericCharacterReferenceEnd(e);break}default:throw new Error("Unknown state")}}_stateData(e){switch(e){case E.LESS_THAN_SIGN:{this.state=P.TAG_OPEN;break}case E.AMPERSAND:{this.returnState=P.DATA,this.state=P.CHARACTER_REFERENCE;break}case E.NULL:{this._err(j.unexpectedNullCharacter),this._emitCodePoint(e);break}case E.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case E.AMPERSAND:{this.returnState=P.RCDATA,this.state=P.CHARACTER_REFERENCE;break}case E.LESS_THAN_SIGN:{this.state=P.RCDATA_LESS_THAN_SIGN;break}case E.NULL:{this._err(j.unexpectedNullCharacter),this._emitChars(Ct);break}case E.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case E.LESS_THAN_SIGN:{this.state=P.RAWTEXT_LESS_THAN_SIGN;break}case E.NULL:{this._err(j.unexpectedNullCharacter),this._emitChars(Ct);break}case E.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case E.LESS_THAN_SIGN:{this.state=P.SCRIPT_DATA_LESS_THAN_SIGN;break}case E.NULL:{this._err(j.unexpectedNullCharacter),this._emitChars(Ct);break}case E.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case E.NULL:{this._err(j.unexpectedNullCharacter),this._emitChars(Ct);break}case E.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateTagOpen(e){if(Ms(e))this._createStartTagToken(),this.state=P.TAG_NAME,this._stateTagName(e);else switch(e){case E.EXCLAMATION_MARK:{this.state=P.MARKUP_DECLARATION_OPEN;break}case E.SOLIDUS:{this.state=P.END_TAG_OPEN;break}case E.QUESTION_MARK:{this._err(j.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=P.BOGUS_COMMENT,this._stateBogusComment(e);break}case E.EOF:{this._err(j.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(j.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=P.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(Ms(e))this._createEndTagToken(),this.state=P.TAG_NAME,this._stateTagName(e);else switch(e){case E.GREATER_THAN_SIGN:{this._err(j.missingEndTagName),this.state=P.DATA;break}case E.EOF:{this._err(j.eofBeforeTagName),this._emitChars("");break}case E.NULL:{this._err(j.unexpectedNullCharacter),this.state=P.SCRIPT_DATA_ESCAPED,this._emitChars(Ct);break}case E.EOF:{this._err(j.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=P.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===E.SOLIDUS?this.state=P.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Ms(e)?(this._emitChars("<"),this.state=P.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars("<"),this.state=P.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){Ms(e)?(this.state=P.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars("");break}case E.NULL:{this._err(j.unexpectedNullCharacter),this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Ct);break}case E.EOF:{this._err(j.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===E.SOLIDUS?(this.state=P.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(ui.SCRIPT,!1)&&x$(this.preprocessor.peek(ui.SCRIPT.length))){this._emitCodePoint(e);for(let n=0;n1114111)this._err(j.characterReferenceOutsideUnicodeRange),this.charRefCode=E.REPLACEMENT_CHARACTER;else if(W9(this.charRefCode))this._err(j.surrogateCharacterReference),this.charRefCode=E.REPLACEMENT_CHARACTER;else if(j9(this.charRefCode))this._err(j.noncharacterCharacterReference);else if(V9(this.charRefCode)||this.charRefCode===E.CARRIAGE_RETURN){this._err(j.controlCharacterReference);const n=Jme.get(this.charRefCode);n!==void 0&&(this.charRefCode=n)}this._flushCodePointConsumedAsCharacterReference(this.charRefCode),this._reconsumeInState(this.returnState,e)}}const e7=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),_$=new Set([...e7,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),mg=new Map([[g.APPLET,Z.HTML],[g.CAPTION,Z.HTML],[g.HTML,Z.HTML],[g.MARQUEE,Z.HTML],[g.OBJECT,Z.HTML],[g.TABLE,Z.HTML],[g.TD,Z.HTML],[g.TEMPLATE,Z.HTML],[g.TH,Z.HTML],[g.ANNOTATION_XML,Z.MATHML],[g.MI,Z.MATHML],[g.MN,Z.MATHML],[g.MO,Z.MATHML],[g.MS,Z.MATHML],[g.MTEXT,Z.MATHML],[g.DESC,Z.SVG],[g.FOREIGN_OBJECT,Z.SVG],[g.TITLE,Z.SVG]]),rge=[g.H1,g.H2,g.H3,g.H4,g.H5,g.H6],oge=[g.TR,g.TEMPLATE,g.HTML],sge=[g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML],age=[g.TABLE,g.TEMPLATE,g.HTML],lge=[g.TD,g.TH];class uge{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,n,i){this.treeAdapter=n,this.handler=i,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=g.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===g.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===Z.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,n){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,n,!0)}pop(){const e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,n){const i=this._indexOf(e);this.items[i]=n,i===this.stackTop&&(this.current=n)}insertAfter(e,n,i){const r=this._indexOf(e)+1;this.items.splice(r,0,n),this.tagIDs.splice(r,0,i),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(e,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==Z.HTML);this.shortenToLength(n<0?0:n)}shortenToLength(e){for(;this.stackTop>=e;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop=0;i--)if(e.includes(this.tagIDs[i])&&this.treeAdapter.getNamespaceURI(this.items[i])===n)return i;return-1}clearBackTo(e,n){const i=this._indexOfTagNames(e,n);this.shortenToLength(i+1)}clearBackToTableContext(){this.clearBackTo(age,Z.HTML)}clearBackToTableBodyContext(){this.clearBackTo(sge,Z.HTML)}clearBackToTableRowContext(){this.clearBackTo(oge,Z.HTML)}remove(e){const n=this._indexOf(e);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===g.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){const n=this._indexOf(e)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===g.HTML}hasInScope(e){for(let n=this.stackTop;n>=0;n--){const i=this.tagIDs[n],r=this.treeAdapter.getNamespaceURI(this.items[n]);if(i===e&&r===Z.HTML)return!0;if(mg.get(i)===r)return!1}return!0}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){const n=this.tagIDs[e],i=this.treeAdapter.getNamespaceURI(this.items[e]);if(Y9(n)&&i===Z.HTML)return!0;if(mg.get(n)===i)return!1}return!0}hasInListItemScope(e){for(let n=this.stackTop;n>=0;n--){const i=this.tagIDs[n],r=this.treeAdapter.getNamespaceURI(this.items[n]);if(i===e&&r===Z.HTML)return!0;if((i===g.UL||i===g.OL)&&r===Z.HTML||mg.get(i)===r)return!1}return!0}hasInButtonScope(e){for(let n=this.stackTop;n>=0;n--){const i=this.tagIDs[n],r=this.treeAdapter.getNamespaceURI(this.items[n]);if(i===e&&r===Z.HTML)return!0;if(i===g.BUTTON&&r===Z.HTML||mg.get(i)===r)return!1}return!0}hasInTableScope(e){for(let n=this.stackTop;n>=0;n--){const i=this.tagIDs[n];if(this.treeAdapter.getNamespaceURI(this.items[n])===Z.HTML){if(i===e)return!0;if(i===g.TABLE||i===g.TEMPLATE||i===g.HTML)return!1}}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--){const n=this.tagIDs[e];if(this.treeAdapter.getNamespaceURI(this.items[e])===Z.HTML){if(n===g.TBODY||n===g.THEAD||n===g.TFOOT)return!0;if(n===g.TABLE||n===g.HTML)return!1}}return!0}hasInSelectScope(e){for(let n=this.stackTop;n>=0;n--){const i=this.tagIDs[n];if(this.treeAdapter.getNamespaceURI(this.items[n])===Z.HTML){if(i===e)return!0;if(i!==g.OPTION&&i!==g.OPTGROUP)return!1}}return!0}generateImpliedEndTags(){for(;e7.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;_$.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==e&&_$.has(this.currentTagId);)this.pop()}}const S1=3;var Ar;(function(t){t[t.Marker=0]="Marker",t[t.Element=1]="Element"})(Ar=Ar||(Ar={}));const E$={type:Ar.Marker};class cge{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,n){const i=[],r=n.length,o=this.treeAdapter.getTagName(e),s=this.treeAdapter.getNamespaceURI(e);for(let a=0;a[s.name,s.value]));let o=0;for(let s=0;sr.get(l.name)===l.value)&&(o+=1,o>=S1&&this.entries.splice(a.idx,1))}}insertMarker(){this.entries.unshift(E$)}pushElement(e,n){this._ensureNoahArkCondition(e),this.entries.unshift({type:Ar.Element,element:e,token:n})}insertElementAfterBookmark(e,n){const i=this.entries.indexOf(this.bookmark);this.entries.splice(i,0,{type:Ar.Element,element:e,token:n})}removeEntry(e){const n=this.entries.indexOf(e);n>=0&&this.entries.splice(n,1)}clearToLastMarker(){const e=this.entries.indexOf(E$);e>=0?this.entries.splice(0,e+1):this.entries.length=0}getElementEntryInScopeWithTagName(e){const n=this.entries.find(i=>i.type===Ar.Marker||this.treeAdapter.getTagName(i.element)===e);return n&&n.type===Ar.Element?n:null}getElementEntry(e){return this.entries.find(n=>n.type===Ar.Element&&n.element===e)}}function C$(t){return{nodeName:"#text",value:t,parentNode:null}}const yc={createDocument(){return{nodeName:"#document",mode:Li.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(t,e,n){return{nodeName:t,tagName:t,attrs:n,namespaceURI:e,childNodes:[],parentNode:null}},createCommentNode(t){return{nodeName:"#comment",data:t,parentNode:null}},appendChild(t,e){t.childNodes.push(e),e.parentNode=t},insertBefore(t,e,n){const i=t.childNodes.indexOf(n);t.childNodes.splice(i,0,e),e.parentNode=t},setTemplateContent(t,e){t.content=e},getTemplateContent(t){return t.content},setDocumentType(t,e,n,i){const r=t.childNodes.find(o=>o.nodeName==="#documentType");if(r)r.name=e,r.publicId=n,r.systemId=i;else{const o={nodeName:"#documentType",name:e,publicId:n,systemId:i,parentNode:null};yc.appendChild(t,o)}},setDocumentMode(t,e){t.mode=e},getDocumentMode(t){return t.mode},detachNode(t){if(t.parentNode){const e=t.parentNode.childNodes.indexOf(t);t.parentNode.childNodes.splice(e,1),t.parentNode=null}},insertText(t,e){if(t.childNodes.length>0){const n=t.childNodes[t.childNodes.length-1];if(yc.isTextNode(n)){n.value+=e;return}}yc.appendChild(t,C$(e))},insertTextBefore(t,e,n){const i=t.childNodes[t.childNodes.indexOf(n)-1];i&&yc.isTextNode(i)?i.value+=e:yc.insertBefore(t,C$(e),n)},adoptAttributes(t,e){const n=new Set(t.attrs.map(i=>i.name));for(let i=0;it.startsWith(n))}function gge(t){return t.name===t7&&t.publicId===null&&(t.systemId===null||t.systemId===dge)}function Oge(t){if(t.name!==t7)return Li.QUIRKS;const{systemId:e}=t;if(e&&e.toLowerCase()===hge)return Li.QUIRKS;let{publicId:n}=t;if(n!==null){if(n=n.toLowerCase(),pge.has(n))return Li.QUIRKS;let i=e===null?fge:n7;if(T$(n,i))return Li.QUIRKS;if(i=e===null?i7:mge,T$(n,i))return Li.LIMITED_QUIRKS}return Li.NO_QUIRKS}const P$={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},bge="definitionurl",yge="definitionURL",vge=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(t=>[t.toLowerCase(),t])),Sge=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:Z.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:Z.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:Z.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:Z.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:Z.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:Z.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:Z.XLINK}],["xml:base",{prefix:"xml",name:"base",namespace:Z.XML}],["xml:lang",{prefix:"xml",name:"lang",namespace:Z.XML}],["xml:space",{prefix:"xml",name:"space",namespace:Z.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:Z.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:Z.XMLNS}]]),wge=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(t=>[t.toLowerCase(),t])),kge=new Set([g.B,g.BIG,g.BLOCKQUOTE,g.BODY,g.BR,g.CENTER,g.CODE,g.DD,g.DIV,g.DL,g.DT,g.EM,g.EMBED,g.H1,g.H2,g.H3,g.H4,g.H5,g.H6,g.HEAD,g.HR,g.I,g.IMG,g.LI,g.LISTING,g.MENU,g.META,g.NOBR,g.OL,g.P,g.PRE,g.RUBY,g.S,g.SMALL,g.SPAN,g.STRONG,g.STRIKE,g.SUB,g.SUP,g.TABLE,g.TT,g.U,g.UL,g.VAR]);function xge(t){const e=t.tagID;return e===g.FONT&&t.attrs.some(({name:i})=>i===la.COLOR||i===la.SIZE||i===la.FACE)||kge.has(e)}function r7(t){for(let e=0;e0&&this._setContextModes(e,n)}onItemPop(e,n){var i,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(r=(i=this.treeAdapter).onItemPop)===null||r===void 0||r.call(i,e,this.openElements.current),n){let o,s;this.openElements.stackTop===0&&this.fragmentContext?(o=this.fragmentContext,s=this.fragmentContextID):{current:o,currentTagId:s}=this.openElements,this._setContextModes(o,s)}}_setContextModes(e,n){const i=e===this.document||this.treeAdapter.getNamespaceURI(e)===Z.HTML;this.currentNotInHTML=!i,this.tokenizer.inForeignNode=!i&&!this._isIntegrationPoint(n,e)}_switchToTextParsing(e,n){this._insertElement(e,Z.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=$.TEXT}switchToPlaintextParsing(){this.insertionMode=$.TEXT,this.originalInsertionMode=$.IN_BODY,this.tokenizer.state=Vt.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===Q.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==Z.HTML))switch(this.fragmentContextID){case g.TITLE:case g.TEXTAREA:{this.tokenizer.state=Vt.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=Vt.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=Vt.SCRIPT_DATA;break}case g.PLAINTEXT:{this.tokenizer.state=Vt.PLAINTEXT;break}}}_setDocumentType(e){const n=e.name||"",i=e.publicId||"",r=e.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,i,r),e.location){const s=this.treeAdapter.getChildNodes(this.document).find(a=>this.treeAdapter.isDocumentTypeNode(a));s&&this.treeAdapter.setNodeSourceCodeLocation(s,e.location)}}_attachElementToTree(e,n){if(this.options.sourceCodeLocationInfo){const i=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(e,i)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{const i=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(i,e)}}_appendElement(e,n){const i=this.treeAdapter.createElement(e.tagName,n,e.attrs);this._attachElementToTree(i,e.location)}_insertElement(e,n){const i=this.treeAdapter.createElement(e.tagName,n,e.attrs);this._attachElementToTree(i,e.location),this.openElements.push(i,e.tagID)}_insertFakeElement(e,n){const i=this.treeAdapter.createElement(e,Z.HTML,[]);this._attachElementToTree(i,null),this.openElements.push(i,n)}_insertTemplate(e){const n=this.treeAdapter.createElement(e.tagName,Z.HTML,e.attrs),i=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,i),this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,null)}_insertFakeRootElement(){const e=this.treeAdapter.createElement(Q.HTML,Z.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,g.HTML)}_appendCommentNode(e,n){const i=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(n,i),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}_insertCharacters(e){let n,i;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:i}=this._findFosterParentingLocation(),i?this.treeAdapter.insertTextBefore(n,e.chars,i):this.treeAdapter.insertText(n,e.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,e.chars)),!e.location)return;const r=this.treeAdapter.getChildNodes(n),o=i?r.lastIndexOf(i):r.length,s=r[o-1];if(this.treeAdapter.getNodeSourceCodeLocation(s)){const{endLine:l,endCol:u,endOffset:c}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:l,endCol:u,endOffset:c})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,e.location)}_adoptNodes(e,n){for(let i=this.treeAdapter.getFirstChild(e);i;i=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(i),this.treeAdapter.appendChild(n,i)}_setEndLocation(e,n){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&n.location){const i=n.location,r=this.treeAdapter.getTagName(e),o=n.type===Ue.END_TAG&&r===n.tagName?{endTag:{...i},endLine:i.endLine,endCol:i.endCol,endOffset:i.endOffset}:{endLine:i.startLine,endCol:i.startCol,endOffset:i.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,o)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let n,i;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,i=this.fragmentContextID):{current:n,currentTagId:i}=this.openElements,e.tagID===g.SVG&&this.treeAdapter.getTagName(n)===Q.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===Z.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===g.MGLYPH||e.tagID===g.MALIGNMARK)&&!this._isIntegrationPoint(i,n,Z.HTML)}_processToken(e){switch(e.type){case Ue.CHARACTER:{this.onCharacter(e);break}case Ue.NULL_CHARACTER:{this.onNullCharacter(e);break}case Ue.COMMENT:{this.onComment(e);break}case Ue.DOCTYPE:{this.onDoctype(e);break}case Ue.START_TAG:{this._processStartTag(e);break}case Ue.END_TAG:{this.onEndTag(e);break}case Ue.EOF:{this.onEof(e);break}case Ue.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(e);break}}}_isIntegrationPoint(e,n,i){const r=this.treeAdapter.getNamespaceURI(n),o=this.treeAdapter.getAttrList(n);return Tge(e,r,o,i)}_reconstructActiveFormattingElements(){const e=this.activeFormattingElements.entries.length;if(e){const n=this.activeFormattingElements.entries.findIndex(r=>r.type===Ar.Marker||this.openElements.contains(r.element)),i=n<0?e-1:n-1;for(let r=i;r>=0;r--){const o=this.activeFormattingElements.entries[r];this._insertElement(o.token,this.treeAdapter.getNamespaceURI(o.element)),o.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=$.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(g.P),this.openElements.popUntilTagNamePopped(g.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case g.TR:{this.insertionMode=$.IN_ROW;return}case g.TBODY:case g.THEAD:case g.TFOOT:{this.insertionMode=$.IN_TABLE_BODY;return}case g.CAPTION:{this.insertionMode=$.IN_CAPTION;return}case g.COLGROUP:{this.insertionMode=$.IN_COLUMN_GROUP;return}case g.TABLE:{this.insertionMode=$.IN_TABLE;return}case g.BODY:{this.insertionMode=$.IN_BODY;return}case g.FRAMESET:{this.insertionMode=$.IN_FRAMESET;return}case g.SELECT:{this._resetInsertionModeForSelect(e);return}case g.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case g.HTML:{this.insertionMode=this.headElement?$.AFTER_HEAD:$.BEFORE_HEAD;return}case g.TD:case g.TH:{if(e>0){this.insertionMode=$.IN_CELL;return}break}case g.HEAD:{if(e>0){this.insertionMode=$.IN_HEAD;return}break}}this.insertionMode=$.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let n=e-1;n>0;n--){const i=this.openElements.tagIDs[n];if(i===g.TEMPLATE)break;if(i===g.TABLE){this.insertionMode=$.IN_SELECT_IN_TABLE;return}}this.insertionMode=$.IN_SELECT}_isElementCausesFosterParenting(e){return s7.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){const n=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case g.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===Z.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case g.TABLE:{const i=this.treeAdapter.getParentNode(n);return i?{parent:i,beforeElement:n}:{parent:this.openElements.items[e-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,e,n.beforeElement):this.treeAdapter.appendChild(n.parent,e)}_isSpecialElement(e,n){const i=this.treeAdapter.getNamespaceURI(e);return Kme[i].has(n)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){lOe(this,e);return}switch(this.insertionMode){case $.INITIAL:{Bh(this,e);break}case $.BEFORE_HTML:{vf(this,e);break}case $.BEFORE_HEAD:{Sf(this,e);break}case $.IN_HEAD:{wf(this,e);break}case $.IN_HEAD_NO_SCRIPT:{kf(this,e);break}case $.AFTER_HEAD:{xf(this,e);break}case $.IN_BODY:case $.IN_CAPTION:case $.IN_CELL:case $.IN_TEMPLATE:{l7(this,e);break}case $.TEXT:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:{this._insertCharacters(e);break}case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:{w1(this,e);break}case $.IN_TABLE_TEXT:{p7(this,e);break}case $.IN_COLUMN_GROUP:{gO(this,e);break}case $.AFTER_BODY:{OO(this,e);break}case $.AFTER_AFTER_BODY:{Jg(this,e);break}}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){aOe(this,e);return}switch(this.insertionMode){case $.INITIAL:{Bh(this,e);break}case $.BEFORE_HTML:{vf(this,e);break}case $.BEFORE_HEAD:{Sf(this,e);break}case $.IN_HEAD:{wf(this,e);break}case $.IN_HEAD_NO_SCRIPT:{kf(this,e);break}case $.AFTER_HEAD:{xf(this,e);break}case $.TEXT:{this._insertCharacters(e);break}case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:{w1(this,e);break}case $.IN_COLUMN_GROUP:{gO(this,e);break}case $.AFTER_BODY:{OO(this,e);break}case $.AFTER_AFTER_BODY:{Jg(this,e);break}}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){xw(this,e);return}switch(this.insertionMode){case $.INITIAL:case $.BEFORE_HTML:case $.BEFORE_HEAD:case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:case $.IN_BODY:case $.IN_TABLE:case $.IN_CAPTION:case $.IN_COLUMN_GROUP:case $.IN_TABLE_BODY:case $.IN_ROW:case $.IN_CELL:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:case $.IN_TEMPLATE:case $.IN_FRAMESET:case $.AFTER_FRAMESET:{xw(this,e);break}case $.IN_TABLE_TEXT:{Qh(this,e);break}case $.AFTER_BODY:{Qge(this,e);break}case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:{Fge(this,e);break}}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case $.INITIAL:{zge(this,e);break}case $.BEFORE_HEAD:case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:{this._err(e,j.misplacedDoctype);break}case $.IN_TABLE_TEXT:{Qh(this,e);break}}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,j.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?uOe(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case $.INITIAL:{Bh(this,e);break}case $.BEFORE_HTML:{Hge(this,e);break}case $.BEFORE_HEAD:{Wge(this,e);break}case $.IN_HEAD:{Zr(this,e);break}case $.IN_HEAD_NO_SCRIPT:{Xge(this,e);break}case $.AFTER_HEAD:{qge(this,e);break}case $.IN_BODY:{Wn(this,e);break}case $.IN_TABLE:{Ed(this,e);break}case $.IN_TABLE_TEXT:{Qh(this,e);break}case $.IN_CAPTION:{V0e(this,e);break}case $.IN_COLUMN_GROUP:{b_(this,e);break}case $.IN_TABLE_BODY:{Rb(this,e);break}case $.IN_ROW:{Ib(this,e);break}case $.IN_CELL:{Z0e(this,e);break}case $.IN_SELECT:{O7(this,e);break}case $.IN_SELECT_IN_TABLE:{Y0e(this,e);break}case $.IN_TEMPLATE:{K0e(this,e);break}case $.AFTER_BODY:{eOe(this,e);break}case $.IN_FRAMESET:{tOe(this,e);break}case $.AFTER_FRAMESET:{iOe(this,e);break}case $.AFTER_AFTER_BODY:{oOe(this,e);break}case $.AFTER_AFTER_FRAMESET:{sOe(this,e);break}}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?cOe(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case $.INITIAL:{Bh(this,e);break}case $.BEFORE_HTML:{Uge(this,e);break}case $.BEFORE_HEAD:{Vge(this,e);break}case $.IN_HEAD:{jge(this,e);break}case $.IN_HEAD_NO_SCRIPT:{Zge(this,e);break}case $.AFTER_HEAD:{Yge(this,e);break}case $.IN_BODY:{Ab(this,e);break}case $.TEXT:{N0e(this,e);break}case $.IN_TABLE:{vp(this,e);break}case $.IN_TABLE_TEXT:{Qh(this,e);break}case $.IN_CAPTION:{j0e(this,e);break}case $.IN_COLUMN_GROUP:{X0e(this,e);break}case $.IN_TABLE_BODY:{_w(this,e);break}case $.IN_ROW:{g7(this,e);break}case $.IN_CELL:{q0e(this,e);break}case $.IN_SELECT:{b7(this,e);break}case $.IN_SELECT_IN_TABLE:{G0e(this,e);break}case $.IN_TEMPLATE:{J0e(this,e);break}case $.AFTER_BODY:{v7(this,e);break}case $.IN_FRAMESET:{nOe(this,e);break}case $.AFTER_FRAMESET:{rOe(this,e);break}case $.AFTER_AFTER_BODY:{Jg(this,e);break}}}onEof(e){switch(this.insertionMode){case $.INITIAL:{Bh(this,e);break}case $.BEFORE_HTML:{vf(this,e);break}case $.BEFORE_HEAD:{Sf(this,e);break}case $.IN_HEAD:{wf(this,e);break}case $.IN_HEAD_NO_SCRIPT:{kf(this,e);break}case $.AFTER_HEAD:{xf(this,e);break}case $.IN_BODY:case $.IN_TABLE:case $.IN_CAPTION:case $.IN_COLUMN_GROUP:case $.IN_TABLE_BODY:case $.IN_ROW:case $.IN_CELL:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:{h7(this,e);break}case $.TEXT:{M0e(this,e);break}case $.IN_TABLE_TEXT:{Qh(this,e);break}case $.IN_TEMPLATE:{y7(this,e);break}case $.AFTER_BODY:case $.IN_FRAMESET:case $.AFTER_FRAMESET:case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:{O_(this,e);break}}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===E.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(e);return}switch(this.insertionMode){case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:case $.TEXT:case $.IN_COLUMN_GROUP:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:case $.IN_FRAMESET:case $.AFTER_FRAMESET:{this._insertCharacters(e);break}case $.IN_BODY:case $.IN_CAPTION:case $.IN_CELL:case $.IN_TEMPLATE:case $.AFTER_BODY:case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:{a7(this,e);break}case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:{w1(this,e);break}case $.IN_TABLE_TEXT:{f7(this,e);break}}}}function $ge(t,e){let n=t.activeFormattingElements.getElementEntryInScopeWithTagName(e.tagName);return n?t.openElements.contains(n.element)?t.openElements.hasInScope(e.tagID)||(n=null):(t.activeFormattingElements.removeEntry(n),n=null):d7(t,e),n}function Lge(t,e){let n=null,i=t.openElements.stackTop;for(;i>=0;i--){const r=t.openElements.items[i];if(r===e.element)break;t._isSpecialElement(r,t.openElements.tagIDs[i])&&(n=r)}return n||(t.openElements.shortenToLength(i<0?0:i),t.activeFormattingElements.removeEntry(e)),n}function Nge(t,e,n){let i=e,r=t.openElements.getCommonAncestor(e);for(let o=0,s=r;s!==n;o++,s=r){r=t.openElements.getCommonAncestor(s);const a=t.activeFormattingElements.getElementEntry(s),l=a&&o>=Rge;!a||l?(l&&t.activeFormattingElements.removeEntry(a),t.openElements.remove(s)):(s=Mge(t,a),i===e&&(t.activeFormattingElements.bookmark=a),t.treeAdapter.detachNode(i),t.treeAdapter.appendChild(s,i),i=s)}return i}function Mge(t,e){const n=t.treeAdapter.getNamespaceURI(e.element),i=t.treeAdapter.createElement(e.token.tagName,n,e.token.attrs);return t.openElements.replace(e.element,i),e.element=i,i}function Dge(t,e,n){const i=t.treeAdapter.getTagName(e),r=ah(i);if(t._isElementCausesFosterParenting(r))t._fosterParentElement(n);else{const o=t.treeAdapter.getNamespaceURI(e);r===g.TEMPLATE&&o===Z.HTML&&(e=t.treeAdapter.getTemplateContent(e)),t.treeAdapter.appendChild(e,n)}}function Bge(t,e,n){const i=t.treeAdapter.getNamespaceURI(n.element),{token:r}=n,o=t.treeAdapter.createElement(r.tagName,i,r.attrs);t._adoptNodes(e,o),t.treeAdapter.appendChild(e,o),t.activeFormattingElements.insertElementAfterBookmark(o,r),t.activeFormattingElements.removeEntry(n),t.openElements.remove(n.element),t.openElements.insertAfter(e,o,r.tagID)}function g_(t,e){for(let n=0;n=n;i--)t._setEndLocation(t.openElements.items[i],e);if(!t.fragmentContext&&t.openElements.stackTop>=0){const i=t.openElements.items[0],r=t.treeAdapter.getNodeSourceCodeLocation(i);if(r&&!r.endTag&&(t._setEndLocation(i,e),t.openElements.stackTop>=1)){const o=t.openElements.items[1],s=t.treeAdapter.getNodeSourceCodeLocation(o);s&&!s.endTag&&t._setEndLocation(o,e)}}}}function zge(t,e){t._setDocumentType(e);const n=e.forceQuirks?Li.QUIRKS:Oge(e);gge(e)||t._err(e,j.nonConformingDoctype),t.treeAdapter.setDocumentMode(t.document,n),t.insertionMode=$.BEFORE_HTML}function Bh(t,e){t._err(e,j.missingDoctype,!0),t.treeAdapter.setDocumentMode(t.document,Li.QUIRKS),t.insertionMode=$.BEFORE_HTML,t._processToken(e)}function Hge(t,e){e.tagID===g.HTML?(t._insertElement(e,Z.HTML),t.insertionMode=$.BEFORE_HEAD):vf(t,e)}function Uge(t,e){const n=e.tagID;(n===g.HTML||n===g.HEAD||n===g.BODY||n===g.BR)&&vf(t,e)}function vf(t,e){t._insertFakeRootElement(),t.insertionMode=$.BEFORE_HEAD,t._processToken(e)}function Wge(t,e){switch(e.tagID){case g.HTML:{Wn(t,e);break}case g.HEAD:{t._insertElement(e,Z.HTML),t.headElement=t.openElements.current,t.insertionMode=$.IN_HEAD;break}default:Sf(t,e)}}function Vge(t,e){const n=e.tagID;n===g.HEAD||n===g.BODY||n===g.HTML||n===g.BR?Sf(t,e):t._err(e,j.endTagWithoutMatchingOpenElement)}function Sf(t,e){t._insertFakeElement(Q.HEAD,g.HEAD),t.headElement=t.openElements.current,t.insertionMode=$.IN_HEAD,t._processToken(e)}function Zr(t,e){switch(e.tagID){case g.HTML:{Wn(t,e);break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:{t._appendElement(e,Z.HTML),e.ackSelfClosing=!0;break}case g.TITLE:{t._switchToTextParsing(e,Vt.RCDATA);break}case g.NOSCRIPT:{t.options.scriptingEnabled?t._switchToTextParsing(e,Vt.RAWTEXT):(t._insertElement(e,Z.HTML),t.insertionMode=$.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{t._switchToTextParsing(e,Vt.RAWTEXT);break}case g.SCRIPT:{t._switchToTextParsing(e,Vt.SCRIPT_DATA);break}case g.TEMPLATE:{t._insertTemplate(e),t.activeFormattingElements.insertMarker(),t.framesetOk=!1,t.insertionMode=$.IN_TEMPLATE,t.tmplInsertionModeStack.unshift($.IN_TEMPLATE);break}case g.HEAD:{t._err(e,j.misplacedStartTagForHeadElement);break}default:wf(t,e)}}function jge(t,e){switch(e.tagID){case g.HEAD:{t.openElements.pop(),t.insertionMode=$.AFTER_HEAD;break}case g.BODY:case g.BR:case g.HTML:{wf(t,e);break}case g.TEMPLATE:{Lu(t,e);break}default:t._err(e,j.endTagWithoutMatchingOpenElement)}}function Lu(t,e){t.openElements.tmplCount>0?(t.openElements.generateImpliedEndTagsThoroughly(),t.openElements.currentTagId!==g.TEMPLATE&&t._err(e,j.closingOfElementWithOpenChildElements),t.openElements.popUntilTagNamePopped(g.TEMPLATE),t.activeFormattingElements.clearToLastMarker(),t.tmplInsertionModeStack.shift(),t._resetInsertionMode()):t._err(e,j.endTagWithoutMatchingOpenElement)}function wf(t,e){t.openElements.pop(),t.insertionMode=$.AFTER_HEAD,t._processToken(e)}function Xge(t,e){switch(e.tagID){case g.HTML:{Wn(t,e);break}case g.BASEFONT:case g.BGSOUND:case g.HEAD:case g.LINK:case g.META:case g.NOFRAMES:case g.STYLE:{Zr(t,e);break}case g.NOSCRIPT:{t._err(e,j.nestedNoscriptInHead);break}default:kf(t,e)}}function Zge(t,e){switch(e.tagID){case g.NOSCRIPT:{t.openElements.pop(),t.insertionMode=$.IN_HEAD;break}case g.BR:{kf(t,e);break}default:t._err(e,j.endTagWithoutMatchingOpenElement)}}function kf(t,e){const n=e.type===Ue.EOF?j.openElementsLeftAfterEof:j.disallowedContentInNoscriptInHead;t._err(e,n),t.openElements.pop(),t.insertionMode=$.IN_HEAD,t._processToken(e)}function qge(t,e){switch(e.tagID){case g.HTML:{Wn(t,e);break}case g.BODY:{t._insertElement(e,Z.HTML),t.framesetOk=!1,t.insertionMode=$.IN_BODY;break}case g.FRAMESET:{t._insertElement(e,Z.HTML),t.insertionMode=$.IN_FRAMESET;break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{t._err(e,j.abandonedHeadElementChild),t.openElements.push(t.headElement,g.HEAD),Zr(t,e),t.openElements.remove(t.headElement);break}case g.HEAD:{t._err(e,j.misplacedStartTagForHeadElement);break}default:xf(t,e)}}function Yge(t,e){switch(e.tagID){case g.BODY:case g.HTML:case g.BR:{xf(t,e);break}case g.TEMPLATE:{Lu(t,e);break}default:t._err(e,j.endTagWithoutMatchingOpenElement)}}function xf(t,e){t._insertFakeElement(Q.BODY,g.BODY),t.insertionMode=$.IN_BODY,Pb(t,e)}function Pb(t,e){switch(e.type){case Ue.CHARACTER:{l7(t,e);break}case Ue.WHITESPACE_CHARACTER:{a7(t,e);break}case Ue.COMMENT:{xw(t,e);break}case Ue.START_TAG:{Wn(t,e);break}case Ue.END_TAG:{Ab(t,e);break}case Ue.EOF:{h7(t,e);break}}}function a7(t,e){t._reconstructActiveFormattingElements(),t._insertCharacters(e)}function l7(t,e){t._reconstructActiveFormattingElements(),t._insertCharacters(e),t.framesetOk=!1}function Gge(t,e){t.openElements.tmplCount===0&&t.treeAdapter.adoptAttributes(t.openElements.items[0],e.attrs)}function Kge(t,e){const n=t.openElements.tryPeekProperlyNestedBodyElement();n&&t.openElements.tmplCount===0&&(t.framesetOk=!1,t.treeAdapter.adoptAttributes(n,e.attrs))}function Jge(t,e){const n=t.openElements.tryPeekProperlyNestedBodyElement();t.framesetOk&&n&&(t.treeAdapter.detachNode(n),t.openElements.popAllUpToHtmlElement(),t._insertElement(e,Z.HTML),t.insertionMode=$.IN_FRAMESET)}function e0e(t,e){t.openElements.hasInButtonScope(g.P)&&t._closePElement(),t._insertElement(e,Z.HTML)}function t0e(t,e){t.openElements.hasInButtonScope(g.P)&&t._closePElement(),Y9(t.openElements.currentTagId)&&t.openElements.pop(),t._insertElement(e,Z.HTML)}function n0e(t,e){t.openElements.hasInButtonScope(g.P)&&t._closePElement(),t._insertElement(e,Z.HTML),t.skipNextNewLine=!0,t.framesetOk=!1}function i0e(t,e){const n=t.openElements.tmplCount>0;(!t.formElement||n)&&(t.openElements.hasInButtonScope(g.P)&&t._closePElement(),t._insertElement(e,Z.HTML),n||(t.formElement=t.openElements.current))}function r0e(t,e){t.framesetOk=!1;const n=e.tagID;for(let i=t.openElements.stackTop;i>=0;i--){const r=t.openElements.tagIDs[i];if(n===g.LI&&r===g.LI||(n===g.DD||n===g.DT)&&(r===g.DD||r===g.DT)){t.openElements.generateImpliedEndTagsWithExclusion(r),t.openElements.popUntilTagNamePopped(r);break}if(r!==g.ADDRESS&&r!==g.DIV&&r!==g.P&&t._isSpecialElement(t.openElements.items[i],r))break}t.openElements.hasInButtonScope(g.P)&&t._closePElement(),t._insertElement(e,Z.HTML)}function o0e(t,e){t.openElements.hasInButtonScope(g.P)&&t._closePElement(),t._insertElement(e,Z.HTML),t.tokenizer.state=Vt.PLAINTEXT}function s0e(t,e){t.openElements.hasInScope(g.BUTTON)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(g.BUTTON)),t._reconstructActiveFormattingElements(),t._insertElement(e,Z.HTML),t.framesetOk=!1}function a0e(t,e){const n=t.activeFormattingElements.getElementEntryInScopeWithTagName(Q.A);n&&(g_(t,e),t.openElements.remove(n.element),t.activeFormattingElements.removeEntry(n)),t._reconstructActiveFormattingElements(),t._insertElement(e,Z.HTML),t.activeFormattingElements.pushElement(t.openElements.current,e)}function l0e(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,Z.HTML),t.activeFormattingElements.pushElement(t.openElements.current,e)}function u0e(t,e){t._reconstructActiveFormattingElements(),t.openElements.hasInScope(g.NOBR)&&(g_(t,e),t._reconstructActiveFormattingElements()),t._insertElement(e,Z.HTML),t.activeFormattingElements.pushElement(t.openElements.current,e)}function c0e(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,Z.HTML),t.activeFormattingElements.insertMarker(),t.framesetOk=!1}function d0e(t,e){t.treeAdapter.getDocumentMode(t.document)!==Li.QUIRKS&&t.openElements.hasInButtonScope(g.P)&&t._closePElement(),t._insertElement(e,Z.HTML),t.framesetOk=!1,t.insertionMode=$.IN_TABLE}function u7(t,e){t._reconstructActiveFormattingElements(),t._appendElement(e,Z.HTML),t.framesetOk=!1,e.ackSelfClosing=!0}function c7(t){const e=X9(t,la.TYPE);return e!=null&&e.toLowerCase()===Pge}function h0e(t,e){t._reconstructActiveFormattingElements(),t._appendElement(e,Z.HTML),c7(e)||(t.framesetOk=!1),e.ackSelfClosing=!0}function f0e(t,e){t._appendElement(e,Z.HTML),e.ackSelfClosing=!0}function p0e(t,e){t.openElements.hasInButtonScope(g.P)&&t._closePElement(),t._appendElement(e,Z.HTML),t.framesetOk=!1,e.ackSelfClosing=!0}function m0e(t,e){e.tagName=Q.IMG,e.tagID=g.IMG,u7(t,e)}function g0e(t,e){t._insertElement(e,Z.HTML),t.skipNextNewLine=!0,t.tokenizer.state=Vt.RCDATA,t.originalInsertionMode=t.insertionMode,t.framesetOk=!1,t.insertionMode=$.TEXT}function O0e(t,e){t.openElements.hasInButtonScope(g.P)&&t._closePElement(),t._reconstructActiveFormattingElements(),t.framesetOk=!1,t._switchToTextParsing(e,Vt.RAWTEXT)}function b0e(t,e){t.framesetOk=!1,t._switchToTextParsing(e,Vt.RAWTEXT)}function I$(t,e){t._switchToTextParsing(e,Vt.RAWTEXT)}function y0e(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,Z.HTML),t.framesetOk=!1,t.insertionMode=t.insertionMode===$.IN_TABLE||t.insertionMode===$.IN_CAPTION||t.insertionMode===$.IN_TABLE_BODY||t.insertionMode===$.IN_ROW||t.insertionMode===$.IN_CELL?$.IN_SELECT_IN_TABLE:$.IN_SELECT}function v0e(t,e){t.openElements.currentTagId===g.OPTION&&t.openElements.pop(),t._reconstructActiveFormattingElements(),t._insertElement(e,Z.HTML)}function S0e(t,e){t.openElements.hasInScope(g.RUBY)&&t.openElements.generateImpliedEndTags(),t._insertElement(e,Z.HTML)}function w0e(t,e){t.openElements.hasInScope(g.RUBY)&&t.openElements.generateImpliedEndTagsWithExclusion(g.RTC),t._insertElement(e,Z.HTML)}function k0e(t,e){t._reconstructActiveFormattingElements(),r7(e),m_(e),e.selfClosing?t._appendElement(e,Z.MATHML):t._insertElement(e,Z.MATHML),e.ackSelfClosing=!0}function x0e(t,e){t._reconstructActiveFormattingElements(),o7(e),m_(e),e.selfClosing?t._appendElement(e,Z.SVG):t._insertElement(e,Z.SVG),e.ackSelfClosing=!0}function $$(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,Z.HTML)}function Wn(t,e){switch(e.tagID){case g.I:case g.S:case g.B:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.SMALL:case g.STRIKE:case g.STRONG:{l0e(t,e);break}case g.A:{a0e(t,e);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{t0e(t,e);break}case g.P:case g.DL:case g.OL:case g.UL:case g.DIV:case g.DIR:case g.NAV:case g.MAIN:case g.MENU:case g.ASIDE:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.DETAILS:case g.ADDRESS:case g.ARTICLE:case g.SECTION:case g.SUMMARY:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{e0e(t,e);break}case g.LI:case g.DD:case g.DT:{r0e(t,e);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{u7(t,e);break}case g.HR:{p0e(t,e);break}case g.RB:case g.RTC:{S0e(t,e);break}case g.RT:case g.RP:{w0e(t,e);break}case g.PRE:case g.LISTING:{n0e(t,e);break}case g.XMP:{O0e(t,e);break}case g.SVG:{x0e(t,e);break}case g.HTML:{Gge(t,e);break}case g.BASE:case g.LINK:case g.META:case g.STYLE:case g.TITLE:case g.SCRIPT:case g.BGSOUND:case g.BASEFONT:case g.TEMPLATE:{Zr(t,e);break}case g.BODY:{Kge(t,e);break}case g.FORM:{i0e(t,e);break}case g.NOBR:{u0e(t,e);break}case g.MATH:{k0e(t,e);break}case g.TABLE:{d0e(t,e);break}case g.INPUT:{h0e(t,e);break}case g.PARAM:case g.TRACK:case g.SOURCE:{f0e(t,e);break}case g.IMAGE:{m0e(t,e);break}case g.BUTTON:{s0e(t,e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{c0e(t,e);break}case g.IFRAME:{b0e(t,e);break}case g.SELECT:{y0e(t,e);break}case g.OPTION:case g.OPTGROUP:{v0e(t,e);break}case g.NOEMBED:{I$(t,e);break}case g.FRAMESET:{Jge(t,e);break}case g.TEXTAREA:{g0e(t,e);break}case g.NOSCRIPT:{t.options.scriptingEnabled?I$(t,e):$$(t,e);break}case g.PLAINTEXT:{o0e(t,e);break}case g.COL:case g.TH:case g.TD:case g.TR:case g.HEAD:case g.FRAME:case g.TBODY:case g.TFOOT:case g.THEAD:case g.CAPTION:case g.COLGROUP:break;default:$$(t,e)}}function _0e(t,e){if(t.openElements.hasInScope(g.BODY)&&(t.insertionMode=$.AFTER_BODY,t.options.sourceCodeLocationInfo)){const n=t.openElements.tryPeekProperlyNestedBodyElement();n&&t._setEndLocation(n,e)}}function E0e(t,e){t.openElements.hasInScope(g.BODY)&&(t.insertionMode=$.AFTER_BODY,v7(t,e))}function C0e(t,e){const n=e.tagID;t.openElements.hasInScope(n)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(n))}function T0e(t){const e=t.openElements.tmplCount>0,{formElement:n}=t;e||(t.formElement=null),(n||e)&&t.openElements.hasInScope(g.FORM)&&(t.openElements.generateImpliedEndTags(),e?t.openElements.popUntilTagNamePopped(g.FORM):n&&t.openElements.remove(n))}function P0e(t){t.openElements.hasInButtonScope(g.P)||t._insertFakeElement(Q.P,g.P),t._closePElement()}function A0e(t){t.openElements.hasInListItemScope(g.LI)&&(t.openElements.generateImpliedEndTagsWithExclusion(g.LI),t.openElements.popUntilTagNamePopped(g.LI))}function R0e(t,e){const n=e.tagID;t.openElements.hasInScope(n)&&(t.openElements.generateImpliedEndTagsWithExclusion(n),t.openElements.popUntilTagNamePopped(n))}function I0e(t){t.openElements.hasNumberedHeaderInScope()&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilNumberedHeaderPopped())}function $0e(t,e){const n=e.tagID;t.openElements.hasInScope(n)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(n),t.activeFormattingElements.clearToLastMarker())}function L0e(t){t._reconstructActiveFormattingElements(),t._insertFakeElement(Q.BR,g.BR),t.openElements.pop(),t.framesetOk=!1}function d7(t,e){const n=e.tagName,i=e.tagID;for(let r=t.openElements.stackTop;r>0;r--){const o=t.openElements.items[r],s=t.openElements.tagIDs[r];if(i===s&&(i!==g.UNKNOWN||t.treeAdapter.getTagName(o)===n)){t.openElements.generateImpliedEndTagsWithExclusion(i),t.openElements.stackTop>=r&&t.openElements.shortenToLength(r);break}if(t._isSpecialElement(o,s))break}}function Ab(t,e){switch(e.tagID){case g.A:case g.B:case g.I:case g.S:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.NOBR:case g.SMALL:case g.STRIKE:case g.STRONG:{g_(t,e);break}case g.P:{P0e(t);break}case g.DL:case g.UL:case g.OL:case g.DIR:case g.DIV:case g.NAV:case g.PRE:case g.MAIN:case g.MENU:case g.ASIDE:case g.BUTTON:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.ADDRESS:case g.ARTICLE:case g.DETAILS:case g.SECTION:case g.SUMMARY:case g.LISTING:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{C0e(t,e);break}case g.LI:{A0e(t);break}case g.DD:case g.DT:{R0e(t,e);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{I0e(t);break}case g.BR:{L0e(t);break}case g.BODY:{_0e(t,e);break}case g.HTML:{E0e(t,e);break}case g.FORM:{T0e(t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{$0e(t,e);break}case g.TEMPLATE:{Lu(t,e);break}default:d7(t,e)}}function h7(t,e){t.tmplInsertionModeStack.length>0?y7(t,e):O_(t,e)}function N0e(t,e){var n;e.tagID===g.SCRIPT&&((n=t.scriptHandler)===null||n===void 0||n.call(t,t.openElements.current)),t.openElements.pop(),t.insertionMode=t.originalInsertionMode}function M0e(t,e){t._err(e,j.eofInElementThatCanContainOnlyText),t.openElements.pop(),t.insertionMode=t.originalInsertionMode,t.onEof(e)}function w1(t,e){if(s7.has(t.openElements.currentTagId))switch(t.pendingCharacterTokens.length=0,t.hasNonWhitespacePendingCharacterToken=!1,t.originalInsertionMode=t.insertionMode,t.insertionMode=$.IN_TABLE_TEXT,e.type){case Ue.CHARACTER:{p7(t,e);break}case Ue.WHITESPACE_CHARACTER:{f7(t,e);break}}else Up(t,e)}function D0e(t,e){t.openElements.clearBackToTableContext(),t.activeFormattingElements.insertMarker(),t._insertElement(e,Z.HTML),t.insertionMode=$.IN_CAPTION}function B0e(t,e){t.openElements.clearBackToTableContext(),t._insertElement(e,Z.HTML),t.insertionMode=$.IN_COLUMN_GROUP}function Q0e(t,e){t.openElements.clearBackToTableContext(),t._insertFakeElement(Q.COLGROUP,g.COLGROUP),t.insertionMode=$.IN_COLUMN_GROUP,b_(t,e)}function F0e(t,e){t.openElements.clearBackToTableContext(),t._insertElement(e,Z.HTML),t.insertionMode=$.IN_TABLE_BODY}function z0e(t,e){t.openElements.clearBackToTableContext(),t._insertFakeElement(Q.TBODY,g.TBODY),t.insertionMode=$.IN_TABLE_BODY,Rb(t,e)}function H0e(t,e){t.openElements.hasInTableScope(g.TABLE)&&(t.openElements.popUntilTagNamePopped(g.TABLE),t._resetInsertionMode(),t._processStartTag(e))}function U0e(t,e){c7(e)?t._appendElement(e,Z.HTML):Up(t,e),e.ackSelfClosing=!0}function W0e(t,e){!t.formElement&&t.openElements.tmplCount===0&&(t._insertElement(e,Z.HTML),t.formElement=t.openElements.current,t.openElements.pop())}function Ed(t,e){switch(e.tagID){case g.TD:case g.TH:case g.TR:{z0e(t,e);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{Zr(t,e);break}case g.COL:{Q0e(t,e);break}case g.FORM:{W0e(t,e);break}case g.TABLE:{H0e(t,e);break}case g.TBODY:case g.TFOOT:case g.THEAD:{F0e(t,e);break}case g.INPUT:{U0e(t,e);break}case g.CAPTION:{D0e(t,e);break}case g.COLGROUP:{B0e(t,e);break}default:Up(t,e)}}function vp(t,e){switch(e.tagID){case g.TABLE:{t.openElements.hasInTableScope(g.TABLE)&&(t.openElements.popUntilTagNamePopped(g.TABLE),t._resetInsertionMode());break}case g.TEMPLATE:{Lu(t,e);break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TBODY:case g.TD:case g.TFOOT:case g.TH:case g.THEAD:case g.TR:break;default:Up(t,e)}}function Up(t,e){const n=t.fosterParentingEnabled;t.fosterParentingEnabled=!0,Pb(t,e),t.fosterParentingEnabled=n}function f7(t,e){t.pendingCharacterTokens.push(e)}function p7(t,e){t.pendingCharacterTokens.push(e),t.hasNonWhitespacePendingCharacterToken=!0}function Qh(t,e){let n=0;if(t.hasNonWhitespacePendingCharacterToken)for(;n0&&t.openElements.currentTagId===g.OPTION&&t.openElements.tagIDs[t.openElements.stackTop-1]===g.OPTGROUP&&t.openElements.pop(),t.openElements.currentTagId===g.OPTGROUP&&t.openElements.pop();break}case g.OPTION:{t.openElements.currentTagId===g.OPTION&&t.openElements.pop();break}case g.SELECT:{t.openElements.hasInSelectScope(g.SELECT)&&(t.openElements.popUntilTagNamePopped(g.SELECT),t._resetInsertionMode());break}case g.TEMPLATE:{Lu(t,e);break}}}function Y0e(t,e){const n=e.tagID;n===g.CAPTION||n===g.TABLE||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR||n===g.TD||n===g.TH?(t.openElements.popUntilTagNamePopped(g.SELECT),t._resetInsertionMode(),t._processStartTag(e)):O7(t,e)}function G0e(t,e){const n=e.tagID;n===g.CAPTION||n===g.TABLE||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR||n===g.TD||n===g.TH?t.openElements.hasInTableScope(n)&&(t.openElements.popUntilTagNamePopped(g.SELECT),t._resetInsertionMode(),t.onEndTag(e)):b7(t,e)}function K0e(t,e){switch(e.tagID){case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{Zr(t,e);break}case g.CAPTION:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{t.tmplInsertionModeStack[0]=$.IN_TABLE,t.insertionMode=$.IN_TABLE,Ed(t,e);break}case g.COL:{t.tmplInsertionModeStack[0]=$.IN_COLUMN_GROUP,t.insertionMode=$.IN_COLUMN_GROUP,b_(t,e);break}case g.TR:{t.tmplInsertionModeStack[0]=$.IN_TABLE_BODY,t.insertionMode=$.IN_TABLE_BODY,Rb(t,e);break}case g.TD:case g.TH:{t.tmplInsertionModeStack[0]=$.IN_ROW,t.insertionMode=$.IN_ROW,Ib(t,e);break}default:t.tmplInsertionModeStack[0]=$.IN_BODY,t.insertionMode=$.IN_BODY,Wn(t,e)}}function J0e(t,e){e.tagID===g.TEMPLATE&&Lu(t,e)}function y7(t,e){t.openElements.tmplCount>0?(t.openElements.popUntilTagNamePopped(g.TEMPLATE),t.activeFormattingElements.clearToLastMarker(),t.tmplInsertionModeStack.shift(),t._resetInsertionMode(),t.onEof(e)):O_(t,e)}function eOe(t,e){e.tagID===g.HTML?Wn(t,e):OO(t,e)}function v7(t,e){var n;if(e.tagID===g.HTML){if(t.fragmentContext||(t.insertionMode=$.AFTER_AFTER_BODY),t.options.sourceCodeLocationInfo&&t.openElements.tagIDs[0]===g.HTML){t._setEndLocation(t.openElements.items[0],e);const i=t.openElements.items[1];i&&!(!((n=t.treeAdapter.getNodeSourceCodeLocation(i))===null||n===void 0)&&n.endTag)&&t._setEndLocation(i,e)}}else OO(t,e)}function OO(t,e){t.insertionMode=$.IN_BODY,Pb(t,e)}function tOe(t,e){switch(e.tagID){case g.HTML:{Wn(t,e);break}case g.FRAMESET:{t._insertElement(e,Z.HTML);break}case g.FRAME:{t._appendElement(e,Z.HTML),e.ackSelfClosing=!0;break}case g.NOFRAMES:{Zr(t,e);break}}}function nOe(t,e){e.tagID===g.FRAMESET&&!t.openElements.isRootHtmlElementCurrent()&&(t.openElements.pop(),!t.fragmentContext&&t.openElements.currentTagId!==g.FRAMESET&&(t.insertionMode=$.AFTER_FRAMESET))}function iOe(t,e){switch(e.tagID){case g.HTML:{Wn(t,e);break}case g.NOFRAMES:{Zr(t,e);break}}}function rOe(t,e){e.tagID===g.HTML&&(t.insertionMode=$.AFTER_AFTER_FRAMESET)}function oOe(t,e){e.tagID===g.HTML?Wn(t,e):Jg(t,e)}function Jg(t,e){t.insertionMode=$.IN_BODY,Pb(t,e)}function sOe(t,e){switch(e.tagID){case g.HTML:{Wn(t,e);break}case g.NOFRAMES:{Zr(t,e);break}}}function aOe(t,e){e.chars=Ct,t._insertCharacters(e)}function lOe(t,e){t._insertCharacters(e),t.framesetOk=!1}function S7(t){for(;t.treeAdapter.getNamespaceURI(t.openElements.current)!==Z.HTML&&!t._isIntegrationPoint(t.openElements.currentTagId,t.openElements.current);)t.openElements.pop()}function uOe(t,e){if(xge(e))S7(t),t._startTagOutsideForeignContent(e);else{const n=t._getAdjustedCurrentElement(),i=t.treeAdapter.getNamespaceURI(n);i===Z.MATHML?r7(e):i===Z.SVG&&(_ge(e),o7(e)),m_(e),e.selfClosing?t._appendElement(e,i):t._insertElement(e,i),e.ackSelfClosing=!0}}function cOe(t,e){if(e.tagID===g.P||e.tagID===g.BR){S7(t),t._endTagOutsideForeignContent(e);return}for(let n=t.openElements.stackTop;n>0;n--){const i=t.openElements.items[n];if(t.treeAdapter.getNamespaceURI(i)===Z.HTML){t._endTagOutsideForeignContent(e);break}const r=t.treeAdapter.getTagName(i);if(r.toLowerCase()===e.tagName){e.tagName=r,t.openElements.shortenToLength(n);break}}}Q.AREA,Q.BASE,Q.BASEFONT,Q.BGSOUND,Q.BR,Q.COL,Q.EMBED,Q.FRAME,Q.HR,Q.IMG,Q.INPUT,Q.KEYGEN,Q.LINK,Q.META,Q.PARAM,Q.SOURCE,Q.TRACK,Q.WBR;const dOe=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),L$={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function w7(t,e){const n=SOe(t),i=H9("type",{handlers:{root:hOe,element:fOe,text:pOe,comment:x7,doctype:mOe,raw:OOe},unknown:bOe}),r={parser:n?new R$(L$):R$.getFragmentParser(void 0,L$),handle(a){i(a,r)},stitches:!1,options:e||{}};i(t,r),lh(r,To());const o=n?r.parser.document:r.parser.getFragment(),s=kme(o,{file:r.options.file});return r.stitches&&Cb(s,"comment",function(a,l,u){const c=a;if(c.value.stitch&&u&&l!==void 0){const d=u.children;return d[l]=c.value.stitch,l}}),s.type==="root"&&s.children.length===1&&s.children[0].type===t.type?s.children[0]:s}function k7(t,e){let n=-1;if(t)for(;++n0?{type:"text",value:_}:void 0),_===!1?h.lastIndex=k+1:(m!==k&&v.push({type:"text",value:u.value.slice(m,k)}),Array.isArray(_)?v.push(..._):_&&v.push(_),m=k+S[0].length,b=!0),!h.global)break;S=h.exec(u.value)}return b?(m?\]}]+$/.exec(t);if(!e)return[t,void 0];t=t.slice(0,e.index);let n=e[0],i=n.indexOf(")");const r=M$(t,"(");let o=M$(t,")");for(;i!==-1&&r>o;)t+=n.slice(0,i+1),n=n.slice(i+1),i=n.indexOf(")"),o++;return[t,n]}function C7(t,e){const n=t.input.charCodeAt(t.index-1);return(t.index===0||mu(n)||wb(n))&&(!e||n!==47)}T7.peek=qOe;function QOe(){return{enter:{gfmFootnoteDefinition:zOe,gfmFootnoteDefinitionLabelString:HOe,gfmFootnoteCall:VOe,gfmFootnoteCallString:jOe},exit:{gfmFootnoteDefinition:WOe,gfmFootnoteDefinitionLabelString:UOe,gfmFootnoteCall:ZOe,gfmFootnoteCallString:XOe}}}function FOe(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:YOe,footnoteReference:T7}}}function zOe(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function HOe(){this.buffer()}function UOe(t){const e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=e,n.identifier=Dr(this.sliceSerialize(t)).toLowerCase()}function WOe(t){this.exit(t)}function VOe(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function jOe(){this.buffer()}function XOe(t){const e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=e,n.identifier=Dr(this.sliceSerialize(t)).toLowerCase()}function ZOe(t){this.exit(t)}function T7(t,e,n,i){const r=n.createTracker(i);let o=r.move("[^");const s=n.enter("footnoteReference"),a=n.enter("reference");return o+=r.move(n.safe(n.associationId(t),{...r.current(),before:o,after:"]"})),a(),s(),o+=r.move("]"),o}function qOe(){return"["}function YOe(t,e,n,i){const r=n.createTracker(i);let o=r.move("[^");const s=n.enter("footnoteDefinition"),a=n.enter("label");return o+=r.move(n.safe(n.associationId(t),{...r.current(),before:o,after:"]"})),a(),o+=r.move("]:"+(t.children&&t.children.length>0?" ":"")),r.shift(4),o+=r.move(n.indentLines(n.containerFlow(t,r.current()),GOe)),s(),o}function GOe(t,e,n){return e===0?t:(n?"":" ")+t}const KOe=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];P7.peek=ibe;function JOe(){return{canContainEols:["delete"],enter:{strikethrough:tbe},exit:{strikethrough:nbe}}}function ebe(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:KOe}],handlers:{delete:P7}}}function tbe(t){this.enter({type:"delete",children:[]},t)}function nbe(t){this.exit(t)}function P7(t,e,n,i){const r=n.createTracker(i),o=n.enter("strikethrough");let s=r.move("~~");return s+=n.containerPhrasing(t,{...r.current(),before:s,after:"~"}),s+=r.move("~~"),o(),s}function ibe(){return"~"}function rbe(t,e={}){const n=(e.align||[]).concat(),i=e.stringLength||sbe,r=[],o=[],s=[],a=[];let l=0,u=-1;for(;++ul&&(l=t[u].length);++ya[y])&&(a[y]=v)}m.push(b)}o[u]=m,s[u]=O}let c=-1;if(typeof n=="object"&&"length"in n)for(;++ca[c]&&(a[c]=b),h[c]=b),d[c]=v}o.splice(1,0,d),s.splice(1,0,h),u=-1;const p=[];for(;++u"u"||Kg.call(e,r)},f$=function(e,n){u$&&n.name==="__proto__"?u$(e,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):e[n.name]=n.newValue},p$=function(e,n){if(n==="__proto__")if(Kg.call(e,n)){if(c$)return c$(e,n).value}else return;return e[n]},Hpe=function t(){var e,n,i,r,o,s,a=arguments[0],l=1,u=arguments.length,c=!1;for(typeof a=="boolean"&&(c=a,a=arguments[1]||{},l=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});ls.length;let l;a&&s.push(r);try{l=t.apply(this,s)}catch(u){const c=u;if(a&&n)throw c;return r(c)}a||(l&&l.then&&typeof l.then=="function"?l.then(o,r):l instanceof Error?r(l):o(l))}function r(s,...a){n||(n=!0,e(s,...a))}function o(s){r(null,s)}}const lo={basename:Vpe,dirname:jpe,extname:Xpe,join:Zpe,sep:"/"};function Vpe(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');Up(t);let n=0,i=-1,r=t.length,o;if(e===void 0||e.length===0||e.length>t.length){for(;r--;)if(t.codePointAt(r)===47){if(o){n=r+1;break}}else i<0&&(o=!0,i=r+1);return i<0?"":t.slice(n,i)}if(e===t)return"";let s=-1,a=e.length-1;for(;r--;)if(t.codePointAt(r)===47){if(o){n=r+1;break}}else s<0&&(o=!0,s=r+1),a>-1&&(t.codePointAt(r)===e.codePointAt(a--)?a<0&&(i=r):(a=-1,i=s));return n===i?i=s:i<0&&(i=t.length),t.slice(n,i)}function jpe(t){if(Up(t),t.length===0)return".";let e=-1,n=t.length,i;for(;--n;)if(t.codePointAt(n)===47){if(i){e=n;break}}else i||(i=!0);return e<0?t.codePointAt(0)===47?"/":".":e===1&&t.codePointAt(0)===47?"//":t.slice(0,e)}function Xpe(t){Up(t);let e=t.length,n=-1,i=0,r=-1,o=0,s;for(;e--;){const a=t.codePointAt(e);if(a===47){if(s){i=e+1;break}continue}n<0&&(s=!0,n=e+1),a===46?r<0?r=e:o!==1&&(o=1):r>-1&&(o=-1)}return r<0||n<0||o===0||o===1&&r===n-1&&r===i+1?"":t.slice(r,n)}function Zpe(...t){let e=-1,n;for(;++e0&&t.codePointAt(t.length-1)===47&&(n+="/"),e?"/"+n:n}function Ype(t,e){let n="",i=0,r=-1,o=0,s=-1,a,l;for(;++s<=t.length;){if(s2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",i=0):(n=n.slice(0,l),i=n.length-1-n.lastIndexOf("/")),r=s,o=0;continue}}else if(n.length>0){n="",i=0,r=s,o=0;continue}}e&&(n=n.length>0?n+"/..":"..",i=2)}else n.length>0?n+="/"+t.slice(r+1,s):n=t.slice(r+1,s),i=s-r-1;r=s,o=0}else a===46&&o>-1?o++:o=-1}return n}function Up(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const Gpe={cwd:Kpe};function Kpe(){return"/"}function vw(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function Jpe(t){if(typeof t=="string")t=new URL(t);else if(!vw(t)){const e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(t.protocol!=="file:"){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return eme(t)}function eme(t){if(t.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const e=t.pathname;let n=-1;for(;++n0){let[p,...m]=c;const O=i[h][1];yw(O)&&yw(p)&&(p=f1(!0,O,p)),i[h]=[u,p,...m]}}}}const rme=new f_().freeze();function O1(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function b1(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function y1(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function g$(t){if(!yw(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function O$(t,e,n){if(!n)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function pg(t){return ome(t)?t:new B9(t)}function ome(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function sme(t){return typeof t=="string"||ame(t)}function ame(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const lme="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",b$=[],y$={allowDangerousHtml:!0},ume=/^(https?|ircs?|mailto|xmpp)$/i,cme=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Pb(t){const e=t.allowedElements,n=t.allowElement,i=t.children||"",r=t.className,o=t.components,s=t.disallowedElements,a=t.rehypePlugins||b$,l=t.remarkPlugins||b$,u=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...y$}:y$,c=t.skipHtml,d=t.unwrapDisallowed,h=t.urlTransform||dme,p=rme().use(Xfe).use(l).use(zpe,u).use(a),m=new B9;typeof i=="string"&&(m.value=i);for(const v of cme)Object.hasOwn(t,v.from)&&(""+v.from+(v.to?"use `"+v.to+"` instead":"remove it")+lme+v.id,void 0);const O=p.parse(m);let y=p.runSync(O,m);return r&&(y={type:"element",tagName:"div",properties:{className:r},children:y.type==="root"?y.children:[y]}),Tb(y,b),Pde(y,{Fragment:N.Fragment,components:o,ignoreInvalidStyle:!0,jsx:N.jsx,jsxs:N.jsxs,passKeys:!0,passNode:!0});function b(v,S,k){if(v.type==="raw"&&k&&typeof S=="number")return c?k.children.splice(S,1):k.children[S]={type:"text",value:v.value},S;if(v.type==="element"){let x;for(x in c1)if(Object.hasOwn(c1,x)&&Object.hasOwn(v.properties,x)){const _=v.properties[x],w=c1[x];(w===null||w.includes(v.tagName))&&(v.properties[x]=h(String(_||""),x,v))}}if(v.type==="element"){let x=e?!e.includes(v.tagName):s?s.includes(v.tagName):!1;if(!x&&n&&typeof S=="number"&&(x=!n(v,S,k)),x&&k&&typeof S=="number")return d&&v.children?k.children.splice(S,1,...v.children):k.children.splice(S,1),S}}}function dme(t){const e=t.indexOf(":"),n=t.indexOf("?"),i=t.indexOf("#"),r=t.indexOf("/");return e<0||r>-1&&e>r||n>-1&&e>n||i>-1&&e>i||ume.test(t.slice(0,e))?t:""}const v$=/[#.]/g;function hme(t,e){const n=t||"",i={};let r=0,o,s;for(;r-1&&oo)return{line:s+1,column:o-(s>0?n[s-1]:0)+1,offset:o}}}function r(o){const s=o&&o.line,a=o&&o.column;if(typeof s=="number"&&typeof a=="number"&&!Number.isNaN(s)&&!Number.isNaN(a)&&s-1 in n){const l=(n[s-2]||0)+a-1||0;if(l>-1&&l=55296&&t<=57343}function Bme(t){return t>=56320&&t<=57343}function Qme(t,e){return(t-55296)*1024+9216+e}function V9(t){return t!==32&&t!==10&&t!==13&&t!==9&&t!==12&&t>=1&&t<=31||t>=127&&t<=159}function j9(t){return t>=64976&&t<=65007||Dme.has(t)}var j;(function(t){t.controlCharacterInInputStream="control-character-in-input-stream",t.noncharacterInInputStream="noncharacter-in-input-stream",t.surrogateInInputStream="surrogate-in-input-stream",t.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",t.endTagWithAttributes="end-tag-with-attributes",t.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",t.unexpectedSolidusInTag="unexpected-solidus-in-tag",t.unexpectedNullCharacter="unexpected-null-character",t.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",t.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",t.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",t.missingEndTagName="missing-end-tag-name",t.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",t.unknownNamedCharacterReference="unknown-named-character-reference",t.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",t.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",t.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",t.eofBeforeTagName="eof-before-tag-name",t.eofInTag="eof-in-tag",t.missingAttributeValue="missing-attribute-value",t.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",t.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",t.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",t.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",t.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",t.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",t.missingDoctypePublicIdentifier="missing-doctype-public-identifier",t.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",t.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",t.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",t.cdataInHtmlContent="cdata-in-html-content",t.incorrectlyOpenedComment="incorrectly-opened-comment",t.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",t.eofInDoctype="eof-in-doctype",t.nestedComment="nested-comment",t.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",t.eofInComment="eof-in-comment",t.incorrectlyClosedComment="incorrectly-closed-comment",t.eofInCdata="eof-in-cdata",t.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",t.nullCharacterReference="null-character-reference",t.surrogateCharacterReference="surrogate-character-reference",t.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",t.controlCharacterReference="control-character-reference",t.noncharacterCharacterReference="noncharacter-character-reference",t.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",t.missingDoctypeName="missing-doctype-name",t.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",t.duplicateAttribute="duplicate-attribute",t.nonConformingDoctype="non-conforming-doctype",t.missingDoctype="missing-doctype",t.misplacedDoctype="misplaced-doctype",t.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",t.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",t.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",t.openElementsLeftAfterEof="open-elements-left-after-eof",t.abandonedHeadElementChild="abandoned-head-element-child",t.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",t.nestedNoscriptInHead="nested-noscript-in-head",t.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(j=j||(j={}));const Fme=65536;class zme{constructor(e){this.handler=e,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=Fme,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e){const{line:n,col:i,offset:r}=this;return{code:e,startLine:n,endLine:n,startCol:i,endCol:i,startOffset:r,endOffset:r}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(Bme(n))return this.pos++,this._addGap(),Qme(e,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,E.EOF;return this._err(j.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,n){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,n){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(e,this.pos);for(let i=0;i=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,E.EOF;const i=this.html.charCodeAt(n);return i===E.CARRIAGE_RETURN?E.LINE_FEED:i}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,E.EOF;let e=this.html.charCodeAt(this.pos);return e===E.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,E.LINE_FEED):e===E.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,W9(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===E.LINE_FEED||e===E.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){V9(e)?this._err(j.controlCharacterInInputStream):j9(e)&&this._err(j.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos=0;n--)if(t.attrs[n].name===e)return t.attrs[n].value;return null}const Ms=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(t=>t.charCodeAt(0))),Hme=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(t=>t.charCodeAt(0)));var S1;const Ume=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),Wme=(S1=String.fromCodePoint)!==null&&S1!==void 0?S1:function(t){let e="";return t>65535&&(t-=65536,e+=String.fromCharCode(t>>>10&1023|55296),t=56320|t&1023),e+=String.fromCharCode(t),e};function Vme(t){var e;return t>=55296&&t<=57343||t>1114111?65533:(e=Ume.get(t))!==null&&e!==void 0?e:t}var fn;(function(t){t[t.NUM=35]="NUM",t[t.SEMI=59]="SEMI",t[t.EQUALS=61]="EQUALS",t[t.ZERO=48]="ZERO",t[t.NINE=57]="NINE",t[t.LOWER_A=97]="LOWER_A",t[t.LOWER_F=102]="LOWER_F",t[t.LOWER_X=120]="LOWER_X",t[t.LOWER_Z=122]="LOWER_Z",t[t.UPPER_A=65]="UPPER_A",t[t.UPPER_F=70]="UPPER_F",t[t.UPPER_Z=90]="UPPER_Z"})(fn||(fn={}));const jme=32;var yo;(function(t){t[t.VALUE_LENGTH=49152]="VALUE_LENGTH",t[t.BRANCH_LENGTH=16256]="BRANCH_LENGTH",t[t.JUMP_TABLE=127]="JUMP_TABLE"})(yo||(yo={}));function kw(t){return t>=fn.ZERO&&t<=fn.NINE}function Xme(t){return t>=fn.UPPER_A&&t<=fn.UPPER_F||t>=fn.LOWER_A&&t<=fn.LOWER_F}function Zme(t){return t>=fn.UPPER_A&&t<=fn.UPPER_Z||t>=fn.LOWER_A&&t<=fn.LOWER_Z||kw(t)}function qme(t){return t===fn.EQUALS||Zme(t)}var dn;(function(t){t[t.EntityStart=0]="EntityStart",t[t.NumericStart=1]="NumericStart",t[t.NumericDecimal=2]="NumericDecimal",t[t.NumericHex=3]="NumericHex",t[t.NamedEntity=4]="NamedEntity"})(dn||(dn={}));var Bl;(function(t){t[t.Legacy=0]="Legacy",t[t.Strict=1]="Strict",t[t.Attribute=2]="Attribute"})(Bl||(Bl={}));class Yme{constructor(e,n,i){this.decodeTree=e,this.emitCodePoint=n,this.errors=i,this.state=dn.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Bl.Strict}startEntity(e){this.decodeMode=e,this.state=dn.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,n){switch(this.state){case dn.EntityStart:return e.charCodeAt(n)===fn.NUM?(this.state=dn.NumericStart,this.consumed+=1,this.stateNumericStart(e,n+1)):(this.state=dn.NamedEntity,this.stateNamedEntity(e,n));case dn.NumericStart:return this.stateNumericStart(e,n);case dn.NumericDecimal:return this.stateNumericDecimal(e,n);case dn.NumericHex:return this.stateNumericHex(e,n);case dn.NamedEntity:return this.stateNamedEntity(e,n)}}stateNumericStart(e,n){return n>=e.length?-1:(e.charCodeAt(n)|jme)===fn.LOWER_X?(this.state=dn.NumericHex,this.consumed+=1,this.stateNumericHex(e,n+1)):(this.state=dn.NumericDecimal,this.stateNumericDecimal(e,n))}addToNumericResult(e,n,i,r){if(n!==i){const o=i-n;this.result=this.result*Math.pow(r,o)+parseInt(e.substr(n,o),r),this.consumed+=o}}stateNumericHex(e,n){const i=n;for(;n>14;for(;n>14,o!==0){if(s===fn.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==Bl.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:n,decodeTree:i}=this,r=(i[n]&yo.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,r,this.consumed),(e=this.errors)===null||e===void 0||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,n,i){const{decodeTree:r}=this;return this.emitCodePoint(n===1?r[e]&~yo.VALUE_LENGTH:r[e+1],i),n===3&&this.emitCodePoint(r[e+2],i),i}end(){var e;switch(this.state){case dn.NamedEntity:return this.result!==0&&(this.decodeMode!==Bl.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case dn.NumericDecimal:return this.emitNumericEntity(0,2);case dn.NumericHex:return this.emitNumericEntity(0,3);case dn.NumericStart:return(e=this.errors)===null||e===void 0||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case dn.EntityStart:return 0}}}function Z9(t){let e="";const n=new Yme(t,i=>e+=Wme(i));return function(r,o){let s=0,a=0;for(;(a=r.indexOf("&",a))>=0;){e+=r.slice(s,a),n.startEntity(o);const u=n.write(r,a+1);if(u<0){s=a+n.end();break}s=a+u,a=u===0?s+1:s}const l=e+r.slice(s);return e="",l}}function q9(t,e,n,i){const r=(e&yo.BRANCH_LENGTH)>>7,o=e&yo.JUMP_TABLE;if(r===0)return o!==0&&i===o?n:-1;if(o){const l=i-o;return l<0||l>=r?-1:t[n+l]-1}let s=n,a=s+r-1;for(;s<=a;){const l=s+a>>>1,u=t[l];if(ui)a=l-1;else return t[l+r]}return-1}Z9(Ms);Z9(Hme);var q;(function(t){t.HTML="http://www.w3.org/1999/xhtml",t.MATHML="http://www.w3.org/1998/Math/MathML",t.SVG="http://www.w3.org/2000/svg",t.XLINK="http://www.w3.org/1999/xlink",t.XML="http://www.w3.org/XML/1998/namespace",t.XMLNS="http://www.w3.org/2000/xmlns/"})(q=q||(q={}));var ua;(function(t){t.TYPE="type",t.ACTION="action",t.ENCODING="encoding",t.PROMPT="prompt",t.NAME="name",t.COLOR="color",t.FACE="face",t.SIZE="size"})(ua=ua||(ua={}));var $i;(function(t){t.NO_QUIRKS="no-quirks",t.QUIRKS="quirks",t.LIMITED_QUIRKS="limited-quirks"})($i=$i||($i={}));var Q;(function(t){t.A="a",t.ADDRESS="address",t.ANNOTATION_XML="annotation-xml",t.APPLET="applet",t.AREA="area",t.ARTICLE="article",t.ASIDE="aside",t.B="b",t.BASE="base",t.BASEFONT="basefont",t.BGSOUND="bgsound",t.BIG="big",t.BLOCKQUOTE="blockquote",t.BODY="body",t.BR="br",t.BUTTON="button",t.CAPTION="caption",t.CENTER="center",t.CODE="code",t.COL="col",t.COLGROUP="colgroup",t.DD="dd",t.DESC="desc",t.DETAILS="details",t.DIALOG="dialog",t.DIR="dir",t.DIV="div",t.DL="dl",t.DT="dt",t.EM="em",t.EMBED="embed",t.FIELDSET="fieldset",t.FIGCAPTION="figcaption",t.FIGURE="figure",t.FONT="font",t.FOOTER="footer",t.FOREIGN_OBJECT="foreignObject",t.FORM="form",t.FRAME="frame",t.FRAMESET="frameset",t.H1="h1",t.H2="h2",t.H3="h3",t.H4="h4",t.H5="h5",t.H6="h6",t.HEAD="head",t.HEADER="header",t.HGROUP="hgroup",t.HR="hr",t.HTML="html",t.I="i",t.IMG="img",t.IMAGE="image",t.INPUT="input",t.IFRAME="iframe",t.KEYGEN="keygen",t.LABEL="label",t.LI="li",t.LINK="link",t.LISTING="listing",t.MAIN="main",t.MALIGNMARK="malignmark",t.MARQUEE="marquee",t.MATH="math",t.MENU="menu",t.META="meta",t.MGLYPH="mglyph",t.MI="mi",t.MO="mo",t.MN="mn",t.MS="ms",t.MTEXT="mtext",t.NAV="nav",t.NOBR="nobr",t.NOFRAMES="noframes",t.NOEMBED="noembed",t.NOSCRIPT="noscript",t.OBJECT="object",t.OL="ol",t.OPTGROUP="optgroup",t.OPTION="option",t.P="p",t.PARAM="param",t.PLAINTEXT="plaintext",t.PRE="pre",t.RB="rb",t.RP="rp",t.RT="rt",t.RTC="rtc",t.RUBY="ruby",t.S="s",t.SCRIPT="script",t.SECTION="section",t.SELECT="select",t.SOURCE="source",t.SMALL="small",t.SPAN="span",t.STRIKE="strike",t.STRONG="strong",t.STYLE="style",t.SUB="sub",t.SUMMARY="summary",t.SUP="sup",t.TABLE="table",t.TBODY="tbody",t.TEMPLATE="template",t.TEXTAREA="textarea",t.TFOOT="tfoot",t.TD="td",t.TH="th",t.THEAD="thead",t.TITLE="title",t.TR="tr",t.TRACK="track",t.TT="tt",t.U="u",t.UL="ul",t.SVG="svg",t.VAR="var",t.WBR="wbr",t.XMP="xmp"})(Q=Q||(Q={}));var g;(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.A=1]="A",t[t.ADDRESS=2]="ADDRESS",t[t.ANNOTATION_XML=3]="ANNOTATION_XML",t[t.APPLET=4]="APPLET",t[t.AREA=5]="AREA",t[t.ARTICLE=6]="ARTICLE",t[t.ASIDE=7]="ASIDE",t[t.B=8]="B",t[t.BASE=9]="BASE",t[t.BASEFONT=10]="BASEFONT",t[t.BGSOUND=11]="BGSOUND",t[t.BIG=12]="BIG",t[t.BLOCKQUOTE=13]="BLOCKQUOTE",t[t.BODY=14]="BODY",t[t.BR=15]="BR",t[t.BUTTON=16]="BUTTON",t[t.CAPTION=17]="CAPTION",t[t.CENTER=18]="CENTER",t[t.CODE=19]="CODE",t[t.COL=20]="COL",t[t.COLGROUP=21]="COLGROUP",t[t.DD=22]="DD",t[t.DESC=23]="DESC",t[t.DETAILS=24]="DETAILS",t[t.DIALOG=25]="DIALOG",t[t.DIR=26]="DIR",t[t.DIV=27]="DIV",t[t.DL=28]="DL",t[t.DT=29]="DT",t[t.EM=30]="EM",t[t.EMBED=31]="EMBED",t[t.FIELDSET=32]="FIELDSET",t[t.FIGCAPTION=33]="FIGCAPTION",t[t.FIGURE=34]="FIGURE",t[t.FONT=35]="FONT",t[t.FOOTER=36]="FOOTER",t[t.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",t[t.FORM=38]="FORM",t[t.FRAME=39]="FRAME",t[t.FRAMESET=40]="FRAMESET",t[t.H1=41]="H1",t[t.H2=42]="H2",t[t.H3=43]="H3",t[t.H4=44]="H4",t[t.H5=45]="H5",t[t.H6=46]="H6",t[t.HEAD=47]="HEAD",t[t.HEADER=48]="HEADER",t[t.HGROUP=49]="HGROUP",t[t.HR=50]="HR",t[t.HTML=51]="HTML",t[t.I=52]="I",t[t.IMG=53]="IMG",t[t.IMAGE=54]="IMAGE",t[t.INPUT=55]="INPUT",t[t.IFRAME=56]="IFRAME",t[t.KEYGEN=57]="KEYGEN",t[t.LABEL=58]="LABEL",t[t.LI=59]="LI",t[t.LINK=60]="LINK",t[t.LISTING=61]="LISTING",t[t.MAIN=62]="MAIN",t[t.MALIGNMARK=63]="MALIGNMARK",t[t.MARQUEE=64]="MARQUEE",t[t.MATH=65]="MATH",t[t.MENU=66]="MENU",t[t.META=67]="META",t[t.MGLYPH=68]="MGLYPH",t[t.MI=69]="MI",t[t.MO=70]="MO",t[t.MN=71]="MN",t[t.MS=72]="MS",t[t.MTEXT=73]="MTEXT",t[t.NAV=74]="NAV",t[t.NOBR=75]="NOBR",t[t.NOFRAMES=76]="NOFRAMES",t[t.NOEMBED=77]="NOEMBED",t[t.NOSCRIPT=78]="NOSCRIPT",t[t.OBJECT=79]="OBJECT",t[t.OL=80]="OL",t[t.OPTGROUP=81]="OPTGROUP",t[t.OPTION=82]="OPTION",t[t.P=83]="P",t[t.PARAM=84]="PARAM",t[t.PLAINTEXT=85]="PLAINTEXT",t[t.PRE=86]="PRE",t[t.RB=87]="RB",t[t.RP=88]="RP",t[t.RT=89]="RT",t[t.RTC=90]="RTC",t[t.RUBY=91]="RUBY",t[t.S=92]="S",t[t.SCRIPT=93]="SCRIPT",t[t.SECTION=94]="SECTION",t[t.SELECT=95]="SELECT",t[t.SOURCE=96]="SOURCE",t[t.SMALL=97]="SMALL",t[t.SPAN=98]="SPAN",t[t.STRIKE=99]="STRIKE",t[t.STRONG=100]="STRONG",t[t.STYLE=101]="STYLE",t[t.SUB=102]="SUB",t[t.SUMMARY=103]="SUMMARY",t[t.SUP=104]="SUP",t[t.TABLE=105]="TABLE",t[t.TBODY=106]="TBODY",t[t.TEMPLATE=107]="TEMPLATE",t[t.TEXTAREA=108]="TEXTAREA",t[t.TFOOT=109]="TFOOT",t[t.TD=110]="TD",t[t.TH=111]="TH",t[t.THEAD=112]="THEAD",t[t.TITLE=113]="TITLE",t[t.TR=114]="TR",t[t.TRACK=115]="TRACK",t[t.TT=116]="TT",t[t.U=117]="U",t[t.UL=118]="UL",t[t.SVG=119]="SVG",t[t.VAR=120]="VAR",t[t.WBR=121]="WBR",t[t.XMP=122]="XMP"})(g=g||(g={}));const Gme=new Map([[Q.A,g.A],[Q.ADDRESS,g.ADDRESS],[Q.ANNOTATION_XML,g.ANNOTATION_XML],[Q.APPLET,g.APPLET],[Q.AREA,g.AREA],[Q.ARTICLE,g.ARTICLE],[Q.ASIDE,g.ASIDE],[Q.B,g.B],[Q.BASE,g.BASE],[Q.BASEFONT,g.BASEFONT],[Q.BGSOUND,g.BGSOUND],[Q.BIG,g.BIG],[Q.BLOCKQUOTE,g.BLOCKQUOTE],[Q.BODY,g.BODY],[Q.BR,g.BR],[Q.BUTTON,g.BUTTON],[Q.CAPTION,g.CAPTION],[Q.CENTER,g.CENTER],[Q.CODE,g.CODE],[Q.COL,g.COL],[Q.COLGROUP,g.COLGROUP],[Q.DD,g.DD],[Q.DESC,g.DESC],[Q.DETAILS,g.DETAILS],[Q.DIALOG,g.DIALOG],[Q.DIR,g.DIR],[Q.DIV,g.DIV],[Q.DL,g.DL],[Q.DT,g.DT],[Q.EM,g.EM],[Q.EMBED,g.EMBED],[Q.FIELDSET,g.FIELDSET],[Q.FIGCAPTION,g.FIGCAPTION],[Q.FIGURE,g.FIGURE],[Q.FONT,g.FONT],[Q.FOOTER,g.FOOTER],[Q.FOREIGN_OBJECT,g.FOREIGN_OBJECT],[Q.FORM,g.FORM],[Q.FRAME,g.FRAME],[Q.FRAMESET,g.FRAMESET],[Q.H1,g.H1],[Q.H2,g.H2],[Q.H3,g.H3],[Q.H4,g.H4],[Q.H5,g.H5],[Q.H6,g.H6],[Q.HEAD,g.HEAD],[Q.HEADER,g.HEADER],[Q.HGROUP,g.HGROUP],[Q.HR,g.HR],[Q.HTML,g.HTML],[Q.I,g.I],[Q.IMG,g.IMG],[Q.IMAGE,g.IMAGE],[Q.INPUT,g.INPUT],[Q.IFRAME,g.IFRAME],[Q.KEYGEN,g.KEYGEN],[Q.LABEL,g.LABEL],[Q.LI,g.LI],[Q.LINK,g.LINK],[Q.LISTING,g.LISTING],[Q.MAIN,g.MAIN],[Q.MALIGNMARK,g.MALIGNMARK],[Q.MARQUEE,g.MARQUEE],[Q.MATH,g.MATH],[Q.MENU,g.MENU],[Q.META,g.META],[Q.MGLYPH,g.MGLYPH],[Q.MI,g.MI],[Q.MO,g.MO],[Q.MN,g.MN],[Q.MS,g.MS],[Q.MTEXT,g.MTEXT],[Q.NAV,g.NAV],[Q.NOBR,g.NOBR],[Q.NOFRAMES,g.NOFRAMES],[Q.NOEMBED,g.NOEMBED],[Q.NOSCRIPT,g.NOSCRIPT],[Q.OBJECT,g.OBJECT],[Q.OL,g.OL],[Q.OPTGROUP,g.OPTGROUP],[Q.OPTION,g.OPTION],[Q.P,g.P],[Q.PARAM,g.PARAM],[Q.PLAINTEXT,g.PLAINTEXT],[Q.PRE,g.PRE],[Q.RB,g.RB],[Q.RP,g.RP],[Q.RT,g.RT],[Q.RTC,g.RTC],[Q.RUBY,g.RUBY],[Q.S,g.S],[Q.SCRIPT,g.SCRIPT],[Q.SECTION,g.SECTION],[Q.SELECT,g.SELECT],[Q.SOURCE,g.SOURCE],[Q.SMALL,g.SMALL],[Q.SPAN,g.SPAN],[Q.STRIKE,g.STRIKE],[Q.STRONG,g.STRONG],[Q.STYLE,g.STYLE],[Q.SUB,g.SUB],[Q.SUMMARY,g.SUMMARY],[Q.SUP,g.SUP],[Q.TABLE,g.TABLE],[Q.TBODY,g.TBODY],[Q.TEMPLATE,g.TEMPLATE],[Q.TEXTAREA,g.TEXTAREA],[Q.TFOOT,g.TFOOT],[Q.TD,g.TD],[Q.TH,g.TH],[Q.THEAD,g.THEAD],[Q.TITLE,g.TITLE],[Q.TR,g.TR],[Q.TRACK,g.TRACK],[Q.TT,g.TT],[Q.U,g.U],[Q.UL,g.UL],[Q.SVG,g.SVG],[Q.VAR,g.VAR],[Q.WBR,g.WBR],[Q.XMP,g.XMP]]);function lh(t){var e;return(e=Gme.get(t))!==null&&e!==void 0?e:g.UNKNOWN}const J=g,Kme={[q.HTML]:new Set([J.ADDRESS,J.APPLET,J.AREA,J.ARTICLE,J.ASIDE,J.BASE,J.BASEFONT,J.BGSOUND,J.BLOCKQUOTE,J.BODY,J.BR,J.BUTTON,J.CAPTION,J.CENTER,J.COL,J.COLGROUP,J.DD,J.DETAILS,J.DIR,J.DIV,J.DL,J.DT,J.EMBED,J.FIELDSET,J.FIGCAPTION,J.FIGURE,J.FOOTER,J.FORM,J.FRAME,J.FRAMESET,J.H1,J.H2,J.H3,J.H4,J.H5,J.H6,J.HEAD,J.HEADER,J.HGROUP,J.HR,J.HTML,J.IFRAME,J.IMG,J.INPUT,J.LI,J.LINK,J.LISTING,J.MAIN,J.MARQUEE,J.MENU,J.META,J.NAV,J.NOEMBED,J.NOFRAMES,J.NOSCRIPT,J.OBJECT,J.OL,J.P,J.PARAM,J.PLAINTEXT,J.PRE,J.SCRIPT,J.SECTION,J.SELECT,J.SOURCE,J.STYLE,J.SUMMARY,J.TABLE,J.TBODY,J.TD,J.TEMPLATE,J.TEXTAREA,J.TFOOT,J.TH,J.THEAD,J.TITLE,J.TR,J.TRACK,J.UL,J.WBR,J.XMP]),[q.MATHML]:new Set([J.MI,J.MO,J.MN,J.MS,J.MTEXT,J.ANNOTATION_XML]),[q.SVG]:new Set([J.TITLE,J.FOREIGN_OBJECT,J.DESC]),[q.XLINK]:new Set,[q.XML]:new Set,[q.XMLNS]:new Set};function Y9(t){return t===J.H1||t===J.H2||t===J.H3||t===J.H4||t===J.H5||t===J.H6}Q.STYLE,Q.SCRIPT,Q.XMP,Q.IFRAME,Q.NOEMBED,Q.NOFRAMES,Q.PLAINTEXT;const Jme=new Map([[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);var P;(function(t){t[t.DATA=0]="DATA",t[t.RCDATA=1]="RCDATA",t[t.RAWTEXT=2]="RAWTEXT",t[t.SCRIPT_DATA=3]="SCRIPT_DATA",t[t.PLAINTEXT=4]="PLAINTEXT",t[t.TAG_OPEN=5]="TAG_OPEN",t[t.END_TAG_OPEN=6]="END_TAG_OPEN",t[t.TAG_NAME=7]="TAG_NAME",t[t.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",t[t.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",t[t.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",t[t.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",t[t.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",t[t.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",t[t.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",t[t.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",t[t.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",t[t.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",t[t.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",t[t.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",t[t.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",t[t.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",t[t.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",t[t.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",t[t.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",t[t.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",t[t.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",t[t.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",t[t.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",t[t.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",t[t.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",t[t.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",t[t.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",t[t.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",t[t.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",t[t.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",t[t.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",t[t.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",t[t.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",t[t.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",t[t.BOGUS_COMMENT=40]="BOGUS_COMMENT",t[t.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",t[t.COMMENT_START=42]="COMMENT_START",t[t.COMMENT_START_DASH=43]="COMMENT_START_DASH",t[t.COMMENT=44]="COMMENT",t[t.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",t[t.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",t[t.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",t[t.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",t[t.COMMENT_END_DASH=49]="COMMENT_END_DASH",t[t.COMMENT_END=50]="COMMENT_END",t[t.COMMENT_END_BANG=51]="COMMENT_END_BANG",t[t.DOCTYPE=52]="DOCTYPE",t[t.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",t[t.DOCTYPE_NAME=54]="DOCTYPE_NAME",t[t.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",t[t.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",t[t.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",t[t.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",t[t.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",t[t.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",t[t.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",t[t.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",t[t.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",t[t.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",t[t.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",t[t.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",t[t.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",t[t.CDATA_SECTION=68]="CDATA_SECTION",t[t.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",t[t.CDATA_SECTION_END=70]="CDATA_SECTION_END",t[t.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",t[t.NAMED_CHARACTER_REFERENCE=72]="NAMED_CHARACTER_REFERENCE",t[t.AMBIGUOUS_AMPERSAND=73]="AMBIGUOUS_AMPERSAND",t[t.NUMERIC_CHARACTER_REFERENCE=74]="NUMERIC_CHARACTER_REFERENCE",t[t.HEXADEMICAL_CHARACTER_REFERENCE_START=75]="HEXADEMICAL_CHARACTER_REFERENCE_START",t[t.HEXADEMICAL_CHARACTER_REFERENCE=76]="HEXADEMICAL_CHARACTER_REFERENCE",t[t.DECIMAL_CHARACTER_REFERENCE=77]="DECIMAL_CHARACTER_REFERENCE",t[t.NUMERIC_CHARACTER_REFERENCE_END=78]="NUMERIC_CHARACTER_REFERENCE_END"})(P||(P={}));const jt={DATA:P.DATA,RCDATA:P.RCDATA,RAWTEXT:P.RAWTEXT,SCRIPT_DATA:P.SCRIPT_DATA,PLAINTEXT:P.PLAINTEXT,CDATA_SECTION:P.CDATA_SECTION};function vf(t){return t>=E.DIGIT_0&&t<=E.DIGIT_9}function Kh(t){return t>=E.LATIN_CAPITAL_A&&t<=E.LATIN_CAPITAL_Z}function ege(t){return t>=E.LATIN_SMALL_A&&t<=E.LATIN_SMALL_Z}function Ds(t){return ege(t)||Kh(t)}function xw(t){return Ds(t)||vf(t)}function G9(t){return t>=E.LATIN_CAPITAL_A&&t<=E.LATIN_CAPITAL_F}function K9(t){return t>=E.LATIN_SMALL_A&&t<=E.LATIN_SMALL_F}function tge(t){return vf(t)||G9(t)||K9(t)}function mg(t){return t+32}function J9(t){return t===E.SPACE||t===E.LINE_FEED||t===E.TABULATION||t===E.FORM_FEED}function nge(t){return t===E.EQUALS_SIGN||xw(t)}function x$(t){return J9(t)||t===E.SOLIDUS||t===E.GREATER_THAN_SIGN}class ige{constructor(e,n){this.options=e,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=P.DATA,this.returnState=P.DATA,this.charRefCode=-1,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new zme(n),this.currentLocation=this.getCurrentLocation(-1)}_err(e){var n,i;(i=(n=this.handler).onParseError)===null||i===void 0||i.call(n,this.preprocessor.getError(e))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||e==null||e())}write(e,n,i){this.active=!0,this.preprocessor.write(e,n),this._runParsingLoop(),this.paused||i==null||i()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this._unconsume(this.consumedAfterSnapshot),this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_unconsume(e){this.consumedAfterSnapshot-=e,this.preprocessor.retreat(e)}_reconsumeInState(e,n){this.state=e,this._callState(n)}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let n=0;n0&&this._err(j.endTagWithAttributes),e.selfClosing&&this._err(j.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case We.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case We.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case We.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:We.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type!==e)this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();else{this.currentCharacterToken.chars+=n;return}this._createCharacterToken(e,n)}_emitCodePoint(e){const n=J9(e)?We.WHITESPACE_CHARACTER:e===E.NULL?We.NULL_CHARACTER:We.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(We.CHARACTER,e)}_matchNamedCharacterReference(e){let n=null,i=0,r=!1;for(let o=0,s=Ms[0];o>=0&&(o=q9(Ms,s,o+1,e),!(o<0));e=this._consume()){i+=1,s=Ms[o];const a=s&yo.VALUE_LENGTH;if(a){const l=(a>>14)-1;if(e!==E.SEMICOLON&&this._isCharacterReferenceInAttribute()&&nge(this.preprocessor.peek(1))?(n=[E.AMPERSAND],o+=l):(n=l===0?[Ms[o]&~yo.VALUE_LENGTH]:l===1?[Ms[++o]]:[Ms[++o],Ms[++o]],i=0,r=e!==E.SEMICOLON),l===0){this._consume();break}}}return this._unconsume(i),r&&!this.preprocessor.endOfChunkHit&&this._err(j.missingSemicolonAfterCharacterReference),this._unconsume(1),n}_isCharacterReferenceInAttribute(){return this.returnState===P.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===P.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===P.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case P.DATA:{this._stateData(e);break}case P.RCDATA:{this._stateRcdata(e);break}case P.RAWTEXT:{this._stateRawtext(e);break}case P.SCRIPT_DATA:{this._stateScriptData(e);break}case P.PLAINTEXT:{this._statePlaintext(e);break}case P.TAG_OPEN:{this._stateTagOpen(e);break}case P.END_TAG_OPEN:{this._stateEndTagOpen(e);break}case P.TAG_NAME:{this._stateTagName(e);break}case P.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(e);break}case P.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(e);break}case P.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(e);break}case P.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(e);break}case P.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(e);break}case P.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(e);break}case P.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(e);break}case P.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(e);break}case P.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(e);break}case P.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(e);break}case P.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(e);break}case P.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(e);break}case P.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(e);break}case P.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(e);break}case P.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(e);break}case P.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(e);break}case P.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(e);break}case P.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(e);break}case P.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(e);break}case P.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(e);break}case P.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(e);break}case P.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(e);break}case P.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(e);break}case P.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(e);break}case P.ATTRIBUTE_NAME:{this._stateAttributeName(e);break}case P.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(e);break}case P.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(e);break}case P.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(e);break}case P.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(e);break}case P.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(e);break}case P.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(e);break}case P.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(e);break}case P.BOGUS_COMMENT:{this._stateBogusComment(e);break}case P.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(e);break}case P.COMMENT_START:{this._stateCommentStart(e);break}case P.COMMENT_START_DASH:{this._stateCommentStartDash(e);break}case P.COMMENT:{this._stateComment(e);break}case P.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(e);break}case P.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(e);break}case P.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(e);break}case P.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(e);break}case P.COMMENT_END_DASH:{this._stateCommentEndDash(e);break}case P.COMMENT_END:{this._stateCommentEnd(e);break}case P.COMMENT_END_BANG:{this._stateCommentEndBang(e);break}case P.DOCTYPE:{this._stateDoctype(e);break}case P.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(e);break}case P.DOCTYPE_NAME:{this._stateDoctypeName(e);break}case P.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(e);break}case P.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(e);break}case P.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(e);break}case P.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(e);break}case P.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(e);break}case P.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(e);break}case P.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break}case P.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(e);break}case P.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(e);break}case P.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(e);break}case P.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(e);break}case P.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(e);break}case P.BOGUS_DOCTYPE:{this._stateBogusDoctype(e);break}case P.CDATA_SECTION:{this._stateCdataSection(e);break}case P.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(e);break}case P.CDATA_SECTION_END:{this._stateCdataSectionEnd(e);break}case P.CHARACTER_REFERENCE:{this._stateCharacterReference(e);break}case P.NAMED_CHARACTER_REFERENCE:{this._stateNamedCharacterReference(e);break}case P.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(e);break}case P.NUMERIC_CHARACTER_REFERENCE:{this._stateNumericCharacterReference(e);break}case P.HEXADEMICAL_CHARACTER_REFERENCE_START:{this._stateHexademicalCharacterReferenceStart(e);break}case P.HEXADEMICAL_CHARACTER_REFERENCE:{this._stateHexademicalCharacterReference(e);break}case P.DECIMAL_CHARACTER_REFERENCE:{this._stateDecimalCharacterReference(e);break}case P.NUMERIC_CHARACTER_REFERENCE_END:{this._stateNumericCharacterReferenceEnd(e);break}default:throw new Error("Unknown state")}}_stateData(e){switch(e){case E.LESS_THAN_SIGN:{this.state=P.TAG_OPEN;break}case E.AMPERSAND:{this.returnState=P.DATA,this.state=P.CHARACTER_REFERENCE;break}case E.NULL:{this._err(j.unexpectedNullCharacter),this._emitCodePoint(e);break}case E.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case E.AMPERSAND:{this.returnState=P.RCDATA,this.state=P.CHARACTER_REFERENCE;break}case E.LESS_THAN_SIGN:{this.state=P.RCDATA_LESS_THAN_SIGN;break}case E.NULL:{this._err(j.unexpectedNullCharacter),this._emitChars(Ct);break}case E.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case E.LESS_THAN_SIGN:{this.state=P.RAWTEXT_LESS_THAN_SIGN;break}case E.NULL:{this._err(j.unexpectedNullCharacter),this._emitChars(Ct);break}case E.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case E.LESS_THAN_SIGN:{this.state=P.SCRIPT_DATA_LESS_THAN_SIGN;break}case E.NULL:{this._err(j.unexpectedNullCharacter),this._emitChars(Ct);break}case E.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case E.NULL:{this._err(j.unexpectedNullCharacter),this._emitChars(Ct);break}case E.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateTagOpen(e){if(Ds(e))this._createStartTagToken(),this.state=P.TAG_NAME,this._stateTagName(e);else switch(e){case E.EXCLAMATION_MARK:{this.state=P.MARKUP_DECLARATION_OPEN;break}case E.SOLIDUS:{this.state=P.END_TAG_OPEN;break}case E.QUESTION_MARK:{this._err(j.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=P.BOGUS_COMMENT,this._stateBogusComment(e);break}case E.EOF:{this._err(j.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(j.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=P.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(Ds(e))this._createEndTagToken(),this.state=P.TAG_NAME,this._stateTagName(e);else switch(e){case E.GREATER_THAN_SIGN:{this._err(j.missingEndTagName),this.state=P.DATA;break}case E.EOF:{this._err(j.eofBeforeTagName),this._emitChars("");break}case E.NULL:{this._err(j.unexpectedNullCharacter),this.state=P.SCRIPT_DATA_ESCAPED,this._emitChars(Ct);break}case E.EOF:{this._err(j.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=P.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===E.SOLIDUS?this.state=P.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Ds(e)?(this._emitChars("<"),this.state=P.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars("<"),this.state=P.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){Ds(e)?(this.state=P.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars("");break}case E.NULL:{this._err(j.unexpectedNullCharacter),this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Ct);break}case E.EOF:{this._err(j.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===E.SOLIDUS?(this.state=P.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(li.SCRIPT,!1)&&x$(this.preprocessor.peek(li.SCRIPT.length))){this._emitCodePoint(e);for(let n=0;n1114111)this._err(j.characterReferenceOutsideUnicodeRange),this.charRefCode=E.REPLACEMENT_CHARACTER;else if(W9(this.charRefCode))this._err(j.surrogateCharacterReference),this.charRefCode=E.REPLACEMENT_CHARACTER;else if(j9(this.charRefCode))this._err(j.noncharacterCharacterReference);else if(V9(this.charRefCode)||this.charRefCode===E.CARRIAGE_RETURN){this._err(j.controlCharacterReference);const n=Jme.get(this.charRefCode);n!==void 0&&(this.charRefCode=n)}this._flushCodePointConsumedAsCharacterReference(this.charRefCode),this._reconsumeInState(this.returnState,e)}}const e7=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),_$=new Set([...e7,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),gg=new Map([[g.APPLET,q.HTML],[g.CAPTION,q.HTML],[g.HTML,q.HTML],[g.MARQUEE,q.HTML],[g.OBJECT,q.HTML],[g.TABLE,q.HTML],[g.TD,q.HTML],[g.TEMPLATE,q.HTML],[g.TH,q.HTML],[g.ANNOTATION_XML,q.MATHML],[g.MI,q.MATHML],[g.MN,q.MATHML],[g.MO,q.MATHML],[g.MS,q.MATHML],[g.MTEXT,q.MATHML],[g.DESC,q.SVG],[g.FOREIGN_OBJECT,q.SVG],[g.TITLE,q.SVG]]),rge=[g.H1,g.H2,g.H3,g.H4,g.H5,g.H6],oge=[g.TR,g.TEMPLATE,g.HTML],sge=[g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML],age=[g.TABLE,g.TEMPLATE,g.HTML],lge=[g.TD,g.TH];class uge{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,n,i){this.treeAdapter=n,this.handler=i,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=g.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===g.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===q.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,n){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,n,!0)}pop(){const e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,n){const i=this._indexOf(e);this.items[i]=n,i===this.stackTop&&(this.current=n)}insertAfter(e,n,i){const r=this._indexOf(e)+1;this.items.splice(r,0,n),this.tagIDs.splice(r,0,i),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(e,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==q.HTML);this.shortenToLength(n<0?0:n)}shortenToLength(e){for(;this.stackTop>=e;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop=0;i--)if(e.includes(this.tagIDs[i])&&this.treeAdapter.getNamespaceURI(this.items[i])===n)return i;return-1}clearBackTo(e,n){const i=this._indexOfTagNames(e,n);this.shortenToLength(i+1)}clearBackToTableContext(){this.clearBackTo(age,q.HTML)}clearBackToTableBodyContext(){this.clearBackTo(sge,q.HTML)}clearBackToTableRowContext(){this.clearBackTo(oge,q.HTML)}remove(e){const n=this._indexOf(e);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===g.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){const n=this._indexOf(e)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===g.HTML}hasInScope(e){for(let n=this.stackTop;n>=0;n--){const i=this.tagIDs[n],r=this.treeAdapter.getNamespaceURI(this.items[n]);if(i===e&&r===q.HTML)return!0;if(gg.get(i)===r)return!1}return!0}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){const n=this.tagIDs[e],i=this.treeAdapter.getNamespaceURI(this.items[e]);if(Y9(n)&&i===q.HTML)return!0;if(gg.get(n)===i)return!1}return!0}hasInListItemScope(e){for(let n=this.stackTop;n>=0;n--){const i=this.tagIDs[n],r=this.treeAdapter.getNamespaceURI(this.items[n]);if(i===e&&r===q.HTML)return!0;if((i===g.UL||i===g.OL)&&r===q.HTML||gg.get(i)===r)return!1}return!0}hasInButtonScope(e){for(let n=this.stackTop;n>=0;n--){const i=this.tagIDs[n],r=this.treeAdapter.getNamespaceURI(this.items[n]);if(i===e&&r===q.HTML)return!0;if(i===g.BUTTON&&r===q.HTML||gg.get(i)===r)return!1}return!0}hasInTableScope(e){for(let n=this.stackTop;n>=0;n--){const i=this.tagIDs[n];if(this.treeAdapter.getNamespaceURI(this.items[n])===q.HTML){if(i===e)return!0;if(i===g.TABLE||i===g.TEMPLATE||i===g.HTML)return!1}}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--){const n=this.tagIDs[e];if(this.treeAdapter.getNamespaceURI(this.items[e])===q.HTML){if(n===g.TBODY||n===g.THEAD||n===g.TFOOT)return!0;if(n===g.TABLE||n===g.HTML)return!1}}return!0}hasInSelectScope(e){for(let n=this.stackTop;n>=0;n--){const i=this.tagIDs[n];if(this.treeAdapter.getNamespaceURI(this.items[n])===q.HTML){if(i===e)return!0;if(i!==g.OPTION&&i!==g.OPTGROUP)return!1}}return!0}generateImpliedEndTags(){for(;e7.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;_$.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==e&&_$.has(this.currentTagId);)this.pop()}}const w1=3;var Ar;(function(t){t[t.Marker=0]="Marker",t[t.Element=1]="Element"})(Ar=Ar||(Ar={}));const E$={type:Ar.Marker};class cge{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,n){const i=[],r=n.length,o=this.treeAdapter.getTagName(e),s=this.treeAdapter.getNamespaceURI(e);for(let a=0;a[s.name,s.value]));let o=0;for(let s=0;sr.get(l.name)===l.value)&&(o+=1,o>=w1&&this.entries.splice(a.idx,1))}}insertMarker(){this.entries.unshift(E$)}pushElement(e,n){this._ensureNoahArkCondition(e),this.entries.unshift({type:Ar.Element,element:e,token:n})}insertElementAfterBookmark(e,n){const i=this.entries.indexOf(this.bookmark);this.entries.splice(i,0,{type:Ar.Element,element:e,token:n})}removeEntry(e){const n=this.entries.indexOf(e);n>=0&&this.entries.splice(n,1)}clearToLastMarker(){const e=this.entries.indexOf(E$);e>=0?this.entries.splice(0,e+1):this.entries.length=0}getElementEntryInScopeWithTagName(e){const n=this.entries.find(i=>i.type===Ar.Marker||this.treeAdapter.getTagName(i.element)===e);return n&&n.type===Ar.Element?n:null}getElementEntry(e){return this.entries.find(n=>n.type===Ar.Element&&n.element===e)}}function C$(t){return{nodeName:"#text",value:t,parentNode:null}}const vc={createDocument(){return{nodeName:"#document",mode:$i.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(t,e,n){return{nodeName:t,tagName:t,attrs:n,namespaceURI:e,childNodes:[],parentNode:null}},createCommentNode(t){return{nodeName:"#comment",data:t,parentNode:null}},appendChild(t,e){t.childNodes.push(e),e.parentNode=t},insertBefore(t,e,n){const i=t.childNodes.indexOf(n);t.childNodes.splice(i,0,e),e.parentNode=t},setTemplateContent(t,e){t.content=e},getTemplateContent(t){return t.content},setDocumentType(t,e,n,i){const r=t.childNodes.find(o=>o.nodeName==="#documentType");if(r)r.name=e,r.publicId=n,r.systemId=i;else{const o={nodeName:"#documentType",name:e,publicId:n,systemId:i,parentNode:null};vc.appendChild(t,o)}},setDocumentMode(t,e){t.mode=e},getDocumentMode(t){return t.mode},detachNode(t){if(t.parentNode){const e=t.parentNode.childNodes.indexOf(t);t.parentNode.childNodes.splice(e,1),t.parentNode=null}},insertText(t,e){if(t.childNodes.length>0){const n=t.childNodes[t.childNodes.length-1];if(vc.isTextNode(n)){n.value+=e;return}}vc.appendChild(t,C$(e))},insertTextBefore(t,e,n){const i=t.childNodes[t.childNodes.indexOf(n)-1];i&&vc.isTextNode(i)?i.value+=e:vc.insertBefore(t,C$(e),n)},adoptAttributes(t,e){const n=new Set(t.attrs.map(i=>i.name));for(let i=0;it.startsWith(n))}function gge(t){return t.name===t7&&t.publicId===null&&(t.systemId===null||t.systemId===dge)}function Oge(t){if(t.name!==t7)return $i.QUIRKS;const{systemId:e}=t;if(e&&e.toLowerCase()===hge)return $i.QUIRKS;let{publicId:n}=t;if(n!==null){if(n=n.toLowerCase(),pge.has(n))return $i.QUIRKS;let i=e===null?fge:n7;if(T$(n,i))return $i.QUIRKS;if(i=e===null?i7:mge,T$(n,i))return $i.LIMITED_QUIRKS}return $i.NO_QUIRKS}const P$={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},bge="definitionurl",yge="definitionURL",vge=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(t=>[t.toLowerCase(),t])),Sge=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:q.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:q.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:q.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:q.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:q.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:q.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:q.XLINK}],["xml:base",{prefix:"xml",name:"base",namespace:q.XML}],["xml:lang",{prefix:"xml",name:"lang",namespace:q.XML}],["xml:space",{prefix:"xml",name:"space",namespace:q.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:q.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:q.XMLNS}]]),wge=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(t=>[t.toLowerCase(),t])),kge=new Set([g.B,g.BIG,g.BLOCKQUOTE,g.BODY,g.BR,g.CENTER,g.CODE,g.DD,g.DIV,g.DL,g.DT,g.EM,g.EMBED,g.H1,g.H2,g.H3,g.H4,g.H5,g.H6,g.HEAD,g.HR,g.I,g.IMG,g.LI,g.LISTING,g.MENU,g.META,g.NOBR,g.OL,g.P,g.PRE,g.RUBY,g.S,g.SMALL,g.SPAN,g.STRONG,g.STRIKE,g.SUB,g.SUP,g.TABLE,g.TT,g.U,g.UL,g.VAR]);function xge(t){const e=t.tagID;return e===g.FONT&&t.attrs.some(({name:i})=>i===ua.COLOR||i===ua.SIZE||i===ua.FACE)||kge.has(e)}function r7(t){for(let e=0;e0&&this._setContextModes(e,n)}onItemPop(e,n){var i,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(r=(i=this.treeAdapter).onItemPop)===null||r===void 0||r.call(i,e,this.openElements.current),n){let o,s;this.openElements.stackTop===0&&this.fragmentContext?(o=this.fragmentContext,s=this.fragmentContextID):{current:o,currentTagId:s}=this.openElements,this._setContextModes(o,s)}}_setContextModes(e,n){const i=e===this.document||this.treeAdapter.getNamespaceURI(e)===q.HTML;this.currentNotInHTML=!i,this.tokenizer.inForeignNode=!i&&!this._isIntegrationPoint(n,e)}_switchToTextParsing(e,n){this._insertElement(e,q.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=$.TEXT}switchToPlaintextParsing(){this.insertionMode=$.TEXT,this.originalInsertionMode=$.IN_BODY,this.tokenizer.state=jt.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===Q.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==q.HTML))switch(this.fragmentContextID){case g.TITLE:case g.TEXTAREA:{this.tokenizer.state=jt.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=jt.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=jt.SCRIPT_DATA;break}case g.PLAINTEXT:{this.tokenizer.state=jt.PLAINTEXT;break}}}_setDocumentType(e){const n=e.name||"",i=e.publicId||"",r=e.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,i,r),e.location){const s=this.treeAdapter.getChildNodes(this.document).find(a=>this.treeAdapter.isDocumentTypeNode(a));s&&this.treeAdapter.setNodeSourceCodeLocation(s,e.location)}}_attachElementToTree(e,n){if(this.options.sourceCodeLocationInfo){const i=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(e,i)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{const i=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(i,e)}}_appendElement(e,n){const i=this.treeAdapter.createElement(e.tagName,n,e.attrs);this._attachElementToTree(i,e.location)}_insertElement(e,n){const i=this.treeAdapter.createElement(e.tagName,n,e.attrs);this._attachElementToTree(i,e.location),this.openElements.push(i,e.tagID)}_insertFakeElement(e,n){const i=this.treeAdapter.createElement(e,q.HTML,[]);this._attachElementToTree(i,null),this.openElements.push(i,n)}_insertTemplate(e){const n=this.treeAdapter.createElement(e.tagName,q.HTML,e.attrs),i=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,i),this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,null)}_insertFakeRootElement(){const e=this.treeAdapter.createElement(Q.HTML,q.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,g.HTML)}_appendCommentNode(e,n){const i=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(n,i),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}_insertCharacters(e){let n,i;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:i}=this._findFosterParentingLocation(),i?this.treeAdapter.insertTextBefore(n,e.chars,i):this.treeAdapter.insertText(n,e.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,e.chars)),!e.location)return;const r=this.treeAdapter.getChildNodes(n),o=i?r.lastIndexOf(i):r.length,s=r[o-1];if(this.treeAdapter.getNodeSourceCodeLocation(s)){const{endLine:l,endCol:u,endOffset:c}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:l,endCol:u,endOffset:c})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,e.location)}_adoptNodes(e,n){for(let i=this.treeAdapter.getFirstChild(e);i;i=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(i),this.treeAdapter.appendChild(n,i)}_setEndLocation(e,n){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&n.location){const i=n.location,r=this.treeAdapter.getTagName(e),o=n.type===We.END_TAG&&r===n.tagName?{endTag:{...i},endLine:i.endLine,endCol:i.endCol,endOffset:i.endOffset}:{endLine:i.startLine,endCol:i.startCol,endOffset:i.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,o)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let n,i;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,i=this.fragmentContextID):{current:n,currentTagId:i}=this.openElements,e.tagID===g.SVG&&this.treeAdapter.getTagName(n)===Q.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===q.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===g.MGLYPH||e.tagID===g.MALIGNMARK)&&!this._isIntegrationPoint(i,n,q.HTML)}_processToken(e){switch(e.type){case We.CHARACTER:{this.onCharacter(e);break}case We.NULL_CHARACTER:{this.onNullCharacter(e);break}case We.COMMENT:{this.onComment(e);break}case We.DOCTYPE:{this.onDoctype(e);break}case We.START_TAG:{this._processStartTag(e);break}case We.END_TAG:{this.onEndTag(e);break}case We.EOF:{this.onEof(e);break}case We.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(e);break}}}_isIntegrationPoint(e,n,i){const r=this.treeAdapter.getNamespaceURI(n),o=this.treeAdapter.getAttrList(n);return Tge(e,r,o,i)}_reconstructActiveFormattingElements(){const e=this.activeFormattingElements.entries.length;if(e){const n=this.activeFormattingElements.entries.findIndex(r=>r.type===Ar.Marker||this.openElements.contains(r.element)),i=n<0?e-1:n-1;for(let r=i;r>=0;r--){const o=this.activeFormattingElements.entries[r];this._insertElement(o.token,this.treeAdapter.getNamespaceURI(o.element)),o.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=$.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(g.P),this.openElements.popUntilTagNamePopped(g.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case g.TR:{this.insertionMode=$.IN_ROW;return}case g.TBODY:case g.THEAD:case g.TFOOT:{this.insertionMode=$.IN_TABLE_BODY;return}case g.CAPTION:{this.insertionMode=$.IN_CAPTION;return}case g.COLGROUP:{this.insertionMode=$.IN_COLUMN_GROUP;return}case g.TABLE:{this.insertionMode=$.IN_TABLE;return}case g.BODY:{this.insertionMode=$.IN_BODY;return}case g.FRAMESET:{this.insertionMode=$.IN_FRAMESET;return}case g.SELECT:{this._resetInsertionModeForSelect(e);return}case g.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case g.HTML:{this.insertionMode=this.headElement?$.AFTER_HEAD:$.BEFORE_HEAD;return}case g.TD:case g.TH:{if(e>0){this.insertionMode=$.IN_CELL;return}break}case g.HEAD:{if(e>0){this.insertionMode=$.IN_HEAD;return}break}}this.insertionMode=$.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let n=e-1;n>0;n--){const i=this.openElements.tagIDs[n];if(i===g.TEMPLATE)break;if(i===g.TABLE){this.insertionMode=$.IN_SELECT_IN_TABLE;return}}this.insertionMode=$.IN_SELECT}_isElementCausesFosterParenting(e){return s7.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){const n=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case g.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===q.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case g.TABLE:{const i=this.treeAdapter.getParentNode(n);return i?{parent:i,beforeElement:n}:{parent:this.openElements.items[e-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,e,n.beforeElement):this.treeAdapter.appendChild(n.parent,e)}_isSpecialElement(e,n){const i=this.treeAdapter.getNamespaceURI(e);return Kme[i].has(n)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){lOe(this,e);return}switch(this.insertionMode){case $.INITIAL:{Qh(this,e);break}case $.BEFORE_HTML:{Sf(this,e);break}case $.BEFORE_HEAD:{wf(this,e);break}case $.IN_HEAD:{kf(this,e);break}case $.IN_HEAD_NO_SCRIPT:{xf(this,e);break}case $.AFTER_HEAD:{_f(this,e);break}case $.IN_BODY:case $.IN_CAPTION:case $.IN_CELL:case $.IN_TEMPLATE:{l7(this,e);break}case $.TEXT:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:{this._insertCharacters(e);break}case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:{k1(this,e);break}case $.IN_TABLE_TEXT:{p7(this,e);break}case $.IN_COLUMN_GROUP:{OO(this,e);break}case $.AFTER_BODY:{bO(this,e);break}case $.AFTER_AFTER_BODY:{e0(this,e);break}}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){aOe(this,e);return}switch(this.insertionMode){case $.INITIAL:{Qh(this,e);break}case $.BEFORE_HTML:{Sf(this,e);break}case $.BEFORE_HEAD:{wf(this,e);break}case $.IN_HEAD:{kf(this,e);break}case $.IN_HEAD_NO_SCRIPT:{xf(this,e);break}case $.AFTER_HEAD:{_f(this,e);break}case $.TEXT:{this._insertCharacters(e);break}case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:{k1(this,e);break}case $.IN_COLUMN_GROUP:{OO(this,e);break}case $.AFTER_BODY:{bO(this,e);break}case $.AFTER_AFTER_BODY:{e0(this,e);break}}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){_w(this,e);return}switch(this.insertionMode){case $.INITIAL:case $.BEFORE_HTML:case $.BEFORE_HEAD:case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:case $.IN_BODY:case $.IN_TABLE:case $.IN_CAPTION:case $.IN_COLUMN_GROUP:case $.IN_TABLE_BODY:case $.IN_ROW:case $.IN_CELL:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:case $.IN_TEMPLATE:case $.IN_FRAMESET:case $.AFTER_FRAMESET:{_w(this,e);break}case $.IN_TABLE_TEXT:{Fh(this,e);break}case $.AFTER_BODY:{Qge(this,e);break}case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:{Fge(this,e);break}}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case $.INITIAL:{zge(this,e);break}case $.BEFORE_HEAD:case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:{this._err(e,j.misplacedDoctype);break}case $.IN_TABLE_TEXT:{Fh(this,e);break}}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,j.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?uOe(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case $.INITIAL:{Qh(this,e);break}case $.BEFORE_HTML:{Hge(this,e);break}case $.BEFORE_HEAD:{Wge(this,e);break}case $.IN_HEAD:{Zr(this,e);break}case $.IN_HEAD_NO_SCRIPT:{Xge(this,e);break}case $.AFTER_HEAD:{qge(this,e);break}case $.IN_BODY:{Wn(this,e);break}case $.IN_TABLE:{Cd(this,e);break}case $.IN_TABLE_TEXT:{Fh(this,e);break}case $.IN_CAPTION:{V0e(this,e);break}case $.IN_COLUMN_GROUP:{y_(this,e);break}case $.IN_TABLE_BODY:{Ib(this,e);break}case $.IN_ROW:{$b(this,e);break}case $.IN_CELL:{Z0e(this,e);break}case $.IN_SELECT:{O7(this,e);break}case $.IN_SELECT_IN_TABLE:{Y0e(this,e);break}case $.IN_TEMPLATE:{K0e(this,e);break}case $.AFTER_BODY:{eOe(this,e);break}case $.IN_FRAMESET:{tOe(this,e);break}case $.AFTER_FRAMESET:{iOe(this,e);break}case $.AFTER_AFTER_BODY:{oOe(this,e);break}case $.AFTER_AFTER_FRAMESET:{sOe(this,e);break}}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?cOe(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case $.INITIAL:{Qh(this,e);break}case $.BEFORE_HTML:{Uge(this,e);break}case $.BEFORE_HEAD:{Vge(this,e);break}case $.IN_HEAD:{jge(this,e);break}case $.IN_HEAD_NO_SCRIPT:{Zge(this,e);break}case $.AFTER_HEAD:{Yge(this,e);break}case $.IN_BODY:{Rb(this,e);break}case $.TEXT:{N0e(this,e);break}case $.IN_TABLE:{Sp(this,e);break}case $.IN_TABLE_TEXT:{Fh(this,e);break}case $.IN_CAPTION:{j0e(this,e);break}case $.IN_COLUMN_GROUP:{X0e(this,e);break}case $.IN_TABLE_BODY:{Ew(this,e);break}case $.IN_ROW:{g7(this,e);break}case $.IN_CELL:{q0e(this,e);break}case $.IN_SELECT:{b7(this,e);break}case $.IN_SELECT_IN_TABLE:{G0e(this,e);break}case $.IN_TEMPLATE:{J0e(this,e);break}case $.AFTER_BODY:{v7(this,e);break}case $.IN_FRAMESET:{nOe(this,e);break}case $.AFTER_FRAMESET:{rOe(this,e);break}case $.AFTER_AFTER_BODY:{e0(this,e);break}}}onEof(e){switch(this.insertionMode){case $.INITIAL:{Qh(this,e);break}case $.BEFORE_HTML:{Sf(this,e);break}case $.BEFORE_HEAD:{wf(this,e);break}case $.IN_HEAD:{kf(this,e);break}case $.IN_HEAD_NO_SCRIPT:{xf(this,e);break}case $.AFTER_HEAD:{_f(this,e);break}case $.IN_BODY:case $.IN_TABLE:case $.IN_CAPTION:case $.IN_COLUMN_GROUP:case $.IN_TABLE_BODY:case $.IN_ROW:case $.IN_CELL:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:{h7(this,e);break}case $.TEXT:{M0e(this,e);break}case $.IN_TABLE_TEXT:{Fh(this,e);break}case $.IN_TEMPLATE:{y7(this,e);break}case $.AFTER_BODY:case $.IN_FRAMESET:case $.AFTER_FRAMESET:case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:{b_(this,e);break}}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===E.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(e);return}switch(this.insertionMode){case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:case $.TEXT:case $.IN_COLUMN_GROUP:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:case $.IN_FRAMESET:case $.AFTER_FRAMESET:{this._insertCharacters(e);break}case $.IN_BODY:case $.IN_CAPTION:case $.IN_CELL:case $.IN_TEMPLATE:case $.AFTER_BODY:case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:{a7(this,e);break}case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:{k1(this,e);break}case $.IN_TABLE_TEXT:{f7(this,e);break}}}}function $ge(t,e){let n=t.activeFormattingElements.getElementEntryInScopeWithTagName(e.tagName);return n?t.openElements.contains(n.element)?t.openElements.hasInScope(e.tagID)||(n=null):(t.activeFormattingElements.removeEntry(n),n=null):d7(t,e),n}function Lge(t,e){let n=null,i=t.openElements.stackTop;for(;i>=0;i--){const r=t.openElements.items[i];if(r===e.element)break;t._isSpecialElement(r,t.openElements.tagIDs[i])&&(n=r)}return n||(t.openElements.shortenToLength(i<0?0:i),t.activeFormattingElements.removeEntry(e)),n}function Nge(t,e,n){let i=e,r=t.openElements.getCommonAncestor(e);for(let o=0,s=r;s!==n;o++,s=r){r=t.openElements.getCommonAncestor(s);const a=t.activeFormattingElements.getElementEntry(s),l=a&&o>=Rge;!a||l?(l&&t.activeFormattingElements.removeEntry(a),t.openElements.remove(s)):(s=Mge(t,a),i===e&&(t.activeFormattingElements.bookmark=a),t.treeAdapter.detachNode(i),t.treeAdapter.appendChild(s,i),i=s)}return i}function Mge(t,e){const n=t.treeAdapter.getNamespaceURI(e.element),i=t.treeAdapter.createElement(e.token.tagName,n,e.token.attrs);return t.openElements.replace(e.element,i),e.element=i,i}function Dge(t,e,n){const i=t.treeAdapter.getTagName(e),r=lh(i);if(t._isElementCausesFosterParenting(r))t._fosterParentElement(n);else{const o=t.treeAdapter.getNamespaceURI(e);r===g.TEMPLATE&&o===q.HTML&&(e=t.treeAdapter.getTemplateContent(e)),t.treeAdapter.appendChild(e,n)}}function Bge(t,e,n){const i=t.treeAdapter.getNamespaceURI(n.element),{token:r}=n,o=t.treeAdapter.createElement(r.tagName,i,r.attrs);t._adoptNodes(e,o),t.treeAdapter.appendChild(e,o),t.activeFormattingElements.insertElementAfterBookmark(o,r),t.activeFormattingElements.removeEntry(n),t.openElements.remove(n.element),t.openElements.insertAfter(e,o,r.tagID)}function O_(t,e){for(let n=0;n=n;i--)t._setEndLocation(t.openElements.items[i],e);if(!t.fragmentContext&&t.openElements.stackTop>=0){const i=t.openElements.items[0],r=t.treeAdapter.getNodeSourceCodeLocation(i);if(r&&!r.endTag&&(t._setEndLocation(i,e),t.openElements.stackTop>=1)){const o=t.openElements.items[1],s=t.treeAdapter.getNodeSourceCodeLocation(o);s&&!s.endTag&&t._setEndLocation(o,e)}}}}function zge(t,e){t._setDocumentType(e);const n=e.forceQuirks?$i.QUIRKS:Oge(e);gge(e)||t._err(e,j.nonConformingDoctype),t.treeAdapter.setDocumentMode(t.document,n),t.insertionMode=$.BEFORE_HTML}function Qh(t,e){t._err(e,j.missingDoctype,!0),t.treeAdapter.setDocumentMode(t.document,$i.QUIRKS),t.insertionMode=$.BEFORE_HTML,t._processToken(e)}function Hge(t,e){e.tagID===g.HTML?(t._insertElement(e,q.HTML),t.insertionMode=$.BEFORE_HEAD):Sf(t,e)}function Uge(t,e){const n=e.tagID;(n===g.HTML||n===g.HEAD||n===g.BODY||n===g.BR)&&Sf(t,e)}function Sf(t,e){t._insertFakeRootElement(),t.insertionMode=$.BEFORE_HEAD,t._processToken(e)}function Wge(t,e){switch(e.tagID){case g.HTML:{Wn(t,e);break}case g.HEAD:{t._insertElement(e,q.HTML),t.headElement=t.openElements.current,t.insertionMode=$.IN_HEAD;break}default:wf(t,e)}}function Vge(t,e){const n=e.tagID;n===g.HEAD||n===g.BODY||n===g.HTML||n===g.BR?wf(t,e):t._err(e,j.endTagWithoutMatchingOpenElement)}function wf(t,e){t._insertFakeElement(Q.HEAD,g.HEAD),t.headElement=t.openElements.current,t.insertionMode=$.IN_HEAD,t._processToken(e)}function Zr(t,e){switch(e.tagID){case g.HTML:{Wn(t,e);break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:{t._appendElement(e,q.HTML),e.ackSelfClosing=!0;break}case g.TITLE:{t._switchToTextParsing(e,jt.RCDATA);break}case g.NOSCRIPT:{t.options.scriptingEnabled?t._switchToTextParsing(e,jt.RAWTEXT):(t._insertElement(e,q.HTML),t.insertionMode=$.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{t._switchToTextParsing(e,jt.RAWTEXT);break}case g.SCRIPT:{t._switchToTextParsing(e,jt.SCRIPT_DATA);break}case g.TEMPLATE:{t._insertTemplate(e),t.activeFormattingElements.insertMarker(),t.framesetOk=!1,t.insertionMode=$.IN_TEMPLATE,t.tmplInsertionModeStack.unshift($.IN_TEMPLATE);break}case g.HEAD:{t._err(e,j.misplacedStartTagForHeadElement);break}default:kf(t,e)}}function jge(t,e){switch(e.tagID){case g.HEAD:{t.openElements.pop(),t.insertionMode=$.AFTER_HEAD;break}case g.BODY:case g.BR:case g.HTML:{kf(t,e);break}case g.TEMPLATE:{Mu(t,e);break}default:t._err(e,j.endTagWithoutMatchingOpenElement)}}function Mu(t,e){t.openElements.tmplCount>0?(t.openElements.generateImpliedEndTagsThoroughly(),t.openElements.currentTagId!==g.TEMPLATE&&t._err(e,j.closingOfElementWithOpenChildElements),t.openElements.popUntilTagNamePopped(g.TEMPLATE),t.activeFormattingElements.clearToLastMarker(),t.tmplInsertionModeStack.shift(),t._resetInsertionMode()):t._err(e,j.endTagWithoutMatchingOpenElement)}function kf(t,e){t.openElements.pop(),t.insertionMode=$.AFTER_HEAD,t._processToken(e)}function Xge(t,e){switch(e.tagID){case g.HTML:{Wn(t,e);break}case g.BASEFONT:case g.BGSOUND:case g.HEAD:case g.LINK:case g.META:case g.NOFRAMES:case g.STYLE:{Zr(t,e);break}case g.NOSCRIPT:{t._err(e,j.nestedNoscriptInHead);break}default:xf(t,e)}}function Zge(t,e){switch(e.tagID){case g.NOSCRIPT:{t.openElements.pop(),t.insertionMode=$.IN_HEAD;break}case g.BR:{xf(t,e);break}default:t._err(e,j.endTagWithoutMatchingOpenElement)}}function xf(t,e){const n=e.type===We.EOF?j.openElementsLeftAfterEof:j.disallowedContentInNoscriptInHead;t._err(e,n),t.openElements.pop(),t.insertionMode=$.IN_HEAD,t._processToken(e)}function qge(t,e){switch(e.tagID){case g.HTML:{Wn(t,e);break}case g.BODY:{t._insertElement(e,q.HTML),t.framesetOk=!1,t.insertionMode=$.IN_BODY;break}case g.FRAMESET:{t._insertElement(e,q.HTML),t.insertionMode=$.IN_FRAMESET;break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{t._err(e,j.abandonedHeadElementChild),t.openElements.push(t.headElement,g.HEAD),Zr(t,e),t.openElements.remove(t.headElement);break}case g.HEAD:{t._err(e,j.misplacedStartTagForHeadElement);break}default:_f(t,e)}}function Yge(t,e){switch(e.tagID){case g.BODY:case g.HTML:case g.BR:{_f(t,e);break}case g.TEMPLATE:{Mu(t,e);break}default:t._err(e,j.endTagWithoutMatchingOpenElement)}}function _f(t,e){t._insertFakeElement(Q.BODY,g.BODY),t.insertionMode=$.IN_BODY,Ab(t,e)}function Ab(t,e){switch(e.type){case We.CHARACTER:{l7(t,e);break}case We.WHITESPACE_CHARACTER:{a7(t,e);break}case We.COMMENT:{_w(t,e);break}case We.START_TAG:{Wn(t,e);break}case We.END_TAG:{Rb(t,e);break}case We.EOF:{h7(t,e);break}}}function a7(t,e){t._reconstructActiveFormattingElements(),t._insertCharacters(e)}function l7(t,e){t._reconstructActiveFormattingElements(),t._insertCharacters(e),t.framesetOk=!1}function Gge(t,e){t.openElements.tmplCount===0&&t.treeAdapter.adoptAttributes(t.openElements.items[0],e.attrs)}function Kge(t,e){const n=t.openElements.tryPeekProperlyNestedBodyElement();n&&t.openElements.tmplCount===0&&(t.framesetOk=!1,t.treeAdapter.adoptAttributes(n,e.attrs))}function Jge(t,e){const n=t.openElements.tryPeekProperlyNestedBodyElement();t.framesetOk&&n&&(t.treeAdapter.detachNode(n),t.openElements.popAllUpToHtmlElement(),t._insertElement(e,q.HTML),t.insertionMode=$.IN_FRAMESET)}function e0e(t,e){t.openElements.hasInButtonScope(g.P)&&t._closePElement(),t._insertElement(e,q.HTML)}function t0e(t,e){t.openElements.hasInButtonScope(g.P)&&t._closePElement(),Y9(t.openElements.currentTagId)&&t.openElements.pop(),t._insertElement(e,q.HTML)}function n0e(t,e){t.openElements.hasInButtonScope(g.P)&&t._closePElement(),t._insertElement(e,q.HTML),t.skipNextNewLine=!0,t.framesetOk=!1}function i0e(t,e){const n=t.openElements.tmplCount>0;(!t.formElement||n)&&(t.openElements.hasInButtonScope(g.P)&&t._closePElement(),t._insertElement(e,q.HTML),n||(t.formElement=t.openElements.current))}function r0e(t,e){t.framesetOk=!1;const n=e.tagID;for(let i=t.openElements.stackTop;i>=0;i--){const r=t.openElements.tagIDs[i];if(n===g.LI&&r===g.LI||(n===g.DD||n===g.DT)&&(r===g.DD||r===g.DT)){t.openElements.generateImpliedEndTagsWithExclusion(r),t.openElements.popUntilTagNamePopped(r);break}if(r!==g.ADDRESS&&r!==g.DIV&&r!==g.P&&t._isSpecialElement(t.openElements.items[i],r))break}t.openElements.hasInButtonScope(g.P)&&t._closePElement(),t._insertElement(e,q.HTML)}function o0e(t,e){t.openElements.hasInButtonScope(g.P)&&t._closePElement(),t._insertElement(e,q.HTML),t.tokenizer.state=jt.PLAINTEXT}function s0e(t,e){t.openElements.hasInScope(g.BUTTON)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(g.BUTTON)),t._reconstructActiveFormattingElements(),t._insertElement(e,q.HTML),t.framesetOk=!1}function a0e(t,e){const n=t.activeFormattingElements.getElementEntryInScopeWithTagName(Q.A);n&&(O_(t,e),t.openElements.remove(n.element),t.activeFormattingElements.removeEntry(n)),t._reconstructActiveFormattingElements(),t._insertElement(e,q.HTML),t.activeFormattingElements.pushElement(t.openElements.current,e)}function l0e(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,q.HTML),t.activeFormattingElements.pushElement(t.openElements.current,e)}function u0e(t,e){t._reconstructActiveFormattingElements(),t.openElements.hasInScope(g.NOBR)&&(O_(t,e),t._reconstructActiveFormattingElements()),t._insertElement(e,q.HTML),t.activeFormattingElements.pushElement(t.openElements.current,e)}function c0e(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,q.HTML),t.activeFormattingElements.insertMarker(),t.framesetOk=!1}function d0e(t,e){t.treeAdapter.getDocumentMode(t.document)!==$i.QUIRKS&&t.openElements.hasInButtonScope(g.P)&&t._closePElement(),t._insertElement(e,q.HTML),t.framesetOk=!1,t.insertionMode=$.IN_TABLE}function u7(t,e){t._reconstructActiveFormattingElements(),t._appendElement(e,q.HTML),t.framesetOk=!1,e.ackSelfClosing=!0}function c7(t){const e=X9(t,ua.TYPE);return e!=null&&e.toLowerCase()===Pge}function h0e(t,e){t._reconstructActiveFormattingElements(),t._appendElement(e,q.HTML),c7(e)||(t.framesetOk=!1),e.ackSelfClosing=!0}function f0e(t,e){t._appendElement(e,q.HTML),e.ackSelfClosing=!0}function p0e(t,e){t.openElements.hasInButtonScope(g.P)&&t._closePElement(),t._appendElement(e,q.HTML),t.framesetOk=!1,e.ackSelfClosing=!0}function m0e(t,e){e.tagName=Q.IMG,e.tagID=g.IMG,u7(t,e)}function g0e(t,e){t._insertElement(e,q.HTML),t.skipNextNewLine=!0,t.tokenizer.state=jt.RCDATA,t.originalInsertionMode=t.insertionMode,t.framesetOk=!1,t.insertionMode=$.TEXT}function O0e(t,e){t.openElements.hasInButtonScope(g.P)&&t._closePElement(),t._reconstructActiveFormattingElements(),t.framesetOk=!1,t._switchToTextParsing(e,jt.RAWTEXT)}function b0e(t,e){t.framesetOk=!1,t._switchToTextParsing(e,jt.RAWTEXT)}function I$(t,e){t._switchToTextParsing(e,jt.RAWTEXT)}function y0e(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,q.HTML),t.framesetOk=!1,t.insertionMode=t.insertionMode===$.IN_TABLE||t.insertionMode===$.IN_CAPTION||t.insertionMode===$.IN_TABLE_BODY||t.insertionMode===$.IN_ROW||t.insertionMode===$.IN_CELL?$.IN_SELECT_IN_TABLE:$.IN_SELECT}function v0e(t,e){t.openElements.currentTagId===g.OPTION&&t.openElements.pop(),t._reconstructActiveFormattingElements(),t._insertElement(e,q.HTML)}function S0e(t,e){t.openElements.hasInScope(g.RUBY)&&t.openElements.generateImpliedEndTags(),t._insertElement(e,q.HTML)}function w0e(t,e){t.openElements.hasInScope(g.RUBY)&&t.openElements.generateImpliedEndTagsWithExclusion(g.RTC),t._insertElement(e,q.HTML)}function k0e(t,e){t._reconstructActiveFormattingElements(),r7(e),g_(e),e.selfClosing?t._appendElement(e,q.MATHML):t._insertElement(e,q.MATHML),e.ackSelfClosing=!0}function x0e(t,e){t._reconstructActiveFormattingElements(),o7(e),g_(e),e.selfClosing?t._appendElement(e,q.SVG):t._insertElement(e,q.SVG),e.ackSelfClosing=!0}function $$(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,q.HTML)}function Wn(t,e){switch(e.tagID){case g.I:case g.S:case g.B:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.SMALL:case g.STRIKE:case g.STRONG:{l0e(t,e);break}case g.A:{a0e(t,e);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{t0e(t,e);break}case g.P:case g.DL:case g.OL:case g.UL:case g.DIV:case g.DIR:case g.NAV:case g.MAIN:case g.MENU:case g.ASIDE:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.DETAILS:case g.ADDRESS:case g.ARTICLE:case g.SECTION:case g.SUMMARY:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{e0e(t,e);break}case g.LI:case g.DD:case g.DT:{r0e(t,e);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{u7(t,e);break}case g.HR:{p0e(t,e);break}case g.RB:case g.RTC:{S0e(t,e);break}case g.RT:case g.RP:{w0e(t,e);break}case g.PRE:case g.LISTING:{n0e(t,e);break}case g.XMP:{O0e(t,e);break}case g.SVG:{x0e(t,e);break}case g.HTML:{Gge(t,e);break}case g.BASE:case g.LINK:case g.META:case g.STYLE:case g.TITLE:case g.SCRIPT:case g.BGSOUND:case g.BASEFONT:case g.TEMPLATE:{Zr(t,e);break}case g.BODY:{Kge(t,e);break}case g.FORM:{i0e(t,e);break}case g.NOBR:{u0e(t,e);break}case g.MATH:{k0e(t,e);break}case g.TABLE:{d0e(t,e);break}case g.INPUT:{h0e(t,e);break}case g.PARAM:case g.TRACK:case g.SOURCE:{f0e(t,e);break}case g.IMAGE:{m0e(t,e);break}case g.BUTTON:{s0e(t,e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{c0e(t,e);break}case g.IFRAME:{b0e(t,e);break}case g.SELECT:{y0e(t,e);break}case g.OPTION:case g.OPTGROUP:{v0e(t,e);break}case g.NOEMBED:{I$(t,e);break}case g.FRAMESET:{Jge(t,e);break}case g.TEXTAREA:{g0e(t,e);break}case g.NOSCRIPT:{t.options.scriptingEnabled?I$(t,e):$$(t,e);break}case g.PLAINTEXT:{o0e(t,e);break}case g.COL:case g.TH:case g.TD:case g.TR:case g.HEAD:case g.FRAME:case g.TBODY:case g.TFOOT:case g.THEAD:case g.CAPTION:case g.COLGROUP:break;default:$$(t,e)}}function _0e(t,e){if(t.openElements.hasInScope(g.BODY)&&(t.insertionMode=$.AFTER_BODY,t.options.sourceCodeLocationInfo)){const n=t.openElements.tryPeekProperlyNestedBodyElement();n&&t._setEndLocation(n,e)}}function E0e(t,e){t.openElements.hasInScope(g.BODY)&&(t.insertionMode=$.AFTER_BODY,v7(t,e))}function C0e(t,e){const n=e.tagID;t.openElements.hasInScope(n)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(n))}function T0e(t){const e=t.openElements.tmplCount>0,{formElement:n}=t;e||(t.formElement=null),(n||e)&&t.openElements.hasInScope(g.FORM)&&(t.openElements.generateImpliedEndTags(),e?t.openElements.popUntilTagNamePopped(g.FORM):n&&t.openElements.remove(n))}function P0e(t){t.openElements.hasInButtonScope(g.P)||t._insertFakeElement(Q.P,g.P),t._closePElement()}function A0e(t){t.openElements.hasInListItemScope(g.LI)&&(t.openElements.generateImpliedEndTagsWithExclusion(g.LI),t.openElements.popUntilTagNamePopped(g.LI))}function R0e(t,e){const n=e.tagID;t.openElements.hasInScope(n)&&(t.openElements.generateImpliedEndTagsWithExclusion(n),t.openElements.popUntilTagNamePopped(n))}function I0e(t){t.openElements.hasNumberedHeaderInScope()&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilNumberedHeaderPopped())}function $0e(t,e){const n=e.tagID;t.openElements.hasInScope(n)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(n),t.activeFormattingElements.clearToLastMarker())}function L0e(t){t._reconstructActiveFormattingElements(),t._insertFakeElement(Q.BR,g.BR),t.openElements.pop(),t.framesetOk=!1}function d7(t,e){const n=e.tagName,i=e.tagID;for(let r=t.openElements.stackTop;r>0;r--){const o=t.openElements.items[r],s=t.openElements.tagIDs[r];if(i===s&&(i!==g.UNKNOWN||t.treeAdapter.getTagName(o)===n)){t.openElements.generateImpliedEndTagsWithExclusion(i),t.openElements.stackTop>=r&&t.openElements.shortenToLength(r);break}if(t._isSpecialElement(o,s))break}}function Rb(t,e){switch(e.tagID){case g.A:case g.B:case g.I:case g.S:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.NOBR:case g.SMALL:case g.STRIKE:case g.STRONG:{O_(t,e);break}case g.P:{P0e(t);break}case g.DL:case g.UL:case g.OL:case g.DIR:case g.DIV:case g.NAV:case g.PRE:case g.MAIN:case g.MENU:case g.ASIDE:case g.BUTTON:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.ADDRESS:case g.ARTICLE:case g.DETAILS:case g.SECTION:case g.SUMMARY:case g.LISTING:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{C0e(t,e);break}case g.LI:{A0e(t);break}case g.DD:case g.DT:{R0e(t,e);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{I0e(t);break}case g.BR:{L0e(t);break}case g.BODY:{_0e(t,e);break}case g.HTML:{E0e(t,e);break}case g.FORM:{T0e(t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{$0e(t,e);break}case g.TEMPLATE:{Mu(t,e);break}default:d7(t,e)}}function h7(t,e){t.tmplInsertionModeStack.length>0?y7(t,e):b_(t,e)}function N0e(t,e){var n;e.tagID===g.SCRIPT&&((n=t.scriptHandler)===null||n===void 0||n.call(t,t.openElements.current)),t.openElements.pop(),t.insertionMode=t.originalInsertionMode}function M0e(t,e){t._err(e,j.eofInElementThatCanContainOnlyText),t.openElements.pop(),t.insertionMode=t.originalInsertionMode,t.onEof(e)}function k1(t,e){if(s7.has(t.openElements.currentTagId))switch(t.pendingCharacterTokens.length=0,t.hasNonWhitespacePendingCharacterToken=!1,t.originalInsertionMode=t.insertionMode,t.insertionMode=$.IN_TABLE_TEXT,e.type){case We.CHARACTER:{p7(t,e);break}case We.WHITESPACE_CHARACTER:{f7(t,e);break}}else Wp(t,e)}function D0e(t,e){t.openElements.clearBackToTableContext(),t.activeFormattingElements.insertMarker(),t._insertElement(e,q.HTML),t.insertionMode=$.IN_CAPTION}function B0e(t,e){t.openElements.clearBackToTableContext(),t._insertElement(e,q.HTML),t.insertionMode=$.IN_COLUMN_GROUP}function Q0e(t,e){t.openElements.clearBackToTableContext(),t._insertFakeElement(Q.COLGROUP,g.COLGROUP),t.insertionMode=$.IN_COLUMN_GROUP,y_(t,e)}function F0e(t,e){t.openElements.clearBackToTableContext(),t._insertElement(e,q.HTML),t.insertionMode=$.IN_TABLE_BODY}function z0e(t,e){t.openElements.clearBackToTableContext(),t._insertFakeElement(Q.TBODY,g.TBODY),t.insertionMode=$.IN_TABLE_BODY,Ib(t,e)}function H0e(t,e){t.openElements.hasInTableScope(g.TABLE)&&(t.openElements.popUntilTagNamePopped(g.TABLE),t._resetInsertionMode(),t._processStartTag(e))}function U0e(t,e){c7(e)?t._appendElement(e,q.HTML):Wp(t,e),e.ackSelfClosing=!0}function W0e(t,e){!t.formElement&&t.openElements.tmplCount===0&&(t._insertElement(e,q.HTML),t.formElement=t.openElements.current,t.openElements.pop())}function Cd(t,e){switch(e.tagID){case g.TD:case g.TH:case g.TR:{z0e(t,e);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{Zr(t,e);break}case g.COL:{Q0e(t,e);break}case g.FORM:{W0e(t,e);break}case g.TABLE:{H0e(t,e);break}case g.TBODY:case g.TFOOT:case g.THEAD:{F0e(t,e);break}case g.INPUT:{U0e(t,e);break}case g.CAPTION:{D0e(t,e);break}case g.COLGROUP:{B0e(t,e);break}default:Wp(t,e)}}function Sp(t,e){switch(e.tagID){case g.TABLE:{t.openElements.hasInTableScope(g.TABLE)&&(t.openElements.popUntilTagNamePopped(g.TABLE),t._resetInsertionMode());break}case g.TEMPLATE:{Mu(t,e);break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TBODY:case g.TD:case g.TFOOT:case g.TH:case g.THEAD:case g.TR:break;default:Wp(t,e)}}function Wp(t,e){const n=t.fosterParentingEnabled;t.fosterParentingEnabled=!0,Ab(t,e),t.fosterParentingEnabled=n}function f7(t,e){t.pendingCharacterTokens.push(e)}function p7(t,e){t.pendingCharacterTokens.push(e),t.hasNonWhitespacePendingCharacterToken=!0}function Fh(t,e){let n=0;if(t.hasNonWhitespacePendingCharacterToken)for(;n0&&t.openElements.currentTagId===g.OPTION&&t.openElements.tagIDs[t.openElements.stackTop-1]===g.OPTGROUP&&t.openElements.pop(),t.openElements.currentTagId===g.OPTGROUP&&t.openElements.pop();break}case g.OPTION:{t.openElements.currentTagId===g.OPTION&&t.openElements.pop();break}case g.SELECT:{t.openElements.hasInSelectScope(g.SELECT)&&(t.openElements.popUntilTagNamePopped(g.SELECT),t._resetInsertionMode());break}case g.TEMPLATE:{Mu(t,e);break}}}function Y0e(t,e){const n=e.tagID;n===g.CAPTION||n===g.TABLE||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR||n===g.TD||n===g.TH?(t.openElements.popUntilTagNamePopped(g.SELECT),t._resetInsertionMode(),t._processStartTag(e)):O7(t,e)}function G0e(t,e){const n=e.tagID;n===g.CAPTION||n===g.TABLE||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR||n===g.TD||n===g.TH?t.openElements.hasInTableScope(n)&&(t.openElements.popUntilTagNamePopped(g.SELECT),t._resetInsertionMode(),t.onEndTag(e)):b7(t,e)}function K0e(t,e){switch(e.tagID){case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{Zr(t,e);break}case g.CAPTION:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{t.tmplInsertionModeStack[0]=$.IN_TABLE,t.insertionMode=$.IN_TABLE,Cd(t,e);break}case g.COL:{t.tmplInsertionModeStack[0]=$.IN_COLUMN_GROUP,t.insertionMode=$.IN_COLUMN_GROUP,y_(t,e);break}case g.TR:{t.tmplInsertionModeStack[0]=$.IN_TABLE_BODY,t.insertionMode=$.IN_TABLE_BODY,Ib(t,e);break}case g.TD:case g.TH:{t.tmplInsertionModeStack[0]=$.IN_ROW,t.insertionMode=$.IN_ROW,$b(t,e);break}default:t.tmplInsertionModeStack[0]=$.IN_BODY,t.insertionMode=$.IN_BODY,Wn(t,e)}}function J0e(t,e){e.tagID===g.TEMPLATE&&Mu(t,e)}function y7(t,e){t.openElements.tmplCount>0?(t.openElements.popUntilTagNamePopped(g.TEMPLATE),t.activeFormattingElements.clearToLastMarker(),t.tmplInsertionModeStack.shift(),t._resetInsertionMode(),t.onEof(e)):b_(t,e)}function eOe(t,e){e.tagID===g.HTML?Wn(t,e):bO(t,e)}function v7(t,e){var n;if(e.tagID===g.HTML){if(t.fragmentContext||(t.insertionMode=$.AFTER_AFTER_BODY),t.options.sourceCodeLocationInfo&&t.openElements.tagIDs[0]===g.HTML){t._setEndLocation(t.openElements.items[0],e);const i=t.openElements.items[1];i&&!(!((n=t.treeAdapter.getNodeSourceCodeLocation(i))===null||n===void 0)&&n.endTag)&&t._setEndLocation(i,e)}}else bO(t,e)}function bO(t,e){t.insertionMode=$.IN_BODY,Ab(t,e)}function tOe(t,e){switch(e.tagID){case g.HTML:{Wn(t,e);break}case g.FRAMESET:{t._insertElement(e,q.HTML);break}case g.FRAME:{t._appendElement(e,q.HTML),e.ackSelfClosing=!0;break}case g.NOFRAMES:{Zr(t,e);break}}}function nOe(t,e){e.tagID===g.FRAMESET&&!t.openElements.isRootHtmlElementCurrent()&&(t.openElements.pop(),!t.fragmentContext&&t.openElements.currentTagId!==g.FRAMESET&&(t.insertionMode=$.AFTER_FRAMESET))}function iOe(t,e){switch(e.tagID){case g.HTML:{Wn(t,e);break}case g.NOFRAMES:{Zr(t,e);break}}}function rOe(t,e){e.tagID===g.HTML&&(t.insertionMode=$.AFTER_AFTER_FRAMESET)}function oOe(t,e){e.tagID===g.HTML?Wn(t,e):e0(t,e)}function e0(t,e){t.insertionMode=$.IN_BODY,Ab(t,e)}function sOe(t,e){switch(e.tagID){case g.HTML:{Wn(t,e);break}case g.NOFRAMES:{Zr(t,e);break}}}function aOe(t,e){e.chars=Ct,t._insertCharacters(e)}function lOe(t,e){t._insertCharacters(e),t.framesetOk=!1}function S7(t){for(;t.treeAdapter.getNamespaceURI(t.openElements.current)!==q.HTML&&!t._isIntegrationPoint(t.openElements.currentTagId,t.openElements.current);)t.openElements.pop()}function uOe(t,e){if(xge(e))S7(t),t._startTagOutsideForeignContent(e);else{const n=t._getAdjustedCurrentElement(),i=t.treeAdapter.getNamespaceURI(n);i===q.MATHML?r7(e):i===q.SVG&&(_ge(e),o7(e)),g_(e),e.selfClosing?t._appendElement(e,i):t._insertElement(e,i),e.ackSelfClosing=!0}}function cOe(t,e){if(e.tagID===g.P||e.tagID===g.BR){S7(t),t._endTagOutsideForeignContent(e);return}for(let n=t.openElements.stackTop;n>0;n--){const i=t.openElements.items[n];if(t.treeAdapter.getNamespaceURI(i)===q.HTML){t._endTagOutsideForeignContent(e);break}const r=t.treeAdapter.getTagName(i);if(r.toLowerCase()===e.tagName){e.tagName=r,t.openElements.shortenToLength(n);break}}}Q.AREA,Q.BASE,Q.BASEFONT,Q.BGSOUND,Q.BR,Q.COL,Q.EMBED,Q.FRAME,Q.HR,Q.IMG,Q.INPUT,Q.KEYGEN,Q.LINK,Q.META,Q.PARAM,Q.SOURCE,Q.TRACK,Q.WBR;const dOe=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),L$={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function w7(t,e){const n=SOe(t),i=H9("type",{handlers:{root:hOe,element:fOe,text:pOe,comment:x7,doctype:mOe,raw:OOe},unknown:bOe}),r={parser:n?new R$(L$):R$.getFragmentParser(void 0,L$),handle(a){i(a,r)},stitches:!1,options:e||{}};i(t,r),uh(r,Ro());const o=n?r.parser.document:r.parser.getFragment(),s=kme(o,{file:r.options.file});return r.stitches&&Tb(s,"comment",function(a,l,u){const c=a;if(c.value.stitch&&u&&l!==void 0){const d=u.children;return d[l]=c.value.stitch,l}}),s.type==="root"&&s.children.length===1&&s.children[0].type===t.type?s.children[0]:s}function k7(t,e){let n=-1;if(t)for(;++n0?{type:"text",value:_}:void 0),_===!1?h.lastIndex=k+1:(m!==k&&v.push({type:"text",value:u.value.slice(m,k)}),Array.isArray(_)?v.push(..._):_&&v.push(_),m=k+S[0].length,b=!0),!h.global)break;S=h.exec(u.value)}return b?(m?\]}]+$/.exec(t);if(!e)return[t,void 0];t=t.slice(0,e.index);let n=e[0],i=n.indexOf(")");const r=M$(t,"(");let o=M$(t,")");for(;i!==-1&&r>o;)t+=n.slice(0,i+1),n=n.slice(i+1),i=n.indexOf(")"),o++;return[t,n]}function C7(t,e){const n=t.input.charCodeAt(t.index-1);return(t.index===0||Ou(n)||kb(n))&&(!e||n!==47)}T7.peek=qOe;function QOe(){return{enter:{gfmFootnoteDefinition:zOe,gfmFootnoteDefinitionLabelString:HOe,gfmFootnoteCall:VOe,gfmFootnoteCallString:jOe},exit:{gfmFootnoteDefinition:WOe,gfmFootnoteDefinitionLabelString:UOe,gfmFootnoteCall:ZOe,gfmFootnoteCallString:XOe}}}function FOe(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:YOe,footnoteReference:T7}}}function zOe(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function HOe(){this.buffer()}function UOe(t){const e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=e,n.identifier=Dr(this.sliceSerialize(t)).toLowerCase()}function WOe(t){this.exit(t)}function VOe(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function jOe(){this.buffer()}function XOe(t){const e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=e,n.identifier=Dr(this.sliceSerialize(t)).toLowerCase()}function ZOe(t){this.exit(t)}function T7(t,e,n,i){const r=n.createTracker(i);let o=r.move("[^");const s=n.enter("footnoteReference"),a=n.enter("reference");return o+=r.move(n.safe(n.associationId(t),{...r.current(),before:o,after:"]"})),a(),s(),o+=r.move("]"),o}function qOe(){return"["}function YOe(t,e,n,i){const r=n.createTracker(i);let o=r.move("[^");const s=n.enter("footnoteDefinition"),a=n.enter("label");return o+=r.move(n.safe(n.associationId(t),{...r.current(),before:o,after:"]"})),a(),o+=r.move("]:"+(t.children&&t.children.length>0?" ":"")),r.shift(4),o+=r.move(n.indentLines(n.containerFlow(t,r.current()),GOe)),s(),o}function GOe(t,e,n){return e===0?t:(n?"":" ")+t}const KOe=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];P7.peek=ibe;function JOe(){return{canContainEols:["delete"],enter:{strikethrough:tbe},exit:{strikethrough:nbe}}}function ebe(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:KOe}],handlers:{delete:P7}}}function tbe(t){this.enter({type:"delete",children:[]},t)}function nbe(t){this.exit(t)}function P7(t,e,n,i){const r=n.createTracker(i),o=n.enter("strikethrough");let s=r.move("~~");return s+=n.containerPhrasing(t,{...r.current(),before:s,after:"~"}),s+=r.move("~~"),o(),s}function ibe(){return"~"}function rbe(t,e={}){const n=(e.align||[]).concat(),i=e.stringLength||sbe,r=[],o=[],s=[],a=[];let l=0,u=-1;for(;++ul&&(l=t[u].length);++ya[y])&&(a[y]=v)}m.push(b)}o[u]=m,s[u]=O}let c=-1;if(typeof n=="object"&&"length"in n)for(;++ca[c]&&(a[c]=b),h[c]=b),d[c]=v}o.splice(1,0,d),s.splice(1,0,h),u=-1;const p=[];for(;++u "),o.shift(2);const s=n.indentLines(n.containerFlow(t,o.current()),lbe);return r(),s}function lbe(t,e,n){return">"+(n?"":" ")+t}function ube(t,e){return B$(t,e.inConstruct,!0)&&!B$(t,e.notInConstruct,!1)}function B$(t,e,n){if(typeof e=="string"&&(e=[e]),!e||e.length===0)return n;let i=-1;for(;++is&&(s=o):o=1,r=i+e.length,i=n.indexOf(e,r);return s}function dbe(t,e){return!!(e.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function hbe(t){const e=t.options.fence||"`";if(e!=="`"&&e!=="~")throw new Error("Cannot serialize code with `"+e+"` for `options.fence`, expected `` ` `` or `~`");return e}function fbe(t,e,n,i){const r=hbe(n),o=t.value||"",s=r==="`"?"GraveAccent":"Tilde";if(dbe(t,n)){const d=n.enter("codeIndented"),h=n.indentLines(o,pbe);return d(),h}const a=n.createTracker(i),l=r.repeat(Math.max(cbe(o,r)+1,3)),u=n.enter("codeFenced");let c=a.move(l);if(t.lang){const d=n.enter(`codeFencedLang${s}`);c+=a.move(n.safe(t.lang,{before:c,after:" ",encode:["`"],...a.current()})),d()}if(t.lang&&t.meta){const d=n.enter(`codeFencedMeta${s}`);c+=a.move(" "),c+=a.move(n.safe(t.meta,{before:c,after:` `,encode:["`"],...a.current()})),d()}return c+=a.move(` `),o&&(c+=a.move(o+` -`)),c+=a.move(l),u(),c}function pbe(t,e,n){return(n?"":" ")+t}function y_(t){const e=t.options.quote||'"';if(e!=='"'&&e!=="'")throw new Error("Cannot serialize title with `"+e+"` for `options.quote`, expected `\"`, or `'`");return e}function mbe(t,e,n,i){const r=y_(n),o=r==='"'?"Quote":"Apostrophe",s=n.enter("definition");let a=n.enter("label");const l=n.createTracker(i);let u=l.move("[");return u+=l.move(n.safe(n.associationId(t),{before:u,after:"]",...l.current()})),u+=l.move("]: "),a(),!t.url||/[\0- \u007F]/.test(t.url)?(a=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(t.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(a=n.enter("destinationRaw"),u+=l.move(n.safe(t.url,{before:u,after:t.title?" ":` -`,...l.current()}))),a(),t.title&&(a=n.enter(`title${o}`),u+=l.move(" "+r),u+=l.move(n.safe(t.title,{before:u,after:r,...l.current()})),u+=l.move(r),a()),s(),u}function gbe(t){const e=t.options.emphasis||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize emphasis with `"+e+"` for `options.emphasis`, expected `*`, or `_`");return e}A7.peek=Obe;function A7(t,e,n,i){const r=gbe(n),o=n.enter("emphasis"),s=n.createTracker(i);let a=s.move(r);return a+=s.move(n.containerPhrasing(t,{before:a,after:r,...s.current()})),a+=s.move(r),o(),a}function Obe(t,e,n){return n.options.emphasis||"*"}function bbe(t,e){let n=!1;return Cb(t,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return n=!0,gw}),!!((!t.depth||t.depth<3)&&o_(t)&&(e.options.setext||n))}function ybe(t,e,n,i){const r=Math.max(Math.min(6,t.depth||1),1),o=n.createTracker(i);if(bbe(t,n)){const c=n.enter("headingSetext"),d=n.enter("phrasing"),h=n.containerPhrasing(t,{...o.current(),before:` +`)),c+=a.move(l),u(),c}function pbe(t,e,n){return(n?"":" ")+t}function v_(t){const e=t.options.quote||'"';if(e!=='"'&&e!=="'")throw new Error("Cannot serialize title with `"+e+"` for `options.quote`, expected `\"`, or `'`");return e}function mbe(t,e,n,i){const r=v_(n),o=r==='"'?"Quote":"Apostrophe",s=n.enter("definition");let a=n.enter("label");const l=n.createTracker(i);let u=l.move("[");return u+=l.move(n.safe(n.associationId(t),{before:u,after:"]",...l.current()})),u+=l.move("]: "),a(),!t.url||/[\0- \u007F]/.test(t.url)?(a=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(t.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(a=n.enter("destinationRaw"),u+=l.move(n.safe(t.url,{before:u,after:t.title?" ":` +`,...l.current()}))),a(),t.title&&(a=n.enter(`title${o}`),u+=l.move(" "+r),u+=l.move(n.safe(t.title,{before:u,after:r,...l.current()})),u+=l.move(r),a()),s(),u}function gbe(t){const e=t.options.emphasis||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize emphasis with `"+e+"` for `options.emphasis`, expected `*`, or `_`");return e}A7.peek=Obe;function A7(t,e,n,i){const r=gbe(n),o=n.enter("emphasis"),s=n.createTracker(i);let a=s.move(r);return a+=s.move(n.containerPhrasing(t,{before:a,after:r,...s.current()})),a+=s.move(r),o(),a}function Obe(t,e,n){return n.options.emphasis||"*"}function bbe(t,e){let n=!1;return Tb(t,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return n=!0,Ow}),!!((!t.depth||t.depth<3)&&s_(t)&&(e.options.setext||n))}function ybe(t,e,n,i){const r=Math.max(Math.min(6,t.depth||1),1),o=n.createTracker(i);if(bbe(t,n)){const c=n.enter("headingSetext"),d=n.enter("phrasing"),h=n.containerPhrasing(t,{...o.current(),before:` `,after:` `});return d(),c(),h+` `+(r===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(` `))+1))}const s="#".repeat(r),a=n.enter("headingAtx"),l=n.enter("phrasing");o.move(s+" ");let u=n.containerPhrasing(t,{before:"# ",after:` -`,...o.current()});return/^[\t ]/.test(u)&&(u="&#x"+u.charCodeAt(0).toString(16).toUpperCase()+";"+u.slice(1)),u=u?s+" "+u:s,n.options.closeAtx&&(u+=" "+s),l(),a(),u}R7.peek=vbe;function R7(t){return t.value||""}function vbe(){return"<"}I7.peek=Sbe;function I7(t,e,n,i){const r=y_(n),o=r==='"'?"Quote":"Apostrophe",s=n.enter("image");let a=n.enter("label");const l=n.createTracker(i);let u=l.move("![");return u+=l.move(n.safe(t.alt,{before:u,after:"]",...l.current()})),u+=l.move("]("),a(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(a=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(t.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(a=n.enter("destinationRaw"),u+=l.move(n.safe(t.url,{before:u,after:t.title?" ":")",...l.current()}))),a(),t.title&&(a=n.enter(`title${o}`),u+=l.move(" "+r),u+=l.move(n.safe(t.title,{before:u,after:r,...l.current()})),u+=l.move(r),a()),u+=l.move(")"),s(),u}function Sbe(){return"!"}$7.peek=wbe;function $7(t,e,n,i){const r=t.referenceType,o=n.enter("imageReference");let s=n.enter("label");const a=n.createTracker(i);let l=a.move("![");const u=n.safe(t.alt,{before:l,after:"]",...a.current()});l+=a.move(u+"]["),s();const c=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(t),{before:l,after:"]",...a.current()});return s(),n.stack=c,o(),r==="full"||!u||u!==d?l+=a.move(d+"]"):r==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function wbe(){return"!"}L7.peek=kbe;function L7(t,e,n){let i=t.value||"",r="`",o=-1;for(;new RegExp("(^|[^`])"+r+"([^`]|$)").test(i);)r+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++o\u007F]/.test(t.url))}M7.peek=xbe;function M7(t,e,n,i){const r=y_(n),o=r==='"'?"Quote":"Apostrophe",s=n.createTracker(i);let a,l;if(N7(t,n)){const c=n.stack;n.stack=[],a=n.enter("autolink");let d=s.move("<");return d+=s.move(n.containerPhrasing(t,{before:d,after:">",...s.current()})),d+=s.move(">"),a(),n.stack=c,d}a=n.enter("link"),l=n.enter("label");let u=s.move("[");return u+=s.move(n.containerPhrasing(t,{before:u,after:"](",...s.current()})),u+=s.move("]("),l(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(l=n.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(n.safe(t.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(l=n.enter("destinationRaw"),u+=s.move(n.safe(t.url,{before:u,after:t.title?" ":")",...s.current()}))),l(),t.title&&(l=n.enter(`title${o}`),u+=s.move(" "+r),u+=s.move(n.safe(t.title,{before:u,after:r,...s.current()})),u+=s.move(r),l()),u+=s.move(")"),a(),u}function xbe(t,e,n){return N7(t,n)?"<":"["}D7.peek=_be;function D7(t,e,n,i){const r=t.referenceType,o=n.enter("linkReference");let s=n.enter("label");const a=n.createTracker(i);let l=a.move("[");const u=n.containerPhrasing(t,{before:l,after:"]",...a.current()});l+=a.move(u+"]["),s();const c=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(t),{before:l,after:"]",...a.current()});return s(),n.stack=c,o(),r==="full"||!u||u!==d?l+=a.move(d+"]"):r==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function _be(){return"["}function v_(t){const e=t.options.bullet||"*";if(e!=="*"&&e!=="+"&&e!=="-")throw new Error("Cannot serialize items with `"+e+"` for `options.bullet`, expected `*`, `+`, or `-`");return e}function Ebe(t){const e=v_(t),n=t.options.bulletOther;if(!n)return e==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===e)throw new Error("Expected `bullet` (`"+e+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Cbe(t){const e=t.options.bulletOrdered||".";if(e!=="."&&e!==")")throw new Error("Cannot serialize items with `"+e+"` for `options.bulletOrdered`, expected `.` or `)`");return e}function B7(t){const e=t.options.rule||"*";if(e!=="*"&&e!=="-"&&e!=="_")throw new Error("Cannot serialize rules with `"+e+"` for `options.rule`, expected `*`, `-`, or `_`");return e}function Tbe(t,e,n,i){const r=n.enter("list"),o=n.bulletCurrent;let s=t.ordered?Cbe(n):v_(n);const a=t.ordered?s==="."?")":".":Ebe(n);let l=e&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!t.ordered){const c=t.children?t.children[0]:void 0;if((s==="*"||s==="-")&&c&&(!c.children||!c.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),B7(n)===s&&c){let d=-1;for(;++d-1?e.start:1)+(n.options.incrementListMarker===!1?0:e.children.indexOf(t))+o);let s=o.length+1;(r==="tab"||r==="mixed"&&(e&&e.type==="list"&&e.spread||t.spread))&&(s=Math.ceil(s/4)*4);const a=n.createTracker(i);a.move(o+" ".repeat(s-o.length)),a.shift(s);const l=n.enter("listItem"),u=n.indentLines(n.containerFlow(t,a.current()),c);return l(),u;function c(d,h,p){return h?(p?"":" ".repeat(s))+d:(p?o:o+" ".repeat(s-o.length))+d}}function Rbe(t,e,n,i){const r=n.enter("paragraph"),o=n.enter("phrasing"),s=n.containerPhrasing(t,i);return o(),r(),s}const Ibe=_b(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function $be(t,e,n,i){return(t.children.some(function(s){return Ibe(s)})?n.containerPhrasing:n.containerFlow).call(n,t,i)}function Lbe(t){const e=t.options.strong||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}Q7.peek=Nbe;function Q7(t,e,n,i){const r=Lbe(n),o=n.enter("strong"),s=n.createTracker(i);let a=s.move(r+r);return a+=s.move(n.containerPhrasing(t,{before:a,after:r,...s.current()})),a+=s.move(r+r),o(),a}function Nbe(t,e,n){return n.options.strong||"*"}function Mbe(t,e,n,i){return n.safe(t.value,i)}function Dbe(t){const e=t.options.ruleRepetition||3;if(e<3)throw new Error("Cannot serialize rules with repetition `"+e+"` for `options.ruleRepetition`, expected `3` or more");return e}function Bbe(t,e,n){const i=(B7(n)+(n.options.ruleSpaces?" ":"")).repeat(Dbe(n));return n.options.ruleSpaces?i.slice(0,-1):i}const F7={blockquote:abe,break:Q$,code:fbe,definition:mbe,emphasis:A7,hardBreak:Q$,heading:ybe,html:R7,image:I7,imageReference:$7,inlineCode:L7,link:M7,linkReference:D7,list:Tbe,listItem:Abe,paragraph:Rbe,root:$be,strong:Q7,text:Mbe,thematicBreak:Bbe};function Qbe(){return{enter:{table:Fbe,tableData:F$,tableHeader:F$,tableRow:Hbe},exit:{codeText:Ube,table:zbe,tableData:E1,tableHeader:E1,tableRow:E1}}}function Fbe(t){const e=t._align;this.enter({type:"table",align:e.map(function(n){return n==="none"?null:n}),children:[]},t),this.data.inTable=!0}function zbe(t){this.exit(t),this.data.inTable=void 0}function Hbe(t){this.enter({type:"tableRow",children:[]},t)}function E1(t){this.exit(t)}function F$(t){this.enter({type:"tableCell",children:[]},t)}function Ube(t){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,Wbe));const n=this.stack[this.stack.length-1];n.type,n.value=e,this.exit(t)}function Wbe(t,e){return e==="|"?e:t}function Vbe(t){const e=t||{},n=e.tableCellPadding,i=e.tablePipeAlign,r=e.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` +`,...o.current()});return/^[\t ]/.test(u)&&(u="&#x"+u.charCodeAt(0).toString(16).toUpperCase()+";"+u.slice(1)),u=u?s+" "+u:s,n.options.closeAtx&&(u+=" "+s),l(),a(),u}R7.peek=vbe;function R7(t){return t.value||""}function vbe(){return"<"}I7.peek=Sbe;function I7(t,e,n,i){const r=v_(n),o=r==='"'?"Quote":"Apostrophe",s=n.enter("image");let a=n.enter("label");const l=n.createTracker(i);let u=l.move("![");return u+=l.move(n.safe(t.alt,{before:u,after:"]",...l.current()})),u+=l.move("]("),a(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(a=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(t.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(a=n.enter("destinationRaw"),u+=l.move(n.safe(t.url,{before:u,after:t.title?" ":")",...l.current()}))),a(),t.title&&(a=n.enter(`title${o}`),u+=l.move(" "+r),u+=l.move(n.safe(t.title,{before:u,after:r,...l.current()})),u+=l.move(r),a()),u+=l.move(")"),s(),u}function Sbe(){return"!"}$7.peek=wbe;function $7(t,e,n,i){const r=t.referenceType,o=n.enter("imageReference");let s=n.enter("label");const a=n.createTracker(i);let l=a.move("![");const u=n.safe(t.alt,{before:l,after:"]",...a.current()});l+=a.move(u+"]["),s();const c=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(t),{before:l,after:"]",...a.current()});return s(),n.stack=c,o(),r==="full"||!u||u!==d?l+=a.move(d+"]"):r==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function wbe(){return"!"}L7.peek=kbe;function L7(t,e,n){let i=t.value||"",r="`",o=-1;for(;new RegExp("(^|[^`])"+r+"([^`]|$)").test(i);)r+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++o\u007F]/.test(t.url))}M7.peek=xbe;function M7(t,e,n,i){const r=v_(n),o=r==='"'?"Quote":"Apostrophe",s=n.createTracker(i);let a,l;if(N7(t,n)){const c=n.stack;n.stack=[],a=n.enter("autolink");let d=s.move("<");return d+=s.move(n.containerPhrasing(t,{before:d,after:">",...s.current()})),d+=s.move(">"),a(),n.stack=c,d}a=n.enter("link"),l=n.enter("label");let u=s.move("[");return u+=s.move(n.containerPhrasing(t,{before:u,after:"](",...s.current()})),u+=s.move("]("),l(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(l=n.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(n.safe(t.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(l=n.enter("destinationRaw"),u+=s.move(n.safe(t.url,{before:u,after:t.title?" ":")",...s.current()}))),l(),t.title&&(l=n.enter(`title${o}`),u+=s.move(" "+r),u+=s.move(n.safe(t.title,{before:u,after:r,...s.current()})),u+=s.move(r),l()),u+=s.move(")"),a(),u}function xbe(t,e,n){return N7(t,n)?"<":"["}D7.peek=_be;function D7(t,e,n,i){const r=t.referenceType,o=n.enter("linkReference");let s=n.enter("label");const a=n.createTracker(i);let l=a.move("[");const u=n.containerPhrasing(t,{before:l,after:"]",...a.current()});l+=a.move(u+"]["),s();const c=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(t),{before:l,after:"]",...a.current()});return s(),n.stack=c,o(),r==="full"||!u||u!==d?l+=a.move(d+"]"):r==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function _be(){return"["}function S_(t){const e=t.options.bullet||"*";if(e!=="*"&&e!=="+"&&e!=="-")throw new Error("Cannot serialize items with `"+e+"` for `options.bullet`, expected `*`, `+`, or `-`");return e}function Ebe(t){const e=S_(t),n=t.options.bulletOther;if(!n)return e==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===e)throw new Error("Expected `bullet` (`"+e+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Cbe(t){const e=t.options.bulletOrdered||".";if(e!=="."&&e!==")")throw new Error("Cannot serialize items with `"+e+"` for `options.bulletOrdered`, expected `.` or `)`");return e}function B7(t){const e=t.options.rule||"*";if(e!=="*"&&e!=="-"&&e!=="_")throw new Error("Cannot serialize rules with `"+e+"` for `options.rule`, expected `*`, `-`, or `_`");return e}function Tbe(t,e,n,i){const r=n.enter("list"),o=n.bulletCurrent;let s=t.ordered?Cbe(n):S_(n);const a=t.ordered?s==="."?")":".":Ebe(n);let l=e&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!t.ordered){const c=t.children?t.children[0]:void 0;if((s==="*"||s==="-")&&c&&(!c.children||!c.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),B7(n)===s&&c){let d=-1;for(;++d-1?e.start:1)+(n.options.incrementListMarker===!1?0:e.children.indexOf(t))+o);let s=o.length+1;(r==="tab"||r==="mixed"&&(e&&e.type==="list"&&e.spread||t.spread))&&(s=Math.ceil(s/4)*4);const a=n.createTracker(i);a.move(o+" ".repeat(s-o.length)),a.shift(s);const l=n.enter("listItem"),u=n.indentLines(n.containerFlow(t,a.current()),c);return l(),u;function c(d,h,p){return h?(p?"":" ".repeat(s))+d:(p?o:o+" ".repeat(s-o.length))+d}}function Rbe(t,e,n,i){const r=n.enter("paragraph"),o=n.enter("phrasing"),s=n.containerPhrasing(t,i);return o(),r(),s}const Ibe=Eb(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function $be(t,e,n,i){return(t.children.some(function(s){return Ibe(s)})?n.containerPhrasing:n.containerFlow).call(n,t,i)}function Lbe(t){const e=t.options.strong||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}Q7.peek=Nbe;function Q7(t,e,n,i){const r=Lbe(n),o=n.enter("strong"),s=n.createTracker(i);let a=s.move(r+r);return a+=s.move(n.containerPhrasing(t,{before:a,after:r,...s.current()})),a+=s.move(r+r),o(),a}function Nbe(t,e,n){return n.options.strong||"*"}function Mbe(t,e,n,i){return n.safe(t.value,i)}function Dbe(t){const e=t.options.ruleRepetition||3;if(e<3)throw new Error("Cannot serialize rules with repetition `"+e+"` for `options.ruleRepetition`, expected `3` or more");return e}function Bbe(t,e,n){const i=(B7(n)+(n.options.ruleSpaces?" ":"")).repeat(Dbe(n));return n.options.ruleSpaces?i.slice(0,-1):i}const F7={blockquote:abe,break:Q$,code:fbe,definition:mbe,emphasis:A7,hardBreak:Q$,heading:ybe,html:R7,image:I7,imageReference:$7,inlineCode:L7,link:M7,linkReference:D7,list:Tbe,listItem:Abe,paragraph:Rbe,root:$be,strong:Q7,text:Mbe,thematicBreak:Bbe};function Qbe(){return{enter:{table:Fbe,tableData:F$,tableHeader:F$,tableRow:Hbe},exit:{codeText:Ube,table:zbe,tableData:C1,tableHeader:C1,tableRow:C1}}}function Fbe(t){const e=t._align;this.enter({type:"table",align:e.map(function(n){return n==="none"?null:n}),children:[]},t),this.data.inTable=!0}function zbe(t){this.exit(t),this.data.inTable=void 0}function Hbe(t){this.enter({type:"tableRow",children:[]},t)}function C1(t){this.exit(t)}function F$(t){this.enter({type:"tableCell",children:[]},t)}function Ube(t){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,Wbe));const n=this.stack[this.stack.length-1];n.type,n.value=e,this.exit(t)}function Wbe(t,e){return e==="|"?e:t}function Vbe(t){const e=t||{},n=e.tableCellPadding,i=e.tablePipeAlign,r=e.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:s,tableCell:l,tableRow:a}};function s(p,m,O,y){return u(c(p,O,y),p.align)}function a(p,m,O,y){const b=d(p,O,y),v=u([b]);return v.slice(0,v.indexOf(` -`))}function l(p,m,O,y){const b=O.enter("tableCell"),v=O.enter("phrasing"),S=O.containerPhrasing(p,{...y,before:o,after:o});return v(),b(),S}function u(p,m){return rbe(p,{align:m,alignDelimiters:i,padding:n,stringLength:r})}function c(p,m,O){const y=p.children;let b=-1;const v=[],S=m.enter("table");for(;++b0&&!n&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const uye={tokenize:Oye,partial:!0};function cye(){return{document:{91:{tokenize:pye,continuation:{tokenize:mye},exit:gye}},text:{91:{tokenize:fye},93:{add:"after",tokenize:dye,resolveTo:hye}}}}function dye(t,e,n){const i=this;let r=i.events.length;const o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let s;for(;r--;){const l=i.events[r][1];if(l.type==="labelImage"){s=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return a;function a(l){if(!s||!s._balanced)return n(l);const u=Dr(i.sliceSerialize({start:s.end,end:i.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?n(l):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(l),t.exit("gfmFootnoteCallLabelMarker"),e(l))}}function hye(t,e){let n=t.length;for(;n--;)if(t[n][1].type==="labelImage"&&t[n][0]==="enter"){t[n][1];break}t[n+1][1].type="data",t[n+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},t[n+3][1].start),end:Object.assign({},t[t.length-1][1].end)},r={type:"gfmFootnoteCallMarker",start:Object.assign({},t[n+3][1].end),end:Object.assign({},t[n+3][1].end)};r.end.column++,r.end.offset++,r.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},r.end),end:Object.assign({},t[t.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},a=[t[n+1],t[n+2],["enter",i,e],t[n+3],t[n+4],["enter",r,e],["exit",r,e],["enter",o,e],["enter",s,e],["exit",s,e],["exit",o,e],t[t.length-2],t[t.length-1],["exit",i,e]];return t.splice(n,t.length-n+1,...a),t}function fye(t,e,n){const i=this,r=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let o=0,s;return a;function a(d){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(d),t.exit("gfmFootnoteCallLabelMarker"),l}function l(d){return d!==94?n(d):(t.enter("gfmFootnoteCallMarker"),t.consume(d),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",u)}function u(d){if(o>999||d===93&&!s||d===null||d===91||mt(d))return n(d);if(d===93){t.exit("chunkString");const h=t.exit("gfmFootnoteCallString");return r.includes(Dr(i.sliceSerialize(h)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(d),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):n(d)}return mt(d)||(s=!0),o++,t.consume(d),d===92?c:u}function c(d){return d===91||d===92||d===93?(t.consume(d),o++,u):u(d)}}function pye(t,e,n){const i=this,r=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let o,s=0,a;return l;function l(m){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(m),t.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(m){return m===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(m),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",c):n(m)}function c(m){if(s>999||m===93&&!a||m===null||m===91||mt(m))return n(m);if(m===93){t.exit("chunkString");const O=t.exit("gfmFootnoteDefinitionLabelString");return o=Dr(i.sliceSerialize(O)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(m),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),h}return mt(m)||(a=!0),s++,t.consume(m),m===92?d:c}function d(m){return m===91||m===92||m===93?(t.consume(m),s++,c):c(m)}function h(m){return m===58?(t.enter("definitionMarker"),t.consume(m),t.exit("definitionMarker"),r.includes(o)||r.push(o),Je(t,p,"gfmFootnoteDefinitionWhitespace")):n(m)}function p(m){return e(m)}}function mye(t,e,n){return t.check(zp,e,t.attempt(uye,e,n))}function gye(t){t.exit("gfmFootnoteDefinition")}function Oye(t,e,n){const i=this;return Je(t,r,"gfmFootnoteDefinitionIndent",5);function r(o){const s=i.events[i.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?e(o):n(o)}}function bye(t){let n=(t||{}).singleTilde;const i={tokenize:o,resolveAll:r};return n==null&&(n=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function r(s,a){let l=-1;for(;++l1?l(m):(s.consume(m),d++,p);if(d<2&&!n)return l(m);const y=s.exit("strikethroughSequenceTemporary"),b=fO(m);return y._open=!b||b===2&&!!O,y._close=!O||O===2&&!!b,a(m)}}}class yye{constructor(){this.map=[]}add(e,n,i){vye(this,e,n,i)}consume(e){if(this.map.sort(function(o,s){return o[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const i=[];for(;n>0;)n-=1,i.push(e.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),e.length=this.map[n][0];i.push([...e]),e.length=0;let r=i.pop();for(;r;)e.push(...r),r=i.pop();this.map.length=0}}function vye(t,e,n,i){let r=0;if(!(n===0&&i.length===0)){for(;r-1;){const K=i.events[V][1].type;if(K==="lineEnding"||K==="linePrefix")V--;else break}const B=V>-1?i.events[V][1].type:null,H=B==="tableHead"||B==="tableRow"?_:l;return H===_&&i.parser.lazy[i.now().line]?n(I):H(I)}function l(I){return t.enter("tableHead"),t.enter("tableRow"),u(I)}function u(I){return I===124||(s=!0,o+=1),c(I)}function c(I){return I===null?n(I):Ee(I)?o>1?(o=0,i.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(I),t.exit("lineEnding"),p):n(I):Xe(I)?Je(t,c,"whitespace")(I):(o+=1,s&&(s=!1,r+=1),I===124?(t.enter("tableCellDivider"),t.consume(I),t.exit("tableCellDivider"),s=!0,c):(t.enter("data"),d(I)))}function d(I){return I===null||I===124||mt(I)?(t.exit("data"),c(I)):(t.consume(I),I===92?h:d)}function h(I){return I===92||I===124?(t.consume(I),d):d(I)}function p(I){return i.interrupt=!1,i.parser.lazy[i.now().line]?n(I):(t.enter("tableDelimiterRow"),s=!1,Xe(I)?Je(t,m,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):m(I))}function m(I){return I===45||I===58?y(I):I===124?(s=!0,t.enter("tableCellDivider"),t.consume(I),t.exit("tableCellDivider"),O):x(I)}function O(I){return Xe(I)?Je(t,y,"whitespace")(I):y(I)}function y(I){return I===58?(o+=1,s=!0,t.enter("tableDelimiterMarker"),t.consume(I),t.exit("tableDelimiterMarker"),b):I===45?(o+=1,b(I)):I===null||Ee(I)?k(I):x(I)}function b(I){return I===45?(t.enter("tableDelimiterFiller"),v(I)):x(I)}function v(I){return I===45?(t.consume(I),v):I===58?(s=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(I),t.exit("tableDelimiterMarker"),S):(t.exit("tableDelimiterFiller"),S(I))}function S(I){return Xe(I)?Je(t,k,"whitespace")(I):k(I)}function k(I){return I===124?m(I):I===null||Ee(I)?!s||r!==o?x(I):(t.exit("tableDelimiterRow"),t.exit("tableHead"),e(I)):x(I)}function x(I){return n(I)}function _(I){return t.enter("tableRow"),w(I)}function w(I){return I===124?(t.enter("tableCellDivider"),t.consume(I),t.exit("tableCellDivider"),w):I===null||Ee(I)?(t.exit("tableRow"),e(I)):Xe(I)?Je(t,w,"whitespace")(I):(t.enter("data"),D(I))}function D(I){return I===null||I===124||mt(I)?(t.exit("data"),w(I)):(t.consume(I),I===92?W:D)}function W(I){return I===92||I===124?(t.consume(I),D):D(I)}}function xye(t,e){let n=-1,i=!0,r=0,o=[0,0,0,0],s=[0,0,0,0],a=!1,l=0,u,c,d;const h=new yye;for(;++nn[2]+1){const m=n[2]+1,O=n[3]-n[2]-1;t.add(m,O,[])}}t.add(n[3]+1,0,[["exit",d,e]])}return r!==void 0&&(o.end=Object.assign({},vc(e.events,r)),t.add(r,0,[["exit",o,e]]),o=void 0),o}function H$(t,e,n,i,r){const o=[],s=vc(e.events,n);r&&(r.end=Object.assign({},s),o.push(["exit",r,e])),i.end=Object.assign({},s),o.push(["exit",i,e]),t.add(n+1,0,o)}function vc(t,e){const n=t[e],i=n[0]==="enter"?"start":"end";return n[1][i]}const _ye={tokenize:Cye};function Eye(){return{text:{91:_ye}}}function Cye(t,e,n){const i=this;return r;function r(l){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?n(l):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(l),t.exit("taskListCheckMarker"),o)}function o(l){return mt(l)?(t.enter("taskListCheckValueUnchecked"),t.consume(l),t.exit("taskListCheckValueUnchecked"),s):l===88||l===120?(t.enter("taskListCheckValueChecked"),t.consume(l),t.exit("taskListCheckValueChecked"),s):n(l)}function s(l){return l===93?(t.enter("taskListCheckMarker"),t.consume(l),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),a):n(l)}function a(l){return Ee(l)?e(l):Xe(l)?t.check({tokenize:Tye},e,n)(l):n(l)}}function Tye(t,e,n){return Je(t,i,"whitespace");function i(r){return r===null?n(r):e(r)}}function Pye(t){return O9([eye(),cye(),bye(t),wye(),Eye()])}const Aye={};function Nb(t){const e=this,n=t||Aye,i=e.data(),r=i.micromarkExtensions||(i.micromarkExtensions=[]),o=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),s=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);r.push(Pye(n)),o.push(Ybe()),s.push(Gbe(n))}const Og=t=>T.Children.map(t.children,e=>typeof e!="string"?e:null),U$=t=>{var e;return((e=t==null?void 0:t.style)==null?void 0:e.textAlign.replace(/\b(left|right)\b/,n=>n==="left"?"start":"end"))??"start"},Mb={hr:({node:t,...e})=>N.jsx(ye,{as:t.tagName,shadow:"topmost",borderWidth:"small",margin:"small none",padding:"none",borderColor:"primary",...e}),a:({node:t,...e})=>N.jsx(Di,{to:t.href,...e}),button:({node:t,...e})=>N.jsx(Xk,{withBackground:!1,...e}),p:({node:t,...e})=>N.jsx(Wt,{as:t.tagName,...e}),em:({node:t,...e})=>N.jsx(Wt,{fontStyle:"italic",...e}),strong:({node:t,...e})=>N.jsx(Wt,{weight:"bold",...e}),span:({node:t,...e})=>N.jsx(Wt,{as:t.tagName,...e}),code:({node:t,...e})=>N.jsx(Wt,{as:t.tagName,...e}),del:({node:t,...e})=>N.jsx(Wt,{as:t.tagName,...e}),blockquote:({node:t,...e})=>{var a;e={...e,children:Og(e)};const n=/\[\!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]/,i={NOTE:"info",TIP:"success",IMPORTANT:"info",WARNING:"warning",CAUTION:"error"},[r,o]=((a=T.Children.toArray(e.children)[0])==null?void 0:a.props.children.toString().split("--",2))??!1,s=r.match(n);return s?(console.log("alertType: ",s),N.jsx(KX,{variant:i[s[1]],children:r.replace(`${s[0]}`,"")})):N.jsx(HZ,{description:r,title:o,margin:"medium 0",...e,children:o?N.jsx(Zk,{name:o}):N.jsx(N.Fragment,{})})},h1:({node:t,...e})=>(e.level=t.tagName,N.jsx(Tr,{margin:"none none medium",...e})),h2:({node:t,...e})=>(e.level=t.tagName,N.jsx(Tr,{margin:"small none",...e})),h3:({node:t,...e})=>(e.level=t.tagName,N.jsx(Tr,{margin:"small none",...e})),h4:({node:t,...e})=>(e.level=t.tagName,N.jsx(Tr,{...e})),h5:({node:t,...e})=>(e.level=t.tagName,N.jsx(Tr,{...e})),h6:({node:t,...e})=>(e.level="h5",N.jsx(Tr,{as:"h6",...e})),img:({node:t,...e})=>N.jsx(qY,{...e}),div:({node:t,...e})=>N.jsx(ye,{as:t.tagName,...e}),pre:({node:t,...e})=>{if(t.children.length===1&&t.children[0].tagName==="code"){let n=t.children[0].children[0].value;return n.endsWith(` -`)&&(n=n.slice(0,-1)),N.jsx(N8,{label:"Code",lineNumbers:!0,foldGutter:!0,editable:!0,readOnly:!0,defaultValue:n})}return N.jsx(ye,{as:t.tagName,...e})},ul:({node:t,...e})=>{e={...e,children:Og(e)};const{children:n,...i}=e,r=(i==null?void 0:i.className)==="contains-task-list";return N.jsx(Eh,{isUnstyled:r,...i,children:T.Children.map(n,o=>{const{children:s,...a}=o.props;if(r&&s){let l;return N.jsx(Eh.Item,{margin:"0 0 small small",...a,children:T.Children.map(s,u=>{var c,d,h;if(((c=u==null?void 0:u.props)==null?void 0:c.type)==="checkbox"&&(l=((d=u==null?void 0:u.props)==null?void 0:d.checked)??!1),((h=u==null?void 0:u.props)==null?void 0:h.type)!=="checkbox"&&u!==" "&&u!=="[ ]"&&u!=="[X]")return N.jsx(Uq,{label:u,disabled:!0,defaultChecked:l})})},o.key)}return N.jsx(Eh.Item,{...o.props},o.key)})})},ol:({node:t,...e})=>{e={...e,children:Og(e)};const{children:n,...i}=e;return N.jsx(Eh,{as:t.tagName,...i,children:T.Children.map(n,r=>N.jsx(Eh.Item,{...r.props},r.key))})},input:({node:t,...e})=>N.jsx(t.tagName,{...e}),details:({node:t,...e})=>{e={...e,children:Og(e)};const n=e.children.shift();return N.jsx(Q8,{summary:n,children:N.jsx(ye,{display:"block",padding:"small",...e})})},table:({node:t,...e})=>{const{children:n,...i}=e;return N.jsx(Ln,{margin:"medium none",hover:!0,caption:"",...i,children:T.Children.map(n,r=>{const{children:o,...s}=r.props;return r.type==="thead"?N.jsx(Ln.Head,{...s,children:T.Children.map(o,a=>{const{children:l,...u}=a.props;return N.jsx(Ln.Row,{...u,children:T.Children.map(l,c=>N.jsx(Ln.ColHeader,{id:c.key,textAlign:U$(c.props),...c.props},c.key))})})}):N.jsx(Ln.Body,{...s,children:T.Children.map(o,a=>{const{children:l,...u}=a.props;return N.jsx(Ln.Row,{...u,children:T.Children.map(l,c=>N.jsx(Ln.Cell,{textAlign:U$(c.props),...c.props}))})})})})})}},q7={fetch_fail:{EN:"Didn't fetch text correctly.",ES_LA:"No se obtuvo el texto correctamente.",PT_BR:"Não buscou o texto corretamente.",DE:"Text nicht korrekt abgerufen."},download:{EN:"Download",ES_LA:"Descargar",PT_BR:"Baixar",DE:"Herunterladen"},explore:{EN:"Explore",ES_LA:"Explorar",PT_BR:"Explorar",DE:"Erkunden"}};var W$={VITE_APP_VERSION:"3.1.1+1716567855",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};async function Rye(t,e,n){const i=`${bi.api}/repos/${t}/${e}/git/trees/${n}?recursive=1`;try{return(await(await fetch(i,{method:"GET",headers:{Accept:"application/vnd.github.v3+json",Authorization:W$.GITHUB_TOKEN?`token ${W$.GITHUB_TOKEN}`:""}})).json()).tree.sort(Iye)||null}catch(r){return console.error(`Error: ${r.message}`),null}}function Iye(t,e){const n=s=>{const a=s.toLocaleUpperCase(),l=i.findIndex(u=>a.startsWith(u.toLocaleUpperCase()));return l!==-1?l:i.length},i=["Amazon Web Services","Instructure"],r=n(t.path),o=n(e.path);return r!==o?o-r:t.path.localeCompare(e.path)}function $ye(t,e,n,i,r){const s=ps(q7,r),a=t.filter(c=>c.type==="tree"),l=t.filter(c=>c.type==="blob").filter(c=>c.path!==".gitignore");let u=`
+`))}function l(p,m,O,y){const b=O.enter("tableCell"),v=O.enter("phrasing"),S=O.containerPhrasing(p,{...y,before:o,after:o});return v(),b(),S}function u(p,m){return rbe(p,{align:m,alignDelimiters:i,padding:n,stringLength:r})}function c(p,m,O){const y=p.children;let b=-1;const v=[],S=m.enter("table");for(;++b0&&!n&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const uye={tokenize:Oye,partial:!0};function cye(){return{document:{91:{tokenize:pye,continuation:{tokenize:mye},exit:gye}},text:{91:{tokenize:fye},93:{add:"after",tokenize:dye,resolveTo:hye}}}}function dye(t,e,n){const i=this;let r=i.events.length;const o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let s;for(;r--;){const l=i.events[r][1];if(l.type==="labelImage"){s=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return a;function a(l){if(!s||!s._balanced)return n(l);const u=Dr(i.sliceSerialize({start:s.end,end:i.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?n(l):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(l),t.exit("gfmFootnoteCallLabelMarker"),e(l))}}function hye(t,e){let n=t.length;for(;n--;)if(t[n][1].type==="labelImage"&&t[n][0]==="enter"){t[n][1];break}t[n+1][1].type="data",t[n+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},t[n+3][1].start),end:Object.assign({},t[t.length-1][1].end)},r={type:"gfmFootnoteCallMarker",start:Object.assign({},t[n+3][1].end),end:Object.assign({},t[n+3][1].end)};r.end.column++,r.end.offset++,r.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},r.end),end:Object.assign({},t[t.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},a=[t[n+1],t[n+2],["enter",i,e],t[n+3],t[n+4],["enter",r,e],["exit",r,e],["enter",o,e],["enter",s,e],["exit",s,e],["exit",o,e],t[t.length-2],t[t.length-1],["exit",i,e]];return t.splice(n,t.length-n+1,...a),t}function fye(t,e,n){const i=this,r=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let o=0,s;return a;function a(d){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(d),t.exit("gfmFootnoteCallLabelMarker"),l}function l(d){return d!==94?n(d):(t.enter("gfmFootnoteCallMarker"),t.consume(d),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",u)}function u(d){if(o>999||d===93&&!s||d===null||d===91||gt(d))return n(d);if(d===93){t.exit("chunkString");const h=t.exit("gfmFootnoteCallString");return r.includes(Dr(i.sliceSerialize(h)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(d),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):n(d)}return gt(d)||(s=!0),o++,t.consume(d),d===92?c:u}function c(d){return d===91||d===92||d===93?(t.consume(d),o++,u):u(d)}}function pye(t,e,n){const i=this,r=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let o,s=0,a;return l;function l(m){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(m),t.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(m){return m===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(m),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",c):n(m)}function c(m){if(s>999||m===93&&!a||m===null||m===91||gt(m))return n(m);if(m===93){t.exit("chunkString");const O=t.exit("gfmFootnoteDefinitionLabelString");return o=Dr(i.sliceSerialize(O)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(m),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),h}return gt(m)||(a=!0),s++,t.consume(m),m===92?d:c}function d(m){return m===91||m===92||m===93?(t.consume(m),s++,c):c(m)}function h(m){return m===58?(t.enter("definitionMarker"),t.consume(m),t.exit("definitionMarker"),r.includes(o)||r.push(o),et(t,p,"gfmFootnoteDefinitionWhitespace")):n(m)}function p(m){return e(m)}}function mye(t,e,n){return t.check(Hp,e,t.attempt(uye,e,n))}function gye(t){t.exit("gfmFootnoteDefinition")}function Oye(t,e,n){const i=this;return et(t,r,"gfmFootnoteDefinitionIndent",5);function r(o){const s=i.events[i.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?e(o):n(o)}}function bye(t){let n=(t||{}).singleTilde;const i={tokenize:o,resolveAll:r};return n==null&&(n=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function r(s,a){let l=-1;for(;++l1?l(m):(s.consume(m),d++,p);if(d<2&&!n)return l(m);const y=s.exit("strikethroughSequenceTemporary"),b=pO(m);return y._open=!b||b===2&&!!O,y._close=!O||O===2&&!!b,a(m)}}}class yye{constructor(){this.map=[]}add(e,n,i){vye(this,e,n,i)}consume(e){if(this.map.sort(function(o,s){return o[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const i=[];for(;n>0;)n-=1,i.push(e.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),e.length=this.map[n][0];i.push([...e]),e.length=0;let r=i.pop();for(;r;)e.push(...r),r=i.pop();this.map.length=0}}function vye(t,e,n,i){let r=0;if(!(n===0&&i.length===0)){for(;r-1;){const K=i.events[V][1].type;if(K==="lineEnding"||K==="linePrefix")V--;else break}const B=V>-1?i.events[V][1].type:null,H=B==="tableHead"||B==="tableRow"?_:l;return H===_&&i.parser.lazy[i.now().line]?n(I):H(I)}function l(I){return t.enter("tableHead"),t.enter("tableRow"),u(I)}function u(I){return I===124||(s=!0,o+=1),c(I)}function c(I){return I===null?n(I):_e(I)?o>1?(o=0,i.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(I),t.exit("lineEnding"),p):n(I):Ze(I)?et(t,c,"whitespace")(I):(o+=1,s&&(s=!1,r+=1),I===124?(t.enter("tableCellDivider"),t.consume(I),t.exit("tableCellDivider"),s=!0,c):(t.enter("data"),d(I)))}function d(I){return I===null||I===124||gt(I)?(t.exit("data"),c(I)):(t.consume(I),I===92?h:d)}function h(I){return I===92||I===124?(t.consume(I),d):d(I)}function p(I){return i.interrupt=!1,i.parser.lazy[i.now().line]?n(I):(t.enter("tableDelimiterRow"),s=!1,Ze(I)?et(t,m,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):m(I))}function m(I){return I===45||I===58?y(I):I===124?(s=!0,t.enter("tableCellDivider"),t.consume(I),t.exit("tableCellDivider"),O):x(I)}function O(I){return Ze(I)?et(t,y,"whitespace")(I):y(I)}function y(I){return I===58?(o+=1,s=!0,t.enter("tableDelimiterMarker"),t.consume(I),t.exit("tableDelimiterMarker"),b):I===45?(o+=1,b(I)):I===null||_e(I)?k(I):x(I)}function b(I){return I===45?(t.enter("tableDelimiterFiller"),v(I)):x(I)}function v(I){return I===45?(t.consume(I),v):I===58?(s=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(I),t.exit("tableDelimiterMarker"),S):(t.exit("tableDelimiterFiller"),S(I))}function S(I){return Ze(I)?et(t,k,"whitespace")(I):k(I)}function k(I){return I===124?m(I):I===null||_e(I)?!s||r!==o?x(I):(t.exit("tableDelimiterRow"),t.exit("tableHead"),e(I)):x(I)}function x(I){return n(I)}function _(I){return t.enter("tableRow"),w(I)}function w(I){return I===124?(t.enter("tableCellDivider"),t.consume(I),t.exit("tableCellDivider"),w):I===null||_e(I)?(t.exit("tableRow"),e(I)):Ze(I)?et(t,w,"whitespace")(I):(t.enter("data"),D(I))}function D(I){return I===null||I===124||gt(I)?(t.exit("data"),w(I)):(t.consume(I),I===92?W:D)}function W(I){return I===92||I===124?(t.consume(I),D):D(I)}}function xye(t,e){let n=-1,i=!0,r=0,o=[0,0,0,0],s=[0,0,0,0],a=!1,l=0,u,c,d;const h=new yye;for(;++nn[2]+1){const m=n[2]+1,O=n[3]-n[2]-1;t.add(m,O,[])}}t.add(n[3]+1,0,[["exit",d,e]])}return r!==void 0&&(o.end=Object.assign({},Sc(e.events,r)),t.add(r,0,[["exit",o,e]]),o=void 0),o}function H$(t,e,n,i,r){const o=[],s=Sc(e.events,n);r&&(r.end=Object.assign({},s),o.push(["exit",r,e])),i.end=Object.assign({},s),o.push(["exit",i,e]),t.add(n+1,0,o)}function Sc(t,e){const n=t[e],i=n[0]==="enter"?"start":"end";return n[1][i]}const _ye={tokenize:Cye};function Eye(){return{text:{91:_ye}}}function Cye(t,e,n){const i=this;return r;function r(l){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?n(l):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(l),t.exit("taskListCheckMarker"),o)}function o(l){return gt(l)?(t.enter("taskListCheckValueUnchecked"),t.consume(l),t.exit("taskListCheckValueUnchecked"),s):l===88||l===120?(t.enter("taskListCheckValueChecked"),t.consume(l),t.exit("taskListCheckValueChecked"),s):n(l)}function s(l){return l===93?(t.enter("taskListCheckMarker"),t.consume(l),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),a):n(l)}function a(l){return _e(l)?e(l):Ze(l)?t.check({tokenize:Tye},e,n)(l):n(l)}}function Tye(t,e,n){return et(t,i,"whitespace");function i(r){return r===null?n(r):e(r)}}function Pye(t){return O9([eye(),cye(),bye(t),wye(),Eye()])}const Aye={};function Mb(t){const e=this,n=t||Aye,i=e.data(),r=i.micromarkExtensions||(i.micromarkExtensions=[]),o=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),s=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);r.push(Pye(n)),o.push(Ybe()),s.push(Gbe(n))}const bg=t=>T.Children.map(t.children,e=>typeof e!="string"?e:null),U$=t=>{var e;return((e=t==null?void 0:t.style)==null?void 0:e.textAlign.replace(/\b(left|right)\b/,n=>n==="left"?"start":"end"))??"start"},Db={hr:({node:t,...e})=>N.jsx(be,{as:t.tagName,shadow:"topmost",borderWidth:"small",margin:"small none",padding:"none",borderColor:"primary",...e}),a:({node:t,...e})=>N.jsx(Mi,{to:t.href,...e}),button:({node:t,...e})=>N.jsx(Zk,{withBackground:!1,...e}),p:({node:t,...e})=>N.jsx(Vt,{as:t.tagName,...e}),em:({node:t,...e})=>N.jsx(Vt,{fontStyle:"italic",...e}),strong:({node:t,...e})=>N.jsx(Vt,{weight:"bold",...e}),span:({node:t,...e})=>N.jsx(Vt,{as:t.tagName,...e}),code:({node:t,...e})=>N.jsx(Vt,{as:t.tagName,...e}),del:({node:t,...e})=>N.jsx(Vt,{as:t.tagName,...e}),blockquote:({node:t,...e})=>{var a;e={...e,children:bg(e)};const n=/\[\!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]/,i={NOTE:"info",TIP:"success",IMPORTANT:"info",WARNING:"warning",CAUTION:"error"},[r,o]=((a=T.Children.toArray(e.children)[0])==null?void 0:a.props.children.toString().split("--",2))??!1,s=r.match(n);return s?(console.log("alertType: ",s),N.jsx(KX,{variant:i[s[1]],children:r.replace(`${s[0]}`,"")})):N.jsx(HZ,{description:r,title:o,margin:"medium 0",...e,children:o?N.jsx(qk,{name:o}):N.jsx(N.Fragment,{})})},h1:({node:t,...e})=>(e.level=t.tagName,N.jsx(Tr,{margin:"none none medium",...e})),h2:({node:t,...e})=>(e.level=t.tagName,N.jsx(Tr,{margin:"small none",...e})),h3:({node:t,...e})=>(e.level=t.tagName,N.jsx(Tr,{margin:"small none",...e})),h4:({node:t,...e})=>(e.level=t.tagName,N.jsx(Tr,{...e})),h5:({node:t,...e})=>(e.level=t.tagName,N.jsx(Tr,{...e})),h6:({node:t,...e})=>(e.level="h5",N.jsx(Tr,{as:"h6",...e})),img:({node:t,...e})=>N.jsx(qY,{...e}),div:({node:t,...e})=>N.jsx(be,{as:t.tagName,...e}),pre:({node:t,...e})=>{if(t.children.length===1&&t.children[0].tagName==="code"){let n=t.children[0].children[0].value;return n.endsWith(` +`)&&(n=n.slice(0,-1)),N.jsx(N8,{label:"Code",lineNumbers:!0,foldGutter:!0,editable:!0,readOnly:!0,defaultValue:n})}return N.jsx(be,{as:t.tagName,...e})},ul:({node:t,...e})=>{e={...e,children:bg(e)};const{children:n,...i}=e,r=(i==null?void 0:i.className)==="contains-task-list";return N.jsx(Ch,{isUnstyled:r,...i,children:T.Children.map(n,o=>{const{children:s,...a}=o.props;if(r&&s){let l;return N.jsx(Ch.Item,{margin:"0 0 small small",...a,children:T.Children.map(s,u=>{var c,d,h;if(((c=u==null?void 0:u.props)==null?void 0:c.type)==="checkbox"&&(l=((d=u==null?void 0:u.props)==null?void 0:d.checked)??!1),((h=u==null?void 0:u.props)==null?void 0:h.type)!=="checkbox"&&u!==" "&&u!=="[ ]"&&u!=="[X]")return N.jsx(Uq,{label:u,disabled:!0,defaultChecked:l})})},o.key)}return N.jsx(Ch.Item,{...o.props},o.key)})})},ol:({node:t,...e})=>{e={...e,children:bg(e)};const{children:n,...i}=e;return N.jsx(Ch,{as:t.tagName,...i,children:T.Children.map(n,r=>N.jsx(Ch.Item,{...r.props},r.key))})},input:({node:t,...e})=>N.jsx(t.tagName,{...e}),details:({node:t,...e})=>{e={...e,children:bg(e)};const n=e.children.shift();return N.jsx(Q8,{summary:n,children:N.jsx(be,{display:"block",padding:"small",...e})})},table:({node:t,...e})=>{const{children:n,...i}=e;return N.jsx(Ln,{margin:"medium none",hover:!0,caption:"",...i,children:T.Children.map(n,r=>{const{children:o,...s}=r.props;return r.type==="thead"?N.jsx(Ln.Head,{...s,children:T.Children.map(o,a=>{const{children:l,...u}=a.props;return N.jsx(Ln.Row,{...u,children:T.Children.map(l,c=>N.jsx(Ln.ColHeader,{id:c.key,textAlign:U$(c.props),...c.props},c.key))})})}):N.jsx(Ln.Body,{...s,children:T.Children.map(o,a=>{const{children:l,...u}=a.props;return N.jsx(Ln.Row,{...u,children:T.Children.map(l,c=>N.jsx(Ln.Cell,{textAlign:U$(c.props),...c.props}))})})})})})}},q7={fetch_fail:{EN:"Didn't fetch text correctly.",ES_LA:"No se obtuvo el texto correctamente.",PT_BR:"Não buscou o texto corretamente.",DE:"Text nicht korrekt abgerufen."},download:{EN:"Download",ES_LA:"Descargar",PT_BR:"Baixar",DE:"Herunterladen"},explore:{EN:"Explore",ES_LA:"Explorar",PT_BR:"Explorar",DE:"Erkunden"}};var W$={VITE_APP_VERSION:"3.1.2+1716989342",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};async function Rye(t,e,n){const i=`${Oi.api}/repos/${t}/${e}/git/trees/${n}?recursive=1`;try{return(await(await fetch(i,{method:"GET",headers:{Accept:"application/vnd.github.v3+json",Authorization:W$.GITHUB_TOKEN?`token ${W$.GITHUB_TOKEN}`:""}})).json()).tree.sort(Iye)||null}catch(r){return console.error(`Error: ${r.message}`),null}}function Iye(t,e){const n=s=>{const a=s.toLocaleUpperCase(),l=i.findIndex(u=>a.startsWith(u.toLocaleUpperCase()));return l!==-1?l:i.length},i=["Amazon Web Services","Instructure"],r=n(t.path),o=n(e.path);return r!==o?o-r:t.path.localeCompare(e.path)}function $ye(t,e,n,i,r){const s=ms(q7,r),a=t.filter(c=>c.type==="tree"),l=t.filter(c=>c.type==="blob").filter(c=>c.path!==".gitignore");let u=`
🕵️ ${s.explore}\r \r `;for(const[c,d]of a.entries()){u+=`| ${d.path} |\r | ---------------- |`;for(const h of l)h.path.startsWith(d.path)&&(u+=`\r -| [${h.path.replace(`${d.path}/`,"")}](${encodeURI(`${bi.raw}/${e}/${n}/${i}/${h.path}`)}) |`);c~a.indexOf(t)).toString();if(s){const a=await Rye(r,o,s);if(a)return $ye(a,r,o,s,i)}return null}const Db=["strong","summary","blockquote","details","table","tbody","thead","h1","h2","h3","h4","h5","h6","input","ul","li","div","pre","ul","ol","li","br","em","hr","td","th","tr","a","img","p","del","span","code","button"],Nye=({brand:t,branch:e,l:n})=>{const[i,r]=T.useState(null);return T.useEffect(()=>{Lye(t.toLowerCase(),e,n).then(o=>r(o)).catch(o=>console.error(o))},[t,e,n]),N.jsx(Tb,{remarkPlugins:[Nb,Lb],rehypePlugins:[$b],allowedElements:Db,components:Mb,children:i})};function V$({readme:t,brand:e}){const n=th(Rd().language),i=ps(q7,n),r=`.markdown .lang { display: none; } .markdown .lang.${n.toUpperCase()} { display: inherit; }`,o=t,[s,a]=T.useState(!1),[l,u]=T.useState(!1),[c,d]=T.useState(!1);return T.useEffect(()=>{document.title=`${e} Compliance Packages`,fetch(o).then(h=>h.ok?h.text():Promise.reject(i.fetch_fail)).then(h=>{a(h)}).catch(h=>console.error(h))}),T.useEffect(()=>{s&&(d(Array.from(document.querySelectorAll(".contents"))),u(!0))},[s]),N.jsxs(N.Fragment,{children:[l&&(c==null?void 0:c.map(h=>LO.createPortal(N.jsx(Nye,{brand:e,branch:h,l:n}),h))),N.jsx(ih,{language:n}),N.jsxs(ye,{id:"main",as:"div",padding:"medium medium xx-large",minWidth:"20rem",maxWidth:"59.25rem",margin:"0 auto",children:[N.jsx("style",{children:r}),N.jsx(ye,{as:"div",className:`${e.toLowerCase()} markdown`,children:N.jsx(Tb,{remarkPlugins:[Nb,Lb],rehypePlugins:[$b],allowedElements:Db,components:Mb,children:s})})]}),N.jsx(nh,{language:n})]})}const Mye={loading:{EN:"Loading...",ES_LA:"Cargando...",PT_BR:"Carregando...",DE:"Wird geladen..."},markdown_source:{EN:"Markdown Source",ES_LA:"Fuente de Markdown",PT_BR:"Fonte de Markdown",DE:"Markdown-Quelle"},try_editor:{EN:"Try editing the markdown below.",ES_LA:"Intenta editar el markdown abajo.",PT_BR:"Tente editar o markdown abaixo.",DE:"Versuche den Markdown unten zu bearbeiten."},close:{EN:"Close",ES_LA:"Cerrar",PT_BR:"Fechar",DE:"Schließen"}},Dye=`# Markdown to Instructure UI +`)}return u+="
",u}async function Lye(t,e,n){const i=n,r=Oi.owner,o=Oi.repo,s=[...e.classList].filter(a=>~a.indexOf(t)).toString();if(s){const a=await Rye(r,o,s);if(a)return $ye(a,r,o,s,i)}return null}const Bb=["strong","summary","blockquote","details","table","tbody","thead","h1","h2","h3","h4","h5","h6","input","ul","li","div","pre","ul","ol","li","br","em","hr","td","th","tr","a","img","p","del","span","code","button"],Nye=({brand:t,branch:e,l:n})=>{const[i,r]=T.useState(null);return T.useEffect(()=>{Lye(t.toLowerCase(),e,n).then(o=>r(o)).catch(o=>console.error(o))},[t,e,n]),N.jsx(Pb,{remarkPlugins:[Mb,Nb],rehypePlugins:[Lb],allowedElements:Bb,components:Db,children:i})};function V$({readme:t,brand:e}){const n=nh(Id().language),i=ms(q7,n),r=`.markdown .lang { display: none; } .markdown .lang.${n.toUpperCase()} { display: inherit; }`,o=t,[s,a]=T.useState(!1),[l,u]=T.useState(!1),[c,d]=T.useState(!1);return T.useEffect(()=>{document.title=`${e} Compliance Packages`,fetch(o).then(h=>h.ok?h.text():Promise.reject(i.fetch_fail)).then(h=>{a(h)}).catch(h=>console.error(h))}),T.useEffect(()=>{s&&(d(Array.from(document.querySelectorAll(".contents"))),u(!0))},[s]),N.jsxs(N.Fragment,{children:[l&&(c==null?void 0:c.map(h=>NO.createPortal(N.jsx(Nye,{brand:e,branch:h,l:n}),h))),N.jsx(rh,{language:n}),N.jsxs(be,{id:"main",as:"div",padding:"medium medium xx-large",minWidth:"20rem",maxWidth:"59.25rem",margin:"0 auto",children:[N.jsx("style",{children:r}),N.jsx(be,{as:"div",className:`${e.toLowerCase()} markdown`,children:N.jsx(Pb,{remarkPlugins:[Mb,Nb],rehypePlugins:[Lb],allowedElements:Bb,components:Db,children:s})})]}),N.jsx(ih,{language:n})]})}const Mye={loading:{EN:"Loading...",ES_LA:"Cargando...",PT_BR:"Carregando...",DE:"Wird geladen..."},markdown_source:{EN:"Markdown Source",ES_LA:"Fuente de Markdown",PT_BR:"Fonte de Markdown",DE:"Markdown-Quelle"},try_editor:{EN:"Try editing the markdown below.",ES_LA:"Intenta editar el markdown abajo.",PT_BR:"Tente editar o markdown abaixo.",DE:"Versuche den Markdown unten zu bearbeiten."},close:{EN:"Close",ES_LA:"Cerrar",PT_BR:"Fechar",DE:"Schließen"}},Dye=`# Markdown to Instructure UI > [!NOTE] > Try editing the markdown on this page. @@ -288,11 +288,11 @@ Text style: *italic* **bold** ~struck~ **Bacon** ipsum dolor amet beef ribs porchetta shank prosciutto burgdoggen sirloin pork belly pancetta picanha drumstick shoulder meatloaf. Sausage ground round flank shank venison, turducken frankfurter sirloin landjaeger jerky bresaola swine picanha. Buffalo shank short ribs rump swine tail, meatloaf capicola venison pork loin cupim. Buffalo spare ribs ribeye sausage. Ground round porchetta cow, landjaeger pork belly jowl picanha salami. Pork belly pancetta spare ribs swine t-bone, meatloaf bresaola kielbasa pastrami burgdoggen turkey sausage ham hock. Ribeye shank tenderloin beef ribs tail venison drumstick tongue pastrami. -Shank spare ribs sausage landjaeger strip steak jerky, fatback salami tenderloin ball tip pastrami pork. Meatball tri-tip ham tongue, beef ribs chuck boudin short ribs pork burgdoggen spare ribs shankle bacon picanha. Burgdoggen pork meatball boudin venison tenderloin tail pork loin short loin chicken. Salami pork loin shankle bresaola, ground round pork pork belly beef ribs flank tongue biltong pastrami cow. Hamburger cupim sausage tri-tip. Ham rump shoulder, ground round sausage flank hamburger spare ribs picanha bacon chuck strip steak.`;function j$(){const t=th(Rd().language),e=ps(Mye,t),n=Dye;T.useEffect(()=>{document.title="Markdown to Instructure UI"});const[i,r]=T.useState(`${e.loading}`);return T.useEffect(()=>{r(n)},[n]),N.jsxs(N.Fragment,{children:[N.jsx(ih,{language:t}),N.jsx(ye,{id:"main",className:"mdui",as:"div",padding:"medium medium xx-large",minWidth:"20rem",maxWidth:"100vw",margin:"0 auto",children:N.jsx(qn,{startAt:"large",children:N.jsxs(qn.Row,{children:[N.jsx(qn.Col,{children:N.jsx(Tb,{remarkPlugins:[Nb,Lb],rehypePlugins:[$b],allowedElements:Db,components:Mb,children:i})}),N.jsx(qn.Col,{children:N.jsx(N8,{label:`${e.markdown_source}`,language:"markdown",readOnly:!1,editable:!0,lineNumbers:!0,foldGutter:!0,highlightActiveLineGutter:!0,highlightActiveLine:!0,lineWrapping:!0,value:i,onChange:o=>{r(o)}})})]})})}),N.jsx(nh,{language:t})]})}const Bye={downloading:{EN:"Downloading",ES_LA:"Descargando",PT_BR:"Baixando",DE:"Herunterladen"},redirecting:{EN:"Redirecting",ES_LA:"Redirigiendo",PT_BR:"Redirecionando",DE:"Weiterleitung"},youre_downloading_the:{EN:"You're downloading the",ES_LA:"¡Estás descargando el paquete de cumplimiento de",PT_BR:"Você está baixando o pacote de conformidade do",DE:"Sie laden das"},youre_downloading_a:{EN:"You're downloading a document from the",ES_LA:"Estás descargando un documento del paquete de cumplimiento de",PT_BR:"Você está baixando um documento do pacote de conformidade do",DE:"Sie laden ein Dokument aus dem"},compliance_package:{EN:"compliance package!",ES_LA:"!",PT_BR:"!",DE:"-Compliance-Paket herunter!"},didnt_work:{EN:"Didn't work?",ES_LA:"¿No funcionó?",PT_BR:"Não funcionou?",DE:"Hat nicht funktioniert?"},try_again:{EN:"Try again",ES_LA:"Inténtalo de nuevo",PT_BR:"Tente novamente",DE:"Versuchen Sie es erneut"},redirecting_to:{EN:"Redirecting you to",ES_LA:"Redirigiéndote a",PT_BR:"Redirecionando você para",DE:"Weiterleitung zu"}};function X$({path:t,brand:e,url:n}){const i=th(Rd().language),r=ps(Bye,i),o=n.split("?")[0],s=n.slice(-4),a=t.slice(-3)==="/dl";T.useEffect(()=>{window.location.href=n});const l=()=>a?N.jsxs(ye,{as:"div",children:[N.jsx(Wt,{children:s===".zip"?`${r.youre_downloading_the} ${e} ${r.compliance_package}`:`${r.youre_downloading_a} ${e} ${r.compliance_package}`}),N.jsx("br",{}),N.jsxs(Wt,{size:"x-small",children:[r.didnt_work," ",N.jsx(Di,{href:n,children:r.try_again})]})]}):N.jsx(ye,{as:"div",children:N.jsxs(Wt,{children:[r.redirecting_to," ",N.jsx(Di,{href:n,children:o})]})});return N.jsxs(N.Fragment,{children:[N.jsx(ih,{language:i}),N.jsx(ye,{id:"main",as:"div",padding:"medium medium xx-large",minWidth:"20rem",maxWidth:"59.25rem",margin:"0 auto",children:N.jsx(RM,{size:"medium",heading:a?r.downloading:r.redirecting,headingAs:"h1",message:l})}),N.jsx(nh,{language:i})]})}const Qye={releases:{EN:"Releases",ES_LA:"Versiones",PT_BR:"Lançamentos",DE:"Veröffentlichungen"},loading:{EN:"Loading...",ES_LA:"Cargando...",PT_BR:"Carregando...",DE:"Wird geladen..."},subscribe:{EN:"Subscribe",ES_LA:"Suscríbete",PT_BR:"Inscreva-se",DE:"Abonnieren Sie"}};var Z$={};async function Fye(t,e){const n=`${bi.api}/repos/${t}/${e}/releases`;try{return(await(await fetch(n,{method:"GET",headers:{Accept:"application/vnd.github.v3+json",Authorization:Z$.REACT_APP_GITHUB_TOKEN?`token ${Z$.REACT_APP_GITHUB_TOKEN}`:""}})).json()).map(zye).join(`\r +Shank spare ribs sausage landjaeger strip steak jerky, fatback salami tenderloin ball tip pastrami pork. Meatball tri-tip ham tongue, beef ribs chuck boudin short ribs pork burgdoggen spare ribs shankle bacon picanha. Burgdoggen pork meatball boudin venison tenderloin tail pork loin short loin chicken. Salami pork loin shankle bresaola, ground round pork pork belly beef ribs flank tongue biltong pastrami cow. Hamburger cupim sausage tri-tip. Ham rump shoulder, ground round sausage flank hamburger spare ribs picanha bacon chuck strip steak.`;function j$(){const t=nh(Id().language),e=ms(Mye,t),n=Dye;T.useEffect(()=>{document.title="Markdown to Instructure UI"});const[i,r]=T.useState(`${e.loading}`);return T.useEffect(()=>{r(n)},[n]),N.jsxs(N.Fragment,{children:[N.jsx(rh,{language:t}),N.jsx(be,{id:"main",className:"mdui",as:"div",padding:"medium medium xx-large",minWidth:"20rem",maxWidth:"100vw",margin:"0 auto",children:N.jsx(qn,{startAt:"large",children:N.jsxs(qn.Row,{children:[N.jsx(qn.Col,{children:N.jsx(Pb,{remarkPlugins:[Mb,Nb],rehypePlugins:[Lb],allowedElements:Bb,components:Db,children:i})}),N.jsx(qn.Col,{children:N.jsx(N8,{label:`${e.markdown_source}`,language:"markdown",readOnly:!1,editable:!0,lineNumbers:!0,foldGutter:!0,highlightActiveLineGutter:!0,highlightActiveLine:!0,lineWrapping:!0,value:i,onChange:o=>{r(o)}})})]})})}),N.jsx(ih,{language:t})]})}const Bye={downloading:{EN:"Downloading",ES_LA:"Descargando",PT_BR:"Baixando",DE:"Herunterladen"},redirecting:{EN:"Redirecting",ES_LA:"Redirigiendo",PT_BR:"Redirecionando",DE:"Weiterleitung"},youre_downloading_the:{EN:"You're downloading the",ES_LA:"¡Estás descargando el paquete de cumplimiento de",PT_BR:"Você está baixando o pacote de conformidade do",DE:"Sie laden das"},youre_downloading_a:{EN:"You're downloading a document from the",ES_LA:"Estás descargando un documento del paquete de cumplimiento de",PT_BR:"Você está baixando um documento do pacote de conformidade do",DE:"Sie laden ein Dokument aus dem"},compliance_package:{EN:"compliance package!",ES_LA:"!",PT_BR:"!",DE:"-Compliance-Paket herunter!"},didnt_work:{EN:"Didn't work?",ES_LA:"¿No funcionó?",PT_BR:"Não funcionou?",DE:"Hat nicht funktioniert?"},try_again:{EN:"Try again",ES_LA:"Inténtalo de nuevo",PT_BR:"Tente novamente",DE:"Versuchen Sie es erneut"},redirecting_to:{EN:"Redirecting you to",ES_LA:"Redirigiéndote a",PT_BR:"Redirecionando você para",DE:"Weiterleitung zu"}};function X$({path:t,brand:e,url:n}){const i=nh(Id().language),r=ms(Bye,i),o=n.split("?")[0],s=n.slice(-4),a=t.slice(-3)==="/dl";T.useEffect(()=>{window.location.href=n});const l=()=>a?N.jsxs(be,{as:"div",children:[N.jsx(Vt,{children:s===".zip"?`${r.youre_downloading_the} ${e} ${r.compliance_package}`:`${r.youre_downloading_a} ${e} ${r.compliance_package}`}),N.jsx("br",{}),N.jsxs(Vt,{size:"x-small",children:[r.didnt_work," ",N.jsx(Mi,{href:n,children:r.try_again})]})]}):N.jsx(be,{as:"div",children:N.jsxs(Vt,{children:[r.redirecting_to," ",N.jsx(Mi,{href:n,children:o})]})});return N.jsxs(N.Fragment,{children:[N.jsx(rh,{language:i}),N.jsx(be,{id:"main",as:"div",padding:"medium medium xx-large",minWidth:"20rem",maxWidth:"59.25rem",margin:"0 auto",children:N.jsx(RM,{size:"medium",heading:a?r.downloading:r.redirecting,headingAs:"h1",message:l})}),N.jsx(ih,{language:i})]})}const Qye={releases:{EN:"Releases",ES_LA:"Versiones",PT_BR:"Lançamentos",DE:"Veröffentlichungen"},loading:{EN:"Loading...",ES_LA:"Cargando...",PT_BR:"Carregando...",DE:"Wird geladen..."},subscribe:{EN:"Subscribe",ES_LA:"Suscríbete",PT_BR:"Inscreva-se",DE:"Abonnieren Sie"}};var Z$={};async function Fye(t,e){const n=`${Oi.api}/repos/${t}/${e}/releases`;try{return(await(await fetch(n,{method:"GET",headers:{Accept:"application/vnd.github.v3+json",Authorization:Z$.REACT_APP_GITHUB_TOKEN?`token ${Z$.REACT_APP_GITHUB_TOKEN}`:""}})).json()).map(zye).join(`\r \r `).slice(0,-3)}catch(i){return console.error(`Error: ${i.message}`),null}}function zye(t){return` ## ${t.name}\r ${t.body}\r ----`}async function Hye(){const t=bi.owner,e=bi.repo;return Fye(t,e)}function q$(){const t=th(Rd().language),e=ps(Qye,t),n=`https://github.com/${bi.owner}/${bi.repo}/releases.atom`,i=`.markdown .lang { display: none; } .markdown .lang.${t.toUpperCase()} { display: inherit; }`,[r,o]=T.useState(`${e.loading}`);return T.useEffect(()=>{Hye().then(s=>{o(s)}).catch(s=>console.error(s))}),N.jsxs(N.Fragment,{children:[N.jsx(ih,{language:t}),N.jsxs(ye,{id:"main",as:"div",padding:"medium medium xx-large",minWidth:"20rem",maxWidth:"59.25rem",margin:"0 auto",children:[N.jsxs(Tr,{level:"h1",children:[N.jsx(Di,{href:n,children:N.jsx(Hd,{size:"small",color:"warning",title:e.subscribe})})," ",e.releases]}),N.jsx("style",{children:i}),N.jsx(ye,{as:"div",className:"markdown",children:N.jsx(Tb,{remarkPlugins:[Nb,Lb],rehypePlugins:[$b],allowedElements:Db,components:Mb,children:r})})]}),N.jsx(nh,{language:t}),","]})}const Nu=[];for(const t of J8)Nu.push({path:`${t.route}`,element:N.jsx(V$,{readme:t.readme,brand:t.brandName}),errorElement:N.jsx(Op,{}),children:[{path:":language",element:N.jsx(V$,{readme:t.readme,brand:t.brandName})}]});for(const t of dw)for(const e of t.links)Nu.push({path:e.from,element:N.jsx(X$,{path:e.from,brand:t.brand,url:e.to}),errorElement:N.jsx(Op,{}),children:[{path:":language",element:N.jsx(X$,{path:e.from,brand:t.brand,url:e.to})}]});Nu.push({path:"/links",element:N.jsx(P3,{}),errorElement:N.jsx(Op,{}),children:[{path:":language",element:N.jsx(P3,{})}]});Nu.push({path:"/mdui",element:N.jsx(j$,{}),children:[{path:":language",element:N.jsx(j$,{})}]});Nu.push({path:"/releases",element:N.jsx(q$,{}),children:[{path:":language",element:N.jsx(q$,{})}]});Nu.push({path:"*",element:N.jsx(Op,{}),children:[{path:":language",element:N.jsx(Op,{})}]});const Uye=HH(Nu);wk(document.getElementById("root")).render(N.jsx(T.StrictMode,{children:N.jsx(Zl,{theme:Vk,children:N.jsx(ye,{as:"div",minHeight:"100vh",position:"relative",children:N.jsx(GH,{router:Uye})})})})); +---`}async function Hye(){const t=Oi.owner,e=Oi.repo;return Fye(t,e)}function q$(){const t=nh(Id().language),e=ms(Qye,t),n=`https://github.com/${Oi.owner}/${Oi.repo}/releases.atom`,i=`.markdown .lang { display: none; } .markdown .lang.${t.toUpperCase()} { display: inherit; }`,[r,o]=T.useState(`${e.loading}`);return T.useEffect(()=>{Hye().then(s=>{o(s)}).catch(s=>console.error(s))}),N.jsxs(N.Fragment,{children:[N.jsx(rh,{language:t}),N.jsxs(be,{id:"main",as:"div",padding:"medium medium xx-large",minWidth:"20rem",maxWidth:"59.25rem",margin:"0 auto",children:[N.jsxs(Tr,{level:"h1",children:[N.jsx(Mi,{href:n,children:N.jsx(Ud,{size:"small",color:"warning",title:e.subscribe})})," ",e.releases]}),N.jsx("style",{children:i}),N.jsx(be,{as:"div",className:"markdown",children:N.jsx(Pb,{remarkPlugins:[Mb,Nb],rehypePlugins:[Lb],allowedElements:Bb,components:Db,children:r})})]}),N.jsx(ih,{language:t}),","]})}const Du=[];for(const t of J8)Du.push({path:`${t.route}`,element:N.jsx(V$,{readme:t.readme,brand:t.brandName}),errorElement:N.jsx(bp,{}),children:[{path:":language",element:N.jsx(V$,{readme:t.readme,brand:t.brandName})}]});for(const t of hw)for(const e of t.links)Du.push({path:e.from,element:N.jsx(X$,{path:e.from,brand:t.brand,url:e.to}),errorElement:N.jsx(bp,{}),children:[{path:":language",element:N.jsx(X$,{path:e.from,brand:t.brand,url:e.to})}]});Du.push({path:"/links",element:N.jsx(P3,{}),errorElement:N.jsx(bp,{}),children:[{path:":language",element:N.jsx(P3,{})}]});Du.push({path:"/mdui",element:N.jsx(j$,{}),children:[{path:":language",element:N.jsx(j$,{})}]});Du.push({path:"/releases",element:N.jsx(q$,{}),children:[{path:":language",element:N.jsx(q$,{})}]});Du.push({path:"*",element:N.jsx(bp,{}),children:[{path:":language",element:N.jsx(bp,{})}]});const Uye=HH(Du);kk(document.getElementById("root")).render(N.jsx(T.StrictMode,{children:N.jsx(Yl,{theme:jk,children:N.jsx(be,{as:"div",minHeight:"100vh",position:"relative",children:N.jsx(GH,{router:Uye})})})})); diff --git a/index.html b/index.html index 41f8bb2a..78fd89b8 100644 --- a/index.html +++ b/index.html @@ -6,7 +6,7 @@ - + @@ -16,7 +16,7 @@ Instructure Compliance Packages - +