@redocly/replay 0.8.6 → 0.8.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/replay.cjs CHANGED
@@ -38,7 +38,7 @@ Check the top-level render call using <`+ue+">.")}return oe}}function rr(W,oe){{
38
38
  *
39
39
  * This source code is licensed under the MIT license found in the
40
40
  * LICENSE file in the root directory of this source tree.
41
- */var cv;function x5(){return cv||(cv=1,process.env.NODE_ENV!=="production"&&function(){var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),a=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),p=!1,O=!1,m=!1,x=!1,v=!1,y;y=Symbol.for("react.module.reference");function S(q){return!!(typeof q=="string"||typeof q=="function"||q===n||q===i||v||q===r||q===c||q===u||x||q===h||p||O||m||typeof q=="object"&&q!==null&&(q.$$typeof===d||q.$$typeof===f||q.$$typeof===o||q.$$typeof===s||q.$$typeof===l||q.$$typeof===y||q.getModuleId!==void 0))}function b(q){if(typeof q=="object"&&q!==null){var ne=q.$$typeof;switch(ne){case t:var he=q.type;switch(he){case n:case i:case r:case c:case u:return he;default:var ve=he&&he.$$typeof;switch(ve){case a:case s:case l:case d:case f:case o:return ve;default:return ne}}case e:return ne}}}var w=s,C=o,k=t,I=l,A=n,E=d,$=f,R=e,M=i,Q=r,Z=c,G=u,V=!1,ee=!1;function Y(q){return V||(V=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function z(q){return ee||(ee=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function D(q){return b(q)===s}function B(q){return b(q)===o}function N(q){return typeof q=="object"&&q!==null&&q.$$typeof===t}function U(q){return b(q)===l}function F(q){return b(q)===n}function te(q){return b(q)===d}function L(q){return b(q)===f}function ce(q){return b(q)===e}function re(q){return b(q)===i}function ae(q){return b(q)===r}function H(q){return b(q)===c}function pe(q){return b(q)===u}ft.ContextConsumer=w,ft.ContextProvider=C,ft.Element=k,ft.ForwardRef=I,ft.Fragment=A,ft.Lazy=E,ft.Memo=$,ft.Portal=R,ft.Profiler=M,ft.StrictMode=Q,ft.Suspense=Z,ft.SuspenseList=G,ft.isAsyncMode=Y,ft.isConcurrentMode=z,ft.isContextConsumer=D,ft.isContextProvider=B,ft.isElement=N,ft.isForwardRef=U,ft.isFragment=F,ft.isLazy=te,ft.isMemo=L,ft.isPortal=ce,ft.isProfiler=re,ft.isStrictMode=ae,ft.isSuspense=H,ft.isSuspenseList=pe,ft.isValidElementType=S,ft.typeOf=b}()),ft}process.env.NODE_ENV==="production"?Eg.exports=O5():Eg.exports=x5();var Go=Eg.exports;function v5(t){function e(D,B,N,U,F){for(var te=0,L=0,ce=0,re=0,ae,H,pe=0,q=0,ne,he=ne=ae=0,ve=0,Re=0,ye=0,Ee=0,$e=N.length,Le=$e-1,qe,be="",rt="",Ot="",Ut="",cn;ve<$e;){if(H=N.charCodeAt(ve),ve===Le&&L+re+ce+te!==0&&(L!==0&&(H=L===47?10:47),re=ce=te=0,$e++,Le++),L+re+ce+te===0){if(ve===Le&&(0<Re&&(be=be.replace(d,"")),0<be.trim().length)){switch(H){case 32:case 9:case 59:case 13:case 10:break;default:be+=N.charAt(ve)}H=59}switch(H){case 123:for(be=be.trim(),ae=be.charCodeAt(0),ne=1,Ee=++ve;ve<$e;){switch(H=N.charCodeAt(ve)){case 123:ne++;break;case 125:ne--;break;case 47:switch(H=N.charCodeAt(ve+1)){case 42:case 47:e:{for(he=ve+1;he<Le;++he)switch(N.charCodeAt(he)){case 47:if(H===42&&N.charCodeAt(he-1)===42&&ve+2!==he){ve=he+1;break e}break;case 10:if(H===47){ve=he+1;break e}}ve=he}}break;case 91:H++;case 40:H++;case 34:case 39:for(;ve++<Le&&N.charCodeAt(ve)!==H;);}if(ne===0)break;ve++}switch(ne=N.substring(Ee,ve),ae===0&&(ae=(be=be.replace(f,"").trim()).charCodeAt(0)),ae){case 64:switch(0<Re&&(be=be.replace(d,"")),H=be.charCodeAt(1),H){case 100:case 109:case 115:case 45:Re=B;break;default:Re=Z}if(ne=e(B,Re,ne,H,F+1),Ee=ne.length,0<V&&(Re=n(Z,be,ye),cn=a(3,ne,Re,B,R,$,Ee,H,F,U),be=Re.join(""),cn!==void 0&&(Ee=(ne=cn.trim()).length)===0&&(H=0,ne="")),0<Ee)switch(H){case 115:be=be.replace(w,s);case 100:case 109:case 45:ne=be+"{"+ne+"}";break;case 107:be=be.replace(v,"$1 $2"),ne=be+"{"+ne+"}",ne=Q===1||Q===2&&o("@"+ne,3)?"@-webkit-"+ne+"@"+ne:"@"+ne;break;default:ne=be+ne,U===112&&(ne=(rt+=ne,""))}else ne="";break;default:ne=e(B,n(B,be,ye),ne,U,F+1)}Ot+=ne,ne=ye=Re=he=ae=0,be="",H=N.charCodeAt(++ve);break;case 125:case 59:if(be=(0<Re?be.replace(d,""):be).trim(),1<(Ee=be.length))switch(he===0&&(ae=be.charCodeAt(0),ae===45||96<ae&&123>ae)&&(Ee=(be=be.replace(" ",":")).length),0<V&&(cn=a(1,be,B,D,R,$,rt.length,U,F,U))!==void 0&&(Ee=(be=cn.trim()).length)===0&&(be="\0\0"),ae=be.charCodeAt(0),H=be.charCodeAt(1),ae){case 0:break;case 64:if(H===105||H===99){Ut+=be+N.charAt(ve);break}default:be.charCodeAt(Ee-1)!==58&&(rt+=i(be,ae,H,be.charCodeAt(2)))}ye=Re=he=ae=0,be="",H=N.charCodeAt(++ve)}}switch(H){case 13:case 10:L===47?L=0:1+ae===0&&U!==107&&0<be.length&&(Re=1,be+="\0"),0<V*Y&&a(0,be,B,D,R,$,rt.length,U,F,U),$=1,R++;break;case 59:case 125:if(L+re+ce+te===0){$++;break}default:switch($++,qe=N.charAt(ve),H){case 9:case 32:if(re+te+L===0)switch(pe){case 44:case 58:case 9:case 32:qe="";break;default:H!==32&&(qe=" ")}break;case 0:qe="\\0";break;case 12:qe="\\f";break;case 11:qe="\\v";break;case 38:re+L+te===0&&(Re=ye=1,qe="\f"+qe);break;case 108:if(re+L+te+M===0&&0<he)switch(ve-he){case 2:pe===112&&N.charCodeAt(ve-3)===58&&(M=pe);case 8:q===111&&(M=q)}break;case 58:re+L+te===0&&(he=ve);break;case 44:L+ce+re+te===0&&(Re=1,qe+="\r");break;case 34:case 39:L===0&&(re=re===H?0:re===0?H:re);break;case 91:re+L+ce===0&&te++;break;case 93:re+L+ce===0&&te--;break;case 41:re+L+te===0&&ce--;break;case 40:if(re+L+te===0){if(ae===0)switch(2*pe+3*q){case 533:break;default:ae=1}ce++}break;case 64:L+ce+re+te+he+ne===0&&(ne=1);break;case 42:case 47:if(!(0<re+te+ce))switch(L){case 0:switch(2*H+3*N.charCodeAt(ve+1)){case 235:L=47;break;case 220:Ee=ve,L=42}break;case 42:H===47&&pe===42&&Ee+2!==ve&&(N.charCodeAt(Ee+2)===33&&(rt+=N.substring(Ee,ve+1)),qe="",L=0)}}L===0&&(be+=qe)}q=pe,pe=H,ve++}if(Ee=rt.length,0<Ee){if(Re=B,0<V&&(cn=a(2,rt,Re,D,R,$,Ee,U,F,U),cn!==void 0&&(rt=cn).length===0))return Ut+rt+Ot;if(rt=Re.join(",")+"{"+rt+"}",Q*M!==0){switch(Q!==2||o(rt,2)||(M=0),M){case 111:rt=rt.replace(S,":-moz-$1")+rt;break;case 112:rt=rt.replace(y,"::-webkit-input-$1")+rt.replace(y,"::-moz-$1")+rt.replace(y,":-ms-input-$1")+rt}M=0}}return Ut+rt+Ot}function n(D,B,N){var U=B.trim().split(m);B=U;var F=U.length,te=D.length;switch(te){case 0:case 1:var L=0;for(D=te===0?"":D[0]+" ";L<F;++L)B[L]=r(D,B[L],N).trim();break;default:var ce=L=0;for(B=[];L<F;++L)for(var re=0;re<te;++re)B[ce++]=r(D[re]+" ",U[L],N).trim()}return B}function r(D,B,N){var U=B.charCodeAt(0);switch(33>U&&(U=(B=B.trim()).charCodeAt(0)),U){case 38:return B.replace(x,"$1"+D.trim());case 58:return D.trim()+B.replace(x,"$1"+D.trim());default:if(0<1*N&&0<B.indexOf("\f"))return B.replace(x,(D.charCodeAt(0)===58?"":"$1")+D.trim())}return D+B}function i(D,B,N,U){var F=D+";",te=2*B+3*N+4*U;if(te===944){D=F.indexOf(":",9)+1;var L=F.substring(D,F.length-1).trim();return L=F.substring(0,D).trim()+L+";",Q===1||Q===2&&o(L,1)?"-webkit-"+L+L:L}if(Q===0||Q===2&&!o(F,1))return F;switch(te){case 1015:return F.charCodeAt(10)===97?"-webkit-"+F+F:F;case 951:return F.charCodeAt(3)===116?"-webkit-"+F+F:F;case 963:return F.charCodeAt(5)===110?"-webkit-"+F+F:F;case 1009:if(F.charCodeAt(4)!==100)break;case 969:case 942:return"-webkit-"+F+F;case 978:return"-webkit-"+F+"-moz-"+F+F;case 1019:case 983:return"-webkit-"+F+"-moz-"+F+"-ms-"+F+F;case 883:if(F.charCodeAt(8)===45)return"-webkit-"+F+F;if(0<F.indexOf("image-set(",11))return F.replace(E,"$1-webkit-$2")+F;break;case 932:if(F.charCodeAt(4)===45)switch(F.charCodeAt(5)){case 103:return"-webkit-box-"+F.replace("-grow","")+"-webkit-"+F+"-ms-"+F.replace("grow","positive")+F;case 115:return"-webkit-"+F+"-ms-"+F.replace("shrink","negative")+F;case 98:return"-webkit-"+F+"-ms-"+F.replace("basis","preferred-size")+F}return"-webkit-"+F+"-ms-"+F+F;case 964:return"-webkit-"+F+"-ms-flex-"+F+F;case 1023:if(F.charCodeAt(8)!==99)break;return L=F.substring(F.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),"-webkit-box-pack"+L+"-webkit-"+F+"-ms-flex-pack"+L+F;case 1005:return p.test(F)?F.replace(h,":-webkit-")+F.replace(h,":-moz-")+F:F;case 1e3:switch(L=F.substring(13).trim(),B=L.indexOf("-")+1,L.charCodeAt(0)+L.charCodeAt(B)){case 226:L=F.replace(b,"tb");break;case 232:L=F.replace(b,"tb-rl");break;case 220:L=F.replace(b,"lr");break;default:return F}return"-webkit-"+F+"-ms-"+L+F;case 1017:if(F.indexOf("sticky",9)===-1)break;case 975:switch(B=(F=D).length-10,L=(F.charCodeAt(B)===33?F.substring(0,B):F).substring(D.indexOf(":",7)+1).trim(),te=L.charCodeAt(0)+(L.charCodeAt(7)|0)){case 203:if(111>L.charCodeAt(8))break;case 115:F=F.replace(L,"-webkit-"+L)+";"+F;break;case 207:case 102:F=F.replace(L,"-webkit-"+(102<te?"inline-":"")+"box")+";"+F.replace(L,"-webkit-"+L)+";"+F.replace(L,"-ms-"+L+"box")+";"+F}return F+";";case 938:if(F.charCodeAt(5)===45)switch(F.charCodeAt(6)){case 105:return L=F.replace("-items",""),"-webkit-"+F+"-webkit-box-"+L+"-ms-flex-"+L+F;case 115:return"-webkit-"+F+"-ms-flex-item-"+F.replace(k,"")+F;default:return"-webkit-"+F+"-ms-flex-line-pack"+F.replace("align-content","").replace(k,"")+F}break;case 973:case 989:if(F.charCodeAt(3)!==45||F.charCodeAt(4)===122)break;case 931:case 953:if(A.test(D)===!0)return(L=D.substring(D.indexOf(":")+1)).charCodeAt(0)===115?i(D.replace("stretch","fill-available"),B,N,U).replace(":fill-available",":stretch"):F.replace(L,"-webkit-"+L)+F.replace(L,"-moz-"+L.replace("fill-",""))+F;break;case 962:if(F="-webkit-"+F+(F.charCodeAt(5)===102?"-ms-"+F:"")+F,N+U===211&&F.charCodeAt(13)===105&&0<F.indexOf("transform",10))return F.substring(0,F.indexOf(";",27)+1).replace(O,"$1-webkit-$2")+F}return F}function o(D,B){var N=D.indexOf(B===1?":":"{"),U=D.substring(0,B!==3?N:10);return N=D.substring(N+1,D.length-1),ee(B!==2?U:U.replace(I,"$1"),N,B)}function s(D,B){var N=i(B,B.charCodeAt(0),B.charCodeAt(1),B.charCodeAt(2));return N!==B+";"?N.replace(C," or ($1)").substring(4):"("+B+")"}function a(D,B,N,U,F,te,L,ce,re,ae){for(var H=0,pe=B,q;H<V;++H)switch(q=G[H].call(u,D,pe,N,U,F,te,L,ce,re,ae)){case void 0:case!1:case!0:case null:break;default:pe=q}if(pe!==B)return pe}function l(D){switch(D){case void 0:case null:V=G.length=0;break;default:if(typeof D=="function")G[V++]=D;else if(typeof D=="object")for(var B=0,N=D.length;B<N;++B)l(D[B]);else Y=!!D|0}return l}function c(D){return D=D.prefix,D!==void 0&&(ee=null,D?typeof D!="function"?Q=1:(Q=2,ee=D):Q=0),c}function u(D,B){var N=D;if(33>N.charCodeAt(0)&&(N=N.trim()),z=N,N=[z],0<V){var U=a(-1,B,N,N,R,$,0,0,0,0);U!==void 0&&typeof U=="string"&&(B=U)}var F=e(Z,N,B,0,0);return 0<V&&(U=a(-2,F,N,N,R,$,F.length,0,0,0),U!==void 0&&(F=U)),z="",M=0,$=R=1,F}var f=/^\0+/g,d=/[\0\r\f]/g,h=/: */g,p=/zoo|gra/,O=/([,: ])(transform)/g,m=/,\r+?/g,x=/([\t\r\n ])*\f?&/g,v=/@(k\w+)\s*(\S*)\s*/,y=/::(place)/g,S=/:(read-only)/g,b=/[svh]\w+-[tblr]{2}/,w=/\(\s*(.*)\s*\)/g,C=/([\s\S]*?);/g,k=/-self|flex-/g,I=/[^]*?(:[rp][el]a[\w-]+)[^]*/,A=/stretch|:\s*\w+\-(?:conte|avail)/,E=/([^-])(image-set\()/,$=1,R=1,M=0,Q=1,Z=[],G=[],V=0,ee=null,Y=0,z="";return u.use=l,u.set=c,t!==void 0&&c(t),u}var y5={animationIterationCount: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};function hk(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var b5=/^((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|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)-.*))$/,uv=hk(function(t){return b5.test(t)||t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)<91}),Ig={exports:{}},dt={};/** @license React v16.13.1
41
+ */var cv;function x5(){return cv||(cv=1,process.env.NODE_ENV!=="production"&&function(){var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),a=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),p=!1,O=!1,m=!1,x=!1,v=!1,y;y=Symbol.for("react.module.reference");function S(q){return!!(typeof q=="string"||typeof q=="function"||q===n||q===i||v||q===r||q===c||q===u||x||q===h||p||O||m||typeof q=="object"&&q!==null&&(q.$$typeof===d||q.$$typeof===f||q.$$typeof===o||q.$$typeof===s||q.$$typeof===l||q.$$typeof===y||q.getModuleId!==void 0))}function b(q){if(typeof q=="object"&&q!==null){var ne=q.$$typeof;switch(ne){case t:var he=q.type;switch(he){case n:case i:case r:case c:case u:return he;default:var ve=he&&he.$$typeof;switch(ve){case a:case s:case l:case d:case f:case o:return ve;default:return ne}}case e:return ne}}}var w=s,C=o,k=t,I=l,A=n,E=d,$=f,R=e,M=i,Q=r,Z=c,G=u,V=!1,ee=!1;function Y(q){return V||(V=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function z(q){return ee||(ee=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function D(q){return b(q)===s}function B(q){return b(q)===o}function N(q){return typeof q=="object"&&q!==null&&q.$$typeof===t}function U(q){return b(q)===l}function F(q){return b(q)===n}function te(q){return b(q)===d}function L(q){return b(q)===f}function ce(q){return b(q)===e}function re(q){return b(q)===i}function ae(q){return b(q)===r}function H(q){return b(q)===c}function pe(q){return b(q)===u}ft.ContextConsumer=w,ft.ContextProvider=C,ft.Element=k,ft.ForwardRef=I,ft.Fragment=A,ft.Lazy=E,ft.Memo=$,ft.Portal=R,ft.Profiler=M,ft.StrictMode=Q,ft.Suspense=Z,ft.SuspenseList=G,ft.isAsyncMode=Y,ft.isConcurrentMode=z,ft.isContextConsumer=D,ft.isContextProvider=B,ft.isElement=N,ft.isForwardRef=U,ft.isFragment=F,ft.isLazy=te,ft.isMemo=L,ft.isPortal=ce,ft.isProfiler=re,ft.isStrictMode=ae,ft.isSuspense=H,ft.isSuspenseList=pe,ft.isValidElementType=S,ft.typeOf=b}()),ft}process.env.NODE_ENV==="production"?Eg.exports=O5():Eg.exports=x5();var Yo=Eg.exports;function v5(t){function e(D,B,N,U,F){for(var te=0,L=0,ce=0,re=0,ae,H,pe=0,q=0,ne,he=ne=ae=0,ve=0,Re=0,ye=0,Ee=0,$e=N.length,Le=$e-1,qe,be="",rt="",Ot="",Ut="",cn;ve<$e;){if(H=N.charCodeAt(ve),ve===Le&&L+re+ce+te!==0&&(L!==0&&(H=L===47?10:47),re=ce=te=0,$e++,Le++),L+re+ce+te===0){if(ve===Le&&(0<Re&&(be=be.replace(d,"")),0<be.trim().length)){switch(H){case 32:case 9:case 59:case 13:case 10:break;default:be+=N.charAt(ve)}H=59}switch(H){case 123:for(be=be.trim(),ae=be.charCodeAt(0),ne=1,Ee=++ve;ve<$e;){switch(H=N.charCodeAt(ve)){case 123:ne++;break;case 125:ne--;break;case 47:switch(H=N.charCodeAt(ve+1)){case 42:case 47:e:{for(he=ve+1;he<Le;++he)switch(N.charCodeAt(he)){case 47:if(H===42&&N.charCodeAt(he-1)===42&&ve+2!==he){ve=he+1;break e}break;case 10:if(H===47){ve=he+1;break e}}ve=he}}break;case 91:H++;case 40:H++;case 34:case 39:for(;ve++<Le&&N.charCodeAt(ve)!==H;);}if(ne===0)break;ve++}switch(ne=N.substring(Ee,ve),ae===0&&(ae=(be=be.replace(f,"").trim()).charCodeAt(0)),ae){case 64:switch(0<Re&&(be=be.replace(d,"")),H=be.charCodeAt(1),H){case 100:case 109:case 115:case 45:Re=B;break;default:Re=Z}if(ne=e(B,Re,ne,H,F+1),Ee=ne.length,0<V&&(Re=n(Z,be,ye),cn=a(3,ne,Re,B,R,$,Ee,H,F,U),be=Re.join(""),cn!==void 0&&(Ee=(ne=cn.trim()).length)===0&&(H=0,ne="")),0<Ee)switch(H){case 115:be=be.replace(w,s);case 100:case 109:case 45:ne=be+"{"+ne+"}";break;case 107:be=be.replace(v,"$1 $2"),ne=be+"{"+ne+"}",ne=Q===1||Q===2&&o("@"+ne,3)?"@-webkit-"+ne+"@"+ne:"@"+ne;break;default:ne=be+ne,U===112&&(ne=(rt+=ne,""))}else ne="";break;default:ne=e(B,n(B,be,ye),ne,U,F+1)}Ot+=ne,ne=ye=Re=he=ae=0,be="",H=N.charCodeAt(++ve);break;case 125:case 59:if(be=(0<Re?be.replace(d,""):be).trim(),1<(Ee=be.length))switch(he===0&&(ae=be.charCodeAt(0),ae===45||96<ae&&123>ae)&&(Ee=(be=be.replace(" ",":")).length),0<V&&(cn=a(1,be,B,D,R,$,rt.length,U,F,U))!==void 0&&(Ee=(be=cn.trim()).length)===0&&(be="\0\0"),ae=be.charCodeAt(0),H=be.charCodeAt(1),ae){case 0:break;case 64:if(H===105||H===99){Ut+=be+N.charAt(ve);break}default:be.charCodeAt(Ee-1)!==58&&(rt+=i(be,ae,H,be.charCodeAt(2)))}ye=Re=he=ae=0,be="",H=N.charCodeAt(++ve)}}switch(H){case 13:case 10:L===47?L=0:1+ae===0&&U!==107&&0<be.length&&(Re=1,be+="\0"),0<V*Y&&a(0,be,B,D,R,$,rt.length,U,F,U),$=1,R++;break;case 59:case 125:if(L+re+ce+te===0){$++;break}default:switch($++,qe=N.charAt(ve),H){case 9:case 32:if(re+te+L===0)switch(pe){case 44:case 58:case 9:case 32:qe="";break;default:H!==32&&(qe=" ")}break;case 0:qe="\\0";break;case 12:qe="\\f";break;case 11:qe="\\v";break;case 38:re+L+te===0&&(Re=ye=1,qe="\f"+qe);break;case 108:if(re+L+te+M===0&&0<he)switch(ve-he){case 2:pe===112&&N.charCodeAt(ve-3)===58&&(M=pe);case 8:q===111&&(M=q)}break;case 58:re+L+te===0&&(he=ve);break;case 44:L+ce+re+te===0&&(Re=1,qe+="\r");break;case 34:case 39:L===0&&(re=re===H?0:re===0?H:re);break;case 91:re+L+ce===0&&te++;break;case 93:re+L+ce===0&&te--;break;case 41:re+L+te===0&&ce--;break;case 40:if(re+L+te===0){if(ae===0)switch(2*pe+3*q){case 533:break;default:ae=1}ce++}break;case 64:L+ce+re+te+he+ne===0&&(ne=1);break;case 42:case 47:if(!(0<re+te+ce))switch(L){case 0:switch(2*H+3*N.charCodeAt(ve+1)){case 235:L=47;break;case 220:Ee=ve,L=42}break;case 42:H===47&&pe===42&&Ee+2!==ve&&(N.charCodeAt(Ee+2)===33&&(rt+=N.substring(Ee,ve+1)),qe="",L=0)}}L===0&&(be+=qe)}q=pe,pe=H,ve++}if(Ee=rt.length,0<Ee){if(Re=B,0<V&&(cn=a(2,rt,Re,D,R,$,Ee,U,F,U),cn!==void 0&&(rt=cn).length===0))return Ut+rt+Ot;if(rt=Re.join(",")+"{"+rt+"}",Q*M!==0){switch(Q!==2||o(rt,2)||(M=0),M){case 111:rt=rt.replace(S,":-moz-$1")+rt;break;case 112:rt=rt.replace(y,"::-webkit-input-$1")+rt.replace(y,"::-moz-$1")+rt.replace(y,":-ms-input-$1")+rt}M=0}}return Ut+rt+Ot}function n(D,B,N){var U=B.trim().split(m);B=U;var F=U.length,te=D.length;switch(te){case 0:case 1:var L=0;for(D=te===0?"":D[0]+" ";L<F;++L)B[L]=r(D,B[L],N).trim();break;default:var ce=L=0;for(B=[];L<F;++L)for(var re=0;re<te;++re)B[ce++]=r(D[re]+" ",U[L],N).trim()}return B}function r(D,B,N){var U=B.charCodeAt(0);switch(33>U&&(U=(B=B.trim()).charCodeAt(0)),U){case 38:return B.replace(x,"$1"+D.trim());case 58:return D.trim()+B.replace(x,"$1"+D.trim());default:if(0<1*N&&0<B.indexOf("\f"))return B.replace(x,(D.charCodeAt(0)===58?"":"$1")+D.trim())}return D+B}function i(D,B,N,U){var F=D+";",te=2*B+3*N+4*U;if(te===944){D=F.indexOf(":",9)+1;var L=F.substring(D,F.length-1).trim();return L=F.substring(0,D).trim()+L+";",Q===1||Q===2&&o(L,1)?"-webkit-"+L+L:L}if(Q===0||Q===2&&!o(F,1))return F;switch(te){case 1015:return F.charCodeAt(10)===97?"-webkit-"+F+F:F;case 951:return F.charCodeAt(3)===116?"-webkit-"+F+F:F;case 963:return F.charCodeAt(5)===110?"-webkit-"+F+F:F;case 1009:if(F.charCodeAt(4)!==100)break;case 969:case 942:return"-webkit-"+F+F;case 978:return"-webkit-"+F+"-moz-"+F+F;case 1019:case 983:return"-webkit-"+F+"-moz-"+F+"-ms-"+F+F;case 883:if(F.charCodeAt(8)===45)return"-webkit-"+F+F;if(0<F.indexOf("image-set(",11))return F.replace(E,"$1-webkit-$2")+F;break;case 932:if(F.charCodeAt(4)===45)switch(F.charCodeAt(5)){case 103:return"-webkit-box-"+F.replace("-grow","")+"-webkit-"+F+"-ms-"+F.replace("grow","positive")+F;case 115:return"-webkit-"+F+"-ms-"+F.replace("shrink","negative")+F;case 98:return"-webkit-"+F+"-ms-"+F.replace("basis","preferred-size")+F}return"-webkit-"+F+"-ms-"+F+F;case 964:return"-webkit-"+F+"-ms-flex-"+F+F;case 1023:if(F.charCodeAt(8)!==99)break;return L=F.substring(F.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),"-webkit-box-pack"+L+"-webkit-"+F+"-ms-flex-pack"+L+F;case 1005:return p.test(F)?F.replace(h,":-webkit-")+F.replace(h,":-moz-")+F:F;case 1e3:switch(L=F.substring(13).trim(),B=L.indexOf("-")+1,L.charCodeAt(0)+L.charCodeAt(B)){case 226:L=F.replace(b,"tb");break;case 232:L=F.replace(b,"tb-rl");break;case 220:L=F.replace(b,"lr");break;default:return F}return"-webkit-"+F+"-ms-"+L+F;case 1017:if(F.indexOf("sticky",9)===-1)break;case 975:switch(B=(F=D).length-10,L=(F.charCodeAt(B)===33?F.substring(0,B):F).substring(D.indexOf(":",7)+1).trim(),te=L.charCodeAt(0)+(L.charCodeAt(7)|0)){case 203:if(111>L.charCodeAt(8))break;case 115:F=F.replace(L,"-webkit-"+L)+";"+F;break;case 207:case 102:F=F.replace(L,"-webkit-"+(102<te?"inline-":"")+"box")+";"+F.replace(L,"-webkit-"+L)+";"+F.replace(L,"-ms-"+L+"box")+";"+F}return F+";";case 938:if(F.charCodeAt(5)===45)switch(F.charCodeAt(6)){case 105:return L=F.replace("-items",""),"-webkit-"+F+"-webkit-box-"+L+"-ms-flex-"+L+F;case 115:return"-webkit-"+F+"-ms-flex-item-"+F.replace(k,"")+F;default:return"-webkit-"+F+"-ms-flex-line-pack"+F.replace("align-content","").replace(k,"")+F}break;case 973:case 989:if(F.charCodeAt(3)!==45||F.charCodeAt(4)===122)break;case 931:case 953:if(A.test(D)===!0)return(L=D.substring(D.indexOf(":")+1)).charCodeAt(0)===115?i(D.replace("stretch","fill-available"),B,N,U).replace(":fill-available",":stretch"):F.replace(L,"-webkit-"+L)+F.replace(L,"-moz-"+L.replace("fill-",""))+F;break;case 962:if(F="-webkit-"+F+(F.charCodeAt(5)===102?"-ms-"+F:"")+F,N+U===211&&F.charCodeAt(13)===105&&0<F.indexOf("transform",10))return F.substring(0,F.indexOf(";",27)+1).replace(O,"$1-webkit-$2")+F}return F}function o(D,B){var N=D.indexOf(B===1?":":"{"),U=D.substring(0,B!==3?N:10);return N=D.substring(N+1,D.length-1),ee(B!==2?U:U.replace(I,"$1"),N,B)}function s(D,B){var N=i(B,B.charCodeAt(0),B.charCodeAt(1),B.charCodeAt(2));return N!==B+";"?N.replace(C," or ($1)").substring(4):"("+B+")"}function a(D,B,N,U,F,te,L,ce,re,ae){for(var H=0,pe=B,q;H<V;++H)switch(q=G[H].call(u,D,pe,N,U,F,te,L,ce,re,ae)){case void 0:case!1:case!0:case null:break;default:pe=q}if(pe!==B)return pe}function l(D){switch(D){case void 0:case null:V=G.length=0;break;default:if(typeof D=="function")G[V++]=D;else if(typeof D=="object")for(var B=0,N=D.length;B<N;++B)l(D[B]);else Y=!!D|0}return l}function c(D){return D=D.prefix,D!==void 0&&(ee=null,D?typeof D!="function"?Q=1:(Q=2,ee=D):Q=0),c}function u(D,B){var N=D;if(33>N.charCodeAt(0)&&(N=N.trim()),z=N,N=[z],0<V){var U=a(-1,B,N,N,R,$,0,0,0,0);U!==void 0&&typeof U=="string"&&(B=U)}var F=e(Z,N,B,0,0);return 0<V&&(U=a(-2,F,N,N,R,$,F.length,0,0,0),U!==void 0&&(F=U)),z="",M=0,$=R=1,F}var f=/^\0+/g,d=/[\0\r\f]/g,h=/: */g,p=/zoo|gra/,O=/([,: ])(transform)/g,m=/,\r+?/g,x=/([\t\r\n ])*\f?&/g,v=/@(k\w+)\s*(\S*)\s*/,y=/::(place)/g,S=/:(read-only)/g,b=/[svh]\w+-[tblr]{2}/,w=/\(\s*(.*)\s*\)/g,C=/([\s\S]*?);/g,k=/-self|flex-/g,I=/[^]*?(:[rp][el]a[\w-]+)[^]*/,A=/stretch|:\s*\w+\-(?:conte|avail)/,E=/([^-])(image-set\()/,$=1,R=1,M=0,Q=1,Z=[],G=[],V=0,ee=null,Y=0,z="";return u.use=l,u.set=c,t!==void 0&&c(t),u}var y5={animationIterationCount: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};function hk(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var b5=/^((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|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)-.*))$/,uv=hk(function(t){return b5.test(t)||t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)<91}),Ig={exports:{}},dt={};/** @license React v16.13.1
42
42
  * react-is.production.min.js
43
43
  *
44
44
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -52,7 +52,7 @@ Check the top-level render call using <`+ue+">.")}return oe}}function rr(W,oe){{
52
52
  *
53
53
  * This source code is licensed under the MIT license found in the
54
54
  * LICENSE file in the root directory of this source tree.
55
- */var dv;function w5(){return dv||(dv=1,process.env.NODE_ENV!=="production"&&function(){var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,i=t?Symbol.for("react.strict_mode"):60108,o=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,a=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,c=t?Symbol.for("react.concurrent_mode"):60111,u=t?Symbol.for("react.forward_ref"):60112,f=t?Symbol.for("react.suspense"):60113,d=t?Symbol.for("react.suspense_list"):60120,h=t?Symbol.for("react.memo"):60115,p=t?Symbol.for("react.lazy"):60116,O=t?Symbol.for("react.block"):60121,m=t?Symbol.for("react.fundamental"):60117,x=t?Symbol.for("react.responder"):60118,v=t?Symbol.for("react.scope"):60119;function y(H){return typeof H=="string"||typeof H=="function"||H===r||H===c||H===o||H===i||H===f||H===d||typeof H=="object"&&H!==null&&(H.$$typeof===p||H.$$typeof===h||H.$$typeof===s||H.$$typeof===a||H.$$typeof===u||H.$$typeof===m||H.$$typeof===x||H.$$typeof===v||H.$$typeof===O)}function S(H){if(typeof H=="object"&&H!==null){var pe=H.$$typeof;switch(pe){case e:var q=H.type;switch(q){case l:case c:case r:case o:case i:case f:return q;default:var ne=q&&q.$$typeof;switch(ne){case a:case u:case p:case h:case s:return ne;default:return pe}}case n:return pe}}}var b=l,w=c,C=a,k=s,I=e,A=u,E=r,$=p,R=h,M=n,Q=o,Z=i,G=f,V=!1;function ee(H){return V||(V=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),Y(H)||S(H)===l}function Y(H){return S(H)===c}function z(H){return S(H)===a}function D(H){return S(H)===s}function B(H){return typeof H=="object"&&H!==null&&H.$$typeof===e}function N(H){return S(H)===u}function U(H){return S(H)===r}function F(H){return S(H)===p}function te(H){return S(H)===h}function L(H){return S(H)===n}function ce(H){return S(H)===o}function re(H){return S(H)===i}function ae(H){return S(H)===f}ht.AsyncMode=b,ht.ConcurrentMode=w,ht.ContextConsumer=C,ht.ContextProvider=k,ht.Element=I,ht.ForwardRef=A,ht.Fragment=E,ht.Lazy=$,ht.Memo=R,ht.Portal=M,ht.Profiler=Q,ht.StrictMode=Z,ht.Suspense=G,ht.isAsyncMode=ee,ht.isConcurrentMode=Y,ht.isContextConsumer=z,ht.isContextProvider=D,ht.isElement=B,ht.isForwardRef=N,ht.isFragment=U,ht.isLazy=F,ht.isMemo=te,ht.isPortal=L,ht.isProfiler=ce,ht.isStrictMode=re,ht.isSuspense=ae,ht.isValidElementType=y,ht.typeOf=S}()),ht}process.env.NODE_ENV==="production"?Ig.exports=S5():Ig.exports=w5();var C5=Ig.exports,iO=C5,k5={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},A5={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},P5={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},pk={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},oO={};oO[iO.ForwardRef]=P5;oO[iO.Memo]=pk;function hv(t){return iO.isMemo(t)?pk:oO[t.$$typeof]||k5}var E5=Object.defineProperty,I5=Object.getOwnPropertyNames,pv=Object.getOwnPropertySymbols,T5=Object.getOwnPropertyDescriptor,$5=Object.getPrototypeOf,gv=Object.prototype;function gk(t,e,n){if(typeof e!="string"){if(gv){var r=$5(e);r&&r!==gv&&gk(t,r,n)}var i=I5(e);pv&&(i=i.concat(pv(e)));for(var o=hv(t),s=hv(e),a=0;a<i.length;++a){var l=i[a];if(!A5[l]&&!(n&&n[l])&&!(s&&s[l])&&!(o&&o[l])){var c=T5(e,l);try{E5(t,l,c)}catch{}}}}return t}var j5=gk;const R5=wa(j5);function Di(){return(Di=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}var mv=function(t,e){for(var n=[t[0]],r=0,i=e.length;r<i;r+=1)n.push(e[r],t[r+1]);return n},Tg=function(t){return t!==null&&typeof t=="object"&&(t.toString?t.toString():Object.prototype.toString.call(t))==="[object Object]"&&!Go.typeOf(t)},tf=Object.freeze([]),lo=Object.freeze({});function Tl(t){return typeof t=="function"}function $g(t){return process.env.NODE_ENV!=="production"&&typeof t=="string"&&t||t.displayName||t.name||"Component"}function sO(t){return t&&typeof t.styledComponentId=="string"}var ea=typeof process<"u"&&process.env!==void 0&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",aO=typeof window<"u"&&"HTMLElement"in window,D5=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&process.env!==void 0&&(process.env.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&process.env.REACT_APP_SC_DISABLE_SPEEDY!==""?process.env.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&process.env.REACT_APP_SC_DISABLE_SPEEDY:process.env.SC_DISABLE_SPEEDY!==void 0&&process.env.SC_DISABLE_SPEEDY!==""?process.env.SC_DISABLE_SPEEDY!=="false"&&process.env.SC_DISABLE_SPEEDY:process.env.NODE_ENV!=="production")),Q5=process.env.NODE_ENV!=="production"?{1:`Cannot create styled-component for component: %s.
55
+ */var dv;function w5(){return dv||(dv=1,process.env.NODE_ENV!=="production"&&function(){var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,i=t?Symbol.for("react.strict_mode"):60108,o=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,a=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,c=t?Symbol.for("react.concurrent_mode"):60111,u=t?Symbol.for("react.forward_ref"):60112,f=t?Symbol.for("react.suspense"):60113,d=t?Symbol.for("react.suspense_list"):60120,h=t?Symbol.for("react.memo"):60115,p=t?Symbol.for("react.lazy"):60116,O=t?Symbol.for("react.block"):60121,m=t?Symbol.for("react.fundamental"):60117,x=t?Symbol.for("react.responder"):60118,v=t?Symbol.for("react.scope"):60119;function y(H){return typeof H=="string"||typeof H=="function"||H===r||H===c||H===o||H===i||H===f||H===d||typeof H=="object"&&H!==null&&(H.$$typeof===p||H.$$typeof===h||H.$$typeof===s||H.$$typeof===a||H.$$typeof===u||H.$$typeof===m||H.$$typeof===x||H.$$typeof===v||H.$$typeof===O)}function S(H){if(typeof H=="object"&&H!==null){var pe=H.$$typeof;switch(pe){case e:var q=H.type;switch(q){case l:case c:case r:case o:case i:case f:return q;default:var ne=q&&q.$$typeof;switch(ne){case a:case u:case p:case h:case s:return ne;default:return pe}}case n:return pe}}}var b=l,w=c,C=a,k=s,I=e,A=u,E=r,$=p,R=h,M=n,Q=o,Z=i,G=f,V=!1;function ee(H){return V||(V=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),Y(H)||S(H)===l}function Y(H){return S(H)===c}function z(H){return S(H)===a}function D(H){return S(H)===s}function B(H){return typeof H=="object"&&H!==null&&H.$$typeof===e}function N(H){return S(H)===u}function U(H){return S(H)===r}function F(H){return S(H)===p}function te(H){return S(H)===h}function L(H){return S(H)===n}function ce(H){return S(H)===o}function re(H){return S(H)===i}function ae(H){return S(H)===f}ht.AsyncMode=b,ht.ConcurrentMode=w,ht.ContextConsumer=C,ht.ContextProvider=k,ht.Element=I,ht.ForwardRef=A,ht.Fragment=E,ht.Lazy=$,ht.Memo=R,ht.Portal=M,ht.Profiler=Q,ht.StrictMode=Z,ht.Suspense=G,ht.isAsyncMode=ee,ht.isConcurrentMode=Y,ht.isContextConsumer=z,ht.isContextProvider=D,ht.isElement=B,ht.isForwardRef=N,ht.isFragment=U,ht.isLazy=F,ht.isMemo=te,ht.isPortal=L,ht.isProfiler=ce,ht.isStrictMode=re,ht.isSuspense=ae,ht.isValidElementType=y,ht.typeOf=S}()),ht}process.env.NODE_ENV==="production"?Ig.exports=S5():Ig.exports=w5();var C5=Ig.exports,iO=C5,k5={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},A5={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},P5={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},pk={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},oO={};oO[iO.ForwardRef]=P5;oO[iO.Memo]=pk;function hv(t){return iO.isMemo(t)?pk:oO[t.$$typeof]||k5}var E5=Object.defineProperty,I5=Object.getOwnPropertyNames,pv=Object.getOwnPropertySymbols,T5=Object.getOwnPropertyDescriptor,$5=Object.getPrototypeOf,gv=Object.prototype;function gk(t,e,n){if(typeof e!="string"){if(gv){var r=$5(e);r&&r!==gv&&gk(t,r,n)}var i=I5(e);pv&&(i=i.concat(pv(e)));for(var o=hv(t),s=hv(e),a=0;a<i.length;++a){var l=i[a];if(!A5[l]&&!(n&&n[l])&&!(s&&s[l])&&!(o&&o[l])){var c=T5(e,l);try{E5(t,l,c)}catch{}}}}return t}var j5=gk;const R5=wa(j5);function Di(){return(Di=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}var mv=function(t,e){for(var n=[t[0]],r=0,i=e.length;r<i;r+=1)n.push(e[r],t[r+1]);return n},Tg=function(t){return t!==null&&typeof t=="object"&&(t.toString?t.toString():Object.prototype.toString.call(t))==="[object Object]"&&!Yo.typeOf(t)},tf=Object.freeze([]),lo=Object.freeze({});function Tl(t){return typeof t=="function"}function $g(t){return process.env.NODE_ENV!=="production"&&typeof t=="string"&&t||t.displayName||t.name||"Component"}function sO(t){return t&&typeof t.styledComponentId=="string"}var ea=typeof process<"u"&&process.env!==void 0&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",aO=typeof window<"u"&&"HTMLElement"in window,D5=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&process.env!==void 0&&(process.env.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&process.env.REACT_APP_SC_DISABLE_SPEEDY!==""?process.env.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&process.env.REACT_APP_SC_DISABLE_SPEEDY:process.env.SC_DISABLE_SPEEDY!==void 0&&process.env.SC_DISABLE_SPEEDY!==""?process.env.SC_DISABLE_SPEEDY!=="false"&&process.env.SC_DISABLE_SPEEDY:process.env.NODE_ENV!=="production")),Q5=process.env.NODE_ENV!=="production"?{1:`Cannot create styled-component for component: %s.
56
56
 
57
57
  `,2:`Can't collect styles once you've consumed a \`ServerStyleSheet\`'s styles! \`ServerStyleSheet\` is a one off instance for each server-side render cycle.
58
58
 
@@ -96,7 +96,7 @@ Has styled-components' style tag been unmounted or altered by another script?
96
96
  `}:{};function B5(){for(var t=arguments.length<=0?void 0:arguments[0],e=[],n=1,r=arguments.length;n<r;n+=1)e.push(n<0||arguments.length<=n?void 0:arguments[n]);return e.forEach(function(i){t=t.replace(/%[a-z]/,i)}),t}function Ca(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];throw process.env.NODE_ENV==="production"?new Error("An error occurred. See https://git.io/JUIaE#"+t+" for more information."+(n.length>0?" Args: "+n.join(", "):"")):new Error(B5.apply(void 0,[Q5[t]].concat(n)).trim())}var _5=function(){function t(n){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=n}var e=t.prototype;return e.indexOfGroup=function(n){for(var r=0,i=0;i<n;i++)r+=this.groupSizes[i];return r},e.insertRules=function(n,r){if(n>=this.groupSizes.length){for(var i=this.groupSizes,o=i.length,s=o;n>=s;)(s<<=1)<0&&Ca(16,""+n);this.groupSizes=new Uint32Array(s),this.groupSizes.set(i),this.length=s;for(var a=o;a<s;a++)this.groupSizes[a]=0}for(var l=this.indexOfGroup(n+1),c=0,u=r.length;c<u;c++)this.tag.insertRule(l,r[c])&&(this.groupSizes[n]++,l++)},e.clearGroup=function(n){if(n<this.length){var r=this.groupSizes[n],i=this.indexOfGroup(n),o=i+r;this.groupSizes[n]=0;for(var s=i;s<o;s++)this.tag.deleteRule(i)}},e.getGroup=function(n){var r="";if(n>=this.length||this.groupSizes[n]===0)return r;for(var i=this.groupSizes[n],o=this.indexOfGroup(n),s=o+i,a=o;a<s;a++)r+=this.tag.getRule(a)+`/*!sc*/
97
97
  `;return r},t}(),Iu=new Map,nf=new Map,yl=1,Fc=function(t){if(Iu.has(t))return Iu.get(t);for(;nf.has(yl);)yl++;var e=yl++;return process.env.NODE_ENV!=="production"&&((0|e)<0||e>1<<30)&&Ca(16,""+e),Iu.set(t,e),nf.set(e,t),e},M5=function(t){return nf.get(t)},N5=function(t,e){e>=yl&&(yl=e+1),Iu.set(t,e),nf.set(e,t)},F5="style["+ea+'][data-styled-version="5.3.11"]',Z5=new RegExp("^"+ea+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),W5=function(t,e,n){for(var r,i=n.split(","),o=0,s=i.length;o<s;o++)(r=i[o])&&t.registerName(e,r)},V5=function(t,e){for(var n=(e.textContent||"").split(`/*!sc*/
98
98
  `),r=[],i=0,o=n.length;i<o;i++){var s=n[i].trim();if(s){var a=s.match(Z5);if(a){var l=0|parseInt(a[1],10),c=a[2];l!==0&&(N5(c,l),W5(t,c,a[3]),t.getTag().insertRules(l,r)),r.length=0}else r.push(s)}}},z5=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:null},mk=function(t){var e=document.head,n=t||e,r=document.createElement("style"),i=function(a){for(var l=a.childNodes,c=l.length;c>=0;c--){var u=l[c];if(u&&u.nodeType===1&&u.hasAttribute(ea))return u}}(n),o=i!==void 0?i.nextSibling:null;r.setAttribute(ea,"active"),r.setAttribute("data-styled-version","5.3.11");var s=z5();return s&&r.setAttribute("nonce",s),n.insertBefore(r,o),r},L5=function(){function t(n){var r=this.element=mk(n);r.appendChild(document.createTextNode("")),this.sheet=function(i){if(i.sheet)return i.sheet;for(var o=document.styleSheets,s=0,a=o.length;s<a;s++){var l=o[s];if(l.ownerNode===i)return l}Ca(17)}(r),this.length=0}var e=t.prototype;return e.insertRule=function(n,r){try{return this.sheet.insertRule(r,n),this.length++,!0}catch{return!1}},e.deleteRule=function(n){this.sheet.deleteRule(n),this.length--},e.getRule=function(n){var r=this.sheet.cssRules[n];return r!==void 0&&typeof r.cssText=="string"?r.cssText:""},t}(),X5=function(){function t(n){var r=this.element=mk(n);this.nodes=r.childNodes,this.length=0}var e=t.prototype;return e.insertRule=function(n,r){if(n<=this.length&&n>=0){var i=document.createTextNode(r),o=this.nodes[n];return this.element.insertBefore(i,o||null),this.length++,!0}return!1},e.deleteRule=function(n){this.element.removeChild(this.nodes[n]),this.length--},e.getRule=function(n){return n<this.length?this.nodes[n].textContent:""},t}(),G5=function(){function t(n){this.rules=[],this.length=0}var e=t.prototype;return e.insertRule=function(n,r){return n<=this.length&&(this.rules.splice(n,0,r),this.length++,!0)},e.deleteRule=function(n){this.rules.splice(n,1),this.length--},e.getRule=function(n){return n<this.length?this.rules[n]:""},t}(),Ov=aO,Y5={isServer:!aO,useCSSOMInjection:!D5},Ok=function(){function t(n,r,i){n===void 0&&(n=lo),r===void 0&&(r={}),this.options=Di({},Y5,{},n),this.gs=r,this.names=new Map(i),this.server=!!n.isServer,!this.server&&aO&&Ov&&(Ov=!1,function(o){for(var s=document.querySelectorAll(F5),a=0,l=s.length;a<l;a++){var c=s[a];c&&c.getAttribute(ea)!=="active"&&(V5(o,c),c.parentNode&&c.parentNode.removeChild(c))}}(this))}t.registerId=function(n){return Fc(n)};var e=t.prototype;return e.reconstructWithOptions=function(n,r){return r===void 0&&(r=!0),new t(Di({},this.options,{},n),this.gs,r&&this.names||void 0)},e.allocateGSInstance=function(n){return this.gs[n]=(this.gs[n]||0)+1},e.getTag=function(){return this.tag||(this.tag=(i=(r=this.options).isServer,o=r.useCSSOMInjection,s=r.target,n=i?new G5(s):o?new L5(s):new X5(s),new _5(n)));var n,r,i,o,s},e.hasNameForId=function(n,r){return this.names.has(n)&&this.names.get(n).has(r)},e.registerName=function(n,r){if(Fc(n),this.names.has(n))this.names.get(n).add(r);else{var i=new Set;i.add(r),this.names.set(n,i)}},e.insertRules=function(n,r,i){this.registerName(n,r),this.getTag().insertRules(Fc(n),i)},e.clearNames=function(n){this.names.has(n)&&this.names.get(n).clear()},e.clearRules=function(n){this.getTag().clearGroup(Fc(n)),this.clearNames(n)},e.clearTag=function(){this.tag=void 0},e.toString=function(){return function(n){for(var r=n.getTag(),i=r.length,o="",s=0;s<i;s++){var a=M5(s);if(a!==void 0){var l=n.names.get(a),c=r.getGroup(s);if(l&&c&&l.size){var u=ea+".g"+s+'[id="'+a+'"]',f="";l!==void 0&&l.forEach(function(d){d.length>0&&(f+=d+",")}),o+=""+c+u+'{content:"'+f+`"}/*!sc*/
99
- `}}}return o}(this)},t}(),q5=/(a)(d)/gi,xv=function(t){return String.fromCharCode(t+(t>25?39:97))};function jg(t){var e,n="";for(e=Math.abs(t);e>52;e=e/52|0)n=xv(e%52)+n;return(xv(e%52)+n).replace(q5,"$1-$2")}var Zo=function(t,e){for(var n=e.length;n;)t=33*t^e.charCodeAt(--n);return t},xk=function(t){return Zo(5381,t)};function U5(t){for(var e=0;e<t.length;e+=1){var n=t[e];if(Tl(n)&&!sO(n))return!1}return!0}var H5=xk("5.3.11"),J5=function(){function t(e,n,r){this.rules=e,this.staticRulesId="",this.isStatic=process.env.NODE_ENV==="production"&&(r===void 0||r.isStatic)&&U5(e),this.componentId=n,this.baseHash=Zo(H5,n),this.baseStyle=r,Ok.registerId(n)}return t.prototype.generateAndInjectStyles=function(e,n,r){var i=this.componentId,o=[];if(this.baseStyle&&o.push(this.baseStyle.generateAndInjectStyles(e,n,r)),this.isStatic&&!r.hash)if(this.staticRulesId&&n.hasNameForId(i,this.staticRulesId))o.push(this.staticRulesId);else{var s=ta(this.rules,e,n,r).join(""),a=jg(Zo(this.baseHash,s)>>>0);if(!n.hasNameForId(i,a)){var l=r(s,"."+a,void 0,i);n.insertRules(i,a,l)}o.push(a),this.staticRulesId=a}else{for(var c=this.rules.length,u=Zo(this.baseHash,r.hash),f="",d=0;d<c;d++){var h=this.rules[d];if(typeof h=="string")f+=h,process.env.NODE_ENV!=="production"&&(u=Zo(u,h+d));else if(h){var p=ta(h,e,n,r),O=Array.isArray(p)?p.join(""):p;u=Zo(u,O+d),f+=O}}if(f){var m=jg(u>>>0);if(!n.hasNameForId(i,m)){var x=r(f,"."+m,void 0,i);n.insertRules(i,m,x)}o.push(m)}}return o.join(" ")},t}(),K5=/^\s*\/\/.*$/gm,e4=[":","[",".","#"];function t4(t){var e,n,r,i,o=lo,s=o.options,a=s===void 0?lo:s,l=o.plugins,c=l===void 0?tf:l,u=new v5(a),f=[],d=function(O){function m(x){if(x)try{O(x+"}")}catch{}}return function(x,v,y,S,b,w,C,k,I,A){switch(x){case 1:if(I===0&&v.charCodeAt(0)===64)return O(v+";"),"";break;case 2:if(k===0)return v+"/*|*/";break;case 3:switch(k){case 102:case 112:return O(y[0]+v),"";default:return v+(A===0?"/*|*/":"")}case-2:v.split("/*|*/}").forEach(m)}}}(function(O){f.push(O)}),h=function(O,m,x){return m===0&&e4.indexOf(x[n.length])!==-1||x.match(i)?O:"."+e};function p(O,m,x,v){v===void 0&&(v="&");var y=O.replace(K5,""),S=m&&x?x+" "+m+" { "+y+" }":y;return e=v,n=m,r=new RegExp("\\"+n+"\\b","g"),i=new RegExp("(\\"+n+"\\b){2,}"),u(x||!m?"":m,S)}return u.use([].concat(c,[function(O,m,x){O===2&&x.length&&x[0].lastIndexOf(n)>0&&(x[0]=x[0].replace(r,h))},d,function(O){if(O===-2){var m=f;return f=[],m}}])),p.hash=c.length?c.reduce(function(O,m){return m.name||Ca(15),Zo(O,m.name)},5381).toString():"",p}var vk=X.default.createContext();vk.Consumer;var yk=X.default.createContext(),n4=(yk.Consumer,new Ok),Rg=t4();function r4(){return j.useContext(vk)||n4}function i4(){return j.useContext(yk)||Rg}var bk=function(){function t(e,n){var r=this;this.inject=function(i,o){o===void 0&&(o=Rg);var s=r.name+o.hash;i.hasNameForId(r.id,s)||i.insertRules(r.id,s,o(r.rules,s,"@keyframes"))},this.toString=function(){return Ca(12,String(r.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=n}return t.prototype.getName=function(e){return e===void 0&&(e=Rg),this.name+e.hash},t}(),o4=/([A-Z])/,s4=/([A-Z])/g,a4=/^ms-/,l4=function(t){return"-"+t.toLowerCase()};function vv(t){return o4.test(t)?t.replace(s4,l4).replace(a4,"-ms-"):t}var yv=function(t){return t==null||t===!1||t===""};function ta(t,e,n,r){if(Array.isArray(t)){for(var i,o=[],s=0,a=t.length;s<a;s+=1)(i=ta(t[s],e,n,r))!==""&&(Array.isArray(i)?o.push.apply(o,i):o.push(i));return o}if(yv(t))return"";if(sO(t))return"."+t.styledComponentId;if(Tl(t)){if(typeof(c=t)!="function"||c.prototype&&c.prototype.isReactComponent||!e)return t;var l=t(e);return process.env.NODE_ENV!=="production"&&Go.isElement(l)&&console.warn($g(t)+" is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details."),ta(l,e,n,r)}var c;return t instanceof bk?n?(t.inject(n,r),t.getName(r)):t:Tg(t)?function u(f,d){var h,p,O=[];for(var m in f)f.hasOwnProperty(m)&&!yv(f[m])&&(Array.isArray(f[m])&&f[m].isCss||Tl(f[m])?O.push(vv(m)+":",f[m],";"):Tg(f[m])?O.push.apply(O,u(f[m],m)):O.push(vv(m)+": "+(h=m,(p=f[m])==null||typeof p=="boolean"||p===""?"":typeof p!="number"||p===0||h in y5||h.startsWith("--")?String(p).trim():p+"px")+";"));return d?[d+" {"].concat(O,["}"]):O}(t):t.toString()}var bv=function(t){return Array.isArray(t)&&(t.isCss=!0),t};function $l(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return Tl(t)||Tg(t)?bv(ta(mv(tf,[t].concat(n)))):n.length===0&&t.length===1&&typeof t[0]=="string"?t:bv(ta(mv(t,n)))}var Sv=/invalid hook call/i,Zc=new Set,c4=function(t,e){if(process.env.NODE_ENV!=="production"){var n="The component "+t+(e?' with the id of "'+e+'"':"")+` has been created dynamically.
99
+ `}}}return o}(this)},t}(),q5=/(a)(d)/gi,xv=function(t){return String.fromCharCode(t+(t>25?39:97))};function jg(t){var e,n="";for(e=Math.abs(t);e>52;e=e/52|0)n=xv(e%52)+n;return(xv(e%52)+n).replace(q5,"$1-$2")}var Wo=function(t,e){for(var n=e.length;n;)t=33*t^e.charCodeAt(--n);return t},xk=function(t){return Wo(5381,t)};function U5(t){for(var e=0;e<t.length;e+=1){var n=t[e];if(Tl(n)&&!sO(n))return!1}return!0}var H5=xk("5.3.11"),J5=function(){function t(e,n,r){this.rules=e,this.staticRulesId="",this.isStatic=process.env.NODE_ENV==="production"&&(r===void 0||r.isStatic)&&U5(e),this.componentId=n,this.baseHash=Wo(H5,n),this.baseStyle=r,Ok.registerId(n)}return t.prototype.generateAndInjectStyles=function(e,n,r){var i=this.componentId,o=[];if(this.baseStyle&&o.push(this.baseStyle.generateAndInjectStyles(e,n,r)),this.isStatic&&!r.hash)if(this.staticRulesId&&n.hasNameForId(i,this.staticRulesId))o.push(this.staticRulesId);else{var s=ta(this.rules,e,n,r).join(""),a=jg(Wo(this.baseHash,s)>>>0);if(!n.hasNameForId(i,a)){var l=r(s,"."+a,void 0,i);n.insertRules(i,a,l)}o.push(a),this.staticRulesId=a}else{for(var c=this.rules.length,u=Wo(this.baseHash,r.hash),f="",d=0;d<c;d++){var h=this.rules[d];if(typeof h=="string")f+=h,process.env.NODE_ENV!=="production"&&(u=Wo(u,h+d));else if(h){var p=ta(h,e,n,r),O=Array.isArray(p)?p.join(""):p;u=Wo(u,O+d),f+=O}}if(f){var m=jg(u>>>0);if(!n.hasNameForId(i,m)){var x=r(f,"."+m,void 0,i);n.insertRules(i,m,x)}o.push(m)}}return o.join(" ")},t}(),K5=/^\s*\/\/.*$/gm,e4=[":","[",".","#"];function t4(t){var e,n,r,i,o=lo,s=o.options,a=s===void 0?lo:s,l=o.plugins,c=l===void 0?tf:l,u=new v5(a),f=[],d=function(O){function m(x){if(x)try{O(x+"}")}catch{}}return function(x,v,y,S,b,w,C,k,I,A){switch(x){case 1:if(I===0&&v.charCodeAt(0)===64)return O(v+";"),"";break;case 2:if(k===0)return v+"/*|*/";break;case 3:switch(k){case 102:case 112:return O(y[0]+v),"";default:return v+(A===0?"/*|*/":"")}case-2:v.split("/*|*/}").forEach(m)}}}(function(O){f.push(O)}),h=function(O,m,x){return m===0&&e4.indexOf(x[n.length])!==-1||x.match(i)?O:"."+e};function p(O,m,x,v){v===void 0&&(v="&");var y=O.replace(K5,""),S=m&&x?x+" "+m+" { "+y+" }":y;return e=v,n=m,r=new RegExp("\\"+n+"\\b","g"),i=new RegExp("(\\"+n+"\\b){2,}"),u(x||!m?"":m,S)}return u.use([].concat(c,[function(O,m,x){O===2&&x.length&&x[0].lastIndexOf(n)>0&&(x[0]=x[0].replace(r,h))},d,function(O){if(O===-2){var m=f;return f=[],m}}])),p.hash=c.length?c.reduce(function(O,m){return m.name||Ca(15),Wo(O,m.name)},5381).toString():"",p}var vk=X.default.createContext();vk.Consumer;var yk=X.default.createContext(),n4=(yk.Consumer,new Ok),Rg=t4();function r4(){return j.useContext(vk)||n4}function i4(){return j.useContext(yk)||Rg}var bk=function(){function t(e,n){var r=this;this.inject=function(i,o){o===void 0&&(o=Rg);var s=r.name+o.hash;i.hasNameForId(r.id,s)||i.insertRules(r.id,s,o(r.rules,s,"@keyframes"))},this.toString=function(){return Ca(12,String(r.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=n}return t.prototype.getName=function(e){return e===void 0&&(e=Rg),this.name+e.hash},t}(),o4=/([A-Z])/,s4=/([A-Z])/g,a4=/^ms-/,l4=function(t){return"-"+t.toLowerCase()};function vv(t){return o4.test(t)?t.replace(s4,l4).replace(a4,"-ms-"):t}var yv=function(t){return t==null||t===!1||t===""};function ta(t,e,n,r){if(Array.isArray(t)){for(var i,o=[],s=0,a=t.length;s<a;s+=1)(i=ta(t[s],e,n,r))!==""&&(Array.isArray(i)?o.push.apply(o,i):o.push(i));return o}if(yv(t))return"";if(sO(t))return"."+t.styledComponentId;if(Tl(t)){if(typeof(c=t)!="function"||c.prototype&&c.prototype.isReactComponent||!e)return t;var l=t(e);return process.env.NODE_ENV!=="production"&&Yo.isElement(l)&&console.warn($g(t)+" is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details."),ta(l,e,n,r)}var c;return t instanceof bk?n?(t.inject(n,r),t.getName(r)):t:Tg(t)?function u(f,d){var h,p,O=[];for(var m in f)f.hasOwnProperty(m)&&!yv(f[m])&&(Array.isArray(f[m])&&f[m].isCss||Tl(f[m])?O.push(vv(m)+":",f[m],";"):Tg(f[m])?O.push.apply(O,u(f[m],m)):O.push(vv(m)+": "+(h=m,(p=f[m])==null||typeof p=="boolean"||p===""?"":typeof p!="number"||p===0||h in y5||h.startsWith("--")?String(p).trim():p+"px")+";"));return d?[d+" {"].concat(O,["}"]):O}(t):t.toString()}var bv=function(t){return Array.isArray(t)&&(t.isCss=!0),t};function $l(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return Tl(t)||Tg(t)?bv(ta(mv(tf,[t].concat(n)))):n.length===0&&t.length===1&&typeof t[0]=="string"?t:bv(ta(mv(t,n)))}var Sv=/invalid hook call/i,Zc=new Set,c4=function(t,e){if(process.env.NODE_ENV!=="production"){var n="The component "+t+(e?' with the id of "'+e+'"':"")+` has been created dynamically.
100
100
  You may see this warning because you've called styled inside another component.
101
101
  To resolve this only create new StyledComponents outside of any render method and function component.`,r=console.error;try{var i=!0;console.error=function(o){if(Sv.test(o))i=!1,Zc.delete(n);else{for(var s=arguments.length,a=new Array(s>1?s-1:0),l=1;l<s;l++)a[l-1]=arguments[l];r.apply(void 0,[o].concat(a))}},j.useRef(),i&&!Zc.has(n)&&(console.warn(n),Zc.add(n))}catch(o){Sv.test(o.message)&&Zc.delete(n)}finally{console.error=r}}},u4=function(t,e,n){return n===void 0&&(n=lo),t.theme!==n.theme&&t.theme||e||n.theme},f4=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,d4=/(^-|-$)/g;function Ih(t){return t.replace(f4,"-").replace(d4,"")}var Sk=function(t){return jg(xk(t)>>>0)};function Wc(t){return typeof t=="string"&&(process.env.NODE_ENV==="production"||t.charAt(0)===t.charAt(0).toLowerCase())}var Dg=function(t){return typeof t=="function"||typeof t=="object"&&t!==null&&!Array.isArray(t)},h4=function(t){return t!=="__proto__"&&t!=="constructor"&&t!=="prototype"};function p4(t,e,n){var r=t[n];Dg(e)&&Dg(r)?wk(r,e):t[n]=e}function wk(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];for(var i=0,o=n;i<o.length;i++){var s=o[i];if(Dg(s))for(var a in s)h4(a)&&p4(t,s[a],a)}return t}var Ck=X.default.createContext();Ck.Consumer;var Th={};function kk(t,e,n){var r=sO(t),i=!Wc(t),o=e.attrs,s=o===void 0?tf:o,a=e.componentId,l=a===void 0?function(v,y){var S=typeof v!="string"?"sc":Ih(v);Th[S]=(Th[S]||0)+1;var b=S+"-"+Sk("5.3.11"+S+Th[S]);return y?y+"-"+b:b}(e.displayName,e.parentComponentId):a,c=e.displayName,u=c===void 0?function(v){return Wc(v)?"styled."+v:"Styled("+$g(v)+")"}(t):c,f=e.displayName&&e.componentId?Ih(e.displayName)+"-"+e.componentId:e.componentId||l,d=r&&t.attrs?Array.prototype.concat(t.attrs,s).filter(Boolean):s,h=e.shouldForwardProp;r&&t.shouldForwardProp&&(h=e.shouldForwardProp?function(v,y,S){return t.shouldForwardProp(v,y,S)&&e.shouldForwardProp(v,y,S)}:t.shouldForwardProp);var p,O=new J5(n,f,r?t.componentStyle:void 0),m=O.isStatic&&s.length===0,x=function(v,y){return function(S,b,w,C){var k=S.attrs,I=S.componentStyle,A=S.defaultProps,E=S.foldedComponentIds,$=S.shouldForwardProp,R=S.styledComponentId,M=S.target,Q=function(U,F,te){U===void 0&&(U=lo);var L=Di({},F,{theme:U}),ce={};return te.forEach(function(re){var ae,H,pe,q=re;for(ae in Tl(q)&&(q=q(L)),q)L[ae]=ce[ae]=ae==="className"?(H=ce[ae],pe=q[ae],H&&pe?H+" "+pe:H||pe):q[ae]}),[L,ce]}(u4(b,j.useContext(Ck),A)||lo,b,k),Z=Q[0],G=Q[1],V=function(U,F,te,L){var ce=r4(),re=i4(),ae=F?U.generateAndInjectStyles(lo,ce,re):U.generateAndInjectStyles(te,ce,re);return process.env.NODE_ENV!=="production"&&!F&&L&&L(ae),ae}(I,C,Z,process.env.NODE_ENV!=="production"?S.warnTooManyClasses:void 0),ee=w,Y=G.$as||b.$as||G.as||b.as||M,z=Wc(Y),D=G!==b?Di({},b,{},G):b,B={};for(var N in D)N[0]!=="$"&&N!=="as"&&(N==="forwardedAs"?B.as=D[N]:($?$(N,uv,Y):!z||uv(N))&&(B[N]=D[N]));return b.style&&G.style!==b.style&&(B.style=Di({},b.style,{},G.style)),B.className=Array.prototype.concat(E,R,V!==R?V:null,b.className,G.className).filter(Boolean).join(" "),B.ref=ee,j.createElement(Y,B)}(p,v,y,m)};return x.displayName=u,(p=X.default.forwardRef(x)).attrs=d,p.componentStyle=O,p.displayName=u,p.shouldForwardProp=h,p.foldedComponentIds=r?Array.prototype.concat(t.foldedComponentIds,t.styledComponentId):tf,p.styledComponentId=f,p.target=r?t.target:t,p.withComponent=function(v){var y=e.componentId,S=function(w,C){if(w==null)return{};var k,I,A={},E=Object.keys(w);for(I=0;I<E.length;I++)k=E[I],C.indexOf(k)>=0||(A[k]=w[k]);return A}(e,["componentId"]),b=y&&y+"-"+(Wc(v)?v:Ih($g(v)));return kk(v,Di({},S,{attrs:d,componentId:b}),n)},Object.defineProperty(p,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(v){this._foldedDefaultProps=r?wk({},t.defaultProps,v):v}}),process.env.NODE_ENV!=="production"&&(c4(u,f),p.warnTooManyClasses=function(v,y){var S={},b=!1;return function(w){if(!b&&(S[w]=!0,Object.keys(S).length>=200)){var C=y?' with the id of "'+y+'"':"";console.warn("Over 200 classes were generated for component "+v+C+`.
102
102
  Consider using the attrs method, together with a style object for frequently changed styles.
@@ -107,11 +107,11 @@ Example:
107
107
  },
108
108
  }))\`width: 100%;\`
109
109
 
110
- <Component />`),b=!0,S={}}}}(u,f)),Object.defineProperty(p,"toString",{value:function(){return"."+p.styledComponentId}}),i&&R5(p,t,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),p}var T=function(t){return function e(n,r,i){if(i===void 0&&(i=lo),!Go.isValidElementType(r))return Ca(1,String(r));var o=function(){return n(r,i,$l.apply(void 0,arguments))};return o.withConfig=function(s){return e(n,r,Di({},i,{},s))},o.attrs=function(s){return e(n,r,Di({},i,{attrs:Array.prototype.concat(i.attrs,s).filter(Boolean)}))},o}(kk,t)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach(function(t){T[t]=T(t)});function g4(t){process.env.NODE_ENV!=="production"&&typeof navigator<"u"&&navigator.product==="ReactNative"&&console.warn("`keyframes` cannot be used on ReactNative, only on the web. To do animation in ReactNative please use Animated.");for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i=$l.apply(void 0,[t].concat(n)).join(""),o=Sk(i);return new bk(o,i)}process.env.NODE_ENV!=="production"&&typeof navigator<"u"&&navigator.product==="ReactNative"&&console.warn(`It looks like you've imported 'styled-components' on React Native.
110
+ <Component />`),b=!0,S={}}}}(u,f)),Object.defineProperty(p,"toString",{value:function(){return"."+p.styledComponentId}}),i&&R5(p,t,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),p}var T=function(t){return function e(n,r,i){if(i===void 0&&(i=lo),!Yo.isValidElementType(r))return Ca(1,String(r));var o=function(){return n(r,i,$l.apply(void 0,arguments))};return o.withConfig=function(s){return e(n,r,Di({},i,{},s))},o.attrs=function(s){return e(n,r,Di({},i,{attrs:Array.prototype.concat(i.attrs,s).filter(Boolean)}))},o}(kk,t)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach(function(t){T[t]=T(t)});function g4(t){process.env.NODE_ENV!=="production"&&typeof navigator<"u"&&navigator.product==="ReactNative"&&console.warn("`keyframes` cannot be used on ReactNative, only on the web. To do animation in ReactNative please use Animated.");for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i=$l.apply(void 0,[t].concat(n)).join(""),o=Sk(i);return new bk(o,i)}process.env.NODE_ENV!=="production"&&typeof navigator<"u"&&navigator.product==="ReactNative"&&console.warn(`It looks like you've imported 'styled-components' on React Native.
111
111
  Perhaps you're looking to import 'styled-components/native'?
112
112
  Read more about this at https://www.styled-components.com/docs/basics#react-native`),process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&typeof window<"u"&&(window["__styled-components-init__"]=window["__styled-components-init__"]||0,window["__styled-components-init__"]===1&&console.warn(`It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.
113
113
 
114
- See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]+=1);var Qg=function(t,e){return Qg=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Qg(t,e)};function m4(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Qg(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var rf=function(){return rf=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},rf.apply(this,arguments)},O4=Object.prototype.hasOwnProperty;function wv(t,e){return t===e?t!==0||e!==0||1/t===1/e:t!==t&&e!==e}function x4(t,e){if(wv(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++)if(!O4.call(e,n[i])||!wv(t[n[i]],e[n[i]]))return!1;return!0}var lt=Symbol("none"),v4=Symbol("__state");function lO(t,e){var n=Ak(t);n.activate(e);var r=n.toMethods();return r.self()}function y4(t,e){var n=Object(t)===t?t[cO]:void 0;if(n)if(n.isMounted){var r=function(){var O=n.store,m=function(){return s({store:O,state:x,source:o.source})},x=new ju(O,n.path,O.get(n.path),O.edition,m);return{store:O,state:x,source:t}},i=X.default.useState(r),o=i[0],s=i[1];if(o.store!==n.store||!("source"in o))throw new In(n.path,mt.InitStateStoreSwitchover);Object.defineProperty(o,"store",{enumerable:!1}),Object.defineProperty(o,"state",{enumerable:!1}),Object.defineProperty(o,"source",{enumerable:!1}),o.state.reconstruct(n.path,o.store.get(n.path),o.store.edition,o.source!==t),o.source=t,n.subscribe(o.state),Rh(function(){return o.state.onMount(),n.subscribe(o.state),function(){o.state.onUnmount(),n.unsubscribe(o.state)}},[]);var a=o.state.self();return o["[hookstate(scoped)]"]=a,a}else{var r=function(){var x=n.store,v=function(){return u({store:x,state:y,source:c.source})},y=new ju(x,xn,x.get(xn),x.edition,v);return{store:x,state:y,source:t}},l=X.default.useState(r),c=l[0],u=l[1];if(c.store!==n.store||!("source"in c))throw new In(n.path,mt.InitStateStoreSwitchover);Object.defineProperty(c,"store",{enumerable:!1}),Object.defineProperty(c,"state",{enumerable:!1}),Object.defineProperty(c,"source",{enumerable:!1}),c.state.reconstruct(xn,c.store.get(xn),c.store.edition,c.source!==t),c.source=t,c.store.subscribe(c.state),Rh(function(){return c.state.onMount(),c.store.subscribe(c.state),function(){c.state.onUnmount(),c.store.unsubscribe(c.state)}},[]);for(var a=c.state.self(),f=0;f<n.path.length;f+=1)a=a.nested(n.path[f]);return c["[hookstate(global)]"]=a,a}else{var r=function(){var x=Ak(t),v=function(){return p({store:x,state:y})},y=new ju(x,xn,x.get(xn),x.edition,v);return{store:x,state:y}},d=X.default.useState(r),h=d[0],p=d[1];if("source"in h)throw new In(xn,mt.InitStateStoreSwitchover);Object.defineProperty(h,"store",{enumerable:!1}),Object.defineProperty(h,"state",{enumerable:!1}),h.state.reconstruct(xn,h.store.get(xn),h.store.edition,!1),h.store.subscribe(h.state),h.store.activate(e),Rh(function(){return h.state.onMount(),h.store.subscribe(h.state),h.store.activate(e),function(){h.state.onUnmount(),h.store.unsubscribe(h.state),h.store.deactivate()}},[]);var a=h.state.self();return h["[hookstate(local)]"]=a,a}}var cO=Symbol("self"),mt;(function(t){t[t.StateUsedInDependencyList=100]="StateUsedInDependencyList",t[t.InitStateToValueFromState=101]="InitStateToValueFromState",t[t.SetStateToValueFromState=102]="SetStateToValueFromState",t[t.GetStateWhenPromised=103]="GetStateWhenPromised",t[t.SetStateWhenPromised=104]="SetStateWhenPromised",t[t.SetStateNestedToPromised=105]="SetStateNestedToPromised",t[t.SetStateWhenDestroyed=106]="SetStateWhenDestroyed",t[t.ToJson_Value=108]="ToJson_Value",t[t.ToJson_State=109]="ToJson_State",t[t.GetProperty_Function=110]="GetProperty_Function",t[t.InitStateStoreSwitchover=111]="InitStateStoreSwitchover",t[t.GetUnknownPlugin=120]="GetUnknownPlugin",t[t.SetProperty_State=201]="SetProperty_State",t[t.SetProperty_Value=202]="SetProperty_Value",t[t.SetPrototypeOf_State=203]="SetPrototypeOf_State",t[t.SetPrototypeOf_Value=204]="SetPrototypeOf_Value",t[t.PreventExtensions_State=205]="PreventExtensions_State",t[t.PreventExtensions_Value=206]="PreventExtensions_Value",t[t.DefineProperty_State=207]="DefineProperty_State",t[t.DefineProperty_Value=208]="DefineProperty_Value",t[t.DeleteProperty_State=209]="DeleteProperty_State",t[t.DeleteProperty_Value=210]="DeleteProperty_Value",t[t.Construct_State=211]="Construct_State",t[t.Construct_Value=212]="Construct_Value",t[t.Apply_State=213]="Apply_State",t[t.Apply_Value=214]="Apply_Value"})(mt||(mt={}));var In=function(t){m4(e,t);function e(n,r,i){return t.call(this,"Error: HOOKSTATE-".concat(r," [path: /").concat(n.join("/")).concat(i?", details: ".concat(i):"","]. ")+"See https://hookstate.js.org/docs/exceptions#hookstate-".concat(r))||this}return e}(Error),Tu=Symbol("ProxyMarker"),xn=[],b4=function(){function t(e){var n=this;this._value=e,this.edition=1,this._subscribers=new Set,Object(e)===e&&jh.promiseDetector(e)?this.setPromised(e):e===lt&&this.setPromised(void 0);var r=function(){n._stateMethods.reconstruct(xn,n.get(xn),n.edition,!1)};r[$u]=!0,this._stateMethods=new ju(this,xn,this.get(xn),this.edition,r),this.subscribe(this._stateMethods)}return t.prototype.setPromised=function(e){var n=this;if(this._value=lt,this._promiseError=void 0,this._promiseResolver=void 0,!e){this._promise=new Promise(function(r){n._promiseResolver=r});return}e=e.then(function(r){n._promise===e&&(n._promise=void 0,n._promiseError=void 0,n._promiseResolver,n.update(n._stateMethods.self(),n.set(xn,r)))}).catch(function(r){if(n._promise===e){n._promise=void 0,n._promiseResolver=void 0,n._promiseError=r,n.edition+=1;var i={path:xn};n.update(n._stateMethods.self(),i)}}),this._promise=e},t.prototype.activate=function(e){var n,r,i,o;this.edition<0&&(this.edition=-this.edition),this._extension===void 0&&(this._extension=e==null?void 0:e(),this._extensionMethods=(r=(n=this._extension)===null||n===void 0?void 0:n.onCreate)===null||r===void 0?void 0:r.call(n,this._stateMethods.self(),{}),(o=(i=this._extension)===null||i===void 0?void 0:i.onInit)===null||o===void 0||o.call(i,this._stateMethods.self(),this._extensionMethods||{}))},t.prototype.deactivate=function(){var e,n;this._extension&&((n=(e=this._extension).onDestroy)===null||n===void 0||n.call(e,this._stateMethods.self()),delete this._extension,delete this._extensionMethods),this.edition>0&&(this.edition=-this.edition)},Object.defineProperty(t.prototype,"extension",{get:function(){return this._extensionMethods},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"promise",{get:function(){return this._promise},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"promiseError",{get:function(){return this._promiseError},enumerable:!1,configurable:!0}),t.prototype.get=function(e){var n=this._value;return n===lt||e.forEach(function(r){n=n[r]}),n},t.prototype.set=function(e,n){var r,i;if(this.edition<0)throw new In(e,mt.SetStateWhenDestroyed);if(e.length===0){if(n===lt)this.setPromised(void 0);else if(Object(n)===n&&jh.promiseDetector(n))this.setPromised(n),n=lt;else{if(this._promise&&!this._promiseResolver)throw new In(e,mt.SetStateWhenPromised);this._promiseError=void 0}var o=this._value;if(this._value=n,this.afterSet(),o===lt&&this._value!==lt&&this._promiseResolver){this._promise=void 0,this._promiseError=void 0;var s=this._promiseResolver;this._promiseResolver,s(this._value)}return{path:e}}if(Object(n)===n&&jh.promiseDetector(n))throw new In(e,mt.SetStateNestedToPromised);for(var a=this._value,l=0;l<e.length-1;l+=1)a=a[e[l]];var c=e[e.length-1];return c in a?n!==lt?(a[c]=n,this.afterSet(),{path:e}):(Array.isArray(a)&&typeof c=="number"?a.splice(c,1):delete a[c],this.afterSet(),{path:e.slice(0,-1),actions:(r={},r[c]="D",r)}):n!==lt?(a[c]=n,this.afterSet(),{path:e.slice(0,-1),actions:(i={},i[c]="I",i)}):{path:e}},t.prototype.preset=function(e,n){var r,i;(i=(r=this._extension)===null||r===void 0?void 0:r.onPreset)===null||i===void 0||i.call(r,e,n,this._stateMethods.self())},t.prototype.premerge=function(e,n){var r,i;(i=(r=this._extension)===null||r===void 0?void 0:r.onPremerge)===null||i===void 0||i.call(r,e,n,this._stateMethods.self())},t.prototype.update=function(e,n){var r=this,i,o;(o=(i=this._extension)===null||i===void 0?void 0:i.onSet)===null||o===void 0||o.call(i,e,n,this._stateMethods.self());var s=new Set;n.actions&&Object.values(n.actions).findIndex(function(a){return a!=="U"})===-1?Object.keys(n.actions).forEach(function(a){r._subscribers.forEach(function(l){return l.onSet({path:n.path.concat(a)},s)})}):this._subscribers.forEach(function(a){return a.onSet(n,s)}),s.forEach(function(a){return a()})},t.prototype.afterSet=function(){this.edition>0&&(this.edition+=1),this.edition<0&&(this.edition-=1)},t.prototype.toMethods=function(){return this._stateMethods},t.prototype.subscribe=function(e){this._subscribers.add(e)},t.prototype.unsubscribe=function(e){this._subscribers.delete(e)},t.prototype.toJSON=function(){throw new In(xn,mt.ToJson_Value)},t}(),Bo=Symbol("UnusedValue"),$u=Symbol("IsUnmounted"),ju=function(){function t(e,n,r,i,o){this.store=e,this.path=n,this.valueSource=r,this.valueEdition=i,this.onSetUsed=o,this.valueUsed=Bo}return Object.defineProperty(t.prototype,v4,{get:function(){return[this.get(),this.self()]},enumerable:!1,configurable:!0}),t.prototype.reconstruct=function(e,n,r,i){this.path=e,this.valueSource=n,this.valueEdition=r,this.valueUsed=Bo,i?(delete this.selfUsed,delete this.childrenCreated,delete this.childrenUsedPrevious):(this.valueUsedNoProxyPrevious=this.valueUsedNoProxy,this.childrenUsedPrevious=this.childrenUsed),delete this.valueUsedNoProxy,delete this.childrenUsed},t.prototype.reconnect=function(){this.get({__internalAllowPromised:!0,noproxy:this.valueUsedNoProxyPrevious}),this.childrenUsed=rf(rf({},this.childrenUsedPrevious),this.childrenUsed)},t.prototype.getUntracked=function(e){if(this.valueEdition!==this.store.edition&&(this.valueSource=this.store.get(this.path),this.valueEdition=this.store.edition,this.valueUsed!==Bo&&(this.valueUsed=Bo,this.get({__internalAllowPromised:!0}))),e)return this.valueSource;if(this.store.promiseError)throw this.store.promiseError;if(this.store.promise)throw new In(this.path,mt.GetStateWhenPromised);return this.valueSource},t.prototype.get=function(e){var n,r=this.getUntracked(e==null?void 0:e.__internalAllowPromised);return e!=null&&e.stealth?r:(this.valueUsed===Bo&&(Array.isArray(r)?this.valueUsed=this.valueArrayImpl(r):Object(r)===r?((n=r.constructor)===null||n===void 0?void 0:n.name)==="Object"?this.valueUsed=this.valueObjectImpl(r):(this.valueUsedNoProxy=!0,this.valueUsed=r):this.valueUsed=r),e!=null&&e.noproxy?(this.valueUsedNoProxy=!0,r):this.valueUsed)},Object.defineProperty(t.prototype,"value",{get:function(){return this.get()},enumerable:!1,configurable:!0}),t.prototype.setUntrackedV4=function(e){if(typeof e=="function"&&(e=e(this.getUntracked())),this.store.preset(this.self(),e),Object(e)===e&&e[Tu])throw new In(this.path,mt.SetStateToValueFromState);return e!==Object(e)&&e===this.getUntracked(!0)?null:this.store.set(this.path,e)},t.prototype.set=function(e){var n=this.setUntrackedV4(e);n&&this.store.update(this.self(),n)},t.prototype.mergeUntracked=function(e){var n=this.mergeUntrackedV4(e);return n?[n.path]:[]},t.prototype.mergeUntrackedV4=function(e){var n=this.getUntracked();if(typeof e=="function"&&(e=e(n)),this.store.premerge(this.self(),e),Array.isArray(n))if(Array.isArray(e)){var r={path:this.path,actions:{}};return e.forEach(function(a,l){r.actions[n.push(a)-1]="I"}),Object.keys(r.actions).length>0?(this.setUntrackedV4(n),r):null}else{var i={path:this.path,actions:{}},o=[];return Object.keys(e).map(function(a){return Number(a)}).sort(function(a,l){return a-l}).forEach(function(a){var l=Number(a),c=e[l];c===lt?(i.actions[l]="D",o.push(l)):(l in n?i.actions[l]="U":i.actions[l]="I",n[l]=c)}),o.reverse().forEach(function(a){n.splice(a,1)}),Object.keys(i.actions).length>0?(this.setUntrackedV4(n),i):null}else if(Object(n)===n){var s={path:this.path,actions:{}};return Object.keys(e).forEach(function(a){var l=e[a];l===lt?(s.actions[a]="D",delete n[a]):(a in n?s.actions[a]="U":s.actions[a]="I",n[a]=l)}),Object.keys(s.actions).length>0?(this.setUntrackedV4(n),s):null}else return typeof n=="string"?this.setUntrackedV4(n+String(e)):this.setUntrackedV4(e)},t.prototype.merge=function(e){var n=this.mergeUntrackedV4(e);n&&this.store.update(this.self(),n)},t.prototype.nested=function(e){return this.child(e).self()},t.prototype.rerender=function(e){for(var n=0,r=e;n<r.length;n++){var i=r[n];this.store.update(this.self(),{path:i})}},t.prototype.activate=function(e){this.store.activate(e)},t.prototype.deactivate=function(){this.store.deactivate()},t.prototype.subscribe=function(e){this.subscribers===void 0&&(this.subscribers=new Set),this.subscribers.add(e)},t.prototype.unsubscribe=function(e){this.subscribers&&this.subscribers.delete(e)},Object.defineProperty(t.prototype,"isMounted",{get:function(){return!this.onSetUsed[$u]},enumerable:!1,configurable:!0}),t.prototype.onMount=function(){delete this.onSetUsed[$u]},t.prototype.onUnmount=function(){this.onSetUsed[$u]=!0},t.prototype.onSet=function(e,n){var r=this,i=function(){var s,a=!1;r.valueUsedNoProxy&&r.valueUsed!==Bo&&(n.add(r.onSetUsed),delete r.selfUsed,a=!0);var l=e.path,c=l[r.path.length];if(c===void 0){if(r.valueUsed!==Bo){if(n.add(r.onSetUsed),delete r.selfUsed,delete r.childrenUsed,e.actions&&r.childrenCreated)if(Array.isArray(r.valueSource)&&Object.values(e.actions).includes("D")){var u=Object.keys(e.actions).map(function(h){return Number(h)}).sort(function(h,p){return h-p}).find(function(h){var p;return((p=e.actions)===null||p===void 0?void 0:p[h])==="D"});for(var f in r.childrenCreated)(Number(f)>=u||f in e.actions)&&delete r.childrenCreated[f]}else for(var f in e.actions)delete r.childrenCreated[f];else delete r.childrenCreated;return!0}}else{var d=(s=r.childrenUsed)===null||s===void 0?void 0:s[c];if(d&&d.onSet(e,n))return delete r.selfUsed,!0}return a},o=i();return!o&&this.subscribers!==void 0&&this.subscribers.forEach(function(s){s.onSet(e,n)&&delete r.selfUsed}),o},Object.defineProperty(t.prototype,"keys",{get:function(){var e=this.get();if(Array.isArray(e))return Object.keys(e).map(function(n){return Number(n)}).filter(function(n){return Number.isInteger(n)});if(Object(e)===e)return Object.keys(e)},enumerable:!1,configurable:!0}),t.prototype.child=function(e){this.childrenUsed=this.childrenUsed||{};var n=this.childrenUsed.hasOwnProperty(e)&&this.childrenUsed[e];if(n)return n;var r=this.valueSource[e];if(typeof r=="function")throw new In(this.path,mt.GetProperty_Function);this.childrenCreated=this.childrenCreated||{};var i=this.childrenCreated[e],o;return i?(i.reconstruct(this.path.concat(e),r,this.valueEdition,!1),o=i):(o=new t(this.store,this.path.concat(e),r,this.valueEdition,this.onSetUsed),this.childrenCreated[e]=o),this.valueUsedNoProxy&&(o.valueUsedNoProxy=!0),this.childrenUsed[e]=o,o},t.prototype.valueArrayImpl=function(e){var n=this;return $h(this.path,e,function(){return e},function(r,i){if(i==="length")return r.length;if(i in Array.prototype)return Array.prototype[i];if(i===Tu)return n;if(typeof i=="symbol")return r[i];var o=Number(i);if(Number.isInteger(o))return n.child(o).get()},function(r,i,o){if(typeof i=="symbol")return r[i]=o,!0;throw new In(n.path,mt.SetProperty_Value)},!0)},t.prototype.valueObjectImpl=function(e){var n=this;return $h(this.path,e,function(){return e},function(r,i){return i in Object.prototype?Object.prototype[i]:i===Tu?n:typeof i=="symbol"?r[i]:n.child(i).get()},function(r,i,o){if(typeof i=="symbol")return r[i]=o,!0;throw new In(n.path,mt.SetProperty_Value)},!0)},t.prototype.self=function(){var e=this;if(this.selfUsed)return this.selfUsed;var n=function(r,i){if(i===cO)return e;if(typeof i!="symbol"){if(i==="toJSON")throw new In(e.path,mt.ToJson_State);var o=function(a){var l=e.get({__internalAllowPromised:a==="$$typeof"||a==="constructor"});if(a in Object.prototype)return Object.prototype[a];if(!(Object(l)!==l&&l!==lt)){if(Array.isArray(l)){if(a==="length")return l.length;if(a in Array.prototype)return Array.prototype[a];var c=Number(a);return Number.isInteger(c)?e.nested(c):void 0}return e.nested(a.toString())}};switch(i){case"path":return e.path;case"keys":return e.keys;case"value":return e.value;case"ornull":return e.ornull;case"promised":return e.promised;case"promise":return e.promise;case"error":return e.error;case"get":return function(a){return e.get(a)};case"set":return function(a){return e.set(a)};case"merge":return function(a){return e.merge(a)};case"nested":return function(a){return o(a)};default:var s=e.store.extension;return s&&i in s?s[i](e.self()):o(i)}}};return this.selfUsed=$h(this.path,this.valueSource,function(r){return e.get({__internalAllowPromised:!0,stealth:r==null?void 0:r.stealth})},n,function(r,i,o){throw new In(e.path,mt.SetProperty_State)},!1),this.selfUsed},Object.defineProperty(t.prototype,"promised",{get:function(){return this.get({__internalAllowPromised:!0}),!!this.store.promise},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"promise",{get:function(){var e=this,n;return this.get({__internalAllowPromised:!0}),(n=this.store.promise)===null||n===void 0?void 0:n.then(function(r){return e.self()})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"error",{get:function(){return this.get({__internalAllowPromised:!!this.store.promiseError}),this.store.promiseError},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ornull",{get:function(){var e=this.get();return e==null?e:this.self()},enumerable:!1,configurable:!0}),t}();function $h(t,e,n,r,i,o){var s=function(a){throw new In(t,a)};return Object(e)!==e&&(e={}),new Proxy(e,{getPrototypeOf:function(a){var l=n();return l==null?null:Object.getPrototypeOf(l===lt?new Promise(function(){}):l)},setPrototypeOf:function(a,l){return s(o?mt.SetPrototypeOf_State:mt.SetPrototypeOf_Value)},isExtensible:function(a){return!0},preventExtensions:function(a){return s(o?mt.PreventExtensions_State:mt.PreventExtensions_Value)},getOwnPropertyDescriptor:function(a,l){var c=n();if(Object(c)===c){var u=Object.getOwnPropertyDescriptor(c,l);return Array.isArray(c)&&l in Array.prototype?u:u&&{configurable:!0,enumerable:u.enumerable,get:function(){return r(c,l)},set:void 0}}if(!(o||c===lt)){if(l==="value")return{configurable:!0,enumerable:!0,get:function(){return n({stealth:!0})},set:void 0};if(l==="path")return{configurable:!0,enumerable:!0,get:function(){return t},set:void 0}}},has:function(a,l){if(typeof l=="symbol")return!1;var c=n();return Object(c)===c?l in c:o||c===lt?!1:l==="value"||l==="path"},get:r,set:i,deleteProperty:function(a,l){return s(o?mt.DeleteProperty_State:mt.DeleteProperty_Value)},defineProperty:function(a,l,c){return s(o?mt.DefineProperty_State:mt.DefineProperty_Value)},ownKeys:function(a){var l=n();return Array.isArray(l)&&a.length===void 0&&Object.defineProperty(e,"length",{value:0,writable:!0,enumerable:!1,configurable:!1}),Object(l)===l?Object.getOwnPropertyNames(l):o||l===lt?[]:["value","path"]},apply:function(a,l,c){return s(o?mt.Apply_State:mt.Apply_Value)},construct:function(a,l,c){return s(o?mt.Construct_State:mt.Construct_Value)}})}function Ak(t){var e=t;if(typeof t=="function"&&(e=t()),Object(e)===e&&e[Tu])throw new In(xn,mt.InitStateToValueFromState);return new b4(e)}var jh={interceptDependencyListsMode:"always",isDevelopmentMode:typeof process=="object"&&typeof process.env=="object"&&process.env.NODE_ENV==="development",promiseDetector:function(t){return Promise.resolve(t)===t},hiddenInterceptDependencyListsModeDebug:!1};function os(t,e){for(var n=0,r=t||[];n<r.length;n++){var i=r[n];if(i===Object(i)){var o=i[cO];o&&o.reconnect()}}return t}var of;function S4(t,e){return os(e),of(t,e)}var sf;function w4(t,e){return os(e),sf(t,e)}var Bg;function C4(t,e){return os(e),Bg(t,e)}var _g;function k4(t,e,n){return os(n),_g(t,e,n)}var Mg;function A4(t,e){return os(e),Mg(t,e)}var Ng;function P4(t,e){return os(e),Ng(t,e)}var Fg;function E4(t,e){return Fg(t,function(n,r){return os(Object.keys(r).map(function(i){return r[i]})),(e||x4)(n,r)})}function I4(){!of&&X.default.useEffect&&(of=X.default.useEffect,X.default.useEffect=S4),!sf&&X.default.useLayoutEffect&&(sf=X.default.useLayoutEffect,X.default.useLayoutEffect=w4),!Bg&&X.default.useInsertionEffect&&(Bg=X.default.useInsertionEffect,X.default.useInsertionEffect=C4),!_g&&X.default.useImperativeHandle&&(_g=X.default.useImperativeHandle,X.default.useImperativeHandle=k4),!Mg&&X.default.useMemo&&(Mg=X.default.useMemo,X.default.useMemo=A4),!Ng&&X.default.useCallback&&(Ng=X.default.useCallback,X.default.useCallback=P4),!Fg&&X.default.memo&&(Fg=X.default.memo,X.default.memo=E4)}I4();var Rh=typeof window<"u"?sf:of;const uO={active:!0,key:"",value:""};var K=(t=>(t.NoAuth="No Auth",t.BasicAuth="Basic Auth",t.DigestAuth="Digest Auth",t.JWT="JWT",t.APIKey="API key",t.OAuth2="OAuth 2.0",t.OpenIDConnect="OpenID Connect",t))(K||{}),se=(t=>(t.ClientCredentials="Client Credentials",t.ClientCredentialsWithJwtAssertion="Client Credentials with JWT Assertion",t.AuthorizationCode="Authorization Code",t.Implicit="Implicit",t.Password="Password",t))(se||{}),Er=(t=>(t.Body="Body",t.Header="Header",t.URL="URL",t))(Er||{});const ss="{{",as="}}",Pk=`${ss}(.*?)${as}`;function ka(t){const e=new RegExp(`${ss}(.*?)${as}`,"g"),n=[];let r;for(;(r=e.exec(t))!==null;)n.push({start:r.index,end:r.index+r[0].length,content:r[1]});return n}const T4=T.span`
114
+ See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]+=1);var Qg=function(t,e){return Qg=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Qg(t,e)};function m4(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Qg(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var rf=function(){return rf=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},rf.apply(this,arguments)},O4=Object.prototype.hasOwnProperty;function wv(t,e){return t===e?t!==0||e!==0||1/t===1/e:t!==t&&e!==e}function x4(t,e){if(wv(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++)if(!O4.call(e,n[i])||!wv(t[n[i]],e[n[i]]))return!1;return!0}var lt=Symbol("none"),v4=Symbol("__state");function lO(t,e){var n=Ak(t);n.activate(e);var r=n.toMethods();return r.self()}function y4(t,e){var n=Object(t)===t?t[cO]:void 0;if(n)if(n.isMounted){var r=function(){var O=n.store,m=function(){return s({store:O,state:x,source:o.source})},x=new ju(O,n.path,O.get(n.path),O.edition,m);return{store:O,state:x,source:t}},i=X.default.useState(r),o=i[0],s=i[1];if(o.store!==n.store||!("source"in o))throw new In(n.path,mt.InitStateStoreSwitchover);Object.defineProperty(o,"store",{enumerable:!1}),Object.defineProperty(o,"state",{enumerable:!1}),Object.defineProperty(o,"source",{enumerable:!1}),o.state.reconstruct(n.path,o.store.get(n.path),o.store.edition,o.source!==t),o.source=t,n.subscribe(o.state),Rh(function(){return o.state.onMount(),n.subscribe(o.state),function(){o.state.onUnmount(),n.unsubscribe(o.state)}},[]);var a=o.state.self();return o["[hookstate(scoped)]"]=a,a}else{var r=function(){var x=n.store,v=function(){return u({store:x,state:y,source:c.source})},y=new ju(x,xn,x.get(xn),x.edition,v);return{store:x,state:y,source:t}},l=X.default.useState(r),c=l[0],u=l[1];if(c.store!==n.store||!("source"in c))throw new In(n.path,mt.InitStateStoreSwitchover);Object.defineProperty(c,"store",{enumerable:!1}),Object.defineProperty(c,"state",{enumerable:!1}),Object.defineProperty(c,"source",{enumerable:!1}),c.state.reconstruct(xn,c.store.get(xn),c.store.edition,c.source!==t),c.source=t,c.store.subscribe(c.state),Rh(function(){return c.state.onMount(),c.store.subscribe(c.state),function(){c.state.onUnmount(),c.store.unsubscribe(c.state)}},[]);for(var a=c.state.self(),f=0;f<n.path.length;f+=1)a=a.nested(n.path[f]);return c["[hookstate(global)]"]=a,a}else{var r=function(){var x=Ak(t),v=function(){return p({store:x,state:y})},y=new ju(x,xn,x.get(xn),x.edition,v);return{store:x,state:y}},d=X.default.useState(r),h=d[0],p=d[1];if("source"in h)throw new In(xn,mt.InitStateStoreSwitchover);Object.defineProperty(h,"store",{enumerable:!1}),Object.defineProperty(h,"state",{enumerable:!1}),h.state.reconstruct(xn,h.store.get(xn),h.store.edition,!1),h.store.subscribe(h.state),h.store.activate(e),Rh(function(){return h.state.onMount(),h.store.subscribe(h.state),h.store.activate(e),function(){h.state.onUnmount(),h.store.unsubscribe(h.state),h.store.deactivate()}},[]);var a=h.state.self();return h["[hookstate(local)]"]=a,a}}var cO=Symbol("self"),mt;(function(t){t[t.StateUsedInDependencyList=100]="StateUsedInDependencyList",t[t.InitStateToValueFromState=101]="InitStateToValueFromState",t[t.SetStateToValueFromState=102]="SetStateToValueFromState",t[t.GetStateWhenPromised=103]="GetStateWhenPromised",t[t.SetStateWhenPromised=104]="SetStateWhenPromised",t[t.SetStateNestedToPromised=105]="SetStateNestedToPromised",t[t.SetStateWhenDestroyed=106]="SetStateWhenDestroyed",t[t.ToJson_Value=108]="ToJson_Value",t[t.ToJson_State=109]="ToJson_State",t[t.GetProperty_Function=110]="GetProperty_Function",t[t.InitStateStoreSwitchover=111]="InitStateStoreSwitchover",t[t.GetUnknownPlugin=120]="GetUnknownPlugin",t[t.SetProperty_State=201]="SetProperty_State",t[t.SetProperty_Value=202]="SetProperty_Value",t[t.SetPrototypeOf_State=203]="SetPrototypeOf_State",t[t.SetPrototypeOf_Value=204]="SetPrototypeOf_Value",t[t.PreventExtensions_State=205]="PreventExtensions_State",t[t.PreventExtensions_Value=206]="PreventExtensions_Value",t[t.DefineProperty_State=207]="DefineProperty_State",t[t.DefineProperty_Value=208]="DefineProperty_Value",t[t.DeleteProperty_State=209]="DeleteProperty_State",t[t.DeleteProperty_Value=210]="DeleteProperty_Value",t[t.Construct_State=211]="Construct_State",t[t.Construct_Value=212]="Construct_Value",t[t.Apply_State=213]="Apply_State",t[t.Apply_Value=214]="Apply_Value"})(mt||(mt={}));var In=function(t){m4(e,t);function e(n,r,i){return t.call(this,"Error: HOOKSTATE-".concat(r," [path: /").concat(n.join("/")).concat(i?", details: ".concat(i):"","]. ")+"See https://hookstate.js.org/docs/exceptions#hookstate-".concat(r))||this}return e}(Error),Tu=Symbol("ProxyMarker"),xn=[],b4=function(){function t(e){var n=this;this._value=e,this.edition=1,this._subscribers=new Set,Object(e)===e&&jh.promiseDetector(e)?this.setPromised(e):e===lt&&this.setPromised(void 0);var r=function(){n._stateMethods.reconstruct(xn,n.get(xn),n.edition,!1)};r[$u]=!0,this._stateMethods=new ju(this,xn,this.get(xn),this.edition,r),this.subscribe(this._stateMethods)}return t.prototype.setPromised=function(e){var n=this;if(this._value=lt,this._promiseError=void 0,this._promiseResolver=void 0,!e){this._promise=new Promise(function(r){n._promiseResolver=r});return}e=e.then(function(r){n._promise===e&&(n._promise=void 0,n._promiseError=void 0,n._promiseResolver,n.update(n._stateMethods.self(),n.set(xn,r)))}).catch(function(r){if(n._promise===e){n._promise=void 0,n._promiseResolver=void 0,n._promiseError=r,n.edition+=1;var i={path:xn};n.update(n._stateMethods.self(),i)}}),this._promise=e},t.prototype.activate=function(e){var n,r,i,o;this.edition<0&&(this.edition=-this.edition),this._extension===void 0&&(this._extension=e==null?void 0:e(),this._extensionMethods=(r=(n=this._extension)===null||n===void 0?void 0:n.onCreate)===null||r===void 0?void 0:r.call(n,this._stateMethods.self(),{}),(o=(i=this._extension)===null||i===void 0?void 0:i.onInit)===null||o===void 0||o.call(i,this._stateMethods.self(),this._extensionMethods||{}))},t.prototype.deactivate=function(){var e,n;this._extension&&((n=(e=this._extension).onDestroy)===null||n===void 0||n.call(e,this._stateMethods.self()),delete this._extension,delete this._extensionMethods),this.edition>0&&(this.edition=-this.edition)},Object.defineProperty(t.prototype,"extension",{get:function(){return this._extensionMethods},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"promise",{get:function(){return this._promise},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"promiseError",{get:function(){return this._promiseError},enumerable:!1,configurable:!0}),t.prototype.get=function(e){var n=this._value;return n===lt||e.forEach(function(r){n=n[r]}),n},t.prototype.set=function(e,n){var r,i;if(this.edition<0)throw new In(e,mt.SetStateWhenDestroyed);if(e.length===0){if(n===lt)this.setPromised(void 0);else if(Object(n)===n&&jh.promiseDetector(n))this.setPromised(n),n=lt;else{if(this._promise&&!this._promiseResolver)throw new In(e,mt.SetStateWhenPromised);this._promiseError=void 0}var o=this._value;if(this._value=n,this.afterSet(),o===lt&&this._value!==lt&&this._promiseResolver){this._promise=void 0,this._promiseError=void 0;var s=this._promiseResolver;this._promiseResolver,s(this._value)}return{path:e}}if(Object(n)===n&&jh.promiseDetector(n))throw new In(e,mt.SetStateNestedToPromised);for(var a=this._value,l=0;l<e.length-1;l+=1)a=a[e[l]];var c=e[e.length-1];return c in a?n!==lt?(a[c]=n,this.afterSet(),{path:e}):(Array.isArray(a)&&typeof c=="number"?a.splice(c,1):delete a[c],this.afterSet(),{path:e.slice(0,-1),actions:(r={},r[c]="D",r)}):n!==lt?(a[c]=n,this.afterSet(),{path:e.slice(0,-1),actions:(i={},i[c]="I",i)}):{path:e}},t.prototype.preset=function(e,n){var r,i;(i=(r=this._extension)===null||r===void 0?void 0:r.onPreset)===null||i===void 0||i.call(r,e,n,this._stateMethods.self())},t.prototype.premerge=function(e,n){var r,i;(i=(r=this._extension)===null||r===void 0?void 0:r.onPremerge)===null||i===void 0||i.call(r,e,n,this._stateMethods.self())},t.prototype.update=function(e,n){var r=this,i,o;(o=(i=this._extension)===null||i===void 0?void 0:i.onSet)===null||o===void 0||o.call(i,e,n,this._stateMethods.self());var s=new Set;n.actions&&Object.values(n.actions).findIndex(function(a){return a!=="U"})===-1?Object.keys(n.actions).forEach(function(a){r._subscribers.forEach(function(l){return l.onSet({path:n.path.concat(a)},s)})}):this._subscribers.forEach(function(a){return a.onSet(n,s)}),s.forEach(function(a){return a()})},t.prototype.afterSet=function(){this.edition>0&&(this.edition+=1),this.edition<0&&(this.edition-=1)},t.prototype.toMethods=function(){return this._stateMethods},t.prototype.subscribe=function(e){this._subscribers.add(e)},t.prototype.unsubscribe=function(e){this._subscribers.delete(e)},t.prototype.toJSON=function(){throw new In(xn,mt.ToJson_Value)},t}(),Bo=Symbol("UnusedValue"),$u=Symbol("IsUnmounted"),ju=function(){function t(e,n,r,i,o){this.store=e,this.path=n,this.valueSource=r,this.valueEdition=i,this.onSetUsed=o,this.valueUsed=Bo}return Object.defineProperty(t.prototype,v4,{get:function(){return[this.get(),this.self()]},enumerable:!1,configurable:!0}),t.prototype.reconstruct=function(e,n,r,i){this.path=e,this.valueSource=n,this.valueEdition=r,this.valueUsed=Bo,i?(delete this.selfUsed,delete this.childrenCreated,delete this.childrenUsedPrevious):(this.valueUsedNoProxyPrevious=this.valueUsedNoProxy,this.childrenUsedPrevious=this.childrenUsed),delete this.valueUsedNoProxy,delete this.childrenUsed},t.prototype.reconnect=function(){this.get({__internalAllowPromised:!0,noproxy:this.valueUsedNoProxyPrevious}),this.childrenUsed=rf(rf({},this.childrenUsedPrevious),this.childrenUsed)},t.prototype.getUntracked=function(e){if(this.valueEdition!==this.store.edition&&(this.valueSource=this.store.get(this.path),this.valueEdition=this.store.edition,this.valueUsed!==Bo&&(this.valueUsed=Bo,this.get({__internalAllowPromised:!0}))),e)return this.valueSource;if(this.store.promiseError)throw this.store.promiseError;if(this.store.promise)throw new In(this.path,mt.GetStateWhenPromised);return this.valueSource},t.prototype.get=function(e){var n,r=this.getUntracked(e==null?void 0:e.__internalAllowPromised);return e!=null&&e.stealth?r:(this.valueUsed===Bo&&(Array.isArray(r)?this.valueUsed=this.valueArrayImpl(r):Object(r)===r?((n=r.constructor)===null||n===void 0?void 0:n.name)==="Object"?this.valueUsed=this.valueObjectImpl(r):(this.valueUsedNoProxy=!0,this.valueUsed=r):this.valueUsed=r),e!=null&&e.noproxy?(this.valueUsedNoProxy=!0,r):this.valueUsed)},Object.defineProperty(t.prototype,"value",{get:function(){return this.get()},enumerable:!1,configurable:!0}),t.prototype.setUntrackedV4=function(e){if(typeof e=="function"&&(e=e(this.getUntracked())),this.store.preset(this.self(),e),Object(e)===e&&e[Tu])throw new In(this.path,mt.SetStateToValueFromState);return e!==Object(e)&&e===this.getUntracked(!0)?null:this.store.set(this.path,e)},t.prototype.set=function(e){var n=this.setUntrackedV4(e);n&&this.store.update(this.self(),n)},t.prototype.mergeUntracked=function(e){var n=this.mergeUntrackedV4(e);return n?[n.path]:[]},t.prototype.mergeUntrackedV4=function(e){var n=this.getUntracked();if(typeof e=="function"&&(e=e(n)),this.store.premerge(this.self(),e),Array.isArray(n))if(Array.isArray(e)){var r={path:this.path,actions:{}};return e.forEach(function(a,l){r.actions[n.push(a)-1]="I"}),Object.keys(r.actions).length>0?(this.setUntrackedV4(n),r):null}else{var i={path:this.path,actions:{}},o=[];return Object.keys(e).map(function(a){return Number(a)}).sort(function(a,l){return a-l}).forEach(function(a){var l=Number(a),c=e[l];c===lt?(i.actions[l]="D",o.push(l)):(l in n?i.actions[l]="U":i.actions[l]="I",n[l]=c)}),o.reverse().forEach(function(a){n.splice(a,1)}),Object.keys(i.actions).length>0?(this.setUntrackedV4(n),i):null}else if(Object(n)===n){var s={path:this.path,actions:{}};return Object.keys(e).forEach(function(a){var l=e[a];l===lt?(s.actions[a]="D",delete n[a]):(a in n?s.actions[a]="U":s.actions[a]="I",n[a]=l)}),Object.keys(s.actions).length>0?(this.setUntrackedV4(n),s):null}else return typeof n=="string"?this.setUntrackedV4(n+String(e)):this.setUntrackedV4(e)},t.prototype.merge=function(e){var n=this.mergeUntrackedV4(e);n&&this.store.update(this.self(),n)},t.prototype.nested=function(e){return this.child(e).self()},t.prototype.rerender=function(e){for(var n=0,r=e;n<r.length;n++){var i=r[n];this.store.update(this.self(),{path:i})}},t.prototype.activate=function(e){this.store.activate(e)},t.prototype.deactivate=function(){this.store.deactivate()},t.prototype.subscribe=function(e){this.subscribers===void 0&&(this.subscribers=new Set),this.subscribers.add(e)},t.prototype.unsubscribe=function(e){this.subscribers&&this.subscribers.delete(e)},Object.defineProperty(t.prototype,"isMounted",{get:function(){return!this.onSetUsed[$u]},enumerable:!1,configurable:!0}),t.prototype.onMount=function(){delete this.onSetUsed[$u]},t.prototype.onUnmount=function(){this.onSetUsed[$u]=!0},t.prototype.onSet=function(e,n){var r=this,i=function(){var s,a=!1;r.valueUsedNoProxy&&r.valueUsed!==Bo&&(n.add(r.onSetUsed),delete r.selfUsed,a=!0);var l=e.path,c=l[r.path.length];if(c===void 0){if(r.valueUsed!==Bo){if(n.add(r.onSetUsed),delete r.selfUsed,delete r.childrenUsed,e.actions&&r.childrenCreated)if(Array.isArray(r.valueSource)&&Object.values(e.actions).includes("D")){var u=Object.keys(e.actions).map(function(h){return Number(h)}).sort(function(h,p){return h-p}).find(function(h){var p;return((p=e.actions)===null||p===void 0?void 0:p[h])==="D"});for(var f in r.childrenCreated)(Number(f)>=u||f in e.actions)&&delete r.childrenCreated[f]}else for(var f in e.actions)delete r.childrenCreated[f];else delete r.childrenCreated;return!0}}else{var d=(s=r.childrenUsed)===null||s===void 0?void 0:s[c];if(d&&d.onSet(e,n))return delete r.selfUsed,!0}return a},o=i();return!o&&this.subscribers!==void 0&&this.subscribers.forEach(function(s){s.onSet(e,n)&&delete r.selfUsed}),o},Object.defineProperty(t.prototype,"keys",{get:function(){var e=this.get();if(Array.isArray(e))return Object.keys(e).map(function(n){return Number(n)}).filter(function(n){return Number.isInteger(n)});if(Object(e)===e)return Object.keys(e)},enumerable:!1,configurable:!0}),t.prototype.child=function(e){this.childrenUsed=this.childrenUsed||{};var n=this.childrenUsed.hasOwnProperty(e)&&this.childrenUsed[e];if(n)return n;var r=this.valueSource[e];if(typeof r=="function")throw new In(this.path,mt.GetProperty_Function);this.childrenCreated=this.childrenCreated||{};var i=this.childrenCreated[e],o;return i?(i.reconstruct(this.path.concat(e),r,this.valueEdition,!1),o=i):(o=new t(this.store,this.path.concat(e),r,this.valueEdition,this.onSetUsed),this.childrenCreated[e]=o),this.valueUsedNoProxy&&(o.valueUsedNoProxy=!0),this.childrenUsed[e]=o,o},t.prototype.valueArrayImpl=function(e){var n=this;return $h(this.path,e,function(){return e},function(r,i){if(i==="length")return r.length;if(i in Array.prototype)return Array.prototype[i];if(i===Tu)return n;if(typeof i=="symbol")return r[i];var o=Number(i);if(Number.isInteger(o))return n.child(o).get()},function(r,i,o){if(typeof i=="symbol")return r[i]=o,!0;throw new In(n.path,mt.SetProperty_Value)},!0)},t.prototype.valueObjectImpl=function(e){var n=this;return $h(this.path,e,function(){return e},function(r,i){return i in Object.prototype?Object.prototype[i]:i===Tu?n:typeof i=="symbol"?r[i]:n.child(i).get()},function(r,i,o){if(typeof i=="symbol")return r[i]=o,!0;throw new In(n.path,mt.SetProperty_Value)},!0)},t.prototype.self=function(){var e=this;if(this.selfUsed)return this.selfUsed;var n=function(r,i){if(i===cO)return e;if(typeof i!="symbol"){if(i==="toJSON")throw new In(e.path,mt.ToJson_State);var o=function(a){var l=e.get({__internalAllowPromised:a==="$$typeof"||a==="constructor"});if(a in Object.prototype)return Object.prototype[a];if(!(Object(l)!==l&&l!==lt)){if(Array.isArray(l)){if(a==="length")return l.length;if(a in Array.prototype)return Array.prototype[a];var c=Number(a);return Number.isInteger(c)?e.nested(c):void 0}return e.nested(a.toString())}};switch(i){case"path":return e.path;case"keys":return e.keys;case"value":return e.value;case"ornull":return e.ornull;case"promised":return e.promised;case"promise":return e.promise;case"error":return e.error;case"get":return function(a){return e.get(a)};case"set":return function(a){return e.set(a)};case"merge":return function(a){return e.merge(a)};case"nested":return function(a){return o(a)};default:var s=e.store.extension;return s&&i in s?s[i](e.self()):o(i)}}};return this.selfUsed=$h(this.path,this.valueSource,function(r){return e.get({__internalAllowPromised:!0,stealth:r==null?void 0:r.stealth})},n,function(r,i,o){throw new In(e.path,mt.SetProperty_State)},!1),this.selfUsed},Object.defineProperty(t.prototype,"promised",{get:function(){return this.get({__internalAllowPromised:!0}),!!this.store.promise},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"promise",{get:function(){var e=this,n;return this.get({__internalAllowPromised:!0}),(n=this.store.promise)===null||n===void 0?void 0:n.then(function(r){return e.self()})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"error",{get:function(){return this.get({__internalAllowPromised:!!this.store.promiseError}),this.store.promiseError},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ornull",{get:function(){var e=this.get();return e==null?e:this.self()},enumerable:!1,configurable:!0}),t}();function $h(t,e,n,r,i,o){var s=function(a){throw new In(t,a)};return Object(e)!==e&&(e={}),new Proxy(e,{getPrototypeOf:function(a){var l=n();return l==null?null:Object.getPrototypeOf(l===lt?new Promise(function(){}):l)},setPrototypeOf:function(a,l){return s(o?mt.SetPrototypeOf_State:mt.SetPrototypeOf_Value)},isExtensible:function(a){return!0},preventExtensions:function(a){return s(o?mt.PreventExtensions_State:mt.PreventExtensions_Value)},getOwnPropertyDescriptor:function(a,l){var c=n();if(Object(c)===c){var u=Object.getOwnPropertyDescriptor(c,l);return Array.isArray(c)&&l in Array.prototype?u:u&&{configurable:!0,enumerable:u.enumerable,get:function(){return r(c,l)},set:void 0}}if(!(o||c===lt)){if(l==="value")return{configurable:!0,enumerable:!0,get:function(){return n({stealth:!0})},set:void 0};if(l==="path")return{configurable:!0,enumerable:!0,get:function(){return t},set:void 0}}},has:function(a,l){if(typeof l=="symbol")return!1;var c=n();return Object(c)===c?l in c:o||c===lt?!1:l==="value"||l==="path"},get:r,set:i,deleteProperty:function(a,l){return s(o?mt.DeleteProperty_State:mt.DeleteProperty_Value)},defineProperty:function(a,l,c){return s(o?mt.DefineProperty_State:mt.DefineProperty_Value)},ownKeys:function(a){var l=n();return Array.isArray(l)&&a.length===void 0&&Object.defineProperty(e,"length",{value:0,writable:!0,enumerable:!1,configurable:!1}),Object(l)===l?Object.getOwnPropertyNames(l):o||l===lt?[]:["value","path"]},apply:function(a,l,c){return s(o?mt.Apply_State:mt.Apply_Value)},construct:function(a,l,c){return s(o?mt.Construct_State:mt.Construct_Value)}})}function Ak(t){var e=t;if(typeof t=="function"&&(e=t()),Object(e)===e&&e[Tu])throw new In(xn,mt.InitStateToValueFromState);return new b4(e)}var jh={interceptDependencyListsMode:"always",isDevelopmentMode:typeof process=="object"&&typeof process.env=="object"&&process.env.NODE_ENV==="development",promiseDetector:function(t){return Promise.resolve(t)===t},hiddenInterceptDependencyListsModeDebug:!1};function ss(t,e){for(var n=0,r=t||[];n<r.length;n++){var i=r[n];if(i===Object(i)){var o=i[cO];o&&o.reconnect()}}return t}var of;function S4(t,e){return ss(e),of(t,e)}var sf;function w4(t,e){return ss(e),sf(t,e)}var Bg;function C4(t,e){return ss(e),Bg(t,e)}var _g;function k4(t,e,n){return ss(n),_g(t,e,n)}var Mg;function A4(t,e){return ss(e),Mg(t,e)}var Ng;function P4(t,e){return ss(e),Ng(t,e)}var Fg;function E4(t,e){return Fg(t,function(n,r){return ss(Object.keys(r).map(function(i){return r[i]})),(e||x4)(n,r)})}function I4(){!of&&X.default.useEffect&&(of=X.default.useEffect,X.default.useEffect=S4),!sf&&X.default.useLayoutEffect&&(sf=X.default.useLayoutEffect,X.default.useLayoutEffect=w4),!Bg&&X.default.useInsertionEffect&&(Bg=X.default.useInsertionEffect,X.default.useInsertionEffect=C4),!_g&&X.default.useImperativeHandle&&(_g=X.default.useImperativeHandle,X.default.useImperativeHandle=k4),!Mg&&X.default.useMemo&&(Mg=X.default.useMemo,X.default.useMemo=A4),!Ng&&X.default.useCallback&&(Ng=X.default.useCallback,X.default.useCallback=P4),!Fg&&X.default.memo&&(Fg=X.default.memo,X.default.memo=E4)}I4();var Rh=typeof window<"u"?sf:of;const uO={active:!0,key:"",value:""};var K=(t=>(t.NoAuth="No Auth",t.BasicAuth="Basic Auth",t.DigestAuth="Digest Auth",t.JWT="JWT",t.APIKey="API key",t.OAuth2="OAuth 2.0",t.OpenIDConnect="OpenID Connect",t))(K||{}),se=(t=>(t.ClientCredentials="Client Credentials",t.ClientCredentialsWithJwtAssertion="Client Credentials with JWT Assertion",t.AuthorizationCode="Authorization Code",t.Implicit="Implicit",t.Password="Password",t))(se||{}),Er=(t=>(t.Body="Body",t.Header="Header",t.URL="URL",t))(Er||{});const as="{{",ls="}}",Pk=`${as}(.*?)${ls}`;function ka(t){const e=new RegExp(`${as}(.*?)${ls}`,"g"),n=[];let r;for(;(r=e.exec(t))!==null;)n.push({start:r.index,end:r.index+r[0].length,content:r[1]});return n}const T4=T.span`
115
115
  border-radius: var(--border-radius);
116
116
  border: 1px solid var(--border-color-primary);
117
117
  padding: 0 calc(var(--spacing-xxs) / 2);
@@ -137,7 +137,7 @@ You should wrap it with \`css\` like this:
137
137
  `),r=0;r<n.length;r++){var i=BR(n[r]);if(i){if(_R.has(i))break;if(/^[A-Z]/.test(i))return MR(i)}}},Gg="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Yg="__EMOTION_LABEL_PLEASE_DO_NOT_USE__",FR=function(e,n){if(process.env.NODE_ENV!=="production"&&typeof n.css=="string"&&n.css.indexOf(":")!==-1)throw new Error("Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/react' like this: css`"+n.css+"`");var r={};for(var i in n)xO.call(n,i)&&(r[i]=n[i]);if(r[Gg]=e,process.env.NODE_ENV!=="production"&&n.css&&(typeof n.css!="object"||typeof n.css.name!="string"||n.css.name.indexOf("-")===-1)){var o=NR(new Error().stack);o&&(r[Yg]=o)}return r},ZR=function(e){var n=e.cache,r=e.serialized,i=e.isStringTag;return gO(n,r,i),Gk(function(){return mO(n,r,i)}),null},Yk=yO(function(t,e,n){var r=t.css;typeof r=="string"&&e.registered[r]!==void 0&&(r=e.registered[r]);var i=t[Gg],o=[r],s="";typeof t.className=="string"?s=Wk(e.registered,o,t.className):t.className!=null&&(s=t.className+" ");var a=Ql(o,void 0,j.useContext(Td));if(process.env.NODE_ENV!=="production"&&a.name.indexOf("-")===-1){var l=t[Yg];l&&(a=Ql([a,"label:"+l+";"]))}s+=e.key+"-"+a.name;var c={};for(var u in t)xO.call(t,u)&&u!=="css"&&u!==Gg&&(process.env.NODE_ENV==="production"||u!==Yg)&&(c[u]=t[u]);return c.ref=n,c.className=s,j.createElement(j.Fragment,null,j.createElement(ZR,{cache:e,serialized:a,isStringTag:typeof i=="string"}),j.createElement(i,c))});process.env.NODE_ENV!=="production"&&(Yk.displayName="EmotionCssPropInternal");var WR={name:"@emotion/react",version:"11.10.6",main:"dist/emotion-react.cjs.js",module:"dist/emotion-react.esm.js",browser:{"./dist/emotion-react.esm.js":"./dist/emotion-react.browser.esm.js"},exports:{".":{module:{worker:"./dist/emotion-react.worker.esm.js",browser:"./dist/emotion-react.browser.esm.js",default:"./dist/emotion-react.esm.js"},default:"./dist/emotion-react.cjs.js"},"./jsx-runtime":{module:{worker:"./jsx-runtime/dist/emotion-react-jsx-runtime.worker.esm.js",browser:"./jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js",default:"./jsx-runtime/dist/emotion-react-jsx-runtime.esm.js"},default:"./jsx-runtime/dist/emotion-react-jsx-runtime.cjs.js"},"./_isolated-hnrs":{module:{worker:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.worker.esm.js",browser:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js",default:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.esm.js"},default:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.cjs.js"},"./jsx-dev-runtime":{module:{worker:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.worker.esm.js",browser:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.esm.js",default:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.esm.js"},default:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.cjs.js"},"./package.json":"./package.json","./types/css-prop":"./types/css-prop.d.ts","./macro":"./macro.js"},types:"types/index.d.ts",files:["src","dist","jsx-runtime","jsx-dev-runtime","_isolated-hnrs","types/*.d.ts","macro.js","macro.d.ts","macro.js.flow"],sideEffects:!1,author:"Emotion Contributors",license:"MIT",scripts:{"test:typescript":"dtslint types"},dependencies:{"@babel/runtime":"^7.18.3","@emotion/babel-plugin":"^11.10.6","@emotion/cache":"^11.10.5","@emotion/serialize":"^1.1.1","@emotion/use-insertion-effect-with-fallbacks":"^1.0.0","@emotion/utils":"^1.2.0","@emotion/weak-memoize":"^0.3.0","hoist-non-react-statics":"^3.3.1"},peerDependencies:{react:">=16.8.0"},peerDependenciesMeta:{"@types/react":{optional:!0}},devDependencies:{"@definitelytyped/dtslint":"0.0.112","@emotion/css":"11.10.6","@emotion/css-prettifier":"1.1.1","@emotion/server":"11.10.0","@emotion/styled":"11.10.6","html-tag-names":"^1.1.2",react:"16.14.0","svg-tag-names":"^1.1.1",typescript:"^4.5.5"},repository:"https://github.com/emotion-js/emotion/tree/main/packages/react",publishConfig:{access:"public"},"umd:main":"dist/emotion-react.umd.min.js",preconstruct:{entrypoints:["./index.js","./jsx-runtime.js","./jsx-dev-runtime.js","./_isolated-hnrs.js"],umdName:"emotionReact",exports:{envConditions:["browser","worker"],extra:{"./types/css-prop":"./types/css-prop.d.ts","./macro":"./macro.js"}}}},Pe=function(e,n){var r=arguments;if(n==null||!xO.call(n,"css"))return j.createElement.apply(void 0,r);var i=r.length,o=new Array(i);o[0]=Yk,o[1]=FR(e,n);for(var s=2;s<i;s++)o[s]=r[s];return j.createElement.apply(null,o)},Bv=!1,VR=yO(function(t,e){process.env.NODE_ENV!=="production"&&!Bv&&(t.className||t.css)&&(console.error("It looks like you're using the css prop on Global, did you mean to use the styles prop instead?"),Bv=!0);var n=t.styles,r=Ql([n],void 0,j.useContext(Td)),i=j.useRef();return Dv(function(){var o=e.key+"-global",s=new e.sheet.constructor({key:o,nonce:e.sheet.nonce,container:e.sheet.container,speedy:e.sheet.isSpeedy}),a=!1,l=document.querySelector('style[data-emotion="'+o+" "+r.name+'"]');return e.sheet.tags.length&&(s.before=e.sheet.tags[0]),l!==null&&(a=!0,l.setAttribute("data-emotion",o),s.hydrate([l])),i.current=[s,a],function(){s.flush()}},[e]),Dv(function(){var o=i.current,s=o[0],a=o[1];if(a){o[1]=!1;return}if(r.next!==void 0&&mO(e,r.next,!0),s.tags.length){var l=s.tags[s.tags.length-1].nextElementSibling;s.before=l,s.flush()}e.insert("",r,s,!1)},[e,r.name]),null});process.env.NODE_ENV!=="production"&&(VR.displayName="EmotionGlobal");function bO(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return Ql(e)}var zR=function(){var e=bO.apply(void 0,arguments),n="animation-"+e.name;return{name:n,styles:"@keyframes "+n+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}},LR=function t(e){for(var n=e.length,r=0,i="";r<n;r++){var o=e[r];if(o!=null){var s=void 0;switch(typeof o){case"boolean":break;case"object":{if(Array.isArray(o))s=t(o);else{process.env.NODE_ENV!=="production"&&o.styles!==void 0&&o.name!==void 0&&console.error("You have passed styles created with `css` from `@emotion/react` package to the `cx`.\n`cx` is meant to compose class names (strings) so you should convert those styles to a class name by passing them to the `css` received from <ClassNames/> component."),s="";for(var a in o)o[a]&&a&&(s&&(s+=" "),s+=a)}break}default:s=o}s&&(i&&(i+=" "),i+=s)}}return i};function XR(t,e,n){var r=[],i=Wk(t,r,n);return r.length<2?n:i+e(r)}var GR=function(e){var n=e.cache,r=e.serializedArr;return Gk(function(){for(var i=0;i<r.length;i++)mO(n,r[i],!1)}),null},YR=yO(function(t,e){var n=!1,r=[],i=function(){if(n&&process.env.NODE_ENV!=="production")throw new Error("css can only be used during render");for(var c=arguments.length,u=new Array(c),f=0;f<c;f++)u[f]=arguments[f];var d=Ql(u,e.registered);return r.push(d),gO(e,d,!1),e.key+"-"+d.name},o=function(){if(n&&process.env.NODE_ENV!=="production")throw new Error("cx can only be used during render");for(var c=arguments.length,u=new Array(c),f=0;f<c;f++)u[f]=arguments[f];return XR(e.registered,i,LR(u))},s={css:i,cx:o,theme:j.useContext(Td)},a=t.children(s);return n=!0,j.createElement(j.Fragment,null,j.createElement(GR,{cache:e,serializedArr:r}),a)});process.env.NODE_ENV!=="production"&&(YR.displayName="EmotionClassNames");if(process.env.NODE_ENV!=="production"){var _v=!0,qR=typeof jest<"u"||typeof vi<"u";if(_v&&!qR){var Mv=typeof globalThis<"u"?globalThis:_v?window:global,Nv="__EMOTION_REACT_"+WR.version.split(".")[0]+"__";Mv[Nv]&&console.warn("You are loading @emotion/react when it is already loaded. Running multiple instances may cause problems. This can happen if multiple versions are used, or if multiple builds of the same version are used."),Mv[Nv]=!0}}function UR(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}const HR=Math.min,JR=Math.max,ff=Math.round,zc=Math.floor,df=t=>({x:t,y:t});function KR(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function qk(t){return Hk(t)?(t.nodeName||"").toLowerCase():"#document"}function Mi(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Uk(t){var e;return(e=(Hk(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Hk(t){return t instanceof Node||t instanceof Mi(t).Node}function eD(t){return t instanceof Element||t instanceof Mi(t).Element}function SO(t){return t instanceof HTMLElement||t instanceof Mi(t).HTMLElement}function Fv(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Mi(t).ShadowRoot}function Jk(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=wO(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(i)}function tD(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function nD(t){return["html","body","#document"].includes(qk(t))}function wO(t){return Mi(t).getComputedStyle(t)}function rD(t){if(qk(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Fv(t)&&t.host||Uk(t);return Fv(e)?e.host:e}function Kk(t){const e=rD(t);return nD(e)?t.ownerDocument?t.ownerDocument.body:t.body:SO(e)&&Jk(e)?e:Kk(e)}function hf(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=Kk(t),o=i===((r=t.ownerDocument)==null?void 0:r.body),s=Mi(i);return o?e.concat(s,s.visualViewport||[],Jk(i)?i:[],s.frameElement&&n?hf(s.frameElement):[]):e.concat(i,hf(i,[],n))}function iD(t){const e=wO(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=SO(t),o=i?t.offsetWidth:n,s=i?t.offsetHeight:r,a=ff(n)!==o||ff(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function CO(t){return eD(t)?t:t.contextElement}function Zv(t){const e=CO(t);if(!SO(e))return df(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:o}=iD(e);let s=(o?ff(n.width):n.width)/r,a=(o?ff(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const oD=df(0);function sD(t){const e=Mi(t);return!tD()||!e.visualViewport?oD:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function aD(t,e,n){return!1}function Wv(t,e,n,r){e===void 0&&(e=!1);const i=t.getBoundingClientRect(),o=CO(t);let s=df(1);e&&(s=Zv(t));const a=aD()?sD(o):df(0);let l=(i.left+a.x)/s.x,c=(i.top+a.y)/s.y,u=i.width/s.x,f=i.height/s.y;if(o){const d=Mi(o),h=r;let p=d.frameElement;for(;p&&r&&h!==d;){const O=Zv(p),m=p.getBoundingClientRect(),x=wO(p),v=m.left+(p.clientLeft+parseFloat(x.paddingLeft))*O.x,y=m.top+(p.clientTop+parseFloat(x.paddingTop))*O.y;l*=O.x,c*=O.y,u*=O.x,f*=O.y,l+=v,c+=y,p=Mi(p).frameElement}}return KR({width:u,height:f,x:l,y:c})}function lD(t,e){let n=null,r;const i=Uk(t);function o(){clearTimeout(r),n&&n.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),o();const{left:c,top:u,width:f,height:d}=t.getBoundingClientRect();if(a||e(),!f||!d)return;const h=zc(u),p=zc(i.clientWidth-(c+f)),O=zc(i.clientHeight-(u+d)),m=zc(c),v={rootMargin:-h+"px "+-p+"px "+-O+"px "+-m+"px",threshold:JR(0,HR(1,l))||1};let y=!0;function S(b){const w=b[0].intersectionRatio;if(w!==l){if(!y)return s();w?s(!1,w):r=setTimeout(()=>{s(!1,1e-7)},100)}y=!1}try{n=new IntersectionObserver(S,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(S,v)}n.observe(t)}return s(!0),o}function cD(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=CO(t),u=i||o?[...c?hf(c):[],...hf(e)]:[];u.forEach(x=>{i&&x.addEventListener("scroll",n,{passive:!0}),o&&x.addEventListener("resize",n)});const f=c&&a?lD(c,n):null;let d=-1,h=null;s&&(h=new ResizeObserver(x=>{let[v]=x;v&&v.target===c&&h&&(h.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{h&&h.observe(e)})),n()}),c&&!l&&h.observe(c),h.observe(e));let p,O=l?Wv(t):null;l&&m();function m(){const x=Wv(t);O&&(x.x!==O.x||x.y!==O.y||x.width!==O.width||x.height!==O.height)&&n(),O=x,p=requestAnimationFrame(m)}return n(),()=>{u.forEach(x=>{i&&x.removeEventListener("scroll",n),o&&x.removeEventListener("resize",n)}),f&&f(),h&&h.disconnect(),h=null,l&&cancelAnimationFrame(p)}}var qg=j.useLayoutEffect,uD=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],pf=function(){};function fD(t,e){return e?e[0]==="-"?t+e:t+"__"+e:t}function dD(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var o=[].concat(r);if(e&&t)for(var s in e)e.hasOwnProperty(s)&&e[s]&&o.push("".concat(fD(t,s)));return o.filter(function(a){return a}).map(function(a){return String(a).trim()}).join(" ")}var Vv=function(e){return bD(e)?e.filter(Boolean):Vr(e)==="object"&&e!==null?[e]:[]},eA=function(e){e.className,e.clearValue,e.cx,e.getStyles,e.getClassNames,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme;var n=Tr(e,uD);return le({},n)},Ft=function(e,n,r){var i=e.cx,o=e.getStyles,s=e.getClassNames,a=e.className;return{css:o(n,e),className:i(r??{},s(n,e),a)}};function $d(t){return[document.documentElement,document.body,window].indexOf(t)>-1}function hD(t){return $d(t)?window.innerHeight:t.clientHeight}function tA(t){return $d(t)?window.pageYOffset:t.scrollTop}function gf(t,e){if($d(t)){window.scrollTo(0,e);return}t.scrollTop=e}function pD(t){var e=getComputedStyle(t),n=e.position==="absolute",r=/(auto|scroll)/;if(e.position==="fixed")return document.documentElement;for(var i=t;i=i.parentElement;)if(e=getComputedStyle(i),!(n&&e.position==="static")&&r.test(e.overflow+e.overflowY+e.overflowX))return i;return document.documentElement}function gD(t,e,n,r){return n*((t=t/r-1)*t*t+1)+e}function Lc(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:pf,i=tA(t),o=e-i,s=10,a=0;function l(){a+=s;var c=gD(a,i,o,n);gf(t,c),a<n?window.requestAnimationFrame(l):r(t)}l()}function zv(t,e){var n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=e.offsetHeight/3;r.bottom+i>n.bottom?gf(t,Math.min(e.offsetTop+e.clientHeight-t.offsetHeight+i,t.scrollHeight)):r.top-i<n.top&&gf(t,Math.max(e.offsetTop-i,0))}function mD(t){var e=t.getBoundingClientRect();return{bottom:e.bottom,height:e.height,left:e.left,right:e.right,top:e.top,width:e.width}}function Lv(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function OD(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var nA=!1,xD={get passive(){return nA=!0}},Xc=typeof window<"u"?window:{};Xc.addEventListener&&Xc.removeEventListener&&(Xc.addEventListener("p",pf,xD),Xc.removeEventListener("p",pf,!1));var vD=nA;function yD(t){return t!=null}function bD(t){return Array.isArray(t)}function Gc(t,e,n){return t?e:n}var SD=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=Object.entries(e).filter(function(s){var a=Ve(s,1),l=a[0];return!r.includes(l)});return o.reduce(function(s,a){var l=Ve(a,2),c=l[0],u=l[1];return s[c]=u,s},{})},wD=["children","innerProps"],CD=["children","innerProps"];function kD(t){var e=t.maxHeight,n=t.menuEl,r=t.minHeight,i=t.placement,o=t.shouldScroll,s=t.isFixedPosition,a=t.controlHeight,l=pD(n),c={placement:"bottom",maxHeight:e};if(!n||!n.offsetParent)return c;var u=l.getBoundingClientRect(),f=u.height,d=n.getBoundingClientRect(),h=d.bottom,p=d.height,O=d.top,m=n.offsetParent.getBoundingClientRect(),x=m.top,v=s?window.innerHeight:hD(l),y=tA(l),S=parseInt(getComputedStyle(n).marginBottom,10),b=parseInt(getComputedStyle(n).marginTop,10),w=x-b,C=v-O,k=w+y,I=f-y-O,A=h-v+y+S,E=y+O-b,$=160;switch(i){case"auto":case"bottom":if(C>=p)return{placement:"bottom",maxHeight:e};if(I>=p&&!s)return o&&Lc(l,A,$),{placement:"bottom",maxHeight:e};if(!s&&I>=r||s&&C>=r){o&&Lc(l,A,$);var R=s?C-S:I-S;return{placement:"bottom",maxHeight:R}}if(i==="auto"||s){var M=e,Q=s?w:k;return Q>=r&&(M=Math.min(Q-S-a,e)),{placement:"top",maxHeight:M}}if(i==="bottom")return o&&gf(l,A),{placement:"bottom",maxHeight:e};break;case"top":if(w>=p)return{placement:"top",maxHeight:e};if(k>=p&&!s)return o&&Lc(l,E,$),{placement:"top",maxHeight:e};if(!s&&k>=r||s&&w>=r){var Z=e;return(!s&&k>=r||s&&w>=r)&&(Z=s?w-b:k-b),o&&Lc(l,E,$),{placement:"top",maxHeight:Z}}return{placement:"bottom",maxHeight:e};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return c}function AD(t){var e={bottom:"top",top:"bottom"};return t?e[t]:"bottom"}var rA=function(e){return e==="auto"?"bottom":e},PD=function(e,n){var r,i=e.placement,o=e.theme,s=o.borderRadius,a=o.spacing,l=o.colors;return le((r={label:"menu"},nn(r,AD(i),"100%"),nn(r,"position","absolute"),nn(r,"width","100%"),nn(r,"zIndex",1),r),n?{}:{backgroundColor:l.neutral0,borderRadius:s,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:a.menuGutter,marginTop:a.menuGutter})},iA=j.createContext(null),ED=function(e){var n=e.children,r=e.minMenuHeight,i=e.maxMenuHeight,o=e.menuPlacement,s=e.menuPosition,a=e.menuShouldScrollIntoView,l=e.theme,c=j.useContext(iA)||{},u=c.setPortalPlacement,f=j.useRef(null),d=j.useState(i),h=Ve(d,2),p=h[0],O=h[1],m=j.useState(null),x=Ve(m,2),v=x[0],y=x[1],S=l.spacing.controlHeight;return qg(function(){var b=f.current;if(b){var w=s==="fixed",C=a&&!w,k=kD({maxHeight:i,menuEl:b,minHeight:r,placement:o,shouldScroll:C,isFixedPosition:w,controlHeight:S});O(k.maxHeight),y(k.placement),u==null||u(k.placement)}},[i,o,s,a,r,u,S]),n({ref:f,placerProps:le(le({},e),{},{placement:v||rA(o),maxHeight:p})})},ID=function(e){var n=e.children,r=e.innerRef,i=e.innerProps;return Pe("div",Ae({},Ft(e,"menu",{menu:!0}),{ref:r},i),n)},TD=ID,$D=function(e,n){var r=e.maxHeight,i=e.theme.spacing.baseUnit;return le({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:i,paddingTop:i})},jD=function(e){var n=e.children,r=e.innerProps,i=e.innerRef,o=e.isMulti;return Pe("div",Ae({},Ft(e,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:i},r),n)},oA=function(e,n){var r=e.theme,i=r.spacing.baseUnit,o=r.colors;return le({textAlign:"center"},n?{}:{color:o.neutral40,padding:"".concat(i*2,"px ").concat(i*3,"px")})},RD=oA,DD=oA,QD=function(e){var n=e.children,r=n===void 0?"No options":n,i=e.innerProps,o=Tr(e,wD);return Pe("div",Ae({},Ft(le(le({},o),{},{children:r,innerProps:i}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),i),r)},BD=function(e){var n=e.children,r=n===void 0?"Loading...":n,i=e.innerProps,o=Tr(e,CD);return Pe("div",Ae({},Ft(le(le({},o),{},{children:r,innerProps:i}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),i),r)},_D=function(e){var n=e.rect,r=e.offset,i=e.position;return{left:n.left,position:i,top:r,width:n.width,zIndex:1}},MD=function(e){var n=e.appendTo,r=e.children,i=e.controlElement,o=e.innerProps,s=e.menuPlacement,a=e.menuPosition,l=j.useRef(null),c=j.useRef(null),u=j.useState(rA(s)),f=Ve(u,2),d=f[0],h=f[1],p=j.useMemo(function(){return{setPortalPlacement:h}},[]),O=j.useState(null),m=Ve(O,2),x=m[0],v=m[1],y=j.useCallback(function(){if(i){var C=mD(i),k=a==="fixed"?0:window.pageYOffset,I=C[d]+k;(I!==(x==null?void 0:x.offset)||C.left!==(x==null?void 0:x.rect.left)||C.width!==(x==null?void 0:x.rect.width))&&v({offset:I,rect:C})}},[i,a,d,x==null?void 0:x.offset,x==null?void 0:x.rect.left,x==null?void 0:x.rect.width]);qg(function(){y()},[y]);var S=j.useCallback(function(){typeof c.current=="function"&&(c.current(),c.current=null),i&&l.current&&(c.current=cD(i,l.current,y,{elementResize:"ResizeObserver"in window}))},[i,y]);qg(function(){S()},[S]);var b=j.useCallback(function(C){l.current=C,S()},[S]);if(!n&&a!=="fixed"||!x)return null;var w=Pe("div",Ae({ref:b},Ft(le(le({},e),{},{offset:x.offset,position:a,rect:x.rect}),"menuPortal",{"menu-portal":!0}),o),r);return Pe(iA.Provider,{value:p},n?rO.createPortal(w,n):w)},ND=function(e){var n=e.isDisabled,r=e.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},FD=function(e){var n=e.children,r=e.innerProps,i=e.isDisabled,o=e.isRtl;return Pe("div",Ae({},Ft(e,"container",{"--is-disabled":i,"--is-rtl":o}),r),n)},ZD=function(e,n){var r=e.theme.spacing,i=e.isMulti,o=e.hasValue,s=e.selectProps.controlShouldRenderValue;return le({alignItems:"center",display:i&&o&&s?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(r.baseUnit/2,"px ").concat(r.baseUnit*2,"px")})},WD=function(e){var n=e.children,r=e.innerProps,i=e.isMulti,o=e.hasValue;return Pe("div",Ae({},Ft(e,"valueContainer",{"value-container":!0,"value-container--is-multi":i,"value-container--has-value":o}),r),n)},VD=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},zD=function(e){var n=e.children,r=e.innerProps;return Pe("div",Ae({},Ft(e,"indicatorsContainer",{indicators:!0}),r),n)},Xv,LD=["size"],XD=["innerProps","isRtl","size"];function GD(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var YD=process.env.NODE_ENV==="production"?{name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"}:{name:"tj5bde-Svg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0;label:Svg;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgUmVhY3ROb2RlIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsganN4LCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmltcG9ydCB7XG4gIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lLFxuICBDU1NPYmplY3RXaXRoTGFiZWwsXG4gIEdyb3VwQmFzZSxcbn0gZnJvbSAnLi4vdHlwZXMnO1xuaW1wb3J0IHsgZ2V0U3R5bGVQcm9wcyB9IGZyb20gJy4uL3V0aWxzJztcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBEcm9wZG93biAmIENsZWFyIEljb25zXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgU3ZnID0gKHtcbiAgc2l6ZSxcbiAgLi4ucHJvcHNcbn06IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU6IG51bWJlciB9KSA9PiAoXG4gIDxzdmdcbiAgICBoZWlnaHQ9e3NpemV9XG4gICAgd2lkdGg9e3NpemV9XG4gICAgdmlld0JveD1cIjAgMCAyMCAyMFwiXG4gICAgYXJpYS1oaWRkZW49XCJ0cnVlXCJcbiAgICBmb2N1c2FibGU9XCJmYWxzZVwiXG4gICAgY3NzPXt7XG4gICAgICBkaXNwbGF5OiAnaW5saW5lLWJsb2NrJyxcbiAgICAgIGZpbGw6ICdjdXJyZW50Q29sb3InLFxuICAgICAgbGluZUhlaWdodDogMSxcbiAgICAgIHN0cm9rZTogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBzdHJva2VXaWR0aDogMCxcbiAgICB9fVxuICAgIHsuLi5wcm9wc31cbiAgLz5cbik7XG5cbmV4cG9ydCB0eXBlIENyb3NzSWNvblByb3BzID0gSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZT86IG51bWJlciB9O1xuZXhwb3J0IGNvbnN0IENyb3NzSWNvbiA9IChwcm9wczogQ3Jvc3NJY29uUHJvcHMpID0+IChcbiAgPFN2ZyBzaXplPXsyMH0gey4uLnByb3BzfT5cbiAgICA8cGF0aCBkPVwiTTE0LjM0OCAxNC44NDljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDBsLTIuNjUxLTMuMDMwLTIuNjUxIDMuMDI5Yy0wLjQ2OSAwLjQ2OS0xLjIyOSAwLjQ2OS0xLjY5NyAwLTAuNDY5LTAuNDY5LTAuNDY5LTEuMjI5IDAtMS42OTdsMi43NTgtMy4xNS0yLjc1OS0zLjE1MmMtMC40NjktMC40NjktMC40NjktMS4yMjggMC0xLjY5N3MxLjIyOC0wLjQ2OSAxLjY5NyAwbDIuNjUyIDMuMDMxIDIuNjUxLTMuMDMxYzAuNDY5LTAuNDY5IDEuMjI4LTAuNDY5IDEuNjk3IDBzMC40NjkgMS4yMjkgMCAxLjY5N2wtMi43NTggMy4xNTIgMi43NTggMy4xNWMwLjQ2OSAwLjQ2OSAwLjQ2OSAxLjIyOSAwIDEuNjk4elwiIC8+XG4gIDwvU3ZnPlxuKTtcbmV4cG9ydCB0eXBlIERvd25DaGV2cm9uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgRG93bkNoZXZyb24gPSAocHJvcHM6IERvd25DaGV2cm9uUHJvcHMpID0+IChcbiAgPFN2ZyBzaXplPXsyMH0gey4uLnByb3BzfT5cbiAgICA8cGF0aCBkPVwiTTQuNTE2IDcuNTQ4YzAuNDM2LTAuNDQ2IDEuMDQzLTAuNDgxIDEuNTc2IDBsMy45MDggMy43NDcgMy45MDgtMy43NDdjMC41MzMtMC40ODEgMS4xNDEtMC40NDYgMS41NzQgMCAwLjQzNiAwLjQ0NSAwLjQwOCAxLjE5NyAwIDEuNjE1LTAuNDA2IDAuNDE4LTQuNjk1IDQuNTAyLTQuNjk1IDQuNTAyLTAuMjE3IDAuMjIzLTAuNTAyIDAuMzM1LTAuNzg3IDAuMzM1cy0wLjU3LTAuMTEyLTAuNzg5LTAuMzM1YzAgMC00LjI4Ny00LjA4NC00LjY5NS00LjUwMnMtMC40MzYtMS4xNyAwLTEuNjE1elwiIC8+XG4gIDwvU3ZnPlxuKTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBEcm9wZG93biAmIENsZWFyIEJ1dHRvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xufVxuXG5jb25zdCBiYXNlQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNGb2N1c2VkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTpcbiAgICB8IERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbiAgICB8IENsZWFySW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JDb250YWluZXInLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICAgICc6aG92ZXInOiB7XG4gICAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsODAgOiBjb2xvcnMubmV1dHJhbDQwLFxuICAgICAgICB9LFxuICAgICAgfSksXG59KTtcblxuZXhwb3J0IGNvbnN0IGRyb3Bkb3duSW5kaWNhdG9yQ1NTID0gYmFzZUNTUztcbmV4cG9ydCBjb25zdCBEcm9wZG93bkluZGljYXRvciA9IDxcbiAgT3B0aW9uLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPlxuPihcbiAgcHJvcHM6IERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNoaWxkcmVuLCBpbm5lclByb3BzIH0gPSBwcm9wcztcbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICB7Li4uZ2V0U3R5bGVQcm9wcyhwcm9wcywgJ2Ryb3Bkb3duSW5kaWNhdG9yJywge1xuICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICdkcm9wZG93bi1pbmRpY2F0b3InOiB0cnVlLFxuICAgICAgfSl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICB7Y2hpbGRyZW4gfHwgPERvd25DaGV2cm9uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuZXhwb3J0IGludGVyZmFjZSBDbGVhckluZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFRoZSBjaGlsZHJlbiB0byBiZSByZW5kZXJlZCBpbnNpZGUgdGhlIGluZGljYXRvci4gKi9cbiAgY2hpbGRyZW4/OiBSZWFjdE5vZGU7XG4gIC8qKiBQcm9wcyB0aGF0IHdpbGwgYmUgcGFzc2VkIG9uIHRvIHRoZSBjaGlsZHJlbi4gKi9cbiAgaW5uZXJQcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydkaXYnXTtcbiAgLyoqIFRoZSBmb2N1c2VkIHN0YXRlIG9mIHRoZSBzZWxlY3QuICovXG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbn1cblxuZXhwb3J0IGNvbnN0IGNsZWFySW5kaWNhdG9yQ1NTID0gYmFzZUNTUztcbmV4cG9ydCBjb25zdCBDbGVhckluZGljYXRvciA9IDxcbiAgT3B0aW9uLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPlxuPihcbiAgcHJvcHM6IENsZWFySW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNoaWxkcmVuLCBpbm5lclByb3BzIH0gPSBwcm9wcztcbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICB7Li4uZ2V0U3R5bGVQcm9wcyhwcm9wcywgJ2NsZWFySW5kaWNhdG9yJywge1xuICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICdjbGVhci1pbmRpY2F0b3InOiB0cnVlLFxuICAgICAgfSl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICB7Y2hpbGRyZW4gfHwgPENyb3NzSWNvbiAvPn1cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG5cbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuLy8gU2VwYXJhdG9yXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuZXhwb3J0IGludGVyZmFjZSBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbiAgaW5uZXJQcm9wcz86IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3BhbiddO1xufVxuXG5leHBvcnQgY29uc3QgaW5kaWNhdG9yU2VwYXJhdG9yQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNEaXNhYmxlZCxcbiAgICB0aGVtZToge1xuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgICAgY29sb3JzLFxuICAgIH0sXG4gIH06IEluZGljYXRvclNlcGFyYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+LFxuICB1bnN0eWxlZDogYm9vbGVhblxuKTogQ1NTT2JqZWN0V2l0aExhYmVsID0+ICh7XG4gIGxhYmVsOiAnaW5kaWNhdG9yU2VwYXJhdG9yJyxcbiAgYWxpZ25TZWxmOiAnc3RyZXRjaCcsXG4gIHdpZHRoOiAxLFxuICAuLi4odW5zdHlsZWRcbiAgICA/IHt9XG4gICAgOiB7XG4gICAgICAgIGJhY2tncm91bmRDb2xvcjogaXNEaXNhYmxlZCA/IGNvbG9ycy5uZXV0cmFsMTAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBtYXJnaW5Cb3R0b206IGJhc2VVbml0ICogMixcbiAgICAgICAgbWFyZ2luVG9wOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgSW5kaWNhdG9yU2VwYXJhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxzcGFuXG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnaW5kaWNhdG9yU2VwYXJhdG9yJywge1xuICAgICAgICAnaW5kaWNhdG9yLXNlcGFyYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAvPlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBMb2FkaW5nXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgbG9hZGluZ0RvdEFuaW1hdGlvbnMgPSBrZXlmcmFtZXNgXG4gIDAlLCA4MCUsIDEwMCUgeyBvcGFjaXR5OiAwOyB9XG4gIDQwJSB7IG9wYWNpdHk6IDE7IH1cbmA7XG5cbmV4cG9ydCBjb25zdCBsb2FkaW5nSW5kaWNhdG9yQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNGb2N1c2VkLFxuICAgIHNpemUsXG4gICAgdGhlbWU6IHtcbiAgICAgIGNvbG9ycyxcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICB9LFxuICB9OiBMb2FkaW5nSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdsb2FkaW5nSW5kaWNhdG9yJyxcbiAgZGlzcGxheTogJ2ZsZXgnLFxuICB0cmFuc2l0aW9uOiAnY29sb3IgMTUwbXMnLFxuICBhbGlnblNlbGY6ICdjZW50ZXInLFxuICBmb250U2l6ZTogc2l6ZSxcbiAgbGluZUhlaWdodDogMSxcbiAgbWFyZ2luUmlnaHQ6IHNpemUsXG4gIHRleHRBbGlnbjogJ2NlbnRlcicsXG4gIHZlcnRpY2FsQWxpZ246ICdtaWRkbGUnLFxuICAuLi4odW5zdHlsZWRcbiAgICA/IHt9XG4gICAgOiB7XG4gICAgICAgIGNvbG9yOiBpc0ZvY3VzZWQgPyBjb2xvcnMubmV1dHJhbDYwIDogY29sb3JzLm5ldXRyYWwyMCxcbiAgICAgICAgcGFkZGluZzogYmFzZVVuaXQgKiAyLFxuICAgICAgfSksXG59KTtcblxuaW50ZXJmYWNlIExvYWRpbmdEb3RQcm9wcyB7XG4gIGRlbGF5OiBudW1iZXI7XG4gIG9mZnNldDogYm9vbGVhbjtcbn1cbmNvbnN0IExvYWRpbmdEb3QgPSAoeyBkZWxheSwgb2Zmc2V0IH06IExvYWRpbmdEb3RQcm9wcykgPT4gKFxuICA8c3BhblxuICAgIGNzcz17e1xuICAgICAgYW5pbWF0aW9uOiBgJHtsb2FkaW5nRG90QW5pbWF0aW9uc30gMXMgZWFzZS1pbi1vdXQgJHtkZWxheX1tcyBpbmZpbml0ZTtgLFxuICAgICAgYmFja2dyb3VuZENvbG9yOiAnY3VycmVudENvbG9yJyxcbiAgICAgIGJvcmRlclJhZGl1czogJzFlbScsXG4gICAgICBkaXNwbGF5OiAnaW5saW5lLWJsb2NrJyxcbiAgICAgIG1hcmdpbkxlZnQ6IG9mZnNldCA/ICcxZW0nIDogdW5kZWZpbmVkLFxuICAgICAgaGVpZ2h0OiAnMWVtJyxcbiAgICAgIHZlcnRpY2FsQWxpZ246ICd0b3AnLFxuICAgICAgd2lkdGg6ICcxZW0nLFxuICAgIH19XG4gIC8+XG4pO1xuXG5leHBvcnQgaW50ZXJmYWNlIExvYWRpbmdJbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBQcm9wcyB0aGF0IHdpbGwgYmUgcGFzc2VkIG9uIHRvIHRoZSBjaGlsZHJlbi4gKi9cbiAgaW5uZXJQcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydkaXYnXTtcbiAgLyoqIFRoZSBmb2N1c2VkIHN0YXRlIG9mIHRoZSBzZWxlY3QuICovXG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgLyoqIFNldCBzaXplIG9mIHRoZSBjb250YWluZXIuICovXG4gIHNpemU6IG51bWJlcjtcbn1cbmV4cG9ydCBjb25zdCBMb2FkaW5nSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KHtcbiAgaW5uZXJQcm9wcyxcbiAgaXNSdGwsXG4gIHNpemUgPSA0LFxuICAuLi5yZXN0UHJvcHNcbn06IExvYWRpbmdJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPikgPT4ge1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKFxuICAgICAgICB7IC4uLnJlc3RQcm9wcywgaW5uZXJQcm9wcywgaXNSdGwsIHNpemUgfSxcbiAgICAgICAgJ2xvYWRpbmdJbmRpY2F0b3InLFxuICAgICAgICB7XG4gICAgICAgICAgaW5kaWNhdG9yOiB0cnVlLFxuICAgICAgICAgICdsb2FkaW5nLWluZGljYXRvcic6IHRydWUsXG4gICAgICAgIH1cbiAgICAgICl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MH0gb2Zmc2V0PXtpc1J0bH0gLz5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXsxNjB9IG9mZnNldCAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezMyMH0gb2Zmc2V0PXshaXNSdGx9IC8+XG4gICAgPC9kaXY+XG4gICk7XG59O1xuIl19 */",toString:GD},sA=function(e){var n=e.size,r=Tr(e,LD);return Pe("svg",Ae({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:YD},r))},kO=function(e){return Pe(sA,Ae({size:20},e),Pe("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},aA=function(e){return Pe(sA,Ae({size:20},e),Pe("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},lA=function(e,n){var r=e.isFocused,i=e.theme,o=i.spacing.baseUnit,s=i.colors;return le({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?s.neutral60:s.neutral20,padding:o*2,":hover":{color:r?s.neutral80:s.neutral40}})},qD=lA,UD=function(e){var n=e.children,r=e.innerProps;return Pe("div",Ae({},Ft(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||Pe(aA,null))},HD=lA,JD=function(e){var n=e.children,r=e.innerProps;return Pe("div",Ae({},Ft(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||Pe(kO,null))},KD=function(e,n){var r=e.isDisabled,i=e.theme,o=i.spacing.baseUnit,s=i.colors;return le({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?s.neutral10:s.neutral20,marginBottom:o*2,marginTop:o*2})},eQ=function(e){var n=e.innerProps;return Pe("span",Ae({},n,Ft(e,"indicatorSeparator",{"indicator-separator":!0})))},tQ=zR(Xv||(Xv=UR([`
138
138
  0%, 80%, 100% { opacity: 0; }
139
139
  40% { opacity: 1; }
140
- `]))),nQ=function(e,n){var r=e.isFocused,i=e.size,o=e.theme,s=o.colors,a=o.spacing.baseUnit;return le({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:i,lineHeight:1,marginRight:i,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?s.neutral60:s.neutral20,padding:a*2})},Bh=function(e){var n=e.delay,r=e.offset;return Pe("span",{css:bO({animation:"".concat(tQ," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},process.env.NODE_ENV==="production"?"":";label:LoadingDot;",process.env.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1RSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgUmVhY3ROb2RlIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsganN4LCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmltcG9ydCB7XG4gIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lLFxuICBDU1NPYmplY3RXaXRoTGFiZWwsXG4gIEdyb3VwQmFzZSxcbn0gZnJvbSAnLi4vdHlwZXMnO1xuaW1wb3J0IHsgZ2V0U3R5bGVQcm9wcyB9IGZyb20gJy4uL3V0aWxzJztcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBEcm9wZG93biAmIENsZWFyIEljb25zXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgU3ZnID0gKHtcbiAgc2l6ZSxcbiAgLi4ucHJvcHNcbn06IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU6IG51bWJlciB9KSA9PiAoXG4gIDxzdmdcbiAgICBoZWlnaHQ9e3NpemV9XG4gICAgd2lkdGg9e3NpemV9XG4gICAgdmlld0JveD1cIjAgMCAyMCAyMFwiXG4gICAgYXJpYS1oaWRkZW49XCJ0cnVlXCJcbiAgICBmb2N1c2FibGU9XCJmYWxzZVwiXG4gICAgY3NzPXt7XG4gICAgICBkaXNwbGF5OiAnaW5saW5lLWJsb2NrJyxcbiAgICAgIGZpbGw6ICdjdXJyZW50Q29sb3InLFxuICAgICAgbGluZUhlaWdodDogMSxcbiAgICAgIHN0cm9rZTogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBzdHJva2VXaWR0aDogMCxcbiAgICB9fVxuICAgIHsuLi5wcm9wc31cbiAgLz5cbik7XG5cbmV4cG9ydCB0eXBlIENyb3NzSWNvblByb3BzID0gSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZT86IG51bWJlciB9O1xuZXhwb3J0IGNvbnN0IENyb3NzSWNvbiA9IChwcm9wczogQ3Jvc3NJY29uUHJvcHMpID0+IChcbiAgPFN2ZyBzaXplPXsyMH0gey4uLnByb3BzfT5cbiAgICA8cGF0aCBkPVwiTTE0LjM0OCAxNC44NDljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDBsLTIuNjUxLTMuMDMwLTIuNjUxIDMuMDI5Yy0wLjQ2OSAwLjQ2OS0xLjIyOSAwLjQ2OS0xLjY5NyAwLTAuNDY5LTAuNDY5LTAuNDY5LTEuMjI5IDAtMS42OTdsMi43NTgtMy4xNS0yLjc1OS0zLjE1MmMtMC40NjktMC40NjktMC40NjktMS4yMjggMC0xLjY5N3MxLjIyOC0wLjQ2OSAxLjY5NyAwbDIuNjUyIDMuMDMxIDIuNjUxLTMuMDMxYzAuNDY5LTAuNDY5IDEuMjI4LTAuNDY5IDEuNjk3IDBzMC40NjkgMS4yMjkgMCAxLjY5N2wtMi43NTggMy4xNTIgMi43NTggMy4xNWMwLjQ2OSAwLjQ2OSAwLjQ2OSAxLjIyOSAwIDEuNjk4elwiIC8+XG4gIDwvU3ZnPlxuKTtcbmV4cG9ydCB0eXBlIERvd25DaGV2cm9uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgRG93bkNoZXZyb24gPSAocHJvcHM6IERvd25DaGV2cm9uUHJvcHMpID0+IChcbiAgPFN2ZyBzaXplPXsyMH0gey4uLnByb3BzfT5cbiAgICA8cGF0aCBkPVwiTTQuNTE2IDcuNTQ4YzAuNDM2LTAuNDQ2IDEuMDQzLTAuNDgxIDEuNTc2IDBsMy45MDggMy43NDcgMy45MDgtMy43NDdjMC41MzMtMC40ODEgMS4xNDEtMC40NDYgMS41NzQgMCAwLjQzNiAwLjQ0NSAwLjQwOCAxLjE5NyAwIDEuNjE1LTAuNDA2IDAuNDE4LTQuNjk1IDQuNTAyLTQuNjk1IDQuNTAyLTAuMjE3IDAuMjIzLTAuNTAyIDAuMzM1LTAuNzg3IDAuMzM1cy0wLjU3LTAuMTEyLTAuNzg5LTAuMzM1YzAgMC00LjI4Ny00LjA4NC00LjY5NS00LjUwMnMtMC40MzYtMS4xNyAwLTEuNjE1elwiIC8+XG4gIDwvU3ZnPlxuKTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBEcm9wZG93biAmIENsZWFyIEJ1dHRvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xufVxuXG5jb25zdCBiYXNlQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNGb2N1c2VkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTpcbiAgICB8IERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbiAgICB8IENsZWFySW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JDb250YWluZXInLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICAgICc6aG92ZXInOiB7XG4gICAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsODAgOiBjb2xvcnMubmV1dHJhbDQwLFxuICAgICAgICB9LFxuICAgICAgfSksXG59KTtcblxuZXhwb3J0IGNvbnN0IGRyb3Bkb3duSW5kaWNhdG9yQ1NTID0gYmFzZUNTUztcbmV4cG9ydCBjb25zdCBEcm9wZG93bkluZGljYXRvciA9IDxcbiAgT3B0aW9uLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPlxuPihcbiAgcHJvcHM6IERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNoaWxkcmVuLCBpbm5lclByb3BzIH0gPSBwcm9wcztcbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICB7Li4uZ2V0U3R5bGVQcm9wcyhwcm9wcywgJ2Ryb3Bkb3duSW5kaWNhdG9yJywge1xuICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICdkcm9wZG93bi1pbmRpY2F0b3InOiB0cnVlLFxuICAgICAgfSl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICB7Y2hpbGRyZW4gfHwgPERvd25DaGV2cm9uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuZXhwb3J0IGludGVyZmFjZSBDbGVhckluZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFRoZSBjaGlsZHJlbiB0byBiZSByZW5kZXJlZCBpbnNpZGUgdGhlIGluZGljYXRvci4gKi9cbiAgY2hpbGRyZW4/OiBSZWFjdE5vZGU7XG4gIC8qKiBQcm9wcyB0aGF0IHdpbGwgYmUgcGFzc2VkIG9uIHRvIHRoZSBjaGlsZHJlbi4gKi9cbiAgaW5uZXJQcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydkaXYnXTtcbiAgLyoqIFRoZSBmb2N1c2VkIHN0YXRlIG9mIHRoZSBzZWxlY3QuICovXG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbn1cblxuZXhwb3J0IGNvbnN0IGNsZWFySW5kaWNhdG9yQ1NTID0gYmFzZUNTUztcbmV4cG9ydCBjb25zdCBDbGVhckluZGljYXRvciA9IDxcbiAgT3B0aW9uLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPlxuPihcbiAgcHJvcHM6IENsZWFySW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNoaWxkcmVuLCBpbm5lclByb3BzIH0gPSBwcm9wcztcbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICB7Li4uZ2V0U3R5bGVQcm9wcyhwcm9wcywgJ2NsZWFySW5kaWNhdG9yJywge1xuICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICdjbGVhci1pbmRpY2F0b3InOiB0cnVlLFxuICAgICAgfSl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICB7Y2hpbGRyZW4gfHwgPENyb3NzSWNvbiAvPn1cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG5cbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuLy8gU2VwYXJhdG9yXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuZXhwb3J0IGludGVyZmFjZSBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbiAgaW5uZXJQcm9wcz86IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3BhbiddO1xufVxuXG5leHBvcnQgY29uc3QgaW5kaWNhdG9yU2VwYXJhdG9yQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNEaXNhYmxlZCxcbiAgICB0aGVtZToge1xuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgICAgY29sb3JzLFxuICAgIH0sXG4gIH06IEluZGljYXRvclNlcGFyYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+LFxuICB1bnN0eWxlZDogYm9vbGVhblxuKTogQ1NTT2JqZWN0V2l0aExhYmVsID0+ICh7XG4gIGxhYmVsOiAnaW5kaWNhdG9yU2VwYXJhdG9yJyxcbiAgYWxpZ25TZWxmOiAnc3RyZXRjaCcsXG4gIHdpZHRoOiAxLFxuICAuLi4odW5zdHlsZWRcbiAgICA/IHt9XG4gICAgOiB7XG4gICAgICAgIGJhY2tncm91bmRDb2xvcjogaXNEaXNhYmxlZCA/IGNvbG9ycy5uZXV0cmFsMTAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBtYXJnaW5Cb3R0b206IGJhc2VVbml0ICogMixcbiAgICAgICAgbWFyZ2luVG9wOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgSW5kaWNhdG9yU2VwYXJhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxzcGFuXG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnaW5kaWNhdG9yU2VwYXJhdG9yJywge1xuICAgICAgICAnaW5kaWNhdG9yLXNlcGFyYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAvPlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBMb2FkaW5nXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgbG9hZGluZ0RvdEFuaW1hdGlvbnMgPSBrZXlmcmFtZXNgXG4gIDAlLCA4MCUsIDEwMCUgeyBvcGFjaXR5OiAwOyB9XG4gIDQwJSB7IG9wYWNpdHk6IDE7IH1cbmA7XG5cbmV4cG9ydCBjb25zdCBsb2FkaW5nSW5kaWNhdG9yQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNGb2N1c2VkLFxuICAgIHNpemUsXG4gICAgdGhlbWU6IHtcbiAgICAgIGNvbG9ycyxcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICB9LFxuICB9OiBMb2FkaW5nSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdsb2FkaW5nSW5kaWNhdG9yJyxcbiAgZGlzcGxheTogJ2ZsZXgnLFxuICB0cmFuc2l0aW9uOiAnY29sb3IgMTUwbXMnLFxuICBhbGlnblNlbGY6ICdjZW50ZXInLFxuICBmb250U2l6ZTogc2l6ZSxcbiAgbGluZUhlaWdodDogMSxcbiAgbWFyZ2luUmlnaHQ6IHNpemUsXG4gIHRleHRBbGlnbjogJ2NlbnRlcicsXG4gIHZlcnRpY2FsQWxpZ246ICdtaWRkbGUnLFxuICAuLi4odW5zdHlsZWRcbiAgICA/IHt9XG4gICAgOiB7XG4gICAgICAgIGNvbG9yOiBpc0ZvY3VzZWQgPyBjb2xvcnMubmV1dHJhbDYwIDogY29sb3JzLm5ldXRyYWwyMCxcbiAgICAgICAgcGFkZGluZzogYmFzZVVuaXQgKiAyLFxuICAgICAgfSksXG59KTtcblxuaW50ZXJmYWNlIExvYWRpbmdEb3RQcm9wcyB7XG4gIGRlbGF5OiBudW1iZXI7XG4gIG9mZnNldDogYm9vbGVhbjtcbn1cbmNvbnN0IExvYWRpbmdEb3QgPSAoeyBkZWxheSwgb2Zmc2V0IH06IExvYWRpbmdEb3RQcm9wcykgPT4gKFxuICA8c3BhblxuICAgIGNzcz17e1xuICAgICAgYW5pbWF0aW9uOiBgJHtsb2FkaW5nRG90QW5pbWF0aW9uc30gMXMgZWFzZS1pbi1vdXQgJHtkZWxheX1tcyBpbmZpbml0ZTtgLFxuICAgICAgYmFja2dyb3VuZENvbG9yOiAnY3VycmVudENvbG9yJyxcbiAgICAgIGJvcmRlclJhZGl1czogJzFlbScsXG4gICAgICBkaXNwbGF5OiAnaW5saW5lLWJsb2NrJyxcbiAgICAgIG1hcmdpbkxlZnQ6IG9mZnNldCA/ICcxZW0nIDogdW5kZWZpbmVkLFxuICAgICAgaGVpZ2h0OiAnMWVtJyxcbiAgICAgIHZlcnRpY2FsQWxpZ246ICd0b3AnLFxuICAgICAgd2lkdGg6ICcxZW0nLFxuICAgIH19XG4gIC8+XG4pO1xuXG5leHBvcnQgaW50ZXJmYWNlIExvYWRpbmdJbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBQcm9wcyB0aGF0IHdpbGwgYmUgcGFzc2VkIG9uIHRvIHRoZSBjaGlsZHJlbi4gKi9cbiAgaW5uZXJQcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydkaXYnXTtcbiAgLyoqIFRoZSBmb2N1c2VkIHN0YXRlIG9mIHRoZSBzZWxlY3QuICovXG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgLyoqIFNldCBzaXplIG9mIHRoZSBjb250YWluZXIuICovXG4gIHNpemU6IG51bWJlcjtcbn1cbmV4cG9ydCBjb25zdCBMb2FkaW5nSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KHtcbiAgaW5uZXJQcm9wcyxcbiAgaXNSdGwsXG4gIHNpemUgPSA0LFxuICAuLi5yZXN0UHJvcHNcbn06IExvYWRpbmdJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPikgPT4ge1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKFxuICAgICAgICB7IC4uLnJlc3RQcm9wcywgaW5uZXJQcm9wcywgaXNSdGwsIHNpemUgfSxcbiAgICAgICAgJ2xvYWRpbmdJbmRpY2F0b3InLFxuICAgICAgICB7XG4gICAgICAgICAgaW5kaWNhdG9yOiB0cnVlLFxuICAgICAgICAgICdsb2FkaW5nLWluZGljYXRvcic6IHRydWUsXG4gICAgICAgIH1cbiAgICAgICl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MH0gb2Zmc2V0PXtpc1J0bH0gLz5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXsxNjB9IG9mZnNldCAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezMyMH0gb2Zmc2V0PXshaXNSdGx9IC8+XG4gICAgPC9kaXY+XG4gICk7XG59O1xuIl19 */")})},rQ=function(e){var n=e.innerProps,r=e.isRtl,i=e.size,o=i===void 0?4:i,s=Tr(e,XD);return Pe("div",Ae({},Ft(le(le({},s),{},{innerProps:n,isRtl:r,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),Pe(Bh,{delay:0,offset:r}),Pe(Bh,{delay:160,offset:!0}),Pe(Bh,{delay:320,offset:!r}))},iQ=function(e,n){var r=e.isDisabled,i=e.isFocused,o=e.theme,s=o.colors,a=o.borderRadius,l=o.spacing;return le({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:l.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?s.neutral5:s.neutral0,borderColor:r?s.neutral10:i?s.primary:s.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:i?"0 0 0 1px ".concat(s.primary):void 0,"&:hover":{borderColor:i?s.primary:s.neutral30}})},oQ=function(e){var n=e.children,r=e.isDisabled,i=e.isFocused,o=e.innerRef,s=e.innerProps,a=e.menuIsOpen;return Pe("div",Ae({ref:o},Ft(e,"control",{control:!0,"control--is-disabled":r,"control--is-focused":i,"control--menu-is-open":a}),s,{"aria-disabled":r||void 0}),n)},sQ=oQ,aQ=["data"],lQ=function(e,n){var r=e.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},cQ=function(e){var n=e.children,r=e.cx,i=e.getStyles,o=e.getClassNames,s=e.Heading,a=e.headingProps,l=e.innerProps,c=e.label,u=e.theme,f=e.selectProps;return Pe("div",Ae({},Ft(e,"group",{group:!0}),l),Pe(s,Ae({},a,{selectProps:f,theme:u,getStyles:i,getClassNames:o,cx:r}),c),Pe("div",null,n))},uQ=function(e,n){var r=e.theme,i=r.colors,o=r.spacing;return le({label:"group",cursor:"default",display:"block"},n?{}:{color:i.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:o.baseUnit*3,paddingRight:o.baseUnit*3,textTransform:"uppercase"})},fQ=function(e){var n=eA(e);n.data;var r=Tr(n,aQ);return Pe("div",Ae({},Ft(e,"groupHeading",{"group-heading":!0}),r))},dQ=cQ,hQ=["innerRef","isDisabled","isHidden","inputClassName"],pQ=function(e,n){var r=e.isDisabled,i=e.value,o=e.theme,s=o.spacing,a=o.colors;return le(le({visibility:r?"hidden":"visible",transform:i?"translateZ(0)":""},gQ),n?{}:{margin:s.baseUnit/2,paddingBottom:s.baseUnit/2,paddingTop:s.baseUnit/2,color:a.neutral80})},cA={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},gQ={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":le({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},cA)},mQ=function(e){return le({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},cA)},OQ=function(e){var n=e.cx,r=e.value,i=eA(e),o=i.innerRef,s=i.isDisabled,a=i.isHidden,l=i.inputClassName,c=Tr(i,hQ);return Pe("div",Ae({},Ft(e,"input",{"input-container":!0}),{"data-value":r||""}),Pe("input",Ae({className:n({input:!0},l),ref:o,style:mQ(a),disabled:s},c)))},xQ=OQ,vQ=function(e,n){var r=e.theme,i=r.spacing,o=r.borderRadius,s=r.colors;return le({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:s.neutral10,borderRadius:o/2,margin:i.baseUnit/2})},yQ=function(e,n){var r=e.theme,i=r.borderRadius,o=r.colors,s=e.cropWithEllipsis;return le({overflow:"hidden",textOverflow:s||s===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:i/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},bQ=function(e,n){var r=e.theme,i=r.spacing,o=r.borderRadius,s=r.colors,a=e.isFocused;return le({alignItems:"center",display:"flex"},n?{}:{borderRadius:o/2,backgroundColor:a?s.dangerLight:void 0,paddingLeft:i.baseUnit,paddingRight:i.baseUnit,":hover":{backgroundColor:s.dangerLight,color:s.danger}})},uA=function(e){var n=e.children,r=e.innerProps;return Pe("div",r,n)},SQ=uA,wQ=uA;function CQ(t){var e=t.children,n=t.innerProps;return Pe("div",Ae({role:"button"},n),e||Pe(kO,{size:14}))}var kQ=function(e){var n=e.children,r=e.components,i=e.data,o=e.innerProps,s=e.isDisabled,a=e.removeProps,l=e.selectProps,c=r.Container,u=r.Label,f=r.Remove;return Pe(c,{data:i,innerProps:le(le({},Ft(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":s})),o),selectProps:l},Pe(u,{data:i,innerProps:le({},Ft(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},n),Pe(f,{data:i,innerProps:le(le({},Ft(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},a),selectProps:l}))},AQ=kQ,PQ=function(e,n){var r=e.isDisabled,i=e.isFocused,o=e.isSelected,s=e.theme,a=s.spacing,l=s.colors;return le({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:o?l.primary:i?l.primary25:"transparent",color:r?l.neutral20:o?l.neutral0:"inherit",padding:"".concat(a.baseUnit*2,"px ").concat(a.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:o?l.primary:l.primary50}})},EQ=function(e){var n=e.children,r=e.isDisabled,i=e.isFocused,o=e.isSelected,s=e.innerRef,a=e.innerProps;return Pe("div",Ae({},Ft(e,"option",{option:!0,"option--is-disabled":r,"option--is-focused":i,"option--is-selected":o}),{ref:s,"aria-disabled":r},a),n)},IQ=EQ,TQ=function(e,n){var r=e.theme,i=r.spacing,o=r.colors;return le({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:o.neutral50,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},$Q=function(e){var n=e.children,r=e.innerProps;return Pe("div",Ae({},Ft(e,"placeholder",{placeholder:!0}),r),n)},jQ=$Q,RQ=function(e,n){var r=e.isDisabled,i=e.theme,o=i.spacing,s=i.colors;return le({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?s.neutral40:s.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},DQ=function(e){var n=e.children,r=e.isDisabled,i=e.innerProps;return Pe("div",Ae({},Ft(e,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),i),n)},QQ=DQ,Bu={ClearIndicator:JD,Control:sQ,DropdownIndicator:UD,DownChevron:aA,CrossIcon:kO,Group:dQ,GroupHeading:fQ,IndicatorsContainer:zD,IndicatorSeparator:eQ,Input:xQ,LoadingIndicator:rQ,Menu:TD,MenuList:jD,MenuPortal:MD,LoadingMessage:BD,NoOptionsMessage:QD,MultiValue:AQ,MultiValueContainer:SQ,MultiValueLabel:wQ,MultiValueRemove:CQ,Option:IQ,Placeholder:jQ,SelectContainer:FD,SingleValue:QQ,ValueContainer:WD},BQ=function(e){return le(le({},Bu),e.components)},Gv=Number.isNaN||function(e){return typeof e=="number"&&e!==e};function _Q(t,e){return!!(t===e||Gv(t)&&Gv(e))}function MQ(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!_Q(t[n],e[n]))return!1;return!0}function NQ(t,e){e===void 0&&(e=MQ);var n=null;function r(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];if(n&&n.lastThis===this&&e(i,n.lastArgs))return n.lastResult;var s=t.apply(this,i);return n={lastResult:s,lastArgs:i,lastThis:this},s}return r.clear=function(){n=null},r}function FQ(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var ZQ=process.env.NODE_ENV==="production"?{name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"}:{name:"1f43avz-a11yText-A11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap;label:A11yText;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkExMXlUZXh0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFNSSIsImZpbGUiOiJBMTF5VGV4dC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKiogQGpzeCBqc3ggKi9cbmltcG9ydCB7IGpzeCB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLy8gQXNzaXN0aXZlIHRleHQgdG8gZGVzY3JpYmUgdmlzdWFsIGVsZW1lbnRzLiBIaWRkZW4gZm9yIHNpZ2h0ZWQgdXNlcnMuXG5jb25zdCBBMTF5VGV4dCA9IChwcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ10pID0+IChcbiAgPHNwYW5cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAnYTExeVRleHQnLFxuICAgICAgekluZGV4OiA5OTk5LFxuICAgICAgYm9yZGVyOiAwLFxuICAgICAgY2xpcDogJ3JlY3QoMXB4LCAxcHgsIDFweCwgMXB4KScsXG4gICAgICBoZWlnaHQ6IDEsXG4gICAgICB3aWR0aDogMSxcbiAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgb3ZlcmZsb3c6ICdoaWRkZW4nLFxuICAgICAgcGFkZGluZzogMCxcbiAgICAgIHdoaXRlU3BhY2U6ICdub3dyYXAnLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgQTExeVRleHQ7XG4iXX0= */",toString:FQ},WQ=function(e){return Pe("span",Ae({css:ZQ},e))},Yv=WQ,VQ={guidance:function(e){var n=e.isSearchable,r=e.isMulti,i=e.tabSelectsValue,o=e.context,s=e.isInitialFocus;switch(o){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(i?", press Tab to select the option and exit the menu":"",".");case"input":return s?"".concat(e["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var n=e.action,r=e.label,i=r===void 0?"":r,o=e.labels,s=e.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(i,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(o.length>1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return s?"option ".concat(i," is disabled. Select another option."):"option ".concat(i,", selected.");default:return""}},onFocus:function(e){var n=e.context,r=e.focused,i=e.options,o=e.label,s=o===void 0?"":o,a=e.selectValue,l=e.isDisabled,c=e.isSelected,u=e.isAppleDevice,f=function(O,m){return O&&O.length?"".concat(O.indexOf(m)+1," of ").concat(O.length):""};if(n==="value"&&a)return"value ".concat(s," focused, ").concat(f(a,r),".");if(n==="menu"&&u){var d=l?" disabled":"",h="".concat(c?" selected":"").concat(d);return"".concat(s).concat(h,", ").concat(f(i,r),".")}return""},onFilter:function(e){var n=e.inputValue,r=e.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},zQ=function(e){var n=e.ariaSelection,r=e.focusedOption,i=e.focusedValue,o=e.focusableOptions,s=e.isFocused,a=e.selectValue,l=e.selectProps,c=e.id,u=e.isAppleDevice,f=l.ariaLiveMessages,d=l.getOptionLabel,h=l.inputValue,p=l.isMulti,O=l.isOptionDisabled,m=l.isSearchable,x=l.menuIsOpen,v=l.options,y=l.screenReaderStatus,S=l.tabSelectsValue,b=l.isLoading,w=l["aria-label"],C=l["aria-live"],k=j.useMemo(function(){return le(le({},VQ),f||{})},[f]),I=j.useMemo(function(){var Q="";if(n&&k.onChange){var Z=n.option,G=n.options,V=n.removedValue,ee=n.removedValues,Y=n.value,z=function(L){return Array.isArray(L)?null:L},D=V||Z||z(Y),B=D?d(D):"",N=G||ee||void 0,U=N?N.map(d):[],F=le({isDisabled:D&&O(D,a),label:B,labels:U},n);Q=k.onChange(F)}return Q},[n,k,O,a,d]),A=j.useMemo(function(){var Q="",Z=r||i,G=!!(r&&a&&a.includes(r));if(Z&&k.onFocus){var V={focused:Z,label:d(Z),isDisabled:O(Z,a),isSelected:G,options:o,context:Z===r?"menu":"value",selectValue:a,isAppleDevice:u};Q=k.onFocus(V)}return Q},[r,i,d,O,k,o,a,u]),E=j.useMemo(function(){var Q="";if(x&&v.length&&!b&&k.onFilter){var Z=y({count:o.length});Q=k.onFilter({inputValue:h,resultsMessage:Z})}return Q},[o,h,x,k,v,y,b]),$=(n==null?void 0:n.action)==="initial-input-focus",R=j.useMemo(function(){var Q="";if(k.guidance){var Z=i?"value":x?"menu":"input";Q=k.guidance({"aria-label":w,context:Z,isDisabled:r&&O(r,a),isMulti:p,isSearchable:m,tabSelectsValue:S,isInitialFocus:$})}return Q},[w,r,i,p,O,m,x,k,a,S,$]),M=Pe(j.Fragment,null,Pe("span",{id:"aria-selection"},I),Pe("span",{id:"aria-focused"},A),Pe("span",{id:"aria-results"},E),Pe("span",{id:"aria-guidance"},R));return Pe(j.Fragment,null,Pe(Yv,{id:c},$&&M),Pe(Yv,{"aria-live":C,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},s&&!$&&M))},LQ=zQ,Ug=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],XQ=new RegExp("["+Ug.map(function(t){return t.letters}).join("")+"]","g"),fA={};for(var _h=0;_h<Ug.length;_h++)for(var Mh=Ug[_h],Nh=0;Nh<Mh.letters.length;Nh++)fA[Mh.letters[Nh]]=Mh.base;var dA=function(e){return e.replace(XQ,function(n){return fA[n]})},GQ=NQ(dA),qv=function(e){return e.replace(/^\s+|\s+$/g,"")},YQ=function(e){return"".concat(e.label," ").concat(e.value)},qQ=function(e){return function(n,r){if(n.data.__isNew__)return!0;var i=le({ignoreCase:!0,ignoreAccents:!0,stringify:YQ,trim:!0,matchFrom:"any"},e),o=i.ignoreCase,s=i.ignoreAccents,a=i.stringify,l=i.trim,c=i.matchFrom,u=l?qv(r):r,f=l?qv(a(n)):a(n);return o&&(u=u.toLowerCase(),f=f.toLowerCase()),s&&(u=GQ(u),f=dA(f)),c==="start"?f.substr(0,u.length)===u:f.indexOf(u)>-1}},UQ=["innerRef"];function HQ(t){var e=t.innerRef,n=Tr(t,UQ),r=SD(n,"onExited","in","enter","exit","appear");return Pe("input",Ae({ref:e},r,{css:bO({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},process.env.NODE_ENV==="production"?"":";label:DummyInput;",process.env.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkR1bW15SW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCTSIsImZpbGUiOiJEdW1teUlucHV0LnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgUmVmIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsganN4IH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgcmVtb3ZlUHJvcHMgfSBmcm9tICcuLi91dGlscyc7XG5cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIER1bW15SW5wdXQoe1xuICBpbm5lclJlZixcbiAgLi4ucHJvcHNcbn06IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snaW5wdXQnXSAmIHtcbiAgcmVhZG9ubHkgaW5uZXJSZWY6IFJlZjxIVE1MSW5wdXRFbGVtZW50Pjtcbn0pIHtcbiAgLy8gUmVtb3ZlIGFuaW1hdGlvbiBwcm9wcyBub3QgbWVhbnQgZm9yIEhUTUwgZWxlbWVudHNcbiAgY29uc3QgZmlsdGVyZWRQcm9wcyA9IHJlbW92ZVByb3BzKFxuICAgIHByb3BzLFxuICAgICdvbkV4aXRlZCcsXG4gICAgJ2luJyxcbiAgICAnZW50ZXInLFxuICAgICdleGl0JyxcbiAgICAnYXBwZWFyJ1xuICApO1xuXG4gIHJldHVybiAoXG4gICAgPGlucHV0XG4gICAgICByZWY9e2lubmVyUmVmfVxuICAgICAgey4uLmZpbHRlcmVkUHJvcHN9XG4gICAgICBjc3M9e3tcbiAgICAgICAgbGFiZWw6ICdkdW1teUlucHV0JyxcbiAgICAgICAgLy8gZ2V0IHJpZCBvZiBhbnkgZGVmYXVsdCBzdHlsZXNcbiAgICAgICAgYmFja2dyb3VuZDogMCxcbiAgICAgICAgYm9yZGVyOiAwLFxuICAgICAgICAvLyBpbXBvcnRhbnQhIHRoaXMgaGlkZXMgdGhlIGZsYXNoaW5nIGN1cnNvclxuICAgICAgICBjYXJldENvbG9yOiAndHJhbnNwYXJlbnQnLFxuICAgICAgICBmb250U2l6ZTogJ2luaGVyaXQnLFxuICAgICAgICBncmlkQXJlYTogJzEgLyAxIC8gMiAvIDMnLFxuICAgICAgICBvdXRsaW5lOiAwLFxuICAgICAgICBwYWRkaW5nOiAwLFxuICAgICAgICAvLyBpbXBvcnRhbnQhIHdpdGhvdXQgYHdpZHRoYCBicm93c2VycyB3b24ndCBhbGxvdyBmb2N1c1xuICAgICAgICB3aWR0aDogMSxcblxuICAgICAgICAvLyByZW1vdmUgY3Vyc29yIG9uIGRlc2t0b3BcbiAgICAgICAgY29sb3I6ICd0cmFuc3BhcmVudCcsXG5cbiAgICAgICAgLy8gcmVtb3ZlIGN1cnNvciBvbiBtb2JpbGUgd2hpbHN0IG1haW50YWluaW5nIFwic2Nyb2xsIGludG8gdmlld1wiIGJlaGF2aW91clxuICAgICAgICBsZWZ0OiAtMTAwLFxuICAgICAgICBvcGFjaXR5OiAwLFxuICAgICAgICBwb3NpdGlvbjogJ3JlbGF0aXZlJyxcbiAgICAgICAgdHJhbnNmb3JtOiAnc2NhbGUoLjAxKScsXG4gICAgICB9fVxuICAgIC8+XG4gICk7XG59XG4iXX0= */")}))}var JQ=function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()};function KQ(t){var e=t.isEnabled,n=t.onBottomArrive,r=t.onBottomLeave,i=t.onTopArrive,o=t.onTopLeave,s=j.useRef(!1),a=j.useRef(!1),l=j.useRef(0),c=j.useRef(null),u=j.useCallback(function(m,x){if(c.current!==null){var v=c.current,y=v.scrollTop,S=v.scrollHeight,b=v.clientHeight,w=c.current,C=x>0,k=S-b-y,I=!1;k>x&&s.current&&(r&&r(m),s.current=!1),C&&a.current&&(o&&o(m),a.current=!1),C&&x>k?(n&&!s.current&&n(m),w.scrollTop=S,I=!0,s.current=!0):!C&&-x>y&&(i&&!a.current&&i(m),w.scrollTop=0,I=!0,a.current=!0),I&&JQ(m)}},[n,r,i,o]),f=j.useCallback(function(m){u(m,m.deltaY)},[u]),d=j.useCallback(function(m){l.current=m.changedTouches[0].clientY},[]),h=j.useCallback(function(m){var x=l.current-m.changedTouches[0].clientY;u(m,x)},[u]),p=j.useCallback(function(m){if(m){var x=vD?{passive:!1}:!1;m.addEventListener("wheel",f,x),m.addEventListener("touchstart",d,x),m.addEventListener("touchmove",h,x)}},[h,d,f]),O=j.useCallback(function(m){m&&(m.removeEventListener("wheel",f,!1),m.removeEventListener("touchstart",d,!1),m.removeEventListener("touchmove",h,!1))},[h,d,f]);return j.useEffect(function(){if(e){var m=c.current;return p(m),function(){O(m)}}},[e,p,O]),function(m){c.current=m}}var Uv=["boxSizing","height","overflow","paddingRight","position"],Hv={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Jv(t){t.preventDefault()}function Kv(t){t.stopPropagation()}function ey(){var t=this.scrollTop,e=this.scrollHeight,n=t+this.offsetHeight;t===0?this.scrollTop=1:n===e&&(this.scrollTop=t-1)}function ty(){return"ontouchstart"in window||navigator.maxTouchPoints}var ny=!!(typeof window<"u"&&window.document&&window.document.createElement),Ga=0,ms={capture:!1,passive:!1};function e3(t){var e=t.isEnabled,n=t.accountForScrollbars,r=n===void 0?!0:n,i=j.useRef({}),o=j.useRef(null),s=j.useCallback(function(l){if(ny){var c=document.body,u=c&&c.style;if(r&&Uv.forEach(function(p){var O=u&&u[p];i.current[p]=O}),r&&Ga<1){var f=parseInt(i.current.paddingRight,10)||0,d=document.body?document.body.clientWidth:0,h=window.innerWidth-d+f||0;Object.keys(Hv).forEach(function(p){var O=Hv[p];u&&(u[p]=O)}),u&&(u.paddingRight="".concat(h,"px"))}c&&ty()&&(c.addEventListener("touchmove",Jv,ms),l&&(l.addEventListener("touchstart",ey,ms),l.addEventListener("touchmove",Kv,ms))),Ga+=1}},[r]),a=j.useCallback(function(l){if(ny){var c=document.body,u=c&&c.style;Ga=Math.max(Ga-1,0),r&&Ga<1&&Uv.forEach(function(f){var d=i.current[f];u&&(u[f]=d)}),c&&ty()&&(c.removeEventListener("touchmove",Jv,ms),l&&(l.removeEventListener("touchstart",ey,ms),l.removeEventListener("touchmove",Kv,ms)))}},[r]);return j.useEffect(function(){if(e){var l=o.current;return s(l),function(){a(l)}}},[e,s,a]),function(l){o.current=l}}function t3(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var n3=function(e){var n=e.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},r3=process.env.NODE_ENV==="production"?{name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"}:{name:"bp8cua-ScrollManager",styles:"position:fixed;left:0;bottom:0;right:0;top:0;label:ScrollManager;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlNjcm9sbE1hbmFnZXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW9EVSIsImZpbGUiOiJTY3JvbGxNYW5hZ2VyLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsganN4IH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgRnJhZ21lbnQsIFJlYWN0RWxlbWVudCwgUmVmQ2FsbGJhY2ssIE1vdXNlRXZlbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgdXNlU2Nyb2xsQ2FwdHVyZSBmcm9tICcuL3VzZVNjcm9sbENhcHR1cmUnO1xuaW1wb3J0IHVzZVNjcm9sbExvY2sgZnJvbSAnLi91c2VTY3JvbGxMb2NrJztcblxuaW50ZXJmYWNlIFByb3BzIHtcbiAgcmVhZG9ubHkgY2hpbGRyZW46IChyZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PikgPT4gUmVhY3RFbGVtZW50O1xuICByZWFkb25seSBsb2NrRW5hYmxlZDogYm9vbGVhbjtcbiAgcmVhZG9ubHkgY2FwdHVyZUVuYWJsZWQ6IGJvb2xlYW47XG4gIHJlYWRvbmx5IG9uQm90dG9tQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Cb3R0b21MZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG4gIHJlYWRvbmx5IG9uVG9wQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Ub3BMZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG59XG5cbmNvbnN0IGJsdXJTZWxlY3RJbnB1dCA9IChldmVudDogTW91c2VFdmVudDxIVE1MRGl2RWxlbWVudD4pID0+IHtcbiAgY29uc3QgZWxlbWVudCA9IGV2ZW50LnRhcmdldCBhcyBIVE1MRGl2RWxlbWVudDtcbiAgcmV0dXJuIChcbiAgICBlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCAmJlxuICAgIChlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCBhcyBIVE1MRWxlbWVudCkuYmx1cigpXG4gICk7XG59O1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBTY3JvbGxNYW5hZ2VyKHtcbiAgY2hpbGRyZW4sXG4gIGxvY2tFbmFibGVkLFxuICBjYXB0dXJlRW5hYmxlZCA9IHRydWUsXG4gIG9uQm90dG9tQXJyaXZlLFxuICBvbkJvdHRvbUxlYXZlLFxuICBvblRvcEFycml2ZSxcbiAgb25Ub3BMZWF2ZSxcbn06IFByb3BzKSB7XG4gIGNvbnN0IHNldFNjcm9sbENhcHR1cmVUYXJnZXQgPSB1c2VTY3JvbGxDYXB0dXJlKHtcbiAgICBpc0VuYWJsZWQ6IGNhcHR1cmVFbmFibGVkLFxuICAgIG9uQm90dG9tQXJyaXZlLFxuICAgIG9uQm90dG9tTGVhdmUsXG4gICAgb25Ub3BBcnJpdmUsXG4gICAgb25Ub3BMZWF2ZSxcbiAgfSk7XG4gIGNvbnN0IHNldFNjcm9sbExvY2tUYXJnZXQgPSB1c2VTY3JvbGxMb2NrKHsgaXNFbmFibGVkOiBsb2NrRW5hYmxlZCB9KTtcblxuICBjb25zdCB0YXJnZXRSZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PiA9IChlbGVtZW50KSA9PiB7XG4gICAgc2V0U2Nyb2xsQ2FwdHVyZVRhcmdldChlbGVtZW50KTtcbiAgICBzZXRTY3JvbGxMb2NrVGFyZ2V0KGVsZW1lbnQpO1xuICB9O1xuXG4gIHJldHVybiAoXG4gICAgPEZyYWdtZW50PlxuICAgICAge2xvY2tFbmFibGVkICYmIChcbiAgICAgICAgPGRpdlxuICAgICAgICAgIG9uQ2xpY2s9e2JsdXJTZWxlY3RJbnB1dH1cbiAgICAgICAgICBjc3M9e3sgcG9zaXRpb246ICdmaXhlZCcsIGxlZnQ6IDAsIGJvdHRvbTogMCwgcmlnaHQ6IDAsIHRvcDogMCB9fVxuICAgICAgICAvPlxuICAgICAgKX1cbiAgICAgIHtjaGlsZHJlbih0YXJnZXRSZWYpfVxuICAgIDwvRnJhZ21lbnQ+XG4gICk7XG59XG4iXX0= */",toString:t3};function i3(t){var e=t.children,n=t.lockEnabled,r=t.captureEnabled,i=r===void 0?!0:r,o=t.onBottomArrive,s=t.onBottomLeave,a=t.onTopArrive,l=t.onTopLeave,c=KQ({isEnabled:i,onBottomArrive:o,onBottomLeave:s,onTopArrive:a,onTopLeave:l}),u=e3({isEnabled:n}),f=function(h){c(h),u(h)};return Pe(j.Fragment,null,n&&Pe("div",{onClick:n3,css:r3}),e(f))}function o3(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var s3=process.env.NODE_ENV==="production"?{name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"}:{name:"5kkxb2-requiredInput-RequiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%;label:RequiredInput;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlJlcXVpcmVkSW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWNJIiwiZmlsZSI6IlJlcXVpcmVkSW5wdXQudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqIEBqc3gganN4ICovXG5pbXBvcnQgeyBGb2N1c0V2ZW50SGFuZGxlciwgRnVuY3Rpb25Db21wb25lbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmNvbnN0IFJlcXVpcmVkSW5wdXQ6IEZ1bmN0aW9uQ29tcG9uZW50PHtcbiAgcmVhZG9ubHkgbmFtZT86IHN0cmluZztcbiAgcmVhZG9ubHkgb25Gb2N1czogRm9jdXNFdmVudEhhbmRsZXI8SFRNTElucHV0RWxlbWVudD47XG59PiA9ICh7IG5hbWUsIG9uRm9jdXMgfSkgPT4gKFxuICA8aW5wdXRcbiAgICByZXF1aXJlZFxuICAgIG5hbWU9e25hbWV9XG4gICAgdGFiSW5kZXg9ey0xfVxuICAgIGFyaWEtaGlkZGVuPVwidHJ1ZVwiXG4gICAgb25Gb2N1cz17b25Gb2N1c31cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAncmVxdWlyZWRJbnB1dCcsXG4gICAgICBvcGFjaXR5OiAwLFxuICAgICAgcG9pbnRlckV2ZW50czogJ25vbmUnLFxuICAgICAgcG9zaXRpb246ICdhYnNvbHV0ZScsXG4gICAgICBib3R0b206IDAsXG4gICAgICBsZWZ0OiAwLFxuICAgICAgcmlnaHQ6IDAsXG4gICAgICB3aWR0aDogJzEwMCUnLFxuICAgIH19XG4gICAgLy8gUHJldmVudCBgU3dpdGNoaW5nIGZyb20gdW5jb250cm9sbGVkIHRvIGNvbnRyb2xsZWRgIGVycm9yXG4gICAgdmFsdWU9XCJcIlxuICAgIG9uQ2hhbmdlPXsoKSA9PiB7fX1cbiAgLz5cbik7XG5cbmV4cG9ydCBkZWZhdWx0IFJlcXVpcmVkSW5wdXQ7XG4iXX0= */",toString:o3},a3=function(e){var n=e.name,r=e.onFocus;return Pe("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:s3,value:"",onChange:function(){}})},l3=a3;function AO(t){var e;return typeof window<"u"&&window.navigator!=null?t.test(((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.platform)||window.navigator.platform):!1}function c3(){return AO(/^iPhone/i)}function hA(){return AO(/^Mac/i)}function u3(){return AO(/^iPad/i)||hA()&&navigator.maxTouchPoints>1}function f3(){return c3()||u3()}function d3(){return hA()||f3()}var h3=function(e){return e.label},p3=function(e){return e.label},g3=function(e){return e.value},m3=function(e){return!!e.isDisabled},O3={clearIndicator:HD,container:ND,control:iQ,dropdownIndicator:qD,group:lQ,groupHeading:uQ,indicatorsContainer:VD,indicatorSeparator:KD,input:pQ,loadingIndicator:nQ,loadingMessage:DD,menu:PD,menuList:$D,menuPortal:_D,multiValue:vQ,multiValueLabel:yQ,multiValueRemove:bQ,noOptionsMessage:RD,option:PQ,placeholder:TQ,singleValue:RQ,valueContainer:ZD},x3={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},v3=4,pA=4,y3=38,b3=pA*2,S3={baseUnit:pA,controlHeight:y3,menuGutter:b3},Fh={borderRadius:v3,colors:x3,spacing:S3},w3={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Lv(),captureMenuScroll:!Lv(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:qQ(),formatGroupLabel:h3,getOptionLabel:p3,getOptionValue:g3,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:m3,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!OD(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var n=e.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function ry(t,e,n,r){var i=OA(t,e,n),o=xA(t,e,n),s=mA(t,e),a=mf(t,e);return{type:"option",data:e,isDisabled:i,isSelected:o,label:s,value:a,index:r}}function _u(t,e){return t.options.map(function(n,r){if("options"in n){var i=n.options.map(function(s,a){return ry(t,s,e,a)}).filter(function(s){return oy(t,s)});return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var o=ry(t,n,e,r);return oy(t,o)?o:void 0}).filter(yD)}function gA(t){return t.reduce(function(e,n){return n.type==="group"?e.push.apply(e,na(n.options.map(function(r){return r.data}))):e.push(n.data),e},[])}function iy(t,e){return t.reduce(function(n,r){return r.type==="group"?n.push.apply(n,na(r.options.map(function(i){return{data:i.data,id:"".concat(e,"-").concat(r.index,"-").concat(i.index)}}))):n.push({data:r.data,id:"".concat(e,"-").concat(r.index)}),n},[])}function C3(t,e){return gA(_u(t,e))}function oy(t,e){var n=t.inputValue,r=n===void 0?"":n,i=e.data,o=e.isSelected,s=e.label,a=e.value;return(!yA(t)||!o)&&vA(t,{label:s,value:a,data:i},r)}function k3(t,e){var n=t.focusedValue,r=t.selectValue,i=r.indexOf(n);if(i>-1){var o=e.indexOf(n);if(o>-1)return n;if(i<e.length)return e[i]}return null}function A3(t,e){var n=t.focusedOption;return n&&e.indexOf(n)>-1?n:e[0]}var Zh=function(e,n){var r,i=(r=e.find(function(o){return o.data===n}))===null||r===void 0?void 0:r.id;return i||null},mA=function(e,n){return e.getOptionLabel(n)},mf=function(e,n){return e.getOptionValue(n)};function OA(t,e,n){return typeof t.isOptionDisabled=="function"?t.isOptionDisabled(e,n):!1}function xA(t,e,n){if(n.indexOf(e)>-1)return!0;if(typeof t.isOptionSelected=="function")return t.isOptionSelected(e,n);var r=mf(t,e);return n.some(function(i){return mf(t,i)===r})}function vA(t,e,n){return t.filterOption?t.filterOption(e,n):!0}var yA=function(e){var n=e.hideSelectedOptions,r=e.isMulti;return n===void 0?r:n},P3=1,bA=function(t){kd(n,t);var e=Ad(n);function n(r){var i;if(wd(this,n),i=e.call(this,r),i.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},i.blockOptionHover=!1,i.isComposing=!1,i.commonProps=void 0,i.initialTouchX=0,i.initialTouchY=0,i.openAfterFocus=!1,i.scrollToFocusedOptionOnUpdate=!1,i.userIsDragging=void 0,i.isAppleDevice=d3(),i.controlRef=null,i.getControlRef=function(l){i.controlRef=l},i.focusedOptionRef=null,i.getFocusedOptionRef=function(l){i.focusedOptionRef=l},i.menuListRef=null,i.getMenuListRef=function(l){i.menuListRef=l},i.inputRef=null,i.getInputRef=function(l){i.inputRef=l},i.focus=i.focusInput,i.blur=i.blurInput,i.onChange=function(l,c){var u=i.props,f=u.onChange,d=u.name;c.name=d,i.ariaOnChange(l,c),f(l,c)},i.setValue=function(l,c,u){var f=i.props,d=f.closeMenuOnSelect,h=f.isMulti,p=f.inputValue;i.onInputChange("",{action:"set-value",prevInputValue:p}),d&&(i.setState({inputIsHiddenAfterUpdate:!h}),i.onMenuClose()),i.setState({clearFocusValueOnUpdate:!0}),i.onChange(l,{action:c,option:u})},i.selectOption=function(l){var c=i.props,u=c.blurInputOnSelect,f=c.isMulti,d=c.name,h=i.state.selectValue,p=f&&i.isOptionSelected(l,h),O=i.isOptionDisabled(l,h);if(p){var m=i.getOptionValue(l);i.setValue(h.filter(function(x){return i.getOptionValue(x)!==m}),"deselect-option",l)}else if(!O)f?i.setValue([].concat(na(h),[l]),"select-option",l):i.setValue(l,"select-option");else{i.ariaOnChange(l,{action:"select-option",option:l,name:d});return}u&&i.blurInput()},i.removeValue=function(l){var c=i.props.isMulti,u=i.state.selectValue,f=i.getOptionValue(l),d=u.filter(function(p){return i.getOptionValue(p)!==f}),h=Gc(c,d,d[0]||null);i.onChange(h,{action:"remove-value",removedValue:l}),i.focusInput()},i.clearValue=function(){var l=i.state.selectValue;i.onChange(Gc(i.props.isMulti,[],null),{action:"clear",removedValues:l})},i.popValue=function(){var l=i.props.isMulti,c=i.state.selectValue,u=c[c.length-1],f=c.slice(0,c.length-1),d=Gc(l,f,f[0]||null);u&&i.onChange(d,{action:"pop-value",removedValue:u})},i.getFocusedOptionId=function(l){return Zh(i.state.focusableOptionsWithIds,l)},i.getFocusableOptionsWithIds=function(){return iy(_u(i.props,i.state.selectValue),i.getElementId("option"))},i.getValue=function(){return i.state.selectValue},i.cx=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];return dD.apply(void 0,[i.props.classNamePrefix].concat(c))},i.getOptionLabel=function(l){return mA(i.props,l)},i.getOptionValue=function(l){return mf(i.props,l)},i.getStyles=function(l,c){var u=i.props.unstyled,f=O3[l](c,u);f.boxSizing="border-box";var d=i.props.styles[l];return d?d(f,c):f},i.getClassNames=function(l,c){var u,f;return(u=(f=i.props.classNames)[l])===null||u===void 0?void 0:u.call(f,c)},i.getElementId=function(l){return"".concat(i.state.instancePrefix,"-").concat(l)},i.getComponents=function(){return BQ(i.props)},i.buildCategorizedOptions=function(){return _u(i.props,i.state.selectValue)},i.getCategorizedOptions=function(){return i.props.menuIsOpen?i.buildCategorizedOptions():[]},i.buildFocusableOptions=function(){return gA(i.buildCategorizedOptions())},i.getFocusableOptions=function(){return i.props.menuIsOpen?i.buildFocusableOptions():[]},i.ariaOnChange=function(l,c){i.setState({ariaSelection:le({value:l},c)})},i.onMenuMouseDown=function(l){l.button===0&&(l.stopPropagation(),l.preventDefault(),i.focusInput())},i.onMenuMouseMove=function(l){i.blockOptionHover=!1},i.onControlMouseDown=function(l){if(!l.defaultPrevented){var c=i.props.openMenuOnClick;i.state.isFocused?i.props.menuIsOpen?l.target.tagName!=="INPUT"&&l.target.tagName!=="TEXTAREA"&&i.onMenuClose():c&&i.openMenu("first"):(c&&(i.openAfterFocus=!0),i.focusInput()),l.target.tagName!=="INPUT"&&l.target.tagName!=="TEXTAREA"&&l.preventDefault()}},i.onDropdownIndicatorMouseDown=function(l){if(!(l&&l.type==="mousedown"&&l.button!==0)&&!i.props.isDisabled){var c=i.props,u=c.isMulti,f=c.menuIsOpen;i.focusInput(),f?(i.setState({inputIsHiddenAfterUpdate:!u}),i.onMenuClose()):i.openMenu("first"),l.preventDefault()}},i.onClearIndicatorMouseDown=function(l){l&&l.type==="mousedown"&&l.button!==0||(i.clearValue(),l.preventDefault(),i.openAfterFocus=!1,l.type==="touchend"?i.focusInput():setTimeout(function(){return i.focusInput()}))},i.onScroll=function(l){typeof i.props.closeMenuOnScroll=="boolean"?l.target instanceof HTMLElement&&$d(l.target)&&i.props.onMenuClose():typeof i.props.closeMenuOnScroll=="function"&&i.props.closeMenuOnScroll(l)&&i.props.onMenuClose()},i.onCompositionStart=function(){i.isComposing=!0},i.onCompositionEnd=function(){i.isComposing=!1},i.onTouchStart=function(l){var c=l.touches,u=c&&c.item(0);u&&(i.initialTouchX=u.clientX,i.initialTouchY=u.clientY,i.userIsDragging=!1)},i.onTouchMove=function(l){var c=l.touches,u=c&&c.item(0);if(u){var f=Math.abs(u.clientX-i.initialTouchX),d=Math.abs(u.clientY-i.initialTouchY),h=5;i.userIsDragging=f>h||d>h}},i.onTouchEnd=function(l){i.userIsDragging||(i.controlRef&&!i.controlRef.contains(l.target)&&i.menuListRef&&!i.menuListRef.contains(l.target)&&i.blurInput(),i.initialTouchX=0,i.initialTouchY=0)},i.onControlTouchEnd=function(l){i.userIsDragging||i.onControlMouseDown(l)},i.onClearIndicatorTouchEnd=function(l){i.userIsDragging||i.onClearIndicatorMouseDown(l)},i.onDropdownIndicatorTouchEnd=function(l){i.userIsDragging||i.onDropdownIndicatorMouseDown(l)},i.handleInputChange=function(l){var c=i.props.inputValue,u=l.currentTarget.value;i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange(u,{action:"input-change",prevInputValue:c}),i.props.menuIsOpen||i.onMenuOpen()},i.onInputFocus=function(l){i.props.onFocus&&i.props.onFocus(l),i.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(i.openAfterFocus||i.props.openMenuOnFocus)&&i.openMenu("first"),i.openAfterFocus=!1},i.onInputBlur=function(l){var c=i.props.inputValue;if(i.menuListRef&&i.menuListRef.contains(document.activeElement)){i.inputRef.focus();return}i.props.onBlur&&i.props.onBlur(l),i.onInputChange("",{action:"input-blur",prevInputValue:c}),i.onMenuClose(),i.setState({focusedValue:null,isFocused:!1})},i.onOptionHover=function(l){if(!(i.blockOptionHover||i.state.focusedOption===l)){var c=i.getFocusableOptions(),u=c.indexOf(l);i.setState({focusedOption:l,focusedOptionId:u>-1?i.getFocusedOptionId(l):null})}},i.shouldHideSelectedOptions=function(){return yA(i.props)},i.onValueInputFocus=function(l){l.preventDefault(),l.stopPropagation(),i.focus()},i.onKeyDown=function(l){var c=i.props,u=c.isMulti,f=c.backspaceRemovesValue,d=c.escapeClearsValue,h=c.inputValue,p=c.isClearable,O=c.isDisabled,m=c.menuIsOpen,x=c.onKeyDown,v=c.tabSelectsValue,y=c.openMenuOnFocus,S=i.state,b=S.focusedOption,w=S.focusedValue,C=S.selectValue;if(!O&&!(typeof x=="function"&&(x(l),l.defaultPrevented))){switch(i.blockOptionHover=!0,l.key){case"ArrowLeft":if(!u||h)return;i.focusValue("previous");break;case"ArrowRight":if(!u||h)return;i.focusValue("next");break;case"Delete":case"Backspace":if(h)return;if(w)i.removeValue(w);else{if(!f)return;u?i.popValue():p&&i.clearValue()}break;case"Tab":if(i.isComposing||l.shiftKey||!m||!v||!b||y&&i.isOptionSelected(b,C))return;i.selectOption(b);break;case"Enter":if(l.keyCode===229)break;if(m){if(!b||i.isComposing)return;i.selectOption(b);break}return;case"Escape":m?(i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange("",{action:"menu-close",prevInputValue:h}),i.onMenuClose()):p&&d&&i.clearValue();break;case" ":if(h)return;if(!m){i.openMenu("first");break}if(!b)return;i.selectOption(b);break;case"ArrowUp":m?i.focusOption("up"):i.openMenu("last");break;case"ArrowDown":m?i.focusOption("down"):i.openMenu("first");break;case"PageUp":if(!m)return;i.focusOption("pageup");break;case"PageDown":if(!m)return;i.focusOption("pagedown");break;case"Home":if(!m)return;i.focusOption("first");break;case"End":if(!m)return;i.focusOption("last");break;default:return}l.preventDefault()}},i.state.instancePrefix="react-select-"+(i.props.instanceId||++P3),i.state.selectValue=Vv(r.value),r.menuIsOpen&&i.state.selectValue.length){var o=i.getFocusableOptionsWithIds(),s=i.buildFocusableOptions(),a=s.indexOf(i.state.selectValue[0]);i.state.focusableOptionsWithIds=o,i.state.focusedOption=s[a],i.state.focusedOptionId=Zh(o,s[a])}return i}return Cd(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&zv(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(i){var o=this.props,s=o.isDisabled,a=o.menuIsOpen,l=this.state.isFocused;(l&&!s&&i.isDisabled||l&&a&&!i.menuIsOpen)&&this.focusInput(),l&&s&&!i.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!l&&!s&&i.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(zv(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(i,o){this.props.onInputChange(i,o)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(i){var o=this,s=this.state,a=s.selectValue,l=s.isFocused,c=this.buildFocusableOptions(),u=i==="first"?0:c.length-1;if(!this.props.isMulti){var f=c.indexOf(a[0]);f>-1&&(u=f)}this.scrollToFocusedOptionOnUpdate=!(l&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:c[u],focusedOptionId:this.getFocusedOptionId(c[u])},function(){return o.onMenuOpen()})}},{key:"focusValue",value:function(i){var o=this.state,s=o.selectValue,a=o.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var l=s.indexOf(a);a||(l=-1);var c=s.length-1,u=-1;if(s.length){switch(i){case"previous":l===0?u=0:l===-1?u=c:u=l-1;break;case"next":l>-1&&l<c&&(u=l+1);break}this.setState({inputIsHidden:u!==-1,focusedValue:s[u]})}}}},{key:"focusOption",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",o=this.props.pageSize,s=this.state.focusedOption,a=this.getFocusableOptions();if(a.length){var l=0,c=a.indexOf(s);s||(c=-1),i==="up"?l=c>0?c-1:a.length-1:i==="down"?l=(c+1)%a.length:i==="pageup"?(l=c-o,l<0&&(l=0)):i==="pagedown"?(l=c+o,l>a.length-1&&(l=a.length-1)):i==="last"&&(l=a.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:a[l],focusedValue:null,focusedOptionId:this.getFocusedOptionId(a[l])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(Fh):le(le({},Fh),this.props.theme):Fh}},{key:"getCommonProps",value:function(){var i=this.clearValue,o=this.cx,s=this.getStyles,a=this.getClassNames,l=this.getValue,c=this.selectOption,u=this.setValue,f=this.props,d=f.isMulti,h=f.isRtl,p=f.options,O=this.hasValue();return{clearValue:i,cx:o,getStyles:s,getClassNames:a,getValue:l,hasValue:O,isMulti:d,isRtl:h,options:p,selectOption:c,selectProps:f,setValue:u,theme:this.getTheme()}}},{key:"hasValue",value:function(){var i=this.state.selectValue;return i.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var i=this.props,o=i.isClearable,s=i.isMulti;return o===void 0?s:o}},{key:"isOptionDisabled",value:function(i,o){return OA(this.props,i,o)}},{key:"isOptionSelected",value:function(i,o){return xA(this.props,i,o)}},{key:"filterOption",value:function(i,o){return vA(this.props,i,o)}},{key:"formatOptionLabel",value:function(i,o){if(typeof this.props.formatOptionLabel=="function"){var s=this.props.inputValue,a=this.state.selectValue;return this.props.formatOptionLabel(i,{context:o,inputValue:s,selectValue:a})}else return this.getOptionLabel(i)}},{key:"formatGroupLabel",value:function(i){return this.props.formatGroupLabel(i)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var i=this.props,o=i.isDisabled,s=i.isSearchable,a=i.inputId,l=i.inputValue,c=i.tabIndex,u=i.form,f=i.menuIsOpen,d=i.required,h=this.getComponents(),p=h.Input,O=this.state,m=O.inputIsHidden,x=O.ariaSelection,v=this.commonProps,y=a||this.getElementId("input"),S=le(le(le({"aria-autocomplete":"list","aria-expanded":f,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":d,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},f&&{"aria-controls":this.getElementId("listbox")}),!s&&{"aria-readonly":!0}),this.hasValue()?(x==null?void 0:x.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return s?X.createElement(p,Ae({},v,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:y,innerRef:this.getInputRef,isDisabled:o,isHidden:m,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:c,form:u,type:"text",value:l},S)):X.createElement(HQ,Ae({id:y,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:pf,onFocus:this.onInputFocus,disabled:o,tabIndex:c,inputMode:"none",form:u,value:""},S))}},{key:"renderPlaceholderOrValue",value:function(){var i=this,o=this.getComponents(),s=o.MultiValue,a=o.MultiValueContainer,l=o.MultiValueLabel,c=o.MultiValueRemove,u=o.SingleValue,f=o.Placeholder,d=this.commonProps,h=this.props,p=h.controlShouldRenderValue,O=h.isDisabled,m=h.isMulti,x=h.inputValue,v=h.placeholder,y=this.state,S=y.selectValue,b=y.focusedValue,w=y.isFocused;if(!this.hasValue()||!p)return x?null:X.createElement(f,Ae({},d,{key:"placeholder",isDisabled:O,isFocused:w,innerProps:{id:this.getElementId("placeholder")}}),v);if(m)return S.map(function(k,I){var A=k===b,E="".concat(i.getOptionLabel(k),"-").concat(i.getOptionValue(k));return X.createElement(s,Ae({},d,{components:{Container:a,Label:l,Remove:c},isFocused:A,isDisabled:O,key:E,index:I,removeProps:{onClick:function(){return i.removeValue(k)},onTouchEnd:function(){return i.removeValue(k)},onMouseDown:function(R){R.preventDefault()}},data:k}),i.formatOptionLabel(k,"value"))});if(x)return null;var C=S[0];return X.createElement(u,Ae({},d,{data:C,isDisabled:O}),this.formatOptionLabel(C,"value"))}},{key:"renderClearIndicator",value:function(){var i=this.getComponents(),o=i.ClearIndicator,s=this.commonProps,a=this.props,l=a.isDisabled,c=a.isLoading,u=this.state.isFocused;if(!this.isClearable()||!o||l||!this.hasValue()||c)return null;var f={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return X.createElement(o,Ae({},s,{innerProps:f,isFocused:u}))}},{key:"renderLoadingIndicator",value:function(){var i=this.getComponents(),o=i.LoadingIndicator,s=this.commonProps,a=this.props,l=a.isDisabled,c=a.isLoading,u=this.state.isFocused;if(!o||!c)return null;var f={"aria-hidden":"true"};return X.createElement(o,Ae({},s,{innerProps:f,isDisabled:l,isFocused:u}))}},{key:"renderIndicatorSeparator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator,s=i.IndicatorSeparator;if(!o||!s)return null;var a=this.commonProps,l=this.props.isDisabled,c=this.state.isFocused;return X.createElement(s,Ae({},a,{isDisabled:l,isFocused:c}))}},{key:"renderDropdownIndicator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator;if(!o)return null;var s=this.commonProps,a=this.props.isDisabled,l=this.state.isFocused,c={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return X.createElement(o,Ae({},s,{innerProps:c,isDisabled:a,isFocused:l}))}},{key:"renderMenu",value:function(){var i=this,o=this.getComponents(),s=o.Group,a=o.GroupHeading,l=o.Menu,c=o.MenuList,u=o.MenuPortal,f=o.LoadingMessage,d=o.NoOptionsMessage,h=o.Option,p=this.commonProps,O=this.state.focusedOption,m=this.props,x=m.captureMenuScroll,v=m.inputValue,y=m.isLoading,S=m.loadingMessage,b=m.minMenuHeight,w=m.maxMenuHeight,C=m.menuIsOpen,k=m.menuPlacement,I=m.menuPosition,A=m.menuPortalTarget,E=m.menuShouldBlockScroll,$=m.menuShouldScrollIntoView,R=m.noOptionsMessage,M=m.onMenuScrollToTop,Q=m.onMenuScrollToBottom;if(!C)return null;var Z=function(B,N){var U=B.type,F=B.data,te=B.isDisabled,L=B.isSelected,ce=B.label,re=B.value,ae=O===F,H=te?void 0:function(){return i.onOptionHover(F)},pe=te?void 0:function(){return i.selectOption(F)},q="".concat(i.getElementId("option"),"-").concat(N),ne={id:q,onClick:pe,onMouseMove:H,onMouseOver:H,tabIndex:-1,role:"option","aria-selected":i.isAppleDevice?void 0:L};return X.createElement(h,Ae({},p,{innerProps:ne,data:F,isDisabled:te,isSelected:L,key:q,label:ce,type:U,value:re,isFocused:ae,innerRef:ae?i.getFocusedOptionRef:void 0}),i.formatOptionLabel(B.data,"menu"))},G;if(this.hasOptions())G=this.getCategorizedOptions().map(function(D){if(D.type==="group"){var B=D.data,N=D.options,U=D.index,F="".concat(i.getElementId("group"),"-").concat(U),te="".concat(F,"-heading");return X.createElement(s,Ae({},p,{key:F,data:B,options:N,Heading:a,headingProps:{id:te,data:D.data},label:i.formatGroupLabel(D.data)}),D.options.map(function(L){return Z(L,"".concat(U,"-").concat(L.index))}))}else if(D.type==="option")return Z(D,"".concat(D.index))});else if(y){var V=S({inputValue:v});if(V===null)return null;G=X.createElement(f,p,V)}else{var ee=R({inputValue:v});if(ee===null)return null;G=X.createElement(d,p,ee)}var Y={minMenuHeight:b,maxMenuHeight:w,menuPlacement:k,menuPosition:I,menuShouldScrollIntoView:$},z=X.createElement(ED,Ae({},p,Y),function(D){var B=D.ref,N=D.placerProps,U=N.placement,F=N.maxHeight;return X.createElement(l,Ae({},p,Y,{innerRef:B,innerProps:{onMouseDown:i.onMenuMouseDown,onMouseMove:i.onMenuMouseMove},isLoading:y,placement:U}),X.createElement(i3,{captureEnabled:x,onTopArrive:M,onBottomArrive:Q,lockEnabled:E},function(te){return X.createElement(c,Ae({},p,{innerRef:function(ce){i.getMenuListRef(ce),te(ce)},innerProps:{role:"listbox","aria-multiselectable":p.isMulti,id:i.getElementId("listbox")},isLoading:y,maxHeight:F,focusedOption:O}),G)}))});return A||I==="fixed"?X.createElement(u,Ae({},p,{appendTo:A,controlElement:this.controlRef,menuPlacement:k,menuPosition:I}),z):z}},{key:"renderFormField",value:function(){var i=this,o=this.props,s=o.delimiter,a=o.isDisabled,l=o.isMulti,c=o.name,u=o.required,f=this.state.selectValue;if(u&&!this.hasValue()&&!a)return X.createElement(l3,{name:c,onFocus:this.onValueInputFocus});if(!(!c||a))if(l)if(s){var d=f.map(function(O){return i.getOptionValue(O)}).join(s);return X.createElement("input",{name:c,type:"hidden",value:d})}else{var h=f.length>0?f.map(function(O,m){return X.createElement("input",{key:"i-".concat(m),name:c,type:"hidden",value:i.getOptionValue(O)})}):X.createElement("input",{name:c,type:"hidden",value:""});return X.createElement("div",null,h)}else{var p=f[0]?this.getOptionValue(f[0]):"";return X.createElement("input",{name:c,type:"hidden",value:p})}}},{key:"renderLiveRegion",value:function(){var i=this.commonProps,o=this.state,s=o.ariaSelection,a=o.focusedOption,l=o.focusedValue,c=o.isFocused,u=o.selectValue,f=this.getFocusableOptions();return X.createElement(LQ,Ae({},i,{id:this.getElementId("live-region"),ariaSelection:s,focusedOption:a,focusedValue:l,isFocused:c,selectValue:u,focusableOptions:f,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var i=this.getComponents(),o=i.Control,s=i.IndicatorsContainer,a=i.SelectContainer,l=i.ValueContainer,c=this.props,u=c.className,f=c.id,d=c.isDisabled,h=c.menuIsOpen,p=this.state.isFocused,O=this.commonProps=this.getCommonProps();return X.createElement(a,Ae({},O,{className:u,innerProps:{id:f,onKeyDown:this.onKeyDown},isDisabled:d,isFocused:p}),this.renderLiveRegion(),X.createElement(o,Ae({},O,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:d,isFocused:p,menuIsOpen:h}),X.createElement(l,Ae({},O,{isDisabled:d}),this.renderPlaceholderOrValue(),this.renderInput()),X.createElement(s,Ae({},O,{isDisabled:d}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(i,o){var s=o.prevProps,a=o.clearFocusValueOnUpdate,l=o.inputIsHiddenAfterUpdate,c=o.ariaSelection,u=o.isFocused,f=o.prevWasFocused,d=o.instancePrefix,h=i.options,p=i.value,O=i.menuIsOpen,m=i.inputValue,x=i.isMulti,v=Vv(p),y={};if(s&&(p!==s.value||h!==s.options||O!==s.menuIsOpen||m!==s.inputValue)){var S=O?C3(i,v):[],b=O?iy(_u(i,v),"".concat(d,"-option")):[],w=a?k3(o,v):null,C=A3(o,S),k=Zh(b,C);y={selectValue:v,focusedOption:C,focusedOptionId:k,focusableOptionsWithIds:b,focusedValue:w,clearFocusValueOnUpdate:!1}}var I=l!=null&&i!==s?{inputIsHidden:l,inputIsHiddenAfterUpdate:void 0}:{},A=c,E=u&&f;return u&&!E&&(A={value:Gc(x,v,v[0]||null),options:v,action:"initial-input-focus"},E=!f),(c==null?void 0:c.action)==="initial-input-focus"&&(A=null),le(le(le({},y),I),{},{prevProps:i,ariaSelection:A,prevWasFocused:E})}}]),n}(j.Component);bA.defaultProps=w3;var E3=j.forwardRef(function(t,e){var n=F4(t);return X.createElement(bA,Ae({ref:e},n))}),I3=E3;const T3=()=>g.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:g.jsx("path",{d:"M7 0.875C3.63125 0.875 0.875 3.63125 0.875 7C0.875 10.3687 3.63125 13.125 7 13.125C10.3687 13.125 13.125 10.3687 13.125 7C13.125 3.63125 10.3687 0.875 7 0.875ZM6.51875 3.5H7.48125V8.3125H6.51875V3.5ZM7 10.9375C6.65 10.9375 6.34375 10.6313 6.34375 10.2812C6.34375 9.93125 6.65 9.625 7 9.625C7.35 9.625 7.65625 9.93125 7.65625 10.2812C7.65625 10.6313 7.35 10.9375 7 10.9375Z",fill:"#FFA02E"})}),$3=()=>g.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:g.jsx("path",{d:"M7 0.875C3.5875 0.875 0.875 3.5875 0.875 7C0.875 10.4125 3.5875 13.125 7 13.125C10.4125 13.125 13.125 10.4125 13.125 7C13.125 3.5875 10.4125 0.875 7 0.875ZM9.3625 10.0625L7 7.7L4.6375 10.0625L3.9375 9.3625L6.3 7L3.9375 4.6375L4.6375 3.9375L7 6.3L9.3625 3.9375L10.0625 4.6375L7.7 7L10.0625 9.3625L9.3625 10.0625Z",fill:"#F9316D"})}),ko=({options:t,isClearable:e=!1,isSearchable:n=!1,isDisabled:r=!1,isMulti:i=!1,isWarning:o=!1,isError:s=!1,withArrow:a=!0,placeholder:l,defaultValue:c,className:u,value:f,ariaLabel:d="select",ariaLabeledBy:h,size:p="medium",menuAlignment:O="left",icon:m,formatGroupLabel:x,onChange:v,dataTestId:y})=>{const S=k=>{const{selectProps:I}=k,{menuIsOpen:A}=I,E=A?g.jsx(_.ChevronUpIcon,{size:"14px"}):g.jsx(_.ChevronDownIcon,{size:"14px"});return a&&!i?g.jsxs(Bu.DropdownIndicator,{...k,children:[o&&g.jsx(T3,{}),s&&g.jsx($3,{}),m||E]}):null},b=k=>g.jsxs(Bu.Option,{...k,innerProps:{...k.innerProps,"data-testid":"select-option"},children:[k.children," ",k.isSelected&&g.jsx(_.CheckmarkIcon,{})]}),w=k=>g.jsx(Bu.SingleValue,{...k,innerProps:{...k.innerProps,"data-testid":y||"select-singleValue"},children:k.children}),C=j.useMemo(()=>({menu:k=>({...k,maxWidth:"424px",width:"auto",boxShadow:"0px 0px 4px 0px rgba(51, 51, 51, 0.15)",border:"1px solid var(--border-color-secondary)",borderRadius:"var(--border-radius-md)",overflow:"hidden",textOverflow:"ellipsis",zIndex:3,opacity:1,backgroundColor:"var(--bg-color)",minWidth:"max-content",right:O==="right"?0:"unset"})}),[O]);return g.jsx(I3,{className:`${u} react-select-${p}`,options:t,onChange:v,isSearchable:n,isClearable:e,isDisabled:r,isMulti:i,placeholder:l,defaultValue:c,value:f,formatGroupLabel:x,components:{Option:b,SingleValue:w,DropdownIndicator:S,IndicatorSeparator:null},styles:{...j3,...C},"aria-label":d,"aria-labelledby":h})},j3={container:t=>({...t}),control:(t,e)=>({...t,display:"flex",gap:"var(--spacing-xxs)",boxShadow:"none",maxWidth:"424px",overflow:"hidden",textOverflow:"ellipsis",minHeight:"24px",padding:e.isMulti?"0px var(--spacing-unit)":"0px var(--spacing-xs)",alignItems:"center",backgroundColor:e.isDisabled?"var(--bg-raised-shadow)":"var(--bg-color)",border:"none","&:hover":{cursor:"pointer"}}),singleValue:(t,e)=>({...t,color:e.isDisabled?"var(--color-content-disabled)":"var(--color-content)",fontSize:"var(--font-size-base)",lineHeight:"var(--line-height-base)",overflow:"hidden",margin:0,"&:hover":{color:"var(--text-primary)"}}),dropdownIndicator:(t,e)=>({...t,color:e.isDisabled?"var(--color-content-disabled)":"var(--color-content)",fill:e.isDisabled?"var(--color-content-disabled)":"var(--color-content)",display:"flex",alignItems:"center",alignSelf:"auto",justifyContent:"center",padding:0,gap:"var(--spacing-xs)","&:hover":{color:"var(--icon-color-additional)",fill:"var(--icon-color-additional)"}}),clearIndicator:t=>({...t,padding:0,width:"14px",height:"14px",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",fill:"var(--color-content-placeholder)"}),valueContainer:t=>({...t,padding:0,overflow:"visible"}),indicatorsContainer:t=>({...t,gap:"var(--spacing-unit)"}),placeholder:(t,e)=>({...t,color:"var(--color-content-placeholder)",fontSize:"var(--font-size-base)",margin:0,padding:e.isMulti?"0px var(--spacing-xs)":0}),input:t=>({...t,fontSize:"var(--font-size-base)",color:"var(--color-content)",margin:0,padding:0}),group:t=>({...t,paddingLeft:"var(--spacing-xs)"}),menuList:t=>({...t,backgroundColor:"var(--bg-color)",padding:"var(--spacing-unit)",overflowX:"hidden","& > div:not(:last-child)":{margin:"0px 0px calc(var(--spacing-unit)/2) 0px"}}),option:(t,e)=>({...t,minWidth:"max-content",cursor:"pointer",borderRadius:"var(--border-radius-md)",fontSize:"var(--font-size-base)",lineHeight:"var(--line-height-base)",padding:"0px var(--spacing-xs)",minHeight:"32px",color:"var(--color-content)",fill:"var(--color-content)",fontWeight:e.isSelected?"var(--font-weight-medium)":"var(--font-weight-regular)",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"var(--spacing-xs)",backgroundColor:"unset",div:{maxWidth:"400px",textOverflow:"ellipsis",overflow:"hidden"},"&:hover":{backgroundColor:"var(--menu-item-bg-color-hover)"}})};T.div`
140
+ `]))),nQ=function(e,n){var r=e.isFocused,i=e.size,o=e.theme,s=o.colors,a=o.spacing.baseUnit;return le({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:i,lineHeight:1,marginRight:i,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?s.neutral60:s.neutral20,padding:a*2})},Bh=function(e){var n=e.delay,r=e.offset;return Pe("span",{css:bO({animation:"".concat(tQ," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},process.env.NODE_ENV==="production"?"":";label:LoadingDot;",process.env.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1RSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgUmVhY3ROb2RlIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsganN4LCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmltcG9ydCB7XG4gIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lLFxuICBDU1NPYmplY3RXaXRoTGFiZWwsXG4gIEdyb3VwQmFzZSxcbn0gZnJvbSAnLi4vdHlwZXMnO1xuaW1wb3J0IHsgZ2V0U3R5bGVQcm9wcyB9IGZyb20gJy4uL3V0aWxzJztcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBEcm9wZG93biAmIENsZWFyIEljb25zXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgU3ZnID0gKHtcbiAgc2l6ZSxcbiAgLi4ucHJvcHNcbn06IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU6IG51bWJlciB9KSA9PiAoXG4gIDxzdmdcbiAgICBoZWlnaHQ9e3NpemV9XG4gICAgd2lkdGg9e3NpemV9XG4gICAgdmlld0JveD1cIjAgMCAyMCAyMFwiXG4gICAgYXJpYS1oaWRkZW49XCJ0cnVlXCJcbiAgICBmb2N1c2FibGU9XCJmYWxzZVwiXG4gICAgY3NzPXt7XG4gICAgICBkaXNwbGF5OiAnaW5saW5lLWJsb2NrJyxcbiAgICAgIGZpbGw6ICdjdXJyZW50Q29sb3InLFxuICAgICAgbGluZUhlaWdodDogMSxcbiAgICAgIHN0cm9rZTogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBzdHJva2VXaWR0aDogMCxcbiAgICB9fVxuICAgIHsuLi5wcm9wc31cbiAgLz5cbik7XG5cbmV4cG9ydCB0eXBlIENyb3NzSWNvblByb3BzID0gSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZT86IG51bWJlciB9O1xuZXhwb3J0IGNvbnN0IENyb3NzSWNvbiA9IChwcm9wczogQ3Jvc3NJY29uUHJvcHMpID0+IChcbiAgPFN2ZyBzaXplPXsyMH0gey4uLnByb3BzfT5cbiAgICA8cGF0aCBkPVwiTTE0LjM0OCAxNC44NDljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDBsLTIuNjUxLTMuMDMwLTIuNjUxIDMuMDI5Yy0wLjQ2OSAwLjQ2OS0xLjIyOSAwLjQ2OS0xLjY5NyAwLTAuNDY5LTAuNDY5LTAuNDY5LTEuMjI5IDAtMS42OTdsMi43NTgtMy4xNS0yLjc1OS0zLjE1MmMtMC40NjktMC40NjktMC40NjktMS4yMjggMC0xLjY5N3MxLjIyOC0wLjQ2OSAxLjY5NyAwbDIuNjUyIDMuMDMxIDIuNjUxLTMuMDMxYzAuNDY5LTAuNDY5IDEuMjI4LTAuNDY5IDEuNjk3IDBzMC40NjkgMS4yMjkgMCAxLjY5N2wtMi43NTggMy4xNTIgMi43NTggMy4xNWMwLjQ2OSAwLjQ2OSAwLjQ2OSAxLjIyOSAwIDEuNjk4elwiIC8+XG4gIDwvU3ZnPlxuKTtcbmV4cG9ydCB0eXBlIERvd25DaGV2cm9uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgRG93bkNoZXZyb24gPSAocHJvcHM6IERvd25DaGV2cm9uUHJvcHMpID0+IChcbiAgPFN2ZyBzaXplPXsyMH0gey4uLnByb3BzfT5cbiAgICA8cGF0aCBkPVwiTTQuNTE2IDcuNTQ4YzAuNDM2LTAuNDQ2IDEuMDQzLTAuNDgxIDEuNTc2IDBsMy45MDggMy43NDcgMy45MDgtMy43NDdjMC41MzMtMC40ODEgMS4xNDEtMC40NDYgMS41NzQgMCAwLjQzNiAwLjQ0NSAwLjQwOCAxLjE5NyAwIDEuNjE1LTAuNDA2IDAuNDE4LTQuNjk1IDQuNTAyLTQuNjk1IDQuNTAyLTAuMjE3IDAuMjIzLTAuNTAyIDAuMzM1LTAuNzg3IDAuMzM1cy0wLjU3LTAuMTEyLTAuNzg5LTAuMzM1YzAgMC00LjI4Ny00LjA4NC00LjY5NS00LjUwMnMtMC40MzYtMS4xNyAwLTEuNjE1elwiIC8+XG4gIDwvU3ZnPlxuKTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBEcm9wZG93biAmIENsZWFyIEJ1dHRvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xufVxuXG5jb25zdCBiYXNlQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNGb2N1c2VkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTpcbiAgICB8IERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbiAgICB8IENsZWFySW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JDb250YWluZXInLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICAgICc6aG92ZXInOiB7XG4gICAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsODAgOiBjb2xvcnMubmV1dHJhbDQwLFxuICAgICAgICB9LFxuICAgICAgfSksXG59KTtcblxuZXhwb3J0IGNvbnN0IGRyb3Bkb3duSW5kaWNhdG9yQ1NTID0gYmFzZUNTUztcbmV4cG9ydCBjb25zdCBEcm9wZG93bkluZGljYXRvciA9IDxcbiAgT3B0aW9uLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPlxuPihcbiAgcHJvcHM6IERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNoaWxkcmVuLCBpbm5lclByb3BzIH0gPSBwcm9wcztcbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICB7Li4uZ2V0U3R5bGVQcm9wcyhwcm9wcywgJ2Ryb3Bkb3duSW5kaWNhdG9yJywge1xuICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICdkcm9wZG93bi1pbmRpY2F0b3InOiB0cnVlLFxuICAgICAgfSl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICB7Y2hpbGRyZW4gfHwgPERvd25DaGV2cm9uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuZXhwb3J0IGludGVyZmFjZSBDbGVhckluZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFRoZSBjaGlsZHJlbiB0byBiZSByZW5kZXJlZCBpbnNpZGUgdGhlIGluZGljYXRvci4gKi9cbiAgY2hpbGRyZW4/OiBSZWFjdE5vZGU7XG4gIC8qKiBQcm9wcyB0aGF0IHdpbGwgYmUgcGFzc2VkIG9uIHRvIHRoZSBjaGlsZHJlbi4gKi9cbiAgaW5uZXJQcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydkaXYnXTtcbiAgLyoqIFRoZSBmb2N1c2VkIHN0YXRlIG9mIHRoZSBzZWxlY3QuICovXG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbn1cblxuZXhwb3J0IGNvbnN0IGNsZWFySW5kaWNhdG9yQ1NTID0gYmFzZUNTUztcbmV4cG9ydCBjb25zdCBDbGVhckluZGljYXRvciA9IDxcbiAgT3B0aW9uLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPlxuPihcbiAgcHJvcHM6IENsZWFySW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNoaWxkcmVuLCBpbm5lclByb3BzIH0gPSBwcm9wcztcbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICB7Li4uZ2V0U3R5bGVQcm9wcyhwcm9wcywgJ2NsZWFySW5kaWNhdG9yJywge1xuICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICdjbGVhci1pbmRpY2F0b3InOiB0cnVlLFxuICAgICAgfSl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICB7Y2hpbGRyZW4gfHwgPENyb3NzSWNvbiAvPn1cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG5cbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuLy8gU2VwYXJhdG9yXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuZXhwb3J0IGludGVyZmFjZSBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbiAgaW5uZXJQcm9wcz86IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3BhbiddO1xufVxuXG5leHBvcnQgY29uc3QgaW5kaWNhdG9yU2VwYXJhdG9yQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNEaXNhYmxlZCxcbiAgICB0aGVtZToge1xuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgICAgY29sb3JzLFxuICAgIH0sXG4gIH06IEluZGljYXRvclNlcGFyYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+LFxuICB1bnN0eWxlZDogYm9vbGVhblxuKTogQ1NTT2JqZWN0V2l0aExhYmVsID0+ICh7XG4gIGxhYmVsOiAnaW5kaWNhdG9yU2VwYXJhdG9yJyxcbiAgYWxpZ25TZWxmOiAnc3RyZXRjaCcsXG4gIHdpZHRoOiAxLFxuICAuLi4odW5zdHlsZWRcbiAgICA/IHt9XG4gICAgOiB7XG4gICAgICAgIGJhY2tncm91bmRDb2xvcjogaXNEaXNhYmxlZCA/IGNvbG9ycy5uZXV0cmFsMTAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBtYXJnaW5Cb3R0b206IGJhc2VVbml0ICogMixcbiAgICAgICAgbWFyZ2luVG9wOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgSW5kaWNhdG9yU2VwYXJhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxzcGFuXG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnaW5kaWNhdG9yU2VwYXJhdG9yJywge1xuICAgICAgICAnaW5kaWNhdG9yLXNlcGFyYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAvPlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBMb2FkaW5nXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgbG9hZGluZ0RvdEFuaW1hdGlvbnMgPSBrZXlmcmFtZXNgXG4gIDAlLCA4MCUsIDEwMCUgeyBvcGFjaXR5OiAwOyB9XG4gIDQwJSB7IG9wYWNpdHk6IDE7IH1cbmA7XG5cbmV4cG9ydCBjb25zdCBsb2FkaW5nSW5kaWNhdG9yQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNGb2N1c2VkLFxuICAgIHNpemUsXG4gICAgdGhlbWU6IHtcbiAgICAgIGNvbG9ycyxcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICB9LFxuICB9OiBMb2FkaW5nSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdsb2FkaW5nSW5kaWNhdG9yJyxcbiAgZGlzcGxheTogJ2ZsZXgnLFxuICB0cmFuc2l0aW9uOiAnY29sb3IgMTUwbXMnLFxuICBhbGlnblNlbGY6ICdjZW50ZXInLFxuICBmb250U2l6ZTogc2l6ZSxcbiAgbGluZUhlaWdodDogMSxcbiAgbWFyZ2luUmlnaHQ6IHNpemUsXG4gIHRleHRBbGlnbjogJ2NlbnRlcicsXG4gIHZlcnRpY2FsQWxpZ246ICdtaWRkbGUnLFxuICAuLi4odW5zdHlsZWRcbiAgICA/IHt9XG4gICAgOiB7XG4gICAgICAgIGNvbG9yOiBpc0ZvY3VzZWQgPyBjb2xvcnMubmV1dHJhbDYwIDogY29sb3JzLm5ldXRyYWwyMCxcbiAgICAgICAgcGFkZGluZzogYmFzZVVuaXQgKiAyLFxuICAgICAgfSksXG59KTtcblxuaW50ZXJmYWNlIExvYWRpbmdEb3RQcm9wcyB7XG4gIGRlbGF5OiBudW1iZXI7XG4gIG9mZnNldDogYm9vbGVhbjtcbn1cbmNvbnN0IExvYWRpbmdEb3QgPSAoeyBkZWxheSwgb2Zmc2V0IH06IExvYWRpbmdEb3RQcm9wcykgPT4gKFxuICA8c3BhblxuICAgIGNzcz17e1xuICAgICAgYW5pbWF0aW9uOiBgJHtsb2FkaW5nRG90QW5pbWF0aW9uc30gMXMgZWFzZS1pbi1vdXQgJHtkZWxheX1tcyBpbmZpbml0ZTtgLFxuICAgICAgYmFja2dyb3VuZENvbG9yOiAnY3VycmVudENvbG9yJyxcbiAgICAgIGJvcmRlclJhZGl1czogJzFlbScsXG4gICAgICBkaXNwbGF5OiAnaW5saW5lLWJsb2NrJyxcbiAgICAgIG1hcmdpbkxlZnQ6IG9mZnNldCA/ICcxZW0nIDogdW5kZWZpbmVkLFxuICAgICAgaGVpZ2h0OiAnMWVtJyxcbiAgICAgIHZlcnRpY2FsQWxpZ246ICd0b3AnLFxuICAgICAgd2lkdGg6ICcxZW0nLFxuICAgIH19XG4gIC8+XG4pO1xuXG5leHBvcnQgaW50ZXJmYWNlIExvYWRpbmdJbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBQcm9wcyB0aGF0IHdpbGwgYmUgcGFzc2VkIG9uIHRvIHRoZSBjaGlsZHJlbi4gKi9cbiAgaW5uZXJQcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydkaXYnXTtcbiAgLyoqIFRoZSBmb2N1c2VkIHN0YXRlIG9mIHRoZSBzZWxlY3QuICovXG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgLyoqIFNldCBzaXplIG9mIHRoZSBjb250YWluZXIuICovXG4gIHNpemU6IG51bWJlcjtcbn1cbmV4cG9ydCBjb25zdCBMb2FkaW5nSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KHtcbiAgaW5uZXJQcm9wcyxcbiAgaXNSdGwsXG4gIHNpemUgPSA0LFxuICAuLi5yZXN0UHJvcHNcbn06IExvYWRpbmdJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPikgPT4ge1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKFxuICAgICAgICB7IC4uLnJlc3RQcm9wcywgaW5uZXJQcm9wcywgaXNSdGwsIHNpemUgfSxcbiAgICAgICAgJ2xvYWRpbmdJbmRpY2F0b3InLFxuICAgICAgICB7XG4gICAgICAgICAgaW5kaWNhdG9yOiB0cnVlLFxuICAgICAgICAgICdsb2FkaW5nLWluZGljYXRvcic6IHRydWUsXG4gICAgICAgIH1cbiAgICAgICl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MH0gb2Zmc2V0PXtpc1J0bH0gLz5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXsxNjB9IG9mZnNldCAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezMyMH0gb2Zmc2V0PXshaXNSdGx9IC8+XG4gICAgPC9kaXY+XG4gICk7XG59O1xuIl19 */")})},rQ=function(e){var n=e.innerProps,r=e.isRtl,i=e.size,o=i===void 0?4:i,s=Tr(e,XD);return Pe("div",Ae({},Ft(le(le({},s),{},{innerProps:n,isRtl:r,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),Pe(Bh,{delay:0,offset:r}),Pe(Bh,{delay:160,offset:!0}),Pe(Bh,{delay:320,offset:!r}))},iQ=function(e,n){var r=e.isDisabled,i=e.isFocused,o=e.theme,s=o.colors,a=o.borderRadius,l=o.spacing;return le({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:l.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?s.neutral5:s.neutral0,borderColor:r?s.neutral10:i?s.primary:s.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:i?"0 0 0 1px ".concat(s.primary):void 0,"&:hover":{borderColor:i?s.primary:s.neutral30}})},oQ=function(e){var n=e.children,r=e.isDisabled,i=e.isFocused,o=e.innerRef,s=e.innerProps,a=e.menuIsOpen;return Pe("div",Ae({ref:o},Ft(e,"control",{control:!0,"control--is-disabled":r,"control--is-focused":i,"control--menu-is-open":a}),s,{"aria-disabled":r||void 0}),n)},sQ=oQ,aQ=["data"],lQ=function(e,n){var r=e.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},cQ=function(e){var n=e.children,r=e.cx,i=e.getStyles,o=e.getClassNames,s=e.Heading,a=e.headingProps,l=e.innerProps,c=e.label,u=e.theme,f=e.selectProps;return Pe("div",Ae({},Ft(e,"group",{group:!0}),l),Pe(s,Ae({},a,{selectProps:f,theme:u,getStyles:i,getClassNames:o,cx:r}),c),Pe("div",null,n))},uQ=function(e,n){var r=e.theme,i=r.colors,o=r.spacing;return le({label:"group",cursor:"default",display:"block"},n?{}:{color:i.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:o.baseUnit*3,paddingRight:o.baseUnit*3,textTransform:"uppercase"})},fQ=function(e){var n=eA(e);n.data;var r=Tr(n,aQ);return Pe("div",Ae({},Ft(e,"groupHeading",{"group-heading":!0}),r))},dQ=cQ,hQ=["innerRef","isDisabled","isHidden","inputClassName"],pQ=function(e,n){var r=e.isDisabled,i=e.value,o=e.theme,s=o.spacing,a=o.colors;return le(le({visibility:r?"hidden":"visible",transform:i?"translateZ(0)":""},gQ),n?{}:{margin:s.baseUnit/2,paddingBottom:s.baseUnit/2,paddingTop:s.baseUnit/2,color:a.neutral80})},cA={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},gQ={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":le({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},cA)},mQ=function(e){return le({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},cA)},OQ=function(e){var n=e.cx,r=e.value,i=eA(e),o=i.innerRef,s=i.isDisabled,a=i.isHidden,l=i.inputClassName,c=Tr(i,hQ);return Pe("div",Ae({},Ft(e,"input",{"input-container":!0}),{"data-value":r||""}),Pe("input",Ae({className:n({input:!0},l),ref:o,style:mQ(a),disabled:s},c)))},xQ=OQ,vQ=function(e,n){var r=e.theme,i=r.spacing,o=r.borderRadius,s=r.colors;return le({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:s.neutral10,borderRadius:o/2,margin:i.baseUnit/2})},yQ=function(e,n){var r=e.theme,i=r.borderRadius,o=r.colors,s=e.cropWithEllipsis;return le({overflow:"hidden",textOverflow:s||s===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:i/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},bQ=function(e,n){var r=e.theme,i=r.spacing,o=r.borderRadius,s=r.colors,a=e.isFocused;return le({alignItems:"center",display:"flex"},n?{}:{borderRadius:o/2,backgroundColor:a?s.dangerLight:void 0,paddingLeft:i.baseUnit,paddingRight:i.baseUnit,":hover":{backgroundColor:s.dangerLight,color:s.danger}})},uA=function(e){var n=e.children,r=e.innerProps;return Pe("div",r,n)},SQ=uA,wQ=uA;function CQ(t){var e=t.children,n=t.innerProps;return Pe("div",Ae({role:"button"},n),e||Pe(kO,{size:14}))}var kQ=function(e){var n=e.children,r=e.components,i=e.data,o=e.innerProps,s=e.isDisabled,a=e.removeProps,l=e.selectProps,c=r.Container,u=r.Label,f=r.Remove;return Pe(c,{data:i,innerProps:le(le({},Ft(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":s})),o),selectProps:l},Pe(u,{data:i,innerProps:le({},Ft(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},n),Pe(f,{data:i,innerProps:le(le({},Ft(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},a),selectProps:l}))},AQ=kQ,PQ=function(e,n){var r=e.isDisabled,i=e.isFocused,o=e.isSelected,s=e.theme,a=s.spacing,l=s.colors;return le({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:o?l.primary:i?l.primary25:"transparent",color:r?l.neutral20:o?l.neutral0:"inherit",padding:"".concat(a.baseUnit*2,"px ").concat(a.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:o?l.primary:l.primary50}})},EQ=function(e){var n=e.children,r=e.isDisabled,i=e.isFocused,o=e.isSelected,s=e.innerRef,a=e.innerProps;return Pe("div",Ae({},Ft(e,"option",{option:!0,"option--is-disabled":r,"option--is-focused":i,"option--is-selected":o}),{ref:s,"aria-disabled":r},a),n)},IQ=EQ,TQ=function(e,n){var r=e.theme,i=r.spacing,o=r.colors;return le({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:o.neutral50,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},$Q=function(e){var n=e.children,r=e.innerProps;return Pe("div",Ae({},Ft(e,"placeholder",{placeholder:!0}),r),n)},jQ=$Q,RQ=function(e,n){var r=e.isDisabled,i=e.theme,o=i.spacing,s=i.colors;return le({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?s.neutral40:s.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},DQ=function(e){var n=e.children,r=e.isDisabled,i=e.innerProps;return Pe("div",Ae({},Ft(e,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),i),n)},QQ=DQ,Bu={ClearIndicator:JD,Control:sQ,DropdownIndicator:UD,DownChevron:aA,CrossIcon:kO,Group:dQ,GroupHeading:fQ,IndicatorsContainer:zD,IndicatorSeparator:eQ,Input:xQ,LoadingIndicator:rQ,Menu:TD,MenuList:jD,MenuPortal:MD,LoadingMessage:BD,NoOptionsMessage:QD,MultiValue:AQ,MultiValueContainer:SQ,MultiValueLabel:wQ,MultiValueRemove:CQ,Option:IQ,Placeholder:jQ,SelectContainer:FD,SingleValue:QQ,ValueContainer:WD},BQ=function(e){return le(le({},Bu),e.components)},Gv=Number.isNaN||function(e){return typeof e=="number"&&e!==e};function _Q(t,e){return!!(t===e||Gv(t)&&Gv(e))}function MQ(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!_Q(t[n],e[n]))return!1;return!0}function NQ(t,e){e===void 0&&(e=MQ);var n=null;function r(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];if(n&&n.lastThis===this&&e(i,n.lastArgs))return n.lastResult;var s=t.apply(this,i);return n={lastResult:s,lastArgs:i,lastThis:this},s}return r.clear=function(){n=null},r}function FQ(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var ZQ=process.env.NODE_ENV==="production"?{name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"}:{name:"1f43avz-a11yText-A11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap;label:A11yText;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkExMXlUZXh0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFNSSIsImZpbGUiOiJBMTF5VGV4dC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKiogQGpzeCBqc3ggKi9cbmltcG9ydCB7IGpzeCB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLy8gQXNzaXN0aXZlIHRleHQgdG8gZGVzY3JpYmUgdmlzdWFsIGVsZW1lbnRzLiBIaWRkZW4gZm9yIHNpZ2h0ZWQgdXNlcnMuXG5jb25zdCBBMTF5VGV4dCA9IChwcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ10pID0+IChcbiAgPHNwYW5cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAnYTExeVRleHQnLFxuICAgICAgekluZGV4OiA5OTk5LFxuICAgICAgYm9yZGVyOiAwLFxuICAgICAgY2xpcDogJ3JlY3QoMXB4LCAxcHgsIDFweCwgMXB4KScsXG4gICAgICBoZWlnaHQ6IDEsXG4gICAgICB3aWR0aDogMSxcbiAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgb3ZlcmZsb3c6ICdoaWRkZW4nLFxuICAgICAgcGFkZGluZzogMCxcbiAgICAgIHdoaXRlU3BhY2U6ICdub3dyYXAnLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgQTExeVRleHQ7XG4iXX0= */",toString:FQ},WQ=function(e){return Pe("span",Ae({css:ZQ},e))},Yv=WQ,VQ={guidance:function(e){var n=e.isSearchable,r=e.isMulti,i=e.tabSelectsValue,o=e.context,s=e.isInitialFocus;switch(o){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(i?", press Tab to select the option and exit the menu":"",".");case"input":return s?"".concat(e["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var n=e.action,r=e.label,i=r===void 0?"":r,o=e.labels,s=e.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(i,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(o.length>1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return s?"option ".concat(i," is disabled. Select another option."):"option ".concat(i,", selected.");default:return""}},onFocus:function(e){var n=e.context,r=e.focused,i=e.options,o=e.label,s=o===void 0?"":o,a=e.selectValue,l=e.isDisabled,c=e.isSelected,u=e.isAppleDevice,f=function(O,m){return O&&O.length?"".concat(O.indexOf(m)+1," of ").concat(O.length):""};if(n==="value"&&a)return"value ".concat(s," focused, ").concat(f(a,r),".");if(n==="menu"&&u){var d=l?" disabled":"",h="".concat(c?" selected":"").concat(d);return"".concat(s).concat(h,", ").concat(f(i,r),".")}return""},onFilter:function(e){var n=e.inputValue,r=e.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},zQ=function(e){var n=e.ariaSelection,r=e.focusedOption,i=e.focusedValue,o=e.focusableOptions,s=e.isFocused,a=e.selectValue,l=e.selectProps,c=e.id,u=e.isAppleDevice,f=l.ariaLiveMessages,d=l.getOptionLabel,h=l.inputValue,p=l.isMulti,O=l.isOptionDisabled,m=l.isSearchable,x=l.menuIsOpen,v=l.options,y=l.screenReaderStatus,S=l.tabSelectsValue,b=l.isLoading,w=l["aria-label"],C=l["aria-live"],k=j.useMemo(function(){return le(le({},VQ),f||{})},[f]),I=j.useMemo(function(){var Q="";if(n&&k.onChange){var Z=n.option,G=n.options,V=n.removedValue,ee=n.removedValues,Y=n.value,z=function(L){return Array.isArray(L)?null:L},D=V||Z||z(Y),B=D?d(D):"",N=G||ee||void 0,U=N?N.map(d):[],F=le({isDisabled:D&&O(D,a),label:B,labels:U},n);Q=k.onChange(F)}return Q},[n,k,O,a,d]),A=j.useMemo(function(){var Q="",Z=r||i,G=!!(r&&a&&a.includes(r));if(Z&&k.onFocus){var V={focused:Z,label:d(Z),isDisabled:O(Z,a),isSelected:G,options:o,context:Z===r?"menu":"value",selectValue:a,isAppleDevice:u};Q=k.onFocus(V)}return Q},[r,i,d,O,k,o,a,u]),E=j.useMemo(function(){var Q="";if(x&&v.length&&!b&&k.onFilter){var Z=y({count:o.length});Q=k.onFilter({inputValue:h,resultsMessage:Z})}return Q},[o,h,x,k,v,y,b]),$=(n==null?void 0:n.action)==="initial-input-focus",R=j.useMemo(function(){var Q="";if(k.guidance){var Z=i?"value":x?"menu":"input";Q=k.guidance({"aria-label":w,context:Z,isDisabled:r&&O(r,a),isMulti:p,isSearchable:m,tabSelectsValue:S,isInitialFocus:$})}return Q},[w,r,i,p,O,m,x,k,a,S,$]),M=Pe(j.Fragment,null,Pe("span",{id:"aria-selection"},I),Pe("span",{id:"aria-focused"},A),Pe("span",{id:"aria-results"},E),Pe("span",{id:"aria-guidance"},R));return Pe(j.Fragment,null,Pe(Yv,{id:c},$&&M),Pe(Yv,{"aria-live":C,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},s&&!$&&M))},LQ=zQ,Ug=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],XQ=new RegExp("["+Ug.map(function(t){return t.letters}).join("")+"]","g"),fA={};for(var _h=0;_h<Ug.length;_h++)for(var Mh=Ug[_h],Nh=0;Nh<Mh.letters.length;Nh++)fA[Mh.letters[Nh]]=Mh.base;var dA=function(e){return e.replace(XQ,function(n){return fA[n]})},GQ=NQ(dA),qv=function(e){return e.replace(/^\s+|\s+$/g,"")},YQ=function(e){return"".concat(e.label," ").concat(e.value)},qQ=function(e){return function(n,r){if(n.data.__isNew__)return!0;var i=le({ignoreCase:!0,ignoreAccents:!0,stringify:YQ,trim:!0,matchFrom:"any"},e),o=i.ignoreCase,s=i.ignoreAccents,a=i.stringify,l=i.trim,c=i.matchFrom,u=l?qv(r):r,f=l?qv(a(n)):a(n);return o&&(u=u.toLowerCase(),f=f.toLowerCase()),s&&(u=GQ(u),f=dA(f)),c==="start"?f.substr(0,u.length)===u:f.indexOf(u)>-1}},UQ=["innerRef"];function HQ(t){var e=t.innerRef,n=Tr(t,UQ),r=SD(n,"onExited","in","enter","exit","appear");return Pe("input",Ae({ref:e},r,{css:bO({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},process.env.NODE_ENV==="production"?"":";label:DummyInput;",process.env.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkR1bW15SW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCTSIsImZpbGUiOiJEdW1teUlucHV0LnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgUmVmIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsganN4IH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgcmVtb3ZlUHJvcHMgfSBmcm9tICcuLi91dGlscyc7XG5cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIER1bW15SW5wdXQoe1xuICBpbm5lclJlZixcbiAgLi4ucHJvcHNcbn06IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snaW5wdXQnXSAmIHtcbiAgcmVhZG9ubHkgaW5uZXJSZWY6IFJlZjxIVE1MSW5wdXRFbGVtZW50Pjtcbn0pIHtcbiAgLy8gUmVtb3ZlIGFuaW1hdGlvbiBwcm9wcyBub3QgbWVhbnQgZm9yIEhUTUwgZWxlbWVudHNcbiAgY29uc3QgZmlsdGVyZWRQcm9wcyA9IHJlbW92ZVByb3BzKFxuICAgIHByb3BzLFxuICAgICdvbkV4aXRlZCcsXG4gICAgJ2luJyxcbiAgICAnZW50ZXInLFxuICAgICdleGl0JyxcbiAgICAnYXBwZWFyJ1xuICApO1xuXG4gIHJldHVybiAoXG4gICAgPGlucHV0XG4gICAgICByZWY9e2lubmVyUmVmfVxuICAgICAgey4uLmZpbHRlcmVkUHJvcHN9XG4gICAgICBjc3M9e3tcbiAgICAgICAgbGFiZWw6ICdkdW1teUlucHV0JyxcbiAgICAgICAgLy8gZ2V0IHJpZCBvZiBhbnkgZGVmYXVsdCBzdHlsZXNcbiAgICAgICAgYmFja2dyb3VuZDogMCxcbiAgICAgICAgYm9yZGVyOiAwLFxuICAgICAgICAvLyBpbXBvcnRhbnQhIHRoaXMgaGlkZXMgdGhlIGZsYXNoaW5nIGN1cnNvclxuICAgICAgICBjYXJldENvbG9yOiAndHJhbnNwYXJlbnQnLFxuICAgICAgICBmb250U2l6ZTogJ2luaGVyaXQnLFxuICAgICAgICBncmlkQXJlYTogJzEgLyAxIC8gMiAvIDMnLFxuICAgICAgICBvdXRsaW5lOiAwLFxuICAgICAgICBwYWRkaW5nOiAwLFxuICAgICAgICAvLyBpbXBvcnRhbnQhIHdpdGhvdXQgYHdpZHRoYCBicm93c2VycyB3b24ndCBhbGxvdyBmb2N1c1xuICAgICAgICB3aWR0aDogMSxcblxuICAgICAgICAvLyByZW1vdmUgY3Vyc29yIG9uIGRlc2t0b3BcbiAgICAgICAgY29sb3I6ICd0cmFuc3BhcmVudCcsXG5cbiAgICAgICAgLy8gcmVtb3ZlIGN1cnNvciBvbiBtb2JpbGUgd2hpbHN0IG1haW50YWluaW5nIFwic2Nyb2xsIGludG8gdmlld1wiIGJlaGF2aW91clxuICAgICAgICBsZWZ0OiAtMTAwLFxuICAgICAgICBvcGFjaXR5OiAwLFxuICAgICAgICBwb3NpdGlvbjogJ3JlbGF0aXZlJyxcbiAgICAgICAgdHJhbnNmb3JtOiAnc2NhbGUoLjAxKScsXG4gICAgICB9fVxuICAgIC8+XG4gICk7XG59XG4iXX0= */")}))}var JQ=function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()};function KQ(t){var e=t.isEnabled,n=t.onBottomArrive,r=t.onBottomLeave,i=t.onTopArrive,o=t.onTopLeave,s=j.useRef(!1),a=j.useRef(!1),l=j.useRef(0),c=j.useRef(null),u=j.useCallback(function(m,x){if(c.current!==null){var v=c.current,y=v.scrollTop,S=v.scrollHeight,b=v.clientHeight,w=c.current,C=x>0,k=S-b-y,I=!1;k>x&&s.current&&(r&&r(m),s.current=!1),C&&a.current&&(o&&o(m),a.current=!1),C&&x>k?(n&&!s.current&&n(m),w.scrollTop=S,I=!0,s.current=!0):!C&&-x>y&&(i&&!a.current&&i(m),w.scrollTop=0,I=!0,a.current=!0),I&&JQ(m)}},[n,r,i,o]),f=j.useCallback(function(m){u(m,m.deltaY)},[u]),d=j.useCallback(function(m){l.current=m.changedTouches[0].clientY},[]),h=j.useCallback(function(m){var x=l.current-m.changedTouches[0].clientY;u(m,x)},[u]),p=j.useCallback(function(m){if(m){var x=vD?{passive:!1}:!1;m.addEventListener("wheel",f,x),m.addEventListener("touchstart",d,x),m.addEventListener("touchmove",h,x)}},[h,d,f]),O=j.useCallback(function(m){m&&(m.removeEventListener("wheel",f,!1),m.removeEventListener("touchstart",d,!1),m.removeEventListener("touchmove",h,!1))},[h,d,f]);return j.useEffect(function(){if(e){var m=c.current;return p(m),function(){O(m)}}},[e,p,O]),function(m){c.current=m}}var Uv=["boxSizing","height","overflow","paddingRight","position"],Hv={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Jv(t){t.preventDefault()}function Kv(t){t.stopPropagation()}function ey(){var t=this.scrollTop,e=this.scrollHeight,n=t+this.offsetHeight;t===0?this.scrollTop=1:n===e&&(this.scrollTop=t-1)}function ty(){return"ontouchstart"in window||navigator.maxTouchPoints}var ny=!!(typeof window<"u"&&window.document&&window.document.createElement),Ga=0,Os={capture:!1,passive:!1};function e3(t){var e=t.isEnabled,n=t.accountForScrollbars,r=n===void 0?!0:n,i=j.useRef({}),o=j.useRef(null),s=j.useCallback(function(l){if(ny){var c=document.body,u=c&&c.style;if(r&&Uv.forEach(function(p){var O=u&&u[p];i.current[p]=O}),r&&Ga<1){var f=parseInt(i.current.paddingRight,10)||0,d=document.body?document.body.clientWidth:0,h=window.innerWidth-d+f||0;Object.keys(Hv).forEach(function(p){var O=Hv[p];u&&(u[p]=O)}),u&&(u.paddingRight="".concat(h,"px"))}c&&ty()&&(c.addEventListener("touchmove",Jv,Os),l&&(l.addEventListener("touchstart",ey,Os),l.addEventListener("touchmove",Kv,Os))),Ga+=1}},[r]),a=j.useCallback(function(l){if(ny){var c=document.body,u=c&&c.style;Ga=Math.max(Ga-1,0),r&&Ga<1&&Uv.forEach(function(f){var d=i.current[f];u&&(u[f]=d)}),c&&ty()&&(c.removeEventListener("touchmove",Jv,Os),l&&(l.removeEventListener("touchstart",ey,Os),l.removeEventListener("touchmove",Kv,Os)))}},[r]);return j.useEffect(function(){if(e){var l=o.current;return s(l),function(){a(l)}}},[e,s,a]),function(l){o.current=l}}function t3(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var n3=function(e){var n=e.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},r3=process.env.NODE_ENV==="production"?{name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"}:{name:"bp8cua-ScrollManager",styles:"position:fixed;left:0;bottom:0;right:0;top:0;label:ScrollManager;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlNjcm9sbE1hbmFnZXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW9EVSIsImZpbGUiOiJTY3JvbGxNYW5hZ2VyLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsganN4IH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgRnJhZ21lbnQsIFJlYWN0RWxlbWVudCwgUmVmQ2FsbGJhY2ssIE1vdXNlRXZlbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgdXNlU2Nyb2xsQ2FwdHVyZSBmcm9tICcuL3VzZVNjcm9sbENhcHR1cmUnO1xuaW1wb3J0IHVzZVNjcm9sbExvY2sgZnJvbSAnLi91c2VTY3JvbGxMb2NrJztcblxuaW50ZXJmYWNlIFByb3BzIHtcbiAgcmVhZG9ubHkgY2hpbGRyZW46IChyZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PikgPT4gUmVhY3RFbGVtZW50O1xuICByZWFkb25seSBsb2NrRW5hYmxlZDogYm9vbGVhbjtcbiAgcmVhZG9ubHkgY2FwdHVyZUVuYWJsZWQ6IGJvb2xlYW47XG4gIHJlYWRvbmx5IG9uQm90dG9tQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Cb3R0b21MZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG4gIHJlYWRvbmx5IG9uVG9wQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Ub3BMZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG59XG5cbmNvbnN0IGJsdXJTZWxlY3RJbnB1dCA9IChldmVudDogTW91c2VFdmVudDxIVE1MRGl2RWxlbWVudD4pID0+IHtcbiAgY29uc3QgZWxlbWVudCA9IGV2ZW50LnRhcmdldCBhcyBIVE1MRGl2RWxlbWVudDtcbiAgcmV0dXJuIChcbiAgICBlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCAmJlxuICAgIChlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCBhcyBIVE1MRWxlbWVudCkuYmx1cigpXG4gICk7XG59O1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBTY3JvbGxNYW5hZ2VyKHtcbiAgY2hpbGRyZW4sXG4gIGxvY2tFbmFibGVkLFxuICBjYXB0dXJlRW5hYmxlZCA9IHRydWUsXG4gIG9uQm90dG9tQXJyaXZlLFxuICBvbkJvdHRvbUxlYXZlLFxuICBvblRvcEFycml2ZSxcbiAgb25Ub3BMZWF2ZSxcbn06IFByb3BzKSB7XG4gIGNvbnN0IHNldFNjcm9sbENhcHR1cmVUYXJnZXQgPSB1c2VTY3JvbGxDYXB0dXJlKHtcbiAgICBpc0VuYWJsZWQ6IGNhcHR1cmVFbmFibGVkLFxuICAgIG9uQm90dG9tQXJyaXZlLFxuICAgIG9uQm90dG9tTGVhdmUsXG4gICAgb25Ub3BBcnJpdmUsXG4gICAgb25Ub3BMZWF2ZSxcbiAgfSk7XG4gIGNvbnN0IHNldFNjcm9sbExvY2tUYXJnZXQgPSB1c2VTY3JvbGxMb2NrKHsgaXNFbmFibGVkOiBsb2NrRW5hYmxlZCB9KTtcblxuICBjb25zdCB0YXJnZXRSZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PiA9IChlbGVtZW50KSA9PiB7XG4gICAgc2V0U2Nyb2xsQ2FwdHVyZVRhcmdldChlbGVtZW50KTtcbiAgICBzZXRTY3JvbGxMb2NrVGFyZ2V0KGVsZW1lbnQpO1xuICB9O1xuXG4gIHJldHVybiAoXG4gICAgPEZyYWdtZW50PlxuICAgICAge2xvY2tFbmFibGVkICYmIChcbiAgICAgICAgPGRpdlxuICAgICAgICAgIG9uQ2xpY2s9e2JsdXJTZWxlY3RJbnB1dH1cbiAgICAgICAgICBjc3M9e3sgcG9zaXRpb246ICdmaXhlZCcsIGxlZnQ6IDAsIGJvdHRvbTogMCwgcmlnaHQ6IDAsIHRvcDogMCB9fVxuICAgICAgICAvPlxuICAgICAgKX1cbiAgICAgIHtjaGlsZHJlbih0YXJnZXRSZWYpfVxuICAgIDwvRnJhZ21lbnQ+XG4gICk7XG59XG4iXX0= */",toString:t3};function i3(t){var e=t.children,n=t.lockEnabled,r=t.captureEnabled,i=r===void 0?!0:r,o=t.onBottomArrive,s=t.onBottomLeave,a=t.onTopArrive,l=t.onTopLeave,c=KQ({isEnabled:i,onBottomArrive:o,onBottomLeave:s,onTopArrive:a,onTopLeave:l}),u=e3({isEnabled:n}),f=function(h){c(h),u(h)};return Pe(j.Fragment,null,n&&Pe("div",{onClick:n3,css:r3}),e(f))}function o3(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var s3=process.env.NODE_ENV==="production"?{name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"}:{name:"5kkxb2-requiredInput-RequiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%;label:RequiredInput;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlJlcXVpcmVkSW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWNJIiwiZmlsZSI6IlJlcXVpcmVkSW5wdXQudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqIEBqc3gganN4ICovXG5pbXBvcnQgeyBGb2N1c0V2ZW50SGFuZGxlciwgRnVuY3Rpb25Db21wb25lbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmNvbnN0IFJlcXVpcmVkSW5wdXQ6IEZ1bmN0aW9uQ29tcG9uZW50PHtcbiAgcmVhZG9ubHkgbmFtZT86IHN0cmluZztcbiAgcmVhZG9ubHkgb25Gb2N1czogRm9jdXNFdmVudEhhbmRsZXI8SFRNTElucHV0RWxlbWVudD47XG59PiA9ICh7IG5hbWUsIG9uRm9jdXMgfSkgPT4gKFxuICA8aW5wdXRcbiAgICByZXF1aXJlZFxuICAgIG5hbWU9e25hbWV9XG4gICAgdGFiSW5kZXg9ey0xfVxuICAgIGFyaWEtaGlkZGVuPVwidHJ1ZVwiXG4gICAgb25Gb2N1cz17b25Gb2N1c31cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAncmVxdWlyZWRJbnB1dCcsXG4gICAgICBvcGFjaXR5OiAwLFxuICAgICAgcG9pbnRlckV2ZW50czogJ25vbmUnLFxuICAgICAgcG9zaXRpb246ICdhYnNvbHV0ZScsXG4gICAgICBib3R0b206IDAsXG4gICAgICBsZWZ0OiAwLFxuICAgICAgcmlnaHQ6IDAsXG4gICAgICB3aWR0aDogJzEwMCUnLFxuICAgIH19XG4gICAgLy8gUHJldmVudCBgU3dpdGNoaW5nIGZyb20gdW5jb250cm9sbGVkIHRvIGNvbnRyb2xsZWRgIGVycm9yXG4gICAgdmFsdWU9XCJcIlxuICAgIG9uQ2hhbmdlPXsoKSA9PiB7fX1cbiAgLz5cbik7XG5cbmV4cG9ydCBkZWZhdWx0IFJlcXVpcmVkSW5wdXQ7XG4iXX0= */",toString:o3},a3=function(e){var n=e.name,r=e.onFocus;return Pe("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:s3,value:"",onChange:function(){}})},l3=a3;function AO(t){var e;return typeof window<"u"&&window.navigator!=null?t.test(((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.platform)||window.navigator.platform):!1}function c3(){return AO(/^iPhone/i)}function hA(){return AO(/^Mac/i)}function u3(){return AO(/^iPad/i)||hA()&&navigator.maxTouchPoints>1}function f3(){return c3()||u3()}function d3(){return hA()||f3()}var h3=function(e){return e.label},p3=function(e){return e.label},g3=function(e){return e.value},m3=function(e){return!!e.isDisabled},O3={clearIndicator:HD,container:ND,control:iQ,dropdownIndicator:qD,group:lQ,groupHeading:uQ,indicatorsContainer:VD,indicatorSeparator:KD,input:pQ,loadingIndicator:nQ,loadingMessage:DD,menu:PD,menuList:$D,menuPortal:_D,multiValue:vQ,multiValueLabel:yQ,multiValueRemove:bQ,noOptionsMessage:RD,option:PQ,placeholder:TQ,singleValue:RQ,valueContainer:ZD},x3={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},v3=4,pA=4,y3=38,b3=pA*2,S3={baseUnit:pA,controlHeight:y3,menuGutter:b3},Fh={borderRadius:v3,colors:x3,spacing:S3},w3={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Lv(),captureMenuScroll:!Lv(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:qQ(),formatGroupLabel:h3,getOptionLabel:p3,getOptionValue:g3,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:m3,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!OD(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var n=e.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function ry(t,e,n,r){var i=OA(t,e,n),o=xA(t,e,n),s=mA(t,e),a=mf(t,e);return{type:"option",data:e,isDisabled:i,isSelected:o,label:s,value:a,index:r}}function _u(t,e){return t.options.map(function(n,r){if("options"in n){var i=n.options.map(function(s,a){return ry(t,s,e,a)}).filter(function(s){return oy(t,s)});return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var o=ry(t,n,e,r);return oy(t,o)?o:void 0}).filter(yD)}function gA(t){return t.reduce(function(e,n){return n.type==="group"?e.push.apply(e,na(n.options.map(function(r){return r.data}))):e.push(n.data),e},[])}function iy(t,e){return t.reduce(function(n,r){return r.type==="group"?n.push.apply(n,na(r.options.map(function(i){return{data:i.data,id:"".concat(e,"-").concat(r.index,"-").concat(i.index)}}))):n.push({data:r.data,id:"".concat(e,"-").concat(r.index)}),n},[])}function C3(t,e){return gA(_u(t,e))}function oy(t,e){var n=t.inputValue,r=n===void 0?"":n,i=e.data,o=e.isSelected,s=e.label,a=e.value;return(!yA(t)||!o)&&vA(t,{label:s,value:a,data:i},r)}function k3(t,e){var n=t.focusedValue,r=t.selectValue,i=r.indexOf(n);if(i>-1){var o=e.indexOf(n);if(o>-1)return n;if(i<e.length)return e[i]}return null}function A3(t,e){var n=t.focusedOption;return n&&e.indexOf(n)>-1?n:e[0]}var Zh=function(e,n){var r,i=(r=e.find(function(o){return o.data===n}))===null||r===void 0?void 0:r.id;return i||null},mA=function(e,n){return e.getOptionLabel(n)},mf=function(e,n){return e.getOptionValue(n)};function OA(t,e,n){return typeof t.isOptionDisabled=="function"?t.isOptionDisabled(e,n):!1}function xA(t,e,n){if(n.indexOf(e)>-1)return!0;if(typeof t.isOptionSelected=="function")return t.isOptionSelected(e,n);var r=mf(t,e);return n.some(function(i){return mf(t,i)===r})}function vA(t,e,n){return t.filterOption?t.filterOption(e,n):!0}var yA=function(e){var n=e.hideSelectedOptions,r=e.isMulti;return n===void 0?r:n},P3=1,bA=function(t){kd(n,t);var e=Ad(n);function n(r){var i;if(wd(this,n),i=e.call(this,r),i.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},i.blockOptionHover=!1,i.isComposing=!1,i.commonProps=void 0,i.initialTouchX=0,i.initialTouchY=0,i.openAfterFocus=!1,i.scrollToFocusedOptionOnUpdate=!1,i.userIsDragging=void 0,i.isAppleDevice=d3(),i.controlRef=null,i.getControlRef=function(l){i.controlRef=l},i.focusedOptionRef=null,i.getFocusedOptionRef=function(l){i.focusedOptionRef=l},i.menuListRef=null,i.getMenuListRef=function(l){i.menuListRef=l},i.inputRef=null,i.getInputRef=function(l){i.inputRef=l},i.focus=i.focusInput,i.blur=i.blurInput,i.onChange=function(l,c){var u=i.props,f=u.onChange,d=u.name;c.name=d,i.ariaOnChange(l,c),f(l,c)},i.setValue=function(l,c,u){var f=i.props,d=f.closeMenuOnSelect,h=f.isMulti,p=f.inputValue;i.onInputChange("",{action:"set-value",prevInputValue:p}),d&&(i.setState({inputIsHiddenAfterUpdate:!h}),i.onMenuClose()),i.setState({clearFocusValueOnUpdate:!0}),i.onChange(l,{action:c,option:u})},i.selectOption=function(l){var c=i.props,u=c.blurInputOnSelect,f=c.isMulti,d=c.name,h=i.state.selectValue,p=f&&i.isOptionSelected(l,h),O=i.isOptionDisabled(l,h);if(p){var m=i.getOptionValue(l);i.setValue(h.filter(function(x){return i.getOptionValue(x)!==m}),"deselect-option",l)}else if(!O)f?i.setValue([].concat(na(h),[l]),"select-option",l):i.setValue(l,"select-option");else{i.ariaOnChange(l,{action:"select-option",option:l,name:d});return}u&&i.blurInput()},i.removeValue=function(l){var c=i.props.isMulti,u=i.state.selectValue,f=i.getOptionValue(l),d=u.filter(function(p){return i.getOptionValue(p)!==f}),h=Gc(c,d,d[0]||null);i.onChange(h,{action:"remove-value",removedValue:l}),i.focusInput()},i.clearValue=function(){var l=i.state.selectValue;i.onChange(Gc(i.props.isMulti,[],null),{action:"clear",removedValues:l})},i.popValue=function(){var l=i.props.isMulti,c=i.state.selectValue,u=c[c.length-1],f=c.slice(0,c.length-1),d=Gc(l,f,f[0]||null);u&&i.onChange(d,{action:"pop-value",removedValue:u})},i.getFocusedOptionId=function(l){return Zh(i.state.focusableOptionsWithIds,l)},i.getFocusableOptionsWithIds=function(){return iy(_u(i.props,i.state.selectValue),i.getElementId("option"))},i.getValue=function(){return i.state.selectValue},i.cx=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];return dD.apply(void 0,[i.props.classNamePrefix].concat(c))},i.getOptionLabel=function(l){return mA(i.props,l)},i.getOptionValue=function(l){return mf(i.props,l)},i.getStyles=function(l,c){var u=i.props.unstyled,f=O3[l](c,u);f.boxSizing="border-box";var d=i.props.styles[l];return d?d(f,c):f},i.getClassNames=function(l,c){var u,f;return(u=(f=i.props.classNames)[l])===null||u===void 0?void 0:u.call(f,c)},i.getElementId=function(l){return"".concat(i.state.instancePrefix,"-").concat(l)},i.getComponents=function(){return BQ(i.props)},i.buildCategorizedOptions=function(){return _u(i.props,i.state.selectValue)},i.getCategorizedOptions=function(){return i.props.menuIsOpen?i.buildCategorizedOptions():[]},i.buildFocusableOptions=function(){return gA(i.buildCategorizedOptions())},i.getFocusableOptions=function(){return i.props.menuIsOpen?i.buildFocusableOptions():[]},i.ariaOnChange=function(l,c){i.setState({ariaSelection:le({value:l},c)})},i.onMenuMouseDown=function(l){l.button===0&&(l.stopPropagation(),l.preventDefault(),i.focusInput())},i.onMenuMouseMove=function(l){i.blockOptionHover=!1},i.onControlMouseDown=function(l){if(!l.defaultPrevented){var c=i.props.openMenuOnClick;i.state.isFocused?i.props.menuIsOpen?l.target.tagName!=="INPUT"&&l.target.tagName!=="TEXTAREA"&&i.onMenuClose():c&&i.openMenu("first"):(c&&(i.openAfterFocus=!0),i.focusInput()),l.target.tagName!=="INPUT"&&l.target.tagName!=="TEXTAREA"&&l.preventDefault()}},i.onDropdownIndicatorMouseDown=function(l){if(!(l&&l.type==="mousedown"&&l.button!==0)&&!i.props.isDisabled){var c=i.props,u=c.isMulti,f=c.menuIsOpen;i.focusInput(),f?(i.setState({inputIsHiddenAfterUpdate:!u}),i.onMenuClose()):i.openMenu("first"),l.preventDefault()}},i.onClearIndicatorMouseDown=function(l){l&&l.type==="mousedown"&&l.button!==0||(i.clearValue(),l.preventDefault(),i.openAfterFocus=!1,l.type==="touchend"?i.focusInput():setTimeout(function(){return i.focusInput()}))},i.onScroll=function(l){typeof i.props.closeMenuOnScroll=="boolean"?l.target instanceof HTMLElement&&$d(l.target)&&i.props.onMenuClose():typeof i.props.closeMenuOnScroll=="function"&&i.props.closeMenuOnScroll(l)&&i.props.onMenuClose()},i.onCompositionStart=function(){i.isComposing=!0},i.onCompositionEnd=function(){i.isComposing=!1},i.onTouchStart=function(l){var c=l.touches,u=c&&c.item(0);u&&(i.initialTouchX=u.clientX,i.initialTouchY=u.clientY,i.userIsDragging=!1)},i.onTouchMove=function(l){var c=l.touches,u=c&&c.item(0);if(u){var f=Math.abs(u.clientX-i.initialTouchX),d=Math.abs(u.clientY-i.initialTouchY),h=5;i.userIsDragging=f>h||d>h}},i.onTouchEnd=function(l){i.userIsDragging||(i.controlRef&&!i.controlRef.contains(l.target)&&i.menuListRef&&!i.menuListRef.contains(l.target)&&i.blurInput(),i.initialTouchX=0,i.initialTouchY=0)},i.onControlTouchEnd=function(l){i.userIsDragging||i.onControlMouseDown(l)},i.onClearIndicatorTouchEnd=function(l){i.userIsDragging||i.onClearIndicatorMouseDown(l)},i.onDropdownIndicatorTouchEnd=function(l){i.userIsDragging||i.onDropdownIndicatorMouseDown(l)},i.handleInputChange=function(l){var c=i.props.inputValue,u=l.currentTarget.value;i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange(u,{action:"input-change",prevInputValue:c}),i.props.menuIsOpen||i.onMenuOpen()},i.onInputFocus=function(l){i.props.onFocus&&i.props.onFocus(l),i.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(i.openAfterFocus||i.props.openMenuOnFocus)&&i.openMenu("first"),i.openAfterFocus=!1},i.onInputBlur=function(l){var c=i.props.inputValue;if(i.menuListRef&&i.menuListRef.contains(document.activeElement)){i.inputRef.focus();return}i.props.onBlur&&i.props.onBlur(l),i.onInputChange("",{action:"input-blur",prevInputValue:c}),i.onMenuClose(),i.setState({focusedValue:null,isFocused:!1})},i.onOptionHover=function(l){if(!(i.blockOptionHover||i.state.focusedOption===l)){var c=i.getFocusableOptions(),u=c.indexOf(l);i.setState({focusedOption:l,focusedOptionId:u>-1?i.getFocusedOptionId(l):null})}},i.shouldHideSelectedOptions=function(){return yA(i.props)},i.onValueInputFocus=function(l){l.preventDefault(),l.stopPropagation(),i.focus()},i.onKeyDown=function(l){var c=i.props,u=c.isMulti,f=c.backspaceRemovesValue,d=c.escapeClearsValue,h=c.inputValue,p=c.isClearable,O=c.isDisabled,m=c.menuIsOpen,x=c.onKeyDown,v=c.tabSelectsValue,y=c.openMenuOnFocus,S=i.state,b=S.focusedOption,w=S.focusedValue,C=S.selectValue;if(!O&&!(typeof x=="function"&&(x(l),l.defaultPrevented))){switch(i.blockOptionHover=!0,l.key){case"ArrowLeft":if(!u||h)return;i.focusValue("previous");break;case"ArrowRight":if(!u||h)return;i.focusValue("next");break;case"Delete":case"Backspace":if(h)return;if(w)i.removeValue(w);else{if(!f)return;u?i.popValue():p&&i.clearValue()}break;case"Tab":if(i.isComposing||l.shiftKey||!m||!v||!b||y&&i.isOptionSelected(b,C))return;i.selectOption(b);break;case"Enter":if(l.keyCode===229)break;if(m){if(!b||i.isComposing)return;i.selectOption(b);break}return;case"Escape":m?(i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange("",{action:"menu-close",prevInputValue:h}),i.onMenuClose()):p&&d&&i.clearValue();break;case" ":if(h)return;if(!m){i.openMenu("first");break}if(!b)return;i.selectOption(b);break;case"ArrowUp":m?i.focusOption("up"):i.openMenu("last");break;case"ArrowDown":m?i.focusOption("down"):i.openMenu("first");break;case"PageUp":if(!m)return;i.focusOption("pageup");break;case"PageDown":if(!m)return;i.focusOption("pagedown");break;case"Home":if(!m)return;i.focusOption("first");break;case"End":if(!m)return;i.focusOption("last");break;default:return}l.preventDefault()}},i.state.instancePrefix="react-select-"+(i.props.instanceId||++P3),i.state.selectValue=Vv(r.value),r.menuIsOpen&&i.state.selectValue.length){var o=i.getFocusableOptionsWithIds(),s=i.buildFocusableOptions(),a=s.indexOf(i.state.selectValue[0]);i.state.focusableOptionsWithIds=o,i.state.focusedOption=s[a],i.state.focusedOptionId=Zh(o,s[a])}return i}return Cd(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&zv(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(i){var o=this.props,s=o.isDisabled,a=o.menuIsOpen,l=this.state.isFocused;(l&&!s&&i.isDisabled||l&&a&&!i.menuIsOpen)&&this.focusInput(),l&&s&&!i.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!l&&!s&&i.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(zv(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(i,o){this.props.onInputChange(i,o)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(i){var o=this,s=this.state,a=s.selectValue,l=s.isFocused,c=this.buildFocusableOptions(),u=i==="first"?0:c.length-1;if(!this.props.isMulti){var f=c.indexOf(a[0]);f>-1&&(u=f)}this.scrollToFocusedOptionOnUpdate=!(l&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:c[u],focusedOptionId:this.getFocusedOptionId(c[u])},function(){return o.onMenuOpen()})}},{key:"focusValue",value:function(i){var o=this.state,s=o.selectValue,a=o.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var l=s.indexOf(a);a||(l=-1);var c=s.length-1,u=-1;if(s.length){switch(i){case"previous":l===0?u=0:l===-1?u=c:u=l-1;break;case"next":l>-1&&l<c&&(u=l+1);break}this.setState({inputIsHidden:u!==-1,focusedValue:s[u]})}}}},{key:"focusOption",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",o=this.props.pageSize,s=this.state.focusedOption,a=this.getFocusableOptions();if(a.length){var l=0,c=a.indexOf(s);s||(c=-1),i==="up"?l=c>0?c-1:a.length-1:i==="down"?l=(c+1)%a.length:i==="pageup"?(l=c-o,l<0&&(l=0)):i==="pagedown"?(l=c+o,l>a.length-1&&(l=a.length-1)):i==="last"&&(l=a.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:a[l],focusedValue:null,focusedOptionId:this.getFocusedOptionId(a[l])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(Fh):le(le({},Fh),this.props.theme):Fh}},{key:"getCommonProps",value:function(){var i=this.clearValue,o=this.cx,s=this.getStyles,a=this.getClassNames,l=this.getValue,c=this.selectOption,u=this.setValue,f=this.props,d=f.isMulti,h=f.isRtl,p=f.options,O=this.hasValue();return{clearValue:i,cx:o,getStyles:s,getClassNames:a,getValue:l,hasValue:O,isMulti:d,isRtl:h,options:p,selectOption:c,selectProps:f,setValue:u,theme:this.getTheme()}}},{key:"hasValue",value:function(){var i=this.state.selectValue;return i.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var i=this.props,o=i.isClearable,s=i.isMulti;return o===void 0?s:o}},{key:"isOptionDisabled",value:function(i,o){return OA(this.props,i,o)}},{key:"isOptionSelected",value:function(i,o){return xA(this.props,i,o)}},{key:"filterOption",value:function(i,o){return vA(this.props,i,o)}},{key:"formatOptionLabel",value:function(i,o){if(typeof this.props.formatOptionLabel=="function"){var s=this.props.inputValue,a=this.state.selectValue;return this.props.formatOptionLabel(i,{context:o,inputValue:s,selectValue:a})}else return this.getOptionLabel(i)}},{key:"formatGroupLabel",value:function(i){return this.props.formatGroupLabel(i)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var i=this.props,o=i.isDisabled,s=i.isSearchable,a=i.inputId,l=i.inputValue,c=i.tabIndex,u=i.form,f=i.menuIsOpen,d=i.required,h=this.getComponents(),p=h.Input,O=this.state,m=O.inputIsHidden,x=O.ariaSelection,v=this.commonProps,y=a||this.getElementId("input"),S=le(le(le({"aria-autocomplete":"list","aria-expanded":f,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":d,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},f&&{"aria-controls":this.getElementId("listbox")}),!s&&{"aria-readonly":!0}),this.hasValue()?(x==null?void 0:x.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return s?X.createElement(p,Ae({},v,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:y,innerRef:this.getInputRef,isDisabled:o,isHidden:m,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:c,form:u,type:"text",value:l},S)):X.createElement(HQ,Ae({id:y,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:pf,onFocus:this.onInputFocus,disabled:o,tabIndex:c,inputMode:"none",form:u,value:""},S))}},{key:"renderPlaceholderOrValue",value:function(){var i=this,o=this.getComponents(),s=o.MultiValue,a=o.MultiValueContainer,l=o.MultiValueLabel,c=o.MultiValueRemove,u=o.SingleValue,f=o.Placeholder,d=this.commonProps,h=this.props,p=h.controlShouldRenderValue,O=h.isDisabled,m=h.isMulti,x=h.inputValue,v=h.placeholder,y=this.state,S=y.selectValue,b=y.focusedValue,w=y.isFocused;if(!this.hasValue()||!p)return x?null:X.createElement(f,Ae({},d,{key:"placeholder",isDisabled:O,isFocused:w,innerProps:{id:this.getElementId("placeholder")}}),v);if(m)return S.map(function(k,I){var A=k===b,E="".concat(i.getOptionLabel(k),"-").concat(i.getOptionValue(k));return X.createElement(s,Ae({},d,{components:{Container:a,Label:l,Remove:c},isFocused:A,isDisabled:O,key:E,index:I,removeProps:{onClick:function(){return i.removeValue(k)},onTouchEnd:function(){return i.removeValue(k)},onMouseDown:function(R){R.preventDefault()}},data:k}),i.formatOptionLabel(k,"value"))});if(x)return null;var C=S[0];return X.createElement(u,Ae({},d,{data:C,isDisabled:O}),this.formatOptionLabel(C,"value"))}},{key:"renderClearIndicator",value:function(){var i=this.getComponents(),o=i.ClearIndicator,s=this.commonProps,a=this.props,l=a.isDisabled,c=a.isLoading,u=this.state.isFocused;if(!this.isClearable()||!o||l||!this.hasValue()||c)return null;var f={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return X.createElement(o,Ae({},s,{innerProps:f,isFocused:u}))}},{key:"renderLoadingIndicator",value:function(){var i=this.getComponents(),o=i.LoadingIndicator,s=this.commonProps,a=this.props,l=a.isDisabled,c=a.isLoading,u=this.state.isFocused;if(!o||!c)return null;var f={"aria-hidden":"true"};return X.createElement(o,Ae({},s,{innerProps:f,isDisabled:l,isFocused:u}))}},{key:"renderIndicatorSeparator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator,s=i.IndicatorSeparator;if(!o||!s)return null;var a=this.commonProps,l=this.props.isDisabled,c=this.state.isFocused;return X.createElement(s,Ae({},a,{isDisabled:l,isFocused:c}))}},{key:"renderDropdownIndicator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator;if(!o)return null;var s=this.commonProps,a=this.props.isDisabled,l=this.state.isFocused,c={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return X.createElement(o,Ae({},s,{innerProps:c,isDisabled:a,isFocused:l}))}},{key:"renderMenu",value:function(){var i=this,o=this.getComponents(),s=o.Group,a=o.GroupHeading,l=o.Menu,c=o.MenuList,u=o.MenuPortal,f=o.LoadingMessage,d=o.NoOptionsMessage,h=o.Option,p=this.commonProps,O=this.state.focusedOption,m=this.props,x=m.captureMenuScroll,v=m.inputValue,y=m.isLoading,S=m.loadingMessage,b=m.minMenuHeight,w=m.maxMenuHeight,C=m.menuIsOpen,k=m.menuPlacement,I=m.menuPosition,A=m.menuPortalTarget,E=m.menuShouldBlockScroll,$=m.menuShouldScrollIntoView,R=m.noOptionsMessage,M=m.onMenuScrollToTop,Q=m.onMenuScrollToBottom;if(!C)return null;var Z=function(B,N){var U=B.type,F=B.data,te=B.isDisabled,L=B.isSelected,ce=B.label,re=B.value,ae=O===F,H=te?void 0:function(){return i.onOptionHover(F)},pe=te?void 0:function(){return i.selectOption(F)},q="".concat(i.getElementId("option"),"-").concat(N),ne={id:q,onClick:pe,onMouseMove:H,onMouseOver:H,tabIndex:-1,role:"option","aria-selected":i.isAppleDevice?void 0:L};return X.createElement(h,Ae({},p,{innerProps:ne,data:F,isDisabled:te,isSelected:L,key:q,label:ce,type:U,value:re,isFocused:ae,innerRef:ae?i.getFocusedOptionRef:void 0}),i.formatOptionLabel(B.data,"menu"))},G;if(this.hasOptions())G=this.getCategorizedOptions().map(function(D){if(D.type==="group"){var B=D.data,N=D.options,U=D.index,F="".concat(i.getElementId("group"),"-").concat(U),te="".concat(F,"-heading");return X.createElement(s,Ae({},p,{key:F,data:B,options:N,Heading:a,headingProps:{id:te,data:D.data},label:i.formatGroupLabel(D.data)}),D.options.map(function(L){return Z(L,"".concat(U,"-").concat(L.index))}))}else if(D.type==="option")return Z(D,"".concat(D.index))});else if(y){var V=S({inputValue:v});if(V===null)return null;G=X.createElement(f,p,V)}else{var ee=R({inputValue:v});if(ee===null)return null;G=X.createElement(d,p,ee)}var Y={minMenuHeight:b,maxMenuHeight:w,menuPlacement:k,menuPosition:I,menuShouldScrollIntoView:$},z=X.createElement(ED,Ae({},p,Y),function(D){var B=D.ref,N=D.placerProps,U=N.placement,F=N.maxHeight;return X.createElement(l,Ae({},p,Y,{innerRef:B,innerProps:{onMouseDown:i.onMenuMouseDown,onMouseMove:i.onMenuMouseMove},isLoading:y,placement:U}),X.createElement(i3,{captureEnabled:x,onTopArrive:M,onBottomArrive:Q,lockEnabled:E},function(te){return X.createElement(c,Ae({},p,{innerRef:function(ce){i.getMenuListRef(ce),te(ce)},innerProps:{role:"listbox","aria-multiselectable":p.isMulti,id:i.getElementId("listbox")},isLoading:y,maxHeight:F,focusedOption:O}),G)}))});return A||I==="fixed"?X.createElement(u,Ae({},p,{appendTo:A,controlElement:this.controlRef,menuPlacement:k,menuPosition:I}),z):z}},{key:"renderFormField",value:function(){var i=this,o=this.props,s=o.delimiter,a=o.isDisabled,l=o.isMulti,c=o.name,u=o.required,f=this.state.selectValue;if(u&&!this.hasValue()&&!a)return X.createElement(l3,{name:c,onFocus:this.onValueInputFocus});if(!(!c||a))if(l)if(s){var d=f.map(function(O){return i.getOptionValue(O)}).join(s);return X.createElement("input",{name:c,type:"hidden",value:d})}else{var h=f.length>0?f.map(function(O,m){return X.createElement("input",{key:"i-".concat(m),name:c,type:"hidden",value:i.getOptionValue(O)})}):X.createElement("input",{name:c,type:"hidden",value:""});return X.createElement("div",null,h)}else{var p=f[0]?this.getOptionValue(f[0]):"";return X.createElement("input",{name:c,type:"hidden",value:p})}}},{key:"renderLiveRegion",value:function(){var i=this.commonProps,o=this.state,s=o.ariaSelection,a=o.focusedOption,l=o.focusedValue,c=o.isFocused,u=o.selectValue,f=this.getFocusableOptions();return X.createElement(LQ,Ae({},i,{id:this.getElementId("live-region"),ariaSelection:s,focusedOption:a,focusedValue:l,isFocused:c,selectValue:u,focusableOptions:f,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var i=this.getComponents(),o=i.Control,s=i.IndicatorsContainer,a=i.SelectContainer,l=i.ValueContainer,c=this.props,u=c.className,f=c.id,d=c.isDisabled,h=c.menuIsOpen,p=this.state.isFocused,O=this.commonProps=this.getCommonProps();return X.createElement(a,Ae({},O,{className:u,innerProps:{id:f,onKeyDown:this.onKeyDown},isDisabled:d,isFocused:p}),this.renderLiveRegion(),X.createElement(o,Ae({},O,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:d,isFocused:p,menuIsOpen:h}),X.createElement(l,Ae({},O,{isDisabled:d}),this.renderPlaceholderOrValue(),this.renderInput()),X.createElement(s,Ae({},O,{isDisabled:d}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(i,o){var s=o.prevProps,a=o.clearFocusValueOnUpdate,l=o.inputIsHiddenAfterUpdate,c=o.ariaSelection,u=o.isFocused,f=o.prevWasFocused,d=o.instancePrefix,h=i.options,p=i.value,O=i.menuIsOpen,m=i.inputValue,x=i.isMulti,v=Vv(p),y={};if(s&&(p!==s.value||h!==s.options||O!==s.menuIsOpen||m!==s.inputValue)){var S=O?C3(i,v):[],b=O?iy(_u(i,v),"".concat(d,"-option")):[],w=a?k3(o,v):null,C=A3(o,S),k=Zh(b,C);y={selectValue:v,focusedOption:C,focusedOptionId:k,focusableOptionsWithIds:b,focusedValue:w,clearFocusValueOnUpdate:!1}}var I=l!=null&&i!==s?{inputIsHidden:l,inputIsHiddenAfterUpdate:void 0}:{},A=c,E=u&&f;return u&&!E&&(A={value:Gc(x,v,v[0]||null),options:v,action:"initial-input-focus"},E=!f),(c==null?void 0:c.action)==="initial-input-focus"&&(A=null),le(le(le({},y),I),{},{prevProps:i,ariaSelection:A,prevWasFocused:E})}}]),n}(j.Component);bA.defaultProps=w3;var E3=j.forwardRef(function(t,e){var n=F4(t);return X.createElement(bA,Ae({ref:e},n))}),I3=E3;const T3=()=>g.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:g.jsx("path",{d:"M7 0.875C3.63125 0.875 0.875 3.63125 0.875 7C0.875 10.3687 3.63125 13.125 7 13.125C10.3687 13.125 13.125 10.3687 13.125 7C13.125 3.63125 10.3687 0.875 7 0.875ZM6.51875 3.5H7.48125V8.3125H6.51875V3.5ZM7 10.9375C6.65 10.9375 6.34375 10.6313 6.34375 10.2812C6.34375 9.93125 6.65 9.625 7 9.625C7.35 9.625 7.65625 9.93125 7.65625 10.2812C7.65625 10.6313 7.35 10.9375 7 10.9375Z",fill:"#FFA02E"})}),$3=()=>g.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:g.jsx("path",{d:"M7 0.875C3.5875 0.875 0.875 3.5875 0.875 7C0.875 10.4125 3.5875 13.125 7 13.125C10.4125 13.125 13.125 10.4125 13.125 7C13.125 3.5875 10.4125 0.875 7 0.875ZM9.3625 10.0625L7 7.7L4.6375 10.0625L3.9375 9.3625L6.3 7L3.9375 4.6375L4.6375 3.9375L7 6.3L9.3625 3.9375L10.0625 4.6375L7.7 7L10.0625 9.3625L9.3625 10.0625Z",fill:"#F9316D"})}),ko=({options:t,isClearable:e=!1,isSearchable:n=!1,isDisabled:r=!1,isMulti:i=!1,isWarning:o=!1,isError:s=!1,withArrow:a=!0,placeholder:l,defaultValue:c,className:u,value:f,ariaLabel:d="select",ariaLabeledBy:h,size:p="medium",menuAlignment:O="left",icon:m,formatGroupLabel:x,onChange:v,dataTestId:y})=>{const S=k=>{const{selectProps:I}=k,{menuIsOpen:A}=I,E=A?g.jsx(_.ChevronUpIcon,{size:"14px"}):g.jsx(_.ChevronDownIcon,{size:"14px"});return a&&!i?g.jsxs(Bu.DropdownIndicator,{...k,children:[o&&g.jsx(T3,{}),s&&g.jsx($3,{}),m||E]}):null},b=k=>g.jsxs(Bu.Option,{...k,innerProps:{...k.innerProps,"data-testid":"select-option"},children:[k.children," ",k.isSelected&&g.jsx(_.CheckmarkIcon,{})]}),w=k=>g.jsx(Bu.SingleValue,{...k,innerProps:{...k.innerProps,"data-testid":y||"select-singleValue"},children:k.children}),C=j.useMemo(()=>({menu:k=>({...k,maxWidth:"424px",width:"auto",boxShadow:"0px 0px 4px 0px rgba(51, 51, 51, 0.15)",border:"1px solid var(--border-color-secondary)",borderRadius:"var(--border-radius-md)",overflow:"hidden",textOverflow:"ellipsis",zIndex:3,opacity:1,backgroundColor:"var(--bg-color)",minWidth:"max-content",right:O==="right"?0:"unset"})}),[O]);return g.jsx(I3,{className:`${u} react-select-${p}`,options:t,onChange:v,isSearchable:n,isClearable:e,isDisabled:r,isMulti:i,placeholder:l,defaultValue:c,value:f,formatGroupLabel:x,components:{Option:b,SingleValue:w,DropdownIndicator:S,IndicatorSeparator:null},styles:{...j3,...C},"aria-label":d,"aria-labelledby":h})},j3={container:t=>({...t}),control:(t,e)=>({...t,display:"flex",gap:"var(--spacing-xxs)",boxShadow:"none",maxWidth:"424px",overflow:"hidden",textOverflow:"ellipsis",minHeight:"24px",padding:e.isMulti?"0px var(--spacing-unit)":"0px var(--spacing-xs)",alignItems:"center",backgroundColor:e.isDisabled?"var(--bg-raised-shadow)":"var(--bg-color)",border:"none","&:hover":{cursor:"pointer"}}),singleValue:(t,e)=>({...t,color:e.isDisabled?"var(--color-content-disabled)":"var(--color-content)",fontSize:"var(--font-size-base)",lineHeight:"var(--line-height-base)",overflow:"hidden",margin:0,"&:hover":{color:"var(--text-primary)"}}),dropdownIndicator:(t,e)=>({...t,color:e.isDisabled?"var(--color-content-disabled)":"var(--color-content)",fill:e.isDisabled?"var(--color-content-disabled)":"var(--color-content)",display:"flex",alignItems:"center",alignSelf:"auto",justifyContent:"center",padding:0,gap:"var(--spacing-xs)","&:hover":{color:"var(--icon-color-additional)",fill:"var(--icon-color-additional)"}}),clearIndicator:t=>({...t,padding:0,width:"14px",height:"14px",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",fill:"var(--color-content-placeholder)"}),valueContainer:t=>({...t,padding:0,overflow:"visible"}),indicatorsContainer:t=>({...t,gap:"var(--spacing-unit)"}),placeholder:(t,e)=>({...t,color:"var(--color-content-placeholder)",fontSize:"var(--font-size-base)",margin:0,padding:e.isMulti?"0px var(--spacing-xs)":0}),input:t=>({...t,fontSize:"var(--font-size-base)",color:"var(--color-content)",margin:0,padding:0}),group:t=>({...t,paddingLeft:"var(--spacing-xs)"}),menuList:t=>({...t,backgroundColor:"var(--bg-color)",padding:"var(--spacing-unit)",overflowX:"hidden","& > div:not(:last-child)":{margin:"0px 0px calc(var(--spacing-unit)/2) 0px"}}),option:(t,e)=>({...t,minWidth:"max-content",cursor:"pointer",borderRadius:"var(--border-radius-md)",fontSize:"var(--font-size-base)",lineHeight:"var(--line-height-base)",padding:"0px var(--spacing-xs)",minHeight:"32px",color:"var(--color-content)",fill:"var(--color-content)",fontWeight:e.isSelected?"var(--font-weight-medium)":"var(--font-weight-regular)",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"var(--spacing-xs)",backgroundColor:"unset",div:{maxWidth:"400px",textOverflow:"ellipsis",overflow:"hidden"},"&:hover":{backgroundColor:"var(--menu-item-bg-color-hover)"}})};T.div`
141
141
  display: flex;
142
142
  flex-direction: column;
143
143
  gap: var(--spacing-xs);
@@ -201,12 +201,12 @@ You should wrap it with \`css\` like this:
201
201
  `,uc=T.div`
202
202
  padding: var(--spacing-md) 0;
203
203
  --button-margin: 0;
204
- `;function an(){const t=je(),{environments:e,selectedEnvironmentId:n}=t,r=j.useMemo(()=>n.get(),[n]);return j.useMemo(()=>e.find(o=>o.get().id===r)||e[0],[e,r])}var R3=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=document.activeElement,n=[],r=0;r<t.rangeCount;r++)n.push(t.getRangeAt(r));switch(e.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":e.blur();break;default:e=null;break}return t.removeAllRanges(),function(){t.type==="Caret"&&t.removeAllRanges(),t.rangeCount||n.forEach(function(i){t.addRange(i)}),e&&e.focus()}},D3=R3,sy={"text/plain":"Text","text/html":"Url",default:"Text"},Q3="Copy to clipboard: #{key}, Enter";function B3(t){var e=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return t.replace(/#{\s*key\s*}/g,e)}function _3(t,e){var n,r,i,o,s,a,l=!1;e||(e={}),n=e.debug||!1;try{i=D3(),o=document.createRange(),s=document.getSelection(),a=document.createElement("span"),a.textContent=t,a.ariaHidden="true",a.style.all="unset",a.style.position="fixed",a.style.top=0,a.style.clip="rect(0, 0, 0, 0)",a.style.whiteSpace="pre",a.style.webkitUserSelect="text",a.style.MozUserSelect="text",a.style.msUserSelect="text",a.style.userSelect="text",a.addEventListener("copy",function(u){if(u.stopPropagation(),e.format)if(u.preventDefault(),typeof u.clipboardData>"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var f=sy[e.format]||sy.default;window.clipboardData.setData(f,t)}else u.clipboardData.clearData(),u.clipboardData.setData(e.format,t);e.onCopy&&(u.preventDefault(),e.onCopy(u.clipboardData))}),document.body.appendChild(a),o.selectNodeContents(a),s.addRange(o);var c=document.execCommand("copy");if(!c)throw new Error("copy command was unsuccessful");l=!0}catch(u){n&&console.error("unable to copy using execCommand: ",u),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",t),e.onCopy&&e.onCopy(window.clipboardData),l=!0}catch(f){n&&console.error("unable to copy using clipboardData: ",f),n&&console.error("falling back to prompt"),r=B3("message"in e?e.message:Q3),window.prompt(r,t)}}finally{s&&(typeof s.removeRange=="function"?s.removeRange(o):s.removeAllRanges()),a&&document.body.removeChild(a),i()}return l}var M3=_3;const N3=wa(M3);class F3{static copyCustom(e){return N3(e)}static selectElement(e){if(!e)return;let n,r;document.body.createTextRange?(n=document.body.createTextRange(),n.moveToElementText(e),n.select()):document.createRange&&window.getSelection&&(r=window.getSelection(),n=document.createRange(),n.selectNodeContents(e),r==null||r.removeAllRanges(),r==null||r.addRange(n))}}const CA={hide:{type:"boolean",default:!1},component:{type:"string",enum:["radio","checkbox"],default:"checkbox"},label:{type:"string"},items:{type:"array",items:{type:"string"}}},Ya={type:"object",properties:CA,additionalProperties:!1},jd={type:"object",properties:{hide:{type:"boolean",default:!1},type:{type:"string",enum:["rating","sentiment","comment","reasons","mood","scale"],default:"sentiment"},settings:{type:"object",properties:{label:{type:"string"},submitText:{type:"string"},buttonText:{type:"string"},component:{type:"string",enum:["radio","checkbox"],default:"checkbox"},items:{type:"array",items:{type:"string"},minItems:1},leftScaleLabel:{type:"string"},rightScaleLabel:{type:"string"},reasons:{type:"object",properties:Object.assign(Object.assign({},CA),{like:Ya,dislike:Ya,satisfied:Ya,neutral:Ya,dissatisfied:Ya}),additionalProperties:!1},comment:{type:"object",properties:{hide:{type:"boolean",default:!1},label:{type:"string"},likeLabel:{type:"string"},dislikeLabel:{type:"string"},satisfiedLabel:{type:"string"},neutralLabel:{type:"string"},dissatisfiedLabel:{type:"string"}},additionalProperties:!1}},additionalProperties:!1}},additionalProperties:!1},Os={type:"object",properties:{includeByName:{type:"array",items:{type:"string"}},excludeByName:{type:"array",items:{type:"string"}}},additionalProperties:!1},Z3={type:"object",properties:{name:{type:"string"},items:Os,queries:Os,mutations:Os,subscriptions:Os,types:Os,directives:Os},required:["name"],additionalProperties:!1},W3={type:"object",properties:{requireExactGroups:{type:"boolean"},groups:{type:"array",items:Z3},otherItemsGroupName:{type:"string"}},required:["requireExactGroups","groups","otherItemsGroupName"],additionalProperties:!1},Of={type:"object",properties:{hidePaginationButtons:{type:"boolean"},menu:{type:"object",properties:Object.assign({},W3.properties),additionalProperties:!1},sidebar:{type:"object",properties:{hide:{type:"boolean"}}},apiLogo:{type:"object",properties:{imageUrl:{type:"string"},href:{type:"string"},altText:{type:"string"},backgroundColor:{type:"string"}}},jsonSamplesDepth:{type:"number"},samplesMaxInlineArgs:{type:"number"},licenseKey:{type:"string"},fieldExpandLevel:{type:"number"},baseUrlPath:{type:"string"},feedback:jd},additionalProperties:!1},V3={type:"object",properties:{languages:{type:"array",items:{type:"object",properties:{lang:{type:"string",enum:["curl","JavaScript","Node.js","Python","Java8+Apache","Java","C#","C#+Newtonsoft","PHP","Go","Ruby","R","Payload"]},label:{type:"string"},options:{type:"object",properties:{indent:{type:"string"},withImports:{type:"boolean"},withComments:{type:"boolean"},binary:{type:"boolean"},credentials:{type:"string",enum:["omit","same-origin","include"]}},additionalProperties:!1}},required:["lang"],additionalProperties:!1}},skipOptionalParameters:{type:"boolean"},withOAuth2Call:{type:"boolean"}},required:["languages"],additionalProperties:!1},z3={type:"array",items:{type:"object",properties:{title:{type:"string"},url:{type:"string"}},required:["url"],additionalProperties:!1}},ay={type:"object",properties:{licenseKey:{type:"string"},hideLoading:{type:"boolean"},disableRouter:{type:"boolean"},hideSidebar:{type:"boolean"},feedback:jd,hideReplay:{type:"boolean"},oAuth2RedirectURI:{type:"string",nullable:!0},corsProxyUrl:{type:"string"},sortRequiredPropsFirst:{type:"boolean"},sanitize:{type:"boolean"},hideDownloadButtons:{type:"boolean"},downloadUrls:z3,onlyRequiredInSamples:{type:"boolean"},generatedSamplesMaxDepth:{oneOf:[{type:"number"},{type:"string"}]},showExtensions:{oneOf:[{type:"boolean"},{type:"string"},{type:"array",items:{type:"string"}}]},hideSchemaTitles:{type:"boolean"},jsonSamplesExpandLevel:{oneOf:[{type:"number"},{type:"string"}]},schemasExpansionLevel:{oneOf:[{type:"number"},{type:"string"}]},mockServer:{type:"object",properties:{url:{type:"string"},position:{type:"string",enum:["first","last","replace","off"]},description:{type:"string"}}},maxDisplayedEnumValues:{type:"number"},schemaDefinitionsTagName:{type:"string"},layout:{type:"string",enum:["stacked","three-panel"]},hideInfoMetadata:{type:"boolean"},events:{type:"object"},skipBundle:{type:"boolean"},routingBasePath:{type:"string"},codeSamples:V3,ignoreNamedSchemas:{oneOf:[{type:"array",items:{type:"string"}},{type:"string"}]},hidePropertiesPrefix:{type:"boolean"},excludeFromSearch:{type:"boolean"}},additionalProperties:!1},L3={type:"object",properties:{label:{type:"string"},lang:{enum:["curl","C#","Go","Java","Java8+Apache","JavaScript","Node.js","PHP","Python","R","Ruby"]}},required:["lang"]},X3={type:"object",properties:{enum:{type:"string"},enumSingleValue:{type:"string"},enumArray:{type:"string"},default:{type:"string"},deprecated:{type:"string"},example:{type:"string"},examples:{type:"string"},nullable:{type:"string"},recursive:{type:"string"},arrayOf:{type:"string"},webhook:{type:"string"},authorizations:{type:"string"},tryItAuthBasicUsername:{type:"string"},tryItAuthBasicPassword:{type:"string"}}},ly={type:"object",properties:{label:{type:"string"},link:{type:"string"},target:{type:"string"}},required:["label","link"]},G3={type:"object",properties:{beforeInfo:{type:"array",items:ly},end:{type:"array",items:ly}}},Wo={type:"object",properties:{main:{type:"string"},light:{type:"string"},dark:{type:"string"},contrastText:{type:"string"}}},Yc={type:"object",properties:{backgroundColor:{type:"string"},borderColor:{type:"string"},color:{type:"string"},tabTextColor:{type:"string"}}},Y3={type:"object",properties:Rd(Wo.properties,["light","dark"])},q3={type:"object",properties:{basic:{type:"string"},delete:{type:"string"},get:{type:"string"},head:{type:"string"},link:{type:"string"},options:{type:"string"},patch:{type:"string"},post:{type:"string"},put:{type:"string"}}},U3={type:"object",properties:{error:Yc,info:Yc,redirect:Yc,success:Yc}},H3={type:"object",properties:Ea(Wo.properties,["dark"])},J3={type:"object",properties:{primary:{type:"string"},secondary:{type:"string"},light:{type:"string"}}},K3={type:"object",properties:{accent:Wo,border:Y3,error:Wo,http:q3,primary:Wo,responses:U3,secondary:H3,success:Wo,text:J3,tonalOffset:{type:"number"},warning:Wo}},qc={type:"object",properties:{fontSize:{type:"string"},padding:{type:"string"},minWidth:{type:"string"}}},eB={type:"object",properties:{small:qc,medium:qc,large:qc,xlarge:qc}},yi={type:"object",properties:{fontFamily:{type:"string"},fontSize:{type:"string"},fontWeight:{type:"string"},lineHeight:{type:"string"}}},tB={type:"object",properties:Object.assign(Object.assign({},Ea(yi.properties,["fontSize","lineHeight"])),{borderRadius:{type:"string"},hoverStyle:{type:"string"},boxShadow:{type:"string"},hoverBoxShadow:{type:"string"},sizes:eB})},cy={type:"object",properties:Rd(yi.properties,["fontSize","lineHeight"])},nB={type:"object",properties:{medium:cy,small:cy}},rB={type:"object",properties:Object.assign(Object.assign({},Ea(yi.properties,["fontSize","lineHeight"])),{borderRadius:{type:"string"},color:{type:"string"},sizes:nB})},iB={type:"object",properties:{top:{type:"string"},width:{type:"string"},height:{type:"string"}}},oB={type:"object",properties:{borderRadius:{type:"string"},backgroundColor:{type:"string"}}},uy={type:"object",properties:{fullWidth:{type:"boolean"}}},sB={type:"object",properties:{buttons:tB,httpBadges:rB,layoutControls:iB,panels:oB,tryItButton:uy,tryItSendButton:uy}},xf={type:"object",properties:{small:{type:"string"},medium:{type:"string"},large:{type:"string"}}},aB={type:"object",properties:{maxWidth:xf}},lB={type:"object",properties:{maxWidth:xf,middlePanelMaxWidth:xf}},cB={type:"object",properties:{showDarkRightPanel:{type:"boolean"},stacked:aB,"three-panel":lB}},fy={type:"object",properties:{backgroundColor:{type:"string"},border:{type:"string"}}},uB={type:"object",properties:{breakFieldNames:{type:"boolean"},caretColor:{type:"string"},caretSize:{type:"string"},constraints:fy,defaultDetailsWidth:{type:"string"},examples:fy,labelsTextSize:{type:"string"},linesColor:{type:"string"},nestedBackground:{type:"string"},nestingSpacing:{type:"string"},requireLabelColor:{type:"string"},typeNameColor:{type:"string"},typeTitleColor:{type:"string"}}},kA={type:"object",properties:{subItemsColor:{type:"string"},textTransform:{type:"string"},fontWeight:{type:"string"}}},fB={type:"object",properties:Rd(kA.properties,["textTransform"])},dB={type:"object",properties:{unit:{type:"number"},paddingHorizontal:{type:"string"},paddingVertical:{type:"string"},offsetTop:{type:"string"},offsetLeft:{type:"string"},offsetNesting:{type:"string"}}},hB={type:"object",properties:Object.assign(Object.assign({},Ea(yi.properties,["fontWeight","lineHeight"])),{activeBgColor:{type:"string"},activeTextColor:{type:"string"},backgroundColor:{type:"string"},borderRadius:{type:"string"},breakPath:{type:"boolean"},caretColor:{type:"string"},caretSize:{type:"string"},groupItems:kA,level1items:fB,rightLineColor:{type:"string"},separatorLabelColor:{type:"string"},showAtBreakpoint:{type:"string"},spacing:dB,textColor:{type:"string"},width:{type:"string"}})},Uc={type:"object",properties:Object.assign(Object.assign({},yi.properties),{color:{type:"string"},transform:{type:"string"}})},pB={type:"object",properties:Object.assign(Object.assign({},yi.properties),{backgroundColor:{type:"string"},color:{type:"string"},wordBreak:{type:"string",enum:["break-all","break-word","keep-all","normal","revert","unset","inherit","initial"]},wrap:{type:"boolean"}})},gB={type:"object",properties:Ea(yi.properties,["fontSize"])},mB={type:"object",properties:{color:{type:"string"},hover:{type:"string"},textDecoration:{type:"string"},hoverTextDecoration:{type:"string"},visited:{type:"string"}}},OB={type:"object",properties:Object.assign(Object.assign({code:pB,fieldName:yi},Rd(yi.properties,["fontSize","fontFamily"])),{fontWeightBold:{type:"string"},fontWeightLight:{type:"string"},fontWeightRegular:{type:"string"},heading1:Uc,heading2:Uc,heading3:Uc,headings:gB,lineHeight:{type:"string"},links:mB,optimizeSpeed:{type:"boolean"},rightPanelHeading:Uc,smoothing:{type:"string",enum:["auto","none","antialiased","subpixel-antialiased","grayscale"]}})},xB={type:"object",properties:Object.assign({color:{type:"string"}},Ea(yi.properties,["fontWeight"]))},vB={type:"object",properties:{backgroundColor:{type:"string"},borderRadius:{type:"string"},tokens:xB}},yB={type:"object",properties:{gutter:{type:"string"},maxHeight:{type:"string"},maxWidth:{type:"string"}}},bB={type:"object",properties:{backgroundColor:{type:"string"},color:{type:"string"}}},dy={type:"object",properties:{custom:{type:"string"}}},SB={type:"object",properties:{DownloadButton:dy,NextSectionButton:dy}},wB={type:"object",properties:{backgroundColor:{type:"string"},panelBackgroundColor:{type:"string"},panelControlsBackgroundColor:{type:"string"},showAtBreakpoint:{type:"string"},textColor:{type:"string"},width:{type:"string"}}},CB={type:"object",properties:{borderRadius:{type:"string"}}},kB={type:"object",properties:{sectionHorizontal:{type:"number"},sectionVertical:{type:"number"},unit:{type:"number"}}},AB={type:"object",properties:{breakpoints:xf,codeBlock:vB,colors:K3,components:sB,layout:cB,logo:yB,fab:bB,overrides:SB,rightPanel:wB,schema:uB,shape:CB,sidebar:hB,spacing:kB,typography:OB,links:{properties:{color:{type:"string"}}},codeSample:{properties:{backgroundColor:{type:"string"}}}}},PB={type:"object",properties:{skipOptionalParameters:{type:"boolean"},languages:{type:"array",items:L3}},required:["languages"]},EB={type:"object",properties:{theme:AB,ctrlFHijack:{type:"boolean"},defaultSampleLanguage:{type:"string"},disableDeepLinks:{type:"boolean"},disableSearch:{type:"boolean"},disableSidebar:{type:"boolean"},downloadDefinitionUrl:{type:"string"},expandDefaultServerVariables:{type:"boolean"},enumSkipQuotes:{type:"boolean"},expandDefaultRequest:{type:"boolean"},expandDefaultResponse:{type:"boolean"},expandResponses:{type:"string"},expandSingleSchemaField:{type:"boolean"},generateCodeSamples:PB,generatedPayloadSamplesMaxDepth:{type:"number"},hideDownloadButton:{type:"boolean"},hideHostname:{type:"boolean"},hideInfoSection:{type:"boolean"},hideLogo:{type:"boolean"},hideRequestPayloadSample:{type:"boolean"},hideRightPanel:{type:"boolean"},hideSchemaPattern:{type:"boolean"},hideSingleRequestSampleTab:{type:"boolean"},hideSecuritySection:{type:"boolean"},hideTryItPanel:{type:"boolean"},hideFab:{type:"boolean"},hideOneOfDescription:{type:"boolean"},htmlTemplate:{type:"string"},jsonSampleExpandLevel:{oneOf:[{type:"number",minimum:1},{type:"string"}]},labels:X3,menuToggle:{type:"boolean"},nativeScrollbars:{type:"boolean"},noAutoAuth:{type:"boolean"},onDeepLinkClick:{type:"object"},pagination:{enum:["none","section","item"]},pathInMiddlePanel:{type:"boolean"},payloadSampleIdx:{type:"number",minimum:0},requestInterceptor:{type:"object"},requiredPropsFirst:{type:"boolean"},routingStrategy:{type:"string"},samplesTabsMaxCount:{type:"number"},schemaExpansionLevel:{oneOf:[{type:"number",minimum:0},{type:"string"}]},minCharacterLengthToInitSearch:{type:"number",minimum:1},maxResponseHeadersToShowInTryIt:{type:"number",minimum:0},scrollYOffset:{oneOf:[{type:"number"},{type:"string"}]},searchAutoExpand:{type:"boolean"},searchFieldLevelBoost:{type:"number",minimum:0},searchMaxDepth:{type:"number",minimum:1},searchMode:{type:"string",enum:["default","path-only"]},searchOperationTitleBoost:{type:"number"},searchTagTitleBoost:{type:"number"},sendXUserAgentInTryIt:{type:"boolean"},showChangeLayoutButton:{type:"boolean"},showConsole:{type:"boolean"},showNextButton:{type:"boolean"},showRightPanelToggle:{type:"boolean"},showSecuritySchemeType:{type:"boolean"},showWebhookVerb:{type:"boolean"},showObjectSchemaExamples:{type:"boolean"},disableTryItRequestUrlEncoding:{type:"boolean"},sidebarLinks:G3,sideNavStyle:{type:"string",enum:["summary-only","path-first","id-only"]},simpleOneOfTypeLabel:{type:"boolean"},sortEnumValuesAlphabetically:{type:"boolean"},sortOperationsAlphabetically:{type:"boolean"},sortPropsAlphabetically:{type:"boolean"},sortTagsAlphabetically:{type:"boolean"},suppressWarnings:{type:"boolean"},unstable_externalDescription:{type:"boolean"},unstable_ignoreMimeParameters:{type:"boolean"},untrustedDefinition:{type:"boolean"},showAccessMode:{type:"boolean"},preserveOriginalExtensionsName:{type:"boolean"},markdownHeadingsAnchorLevel:{type:"number"}},additionalProperties:!1};function Rd(t,e){return Object.fromEntries(e.filter(n=>n in t).map(n=>[n,t[n]]))}function Ea(t,e){return Object.fromEntries(Object.entries(t).filter(([n])=>!e.includes(n)))}const jn={type:"object",properties:{hide:{type:"boolean"}},additionalProperties:!1},hy={type:"object",properties:{src:{type:"string"},async:{type:"boolean"},crossorigin:{type:"string"},defer:{type:"boolean"},fetchpriority:{type:"string"},integrity:{type:"string"},module:{type:"boolean"},nomodule:{type:"boolean"},nonce:{type:"string"},referrerpolicy:{type:"string"},type:{type:"string"}},required:["src"],additionalProperties:!0},Wh={type:"object",properties:{page:{type:"string"},directory:{type:"string"},disconnect:{type:"boolean",default:!1},group:{type:"string"},label:{type:"string"},href:{type:"string"},external:{type:"boolean"},labelTranslationKey:{type:"string"},groupTranslationKey:{type:"string"},icon:{oneOf:[{type:"string"},{type:"object",properties:{srcSet:{type:"string"}},required:["srcSet"]}]},separator:{type:"string"},separatorLine:{type:"boolean"},linePosition:{type:"string",enum:["top","bottom"],default:"top"},version:{type:"string"},menuStyle:{type:"string",enum:["drilldown"]},expanded:{type:"string",const:"always"},selectFirstItemOnExpand:{type:"boolean"},flatten:{type:"boolean"},linkedSidebars:{type:"array",items:{type:"string"}},items:{type:"array",items:{type:"object",additionalProperties:!0}}}},PO={type:"array",items:Object.assign(Object.assign({},Wh),{properties:Object.assign(Object.assign({},Wh.properties),{items:{type:"array",items:Wh}})})},IB={type:"object",properties:{name:{type:"string"},icon:{type:"string"},folder:{type:"string"}},additionalProperties:!1,required:["name","folder"]},TB={type:"object",properties:{hide:{type:"boolean",default:!1},prompt:{type:"string"}},additionalProperties:!1},$B={type:"array",items:{type:"object",required:["name","field","type"],properties:{name:{type:"string"},field:{type:"string"},type:{type:"string",enum:["multi-select","select","tags"]},isTop:{type:"boolean"}},additionalProperties:!1}},jB={type:"object",properties:{page:{type:"string"},label:{type:"string"},labelTranslationKey:{type:"string"}},required:["page"]},AA={type:"object",properties:{image:{type:"string"},srcSet:{type:"string"},altText:{type:"string"},link:{type:"string"},favicon:{type:"string"}},additionalProperties:!1},PA={type:"object",properties:Object.assign({items:PO},jn.properties),additionalProperties:!1},EA={type:"object",additionalProperties:IB},IA={type:"object",properties:Object.assign({items:PO,copyrightText:{type:"string"},logo:jn},jn.properties),additionalProperties:!1},TA={type:"object",properties:Object.assign({separatorLine:{type:"boolean"},linePosition:{type:"string",enum:["top","bottom"],default:"bottom"}},jn.properties),additionalProperties:!1},$A={type:"object",properties:{head:{type:"array",items:hy},body:{type:"array",items:hy}},additionalProperties:!1},jA={type:"array",items:{type:"object",properties:{href:{type:"string"},as:{type:"string"},crossorigin:{type:"string"},fetchpriority:{type:"string"},hreflang:{type:"string"},imagesizes:{type:"string"},imagesrcset:{type:"string"},integrity:{type:"string"},media:{type:"string"},prefetch:{type:"string"},referrerpolicy:{type:"string"},rel:{type:"string"},sizes:{type:"string"},title:{type:"string"},type:{type:"string"}},required:["href"],additionalProperties:!0}},RA={type:"object",properties:Object.assign({engine:{type:"string",enum:["flexsearch","typesense"],default:"flexsearch"},ai:TB,facets:$B,placement:{type:"string",default:"navbar"},shortcuts:{type:"array",items:{type:"string"},default:["/"]},suggestedPages:{type:"array",items:jB}},jn.properties),additionalProperties:!1},DA={type:"object",properties:Object.assign({ignoreDetection:{type:"boolean"},modes:{type:"array",items:{type:"string"},default:["light","dark"]}},jn.properties),additionalProperties:!1},QA={type:"object",properties:{nextButton:{type:"object",properties:Object.assign({text:{type:"string",default:"Next page"}},jn.properties),additionalProperties:!1,default:{}},previousButton:{type:"object",properties:Object.assign({text:{type:"string",default:"Previous page"}},jn.properties),additionalProperties:!1,default:{}}},additionalProperties:!1},BA={type:"object",properties:{elementFormat:{type:"string",default:"icon"},copy:{type:"object",properties:Object.assign({},jn.properties),additionalProperties:!1,default:{hide:!1}},report:{type:"object",properties:Object.assign({tooltipText:{type:"string"},buttonText:{type:"string"},label:{type:"string"}},jn.properties),additionalProperties:!1,default:{hide:!1}},expand:{type:"object",properties:Object.assign({},jn.properties),additionalProperties:!1,default:{hide:!1}},collapse:{type:"object",properties:Object.assign({},jn.properties),additionalProperties:!1,default:{hide:!1}}},additionalProperties:!1},_A={type:"object",properties:{frontMatterKeysToResolve:{type:"array",items:{type:"string"},default:["image","links"]},partialsFolders:{type:"array",items:{type:"string"},default:["_partials"]},lastUpdatedBlock:{type:"object",properties:Object.assign({format:{type:"string",enum:["timeago","iso","long","short"],default:"timeago"},locale:{type:"string"}},jn.properties),additionalProperties:!1,default:{}},toc:{type:"object",properties:Object.assign({header:{type:"string",default:"On this page"},depth:{type:"integer",default:3,minimum:1}},jn.properties),additionalProperties:!1,default:{}},editPage:{type:"object",properties:Object.assign({baseUrl:{type:"string"}},jn.properties),additionalProperties:!1,default:{}}},additionalProperties:!1,default:{}},vf=Object.assign(Object.assign({},ay),{properties:Object.assign(Object.assign({},ay.properties),EB.properties)}),RB={type:"object",properties:{includeInDevelopment:{type:"boolean"},scriptUrl:{type:"string"},pageViewEventName:{type:"string"}},additionalProperties:!1,required:["scriptUrl"]},DB={type:"object",properties:{includeInDevelopment:{type:"boolean"},apiKey:{type:"string"},head:{type:"boolean"},respectDNT:{type:"boolean"},exclude:{type:"array",items:{type:"string"}},outboundClickEventName:{type:"string"},pageViewEventName:{type:"string"},amplitudeConfig:{type:"object",additionalProperties:!0}},additionalProperties:!1,required:["apiKey"]},QB={type:"object",properties:{includeInDevelopment:{type:"boolean"},orgId:{type:"string"}},additionalProperties:!1,required:["orgId"]},BB={type:"object",properties:{includeInDevelopment:{type:"boolean"},appId:{type:"string"}},additionalProperties:!1,required:["appId"]},_B={type:"object",properties:{includeInDevelopment:{type:"boolean"},writeKey:{type:"string",minLength:10},trackPage:{type:"boolean"},dataPlaneUrl:{type:"string"},controlPlaneUrl:{type:"string"},sdkUrl:{type:"string"},loadOptions:{type:"object",additionalProperties:!0}},additionalProperties:!1,required:["writeKey"]},MB={type:"object",properties:{includeInDevelopment:{type:"boolean"},writeKey:{type:"string",minLength:10},trackPage:{type:"boolean"},includeTitleInPageCall:{type:"boolean"},host:{type:"string"}},additionalProperties:!1,required:["writeKey"]},NB={type:"object",properties:{includeInDevelopment:{type:"boolean"},trackingId:{type:"string"},gtmAuth:{type:"string"},gtmPreview:{type:"string"},defaultDataLayer:{},dataLayerName:{type:"string"},enableWebVitalsTracking:{type:"boolean"},selfHostedOrigin:{type:"string"},pageViewEventName:{type:"string"}},additionalProperties:!1,required:["trackingId"]},MA={type:"object",properties:{includeInDevelopment:{type:"boolean"},trackingId:{type:"string"},conversionId:{type:"string"},floodlightId:{type:"string"},optimizeId:{type:"string"},exclude:{type:"array",items:{type:"string"}}},additionalProperties:!1,required:["trackingId"]},FB={type:"object",properties:{includeInDevelopment:{type:"boolean"},trackingId:{type:"string"},conversionId:{type:"string"},floodlightId:{type:"string"},head:{type:"boolean"},respectDNT:{type:"boolean"},exclude:{type:"array",items:{type:"string"}},optimizeId:{type:"string"},anonymizeIp:{type:"boolean"},cookieExpires:{type:"number"},trackers:{type:"object",additionalProperties:MA}},additionalProperties:!1,required:["trackingId"]},NA={type:"object",properties:{adobe:RB,amplitude:DB,fullstory:QB,heap:BB,rudderstack:_B,segment:MB,gtm:NB,ga:FB}},FA={type:"object",properties:Object.assign({items:{type:"array",items:{type:"object",properties:{label:{type:"string"},external:{type:"boolean"},link:{type:"string"},separatorLine:{type:"boolean"}},additionalProperties:!0},default:[]},hideLoginButton:{type:"boolean"}},jn.properties),additionalProperties:!1},ZA={type:"object",properties:{hide:{type:"boolean"},showForUnversioned:{type:"boolean"}}},WA={type:"object",properties:{hide:{type:"boolean"},prefixItems:{type:"array",items:{type:"object",properties:{label:{type:"string"},labelTranslationKey:{type:"string"},page:{type:"string"}},additionalProperties:!1,default:{}}}},additionalProperties:!1},ZB={type:"object",additionalProperties:!1,required:["title","property"],properties:{type:{type:"string",enum:["select","checkboxes","date-range"],default:"checkboxes"},title:{type:"string"},titleTranslationKey:{type:"string"},property:{type:"string"},parentFilter:{type:"string"},valuesMapping:{type:"object",additionalProperties:{type:"string"}},missingCategoryName:{type:"string"},missingCategoryNameTranslationKey:{type:"string"},options:{type:"array",items:{type:"string"}}}},WB={type:"object",additionalProperties:!0,required:["slug","items"],properties:{slug:{type:"string"},filters:{type:"array",items:ZB},groupByFirstFilter:{type:"boolean"},filterValuesCasing:{type:"string",enum:["sentence","original","lowercase","uppercase"]},items:PO,requiredPermission:{type:"string"},separateVersions:{type:"boolean"},title:{type:"string"},titleTranslationKey:{type:"string"},description:{type:"string"},descriptionTranslationKey:{type:"string"}}},VA={type:"object",patternProperties:{".*":WB}},zA={type:"object",additionalProperties:!0,required:[],properties:{ignoreNonCompliant:{type:"boolean",default:!1},teamMetadataProperty:{type:"object",properties:{property:{type:"string"},label:{type:"string"},default:{type:"string"}}},levels:{type:"array",items:{type:"object",required:["name"],properties:{name:{type:"string"},color:{type:"string"},extends:{type:"array",items:{type:"string"}},rules:{type:"object",additionalProperties:{oneOf:[{type:"string"},{type:"object"}]}}},additionalProperties:!1}},targets:{type:"array",items:{type:"object",required:["where"],properties:{minimumLevel:{type:"string"},rules:{type:"object",additionalProperties:!0},where:{type:"object",required:["metadata"],properties:{metadata:{type:"object",additionalProperties:{type:"string"}}},additionalProperties:!1}},additionalProperties:!1}},ignore:{type:"array",items:{type:"string"}}}},_r={type:"object",properties:{imports:{type:"array",items:{type:"string"}},logo:AA,navbar:PA,products:EA,footer:IA,sidebar:TA,scripts:$A,links:jA,feedback:jd,search:RA,colorMode:DA,navigation:QA,codeSnippet:BA,markdown:_A,openapi:vf,graphql:Of,analytics:NA,userMenu:FA,versionPicker:ZA,breadcrumbs:WA,catalog:VA,scorecard:zA},additionalProperties:!0};Object.assign(Object.assign({},_r),{additionalProperties:!1});const VB="https://redocly.com/sso/teams";var yf;(function(t){t.OIDC="OIDC",t.SAML2="SAML2"})(yf||(yf={}));var bf;(function(t){t.SERVICE_ACCOUNT="SERVICE_ACCOUNT",t.OAUTH2="OAUTH2"})(bf||(bf={}));var py;(function(t){t.STACKED="stacked",t.THREE_PANEL="three-panel"})(py||(py={}));function Jg(t,e){return Object.fromEntries(Object.entries(t).map(([n,r])=>{if(n!==e)return typeof r!="object"||!r?[n,r]:Array.isArray(r)?[n,r.map(i=>typeof i=="object"?Jg(i,e):i)]:[n,Jg(r,e)]}).filter(Boolean))}const zB={type:"object",additionalProperties:{type:"string"}},LB={type:"object",additionalProperties:!1,properties:{event:{type:"string",enum:["schedule"]},interval:{type:"string",pattern:"^[1-9]\\d*[mhdw]$"}},required:["event"]},XB={type:"object",properties:{ignoreLint:{oneOf:[{type:"boolean",default:!1},{type:"object",additionalProperties:{type:"boolean"}}]},ignoreLinkChecker:{type:"boolean"},ignoreMarkdocErrors:{type:"boolean"},jobs:{type:"array",items:{type:"object",properties:{path:{type:"string",pattern:"^(?!\\.\\./)(/[a-zA-Z0-9_\\-\\./]+|./[a-zA-Z0-9_\\-\\./]+|[a-zA-Z0-9_\\-\\./]+)$"},agent:{type:"string",enum:["spot"]},trigger:LB,inputs:zB},required:["path","trigger","agent"],additionalProperties:!1}}},additionalProperties:!1},GB={type:"object",properties:{end_session_endpoint:{type:"string"},token_endpoint:{type:"string"},authorization_endpoint:{type:"string"},jwks_uri:{type:"string"}},required:["token_endpoint","authorization_endpoint"],additionalProperties:!0},YB={type:"object",properties:{type:{type:"string",const:yf.OIDC},title:{type:"string"},pkce:{type:"boolean",default:!1},configurationUrl:{type:"string",minLength:1},configuration:GB,clientId:{type:"string",minLength:1},clientSecret:{type:"string",minLength:0},teamsClaimName:{type:"string"},teamsClaimMap:{type:"object",additionalProperties:{type:"string"}},defaultTeams:{type:"array",items:{type:"string"}},scopes:{type:"array",items:{type:"string"}},tokenExpirationTime:{type:"number"},authorizationRequestCustomParams:{type:"object",additionalProperties:{type:"string"}},tokenRequestCustomParams:{type:"object",additionalProperties:{type:"string"}},audience:{type:"array",items:{type:"string"}}},required:["type","clientId"],oneOf:[{required:["configurationUrl"]},{required:["configuration"]}],additionalProperties:!1},qB={type:"object",properties:{type:{type:"string",const:yf.SAML2},title:{type:"string"},issuerId:{type:"string"},entityId:{type:"string"},ssoUrl:{type:"string"},x509PublicCert:{type:"string"},teamsAttributeName:{type:"string",default:VB},teamsAttributeMap:{type:"object",additionalProperties:{type:"string"}},defaultTeams:{type:"array",items:{type:"string"}}},additionalProperties:!1,required:["type","issuerId","ssoUrl","x509PublicCert"]},UB={oneOf:[YB,qB],discriminator:{propertyName:"type"}},HB={type:"object",additionalProperties:UB},JB={oneOf:[{type:"array",items:{type:"string",enum:["REDOCLY","CORPORATE","GUEST"]},uniqueItems:!0},{type:"string",enum:["REDOCLY","CORPORATE","GUEST"]}]},KB={type:"object",properties:{to:{type:"string"},type:{type:"number",default:301}},additionalProperties:!1},e_={type:"object",additionalProperties:KB,default:{}},LA={type:"object",additionalProperties:{oneOf:[{type:"string"},{type:"object"}]}},XA={type:"object",properties:{root:{type:"string"},output:{type:"string",pattern:"(.ya?ml|.json)$"},rbac:{type:"object",additionalProperties:!0},openapi:vf,graphql:Of,theme:{type:"object",properties:{openapi:vf,graphql:Of},additionalProperties:!1},title:{type:"string"},metadata:{type:"object",additionalProperties:!0},rules:LA,decorators:{type:"object",additionalProperties:!0},preprocessors:{type:"object",additionalProperties:!0}},required:["root"]},t_={type:"object",additionalProperties:!0},n_={type:"object",additionalProperties:{type:"object",additionalProperties:!0}},r_={type:"object",properties:{title:{type:"string"},description:{type:"string"},siteUrl:{type:"string"},image:{type:"string"},keywords:{oneOf:[{type:"array",items:{type:"string"}},{type:"string"}]},lang:{type:"string"},jsonLd:{type:"object"},meta:{type:"array",items:{type:"object",properties:{name:{type:"string"},content:{type:"string"}},required:["name","content"],additionalProperties:!1}}},additionalProperties:!1},xs={type:"object",additionalProperties:{type:"string"}},i_={type:"object",properties:{teamNamePatterns:{type:"array",items:{type:"string"}},teamFolders:{type:"array",items:{type:"string"}},teamFoldersBaseRoles:xs,cms:xs,reunite:xs,content:{type:"object",properties:{"**":xs},additionalProperties:xs}},additionalProperties:xs},o_={type:"object",properties:{static:{type:"string"}},additionalProperties:!1,required:["static"]},s_={type:"object",properties:{idp:{type:"string"}},additionalProperties:!1,required:["idp"]},a_={type:"object",properties:{type:{type:"string",const:"GRAVITEE"},apiBaseUrl:{type:"string"},env:{type:"string"},allowApiProductsOutsideCatalog:{type:"boolean",default:!1},stage:{type:"string",default:"non-production"},auth:{oneOf:[o_,s_]}},additionalProperties:!1,required:["type","apiBaseUrl"]},l_={type:"object",properties:{type:{type:"string",const:bf.OAUTH2},tokenEndpoint:{type:"string"},clientId:{type:"string"},clientSecret:{type:"string"}},additionalProperties:!1,required:["type","tokenEndpoint","clientId","clientSecret"]},c_={type:"object",properties:{type:{type:"string",const:bf.SERVICE_ACCOUNT},serviceAccountEmail:{type:"string"},serviceAccountPrivateKey:{type:"string"}},additionalProperties:!1,required:["type","serviceAccountEmail","serviceAccountPrivateKey"]},Kg={type:"object",properties:{type:{type:"string",const:"APIGEE_X"},apiUrl:{type:"string"},stage:{type:"string",default:"non-production"},organizationName:{type:"string"},ignoreApiProducts:{type:"array",items:{type:"string"}},allowApiProductsOutsideCatalog:{type:"boolean",default:!1},auth:{type:"object",oneOf:[l_,c_],discriminator:{propertyName:"type"}}},additionalProperties:!1,required:["type","organizationName","auth"]},u_=Object.assign(Object.assign({},Kg),{properties:Object.assign(Object.assign({},Kg.properties),{type:{type:"string",const:"APIGEE_EDGE"}})}),f_={type:"object",oneOf:[Kg,u_,a_],discriminator:{propertyName:"type"}},d_={type:"object",required:["adapters"],additionalProperties:!1,properties:{adapters:{type:"array",items:f_}}},gy={type:"object",properties:{defaultLocale:{type:"string"},locales:{type:"array",items:{type:"object",properties:{code:{type:"string"},name:{type:"string"}},required:["code"]}}},additionalProperties:!1,required:["defaultLocale"]},h_={type:"object",properties:{name:{type:"string"},value:{type:"string"}},additionalProperties:!1,required:["name","value"]},e0={type:"object",properties:{imports:{type:"array",items:{type:"string"}},licenseKey:{type:"string"},redirects:e_,seo:r_,rbac:i_,requiresLogin:{type:"boolean"},responseHeaders:{type:"object",additionalProperties:{type:"array",items:h_}},mockServer:{type:"object",properties:{off:{type:"boolean",default:!1},position:{type:"string",enum:["first","last","replace","off"],default:"first"},strictExamples:{type:"boolean",default:!1},errorIfForcedExampleNotFound:{type:"boolean",default:!1},description:{type:"string"}}},apis:{type:"object",additionalProperties:XA},rules:LA,decorators:{type:"object",additionalProperties:!0},preprocessors:{type:"object",additionalProperties:!0},ssoDirect:HB,sso:JB,residency:{type:"string"},developerOnboarding:d_,removeAttribution:{type:"boolean"},i18n:gy,l10n:gy,metadata:t_,metadataGlobs:n_,ignore:{type:"array",items:{type:"string"}},theme:_r,reunite:XB,logo:AA,navbar:PA,products:EA,footer:IA,sidebar:TA,scripts:$A,links:jA,feedback:jd,search:RA,colorMode:DA,navigation:QA,codeSnippet:BA,markdown:_A,openapi:vf,graphql:Of,analytics:NA,userMenu:FA,versionPicker:ZA,breadcrumbs:WA,catalog:VA,scorecard:zA},default:{redirects:{}},additionalProperties:!0},p_=Object.assign(Object.assign({},Jg(e0,"default")),{additionalProperties:!1});Object.assign(Object.assign({$id:"root-redocly-config"},e0),{properties:Object.assign(Object.assign({plugins:{type:"array",items:{type:"string"}}},e0.properties),{env:{type:"object",additionalProperties:p_}}),default:{},additionalProperties:!1});const my={type:"object",properties:{logo:_r.properties.logo,navbar:_r.properties.navbar,footer:_r.properties.footer,sidebar:_r.properties.sidebar,search:_r.properties.search,codeSnippet:_r.properties.codeSnippet,breadcrumbs:_r.properties.breadcrumbs,openapi:_r.properties.openapi,feedback:_r.properties.feedback,analytics:{type:"object",properties:{ga:MA}}},additionalProperties:!0,default:{}};Object.assign(Object.assign({},my.properties),{apis:{type:"object",additionalProperties:XA},theme:my});var GA={exports:{}};/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
204
+ `;function an(){const t=je(),{environments:e,selectedEnvironmentId:n}=t,r=j.useMemo(()=>n.get(),[n]);return j.useMemo(()=>e.find(o=>o.get().id===r)||e[0],[e,r])}var R3=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=document.activeElement,n=[],r=0;r<t.rangeCount;r++)n.push(t.getRangeAt(r));switch(e.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":e.blur();break;default:e=null;break}return t.removeAllRanges(),function(){t.type==="Caret"&&t.removeAllRanges(),t.rangeCount||n.forEach(function(i){t.addRange(i)}),e&&e.focus()}},D3=R3,sy={"text/plain":"Text","text/html":"Url",default:"Text"},Q3="Copy to clipboard: #{key}, Enter";function B3(t){var e=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return t.replace(/#{\s*key\s*}/g,e)}function _3(t,e){var n,r,i,o,s,a,l=!1;e||(e={}),n=e.debug||!1;try{i=D3(),o=document.createRange(),s=document.getSelection(),a=document.createElement("span"),a.textContent=t,a.ariaHidden="true",a.style.all="unset",a.style.position="fixed",a.style.top=0,a.style.clip="rect(0, 0, 0, 0)",a.style.whiteSpace="pre",a.style.webkitUserSelect="text",a.style.MozUserSelect="text",a.style.msUserSelect="text",a.style.userSelect="text",a.addEventListener("copy",function(u){if(u.stopPropagation(),e.format)if(u.preventDefault(),typeof u.clipboardData>"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var f=sy[e.format]||sy.default;window.clipboardData.setData(f,t)}else u.clipboardData.clearData(),u.clipboardData.setData(e.format,t);e.onCopy&&(u.preventDefault(),e.onCopy(u.clipboardData))}),document.body.appendChild(a),o.selectNodeContents(a),s.addRange(o);var c=document.execCommand("copy");if(!c)throw new Error("copy command was unsuccessful");l=!0}catch(u){n&&console.error("unable to copy using execCommand: ",u),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",t),e.onCopy&&e.onCopy(window.clipboardData),l=!0}catch(f){n&&console.error("unable to copy using clipboardData: ",f),n&&console.error("falling back to prompt"),r=B3("message"in e?e.message:Q3),window.prompt(r,t)}}finally{s&&(typeof s.removeRange=="function"?s.removeRange(o):s.removeAllRanges()),a&&document.body.removeChild(a),i()}return l}var M3=_3;const N3=wa(M3);class F3{static copyCustom(e){return N3(e)}static selectElement(e){if(!e)return;let n,r;document.body.createTextRange?(n=document.body.createTextRange(),n.moveToElementText(e),n.select()):document.createRange&&window.getSelection&&(r=window.getSelection(),n=document.createRange(),n.selectNodeContents(e),r==null||r.removeAllRanges(),r==null||r.addRange(n))}}const CA={hide:{type:"boolean",default:!1},component:{type:"string",enum:["radio","checkbox"],default:"checkbox"},label:{type:"string"},items:{type:"array",items:{type:"string"}}},Ya={type:"object",properties:CA,additionalProperties:!1},jd={type:"object",properties:{hide:{type:"boolean",default:!1},type:{type:"string",enum:["rating","sentiment","comment","reasons","mood","scale"],default:"sentiment"},settings:{type:"object",properties:{label:{type:"string"},submitText:{type:"string"},buttonText:{type:"string"},component:{type:"string",enum:["radio","checkbox"],default:"checkbox"},items:{type:"array",items:{type:"string"},minItems:1},leftScaleLabel:{type:"string"},rightScaleLabel:{type:"string"},reasons:{type:"object",properties:Object.assign(Object.assign({},CA),{like:Ya,dislike:Ya,satisfied:Ya,neutral:Ya,dissatisfied:Ya}),additionalProperties:!1},comment:{type:"object",properties:{hide:{type:"boolean",default:!1},label:{type:"string"},likeLabel:{type:"string"},dislikeLabel:{type:"string"},satisfiedLabel:{type:"string"},neutralLabel:{type:"string"},dissatisfiedLabel:{type:"string"}},additionalProperties:!1}},additionalProperties:!1}},additionalProperties:!1},xs={type:"object",properties:{includeByName:{type:"array",items:{type:"string"}},excludeByName:{type:"array",items:{type:"string"}}},additionalProperties:!1},Z3={type:"object",properties:{name:{type:"string"},items:xs,queries:xs,mutations:xs,subscriptions:xs,types:xs,directives:xs},required:["name"],additionalProperties:!1},W3={type:"object",properties:{requireExactGroups:{type:"boolean"},groups:{type:"array",items:Z3},otherItemsGroupName:{type:"string"}},required:["requireExactGroups","groups","otherItemsGroupName"],additionalProperties:!1},Of={type:"object",properties:{hidePaginationButtons:{type:"boolean"},menu:{type:"object",properties:Object.assign({},W3.properties),additionalProperties:!1},sidebar:{type:"object",properties:{hide:{type:"boolean"}}},apiLogo:{type:"object",properties:{imageUrl:{type:"string"},href:{type:"string"},altText:{type:"string"},backgroundColor:{type:"string"}}},jsonSamplesDepth:{type:"number"},samplesMaxInlineArgs:{type:"number"},licenseKey:{type:"string"},fieldExpandLevel:{type:"number"},baseUrlPath:{type:"string"},feedback:jd},additionalProperties:!1},V3={type:"object",properties:{languages:{type:"array",items:{type:"object",properties:{lang:{type:"string",enum:["curl","JavaScript","Node.js","Python","Java8+Apache","Java","C#","C#+Newtonsoft","PHP","Go","Ruby","R","Payload"]},label:{type:"string"},options:{type:"object",properties:{indent:{type:"string"},withImports:{type:"boolean"},withComments:{type:"boolean"},binary:{type:"boolean"},credentials:{type:"string",enum:["omit","same-origin","include"]}},additionalProperties:!1}},required:["lang"],additionalProperties:!1}},skipOptionalParameters:{type:"boolean"},withOAuth2Call:{type:"boolean"}},required:["languages"],additionalProperties:!1},z3={type:"array",items:{type:"object",properties:{title:{type:"string"},url:{type:"string"}},required:["url"],additionalProperties:!1}},ay={type:"object",properties:{licenseKey:{type:"string"},hideLoading:{type:"boolean"},disableRouter:{type:"boolean"},hideSidebar:{type:"boolean"},feedback:jd,hideReplay:{type:"boolean"},oAuth2RedirectURI:{type:"string",nullable:!0},corsProxyUrl:{type:"string"},sortRequiredPropsFirst:{type:"boolean"},sanitize:{type:"boolean"},hideDownloadButtons:{type:"boolean"},downloadUrls:z3,onlyRequiredInSamples:{type:"boolean"},generatedSamplesMaxDepth:{oneOf:[{type:"number"},{type:"string"}]},showExtensions:{oneOf:[{type:"boolean"},{type:"string"},{type:"array",items:{type:"string"}}]},hideSchemaTitles:{type:"boolean"},jsonSamplesExpandLevel:{oneOf:[{type:"number"},{type:"string"}]},schemasExpansionLevel:{oneOf:[{type:"number"},{type:"string"}]},mockServer:{type:"object",properties:{url:{type:"string"},position:{type:"string",enum:["first","last","replace","off"]},description:{type:"string"}}},maxDisplayedEnumValues:{type:"number"},schemaDefinitionsTagName:{type:"string"},layout:{type:"string",enum:["stacked","three-panel"]},hideInfoMetadata:{type:"boolean"},events:{type:"object"},skipBundle:{type:"boolean"},routingBasePath:{type:"string"},codeSamples:V3,ignoreNamedSchemas:{oneOf:[{type:"array",items:{type:"string"}},{type:"string"}]},hidePropertiesPrefix:{type:"boolean"},excludeFromSearch:{type:"boolean"}},additionalProperties:!1},L3={type:"object",properties:{label:{type:"string"},lang:{enum:["curl","C#","Go","Java","Java8+Apache","JavaScript","Node.js","PHP","Python","R","Ruby"]}},required:["lang"]},X3={type:"object",properties:{enum:{type:"string"},enumSingleValue:{type:"string"},enumArray:{type:"string"},default:{type:"string"},deprecated:{type:"string"},example:{type:"string"},examples:{type:"string"},nullable:{type:"string"},recursive:{type:"string"},arrayOf:{type:"string"},webhook:{type:"string"},authorizations:{type:"string"},tryItAuthBasicUsername:{type:"string"},tryItAuthBasicPassword:{type:"string"}}},ly={type:"object",properties:{label:{type:"string"},link:{type:"string"},target:{type:"string"}},required:["label","link"]},G3={type:"object",properties:{beforeInfo:{type:"array",items:ly},end:{type:"array",items:ly}}},Vo={type:"object",properties:{main:{type:"string"},light:{type:"string"},dark:{type:"string"},contrastText:{type:"string"}}},Yc={type:"object",properties:{backgroundColor:{type:"string"},borderColor:{type:"string"},color:{type:"string"},tabTextColor:{type:"string"}}},Y3={type:"object",properties:Rd(Vo.properties,["light","dark"])},q3={type:"object",properties:{basic:{type:"string"},delete:{type:"string"},get:{type:"string"},head:{type:"string"},link:{type:"string"},options:{type:"string"},patch:{type:"string"},post:{type:"string"},put:{type:"string"}}},U3={type:"object",properties:{error:Yc,info:Yc,redirect:Yc,success:Yc}},H3={type:"object",properties:Ea(Vo.properties,["dark"])},J3={type:"object",properties:{primary:{type:"string"},secondary:{type:"string"},light:{type:"string"}}},K3={type:"object",properties:{accent:Vo,border:Y3,error:Vo,http:q3,primary:Vo,responses:U3,secondary:H3,success:Vo,text:J3,tonalOffset:{type:"number"},warning:Vo}},qc={type:"object",properties:{fontSize:{type:"string"},padding:{type:"string"},minWidth:{type:"string"}}},eB={type:"object",properties:{small:qc,medium:qc,large:qc,xlarge:qc}},yi={type:"object",properties:{fontFamily:{type:"string"},fontSize:{type:"string"},fontWeight:{type:"string"},lineHeight:{type:"string"}}},tB={type:"object",properties:Object.assign(Object.assign({},Ea(yi.properties,["fontSize","lineHeight"])),{borderRadius:{type:"string"},hoverStyle:{type:"string"},boxShadow:{type:"string"},hoverBoxShadow:{type:"string"},sizes:eB})},cy={type:"object",properties:Rd(yi.properties,["fontSize","lineHeight"])},nB={type:"object",properties:{medium:cy,small:cy}},rB={type:"object",properties:Object.assign(Object.assign({},Ea(yi.properties,["fontSize","lineHeight"])),{borderRadius:{type:"string"},color:{type:"string"},sizes:nB})},iB={type:"object",properties:{top:{type:"string"},width:{type:"string"},height:{type:"string"}}},oB={type:"object",properties:{borderRadius:{type:"string"},backgroundColor:{type:"string"}}},uy={type:"object",properties:{fullWidth:{type:"boolean"}}},sB={type:"object",properties:{buttons:tB,httpBadges:rB,layoutControls:iB,panels:oB,tryItButton:uy,tryItSendButton:uy}},xf={type:"object",properties:{small:{type:"string"},medium:{type:"string"},large:{type:"string"}}},aB={type:"object",properties:{maxWidth:xf}},lB={type:"object",properties:{maxWidth:xf,middlePanelMaxWidth:xf}},cB={type:"object",properties:{showDarkRightPanel:{type:"boolean"},stacked:aB,"three-panel":lB}},fy={type:"object",properties:{backgroundColor:{type:"string"},border:{type:"string"}}},uB={type:"object",properties:{breakFieldNames:{type:"boolean"},caretColor:{type:"string"},caretSize:{type:"string"},constraints:fy,defaultDetailsWidth:{type:"string"},examples:fy,labelsTextSize:{type:"string"},linesColor:{type:"string"},nestedBackground:{type:"string"},nestingSpacing:{type:"string"},requireLabelColor:{type:"string"},typeNameColor:{type:"string"},typeTitleColor:{type:"string"}}},kA={type:"object",properties:{subItemsColor:{type:"string"},textTransform:{type:"string"},fontWeight:{type:"string"}}},fB={type:"object",properties:Rd(kA.properties,["textTransform"])},dB={type:"object",properties:{unit:{type:"number"},paddingHorizontal:{type:"string"},paddingVertical:{type:"string"},offsetTop:{type:"string"},offsetLeft:{type:"string"},offsetNesting:{type:"string"}}},hB={type:"object",properties:Object.assign(Object.assign({},Ea(yi.properties,["fontWeight","lineHeight"])),{activeBgColor:{type:"string"},activeTextColor:{type:"string"},backgroundColor:{type:"string"},borderRadius:{type:"string"},breakPath:{type:"boolean"},caretColor:{type:"string"},caretSize:{type:"string"},groupItems:kA,level1items:fB,rightLineColor:{type:"string"},separatorLabelColor:{type:"string"},showAtBreakpoint:{type:"string"},spacing:dB,textColor:{type:"string"},width:{type:"string"}})},Uc={type:"object",properties:Object.assign(Object.assign({},yi.properties),{color:{type:"string"},transform:{type:"string"}})},pB={type:"object",properties:Object.assign(Object.assign({},yi.properties),{backgroundColor:{type:"string"},color:{type:"string"},wordBreak:{type:"string",enum:["break-all","break-word","keep-all","normal","revert","unset","inherit","initial"]},wrap:{type:"boolean"}})},gB={type:"object",properties:Ea(yi.properties,["fontSize"])},mB={type:"object",properties:{color:{type:"string"},hover:{type:"string"},textDecoration:{type:"string"},hoverTextDecoration:{type:"string"},visited:{type:"string"}}},OB={type:"object",properties:Object.assign(Object.assign({code:pB,fieldName:yi},Rd(yi.properties,["fontSize","fontFamily"])),{fontWeightBold:{type:"string"},fontWeightLight:{type:"string"},fontWeightRegular:{type:"string"},heading1:Uc,heading2:Uc,heading3:Uc,headings:gB,lineHeight:{type:"string"},links:mB,optimizeSpeed:{type:"boolean"},rightPanelHeading:Uc,smoothing:{type:"string",enum:["auto","none","antialiased","subpixel-antialiased","grayscale"]}})},xB={type:"object",properties:Object.assign({color:{type:"string"}},Ea(yi.properties,["fontWeight"]))},vB={type:"object",properties:{backgroundColor:{type:"string"},borderRadius:{type:"string"},tokens:xB}},yB={type:"object",properties:{gutter:{type:"string"},maxHeight:{type:"string"},maxWidth:{type:"string"}}},bB={type:"object",properties:{backgroundColor:{type:"string"},color:{type:"string"}}},dy={type:"object",properties:{custom:{type:"string"}}},SB={type:"object",properties:{DownloadButton:dy,NextSectionButton:dy}},wB={type:"object",properties:{backgroundColor:{type:"string"},panelBackgroundColor:{type:"string"},panelControlsBackgroundColor:{type:"string"},showAtBreakpoint:{type:"string"},textColor:{type:"string"},width:{type:"string"}}},CB={type:"object",properties:{borderRadius:{type:"string"}}},kB={type:"object",properties:{sectionHorizontal:{type:"number"},sectionVertical:{type:"number"},unit:{type:"number"}}},AB={type:"object",properties:{breakpoints:xf,codeBlock:vB,colors:K3,components:sB,layout:cB,logo:yB,fab:bB,overrides:SB,rightPanel:wB,schema:uB,shape:CB,sidebar:hB,spacing:kB,typography:OB,links:{properties:{color:{type:"string"}}},codeSample:{properties:{backgroundColor:{type:"string"}}}}},PB={type:"object",properties:{skipOptionalParameters:{type:"boolean"},languages:{type:"array",items:L3}},required:["languages"]},EB={type:"object",properties:{theme:AB,ctrlFHijack:{type:"boolean"},defaultSampleLanguage:{type:"string"},disableDeepLinks:{type:"boolean"},disableSearch:{type:"boolean"},disableSidebar:{type:"boolean"},downloadDefinitionUrl:{type:"string"},expandDefaultServerVariables:{type:"boolean"},enumSkipQuotes:{type:"boolean"},expandDefaultRequest:{type:"boolean"},expandDefaultResponse:{type:"boolean"},expandResponses:{type:"string"},expandSingleSchemaField:{type:"boolean"},generateCodeSamples:PB,generatedPayloadSamplesMaxDepth:{type:"number"},hideDownloadButton:{type:"boolean"},hideHostname:{type:"boolean"},hideInfoSection:{type:"boolean"},hideLogo:{type:"boolean"},hideRequestPayloadSample:{type:"boolean"},hideRightPanel:{type:"boolean"},hideSchemaPattern:{type:"boolean"},hideSingleRequestSampleTab:{type:"boolean"},hideSecuritySection:{type:"boolean"},hideTryItPanel:{type:"boolean"},hideFab:{type:"boolean"},hideOneOfDescription:{type:"boolean"},htmlTemplate:{type:"string"},jsonSampleExpandLevel:{oneOf:[{type:"number",minimum:1},{type:"string"}]},labels:X3,menuToggle:{type:"boolean"},nativeScrollbars:{type:"boolean"},noAutoAuth:{type:"boolean"},onDeepLinkClick:{type:"object"},pagination:{enum:["none","section","item"]},pathInMiddlePanel:{type:"boolean"},payloadSampleIdx:{type:"number",minimum:0},requestInterceptor:{type:"object"},requiredPropsFirst:{type:"boolean"},routingStrategy:{type:"string"},samplesTabsMaxCount:{type:"number"},schemaExpansionLevel:{oneOf:[{type:"number",minimum:0},{type:"string"}]},minCharacterLengthToInitSearch:{type:"number",minimum:1},maxResponseHeadersToShowInTryIt:{type:"number",minimum:0},scrollYOffset:{oneOf:[{type:"number"},{type:"string"}]},searchAutoExpand:{type:"boolean"},searchFieldLevelBoost:{type:"number",minimum:0},searchMaxDepth:{type:"number",minimum:1},searchMode:{type:"string",enum:["default","path-only"]},searchOperationTitleBoost:{type:"number"},searchTagTitleBoost:{type:"number"},sendXUserAgentInTryIt:{type:"boolean"},showChangeLayoutButton:{type:"boolean"},showConsole:{type:"boolean"},showNextButton:{type:"boolean"},showRightPanelToggle:{type:"boolean"},showSecuritySchemeType:{type:"boolean"},showWebhookVerb:{type:"boolean"},showObjectSchemaExamples:{type:"boolean"},disableTryItRequestUrlEncoding:{type:"boolean"},sidebarLinks:G3,sideNavStyle:{type:"string",enum:["summary-only","path-first","id-only"]},simpleOneOfTypeLabel:{type:"boolean"},sortEnumValuesAlphabetically:{type:"boolean"},sortOperationsAlphabetically:{type:"boolean"},sortPropsAlphabetically:{type:"boolean"},sortTagsAlphabetically:{type:"boolean"},suppressWarnings:{type:"boolean"},unstable_externalDescription:{type:"boolean"},unstable_ignoreMimeParameters:{type:"boolean"},untrustedDefinition:{type:"boolean"},showAccessMode:{type:"boolean"},preserveOriginalExtensionsName:{type:"boolean"},markdownHeadingsAnchorLevel:{type:"number"}},additionalProperties:!1};function Rd(t,e){return Object.fromEntries(e.filter(n=>n in t).map(n=>[n,t[n]]))}function Ea(t,e){return Object.fromEntries(Object.entries(t).filter(([n])=>!e.includes(n)))}const jn={type:"object",properties:{hide:{type:"boolean"}},additionalProperties:!1},hy={type:"object",properties:{src:{type:"string"},async:{type:"boolean"},crossorigin:{type:"string"},defer:{type:"boolean"},fetchpriority:{type:"string"},integrity:{type:"string"},module:{type:"boolean"},nomodule:{type:"boolean"},nonce:{type:"string"},referrerpolicy:{type:"string"},type:{type:"string"}},required:["src"],additionalProperties:!0},Wh={type:"object",properties:{page:{type:"string"},directory:{type:"string"},disconnect:{type:"boolean",default:!1},group:{type:"string"},label:{type:"string"},href:{type:"string"},external:{type:"boolean"},labelTranslationKey:{type:"string"},groupTranslationKey:{type:"string"},icon:{oneOf:[{type:"string"},{type:"object",properties:{srcSet:{type:"string"}},required:["srcSet"]}]},separator:{type:"string"},separatorLine:{type:"boolean"},linePosition:{type:"string",enum:["top","bottom"],default:"top"},version:{type:"string"},menuStyle:{type:"string",enum:["drilldown"]},expanded:{type:"string",const:"always"},selectFirstItemOnExpand:{type:"boolean"},flatten:{type:"boolean"},linkedSidebars:{type:"array",items:{type:"string"}},items:{type:"array",items:{type:"object",additionalProperties:!0}}}},PO={type:"array",items:Object.assign(Object.assign({},Wh),{properties:Object.assign(Object.assign({},Wh.properties),{items:{type:"array",items:Wh}})})},IB={type:"object",properties:{name:{type:"string"},icon:{type:"string"},folder:{type:"string"}},additionalProperties:!1,required:["name","folder"]},TB={type:"object",properties:{hide:{type:"boolean",default:!1},prompt:{type:"string"}},additionalProperties:!1},$B={type:"array",items:{type:"object",required:["name","field","type"],properties:{name:{type:"string"},field:{type:"string"},type:{type:"string",enum:["multi-select","select","tags"]},isTop:{type:"boolean"}},additionalProperties:!1}},jB={type:"object",properties:{page:{type:"string"},label:{type:"string"},labelTranslationKey:{type:"string"}},required:["page"]},AA={type:"object",properties:{image:{type:"string"},srcSet:{type:"string"},altText:{type:"string"},link:{type:"string"},favicon:{type:"string"}},additionalProperties:!1},PA={type:"object",properties:Object.assign({items:PO},jn.properties),additionalProperties:!1},EA={type:"object",additionalProperties:IB},IA={type:"object",properties:Object.assign({items:PO,copyrightText:{type:"string"},logo:jn},jn.properties),additionalProperties:!1},TA={type:"object",properties:Object.assign({separatorLine:{type:"boolean"},linePosition:{type:"string",enum:["top","bottom"],default:"bottom"}},jn.properties),additionalProperties:!1},$A={type:"object",properties:{head:{type:"array",items:hy},body:{type:"array",items:hy}},additionalProperties:!1},jA={type:"array",items:{type:"object",properties:{href:{type:"string"},as:{type:"string"},crossorigin:{type:"string"},fetchpriority:{type:"string"},hreflang:{type:"string"},imagesizes:{type:"string"},imagesrcset:{type:"string"},integrity:{type:"string"},media:{type:"string"},prefetch:{type:"string"},referrerpolicy:{type:"string"},rel:{type:"string"},sizes:{type:"string"},title:{type:"string"},type:{type:"string"}},required:["href"],additionalProperties:!0}},RA={type:"object",properties:Object.assign({engine:{type:"string",enum:["flexsearch","typesense"],default:"flexsearch"},ai:TB,facets:$B,placement:{type:"string",default:"navbar"},shortcuts:{type:"array",items:{type:"string"},default:["/"]},suggestedPages:{type:"array",items:jB}},jn.properties),additionalProperties:!1},DA={type:"object",properties:Object.assign({ignoreDetection:{type:"boolean"},modes:{type:"array",items:{type:"string"},default:["light","dark"]}},jn.properties),additionalProperties:!1},QA={type:"object",properties:{nextButton:{type:"object",properties:Object.assign({text:{type:"string",default:"Next page"}},jn.properties),additionalProperties:!1,default:{}},previousButton:{type:"object",properties:Object.assign({text:{type:"string",default:"Previous page"}},jn.properties),additionalProperties:!1,default:{}}},additionalProperties:!1},BA={type:"object",properties:{elementFormat:{type:"string",default:"icon"},copy:{type:"object",properties:Object.assign({},jn.properties),additionalProperties:!1,default:{hide:!1}},report:{type:"object",properties:Object.assign({tooltipText:{type:"string"},buttonText:{type:"string"},label:{type:"string"}},jn.properties),additionalProperties:!1,default:{hide:!1}},expand:{type:"object",properties:Object.assign({},jn.properties),additionalProperties:!1,default:{hide:!1}},collapse:{type:"object",properties:Object.assign({},jn.properties),additionalProperties:!1,default:{hide:!1}}},additionalProperties:!1},_A={type:"object",properties:{frontMatterKeysToResolve:{type:"array",items:{type:"string"},default:["image","links"]},partialsFolders:{type:"array",items:{type:"string"},default:["_partials"]},lastUpdatedBlock:{type:"object",properties:Object.assign({format:{type:"string",enum:["timeago","iso","long","short"],default:"timeago"},locale:{type:"string"}},jn.properties),additionalProperties:!1,default:{}},toc:{type:"object",properties:Object.assign({header:{type:"string",default:"On this page"},depth:{type:"integer",default:3,minimum:1}},jn.properties),additionalProperties:!1,default:{}},editPage:{type:"object",properties:Object.assign({baseUrl:{type:"string"}},jn.properties),additionalProperties:!1,default:{}}},additionalProperties:!1,default:{}},vf=Object.assign(Object.assign({},ay),{properties:Object.assign(Object.assign({},ay.properties),EB.properties)}),RB={type:"object",properties:{includeInDevelopment:{type:"boolean"},scriptUrl:{type:"string"},pageViewEventName:{type:"string"}},additionalProperties:!1,required:["scriptUrl"]},DB={type:"object",properties:{includeInDevelopment:{type:"boolean"},apiKey:{type:"string"},head:{type:"boolean"},respectDNT:{type:"boolean"},exclude:{type:"array",items:{type:"string"}},outboundClickEventName:{type:"string"},pageViewEventName:{type:"string"},amplitudeConfig:{type:"object",additionalProperties:!0}},additionalProperties:!1,required:["apiKey"]},QB={type:"object",properties:{includeInDevelopment:{type:"boolean"},orgId:{type:"string"}},additionalProperties:!1,required:["orgId"]},BB={type:"object",properties:{includeInDevelopment:{type:"boolean"},appId:{type:"string"}},additionalProperties:!1,required:["appId"]},_B={type:"object",properties:{includeInDevelopment:{type:"boolean"},writeKey:{type:"string",minLength:10},trackPage:{type:"boolean"},dataPlaneUrl:{type:"string"},controlPlaneUrl:{type:"string"},sdkUrl:{type:"string"},loadOptions:{type:"object",additionalProperties:!0}},additionalProperties:!1,required:["writeKey"]},MB={type:"object",properties:{includeInDevelopment:{type:"boolean"},writeKey:{type:"string",minLength:10},trackPage:{type:"boolean"},includeTitleInPageCall:{type:"boolean"},host:{type:"string"}},additionalProperties:!1,required:["writeKey"]},NB={type:"object",properties:{includeInDevelopment:{type:"boolean"},trackingId:{type:"string"},gtmAuth:{type:"string"},gtmPreview:{type:"string"},defaultDataLayer:{},dataLayerName:{type:"string"},enableWebVitalsTracking:{type:"boolean"},selfHostedOrigin:{type:"string"},pageViewEventName:{type:"string"}},additionalProperties:!1,required:["trackingId"]},MA={type:"object",properties:{includeInDevelopment:{type:"boolean"},trackingId:{type:"string"},conversionId:{type:"string"},floodlightId:{type:"string"},optimizeId:{type:"string"},exclude:{type:"array",items:{type:"string"}}},additionalProperties:!1,required:["trackingId"]},FB={type:"object",properties:{includeInDevelopment:{type:"boolean"},trackingId:{type:"string"},conversionId:{type:"string"},floodlightId:{type:"string"},head:{type:"boolean"},respectDNT:{type:"boolean"},exclude:{type:"array",items:{type:"string"}},optimizeId:{type:"string"},anonymizeIp:{type:"boolean"},cookieExpires:{type:"number"},trackers:{type:"object",additionalProperties:MA}},additionalProperties:!1,required:["trackingId"]},NA={type:"object",properties:{adobe:RB,amplitude:DB,fullstory:QB,heap:BB,rudderstack:_B,segment:MB,gtm:NB,ga:FB}},FA={type:"object",properties:Object.assign({items:{type:"array",items:{type:"object",properties:{label:{type:"string"},external:{type:"boolean"},link:{type:"string"},separatorLine:{type:"boolean"}},additionalProperties:!0},default:[]},hideLoginButton:{type:"boolean"}},jn.properties),additionalProperties:!1},ZA={type:"object",properties:{hide:{type:"boolean"},showForUnversioned:{type:"boolean"}}},WA={type:"object",properties:{hide:{type:"boolean"},prefixItems:{type:"array",items:{type:"object",properties:{label:{type:"string"},labelTranslationKey:{type:"string"},page:{type:"string"}},additionalProperties:!1,default:{}}}},additionalProperties:!1},ZB={type:"object",additionalProperties:!1,required:["title","property"],properties:{type:{type:"string",enum:["select","checkboxes","date-range"],default:"checkboxes"},title:{type:"string"},titleTranslationKey:{type:"string"},property:{type:"string"},parentFilter:{type:"string"},valuesMapping:{type:"object",additionalProperties:{type:"string"}},missingCategoryName:{type:"string"},missingCategoryNameTranslationKey:{type:"string"},options:{type:"array",items:{type:"string"}}}},WB={type:"object",additionalProperties:!0,required:["slug","items"],properties:{slug:{type:"string"},filters:{type:"array",items:ZB},groupByFirstFilter:{type:"boolean"},filterValuesCasing:{type:"string",enum:["sentence","original","lowercase","uppercase"]},items:PO,requiredPermission:{type:"string"},separateVersions:{type:"boolean"},title:{type:"string"},titleTranslationKey:{type:"string"},description:{type:"string"},descriptionTranslationKey:{type:"string"}}},VA={type:"object",patternProperties:{".*":WB}},zA={type:"object",additionalProperties:!0,required:[],properties:{ignoreNonCompliant:{type:"boolean",default:!1},teamMetadataProperty:{type:"object",properties:{property:{type:"string"},label:{type:"string"},default:{type:"string"}}},levels:{type:"array",items:{type:"object",required:["name"],properties:{name:{type:"string"},color:{type:"string"},extends:{type:"array",items:{type:"string"}},rules:{type:"object",additionalProperties:{oneOf:[{type:"string"},{type:"object"}]}}},additionalProperties:!1}},targets:{type:"array",items:{type:"object",required:["where"],properties:{minimumLevel:{type:"string"},rules:{type:"object",additionalProperties:!0},where:{type:"object",required:["metadata"],properties:{metadata:{type:"object",additionalProperties:{type:"string"}}},additionalProperties:!1}},additionalProperties:!1}},ignore:{type:"array",items:{type:"string"}}}},_r={type:"object",properties:{imports:{type:"array",items:{type:"string"}},logo:AA,navbar:PA,products:EA,footer:IA,sidebar:TA,scripts:$A,links:jA,feedback:jd,search:RA,colorMode:DA,navigation:QA,codeSnippet:BA,markdown:_A,openapi:vf,graphql:Of,analytics:NA,userMenu:FA,versionPicker:ZA,breadcrumbs:WA,catalog:VA,scorecard:zA},additionalProperties:!0};Object.assign(Object.assign({},_r),{additionalProperties:!1});const VB="https://redocly.com/sso/teams";var yf;(function(t){t.OIDC="OIDC",t.SAML2="SAML2"})(yf||(yf={}));var bf;(function(t){t.SERVICE_ACCOUNT="SERVICE_ACCOUNT",t.OAUTH2="OAUTH2"})(bf||(bf={}));var py;(function(t){t.STACKED="stacked",t.THREE_PANEL="three-panel"})(py||(py={}));function Jg(t,e){return Object.fromEntries(Object.entries(t).map(([n,r])=>{if(n!==e)return typeof r!="object"||!r?[n,r]:Array.isArray(r)?[n,r.map(i=>typeof i=="object"?Jg(i,e):i)]:[n,Jg(r,e)]}).filter(Boolean))}const zB={type:"object",additionalProperties:{type:"string"}},LB={type:"object",additionalProperties:!1,properties:{event:{type:"string",enum:["schedule"]},interval:{type:"string",pattern:"^[1-9]\\d*[mhdw]$"}},required:["event"]},XB={type:"object",properties:{ignoreLint:{oneOf:[{type:"boolean",default:!1},{type:"object",additionalProperties:{type:"boolean"}}]},ignoreLinkChecker:{type:"boolean"},ignoreMarkdocErrors:{type:"boolean"},jobs:{type:"array",items:{type:"object",properties:{path:{type:"string",pattern:"^(?!\\.\\./)(/[a-zA-Z0-9_\\-\\./]+|./[a-zA-Z0-9_\\-\\./]+|[a-zA-Z0-9_\\-\\./]+)$"},agent:{type:"string",enum:["spot"]},trigger:LB,inputs:zB},required:["path","trigger","agent"],additionalProperties:!1}}},additionalProperties:!1},GB={type:"object",properties:{end_session_endpoint:{type:"string"},token_endpoint:{type:"string"},authorization_endpoint:{type:"string"},jwks_uri:{type:"string"}},required:["token_endpoint","authorization_endpoint"],additionalProperties:!0},YB={type:"object",properties:{type:{type:"string",const:yf.OIDC},title:{type:"string"},pkce:{type:"boolean",default:!1},configurationUrl:{type:"string",minLength:1},configuration:GB,clientId:{type:"string",minLength:1},clientSecret:{type:"string",minLength:0},teamsClaimName:{type:"string"},teamsClaimMap:{type:"object",additionalProperties:{type:"string"}},defaultTeams:{type:"array",items:{type:"string"}},scopes:{type:"array",items:{type:"string"}},tokenExpirationTime:{type:"number"},authorizationRequestCustomParams:{type:"object",additionalProperties:{type:"string"}},tokenRequestCustomParams:{type:"object",additionalProperties:{type:"string"}},audience:{type:"array",items:{type:"string"}}},required:["type","clientId"],oneOf:[{required:["configurationUrl"]},{required:["configuration"]}],additionalProperties:!1},qB={type:"object",properties:{type:{type:"string",const:yf.SAML2},title:{type:"string"},issuerId:{type:"string"},entityId:{type:"string"},ssoUrl:{type:"string"},x509PublicCert:{type:"string"},teamsAttributeName:{type:"string",default:VB},teamsAttributeMap:{type:"object",additionalProperties:{type:"string"}},defaultTeams:{type:"array",items:{type:"string"}}},additionalProperties:!1,required:["type","issuerId","ssoUrl","x509PublicCert"]},UB={oneOf:[YB,qB],discriminator:{propertyName:"type"}},HB={type:"object",additionalProperties:UB},JB={oneOf:[{type:"array",items:{type:"string",enum:["REDOCLY","CORPORATE","GUEST"]},uniqueItems:!0},{type:"string",enum:["REDOCLY","CORPORATE","GUEST"]}]},KB={type:"object",properties:{to:{type:"string"},type:{type:"number",default:301}},additionalProperties:!1},e_={type:"object",additionalProperties:KB,default:{}},LA={type:"object",additionalProperties:{oneOf:[{type:"string"},{type:"object"}]}},XA={type:"object",properties:{root:{type:"string"},output:{type:"string",pattern:"(.ya?ml|.json)$"},rbac:{type:"object",additionalProperties:!0},openapi:vf,graphql:Of,theme:{type:"object",properties:{openapi:vf,graphql:Of},additionalProperties:!1},title:{type:"string"},metadata:{type:"object",additionalProperties:!0},rules:LA,decorators:{type:"object",additionalProperties:!0},preprocessors:{type:"object",additionalProperties:!0}},required:["root"]},t_={type:"object",additionalProperties:!0},n_={type:"object",additionalProperties:{type:"object",additionalProperties:!0}},r_={type:"object",properties:{title:{type:"string"},description:{type:"string"},siteUrl:{type:"string"},image:{type:"string"},keywords:{oneOf:[{type:"array",items:{type:"string"}},{type:"string"}]},lang:{type:"string"},jsonLd:{type:"object"},meta:{type:"array",items:{type:"object",properties:{name:{type:"string"},content:{type:"string"}},required:["name","content"],additionalProperties:!1}}},additionalProperties:!1},_o={type:"object",additionalProperties:{type:"string"}},i_={type:"object",properties:{teamNamePatterns:{type:"array",items:{type:"string"}},teamFolders:{type:"array",items:{type:"string"}},teamFoldersBaseRoles:_o,cms:_o,reunite:_o,features:{type:"object",properties:{aiSearch:_o},additionalProperties:!1},content:{type:"object",properties:{"**":_o},additionalProperties:_o}},additionalProperties:_o},o_={type:"object",properties:{static:{type:"string"}},additionalProperties:!1,required:["static"]},s_={type:"object",properties:{idp:{type:"string"}},additionalProperties:!1,required:["idp"]},a_={type:"object",properties:{type:{type:"string",const:"GRAVITEE"},apiBaseUrl:{type:"string"},env:{type:"string"},allowApiProductsOutsideCatalog:{type:"boolean",default:!1},stage:{type:"string",default:"non-production"},auth:{oneOf:[o_,s_]}},additionalProperties:!1,required:["type","apiBaseUrl"]},l_={type:"object",properties:{type:{type:"string",const:bf.OAUTH2},tokenEndpoint:{type:"string"},clientId:{type:"string"},clientSecret:{type:"string"}},additionalProperties:!1,required:["type","tokenEndpoint","clientId","clientSecret"]},c_={type:"object",properties:{type:{type:"string",const:bf.SERVICE_ACCOUNT},serviceAccountEmail:{type:"string"},serviceAccountPrivateKey:{type:"string"}},additionalProperties:!1,required:["type","serviceAccountEmail","serviceAccountPrivateKey"]},Kg={type:"object",properties:{type:{type:"string",const:"APIGEE_X"},apiUrl:{type:"string"},stage:{type:"string",default:"non-production"},organizationName:{type:"string"},ignoreApiProducts:{type:"array",items:{type:"string"}},allowApiProductsOutsideCatalog:{type:"boolean",default:!1},auth:{type:"object",oneOf:[l_,c_],discriminator:{propertyName:"type"}}},additionalProperties:!1,required:["type","organizationName","auth"]},u_=Object.assign(Object.assign({},Kg),{properties:Object.assign(Object.assign({},Kg.properties),{type:{type:"string",const:"APIGEE_EDGE"}})}),f_={type:"object",oneOf:[Kg,u_,a_],discriminator:{propertyName:"type"}},d_={type:"object",required:["adapters"],additionalProperties:!1,properties:{adapters:{type:"array",items:f_}}},gy={type:"object",properties:{defaultLocale:{type:"string"},locales:{type:"array",items:{type:"object",properties:{code:{type:"string"},name:{type:"string"}},required:["code"]}}},additionalProperties:!1,required:["defaultLocale"]},h_={type:"object",properties:{name:{type:"string"},value:{type:"string"}},additionalProperties:!1,required:["name","value"]},e0={type:"object",properties:{imports:{type:"array",items:{type:"string"}},licenseKey:{type:"string"},redirects:e_,seo:r_,rbac:i_,requiresLogin:{type:"boolean"},responseHeaders:{type:"object",additionalProperties:{type:"array",items:h_}},mockServer:{type:"object",properties:{off:{type:"boolean",default:!1},position:{type:"string",enum:["first","last","replace","off"],default:"first"},strictExamples:{type:"boolean",default:!1},errorIfForcedExampleNotFound:{type:"boolean",default:!1},description:{type:"string"}}},apis:{type:"object",additionalProperties:XA},rules:LA,decorators:{type:"object",additionalProperties:!0},preprocessors:{type:"object",additionalProperties:!0},ssoDirect:HB,sso:JB,residency:{type:"string"},developerOnboarding:d_,removeAttribution:{type:"boolean"},i18n:gy,l10n:gy,metadata:t_,metadataGlobs:n_,ignore:{type:"array",items:{type:"string"}},theme:_r,reunite:XB,logo:AA,navbar:PA,products:EA,footer:IA,sidebar:TA,scripts:$A,links:jA,feedback:jd,search:RA,colorMode:DA,navigation:QA,codeSnippet:BA,markdown:_A,openapi:vf,graphql:Of,analytics:NA,userMenu:FA,versionPicker:ZA,breadcrumbs:WA,catalog:VA,scorecard:zA},default:{redirects:{}},additionalProperties:!0},p_=Object.assign(Object.assign({},Jg(e0,"default")),{additionalProperties:!1});Object.assign(Object.assign({$id:"root-redocly-config"},e0),{properties:Object.assign(Object.assign({plugins:{type:"array",items:{type:"string"}}},e0.properties),{env:{type:"object",additionalProperties:p_}}),default:{},additionalProperties:!1});const my={type:"object",properties:{logo:_r.properties.logo,navbar:_r.properties.navbar,footer:_r.properties.footer,sidebar:_r.properties.sidebar,search:_r.properties.search,codeSnippet:_r.properties.codeSnippet,breadcrumbs:_r.properties.breadcrumbs,openapi:_r.properties.openapi,feedback:_r.properties.feedback,analytics:{type:"object",properties:{ga:MA}}},additionalProperties:!0,default:{}};Object.assign(Object.assign({},my.properties),{apis:{type:"object",additionalProperties:XA},theme:my});var GA={exports:{}};/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
205
205
  * @license MIT */(function(t,e){(function(n,r){t.exports=r()})(Fe,function(){var n={};n.version="0.2.0";var r=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};n.configure=function(p){var O,m;for(O in p)m=p[O],m!==void 0&&p.hasOwnProperty(O)&&(r[O]=m);return this},n.status=null,n.set=function(p){var O=n.isStarted();p=i(p,r.minimum,1),n.status=p===1?null:p;var m=n.render(!O),x=m.querySelector(r.barSelector),v=r.speed,y=r.easing;return m.offsetWidth,a(function(S){r.positionUsing===""&&(r.positionUsing=n.getPositioningCSS()),l(x,s(p,v,y)),p===1?(l(m,{transition:"none",opacity:1}),m.offsetWidth,setTimeout(function(){l(m,{transition:"all "+v+"ms linear",opacity:0}),setTimeout(function(){n.remove(),S()},v)},v)):setTimeout(S,v)}),this},n.isStarted=function(){return typeof n.status=="number"},n.start=function(){n.status||n.set(0);var p=function(){setTimeout(function(){n.status&&(n.trickle(),p())},r.trickleSpeed)};return r.trickle&&p(),this},n.done=function(p){return!p&&!n.status?this:n.inc(.3+.5*Math.random()).set(1)},n.inc=function(p){var O=n.status;return O?(typeof p!="number"&&(p=(1-O)*i(Math.random()*O,.1,.95)),O=i(O+p,0,.994),n.set(O)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},function(){var p=0,O=0;n.promise=function(m){return!m||m.state()==="resolved"?this:(O===0&&n.start(),p++,O++,m.always(function(){O--,O===0?(p=0,n.done()):n.set((p-O)/p)}),this)}}(),n.render=function(p){if(n.isRendered())return document.getElementById("nprogress");u(document.documentElement,"nprogress-busy");var O=document.createElement("div");O.id="nprogress",O.innerHTML=r.template;var m=O.querySelector(r.barSelector),x=p?"-100":o(n.status||0),v=document.querySelector(r.parent),y;return l(m,{transition:"all 0 linear",transform:"translate3d("+x+"%,0,0)"}),r.showSpinner||(y=O.querySelector(r.spinnerSelector),y&&h(y)),v!=document.body&&u(v,"nprogress-custom-parent"),v.appendChild(O),O},n.remove=function(){f(document.documentElement,"nprogress-busy"),f(document.querySelector(r.parent),"nprogress-custom-parent");var p=document.getElementById("nprogress");p&&h(p)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var p=document.body.style,O="WebkitTransform"in p?"Webkit":"MozTransform"in p?"Moz":"msTransform"in p?"ms":"OTransform"in p?"O":"";return O+"Perspective"in p?"translate3d":O+"Transform"in p?"translate":"margin"};function i(p,O,m){return p<O?O:p>m?m:p}function o(p){return(-1+p)*100}function s(p,O,m){var x;return r.positionUsing==="translate3d"?x={transform:"translate3d("+o(p)+"%,0,0)"}:r.positionUsing==="translate"?x={transform:"translate("+o(p)+"%,0)"}:x={"margin-left":o(p)+"%"},x.transition="all "+O+"ms "+m,x}var a=function(){var p=[];function O(){var m=p.shift();m&&m(O)}return function(m){p.push(m),p.length==1&&O()}}(),l=function(){var p=["Webkit","O","Moz","ms"],O={};function m(S){return S.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(b,w){return w.toUpperCase()})}function x(S){var b=document.body.style;if(S in b)return S;for(var w=p.length,C=S.charAt(0).toUpperCase()+S.slice(1),k;w--;)if(k=p[w]+C,k in b)return k;return S}function v(S){return S=m(S),O[S]||(O[S]=x(S))}function y(S,b,w){b=v(b),S.style[b]=w}return function(S,b){var w=arguments,C,k;if(w.length==2)for(C in b)k=b[C],k!==void 0&&b.hasOwnProperty(C)&&y(S,C,k);else y(S,w[1],w[2])}}();function c(p,O){var m=typeof p=="string"?p:d(p);return m.indexOf(" "+O+" ")>=0}function u(p,O){var m=d(p),x=m+O;c(m,O)||(p.className=x.substring(1))}function f(p,O){var m=d(p),x;c(p,O)&&(x=m.replace(" "+O+" "," "),p.className=x.substring(1,x.length-1))}function d(p){return(" "+(p.className||"")+" ").replace(/\s+/gi," ")}function h(p){p&&p.parentNode&&p.parentNode.removeChild(p)}return n})})(GA);var g_=GA.exports;const m_=wa(g_);m_.configure({trickleSpeed:100,template:'<div class="bar" role="bar"><div class="peg"></div></div>'});var br=(t=>(t.Normal="Normal",t.Edit="Edit",t.Draft="Draft",t))(br||{}),Sr=(t=>(t.Server="Server",t.ServerUrl="ServerUrl",t.Path="Path",t.UserCreated="UserCreated",t.Security="Security",t))(Sr||{}),YA={exports:{}};/*!
206
206
  Copyright (c) 2018 Jed Watson.
207
207
  Licensed under the MIT License (MIT), see
208
208
  http://jedwatson.github.io/classnames
209
- */(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var o="",s=0;s<arguments.length;s++){var a=arguments[s];a&&(o=i(o,r(a)))}return o}function r(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var s="";for(var a in o)e.call(o,a)&&o[a]&&(s=i(s,a));return s}function i(o,s){return s?o?o+" "+s:o+s:o}t.exports?(n.default=n,t.exports=n):window.classNames=n})()})(YA);var O_=YA.exports;const co=wa(O_);function x_(t){var e=t.children,n=t.prefixCls,r=t.id,i=t.overlayInnerStyle,o=t.className,s=t.style;return X.createElement("div",{className:co("".concat(n,"-content"),o),style:s},X.createElement("div",{className:"".concat(n,"-inner"),id:r,role:"tooltip",style:i},typeof e=="function"?e():e))}function t0(){return t0=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},t0.apply(this,arguments)}function ia(t){"@babel/helpers - typeof";return ia=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},ia(t)}function v_(t,e){if(ia(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(ia(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function y_(t){var e=v_(t,"string");return ia(e)=="symbol"?e:e+""}function b_(t,e,n){return e=y_(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Oy(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Sf(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Oy(Object(n),!0).forEach(function(r){b_(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Oy(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function S_(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function w_(t,e){if(t==null)return{};var n=S_(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function hi(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var n0={},EO=[],C_=function(e){EO.push(e)};function wf(t,e){if(process.env.NODE_ENV!=="production"&&!t&&console!==void 0){var n=EO.reduce(function(r,i){return i(r??"","warning")},e);n&&console.error("Warning: ".concat(n))}}function k_(t,e){if(process.env.NODE_ENV!=="production"&&!t&&console!==void 0){var n=EO.reduce(function(r,i){return i(r??"","note")},e);n&&console.warn("Note: ".concat(n))}}function A_(){n0={}}function qA(t,e,n){!e&&!n0[n]&&(t(!1,n),n0[n]=!0)}function Dd(t,e){qA(wf,t,e)}function P_(t,e){qA(k_,t,e)}Dd.preMessage=C_;Dd.resetWarned=A_;Dd.noteOnce=P_;function E_(t,e,n){var r=X.useRef({});return(!("value"in r.current)||n(r.current.condition,e))&&(r.current.value=t(),r.current.condition=e),r.current.value}function IO(t,e){typeof t=="function"?t(e):ia(t)==="object"&&t&&"current"in t&&(t.current=e)}function UA(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=e.filter(function(i){return i});return r.length<=1?r[0]:function(i){e.forEach(function(o){IO(o,i)})}}function TO(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return E_(function(){return UA.apply(void 0,e)},e,function(r,i){return r.length!==i.length||r.every(function(o,s){return o!==i[s]})})}function Qd(t){var e,n,r=Go.isMemo(t)?t.type.type:t.type;return!(typeof r=="function"&&!((e=r.prototype)!==null&&e!==void 0&&e.render)&&r.$$typeof!==Go.ForwardRef||typeof t=="function"&&!((n=t.prototype)!==null&&n!==void 0&&n.render)&&t.$$typeof!==Go.ForwardRef)}var HA=X.createContext(null),xy=process.env.NODE_ENV!=="test"&&hi()?X.useLayoutEffect:X.useEffect,hr=function(e,n){var r=X.useRef(!0);xy(function(){return e(r.current)},n),xy(function(){return r.current=!1,function(){r.current=!0}},[])},vy=[];function I_(t,e){var n=X.useState(function(){if(!hi())return null;var p=document.createElement("div");return process.env.NODE_ENV!=="production"&&e&&p.setAttribute("data-debug",e),p}),r=Ve(n,1),i=r[0],o=X.useRef(!1),s=X.useContext(HA),a=X.useState(vy),l=Ve(a,2),c=l[0],u=l[1],f=s||(o.current?void 0:function(p){u(function(O){var m=[p].concat(na(O));return m})});function d(){i.parentElement||document.body.appendChild(i),o.current=!0}function h(){var p;(p=i.parentElement)===null||p===void 0||p.removeChild(i),o.current=!1}return hr(function(){return t?s?s(d):d():h(),h},[t]),hr(function(){c.length&&(c.forEach(function(p){return p()}),u(vy))},[c]),[i,f]}function T_(t,e){if(!t)return!1;if(t.contains)return t.contains(e);for(var n=e;n;){if(n===t)return!0;n=n.parentNode}return!1}var yy="data-rc-order",by="data-rc-priority",$_="rc-util-key",r0=new Map;function JA(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.mark;return e?e.startsWith("data-")?e:"data-".concat(e):$_}function Bd(t){if(t.attachTo)return t.attachTo;var e=document.querySelector("head");return e||document.body}function j_(t){return t==="queue"?"prependQueue":t?"prepend":"append"}function $O(t){return Array.from((r0.get(t)||t).children).filter(function(e){return e.tagName==="STYLE"})}function KA(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!hi())return null;var n=e.csp,r=e.prepend,i=e.priority,o=i===void 0?0:i,s=j_(r),a=s==="prependQueue",l=document.createElement("style");l.setAttribute(yy,s),a&&o&&l.setAttribute(by,"".concat(o)),n!=null&&n.nonce&&(l.nonce=n==null?void 0:n.nonce),l.innerHTML=t;var c=Bd(e),u=c.firstChild;if(r){if(a){var f=(e.styles||$O(c)).filter(function(d){if(!["prepend","prependQueue"].includes(d.getAttribute(yy)))return!1;var h=Number(d.getAttribute(by)||0);return o>=h});if(f.length)return c.insertBefore(l,f[f.length-1].nextSibling),l}c.insertBefore(l,u)}else c.appendChild(l);return l}function eP(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=Bd(e);return(e.styles||$O(n)).find(function(r){return r.getAttribute(JA(e))===t})}function i0(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=eP(t,e);if(n){var r=Bd(e);r.removeChild(n)}}function R_(t,e){var n=r0.get(t);if(!n||!T_(document,n)){var r=KA("",e),i=r.parentNode;r0.set(t,i),t.removeChild(r)}}function tP(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=Bd(n),i=$O(r),o=Sf(Sf({},n),{},{styles:i});R_(r,o);var s=eP(e,o);if(s){var a,l;if((a=o.csp)!==null&&a!==void 0&&a.nonce&&s.nonce!==((l=o.csp)===null||l===void 0?void 0:l.nonce)){var c;s.nonce=(c=o.csp)===null||c===void 0?void 0:c.nonce}return s.innerHTML!==t&&(s.innerHTML=t),s}var u=KA(t,o);return u.setAttribute(JA(o),e),u}function D_(t){var e="rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7)),n=document.createElement("div");n.id=e;var r=n.style;r.position="absolute",r.left="0",r.top="0",r.width="100px",r.height="100px",r.overflow="scroll";var i,o;if(t){var s=getComputedStyle(t);r.scrollbarColor=s.scrollbarColor,r.scrollbarWidth=s.scrollbarWidth;var a=getComputedStyle(t,"::-webkit-scrollbar"),l=parseInt(a.width,10),c=parseInt(a.height,10);try{var u=l?"width: ".concat(a.width,";"):"",f=c?"height: ".concat(a.height,";"):"";tP(`
209
+ */(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var o="",s=0;s<arguments.length;s++){var a=arguments[s];a&&(o=i(o,r(a)))}return o}function r(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var s="";for(var a in o)e.call(o,a)&&o[a]&&(s=i(s,a));return s}function i(o,s){return s?o?o+" "+s:o+s:o}t.exports?(n.default=n,t.exports=n):window.classNames=n})()})(YA);var O_=YA.exports;const co=wa(O_);function x_(t){var e=t.children,n=t.prefixCls,r=t.id,i=t.overlayInnerStyle,o=t.className,s=t.style;return X.createElement("div",{className:co("".concat(n,"-content"),o),style:s},X.createElement("div",{className:"".concat(n,"-inner"),id:r,role:"tooltip",style:i},typeof e=="function"?e():e))}function t0(){return t0=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},t0.apply(this,arguments)}function ia(t){"@babel/helpers - typeof";return ia=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},ia(t)}function v_(t,e){if(ia(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(ia(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function y_(t){var e=v_(t,"string");return ia(e)=="symbol"?e:e+""}function b_(t,e,n){return e=y_(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Oy(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Sf(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Oy(Object(n),!0).forEach(function(r){b_(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Oy(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function S_(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function w_(t,e){if(t==null)return{};var n=S_(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function hi(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var n0={},EO=[],C_=function(e){EO.push(e)};function wf(t,e){if(process.env.NODE_ENV!=="production"&&!t&&console!==void 0){var n=EO.reduce(function(r,i){return i(r??"","warning")},e);n&&console.error("Warning: ".concat(n))}}function k_(t,e){if(process.env.NODE_ENV!=="production"&&!t&&console!==void 0){var n=EO.reduce(function(r,i){return i(r??"","note")},e);n&&console.warn("Note: ".concat(n))}}function A_(){n0={}}function qA(t,e,n){!e&&!n0[n]&&(t(!1,n),n0[n]=!0)}function Dd(t,e){qA(wf,t,e)}function P_(t,e){qA(k_,t,e)}Dd.preMessage=C_;Dd.resetWarned=A_;Dd.noteOnce=P_;function E_(t,e,n){var r=X.useRef({});return(!("value"in r.current)||n(r.current.condition,e))&&(r.current.value=t(),r.current.condition=e),r.current.value}function IO(t,e){typeof t=="function"?t(e):ia(t)==="object"&&t&&"current"in t&&(t.current=e)}function UA(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=e.filter(function(i){return i});return r.length<=1?r[0]:function(i){e.forEach(function(o){IO(o,i)})}}function TO(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return E_(function(){return UA.apply(void 0,e)},e,function(r,i){return r.length!==i.length||r.every(function(o,s){return o!==i[s]})})}function Qd(t){var e,n,r=Yo.isMemo(t)?t.type.type:t.type;return!(typeof r=="function"&&!((e=r.prototype)!==null&&e!==void 0&&e.render)&&r.$$typeof!==Yo.ForwardRef||typeof t=="function"&&!((n=t.prototype)!==null&&n!==void 0&&n.render)&&t.$$typeof!==Yo.ForwardRef)}var HA=X.createContext(null),xy=process.env.NODE_ENV!=="test"&&hi()?X.useLayoutEffect:X.useEffect,hr=function(e,n){var r=X.useRef(!0);xy(function(){return e(r.current)},n),xy(function(){return r.current=!1,function(){r.current=!0}},[])},vy=[];function I_(t,e){var n=X.useState(function(){if(!hi())return null;var p=document.createElement("div");return process.env.NODE_ENV!=="production"&&e&&p.setAttribute("data-debug",e),p}),r=Ve(n,1),i=r[0],o=X.useRef(!1),s=X.useContext(HA),a=X.useState(vy),l=Ve(a,2),c=l[0],u=l[1],f=s||(o.current?void 0:function(p){u(function(O){var m=[p].concat(na(O));return m})});function d(){i.parentElement||document.body.appendChild(i),o.current=!0}function h(){var p;(p=i.parentElement)===null||p===void 0||p.removeChild(i),o.current=!1}return hr(function(){return t?s?s(d):d():h(),h},[t]),hr(function(){c.length&&(c.forEach(function(p){return p()}),u(vy))},[c]),[i,f]}function T_(t,e){if(!t)return!1;if(t.contains)return t.contains(e);for(var n=e;n;){if(n===t)return!0;n=n.parentNode}return!1}var yy="data-rc-order",by="data-rc-priority",$_="rc-util-key",r0=new Map;function JA(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.mark;return e?e.startsWith("data-")?e:"data-".concat(e):$_}function Bd(t){if(t.attachTo)return t.attachTo;var e=document.querySelector("head");return e||document.body}function j_(t){return t==="queue"?"prependQueue":t?"prepend":"append"}function $O(t){return Array.from((r0.get(t)||t).children).filter(function(e){return e.tagName==="STYLE"})}function KA(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!hi())return null;var n=e.csp,r=e.prepend,i=e.priority,o=i===void 0?0:i,s=j_(r),a=s==="prependQueue",l=document.createElement("style");l.setAttribute(yy,s),a&&o&&l.setAttribute(by,"".concat(o)),n!=null&&n.nonce&&(l.nonce=n==null?void 0:n.nonce),l.innerHTML=t;var c=Bd(e),u=c.firstChild;if(r){if(a){var f=(e.styles||$O(c)).filter(function(d){if(!["prepend","prependQueue"].includes(d.getAttribute(yy)))return!1;var h=Number(d.getAttribute(by)||0);return o>=h});if(f.length)return c.insertBefore(l,f[f.length-1].nextSibling),l}c.insertBefore(l,u)}else c.appendChild(l);return l}function eP(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=Bd(e);return(e.styles||$O(n)).find(function(r){return r.getAttribute(JA(e))===t})}function i0(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=eP(t,e);if(n){var r=Bd(e);r.removeChild(n)}}function R_(t,e){var n=r0.get(t);if(!n||!T_(document,n)){var r=KA("",e),i=r.parentNode;r0.set(t,i),t.removeChild(r)}}function tP(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=Bd(n),i=$O(r),o=Sf(Sf({},n),{},{styles:i});R_(r,o);var s=eP(e,o);if(s){var a,l;if((a=o.csp)!==null&&a!==void 0&&a.nonce&&s.nonce!==((l=o.csp)===null||l===void 0?void 0:l.nonce)){var c;s.nonce=(c=o.csp)===null||c===void 0?void 0:c.nonce}return s.innerHTML!==t&&(s.innerHTML=t),s}var u=KA(t,o);return u.setAttribute(JA(o),e),u}function D_(t){var e="rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7)),n=document.createElement("div");n.id=e;var r=n.style;r.position="absolute",r.left="0",r.top="0",r.width="100px",r.height="100px",r.overflow="scroll";var i,o;if(t){var s=getComputedStyle(t);r.scrollbarColor=s.scrollbarColor,r.scrollbarWidth=s.scrollbarWidth;var a=getComputedStyle(t,"::-webkit-scrollbar"),l=parseInt(a.width,10),c=parseInt(a.height,10);try{var u=l?"width: ".concat(a.width,";"):"",f=c?"height: ".concat(a.height,";"):"";tP(`
210
210
  #`.concat(e,`::-webkit-scrollbar {
211
211
  `).concat(u,`
212
212
  `).concat(f,`
@@ -214,8 +214,8 @@ You should wrap it with \`css\` like this:
214
214
  html body {
215
215
  overflow-y: hidden;
216
216
  `.concat(s?"width: calc(100% - ".concat(o,"px);"):"",`
217
- }`),i)}else i0(i);return function(){i0(i)}},[e,i])}var N_=!1;function F_(t){return N_}var wy=function(e){return e===!1?!1:!hi()||!e?null:typeof e=="string"?document.querySelector(e):typeof e=="function"?e():e},jO=X.forwardRef(function(t,e){var n=t.open,r=t.autoLock,i=t.getContainer,o=t.debug,s=t.autoDestroy,a=s===void 0?!0:s,l=t.children,c=X.useState(n),u=Ve(c,2),f=u[0],d=u[1],h=f||n;process.env.NODE_ENV!=="production"&&Dd(hi()||!n,"Portal only work in client side. Please call 'useEffect' to show Portal instead default render in SSR."),X.useEffect(function(){(a||n)&&d(n)},[n,a]);var p=X.useState(function(){return wy(i)}),O=Ve(p,2),m=O[0],x=O[1];X.useEffect(function(){var $=wy(i);x($??null)});var v=I_(h&&!m,o),y=Ve(v,2),S=y[0],b=y[1],w=m??S;M_(r&&n&&hi()&&(w===S||w===document.body));var C=null;if(l&&Qd(l)&&e){var k=l;C=k.ref}var I=TO(C,e);if(!h||!hi()||m===void 0)return null;var A=w===!1||F_(),E=l;return e&&(E=X.cloneElement(l,{ref:I})),X.createElement(HA.Provider,{value:b},A?E:rO.createPortal(E,w))});process.env.NODE_ENV!=="production"&&(jO.displayName="Portal");function o0(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[];return X.default.Children.forEach(t,function(r){r==null&&!e.keepEmpty||(Array.isArray(r)?n=n.concat(o0(r)):Go.isFragment(r)&&r.props?n=n.concat(o0(r.props.children,e)):n.push(r))}),n}function Cf(t){return t instanceof HTMLElement||t instanceof SVGElement}function Mu(t){return Cf(t)?t:t instanceof X.default.Component?h5.default.findDOMNode(t):null}var s0=X.createContext(null);function Z_(t){var e=t.children,n=t.onBatchResize,r=X.useRef(0),i=X.useRef([]),o=X.useContext(s0),s=X.useCallback(function(a,l,c){r.current+=1;var u=r.current;i.current.push({size:a,element:l,data:c}),Promise.resolve().then(function(){u===r.current&&(n==null||n(i.current),i.current=[])}),o==null||o(a,l,c)},[n,o]);return X.createElement(s0.Provider,{value:s},e)}var nP=function(){if(typeof Map<"u")return Map;function t(e,n){var r=-1;return e.some(function(i,o){return i[0]===n?(r=o,!0):!1}),r}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(n){var r=t(this.__entries__,n),i=this.__entries__[r];return i&&i[1]},e.prototype.set=function(n,r){var i=t(this.__entries__,n);~i?this.__entries__[i][1]=r:this.__entries__.push([n,r])},e.prototype.delete=function(n){var r=this.__entries__,i=t(r,n);~i&&r.splice(i,1)},e.prototype.has=function(n){return!!~t(this.__entries__,n)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(n,r){r===void 0&&(r=null);for(var i=0,o=this.__entries__;i<o.length;i++){var s=o[i];n.call(r,s[1],s[0])}},e}()}(),a0=typeof window<"u"&&typeof document<"u"&&window.document===document,kf=function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()}(),W_=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(kf):function(t){return setTimeout(function(){return t(Date.now())},1e3/60)}}(),V_=2;function z_(t,e){var n=!1,r=!1,i=0;function o(){n&&(n=!1,t()),r&&a()}function s(){W_(o)}function a(){var l=Date.now();if(n){if(l-i<V_)return;r=!0}else n=!0,r=!1,setTimeout(s,e);i=l}return a}var L_=20,X_=["top","right","bottom","left","width","height","size","weight"],G_=typeof MutationObserver<"u",Y_=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=z_(this.refresh.bind(this),L_)}return t.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},t.prototype.removeObserver=function(e){var n=this.observers_,r=n.indexOf(e);~r&&n.splice(r,1),!n.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){var e=this.updateObservers_();e&&this.refresh()},t.prototype.updateObservers_=function(){var e=this.observers_.filter(function(n){return n.gatherActive(),n.hasActive()});return e.forEach(function(n){return n.broadcastActive()}),e.length>0},t.prototype.connect_=function(){!a0||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),G_?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){!a0||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(e){var n=e.propertyName,r=n===void 0?"":n,i=X_.some(function(o){return!!~r.indexOf(o)});i&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),rP=function(t,e){for(var n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];Object.defineProperty(t,i,{value:e[i],enumerable:!1,writable:!1,configurable:!0})}return t},oa=function(t){var e=t&&t.ownerDocument&&t.ownerDocument.defaultView;return e||kf},iP=_d(0,0,0,0);function Af(t){return parseFloat(t)||0}function Cy(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.reduce(function(r,i){var o=t["border-"+i+"-width"];return r+Af(o)},0)}function q_(t){for(var e=["top","right","bottom","left"],n={},r=0,i=e;r<i.length;r++){var o=i[r],s=t["padding-"+o];n[o]=Af(s)}return n}function U_(t){var e=t.getBBox();return _d(0,0,e.width,e.height)}function H_(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return iP;var r=oa(t).getComputedStyle(t),i=q_(r),o=i.left+i.right,s=i.top+i.bottom,a=Af(r.width),l=Af(r.height);if(r.boxSizing==="border-box"&&(Math.round(a+o)!==e&&(a-=Cy(r,"left","right")+o),Math.round(l+s)!==n&&(l-=Cy(r,"top","bottom")+s)),!K_(t)){var c=Math.round(a+o)-e,u=Math.round(l+s)-n;Math.abs(c)!==1&&(a-=c),Math.abs(u)!==1&&(l-=u)}return _d(i.left,i.top,a,l)}var J_=function(){return typeof SVGGraphicsElement<"u"?function(t){return t instanceof oa(t).SVGGraphicsElement}:function(t){return t instanceof oa(t).SVGElement&&typeof t.getBBox=="function"}}();function K_(t){return t===oa(t).document.documentElement}function eM(t){return a0?J_(t)?U_(t):H_(t):iP}function tM(t){var e=t.x,n=t.y,r=t.width,i=t.height,o=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,s=Object.create(o.prototype);return rP(s,{x:e,y:n,width:r,height:i,top:n,right:e+r,bottom:i+n,left:e}),s}function _d(t,e,n,r){return{x:t,y:e,width:n,height:r}}var nM=function(){function t(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=_d(0,0,0,0),this.target=e}return t.prototype.isActive=function(){var e=eM(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},t}(),rM=function(){function t(e,n){var r=tM(n);rP(this,{target:e,contentRect:r})}return t}(),iM=function(){function t(e,n,r){if(this.activeObservations_=[],this.observations_=new nP,typeof e!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=n,this.callbackCtx_=r}return t.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof oa(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)||(n.set(e,new nM(e)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof oa(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)&&(n.delete(e),n.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&e.activeObservations_.push(n)})},t.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,n=this.activeObservations_.map(function(r){return new rM(r.target,r.broadcastRect())});this.callback_.call(e,n,e),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),oP=typeof WeakMap<"u"?new WeakMap:new nP,sP=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=Y_.getInstance(),r=new iM(e,n,this);oP.set(this,r)}return t}();["observe","unobserve","disconnect"].forEach(function(t){sP.prototype[t]=function(){var e;return(e=oP.get(this))[t].apply(e,arguments)}});var oM=function(){return typeof kf.ResizeObserver<"u"?kf.ResizeObserver:sP}(),Qi=new Map;function aP(t){t.forEach(function(e){var n,r=e.target;(n=Qi.get(r))===null||n===void 0||n.forEach(function(i){return i(r)})})}var lP=new oM(aP);process.env.NODE_ENV;process.env.NODE_ENV;function sM(t,e){Qi.has(t)||(Qi.set(t,new Set),lP.observe(t)),Qi.get(t).add(e)}function aM(t,e){Qi.has(t)&&(Qi.get(t).delete(e),Qi.get(t).size||(lP.unobserve(t),Qi.delete(t)))}var lM=function(t){kd(n,t);var e=Ad(n);function n(){return wd(this,n),e.apply(this,arguments)}return Cd(n,[{key:"render",value:function(){return this.props.children}}]),n}(X.Component);function cM(t,e){var n=t.children,r=t.disabled,i=X.useRef(null),o=X.useRef(null),s=X.useContext(s0),a=typeof n=="function",l=a?n(i):n,c=X.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),u=!a&&X.isValidElement(l)&&Qd(l),f=u?l.ref:null,d=TO(f,i),h=function(){var x;return Mu(i.current)||(i.current&&Vr(i.current)==="object"?Mu((x=i.current)===null||x===void 0?void 0:x.nativeElement):null)||Mu(o.current)};X.useImperativeHandle(e,function(){return h()});var p=X.useRef(t);p.current=t;var O=X.useCallback(function(m){var x=p.current,v=x.onResize,y=x.data,S=m.getBoundingClientRect(),b=S.width,w=S.height,C=m.offsetWidth,k=m.offsetHeight,I=Math.floor(b),A=Math.floor(w);if(c.current.width!==I||c.current.height!==A||c.current.offsetWidth!==C||c.current.offsetHeight!==k){var E={width:I,height:A,offsetWidth:C,offsetHeight:k};c.current=E;var $=C===Math.round(b)?b:C,R=k===Math.round(w)?w:k,M=le(le({},E),{},{offsetWidth:$,offsetHeight:R});s==null||s(M,m,y),v&&Promise.resolve().then(function(){v(M,m)})}},[]);return X.useEffect(function(){var m=h();return m&&!r&&sM(m,O),function(){return aM(m,O)}},[i.current,r]),X.createElement(lM,{ref:o},u?X.cloneElement(l,{ref:d}):l)}var cP=X.forwardRef(cM);process.env.NODE_ENV!=="production"&&(cP.displayName="SingleObserver");var uM="rc-observer-key";function fM(t,e){var n=t.children,r=typeof n=="function"?[n]:o0(n);return process.env.NODE_ENV!=="production"&&(r.length>1?wf(!1,"Find more than one child node with `children` in ResizeObserver. Please use ResizeObserver.Collection instead."):r.length===0&&wf(!1,"`children` of ResizeObserver is empty. Nothing is in observe.")),r.map(function(i,o){var s=(i==null?void 0:i.key)||"".concat(uM,"-").concat(o);return X.createElement(cP,Ae({},t,{key:s,ref:o===0?e:void 0}),i)})}var Md=X.forwardRef(fM);process.env.NODE_ENV!=="production"&&(Md.displayName="ResizeObserver");Md.Collection=Z_;function uP(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}function dM(t){return uP(t)instanceof ShadowRoot}function l0(t){return dM(t)?uP(t):null}function No(t){var e=X.useRef();e.current=t;var n=X.useCallback(function(){for(var r,i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return(r=e.current)===null||r===void 0?void 0:r.call.apply(r,[e].concat(o))},[]);return n}function hM(t){if(Array.isArray(t))return t}function pM(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(t)).next,e!==0)for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==e);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}function ky(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function gM(t,e){if(t){if(typeof t=="string")return ky(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ky(t,e)}}function mM(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
218
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fP(t,e){return hM(t)||pM(t,e)||gM(t,e)||mM()}function OM(){var t=Sf({},X);return t.useId}var Ay=0,Py=OM();const xM=Py?function(e){var n=Py();return e||(process.env.NODE_ENV==="test"?"test-id":n)}:function(e){var n=X.useState("ssr-id"),r=fP(n,2),i=r[0],o=r[1];return X.useEffect(function(){var s=Ay;Ay+=1,o("rc_unique_".concat(s))},[]),e||(process.env.NODE_ENV==="test"?"test-id":i)},vM=function(){if(typeof navigator>"u"||typeof window>"u")return!1;var t=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(t==null?void 0:t.substr(0,4))};var yM=X.createContext({}),bM=function(t){kd(n,t);var e=Ad(n);function n(){return wd(this,n),e.apply(this,arguments)}return Cd(n,[{key:"render",value:function(){return this.props.children}}]),n}(X.Component);function Nu(t){var e=X.useRef(!1),n=X.useState(t),r=fP(n,2),i=r[0],o=r[1];X.useEffect(function(){return e.current=!1,function(){e.current=!0}},[]);function s(a,l){l&&e.current||o(a)}return[i,s]}var Fo="none",Hc="appear",Jc="enter",Kc="leave",Ey="none",Mr="prepare",js="start",Rs="active",RO="end",dP="prepared";function Iy(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit".concat(t)]="webkit".concat(e),n["Moz".concat(t)]="moz".concat(e),n["ms".concat(t)]="MS".concat(e),n["O".concat(t)]="o".concat(e.toLowerCase()),n}function SM(t,e){var n={animationend:Iy("Animation","AnimationEnd"),transitionend:Iy("Transition","TransitionEnd")};return t&&("AnimationEvent"in e||delete n.animationend.animation,"TransitionEvent"in e||delete n.transitionend.transition),n}var wM=SM(hi(),typeof window<"u"?window:{}),hP={};if(hi()){var CM=document.createElement("div");hP=CM.style}var eu={};function pP(t){if(eu[t])return eu[t];var e=wM[t];if(e)for(var n=Object.keys(e),r=n.length,i=0;i<r;i+=1){var o=n[i];if(Object.prototype.hasOwnProperty.call(e,o)&&o in hP)return eu[t]=e[o],eu[t]}return""}var gP=pP("animationend"),mP=pP("transitionend"),OP=!!(gP&&mP),Ty=gP||"animationend",$y=mP||"transitionend";function jy(t,e){if(!t)return null;if(Vr(t)==="object"){var n=e.replace(/-\w/g,function(r){return r[1].toUpperCase()});return t[n]}return"".concat(t,"-").concat(e)}const kM=function(t){var e=j.useRef(),n=j.useRef(t);n.current=t;var r=X.useCallback(function(s){n.current(s)},[]);function i(s){s&&(s.removeEventListener($y,r),s.removeEventListener(Ty,r))}function o(s){e.current&&e.current!==s&&i(e.current),s&&s!==e.current&&(s.addEventListener($y,r),s.addEventListener(Ty,r),e.current=s)}return X.useEffect(function(){return function(){i(e.current)}},[]),[o,i]};var xP=hi()?j.useLayoutEffect:j.useEffect,vP=function(e){return+setTimeout(e,16)},yP=function(e){return clearTimeout(e)};typeof window<"u"&&"requestAnimationFrame"in window&&(vP=function(e){return window.requestAnimationFrame(e)},yP=function(e){return window.cancelAnimationFrame(e)});var Ry=0,Nd=new Map;function bP(t){Nd.delete(t)}var Pf=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Ry+=1;var r=Ry;function i(o){if(o===0)bP(r),e();else{var s=vP(function(){i(o-1)});Nd.set(r,s)}}return i(n),r};Pf.cancel=function(t){var e=Nd.get(t);return bP(t),yP(e)};process.env.NODE_ENV!=="production"&&(Pf.ids=function(){return Nd});const AM=function(){var t=X.useRef(null);function e(){Pf.cancel(t.current)}function n(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;e();var o=Pf(function(){i<=1?r({isCanceled:function(){return o!==t.current}}):n(r,i-1)});t.current=o}return X.useEffect(function(){return function(){e()}},[]),[n,e]};var PM=[Mr,js,Rs,RO],EM=[Mr,dP],SP=!1,IM=!0;function wP(t){return t===Rs||t===RO}const TM=function(t,e,n){var r=Nu(Ey),i=Ve(r,2),o=i[0],s=i[1],a=AM(),l=Ve(a,2),c=l[0],u=l[1];function f(){s(Mr,!0)}var d=e?EM:PM;return xP(function(){if(o!==Ey&&o!==RO){var h=d.indexOf(o),p=d[h+1],O=n(o);O===SP?s(p,!0):p&&c(function(m){function x(){m.isCanceled()||s(p,!0)}O===!0?x():Promise.resolve(O).then(x)})}},[t,o]),X.useEffect(function(){return function(){u()}},[]),[f,o]};function $M(t,e,n,r){var i=r.motionEnter,o=i===void 0?!0:i,s=r.motionAppear,a=s===void 0?!0:s,l=r.motionLeave,c=l===void 0?!0:l,u=r.motionDeadline,f=r.motionLeaveImmediately,d=r.onAppearPrepare,h=r.onEnterPrepare,p=r.onLeavePrepare,O=r.onAppearStart,m=r.onEnterStart,x=r.onLeaveStart,v=r.onAppearActive,y=r.onEnterActive,S=r.onLeaveActive,b=r.onAppearEnd,w=r.onEnterEnd,C=r.onLeaveEnd,k=r.onVisibleChanged,I=Nu(),A=Ve(I,2),E=A[0],$=A[1],R=Nu(Fo),M=Ve(R,2),Q=M[0],Z=M[1],G=Nu(null),V=Ve(G,2),ee=V[0],Y=V[1],z=j.useRef(!1),D=j.useRef(null);function B(){return n()}var N=j.useRef(!1);function U(){Z(Fo,!0),Y(null,!0)}function F(ye){var Ee=B();if(!(ye&&!ye.deadline&&ye.target!==Ee)){var $e=N.current,Le;Q===Hc&&$e?Le=b==null?void 0:b(Ee,ye):Q===Jc&&$e?Le=w==null?void 0:w(Ee,ye):Q===Kc&&$e&&(Le=C==null?void 0:C(Ee,ye)),Q!==Fo&&$e&&Le!==!1&&U()}}var te=kM(F),L=Ve(te,1),ce=L[0],re=function(Ee){var $e,Le,qe;switch(Ee){case Hc:return $e={},nn($e,Mr,d),nn($e,js,O),nn($e,Rs,v),$e;case Jc:return Le={},nn(Le,Mr,h),nn(Le,js,m),nn(Le,Rs,y),Le;case Kc:return qe={},nn(qe,Mr,p),nn(qe,js,x),nn(qe,Rs,S),qe;default:return{}}},ae=X.useMemo(function(){return re(Q)},[Q]),H=TM(Q,!t,function(ye){if(ye===Mr){var Ee=ae[Mr];return Ee?Ee(B()):SP}if(ne in ae){var $e;Y((($e=ae[ne])===null||$e===void 0?void 0:$e.call(ae,B(),null))||null)}return ne===Rs&&(ce(B()),u>0&&(clearTimeout(D.current),D.current=setTimeout(function(){F({deadline:!0})},u))),ne===dP&&U(),IM}),pe=Ve(H,2),q=pe[0],ne=pe[1],he=wP(ne);N.current=he,xP(function(){$(e);var ye=z.current;z.current=!0;var Ee;!ye&&e&&a&&(Ee=Hc),ye&&e&&o&&(Ee=Jc),(ye&&!e&&c||!ye&&f&&!e&&c)&&(Ee=Kc);var $e=re(Ee);Ee&&(t||$e[Mr])?(Z(Ee),q()):Z(Fo)},[e]),j.useEffect(function(){(Q===Hc&&!a||Q===Jc&&!o||Q===Kc&&!c)&&Z(Fo)},[a,o,c]),j.useEffect(function(){return function(){z.current=!1,clearTimeout(D.current)}},[]);var ve=X.useRef(!1);j.useEffect(function(){E&&(ve.current=!0),E!==void 0&&Q===Fo&&((ve.current||E)&&(k==null||k(E)),ve.current=!0)},[E,Q]);var Re=ee;return ae[Mr]&&ne===js&&(Re=le({transition:"none"},Re)),[Q,ne,Re,E??e]}function jM(t){var e=t;Vr(t)==="object"&&(e=t.transitionSupport);function n(i,o){return!!(i.motionName&&e&&o!==!1)}var r=X.forwardRef(function(i,o){var s=i.visible,a=s===void 0?!0:s,l=i.removeOnLeave,c=l===void 0?!0:l,u=i.forceRender,f=i.children,d=i.motionName,h=i.leavedClassName,p=i.eventProps,O=X.useContext(yM),m=O.motion,x=n(i,m),v=j.useRef(),y=j.useRef();function S(){try{return v.current instanceof HTMLElement?v.current:Mu(y.current)}catch{return null}}var b=$M(x,a,S,i),w=Ve(b,4),C=w[0],k=w[1],I=w[2],A=w[3],E=X.useRef(A);A&&(E.current=!0);var $=X.useCallback(function(Y){v.current=Y,IO(o,Y)},[o]),R,M=le(le({},p),{},{visible:a});if(!f)R=null;else if(C===Fo)A?R=f(le({},M),$):!c&&E.current&&h?R=f(le(le({},M),{},{className:h}),$):u||!c&&!h?R=f(le(le({},M),{},{style:{display:"none"}}),$):R=null;else{var Q,Z;k===Mr?Z="prepare":wP(k)?Z="active":k===js&&(Z="start");var G=jy(d,"".concat(C,"-").concat(Z));R=f(le(le({},M),{},{className:co(jy(d,C),(Q={},nn(Q,G,G&&Z),nn(Q,d,typeof d=="string"),Q)),style:I}),$)}if(X.isValidElement(R)&&Qd(R)){var V=R,ee=V.ref;ee||(R=X.cloneElement(R,{ref:$}))}return X.createElement(bM,{ref:y},R)});return r.displayName="CSSMotion",r}const DO=jM(OP);var c0="add",u0="keep",f0="remove",Vh="removed";function RM(t){var e;return t&&Vr(t)==="object"&&"key"in t?e=t:e={key:t},le(le({},e),{},{key:String(e.key)})}function d0(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return t.map(RM)}function DM(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=[],r=0,i=e.length,o=d0(t),s=d0(e);o.forEach(function(c){for(var u=!1,f=r;f<i;f+=1){var d=s[f];if(d.key===c.key){r<f&&(n=n.concat(s.slice(r,f).map(function(h){return le(le({},h),{},{status:c0})})),r=f),n.push(le(le({},d),{},{status:u0})),r+=1,u=!0;break}}u||n.push(le(le({},c),{},{status:f0}))}),r<i&&(n=n.concat(s.slice(r).map(function(c){return le(le({},c),{},{status:c0})})));var a={};n.forEach(function(c){var u=c.key;a[u]=(a[u]||0)+1});var l=Object.keys(a).filter(function(c){return a[c]>1});return l.forEach(function(c){n=n.filter(function(u){var f=u.key,d=u.status;return f!==c||d!==f0}),n.forEach(function(u){u.key===c&&(u.status=u0)})}),n}var QM=["component","children","onVisibleChanged","onAllRemoved"],BM=["status"],_M=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function MM(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:DO,n=function(r){kd(o,r);var i=Ad(o);function o(){var s;wd(this,o);for(var a=arguments.length,l=new Array(a),c=0;c<a;c++)l[c]=arguments[c];return s=i.call.apply(i,[this].concat(l)),nn(zg(s),"state",{keyEntities:[]}),nn(zg(s),"removeKey",function(u){var f=s.state.keyEntities,d=f.map(function(h){return h.key!==u?h:le(le({},h),{},{status:Vh})});return s.setState({keyEntities:d}),d.filter(function(h){var p=h.status;return p!==Vh}).length}),s}return Cd(o,[{key:"render",value:function(){var a=this,l=this.state.keyEntities,c=this.props,u=c.component,f=c.children,d=c.onVisibleChanged,h=c.onAllRemoved,p=Tr(c,QM),O=u||X.Fragment,m={};return _M.forEach(function(x){m[x]=p[x],delete p[x]}),delete p.keys,X.createElement(O,p,l.map(function(x,v){var y=x.status,S=Tr(x,BM),b=y===c0||y===u0;return X.createElement(e,Ae({},m,{key:S.key,visible:b,eventProps:S,onVisibleChanged:function(C){if(d==null||d(C,{key:S.key}),!C){var k=a.removeKey(S.key);k===0&&h&&h()}}}),function(w,C){return f(le(le({},w),{},{index:v}),C)})}))}}],[{key:"getDerivedStateFromProps",value:function(a,l){var c=a.keys,u=l.keyEntities,f=d0(c),d=DM(u,f);return{keyEntities:d.filter(function(h){var p=u.find(function(O){var m=O.key;return h.key===m});return!(p&&p.status===Vh&&h.status===f0)})}}}]),o}(X.Component);return nn(n,"defaultProps",{component:"div"}),n}MM(OP);function NM(t){var e=t.prefixCls,n=t.align,r=t.arrow,i=t.arrowPos,o=r||{},s=o.className,a=o.content,l=i.x,c=l===void 0?0:l,u=i.y,f=u===void 0?0:u,d=X.useRef();if(!n||!n.points)return null;var h={position:"absolute"};if(n.autoArrow!==!1){var p=n.points[0],O=n.points[1],m=p[0],x=p[1],v=O[0],y=O[1];m===v||!["t","b"].includes(m)?h.top=f:m==="t"?h.top=0:h.bottom=0,x===y||!["l","r"].includes(x)?h.left=c:x==="l"?h.left=0:h.right=0}return X.createElement("div",{ref:d,className:co("".concat(e,"-arrow"),s),style:h},a)}function FM(t){var e=t.prefixCls,n=t.open,r=t.zIndex,i=t.mask,o=t.motion;return i?X.createElement(DO,Ae({},o,{motionAppear:!0,visible:n,removeOnLeave:!0}),function(s){var a=s.className;return X.createElement("div",{style:{zIndex:r},className:co("".concat(e,"-mask"),a)})}):null}var CP=X.memo(function(t){var e=t.children;return e},function(t,e){return e.cache});process.env.NODE_ENV!=="production"&&(CP.displayName="PopupContent");var kP=X.forwardRef(function(t,e){var n=t.popup,r=t.className,i=t.prefixCls,o=t.style,s=t.target,a=t.onVisibleChanged,l=t.open,c=t.keepDom,u=t.fresh,f=t.onClick,d=t.mask,h=t.arrow,p=t.arrowPos,O=t.align,m=t.motion,x=t.maskMotion,v=t.forceRender,y=t.getPopupContainer,S=t.autoDestroy,b=t.portal,w=t.zIndex,C=t.onMouseEnter,k=t.onMouseLeave,I=t.onPointerEnter,A=t.ready,E=t.offsetX,$=t.offsetY,R=t.offsetR,M=t.offsetB,Q=t.onAlign,Z=t.onPrepare,G=t.stretch,V=t.targetWidth,ee=t.targetHeight,Y=typeof n=="function"?n():n,z=l||c,D=(y==null?void 0:y.length)>0,B=X.useState(!y||!D),N=Ve(B,2),U=N[0],F=N[1];if(hr(function(){!U&&D&&s&&F(!0)},[U,D,s]),!U)return null;var te="auto",L={left:"-1000vw",top:"-1000vh",right:te,bottom:te};if(A||!l){var ce,re=O.points,ae=O.dynamicInset||((ce=O._experimental)===null||ce===void 0?void 0:ce.dynamicInset),H=ae&&re[0][1]==="r",pe=ae&&re[0][0]==="b";H?(L.right=R,L.left=te):(L.left=E,L.right=te),pe?(L.bottom=M,L.top=te):(L.top=$,L.bottom=te)}var q={};return G&&(G.includes("height")&&ee?q.height=ee:G.includes("minHeight")&&ee&&(q.minHeight=ee),G.includes("width")&&V?q.width=V:G.includes("minWidth")&&V&&(q.minWidth=V)),l||(q.pointerEvents="none"),X.createElement(b,{open:v||z,getContainer:y&&function(){return y(s)},autoDestroy:S},X.createElement(FM,{prefixCls:i,open:l,zIndex:w,mask:d,motion:x}),X.createElement(Md,{onResize:Q,disabled:!l},function(ne){return X.createElement(DO,Ae({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:v,leavedClassName:"".concat(i,"-hidden")},m,{onAppearPrepare:Z,onEnterPrepare:Z,visible:l,onVisibleChanged:function(ve){var Re;m==null||(Re=m.onVisibleChanged)===null||Re===void 0||Re.call(m,ve),a(ve)}}),function(he,ve){var Re=he.className,ye=he.style,Ee=co(i,Re,r);return X.createElement("div",{ref:UA(ne,e,ve),className:Ee,style:le(le(le(le({"--arrow-x":"".concat(p.x||0,"px"),"--arrow-y":"".concat(p.y||0,"px")},L),q),ye),{},{boxSizing:"border-box",zIndex:w},o),onMouseEnter:C,onMouseLeave:k,onPointerEnter:I,onClick:f},h&&X.createElement(NM,{prefixCls:i,arrow:h,arrowPos:p,align:O}),X.createElement(CP,{cache:!l&&!u},Y))})}))});process.env.NODE_ENV!=="production"&&(kP.displayName="Popup");var AP=X.forwardRef(function(t,e){var n=t.children,r=t.getTriggerDOMNode,i=Qd(n),o=X.useCallback(function(a){IO(e,r?r(a):a)},[r]),s=TO(o,n.ref);return i?X.cloneElement(n,{ref:s}):n});process.env.NODE_ENV!=="production"&&(AP.displayName="TriggerWrapper");var Dy=X.createContext(null);function Qy(t){return t?Array.isArray(t)?t:[t]:[]}function ZM(t,e,n,r){return X.useMemo(function(){var i=Qy(n??e),o=Qy(r??e),s=new Set(i),a=new Set(o);return t&&(s.has("hover")&&(s.delete("hover"),s.add("click")),a.has("hover")&&(a.delete("hover"),a.add("click"))),[s,a]},[t,e,n,r])}const WM=function(t){if(!t)return!1;if(t instanceof Element){if(t.offsetParent)return!0;if(t.getBBox){var e=t.getBBox(),n=e.width,r=e.height;if(n||r)return!0}if(t.getBoundingClientRect){var i=t.getBoundingClientRect(),o=i.width,s=i.height;if(o||s)return!0}}return!1};function VM(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;return n?t[0]===e[0]:t[0]===e[0]&&t[1]===e[1]}function zM(t,e,n,r){for(var i=n.points,o=Object.keys(t),s=0;s<o.length;s+=1){var a,l=o[s];if(VM((a=t[l])===null||a===void 0?void 0:a.points,i,r))return"".concat(e,"-placement-").concat(l)}return""}function By(t,e,n,r){return e||(n?{motionName:"".concat(t,"-").concat(n)}:r?{motionName:r}:null)}function fc(t){return t.ownerDocument.defaultView}function h0(t){for(var e=[],n=t==null?void 0:t.parentElement,r=["hidden","scroll","clip","auto"];n;){var i=fc(n).getComputedStyle(n),o=i.overflowX,s=i.overflowY,a=i.overflow;[o,s,a].some(function(l){return r.includes(l)})&&e.push(n),n=n.parentElement}return e}function Bl(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(t)?e:t}function qa(t){return Bl(parseFloat(t),0)}function _y(t,e){var n=le({},t);return(e||[]).forEach(function(r){if(!(r instanceof HTMLBodyElement||r instanceof HTMLHtmlElement)){var i=fc(r).getComputedStyle(r),o=i.overflow,s=i.overflowClipMargin,a=i.borderTopWidth,l=i.borderBottomWidth,c=i.borderLeftWidth,u=i.borderRightWidth,f=r.getBoundingClientRect(),d=r.offsetHeight,h=r.clientHeight,p=r.offsetWidth,O=r.clientWidth,m=qa(a),x=qa(l),v=qa(c),y=qa(u),S=Bl(Math.round(f.width/p*1e3)/1e3),b=Bl(Math.round(f.height/d*1e3)/1e3),w=(p-O-v-y)*S,C=(d-h-m-x)*b,k=m*b,I=x*b,A=v*S,E=y*S,$=0,R=0;if(o==="clip"){var M=qa(s);$=M*S,R=M*b}var Q=f.x+A-$,Z=f.y+k-R,G=Q+f.width+2*$-A-E-w,V=Z+f.height+2*R-k-I-C;n.left=Math.max(n.left,Q),n.top=Math.max(n.top,Z),n.right=Math.min(n.right,G),n.bottom=Math.min(n.bottom,V)}}),n}function My(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n="".concat(e),r=n.match(/^(.*)\%$/);return r?t*(parseFloat(r[1])/100):parseFloat(n)}function Ny(t,e){var n=e||[],r=Ve(n,2),i=r[0],o=r[1];return[My(t.width,i),My(t.height,o)]}function Fy(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[t[0],t[1]]}function vs(t,e){var n=e[0],r=e[1],i,o;return n==="t"?o=t.y:n==="b"?o=t.y+t.height:o=t.y+t.height/2,r==="l"?i=t.x:r==="r"?i=t.x+t.width:i=t.x+t.width/2,{x:i,y:o}}function qi(t,e){var n={t:"b",b:"t",l:"r",r:"l"};return t.map(function(r,i){return i===e?n[r]||"c":r}).join("")}function LM(t,e,n,r,i,o,s){var a=X.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:i[r]||{}}),l=Ve(a,2),c=l[0],u=l[1],f=X.useRef(0),d=X.useMemo(function(){return e?h0(e):[]},[e]),h=X.useRef({}),p=function(){h.current={}};t||p();var O=No(function(){if(e&&n&&t){let xr=function(Dc,vr){var ps=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ee,Qc=Y.x+Dc,gs=Y.y+vr,Bc=Qc+ce,Va=gs+L,_c=Math.max(Qc,ps.left),kh=Math.max(gs,ps.top),Ah=Math.min(Bc,ps.right),Ph=Math.min(Va,ps.bottom);return Math.max(0,(Ah-_c)*(Ph-kh))},Rc=function(){oe=Y.y+It,ue=oe+L,Ce=Y.x+Et,Xe=Ce+ce};var v,y,S=e,b=S.ownerDocument,w=fc(S),C=w.getComputedStyle(S),k=C.width,I=C.height,A=C.position,E=S.style.left,$=S.style.top,R=S.style.right,M=S.style.bottom,Q=S.style.overflow,Z=le(le({},i[r]),o),G=b.createElement("div");(v=S.parentElement)===null||v===void 0||v.appendChild(G),G.style.left="".concat(S.offsetLeft,"px"),G.style.top="".concat(S.offsetTop,"px"),G.style.position=A,G.style.height="".concat(S.offsetHeight,"px"),G.style.width="".concat(S.offsetWidth,"px"),S.style.left="0",S.style.top="0",S.style.right="auto",S.style.bottom="auto",S.style.overflow="hidden";var V;if(Array.isArray(n))V={x:n[0],y:n[1],width:0,height:0};else{var ee=n.getBoundingClientRect();V={x:ee.x,y:ee.y,width:ee.width,height:ee.height}}var Y=S.getBoundingClientRect(),z=b.documentElement,D=z.clientWidth,B=z.clientHeight,N=z.scrollWidth,U=z.scrollHeight,F=z.scrollTop,te=z.scrollLeft,L=Y.height,ce=Y.width,re=V.height,ae=V.width,H={left:0,top:0,right:D,bottom:B},pe={left:-te,top:-F,right:N-te,bottom:U-F},q=Z.htmlRegion,ne="visible",he="visibleFirst";q!=="scroll"&&q!==he&&(q=ne);var ve=q===he,Re=_y(pe,d),ye=_y(H,d),Ee=q===ne?ye:Re,$e=ve?ye:Ee;S.style.left="auto",S.style.top="auto",S.style.right="0",S.style.bottom="0";var Le=S.getBoundingClientRect();S.style.left=E,S.style.top=$,S.style.right=R,S.style.bottom=M,S.style.overflow=Q,(y=S.parentElement)===null||y===void 0||y.removeChild(G);var qe=Bl(Math.round(ce/parseFloat(k)*1e3)/1e3),be=Bl(Math.round(L/parseFloat(I)*1e3)/1e3);if(qe===0||be===0||Cf(n)&&!WM(n))return;var rt=Z.offset,Ot=Z.targetOffset,Ut=Ny(Y,rt),cn=Ve(Ut,2),dn=cn[0],hn=cn[1],Bn=Ny(V,Ot),Ht=Ve(Bn,2),$o=Ht[0],Pi=Ht[1];V.x-=$o,V.y-=Pi;var Li=Z.points||[],Dr=Ve(Li,2),Pn=Dr[0],tr=Dr[1],_n=Fy(tr),Jt=Fy(Pn),nr=vs(V,_n),Qr=vs(Y,Jt),Mn=le({},Z),Et=nr.x-Qr.x+dn,It=nr.y-Qr.y+hn,yt=xr(Et,It),qr=xr(Et,It,ye),rr=vs(V,["t","l"]),ir=vs(Y,["t","l"]),Ei=vs(V,["b","r"]),Ur=vs(Y,["b","r"]),jt=Z.overflow||{},_t=jt.adjustX,Xi=jt.adjustY,Ii=jt.shiftX,Gi=jt.shiftY,W=function(vr){return typeof vr=="boolean"?vr:vr>=0},oe,ue,Ce,Xe;Rc();var it=W(Xi),Ze=Jt[0]===_n[0];if(it&&Jt[0]==="t"&&(ue>$e.bottom||h.current.bt)){var Be=It;Ze?Be-=L-re:Be=rr.y-Ur.y-hn;var Lt=xr(Et,Be),xt=xr(Et,Be,ye);Lt>yt||Lt===yt&&(!ve||xt>=qr)?(h.current.bt=!0,It=Be,hn=-hn,Mn.points=[qi(Jt,0),qi(_n,0)]):h.current.bt=!1}if(it&&Jt[0]==="b"&&(oe<$e.top||h.current.tb)){var vt=It;Ze?vt+=L-re:vt=Ei.y-ir.y-hn;var bt=xr(Et,vt),Hr=xr(Et,vt,ye);bt>yt||bt===yt&&(!ve||Hr>=qr)?(h.current.tb=!0,It=vt,hn=-hn,Mn.points=[qi(Jt,0),qi(_n,0)]):h.current.tb=!1}var jo=W(_t),Ln=Jt[1]===_n[1];if(jo&&Jt[1]==="l"&&(Xe>$e.right||h.current.rl)){var Ro=Et;Ln?Ro-=ce-ae:Ro=rr.x-Ur.x-dn;var Pc=xr(Ro,It),gh=xr(Ro,It,ye);Pc>yt||Pc===yt&&(!ve||gh>=qr)?(h.current.rl=!0,Et=Ro,dn=-dn,Mn.points=[qi(Jt,1),qi(_n,1)]):h.current.rl=!1}if(jo&&Jt[1]==="r"&&(Ce<$e.left||h.current.lr)){var Do=Et;Ln?Do+=ce-ae:Do=Ei.x-ir.x-dn;var Ec=xr(Do,It),mh=xr(Do,It,ye);Ec>yt||Ec===yt&&(!ve||mh>=qr)?(h.current.lr=!0,Et=Do,dn=-dn,Mn.points=[qi(Jt,1),qi(_n,1)]):h.current.lr=!1}Rc();var Jr=Ii===!0?0:Ii;typeof Jr=="number"&&(Ce<ye.left&&(Et-=Ce-ye.left-dn,V.x+ae<ye.left+Jr&&(Et+=V.x-ye.left+ae-Jr)),Xe>ye.right&&(Et-=Xe-ye.right-dn,V.x>ye.right-Jr&&(Et+=V.x-ye.right+Jr)));var Ti=Gi===!0?0:Gi;typeof Ti=="number"&&(oe<ye.top&&(It-=oe-ye.top-hn,V.y+re<ye.top+Ti&&(It+=V.y-ye.top+re-Ti)),ue>ye.bottom&&(It-=ue-ye.bottom-hn,V.y>ye.bottom-Ti&&(It+=V.y-ye.bottom+Ti)));var Za=Y.x+Et,Ic=Za+ce,Yi=Y.y+It,Qo=Yi+L,Wa=V.x,hs=Wa+ae,$i=V.y,Oh=$i+re,xh=Math.max(Za,Wa),vh=Math.min(Ic,hs),Tc=(xh+vh)/2,yh=Tc-Za,bh=Math.max(Yi,$i),Sh=Math.min(Qo,Oh),$c=(bh+Sh)/2,wh=$c-Yi;s==null||s(e,Mn);var Ch=Le.right-Y.x-(Et+Y.width),jc=Le.bottom-Y.y-(It+Y.height);u({ready:!0,offsetX:Et/qe,offsetY:It/be,offsetR:Ch/qe,offsetB:jc/be,arrowX:yh/qe,arrowY:wh/be,scaleX:qe,scaleY:be,align:Mn})}}),m=function(){f.current+=1;var y=f.current;Promise.resolve().then(function(){f.current===y&&O()})},x=function(){u(function(y){return le(le({},y),{},{ready:!1})})};return hr(x,[r]),hr(function(){t||x()},[t]),[c.ready,c.offsetX,c.offsetY,c.offsetR,c.offsetB,c.arrowX,c.arrowY,c.scaleX,c.scaleY,c.align,m]}function XM(t,e,n,r,i){hr(function(){if(t&&e&&n){let f=function(){r(),i()};var o=e,s=n,a=h0(o),l=h0(s),c=fc(s),u=new Set([c].concat(na(a),na(l)));return u.forEach(function(d){d.addEventListener("scroll",f,{passive:!0})}),c.addEventListener("resize",f,{passive:!0}),r(),function(){u.forEach(function(d){d.removeEventListener("scroll",f),c.removeEventListener("resize",f)})}}},[t,e,n])}function GM(t,e,n,r,i,o,s,a){var l=X.useRef(t);l.current=t,X.useEffect(function(){if(e&&r&&(!i||o)){var c=function(x){var v=x.target;l.current&&!s(v)&&a(!1)},u=fc(r);u.addEventListener("mousedown",c,!0),u.addEventListener("contextmenu",c,!0);var f=l0(n);if(f&&(f.addEventListener("mousedown",c,!0),f.addEventListener("contextmenu",c,!0)),process.env.NODE_ENV!=="production"){var d,h,p=n==null||(d=n.getRootNode)===null||d===void 0?void 0:d.call(n),O=(h=r.getRootNode)===null||h===void 0?void 0:h.call(r);wf(p===O,"trigger element and popup element should in same shadow root.")}return function(){u.removeEventListener("mousedown",c,!0),u.removeEventListener("contextmenu",c,!0),f&&(f.removeEventListener("mousedown",c,!0),f.removeEventListener("contextmenu",c,!0))}}},[e,n,r,i,o])}var YM=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];function qM(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:jO,e=X.forwardRef(function(n,r){var i=n.prefixCls,o=i===void 0?"rc-trigger-popup":i,s=n.children,a=n.action,l=a===void 0?"hover":a,c=n.showAction,u=n.hideAction,f=n.popupVisible,d=n.defaultPopupVisible,h=n.onPopupVisibleChange,p=n.afterPopupVisibleChange,O=n.mouseEnterDelay,m=n.mouseLeaveDelay,x=m===void 0?.1:m,v=n.focusDelay,y=n.blurDelay,S=n.mask,b=n.maskClosable,w=b===void 0?!0:b,C=n.getPopupContainer,k=n.forceRender,I=n.autoDestroy,A=n.destroyPopupOnHide,E=n.popup,$=n.popupClassName,R=n.popupStyle,M=n.popupPlacement,Q=n.builtinPlacements,Z=Q===void 0?{}:Q,G=n.popupAlign,V=n.zIndex,ee=n.stretch,Y=n.getPopupClassNameFromAlign,z=n.fresh,D=n.alignPoint,B=n.onPopupClick,N=n.onPopupAlign,U=n.arrow,F=n.popupMotion,te=n.maskMotion,L=n.popupTransitionName,ce=n.popupAnimation,re=n.maskTransitionName,ae=n.maskAnimation,H=n.className,pe=n.getTriggerDOMNode,q=Tr(n,YM),ne=I||A||!1,he=X.useState(!1),ve=Ve(he,2),Re=ve[0],ye=ve[1];hr(function(){ye(vM())},[]);var Ee=X.useRef({}),$e=X.useContext(Dy),Le=X.useMemo(function(){return{registerSubPopup:function(De,Mt){Ee.current[De]=Mt,$e==null||$e.registerSubPopup(De,Mt)}}},[$e]),qe=xM(),be=X.useState(null),rt=Ve(be,2),Ot=rt[0],Ut=rt[1],cn=X.useRef(null),dn=No(function(xe){cn.current=xe,Cf(xe)&&Ot!==xe&&Ut(xe),$e==null||$e.registerSubPopup(qe,xe)}),hn=X.useState(null),Bn=Ve(hn,2),Ht=Bn[0],$o=Bn[1],Pi=X.useRef(null),Li=No(function(xe){Cf(xe)&&Ht!==xe&&($o(xe),Pi.current=xe)}),Dr=X.Children.only(s),Pn=(Dr==null?void 0:Dr.props)||{},tr={},_n=No(function(xe){var De,Mt,Kt=Ht;return(Kt==null?void 0:Kt.contains(xe))||((De=l0(Kt))===null||De===void 0?void 0:De.host)===xe||xe===Kt||(Ot==null?void 0:Ot.contains(xe))||((Mt=l0(Ot))===null||Mt===void 0?void 0:Mt.host)===xe||xe===Ot||Object.values(Ee.current).some(function(Nt){return(Nt==null?void 0:Nt.contains(xe))||xe===Nt})}),Jt=By(o,F,ce,L),nr=By(o,te,ae,re),Qr=X.useState(d||!1),Mn=Ve(Qr,2),Et=Mn[0],It=Mn[1],yt=f??Et,qr=No(function(xe){f===void 0&&It(xe)});hr(function(){It(f||!1)},[f]);var rr=X.useRef(yt);rr.current=yt;var ir=X.useRef([]);ir.current=[];var Ei=No(function(xe){var De;qr(xe),((De=ir.current[ir.current.length-1])!==null&&De!==void 0?De:yt)!==xe&&(ir.current.push(xe),h==null||h(xe))}),Ur=X.useRef(),jt=function(){clearTimeout(Ur.current)},_t=function(De){var Mt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;jt(),Mt===0?Ei(De):Ur.current=setTimeout(function(){Ei(De)},Mt*1e3)};X.useEffect(function(){return jt},[]);var Xi=X.useState(!1),Ii=Ve(Xi,2),Gi=Ii[0],W=Ii[1];hr(function(xe){(!xe||yt)&&W(!0)},[yt]);var oe=X.useState(null),ue=Ve(oe,2),Ce=ue[0],Xe=ue[1],it=X.useState([0,0]),Ze=Ve(it,2),Be=Ze[0],Lt=Ze[1],xt=function(De){Lt([De.clientX,De.clientY])},vt=LM(yt,Ot,D?Be:Ht,M,Z,G,N),bt=Ve(vt,11),Hr=bt[0],jo=bt[1],Ln=bt[2],Ro=bt[3],Pc=bt[4],gh=bt[5],Do=bt[6],Ec=bt[7],mh=bt[8],Jr=bt[9],Ti=bt[10],Za=ZM(Re,l,c,u),Ic=Ve(Za,2),Yi=Ic[0],Qo=Ic[1],Wa=Yi.has("click"),hs=Qo.has("click")||Qo.has("contextMenu"),$i=No(function(){Gi||Ti()}),Oh=function(){rr.current&&D&&hs&&_t(!1)};XM(yt,Ht,Ot,$i,Oh),hr(function(){$i()},[Be,M]),hr(function(){yt&&!(Z!=null&&Z[M])&&$i()},[JSON.stringify(G)]);var xh=X.useMemo(function(){var xe=zM(Z,o,Jr,D);return co(xe,Y==null?void 0:Y(Jr))},[Jr,Y,Z,o,D]);X.useImperativeHandle(r,function(){return{nativeElement:Pi.current,popupElement:cn.current,forceAlign:$i}});var vh=X.useState(0),Tc=Ve(vh,2),yh=Tc[0],bh=Tc[1],Sh=X.useState(0),$c=Ve(Sh,2),wh=$c[0],Ch=$c[1],jc=function(){if(ee&&Ht){var De=Ht.getBoundingClientRect();bh(De.width),Ch(De.height)}},xr=function(){jc(),$i()},Rc=function(De){W(!1),Ti(),p==null||p(De)},Dc=function(){return new Promise(function(De){jc(),Xe(function(){return De})})};hr(function(){Ce&&(Ti(),Ce(),Xe(null))},[Ce]);function vr(xe,De,Mt,Kt){tr[xe]=function(Nt){var Mc;Kt==null||Kt(Nt),_t(De,Mt);for(var Eh=arguments.length,iv=new Array(Eh>1?Eh-1:0),Nc=1;Nc<Eh;Nc++)iv[Nc-1]=arguments[Nc];(Mc=Pn[xe])===null||Mc===void 0||Mc.call.apply(Mc,[Pn,Nt].concat(iv))}}(Wa||hs)&&(tr.onClick=function(xe){var De;rr.current&&hs?_t(!1):!rr.current&&Wa&&(xt(xe),_t(!0));for(var Mt=arguments.length,Kt=new Array(Mt>1?Mt-1:0),Nt=1;Nt<Mt;Nt++)Kt[Nt-1]=arguments[Nt];(De=Pn.onClick)===null||De===void 0||De.call.apply(De,[Pn,xe].concat(Kt))}),GM(yt,hs,Ht,Ot,S,w,_n,_t);var ps=Yi.has("hover"),Qc=Qo.has("hover"),gs,Bc;ps&&(vr("onMouseEnter",!0,O,function(xe){xt(xe)}),vr("onPointerEnter",!0,O,function(xe){xt(xe)}),gs=function(De){(yt||Gi)&&Ot!==null&&Ot!==void 0&&Ot.contains(De.target)&&_t(!0,O)},D&&(tr.onMouseMove=function(xe){var De;(De=Pn.onMouseMove)===null||De===void 0||De.call(Pn,xe)})),Qc&&(vr("onMouseLeave",!1,x),vr("onPointerLeave",!1,x),Bc=function(){_t(!1,x)}),Yi.has("focus")&&vr("onFocus",!0,v),Qo.has("focus")&&vr("onBlur",!1,y),Yi.has("contextMenu")&&(tr.onContextMenu=function(xe){var De;rr.current&&Qo.has("contextMenu")?_t(!1):(xt(xe),_t(!0)),xe.preventDefault();for(var Mt=arguments.length,Kt=new Array(Mt>1?Mt-1:0),Nt=1;Nt<Mt;Nt++)Kt[Nt-1]=arguments[Nt];(De=Pn.onContextMenu)===null||De===void 0||De.call.apply(De,[Pn,xe].concat(Kt))}),H&&(tr.className=co(Pn.className,H));var Va=le(le({},Pn),tr),_c={},kh=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];kh.forEach(function(xe){q[xe]&&(_c[xe]=function(){for(var De,Mt=arguments.length,Kt=new Array(Mt),Nt=0;Nt<Mt;Nt++)Kt[Nt]=arguments[Nt];(De=Va[xe])===null||De===void 0||De.call.apply(De,[Va].concat(Kt)),q[xe].apply(q,Kt)})});var Ah=X.cloneElement(Dr,le(le({},Va),_c)),Ph={x:gh,y:Do},l5=U?le({},U!==!0?U:{}):null;return X.createElement(X.Fragment,null,X.createElement(Md,{disabled:!yt,ref:Li,onResize:xr},X.createElement(AP,{getTriggerDOMNode:pe},Ah)),X.createElement(Dy.Provider,{value:Le},X.createElement(kP,{portal:t,ref:dn,prefixCls:o,popup:E,className:co($,xh),style:R,target:Ht,onMouseEnter:gs,onMouseLeave:Bc,onPointerEnter:gs,zIndex:V,open:yt,keepDom:Gi,fresh:z,onClick:B,mask:S,motion:Jt,maskMotion:nr,onVisibleChanged:Rc,onPrepare:Dc,forceRender:k,autoDestroy:ne,getPopupContainer:C,align:Jr,arrow:l5,arrowPos:Ph,ready:Hr,offsetX:jo,offsetY:Ln,offsetR:Ro,offsetB:Pc,onAlign:$i,stretch:ee,targetWidth:yh/Ec,targetHeight:wh/mh})))});return process.env.NODE_ENV!=="production"&&(e.displayName="Trigger"),e}const UM=qM(jO);var ys={shiftX:64,adjustY:1},bs={adjustX:1,shiftY:!0},yr=[0,0],HM={left:{points:["cr","cl"],overflow:bs,offset:[-4,0],targetOffset:yr},right:{points:["cl","cr"],overflow:bs,offset:[4,0],targetOffset:yr},top:{points:["bc","tc"],overflow:ys,offset:[0,-4],targetOffset:yr},bottom:{points:["tc","bc"],overflow:ys,offset:[0,4],targetOffset:yr},topLeft:{points:["bl","tl"],overflow:ys,offset:[0,-4],targetOffset:yr},leftTop:{points:["tr","tl"],overflow:bs,offset:[-4,0],targetOffset:yr},topRight:{points:["br","tr"],overflow:ys,offset:[0,-4],targetOffset:yr},rightTop:{points:["tl","tr"],overflow:bs,offset:[4,0],targetOffset:yr},bottomRight:{points:["tr","br"],overflow:ys,offset:[0,4],targetOffset:yr},rightBottom:{points:["bl","br"],overflow:bs,offset:[4,0],targetOffset:yr},bottomLeft:{points:["tl","bl"],overflow:ys,offset:[0,4],targetOffset:yr},leftBottom:{points:["br","bl"],overflow:bs,offset:[-4,0],targetOffset:yr}},JM=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow"],KM=function(e,n){var r=e.overlayClassName,i=e.trigger,o=i===void 0?["hover"]:i,s=e.mouseEnterDelay,a=s===void 0?0:s,l=e.mouseLeaveDelay,c=l===void 0?.1:l,u=e.overlayStyle,f=e.prefixCls,d=f===void 0?"rc-tooltip":f,h=e.children,p=e.onVisibleChange,O=e.afterVisibleChange,m=e.transitionName,x=e.animation,v=e.motion,y=e.placement,S=y===void 0?"right":y,b=e.align,w=b===void 0?{}:b,C=e.destroyTooltipOnHide,k=C===void 0?!1:C,I=e.defaultVisible,A=e.getTooltipContainer,E=e.overlayInnerStyle;e.arrowContent;var $=e.overlay,R=e.id,M=e.showArrow,Q=M===void 0?!0:M,Z=w_(e,JM),G=j.useRef(null);j.useImperativeHandle(n,function(){return G.current});var V=Sf({},Z);"visible"in e&&(V.popupVisible=e.visible);var ee=function(){return X.createElement(x_,{key:"content",prefixCls:d,id:R,overlayInnerStyle:E},$)};return X.createElement(UM,t0({popupClassName:r,prefixCls:d,popup:ee,action:o,builtinPlacements:HM,popupPlacement:S,ref:G,popupAlign:w,getPopupContainer:A,onPopupVisibleChange:p,afterPopupVisibleChange:O,popupTransitionName:m,popupAnimation:x,popupMotion:v,defaultPopupVisible:I,autoDestroy:k,mouseLeaveDelay:c,popupStyle:u,mouseEnterDelay:a,arrow:Q},V),h)};const Ia=j.forwardRef(KM),Vs=T.div`
217
+ }`),i)}else i0(i);return function(){i0(i)}},[e,i])}var N_=!1;function F_(t){return N_}var wy=function(e){return e===!1?!1:!hi()||!e?null:typeof e=="string"?document.querySelector(e):typeof e=="function"?e():e},jO=X.forwardRef(function(t,e){var n=t.open,r=t.autoLock,i=t.getContainer,o=t.debug,s=t.autoDestroy,a=s===void 0?!0:s,l=t.children,c=X.useState(n),u=Ve(c,2),f=u[0],d=u[1],h=f||n;process.env.NODE_ENV!=="production"&&Dd(hi()||!n,"Portal only work in client side. Please call 'useEffect' to show Portal instead default render in SSR."),X.useEffect(function(){(a||n)&&d(n)},[n,a]);var p=X.useState(function(){return wy(i)}),O=Ve(p,2),m=O[0],x=O[1];X.useEffect(function(){var $=wy(i);x($??null)});var v=I_(h&&!m,o),y=Ve(v,2),S=y[0],b=y[1],w=m??S;M_(r&&n&&hi()&&(w===S||w===document.body));var C=null;if(l&&Qd(l)&&e){var k=l;C=k.ref}var I=TO(C,e);if(!h||!hi()||m===void 0)return null;var A=w===!1||F_(),E=l;return e&&(E=X.cloneElement(l,{ref:I})),X.createElement(HA.Provider,{value:b},A?E:rO.createPortal(E,w))});process.env.NODE_ENV!=="production"&&(jO.displayName="Portal");function o0(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[];return X.default.Children.forEach(t,function(r){r==null&&!e.keepEmpty||(Array.isArray(r)?n=n.concat(o0(r)):Yo.isFragment(r)&&r.props?n=n.concat(o0(r.props.children,e)):n.push(r))}),n}function Cf(t){return t instanceof HTMLElement||t instanceof SVGElement}function Mu(t){return Cf(t)?t:t instanceof X.default.Component?h5.default.findDOMNode(t):null}var s0=X.createContext(null);function Z_(t){var e=t.children,n=t.onBatchResize,r=X.useRef(0),i=X.useRef([]),o=X.useContext(s0),s=X.useCallback(function(a,l,c){r.current+=1;var u=r.current;i.current.push({size:a,element:l,data:c}),Promise.resolve().then(function(){u===r.current&&(n==null||n(i.current),i.current=[])}),o==null||o(a,l,c)},[n,o]);return X.createElement(s0.Provider,{value:s},e)}var nP=function(){if(typeof Map<"u")return Map;function t(e,n){var r=-1;return e.some(function(i,o){return i[0]===n?(r=o,!0):!1}),r}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(n){var r=t(this.__entries__,n),i=this.__entries__[r];return i&&i[1]},e.prototype.set=function(n,r){var i=t(this.__entries__,n);~i?this.__entries__[i][1]=r:this.__entries__.push([n,r])},e.prototype.delete=function(n){var r=this.__entries__,i=t(r,n);~i&&r.splice(i,1)},e.prototype.has=function(n){return!!~t(this.__entries__,n)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(n,r){r===void 0&&(r=null);for(var i=0,o=this.__entries__;i<o.length;i++){var s=o[i];n.call(r,s[1],s[0])}},e}()}(),a0=typeof window<"u"&&typeof document<"u"&&window.document===document,kf=function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()}(),W_=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(kf):function(t){return setTimeout(function(){return t(Date.now())},1e3/60)}}(),V_=2;function z_(t,e){var n=!1,r=!1,i=0;function o(){n&&(n=!1,t()),r&&a()}function s(){W_(o)}function a(){var l=Date.now();if(n){if(l-i<V_)return;r=!0}else n=!0,r=!1,setTimeout(s,e);i=l}return a}var L_=20,X_=["top","right","bottom","left","width","height","size","weight"],G_=typeof MutationObserver<"u",Y_=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=z_(this.refresh.bind(this),L_)}return t.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},t.prototype.removeObserver=function(e){var n=this.observers_,r=n.indexOf(e);~r&&n.splice(r,1),!n.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){var e=this.updateObservers_();e&&this.refresh()},t.prototype.updateObservers_=function(){var e=this.observers_.filter(function(n){return n.gatherActive(),n.hasActive()});return e.forEach(function(n){return n.broadcastActive()}),e.length>0},t.prototype.connect_=function(){!a0||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),G_?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){!a0||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(e){var n=e.propertyName,r=n===void 0?"":n,i=X_.some(function(o){return!!~r.indexOf(o)});i&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),rP=function(t,e){for(var n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];Object.defineProperty(t,i,{value:e[i],enumerable:!1,writable:!1,configurable:!0})}return t},oa=function(t){var e=t&&t.ownerDocument&&t.ownerDocument.defaultView;return e||kf},iP=_d(0,0,0,0);function Af(t){return parseFloat(t)||0}function Cy(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.reduce(function(r,i){var o=t["border-"+i+"-width"];return r+Af(o)},0)}function q_(t){for(var e=["top","right","bottom","left"],n={},r=0,i=e;r<i.length;r++){var o=i[r],s=t["padding-"+o];n[o]=Af(s)}return n}function U_(t){var e=t.getBBox();return _d(0,0,e.width,e.height)}function H_(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return iP;var r=oa(t).getComputedStyle(t),i=q_(r),o=i.left+i.right,s=i.top+i.bottom,a=Af(r.width),l=Af(r.height);if(r.boxSizing==="border-box"&&(Math.round(a+o)!==e&&(a-=Cy(r,"left","right")+o),Math.round(l+s)!==n&&(l-=Cy(r,"top","bottom")+s)),!K_(t)){var c=Math.round(a+o)-e,u=Math.round(l+s)-n;Math.abs(c)!==1&&(a-=c),Math.abs(u)!==1&&(l-=u)}return _d(i.left,i.top,a,l)}var J_=function(){return typeof SVGGraphicsElement<"u"?function(t){return t instanceof oa(t).SVGGraphicsElement}:function(t){return t instanceof oa(t).SVGElement&&typeof t.getBBox=="function"}}();function K_(t){return t===oa(t).document.documentElement}function eM(t){return a0?J_(t)?U_(t):H_(t):iP}function tM(t){var e=t.x,n=t.y,r=t.width,i=t.height,o=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,s=Object.create(o.prototype);return rP(s,{x:e,y:n,width:r,height:i,top:n,right:e+r,bottom:i+n,left:e}),s}function _d(t,e,n,r){return{x:t,y:e,width:n,height:r}}var nM=function(){function t(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=_d(0,0,0,0),this.target=e}return t.prototype.isActive=function(){var e=eM(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},t}(),rM=function(){function t(e,n){var r=tM(n);rP(this,{target:e,contentRect:r})}return t}(),iM=function(){function t(e,n,r){if(this.activeObservations_=[],this.observations_=new nP,typeof e!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=n,this.callbackCtx_=r}return t.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof oa(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)||(n.set(e,new nM(e)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof oa(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)&&(n.delete(e),n.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&e.activeObservations_.push(n)})},t.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,n=this.activeObservations_.map(function(r){return new rM(r.target,r.broadcastRect())});this.callback_.call(e,n,e),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),oP=typeof WeakMap<"u"?new WeakMap:new nP,sP=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=Y_.getInstance(),r=new iM(e,n,this);oP.set(this,r)}return t}();["observe","unobserve","disconnect"].forEach(function(t){sP.prototype[t]=function(){var e;return(e=oP.get(this))[t].apply(e,arguments)}});var oM=function(){return typeof kf.ResizeObserver<"u"?kf.ResizeObserver:sP}(),Qi=new Map;function aP(t){t.forEach(function(e){var n,r=e.target;(n=Qi.get(r))===null||n===void 0||n.forEach(function(i){return i(r)})})}var lP=new oM(aP);process.env.NODE_ENV;process.env.NODE_ENV;function sM(t,e){Qi.has(t)||(Qi.set(t,new Set),lP.observe(t)),Qi.get(t).add(e)}function aM(t,e){Qi.has(t)&&(Qi.get(t).delete(e),Qi.get(t).size||(lP.unobserve(t),Qi.delete(t)))}var lM=function(t){kd(n,t);var e=Ad(n);function n(){return wd(this,n),e.apply(this,arguments)}return Cd(n,[{key:"render",value:function(){return this.props.children}}]),n}(X.Component);function cM(t,e){var n=t.children,r=t.disabled,i=X.useRef(null),o=X.useRef(null),s=X.useContext(s0),a=typeof n=="function",l=a?n(i):n,c=X.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),u=!a&&X.isValidElement(l)&&Qd(l),f=u?l.ref:null,d=TO(f,i),h=function(){var x;return Mu(i.current)||(i.current&&Vr(i.current)==="object"?Mu((x=i.current)===null||x===void 0?void 0:x.nativeElement):null)||Mu(o.current)};X.useImperativeHandle(e,function(){return h()});var p=X.useRef(t);p.current=t;var O=X.useCallback(function(m){var x=p.current,v=x.onResize,y=x.data,S=m.getBoundingClientRect(),b=S.width,w=S.height,C=m.offsetWidth,k=m.offsetHeight,I=Math.floor(b),A=Math.floor(w);if(c.current.width!==I||c.current.height!==A||c.current.offsetWidth!==C||c.current.offsetHeight!==k){var E={width:I,height:A,offsetWidth:C,offsetHeight:k};c.current=E;var $=C===Math.round(b)?b:C,R=k===Math.round(w)?w:k,M=le(le({},E),{},{offsetWidth:$,offsetHeight:R});s==null||s(M,m,y),v&&Promise.resolve().then(function(){v(M,m)})}},[]);return X.useEffect(function(){var m=h();return m&&!r&&sM(m,O),function(){return aM(m,O)}},[i.current,r]),X.createElement(lM,{ref:o},u?X.cloneElement(l,{ref:d}):l)}var cP=X.forwardRef(cM);process.env.NODE_ENV!=="production"&&(cP.displayName="SingleObserver");var uM="rc-observer-key";function fM(t,e){var n=t.children,r=typeof n=="function"?[n]:o0(n);return process.env.NODE_ENV!=="production"&&(r.length>1?wf(!1,"Find more than one child node with `children` in ResizeObserver. Please use ResizeObserver.Collection instead."):r.length===0&&wf(!1,"`children` of ResizeObserver is empty. Nothing is in observe.")),r.map(function(i,o){var s=(i==null?void 0:i.key)||"".concat(uM,"-").concat(o);return X.createElement(cP,Ae({},t,{key:s,ref:o===0?e:void 0}),i)})}var Md=X.forwardRef(fM);process.env.NODE_ENV!=="production"&&(Md.displayName="ResizeObserver");Md.Collection=Z_;function uP(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}function dM(t){return uP(t)instanceof ShadowRoot}function l0(t){return dM(t)?uP(t):null}function Fo(t){var e=X.useRef();e.current=t;var n=X.useCallback(function(){for(var r,i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return(r=e.current)===null||r===void 0?void 0:r.call.apply(r,[e].concat(o))},[]);return n}function hM(t){if(Array.isArray(t))return t}function pM(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(t)).next,e!==0)for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==e);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}function ky(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function gM(t,e){if(t){if(typeof t=="string")return ky(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ky(t,e)}}function mM(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
218
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fP(t,e){return hM(t)||pM(t,e)||gM(t,e)||mM()}function OM(){var t=Sf({},X);return t.useId}var Ay=0,Py=OM();const xM=Py?function(e){var n=Py();return e||(process.env.NODE_ENV==="test"?"test-id":n)}:function(e){var n=X.useState("ssr-id"),r=fP(n,2),i=r[0],o=r[1];return X.useEffect(function(){var s=Ay;Ay+=1,o("rc_unique_".concat(s))},[]),e||(process.env.NODE_ENV==="test"?"test-id":i)},vM=function(){if(typeof navigator>"u"||typeof window>"u")return!1;var t=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(t==null?void 0:t.substr(0,4))};var yM=X.createContext({}),bM=function(t){kd(n,t);var e=Ad(n);function n(){return wd(this,n),e.apply(this,arguments)}return Cd(n,[{key:"render",value:function(){return this.props.children}}]),n}(X.Component);function Nu(t){var e=X.useRef(!1),n=X.useState(t),r=fP(n,2),i=r[0],o=r[1];X.useEffect(function(){return e.current=!1,function(){e.current=!0}},[]);function s(a,l){l&&e.current||o(a)}return[i,s]}var Zo="none",Hc="appear",Jc="enter",Kc="leave",Ey="none",Mr="prepare",js="start",Rs="active",RO="end",dP="prepared";function Iy(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit".concat(t)]="webkit".concat(e),n["Moz".concat(t)]="moz".concat(e),n["ms".concat(t)]="MS".concat(e),n["O".concat(t)]="o".concat(e.toLowerCase()),n}function SM(t,e){var n={animationend:Iy("Animation","AnimationEnd"),transitionend:Iy("Transition","TransitionEnd")};return t&&("AnimationEvent"in e||delete n.animationend.animation,"TransitionEvent"in e||delete n.transitionend.transition),n}var wM=SM(hi(),typeof window<"u"?window:{}),hP={};if(hi()){var CM=document.createElement("div");hP=CM.style}var eu={};function pP(t){if(eu[t])return eu[t];var e=wM[t];if(e)for(var n=Object.keys(e),r=n.length,i=0;i<r;i+=1){var o=n[i];if(Object.prototype.hasOwnProperty.call(e,o)&&o in hP)return eu[t]=e[o],eu[t]}return""}var gP=pP("animationend"),mP=pP("transitionend"),OP=!!(gP&&mP),Ty=gP||"animationend",$y=mP||"transitionend";function jy(t,e){if(!t)return null;if(Vr(t)==="object"){var n=e.replace(/-\w/g,function(r){return r[1].toUpperCase()});return t[n]}return"".concat(t,"-").concat(e)}const kM=function(t){var e=j.useRef(),n=j.useRef(t);n.current=t;var r=X.useCallback(function(s){n.current(s)},[]);function i(s){s&&(s.removeEventListener($y,r),s.removeEventListener(Ty,r))}function o(s){e.current&&e.current!==s&&i(e.current),s&&s!==e.current&&(s.addEventListener($y,r),s.addEventListener(Ty,r),e.current=s)}return X.useEffect(function(){return function(){i(e.current)}},[]),[o,i]};var xP=hi()?j.useLayoutEffect:j.useEffect,vP=function(e){return+setTimeout(e,16)},yP=function(e){return clearTimeout(e)};typeof window<"u"&&"requestAnimationFrame"in window&&(vP=function(e){return window.requestAnimationFrame(e)},yP=function(e){return window.cancelAnimationFrame(e)});var Ry=0,Nd=new Map;function bP(t){Nd.delete(t)}var Pf=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Ry+=1;var r=Ry;function i(o){if(o===0)bP(r),e();else{var s=vP(function(){i(o-1)});Nd.set(r,s)}}return i(n),r};Pf.cancel=function(t){var e=Nd.get(t);return bP(t),yP(e)};process.env.NODE_ENV!=="production"&&(Pf.ids=function(){return Nd});const AM=function(){var t=X.useRef(null);function e(){Pf.cancel(t.current)}function n(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;e();var o=Pf(function(){i<=1?r({isCanceled:function(){return o!==t.current}}):n(r,i-1)});t.current=o}return X.useEffect(function(){return function(){e()}},[]),[n,e]};var PM=[Mr,js,Rs,RO],EM=[Mr,dP],SP=!1,IM=!0;function wP(t){return t===Rs||t===RO}const TM=function(t,e,n){var r=Nu(Ey),i=Ve(r,2),o=i[0],s=i[1],a=AM(),l=Ve(a,2),c=l[0],u=l[1];function f(){s(Mr,!0)}var d=e?EM:PM;return xP(function(){if(o!==Ey&&o!==RO){var h=d.indexOf(o),p=d[h+1],O=n(o);O===SP?s(p,!0):p&&c(function(m){function x(){m.isCanceled()||s(p,!0)}O===!0?x():Promise.resolve(O).then(x)})}},[t,o]),X.useEffect(function(){return function(){u()}},[]),[f,o]};function $M(t,e,n,r){var i=r.motionEnter,o=i===void 0?!0:i,s=r.motionAppear,a=s===void 0?!0:s,l=r.motionLeave,c=l===void 0?!0:l,u=r.motionDeadline,f=r.motionLeaveImmediately,d=r.onAppearPrepare,h=r.onEnterPrepare,p=r.onLeavePrepare,O=r.onAppearStart,m=r.onEnterStart,x=r.onLeaveStart,v=r.onAppearActive,y=r.onEnterActive,S=r.onLeaveActive,b=r.onAppearEnd,w=r.onEnterEnd,C=r.onLeaveEnd,k=r.onVisibleChanged,I=Nu(),A=Ve(I,2),E=A[0],$=A[1],R=Nu(Zo),M=Ve(R,2),Q=M[0],Z=M[1],G=Nu(null),V=Ve(G,2),ee=V[0],Y=V[1],z=j.useRef(!1),D=j.useRef(null);function B(){return n()}var N=j.useRef(!1);function U(){Z(Zo,!0),Y(null,!0)}function F(ye){var Ee=B();if(!(ye&&!ye.deadline&&ye.target!==Ee)){var $e=N.current,Le;Q===Hc&&$e?Le=b==null?void 0:b(Ee,ye):Q===Jc&&$e?Le=w==null?void 0:w(Ee,ye):Q===Kc&&$e&&(Le=C==null?void 0:C(Ee,ye)),Q!==Zo&&$e&&Le!==!1&&U()}}var te=kM(F),L=Ve(te,1),ce=L[0],re=function(Ee){var $e,Le,qe;switch(Ee){case Hc:return $e={},nn($e,Mr,d),nn($e,js,O),nn($e,Rs,v),$e;case Jc:return Le={},nn(Le,Mr,h),nn(Le,js,m),nn(Le,Rs,y),Le;case Kc:return qe={},nn(qe,Mr,p),nn(qe,js,x),nn(qe,Rs,S),qe;default:return{}}},ae=X.useMemo(function(){return re(Q)},[Q]),H=TM(Q,!t,function(ye){if(ye===Mr){var Ee=ae[Mr];return Ee?Ee(B()):SP}if(ne in ae){var $e;Y((($e=ae[ne])===null||$e===void 0?void 0:$e.call(ae,B(),null))||null)}return ne===Rs&&(ce(B()),u>0&&(clearTimeout(D.current),D.current=setTimeout(function(){F({deadline:!0})},u))),ne===dP&&U(),IM}),pe=Ve(H,2),q=pe[0],ne=pe[1],he=wP(ne);N.current=he,xP(function(){$(e);var ye=z.current;z.current=!0;var Ee;!ye&&e&&a&&(Ee=Hc),ye&&e&&o&&(Ee=Jc),(ye&&!e&&c||!ye&&f&&!e&&c)&&(Ee=Kc);var $e=re(Ee);Ee&&(t||$e[Mr])?(Z(Ee),q()):Z(Zo)},[e]),j.useEffect(function(){(Q===Hc&&!a||Q===Jc&&!o||Q===Kc&&!c)&&Z(Zo)},[a,o,c]),j.useEffect(function(){return function(){z.current=!1,clearTimeout(D.current)}},[]);var ve=X.useRef(!1);j.useEffect(function(){E&&(ve.current=!0),E!==void 0&&Q===Zo&&((ve.current||E)&&(k==null||k(E)),ve.current=!0)},[E,Q]);var Re=ee;return ae[Mr]&&ne===js&&(Re=le({transition:"none"},Re)),[Q,ne,Re,E??e]}function jM(t){var e=t;Vr(t)==="object"&&(e=t.transitionSupport);function n(i,o){return!!(i.motionName&&e&&o!==!1)}var r=X.forwardRef(function(i,o){var s=i.visible,a=s===void 0?!0:s,l=i.removeOnLeave,c=l===void 0?!0:l,u=i.forceRender,f=i.children,d=i.motionName,h=i.leavedClassName,p=i.eventProps,O=X.useContext(yM),m=O.motion,x=n(i,m),v=j.useRef(),y=j.useRef();function S(){try{return v.current instanceof HTMLElement?v.current:Mu(y.current)}catch{return null}}var b=$M(x,a,S,i),w=Ve(b,4),C=w[0],k=w[1],I=w[2],A=w[3],E=X.useRef(A);A&&(E.current=!0);var $=X.useCallback(function(Y){v.current=Y,IO(o,Y)},[o]),R,M=le(le({},p),{},{visible:a});if(!f)R=null;else if(C===Zo)A?R=f(le({},M),$):!c&&E.current&&h?R=f(le(le({},M),{},{className:h}),$):u||!c&&!h?R=f(le(le({},M),{},{style:{display:"none"}}),$):R=null;else{var Q,Z;k===Mr?Z="prepare":wP(k)?Z="active":k===js&&(Z="start");var G=jy(d,"".concat(C,"-").concat(Z));R=f(le(le({},M),{},{className:co(jy(d,C),(Q={},nn(Q,G,G&&Z),nn(Q,d,typeof d=="string"),Q)),style:I}),$)}if(X.isValidElement(R)&&Qd(R)){var V=R,ee=V.ref;ee||(R=X.cloneElement(R,{ref:$}))}return X.createElement(bM,{ref:y},R)});return r.displayName="CSSMotion",r}const DO=jM(OP);var c0="add",u0="keep",f0="remove",Vh="removed";function RM(t){var e;return t&&Vr(t)==="object"&&"key"in t?e=t:e={key:t},le(le({},e),{},{key:String(e.key)})}function d0(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return t.map(RM)}function DM(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=[],r=0,i=e.length,o=d0(t),s=d0(e);o.forEach(function(c){for(var u=!1,f=r;f<i;f+=1){var d=s[f];if(d.key===c.key){r<f&&(n=n.concat(s.slice(r,f).map(function(h){return le(le({},h),{},{status:c0})})),r=f),n.push(le(le({},d),{},{status:u0})),r+=1,u=!0;break}}u||n.push(le(le({},c),{},{status:f0}))}),r<i&&(n=n.concat(s.slice(r).map(function(c){return le(le({},c),{},{status:c0})})));var a={};n.forEach(function(c){var u=c.key;a[u]=(a[u]||0)+1});var l=Object.keys(a).filter(function(c){return a[c]>1});return l.forEach(function(c){n=n.filter(function(u){var f=u.key,d=u.status;return f!==c||d!==f0}),n.forEach(function(u){u.key===c&&(u.status=u0)})}),n}var QM=["component","children","onVisibleChanged","onAllRemoved"],BM=["status"],_M=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function MM(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:DO,n=function(r){kd(o,r);var i=Ad(o);function o(){var s;wd(this,o);for(var a=arguments.length,l=new Array(a),c=0;c<a;c++)l[c]=arguments[c];return s=i.call.apply(i,[this].concat(l)),nn(zg(s),"state",{keyEntities:[]}),nn(zg(s),"removeKey",function(u){var f=s.state.keyEntities,d=f.map(function(h){return h.key!==u?h:le(le({},h),{},{status:Vh})});return s.setState({keyEntities:d}),d.filter(function(h){var p=h.status;return p!==Vh}).length}),s}return Cd(o,[{key:"render",value:function(){var a=this,l=this.state.keyEntities,c=this.props,u=c.component,f=c.children,d=c.onVisibleChanged,h=c.onAllRemoved,p=Tr(c,QM),O=u||X.Fragment,m={};return _M.forEach(function(x){m[x]=p[x],delete p[x]}),delete p.keys,X.createElement(O,p,l.map(function(x,v){var y=x.status,S=Tr(x,BM),b=y===c0||y===u0;return X.createElement(e,Ae({},m,{key:S.key,visible:b,eventProps:S,onVisibleChanged:function(C){if(d==null||d(C,{key:S.key}),!C){var k=a.removeKey(S.key);k===0&&h&&h()}}}),function(w,C){return f(le(le({},w),{},{index:v}),C)})}))}}],[{key:"getDerivedStateFromProps",value:function(a,l){var c=a.keys,u=l.keyEntities,f=d0(c),d=DM(u,f);return{keyEntities:d.filter(function(h){var p=u.find(function(O){var m=O.key;return h.key===m});return!(p&&p.status===Vh&&h.status===f0)})}}}]),o}(X.Component);return nn(n,"defaultProps",{component:"div"}),n}MM(OP);function NM(t){var e=t.prefixCls,n=t.align,r=t.arrow,i=t.arrowPos,o=r||{},s=o.className,a=o.content,l=i.x,c=l===void 0?0:l,u=i.y,f=u===void 0?0:u,d=X.useRef();if(!n||!n.points)return null;var h={position:"absolute"};if(n.autoArrow!==!1){var p=n.points[0],O=n.points[1],m=p[0],x=p[1],v=O[0],y=O[1];m===v||!["t","b"].includes(m)?h.top=f:m==="t"?h.top=0:h.bottom=0,x===y||!["l","r"].includes(x)?h.left=c:x==="l"?h.left=0:h.right=0}return X.createElement("div",{ref:d,className:co("".concat(e,"-arrow"),s),style:h},a)}function FM(t){var e=t.prefixCls,n=t.open,r=t.zIndex,i=t.mask,o=t.motion;return i?X.createElement(DO,Ae({},o,{motionAppear:!0,visible:n,removeOnLeave:!0}),function(s){var a=s.className;return X.createElement("div",{style:{zIndex:r},className:co("".concat(e,"-mask"),a)})}):null}var CP=X.memo(function(t){var e=t.children;return e},function(t,e){return e.cache});process.env.NODE_ENV!=="production"&&(CP.displayName="PopupContent");var kP=X.forwardRef(function(t,e){var n=t.popup,r=t.className,i=t.prefixCls,o=t.style,s=t.target,a=t.onVisibleChanged,l=t.open,c=t.keepDom,u=t.fresh,f=t.onClick,d=t.mask,h=t.arrow,p=t.arrowPos,O=t.align,m=t.motion,x=t.maskMotion,v=t.forceRender,y=t.getPopupContainer,S=t.autoDestroy,b=t.portal,w=t.zIndex,C=t.onMouseEnter,k=t.onMouseLeave,I=t.onPointerEnter,A=t.ready,E=t.offsetX,$=t.offsetY,R=t.offsetR,M=t.offsetB,Q=t.onAlign,Z=t.onPrepare,G=t.stretch,V=t.targetWidth,ee=t.targetHeight,Y=typeof n=="function"?n():n,z=l||c,D=(y==null?void 0:y.length)>0,B=X.useState(!y||!D),N=Ve(B,2),U=N[0],F=N[1];if(hr(function(){!U&&D&&s&&F(!0)},[U,D,s]),!U)return null;var te="auto",L={left:"-1000vw",top:"-1000vh",right:te,bottom:te};if(A||!l){var ce,re=O.points,ae=O.dynamicInset||((ce=O._experimental)===null||ce===void 0?void 0:ce.dynamicInset),H=ae&&re[0][1]==="r",pe=ae&&re[0][0]==="b";H?(L.right=R,L.left=te):(L.left=E,L.right=te),pe?(L.bottom=M,L.top=te):(L.top=$,L.bottom=te)}var q={};return G&&(G.includes("height")&&ee?q.height=ee:G.includes("minHeight")&&ee&&(q.minHeight=ee),G.includes("width")&&V?q.width=V:G.includes("minWidth")&&V&&(q.minWidth=V)),l||(q.pointerEvents="none"),X.createElement(b,{open:v||z,getContainer:y&&function(){return y(s)},autoDestroy:S},X.createElement(FM,{prefixCls:i,open:l,zIndex:w,mask:d,motion:x}),X.createElement(Md,{onResize:Q,disabled:!l},function(ne){return X.createElement(DO,Ae({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:v,leavedClassName:"".concat(i,"-hidden")},m,{onAppearPrepare:Z,onEnterPrepare:Z,visible:l,onVisibleChanged:function(ve){var Re;m==null||(Re=m.onVisibleChanged)===null||Re===void 0||Re.call(m,ve),a(ve)}}),function(he,ve){var Re=he.className,ye=he.style,Ee=co(i,Re,r);return X.createElement("div",{ref:UA(ne,e,ve),className:Ee,style:le(le(le(le({"--arrow-x":"".concat(p.x||0,"px"),"--arrow-y":"".concat(p.y||0,"px")},L),q),ye),{},{boxSizing:"border-box",zIndex:w},o),onMouseEnter:C,onMouseLeave:k,onPointerEnter:I,onClick:f},h&&X.createElement(NM,{prefixCls:i,arrow:h,arrowPos:p,align:O}),X.createElement(CP,{cache:!l&&!u},Y))})}))});process.env.NODE_ENV!=="production"&&(kP.displayName="Popup");var AP=X.forwardRef(function(t,e){var n=t.children,r=t.getTriggerDOMNode,i=Qd(n),o=X.useCallback(function(a){IO(e,r?r(a):a)},[r]),s=TO(o,n.ref);return i?X.cloneElement(n,{ref:s}):n});process.env.NODE_ENV!=="production"&&(AP.displayName="TriggerWrapper");var Dy=X.createContext(null);function Qy(t){return t?Array.isArray(t)?t:[t]:[]}function ZM(t,e,n,r){return X.useMemo(function(){var i=Qy(n??e),o=Qy(r??e),s=new Set(i),a=new Set(o);return t&&(s.has("hover")&&(s.delete("hover"),s.add("click")),a.has("hover")&&(a.delete("hover"),a.add("click"))),[s,a]},[t,e,n,r])}const WM=function(t){if(!t)return!1;if(t instanceof Element){if(t.offsetParent)return!0;if(t.getBBox){var e=t.getBBox(),n=e.width,r=e.height;if(n||r)return!0}if(t.getBoundingClientRect){var i=t.getBoundingClientRect(),o=i.width,s=i.height;if(o||s)return!0}}return!1};function VM(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;return n?t[0]===e[0]:t[0]===e[0]&&t[1]===e[1]}function zM(t,e,n,r){for(var i=n.points,o=Object.keys(t),s=0;s<o.length;s+=1){var a,l=o[s];if(VM((a=t[l])===null||a===void 0?void 0:a.points,i,r))return"".concat(e,"-placement-").concat(l)}return""}function By(t,e,n,r){return e||(n?{motionName:"".concat(t,"-").concat(n)}:r?{motionName:r}:null)}function fc(t){return t.ownerDocument.defaultView}function h0(t){for(var e=[],n=t==null?void 0:t.parentElement,r=["hidden","scroll","clip","auto"];n;){var i=fc(n).getComputedStyle(n),o=i.overflowX,s=i.overflowY,a=i.overflow;[o,s,a].some(function(l){return r.includes(l)})&&e.push(n),n=n.parentElement}return e}function Bl(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(t)?e:t}function qa(t){return Bl(parseFloat(t),0)}function _y(t,e){var n=le({},t);return(e||[]).forEach(function(r){if(!(r instanceof HTMLBodyElement||r instanceof HTMLHtmlElement)){var i=fc(r).getComputedStyle(r),o=i.overflow,s=i.overflowClipMargin,a=i.borderTopWidth,l=i.borderBottomWidth,c=i.borderLeftWidth,u=i.borderRightWidth,f=r.getBoundingClientRect(),d=r.offsetHeight,h=r.clientHeight,p=r.offsetWidth,O=r.clientWidth,m=qa(a),x=qa(l),v=qa(c),y=qa(u),S=Bl(Math.round(f.width/p*1e3)/1e3),b=Bl(Math.round(f.height/d*1e3)/1e3),w=(p-O-v-y)*S,C=(d-h-m-x)*b,k=m*b,I=x*b,A=v*S,E=y*S,$=0,R=0;if(o==="clip"){var M=qa(s);$=M*S,R=M*b}var Q=f.x+A-$,Z=f.y+k-R,G=Q+f.width+2*$-A-E-w,V=Z+f.height+2*R-k-I-C;n.left=Math.max(n.left,Q),n.top=Math.max(n.top,Z),n.right=Math.min(n.right,G),n.bottom=Math.min(n.bottom,V)}}),n}function My(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n="".concat(e),r=n.match(/^(.*)\%$/);return r?t*(parseFloat(r[1])/100):parseFloat(n)}function Ny(t,e){var n=e||[],r=Ve(n,2),i=r[0],o=r[1];return[My(t.width,i),My(t.height,o)]}function Fy(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[t[0],t[1]]}function vs(t,e){var n=e[0],r=e[1],i,o;return n==="t"?o=t.y:n==="b"?o=t.y+t.height:o=t.y+t.height/2,r==="l"?i=t.x:r==="r"?i=t.x+t.width:i=t.x+t.width/2,{x:i,y:o}}function qi(t,e){var n={t:"b",b:"t",l:"r",r:"l"};return t.map(function(r,i){return i===e?n[r]||"c":r}).join("")}function LM(t,e,n,r,i,o,s){var a=X.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:i[r]||{}}),l=Ve(a,2),c=l[0],u=l[1],f=X.useRef(0),d=X.useMemo(function(){return e?h0(e):[]},[e]),h=X.useRef({}),p=function(){h.current={}};t||p();var O=Fo(function(){if(e&&n&&t){let xr=function(Dc,vr){var gs=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ee,Qc=Y.x+Dc,ms=Y.y+vr,Bc=Qc+ce,Va=ms+L,_c=Math.max(Qc,gs.left),kh=Math.max(ms,gs.top),Ah=Math.min(Bc,gs.right),Ph=Math.min(Va,gs.bottom);return Math.max(0,(Ah-_c)*(Ph-kh))},Rc=function(){oe=Y.y+It,ue=oe+L,Ce=Y.x+Et,Xe=Ce+ce};var v,y,S=e,b=S.ownerDocument,w=fc(S),C=w.getComputedStyle(S),k=C.width,I=C.height,A=C.position,E=S.style.left,$=S.style.top,R=S.style.right,M=S.style.bottom,Q=S.style.overflow,Z=le(le({},i[r]),o),G=b.createElement("div");(v=S.parentElement)===null||v===void 0||v.appendChild(G),G.style.left="".concat(S.offsetLeft,"px"),G.style.top="".concat(S.offsetTop,"px"),G.style.position=A,G.style.height="".concat(S.offsetHeight,"px"),G.style.width="".concat(S.offsetWidth,"px"),S.style.left="0",S.style.top="0",S.style.right="auto",S.style.bottom="auto",S.style.overflow="hidden";var V;if(Array.isArray(n))V={x:n[0],y:n[1],width:0,height:0};else{var ee=n.getBoundingClientRect();V={x:ee.x,y:ee.y,width:ee.width,height:ee.height}}var Y=S.getBoundingClientRect(),z=b.documentElement,D=z.clientWidth,B=z.clientHeight,N=z.scrollWidth,U=z.scrollHeight,F=z.scrollTop,te=z.scrollLeft,L=Y.height,ce=Y.width,re=V.height,ae=V.width,H={left:0,top:0,right:D,bottom:B},pe={left:-te,top:-F,right:N-te,bottom:U-F},q=Z.htmlRegion,ne="visible",he="visibleFirst";q!=="scroll"&&q!==he&&(q=ne);var ve=q===he,Re=_y(pe,d),ye=_y(H,d),Ee=q===ne?ye:Re,$e=ve?ye:Ee;S.style.left="auto",S.style.top="auto",S.style.right="0",S.style.bottom="0";var Le=S.getBoundingClientRect();S.style.left=E,S.style.top=$,S.style.right=R,S.style.bottom=M,S.style.overflow=Q,(y=S.parentElement)===null||y===void 0||y.removeChild(G);var qe=Bl(Math.round(ce/parseFloat(k)*1e3)/1e3),be=Bl(Math.round(L/parseFloat(I)*1e3)/1e3);if(qe===0||be===0||Cf(n)&&!WM(n))return;var rt=Z.offset,Ot=Z.targetOffset,Ut=Ny(Y,rt),cn=Ve(Ut,2),dn=cn[0],hn=cn[1],Bn=Ny(V,Ot),Ht=Ve(Bn,2),$o=Ht[0],Pi=Ht[1];V.x-=$o,V.y-=Pi;var Li=Z.points||[],Dr=Ve(Li,2),Pn=Dr[0],tr=Dr[1],_n=Fy(tr),Jt=Fy(Pn),nr=vs(V,_n),Qr=vs(Y,Jt),Mn=le({},Z),Et=nr.x-Qr.x+dn,It=nr.y-Qr.y+hn,yt=xr(Et,It),qr=xr(Et,It,ye),rr=vs(V,["t","l"]),ir=vs(Y,["t","l"]),Ei=vs(V,["b","r"]),Ur=vs(Y,["b","r"]),jt=Z.overflow||{},_t=jt.adjustX,Xi=jt.adjustY,Ii=jt.shiftX,Gi=jt.shiftY,W=function(vr){return typeof vr=="boolean"?vr:vr>=0},oe,ue,Ce,Xe;Rc();var it=W(Xi),Ze=Jt[0]===_n[0];if(it&&Jt[0]==="t"&&(ue>$e.bottom||h.current.bt)){var Be=It;Ze?Be-=L-re:Be=rr.y-Ur.y-hn;var Lt=xr(Et,Be),xt=xr(Et,Be,ye);Lt>yt||Lt===yt&&(!ve||xt>=qr)?(h.current.bt=!0,It=Be,hn=-hn,Mn.points=[qi(Jt,0),qi(_n,0)]):h.current.bt=!1}if(it&&Jt[0]==="b"&&(oe<$e.top||h.current.tb)){var vt=It;Ze?vt+=L-re:vt=Ei.y-ir.y-hn;var bt=xr(Et,vt),Hr=xr(Et,vt,ye);bt>yt||bt===yt&&(!ve||Hr>=qr)?(h.current.tb=!0,It=vt,hn=-hn,Mn.points=[qi(Jt,0),qi(_n,0)]):h.current.tb=!1}var jo=W(_t),Ln=Jt[1]===_n[1];if(jo&&Jt[1]==="l"&&(Xe>$e.right||h.current.rl)){var Ro=Et;Ln?Ro-=ce-ae:Ro=rr.x-Ur.x-dn;var Pc=xr(Ro,It),gh=xr(Ro,It,ye);Pc>yt||Pc===yt&&(!ve||gh>=qr)?(h.current.rl=!0,Et=Ro,dn=-dn,Mn.points=[qi(Jt,1),qi(_n,1)]):h.current.rl=!1}if(jo&&Jt[1]==="r"&&(Ce<$e.left||h.current.lr)){var Do=Et;Ln?Do+=ce-ae:Do=Ei.x-ir.x-dn;var Ec=xr(Do,It),mh=xr(Do,It,ye);Ec>yt||Ec===yt&&(!ve||mh>=qr)?(h.current.lr=!0,Et=Do,dn=-dn,Mn.points=[qi(Jt,1),qi(_n,1)]):h.current.lr=!1}Rc();var Jr=Ii===!0?0:Ii;typeof Jr=="number"&&(Ce<ye.left&&(Et-=Ce-ye.left-dn,V.x+ae<ye.left+Jr&&(Et+=V.x-ye.left+ae-Jr)),Xe>ye.right&&(Et-=Xe-ye.right-dn,V.x>ye.right-Jr&&(Et+=V.x-ye.right+Jr)));var Ti=Gi===!0?0:Gi;typeof Ti=="number"&&(oe<ye.top&&(It-=oe-ye.top-hn,V.y+re<ye.top+Ti&&(It+=V.y-ye.top+re-Ti)),ue>ye.bottom&&(It-=ue-ye.bottom-hn,V.y>ye.bottom-Ti&&(It+=V.y-ye.bottom+Ti)));var Za=Y.x+Et,Ic=Za+ce,Yi=Y.y+It,Qo=Yi+L,Wa=V.x,ps=Wa+ae,$i=V.y,Oh=$i+re,xh=Math.max(Za,Wa),vh=Math.min(Ic,ps),Tc=(xh+vh)/2,yh=Tc-Za,bh=Math.max(Yi,$i),Sh=Math.min(Qo,Oh),$c=(bh+Sh)/2,wh=$c-Yi;s==null||s(e,Mn);var Ch=Le.right-Y.x-(Et+Y.width),jc=Le.bottom-Y.y-(It+Y.height);u({ready:!0,offsetX:Et/qe,offsetY:It/be,offsetR:Ch/qe,offsetB:jc/be,arrowX:yh/qe,arrowY:wh/be,scaleX:qe,scaleY:be,align:Mn})}}),m=function(){f.current+=1;var y=f.current;Promise.resolve().then(function(){f.current===y&&O()})},x=function(){u(function(y){return le(le({},y),{},{ready:!1})})};return hr(x,[r]),hr(function(){t||x()},[t]),[c.ready,c.offsetX,c.offsetY,c.offsetR,c.offsetB,c.arrowX,c.arrowY,c.scaleX,c.scaleY,c.align,m]}function XM(t,e,n,r,i){hr(function(){if(t&&e&&n){let f=function(){r(),i()};var o=e,s=n,a=h0(o),l=h0(s),c=fc(s),u=new Set([c].concat(na(a),na(l)));return u.forEach(function(d){d.addEventListener("scroll",f,{passive:!0})}),c.addEventListener("resize",f,{passive:!0}),r(),function(){u.forEach(function(d){d.removeEventListener("scroll",f),c.removeEventListener("resize",f)})}}},[t,e,n])}function GM(t,e,n,r,i,o,s,a){var l=X.useRef(t);l.current=t,X.useEffect(function(){if(e&&r&&(!i||o)){var c=function(x){var v=x.target;l.current&&!s(v)&&a(!1)},u=fc(r);u.addEventListener("mousedown",c,!0),u.addEventListener("contextmenu",c,!0);var f=l0(n);if(f&&(f.addEventListener("mousedown",c,!0),f.addEventListener("contextmenu",c,!0)),process.env.NODE_ENV!=="production"){var d,h,p=n==null||(d=n.getRootNode)===null||d===void 0?void 0:d.call(n),O=(h=r.getRootNode)===null||h===void 0?void 0:h.call(r);wf(p===O,"trigger element and popup element should in same shadow root.")}return function(){u.removeEventListener("mousedown",c,!0),u.removeEventListener("contextmenu",c,!0),f&&(f.removeEventListener("mousedown",c,!0),f.removeEventListener("contextmenu",c,!0))}}},[e,n,r,i,o])}var YM=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];function qM(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:jO,e=X.forwardRef(function(n,r){var i=n.prefixCls,o=i===void 0?"rc-trigger-popup":i,s=n.children,a=n.action,l=a===void 0?"hover":a,c=n.showAction,u=n.hideAction,f=n.popupVisible,d=n.defaultPopupVisible,h=n.onPopupVisibleChange,p=n.afterPopupVisibleChange,O=n.mouseEnterDelay,m=n.mouseLeaveDelay,x=m===void 0?.1:m,v=n.focusDelay,y=n.blurDelay,S=n.mask,b=n.maskClosable,w=b===void 0?!0:b,C=n.getPopupContainer,k=n.forceRender,I=n.autoDestroy,A=n.destroyPopupOnHide,E=n.popup,$=n.popupClassName,R=n.popupStyle,M=n.popupPlacement,Q=n.builtinPlacements,Z=Q===void 0?{}:Q,G=n.popupAlign,V=n.zIndex,ee=n.stretch,Y=n.getPopupClassNameFromAlign,z=n.fresh,D=n.alignPoint,B=n.onPopupClick,N=n.onPopupAlign,U=n.arrow,F=n.popupMotion,te=n.maskMotion,L=n.popupTransitionName,ce=n.popupAnimation,re=n.maskTransitionName,ae=n.maskAnimation,H=n.className,pe=n.getTriggerDOMNode,q=Tr(n,YM),ne=I||A||!1,he=X.useState(!1),ve=Ve(he,2),Re=ve[0],ye=ve[1];hr(function(){ye(vM())},[]);var Ee=X.useRef({}),$e=X.useContext(Dy),Le=X.useMemo(function(){return{registerSubPopup:function(De,Mt){Ee.current[De]=Mt,$e==null||$e.registerSubPopup(De,Mt)}}},[$e]),qe=xM(),be=X.useState(null),rt=Ve(be,2),Ot=rt[0],Ut=rt[1],cn=X.useRef(null),dn=Fo(function(xe){cn.current=xe,Cf(xe)&&Ot!==xe&&Ut(xe),$e==null||$e.registerSubPopup(qe,xe)}),hn=X.useState(null),Bn=Ve(hn,2),Ht=Bn[0],$o=Bn[1],Pi=X.useRef(null),Li=Fo(function(xe){Cf(xe)&&Ht!==xe&&($o(xe),Pi.current=xe)}),Dr=X.Children.only(s),Pn=(Dr==null?void 0:Dr.props)||{},tr={},_n=Fo(function(xe){var De,Mt,Kt=Ht;return(Kt==null?void 0:Kt.contains(xe))||((De=l0(Kt))===null||De===void 0?void 0:De.host)===xe||xe===Kt||(Ot==null?void 0:Ot.contains(xe))||((Mt=l0(Ot))===null||Mt===void 0?void 0:Mt.host)===xe||xe===Ot||Object.values(Ee.current).some(function(Nt){return(Nt==null?void 0:Nt.contains(xe))||xe===Nt})}),Jt=By(o,F,ce,L),nr=By(o,te,ae,re),Qr=X.useState(d||!1),Mn=Ve(Qr,2),Et=Mn[0],It=Mn[1],yt=f??Et,qr=Fo(function(xe){f===void 0&&It(xe)});hr(function(){It(f||!1)},[f]);var rr=X.useRef(yt);rr.current=yt;var ir=X.useRef([]);ir.current=[];var Ei=Fo(function(xe){var De;qr(xe),((De=ir.current[ir.current.length-1])!==null&&De!==void 0?De:yt)!==xe&&(ir.current.push(xe),h==null||h(xe))}),Ur=X.useRef(),jt=function(){clearTimeout(Ur.current)},_t=function(De){var Mt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;jt(),Mt===0?Ei(De):Ur.current=setTimeout(function(){Ei(De)},Mt*1e3)};X.useEffect(function(){return jt},[]);var Xi=X.useState(!1),Ii=Ve(Xi,2),Gi=Ii[0],W=Ii[1];hr(function(xe){(!xe||yt)&&W(!0)},[yt]);var oe=X.useState(null),ue=Ve(oe,2),Ce=ue[0],Xe=ue[1],it=X.useState([0,0]),Ze=Ve(it,2),Be=Ze[0],Lt=Ze[1],xt=function(De){Lt([De.clientX,De.clientY])},vt=LM(yt,Ot,D?Be:Ht,M,Z,G,N),bt=Ve(vt,11),Hr=bt[0],jo=bt[1],Ln=bt[2],Ro=bt[3],Pc=bt[4],gh=bt[5],Do=bt[6],Ec=bt[7],mh=bt[8],Jr=bt[9],Ti=bt[10],Za=ZM(Re,l,c,u),Ic=Ve(Za,2),Yi=Ic[0],Qo=Ic[1],Wa=Yi.has("click"),ps=Qo.has("click")||Qo.has("contextMenu"),$i=Fo(function(){Gi||Ti()}),Oh=function(){rr.current&&D&&ps&&_t(!1)};XM(yt,Ht,Ot,$i,Oh),hr(function(){$i()},[Be,M]),hr(function(){yt&&!(Z!=null&&Z[M])&&$i()},[JSON.stringify(G)]);var xh=X.useMemo(function(){var xe=zM(Z,o,Jr,D);return co(xe,Y==null?void 0:Y(Jr))},[Jr,Y,Z,o,D]);X.useImperativeHandle(r,function(){return{nativeElement:Pi.current,popupElement:cn.current,forceAlign:$i}});var vh=X.useState(0),Tc=Ve(vh,2),yh=Tc[0],bh=Tc[1],Sh=X.useState(0),$c=Ve(Sh,2),wh=$c[0],Ch=$c[1],jc=function(){if(ee&&Ht){var De=Ht.getBoundingClientRect();bh(De.width),Ch(De.height)}},xr=function(){jc(),$i()},Rc=function(De){W(!1),Ti(),p==null||p(De)},Dc=function(){return new Promise(function(De){jc(),Xe(function(){return De})})};hr(function(){Ce&&(Ti(),Ce(),Xe(null))},[Ce]);function vr(xe,De,Mt,Kt){tr[xe]=function(Nt){var Mc;Kt==null||Kt(Nt),_t(De,Mt);for(var Eh=arguments.length,iv=new Array(Eh>1?Eh-1:0),Nc=1;Nc<Eh;Nc++)iv[Nc-1]=arguments[Nc];(Mc=Pn[xe])===null||Mc===void 0||Mc.call.apply(Mc,[Pn,Nt].concat(iv))}}(Wa||ps)&&(tr.onClick=function(xe){var De;rr.current&&ps?_t(!1):!rr.current&&Wa&&(xt(xe),_t(!0));for(var Mt=arguments.length,Kt=new Array(Mt>1?Mt-1:0),Nt=1;Nt<Mt;Nt++)Kt[Nt-1]=arguments[Nt];(De=Pn.onClick)===null||De===void 0||De.call.apply(De,[Pn,xe].concat(Kt))}),GM(yt,ps,Ht,Ot,S,w,_n,_t);var gs=Yi.has("hover"),Qc=Qo.has("hover"),ms,Bc;gs&&(vr("onMouseEnter",!0,O,function(xe){xt(xe)}),vr("onPointerEnter",!0,O,function(xe){xt(xe)}),ms=function(De){(yt||Gi)&&Ot!==null&&Ot!==void 0&&Ot.contains(De.target)&&_t(!0,O)},D&&(tr.onMouseMove=function(xe){var De;(De=Pn.onMouseMove)===null||De===void 0||De.call(Pn,xe)})),Qc&&(vr("onMouseLeave",!1,x),vr("onPointerLeave",!1,x),Bc=function(){_t(!1,x)}),Yi.has("focus")&&vr("onFocus",!0,v),Qo.has("focus")&&vr("onBlur",!1,y),Yi.has("contextMenu")&&(tr.onContextMenu=function(xe){var De;rr.current&&Qo.has("contextMenu")?_t(!1):(xt(xe),_t(!0)),xe.preventDefault();for(var Mt=arguments.length,Kt=new Array(Mt>1?Mt-1:0),Nt=1;Nt<Mt;Nt++)Kt[Nt-1]=arguments[Nt];(De=Pn.onContextMenu)===null||De===void 0||De.call.apply(De,[Pn,xe].concat(Kt))}),H&&(tr.className=co(Pn.className,H));var Va=le(le({},Pn),tr),_c={},kh=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];kh.forEach(function(xe){q[xe]&&(_c[xe]=function(){for(var De,Mt=arguments.length,Kt=new Array(Mt),Nt=0;Nt<Mt;Nt++)Kt[Nt]=arguments[Nt];(De=Va[xe])===null||De===void 0||De.call.apply(De,[Va].concat(Kt)),q[xe].apply(q,Kt)})});var Ah=X.cloneElement(Dr,le(le({},Va),_c)),Ph={x:gh,y:Do},l5=U?le({},U!==!0?U:{}):null;return X.createElement(X.Fragment,null,X.createElement(Md,{disabled:!yt,ref:Li,onResize:xr},X.createElement(AP,{getTriggerDOMNode:pe},Ah)),X.createElement(Dy.Provider,{value:Le},X.createElement(kP,{portal:t,ref:dn,prefixCls:o,popup:E,className:co($,xh),style:R,target:Ht,onMouseEnter:ms,onMouseLeave:Bc,onPointerEnter:ms,zIndex:V,open:yt,keepDom:Gi,fresh:z,onClick:B,mask:S,motion:Jt,maskMotion:nr,onVisibleChanged:Rc,onPrepare:Dc,forceRender:k,autoDestroy:ne,getPopupContainer:C,align:Jr,arrow:l5,arrowPos:Ph,ready:Hr,offsetX:jo,offsetY:Ln,offsetR:Ro,offsetB:Pc,onAlign:$i,stretch:ee,targetWidth:yh/Ec,targetHeight:wh/mh})))});return process.env.NODE_ENV!=="production"&&(e.displayName="Trigger"),e}const UM=qM(jO);var ys={shiftX:64,adjustY:1},bs={adjustX:1,shiftY:!0},yr=[0,0],HM={left:{points:["cr","cl"],overflow:bs,offset:[-4,0],targetOffset:yr},right:{points:["cl","cr"],overflow:bs,offset:[4,0],targetOffset:yr},top:{points:["bc","tc"],overflow:ys,offset:[0,-4],targetOffset:yr},bottom:{points:["tc","bc"],overflow:ys,offset:[0,4],targetOffset:yr},topLeft:{points:["bl","tl"],overflow:ys,offset:[0,-4],targetOffset:yr},leftTop:{points:["tr","tl"],overflow:bs,offset:[-4,0],targetOffset:yr},topRight:{points:["br","tr"],overflow:ys,offset:[0,-4],targetOffset:yr},rightTop:{points:["tl","tr"],overflow:bs,offset:[4,0],targetOffset:yr},bottomRight:{points:["tr","br"],overflow:ys,offset:[0,4],targetOffset:yr},rightBottom:{points:["bl","br"],overflow:bs,offset:[4,0],targetOffset:yr},bottomLeft:{points:["tl","bl"],overflow:ys,offset:[0,4],targetOffset:yr},leftBottom:{points:["br","bl"],overflow:bs,offset:[-4,0],targetOffset:yr}},JM=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow"],KM=function(e,n){var r=e.overlayClassName,i=e.trigger,o=i===void 0?["hover"]:i,s=e.mouseEnterDelay,a=s===void 0?0:s,l=e.mouseLeaveDelay,c=l===void 0?.1:l,u=e.overlayStyle,f=e.prefixCls,d=f===void 0?"rc-tooltip":f,h=e.children,p=e.onVisibleChange,O=e.afterVisibleChange,m=e.transitionName,x=e.animation,v=e.motion,y=e.placement,S=y===void 0?"right":y,b=e.align,w=b===void 0?{}:b,C=e.destroyTooltipOnHide,k=C===void 0?!1:C,I=e.defaultVisible,A=e.getTooltipContainer,E=e.overlayInnerStyle;e.arrowContent;var $=e.overlay,R=e.id,M=e.showArrow,Q=M===void 0?!0:M,Z=w_(e,JM),G=j.useRef(null);j.useImperativeHandle(n,function(){return G.current});var V=Sf({},Z);"visible"in e&&(V.popupVisible=e.visible);var ee=function(){return X.createElement(x_,{key:"content",prefixCls:d,id:R,overlayInnerStyle:E},$)};return X.createElement(UM,t0({popupClassName:r,prefixCls:d,popup:ee,action:o,builtinPlacements:HM,popupPlacement:S,ref:G,popupAlign:w,getPopupContainer:A,onPopupVisibleChange:p,afterPopupVisibleChange:O,popupTransitionName:m,popupAnimation:x,popupMotion:v,defaultPopupVisible:I,autoDestroy:k,mouseLeaveDelay:c,popupStyle:u,mouseEnterDelay:a,arrow:Q},V),h)};const Ia=j.forwardRef(KM),Vs=T.div`
219
219
  color: var(--text-color-secondary);
220
220
  font-size: var(--font-size-sm);
221
221
  font-style: normal;
@@ -225,7 +225,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
225
225
  span {
226
226
  color: var(--text-color-secondary);
227
227
  }
228
- `,e9=j.forwardRef(({className:t,...e},n)=>g.jsx(t9,{className:t,...e,ref:n})),Ho=j.memo(e9),t9=T.input`
228
+ `,e9=j.forwardRef(({className:t,...e},n)=>g.jsx(t9,{className:t,...e,ref:n})),Jo=j.memo(e9),t9=T.input`
229
229
  color: var(--input-content-color-active);
230
230
  text-indent: var(--input-padding);
231
231
  background-color: var(--input-bg-color);
@@ -248,7 +248,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
248
248
  font-size: var(--font-size-base);
249
249
  font-weight: var(--font-weight-regular);
250
250
  line-height: var(--line-height-base);
251
- `;function dc({variable:t,onSave:e,onCancel:n,className:r,readonlyName:i,readonlyValue:o,isNew:s}){const[a,l]=j.useState(t.name),[c,u]=j.useState(t.value),[f,d]=j.useState(!!t.isSecret),h=()=>{e({...t,name:a,value:c,isSecret:f})};return g.jsxs(o9,{className:r,children:[g.jsxs(s9,{children:[s?"New":"Edit"," variable"]}),g.jsx(Vs,{children:"Name"}),g.jsx(Ho,{"data-testid":"variable-name-input",type:"text",placeholder:"Enter name",value:a,readOnly:i,onChange:p=>l(p.target.value)}),g.jsx(Vs,{children:"Value"}),g.jsx(Ho,{"data-testid":"variable-value-input",type:"text",placeholder:"Enter value",value:c,readOnly:o,onChange:p=>u(p.target.value)}),g.jsx(n9,{value:f,onChange:p=>d(p),title:"Make it secret"}),g.jsxs(a9,{children:[g.jsx(_.Button,{size:"small",variant:"text",onClick:n,children:"Cancel"}),g.jsx(_.Button,{size:"small",variant:"primary",onClick:h,disabled:!a.trim(),"data-testid":"variable-save-button",children:"Save"})]})]})}const o9=T.div`
251
+ `;function dc({variable:t,onSave:e,onCancel:n,className:r,readonlyName:i,readonlyValue:o,isNew:s}){const[a,l]=j.useState(t.name),[c,u]=j.useState(t.value),[f,d]=j.useState(!!t.isSecret),h=()=>{e({...t,name:a,value:c,isSecret:f})};return g.jsxs(o9,{className:r,children:[g.jsxs(s9,{children:[s?"New":"Edit"," variable"]}),g.jsx(Vs,{children:"Name"}),g.jsx(Jo,{"data-testid":"variable-name-input",type:"text",placeholder:"Enter name",value:a,readOnly:i,onChange:p=>l(p.target.value)}),g.jsx(Vs,{children:"Value"}),g.jsx(Jo,{"data-testid":"variable-value-input",type:"text",placeholder:"Enter value",value:c,readOnly:o,onChange:p=>u(p.target.value)}),g.jsx(n9,{value:f,onChange:p=>d(p),title:"Make it secret"}),g.jsxs(a9,{children:[g.jsx(_.Button,{size:"small",variant:"text",onClick:n,children:"Cancel"}),g.jsx(_.Button,{size:"small",variant:"primary",onClick:h,disabled:!a.trim(),"data-testid":"variable-save-button",children:"Save"})]})]})}const o9=T.div`
252
252
  display: flex;
253
253
  flex-direction: column;
254
254
  align-items: flex-start;
@@ -387,7 +387,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
387
387
  & + & {
388
388
  margin-left: 0;
389
389
  }
390
- `;function O9({variable:t,variables:e,name:n,withPopover:r,inputId:i,onNewVariable:o}){const[s,a]=j.useState(!1),[l,c]=j.useState({}),u=n===QO,f=!(t!=null&&t.value),{sendEvent:d}=ct(),h=t?IP(t,e):[],p=()=>{a(!0),d("variable_editor_opened",{name:n,isUndefined:f})},O=()=>{d("variable_value_copied",{name:n})},m=R=>{a(!1),o(R),d("variable_saved",{name:n,isUndefined:f})},x=()=>{a(!1),d("variable_editor_closed",{name:n,isUndefined:f})},v=R=>{d("variable_nested_variables_toggled",{name:n,isExpanded:R})},y=(R,M)=>{c(Q=>({...Q,[R]:M}))},S=R=>{const[M,Q]=j.useState(!1),Z=()=>{Q(G=>!G)};return g.jsx(C9,{children:l[R.id]?g.jsx(w9,{variable:R||{...Ef(),name:n},onSave:m,onCancel:()=>y(R.id,!1),isNew:!R,readonlyName:!0}):g.jsxs(g.Fragment,{children:[g.jsx(qh,{children:R.name}),g.jsxs(y9,{children:[g.jsx(Uh,{$isEmpty:!(R!=null&&R.value),children:R.isSecret&&!M?"•••••":bl((R==null?void 0:R.value)||"",e,{withPopover:!1})||"No value"}),g.jsxs(b9,{children:[R.isSecret&&g.jsx(zs,{onClick:Z,variant:"text",size:"small",icon:M?g.jsx(_.ViewOffIcon,{}):g.jsx(_.ViewIcon,{})}),(R==null?void 0:R.value)&&g.jsx(_.CopyButton,{data:R==null?void 0:R.value,onCopyClick:O,toasterPlacement:"left"})]})]}),(R==null?void 0:R.canBeEdited)&&g.jsxs(g.Fragment,{children:[g.jsx(Ne,{}),g.jsx(_.Button,{size:"small",icon:g.jsx(_.EditIcon,{}),onClick:()=>{y(R.id,!0)},children:"Edit"})]})]})})},b=()=>{const[R,M]=j.useState(!1),Q=h.some(Z=>!!l[Z.id]);return g.jsxs(g.Fragment,{children:[t?S(t):null,h.length?g.jsx(Fd,{title:`${R?"Hide":"Show"} nested variables`,size:"small",defaultExpanded:Q,onToggle:Z=>{M(Z),v(Z)},children:g.jsx(k9,{children:h.map((Z,G)=>g.jsxs(X.default.Fragment,{children:[S(Z),h.length-1!==G&&g.jsx(A9,{})]},Z.id))})}):null]})},w=g.jsxs(g.Fragment,{children:[g.jsxs(qh,{children:[g.jsx(Hh,{}),g.jsx("span",{children:"Undefined variable"})]}),g.jsx(Uh,{children:"Make sure the variable is defined and enabled in the active environment."}),g.jsx(Ne,{}),g.jsx(_.Button,{onClick:p,children:"Add new variable"})]}),C=g.jsxs(g.Fragment,{children:[g.jsxs(qh,{children:[g.jsx(Hh,{}),g.jsx("span",{children:"Undefined variable value"})]}),g.jsx(Uh,{children:"This variable needs a value assigned before you can use it."}),g.jsx(Ne,{}),g.jsx(_.Button,{onClick:p,children:"Set value"})]}),k=g.jsxs(x9,{"data-testid":"variable-input-name",$isServerVariable:u,$isUndefined:f,children:[ss+n+as,f&&g.jsx(Hh,{$size:"var(--spacing-sm)"})]}),I=g.jsx(S9,{variable:t||{...Ef(),name:n},onSave:m,onCancel:x,isNew:!t,readonlyName:!0}),A=()=>s?I:f?t?C:w:g.jsx(b,{}),E=j.useMemo(()=>s?"variable-editor":f?t?"variable-undefined-value":"variable-undefined-variable":"variable-info",[f,s,t]),$=!!Object.values(l).filter(Boolean).length;return r?g.jsx(Ia,{trigger:s||$?"click":["click","hover"],placement:"bottomLeft",overlay:g.jsx(v9,{"data-testid":E,"data-input-id":i,$addPadding:!s,children:A()}),overlayStyle:{zIndex:"1000",position:"absolute",maxWidth:"424px"},onVisibleChange:R=>{R||(a(!1),c({}))},destroyTooltipOnHide:!0,mouseEnterDelay:.1,showArrow:!1,children:k}):k}const x9=T.span`
390
+ `;function O9({variable:t,variables:e,name:n,withPopover:r,inputId:i,onNewVariable:o}){const[s,a]=j.useState(!1),[l,c]=j.useState({}),u=n===QO,f=!(t!=null&&t.value),{sendEvent:d}=ct(),h=t?IP(t,e):[],p=()=>{a(!0),d("variable_editor_opened",{name:n,isUndefined:f})},O=()=>{d("variable_value_copied",{name:n})},m=R=>{a(!1),o(R),d("variable_saved",{name:n,isUndefined:f})},x=()=>{a(!1),d("variable_editor_closed",{name:n,isUndefined:f})},v=R=>{d("variable_nested_variables_toggled",{name:n,isExpanded:R})},y=(R,M)=>{c(Q=>({...Q,[R]:M}))},S=R=>{const[M,Q]=j.useState(!1),Z=()=>{Q(G=>!G)};return g.jsx(C9,{children:l[R.id]?g.jsx(w9,{variable:R||{...Ef(),name:n},onSave:m,onCancel:()=>y(R.id,!1),isNew:!R,readonlyName:!0}):g.jsxs(g.Fragment,{children:[g.jsx(qh,{children:R.name}),g.jsxs(y9,{children:[g.jsx(Uh,{$isEmpty:!(R!=null&&R.value),children:R.isSecret&&!M?"•••••":bl((R==null?void 0:R.value)||"",e,{withPopover:!1})||"No value"}),g.jsxs(b9,{children:[R.isSecret&&g.jsx(zs,{onClick:Z,variant:"text",size:"small",icon:M?g.jsx(_.ViewOffIcon,{}):g.jsx(_.ViewIcon,{})}),(R==null?void 0:R.value)&&g.jsx(_.CopyButton,{data:R==null?void 0:R.value,onCopyClick:O,toasterPlacement:"left"})]})]}),(R==null?void 0:R.canBeEdited)&&g.jsxs(g.Fragment,{children:[g.jsx(Ne,{}),g.jsx(_.Button,{size:"small",icon:g.jsx(_.EditIcon,{}),onClick:()=>{y(R.id,!0)},children:"Edit"})]})]})})},b=()=>{const[R,M]=j.useState(!1),Q=h.some(Z=>!!l[Z.id]);return g.jsxs(g.Fragment,{children:[t?S(t):null,h.length?g.jsx(Fd,{title:`${R?"Hide":"Show"} nested variables`,size:"small",defaultExpanded:Q,onToggle:Z=>{M(Z),v(Z)},children:g.jsx(k9,{children:h.map((Z,G)=>g.jsxs(X.default.Fragment,{children:[S(Z),h.length-1!==G&&g.jsx(A9,{})]},Z.id))})}):null]})},w=g.jsxs(g.Fragment,{children:[g.jsxs(qh,{children:[g.jsx(Hh,{}),g.jsx("span",{children:"Undefined variable"})]}),g.jsx(Uh,{children:"Make sure the variable is defined and enabled in the active environment."}),g.jsx(Ne,{}),g.jsx(_.Button,{onClick:p,children:"Add new variable"})]}),C=g.jsxs(g.Fragment,{children:[g.jsxs(qh,{children:[g.jsx(Hh,{}),g.jsx("span",{children:"Undefined variable value"})]}),g.jsx(Uh,{children:"This variable needs a value assigned before you can use it."}),g.jsx(Ne,{}),g.jsx(_.Button,{onClick:p,children:"Set value"})]}),k=g.jsxs(x9,{"data-testid":"variable-input-name",$isServerVariable:u,$isUndefined:f,children:[as+n+ls,f&&g.jsx(Hh,{$size:"var(--spacing-sm)"})]}),I=g.jsx(S9,{variable:t||{...Ef(),name:n},onSave:m,onCancel:x,isNew:!t,readonlyName:!0}),A=()=>s?I:f?t?C:w:g.jsx(b,{}),E=j.useMemo(()=>s?"variable-editor":f?t?"variable-undefined-value":"variable-undefined-variable":"variable-info",[f,s,t]),$=!!Object.values(l).filter(Boolean).length;return r?g.jsx(Ia,{trigger:s||$?"click":["click","hover"],placement:"bottomLeft",overlay:g.jsx(v9,{"data-testid":E,"data-input-id":i,$addPadding:!s,children:A()}),overlayStyle:{zIndex:"1000",position:"absolute",maxWidth:"424px"},onVisibleChange:R=>{R||(a(!1),c({}))},destroyTooltipOnHide:!0,mouseEnterDelay:.1,showArrow:!1,children:k}):k}const x9=T.span`
391
391
  display: inline-flex;
392
392
  align-items: center;
393
393
  width: fit-content;
@@ -463,7 +463,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
463
463
  `,A9=T(Ne)`
464
464
  margin-left: -16.5px;
465
465
  width: calc(100% + 16.5px);
466
- `,bl=(t,e,n={withPopover:!0})=>{const r=ka(t),i=a=>{e.set(l=>[...l.filter(c=>c.id!==a.id),a])};if(!r.length)return t;let o=0;const s=r.flatMap(({start:a,end:l,content:c})=>{const u=e.get().findLast(d=>d.name===c),f=t.slice(o,a);return o=l,[f.length?g.jsx(j.Fragment,{children:f},o):null,g.jsx(O9,{inputId:n.inputId,variable:u,variables:e,name:c,withPopover:n.withPopover??!0,onNewVariable:i},crypto.randomUUID())]});return t.slice(o).length&&s.push(g.jsx(j.Fragment,{children:t.slice(o)},o+1)),s},Ef=()=>({id:crypto.randomUUID(),name:"",value:"",type:Sr.UserCreated,canBeRemoved:!0,canBeEdited:!0}),Xt=t=>ss+t+as,P9=(t,e)=>e.variables.find(n=>{var r;return n.get().name===((r=t.match(`^${Pk}$`))==null?void 0:r[1])}),IP=(t,e,n=new Set)=>{const i=ka((t==null?void 0:t.value)||"").map(({content:a})=>e.get().find(l=>l.name===a)).filter(Boolean),s=(a=>{let l=[];for(const c of a){if(n.has(c.name))continue;n.add(c.name);const u=IP(c,e,n);l=l.concat(u)}return l})(i);return[...new Set([...i,...s])]};function E9(t){const{environments:e,selectedEnvironmentId:n}=t;return(e.find(i=>i.id===n)||e[0]).variables||[]}const Po=({children:t,className:e,onClickOutside:n})=>{const r=j.useRef(null);j.useEffect(()=>(document.addEventListener("mouseup",i),()=>{document.removeEventListener("mouseup",i)}));const i=o=>{r.current&&!r.current.contains(o.target)&&(n==null||n(o))};return g.jsx(I9,{ref:r,className:e,children:t})},I9=T.div`
466
+ `,bl=(t,e,n={withPopover:!0})=>{const r=ka(t),i=a=>{e.set(l=>[...l.filter(c=>c.id!==a.id),a])};if(!r.length)return t;let o=0;const s=r.flatMap(({start:a,end:l,content:c})=>{const u=e.get().findLast(d=>d.name===c),f=t.slice(o,a);return o=l,[f.length?g.jsx(j.Fragment,{children:f},o):null,g.jsx(O9,{inputId:n.inputId,variable:u,variables:e,name:c,withPopover:n.withPopover??!0,onNewVariable:i},crypto.randomUUID())]});return t.slice(o).length&&s.push(g.jsx(j.Fragment,{children:t.slice(o)},o+1)),s},Ef=()=>({id:crypto.randomUUID(),name:"",value:"",type:Sr.UserCreated,canBeRemoved:!0,canBeEdited:!0}),Xt=t=>as+t+ls,P9=(t,e)=>e.variables.find(n=>{var r;return n.get().name===((r=t.match(`^${Pk}$`))==null?void 0:r[1])}),IP=(t,e,n=new Set)=>{const i=ka((t==null?void 0:t.value)||"").map(({content:a})=>e.get().find(l=>l.name===a)).filter(Boolean),s=(a=>{let l=[];for(const c of a){if(n.has(c.name))continue;n.add(c.name);const u=IP(c,e,n);l=l.concat(u)}return l})(i);return[...new Set([...i,...s])]};function E9(t){const{environments:e,selectedEnvironmentId:n}=t;return(e.find(i=>i.id===n)||e[0]).variables||[]}const Po=({children:t,className:e,onClickOutside:n})=>{const r=j.useRef(null);j.useEffect(()=>(document.addEventListener("mouseup",i),()=>{document.removeEventListener("mouseup",i)}));const i=o=>{r.current&&!r.current.contains(o.target)&&(n==null||n(o))};return g.jsx(I9,{ref:r,className:e,children:t})},I9=T.div`
467
467
  width: 100%;
468
468
  `;function T9({range:t,value:e,inputId:n,onClose:r,onNewVariable:i}){const{sendEvent:o}=ct(),[s,a]=j.useState(!1),l=window.pageXOffset||document.documentElement.scrollTop,c=t.getBoundingClientRect(),u=()=>{a(!0),o("vi_new_variable_creation_started",{name:e})},f=g.jsx(Po,{onClickOutside:r,children:g.jsx(j9,{"data-input-id":n,children:s?g.jsx(dc,{variable:{...Ef(),value:e},onSave:d=>i(d),onCancel:r,readonlyValue:!0,isNew:!0}):g.jsx(_.Button,{icon:g.jsx(_.ValueVariableIcon,{}),onClick:u,iconPosition:"left",size:"small",variant:"text",children:"Set as variable"})})});return g.jsx(_.Portal,{children:g.jsx(Ia,{trigger:"click",placement:"bottom",showArrow:!1,visible:!0,zIndex:1e3,overlay:f,overlayStyle:{position:"absolute"},children:g.jsx($9,{$rect:{...c,width:c.width,height:c.height,left:c.left,top:c.top+l}})})})}const $9=T.div`
469
469
  position: absolute;
@@ -473,7 +473,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
473
473
  width: ${({$rect:t})=>t.width}px;
474
474
  `,j9=T(Ao)`
475
475
  padding: var(--spacing-xs) var(--spacing-sm);
476
- `,Zy=(t,e)=>{const n=TP(t,e);return e.innerText.substring(n.start,n.end)},TP=(t,e)=>{const n=t.cloneRange();n.selectNodeContents(e),n.setEnd(t.startContainer,t.startOffset);const r=n.toString().length;n.setEnd(t.endContainer,t.endOffset);const i=n.toString().length;return{start:r,end:i}};function R9(t,e){var r;let n=0;for(let i=0;i<t.length;i++){const o=t[i];let s=0;if(o.nodeType===Node.TEXT_NODE?s=((r=o.textContent)==null?void 0:r.length)||0:o.nodeType===Node.ELEMENT_NODE?s=o.innerText.length:console.log("unknown node type",o),n+s>=e)return{node:o.nodeType===Node.TEXT_NODE?o:o.childNodes[0]||o,offset:e-n};n+=s}return{node:t[0],offset:e}}const D9=(t,e)=>{if(!t||!e)return 0;const n=e.cloneRange();return n.selectNodeContents(t),n.setEnd(e.endContainer,e.endOffset),n.toString().length},Q9=(t,e)=>{var n,r,i;if((n=t.current)!=null&&n.childNodes.length){const o=R9((r=t.current)==null?void 0:r.childNodes,e),s=document.createRange(),a=window.getSelection();s.setStart(o.node,Math.min(o.offset,((i=o.node)==null?void 0:i.length)||0)),s.collapse(!0),a==null||a.removeAllRanges(),a==null||a.addRange(s)}},$P=t=>t?t.dataset.inputId?t.dataset.inputId:$P(t.parentElement):null,jP=t=>t.lastIndexOf(ss),BO=t=>{const e=jP(t);return t.substring(e+2)},B9=(t,e,n)=>{const r=jP(t),i=n.some(o=>{const s=BO(t);return o.name.startsWith(s)});return r!==-1&&e>=r+2&&i},_9=(t,e)=>{const n=BO(t);return M9(e.filter(r=>r.name.startsWith(n)))};function M9(t){const e=t.reduce((r,i)=>(r[i.name]=i,r),{});return Object.values(e)}const N9=(t,e)=>{const n=BO(t);return`${e.substring(n.length)}${as}`},F9=t=>t.replace(/(\r\n|\n|\r)/gm,"");function Z9(t,e){const[n,r]=j.useState(t),i=j.useRef([{value:n,cursorPosition:e}]),[o,s]=j.useState(0),a=()=>{const u=Math.max(o-1,0);return s(u),i.current[u]},l=()=>{const u=Math.min(o+1,i.current.length-1);return s(u),i.current[u]},c=(u,f)=>{if(u!==i.current[o].value){const d=o+1;i.current=i.current.slice(0,d),i.current[d]={value:u,cursorPosition:f},s(d),r(u)}};return[i.current[o].value,c,a,l]}function W9(t,e){let n;return function(...r){clearTimeout(n),n=setTimeout(()=>t.apply(this,r),e)}}function V9({onClose:t,onSelect:e,variables:n,selectedIndex:r,inputId:i}){return g.jsx(Po,{onClickOutside:t,children:g.jsx(X9,{"data-input-id":i,children:n.map((o,s)=>g.jsxs(G9,{role:"button",onClick:()=>e(o),active:s===r,children:[g.jsx(Y9,{children:o.name}),g.jsx(q9,{children:o.value||"No value"})]},o.id))})})}function z9({range:t,onClose:e,variables:n,onSelect:r,inputId:i}){const[o,s]=j.useState(0),a=window.scrollX||document.documentElement.scrollTop,l=t.getBoundingClientRect();return j.useEffect(()=>{const c=u=>{u.key==="ArrowDown"?s(f=>o<n.length-1?f+1:0):u.key==="ArrowUp"?s(f=>o>0?f-1:n.length-1):u.key==="Enter"&&r(n[o])};return document.addEventListener("keydown",c),()=>{document.removeEventListener("keydown",c)}},[r,o,n,n.length]),g.jsx(_.Portal,{children:g.jsx(Ia,{trigger:"click",placement:"bottomLeft",showArrow:!1,visible:!0,zIndex:1e3,overlay:g.jsx(V9,{inputId:i,onClose:e,onSelect:r,variables:n,selectedIndex:o}),overlayStyle:{position:"absolute"},children:g.jsx(L9,{$rect:{...l,width:l.width,height:l.height,left:l.left,top:l.top+a}})})})}const L9=T.div`
476
+ `,Zy=(t,e)=>{const n=TP(t,e);return e.innerText.substring(n.start,n.end)},TP=(t,e)=>{const n=t.cloneRange();n.selectNodeContents(e),n.setEnd(t.startContainer,t.startOffset);const r=n.toString().length;n.setEnd(t.endContainer,t.endOffset);const i=n.toString().length;return{start:r,end:i}};function R9(t,e){var r;let n=0;for(let i=0;i<t.length;i++){const o=t[i];let s=0;if(o.nodeType===Node.TEXT_NODE?s=((r=o.textContent)==null?void 0:r.length)||0:o.nodeType===Node.ELEMENT_NODE?s=o.innerText.length:console.log("unknown node type",o),n+s>=e)return{node:o.nodeType===Node.TEXT_NODE?o:o.childNodes[0]||o,offset:e-n};n+=s}return{node:t[0],offset:e}}const D9=(t,e)=>{if(!t||!e)return 0;const n=e.cloneRange();return n.selectNodeContents(t),n.setEnd(e.endContainer,e.endOffset),n.toString().length},Q9=(t,e)=>{var n,r,i;if((n=t.current)!=null&&n.childNodes.length){const o=R9((r=t.current)==null?void 0:r.childNodes,e),s=document.createRange(),a=window.getSelection();s.setStart(o.node,Math.min(o.offset,((i=o.node)==null?void 0:i.length)||0)),s.collapse(!0),a==null||a.removeAllRanges(),a==null||a.addRange(s)}},$P=t=>t?t.dataset.inputId?t.dataset.inputId:$P(t.parentElement):null,jP=t=>t.lastIndexOf(as),BO=t=>{const e=jP(t);return t.substring(e+2)},B9=(t,e,n)=>{const r=jP(t),i=n.some(o=>{const s=BO(t);return o.name.startsWith(s)});return r!==-1&&e>=r+2&&i},_9=(t,e)=>{const n=BO(t);return M9(e.filter(r=>r.name.startsWith(n)))};function M9(t){const e=t.reduce((r,i)=>(r[i.name]=i,r),{});return Object.values(e)}const N9=(t,e)=>{const n=BO(t);return`${e.substring(n.length)}${ls}`},F9=t=>t.replace(/(\r\n|\n|\r)/gm,"");function Z9(t,e){const[n,r]=j.useState(t),i=j.useRef([{value:n,cursorPosition:e}]),[o,s]=j.useState(0),a=()=>{const u=Math.max(o-1,0);return s(u),i.current[u]},l=()=>{const u=Math.min(o+1,i.current.length-1);return s(u),i.current[u]},c=(u,f)=>{if(u!==i.current[o].value){const d=o+1;i.current=i.current.slice(0,d),i.current[d]={value:u,cursorPosition:f},s(d),r(u)}};return[i.current[o].value,c,a,l]}function W9(t,e){let n;return function(...r){clearTimeout(n),n=setTimeout(()=>t.apply(this,r),e)}}function V9({onClose:t,onSelect:e,variables:n,selectedIndex:r,inputId:i}){return g.jsx(Po,{onClickOutside:t,children:g.jsx(X9,{"data-input-id":i,children:n.map((o,s)=>g.jsxs(G9,{role:"button",onClick:()=>e(o),active:s===r,children:[g.jsx(Y9,{children:o.name}),g.jsx(q9,{children:o.value||"No value"})]},o.id))})})}function z9({range:t,onClose:e,variables:n,onSelect:r,inputId:i}){const[o,s]=j.useState(0),a=window.scrollX||document.documentElement.scrollTop,l=t.getBoundingClientRect();return j.useEffect(()=>{const c=u=>{u.key==="ArrowDown"?s(f=>o<n.length-1?f+1:0):u.key==="ArrowUp"?s(f=>o>0?f-1:n.length-1):u.key==="Enter"&&r(n[o])};return document.addEventListener("keydown",c),()=>{document.removeEventListener("keydown",c)}},[r,o,n,n.length]),g.jsx(_.Portal,{children:g.jsx(Ia,{trigger:"click",placement:"bottomLeft",showArrow:!1,visible:!0,zIndex:1e3,overlay:g.jsx(V9,{inputId:i,onClose:e,onSelect:r,variables:n,selectedIndex:o}),overlayStyle:{position:"absolute"},children:g.jsx(L9,{$rect:{...l,width:l.width,height:l.height,left:l.left,top:l.top+a}})})})}const L9=T.div`
477
477
  position: absolute;
478
478
  top: ${({$rect:t})=>t.top}px;
479
479
  left: ${({$rect:t})=>t.left}px;
@@ -514,7 +514,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
514
514
  font-weight: var(--font-weight-regular);
515
515
  line-height: var(--line-height-sm);
516
516
  word-wrap: break-word;
517
- `;function Ke({value:t,environment:{variables:e},placeholder:n,className:r,onChange:i,dataTestId:o,editable:s=!0,...a}){const[l]=j.useState(crypto.randomUUID()),c=j.useRef(null),[u,f]=j.useState(!1),[d,h]=j.useState(t.length),[p,O]=j.useState(!1),[m,x]=j.useState(bl(t,e,{inputId:l})),[v,y,S,b]=Z9(t,d),[w,C]=j.useState(null),[k,I]=j.useState(null),[A,E]=j.useState(!1),$=c.current&&A&&k&&u&&!w,R=j.useMemo(()=>_9(v,[...e.get({noproxy:!0})]),[v,e]),{sendEvent:M}=ct(),Q=j.useCallback((q,ne,he=!0)=>{i&&q!==v&&c.current&&i(q,c.current),he&&y(q,ne),x(bl(q,e,{inputId:l})),h(ne)},[i,v,e,l]);j.useEffect(()=>{Q(v,d)},[e]),j.useEffect(()=>{y(t,t.length>d?d:t.length),x(bl(t,e,{inputId:l})),h(t.length>d?d:t.length)},[t]),j.useEffect(()=>{u&&Q9(c,d)},[d,u,m]),j.useEffect(()=>{s||F(!1,c.current)},[s]),j.useEffect(()=>{u&&E(B9(v,d,[...e.get({noproxy:!0})]))},[d,v,u,e]);const Z=W9(()=>{const q=window.getSelection();if(q&&q.rangeCount>0){const ne=q==null?void 0:q.getRangeAt(0);if(ne.startOffset===ne.endOffset&&ne.startContainer===ne.endContainer){const he=D9(c.current,ne);h(he),I(q.getRangeAt(0).cloneRange()),C(null)}else C(q.getRangeAt(0).cloneRange())}},0),G=q=>{s&&(q.preventDefault(),H(F9(q.clipboardData.getData("text"))))},V=q=>{if(s&&(q.preventDefault(),w&&c.current)){const ne=Zy(w,c.current);F3.copyCustom(ne),H("")}},ee=q=>{if(!s)return;const ne=q.key,he=q.metaKey||q.ctrlKey;if(ne==="Tab"&&O(!0),ne==="ArrowUp"&&$){q.preventDefault();return}if(ne==="Enter"){q.preventDefault();return}if(he&&ne==="Backspace"){q.preventDefault(),Q("",0);return}if(ne==="Backspace"){if(q.preventDefault(),w){H("");return}if(d===0)return;Q(v.slice(0,d-1)+v.slice(d),d-1)}if(ne==="Delete"){if(q.preventDefault(),w){H("");return}if(d===v.length)return;Q(v.slice(0,d)+v.slice(d+1),d)}he&&ne==="z"&&(q.preventDefault(),q.shiftKey?z():Y()),!he&&ne.length===1&&(q.preventDefault(),H(ne))},Y=()=>{const{value:q,cursorPosition:ne}=S();Q(q,ne,!1)},z=()=>{const{value:q,cursorPosition:ne}=b();Q(q,ne,!1)},D=q=>{const ne=q.target,he=$P(ne);(!he||he!==l)&&(f(!1),F(!1,c.current))},B=q=>{H(`${ss}${q.name}${as}`),e.set(ne=>[...ne,q]),M("vi_new_variable_created",{name:q.name})},N=()=>{C(null),M("vi_new_variable_creation_cancelled",{})},U=()=>{C(null)},F=(q,ne)=>{ne&&(ne.contentEditable=q?"true":"false")},te=()=>{s&&F(!0,c.current)},L=()=>{u||F(!1,c.current)},ce=()=>{te(),f(!0)},re=()=>{p&&(L(),f(!1)),O(!1)},ae=()=>{C(null)},H=q=>{if(w&&c.current){const ne=TP(w,c.current),he=v.slice(0,ne.start)+q+v.slice(ne.end);Q(he,ne.start+q.length),C(null)}else Q(v.slice(0,d)+q+v.slice(d),d+q.length)},pe=q=>{const ne=N9(v,q.name);H(ne),E(!1)};return g.jsxs(U9,{"data-testid":o,children:[c.current&&w&&g.jsx(T9,{range:w,value:Zy(w,c.current)||"",inputId:l,onNewVariable:B,onClose:N}),$&&!!R.length&&g.jsx(z9,{range:k,onClose:U,onSelect:pe,variables:R,inputId:l}),g.jsx(Po,{onClickOutside:D,children:g.jsx(H9,{ref:c,className:r,onFocus:ce,onBlur:re,$focused:u,onPaste:G,onCut:V,onKeyDown:ee,onSelect:Z,onMouseDown:ae,onMouseLeave:L,onMouseEnter:te,onDragStart:q=>q.preventDefault(),suppressContentEditableWarning:!0,$placeholder:n,role:"input",tabIndex:0,"data-gramm":"false","data-gramm_editor":"false","data-enable-grammarly":"false",...a,children:s?m:Ek(t,e.get({noproxy:!0}))})})]})}const U9=T.div`
517
+ `;function Ke({value:t,environment:{variables:e},placeholder:n,className:r,onChange:i,dataTestId:o,editable:s=!0,...a}){const[l]=j.useState(crypto.randomUUID()),c=j.useRef(null),[u,f]=j.useState(!1),[d,h]=j.useState(t.length),[p,O]=j.useState(!1),[m,x]=j.useState(bl(t,e,{inputId:l})),[v,y,S,b]=Z9(t,d),[w,C]=j.useState(null),[k,I]=j.useState(null),[A,E]=j.useState(!1),$=c.current&&A&&k&&u&&!w,R=j.useMemo(()=>_9(v,[...e.get({noproxy:!0})]),[v,e]),{sendEvent:M}=ct(),Q=j.useCallback((q,ne,he=!0)=>{i&&q!==v&&c.current&&i(q,c.current),he&&y(q,ne),x(bl(q,e,{inputId:l})),h(ne)},[i,v,e,l]);j.useEffect(()=>{Q(v,d)},[e]),j.useEffect(()=>{y(t,t.length>d?d:t.length),x(bl(t,e,{inputId:l})),h(t.length>d?d:t.length)},[t]),j.useEffect(()=>{u&&Q9(c,d)},[d,u,m]),j.useEffect(()=>{s||F(!1,c.current)},[s]),j.useEffect(()=>{u&&E(B9(v,d,[...e.get({noproxy:!0})]))},[d,v,u,e]);const Z=W9(()=>{const q=window.getSelection();if(q&&q.rangeCount>0){const ne=q==null?void 0:q.getRangeAt(0);if(ne.startOffset===ne.endOffset&&ne.startContainer===ne.endContainer){const he=D9(c.current,ne);h(he),I(q.getRangeAt(0).cloneRange()),C(null)}else C(q.getRangeAt(0).cloneRange())}},0),G=q=>{s&&(q.preventDefault(),H(F9(q.clipboardData.getData("text"))))},V=q=>{if(s&&(q.preventDefault(),w&&c.current)){const ne=Zy(w,c.current);F3.copyCustom(ne),H("")}},ee=q=>{if(!s)return;const ne=q.key,he=q.metaKey||q.ctrlKey;if(ne==="Tab"&&O(!0),ne==="ArrowUp"&&$){q.preventDefault();return}if(ne==="Enter"){q.preventDefault();return}if(he&&ne==="Backspace"){q.preventDefault(),Q("",0);return}if(ne==="Backspace"){if(q.preventDefault(),w){H("");return}if(d===0)return;Q(v.slice(0,d-1)+v.slice(d),d-1)}if(ne==="Delete"){if(q.preventDefault(),w){H("");return}if(d===v.length)return;Q(v.slice(0,d)+v.slice(d+1),d)}he&&ne==="z"&&(q.preventDefault(),q.shiftKey?z():Y()),!he&&ne.length===1&&(q.preventDefault(),H(ne))},Y=()=>{const{value:q,cursorPosition:ne}=S();Q(q,ne,!1)},z=()=>{const{value:q,cursorPosition:ne}=b();Q(q,ne,!1)},D=q=>{const ne=q.target,he=$P(ne);(!he||he!==l)&&(f(!1),F(!1,c.current))},B=q=>{H(`${as}${q.name}${ls}`),e.set(ne=>[...ne,q]),M("vi_new_variable_created",{name:q.name})},N=()=>{C(null),M("vi_new_variable_creation_cancelled",{})},U=()=>{C(null)},F=(q,ne)=>{ne&&(ne.contentEditable=q?"true":"false")},te=()=>{s&&F(!0,c.current)},L=()=>{u||F(!1,c.current)},ce=()=>{te(),f(!0)},re=()=>{p&&(L(),f(!1)),O(!1)},ae=()=>{C(null)},H=q=>{if(w&&c.current){const ne=TP(w,c.current),he=v.slice(0,ne.start)+q+v.slice(ne.end);Q(he,ne.start+q.length),C(null)}else Q(v.slice(0,d)+q+v.slice(d),d+q.length)},pe=q=>{const ne=N9(v,q.name);H(ne),E(!1)};return g.jsxs(U9,{"data-testid":o,children:[c.current&&w&&g.jsx(T9,{range:w,value:Zy(w,c.current)||"",inputId:l,onNewVariable:B,onClose:N}),$&&!!R.length&&g.jsx(z9,{range:k,onClose:U,onSelect:pe,variables:R,inputId:l}),g.jsx(Po,{onClickOutside:D,children:g.jsx(H9,{ref:c,className:r,onFocus:ce,onBlur:re,$focused:u,onPaste:G,onCut:V,onKeyDown:ee,onSelect:Z,onMouseDown:ae,onMouseLeave:L,onMouseEnter:te,onDragStart:q=>q.preventDefault(),suppressContentEditableWarning:!0,$placeholder:n,role:"input",tabIndex:0,"data-gramm":"false","data-gramm_editor":"false","data-enable-grammarly":"false",...a,children:s?m:Ek(t,e.get({noproxy:!0}))})})]})}const U9=T.div`
518
518
  position: relative;
519
519
  display: flex;
520
520
  flex-grow: 1;
@@ -595,7 +595,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
595
595
  }
596
596
  `,BP=T.div`
597
597
  padding: var(--spacing-xxl) var(--spacing-lg) var(--spacing-lg);
598
- `;function a8(t=32){let e="";for(;e.length<t;)e+=Math.random().toString(32).substring(2);return e.substring(0,t)}async function l8(t){const e=new TextEncoder().encode(t);return crypto==null?void 0:crypto.subtle.digest("SHA-256",e)}function c8(t){if(t)return btoa(String.fromCharCode.apply(null,new Uint8Array(t))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function yn(t){const e=new WeakMap;function n(r){if(typeof r!="object"||r===null)return r;if(e.has(r))return e.get(r);const i=Array.isArray(r)?[]:{};e.set(r,i);for(const o in r)Object.prototype.hasOwnProperty.call(r,o)&&(i[o]=n(r[o]));return i}return n(t)}function g0(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(let i=0;i<t.length;i++)if(!g0(t[i],e[i]))return!1;return!0}const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(let i=0;i<n.length;i++){const o=n[i];if(!Object.prototype.hasOwnProperty.call(e,o)||!g0(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function If(t){if(typeof t!="object"||t===null)return t;if(Array.isArray(t))return t.map(If);const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&n!=="id"&&(e[n]=If(t[n]));return e}function Wy(t){return Object.keys(t).forEach(e=>{t[e]===void 0&&delete t[e]}),t}var dk;const Yo=((dk=window.__TAURI__)==null?void 0:dk.http.fetch)??globalThis.fetch,Vy="/_auth/oauth2-redirect.html";let Zd=class ll{static authorizeImplicit({authorizationUrl:e,clientId:n,scopes:r,extraAuthParams:i={},routingBasePath:o="/",redirectUri:s,successCallback:a,errorCallback:l}){const c=zy({date:new Date().toString()});try{const u=new URL(e),f=o==="/"?"":o,d=`${window.location.origin}${f}${Vy}`;u.searchParams.set("client_id",n),u.searchParams.set("redirect_uri",s||d),u.searchParams.set("response_type","token"),u.searchParams.set("state",c),Array.isArray(r)&&u.searchParams.set("scope",r.join(" "));for(const h in i)u.searchParams.set(h,i[h]);window.redirectOAuth2={flow:"implicit",data:{authorizationUrl:e,clientId:n,scopes:r},state:c,successCallback:h=>{a(h),ll.clearRedirectData("implicit")},errorCallback:h=>{l(h),ll.clearRedirectData("implicit")}},window.open(u.toString())}catch(u){l(u)}}static async authorizeAuthorizationCode({authorizationUrl:e,tokenUrl:n,clientId:r,clientSecret:i,codeVerifier:o,codeChallenge:s,scopes:a,extraAuthParams:l={},extraTokenHeaders:c={},extraTokenBody:u={},extraTokenParams:f={},routingBasePath:d="/",redirectUri:h,successCallback:p,errorCallback:O}){try{const m=new URL(e),x=new URL(n),v=d==="/"?"":d,y=`${window.location.origin}${v}${Vy}`,S=zy({date:new Date().toString()});m.searchParams.set("client_id",r),m.searchParams.set("redirect_uri",h||y),m.searchParams.set("response_type","code"),m.searchParams.set("state",S),Array.isArray(a)&&m.searchParams.set("scope",a.join(" ")),!s&&!o&&(o=d8(),s=await u8(o)),s&&(m.searchParams.set("code_challenge",s),m.searchParams.set("code_challenge_method","S256"));for(const b in l)m.searchParams.set(b,l[b]);for(const b in f)x.searchParams.set(b,f[b]);window.redirectOAuth2={flow:"authorizationCode",data:{authorizationUrl:e,clientId:r,scopes:a},state:S,successCallback:async({auth_code:b})=>{const w=yn({client_id:r,client_secret:i,...o&&{code_verifier:o},code:b,grant_type:"authorization_code",redirect_uri:h||y,...u});try{const C=await Yo(x,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8",...c},body:new URLSearchParams(w).toString()});await Jh(C,p,O)}catch(C){O(C)}ll.clearRedirectData("authorizationCode")},errorCallback:b=>{O(b),ll.clearRedirectData("authorizationCode")}},window.open(m.toString())}catch(m){O(m)}}static clearRedirectData(e){window.redirectOAuth2={flow:e,data:{authorizationUrl:"",clientId:"",scopes:[]},state:"",successCallback:()=>{},errorCallback:()=>{}}}static async authorizeClientCredentials({tokenUrl:e,clientId:n,clientSecret:r,scopes:i=[],extraTokenParams:o={},extraTokenHeaders:s={},extraTokenBody:a={},corsProxyUrl:l,assertionType:c,clientAssertion:u,successCallback:f,errorCallback:d}){try{const h={client_id:n,client_secret:r,grant_type:"client_credentials",scope:Array.isArray(i)&&i.length?i.join(" "):void 0,client_assertion_type:c,client_assertion:u,...a},p=l?`${l}${e}`:e,O=new URL(p);for(const x in o)O.searchParams.set(x,o[x]);const m=await Yo(p,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8",...s},body:new URLSearchParams(Wy(h)).toString()});await Jh(m,f,d)}catch(h){d(h)}}static async authorizePasswordGrant({username:e,password:n,tokenUrl:r,clientId:i,clientSecret:o,scopes:s=[],extraTokenParams:a={},extraTokenHeaders:l={},extraTokenBody:c={},corsProxyUrl:u,successCallback:f,errorCallback:d}){try{const h={client_id:i,client_secret:o,grant_type:"password",username:e,password:n,scope:Array.isArray(s)&&s.length?s.join(" "):void 0,...c},p=u?`${u}${r}`:r,O=new URL(p);for(const x in a)O.searchParams.set(x,a[x]);const m=await Yo(p,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8",...l},body:new URLSearchParams(Wy(h)).toString()});await Jh(m,f,d)}catch(h){d(h)}}};function zy(t){const e={randomStr:a8(),...t};return btoa(JSON.stringify(e))}async function Jh(t,e,n){if(t.ok){const r=await t.json();e(r)}else n(new Error((t.headers.get("Content-Type")||"").indexOf("json")>-1?JSON.stringify(await t.json()):await t.text()))}async function u8(t){return c8(await l8(t))}function f8(t){return("0"+t.toString(16)).substring(-2)}function d8(){const t=new Uint32Array(28);return crypto.getRandomValues(t),Array.from(t,f8).join("")}function sa({title:t,onParameterChange:e,actions:n,elements:r,keyName:i,environment:o,renderDescription:s,singleValue:a=!1,hideOuterBorders:l,valuePlaceholder:c="Value",editable:u=!0,additionalParameters:f}){return g.jsxs(h8,{children:[t&&g.jsx(p8,{children:t}),g.jsx(g8,{$hideBorder:!!l,children:r.map((d,h)=>{const p=h===r.length-1,{value:O,key:m,active:x,id:v}=d.get(),y=a?O:!0;return g.jsxs(m8,{$hideBorder:!!(l&&p),children:[y&&g.jsx(O8,{children:(O||!p)&&g.jsxs(g.Fragment,{children:[g.jsx(x8,{"data-testid":`parameter-checkbox-${h}`,type:"checkbox",checked:x,onChange:({target:S})=>{d.active.set(S.checked),e(d,p)}}),g.jsx(v8,{checked:x})]})}),!a&&g.jsxs(g.Fragment,{children:[g.jsx(Qe,{}),g.jsxs(b8,{children:[g.jsx(Ke,{"data-testid":`parameter-name-${h}`,placeholder:`${p?"New ":""}${i}`,value:m,environment:o,editable:u,onChange:S=>{d.nested("key").set(S),e(d,p)}}),s==null?void 0:s(m)]}),g.jsx(Qe,{})]}),g.jsx(Ke,{"data-testid":`parameter-value-${h}`,placeholder:c,value:O,environment:o,editable:u,onChange:S=>{d.get().value===""&&S!==""&&d.active.set(!0),d.nested("value").set(S),e(d,p)}}),g.jsx(Qe,{}),f==null?void 0:f(d),g.jsx(y8,{children:(O||!p)&&n(h)})]},v)})})]})}const h8=T.div`
598
+ `;function a8(t=32){let e="";for(;e.length<t;)e+=Math.random().toString(32).substring(2);return e.substring(0,t)}async function l8(t){const e=new TextEncoder().encode(t);return crypto==null?void 0:crypto.subtle.digest("SHA-256",e)}function c8(t){if(t)return btoa(String.fromCharCode.apply(null,new Uint8Array(t))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function yn(t){const e=new WeakMap;function n(r){if(typeof r!="object"||r===null)return r;if(e.has(r))return e.get(r);const i=Array.isArray(r)?[]:{};e.set(r,i);for(const o in r)Object.prototype.hasOwnProperty.call(r,o)&&(i[o]=n(r[o]));return i}return n(t)}function g0(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(let i=0;i<t.length;i++)if(!g0(t[i],e[i]))return!1;return!0}const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(let i=0;i<n.length;i++){const o=n[i];if(!Object.prototype.hasOwnProperty.call(e,o)||!g0(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function If(t){if(typeof t!="object"||t===null)return t;if(Array.isArray(t))return t.map(If);const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&n!=="id"&&(e[n]=If(t[n]));return e}function Wy(t){return Object.keys(t).forEach(e=>{t[e]===void 0&&delete t[e]}),t}var dk;const qo=((dk=window.__TAURI__)==null?void 0:dk.http.fetch)??globalThis.fetch,Vy="/_auth/oauth2-redirect.html";let Zd=class ll{static authorizeImplicit({authorizationUrl:e,clientId:n,scopes:r,extraAuthParams:i={},routingBasePath:o="/",redirectUri:s,successCallback:a,errorCallback:l}){const c=zy({date:new Date().toString()});try{const u=new URL(e),f=o==="/"?"":o,d=`${window.location.origin}${f}${Vy}`;u.searchParams.set("client_id",n),u.searchParams.set("redirect_uri",s||d),u.searchParams.set("response_type","token"),u.searchParams.set("state",c),Array.isArray(r)&&u.searchParams.set("scope",r.join(" "));for(const h in i)u.searchParams.set(h,i[h]);window.redirectOAuth2={flow:"implicit",data:{authorizationUrl:e,clientId:n,scopes:r},state:c,successCallback:h=>{a(h),ll.clearRedirectData("implicit")},errorCallback:h=>{l(h),ll.clearRedirectData("implicit")}},window.open(u.toString())}catch(u){l(u)}}static async authorizeAuthorizationCode({authorizationUrl:e,tokenUrl:n,clientId:r,clientSecret:i,codeVerifier:o,codeChallenge:s,scopes:a,extraAuthParams:l={},extraTokenHeaders:c={},extraTokenBody:u={},extraTokenParams:f={},routingBasePath:d="/",redirectUri:h,successCallback:p,errorCallback:O}){try{const m=new URL(e),x=new URL(n),v=d==="/"?"":d,y=`${window.location.origin}${v}${Vy}`,S=zy({date:new Date().toString()});m.searchParams.set("client_id",r),m.searchParams.set("redirect_uri",h||y),m.searchParams.set("response_type","code"),m.searchParams.set("state",S),Array.isArray(a)&&m.searchParams.set("scope",a.join(" ")),!s&&!o&&(o=d8(),s=await u8(o)),s&&(m.searchParams.set("code_challenge",s),m.searchParams.set("code_challenge_method","S256"));for(const b in l)m.searchParams.set(b,l[b]);for(const b in f)x.searchParams.set(b,f[b]);window.redirectOAuth2={flow:"authorizationCode",data:{authorizationUrl:e,clientId:r,scopes:a},state:S,successCallback:async({auth_code:b})=>{const w=yn({client_id:r,client_secret:i,...o&&{code_verifier:o},code:b,grant_type:"authorization_code",redirect_uri:h||y,...u});try{const C=await qo(x,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8",...c},body:new URLSearchParams(w).toString()});await Jh(C,p,O)}catch(C){O(C)}ll.clearRedirectData("authorizationCode")},errorCallback:b=>{O(b),ll.clearRedirectData("authorizationCode")}},window.open(m.toString())}catch(m){O(m)}}static clearRedirectData(e){window.redirectOAuth2={flow:e,data:{authorizationUrl:"",clientId:"",scopes:[]},state:"",successCallback:()=>{},errorCallback:()=>{}}}static async authorizeClientCredentials({tokenUrl:e,clientId:n,clientSecret:r,scopes:i=[],extraTokenParams:o={},extraTokenHeaders:s={},extraTokenBody:a={},corsProxyUrl:l,assertionType:c,clientAssertion:u,successCallback:f,errorCallback:d}){try{const h={client_id:n,client_secret:r,grant_type:"client_credentials",scope:Array.isArray(i)&&i.length?i.join(" "):void 0,client_assertion_type:c,client_assertion:u,...a},p=l?`${l}${e}`:e,O=new URL(p);for(const x in o)O.searchParams.set(x,o[x]);const m=await qo(p,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8",...s},body:new URLSearchParams(Wy(h)).toString()});await Jh(m,f,d)}catch(h){d(h)}}static async authorizePasswordGrant({username:e,password:n,tokenUrl:r,clientId:i,clientSecret:o,scopes:s=[],extraTokenParams:a={},extraTokenHeaders:l={},extraTokenBody:c={},corsProxyUrl:u,successCallback:f,errorCallback:d}){try{const h={client_id:i,client_secret:o,grant_type:"password",username:e,password:n,scope:Array.isArray(s)&&s.length?s.join(" "):void 0,...c},p=u?`${u}${r}`:r,O=new URL(p);for(const x in a)O.searchParams.set(x,a[x]);const m=await qo(p,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8",...l},body:new URLSearchParams(Wy(h)).toString()});await Jh(m,f,d)}catch(h){d(h)}}};function zy(t){const e={randomStr:a8(),...t};return btoa(JSON.stringify(e))}async function Jh(t,e,n){if(t.ok){const r=await t.json();e(r)}else n(new Error((t.headers.get("Content-Type")||"").indexOf("json")>-1?JSON.stringify(await t.json()):await t.text()))}async function u8(t){return c8(await l8(t))}function f8(t){return("0"+t.toString(16)).substring(-2)}function d8(){const t=new Uint32Array(28);return crypto.getRandomValues(t),Array.from(t,f8).join("")}function sa({title:t,onParameterChange:e,actions:n,elements:r,keyName:i,environment:o,renderDescription:s,singleValue:a=!1,hideOuterBorders:l,valuePlaceholder:c="Value",editable:u=!0,additionalParameters:f}){return g.jsxs(h8,{children:[t&&g.jsx(p8,{children:t}),g.jsx(g8,{$hideBorder:!!l,children:r.map((d,h)=>{const p=h===r.length-1,{value:O,key:m,active:x,id:v}=d.get(),y=a?O:!0;return g.jsxs(m8,{$hideBorder:!!(l&&p),children:[y&&g.jsx(O8,{children:(O||!p)&&g.jsxs(g.Fragment,{children:[g.jsx(x8,{"data-testid":`parameter-checkbox-${h}`,type:"checkbox",checked:x,onChange:({target:S})=>{d.active.set(S.checked),e(d,p)}}),g.jsx(v8,{checked:x})]})}),!a&&g.jsxs(g.Fragment,{children:[g.jsx(Qe,{}),g.jsxs(b8,{children:[g.jsx(Ke,{"data-testid":`parameter-name-${h}`,placeholder:`${p?"New ":""}${i}`,value:m,environment:o,editable:u,onChange:S=>{d.nested("key").set(S),e(d,p)}}),s==null?void 0:s(m)]}),g.jsx(Qe,{})]}),g.jsx(Ke,{"data-testid":`parameter-value-${h}`,placeholder:c,value:O,environment:o,editable:u,onChange:S=>{d.get().value===""&&S!==""&&d.active.set(!0),d.nested("value").set(S),e(d,p)}}),g.jsx(Qe,{}),f==null?void 0:f(d),g.jsx(y8,{children:(O||!p)&&n(h)})]},v)})})]})}const h8=T.div`
599
599
  display: flex;
600
600
  flex-direction: column;
601
601
  gap: var(--spacing-xs);
@@ -660,14 +660,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
660
660
  `;function Zr(t,e,n){return t.filter(r=>r.active&&r.key&&r.value&&(Gy(r)&&n===r.sendIn||!Gy(r))).reduce((r,i)=>(r[Ge(i.key,e)]=i.value,r),{})}function Gy(t){return t.sendIn!==void 0}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,r){[e,n]=aa(this,e,n);let i=[];return this.decompose(0,e,i,2),r.length&&r.decompose(0,r.length,i,3),this.decompose(n,this.length,i,1),si.from(i,this.length-(n-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){[e,n]=aa(this,e,n);let r=[];return this.decompose(e,n,r,0),si.from(r,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),r=this.length-this.scanIdentical(e,-1),i=new Sl(this),o=new Sl(e);for(let s=n,a=n;;){if(i.next(s),o.next(s),s=0,i.lineBreak!=o.lineBreak||i.done!=o.done||i.value!=o.value)return!1;if(a+=i.value.length,i.done||a>=r)return!0}}iter(e=1){return new Sl(this,e)}iterRange(e,n=this.length){return new _P(this,e,n)}iterLines(e,n){let r;if(e==null)r=this.iter();else{n==null&&(n=this.lines+1);let i=this.line(e).from;r=this.iterRange(i,Math.max(i,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new MP(r)}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 zt(e):si.from(zt.split(e,[]))}}class zt extends st{constructor(e,n=k8(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,r,i){for(let o=0;;o++){let s=this.text[o],a=i+s.length;if((n?r:a)>=e)return new A8(i,a,r,s);i=a+1,r++}}decompose(e,n,r,i){let o=e<=0&&n>=this.length?this:new zt(Yy(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(i&1){let s=r.pop(),a=Fu(o.text,s.text.slice(),0,o.length);if(a.length<=32)r.push(new zt(a,s.length+o.length));else{let l=a.length>>1;r.push(new zt(a.slice(0,l)),new zt(a.slice(l)))}}else r.push(o)}replace(e,n,r){if(!(r instanceof zt))return super.replace(e,n,r);[e,n]=aa(this,e,n);let i=Fu(this.text,Fu(r.text,Yy(this.text,0,e)),n),o=this.length+r.length-(n-e);return i.length<=32?new zt(i,o):si.from(zt.split(i,[]),o)}sliceString(e,n=this.length,r=`
661
661
  `){[e,n]=aa(this,e,n);let i="";for(let o=0,s=0;o<=n&&s<this.text.length;s++){let a=this.text[s],l=o+a.length;o>e&&s&&(i+=r),e<l&&n>o&&(i+=a.slice(Math.max(0,e-o),n-o)),o=l+1}return i}flatten(e){for(let n of this.text)e.push(n)}scanIdentical(){return 0}static split(e,n){let r=[],i=-1;for(let o of e)r.push(o),i+=o.length+1,r.length==32&&(n.push(new zt(r,i)),r=[],i=-1);return i>-1&&n.push(new zt(r,i)),n}}class si extends st{constructor(e,n){super(),this.children=e,this.length=n,this.lines=0;for(let r of e)this.lines+=r.lines}lineInner(e,n,r,i){for(let o=0;;o++){let s=this.children[o],a=i+s.length,l=r+s.lines-1;if((n?l:a)>=e)return s.lineInner(e,n,r,i);i=a+1,r=l+1}}decompose(e,n,r,i){for(let o=0,s=0;s<=n&&o<this.children.length;o++){let a=this.children[o],l=s+a.length;if(e<=l&&n>=s){let c=i&((s<=e?1:0)|(l>=n?2:0));s>=e&&l<=n&&!c?r.push(a):a.decompose(e-s,n-s,r,c)}s=l+1}}replace(e,n,r){if([e,n]=aa(this,e,n),r.lines<this.lines)for(let i=0,o=0;i<this.children.length;i++){let s=this.children[i],a=o+s.length;if(e>=o&&n<=a){let l=s.replace(e-o,n-o,r),c=this.lines-s.lines+l.lines;if(l.lines<c>>4&&l.lines>c>>6){let u=this.children.slice();return u[i]=l,new si(u,this.length-(n-e)+r.length)}return super.replace(o,a,l)}o=a+1}return super.replace(e,n,r)}sliceString(e,n=this.length,r=`
662
662
  `){[e,n]=aa(this,e,n);let i="";for(let o=0,s=0;o<this.children.length&&s<=n;o++){let a=this.children[o],l=s+a.length;s>e&&o&&(i+=r),e<l&&n>s&&(i+=a.sliceString(e-s,n-s,r)),s=l+1}return i}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof si))return 0;let r=0,[i,o,s,a]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=n,o+=n){if(i==s||o==a)return r;let l=this.children[i],c=e.children[o];if(l!=c)return r+l.scanIdentical(c,n);r+=l.length+1}}static from(e,n=e.reduce((r,i)=>r+i.length+1,-1)){let r=0;for(let h of e)r+=h.lines;if(r<32){let h=[];for(let p of e)p.flatten(h);return new zt(h,n)}let i=Math.max(32,r>>5),o=i<<1,s=i>>1,a=[],l=0,c=-1,u=[];function f(h){let p;if(h.lines>o&&h instanceof si)for(let O of h.children)f(O);else h.lines>s&&(l>s||!l)?(d(),a.push(h)):h instanceof zt&&l&&(p=u[u.length-1])instanceof zt&&h.lines+p.lines<=32?(l+=h.lines,c+=h.length+1,u[u.length-1]=new zt(p.text.concat(h.text),p.length+1+h.length)):(l+h.lines>i&&d(),l+=h.lines,c+=h.length+1,u.push(h))}function d(){l!=0&&(a.push(u.length==1?u[0]:si.from(u,c)),c=-1,l=u.length=0)}for(let h of e)f(h);return d(),a.length==1?a[0]:new si(a,n)}}st.empty=new zt([""],0);function k8(t){let e=-1;for(let n of t)e+=n.length+1;return e}function Fu(t,e,n=0,r=1e9){for(let i=0,o=0,s=!0;o<t.length&&i<=r;o++){let a=t[o],l=i+a.length;l>=n&&(l>r&&(a=a.slice(0,r-i)),i<n&&(a=a.slice(n-i)),s?(e[e.length-1]+=a,s=!1):e.push(a)),i=l+1}return e}function Yy(t,e,n){return Fu(t,[""],e,n)}class Sl{constructor(e,n=1){this.dir=n,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[n>0?1:(e instanceof zt?e.text.length:e.children.length)<<1]}nextInner(e,n){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,i=this.nodes[r],o=this.offsets[r],s=o>>1,a=i instanceof zt?i.text.length:i.children.length;if(s==(n>0?a:0)){if(r==0)return this.done=!0,this.value="",this;n>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((o&1)==(n>0?0:1)){if(this.offsets[r]+=n,e==0)return this.lineBreak=!0,this.value=`
663
- `,this;e--}else if(i instanceof zt){let l=i.text[s+(n<0?-1:0)];if(this.offsets[r]+=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=i.children[s+(n<0?-1:0)];e>l.length?(e-=l.length,this.offsets[r]+=n):(n<0&&this.offsets[r]--,this.nodes.push(l),this.offsets.push(n>0?1:(l instanceof zt?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 _P{constructor(e,n,r){this.value="",this.done=!1,this.cursor=new Sl(e,n>r?-1:1),this.pos=n>r?e.length:0,this.from=Math.min(n,r),this.to=Math.max(n,r)}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 r=n<0?this.pos-this.from:this.to-this.pos;e>r&&(e=r),r-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*n,this.value=i.length<=r?i:n<0?i.slice(i.length-r):i.slice(0,r),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 MP{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:r,value:i}=this.inner.next(e);return n&&this.afterBreak?(this.value="",this.afterBreak=!1):n?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(st.prototype[Symbol.iterator]=function(){return this.iter()},Sl.prototype[Symbol.iterator]=_P.prototype[Symbol.iterator]=MP.prototype[Symbol.iterator]=function(){return this});let A8=class{constructor(e,n,r,i){this.from=e,this.to=n,this.number=r,this.text=i}get length(){return this.to-this.from}};function aa(t,e,n){return e=Math.max(0,Math.min(t.length,e)),[e,Math.max(e,Math.min(t.length,n))]}let Ls="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;t<Ls.length;t++)Ls[t]+=Ls[t-1];function P8(t){for(let e=1;e<Ls.length;e+=2)if(Ls[e]>t)return Ls[e-1]<=t;return!1}function qy(t){return t>=127462&&t<=127487}const Uy=8205;function kn(t,e,n=!0,r=!0){return(n?NP:E8)(t,e,r)}function NP(t,e,n){if(e==t.length)return e;e&&FP(t.charCodeAt(e))&&ZP(t.charCodeAt(e-1))&&e--;let r=bn(t,e);for(e+=kr(r);e<t.length;){let i=bn(t,e);if(r==Uy||i==Uy||n&&P8(i))e+=kr(i),r=i;else if(qy(i)){let o=0,s=e-2;for(;s>=0&&qy(bn(t,s));)o++,s-=2;if(o%2==0)break;e+=2}else break}return e}function E8(t,e,n){for(;e>0;){let r=NP(t,e-2,n);if(r<e)return r;e--}return 0}function FP(t){return t>=56320&&t<57344}function ZP(t){return t>=55296&&t<56320}function bn(t,e){let n=t.charCodeAt(e);if(!ZP(n)||e+1==t.length)return n;let r=t.charCodeAt(e+1);return FP(r)?(n-55296<<10)+(r-56320)+65536:n}function MO(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function kr(t){return t<65536?1:2}const m0=/\r\n?|\n/;var wn=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(wn||(wn={}));class pi{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;n<this.sections.length;n+=2)e+=this.sections[n];return e}get newLength(){let e=0;for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n+1];e+=r<0?this.sections[n]:r}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let n=0,r=0,i=0;n<this.sections.length;){let o=this.sections[n++],s=this.sections[n++];s<0?(e(r,i,o),i+=o):i+=s,r+=o}}iterChangedRanges(e,n=!1){O0(this,e,n)}get invertedDesc(){let e=[];for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];i<0?e.push(r,i):e.push(i,r)}return new pi(e)}composeDesc(e){return this.empty?e:e.empty?this:WP(this,e)}mapDesc(e,n=!1){return e.empty?this:x0(this,e,n)}mapPos(e,n=-1,r=wn.Simple){let i=0,o=0;for(let s=0;s<this.sections.length;){let a=this.sections[s++],l=this.sections[s++],c=i+a;if(l<0){if(c>e)return o+(e-i);o+=a}else{if(r!=wn.Simple&&c>=e&&(r==wn.TrackDel&&i<e&&c>e||r==wn.TrackBefore&&i<e||r==wn.TrackAfter&&c>e))return null;if(c>e||c==e&&n<0&&!a)return e==i||n<0?o:o+l;o+=l}i=c}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return o}touchesRange(e,n=e){for(let r=0,i=0;r<this.sections.length&&i<=n;){let o=this.sections[r++],s=this.sections[r++],a=i+o;if(s>=0&&i<=n&&a>=e)return i<e&&a>n?"cover":!0;i=a}return!1}toString(){let e="";for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];e+=(e?" ":"")+r+(i>=0?":"+i:"")}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 pi(e)}static create(e){return new pi(e)}}class rn extends pi{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 O0(this,(n,r,i,o,s)=>e=e.replace(i,i+(r-n),s),!1),e}mapDesc(e,n=!1){return x0(this,e,n,!0)}invert(e){let n=this.sections.slice(),r=[];for(let i=0,o=0;i<n.length;i+=2){let s=n[i],a=n[i+1];if(a>=0){n[i]=a,n[i+1]=s;let l=i>>1;for(;r.length<l;)r.push(st.empty);r.push(s?e.slice(o,o+s):st.empty)}o+=s}return new rn(n,r)}compose(e){return this.empty?e:e.empty?this:WP(this,e,!0)}map(e,n=!1){return e.empty?this:x0(this,e,n,!0)}iterChanges(e,n=!1){O0(this,e,n)}get desc(){return pi.create(this.sections)}filter(e){let n=[],r=[],i=[],o=new Ml(this);e:for(let s=0,a=0;;){let l=s==e.length?1e9:e[s++];for(;a<l||a==l&&o.len==0;){if(o.done)break e;let u=Math.min(o.len,l-a);Tn(i,u,-1);let f=o.ins==-1?-1:o.off==0?o.ins:0;Tn(n,u,f),f>0&&io(r,n,o.text),o.forward(u),a+=u}let c=e[s++];for(;a<c;){if(o.done)break e;let u=Math.min(o.len,c-a);Tn(n,u,-1),Tn(i,u,o.ins==-1?-1:o.off==0?o.ins:0),o.forward(u),a+=u}}return{changes:new rn(n,r),filtered:pi.create(i)}}toJSON(){let e=[];for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n],i=this.sections[n+1];i<0?e.push(r):i==0?e.push([r]):e.push([r].concat(this.inserted[n>>1].toJSON()))}return e}static of(e,n,r){let i=[],o=[],s=0,a=null;function l(u=!1){if(!u&&!i.length)return;s<n&&Tn(i,n-s,-1);let f=new rn(i,o);a=a?a.compose(f.map(a)):f,i=[],o=[],s=0}function c(u){if(Array.isArray(u))for(let f of u)c(f);else if(u instanceof rn){if(u.length!=n)throw new RangeError(`Mismatched change set length (got ${u.length}, expected ${n})`);l(),a=a?a.compose(u.map(a)):u}else{let{from:f,to:d=f,insert:h}=u;if(f>d||f<0||d>n)throw new RangeError(`Invalid change range ${f} to ${d} (in doc of length ${n})`);let p=h?typeof h=="string"?st.of(h.split(r||m0)):h:st.empty,O=p.length;if(f==d&&O==0)return;f<s&&l(),f>s&&Tn(i,f-s,-1),Tn(i,d-f,O),io(o,i,p),s=d}}return c(e),l(!a),a}static empty(e){return new rn(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],r=[];for(let i=0;i<e.length;i++){let o=e[i];if(typeof o=="number")n.push(o,-1);else{if(!Array.isArray(o)||typeof o[0]!="number"||o.some((s,a)=>a&&typeof s!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(o.length==1)n.push(o[0],0);else{for(;r.length<i;)r.push(st.empty);r[i]=st.of(o.slice(1)),n.push(o[0],r[i].length)}}}return new rn(n,r)}static createSet(e,n){return new rn(e,n)}}function Tn(t,e,n,r=!1){if(e==0&&n<=0)return;let i=t.length-2;i>=0&&n<=0&&n==t[i+1]?t[i]+=e:e==0&&t[i]==0?t[i+1]+=n:r?(t[i]+=e,t[i+1]+=n):t.push(e,n)}function io(t,e,n){if(n.length==0)return;let r=e.length-2>>1;if(r<t.length)t[t.length-1]=t[t.length-1].append(n);else{for(;t.length<r;)t.push(st.empty);t.push(n)}}function O0(t,e,n){let r=t.inserted;for(let i=0,o=0,s=0;s<t.sections.length;){let a=t.sections[s++],l=t.sections[s++];if(l<0)i+=a,o+=a;else{let c=i,u=o,f=st.empty;for(;c+=a,u+=l,l&&r&&(f=f.append(r[s-2>>1])),!(n||s==t.sections.length||t.sections[s+1]<0);)a=t.sections[s++],l=t.sections[s++];e(i,c,o,u,f),i=c,o=u}}}function x0(t,e,n,r=!1){let i=[],o=r?[]:null,s=new Ml(t),a=new Ml(e);for(let l=-1;;)if(s.ins==-1&&a.ins==-1){let c=Math.min(s.len,a.len);Tn(i,c,-1),s.forward(c),a.forward(c)}else if(a.ins>=0&&(s.ins<0||l==s.i||s.off==0&&(a.len<s.len||a.len==s.len&&!n))){let c=a.len;for(Tn(i,a.ins,-1);c;){let u=Math.min(s.len,c);s.ins>=0&&l<s.i&&s.len<=u&&(Tn(i,0,s.ins),o&&io(o,i,s.text),l=s.i),s.forward(u),c-=u}a.next()}else if(s.ins>=0){let c=0,u=s.len;for(;u;)if(a.ins==-1){let f=Math.min(u,a.len);c+=f,u-=f,a.forward(f)}else if(a.ins==0&&a.len<u)u-=a.len,a.next();else break;Tn(i,c,l<s.i?s.ins:0),o&&l<s.i&&io(o,i,s.text),l=s.i,s.forward(s.len-u)}else{if(s.done&&a.done)return o?rn.createSet(i,o):pi.create(i);throw new Error("Mismatched change set lengths")}}function WP(t,e,n=!1){let r=[],i=n?[]:null,o=new Ml(t),s=new Ml(e);for(let a=!1;;){if(o.done&&s.done)return i?rn.createSet(r,i):pi.create(r);if(o.ins==0)Tn(r,o.len,0,a),o.next();else if(s.len==0&&!s.done)Tn(r,0,s.ins,a),i&&io(i,r,s.text),s.next();else{if(o.done||s.done)throw new Error("Mismatched change set lengths");{let l=Math.min(o.len2,s.len),c=r.length;if(o.ins==-1){let u=s.ins==-1?-1:s.off?0:s.ins;Tn(r,l,u,a),i&&u&&io(i,r,s.text)}else s.ins==-1?(Tn(r,o.off?0:o.len,l,a),i&&io(i,r,o.textBit(l))):(Tn(r,o.off?0:o.len,s.off?0:s.ins,a),i&&!s.off&&io(i,r,s.text));a=(o.ins>l||s.ins>=0&&s.len>l)&&(a||r.length>c),o.forward2(l),s.forward(l)}}}}class Ml{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,n=this.i-2>>1;return n>=e.length?st.empty:e[n]}textBit(e){let{inserted:n}=this.set,r=this.i-2>>1;return r>=n.length&&!e?st.empty:n[r].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)}}let tu=class v0{constructor(e,n,r){this.from=e,this.to=n,this.flags=r}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 r,i;return this.empty?r=i=e.mapPos(this.from,n):(r=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new v0(r,i,this.flags)}extend(e,n=e){if(e<=this.anchor&&n>=this.anchor)return ie.range(e,n);let r=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return ie.range(this.anchor,r)}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 ie.range(e.anchor,e.head)}static create(e,n,r){return new v0(e,n,r)}};class ie{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:ie.create(this.ranges.map(r=>r.map(e,n)),this.mainIndex)}eq(e,n=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let r=0;r<this.ranges.length;r++)if(!this.ranges[r].eq(e.ranges[r],n))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new ie([this.main],0)}addRange(e,n=!0){return ie.create([e].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(e,n=this.mainIndex){let r=this.ranges.slice();return r[n]=e,ie.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.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 ie(e.ranges.map(n=>tu.fromJSON(n)),e.main)}static single(e,n=e){return new ie([ie.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 r=0,i=0;i<e.length;i++){let o=e[i];if(o.empty?o.from<=r:o.from<r)return ie.normalized(e.slice(),n);r=o.to}return new ie(e,n)}static cursor(e,n=0,r,i){return tu.create(e,e,(n==0?0:n<0?8:16)|(r==null?7:Math.min(6,r))|(i??16777215)<<6)}static range(e,n,r,i){let o=(r??16777215)<<6|(i==null?7:Math.min(6,i));return n<e?tu.create(n,e,48|o):tu.create(e,n,(n>e?8:0)|o)}static normalized(e,n=0){let r=e[n];e.sort((i,o)=>i.from-o.from),n=e.indexOf(r);for(let i=1;i<e.length;i++){let o=e[i],s=e[i-1];if(o.empty?o.from<=s.to:o.from<s.to){let a=s.from,l=Math.max(o.to,s.to);i<=n&&n--,e.splice(--i,2,o.anchor>o.head?ie.range(l,a):ie.range(a,l))}}return new ie(e,n)}}function VP(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let NO=0;class me{constructor(e,n,r,i,o){this.combine=e,this.compareInput=n,this.compare=r,this.isStatic=i,this.id=NO++,this.default=e([]),this.extensions=typeof o=="function"?o(this):o}get reader(){return this}static define(e={}){return new me(e.combine||(n=>n),e.compareInput||((n,r)=>n===r),e.compare||(e.combine?(n,r)=>n===r:FO),!!e.static,e.enables)}of(e){return new Zu([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new Zu(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new Zu(e,this,2,n)}from(e,n){return n||(n=r=>r),this.compute([e],r=>n(r.field(e)))}}function FO(t,e){return t==e||t.length==e.length&&t.every((n,r)=>n===e[r])}class Zu{constructor(e,n,r,i){this.dependencies=e,this.facet=n,this.type=r,this.value=i,this.id=NO++}dynamicSlot(e){var n;let r=this.value,i=this.facet.compareInput,o=this.id,s=e[o]>>1,a=this.type==2,l=!1,c=!1,u=[];for(let f of this.dependencies)f=="doc"?l=!0:f=="selection"?c=!0:((n=e[f.id])!==null&&n!==void 0?n:1)&1||u.push(e[f.id]);return{create(f){return f.values[s]=r(f),1},update(f,d){if(l&&d.docChanged||c&&(d.docChanged||d.selection)||y0(f,u)){let h=r(f);if(a?!Hy(h,f.values[s],i):!i(h,f.values[s]))return f.values[s]=h,1}return 0},reconfigure:(f,d)=>{let h,p=d.config.address[o];if(p!=null){let O=$f(d,p);if(this.dependencies.every(m=>m instanceof me?d.facet(m)===f.facet(m):m instanceof ln?d.field(m,!1)==f.field(m,!1):!0)||(a?Hy(h=r(f),O,i):i(h=r(f),O)))return f.values[s]=O,0}else h=r(f);return f.values[s]=h,1}}}}function Hy(t,e,n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!n(t[r],e[r]))return!1;return!0}function y0(t,e){let n=!1;for(let r of e)wl(t,r)&1&&(n=!0);return n}function I8(t,e,n){let r=n.map(l=>t[l.id]),i=n.map(l=>l.type),o=r.filter(l=>!(l&1)),s=t[e.id]>>1;function a(l){let c=[];for(let u=0;u<r.length;u++){let f=$f(l,r[u]);if(i[u]==2)for(let d of f)c.push(d);else c.push(f)}return e.combine(c)}return{create(l){for(let c of r)wl(l,c);return l.values[s]=a(l),1},update(l,c){if(!y0(l,o))return 0;let u=a(l);return e.compare(u,l.values[s])?0:(l.values[s]=u,1)},reconfigure(l,c){let u=y0(l,r),f=c.config.facets[e.id],d=c.facet(e);if(f&&!u&&FO(n,f))return l.values[s]=d,0;let h=a(l);return e.compare(h,d)?(l.values[s]=d,0):(l.values[s]=h,1)}}}const Jy=me.define({static:!0});class ln{constructor(e,n,r,i,o){this.id=e,this.createF=n,this.updateF=r,this.compareF=i,this.spec=o,this.provides=void 0}static define(e){let n=new ln(NO++,e.create,e.update,e.compare||((r,i)=>r===i),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet(Jy).find(r=>r.field==this);return((n==null?void 0:n.create)||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:r=>(r.values[n]=this.create(r),1),update:(r,i)=>{let o=r.values[n],s=this.updateF(o,i);return this.compareF(o,s)?0:(r.values[n]=s,1)},reconfigure:(r,i)=>i.config.address[this.id]!=null?(r.values[n]=i.field(this),0):(r.values[n]=this.create(r),1)}}init(e){return[this,Jy.of({field:this,create:e})]}get extension(){return this}}const Vo={lowest:4,low:3,default:2,high:1,highest:0};function Ua(t){return e=>new zP(e,t)}const Si={highest:Ua(Vo.highest),high:Ua(Vo.high),default:Ua(Vo.default),low:Ua(Vo.low),lowest:Ua(Vo.lowest)};class zP{constructor(e,n){this.inner=e,this.prec=n}}class Vd{of(e){return new b0(this,e)}reconfigure(e){return Vd.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class b0{constructor(e,n){this.compartment=e,this.inner=n}}class Tf{constructor(e,n,r,i,o,s){for(this.base=e,this.compartments=n,this.dynamicSlots=r,this.address=i,this.staticValues=o,this.facets=s,this.statusTemplate=[];this.statusTemplate.length<r.length;)this.statusTemplate.push(0)}staticFacet(e){let n=this.address[e.id];return n==null?e.default:this.staticValues[n>>1]}static resolve(e,n,r){let i=[],o=Object.create(null),s=new Map;for(let d of T8(e,n,s))d instanceof ln?i.push(d):(o[d.facet.id]||(o[d.facet.id]=[])).push(d);let a=Object.create(null),l=[],c=[];for(let d of i)a[d.id]=c.length<<1,c.push(h=>d.slot(h));let u=r==null?void 0:r.config.facets;for(let d in o){let h=o[d],p=h[0].facet,O=u&&u[d]||[];if(h.every(m=>m.type==0))if(a[p.id]=l.length<<1|1,FO(O,h))l.push(r.facet(p));else{let m=p.combine(h.map(x=>x.value));l.push(r&&p.compare(m,r.facet(p))?r.facet(p):m)}else{for(let m of h)m.type==0?(a[m.id]=l.length<<1|1,l.push(m.value)):(a[m.id]=c.length<<1,c.push(x=>m.dynamicSlot(x)));a[p.id]=c.length<<1,c.push(m=>I8(m,p,h))}}let f=c.map(d=>d(a));return new Tf(e,s,f,a,l,o)}}function T8(t,e,n){let r=[[],[],[],[],[]],i=new Map;function o(s,a){let l=i.get(s);if(l!=null){if(l<=a)return;let c=r[l].indexOf(s);c>-1&&r[l].splice(c,1),s instanceof b0&&n.delete(s.compartment)}if(i.set(s,a),Array.isArray(s))for(let c of s)o(c,a);else if(s instanceof b0){if(n.has(s.compartment))throw new RangeError("Duplicate use of compartment in extensions");let c=e.get(s.compartment)||s.inner;n.set(s.compartment,c),o(c,a)}else if(s instanceof zP)o(s.inner,s.prec);else if(s instanceof ln)r[a].push(s),s.provides&&o(s.provides,a);else if(s instanceof Zu)r[a].push(s),s.facet.extensions&&o(s.facet.extensions,Vo.default);else{let c=s.extension;if(!c)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(c,a)}}return o(t,Vo.default),r.reduce((s,a)=>s.concat(a))}function wl(t,e){if(e&1)return 2;let n=e>>1,r=t.status[n];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;t.status[n]=4;let i=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|i}function $f(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const LP=me.define(),S0=me.define({combine:t=>t.some(e=>e),static:!0}),XP=me.define({combine:t=>t.length?t[0]:void 0,static:!0}),GP=me.define(),YP=me.define(),qP=me.define(),UP=me.define({combine:t=>t.length?t[0]:!1});class wi{constructor(e,n){this.type=e,this.value=n}static define(){return new $8}}class $8{of(e){return new wi(this,e)}}class j8{constructor(e){this.map=e}of(e){return new _e(this,e)}}class _e{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 _e(this.type,n)}is(e){return this.type==e}static define(e={}){return new j8(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let r=[];for(let i of e){let o=i.map(n);o&&r.push(o)}return r}}_e.reconfigure=_e.define();_e.appendConfig=_e.define();class qt{constructor(e,n,r,i,o,s){this.startState=e,this.changes=n,this.selection=r,this.effects=i,this.annotations=o,this.scrollIntoView=s,this._doc=null,this._state=null,r&&VP(r,n.newLength),o.some(a=>a.type==qt.time)||(this.annotations=o.concat(qt.time.of(Date.now())))}static create(e,n,r,i,o,s){return new qt(e,n,r,i,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(qt.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}qt.time=wi.define();qt.userEvent=wi.define();qt.addToHistory=wi.define();qt.remote=wi.define();function R8(t,e){let n=[];for(let r=0,i=0;;){let o,s;if(r<t.length&&(i==e.length||e[i]>=t[r]))o=t[r++],s=t[r++];else if(i<e.length)o=e[i++],s=e[i++];else return n;!n.length||n[n.length-1]<o?n.push(o,s):n[n.length-1]<s&&(n[n.length-1]=s)}}function HP(t,e,n){var r;let i,o,s;return n?(i=e.changes,o=rn.empty(e.changes.length),s=t.changes.compose(e.changes)):(i=e.changes.map(t.changes),o=t.changes.mapDesc(e.changes,!0),s=t.changes.compose(i)),{changes:s,selection:e.selection?e.selection.map(o):(r=t.selection)===null||r===void 0?void 0:r.map(i),effects:_e.mapEffects(t.effects,i).concat(_e.mapEffects(e.effects,o)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function w0(t,e,n){let r=e.selection,i=Xs(e.annotations);return e.userEvent&&(i=i.concat(qt.userEvent.of(e.userEvent))),{changes:e.changes instanceof rn?e.changes:rn.of(e.changes||[],n,t.facet(XP)),selection:r&&(r instanceof ie?r:ie.single(r.anchor,r.head)),effects:Xs(e.effects),annotations:i,scrollIntoView:!!e.scrollIntoView}}function JP(t,e,n){let r=w0(t,e.length?e[0]:{},t.doc.length);e.length&&e[0].filter===!1&&(n=!1);for(let o=1;o<e.length;o++){e[o].filter===!1&&(n=!1);let s=!!e[o].sequential;r=HP(r,w0(t,e[o],s?r.changes.newLength:t.doc.length),s)}let i=qt.create(t,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return Q8(n?D8(i):i)}function D8(t){let e=t.startState,n=!0;for(let i of e.facet(GP)){let o=i(t);if(o===!1){n=!1;break}Array.isArray(o)&&(n=n===!0?o:R8(n,o))}if(n!==!0){let i,o;if(n===!1)o=t.changes.invertedDesc,i=rn.empty(e.doc.length);else{let s=t.changes.filter(n);i=s.changes,o=s.filtered.mapDesc(s.changes).invertedDesc}t=qt.create(e,i,t.selection&&t.selection.map(o),_e.mapEffects(t.effects,o),t.annotations,t.scrollIntoView)}let r=e.facet(YP);for(let i=r.length-1;i>=0;i--){let o=r[i](t);o instanceof qt?t=o:Array.isArray(o)&&o.length==1&&o[0]instanceof qt?t=o[0]:t=JP(e,Xs(o),!1)}return t}function Q8(t){let e=t.startState,n=e.facet(qP),r=t;for(let i=n.length-1;i>=0;i--){let o=n[i](t);o&&Object.keys(o).length&&(r=HP(r,w0(e,o,t.changes.newLength),!0))}return r==t?t:qt.create(e,t.changes,t.selection,r.effects,r.annotations,r.scrollIntoView)}const B8=[];function Xs(t){return t==null?B8: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 _8=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let C0;try{C0=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function M8(t){if(C0)return C0.test(t);for(let e=0;e<t.length;e++){let n=t[e];if(/\w/.test(n)||n>"€"&&(n.toUpperCase()!=n.toLowerCase()||_8.test(n)))return!0}return!1}function N8(t){return e=>{if(!/\S/.test(e))return Rt.Space;if(M8(e))return Rt.Word;for(let n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return Rt.Word;return Rt.Other}}class Ue{constructor(e,n,r,i,o,s){this.config=e,this.doc=n,this.selection=r,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=o,s&&(s._state=this);for(let a=0;a<this.config.dynamicSlots.length;a++)wl(this,a<<1);this.computeSlot=null}field(e,n=!0){let r=this.config.address[e.id];if(r==null){if(n)throw new RangeError("Field is not present in this state");return}return wl(this,r),$f(this,r)}update(...e){return JP(this,e,!0)}applyTransaction(e){let n=this.config,{base:r,compartments:i}=n;for(let a of e.effects)a.is(Vd.reconfigure)?(n&&(i=new Map,n.compartments.forEach((l,c)=>i.set(c,l)),n=null),i.set(a.value.compartment,a.value.extension)):a.is(_e.reconfigure)?(n=null,r=a.value):a.is(_e.appendConfig)&&(n=null,r=Xs(r).concat(a.value));let o;n?o=e.startState.values.slice():(n=Tf.resolve(r,i,this),o=new Ue(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(l,c)=>c.reconfigure(l,this),null).values);let s=e.startState.facet(S0)?e.newSelection:e.newSelection.asSingle();new Ue(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:ie.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,r=e(n.ranges[0]),i=this.changes(r.changes),o=[r.range],s=Xs(r.effects);for(let a=1;a<n.ranges.length;a++){let l=e(n.ranges[a]),c=this.changes(l.changes),u=c.map(i);for(let d=0;d<a;d++)o[d]=o[d].map(u);let f=i.mapDesc(c,!0);o.push(l.range.map(f)),i=i.compose(u),s=_e.mapEffects(s,u).concat(_e.mapEffects(Xs(l.effects),f))}return{changes:i,selection:ie.create(o,n.mainIndex),effects:s}}changes(e=[]){return e instanceof rn?e:rn.of(e,this.doc.length,this.facet(Ue.lineSeparator))}toText(e){return st.of(e.split(this.facet(Ue.lineSeparator)||m0))}sliceDoc(e=0,n=this.doc.length){return this.doc.sliceString(e,n,this.lineBreak)}facet(e){let n=this.config.address[e.id];return n==null?e.default:(wl(this,n),$f(this,n))}toJSON(e){let n={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let r in e){let i=e[r];i instanceof ln&&this.config.address[i.id]!=null&&(n[r]=i.spec.toJSON(this.field(e[r]),this))}return n}static fromJSON(e,n={},r){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let i=[];if(r){for(let o in r)if(Object.prototype.hasOwnProperty.call(e,o)){let s=r[o],a=e[o];i.push(s.init(l=>s.spec.fromJSON(a,l)))}}return Ue.create({doc:e.doc,selection:ie.fromJSON(e.selection),extensions:n.extensions?i.concat([n.extensions]):i})}static create(e={}){let n=Tf.resolve(e.extensions||[],new Map),r=e.doc instanceof st?e.doc:st.of((e.doc||"").split(n.staticFacet(Ue.lineSeparator)||m0)),i=e.selection?e.selection instanceof ie?e.selection:ie.single(e.selection.anchor,e.selection.head):ie.single(0);return VP(i,r.length),n.staticFacet(S0)||(i=i.asSingle()),new Ue(n,r,i,n.dynamicSlots.map(()=>null),(o,s)=>s.create(o),null)}get tabSize(){return this.facet(Ue.tabSize)}get lineBreak(){return this.facet(Ue.lineSeparator)||`
664
- `}get readOnly(){return this.facet(UP)}phrase(e,...n){for(let r of this.facet(Ue.phrases))if(Object.prototype.hasOwnProperty.call(r,e)){e=r[e];break}return n.length&&(e=e.replace(/\$(\$|\d*)/g,(r,i)=>{if(i=="$")return"$";let o=+(i||1);return!o||o>n.length?r:n[o-1]})),e}languageDataAt(e,n,r=-1){let i=[];for(let o of this.facet(LP))for(let s of o(this,n,r))Object.prototype.hasOwnProperty.call(s,e)&&i.push(s[e]);return i}charCategorizer(e){return N8(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:n,from:r,length:i}=this.doc.lineAt(e),o=this.charCategorizer(e),s=e-r,a=e-r;for(;s>0;){let l=kn(n,s,!1);if(o(n.slice(l,s))!=Rt.Word)break;s=l}for(;a<i;){let l=kn(n,a);if(o(n.slice(a,l))!=Rt.Word)break;a=l}return s==a?null:ie.range(s+r,a+r)}}Ue.allowMultipleSelections=S0;Ue.tabSize=me.define({combine:t=>t.length?t[0]:4});Ue.lineSeparator=XP;Ue.readOnly=UP;Ue.phrases=me.define({compare(t,e){let n=Object.keys(t),r=Object.keys(e);return n.length==r.length&&n.every(i=>t[i]==e[i])}});Ue.languageData=LP;Ue.changeFilter=GP;Ue.transactionFilter=YP;Ue.transactionExtender=qP;Vd.reconfigure=_e.define();function Ci(t,e,n={}){let r={};for(let i of t)for(let o of Object.keys(i)){let s=i[o],a=r[o];if(a===void 0)r[o]=s;else if(!(a===s||s===void 0))if(Object.hasOwnProperty.call(n,o))r[o]=n[o](a,s);else throw new Error("Config merge conflict for field "+o)}for(let i in e)r[i]===void 0&&(r[i]=e[i]);return r}class Jo{eq(e){return this==e}range(e,n=e){return k0.create(e,n,this)}}Jo.prototype.startSide=Jo.prototype.endSide=0;Jo.prototype.point=!1;Jo.prototype.mapMode=wn.TrackDel;let k0=class KP{constructor(e,n,r){this.from=e,this.to=n,this.value=r}static create(e,n,r){return new KP(e,n,r)}};function A0(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class ZO{constructor(e,n,r,i){this.from=e,this.to=n,this.value=r,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,n,r,i=0){let o=r?this.to:this.from;for(let s=i,a=o.length;;){if(s==a)return s;let l=s+a>>1,c=o[l]-e||(r?this.value[l].endSide:this.value[l].startSide)-n;if(l==s)return c>=0?s:a;c>=0?a=l:s=l+1}}between(e,n,r,i){for(let o=this.findIndex(n,-1e9,!0),s=this.findIndex(r,1e9,!1,o);o<s;o++)if(i(this.from[o]+e,this.to[o]+e,this.value[o])===!1)return!1}map(e,n){let r=[],i=[],o=[],s=-1,a=-1;for(let l=0;l<this.value.length;l++){let c=this.value[l],u=this.from[l]+e,f=this.to[l]+e,d,h;if(u==f){let p=n.mapPos(u,c.startSide,c.mapMode);if(p==null||(d=h=p,c.startSide!=c.endSide&&(h=n.mapPos(u,c.endSide),h<d)))continue}else if(d=n.mapPos(u,c.startSide),h=n.mapPos(f,c.endSide),d>h||d==h&&c.startSide>0&&c.endSide<=0)continue;(h-d||c.endSide-c.startSide)<0||(s<0&&(s=d),c.point&&(a=Math.max(a,h-d)),r.push(c),i.push(d-s),o.push(h-s))}return{mapped:r.length?new ZO(i,o,r,a):null,pos:s}}}class et{constructor(e,n,r,i){this.chunkPos=e,this.chunk=n,this.nextLayer=r,this.maxPoint=i}static create(e,n,r,i){return new et(e,n,r,i)}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:r=!1,filterFrom:i=0,filterTo:o=this.length}=e,s=e.filter;if(n.length==0&&!s)return this;if(r&&(n=n.slice().sort(A0)),this.isEmpty)return n.length?et.of(n):this;let a=new e2(this,null,-1).goto(0),l=0,c=[],u=new mo;for(;a.value||l<n.length;)if(l<n.length&&(a.from-n[l].from||a.startSide-n[l].value.startSide)>=0){let f=n[l++];u.addInner(f.from,f.to,f.value)||c.push(f)}else a.rangeIndex==1&&a.chunkIndex<this.chunk.length&&(l==n.length||this.chunkEnd(a.chunkIndex)<n[l].from)&&(!s||i>this.chunkEnd(a.chunkIndex)||o<this.chunkPos[a.chunkIndex])&&u.addChunk(this.chunkPos[a.chunkIndex],this.chunk[a.chunkIndex])?a.nextChunk():((!s||i>a.to||o<a.from||s(a.from,a.to,a.value))&&(u.addInner(a.from,a.to,a.value)||c.push(k0.create(a.from,a.to,a.value))),a.next());return u.finishInner(this.nextLayer.isEmpty&&!c.length?et.empty:this.nextLayer.update({add:c,filter:s,filterFrom:i,filterTo:o}))}map(e){if(e.empty||this.isEmpty)return this;let n=[],r=[],i=-1;for(let s=0;s<this.chunk.length;s++){let a=this.chunkPos[s],l=this.chunk[s],c=e.touchesRange(a,a+l.length);if(c===!1)i=Math.max(i,l.maxPoint),n.push(l),r.push(e.mapPos(a));else if(c===!0){let{mapped:u,pos:f}=l.map(a,e);u&&(i=Math.max(i,u.maxPoint),n.push(u),r.push(f))}}let o=this.nextLayer.map(e);return n.length==0?o:new et(r,n,o||et.empty,i)}between(e,n,r){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let o=this.chunkPos[i],s=this.chunk[i];if(n>=o&&e<=o+s.length&&s.between(o,e-o,n-o,r)===!1)return}this.nextLayer.between(e,n,r)}}iter(e=0){return Nl.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return Nl.from(e).goto(n)}static compare(e,n,r,i,o=-1){let s=e.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=o),a=n.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=o),l=Ky(s,a,r),c=new Ha(s,l,o),u=new Ha(a,l,o);r.iterGaps((f,d,h)=>eb(c,f,u,d,h,i)),r.empty&&r.length==0&&eb(c,0,u,0,0,i)}static eq(e,n,r=0,i){i==null&&(i=999999999);let o=e.filter(u=>!u.isEmpty&&n.indexOf(u)<0),s=n.filter(u=>!u.isEmpty&&e.indexOf(u)<0);if(o.length!=s.length)return!1;if(!o.length)return!0;let a=Ky(o,s),l=new Ha(o,a,0).goto(r),c=new Ha(s,a,0).goto(r);for(;;){if(l.to!=c.to||!P0(l.active,c.active)||l.point&&(!c.point||!l.point.eq(c.point)))return!1;if(l.to>i)return!0;l.next(),c.next()}}static spans(e,n,r,i,o=-1){let s=new Ha(e,null,o).goto(n),a=n,l=s.openStart;for(;;){let c=Math.min(s.to,r);if(s.point){let u=s.activeForPoint(s.to),f=s.pointFrom<n?u.length+1:s.point.startSide<0?u.length:Math.min(u.length,l);i.point(a,c,s.point,u,f,s.pointRank),l=Math.min(s.openEnd(c),u.length)}else c>a&&(i.span(a,c,s.active,l),l=s.openEnd(c));if(s.to>r)return l+(s.point&&s.to>r?1:0);a=s.to,s.next()}}static of(e,n=!1){let r=new mo;for(let i of e instanceof k0?[e]:n?F8(e):e)r.add(i.from,i.to,i.value);return r.finish()}static join(e){if(!e.length)return et.empty;let n=e[e.length-1];for(let r=e.length-2;r>=0;r--)for(let i=e[r];i!=et.empty;i=i.nextLayer)n=new et(i.chunkPos,i.chunk,n,Math.max(i.maxPoint,n.maxPoint));return n}}et.empty=new et([],[],null,-1);function F8(t){if(t.length>1)for(let e=t[0],n=1;n<t.length;n++){let r=t[n];if(A0(e,r)>0)return t.slice().sort(A0);e=r}return t}et.empty.nextLayer=et.empty;class mo{finishChunk(e){this.chunks.push(new ZO(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,r){this.addInner(e,n,r)||(this.nextLayer||(this.nextLayer=new mo)).add(e,n,r)}addInner(e,n,r){let i=e-this.lastTo||r.startSide-this.last.endSide;if(i<=0&&(e-this.lastFrom||r.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return i<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=r,this.lastFrom=e,this.lastTo=n,this.value.push(r),r.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 r=n.value.length-1;return this.last=n.value[r],this.lastFrom=n.from[r]+e,this.lastTo=n.to[r]+e,!0}finish(){return this.finishInner(et.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=et.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}}function Ky(t,e,n){let r=new Map;for(let o of t)for(let s=0;s<o.chunk.length;s++)o.chunk[s].maxPoint<=0&&r.set(o.chunk[s],o.chunkPos[s]);let i=new Set;for(let o of e)for(let s=0;s<o.chunk.length;s++){let a=r.get(o.chunk[s]);a!=null&&(n?n.mapPos(a):a)==o.chunkPos[s]&&!(n!=null&&n.touchesRange(a,a+o.chunk[s].length))&&i.add(o.chunk[s])}return i}class e2{constructor(e,n,r,i=0){this.layer=e,this.skip=n,this.minPoint=r,this.rank=i}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,n=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,n,!1),this}gotoInner(e,n,r){for(;this.chunkIndex<this.layer.chunk.length;){let i=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(i)||this.layer.chunkEnd(this.chunkIndex)<e||i.maxPoint<this.minPoint))break;this.chunkIndex++,r=!1}if(this.chunkIndex<this.layer.chunk.length){let i=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],n,!0);(!r||this.rangeIndex<i)&&this.setRangeIndex(i)}this.next()}forward(e,n){(this.to-e||this.endSide-n)<0&&this.gotoInner(e,n,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],n=this.layer.chunk[this.chunkIndex],r=e+n.from[this.rangeIndex];if(this.from=r,this.to=e+n.to[this.rangeIndex],this.value=n.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class Nl{constructor(e){this.heap=e}static from(e,n=null,r=-1){let i=[];for(let o=0;o<e.length;o++)for(let s=e[o];!s.isEmpty;s=s.nextLayer)s.maxPoint>=r&&i.push(new e2(s,n,r,o));return i.length==1?i[0]:new Nl(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,n=-1e9){for(let r of this.heap)r.goto(e,n);for(let r=this.heap.length>>1;r>=0;r--)Kh(this.heap,r);return this.next(),this}forward(e,n){for(let r of this.heap)r.forward(e,n);for(let r=this.heap.length>>1;r>=0;r--)Kh(this.heap,r);(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(),Kh(this.heap,0)}}}function Kh(t,e){for(let n=t[e];;){let r=(e<<1)+1;if(r>=t.length)break;let i=t[r];if(r+1<t.length&&i.compare(t[r+1])>=0&&(i=t[r+1],r++),n.compare(i)<0)break;t[r]=n,t[e]=i,e=r}}class Ha{constructor(e,n,r){this.minPoint=r,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=Nl.from(e,n,r)}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){nu(this.active,e),nu(this.activeTo,e),nu(this.activeRank,e),this.minActive=tb(this.active,this.activeTo)}addActive(e){let n=0,{value:r,to:i,rank:o}=this.cursor;for(;n<this.activeRank.length&&(o-this.activeRank[n]||i-this.activeTo[n])>0;)n++;ru(this.active,n,r),ru(this.activeTo,n,i),ru(this.activeRank,n,o),e&&ru(e,n,this.cursor.from),this.minActive=tb(this.active,this.activeTo)}next(){let e=this.to,n=this.point;this.point=null;let r=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),r&&nu(r,i)}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(r),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=o,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=o.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(r){this.openStart=0;for(let i=r.length-1;i>=0&&r[i]<e;i--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let n=[];for(let r=this.active.length-1;r>=0&&!(this.activeRank[r]<this.pointRank);r--)(this.activeTo[r]>e||this.activeTo[r]==e&&this.active[r].endSide>=this.point.endSide)&&n.push(this.active[r]);return n.reverse()}openEnd(e){let n=0;for(let r=this.activeTo.length-1;r>=0&&this.activeTo[r]>e;r--)n++;return n}}function eb(t,e,n,r,i,o){t.goto(e),n.goto(r);let s=r+i,a=r,l=r-e;for(;;){let c=t.to+l-n.to||t.endSide-n.endSide,u=c<0?t.to+l:n.to,f=Math.min(u,s);if(t.point||n.point?t.point&&n.point&&(t.point==n.point||t.point.eq(n.point))&&P0(t.activeForPoint(t.to),n.activeForPoint(n.to))||o.comparePoint(a,f,t.point,n.point):f>a&&!P0(t.active,n.active)&&o.compareRange(a,f,t.active,n.active),u>s)break;a=u,c<=0&&t.next(),c>=0&&n.next()}}function P0(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n]&&!t[n].eq(e[n]))return!1;return!0}function nu(t,e){for(let n=e,r=t.length-1;n<r;n++)t[n]=t[n+1];t.pop()}function ru(t,e,n){for(let r=t.length-1;r>=e;r--)t[r+1]=t[r];t[e]=n}function tb(t,e){let n=-1,r=1e9;for(let i=0;i<e.length;i++)(e[i]-r||t[i].endSide-t[n].endSide)<0&&(n=i,r=e[i]);return n}function Ta(t,e,n=t.length){let r=0;for(let i=0;i<n;)t.charCodeAt(i)==9?(r+=e-r%e,i++):(r++,i=kn(t,i));return r}function E0(t,e,n,r){for(let i=0,o=0;;){if(o>=e)return i;if(i==t.length)break;o+=t.charCodeAt(i)==9?n-o%n:1,i=kn(t,i)}return r===!0?-1:t.length}const I0="ͼ",nb=typeof Symbol>"u"?"__"+I0:Symbol.for(I0),T0=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),rb=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class Oo{constructor(e,n){this.rules=[];let{finish:r}=n||{};function i(s){return/^@/.test(s)?[s]:s.split(/,\s*/)}function o(s,a,l,c){let u=[],f=/^@(\w+)\b/.exec(s[0]),d=f&&f[1]=="keyframes";if(f&&a==null)return l.push(s[0]+";");for(let h in a){let p=a[h];if(/&/.test(h))o(h.split(/,\s*/).map(O=>s.map(m=>O.replace(/&/,m))).reduce((O,m)=>O.concat(m)),p,l);else if(p&&typeof p=="object"){if(!f)throw new RangeError("The value of a property ("+h+") should be a primitive value.");o(i(h),p,u,d)}else p!=null&&u.push(h.replace(/_.*/,"").replace(/[A-Z]/g,O=>"-"+O.toLowerCase())+": "+p+";")}(u.length||d)&&l.push((r&&!f&&!c?s.map(r):s).join(", ")+" {"+u.join(" ")+"}")}for(let s in e)o(i(s),e[s],this.rules)}getRules(){return this.rules.join(`
663
+ `,this;e--}else if(i instanceof zt){let l=i.text[s+(n<0?-1:0)];if(this.offsets[r]+=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=i.children[s+(n<0?-1:0)];e>l.length?(e-=l.length,this.offsets[r]+=n):(n<0&&this.offsets[r]--,this.nodes.push(l),this.offsets.push(n>0?1:(l instanceof zt?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 _P{constructor(e,n,r){this.value="",this.done=!1,this.cursor=new Sl(e,n>r?-1:1),this.pos=n>r?e.length:0,this.from=Math.min(n,r),this.to=Math.max(n,r)}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 r=n<0?this.pos-this.from:this.to-this.pos;e>r&&(e=r),r-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*n,this.value=i.length<=r?i:n<0?i.slice(i.length-r):i.slice(0,r),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 MP{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:r,value:i}=this.inner.next(e);return n&&this.afterBreak?(this.value="",this.afterBreak=!1):n?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(st.prototype[Symbol.iterator]=function(){return this.iter()},Sl.prototype[Symbol.iterator]=_P.prototype[Symbol.iterator]=MP.prototype[Symbol.iterator]=function(){return this});let A8=class{constructor(e,n,r,i){this.from=e,this.to=n,this.number=r,this.text=i}get length(){return this.to-this.from}};function aa(t,e,n){return e=Math.max(0,Math.min(t.length,e)),[e,Math.max(e,Math.min(t.length,n))]}let Ls="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;t<Ls.length;t++)Ls[t]+=Ls[t-1];function P8(t){for(let e=1;e<Ls.length;e+=2)if(Ls[e]>t)return Ls[e-1]<=t;return!1}function qy(t){return t>=127462&&t<=127487}const Uy=8205;function kn(t,e,n=!0,r=!0){return(n?NP:E8)(t,e,r)}function NP(t,e,n){if(e==t.length)return e;e&&FP(t.charCodeAt(e))&&ZP(t.charCodeAt(e-1))&&e--;let r=bn(t,e);for(e+=kr(r);e<t.length;){let i=bn(t,e);if(r==Uy||i==Uy||n&&P8(i))e+=kr(i),r=i;else if(qy(i)){let o=0,s=e-2;for(;s>=0&&qy(bn(t,s));)o++,s-=2;if(o%2==0)break;e+=2}else break}return e}function E8(t,e,n){for(;e>0;){let r=NP(t,e-2,n);if(r<e)return r;e--}return 0}function FP(t){return t>=56320&&t<57344}function ZP(t){return t>=55296&&t<56320}function bn(t,e){let n=t.charCodeAt(e);if(!ZP(n)||e+1==t.length)return n;let r=t.charCodeAt(e+1);return FP(r)?(n-55296<<10)+(r-56320)+65536:n}function MO(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function kr(t){return t<65536?1:2}const m0=/\r\n?|\n/;var wn=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(wn||(wn={}));class pi{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;n<this.sections.length;n+=2)e+=this.sections[n];return e}get newLength(){let e=0;for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n+1];e+=r<0?this.sections[n]:r}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let n=0,r=0,i=0;n<this.sections.length;){let o=this.sections[n++],s=this.sections[n++];s<0?(e(r,i,o),i+=o):i+=s,r+=o}}iterChangedRanges(e,n=!1){O0(this,e,n)}get invertedDesc(){let e=[];for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];i<0?e.push(r,i):e.push(i,r)}return new pi(e)}composeDesc(e){return this.empty?e:e.empty?this:WP(this,e)}mapDesc(e,n=!1){return e.empty?this:x0(this,e,n)}mapPos(e,n=-1,r=wn.Simple){let i=0,o=0;for(let s=0;s<this.sections.length;){let a=this.sections[s++],l=this.sections[s++],c=i+a;if(l<0){if(c>e)return o+(e-i);o+=a}else{if(r!=wn.Simple&&c>=e&&(r==wn.TrackDel&&i<e&&c>e||r==wn.TrackBefore&&i<e||r==wn.TrackAfter&&c>e))return null;if(c>e||c==e&&n<0&&!a)return e==i||n<0?o:o+l;o+=l}i=c}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return o}touchesRange(e,n=e){for(let r=0,i=0;r<this.sections.length&&i<=n;){let o=this.sections[r++],s=this.sections[r++],a=i+o;if(s>=0&&i<=n&&a>=e)return i<e&&a>n?"cover":!0;i=a}return!1}toString(){let e="";for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];e+=(e?" ":"")+r+(i>=0?":"+i:"")}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 pi(e)}static create(e){return new pi(e)}}class rn extends pi{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 O0(this,(n,r,i,o,s)=>e=e.replace(i,i+(r-n),s),!1),e}mapDesc(e,n=!1){return x0(this,e,n,!0)}invert(e){let n=this.sections.slice(),r=[];for(let i=0,o=0;i<n.length;i+=2){let s=n[i],a=n[i+1];if(a>=0){n[i]=a,n[i+1]=s;let l=i>>1;for(;r.length<l;)r.push(st.empty);r.push(s?e.slice(o,o+s):st.empty)}o+=s}return new rn(n,r)}compose(e){return this.empty?e:e.empty?this:WP(this,e,!0)}map(e,n=!1){return e.empty?this:x0(this,e,n,!0)}iterChanges(e,n=!1){O0(this,e,n)}get desc(){return pi.create(this.sections)}filter(e){let n=[],r=[],i=[],o=new Ml(this);e:for(let s=0,a=0;;){let l=s==e.length?1e9:e[s++];for(;a<l||a==l&&o.len==0;){if(o.done)break e;let u=Math.min(o.len,l-a);Tn(i,u,-1);let f=o.ins==-1?-1:o.off==0?o.ins:0;Tn(n,u,f),f>0&&io(r,n,o.text),o.forward(u),a+=u}let c=e[s++];for(;a<c;){if(o.done)break e;let u=Math.min(o.len,c-a);Tn(n,u,-1),Tn(i,u,o.ins==-1?-1:o.off==0?o.ins:0),o.forward(u),a+=u}}return{changes:new rn(n,r),filtered:pi.create(i)}}toJSON(){let e=[];for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n],i=this.sections[n+1];i<0?e.push(r):i==0?e.push([r]):e.push([r].concat(this.inserted[n>>1].toJSON()))}return e}static of(e,n,r){let i=[],o=[],s=0,a=null;function l(u=!1){if(!u&&!i.length)return;s<n&&Tn(i,n-s,-1);let f=new rn(i,o);a=a?a.compose(f.map(a)):f,i=[],o=[],s=0}function c(u){if(Array.isArray(u))for(let f of u)c(f);else if(u instanceof rn){if(u.length!=n)throw new RangeError(`Mismatched change set length (got ${u.length}, expected ${n})`);l(),a=a?a.compose(u.map(a)):u}else{let{from:f,to:d=f,insert:h}=u;if(f>d||f<0||d>n)throw new RangeError(`Invalid change range ${f} to ${d} (in doc of length ${n})`);let p=h?typeof h=="string"?st.of(h.split(r||m0)):h:st.empty,O=p.length;if(f==d&&O==0)return;f<s&&l(),f>s&&Tn(i,f-s,-1),Tn(i,d-f,O),io(o,i,p),s=d}}return c(e),l(!a),a}static empty(e){return new rn(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],r=[];for(let i=0;i<e.length;i++){let o=e[i];if(typeof o=="number")n.push(o,-1);else{if(!Array.isArray(o)||typeof o[0]!="number"||o.some((s,a)=>a&&typeof s!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(o.length==1)n.push(o[0],0);else{for(;r.length<i;)r.push(st.empty);r[i]=st.of(o.slice(1)),n.push(o[0],r[i].length)}}}return new rn(n,r)}static createSet(e,n){return new rn(e,n)}}function Tn(t,e,n,r=!1){if(e==0&&n<=0)return;let i=t.length-2;i>=0&&n<=0&&n==t[i+1]?t[i]+=e:e==0&&t[i]==0?t[i+1]+=n:r?(t[i]+=e,t[i+1]+=n):t.push(e,n)}function io(t,e,n){if(n.length==0)return;let r=e.length-2>>1;if(r<t.length)t[t.length-1]=t[t.length-1].append(n);else{for(;t.length<r;)t.push(st.empty);t.push(n)}}function O0(t,e,n){let r=t.inserted;for(let i=0,o=0,s=0;s<t.sections.length;){let a=t.sections[s++],l=t.sections[s++];if(l<0)i+=a,o+=a;else{let c=i,u=o,f=st.empty;for(;c+=a,u+=l,l&&r&&(f=f.append(r[s-2>>1])),!(n||s==t.sections.length||t.sections[s+1]<0);)a=t.sections[s++],l=t.sections[s++];e(i,c,o,u,f),i=c,o=u}}}function x0(t,e,n,r=!1){let i=[],o=r?[]:null,s=new Ml(t),a=new Ml(e);for(let l=-1;;)if(s.ins==-1&&a.ins==-1){let c=Math.min(s.len,a.len);Tn(i,c,-1),s.forward(c),a.forward(c)}else if(a.ins>=0&&(s.ins<0||l==s.i||s.off==0&&(a.len<s.len||a.len==s.len&&!n))){let c=a.len;for(Tn(i,a.ins,-1);c;){let u=Math.min(s.len,c);s.ins>=0&&l<s.i&&s.len<=u&&(Tn(i,0,s.ins),o&&io(o,i,s.text),l=s.i),s.forward(u),c-=u}a.next()}else if(s.ins>=0){let c=0,u=s.len;for(;u;)if(a.ins==-1){let f=Math.min(u,a.len);c+=f,u-=f,a.forward(f)}else if(a.ins==0&&a.len<u)u-=a.len,a.next();else break;Tn(i,c,l<s.i?s.ins:0),o&&l<s.i&&io(o,i,s.text),l=s.i,s.forward(s.len-u)}else{if(s.done&&a.done)return o?rn.createSet(i,o):pi.create(i);throw new Error("Mismatched change set lengths")}}function WP(t,e,n=!1){let r=[],i=n?[]:null,o=new Ml(t),s=new Ml(e);for(let a=!1;;){if(o.done&&s.done)return i?rn.createSet(r,i):pi.create(r);if(o.ins==0)Tn(r,o.len,0,a),o.next();else if(s.len==0&&!s.done)Tn(r,0,s.ins,a),i&&io(i,r,s.text),s.next();else{if(o.done||s.done)throw new Error("Mismatched change set lengths");{let l=Math.min(o.len2,s.len),c=r.length;if(o.ins==-1){let u=s.ins==-1?-1:s.off?0:s.ins;Tn(r,l,u,a),i&&u&&io(i,r,s.text)}else s.ins==-1?(Tn(r,o.off?0:o.len,l,a),i&&io(i,r,o.textBit(l))):(Tn(r,o.off?0:o.len,s.off?0:s.ins,a),i&&!s.off&&io(i,r,s.text));a=(o.ins>l||s.ins>=0&&s.len>l)&&(a||r.length>c),o.forward2(l),s.forward(l)}}}}class Ml{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,n=this.i-2>>1;return n>=e.length?st.empty:e[n]}textBit(e){let{inserted:n}=this.set,r=this.i-2>>1;return r>=n.length&&!e?st.empty:n[r].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)}}let tu=class v0{constructor(e,n,r){this.from=e,this.to=n,this.flags=r}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 r,i;return this.empty?r=i=e.mapPos(this.from,n):(r=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new v0(r,i,this.flags)}extend(e,n=e){if(e<=this.anchor&&n>=this.anchor)return ie.range(e,n);let r=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return ie.range(this.anchor,r)}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 ie.range(e.anchor,e.head)}static create(e,n,r){return new v0(e,n,r)}};class ie{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:ie.create(this.ranges.map(r=>r.map(e,n)),this.mainIndex)}eq(e,n=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let r=0;r<this.ranges.length;r++)if(!this.ranges[r].eq(e.ranges[r],n))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new ie([this.main],0)}addRange(e,n=!0){return ie.create([e].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(e,n=this.mainIndex){let r=this.ranges.slice();return r[n]=e,ie.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.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 ie(e.ranges.map(n=>tu.fromJSON(n)),e.main)}static single(e,n=e){return new ie([ie.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 r=0,i=0;i<e.length;i++){let o=e[i];if(o.empty?o.from<=r:o.from<r)return ie.normalized(e.slice(),n);r=o.to}return new ie(e,n)}static cursor(e,n=0,r,i){return tu.create(e,e,(n==0?0:n<0?8:16)|(r==null?7:Math.min(6,r))|(i??16777215)<<6)}static range(e,n,r,i){let o=(r??16777215)<<6|(i==null?7:Math.min(6,i));return n<e?tu.create(n,e,48|o):tu.create(e,n,(n>e?8:0)|o)}static normalized(e,n=0){let r=e[n];e.sort((i,o)=>i.from-o.from),n=e.indexOf(r);for(let i=1;i<e.length;i++){let o=e[i],s=e[i-1];if(o.empty?o.from<=s.to:o.from<s.to){let a=s.from,l=Math.max(o.to,s.to);i<=n&&n--,e.splice(--i,2,o.anchor>o.head?ie.range(l,a):ie.range(a,l))}}return new ie(e,n)}}function VP(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let NO=0;class me{constructor(e,n,r,i,o){this.combine=e,this.compareInput=n,this.compare=r,this.isStatic=i,this.id=NO++,this.default=e([]),this.extensions=typeof o=="function"?o(this):o}get reader(){return this}static define(e={}){return new me(e.combine||(n=>n),e.compareInput||((n,r)=>n===r),e.compare||(e.combine?(n,r)=>n===r:FO),!!e.static,e.enables)}of(e){return new Zu([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new Zu(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new Zu(e,this,2,n)}from(e,n){return n||(n=r=>r),this.compute([e],r=>n(r.field(e)))}}function FO(t,e){return t==e||t.length==e.length&&t.every((n,r)=>n===e[r])}class Zu{constructor(e,n,r,i){this.dependencies=e,this.facet=n,this.type=r,this.value=i,this.id=NO++}dynamicSlot(e){var n;let r=this.value,i=this.facet.compareInput,o=this.id,s=e[o]>>1,a=this.type==2,l=!1,c=!1,u=[];for(let f of this.dependencies)f=="doc"?l=!0:f=="selection"?c=!0:((n=e[f.id])!==null&&n!==void 0?n:1)&1||u.push(e[f.id]);return{create(f){return f.values[s]=r(f),1},update(f,d){if(l&&d.docChanged||c&&(d.docChanged||d.selection)||y0(f,u)){let h=r(f);if(a?!Hy(h,f.values[s],i):!i(h,f.values[s]))return f.values[s]=h,1}return 0},reconfigure:(f,d)=>{let h,p=d.config.address[o];if(p!=null){let O=$f(d,p);if(this.dependencies.every(m=>m instanceof me?d.facet(m)===f.facet(m):m instanceof ln?d.field(m,!1)==f.field(m,!1):!0)||(a?Hy(h=r(f),O,i):i(h=r(f),O)))return f.values[s]=O,0}else h=r(f);return f.values[s]=h,1}}}}function Hy(t,e,n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!n(t[r],e[r]))return!1;return!0}function y0(t,e){let n=!1;for(let r of e)wl(t,r)&1&&(n=!0);return n}function I8(t,e,n){let r=n.map(l=>t[l.id]),i=n.map(l=>l.type),o=r.filter(l=>!(l&1)),s=t[e.id]>>1;function a(l){let c=[];for(let u=0;u<r.length;u++){let f=$f(l,r[u]);if(i[u]==2)for(let d of f)c.push(d);else c.push(f)}return e.combine(c)}return{create(l){for(let c of r)wl(l,c);return l.values[s]=a(l),1},update(l,c){if(!y0(l,o))return 0;let u=a(l);return e.compare(u,l.values[s])?0:(l.values[s]=u,1)},reconfigure(l,c){let u=y0(l,r),f=c.config.facets[e.id],d=c.facet(e);if(f&&!u&&FO(n,f))return l.values[s]=d,0;let h=a(l);return e.compare(h,d)?(l.values[s]=d,0):(l.values[s]=h,1)}}}const Jy=me.define({static:!0});class ln{constructor(e,n,r,i,o){this.id=e,this.createF=n,this.updateF=r,this.compareF=i,this.spec=o,this.provides=void 0}static define(e){let n=new ln(NO++,e.create,e.update,e.compare||((r,i)=>r===i),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet(Jy).find(r=>r.field==this);return((n==null?void 0:n.create)||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:r=>(r.values[n]=this.create(r),1),update:(r,i)=>{let o=r.values[n],s=this.updateF(o,i);return this.compareF(o,s)?0:(r.values[n]=s,1)},reconfigure:(r,i)=>i.config.address[this.id]!=null?(r.values[n]=i.field(this),0):(r.values[n]=this.create(r),1)}}init(e){return[this,Jy.of({field:this,create:e})]}get extension(){return this}}const zo={lowest:4,low:3,default:2,high:1,highest:0};function Ua(t){return e=>new zP(e,t)}const Si={highest:Ua(zo.highest),high:Ua(zo.high),default:Ua(zo.default),low:Ua(zo.low),lowest:Ua(zo.lowest)};class zP{constructor(e,n){this.inner=e,this.prec=n}}class Vd{of(e){return new b0(this,e)}reconfigure(e){return Vd.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class b0{constructor(e,n){this.compartment=e,this.inner=n}}class Tf{constructor(e,n,r,i,o,s){for(this.base=e,this.compartments=n,this.dynamicSlots=r,this.address=i,this.staticValues=o,this.facets=s,this.statusTemplate=[];this.statusTemplate.length<r.length;)this.statusTemplate.push(0)}staticFacet(e){let n=this.address[e.id];return n==null?e.default:this.staticValues[n>>1]}static resolve(e,n,r){let i=[],o=Object.create(null),s=new Map;for(let d of T8(e,n,s))d instanceof ln?i.push(d):(o[d.facet.id]||(o[d.facet.id]=[])).push(d);let a=Object.create(null),l=[],c=[];for(let d of i)a[d.id]=c.length<<1,c.push(h=>d.slot(h));let u=r==null?void 0:r.config.facets;for(let d in o){let h=o[d],p=h[0].facet,O=u&&u[d]||[];if(h.every(m=>m.type==0))if(a[p.id]=l.length<<1|1,FO(O,h))l.push(r.facet(p));else{let m=p.combine(h.map(x=>x.value));l.push(r&&p.compare(m,r.facet(p))?r.facet(p):m)}else{for(let m of h)m.type==0?(a[m.id]=l.length<<1|1,l.push(m.value)):(a[m.id]=c.length<<1,c.push(x=>m.dynamicSlot(x)));a[p.id]=c.length<<1,c.push(m=>I8(m,p,h))}}let f=c.map(d=>d(a));return new Tf(e,s,f,a,l,o)}}function T8(t,e,n){let r=[[],[],[],[],[]],i=new Map;function o(s,a){let l=i.get(s);if(l!=null){if(l<=a)return;let c=r[l].indexOf(s);c>-1&&r[l].splice(c,1),s instanceof b0&&n.delete(s.compartment)}if(i.set(s,a),Array.isArray(s))for(let c of s)o(c,a);else if(s instanceof b0){if(n.has(s.compartment))throw new RangeError("Duplicate use of compartment in extensions");let c=e.get(s.compartment)||s.inner;n.set(s.compartment,c),o(c,a)}else if(s instanceof zP)o(s.inner,s.prec);else if(s instanceof ln)r[a].push(s),s.provides&&o(s.provides,a);else if(s instanceof Zu)r[a].push(s),s.facet.extensions&&o(s.facet.extensions,zo.default);else{let c=s.extension;if(!c)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(c,a)}}return o(t,zo.default),r.reduce((s,a)=>s.concat(a))}function wl(t,e){if(e&1)return 2;let n=e>>1,r=t.status[n];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;t.status[n]=4;let i=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|i}function $f(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const LP=me.define(),S0=me.define({combine:t=>t.some(e=>e),static:!0}),XP=me.define({combine:t=>t.length?t[0]:void 0,static:!0}),GP=me.define(),YP=me.define(),qP=me.define(),UP=me.define({combine:t=>t.length?t[0]:!1});class wi{constructor(e,n){this.type=e,this.value=n}static define(){return new $8}}class $8{of(e){return new wi(this,e)}}class j8{constructor(e){this.map=e}of(e){return new _e(this,e)}}class _e{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 _e(this.type,n)}is(e){return this.type==e}static define(e={}){return new j8(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let r=[];for(let i of e){let o=i.map(n);o&&r.push(o)}return r}}_e.reconfigure=_e.define();_e.appendConfig=_e.define();class qt{constructor(e,n,r,i,o,s){this.startState=e,this.changes=n,this.selection=r,this.effects=i,this.annotations=o,this.scrollIntoView=s,this._doc=null,this._state=null,r&&VP(r,n.newLength),o.some(a=>a.type==qt.time)||(this.annotations=o.concat(qt.time.of(Date.now())))}static create(e,n,r,i,o,s){return new qt(e,n,r,i,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(qt.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}qt.time=wi.define();qt.userEvent=wi.define();qt.addToHistory=wi.define();qt.remote=wi.define();function R8(t,e){let n=[];for(let r=0,i=0;;){let o,s;if(r<t.length&&(i==e.length||e[i]>=t[r]))o=t[r++],s=t[r++];else if(i<e.length)o=e[i++],s=e[i++];else return n;!n.length||n[n.length-1]<o?n.push(o,s):n[n.length-1]<s&&(n[n.length-1]=s)}}function HP(t,e,n){var r;let i,o,s;return n?(i=e.changes,o=rn.empty(e.changes.length),s=t.changes.compose(e.changes)):(i=e.changes.map(t.changes),o=t.changes.mapDesc(e.changes,!0),s=t.changes.compose(i)),{changes:s,selection:e.selection?e.selection.map(o):(r=t.selection)===null||r===void 0?void 0:r.map(i),effects:_e.mapEffects(t.effects,i).concat(_e.mapEffects(e.effects,o)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function w0(t,e,n){let r=e.selection,i=Xs(e.annotations);return e.userEvent&&(i=i.concat(qt.userEvent.of(e.userEvent))),{changes:e.changes instanceof rn?e.changes:rn.of(e.changes||[],n,t.facet(XP)),selection:r&&(r instanceof ie?r:ie.single(r.anchor,r.head)),effects:Xs(e.effects),annotations:i,scrollIntoView:!!e.scrollIntoView}}function JP(t,e,n){let r=w0(t,e.length?e[0]:{},t.doc.length);e.length&&e[0].filter===!1&&(n=!1);for(let o=1;o<e.length;o++){e[o].filter===!1&&(n=!1);let s=!!e[o].sequential;r=HP(r,w0(t,e[o],s?r.changes.newLength:t.doc.length),s)}let i=qt.create(t,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return Q8(n?D8(i):i)}function D8(t){let e=t.startState,n=!0;for(let i of e.facet(GP)){let o=i(t);if(o===!1){n=!1;break}Array.isArray(o)&&(n=n===!0?o:R8(n,o))}if(n!==!0){let i,o;if(n===!1)o=t.changes.invertedDesc,i=rn.empty(e.doc.length);else{let s=t.changes.filter(n);i=s.changes,o=s.filtered.mapDesc(s.changes).invertedDesc}t=qt.create(e,i,t.selection&&t.selection.map(o),_e.mapEffects(t.effects,o),t.annotations,t.scrollIntoView)}let r=e.facet(YP);for(let i=r.length-1;i>=0;i--){let o=r[i](t);o instanceof qt?t=o:Array.isArray(o)&&o.length==1&&o[0]instanceof qt?t=o[0]:t=JP(e,Xs(o),!1)}return t}function Q8(t){let e=t.startState,n=e.facet(qP),r=t;for(let i=n.length-1;i>=0;i--){let o=n[i](t);o&&Object.keys(o).length&&(r=HP(r,w0(e,o,t.changes.newLength),!0))}return r==t?t:qt.create(e,t.changes,t.selection,r.effects,r.annotations,r.scrollIntoView)}const B8=[];function Xs(t){return t==null?B8: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 _8=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let C0;try{C0=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function M8(t){if(C0)return C0.test(t);for(let e=0;e<t.length;e++){let n=t[e];if(/\w/.test(n)||n>"€"&&(n.toUpperCase()!=n.toLowerCase()||_8.test(n)))return!0}return!1}function N8(t){return e=>{if(!/\S/.test(e))return Rt.Space;if(M8(e))return Rt.Word;for(let n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return Rt.Word;return Rt.Other}}class Ue{constructor(e,n,r,i,o,s){this.config=e,this.doc=n,this.selection=r,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=o,s&&(s._state=this);for(let a=0;a<this.config.dynamicSlots.length;a++)wl(this,a<<1);this.computeSlot=null}field(e,n=!0){let r=this.config.address[e.id];if(r==null){if(n)throw new RangeError("Field is not present in this state");return}return wl(this,r),$f(this,r)}update(...e){return JP(this,e,!0)}applyTransaction(e){let n=this.config,{base:r,compartments:i}=n;for(let a of e.effects)a.is(Vd.reconfigure)?(n&&(i=new Map,n.compartments.forEach((l,c)=>i.set(c,l)),n=null),i.set(a.value.compartment,a.value.extension)):a.is(_e.reconfigure)?(n=null,r=a.value):a.is(_e.appendConfig)&&(n=null,r=Xs(r).concat(a.value));let o;n?o=e.startState.values.slice():(n=Tf.resolve(r,i,this),o=new Ue(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(l,c)=>c.reconfigure(l,this),null).values);let s=e.startState.facet(S0)?e.newSelection:e.newSelection.asSingle();new Ue(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:ie.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,r=e(n.ranges[0]),i=this.changes(r.changes),o=[r.range],s=Xs(r.effects);for(let a=1;a<n.ranges.length;a++){let l=e(n.ranges[a]),c=this.changes(l.changes),u=c.map(i);for(let d=0;d<a;d++)o[d]=o[d].map(u);let f=i.mapDesc(c,!0);o.push(l.range.map(f)),i=i.compose(u),s=_e.mapEffects(s,u).concat(_e.mapEffects(Xs(l.effects),f))}return{changes:i,selection:ie.create(o,n.mainIndex),effects:s}}changes(e=[]){return e instanceof rn?e:rn.of(e,this.doc.length,this.facet(Ue.lineSeparator))}toText(e){return st.of(e.split(this.facet(Ue.lineSeparator)||m0))}sliceDoc(e=0,n=this.doc.length){return this.doc.sliceString(e,n,this.lineBreak)}facet(e){let n=this.config.address[e.id];return n==null?e.default:(wl(this,n),$f(this,n))}toJSON(e){let n={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let r in e){let i=e[r];i instanceof ln&&this.config.address[i.id]!=null&&(n[r]=i.spec.toJSON(this.field(e[r]),this))}return n}static fromJSON(e,n={},r){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let i=[];if(r){for(let o in r)if(Object.prototype.hasOwnProperty.call(e,o)){let s=r[o],a=e[o];i.push(s.init(l=>s.spec.fromJSON(a,l)))}}return Ue.create({doc:e.doc,selection:ie.fromJSON(e.selection),extensions:n.extensions?i.concat([n.extensions]):i})}static create(e={}){let n=Tf.resolve(e.extensions||[],new Map),r=e.doc instanceof st?e.doc:st.of((e.doc||"").split(n.staticFacet(Ue.lineSeparator)||m0)),i=e.selection?e.selection instanceof ie?e.selection:ie.single(e.selection.anchor,e.selection.head):ie.single(0);return VP(i,r.length),n.staticFacet(S0)||(i=i.asSingle()),new Ue(n,r,i,n.dynamicSlots.map(()=>null),(o,s)=>s.create(o),null)}get tabSize(){return this.facet(Ue.tabSize)}get lineBreak(){return this.facet(Ue.lineSeparator)||`
664
+ `}get readOnly(){return this.facet(UP)}phrase(e,...n){for(let r of this.facet(Ue.phrases))if(Object.prototype.hasOwnProperty.call(r,e)){e=r[e];break}return n.length&&(e=e.replace(/\$(\$|\d*)/g,(r,i)=>{if(i=="$")return"$";let o=+(i||1);return!o||o>n.length?r:n[o-1]})),e}languageDataAt(e,n,r=-1){let i=[];for(let o of this.facet(LP))for(let s of o(this,n,r))Object.prototype.hasOwnProperty.call(s,e)&&i.push(s[e]);return i}charCategorizer(e){return N8(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:n,from:r,length:i}=this.doc.lineAt(e),o=this.charCategorizer(e),s=e-r,a=e-r;for(;s>0;){let l=kn(n,s,!1);if(o(n.slice(l,s))!=Rt.Word)break;s=l}for(;a<i;){let l=kn(n,a);if(o(n.slice(a,l))!=Rt.Word)break;a=l}return s==a?null:ie.range(s+r,a+r)}}Ue.allowMultipleSelections=S0;Ue.tabSize=me.define({combine:t=>t.length?t[0]:4});Ue.lineSeparator=XP;Ue.readOnly=UP;Ue.phrases=me.define({compare(t,e){let n=Object.keys(t),r=Object.keys(e);return n.length==r.length&&n.every(i=>t[i]==e[i])}});Ue.languageData=LP;Ue.changeFilter=GP;Ue.transactionFilter=YP;Ue.transactionExtender=qP;Vd.reconfigure=_e.define();function Ci(t,e,n={}){let r={};for(let i of t)for(let o of Object.keys(i)){let s=i[o],a=r[o];if(a===void 0)r[o]=s;else if(!(a===s||s===void 0))if(Object.hasOwnProperty.call(n,o))r[o]=n[o](a,s);else throw new Error("Config merge conflict for field "+o)}for(let i in e)r[i]===void 0&&(r[i]=e[i]);return r}class Ko{eq(e){return this==e}range(e,n=e){return k0.create(e,n,this)}}Ko.prototype.startSide=Ko.prototype.endSide=0;Ko.prototype.point=!1;Ko.prototype.mapMode=wn.TrackDel;let k0=class KP{constructor(e,n,r){this.from=e,this.to=n,this.value=r}static create(e,n,r){return new KP(e,n,r)}};function A0(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class ZO{constructor(e,n,r,i){this.from=e,this.to=n,this.value=r,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,n,r,i=0){let o=r?this.to:this.from;for(let s=i,a=o.length;;){if(s==a)return s;let l=s+a>>1,c=o[l]-e||(r?this.value[l].endSide:this.value[l].startSide)-n;if(l==s)return c>=0?s:a;c>=0?a=l:s=l+1}}between(e,n,r,i){for(let o=this.findIndex(n,-1e9,!0),s=this.findIndex(r,1e9,!1,o);o<s;o++)if(i(this.from[o]+e,this.to[o]+e,this.value[o])===!1)return!1}map(e,n){let r=[],i=[],o=[],s=-1,a=-1;for(let l=0;l<this.value.length;l++){let c=this.value[l],u=this.from[l]+e,f=this.to[l]+e,d,h;if(u==f){let p=n.mapPos(u,c.startSide,c.mapMode);if(p==null||(d=h=p,c.startSide!=c.endSide&&(h=n.mapPos(u,c.endSide),h<d)))continue}else if(d=n.mapPos(u,c.startSide),h=n.mapPos(f,c.endSide),d>h||d==h&&c.startSide>0&&c.endSide<=0)continue;(h-d||c.endSide-c.startSide)<0||(s<0&&(s=d),c.point&&(a=Math.max(a,h-d)),r.push(c),i.push(d-s),o.push(h-s))}return{mapped:r.length?new ZO(i,o,r,a):null,pos:s}}}class et{constructor(e,n,r,i){this.chunkPos=e,this.chunk=n,this.nextLayer=r,this.maxPoint=i}static create(e,n,r,i){return new et(e,n,r,i)}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:r=!1,filterFrom:i=0,filterTo:o=this.length}=e,s=e.filter;if(n.length==0&&!s)return this;if(r&&(n=n.slice().sort(A0)),this.isEmpty)return n.length?et.of(n):this;let a=new e2(this,null,-1).goto(0),l=0,c=[],u=new mo;for(;a.value||l<n.length;)if(l<n.length&&(a.from-n[l].from||a.startSide-n[l].value.startSide)>=0){let f=n[l++];u.addInner(f.from,f.to,f.value)||c.push(f)}else a.rangeIndex==1&&a.chunkIndex<this.chunk.length&&(l==n.length||this.chunkEnd(a.chunkIndex)<n[l].from)&&(!s||i>this.chunkEnd(a.chunkIndex)||o<this.chunkPos[a.chunkIndex])&&u.addChunk(this.chunkPos[a.chunkIndex],this.chunk[a.chunkIndex])?a.nextChunk():((!s||i>a.to||o<a.from||s(a.from,a.to,a.value))&&(u.addInner(a.from,a.to,a.value)||c.push(k0.create(a.from,a.to,a.value))),a.next());return u.finishInner(this.nextLayer.isEmpty&&!c.length?et.empty:this.nextLayer.update({add:c,filter:s,filterFrom:i,filterTo:o}))}map(e){if(e.empty||this.isEmpty)return this;let n=[],r=[],i=-1;for(let s=0;s<this.chunk.length;s++){let a=this.chunkPos[s],l=this.chunk[s],c=e.touchesRange(a,a+l.length);if(c===!1)i=Math.max(i,l.maxPoint),n.push(l),r.push(e.mapPos(a));else if(c===!0){let{mapped:u,pos:f}=l.map(a,e);u&&(i=Math.max(i,u.maxPoint),n.push(u),r.push(f))}}let o=this.nextLayer.map(e);return n.length==0?o:new et(r,n,o||et.empty,i)}between(e,n,r){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let o=this.chunkPos[i],s=this.chunk[i];if(n>=o&&e<=o+s.length&&s.between(o,e-o,n-o,r)===!1)return}this.nextLayer.between(e,n,r)}}iter(e=0){return Nl.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return Nl.from(e).goto(n)}static compare(e,n,r,i,o=-1){let s=e.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=o),a=n.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=o),l=Ky(s,a,r),c=new Ha(s,l,o),u=new Ha(a,l,o);r.iterGaps((f,d,h)=>eb(c,f,u,d,h,i)),r.empty&&r.length==0&&eb(c,0,u,0,0,i)}static eq(e,n,r=0,i){i==null&&(i=999999999);let o=e.filter(u=>!u.isEmpty&&n.indexOf(u)<0),s=n.filter(u=>!u.isEmpty&&e.indexOf(u)<0);if(o.length!=s.length)return!1;if(!o.length)return!0;let a=Ky(o,s),l=new Ha(o,a,0).goto(r),c=new Ha(s,a,0).goto(r);for(;;){if(l.to!=c.to||!P0(l.active,c.active)||l.point&&(!c.point||!l.point.eq(c.point)))return!1;if(l.to>i)return!0;l.next(),c.next()}}static spans(e,n,r,i,o=-1){let s=new Ha(e,null,o).goto(n),a=n,l=s.openStart;for(;;){let c=Math.min(s.to,r);if(s.point){let u=s.activeForPoint(s.to),f=s.pointFrom<n?u.length+1:s.point.startSide<0?u.length:Math.min(u.length,l);i.point(a,c,s.point,u,f,s.pointRank),l=Math.min(s.openEnd(c),u.length)}else c>a&&(i.span(a,c,s.active,l),l=s.openEnd(c));if(s.to>r)return l+(s.point&&s.to>r?1:0);a=s.to,s.next()}}static of(e,n=!1){let r=new mo;for(let i of e instanceof k0?[e]:n?F8(e):e)r.add(i.from,i.to,i.value);return r.finish()}static join(e){if(!e.length)return et.empty;let n=e[e.length-1];for(let r=e.length-2;r>=0;r--)for(let i=e[r];i!=et.empty;i=i.nextLayer)n=new et(i.chunkPos,i.chunk,n,Math.max(i.maxPoint,n.maxPoint));return n}}et.empty=new et([],[],null,-1);function F8(t){if(t.length>1)for(let e=t[0],n=1;n<t.length;n++){let r=t[n];if(A0(e,r)>0)return t.slice().sort(A0);e=r}return t}et.empty.nextLayer=et.empty;class mo{finishChunk(e){this.chunks.push(new ZO(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,r){this.addInner(e,n,r)||(this.nextLayer||(this.nextLayer=new mo)).add(e,n,r)}addInner(e,n,r){let i=e-this.lastTo||r.startSide-this.last.endSide;if(i<=0&&(e-this.lastFrom||r.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return i<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=r,this.lastFrom=e,this.lastTo=n,this.value.push(r),r.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 r=n.value.length-1;return this.last=n.value[r],this.lastFrom=n.from[r]+e,this.lastTo=n.to[r]+e,!0}finish(){return this.finishInner(et.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=et.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}}function Ky(t,e,n){let r=new Map;for(let o of t)for(let s=0;s<o.chunk.length;s++)o.chunk[s].maxPoint<=0&&r.set(o.chunk[s],o.chunkPos[s]);let i=new Set;for(let o of e)for(let s=0;s<o.chunk.length;s++){let a=r.get(o.chunk[s]);a!=null&&(n?n.mapPos(a):a)==o.chunkPos[s]&&!(n!=null&&n.touchesRange(a,a+o.chunk[s].length))&&i.add(o.chunk[s])}return i}class e2{constructor(e,n,r,i=0){this.layer=e,this.skip=n,this.minPoint=r,this.rank=i}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,n=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,n,!1),this}gotoInner(e,n,r){for(;this.chunkIndex<this.layer.chunk.length;){let i=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(i)||this.layer.chunkEnd(this.chunkIndex)<e||i.maxPoint<this.minPoint))break;this.chunkIndex++,r=!1}if(this.chunkIndex<this.layer.chunk.length){let i=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],n,!0);(!r||this.rangeIndex<i)&&this.setRangeIndex(i)}this.next()}forward(e,n){(this.to-e||this.endSide-n)<0&&this.gotoInner(e,n,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],n=this.layer.chunk[this.chunkIndex],r=e+n.from[this.rangeIndex];if(this.from=r,this.to=e+n.to[this.rangeIndex],this.value=n.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class Nl{constructor(e){this.heap=e}static from(e,n=null,r=-1){let i=[];for(let o=0;o<e.length;o++)for(let s=e[o];!s.isEmpty;s=s.nextLayer)s.maxPoint>=r&&i.push(new e2(s,n,r,o));return i.length==1?i[0]:new Nl(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,n=-1e9){for(let r of this.heap)r.goto(e,n);for(let r=this.heap.length>>1;r>=0;r--)Kh(this.heap,r);return this.next(),this}forward(e,n){for(let r of this.heap)r.forward(e,n);for(let r=this.heap.length>>1;r>=0;r--)Kh(this.heap,r);(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(),Kh(this.heap,0)}}}function Kh(t,e){for(let n=t[e];;){let r=(e<<1)+1;if(r>=t.length)break;let i=t[r];if(r+1<t.length&&i.compare(t[r+1])>=0&&(i=t[r+1],r++),n.compare(i)<0)break;t[r]=n,t[e]=i,e=r}}class Ha{constructor(e,n,r){this.minPoint=r,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=Nl.from(e,n,r)}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){nu(this.active,e),nu(this.activeTo,e),nu(this.activeRank,e),this.minActive=tb(this.active,this.activeTo)}addActive(e){let n=0,{value:r,to:i,rank:o}=this.cursor;for(;n<this.activeRank.length&&(o-this.activeRank[n]||i-this.activeTo[n])>0;)n++;ru(this.active,n,r),ru(this.activeTo,n,i),ru(this.activeRank,n,o),e&&ru(e,n,this.cursor.from),this.minActive=tb(this.active,this.activeTo)}next(){let e=this.to,n=this.point;this.point=null;let r=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),r&&nu(r,i)}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(r),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=o,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=o.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(r){this.openStart=0;for(let i=r.length-1;i>=0&&r[i]<e;i--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let n=[];for(let r=this.active.length-1;r>=0&&!(this.activeRank[r]<this.pointRank);r--)(this.activeTo[r]>e||this.activeTo[r]==e&&this.active[r].endSide>=this.point.endSide)&&n.push(this.active[r]);return n.reverse()}openEnd(e){let n=0;for(let r=this.activeTo.length-1;r>=0&&this.activeTo[r]>e;r--)n++;return n}}function eb(t,e,n,r,i,o){t.goto(e),n.goto(r);let s=r+i,a=r,l=r-e;for(;;){let c=t.to+l-n.to||t.endSide-n.endSide,u=c<0?t.to+l:n.to,f=Math.min(u,s);if(t.point||n.point?t.point&&n.point&&(t.point==n.point||t.point.eq(n.point))&&P0(t.activeForPoint(t.to),n.activeForPoint(n.to))||o.comparePoint(a,f,t.point,n.point):f>a&&!P0(t.active,n.active)&&o.compareRange(a,f,t.active,n.active),u>s)break;a=u,c<=0&&t.next(),c>=0&&n.next()}}function P0(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n]&&!t[n].eq(e[n]))return!1;return!0}function nu(t,e){for(let n=e,r=t.length-1;n<r;n++)t[n]=t[n+1];t.pop()}function ru(t,e,n){for(let r=t.length-1;r>=e;r--)t[r+1]=t[r];t[e]=n}function tb(t,e){let n=-1,r=1e9;for(let i=0;i<e.length;i++)(e[i]-r||t[i].endSide-t[n].endSide)<0&&(n=i,r=e[i]);return n}function Ta(t,e,n=t.length){let r=0;for(let i=0;i<n;)t.charCodeAt(i)==9?(r+=e-r%e,i++):(r++,i=kn(t,i));return r}function E0(t,e,n,r){for(let i=0,o=0;;){if(o>=e)return i;if(i==t.length)break;o+=t.charCodeAt(i)==9?n-o%n:1,i=kn(t,i)}return r===!0?-1:t.length}const I0="ͼ",nb=typeof Symbol>"u"?"__"+I0:Symbol.for(I0),T0=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),rb=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class Oo{constructor(e,n){this.rules=[];let{finish:r}=n||{};function i(s){return/^@/.test(s)?[s]:s.split(/,\s*/)}function o(s,a,l,c){let u=[],f=/^@(\w+)\b/.exec(s[0]),d=f&&f[1]=="keyframes";if(f&&a==null)return l.push(s[0]+";");for(let h in a){let p=a[h];if(/&/.test(h))o(h.split(/,\s*/).map(O=>s.map(m=>O.replace(/&/,m))).reduce((O,m)=>O.concat(m)),p,l);else if(p&&typeof p=="object"){if(!f)throw new RangeError("The value of a property ("+h+") should be a primitive value.");o(i(h),p,u,d)}else p!=null&&u.push(h.replace(/_.*/,"").replace(/[A-Z]/g,O=>"-"+O.toLowerCase())+": "+p+";")}(u.length||d)&&l.push((r&&!f&&!c?s.map(r):s).join(", ")+" {"+u.join(" ")+"}")}for(let s in e)o(i(s),e[s],this.rules)}getRules(){return this.rules.join(`
665
665
  `)}static newName(){let e=rb[nb]||1;return rb[nb]=e+1,I0+e.toString(36)}static mount(e,n,r){let i=e[T0],o=r&&r.nonce;i?o&&i.setNonce(o):i=new Z8(e,o),i.mount(Array.isArray(n)?n:[n],e)}}let ib=new Map;class Z8{constructor(e,n){let r=e.ownerDocument||e,i=r.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let o=ib.get(r);if(o)return e[T0]=o;this.sheet=new i.CSSStyleSheet,ib.set(r,this)}else this.styleTag=r.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);this.modules=[],e[T0]=this}mount(e,n){let r=this.sheet,i=0,o=0;for(let s=0;s<e.length;s++){let a=e[s],l=this.modules.indexOf(a);if(l<o&&l>-1&&(this.modules.splice(l,1),o--,l=-1),l==-1){if(this.modules.splice(o++,0,a),r)for(let c=0;c<a.rules.length;c++)r.insertRule(a.rules[c],i++)}else{for(;o<l;)i+=this.modules[o++].rules.length;i+=a.rules.length,o++}}if(r)n.adoptedStyleSheets.indexOf(this.sheet)<0&&(n.adoptedStyleSheets=[this.sheet,...n.adoptedStyleSheets]);else{let s="";for(let l=0;l<this.modules.length;l++)s+=this.modules[l].getRules()+`
666
- `;this.styleTag.textContent=s;let a=n.head||n;this.styleTag.parentNode!=a&&a.insertBefore(this.styleTag,a.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}var xo={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Fl={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},W8=typeof navigator<"u"&&/Mac/.test(navigator.platform),V8=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Sn=0;Sn<10;Sn++)xo[48+Sn]=xo[96+Sn]=String(Sn);for(var Sn=1;Sn<=24;Sn++)xo[Sn+111]="F"+Sn;for(var Sn=65;Sn<=90;Sn++)xo[Sn]=String.fromCharCode(Sn+32),Fl[Sn]=String.fromCharCode(Sn);for(var ep in xo)Fl.hasOwnProperty(ep)||(Fl[ep]=xo[ep]);function z8(t){var e=W8&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||V8&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?Fl:xo)[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 jf(t){let e;return t.nodeType==11?e=t.getSelection?t:t.ownerDocument:e=t,e.getSelection()}function $0(t,e){return e?t==e||t.contains(e.nodeType!=1?e.parentNode:e):!1}function L8(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function Wu(t,e){if(!e.anchorNode)return!1;try{return $0(t,e.anchorNode)}catch{return!1}}function la(t){return t.nodeType==3?es(t,0,t.nodeValue.length).getClientRects():t.nodeType==1?t.getClientRects():[]}function Cl(t,e,n,r){return n?ob(t,e,n,r,-1)||ob(t,e,n,r,1):!1}function Ko(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e}function Rf(t){return t.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function ob(t,e,n,r,i){for(;;){if(t==n&&e==r)return!0;if(e==(i<0?0:Ni(t))){if(t.nodeName=="DIV")return!1;let o=t.parentNode;if(!o||o.nodeType!=1)return!1;e=Ko(t)+(i<0?0:1),t=o}else if(t.nodeType==1){if(t=t.childNodes[e+(i<0?-1:0)],t.nodeType==1&&t.contentEditable=="false")return!1;e=i<0?Ni(t):0}else return!1}}function Ni(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function zd(t,e){let n=e?t.left:t.right;return{left:n,right:n,top:t.top,bottom:t.bottom}}function X8(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 t2(t,e){let n=e.width/t.offsetWidth,r=e.height/t.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.width-t.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(e.height-t.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}function G8(t,e,n,r,i,o,s,a){let l=t.ownerDocument,c=l.defaultView||window;for(let u=t,f=!1;u&&!f;)if(u.nodeType==1){let d,h=u==l.body,p=1,O=1;if(h)d=X8(c);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(f=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let v=u.getBoundingClientRect();({scaleX:p,scaleY:O}=t2(u,v)),d={left:v.left,right:v.left+u.clientWidth*p,top:v.top,bottom:v.top+u.clientHeight*O}}let m=0,x=0;if(i=="nearest")e.top<d.top?(x=-(d.top-e.top+s),n>0&&e.bottom>d.bottom+x&&(x=e.bottom-d.bottom+x+s)):e.bottom>d.bottom&&(x=e.bottom-d.bottom+s,n<0&&e.top-x<d.top&&(x=-(d.top+x-e.top+s)));else{let v=e.bottom-e.top,y=d.bottom-d.top;x=(i=="center"&&v<=y?e.top+v/2-y/2:i=="start"||i=="center"&&n<0?e.top-s:e.bottom-y+s)-d.top}if(r=="nearest"?e.left<d.left?(m=-(d.left-e.left+o),n>0&&e.right>d.right+m&&(m=e.right-d.right+m+o)):e.right>d.right&&(m=e.right-d.right+o,n<0&&e.left<d.left+m&&(m=-(d.left+m-e.left+o))):m=(r=="center"?e.left+(e.right-e.left)/2-(d.right-d.left)/2:r=="start"==a?e.left-o:e.right-(d.right-d.left)+o)-d.left,m||x)if(h)c.scrollBy(m,x);else{let v=0,y=0;if(x){let S=u.scrollTop;u.scrollTop+=x/O,y=(u.scrollTop-S)*O}if(m){let S=u.scrollLeft;u.scrollLeft+=m/p,v=(u.scrollLeft-S)*p}e={left:e.left-v,top:e.top-y,right:e.right-v,bottom:e.bottom-y},v&&Math.abs(v-m)<1&&(r="nearest"),y&&Math.abs(y-x)<1&&(i="nearest")}if(h)break;u=u.assignedSlot||u.parentNode}else if(u.nodeType==11)u=u.host;else break}function Y8(t){let e=t.ownerDocument;for(let n=t.parentNode;n&&n!=e.body;)if(n.nodeType==1){if(n.scrollHeight>n.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 q8{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:r}=e;this.set(n,Math.min(e.anchorOffset,n?Ni(n):0),r,Math.min(e.focusOffset,r?Ni(r):0))}set(e,n,r,i){this.anchorNode=e,this.anchorOffset=n,this.focusNode=r,this.focusOffset=i}}let Ss=null;function n2(t){if(t.setActive)return t.setActive();if(Ss)return t.focus(Ss);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(Ss==null?{get preventScroll(){return Ss={preventScroll:!0},!0}}:void 0),!Ss){Ss=!1;for(let n=0;n<e.length;){let r=e[n++],i=e[n++],o=e[n++];r.scrollTop!=i&&(r.scrollTop=i),r.scrollLeft!=o&&(r.scrollLeft=o)}}}let sb;function es(t,e,n=e){let r=sb||(sb=document.createRange());return r.setEnd(t,n),r.setStart(t,e),r}function Gs(t,e,n,r){let i={key:e,code:e,keyCode:n,which:n,cancelable:!0};r&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=r);let o=new KeyboardEvent("keydown",i);o.synthetic=!0,t.dispatchEvent(o);let s=new KeyboardEvent("keyup",i);return s.synthetic=!0,t.dispatchEvent(s),o.defaultPrevented||s.defaultPrevented}function U8(t){for(;t;){if(t&&(t.nodeType==9||t.nodeType==11&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}function r2(t){for(;t.attributes.length;)t.removeAttributeNode(t.attributes[0])}function H8(t,e){let n=e.focusNode,r=e.focusOffset;if(!n||e.anchorNode!=n||e.anchorOffset!=r)return!1;for(r=Math.min(r,Ni(n));;)if(r){if(n.nodeType!=1)return!1;let i=n.childNodes[r-1];i.contentEditable=="false"?r--:(n=i,r=Ni(n))}else{if(n==t)return!0;r=Ko(n),n=n.parentNode}}function i2(t){return t.scrollTop>Math.max(1,t.scrollHeight-t.clientHeight-4)}function o2(t,e){for(let n=t,r=e;;){if(n.nodeType==3&&r>0)return{node:n,offset:r};if(n.nodeType==1&&r>0){if(n.contentEditable=="false")return null;n=n.childNodes[r-1],r=Ni(n)}else if(n.parentNode&&!Rf(n))r=Ko(n),n=n.parentNode;else return null}}function s2(t,e){for(let n=t,r=e;;){if(n.nodeType==3&&r<n.nodeValue.length)return{node:n,offset:r};if(n.nodeType==1&&r<n.childNodes.length){if(n.contentEditable=="false")return null;n=n.childNodes[r],r=0}else if(n.parentNode&&!Rf(n))r=Ko(n)+1,n=n.parentNode;else return null}}class $n{constructor(e,n,r=!0){this.node=e,this.offset=n,this.precise=r}static before(e,n){return new $n(e.parentNode,Ko(e),n)}static after(e,n){return new $n(e.parentNode,Ko(e)+1,n)}}const WO=[];class Ct{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let n=this.posAtStart;for(let r of this.children){if(r==e)return n;n+=r.length+r.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,n){if(this.flags&2){let r=this.dom,i=null,o;for(let s of this.children){if(s.flags&7){if(!s.dom&&(o=i?i.nextSibling:r.firstChild)){let a=Ct.get(o);(!a||!a.parent&&a.canReuseDOM(s))&&s.reuseDOM(o)}s.sync(e,n),s.flags&=-8}if(o=i?i.nextSibling:r.firstChild,n&&!n.written&&n.node==r&&o!=s.dom&&(n.written=!0),s.dom.parentNode==r)for(;o&&o!=s.dom;)o=ab(o);else r.insertBefore(s.dom,o);i=s.dom}for(o=i?i.nextSibling:r.firstChild,o&&n&&n.node==r&&(n.written=!0);o;)o=ab(o)}else if(this.flags&1)for(let r of this.children)r.flags&7&&(r.sync(e,n),r.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,n){let r;if(e==this.dom)r=this.dom.childNodes[n];else{let i=Ni(e)==0?0:n==0?-1:1;for(;;){let o=e.parentNode;if(o==this.dom)break;i==0&&o.firstChild!=o.lastChild&&(e==o.firstChild?i=-1:i=1),e=o}i<0?r=e:r=e.nextSibling}if(r==this.dom.firstChild)return 0;for(;r&&!Ct.get(r);)r=r.nextSibling;if(!r)return this.length;for(let i=0,o=0;;i++){let s=this.children[i];if(s.dom==r)return o;o+=s.length+s.breakAfter}}domBoundsAround(e,n,r=0){let i=-1,o=-1,s=-1,a=-1;for(let l=0,c=r,u=r;l<this.children.length;l++){let f=this.children[l],d=c+f.length;if(c<e&&d>n)return f.domBoundsAround(e,n,c);if(d>=e&&i==-1&&(i=l,o=c),c>n&&f.dom.parentNode==this.dom){s=l,a=u;break}u=d,c=d+f.breakAfter}return{from:o,to:a<0?r+this.length:a,startDOM:(i?this.children[i-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:s<this.children.length&&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,r=WO){this.markDirty();for(let i=e;i<n;i++){let o=this.children[i];o.parent==this&&r.indexOf(o)<0&&o.destroy()}this.children.splice(e,n-e,...r);for(let i=0;i<r.length;i++)r[i].setParent(this)}ignoreMutation(e){return!1}ignoreEvent(e){return!1}childCursor(e=this.length){return new a2(this.children,e,this.children.length)}childPos(e,n=1){return this.childCursor().findPos(e,n)}toString(){let e=this.constructor.name.replace("View","");return e+(this.children.length?"("+this.children.join()+")":this.length?"["+(e=="Text"?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(e){return e.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(e,n,r,i,o,s){return!1}become(e){return!1}canReuseDOM(e){return e.constructor==this.constructor&&!((this.flags|e.flags)&8)}getSide(){return 0}destroy(){for(let e of this.children)e.parent==this&&e.destroy();this.parent=null}}Ct.prototype.breakAfter=0;function ab(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class a2{constructor(e,n,r){this.children=e,this.pos=n,this.i=r,this.off=0}findPos(e,n=1){for(;;){if(e>this.pos||e==this.pos&&(n>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let r=this.children[--this.i];this.pos-=r.length+r.breakAfter}}}function l2(t,e,n,r,i,o,s,a,l){let{children:c}=t,u=c.length?c[e]:null,f=o.length?o[o.length-1]:null,d=f?f.breakAfter:s;if(!(e==r&&u&&!s&&!d&&o.length<2&&u.merge(n,i,o.length?f:null,n==0,a,l))){if(r<c.length){let h=c[r];h&&(i<h.length||h.breakAfter&&(f!=null&&f.breakAfter))?(e==r&&(h=h.split(i),i=0),!d&&f&&h.merge(0,i,f,!0,0,l)?o[o.length-1]=h:((i||h.children.length&&!h.children[0].length)&&h.merge(0,i,null,!1,0,l),o.push(h))):h!=null&&h.breakAfter&&(f?f.breakAfter=1:s=1),r++}for(u&&(u.breakAfter=s,n>0&&(!s&&o.length&&u.merge(n,u.length,o[0],!1,a,0)?u.breakAfter=o.shift().breakAfter:(n<u.length||u.children.length&&u.children[u.children.length-1].length==0)&&u.merge(n,u.length,null,!1,a,0),e++));e<r&&o.length;)if(c[r-1].become(o[o.length-1]))r--,o.pop(),l=o.length?0:a;else if(c[e].become(o[0]))e++,o.shift(),a=o.length?0:l;else break;!o.length&&e&&r<c.length&&!c[e-1].breakAfter&&c[r].merge(0,0,c[e-1],!1,a,l)&&e--,(e<r||o.length)&&t.replaceChildren(e,r,o)}}function c2(t,e,n,r,i,o){let s=t.childCursor(),{i:a,off:l}=s.findPos(n,1),{i:c,off:u}=s.findPos(e,-1),f=e-n;for(let d of r)f+=d.length;t.length+=f,l2(t,c,u,a,l,r,0,i,o)}let pr=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},j0=typeof document<"u"?document:{documentElement:{style:{}}};const R0=/Edge\/(\d+)/.exec(pr.userAgent),u2=/MSIE \d/.test(pr.userAgent),D0=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(pr.userAgent),Ld=!!(u2||D0||R0),lb=!Ld&&/gecko\/(\d+)/i.test(pr.userAgent),tp=!Ld&&/Chrome\/(\d+)/.exec(pr.userAgent),cb="webkitFontSmoothing"in j0.documentElement.style,f2=!Ld&&/Apple Computer/.test(pr.vendor),ub=f2&&(/Mobile\/\w+/.test(pr.userAgent)||pr.maxTouchPoints>2);var Oe={mac:ub||/Mac/.test(pr.platform),windows:/Win/.test(pr.platform),linux:/Linux|X11/.test(pr.platform),ie:Ld,ie_version:u2?j0.documentMode||6:D0?+D0[1]:R0?+R0[1]:0,gecko:lb,gecko_version:lb?+(/Firefox\/(\d+)/.exec(pr.userAgent)||[0,0])[1]:0,chrome:!!tp,chrome_version:tp?+tp[1]:0,ios:ub,android:/Android\b/.test(pr.userAgent),webkit:cb,safari:f2,webkit_version:cb?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:j0.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const J8=256;class zr extends Ct{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,r){return this.flags&8||r&&(!(r instanceof zr)||this.length-(n-e)+r.length>J8||r.flags&8)?!1:(this.text=this.text.slice(0,e)+(r?r.text:"")+this.text.slice(n),this.markDirty(),!0)}split(e){let n=new zr(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 $n(this.dom,e)}domBoundsAround(e,n,r){return{from:r,to:r+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,n){return K8(this.dom,e,n)}}class Fi extends Ct{constructor(e,n=[],r=0){super(),this.mark=e,this.children=n,this.length=r;for(let i of n)i.setParent(this)}setAttrs(e){if(r2(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,r,i,o,s){return r&&(!(r instanceof Fi&&r.mark.eq(this.mark))||e&&o<=0||n<this.length&&s<=0)?!1:(c2(this,e,n,r?r.children.slice():[],o-1,s-1),this.markDirty(),!0)}split(e){let n=[],r=0,i=-1,o=0;for(let a of this.children){let l=r+a.length;l>e&&n.push(r<e?a.split(e-r):a),i<0&&r>=e&&(i=o),r=l,o++}let s=this.length-e;return this.length=e,i>-1&&(this.children.length=i,this.markDirty()),new Fi(this.mark,n,s)}domAtPos(e){return d2(this,e)}coordsAt(e,n){return p2(this,e,n)}}function K8(t,e,n){let r=t.nodeValue.length;e>r&&(e=r);let i=e,o=e,s=0;e==0&&n<0||e==r&&n>=0?Oe.chrome||Oe.gecko||(e?(i--,s=1):o<r&&(o++,s=-1)):n<0?i--:o<r&&o++;let a=es(t,i,o).getClientRects();if(!a.length)return null;let l=a[(s?s<0:n>=0)?0:a.length-1];return Oe.safari&&!s&&l.width==0&&(l=Array.prototype.find.call(a,c=>c.width)||l),s?zd(l,s<0):l||null}class oo extends Ct{static create(e,n,r){return new oo(e,n,r)}constructor(e,n,r){super(),this.widget=e,this.length=n,this.side=r,this.prevWidget=null}split(e){let n=oo.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,r,i,o,s){return r&&(!(r instanceof oo)||!this.widget.compare(r.widget)||e>0&&o<=0||n<this.length&&s<=0)?!1:(this.length=e+(r?r.length:0)+(this.length-n),!0)}become(e){return e instanceof oo&&e.side==this.side&&this.widget.constructor==e.widget.constructor?(this.widget.compare(e.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get overrideDOMText(){if(this.length==0)return st.empty;let e=this;for(;e.parent;)e=e.parent;let{view:n}=e,r=n&&n.state.doc,i=this.posAtStart;return r?r.slice(i,i+this.length):st.empty}domAtPos(e){return(this.length?e==0:this.side>0)?$n.before(this.dom):$n.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,n){let r=this.widget.coordsAt(this.dom,e,n);if(r)return r;let i=this.dom.getClientRects(),o=null;if(!i.length)return null;let s=this.side?this.side<0:e>0;for(let a=s?i.length-1:0;o=i[a],!(e>0?a==0:a==i.length-1||o.top<o.bottom);a+=s?-1:1);return zd(o,!s)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class ca extends Ct{constructor(e){super(),this.side=e}get length(){return 0}merge(){return!1}become(e){return e instanceof ca&&e.side==this.side}split(){return new ca(this.side)}sync(){if(!this.dom){let e=document.createElement("img");e.className="cm-widgetBuffer",e.setAttribute("aria-hidden","true"),this.setDOM(e)}}getSide(){return this.side}domAtPos(e){return this.side>0?$n.before(this.dom):$n.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return st.empty}get isHidden(){return!0}}zr.prototype.children=oo.prototype.children=ca.prototype.children=WO;function d2(t,e){let n=t.dom,{children:r}=t,i=0;for(let o=0;i<r.length;i++){let s=r[i],a=o+s.length;if(!(a==o&&s.getSide()<=0)){if(e>o&&e<a&&s.dom.parentNode==n)return s.domAtPos(e-o);if(e<=o)break;o=a}}for(let o=i;o>0;o--){let s=r[o-1];if(s.dom.parentNode==n)return s.domAtPos(s.length)}for(let o=i;o<r.length;o++){let s=r[o];if(s.dom.parentNode==n)return s.domAtPos(0)}return new $n(n,0)}function h2(t,e,n){let r,{children:i}=t;n>0&&e instanceof Fi&&i.length&&(r=i[i.length-1])instanceof Fi&&r.mark.eq(e.mark)?h2(r,e.children[0],n-1):(i.push(e),e.setParent(t)),t.length+=e.length}function p2(t,e,n){let r=null,i=-1,o=null,s=-1;function a(c,u){for(let f=0,d=0;f<c.children.length&&d<=u;f++){let h=c.children[f],p=d+h.length;p>=u&&(h.children.length?a(h,u-d):(!o||o.isHidden&&n>0)&&(p>u||d==p&&h.getSide()>0)?(o=h,s=u-d):(d<u||d==p&&h.getSide()<0&&!h.isHidden)&&(r=h,i=u-d)),d=p}}a(t,e);let l=(n<0?r:o)||r||o;return l?l.coordsAt(Math.max(0,l==r?i:s),n):eN(t)}function eN(t){let e=t.dom.lastChild;if(!e)return t.dom.getBoundingClientRect();let n=la(e);return n[n.length-1]||null}function Q0(t,e){for(let n in t)n=="class"&&e.class?e.class+=" "+t.class:n=="style"&&e.style?e.style+=";"+t.style:e[n]=t[n];return e}const fb=Object.create(null);function VO(t,e,n){if(t==e)return!0;t||(t=fb),e||(e=fb);let r=Object.keys(t),i=Object.keys(e);if(r.length-(n&&r.indexOf(n)>-1?1:0)!=i.length-(n&&i.indexOf(n)>-1?1:0))return!1;for(let o of r)if(o!=n&&(i.indexOf(o)==-1||t[o]!==e[o]))return!1;return!0}function B0(t,e,n){let r=!1;if(e)for(let i in e)n&&i in n||(r=!0,i=="style"?t.style.cssText="":t.removeAttribute(i));if(n)for(let i in n)e&&e[i]==n[i]||(r=!0,i=="style"?t.style.cssText=n[i]:t.setAttribute(i,n[i]));return r}function tN(t){let e=Object.create(null);for(let n=0;n<t.attributes.length;n++){let r=t.attributes[n];e[r.name]=r.value}return e}class tn extends Ct{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,n,r,i,o,s){if(r){if(!(r instanceof tn))return!1;this.dom||r.transferDOM(this)}return i&&this.setDeco(r?r.attrs:null),c2(this,e,n,r?r.children.slice():[],o,s),!0}split(e){let n=new tn;if(n.breakAfter=this.breakAfter,this.length==0)return n;let{i:r,off:i}=this.childPos(e);i&&(n.append(this.children[r].split(i),0),this.children[r].merge(i,this.children[r].length,null,!1,0,0),r++);for(let o=r;o<this.children.length;o++)n.append(this.children[o],0);for(;r>0&&this.children[r-1].length==0;)this.children[--r].destroy();return this.children.length=r,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){VO(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,n){h2(this,e,n)}addLineDeco(e){let n=e.spec.attributes,r=e.spec.class;n&&(this.attrs=Q0(n,this.attrs||{})),r&&(this.attrs=Q0({class:r},this.attrs||{}))}domAtPos(e){return d2(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,n){var r;this.dom?this.flags&4&&(r2(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&&(B0(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,n);let i=this.dom.lastChild;for(;i&&Ct.get(i)instanceof Fi;)i=i.lastChild;if(!i||!this.length||i.nodeName!="BR"&&((r=Ct.get(i))===null||r===void 0?void 0:r.isEditable)==!1&&(!Oe.ios||!this.children.some(o=>o instanceof zr))){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 r of this.children){if(!(r instanceof zr)||/[^ -~]/.test(r.text))return null;let i=la(r.dom);if(i.length!=1)return null;e+=i[0].width,n=i[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:n}:null}coordsAt(e,n){let r=p2(this,e,n);if(!this.children.length&&r&&this.parent){let{heightOracle:i}=this.parent.view.viewState,o=r.bottom-r.top;if(Math.abs(o-i.lineHeight)<2&&i.textHeight<o){let s=(o-i.textHeight)/2;return{top:r.top+s,bottom:r.bottom-s,left:r.left,right:r.left}}}return r}become(e){return!1}covers(){return!0}static find(e,n){for(let r=0,i=0;r<e.children.length;r++){let o=e.children[r],s=i+o.length;if(s>=n){if(o instanceof tn)return o;if(s>n)break}i=s+o.breakAfter}return null}}class uo extends Ct{constructor(e,n,r){super(),this.widget=e,this.length=n,this.deco=r,this.breakAfter=0,this.prevWidget=null}merge(e,n,r,i,o,s){return r&&(!(r instanceof uo)||!this.widget.compare(r.widget)||e>0&&o<=0||n<this.length&&s<=0)?!1:(this.length=e+(r?r.length:0)+(this.length-n),!0)}domAtPos(e){return e==0?$n.before(this.dom):$n.after(this.dom,e==this.length)}split(e){let n=this.length-e;this.length=e;let r=new uo(this.widget,n,this.deco);return r.breakAfter=this.breakAfter,r}get children(){return WO}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"))}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):st.empty}domBoundsAround(){return null}become(e){return e instanceof uo&&e.widget.constructor==this.widget.constructor?(e.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,this.deco=e.deco,this.breakAfter=e.breakAfter,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get isEditable(){return!1}get isWidget(){return!0}coordsAt(e,n){return this.widget.coordsAt(this.dom,e,n)}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}covers(e){let{startSide:n,endSide:r}=this.deco;return n==r?!1:e<0?n<0:r>0}}class ki{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,r){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var Wn=function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t}(Wn||(Wn={}));class we extends Jo{constructor(e,n,r,i){super(),this.startSide=e,this.endSide=n,this.widget=r,this.spec=i}get heightRelevant(){return!1}static mark(e){return new hc(e)}static widget(e){let n=Math.max(-1e4,Math.min(1e4,e.side||0)),r=!!e.block;return n+=r&&!e.inlineOrder?n>0?3e8:-4e8:n>0?1e8:-1e8,new vo(e,n,n,r,e.widget||null,!1)}static replace(e){let n=!!e.block,r,i;if(e.isBlockGap)r=-5e8,i=4e8;else{let{start:o,end:s}=g2(e,n);r=(o?n?-3e8:-1:5e8)-1,i=(s?n?2e8:1:-6e8)+1}return new vo(e,r,i,n,e.widget||null,!0)}static line(e){return new pc(e)}static set(e,n=!1){return et.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}we.none=et.empty;class hc extends we{constructor(e){let{start:n,end:r}=g2(e);super(n?-1:5e8,r?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var n,r;return this==e||e instanceof hc&&this.tagName==e.tagName&&(this.class||((n=this.attrs)===null||n===void 0?void 0:n.class))==(e.class||((r=e.attrs)===null||r===void 0?void 0:r.class))&&VO(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)}}hc.prototype.point=!1;class pc extends we{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof pc&&this.spec.class==e.spec.class&&VO(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)}}pc.prototype.mapMode=wn.TrackBefore;pc.prototype.point=!0;class vo extends we{constructor(e,n,r,i,o,s){super(n,r,o,e),this.block=i,this.isReplace=s,this.mapMode=i?n<=0?wn.TrackBefore:wn.TrackAfter:wn.TrackDel}get type(){return this.startSide!=this.endSide?Wn.WidgetRange:this.startSide<=0?Wn.WidgetBefore:Wn.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof vo&&nN(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)}}vo.prototype.point=!0;function g2(t,e=!1){let{inclusiveStart:n,inclusiveEnd:r}=t;return n==null&&(n=t.inclusive),r==null&&(r=t.inclusive),{start:n??e,end:r??e}}function nN(t,e){return t==e||!!(t&&e&&t.compare(e))}function _0(t,e,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=t?n[i]=Math.max(n[i],e):n.push(t,e)}class kl{constructor(e,n,r,i){this.doc=e,this.pos=n,this.end=r,this.disallowBlockEffectsFor=i,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 uo&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new tn),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(iu(new ca(-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 uo)&&this.getLine()}buildText(e,n,r){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 i=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(n.slice(n.length-r)),this.getLine().append(iu(new zr(this.text.slice(this.textOff,this.textOff+i)),n),r),this.atCursorPos=!0,this.textOff+=i,e-=i,r=0}}span(e,n,r,i){this.buildText(n-e,r,i),this.pos=n,this.openStart<0&&(this.openStart=i)}point(e,n,r,i,o,s){if(this.disallowBlockEffectsFor[s]&&r instanceof vo){if(r.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(r instanceof vo)if(r.block)r.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new uo(r.widget||ua.block,a,r));else{let l=oo.create(r.widget||ua.inline,a,a?0:r.startSide),c=this.atCursorPos&&!l.isEditable&&o<=i.length&&(e<n||r.startSide>0),u=!l.isEditable&&(e<n||o>i.length||r.startSide<=0),f=this.getLine();this.pendingBuffer==2&&!c&&!l.isEditable&&(this.pendingBuffer=0),this.flushBuffer(i),c&&(f.append(iu(new ca(1),i),o),o=i.length+Math.max(0,o-i.length)),f.append(iu(l,i),o),this.atCursorPos=u,this.pendingBuffer=u?e<n||o>i.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=i.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(r);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,r,i,o){let s=new kl(e,n,r,o);return s.openEnd=et.spans(i,n,r,s),s.openStart<0&&(s.openStart=s.openEnd),s.finish(s.openEnd),s}}function iu(t,e){for(let n of e)t=new Fi(n,[t],t.length);return t}class ua extends ki{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}}ua.inline=new ua("span");ua.block=new ua("div");var $t=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}($t||($t={}));const ts=$t.LTR,zO=$t.RTL;function m2(t){let e=[];for(let n=0;n<t.length;n++)e.push(1<<+t[n]);return e}const rN=m2("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),iN=m2("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),M0=Object.create(null),Kr=[];for(let t of["()","[]","{}"]){let e=t.charCodeAt(0),n=t.charCodeAt(1);M0[e]=n,M0[n]=-e}function O2(t){return t<=247?rN[t]:1424<=t&&t<=1524?2:1536<=t&&t<=1785?iN[t-1536]:1774<=t&&t<=2220?4:8192<=t&&t<=8204?256:64336<=t&&t<=65023?4:1}const oN=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class so{get dir(){return this.level%2?zO:ts}constructor(e,n,r){this.from=e,this.to=n,this.level=r}side(e,n){return this.dir==n==e?this.to:this.from}forward(e,n){return e==(this.dir==n)}static find(e,n,r,i){let o=-1;for(let s=0;s<e.length;s++){let a=e[s];if(a.from<=n&&a.to>=n){if(a.level==r)return s;(o<0||(i!=0?i<0?a.from<n:a.to>n:e[o].level>a.level))&&(o=s)}}if(o<0)throw new RangeError("Index out of range");return o}}function x2(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++){let r=t[n],i=e[n];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!x2(r.inner,i.inner))return!1}return!0}const wt=[];function sN(t,e,n,r,i){for(let o=0;o<=r.length;o++){let s=o?r[o-1].to:e,a=o<r.length?r[o].from:n,l=o?256:i;for(let c=s,u=l,f=l;c<a;c++){let d=O2(t.charCodeAt(c));d==512?d=u:d==8&&f==4&&(d=16),wt[c]=d==4?2:d,d&7&&(f=d),u=d}for(let c=s,u=l,f=l;c<a;c++){let d=wt[c];if(d==128)c<a-1&&u==wt[c+1]&&u&24?d=wt[c]=u:wt[c]=256;else if(d==64){let h=c+1;for(;h<a&&wt[h]==64;)h++;let p=c&&u==8||h<n&&wt[h]==8?f==1?1:8:256;for(let O=c;O<h;O++)wt[O]=p;c=h-1}else d==8&&f==1&&(wt[c]=1);u=d,d&7&&(f=d)}}}function aN(t,e,n,r,i){let o=i==1?2:1;for(let s=0,a=0,l=0;s<=r.length;s++){let c=s?r[s-1].to:e,u=s<r.length?r[s].from:n;for(let f=c,d,h,p;f<u;f++)if(h=M0[d=t.charCodeAt(f)])if(h<0){for(let O=a-3;O>=0;O-=3)if(Kr[O+1]==-h){let m=Kr[O+2],x=m&2?i:m&4?m&1?o:i:0;x&&(wt[f]=wt[Kr[O]]=x),a=O;break}}else{if(Kr.length==189)break;Kr[a++]=f,Kr[a++]=d,Kr[a++]=l}else if((p=wt[f])==2||p==1){let O=p==i;l=O?0:1;for(let m=a-3;m>=0;m-=3){let x=Kr[m+2];if(x&2)break;if(O)Kr[m+2]|=2;else{if(x&4)break;Kr[m+2]|=4}}}}}function lN(t,e,n,r){for(let i=0,o=r;i<=n.length;i++){let s=i?n[i-1].to:t,a=i<n.length?n[i].from:e;for(let l=s;l<a;){let c=wt[l];if(c==256){let u=l+1;for(;;)if(u==a){if(i==n.length)break;u=n[i++].to,a=i<n.length?n[i].from:e}else if(wt[u]==256)u++;else break;let f=o==1,d=(u<e?wt[u]:r)==1,h=f==d?f?1:2:r;for(let p=u,O=i,m=O?n[O-1].to:t;p>l;)p==m&&(p=n[--O].from,m=O?n[O-1].to:t),wt[--p]=h;l=u}else o=c,l++}}}function N0(t,e,n,r,i,o,s){let a=r%2?2:1;if(r%2==i%2)for(let l=e,c=0;l<n;){let u=!0,f=!1;if(c==o.length||l<o[c].from){let O=wt[l];O!=a&&(u=!1,f=O==16)}let d=!u&&a==1?[]:null,h=u?r:r+1,p=l;e:for(;;)if(c<o.length&&p==o[c].from){if(f)break e;let O=o[c];if(!u)for(let m=O.to,x=c+1;;){if(m==n)break e;if(x<o.length&&o[x].from==m)m=o[x++].to;else{if(wt[m]==a)break e;break}}if(c++,d)d.push(O);else{O.from>l&&s.push(new so(l,O.from,h));let m=O.direction==ts!=!(h%2);F0(t,m?r+1:r,i,O.inner,O.from,O.to,s),l=O.to}p=O.to}else{if(p==n||(u?wt[p]!=a:wt[p]==a))break;p++}d?N0(t,l,p,r+1,i,d,s):l<p&&s.push(new so(l,p,h)),l=p}else for(let l=n,c=o.length;l>e;){let u=!0,f=!1;if(!c||l>o[c-1].to){let O=wt[l-1];O!=a&&(u=!1,f=O==16)}let d=!u&&a==1?[]:null,h=u?r:r+1,p=l;e:for(;;)if(c&&p==o[c-1].to){if(f)break e;let O=o[--c];if(!u)for(let m=O.from,x=c;;){if(m==e)break e;if(x&&o[x-1].to==m)m=o[--x].from;else{if(wt[m-1]==a)break e;break}}if(d)d.push(O);else{O.to<l&&s.push(new so(O.to,l,h));let m=O.direction==ts!=!(h%2);F0(t,m?r+1:r,i,O.inner,O.from,O.to,s),l=O.from}p=O.from}else{if(p==e||(u?wt[p-1]!=a:wt[p-1]==a))break;p--}d?N0(t,p,l,r+1,i,d,s):p<l&&s.push(new so(p,l,h)),l=p}}function F0(t,e,n,r,i,o,s){let a=e%2?2:1;sN(t,i,o,r,a),aN(t,i,o,r,a),lN(i,o,r,a),N0(t,i,o,e,n,r,s)}function cN(t,e,n){if(!t)return[new so(0,0,e==zO?1:0)];if(e==ts&&!n.length&&!oN.test(t))return v2(t.length);if(n.length)for(;t.length>wt.length;)wt[wt.length]=256;let r=[],i=e==ts?0:1;return F0(t,i,i,n,0,t.length,r),r}function v2(t){return[new so(0,t,0)]}let y2="";function uN(t,e,n,r,i){var o;let s=r.head-t.from,a=so.find(e,s,(o=r.bidiLevel)!==null&&o!==void 0?o:-1,r.assoc),l=e[a],c=l.side(i,n);if(s==c){let d=a+=i?1:-1;if(d<0||d>=e.length)return null;l=e[a=d],s=l.side(!i,n),c=l.side(i,n)}let u=kn(t.text,s,l.forward(i,n));(u<l.from||u>l.to)&&(u=c),y2=t.text.slice(Math.min(s,u),Math.max(s,u));let f=a==(i?e.length-1:0)?null:e[a+(i?1:-1)];return f&&u==c&&f.level+(i?0:1)<l.level?ie.cursor(f.side(!i,n)+t.from,f.forward(i,n)?1:-1,f.level):ie.cursor(u+t.from,l.forward(i,n)?-1:1,l.level)}function fN(t,e,n){for(let r=e;r<n;r++){let i=O2(t.charCodeAt(r));if(i==1)return ts;if(i==2||i==4)return zO}return ts}const b2=me.define(),S2=me.define(),w2=me.define(),C2=me.define(),Z0=me.define(),k2=me.define(),A2=me.define(),P2=me.define({combine:t=>t.some(e=>e)}),E2=me.define({combine:t=>t.some(e=>e)}),I2=me.define();class Ys{constructor(e,n="nearest",r="nearest",i=5,o=5,s=!1){this.range=e,this.y=n,this.x=r,this.yMargin=i,this.xMargin=o,this.isSnapshot=s}map(e){return e.empty?this:new Ys(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 Ys(ie.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const ou=_e.define({map:(t,e)=>t.map(e)});function Zn(t,e,n){let r=t.facet(C2);r.length?r[0](e):window.onerror?window.onerror(String(e),n,void 0,void 0,e):n?console.error(n+":",e):console.error(e)}const Xd=me.define({combine:t=>t.length?t[0]:!0});let dN=0;const cl=me.define();class Bt{constructor(e,n,r,i,o){this.id=e,this.create=n,this.domEventHandlers=r,this.domEventObservers=i,this.extension=o(this)}static define(e,n){const{eventHandlers:r,eventObservers:i,provide:o,decorations:s}=n||{};return new Bt(dN++,e,r,i,a=>{let l=[cl.of(a)];return s&&l.push(Zl.of(c=>{let u=c.plugin(a);return u?s(u):we.none})),o&&l.push(o(a)),l})}static fromClass(e,n){return Bt.define(r=>new e(r),n)}}class np{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(r){if(Zn(n.state,r,"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){Zn(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(r){Zn(e.state,r,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const T2=me.define(),LO=me.define(),Zl=me.define(),$2=me.define(),XO=me.define(),j2=me.define();function db(t,e){let n=t.state.facet(j2);if(!n.length)return n;let r=n.map(o=>o instanceof Function?o(t):o),i=[];return et.spans(r,e.from,e.to,{point(){},span(o,s,a,l){let c=o-e.from,u=s-e.from,f=i;for(let d=a.length-1;d>=0;d--,l--){let h=a[d].spec.bidiIsolate,p;if(h==null&&(h=fN(e.text,c,u)),l>0&&f.length&&(p=f[f.length-1]).to==c&&p.direction==h)p.to=u,f=p.inner;else{let O={from:c,to:u,direction:h,inner:[]};f.push(O),f=O.inner}}}}),i}const R2=me.define();function D2(t){let e=0,n=0,r=0,i=0;for(let o of t.state.facet(R2)){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&&(r=Math.max(r,s.top)),s.bottom!=null&&(i=Math.max(i,s.bottom)))}return{left:e,right:n,top:r,bottom:i}}const ul=me.define();class Ir{constructor(e,n,r,i){this.fromA=e,this.toA=n,this.fromB=r,this.toB=i}join(e){return new Ir(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,r=this;for(;n>0;n--){let i=e[n-1];if(!(i.fromA>r.toA)){if(i.toA<r.fromA)break;r=r.join(i),e.splice(n-1,1)}}return e.splice(n,0,r),e}static extendWithRanges(e,n){if(n.length==0)return e;let r=[];for(let i=0,o=0,s=0,a=0;;i++){let l=i==e.length?null:e[i],c=s-a,u=l?l.fromB:1e9;for(;o<n.length&&n[o]<u;){let f=n[o],d=n[o+1],h=Math.max(a,f),p=Math.min(u,d);if(h<=p&&new Ir(h+c,p+c,h,p).addToSet(r),d>u)break;o+=2}if(!l)return r;new Ir(l.fromA,l.toA,l.fromB,l.toB).addToSet(r),s=l.toA,a=l.toB}}}class Df{constructor(e,n,r){this.view=e,this.state=n,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=rn.empty(this.startState.doc.length);for(let o of r)this.changes=this.changes.compose(o.changes);let i=[];this.changes.iterChangedRanges((o,s,a,l)=>i.push(new Ir(o,s,a,l))),this.changedRanges=i}static create(e,n,r){return new Df(e,n,r)}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 hb extends Ct{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 tn],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new Ir(0,0,0,e.state.doc.length)],0,null)}update(e){var n;let r=e.changedRanges;this.minWidth>0&&r.length&&(r.every(({fromA:c,toA:u})=>u<this.minWidthFrom||c>this.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 i=-1;this.view.inputState.composing>=0&&(!((n=this.domChanged)===null||n===void 0)&&n.newSel?i=this.domChanged.newSel.head:!vN(e.changes,this.hasComposition)&&!e.selectionSet&&(i=e.state.selection.main.head));let o=i>-1?pN(this.view,e.changes,i):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:c,to:u}=this.hasComposition;r=new Ir(c,u,e.changes.mapPos(c,-1),e.changes.mapPos(u,1)).addToSet(r.slice())}this.hasComposition=o?{from:o.range.fromB,to:o.range.toB}:null,(Oe.ie||Oe.chrome)&&!o&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let s=this.decorations,a=this.updateDeco(),l=ON(s,a,e.changes);return r=Ir.extendWithRanges(r,l),!(this.flags&7)&&r.length==0?!1:(this.updateInner(r,e.startState.doc.length,o),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,n,r){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,n,r);let{observer:i}=this.view;i.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let s=Oe.chrome||Oe.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,s),this.flags&=-8,s&&(s.written||i.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<this.view.state.doc.length)for(let s of this.children)s instanceof uo&&s.widget instanceof pb&&o.push(s.dom);i.updateGaps(o)}updateChildren(e,n,r){let i=r?r.range.addToSet(e.slice()):e,o=this.childCursor(n);for(let s=i.length-1;;s--){let a=s>=0?i[s]:null;if(!a)break;let{fromA:l,toA:c,fromB:u,toB:f}=a,d,h,p,O;if(r&&r.range.fromB<f&&r.range.toB>u){let S=kl.build(this.view.state.doc,u,r.range.fromB,this.decorations,this.dynamicDecorationMap),b=kl.build(this.view.state.doc,r.range.toB,f,this.decorations,this.dynamicDecorationMap);h=S.breakAtStart,p=S.openStart,O=b.openEnd;let w=this.compositionView(r);b.breakAtStart?w.breakAfter=1:b.content.length&&w.merge(w.length,w.length,b.content[0],!1,b.openStart,0)&&(w.breakAfter=b.content[0].breakAfter,b.content.shift()),S.content.length&&w.merge(0,0,S.content[S.content.length-1],!0,0,S.openEnd)&&S.content.pop(),d=S.content.concat(w).concat(b.content)}else({content:d,breakAtStart:h,openStart:p,openEnd:O}=kl.build(this.view.state.doc,u,f,this.decorations,this.dynamicDecorationMap));let{i:m,off:x}=o.findPos(c,1),{i:v,off:y}=o.findPos(l,-1);l2(this,v,y,m,x,d,h,p,O)}r&&this.fixCompositionDOM(r)}compositionView(e){let n=new zr(e.text.nodeValue);n.flags|=8;for(let{deco:i}of e.marks)n=new Fi(i,[n],n.length);let r=new tn;return r.append(n,0),r}fixCompositionDOM(e){let n=(o,s)=>{s.flags|=8|(s.children.some(l=>l.flags&7)?1:0),this.markedForComposition.add(s);let a=Ct.get(o);a&&a!=s&&(a.dom=null),s.setDOM(o)},r=this.childPos(e.range.fromB,1),i=this.children[r.i];n(e.line,i);for(let o=e.marks.length-1;o>=-1;o--)r=i.childPos(r.off,1),i=i.children[r.i],n(o>=0?e.marks[o].node:e.text,i)}updateSelection(e=!1,n=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let r=this.view.root.activeElement,i=r==this.dom,o=!i&&Wu(this.dom,this.view.observer.selectionRange)&&!(r&&this.dom.contains(r));if(!(i||n||o))return;let s=this.forceSelection;this.forceSelection=!1;let a=this.view.state.selection.main,l=this.moveToLine(this.domAtPos(a.anchor)),c=a.empty?l:this.moveToLine(this.domAtPos(a.head));if(Oe.gecko&&a.empty&&!this.hasComposition&&hN(l)){let f=document.createTextNode("");this.view.observer.ignore(()=>l.node.insertBefore(f,l.node.childNodes[l.offset]||null)),l=c=new $n(f,0),s=!0}let u=this.view.observer.selectionRange;(s||!u.focusNode||(!Cl(l.node,l.offset,u.anchorNode,u.anchorOffset)||!Cl(c.node,c.offset,u.focusNode,u.focusOffset))&&!this.suppressWidgetCursorChange(u,a))&&(this.view.observer.ignore(()=>{Oe.android&&Oe.chrome&&this.dom.contains(u.focusNode)&&xN(u.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let f=jf(this.view.root);if(f)if(a.empty){if(Oe.gecko){let d=gN(l.node,l.offset);if(d&&d!=3){let h=(d==1?o2:s2)(l.node,l.offset);h&&(l=new $n(h.node,h.offset))}}f.collapse(l.node,l.offset),a.bidiLevel!=null&&f.caretBidiLevel!==void 0&&(f.caretBidiLevel=a.bidiLevel)}else if(f.extend){f.collapse(l.node,l.offset);try{f.extend(c.node,c.offset)}catch{}}else{let d=document.createRange();a.anchor>a.head&&([l,c]=[c,l]),d.setEnd(c.node,c.offset),d.setStart(l.node,l.offset),f.removeAllRanges(),f.addRange(d)}o&&this.view.root.activeElement==this.dom&&(this.dom.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(l,c)),this.impreciseAnchor=l.precise?null:new $n(u.anchorNode,u.anchorOffset),this.impreciseHead=c.precise?null:new $n(u.focusNode,u.focusOffset)}suppressWidgetCursorChange(e,n){return this.hasComposition&&n.empty&&Cl(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,r=jf(e.root),{anchorNode:i,anchorOffset:o}=e.observer.selectionRange;if(!r||!n.empty||!n.assoc||!r.modify)return;let s=tn.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),c=this.coordsAt(n.head,1);if(!l||!c||l.bottom>c.top)return;let u=this.domAtPos(n.head+n.assoc);r.collapse(u.node,u.offset),r.modify("move",n.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let f=e.observer.selectionRange;e.docView.posFromDOM(f.anchorNode,f.anchorOffset)!=n.from&&r.collapse(i,o)}moveToLine(e){let n=this.dom,r;if(e.node!=n)return e;for(let i=e.offset;!r&&i<n.childNodes.length;i++){let o=Ct.get(n.childNodes[i]);o instanceof tn&&(r=o.domAtPos(0))}for(let i=e.offset-1;!r&&i>=0;i--){let o=Ct.get(n.childNodes[i]);o instanceof tn&&(r=o.domAtPos(o.length))}return r?new $n(r.node,r.offset,!0):e}nearest(e){for(let n=e;n;){let r=Ct.get(n);if(r&&r.rootView==this)return r;n=n.parentNode}return null}posFromDOM(e,n){let r=this.nearest(e);if(!r)throw new RangeError("Trying to find position for a DOM position outside of the document");return r.localPosFromDOM(e,n)+r.posAtStart}domAtPos(e){let{i:n,off:r}=this.childCursor().findPos(e,-1);for(;n<this.children.length-1;){let i=this.children[n];if(r<i.length||i instanceof tn)break;n++,r=0}return this.children[n].domAtPos(r)}coordsAt(e,n){let r=null,i=0;for(let o=this.length,s=this.children.length-1;s>=0;s--){let a=this.children[s],l=o-a.breakAfter,c=l-a.length;if(l<e)break;c<=e&&(c<e||a.covers(-1))&&(l>e||a.covers(1))&&(!r||a instanceof tn&&!(r instanceof tn&&n>=0))&&(r=a,i=c),o=c}return r?r.coordsAt(e-i,n):null}coordsForChar(e){let{i:n,off:r}=this.childPos(e,1),i=this.children[n];if(!(i instanceof tn))return null;for(;i.children.length;){let{i:a,off:l}=i.childPos(r,1);for(;;a++){if(a==i.children.length)return null;if((i=i.children[a]).length)break}r=l}if(!(i instanceof zr))return null;let o=kn(i.text,r);if(o==r)return null;let s=es(i.dom,r,o).getClientRects();for(let a=0;a<s.length;a++){let l=s[a];if(a==s.length-1||l.top<l.bottom&&l.left<l.right)return l}return null}measureVisibleLineHeights(e){let n=[],{from:r,to:i}=e,o=this.view.contentDOM.clientWidth,s=o>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,l=this.view.textDirection==$t.LTR;for(let c=0,u=0;u<this.children.length;u++){let f=this.children[u],d=c+f.length;if(d>i)break;if(c>=r){let h=f.dom.getBoundingClientRect();if(n.push(h.height),s){let p=f.dom.lastChild,O=p?la(p):[];if(O.length){let m=O[O.length-1],x=l?m.right-h.left:h.right-m.left;x>a&&(a=x,this.minWidth=o,this.minWidthFrom=c,this.minWidthTo=d)}}}c=d+f.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 tn){let s=o.measureTextSize();if(s)return s}let e=document.createElement("div"),n,r,i;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=la(e.firstChild)[0];n=e.getBoundingClientRect().height,r=o?o.width/27:7,i=o?o.height:n,e.remove()}),{lineHeight:n,charWidth:r,textHeight:i}}childCursor(e=this.length){let n=this.children.length;return n&&(e-=this.children[--n].length),new a2(this.children,e,n)}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let r=0,i=0;;i++){let o=i==n.viewports.length?null:n.viewports[i],s=o?o.from-1:this.length;if(s>r){let a=(n.lineBlockAt(s).bottom-n.lineBlockAt(r).top)/this.view.scaleY;e.push(we.replace({widget:new pb(a),block:!0,inclusive:!0,isBlockGap:!0}).range(r,s))}if(!o)break;r=o.to+1}return we.set(e)}updateDeco(){let e=0,n=this.view.state.facet(Zl).map(o=>(this.dynamicDecorationMap[e++]=typeof o=="function")?o(this.view):o),r=!1,i=this.view.state.facet($2).map((o,s)=>{let a=typeof o=="function";return a&&(r=!0),a?o(this.view):o});for(i.length&&(this.dynamicDecorationMap[e++]=r,n.push(et.join(i))),this.decorations=[...n,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;return this.decorations}scrollIntoView(e){if(e.isSnapshot){let c=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=c.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let c of this.view.state.facet(I2))try{if(c(this.view,e.range,e))return!0}catch(u){Zn(this.view.state,u,"scroll handler")}let{range:n}=e,r=this.coordsAt(n.head,n.empty?n.assoc:n.head>n.anchor?-1:1),i;if(!r)return;!n.empty&&(i=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(r={left:Math.min(r.left,i.left),top:Math.min(r.top,i.top),right:Math.max(r.right,i.right),bottom:Math.max(r.bottom,i.bottom)});let o=D2(this.view),s={left:r.left-o.left,top:r.top-o.top,right:r.right+o.right,bottom:r.bottom+o.bottom},{offsetWidth:a,offsetHeight:l}=this.view.scrollDOM;G8(this.view.scrollDOM,s,n.head<n.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,a),-a),Math.max(Math.min(e.yMargin,l),-l),this.view.textDirection==$t.LTR)}}function hN(t){return t.node.nodeType==1&&t.node.firstChild&&(t.offset==0||t.node.childNodes[t.offset-1].contentEditable=="false")&&(t.offset==t.node.childNodes.length||t.node.childNodes[t.offset].contentEditable=="false")}class pb extends ki{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}function Q2(t,e){let n=t.observer.selectionRange;if(!n.focusNode)return null;let r=o2(n.focusNode,n.focusOffset),i=s2(n.focusNode,n.focusOffset),o=r||i;if(i&&r&&i.node!=r.node){let a=Ct.get(i.node);if(!a||a instanceof zr&&a.text!=i.node.nodeValue)o=i;else if(t.docView.lastCompositionAfterCursor){let l=Ct.get(r.node);!l||l instanceof zr&&l.text!=r.node.nodeValue||(o=i)}}if(t.docView.lastCompositionAfterCursor=o!=r,!o)return null;let s=e-o.offset;return{from:s,to:s+o.node.nodeValue.length,node:o.node}}function pN(t,e,n){let r=Q2(t,n);if(!r)return null;let{node:i,from:o,to:s}=r,a=i.nodeValue;if(/[\n\r]/.test(a)||t.state.doc.sliceString(r.from,r.to)!=a)return null;let l=e.invertedDesc,c=new Ir(l.mapPos(o),l.mapPos(s),o,s),u=[];for(let f=i.parentNode;;f=f.parentNode){let d=Ct.get(f);if(d instanceof Fi)u.push({node:f,deco:d.mark});else{if(d instanceof tn||f.nodeName=="DIV"&&f.parentNode==t.contentDOM)return{range:c,text:i,marks:u,line:f};if(f!=t.contentDOM)u.push({node:f,deco:new hc({inclusive:!0,attributes:tN(f),tagName:f.tagName.toLowerCase()})});else return null}}}function gN(t,e){return t.nodeType!=1?0:(e&&t.childNodes[e-1].contentEditable=="false"?1:0)|(e<t.childNodes.length&&t.childNodes[e].contentEditable=="false"?2:0)}let mN=class{constructor(){this.changes=[]}compareRange(e,n){_0(e,n,this.changes)}comparePoint(e,n){_0(e,n,this.changes)}};function ON(t,e,n){let r=new mN;return et.compare(t,e,n,r),r.changes}function xN(t,e){for(let n=t;n&&n!=e;n=n.assignedSlot||n.parentNode)if(n.nodeType==1&&n.contentEditable=="false")return!0;return!1}function vN(t,e){let n=!1;return e&&t.iterChangedRanges((r,i)=>{r<e.to&&i>e.from&&(n=!0)}),n}function yN(t,e,n=1){let r=t.charCategorizer(e),i=t.doc.lineAt(e),o=e-i.from;if(i.length==0)return ie.cursor(e);o==0?n=1:o==i.length&&(n=-1);let s=o,a=o;n<0?s=kn(i.text,o,!1):a=kn(i.text,o);let l=r(i.text.slice(s,a));for(;s>0;){let c=kn(i.text,s,!1);if(r(i.text.slice(c,s))!=l)break;s=c}for(;a<i.length;){let c=kn(i.text,a);if(r(i.text.slice(a,c))!=l)break;a=c}return ie.range(s+i.from,a+i.from)}function bN(t,e){return e.left>t?e.left-t:Math.max(0,t-e.right)}function SN(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function rp(t,e){return t.top<e.bottom-1&&t.bottom>e.top+1}function gb(t,e){return e<t.top?{top:e,left:t.left,right:t.right,bottom:t.bottom}:t}function mb(t,e){return e>t.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function W0(t,e,n){let r,i,o,s,a=!1,l,c,u,f;for(let p=t.firstChild;p;p=p.nextSibling){let O=la(p);for(let m=0;m<O.length;m++){let x=O[m];i&&rp(i,x)&&(x=gb(mb(x,i.bottom),i.top));let v=bN(e,x),y=SN(n,x);if(v==0&&y==0)return p.nodeType==3?Ob(p,e,n):W0(p,e,n);if(!r||s>y||s==y&&o>v){r=p,i=x,o=v,s=y;let S=y?n<x.top?-1:1:v?e<x.left?-1:1:0;a=!S||(S>0?m<O.length-1:m>0)}v==0?n>x.bottom&&(!u||u.bottom<x.bottom)?(l=p,u=x):n<x.top&&(!f||f.top>x.top)&&(c=p,f=x):u&&rp(u,x)?u=mb(u,x.bottom):f&&rp(f,x)&&(f=gb(f,x.top))}}if(u&&u.bottom>=n?(r=l,i=u):f&&f.top<=n&&(r=c,i=f),!r)return{node:t,offset:0};let d=Math.max(i.left,Math.min(i.right,e));if(r.nodeType==3)return Ob(r,d,n);if(a&&r.contentEditable!="false")return W0(r,d,n);let h=Array.prototype.indexOf.call(t.childNodes,r)+(e>=(i.left+i.right)/2?1:0);return{node:t,offset:h}}function Ob(t,e,n){let r=t.nodeValue.length,i=-1,o=1e9,s=0;for(let a=0;a<r;a++){let l=es(t,a,a+1).getClientRects();for(let c=0;c<l.length;c++){let u=l[c];if(u.top==u.bottom)continue;s||(s=e-u.left);let f=(u.top>n?u.top-n:n-u.bottom)-1;if(u.left-1<=e&&u.right+1>=e&&f<o){let d=e>=(u.left+u.right)/2,h=d;if((Oe.chrome||Oe.gecko)&&es(t,a).getBoundingClientRect().left==u.right&&(h=!d),f<=0)return{node:t,offset:a+(h?1:0)};i=a+(h?1:0),o=f}}}return{node:t,offset:i>-1?i:s>0?t.nodeValue.length:0}}function B2(t,e,n,r=-1){var i,o;let s=t.contentDOM.getBoundingClientRect(),a=s.top+t.viewState.paddingTop,l,{docHeight:c}=t.viewState,{x:u,y:f}=e,d=f-a;if(d<0)return 0;if(d>c)return t.state.doc.length;for(let S=t.viewState.heightOracle.textHeight/2,b=!1;l=t.elementAtHeight(d),l.type!=Wn.Text;)for(;d=r>0?l.bottom+S:l.top-S,!(d>=0&&d<=c);){if(b)return n?null:0;b=!0,r=-r}f=a+d;let h=l.from;if(h<t.viewport.from)return t.viewport.from==0?0:n?null:xb(t,s,l,u,f);if(h>t.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:n?null:xb(t,s,l,u,f);let p=t.dom.ownerDocument,O=t.root.elementFromPoint?t.root:p,m=O.elementFromPoint(u,f);m&&!t.contentDOM.contains(m)&&(m=null),m||(u=Math.max(s.left+1,Math.min(s.right-1,u)),m=O.elementFromPoint(u,f),m&&!t.contentDOM.contains(m)&&(m=null));let x,v=-1;if(m&&((i=t.docView.nearest(m))===null||i===void 0?void 0:i.isEditable)!=!1){if(p.caretPositionFromPoint){let S=p.caretPositionFromPoint(u,f);S&&({offsetNode:x,offset:v}=S)}else if(p.caretRangeFromPoint){let S=p.caretRangeFromPoint(u,f);S&&({startContainer:x,startOffset:v}=S,(!t.contentDOM.contains(x)||Oe.safari&&wN(x,v,u)||Oe.chrome&&CN(x,v,u))&&(x=void 0))}}if(!x||!t.docView.dom.contains(x)){let S=tn.find(t.docView,h);if(!S)return d>l.top+l.height/2?l.to:l.from;({node:x,offset:v}=W0(S.dom,u,f))}let y=t.docView.nearest(x);if(!y)return null;if(y.isWidget&&((o=y.dom)===null||o===void 0?void 0:o.nodeType)==1){let S=y.dom.getBoundingClientRect();return e.y<S.top||e.y<=S.bottom&&e.x<=(S.left+S.right)/2?y.posAtStart:y.posAtEnd}else return y.localPosFromDOM(x,v)+y.posAtStart}function xb(t,e,n,r,i){let o=Math.round((r-e.left)*t.defaultCharacterWidth);if(t.lineWrapping&&n.height>t.defaultLineHeight*1.5){let a=t.viewState.heightOracle.textHeight,l=Math.floor((i-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+E0(s,o,t.state.tabSize)}function wN(t,e,n){let r;if(t.nodeType!=3||e!=(r=t.nodeValue.length))return!1;for(let i=t.nextSibling;i;i=i.nextSibling)if(i.nodeType!=1||i.nodeName!="BR")return!1;return es(t,r-1,r).getBoundingClientRect().left>n}function CN(t,e,n){if(e!=0)return!1;for(let i=t;;){let o=i.parentNode;if(!o||o.nodeType!=1||o.firstChild!=i)return!1;if(o.classList.contains("cm-line"))break;i=o}let r=t.nodeType==1?t.getBoundingClientRect():es(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect();return n-r.left>5}function V0(t,e){let n=t.lineBlockAt(e);if(Array.isArray(n.type)){for(let r of n.type)if(r.to>e||r.to==e&&(r.to==n.to||r.type==Wn.Text))return r}return n}function kN(t,e,n,r){let i=V0(t,e.head),o=!r||i.type!=Wn.Text||!(t.lineWrapping||i.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head);if(o){let s=t.dom.getBoundingClientRect(),a=t.textDirectionAt(i.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 ie.cursor(l,n?-1:1)}return ie.cursor(n?i.to:i.from,n?-1:1)}function vb(t,e,n,r){let i=t.state.doc.lineAt(e.head),o=t.bidiSpans(i),s=t.textDirectionAt(i.from);for(let a=e,l=null;;){let c=uN(i,o,s,a,n),u=y2;if(!c){if(i.number==(n?t.state.doc.lines:1))return a;u=`
667
- `,i=t.state.doc.line(i.number+(n?1:-1)),o=t.bidiSpans(i),c=t.visualLineSide(i,!n)}if(l){if(!l(u))return a}else{if(!r)return c;l=r(u)}a=c}}function AN(t,e,n){let r=t.state.charCategorizer(e),i=r(n);return o=>{let s=r(o);return i==Rt.Space&&(i=s),i==s}}function PN(t,e,n,r){let i=e.head,o=n?1:-1;if(i==(n?t.state.doc.length:0))return ie.cursor(i,e.assoc);let s=e.goalColumn,a,l=t.contentDOM.getBoundingClientRect(),c=t.coordsAtPos(i,e.assoc||-1),u=t.documentTop;if(c)s==null&&(s=c.left-l.left),a=o<0?c.top:c.bottom;else{let h=t.viewState.lineBlockAt(i);s==null&&(s=Math.min(l.right-l.left,t.defaultCharacterWidth*(i-h.from))),a=(o<0?h.top:h.bottom)+u}let f=l.left+s,d=r??t.viewState.heightOracle.textHeight>>1;for(let h=0;;h+=10){let p=a+(d+h)*o,O=B2(t,{x:f,y:p},!1,o);if(p<l.top||p>l.bottom||(o<0?O<i:O>i)){let m=t.docView.coordsForChar(O),x=!m||p<m.top?-1:1;return ie.cursor(O,x,void 0,s)}}}function Vu(t,e,n){for(;;){let r=0;for(let i of t)i.between(e-1,e+1,(o,s,a)=>{if(e>o&&e<s){let l=r||n||(e-o<s-e?-1:1);e=l<0?o:s,r=l}});if(!r)return e}}function ip(t,e,n){let r=Vu(t.state.facet(XO).map(i=>i(t)),n.from,e.head>n.from?-1:1);return r==n.from?n:ie.cursor(r,r<n.from?1:-1)}class EN{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastEscPress=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,Oe.safari&&e.contentDOM.addEventListener("input",()=>null),Oe.gecko&&zN(e.contentDOM.ownerDocument)}handleEvent(e){!BN(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||this.runHandlers(e.type,e)}runHandlers(e,n){let r=this.handlers[e];if(r){for(let i of r.observers)i(this.view,n);for(let i of r.handlers){if(n.defaultPrevented)break;if(i(this.view,n)){n.preventDefault();break}}}}ensureHandlers(e){let n=IN(e),r=this.handlers,i=this.view.contentDOM;for(let o in n)if(o!="scroll"){let s=!n[o].handlers.length,a=r[o];a&&s!=!a.handlers.length&&(i.removeEventListener(o,this.handleEvent),a=null),a||i.addEventListener(o,this.handleEvent,{passive:s})}for(let o in r)o!="scroll"&&!n[o]&&i.removeEventListener(o,this.handleEvent);this.handlers=n}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&Date.now()<this.lastEscPress+2e3)return!0;if(e.keyCode!=27&&M2.indexOf(e.keyCode)<0&&(this.view.inputState.lastEscPress=0),Oe.android&&Oe.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let n;return Oe.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((n=_2.find(r=>r.keyCode==e.keyCode))&&!e.ctrlKey||TN.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.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,Gs(this.view.contentDOM,n.key,n.keyCode,n instanceof KeyboardEvent?n:void 0))}ignoreDuringComposition(e){return/^key/.test(e.type)?this.composing>0?!0:Oe.safari&&!Oe.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 yb(t,e){return(n,r)=>{try{return e.call(t,r,n)}catch(i){Zn(n.state,i)}}}function IN(t){let e=Object.create(null);function n(r){return e[r]||(e[r]={observers:[],handlers:[]})}for(let r of t){let i=r.spec;if(i&&i.domEventHandlers)for(let o in i.domEventHandlers){let s=i.domEventHandlers[o];s&&n(o).handlers.push(yb(r.value,s))}if(i&&i.domEventObservers)for(let o in i.domEventObservers){let s=i.domEventObservers[o];s&&n(o).observers.push(yb(r.value,s))}}for(let r in Lr)n(r).handlers.push(Lr[r]);for(let r in jr)n(r).observers.push(jr[r]);return e}const _2=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],TN="dthko",M2=[16,17,18,20,91,92,224,225],su=6;function au(t){return Math.max(0,t)*.7+8}function $N(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}class jN{constructor(e,n,r,i){this.view=e,this.startEvent=n,this.style=r,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParent=Y8(e.contentDOM),this.atoms=e.state.facet(XO).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(Ue.allowMultipleSelections)&&RN(e,n),this.dragging=QN(e,n)&&W2(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&&$N(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let r=0,i=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=D2(this.view);e.clientX-s.left<=o.left+su?r=-au(o.left-e.clientX):e.clientX+s.right>=o.right-su&&(r=au(e.clientX-o.right)),e.clientY-s.top<=o.top+su?i=-au(o.top-e.clientY):e.clientY+s.bottom>=o.bottom-su&&(i=au(e.clientY-o.bottom)),this.setScrollSpeed(r,i)}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 r=0;r<e.ranges.length;r++){let i=e.ranges[r],o=null;if(i.empty){let s=Vu(this.atoms,i.from,0);s!=i.from&&(o=ie.cursor(s,-1))}else{let s=Vu(this.atoms,i.from,-1),a=Vu(this.atoms,i.to,1);(s!=i.from||a!=i.to)&&(o=ie.range(i.from==i.anchor?s:a,i.from==i.head?s:a))}o&&(n||(n=e.ranges.slice()),n[r]=o)}return n?ie.create(n,e.mainIndex):e}select(e){let{view:n}=this,r=this.skipAtoms(this.style.get(e,this.extend,this.multiple));(this.mustSelect||!r.eq(n.state.selection,this.dragging===!1))&&this.view.dispatch({selection:r,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function RN(t,e){let n=t.state.facet(b2);return n.length?n[0](e):Oe.mac?e.metaKey:e.ctrlKey}function DN(t,e){let n=t.state.facet(S2);return n.length?n[0](e):Oe.mac?!e.altKey:!e.ctrlKey}function QN(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let r=jf(t.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let o=0;o<i.length;o++){let s=i[o];if(s.left<=e.clientX&&s.right>=e.clientX&&s.top<=e.clientY&&s.bottom>=e.clientY)return!0}return!1}function BN(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,r;n!=t.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(r=Ct.get(n))&&r.ignoreEvent(e))return!1;return!0}const Lr=Object.create(null),jr=Object.create(null),N2=Oe.ie&&Oe.ie_version<15||Oe.ios&&Oe.webkit_version<604;function _N(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(),F2(t,n.value)},50)}function F2(t,e){let{state:n}=t,r,i=1,o=n.toText(e),s=o.lines==n.selection.ranges.length;if(z0!=null&&n.selection.ranges.every(l=>l.empty)&&z0==o.toString()){let l=-1;r=n.changeByRange(c=>{let u=n.doc.lineAt(c.from);if(u.from==l)return{range:c};l=u.from;let f=n.toText((s?o.line(i++).text:e)+n.lineBreak);return{changes:{from:u.from,insert:f},range:ie.cursor(c.from+f.length)}})}else s?r=n.changeByRange(l=>{let c=o.line(i++);return{changes:{from:l.from,to:l.to,insert:c.text},range:ie.cursor(l.from+c.length)}}):r=n.replaceSelection(o);t.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}jr.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft};Lr.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),e.keyCode==27&&(t.inputState.lastEscPress=Date.now()),!1);jr.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")};jr.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};Lr.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of t.state.facet(w2))if(n=r(t,e),n)break;if(!n&&e.button==0&&(n=FN(t,e)),n){let r=!t.hasFocus;t.inputState.startMouseSelection(new jN(t,e,n,r)),r&&t.observer.ignore(()=>n2(t.contentDOM));let i=t.inputState.mouseSelection;if(i)return i.start(e),i.dragging===!1}return!1};function bb(t,e,n,r){if(r==1)return ie.cursor(e,n);if(r==2)return yN(t.state,e,n);{let i=tn.find(t.docView,e),o=t.state.doc.lineAt(i?i.posAtEnd:e),s=i?i.posAtStart:o.from,a=i?i.posAtEnd:o.to;return a<t.state.doc.length&&a==o.to&&a++,ie.range(s,a)}}let Z2=(t,e)=>t>=e.top&&t<=e.bottom,Sb=(t,e,n)=>Z2(e,n)&&t>=n.left&&t<=n.right;function MN(t,e,n,r){let i=tn.find(t.docView,e);if(!i)return 1;let o=e-i.posAtStart;if(o==0)return 1;if(o==i.length)return-1;let s=i.coordsAt(o,-1);if(s&&Sb(n,r,s))return-1;let a=i.coordsAt(o,1);return a&&Sb(n,r,a)?1:s&&Z2(r,s)?-1:1}function wb(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:n,bias:MN(t,n,e.clientX,e.clientY)}}const NN=Oe.ie&&Oe.ie_version<=11;let Cb=null,kb=0,Ab=0;function W2(t){if(!NN)return t.detail;let e=Cb,n=Ab;return Cb=t,Ab=Date.now(),kb=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(kb+1)%3:1}function FN(t,e){let n=wb(t,e),r=W2(e),i=t.state.selection;return{update(o){o.docChanged&&(n.pos=o.changes.mapPos(n.pos),i=i.map(o.changes))},get(o,s,a){let l=wb(t,o),c,u=bb(t,l.pos,l.bias,r);if(n.pos!=l.pos&&!s){let f=bb(t,n.pos,n.bias,r),d=Math.min(f.from,u.from),h=Math.max(f.to,u.to);u=d<u.from?ie.range(d,h):ie.range(h,d)}return s?i.replaceRange(i.main.extend(u.from,u.to)):a&&r==1&&i.ranges.length>1&&(c=ZN(i,l.pos))?c:a?i.addRange(u):ie.create([u])}}}function ZN(t,e){for(let n=0;n<t.ranges.length;n++){let{from:r,to:i}=t.ranges[n];if(r<=e&&i>=e)return ie.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}Lr.dragstart=(t,e)=>{let{selection:{main:n}}=t.state;if(e.target.draggable){let i=t.docView.nearest(e.target);if(i&&i.isWidget){let o=i.posAtStart,s=o+i.length;(o>=n.to||s<=n.from)&&(n=ie.range(o,s))}}let{inputState:r}=t;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,e.dataTransfer&&(e.dataTransfer.setData("Text",t.state.sliceDoc(n.from,n.to)),e.dataTransfer.effectAllowed="copyMove"),!1};Lr.dragend=t=>(t.inputState.draggedContent=null,!1);function Pb(t,e,n,r){if(!n)return;let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:o}=t.inputState,s=r&&o&&DN(t,e)?{from:o.from,to:o.to}:null,a={from:i,insert:n},l=t.state.changes(s?[s,a]:a);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(i,-1),head:l.mapPos(i,1)},userEvent:s?"move.drop":"input.drop"}),t.inputState.draggedContent=null}Lr.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let n=e.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,o=()=>{++i==n.length&&Pb(t,e,r.filter(s=>s!=null).join(t.state.lineBreak),!1)};for(let s=0;s<n.length;s++){let a=new FileReader;a.onerror=o,a.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(a.result)||(r[s]=a.result),o()},a.readAsText(n[s])}return!0}else{let r=e.dataTransfer.getData("Text");if(r)return Pb(t,e,r,!0),!0}return!1};Lr.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let n=N2?null:e.clipboardData;return n?(F2(t,n.getData("text/plain")||n.getData("text/uri-list")),!0):(_N(t),!1)};function WN(t,e){let n=t.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout(()=>{r.remove(),t.focus()},50)}function VN(t){let e=[],n=[],r=!1;for(let i of t.selection.ranges)i.empty||(e.push(t.sliceDoc(i.from,i.to)),n.push(i));if(!e.length){let i=-1;for(let{from:o}of t.selection.ranges){let s=t.doc.lineAt(o);s.number>i&&(e.push(s.text),n.push({from:s.from,to:Math.min(t.doc.length,s.to+1)})),i=s.number}r=!0}return{text:e.join(t.lineBreak),ranges:n,linewise:r}}let z0=null;Lr.copy=Lr.cut=(t,e)=>{let{text:n,ranges:r,linewise:i}=VN(t.state);if(!n&&!i)return!1;z0=i?n:null,e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let o=N2?null:e.clipboardData;return o?(o.clearData(),o.setData("text/plain",n),!0):(WN(t,n),!1)};const V2=wi.define();function z2(t,e){let n=[];for(let r of t.facet(A2)){let i=r(t,e);i&&n.push(i)}return n?t.update({effects:n,annotations:V2.of(!0)}):null}function L2(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=z2(t.state,e);n?t.dispatch(n):t.update([])}},10)}jr.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),L2(t)};jr.blur=t=>{t.observer.clearSelectionRange(),L2(t)};jr.compositionstart=jr.compositionupdate=t=>{t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0)};jr.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,Oe.chrome&&Oe.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50)};jr.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};Lr.beforeinput=(t,e)=>{var n;let r;if(Oe.chrome&&Oe.android&&(r=_2.find(i=>i.inputType==e.inputType))&&(t.observer.delayAndroidKey(r.key,r.keyCode),r.key=="Backspace"||r.key=="Delete")){let i=((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)>i+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return Oe.ios&&e.inputType=="deleteContentForward"&&t.observer.flushSoon(),Oe.safari&&e.inputType=="insertText"&&t.inputState.composing>=0&&setTimeout(()=>jr.compositionend(t,e),20),!1};const Eb=new Set;function zN(t){Eb.has(t)||(Eb.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}const Ib=["pre-wrap","normal","pre-line","break-spaces"];class LN{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 r=this.doc.lineAt(n).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(r+=Math.max(0,Math.ceil((n-e-r*this.lineLength*.5)/this.lineLength))),this.lineHeight*r}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 Ib.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let n=!1;for(let r=0;r<e.length;r++){let i=e[r];i<0?r++:this.heightSamples[Math.floor(i*10)]||(n=!0,this.heightSamples[Math.floor(i*10)]=!0)}return n}refresh(e,n,r,i,o,s){let a=Ib.indexOf(e)>-1,l=Math.round(n)!=Math.round(this.lineHeight)||this.lineWrapping!=a;if(this.lineWrapping=a,this.lineHeight=n,this.charWidth=r,this.textHeight=i,this.lineLength=o,l){this.heightSamples={};for(let c=0;c<s.length;c++){let u=s[c];u<0?c++:this.heightSamples[Math.floor(u*10)]=!0}}return l}}class XN{constructor(e,n){this.from=e,this.heights=n,this.index=0}get more(){return this.index<this.heights.length}}class ai{constructor(e,n,r,i,o){this.from=e,this.length=n,this.top=r,this.height=i,this._content=o}get type(){return typeof this._content=="number"?Wn.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof vo?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let n=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new ai(this.from,this.length+e.length,this.top,this.height+e.height,n)}}var Tt=function(t){return t[t.ByPos=0]="ByPos",t[t.ByHeight=1]="ByHeight",t[t.ByPosNoHeight=2]="ByPosNoHeight",t}(Tt||(Tt={}));const zu=.001;class Vn{constructor(e,n,r=2){this.length=e,this.height=n,this.flags=r}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e,n){this.height!=n&&(Math.abs(this.height-n)>zu&&(e.heightChanged=!0),this.height=n)}replace(e,n,r){return Vn.of(r)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,r,i){let o=this,s=r.doc;for(let a=i.length-1;a>=0;a--){let{fromA:l,toA:c,fromB:u,toB:f}=i[a],d=o.lineAt(l,Tt.ByPosNoHeight,r.setDoc(n),0,0),h=d.to>=c?d:o.lineAt(c,Tt.ByPosNoHeight,r,0,0);for(f+=h.to-c,c=h.to;a>0&&d.from<=i[a-1].toA;)l=i[a-1].fromA,u=i[a-1].fromB,a--,l<d.from&&(d=o.lineAt(l,Tt.ByPosNoHeight,r,0,0));u+=d.from-l,l=d.from;let p=GO.build(r.setDoc(s),e,u,f);o=o.replace(l,c,p)}return o.updateHeight(r,0)}static empty(){return new fr(0,0)}static of(e){if(e.length==1)return e[0];let n=0,r=e.length,i=0,o=0;for(;;)if(n==r)if(i>o*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),r+=1+a.break,i-=a.size}else if(o>i*2){let a=e[r];a.break?e.splice(r,1,a.left,null,a.right):e.splice(r,1,a.left,a.right),r+=2+a.break,o-=a.size}else break;else if(i<o){let a=e[n++];a&&(i+=a.size)}else{let a=e[--r];a&&(o+=a.size)}let s=0;return e[n-1]==null?(s=1,n--):e[n]==null&&(s=1,r++),new GN(Vn.of(e.slice(0,n)),s,Vn.of(e.slice(r)))}}Vn.prototype.size=1;class X2 extends Vn{constructor(e,n,r){super(e,n),this.deco=r}blockAt(e,n,r,i){return new ai(i,this.length,r,this.height,this.deco||0)}lineAt(e,n,r,i,o){return this.blockAt(0,r,i,o)}forEachLine(e,n,r,i,o,s){e<=o+this.length&&n>=o&&s(this.blockAt(0,r,i,o))}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more&&this.setHeight(e,i.heights[i.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class fr extends X2{constructor(e,n){super(e,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,n,r,i){return new ai(i,this.length,r,this.height,this.breaks)}replace(e,n,r){let i=r[0];return r.length==1&&(i instanceof fr||i instanceof mn&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof mn?i=new fr(i.length,this.height):i.height=this.height,this.outdated||(i.outdated=!1),i):Vn.of(r)}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more?this.setHeight(e,i.heights[i.index++]):(r||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 mn extends Vn{constructor(e){super(e,0)}heightMetrics(e,n){let r=e.doc.lineAt(n).number,i=e.doc.lineAt(n+this.length).number,o=i-r+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:r,lastLine:i,perLine:s,perChar:a}}blockAt(e,n,r,i){let{firstLine:o,lastLine:s,perLine:a,perChar:l}=this.heightMetrics(n,i);if(n.lineWrapping){let c=i+(e<n.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-r)/this.height))*this.length)),u=n.doc.lineAt(c),f=a+u.length*l,d=Math.max(r,e-f/2);return new ai(u.from,u.length,d,f,0)}else{let c=Math.max(0,Math.min(s-o,Math.floor((e-r)/a))),{from:u,length:f}=n.doc.line(o+c);return new ai(u,f,r+a*c,a,0)}}lineAt(e,n,r,i,o){if(n==Tt.ByHeight)return this.blockAt(e,r,i,o);if(n==Tt.ByPosNoHeight){let{from:h,to:p}=r.doc.lineAt(e);return new ai(h,p-h,0,0,0)}let{firstLine:s,perLine:a,perChar:l}=this.heightMetrics(r,o),c=r.doc.lineAt(e),u=a+c.length*l,f=c.number-s,d=i+a*f+l*(c.from-o-f);return new ai(c.from,c.length,Math.max(i,Math.min(d,i+this.height-u)),u,0)}forEachLine(e,n,r,i,o,s){e=Math.max(e,o),n=Math.min(n,o+this.length);let{firstLine:a,perLine:l,perChar:c}=this.heightMetrics(r,o);for(let u=e,f=i;u<=n;){let d=r.doc.lineAt(u);if(u==e){let p=d.number-a;f+=l*p+c*(e-o-p)}let h=l+c*d.length;s(new ai(d.from,d.length,f,h,0)),f+=h,u=d.to+1}}replace(e,n,r){let i=this.length-n;if(i>0){let o=r[r.length-1];o instanceof mn?r[r.length-1]=new mn(o.length+i):r.push(null,new mn(i-1))}if(e>0){let o=r[0];o instanceof mn?r[0]=new mn(e+o.length):r.unshift(new mn(e-1),null)}return Vn.of(r)}decomposeLeft(e,n){n.push(new mn(e-1),null)}decomposeRight(e,n){n.push(null,new mn(this.length-e-1))}updateHeight(e,n=0,r=!1,i){let o=n+this.length;if(i&&i.from<=n+this.length&&i.more){let s=[],a=Math.max(n,i.from),l=-1;for(i.from>n&&s.push(new mn(i.from-n-1).updateHeight(e,n));a<=o&&i.more;){let u=e.doc.lineAt(a).length;s.length&&s.push(null);let f=i.heights[i.index++];l==-1?l=f:Math.abs(f-l)>=zu&&(l=-2);let d=new fr(u,f);d.outdated=!1,s.push(d),a+=u+1}a<=o&&s.push(null,new mn(o-a).updateHeight(e,a));let c=Vn.of(s);return(l<0||Math.abs(c.height-this.height)>=zu||Math.abs(l-this.heightMetrics(e,n).perLine)>=zu)&&(e.heightChanged=!0),c}else(r||this.outdated)&&(this.setHeight(e,e.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class GN extends Vn{constructor(e,n,r){super(e.length+n+r.length,e.height+r.height,n|(e.outdated||r.outdated?2:0)),this.left=e,this.right=r,this.size=e.size+r.size}get break(){return this.flags&1}blockAt(e,n,r,i){let o=r+this.left.height;return e<o?this.left.blockAt(e,n,r,i):this.right.blockAt(e,n,o,i+this.left.length+this.break)}lineAt(e,n,r,i,o){let s=i+this.left.height,a=o+this.left.length+this.break,l=n==Tt.ByHeight?e<s:e<a,c=l?this.left.lineAt(e,n,r,i,o):this.right.lineAt(e,n,r,s,a);if(this.break||(l?c.to<a:c.from>a))return c;let u=n==Tt.ByPosNoHeight?Tt.ByPosNoHeight:Tt.ByPos;return l?c.join(this.right.lineAt(a,u,r,s,a)):this.left.lineAt(a,u,r,i,o).join(c)}forEachLine(e,n,r,i,o,s){let a=i+this.left.height,l=o+this.left.length+this.break;if(this.break)e<l&&this.left.forEachLine(e,n,r,i,o,s),n>=l&&this.right.forEachLine(e,n,r,a,l,s);else{let c=this.lineAt(l,Tt.ByPos,r,i,o);e<c.from&&this.left.forEachLine(e,c.from-1,r,i,o,s),c.to>=e&&c.from<=n&&s(c),n>c.to&&this.right.forEachLine(c.to+1,n,r,a,l,s)}}replace(e,n,r){let i=this.left.length+this.break;if(n<i)return this.balanced(this.left.replace(e,n,r),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-i,n-i,r));let o=[];e>0&&this.decomposeLeft(e,o);let s=o.length;for(let a of r)o.push(a);if(e>0&&Tb(o,s-1),n<this.length){let a=o.length;this.decomposeRight(n,o),Tb(o,a)}return Vn.of(o)}decomposeLeft(e,n){let r=this.left.length;if(e<=r)return this.left.decomposeLeft(e,n);n.push(this.left),this.break&&(r++,e>=r&&n.push(null)),e>r&&this.right.decomposeLeft(e-r,n)}decomposeRight(e,n){let r=this.left.length,i=r+this.break;if(e>=i)return this.right.decomposeRight(e-i,n);e<r&&this.left.decomposeRight(e,n),this.break&&e<i&&n.push(null),n.push(this.right)}balanced(e,n){return e.size>2*n.size||n.size>2*e.size?Vn.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,r=!1,i){let{left:o,right:s}=this,a=n+o.length+this.break,l=null;return i&&i.from<=n+o.length&&i.more?l=o=o.updateHeight(e,n,r,i):o.updateHeight(e,n,r),i&&i.from<=a+s.length&&i.more?l=s=s.updateHeight(e,a,r,i):s.updateHeight(e,a,r),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 Tb(t,e){let n,r;t[e]==null&&(n=t[e-1])instanceof mn&&(r=t[e+1])instanceof mn&&t.splice(e-1,3,new mn(n.length+1+r.length))}const YN=5;class GO{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 r=Math.min(n,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof fr?i.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new fr(r-this.pos,-1)),this.writtenTo=r,n>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(e,n,r){if(e<n||r.heightRelevant){let i=r.widget?r.widget.estimatedHeight:0,o=r.widget?r.widget.lineBreaks:0;i<0&&(i=this.oracle.lineHeight);let s=n-e;r.block?this.addBlock(new X2(s,i,r)):(s||o||i>=YN)&&this.addLineDeco(i,o,s)}else n>e&&this.span(e,n);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=n,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new fr(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,n){let r=new mn(n-e);return this.oracle.doc.lineAt(e).to==n&&(r.flags|=4),r}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof fr)return e;let n=new fr(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,r){let i=this.ensureLine();i.length+=r,i.collapsed+=r,i.widgetHeight=Math.max(i.widgetHeight,e),i.breaks+=n,this.writtenTo=this.pos=this.pos+r}finish(e){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof fr)&&!this.isCovered?this.nodes.push(new fr(0,-1)):(this.writtenTo<this.pos||n==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let r=e;for(let i of this.nodes)i instanceof fr&&i.updateHeight(this.oracle,r),r+=i?i.length:1;return this.nodes}static build(e,n,r,i){let o=new GO(r,e);return et.spans(n,r,i,o,0),o.finish(r)}}function qN(t,e,n){let r=new UN;return et.compare(t,e,n,r,0),r.changes}class UN{constructor(){this.changes=[]}compareRange(){}comparePoint(e,n,r,i){(e<n||r&&r.heightRelevant||i&&i.heightRelevant)&&_0(e,n,this.changes,5)}}function HN(t,e){let n=t.getBoundingClientRect(),r=t.ownerDocument,i=r.defaultView||window,o=Math.max(0,n.left),s=Math.min(i.innerWidth,n.right),a=Math.max(0,n.top),l=Math.min(i.innerHeight,n.bottom);for(let c=t.parentNode;c&&c!=r.body;)if(c.nodeType==1){let u=c,f=window.getComputedStyle(u);if((u.scrollHeight>u.clientHeight||u.scrollWidth>u.clientWidth)&&f.overflow!="visible"){let d=u.getBoundingClientRect();o=Math.max(o,d.left),s=Math.min(s,d.right),a=Math.max(a,d.top),l=c==t.parentNode?d.bottom:Math.min(l,d.bottom)}c=f.position=="absolute"||f.position=="fixed"?u.offsetParent:u.parentNode}else if(c.nodeType==11)c=c.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 JN(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class op{constructor(e,n,r){this.from=e,this.to=n,this.size=r}static same(e,n){if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],o=n[r];if(i.from!=o.from||i.to!=o.to||i.size!=o.size)return!1}return!0}draw(e,n){return we.replace({widget:new KN(this.size*(n?e.scaleY:e.scaleX),n)}).range(this.from,this.to)}}class KN extends ki{constructor(e,n){super(),this.size=e,this.vertical=n}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class $b{constructor(e){this.state=e,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!1,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=jb,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=$t.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let n=e.facet(LO).some(r=>typeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new LN(n),this.stateDeco=e.facet(Zl).filter(r=>typeof r!="function"),this.heightMap=Vn.empty().applyChanges(this.stateDeco,st.empty,this.heightOracle.setDoc(e.doc),[new Ir(0,0,0,e.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=we.set(this.lineGaps.map(r=>r.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:n}=this.state.selection;for(let r=0;r<=1;r++){let i=r?n.head:n.anchor;if(!e.some(({from:o,to:s})=>i>=o&&i<=s)){let{from:o,to:s}=this.lineBlockAt(i);e.push(new lu(o,s))}}this.viewports=e.sort((r,i)=>r.from-i.from),this.scaler=this.heightMap.height<=7e6?jb:new nF(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:fl(e,this.scaler))})}update(e,n=null){this.state=e.state;let r=this.stateDeco;this.stateDeco=this.state.facet(Zl).filter(u=>typeof u!="function");let i=e.changedRanges,o=Ir.extendWithRanges(i,qN(r,this.stateDeco,e?e.changes:rn.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.head<l.from||n.range.head>l.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,n));let c=!e.changes.empty||e.flags&2||l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l,this.updateForViewport(),c&&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(E2)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let n=e.contentDOM,r=window.getComputedStyle(n),i=this.heightOracle,o=r.whiteSpace;this.defaultTextDirection=r.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 c=0,u=0;if(a.width&&a.height){let{scaleX:S,scaleY:b}=t2(n,a);(S>.005&&Math.abs(this.scaleX-S)>.005||b>.005&&Math.abs(this.scaleY-b)>.005)&&(this.scaleX=S,this.scaleY=b,c|=8,s=l=!0)}let f=(parseInt(r.paddingTop)||0)*this.scaleY,d=(parseInt(r.paddingBottom)||0)*this.scaleY;(this.paddingTop!=f||this.paddingBottom!=d)&&(this.paddingTop=f,this.paddingBottom=d,c|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(i.lineWrapping&&(l=!0),this.editorWidth=e.scrollDOM.clientWidth,c|=8);let h=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=h&&(this.scrollAnchorHeight=-1,this.scrollTop=h),this.scrolledToBottom=i2(e.scrollDOM);let p=(this.printing?JN:HN)(n,this.paddingTop),O=p.top-this.pixelViewport.top,m=p.bottom-this.pixelViewport.bottom;this.pixelViewport=p;let x=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(x!=this.inView&&(this.inView=x,x&&(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,c|=8),l){let S=e.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(S)&&(s=!0),s||i.lineWrapping&&Math.abs(v-this.contentDOMWidth)>i.charWidth){let{lineHeight:b,charWidth:w,textHeight:C}=e.docView.measureTextSize();s=b>0&&i.refresh(o,b,w,C,v/w,S),s&&(e.docView.minWidth=0,c|=8)}O>0&&m>0?u=Math.max(O,m):O<0&&m<0&&(u=Math.min(O,m)),i.heightChanged=!1;for(let b of this.viewports){let w=b.from==this.viewport.from?S:e.docView.measureVisibleLineHeights(b);this.heightMap=(s?Vn.empty().applyChanges(this.stateDeco,st.empty,this.heightOracle,[new Ir(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(i,0,s,new XN(b.from,w))}i.heightChanged&&(c|=2)}let y=!this.viewportIsAppropriate(this.viewport,u)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return y&&(this.viewport=this.getViewport(u,this.scrollTarget)),this.updateForViewport(),(c&2||y)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(s?[]:this.lineGaps,e)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),c}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,n){let r=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),i=this.heightMap,o=this.heightOracle,{visibleTop:s,visibleBottom:a}=this,l=new lu(i.lineAt(s-r*1e3,Tt.ByHeight,o,0,0).from,i.lineAt(a+(1-r)*1e3,Tt.ByHeight,o,0,0).to);if(n){let{head:c}=n.range;if(c<l.from||c>l.to){let u=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),f=i.lineAt(c,Tt.ByPos,o,0,0),d;n.y=="center"?d=(f.top+f.bottom)/2-u/2:n.y=="start"||n.y=="nearest"&&c<l.from?d=f.top:d=f.bottom-u,l=new lu(i.lineAt(d-1e3/2,Tt.ByHeight,o,0,0).from,i.lineAt(d+u+1e3/2,Tt.ByHeight,o,0,0).to)}}return l}mapViewport(e,n){let r=n.mapPos(e.from,-1),i=n.mapPos(e.to,1);return new lu(this.heightMap.lineAt(r,Tt.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(i,Tt.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:n},r=0){if(!this.inView)return!0;let{top:i}=this.heightMap.lineAt(e,Tt.ByPos,this.heightOracle,0,0),{bottom:o}=this.heightMap.lineAt(n,Tt.ByPos,this.heightOracle,0,0),{visibleTop:s,visibleBottom:a}=this;return(e==0||i<=s-Math.max(10,Math.min(-r,250)))&&(n==this.state.doc.length||o>=a+Math.max(10,Math.min(r,250)))&&i>s-2*1e3&&o<a+2*1e3}mapLineGaps(e,n){if(!e.length||n.empty)return e;let r=[];for(let i of e)n.touchesRange(i.from,i.to)||r.push(new op(n.mapPos(i.from),n.mapPos(i.to),i.size));return r}ensureLineGaps(e,n){let r=this.heightOracle.lineWrapping,i=r?1e4:2e3,o=i>>1,s=i<<1;if(this.defaultTextDirection!=$t.LTR&&!r)return[];let a=[],l=(c,u,f,d)=>{if(u-c<o)return;let h=this.state.selection.main,p=[h.from];h.empty||p.push(h.to);for(let m of p)if(m>c&&m<u){l(c,m-10,f,d),l(m+10,u,f,d);return}let O=tF(e,m=>m.from>=f.from&&m.to<=f.to&&Math.abs(m.from-c)<o&&Math.abs(m.to-u)<o&&!p.some(x=>m.from<x&&m.to>x));if(!O){if(u<f.to&&n&&r&&n.visibleRanges.some(m=>m.from<=u&&m.to>=u)){let m=n.moveToLineBoundary(ie.cursor(u),!1,!0).head;m>c&&(u=m)}O=new op(c,u,this.gapSize(f,c,u,d))}a.push(O)};for(let c of this.viewportLines){if(c.length<s)continue;let u=eF(c.from,c.to,this.stateDeco);if(u.total<s)continue;let f=this.scrollTarget?this.scrollTarget.range.head:null,d,h;if(r){let p=i/this.heightOracle.lineLength*this.heightOracle.lineHeight,O,m;if(f!=null){let x=uu(u,f),v=((this.visibleBottom-this.visibleTop)/2+p)/c.height;O=x-v,m=x+v}else O=(this.visibleTop-c.top-p)/c.height,m=(this.visibleBottom-c.top+p)/c.height;d=cu(u,O),h=cu(u,m)}else{let p=u.total*this.heightOracle.charWidth,O=i*this.heightOracle.charWidth,m,x;if(f!=null){let v=uu(u,f),y=((this.pixelViewport.right-this.pixelViewport.left)/2+O)/p;m=v-y,x=v+y}else m=(this.pixelViewport.left-O)/p,x=(this.pixelViewport.right+O)/p;d=cu(u,m),h=cu(u,x)}d>c.from&&l(c.from,d,c,u),h<c.to&&l(h,c.to,c,u)}return a}gapSize(e,n,r,i){let o=uu(i,r)-uu(i,n);return this.heightOracle.lineWrapping?e.height*o:i.total*this.heightOracle.charWidth*o}updateLineGaps(e){op.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=we.set(e.map(n=>n.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let n=[];et.spans(e,this.viewport.from,this.viewport.to,{span(i,o){n.push({from:i,to:o})},point(){}},20);let r=n.length!=this.visibleRanges.length||this.visibleRanges.some((i,o)=>i.from!=n[o].from||i.to!=n[o].to);return this.visibleRanges=n,r?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(n=>n.from<=e&&n.to>=e)||fl(this.heightMap.lineAt(e,Tt.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return fl(this.heightMap.lineAt(this.scaler.fromDOM(e),Tt.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 fl(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 lu{constructor(e,n){this.from=e,this.to=n}}function eF(t,e,n){let r=[],i=t,o=0;return et.spans(n,t,e,{span(){},point(s,a){s>i&&(r.push({from:i,to:s}),o+=s-i),i=a}},20),i<e&&(r.push({from:i,to:e}),o+=e-i),{total:o,ranges:r}}function cu({total:t,ranges:e},n){if(n<=0)return e[0].from;if(n>=1)return e[e.length-1].to;let r=Math.floor(t*n);for(let i=0;;i++){let{from:o,to:s}=e[i],a=s-o;if(r<=a)return o+r;r-=a}}function uu(t,e){let n=0;for(let{from:r,to:i}of t.ranges){if(e<=i){n+=e-r;break}n+=i-r}return n/t.total}function tF(t,e){for(let n of t)if(e(n))return n}const jb={toDOM(t){return t},fromDOM(t){return t},scale:1};class nF{constructor(e,n,r){let i=0,o=0,s=0;this.viewports=r.map(({from:a,to:l})=>{let c=n.lineAt(a,Tt.ByPos,e,0,0).top,u=n.lineAt(l,Tt.ByPos,e,0,0).bottom;return i+=u-c,{from:a,to:l,top:c,bottom:u,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(n.height-i);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,r=0,i=0;;n++){let o=n<this.viewports.length?this.viewports[n]:null;if(!o||e<o.top)return i+(e-r)*this.scale;if(e<=o.bottom)return o.domTop+(e-o.top);r=o.bottom,i=o.domBottom}}fromDOM(e){for(let n=0,r=0,i=0;;n++){let o=n<this.viewports.length?this.viewports[n]:null;if(!o||e<o.domTop)return r+(e-i)/this.scale;if(e<=o.domBottom)return o.top+(e-o.domTop);r=o.bottom,i=o.domBottom}}}function fl(t,e){if(e.scale==1)return t;let n=e.toDOM(t.top),r=e.toDOM(t.bottom);return new ai(t.from,t.length,n,r-n,Array.isArray(t._content)?t._content.map(i=>fl(i,e)):t._content)}const fu=me.define({combine:t=>t.join(" ")}),L0=me.define({combine:t=>t.indexOf(!0)>-1}),X0=Oo.newName(),G2=Oo.newName(),Y2=Oo.newName(),q2={"&light":"."+G2,"&dark":"."+Y2};function G0(t,e,n){return new Oo(e,{finish(r){return/&/.test(r)?r.replace(/&\w*/,i=>{if(i=="&")return t;if(!n||!n[i])throw new RangeError(`Unsupported selector: ${i}`);return n[i]}):t+" "+r}})}const rF=G0("."+X0,{"&":{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,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,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"}},q2),dl="￿";class iF{constructor(e,n){this.points=e,this.text="",this.lineSeparator=n.facet(Ue.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=dl}readRange(e,n){if(!e)return this;let r=e.parentNode;for(let i=e;;){this.findPointBefore(r,i);let o=this.text.length;this.readNode(i);let s=i.nextSibling;if(s==n)break;let a=Ct.get(i),l=Ct.get(s);(a&&l?a.breakAfter:(a?a.breakAfter:Rf(i))||Rf(s)&&(i.nodeName!="BR"||i.cmIgnore)&&this.text.length>o)&&this.lineBreak(),i=s}return this.findPointBefore(r,n),this}readTextNode(e){let n=e.nodeValue;for(let r of this.points)r.node==e&&(r.pos=this.text.length+Math.min(r.offset,n.length));for(let r=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let o=-1,s=1,a;if(this.lineSeparator?(o=n.indexOf(this.lineSeparator,r),s=this.lineSeparator.length):(a=i.exec(n))&&(o=a.index,s=a[0].length),this.append(n.slice(r,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);r=o+s}}readNode(e){if(e.cmIgnore)return;let n=Ct.get(e),r=n&&n.overrideDOMText;if(r!=null){this.findPointInside(e,r.length);for(let i=r.iter();!i.next().done;)i.lineBreak?this.lineBreak():this.append(i.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 r of this.points)r.node==e&&e.childNodes[r.offset]==n&&(r.pos=this.text.length)}findPointInside(e,n){for(let r of this.points)(e.nodeType==3?r.node==e:e.contains(r.node))&&(r.pos=this.text.length+(oF(e,r.node,r.offset)?n:0))}}function oF(t,e,n){for(;;){if(!e||n<Ni(e))return!1;if(e==t)return!0;n=Ko(e)+1,e=e.parentNode}}class Rb{constructor(e,n){this.node=e,this.offset=n,this.pos=-1}}class sF{constructor(e,n,r,i){this.typeOver=i,this.bounds=null,this.text="";let{impreciseHead:o,impreciseAnchor:s}=e.docView;if(e.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=e.docView.domBoundsAround(n,r,0))){let a=o||s?[]:cF(e),l=new iF(a,e.state);l.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=l.text,this.newSel=uF(a,this.bounds.from)}else{let a=e.observer.selectionRange,l=o&&o.node==a.focusNode&&o.offset==a.focusOffset||!$0(e.contentDOM,a.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(a.focusNode,a.focusOffset),c=s&&s.node==a.anchorNode&&s.offset==a.anchorOffset||!$0(e.contentDOM,a.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(a.anchorNode,a.anchorOffset),u=e.viewport;if((Oe.ios||Oe.chrome)&&e.state.selection.main.empty&&l!=c&&(u.from>0||u.to<e.state.doc.length)){let f=Math.min(l,c),d=Math.max(l,c),h=u.from-f,p=u.to-d;(h==0||h==1||f==0)&&(p==0||p==-1||d==e.state.doc.length)&&(l=0,c=e.state.doc.length)}this.newSel=ie.single(c,l)}}}function U2(t,e){let n,{newSel:r}=e,i=t.state.selection.main,o=t.inputState.lastKeyTime>Date.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:s,to:a}=e.bounds,l=i.from,c=null;(o===8||Oe.android&&e.text.length<a-s)&&(l=i.to,c="end");let u=lF(t.state.doc.sliceString(s,a,dl),e.text,l-s,c);u&&(Oe.chrome&&o==13&&u.toB==u.from+2&&e.text.slice(u.from,u.toB)==dl+dl&&u.toB--,n={from:s+u.from,to:s+u.toA,insert:st.of(e.text.slice(u.from,u.toB).split(dl))})}else r&&(!t.hasFocus&&t.state.facet(Xd)||r.main.eq(i))&&(r=null);if(!n&&!r)return!1;if(!n&&e.typeOver&&!i.empty&&r&&r.main.empty?n={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,i.to)}:n&&n.from>=i.from&&n.to<=i.to&&(n.from!=i.from||n.to!=i.to)&&i.to-i.from-(n.to-n.from)<=4?n={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,n.from).append(n.insert).append(t.state.doc.slice(n.to,i.to))}:(Oe.mac||Oe.android)&&n&&n.from==n.to&&n.from==i.head-1&&/^\. ?$/.test(n.insert.toString())&&t.contentDOM.getAttribute("autocorrect")=="off"?(r&&n.insert.length==2&&(r=ie.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:st.of([" "])}):Oe.chrome&&n&&n.from==n.to&&n.from==i.head&&n.insert.toString()==`
666
+ `;this.styleTag.textContent=s;let a=n.head||n;this.styleTag.parentNode!=a&&a.insertBefore(this.styleTag,a.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}var xo={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Fl={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},W8=typeof navigator<"u"&&/Mac/.test(navigator.platform),V8=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Sn=0;Sn<10;Sn++)xo[48+Sn]=xo[96+Sn]=String(Sn);for(var Sn=1;Sn<=24;Sn++)xo[Sn+111]="F"+Sn;for(var Sn=65;Sn<=90;Sn++)xo[Sn]=String.fromCharCode(Sn+32),Fl[Sn]=String.fromCharCode(Sn);for(var ep in xo)Fl.hasOwnProperty(ep)||(Fl[ep]=xo[ep]);function z8(t){var e=W8&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||V8&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?Fl:xo)[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 jf(t){let e;return t.nodeType==11?e=t.getSelection?t:t.ownerDocument:e=t,e.getSelection()}function $0(t,e){return e?t==e||t.contains(e.nodeType!=1?e.parentNode:e):!1}function L8(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function Wu(t,e){if(!e.anchorNode)return!1;try{return $0(t,e.anchorNode)}catch{return!1}}function la(t){return t.nodeType==3?ts(t,0,t.nodeValue.length).getClientRects():t.nodeType==1?t.getClientRects():[]}function Cl(t,e,n,r){return n?ob(t,e,n,r,-1)||ob(t,e,n,r,1):!1}function es(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e}function Rf(t){return t.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function ob(t,e,n,r,i){for(;;){if(t==n&&e==r)return!0;if(e==(i<0?0:Ni(t))){if(t.nodeName=="DIV")return!1;let o=t.parentNode;if(!o||o.nodeType!=1)return!1;e=es(t)+(i<0?0:1),t=o}else if(t.nodeType==1){if(t=t.childNodes[e+(i<0?-1:0)],t.nodeType==1&&t.contentEditable=="false")return!1;e=i<0?Ni(t):0}else return!1}}function Ni(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function zd(t,e){let n=e?t.left:t.right;return{left:n,right:n,top:t.top,bottom:t.bottom}}function X8(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 t2(t,e){let n=e.width/t.offsetWidth,r=e.height/t.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.width-t.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(e.height-t.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}function G8(t,e,n,r,i,o,s,a){let l=t.ownerDocument,c=l.defaultView||window;for(let u=t,f=!1;u&&!f;)if(u.nodeType==1){let d,h=u==l.body,p=1,O=1;if(h)d=X8(c);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(f=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let v=u.getBoundingClientRect();({scaleX:p,scaleY:O}=t2(u,v)),d={left:v.left,right:v.left+u.clientWidth*p,top:v.top,bottom:v.top+u.clientHeight*O}}let m=0,x=0;if(i=="nearest")e.top<d.top?(x=-(d.top-e.top+s),n>0&&e.bottom>d.bottom+x&&(x=e.bottom-d.bottom+x+s)):e.bottom>d.bottom&&(x=e.bottom-d.bottom+s,n<0&&e.top-x<d.top&&(x=-(d.top+x-e.top+s)));else{let v=e.bottom-e.top,y=d.bottom-d.top;x=(i=="center"&&v<=y?e.top+v/2-y/2:i=="start"||i=="center"&&n<0?e.top-s:e.bottom-y+s)-d.top}if(r=="nearest"?e.left<d.left?(m=-(d.left-e.left+o),n>0&&e.right>d.right+m&&(m=e.right-d.right+m+o)):e.right>d.right&&(m=e.right-d.right+o,n<0&&e.left<d.left+m&&(m=-(d.left+m-e.left+o))):m=(r=="center"?e.left+(e.right-e.left)/2-(d.right-d.left)/2:r=="start"==a?e.left-o:e.right-(d.right-d.left)+o)-d.left,m||x)if(h)c.scrollBy(m,x);else{let v=0,y=0;if(x){let S=u.scrollTop;u.scrollTop+=x/O,y=(u.scrollTop-S)*O}if(m){let S=u.scrollLeft;u.scrollLeft+=m/p,v=(u.scrollLeft-S)*p}e={left:e.left-v,top:e.top-y,right:e.right-v,bottom:e.bottom-y},v&&Math.abs(v-m)<1&&(r="nearest"),y&&Math.abs(y-x)<1&&(i="nearest")}if(h)break;u=u.assignedSlot||u.parentNode}else if(u.nodeType==11)u=u.host;else break}function Y8(t){let e=t.ownerDocument;for(let n=t.parentNode;n&&n!=e.body;)if(n.nodeType==1){if(n.scrollHeight>n.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 q8{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:r}=e;this.set(n,Math.min(e.anchorOffset,n?Ni(n):0),r,Math.min(e.focusOffset,r?Ni(r):0))}set(e,n,r,i){this.anchorNode=e,this.anchorOffset=n,this.focusNode=r,this.focusOffset=i}}let Ss=null;function n2(t){if(t.setActive)return t.setActive();if(Ss)return t.focus(Ss);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(Ss==null?{get preventScroll(){return Ss={preventScroll:!0},!0}}:void 0),!Ss){Ss=!1;for(let n=0;n<e.length;){let r=e[n++],i=e[n++],o=e[n++];r.scrollTop!=i&&(r.scrollTop=i),r.scrollLeft!=o&&(r.scrollLeft=o)}}}let sb;function ts(t,e,n=e){let r=sb||(sb=document.createRange());return r.setEnd(t,n),r.setStart(t,e),r}function Gs(t,e,n,r){let i={key:e,code:e,keyCode:n,which:n,cancelable:!0};r&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=r);let o=new KeyboardEvent("keydown",i);o.synthetic=!0,t.dispatchEvent(o);let s=new KeyboardEvent("keyup",i);return s.synthetic=!0,t.dispatchEvent(s),o.defaultPrevented||s.defaultPrevented}function U8(t){for(;t;){if(t&&(t.nodeType==9||t.nodeType==11&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}function r2(t){for(;t.attributes.length;)t.removeAttributeNode(t.attributes[0])}function H8(t,e){let n=e.focusNode,r=e.focusOffset;if(!n||e.anchorNode!=n||e.anchorOffset!=r)return!1;for(r=Math.min(r,Ni(n));;)if(r){if(n.nodeType!=1)return!1;let i=n.childNodes[r-1];i.contentEditable=="false"?r--:(n=i,r=Ni(n))}else{if(n==t)return!0;r=es(n),n=n.parentNode}}function i2(t){return t.scrollTop>Math.max(1,t.scrollHeight-t.clientHeight-4)}function o2(t,e){for(let n=t,r=e;;){if(n.nodeType==3&&r>0)return{node:n,offset:r};if(n.nodeType==1&&r>0){if(n.contentEditable=="false")return null;n=n.childNodes[r-1],r=Ni(n)}else if(n.parentNode&&!Rf(n))r=es(n),n=n.parentNode;else return null}}function s2(t,e){for(let n=t,r=e;;){if(n.nodeType==3&&r<n.nodeValue.length)return{node:n,offset:r};if(n.nodeType==1&&r<n.childNodes.length){if(n.contentEditable=="false")return null;n=n.childNodes[r],r=0}else if(n.parentNode&&!Rf(n))r=es(n)+1,n=n.parentNode;else return null}}class $n{constructor(e,n,r=!0){this.node=e,this.offset=n,this.precise=r}static before(e,n){return new $n(e.parentNode,es(e),n)}static after(e,n){return new $n(e.parentNode,es(e)+1,n)}}const WO=[];class Ct{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let n=this.posAtStart;for(let r of this.children){if(r==e)return n;n+=r.length+r.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,n){if(this.flags&2){let r=this.dom,i=null,o;for(let s of this.children){if(s.flags&7){if(!s.dom&&(o=i?i.nextSibling:r.firstChild)){let a=Ct.get(o);(!a||!a.parent&&a.canReuseDOM(s))&&s.reuseDOM(o)}s.sync(e,n),s.flags&=-8}if(o=i?i.nextSibling:r.firstChild,n&&!n.written&&n.node==r&&o!=s.dom&&(n.written=!0),s.dom.parentNode==r)for(;o&&o!=s.dom;)o=ab(o);else r.insertBefore(s.dom,o);i=s.dom}for(o=i?i.nextSibling:r.firstChild,o&&n&&n.node==r&&(n.written=!0);o;)o=ab(o)}else if(this.flags&1)for(let r of this.children)r.flags&7&&(r.sync(e,n),r.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,n){let r;if(e==this.dom)r=this.dom.childNodes[n];else{let i=Ni(e)==0?0:n==0?-1:1;for(;;){let o=e.parentNode;if(o==this.dom)break;i==0&&o.firstChild!=o.lastChild&&(e==o.firstChild?i=-1:i=1),e=o}i<0?r=e:r=e.nextSibling}if(r==this.dom.firstChild)return 0;for(;r&&!Ct.get(r);)r=r.nextSibling;if(!r)return this.length;for(let i=0,o=0;;i++){let s=this.children[i];if(s.dom==r)return o;o+=s.length+s.breakAfter}}domBoundsAround(e,n,r=0){let i=-1,o=-1,s=-1,a=-1;for(let l=0,c=r,u=r;l<this.children.length;l++){let f=this.children[l],d=c+f.length;if(c<e&&d>n)return f.domBoundsAround(e,n,c);if(d>=e&&i==-1&&(i=l,o=c),c>n&&f.dom.parentNode==this.dom){s=l,a=u;break}u=d,c=d+f.breakAfter}return{from:o,to:a<0?r+this.length:a,startDOM:(i?this.children[i-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:s<this.children.length&&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,r=WO){this.markDirty();for(let i=e;i<n;i++){let o=this.children[i];o.parent==this&&r.indexOf(o)<0&&o.destroy()}this.children.splice(e,n-e,...r);for(let i=0;i<r.length;i++)r[i].setParent(this)}ignoreMutation(e){return!1}ignoreEvent(e){return!1}childCursor(e=this.length){return new a2(this.children,e,this.children.length)}childPos(e,n=1){return this.childCursor().findPos(e,n)}toString(){let e=this.constructor.name.replace("View","");return e+(this.children.length?"("+this.children.join()+")":this.length?"["+(e=="Text"?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(e){return e.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(e,n,r,i,o,s){return!1}become(e){return!1}canReuseDOM(e){return e.constructor==this.constructor&&!((this.flags|e.flags)&8)}getSide(){return 0}destroy(){for(let e of this.children)e.parent==this&&e.destroy();this.parent=null}}Ct.prototype.breakAfter=0;function ab(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class a2{constructor(e,n,r){this.children=e,this.pos=n,this.i=r,this.off=0}findPos(e,n=1){for(;;){if(e>this.pos||e==this.pos&&(n>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let r=this.children[--this.i];this.pos-=r.length+r.breakAfter}}}function l2(t,e,n,r,i,o,s,a,l){let{children:c}=t,u=c.length?c[e]:null,f=o.length?o[o.length-1]:null,d=f?f.breakAfter:s;if(!(e==r&&u&&!s&&!d&&o.length<2&&u.merge(n,i,o.length?f:null,n==0,a,l))){if(r<c.length){let h=c[r];h&&(i<h.length||h.breakAfter&&(f!=null&&f.breakAfter))?(e==r&&(h=h.split(i),i=0),!d&&f&&h.merge(0,i,f,!0,0,l)?o[o.length-1]=h:((i||h.children.length&&!h.children[0].length)&&h.merge(0,i,null,!1,0,l),o.push(h))):h!=null&&h.breakAfter&&(f?f.breakAfter=1:s=1),r++}for(u&&(u.breakAfter=s,n>0&&(!s&&o.length&&u.merge(n,u.length,o[0],!1,a,0)?u.breakAfter=o.shift().breakAfter:(n<u.length||u.children.length&&u.children[u.children.length-1].length==0)&&u.merge(n,u.length,null,!1,a,0),e++));e<r&&o.length;)if(c[r-1].become(o[o.length-1]))r--,o.pop(),l=o.length?0:a;else if(c[e].become(o[0]))e++,o.shift(),a=o.length?0:l;else break;!o.length&&e&&r<c.length&&!c[e-1].breakAfter&&c[r].merge(0,0,c[e-1],!1,a,l)&&e--,(e<r||o.length)&&t.replaceChildren(e,r,o)}}function c2(t,e,n,r,i,o){let s=t.childCursor(),{i:a,off:l}=s.findPos(n,1),{i:c,off:u}=s.findPos(e,-1),f=e-n;for(let d of r)f+=d.length;t.length+=f,l2(t,c,u,a,l,r,0,i,o)}let pr=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},j0=typeof document<"u"?document:{documentElement:{style:{}}};const R0=/Edge\/(\d+)/.exec(pr.userAgent),u2=/MSIE \d/.test(pr.userAgent),D0=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(pr.userAgent),Ld=!!(u2||D0||R0),lb=!Ld&&/gecko\/(\d+)/i.test(pr.userAgent),tp=!Ld&&/Chrome\/(\d+)/.exec(pr.userAgent),cb="webkitFontSmoothing"in j0.documentElement.style,f2=!Ld&&/Apple Computer/.test(pr.vendor),ub=f2&&(/Mobile\/\w+/.test(pr.userAgent)||pr.maxTouchPoints>2);var Oe={mac:ub||/Mac/.test(pr.platform),windows:/Win/.test(pr.platform),linux:/Linux|X11/.test(pr.platform),ie:Ld,ie_version:u2?j0.documentMode||6:D0?+D0[1]:R0?+R0[1]:0,gecko:lb,gecko_version:lb?+(/Firefox\/(\d+)/.exec(pr.userAgent)||[0,0])[1]:0,chrome:!!tp,chrome_version:tp?+tp[1]:0,ios:ub,android:/Android\b/.test(pr.userAgent),webkit:cb,safari:f2,webkit_version:cb?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:j0.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const J8=256;class zr extends Ct{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,r){return this.flags&8||r&&(!(r instanceof zr)||this.length-(n-e)+r.length>J8||r.flags&8)?!1:(this.text=this.text.slice(0,e)+(r?r.text:"")+this.text.slice(n),this.markDirty(),!0)}split(e){let n=new zr(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 $n(this.dom,e)}domBoundsAround(e,n,r){return{from:r,to:r+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,n){return K8(this.dom,e,n)}}class Fi extends Ct{constructor(e,n=[],r=0){super(),this.mark=e,this.children=n,this.length=r;for(let i of n)i.setParent(this)}setAttrs(e){if(r2(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,r,i,o,s){return r&&(!(r instanceof Fi&&r.mark.eq(this.mark))||e&&o<=0||n<this.length&&s<=0)?!1:(c2(this,e,n,r?r.children.slice():[],o-1,s-1),this.markDirty(),!0)}split(e){let n=[],r=0,i=-1,o=0;for(let a of this.children){let l=r+a.length;l>e&&n.push(r<e?a.split(e-r):a),i<0&&r>=e&&(i=o),r=l,o++}let s=this.length-e;return this.length=e,i>-1&&(this.children.length=i,this.markDirty()),new Fi(this.mark,n,s)}domAtPos(e){return d2(this,e)}coordsAt(e,n){return p2(this,e,n)}}function K8(t,e,n){let r=t.nodeValue.length;e>r&&(e=r);let i=e,o=e,s=0;e==0&&n<0||e==r&&n>=0?Oe.chrome||Oe.gecko||(e?(i--,s=1):o<r&&(o++,s=-1)):n<0?i--:o<r&&o++;let a=ts(t,i,o).getClientRects();if(!a.length)return null;let l=a[(s?s<0:n>=0)?0:a.length-1];return Oe.safari&&!s&&l.width==0&&(l=Array.prototype.find.call(a,c=>c.width)||l),s?zd(l,s<0):l||null}class oo extends Ct{static create(e,n,r){return new oo(e,n,r)}constructor(e,n,r){super(),this.widget=e,this.length=n,this.side=r,this.prevWidget=null}split(e){let n=oo.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,r,i,o,s){return r&&(!(r instanceof oo)||!this.widget.compare(r.widget)||e>0&&o<=0||n<this.length&&s<=0)?!1:(this.length=e+(r?r.length:0)+(this.length-n),!0)}become(e){return e instanceof oo&&e.side==this.side&&this.widget.constructor==e.widget.constructor?(this.widget.compare(e.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get overrideDOMText(){if(this.length==0)return st.empty;let e=this;for(;e.parent;)e=e.parent;let{view:n}=e,r=n&&n.state.doc,i=this.posAtStart;return r?r.slice(i,i+this.length):st.empty}domAtPos(e){return(this.length?e==0:this.side>0)?$n.before(this.dom):$n.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,n){let r=this.widget.coordsAt(this.dom,e,n);if(r)return r;let i=this.dom.getClientRects(),o=null;if(!i.length)return null;let s=this.side?this.side<0:e>0;for(let a=s?i.length-1:0;o=i[a],!(e>0?a==0:a==i.length-1||o.top<o.bottom);a+=s?-1:1);return zd(o,!s)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class ca extends Ct{constructor(e){super(),this.side=e}get length(){return 0}merge(){return!1}become(e){return e instanceof ca&&e.side==this.side}split(){return new ca(this.side)}sync(){if(!this.dom){let e=document.createElement("img");e.className="cm-widgetBuffer",e.setAttribute("aria-hidden","true"),this.setDOM(e)}}getSide(){return this.side}domAtPos(e){return this.side>0?$n.before(this.dom):$n.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return st.empty}get isHidden(){return!0}}zr.prototype.children=oo.prototype.children=ca.prototype.children=WO;function d2(t,e){let n=t.dom,{children:r}=t,i=0;for(let o=0;i<r.length;i++){let s=r[i],a=o+s.length;if(!(a==o&&s.getSide()<=0)){if(e>o&&e<a&&s.dom.parentNode==n)return s.domAtPos(e-o);if(e<=o)break;o=a}}for(let o=i;o>0;o--){let s=r[o-1];if(s.dom.parentNode==n)return s.domAtPos(s.length)}for(let o=i;o<r.length;o++){let s=r[o];if(s.dom.parentNode==n)return s.domAtPos(0)}return new $n(n,0)}function h2(t,e,n){let r,{children:i}=t;n>0&&e instanceof Fi&&i.length&&(r=i[i.length-1])instanceof Fi&&r.mark.eq(e.mark)?h2(r,e.children[0],n-1):(i.push(e),e.setParent(t)),t.length+=e.length}function p2(t,e,n){let r=null,i=-1,o=null,s=-1;function a(c,u){for(let f=0,d=0;f<c.children.length&&d<=u;f++){let h=c.children[f],p=d+h.length;p>=u&&(h.children.length?a(h,u-d):(!o||o.isHidden&&n>0)&&(p>u||d==p&&h.getSide()>0)?(o=h,s=u-d):(d<u||d==p&&h.getSide()<0&&!h.isHidden)&&(r=h,i=u-d)),d=p}}a(t,e);let l=(n<0?r:o)||r||o;return l?l.coordsAt(Math.max(0,l==r?i:s),n):eN(t)}function eN(t){let e=t.dom.lastChild;if(!e)return t.dom.getBoundingClientRect();let n=la(e);return n[n.length-1]||null}function Q0(t,e){for(let n in t)n=="class"&&e.class?e.class+=" "+t.class:n=="style"&&e.style?e.style+=";"+t.style:e[n]=t[n];return e}const fb=Object.create(null);function VO(t,e,n){if(t==e)return!0;t||(t=fb),e||(e=fb);let r=Object.keys(t),i=Object.keys(e);if(r.length-(n&&r.indexOf(n)>-1?1:0)!=i.length-(n&&i.indexOf(n)>-1?1:0))return!1;for(let o of r)if(o!=n&&(i.indexOf(o)==-1||t[o]!==e[o]))return!1;return!0}function B0(t,e,n){let r=!1;if(e)for(let i in e)n&&i in n||(r=!0,i=="style"?t.style.cssText="":t.removeAttribute(i));if(n)for(let i in n)e&&e[i]==n[i]||(r=!0,i=="style"?t.style.cssText=n[i]:t.setAttribute(i,n[i]));return r}function tN(t){let e=Object.create(null);for(let n=0;n<t.attributes.length;n++){let r=t.attributes[n];e[r.name]=r.value}return e}class tn extends Ct{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,n,r,i,o,s){if(r){if(!(r instanceof tn))return!1;this.dom||r.transferDOM(this)}return i&&this.setDeco(r?r.attrs:null),c2(this,e,n,r?r.children.slice():[],o,s),!0}split(e){let n=new tn;if(n.breakAfter=this.breakAfter,this.length==0)return n;let{i:r,off:i}=this.childPos(e);i&&(n.append(this.children[r].split(i),0),this.children[r].merge(i,this.children[r].length,null,!1,0,0),r++);for(let o=r;o<this.children.length;o++)n.append(this.children[o],0);for(;r>0&&this.children[r-1].length==0;)this.children[--r].destroy();return this.children.length=r,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){VO(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,n){h2(this,e,n)}addLineDeco(e){let n=e.spec.attributes,r=e.spec.class;n&&(this.attrs=Q0(n,this.attrs||{})),r&&(this.attrs=Q0({class:r},this.attrs||{}))}domAtPos(e){return d2(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,n){var r;this.dom?this.flags&4&&(r2(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&&(B0(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,n);let i=this.dom.lastChild;for(;i&&Ct.get(i)instanceof Fi;)i=i.lastChild;if(!i||!this.length||i.nodeName!="BR"&&((r=Ct.get(i))===null||r===void 0?void 0:r.isEditable)==!1&&(!Oe.ios||!this.children.some(o=>o instanceof zr))){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 r of this.children){if(!(r instanceof zr)||/[^ -~]/.test(r.text))return null;let i=la(r.dom);if(i.length!=1)return null;e+=i[0].width,n=i[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:n}:null}coordsAt(e,n){let r=p2(this,e,n);if(!this.children.length&&r&&this.parent){let{heightOracle:i}=this.parent.view.viewState,o=r.bottom-r.top;if(Math.abs(o-i.lineHeight)<2&&i.textHeight<o){let s=(o-i.textHeight)/2;return{top:r.top+s,bottom:r.bottom-s,left:r.left,right:r.left}}}return r}become(e){return!1}covers(){return!0}static find(e,n){for(let r=0,i=0;r<e.children.length;r++){let o=e.children[r],s=i+o.length;if(s>=n){if(o instanceof tn)return o;if(s>n)break}i=s+o.breakAfter}return null}}class uo extends Ct{constructor(e,n,r){super(),this.widget=e,this.length=n,this.deco=r,this.breakAfter=0,this.prevWidget=null}merge(e,n,r,i,o,s){return r&&(!(r instanceof uo)||!this.widget.compare(r.widget)||e>0&&o<=0||n<this.length&&s<=0)?!1:(this.length=e+(r?r.length:0)+(this.length-n),!0)}domAtPos(e){return e==0?$n.before(this.dom):$n.after(this.dom,e==this.length)}split(e){let n=this.length-e;this.length=e;let r=new uo(this.widget,n,this.deco);return r.breakAfter=this.breakAfter,r}get children(){return WO}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"))}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):st.empty}domBoundsAround(){return null}become(e){return e instanceof uo&&e.widget.constructor==this.widget.constructor?(e.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,this.deco=e.deco,this.breakAfter=e.breakAfter,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get isEditable(){return!1}get isWidget(){return!0}coordsAt(e,n){return this.widget.coordsAt(this.dom,e,n)}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}covers(e){let{startSide:n,endSide:r}=this.deco;return n==r?!1:e<0?n<0:r>0}}class ki{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,r){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var Wn=function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t}(Wn||(Wn={}));class we extends Ko{constructor(e,n,r,i){super(),this.startSide=e,this.endSide=n,this.widget=r,this.spec=i}get heightRelevant(){return!1}static mark(e){return new hc(e)}static widget(e){let n=Math.max(-1e4,Math.min(1e4,e.side||0)),r=!!e.block;return n+=r&&!e.inlineOrder?n>0?3e8:-4e8:n>0?1e8:-1e8,new vo(e,n,n,r,e.widget||null,!1)}static replace(e){let n=!!e.block,r,i;if(e.isBlockGap)r=-5e8,i=4e8;else{let{start:o,end:s}=g2(e,n);r=(o?n?-3e8:-1:5e8)-1,i=(s?n?2e8:1:-6e8)+1}return new vo(e,r,i,n,e.widget||null,!0)}static line(e){return new pc(e)}static set(e,n=!1){return et.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}we.none=et.empty;class hc extends we{constructor(e){let{start:n,end:r}=g2(e);super(n?-1:5e8,r?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var n,r;return this==e||e instanceof hc&&this.tagName==e.tagName&&(this.class||((n=this.attrs)===null||n===void 0?void 0:n.class))==(e.class||((r=e.attrs)===null||r===void 0?void 0:r.class))&&VO(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)}}hc.prototype.point=!1;class pc extends we{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof pc&&this.spec.class==e.spec.class&&VO(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)}}pc.prototype.mapMode=wn.TrackBefore;pc.prototype.point=!0;class vo extends we{constructor(e,n,r,i,o,s){super(n,r,o,e),this.block=i,this.isReplace=s,this.mapMode=i?n<=0?wn.TrackBefore:wn.TrackAfter:wn.TrackDel}get type(){return this.startSide!=this.endSide?Wn.WidgetRange:this.startSide<=0?Wn.WidgetBefore:Wn.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof vo&&nN(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)}}vo.prototype.point=!0;function g2(t,e=!1){let{inclusiveStart:n,inclusiveEnd:r}=t;return n==null&&(n=t.inclusive),r==null&&(r=t.inclusive),{start:n??e,end:r??e}}function nN(t,e){return t==e||!!(t&&e&&t.compare(e))}function _0(t,e,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=t?n[i]=Math.max(n[i],e):n.push(t,e)}class kl{constructor(e,n,r,i){this.doc=e,this.pos=n,this.end=r,this.disallowBlockEffectsFor=i,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 uo&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new tn),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(iu(new ca(-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 uo)&&this.getLine()}buildText(e,n,r){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 i=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(n.slice(n.length-r)),this.getLine().append(iu(new zr(this.text.slice(this.textOff,this.textOff+i)),n),r),this.atCursorPos=!0,this.textOff+=i,e-=i,r=0}}span(e,n,r,i){this.buildText(n-e,r,i),this.pos=n,this.openStart<0&&(this.openStart=i)}point(e,n,r,i,o,s){if(this.disallowBlockEffectsFor[s]&&r instanceof vo){if(r.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(r instanceof vo)if(r.block)r.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new uo(r.widget||ua.block,a,r));else{let l=oo.create(r.widget||ua.inline,a,a?0:r.startSide),c=this.atCursorPos&&!l.isEditable&&o<=i.length&&(e<n||r.startSide>0),u=!l.isEditable&&(e<n||o>i.length||r.startSide<=0),f=this.getLine();this.pendingBuffer==2&&!c&&!l.isEditable&&(this.pendingBuffer=0),this.flushBuffer(i),c&&(f.append(iu(new ca(1),i),o),o=i.length+Math.max(0,o-i.length)),f.append(iu(l,i),o),this.atCursorPos=u,this.pendingBuffer=u?e<n||o>i.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=i.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(r);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,r,i,o){let s=new kl(e,n,r,o);return s.openEnd=et.spans(i,n,r,s),s.openStart<0&&(s.openStart=s.openEnd),s.finish(s.openEnd),s}}function iu(t,e){for(let n of e)t=new Fi(n,[t],t.length);return t}class ua extends ki{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}}ua.inline=new ua("span");ua.block=new ua("div");var $t=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}($t||($t={}));const ns=$t.LTR,zO=$t.RTL;function m2(t){let e=[];for(let n=0;n<t.length;n++)e.push(1<<+t[n]);return e}const rN=m2("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),iN=m2("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),M0=Object.create(null),Kr=[];for(let t of["()","[]","{}"]){let e=t.charCodeAt(0),n=t.charCodeAt(1);M0[e]=n,M0[n]=-e}function O2(t){return t<=247?rN[t]:1424<=t&&t<=1524?2:1536<=t&&t<=1785?iN[t-1536]:1774<=t&&t<=2220?4:8192<=t&&t<=8204?256:64336<=t&&t<=65023?4:1}const oN=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class so{get dir(){return this.level%2?zO:ns}constructor(e,n,r){this.from=e,this.to=n,this.level=r}side(e,n){return this.dir==n==e?this.to:this.from}forward(e,n){return e==(this.dir==n)}static find(e,n,r,i){let o=-1;for(let s=0;s<e.length;s++){let a=e[s];if(a.from<=n&&a.to>=n){if(a.level==r)return s;(o<0||(i!=0?i<0?a.from<n:a.to>n:e[o].level>a.level))&&(o=s)}}if(o<0)throw new RangeError("Index out of range");return o}}function x2(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++){let r=t[n],i=e[n];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!x2(r.inner,i.inner))return!1}return!0}const wt=[];function sN(t,e,n,r,i){for(let o=0;o<=r.length;o++){let s=o?r[o-1].to:e,a=o<r.length?r[o].from:n,l=o?256:i;for(let c=s,u=l,f=l;c<a;c++){let d=O2(t.charCodeAt(c));d==512?d=u:d==8&&f==4&&(d=16),wt[c]=d==4?2:d,d&7&&(f=d),u=d}for(let c=s,u=l,f=l;c<a;c++){let d=wt[c];if(d==128)c<a-1&&u==wt[c+1]&&u&24?d=wt[c]=u:wt[c]=256;else if(d==64){let h=c+1;for(;h<a&&wt[h]==64;)h++;let p=c&&u==8||h<n&&wt[h]==8?f==1?1:8:256;for(let O=c;O<h;O++)wt[O]=p;c=h-1}else d==8&&f==1&&(wt[c]=1);u=d,d&7&&(f=d)}}}function aN(t,e,n,r,i){let o=i==1?2:1;for(let s=0,a=0,l=0;s<=r.length;s++){let c=s?r[s-1].to:e,u=s<r.length?r[s].from:n;for(let f=c,d,h,p;f<u;f++)if(h=M0[d=t.charCodeAt(f)])if(h<0){for(let O=a-3;O>=0;O-=3)if(Kr[O+1]==-h){let m=Kr[O+2],x=m&2?i:m&4?m&1?o:i:0;x&&(wt[f]=wt[Kr[O]]=x),a=O;break}}else{if(Kr.length==189)break;Kr[a++]=f,Kr[a++]=d,Kr[a++]=l}else if((p=wt[f])==2||p==1){let O=p==i;l=O?0:1;for(let m=a-3;m>=0;m-=3){let x=Kr[m+2];if(x&2)break;if(O)Kr[m+2]|=2;else{if(x&4)break;Kr[m+2]|=4}}}}}function lN(t,e,n,r){for(let i=0,o=r;i<=n.length;i++){let s=i?n[i-1].to:t,a=i<n.length?n[i].from:e;for(let l=s;l<a;){let c=wt[l];if(c==256){let u=l+1;for(;;)if(u==a){if(i==n.length)break;u=n[i++].to,a=i<n.length?n[i].from:e}else if(wt[u]==256)u++;else break;let f=o==1,d=(u<e?wt[u]:r)==1,h=f==d?f?1:2:r;for(let p=u,O=i,m=O?n[O-1].to:t;p>l;)p==m&&(p=n[--O].from,m=O?n[O-1].to:t),wt[--p]=h;l=u}else o=c,l++}}}function N0(t,e,n,r,i,o,s){let a=r%2?2:1;if(r%2==i%2)for(let l=e,c=0;l<n;){let u=!0,f=!1;if(c==o.length||l<o[c].from){let O=wt[l];O!=a&&(u=!1,f=O==16)}let d=!u&&a==1?[]:null,h=u?r:r+1,p=l;e:for(;;)if(c<o.length&&p==o[c].from){if(f)break e;let O=o[c];if(!u)for(let m=O.to,x=c+1;;){if(m==n)break e;if(x<o.length&&o[x].from==m)m=o[x++].to;else{if(wt[m]==a)break e;break}}if(c++,d)d.push(O);else{O.from>l&&s.push(new so(l,O.from,h));let m=O.direction==ns!=!(h%2);F0(t,m?r+1:r,i,O.inner,O.from,O.to,s),l=O.to}p=O.to}else{if(p==n||(u?wt[p]!=a:wt[p]==a))break;p++}d?N0(t,l,p,r+1,i,d,s):l<p&&s.push(new so(l,p,h)),l=p}else for(let l=n,c=o.length;l>e;){let u=!0,f=!1;if(!c||l>o[c-1].to){let O=wt[l-1];O!=a&&(u=!1,f=O==16)}let d=!u&&a==1?[]:null,h=u?r:r+1,p=l;e:for(;;)if(c&&p==o[c-1].to){if(f)break e;let O=o[--c];if(!u)for(let m=O.from,x=c;;){if(m==e)break e;if(x&&o[x-1].to==m)m=o[--x].from;else{if(wt[m-1]==a)break e;break}}if(d)d.push(O);else{O.to<l&&s.push(new so(O.to,l,h));let m=O.direction==ns!=!(h%2);F0(t,m?r+1:r,i,O.inner,O.from,O.to,s),l=O.from}p=O.from}else{if(p==e||(u?wt[p-1]!=a:wt[p-1]==a))break;p--}d?N0(t,p,l,r+1,i,d,s):p<l&&s.push(new so(p,l,h)),l=p}}function F0(t,e,n,r,i,o,s){let a=e%2?2:1;sN(t,i,o,r,a),aN(t,i,o,r,a),lN(i,o,r,a),N0(t,i,o,e,n,r,s)}function cN(t,e,n){if(!t)return[new so(0,0,e==zO?1:0)];if(e==ns&&!n.length&&!oN.test(t))return v2(t.length);if(n.length)for(;t.length>wt.length;)wt[wt.length]=256;let r=[],i=e==ns?0:1;return F0(t,i,i,n,0,t.length,r),r}function v2(t){return[new so(0,t,0)]}let y2="";function uN(t,e,n,r,i){var o;let s=r.head-t.from,a=so.find(e,s,(o=r.bidiLevel)!==null&&o!==void 0?o:-1,r.assoc),l=e[a],c=l.side(i,n);if(s==c){let d=a+=i?1:-1;if(d<0||d>=e.length)return null;l=e[a=d],s=l.side(!i,n),c=l.side(i,n)}let u=kn(t.text,s,l.forward(i,n));(u<l.from||u>l.to)&&(u=c),y2=t.text.slice(Math.min(s,u),Math.max(s,u));let f=a==(i?e.length-1:0)?null:e[a+(i?1:-1)];return f&&u==c&&f.level+(i?0:1)<l.level?ie.cursor(f.side(!i,n)+t.from,f.forward(i,n)?1:-1,f.level):ie.cursor(u+t.from,l.forward(i,n)?-1:1,l.level)}function fN(t,e,n){for(let r=e;r<n;r++){let i=O2(t.charCodeAt(r));if(i==1)return ns;if(i==2||i==4)return zO}return ns}const b2=me.define(),S2=me.define(),w2=me.define(),C2=me.define(),Z0=me.define(),k2=me.define(),A2=me.define(),P2=me.define({combine:t=>t.some(e=>e)}),E2=me.define({combine:t=>t.some(e=>e)}),I2=me.define();class Ys{constructor(e,n="nearest",r="nearest",i=5,o=5,s=!1){this.range=e,this.y=n,this.x=r,this.yMargin=i,this.xMargin=o,this.isSnapshot=s}map(e){return e.empty?this:new Ys(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 Ys(ie.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const ou=_e.define({map:(t,e)=>t.map(e)});function Zn(t,e,n){let r=t.facet(C2);r.length?r[0](e):window.onerror?window.onerror(String(e),n,void 0,void 0,e):n?console.error(n+":",e):console.error(e)}const Xd=me.define({combine:t=>t.length?t[0]:!0});let dN=0;const cl=me.define();class Bt{constructor(e,n,r,i,o){this.id=e,this.create=n,this.domEventHandlers=r,this.domEventObservers=i,this.extension=o(this)}static define(e,n){const{eventHandlers:r,eventObservers:i,provide:o,decorations:s}=n||{};return new Bt(dN++,e,r,i,a=>{let l=[cl.of(a)];return s&&l.push(Zl.of(c=>{let u=c.plugin(a);return u?s(u):we.none})),o&&l.push(o(a)),l})}static fromClass(e,n){return Bt.define(r=>new e(r),n)}}class np{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(r){if(Zn(n.state,r,"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){Zn(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(r){Zn(e.state,r,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const T2=me.define(),LO=me.define(),Zl=me.define(),$2=me.define(),XO=me.define(),j2=me.define();function db(t,e){let n=t.state.facet(j2);if(!n.length)return n;let r=n.map(o=>o instanceof Function?o(t):o),i=[];return et.spans(r,e.from,e.to,{point(){},span(o,s,a,l){let c=o-e.from,u=s-e.from,f=i;for(let d=a.length-1;d>=0;d--,l--){let h=a[d].spec.bidiIsolate,p;if(h==null&&(h=fN(e.text,c,u)),l>0&&f.length&&(p=f[f.length-1]).to==c&&p.direction==h)p.to=u,f=p.inner;else{let O={from:c,to:u,direction:h,inner:[]};f.push(O),f=O.inner}}}}),i}const R2=me.define();function D2(t){let e=0,n=0,r=0,i=0;for(let o of t.state.facet(R2)){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&&(r=Math.max(r,s.top)),s.bottom!=null&&(i=Math.max(i,s.bottom)))}return{left:e,right:n,top:r,bottom:i}}const ul=me.define();class Ir{constructor(e,n,r,i){this.fromA=e,this.toA=n,this.fromB=r,this.toB=i}join(e){return new Ir(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,r=this;for(;n>0;n--){let i=e[n-1];if(!(i.fromA>r.toA)){if(i.toA<r.fromA)break;r=r.join(i),e.splice(n-1,1)}}return e.splice(n,0,r),e}static extendWithRanges(e,n){if(n.length==0)return e;let r=[];for(let i=0,o=0,s=0,a=0;;i++){let l=i==e.length?null:e[i],c=s-a,u=l?l.fromB:1e9;for(;o<n.length&&n[o]<u;){let f=n[o],d=n[o+1],h=Math.max(a,f),p=Math.min(u,d);if(h<=p&&new Ir(h+c,p+c,h,p).addToSet(r),d>u)break;o+=2}if(!l)return r;new Ir(l.fromA,l.toA,l.fromB,l.toB).addToSet(r),s=l.toA,a=l.toB}}}class Df{constructor(e,n,r){this.view=e,this.state=n,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=rn.empty(this.startState.doc.length);for(let o of r)this.changes=this.changes.compose(o.changes);let i=[];this.changes.iterChangedRanges((o,s,a,l)=>i.push(new Ir(o,s,a,l))),this.changedRanges=i}static create(e,n,r){return new Df(e,n,r)}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 hb extends Ct{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 tn],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new Ir(0,0,0,e.state.doc.length)],0,null)}update(e){var n;let r=e.changedRanges;this.minWidth>0&&r.length&&(r.every(({fromA:c,toA:u})=>u<this.minWidthFrom||c>this.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 i=-1;this.view.inputState.composing>=0&&(!((n=this.domChanged)===null||n===void 0)&&n.newSel?i=this.domChanged.newSel.head:!vN(e.changes,this.hasComposition)&&!e.selectionSet&&(i=e.state.selection.main.head));let o=i>-1?pN(this.view,e.changes,i):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:c,to:u}=this.hasComposition;r=new Ir(c,u,e.changes.mapPos(c,-1),e.changes.mapPos(u,1)).addToSet(r.slice())}this.hasComposition=o?{from:o.range.fromB,to:o.range.toB}:null,(Oe.ie||Oe.chrome)&&!o&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let s=this.decorations,a=this.updateDeco(),l=ON(s,a,e.changes);return r=Ir.extendWithRanges(r,l),!(this.flags&7)&&r.length==0?!1:(this.updateInner(r,e.startState.doc.length,o),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,n,r){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,n,r);let{observer:i}=this.view;i.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let s=Oe.chrome||Oe.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,s),this.flags&=-8,s&&(s.written||i.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<this.view.state.doc.length)for(let s of this.children)s instanceof uo&&s.widget instanceof pb&&o.push(s.dom);i.updateGaps(o)}updateChildren(e,n,r){let i=r?r.range.addToSet(e.slice()):e,o=this.childCursor(n);for(let s=i.length-1;;s--){let a=s>=0?i[s]:null;if(!a)break;let{fromA:l,toA:c,fromB:u,toB:f}=a,d,h,p,O;if(r&&r.range.fromB<f&&r.range.toB>u){let S=kl.build(this.view.state.doc,u,r.range.fromB,this.decorations,this.dynamicDecorationMap),b=kl.build(this.view.state.doc,r.range.toB,f,this.decorations,this.dynamicDecorationMap);h=S.breakAtStart,p=S.openStart,O=b.openEnd;let w=this.compositionView(r);b.breakAtStart?w.breakAfter=1:b.content.length&&w.merge(w.length,w.length,b.content[0],!1,b.openStart,0)&&(w.breakAfter=b.content[0].breakAfter,b.content.shift()),S.content.length&&w.merge(0,0,S.content[S.content.length-1],!0,0,S.openEnd)&&S.content.pop(),d=S.content.concat(w).concat(b.content)}else({content:d,breakAtStart:h,openStart:p,openEnd:O}=kl.build(this.view.state.doc,u,f,this.decorations,this.dynamicDecorationMap));let{i:m,off:x}=o.findPos(c,1),{i:v,off:y}=o.findPos(l,-1);l2(this,v,y,m,x,d,h,p,O)}r&&this.fixCompositionDOM(r)}compositionView(e){let n=new zr(e.text.nodeValue);n.flags|=8;for(let{deco:i}of e.marks)n=new Fi(i,[n],n.length);let r=new tn;return r.append(n,0),r}fixCompositionDOM(e){let n=(o,s)=>{s.flags|=8|(s.children.some(l=>l.flags&7)?1:0),this.markedForComposition.add(s);let a=Ct.get(o);a&&a!=s&&(a.dom=null),s.setDOM(o)},r=this.childPos(e.range.fromB,1),i=this.children[r.i];n(e.line,i);for(let o=e.marks.length-1;o>=-1;o--)r=i.childPos(r.off,1),i=i.children[r.i],n(o>=0?e.marks[o].node:e.text,i)}updateSelection(e=!1,n=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let r=this.view.root.activeElement,i=r==this.dom,o=!i&&Wu(this.dom,this.view.observer.selectionRange)&&!(r&&this.dom.contains(r));if(!(i||n||o))return;let s=this.forceSelection;this.forceSelection=!1;let a=this.view.state.selection.main,l=this.moveToLine(this.domAtPos(a.anchor)),c=a.empty?l:this.moveToLine(this.domAtPos(a.head));if(Oe.gecko&&a.empty&&!this.hasComposition&&hN(l)){let f=document.createTextNode("");this.view.observer.ignore(()=>l.node.insertBefore(f,l.node.childNodes[l.offset]||null)),l=c=new $n(f,0),s=!0}let u=this.view.observer.selectionRange;(s||!u.focusNode||(!Cl(l.node,l.offset,u.anchorNode,u.anchorOffset)||!Cl(c.node,c.offset,u.focusNode,u.focusOffset))&&!this.suppressWidgetCursorChange(u,a))&&(this.view.observer.ignore(()=>{Oe.android&&Oe.chrome&&this.dom.contains(u.focusNode)&&xN(u.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let f=jf(this.view.root);if(f)if(a.empty){if(Oe.gecko){let d=gN(l.node,l.offset);if(d&&d!=3){let h=(d==1?o2:s2)(l.node,l.offset);h&&(l=new $n(h.node,h.offset))}}f.collapse(l.node,l.offset),a.bidiLevel!=null&&f.caretBidiLevel!==void 0&&(f.caretBidiLevel=a.bidiLevel)}else if(f.extend){f.collapse(l.node,l.offset);try{f.extend(c.node,c.offset)}catch{}}else{let d=document.createRange();a.anchor>a.head&&([l,c]=[c,l]),d.setEnd(c.node,c.offset),d.setStart(l.node,l.offset),f.removeAllRanges(),f.addRange(d)}o&&this.view.root.activeElement==this.dom&&(this.dom.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(l,c)),this.impreciseAnchor=l.precise?null:new $n(u.anchorNode,u.anchorOffset),this.impreciseHead=c.precise?null:new $n(u.focusNode,u.focusOffset)}suppressWidgetCursorChange(e,n){return this.hasComposition&&n.empty&&Cl(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,r=jf(e.root),{anchorNode:i,anchorOffset:o}=e.observer.selectionRange;if(!r||!n.empty||!n.assoc||!r.modify)return;let s=tn.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),c=this.coordsAt(n.head,1);if(!l||!c||l.bottom>c.top)return;let u=this.domAtPos(n.head+n.assoc);r.collapse(u.node,u.offset),r.modify("move",n.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let f=e.observer.selectionRange;e.docView.posFromDOM(f.anchorNode,f.anchorOffset)!=n.from&&r.collapse(i,o)}moveToLine(e){let n=this.dom,r;if(e.node!=n)return e;for(let i=e.offset;!r&&i<n.childNodes.length;i++){let o=Ct.get(n.childNodes[i]);o instanceof tn&&(r=o.domAtPos(0))}for(let i=e.offset-1;!r&&i>=0;i--){let o=Ct.get(n.childNodes[i]);o instanceof tn&&(r=o.domAtPos(o.length))}return r?new $n(r.node,r.offset,!0):e}nearest(e){for(let n=e;n;){let r=Ct.get(n);if(r&&r.rootView==this)return r;n=n.parentNode}return null}posFromDOM(e,n){let r=this.nearest(e);if(!r)throw new RangeError("Trying to find position for a DOM position outside of the document");return r.localPosFromDOM(e,n)+r.posAtStart}domAtPos(e){let{i:n,off:r}=this.childCursor().findPos(e,-1);for(;n<this.children.length-1;){let i=this.children[n];if(r<i.length||i instanceof tn)break;n++,r=0}return this.children[n].domAtPos(r)}coordsAt(e,n){let r=null,i=0;for(let o=this.length,s=this.children.length-1;s>=0;s--){let a=this.children[s],l=o-a.breakAfter,c=l-a.length;if(l<e)break;c<=e&&(c<e||a.covers(-1))&&(l>e||a.covers(1))&&(!r||a instanceof tn&&!(r instanceof tn&&n>=0))&&(r=a,i=c),o=c}return r?r.coordsAt(e-i,n):null}coordsForChar(e){let{i:n,off:r}=this.childPos(e,1),i=this.children[n];if(!(i instanceof tn))return null;for(;i.children.length;){let{i:a,off:l}=i.childPos(r,1);for(;;a++){if(a==i.children.length)return null;if((i=i.children[a]).length)break}r=l}if(!(i instanceof zr))return null;let o=kn(i.text,r);if(o==r)return null;let s=ts(i.dom,r,o).getClientRects();for(let a=0;a<s.length;a++){let l=s[a];if(a==s.length-1||l.top<l.bottom&&l.left<l.right)return l}return null}measureVisibleLineHeights(e){let n=[],{from:r,to:i}=e,o=this.view.contentDOM.clientWidth,s=o>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,l=this.view.textDirection==$t.LTR;for(let c=0,u=0;u<this.children.length;u++){let f=this.children[u],d=c+f.length;if(d>i)break;if(c>=r){let h=f.dom.getBoundingClientRect();if(n.push(h.height),s){let p=f.dom.lastChild,O=p?la(p):[];if(O.length){let m=O[O.length-1],x=l?m.right-h.left:h.right-m.left;x>a&&(a=x,this.minWidth=o,this.minWidthFrom=c,this.minWidthTo=d)}}}c=d+f.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 tn){let s=o.measureTextSize();if(s)return s}let e=document.createElement("div"),n,r,i;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=la(e.firstChild)[0];n=e.getBoundingClientRect().height,r=o?o.width/27:7,i=o?o.height:n,e.remove()}),{lineHeight:n,charWidth:r,textHeight:i}}childCursor(e=this.length){let n=this.children.length;return n&&(e-=this.children[--n].length),new a2(this.children,e,n)}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let r=0,i=0;;i++){let o=i==n.viewports.length?null:n.viewports[i],s=o?o.from-1:this.length;if(s>r){let a=(n.lineBlockAt(s).bottom-n.lineBlockAt(r).top)/this.view.scaleY;e.push(we.replace({widget:new pb(a),block:!0,inclusive:!0,isBlockGap:!0}).range(r,s))}if(!o)break;r=o.to+1}return we.set(e)}updateDeco(){let e=0,n=this.view.state.facet(Zl).map(o=>(this.dynamicDecorationMap[e++]=typeof o=="function")?o(this.view):o),r=!1,i=this.view.state.facet($2).map((o,s)=>{let a=typeof o=="function";return a&&(r=!0),a?o(this.view):o});for(i.length&&(this.dynamicDecorationMap[e++]=r,n.push(et.join(i))),this.decorations=[...n,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;return this.decorations}scrollIntoView(e){if(e.isSnapshot){let c=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=c.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let c of this.view.state.facet(I2))try{if(c(this.view,e.range,e))return!0}catch(u){Zn(this.view.state,u,"scroll handler")}let{range:n}=e,r=this.coordsAt(n.head,n.empty?n.assoc:n.head>n.anchor?-1:1),i;if(!r)return;!n.empty&&(i=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(r={left:Math.min(r.left,i.left),top:Math.min(r.top,i.top),right:Math.max(r.right,i.right),bottom:Math.max(r.bottom,i.bottom)});let o=D2(this.view),s={left:r.left-o.left,top:r.top-o.top,right:r.right+o.right,bottom:r.bottom+o.bottom},{offsetWidth:a,offsetHeight:l}=this.view.scrollDOM;G8(this.view.scrollDOM,s,n.head<n.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,a),-a),Math.max(Math.min(e.yMargin,l),-l),this.view.textDirection==$t.LTR)}}function hN(t){return t.node.nodeType==1&&t.node.firstChild&&(t.offset==0||t.node.childNodes[t.offset-1].contentEditable=="false")&&(t.offset==t.node.childNodes.length||t.node.childNodes[t.offset].contentEditable=="false")}class pb extends ki{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}function Q2(t,e){let n=t.observer.selectionRange;if(!n.focusNode)return null;let r=o2(n.focusNode,n.focusOffset),i=s2(n.focusNode,n.focusOffset),o=r||i;if(i&&r&&i.node!=r.node){let a=Ct.get(i.node);if(!a||a instanceof zr&&a.text!=i.node.nodeValue)o=i;else if(t.docView.lastCompositionAfterCursor){let l=Ct.get(r.node);!l||l instanceof zr&&l.text!=r.node.nodeValue||(o=i)}}if(t.docView.lastCompositionAfterCursor=o!=r,!o)return null;let s=e-o.offset;return{from:s,to:s+o.node.nodeValue.length,node:o.node}}function pN(t,e,n){let r=Q2(t,n);if(!r)return null;let{node:i,from:o,to:s}=r,a=i.nodeValue;if(/[\n\r]/.test(a)||t.state.doc.sliceString(r.from,r.to)!=a)return null;let l=e.invertedDesc,c=new Ir(l.mapPos(o),l.mapPos(s),o,s),u=[];for(let f=i.parentNode;;f=f.parentNode){let d=Ct.get(f);if(d instanceof Fi)u.push({node:f,deco:d.mark});else{if(d instanceof tn||f.nodeName=="DIV"&&f.parentNode==t.contentDOM)return{range:c,text:i,marks:u,line:f};if(f!=t.contentDOM)u.push({node:f,deco:new hc({inclusive:!0,attributes:tN(f),tagName:f.tagName.toLowerCase()})});else return null}}}function gN(t,e){return t.nodeType!=1?0:(e&&t.childNodes[e-1].contentEditable=="false"?1:0)|(e<t.childNodes.length&&t.childNodes[e].contentEditable=="false"?2:0)}let mN=class{constructor(){this.changes=[]}compareRange(e,n){_0(e,n,this.changes)}comparePoint(e,n){_0(e,n,this.changes)}};function ON(t,e,n){let r=new mN;return et.compare(t,e,n,r),r.changes}function xN(t,e){for(let n=t;n&&n!=e;n=n.assignedSlot||n.parentNode)if(n.nodeType==1&&n.contentEditable=="false")return!0;return!1}function vN(t,e){let n=!1;return e&&t.iterChangedRanges((r,i)=>{r<e.to&&i>e.from&&(n=!0)}),n}function yN(t,e,n=1){let r=t.charCategorizer(e),i=t.doc.lineAt(e),o=e-i.from;if(i.length==0)return ie.cursor(e);o==0?n=1:o==i.length&&(n=-1);let s=o,a=o;n<0?s=kn(i.text,o,!1):a=kn(i.text,o);let l=r(i.text.slice(s,a));for(;s>0;){let c=kn(i.text,s,!1);if(r(i.text.slice(c,s))!=l)break;s=c}for(;a<i.length;){let c=kn(i.text,a);if(r(i.text.slice(a,c))!=l)break;a=c}return ie.range(s+i.from,a+i.from)}function bN(t,e){return e.left>t?e.left-t:Math.max(0,t-e.right)}function SN(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function rp(t,e){return t.top<e.bottom-1&&t.bottom>e.top+1}function gb(t,e){return e<t.top?{top:e,left:t.left,right:t.right,bottom:t.bottom}:t}function mb(t,e){return e>t.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function W0(t,e,n){let r,i,o,s,a=!1,l,c,u,f;for(let p=t.firstChild;p;p=p.nextSibling){let O=la(p);for(let m=0;m<O.length;m++){let x=O[m];i&&rp(i,x)&&(x=gb(mb(x,i.bottom),i.top));let v=bN(e,x),y=SN(n,x);if(v==0&&y==0)return p.nodeType==3?Ob(p,e,n):W0(p,e,n);if(!r||s>y||s==y&&o>v){r=p,i=x,o=v,s=y;let S=y?n<x.top?-1:1:v?e<x.left?-1:1:0;a=!S||(S>0?m<O.length-1:m>0)}v==0?n>x.bottom&&(!u||u.bottom<x.bottom)?(l=p,u=x):n<x.top&&(!f||f.top>x.top)&&(c=p,f=x):u&&rp(u,x)?u=mb(u,x.bottom):f&&rp(f,x)&&(f=gb(f,x.top))}}if(u&&u.bottom>=n?(r=l,i=u):f&&f.top<=n&&(r=c,i=f),!r)return{node:t,offset:0};let d=Math.max(i.left,Math.min(i.right,e));if(r.nodeType==3)return Ob(r,d,n);if(a&&r.contentEditable!="false")return W0(r,d,n);let h=Array.prototype.indexOf.call(t.childNodes,r)+(e>=(i.left+i.right)/2?1:0);return{node:t,offset:h}}function Ob(t,e,n){let r=t.nodeValue.length,i=-1,o=1e9,s=0;for(let a=0;a<r;a++){let l=ts(t,a,a+1).getClientRects();for(let c=0;c<l.length;c++){let u=l[c];if(u.top==u.bottom)continue;s||(s=e-u.left);let f=(u.top>n?u.top-n:n-u.bottom)-1;if(u.left-1<=e&&u.right+1>=e&&f<o){let d=e>=(u.left+u.right)/2,h=d;if((Oe.chrome||Oe.gecko)&&ts(t,a).getBoundingClientRect().left==u.right&&(h=!d),f<=0)return{node:t,offset:a+(h?1:0)};i=a+(h?1:0),o=f}}}return{node:t,offset:i>-1?i:s>0?t.nodeValue.length:0}}function B2(t,e,n,r=-1){var i,o;let s=t.contentDOM.getBoundingClientRect(),a=s.top+t.viewState.paddingTop,l,{docHeight:c}=t.viewState,{x:u,y:f}=e,d=f-a;if(d<0)return 0;if(d>c)return t.state.doc.length;for(let S=t.viewState.heightOracle.textHeight/2,b=!1;l=t.elementAtHeight(d),l.type!=Wn.Text;)for(;d=r>0?l.bottom+S:l.top-S,!(d>=0&&d<=c);){if(b)return n?null:0;b=!0,r=-r}f=a+d;let h=l.from;if(h<t.viewport.from)return t.viewport.from==0?0:n?null:xb(t,s,l,u,f);if(h>t.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:n?null:xb(t,s,l,u,f);let p=t.dom.ownerDocument,O=t.root.elementFromPoint?t.root:p,m=O.elementFromPoint(u,f);m&&!t.contentDOM.contains(m)&&(m=null),m||(u=Math.max(s.left+1,Math.min(s.right-1,u)),m=O.elementFromPoint(u,f),m&&!t.contentDOM.contains(m)&&(m=null));let x,v=-1;if(m&&((i=t.docView.nearest(m))===null||i===void 0?void 0:i.isEditable)!=!1){if(p.caretPositionFromPoint){let S=p.caretPositionFromPoint(u,f);S&&({offsetNode:x,offset:v}=S)}else if(p.caretRangeFromPoint){let S=p.caretRangeFromPoint(u,f);S&&({startContainer:x,startOffset:v}=S,(!t.contentDOM.contains(x)||Oe.safari&&wN(x,v,u)||Oe.chrome&&CN(x,v,u))&&(x=void 0))}}if(!x||!t.docView.dom.contains(x)){let S=tn.find(t.docView,h);if(!S)return d>l.top+l.height/2?l.to:l.from;({node:x,offset:v}=W0(S.dom,u,f))}let y=t.docView.nearest(x);if(!y)return null;if(y.isWidget&&((o=y.dom)===null||o===void 0?void 0:o.nodeType)==1){let S=y.dom.getBoundingClientRect();return e.y<S.top||e.y<=S.bottom&&e.x<=(S.left+S.right)/2?y.posAtStart:y.posAtEnd}else return y.localPosFromDOM(x,v)+y.posAtStart}function xb(t,e,n,r,i){let o=Math.round((r-e.left)*t.defaultCharacterWidth);if(t.lineWrapping&&n.height>t.defaultLineHeight*1.5){let a=t.viewState.heightOracle.textHeight,l=Math.floor((i-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+E0(s,o,t.state.tabSize)}function wN(t,e,n){let r;if(t.nodeType!=3||e!=(r=t.nodeValue.length))return!1;for(let i=t.nextSibling;i;i=i.nextSibling)if(i.nodeType!=1||i.nodeName!="BR")return!1;return ts(t,r-1,r).getBoundingClientRect().left>n}function CN(t,e,n){if(e!=0)return!1;for(let i=t;;){let o=i.parentNode;if(!o||o.nodeType!=1||o.firstChild!=i)return!1;if(o.classList.contains("cm-line"))break;i=o}let r=t.nodeType==1?t.getBoundingClientRect():ts(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect();return n-r.left>5}function V0(t,e){let n=t.lineBlockAt(e);if(Array.isArray(n.type)){for(let r of n.type)if(r.to>e||r.to==e&&(r.to==n.to||r.type==Wn.Text))return r}return n}function kN(t,e,n,r){let i=V0(t,e.head),o=!r||i.type!=Wn.Text||!(t.lineWrapping||i.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head);if(o){let s=t.dom.getBoundingClientRect(),a=t.textDirectionAt(i.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 ie.cursor(l,n?-1:1)}return ie.cursor(n?i.to:i.from,n?-1:1)}function vb(t,e,n,r){let i=t.state.doc.lineAt(e.head),o=t.bidiSpans(i),s=t.textDirectionAt(i.from);for(let a=e,l=null;;){let c=uN(i,o,s,a,n),u=y2;if(!c){if(i.number==(n?t.state.doc.lines:1))return a;u=`
667
+ `,i=t.state.doc.line(i.number+(n?1:-1)),o=t.bidiSpans(i),c=t.visualLineSide(i,!n)}if(l){if(!l(u))return a}else{if(!r)return c;l=r(u)}a=c}}function AN(t,e,n){let r=t.state.charCategorizer(e),i=r(n);return o=>{let s=r(o);return i==Rt.Space&&(i=s),i==s}}function PN(t,e,n,r){let i=e.head,o=n?1:-1;if(i==(n?t.state.doc.length:0))return ie.cursor(i,e.assoc);let s=e.goalColumn,a,l=t.contentDOM.getBoundingClientRect(),c=t.coordsAtPos(i,e.assoc||-1),u=t.documentTop;if(c)s==null&&(s=c.left-l.left),a=o<0?c.top:c.bottom;else{let h=t.viewState.lineBlockAt(i);s==null&&(s=Math.min(l.right-l.left,t.defaultCharacterWidth*(i-h.from))),a=(o<0?h.top:h.bottom)+u}let f=l.left+s,d=r??t.viewState.heightOracle.textHeight>>1;for(let h=0;;h+=10){let p=a+(d+h)*o,O=B2(t,{x:f,y:p},!1,o);if(p<l.top||p>l.bottom||(o<0?O<i:O>i)){let m=t.docView.coordsForChar(O),x=!m||p<m.top?-1:1;return ie.cursor(O,x,void 0,s)}}}function Vu(t,e,n){for(;;){let r=0;for(let i of t)i.between(e-1,e+1,(o,s,a)=>{if(e>o&&e<s){let l=r||n||(e-o<s-e?-1:1);e=l<0?o:s,r=l}});if(!r)return e}}function ip(t,e,n){let r=Vu(t.state.facet(XO).map(i=>i(t)),n.from,e.head>n.from?-1:1);return r==n.from?n:ie.cursor(r,r<n.from?1:-1)}class EN{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastEscPress=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,Oe.safari&&e.contentDOM.addEventListener("input",()=>null),Oe.gecko&&zN(e.contentDOM.ownerDocument)}handleEvent(e){!BN(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||this.runHandlers(e.type,e)}runHandlers(e,n){let r=this.handlers[e];if(r){for(let i of r.observers)i(this.view,n);for(let i of r.handlers){if(n.defaultPrevented)break;if(i(this.view,n)){n.preventDefault();break}}}}ensureHandlers(e){let n=IN(e),r=this.handlers,i=this.view.contentDOM;for(let o in n)if(o!="scroll"){let s=!n[o].handlers.length,a=r[o];a&&s!=!a.handlers.length&&(i.removeEventListener(o,this.handleEvent),a=null),a||i.addEventListener(o,this.handleEvent,{passive:s})}for(let o in r)o!="scroll"&&!n[o]&&i.removeEventListener(o,this.handleEvent);this.handlers=n}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&Date.now()<this.lastEscPress+2e3)return!0;if(e.keyCode!=27&&M2.indexOf(e.keyCode)<0&&(this.view.inputState.lastEscPress=0),Oe.android&&Oe.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let n;return Oe.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((n=_2.find(r=>r.keyCode==e.keyCode))&&!e.ctrlKey||TN.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.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,Gs(this.view.contentDOM,n.key,n.keyCode,n instanceof KeyboardEvent?n:void 0))}ignoreDuringComposition(e){return/^key/.test(e.type)?this.composing>0?!0:Oe.safari&&!Oe.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 yb(t,e){return(n,r)=>{try{return e.call(t,r,n)}catch(i){Zn(n.state,i)}}}function IN(t){let e=Object.create(null);function n(r){return e[r]||(e[r]={observers:[],handlers:[]})}for(let r of t){let i=r.spec;if(i&&i.domEventHandlers)for(let o in i.domEventHandlers){let s=i.domEventHandlers[o];s&&n(o).handlers.push(yb(r.value,s))}if(i&&i.domEventObservers)for(let o in i.domEventObservers){let s=i.domEventObservers[o];s&&n(o).observers.push(yb(r.value,s))}}for(let r in Lr)n(r).handlers.push(Lr[r]);for(let r in jr)n(r).observers.push(jr[r]);return e}const _2=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],TN="dthko",M2=[16,17,18,20,91,92,224,225],su=6;function au(t){return Math.max(0,t)*.7+8}function $N(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}class jN{constructor(e,n,r,i){this.view=e,this.startEvent=n,this.style=r,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParent=Y8(e.contentDOM),this.atoms=e.state.facet(XO).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(Ue.allowMultipleSelections)&&RN(e,n),this.dragging=QN(e,n)&&W2(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&&$N(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let r=0,i=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=D2(this.view);e.clientX-s.left<=o.left+su?r=-au(o.left-e.clientX):e.clientX+s.right>=o.right-su&&(r=au(e.clientX-o.right)),e.clientY-s.top<=o.top+su?i=-au(o.top-e.clientY):e.clientY+s.bottom>=o.bottom-su&&(i=au(e.clientY-o.bottom)),this.setScrollSpeed(r,i)}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 r=0;r<e.ranges.length;r++){let i=e.ranges[r],o=null;if(i.empty){let s=Vu(this.atoms,i.from,0);s!=i.from&&(o=ie.cursor(s,-1))}else{let s=Vu(this.atoms,i.from,-1),a=Vu(this.atoms,i.to,1);(s!=i.from||a!=i.to)&&(o=ie.range(i.from==i.anchor?s:a,i.from==i.head?s:a))}o&&(n||(n=e.ranges.slice()),n[r]=o)}return n?ie.create(n,e.mainIndex):e}select(e){let{view:n}=this,r=this.skipAtoms(this.style.get(e,this.extend,this.multiple));(this.mustSelect||!r.eq(n.state.selection,this.dragging===!1))&&this.view.dispatch({selection:r,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function RN(t,e){let n=t.state.facet(b2);return n.length?n[0](e):Oe.mac?e.metaKey:e.ctrlKey}function DN(t,e){let n=t.state.facet(S2);return n.length?n[0](e):Oe.mac?!e.altKey:!e.ctrlKey}function QN(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let r=jf(t.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let o=0;o<i.length;o++){let s=i[o];if(s.left<=e.clientX&&s.right>=e.clientX&&s.top<=e.clientY&&s.bottom>=e.clientY)return!0}return!1}function BN(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,r;n!=t.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(r=Ct.get(n))&&r.ignoreEvent(e))return!1;return!0}const Lr=Object.create(null),jr=Object.create(null),N2=Oe.ie&&Oe.ie_version<15||Oe.ios&&Oe.webkit_version<604;function _N(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(),F2(t,n.value)},50)}function F2(t,e){let{state:n}=t,r,i=1,o=n.toText(e),s=o.lines==n.selection.ranges.length;if(z0!=null&&n.selection.ranges.every(l=>l.empty)&&z0==o.toString()){let l=-1;r=n.changeByRange(c=>{let u=n.doc.lineAt(c.from);if(u.from==l)return{range:c};l=u.from;let f=n.toText((s?o.line(i++).text:e)+n.lineBreak);return{changes:{from:u.from,insert:f},range:ie.cursor(c.from+f.length)}})}else s?r=n.changeByRange(l=>{let c=o.line(i++);return{changes:{from:l.from,to:l.to,insert:c.text},range:ie.cursor(l.from+c.length)}}):r=n.replaceSelection(o);t.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}jr.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft};Lr.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),e.keyCode==27&&(t.inputState.lastEscPress=Date.now()),!1);jr.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")};jr.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};Lr.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of t.state.facet(w2))if(n=r(t,e),n)break;if(!n&&e.button==0&&(n=FN(t,e)),n){let r=!t.hasFocus;t.inputState.startMouseSelection(new jN(t,e,n,r)),r&&t.observer.ignore(()=>n2(t.contentDOM));let i=t.inputState.mouseSelection;if(i)return i.start(e),i.dragging===!1}return!1};function bb(t,e,n,r){if(r==1)return ie.cursor(e,n);if(r==2)return yN(t.state,e,n);{let i=tn.find(t.docView,e),o=t.state.doc.lineAt(i?i.posAtEnd:e),s=i?i.posAtStart:o.from,a=i?i.posAtEnd:o.to;return a<t.state.doc.length&&a==o.to&&a++,ie.range(s,a)}}let Z2=(t,e)=>t>=e.top&&t<=e.bottom,Sb=(t,e,n)=>Z2(e,n)&&t>=n.left&&t<=n.right;function MN(t,e,n,r){let i=tn.find(t.docView,e);if(!i)return 1;let o=e-i.posAtStart;if(o==0)return 1;if(o==i.length)return-1;let s=i.coordsAt(o,-1);if(s&&Sb(n,r,s))return-1;let a=i.coordsAt(o,1);return a&&Sb(n,r,a)?1:s&&Z2(r,s)?-1:1}function wb(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:n,bias:MN(t,n,e.clientX,e.clientY)}}const NN=Oe.ie&&Oe.ie_version<=11;let Cb=null,kb=0,Ab=0;function W2(t){if(!NN)return t.detail;let e=Cb,n=Ab;return Cb=t,Ab=Date.now(),kb=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(kb+1)%3:1}function FN(t,e){let n=wb(t,e),r=W2(e),i=t.state.selection;return{update(o){o.docChanged&&(n.pos=o.changes.mapPos(n.pos),i=i.map(o.changes))},get(o,s,a){let l=wb(t,o),c,u=bb(t,l.pos,l.bias,r);if(n.pos!=l.pos&&!s){let f=bb(t,n.pos,n.bias,r),d=Math.min(f.from,u.from),h=Math.max(f.to,u.to);u=d<u.from?ie.range(d,h):ie.range(h,d)}return s?i.replaceRange(i.main.extend(u.from,u.to)):a&&r==1&&i.ranges.length>1&&(c=ZN(i,l.pos))?c:a?i.addRange(u):ie.create([u])}}}function ZN(t,e){for(let n=0;n<t.ranges.length;n++){let{from:r,to:i}=t.ranges[n];if(r<=e&&i>=e)return ie.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}Lr.dragstart=(t,e)=>{let{selection:{main:n}}=t.state;if(e.target.draggable){let i=t.docView.nearest(e.target);if(i&&i.isWidget){let o=i.posAtStart,s=o+i.length;(o>=n.to||s<=n.from)&&(n=ie.range(o,s))}}let{inputState:r}=t;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,e.dataTransfer&&(e.dataTransfer.setData("Text",t.state.sliceDoc(n.from,n.to)),e.dataTransfer.effectAllowed="copyMove"),!1};Lr.dragend=t=>(t.inputState.draggedContent=null,!1);function Pb(t,e,n,r){if(!n)return;let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:o}=t.inputState,s=r&&o&&DN(t,e)?{from:o.from,to:o.to}:null,a={from:i,insert:n},l=t.state.changes(s?[s,a]:a);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(i,-1),head:l.mapPos(i,1)},userEvent:s?"move.drop":"input.drop"}),t.inputState.draggedContent=null}Lr.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let n=e.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,o=()=>{++i==n.length&&Pb(t,e,r.filter(s=>s!=null).join(t.state.lineBreak),!1)};for(let s=0;s<n.length;s++){let a=new FileReader;a.onerror=o,a.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(a.result)||(r[s]=a.result),o()},a.readAsText(n[s])}return!0}else{let r=e.dataTransfer.getData("Text");if(r)return Pb(t,e,r,!0),!0}return!1};Lr.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let n=N2?null:e.clipboardData;return n?(F2(t,n.getData("text/plain")||n.getData("text/uri-list")),!0):(_N(t),!1)};function WN(t,e){let n=t.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout(()=>{r.remove(),t.focus()},50)}function VN(t){let e=[],n=[],r=!1;for(let i of t.selection.ranges)i.empty||(e.push(t.sliceDoc(i.from,i.to)),n.push(i));if(!e.length){let i=-1;for(let{from:o}of t.selection.ranges){let s=t.doc.lineAt(o);s.number>i&&(e.push(s.text),n.push({from:s.from,to:Math.min(t.doc.length,s.to+1)})),i=s.number}r=!0}return{text:e.join(t.lineBreak),ranges:n,linewise:r}}let z0=null;Lr.copy=Lr.cut=(t,e)=>{let{text:n,ranges:r,linewise:i}=VN(t.state);if(!n&&!i)return!1;z0=i?n:null,e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let o=N2?null:e.clipboardData;return o?(o.clearData(),o.setData("text/plain",n),!0):(WN(t,n),!1)};const V2=wi.define();function z2(t,e){let n=[];for(let r of t.facet(A2)){let i=r(t,e);i&&n.push(i)}return n?t.update({effects:n,annotations:V2.of(!0)}):null}function L2(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=z2(t.state,e);n?t.dispatch(n):t.update([])}},10)}jr.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),L2(t)};jr.blur=t=>{t.observer.clearSelectionRange(),L2(t)};jr.compositionstart=jr.compositionupdate=t=>{t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0)};jr.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,Oe.chrome&&Oe.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50)};jr.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};Lr.beforeinput=(t,e)=>{var n;let r;if(Oe.chrome&&Oe.android&&(r=_2.find(i=>i.inputType==e.inputType))&&(t.observer.delayAndroidKey(r.key,r.keyCode),r.key=="Backspace"||r.key=="Delete")){let i=((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)>i+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return Oe.ios&&e.inputType=="deleteContentForward"&&t.observer.flushSoon(),Oe.safari&&e.inputType=="insertText"&&t.inputState.composing>=0&&setTimeout(()=>jr.compositionend(t,e),20),!1};const Eb=new Set;function zN(t){Eb.has(t)||(Eb.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}const Ib=["pre-wrap","normal","pre-line","break-spaces"];class LN{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 r=this.doc.lineAt(n).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(r+=Math.max(0,Math.ceil((n-e-r*this.lineLength*.5)/this.lineLength))),this.lineHeight*r}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 Ib.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let n=!1;for(let r=0;r<e.length;r++){let i=e[r];i<0?r++:this.heightSamples[Math.floor(i*10)]||(n=!0,this.heightSamples[Math.floor(i*10)]=!0)}return n}refresh(e,n,r,i,o,s){let a=Ib.indexOf(e)>-1,l=Math.round(n)!=Math.round(this.lineHeight)||this.lineWrapping!=a;if(this.lineWrapping=a,this.lineHeight=n,this.charWidth=r,this.textHeight=i,this.lineLength=o,l){this.heightSamples={};for(let c=0;c<s.length;c++){let u=s[c];u<0?c++:this.heightSamples[Math.floor(u*10)]=!0}}return l}}class XN{constructor(e,n){this.from=e,this.heights=n,this.index=0}get more(){return this.index<this.heights.length}}class ai{constructor(e,n,r,i,o){this.from=e,this.length=n,this.top=r,this.height=i,this._content=o}get type(){return typeof this._content=="number"?Wn.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof vo?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let n=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new ai(this.from,this.length+e.length,this.top,this.height+e.height,n)}}var Tt=function(t){return t[t.ByPos=0]="ByPos",t[t.ByHeight=1]="ByHeight",t[t.ByPosNoHeight=2]="ByPosNoHeight",t}(Tt||(Tt={}));const zu=.001;class Vn{constructor(e,n,r=2){this.length=e,this.height=n,this.flags=r}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e,n){this.height!=n&&(Math.abs(this.height-n)>zu&&(e.heightChanged=!0),this.height=n)}replace(e,n,r){return Vn.of(r)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,r,i){let o=this,s=r.doc;for(let a=i.length-1;a>=0;a--){let{fromA:l,toA:c,fromB:u,toB:f}=i[a],d=o.lineAt(l,Tt.ByPosNoHeight,r.setDoc(n),0,0),h=d.to>=c?d:o.lineAt(c,Tt.ByPosNoHeight,r,0,0);for(f+=h.to-c,c=h.to;a>0&&d.from<=i[a-1].toA;)l=i[a-1].fromA,u=i[a-1].fromB,a--,l<d.from&&(d=o.lineAt(l,Tt.ByPosNoHeight,r,0,0));u+=d.from-l,l=d.from;let p=GO.build(r.setDoc(s),e,u,f);o=o.replace(l,c,p)}return o.updateHeight(r,0)}static empty(){return new fr(0,0)}static of(e){if(e.length==1)return e[0];let n=0,r=e.length,i=0,o=0;for(;;)if(n==r)if(i>o*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),r+=1+a.break,i-=a.size}else if(o>i*2){let a=e[r];a.break?e.splice(r,1,a.left,null,a.right):e.splice(r,1,a.left,a.right),r+=2+a.break,o-=a.size}else break;else if(i<o){let a=e[n++];a&&(i+=a.size)}else{let a=e[--r];a&&(o+=a.size)}let s=0;return e[n-1]==null?(s=1,n--):e[n]==null&&(s=1,r++),new GN(Vn.of(e.slice(0,n)),s,Vn.of(e.slice(r)))}}Vn.prototype.size=1;class X2 extends Vn{constructor(e,n,r){super(e,n),this.deco=r}blockAt(e,n,r,i){return new ai(i,this.length,r,this.height,this.deco||0)}lineAt(e,n,r,i,o){return this.blockAt(0,r,i,o)}forEachLine(e,n,r,i,o,s){e<=o+this.length&&n>=o&&s(this.blockAt(0,r,i,o))}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more&&this.setHeight(e,i.heights[i.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class fr extends X2{constructor(e,n){super(e,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,n,r,i){return new ai(i,this.length,r,this.height,this.breaks)}replace(e,n,r){let i=r[0];return r.length==1&&(i instanceof fr||i instanceof mn&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof mn?i=new fr(i.length,this.height):i.height=this.height,this.outdated||(i.outdated=!1),i):Vn.of(r)}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more?this.setHeight(e,i.heights[i.index++]):(r||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 mn extends Vn{constructor(e){super(e,0)}heightMetrics(e,n){let r=e.doc.lineAt(n).number,i=e.doc.lineAt(n+this.length).number,o=i-r+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:r,lastLine:i,perLine:s,perChar:a}}blockAt(e,n,r,i){let{firstLine:o,lastLine:s,perLine:a,perChar:l}=this.heightMetrics(n,i);if(n.lineWrapping){let c=i+(e<n.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-r)/this.height))*this.length)),u=n.doc.lineAt(c),f=a+u.length*l,d=Math.max(r,e-f/2);return new ai(u.from,u.length,d,f,0)}else{let c=Math.max(0,Math.min(s-o,Math.floor((e-r)/a))),{from:u,length:f}=n.doc.line(o+c);return new ai(u,f,r+a*c,a,0)}}lineAt(e,n,r,i,o){if(n==Tt.ByHeight)return this.blockAt(e,r,i,o);if(n==Tt.ByPosNoHeight){let{from:h,to:p}=r.doc.lineAt(e);return new ai(h,p-h,0,0,0)}let{firstLine:s,perLine:a,perChar:l}=this.heightMetrics(r,o),c=r.doc.lineAt(e),u=a+c.length*l,f=c.number-s,d=i+a*f+l*(c.from-o-f);return new ai(c.from,c.length,Math.max(i,Math.min(d,i+this.height-u)),u,0)}forEachLine(e,n,r,i,o,s){e=Math.max(e,o),n=Math.min(n,o+this.length);let{firstLine:a,perLine:l,perChar:c}=this.heightMetrics(r,o);for(let u=e,f=i;u<=n;){let d=r.doc.lineAt(u);if(u==e){let p=d.number-a;f+=l*p+c*(e-o-p)}let h=l+c*d.length;s(new ai(d.from,d.length,f,h,0)),f+=h,u=d.to+1}}replace(e,n,r){let i=this.length-n;if(i>0){let o=r[r.length-1];o instanceof mn?r[r.length-1]=new mn(o.length+i):r.push(null,new mn(i-1))}if(e>0){let o=r[0];o instanceof mn?r[0]=new mn(e+o.length):r.unshift(new mn(e-1),null)}return Vn.of(r)}decomposeLeft(e,n){n.push(new mn(e-1),null)}decomposeRight(e,n){n.push(null,new mn(this.length-e-1))}updateHeight(e,n=0,r=!1,i){let o=n+this.length;if(i&&i.from<=n+this.length&&i.more){let s=[],a=Math.max(n,i.from),l=-1;for(i.from>n&&s.push(new mn(i.from-n-1).updateHeight(e,n));a<=o&&i.more;){let u=e.doc.lineAt(a).length;s.length&&s.push(null);let f=i.heights[i.index++];l==-1?l=f:Math.abs(f-l)>=zu&&(l=-2);let d=new fr(u,f);d.outdated=!1,s.push(d),a+=u+1}a<=o&&s.push(null,new mn(o-a).updateHeight(e,a));let c=Vn.of(s);return(l<0||Math.abs(c.height-this.height)>=zu||Math.abs(l-this.heightMetrics(e,n).perLine)>=zu)&&(e.heightChanged=!0),c}else(r||this.outdated)&&(this.setHeight(e,e.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class GN extends Vn{constructor(e,n,r){super(e.length+n+r.length,e.height+r.height,n|(e.outdated||r.outdated?2:0)),this.left=e,this.right=r,this.size=e.size+r.size}get break(){return this.flags&1}blockAt(e,n,r,i){let o=r+this.left.height;return e<o?this.left.blockAt(e,n,r,i):this.right.blockAt(e,n,o,i+this.left.length+this.break)}lineAt(e,n,r,i,o){let s=i+this.left.height,a=o+this.left.length+this.break,l=n==Tt.ByHeight?e<s:e<a,c=l?this.left.lineAt(e,n,r,i,o):this.right.lineAt(e,n,r,s,a);if(this.break||(l?c.to<a:c.from>a))return c;let u=n==Tt.ByPosNoHeight?Tt.ByPosNoHeight:Tt.ByPos;return l?c.join(this.right.lineAt(a,u,r,s,a)):this.left.lineAt(a,u,r,i,o).join(c)}forEachLine(e,n,r,i,o,s){let a=i+this.left.height,l=o+this.left.length+this.break;if(this.break)e<l&&this.left.forEachLine(e,n,r,i,o,s),n>=l&&this.right.forEachLine(e,n,r,a,l,s);else{let c=this.lineAt(l,Tt.ByPos,r,i,o);e<c.from&&this.left.forEachLine(e,c.from-1,r,i,o,s),c.to>=e&&c.from<=n&&s(c),n>c.to&&this.right.forEachLine(c.to+1,n,r,a,l,s)}}replace(e,n,r){let i=this.left.length+this.break;if(n<i)return this.balanced(this.left.replace(e,n,r),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-i,n-i,r));let o=[];e>0&&this.decomposeLeft(e,o);let s=o.length;for(let a of r)o.push(a);if(e>0&&Tb(o,s-1),n<this.length){let a=o.length;this.decomposeRight(n,o),Tb(o,a)}return Vn.of(o)}decomposeLeft(e,n){let r=this.left.length;if(e<=r)return this.left.decomposeLeft(e,n);n.push(this.left),this.break&&(r++,e>=r&&n.push(null)),e>r&&this.right.decomposeLeft(e-r,n)}decomposeRight(e,n){let r=this.left.length,i=r+this.break;if(e>=i)return this.right.decomposeRight(e-i,n);e<r&&this.left.decomposeRight(e,n),this.break&&e<i&&n.push(null),n.push(this.right)}balanced(e,n){return e.size>2*n.size||n.size>2*e.size?Vn.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,r=!1,i){let{left:o,right:s}=this,a=n+o.length+this.break,l=null;return i&&i.from<=n+o.length&&i.more?l=o=o.updateHeight(e,n,r,i):o.updateHeight(e,n,r),i&&i.from<=a+s.length&&i.more?l=s=s.updateHeight(e,a,r,i):s.updateHeight(e,a,r),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 Tb(t,e){let n,r;t[e]==null&&(n=t[e-1])instanceof mn&&(r=t[e+1])instanceof mn&&t.splice(e-1,3,new mn(n.length+1+r.length))}const YN=5;class GO{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 r=Math.min(n,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof fr?i.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new fr(r-this.pos,-1)),this.writtenTo=r,n>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(e,n,r){if(e<n||r.heightRelevant){let i=r.widget?r.widget.estimatedHeight:0,o=r.widget?r.widget.lineBreaks:0;i<0&&(i=this.oracle.lineHeight);let s=n-e;r.block?this.addBlock(new X2(s,i,r)):(s||o||i>=YN)&&this.addLineDeco(i,o,s)}else n>e&&this.span(e,n);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=n,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new fr(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,n){let r=new mn(n-e);return this.oracle.doc.lineAt(e).to==n&&(r.flags|=4),r}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof fr)return e;let n=new fr(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,r){let i=this.ensureLine();i.length+=r,i.collapsed+=r,i.widgetHeight=Math.max(i.widgetHeight,e),i.breaks+=n,this.writtenTo=this.pos=this.pos+r}finish(e){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof fr)&&!this.isCovered?this.nodes.push(new fr(0,-1)):(this.writtenTo<this.pos||n==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let r=e;for(let i of this.nodes)i instanceof fr&&i.updateHeight(this.oracle,r),r+=i?i.length:1;return this.nodes}static build(e,n,r,i){let o=new GO(r,e);return et.spans(n,r,i,o,0),o.finish(r)}}function qN(t,e,n){let r=new UN;return et.compare(t,e,n,r,0),r.changes}class UN{constructor(){this.changes=[]}compareRange(){}comparePoint(e,n,r,i){(e<n||r&&r.heightRelevant||i&&i.heightRelevant)&&_0(e,n,this.changes,5)}}function HN(t,e){let n=t.getBoundingClientRect(),r=t.ownerDocument,i=r.defaultView||window,o=Math.max(0,n.left),s=Math.min(i.innerWidth,n.right),a=Math.max(0,n.top),l=Math.min(i.innerHeight,n.bottom);for(let c=t.parentNode;c&&c!=r.body;)if(c.nodeType==1){let u=c,f=window.getComputedStyle(u);if((u.scrollHeight>u.clientHeight||u.scrollWidth>u.clientWidth)&&f.overflow!="visible"){let d=u.getBoundingClientRect();o=Math.max(o,d.left),s=Math.min(s,d.right),a=Math.max(a,d.top),l=c==t.parentNode?d.bottom:Math.min(l,d.bottom)}c=f.position=="absolute"||f.position=="fixed"?u.offsetParent:u.parentNode}else if(c.nodeType==11)c=c.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 JN(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class op{constructor(e,n,r){this.from=e,this.to=n,this.size=r}static same(e,n){if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],o=n[r];if(i.from!=o.from||i.to!=o.to||i.size!=o.size)return!1}return!0}draw(e,n){return we.replace({widget:new KN(this.size*(n?e.scaleY:e.scaleX),n)}).range(this.from,this.to)}}class KN extends ki{constructor(e,n){super(),this.size=e,this.vertical=n}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class $b{constructor(e){this.state=e,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!1,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=jb,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=$t.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let n=e.facet(LO).some(r=>typeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new LN(n),this.stateDeco=e.facet(Zl).filter(r=>typeof r!="function"),this.heightMap=Vn.empty().applyChanges(this.stateDeco,st.empty,this.heightOracle.setDoc(e.doc),[new Ir(0,0,0,e.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=we.set(this.lineGaps.map(r=>r.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:n}=this.state.selection;for(let r=0;r<=1;r++){let i=r?n.head:n.anchor;if(!e.some(({from:o,to:s})=>i>=o&&i<=s)){let{from:o,to:s}=this.lineBlockAt(i);e.push(new lu(o,s))}}this.viewports=e.sort((r,i)=>r.from-i.from),this.scaler=this.heightMap.height<=7e6?jb:new nF(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:fl(e,this.scaler))})}update(e,n=null){this.state=e.state;let r=this.stateDeco;this.stateDeco=this.state.facet(Zl).filter(u=>typeof u!="function");let i=e.changedRanges,o=Ir.extendWithRanges(i,qN(r,this.stateDeco,e?e.changes:rn.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.head<l.from||n.range.head>l.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,n));let c=!e.changes.empty||e.flags&2||l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l,this.updateForViewport(),c&&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(E2)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let n=e.contentDOM,r=window.getComputedStyle(n),i=this.heightOracle,o=r.whiteSpace;this.defaultTextDirection=r.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 c=0,u=0;if(a.width&&a.height){let{scaleX:S,scaleY:b}=t2(n,a);(S>.005&&Math.abs(this.scaleX-S)>.005||b>.005&&Math.abs(this.scaleY-b)>.005)&&(this.scaleX=S,this.scaleY=b,c|=8,s=l=!0)}let f=(parseInt(r.paddingTop)||0)*this.scaleY,d=(parseInt(r.paddingBottom)||0)*this.scaleY;(this.paddingTop!=f||this.paddingBottom!=d)&&(this.paddingTop=f,this.paddingBottom=d,c|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(i.lineWrapping&&(l=!0),this.editorWidth=e.scrollDOM.clientWidth,c|=8);let h=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=h&&(this.scrollAnchorHeight=-1,this.scrollTop=h),this.scrolledToBottom=i2(e.scrollDOM);let p=(this.printing?JN:HN)(n,this.paddingTop),O=p.top-this.pixelViewport.top,m=p.bottom-this.pixelViewport.bottom;this.pixelViewport=p;let x=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(x!=this.inView&&(this.inView=x,x&&(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,c|=8),l){let S=e.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(S)&&(s=!0),s||i.lineWrapping&&Math.abs(v-this.contentDOMWidth)>i.charWidth){let{lineHeight:b,charWidth:w,textHeight:C}=e.docView.measureTextSize();s=b>0&&i.refresh(o,b,w,C,v/w,S),s&&(e.docView.minWidth=0,c|=8)}O>0&&m>0?u=Math.max(O,m):O<0&&m<0&&(u=Math.min(O,m)),i.heightChanged=!1;for(let b of this.viewports){let w=b.from==this.viewport.from?S:e.docView.measureVisibleLineHeights(b);this.heightMap=(s?Vn.empty().applyChanges(this.stateDeco,st.empty,this.heightOracle,[new Ir(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(i,0,s,new XN(b.from,w))}i.heightChanged&&(c|=2)}let y=!this.viewportIsAppropriate(this.viewport,u)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return y&&(this.viewport=this.getViewport(u,this.scrollTarget)),this.updateForViewport(),(c&2||y)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(s?[]:this.lineGaps,e)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),c}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,n){let r=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),i=this.heightMap,o=this.heightOracle,{visibleTop:s,visibleBottom:a}=this,l=new lu(i.lineAt(s-r*1e3,Tt.ByHeight,o,0,0).from,i.lineAt(a+(1-r)*1e3,Tt.ByHeight,o,0,0).to);if(n){let{head:c}=n.range;if(c<l.from||c>l.to){let u=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),f=i.lineAt(c,Tt.ByPos,o,0,0),d;n.y=="center"?d=(f.top+f.bottom)/2-u/2:n.y=="start"||n.y=="nearest"&&c<l.from?d=f.top:d=f.bottom-u,l=new lu(i.lineAt(d-1e3/2,Tt.ByHeight,o,0,0).from,i.lineAt(d+u+1e3/2,Tt.ByHeight,o,0,0).to)}}return l}mapViewport(e,n){let r=n.mapPos(e.from,-1),i=n.mapPos(e.to,1);return new lu(this.heightMap.lineAt(r,Tt.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(i,Tt.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:n},r=0){if(!this.inView)return!0;let{top:i}=this.heightMap.lineAt(e,Tt.ByPos,this.heightOracle,0,0),{bottom:o}=this.heightMap.lineAt(n,Tt.ByPos,this.heightOracle,0,0),{visibleTop:s,visibleBottom:a}=this;return(e==0||i<=s-Math.max(10,Math.min(-r,250)))&&(n==this.state.doc.length||o>=a+Math.max(10,Math.min(r,250)))&&i>s-2*1e3&&o<a+2*1e3}mapLineGaps(e,n){if(!e.length||n.empty)return e;let r=[];for(let i of e)n.touchesRange(i.from,i.to)||r.push(new op(n.mapPos(i.from),n.mapPos(i.to),i.size));return r}ensureLineGaps(e,n){let r=this.heightOracle.lineWrapping,i=r?1e4:2e3,o=i>>1,s=i<<1;if(this.defaultTextDirection!=$t.LTR&&!r)return[];let a=[],l=(c,u,f,d)=>{if(u-c<o)return;let h=this.state.selection.main,p=[h.from];h.empty||p.push(h.to);for(let m of p)if(m>c&&m<u){l(c,m-10,f,d),l(m+10,u,f,d);return}let O=tF(e,m=>m.from>=f.from&&m.to<=f.to&&Math.abs(m.from-c)<o&&Math.abs(m.to-u)<o&&!p.some(x=>m.from<x&&m.to>x));if(!O){if(u<f.to&&n&&r&&n.visibleRanges.some(m=>m.from<=u&&m.to>=u)){let m=n.moveToLineBoundary(ie.cursor(u),!1,!0).head;m>c&&(u=m)}O=new op(c,u,this.gapSize(f,c,u,d))}a.push(O)};for(let c of this.viewportLines){if(c.length<s)continue;let u=eF(c.from,c.to,this.stateDeco);if(u.total<s)continue;let f=this.scrollTarget?this.scrollTarget.range.head:null,d,h;if(r){let p=i/this.heightOracle.lineLength*this.heightOracle.lineHeight,O,m;if(f!=null){let x=uu(u,f),v=((this.visibleBottom-this.visibleTop)/2+p)/c.height;O=x-v,m=x+v}else O=(this.visibleTop-c.top-p)/c.height,m=(this.visibleBottom-c.top+p)/c.height;d=cu(u,O),h=cu(u,m)}else{let p=u.total*this.heightOracle.charWidth,O=i*this.heightOracle.charWidth,m,x;if(f!=null){let v=uu(u,f),y=((this.pixelViewport.right-this.pixelViewport.left)/2+O)/p;m=v-y,x=v+y}else m=(this.pixelViewport.left-O)/p,x=(this.pixelViewport.right+O)/p;d=cu(u,m),h=cu(u,x)}d>c.from&&l(c.from,d,c,u),h<c.to&&l(h,c.to,c,u)}return a}gapSize(e,n,r,i){let o=uu(i,r)-uu(i,n);return this.heightOracle.lineWrapping?e.height*o:i.total*this.heightOracle.charWidth*o}updateLineGaps(e){op.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=we.set(e.map(n=>n.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let n=[];et.spans(e,this.viewport.from,this.viewport.to,{span(i,o){n.push({from:i,to:o})},point(){}},20);let r=n.length!=this.visibleRanges.length||this.visibleRanges.some((i,o)=>i.from!=n[o].from||i.to!=n[o].to);return this.visibleRanges=n,r?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(n=>n.from<=e&&n.to>=e)||fl(this.heightMap.lineAt(e,Tt.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return fl(this.heightMap.lineAt(this.scaler.fromDOM(e),Tt.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 fl(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 lu{constructor(e,n){this.from=e,this.to=n}}function eF(t,e,n){let r=[],i=t,o=0;return et.spans(n,t,e,{span(){},point(s,a){s>i&&(r.push({from:i,to:s}),o+=s-i),i=a}},20),i<e&&(r.push({from:i,to:e}),o+=e-i),{total:o,ranges:r}}function cu({total:t,ranges:e},n){if(n<=0)return e[0].from;if(n>=1)return e[e.length-1].to;let r=Math.floor(t*n);for(let i=0;;i++){let{from:o,to:s}=e[i],a=s-o;if(r<=a)return o+r;r-=a}}function uu(t,e){let n=0;for(let{from:r,to:i}of t.ranges){if(e<=i){n+=e-r;break}n+=i-r}return n/t.total}function tF(t,e){for(let n of t)if(e(n))return n}const jb={toDOM(t){return t},fromDOM(t){return t},scale:1};class nF{constructor(e,n,r){let i=0,o=0,s=0;this.viewports=r.map(({from:a,to:l})=>{let c=n.lineAt(a,Tt.ByPos,e,0,0).top,u=n.lineAt(l,Tt.ByPos,e,0,0).bottom;return i+=u-c,{from:a,to:l,top:c,bottom:u,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(n.height-i);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,r=0,i=0;;n++){let o=n<this.viewports.length?this.viewports[n]:null;if(!o||e<o.top)return i+(e-r)*this.scale;if(e<=o.bottom)return o.domTop+(e-o.top);r=o.bottom,i=o.domBottom}}fromDOM(e){for(let n=0,r=0,i=0;;n++){let o=n<this.viewports.length?this.viewports[n]:null;if(!o||e<o.domTop)return r+(e-i)/this.scale;if(e<=o.domBottom)return o.top+(e-o.domTop);r=o.bottom,i=o.domBottom}}}function fl(t,e){if(e.scale==1)return t;let n=e.toDOM(t.top),r=e.toDOM(t.bottom);return new ai(t.from,t.length,n,r-n,Array.isArray(t._content)?t._content.map(i=>fl(i,e)):t._content)}const fu=me.define({combine:t=>t.join(" ")}),L0=me.define({combine:t=>t.indexOf(!0)>-1}),X0=Oo.newName(),G2=Oo.newName(),Y2=Oo.newName(),q2={"&light":"."+G2,"&dark":"."+Y2};function G0(t,e,n){return new Oo(e,{finish(r){return/&/.test(r)?r.replace(/&\w*/,i=>{if(i=="&")return t;if(!n||!n[i])throw new RangeError(`Unsupported selector: ${i}`);return n[i]}):t+" "+r}})}const rF=G0("."+X0,{"&":{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,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,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"}},q2),dl="￿";class iF{constructor(e,n){this.points=e,this.text="",this.lineSeparator=n.facet(Ue.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=dl}readRange(e,n){if(!e)return this;let r=e.parentNode;for(let i=e;;){this.findPointBefore(r,i);let o=this.text.length;this.readNode(i);let s=i.nextSibling;if(s==n)break;let a=Ct.get(i),l=Ct.get(s);(a&&l?a.breakAfter:(a?a.breakAfter:Rf(i))||Rf(s)&&(i.nodeName!="BR"||i.cmIgnore)&&this.text.length>o)&&this.lineBreak(),i=s}return this.findPointBefore(r,n),this}readTextNode(e){let n=e.nodeValue;for(let r of this.points)r.node==e&&(r.pos=this.text.length+Math.min(r.offset,n.length));for(let r=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let o=-1,s=1,a;if(this.lineSeparator?(o=n.indexOf(this.lineSeparator,r),s=this.lineSeparator.length):(a=i.exec(n))&&(o=a.index,s=a[0].length),this.append(n.slice(r,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);r=o+s}}readNode(e){if(e.cmIgnore)return;let n=Ct.get(e),r=n&&n.overrideDOMText;if(r!=null){this.findPointInside(e,r.length);for(let i=r.iter();!i.next().done;)i.lineBreak?this.lineBreak():this.append(i.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 r of this.points)r.node==e&&e.childNodes[r.offset]==n&&(r.pos=this.text.length)}findPointInside(e,n){for(let r of this.points)(e.nodeType==3?r.node==e:e.contains(r.node))&&(r.pos=this.text.length+(oF(e,r.node,r.offset)?n:0))}}function oF(t,e,n){for(;;){if(!e||n<Ni(e))return!1;if(e==t)return!0;n=es(e)+1,e=e.parentNode}}class Rb{constructor(e,n){this.node=e,this.offset=n,this.pos=-1}}class sF{constructor(e,n,r,i){this.typeOver=i,this.bounds=null,this.text="";let{impreciseHead:o,impreciseAnchor:s}=e.docView;if(e.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=e.docView.domBoundsAround(n,r,0))){let a=o||s?[]:cF(e),l=new iF(a,e.state);l.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=l.text,this.newSel=uF(a,this.bounds.from)}else{let a=e.observer.selectionRange,l=o&&o.node==a.focusNode&&o.offset==a.focusOffset||!$0(e.contentDOM,a.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(a.focusNode,a.focusOffset),c=s&&s.node==a.anchorNode&&s.offset==a.anchorOffset||!$0(e.contentDOM,a.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(a.anchorNode,a.anchorOffset),u=e.viewport;if((Oe.ios||Oe.chrome)&&e.state.selection.main.empty&&l!=c&&(u.from>0||u.to<e.state.doc.length)){let f=Math.min(l,c),d=Math.max(l,c),h=u.from-f,p=u.to-d;(h==0||h==1||f==0)&&(p==0||p==-1||d==e.state.doc.length)&&(l=0,c=e.state.doc.length)}this.newSel=ie.single(c,l)}}}function U2(t,e){let n,{newSel:r}=e,i=t.state.selection.main,o=t.inputState.lastKeyTime>Date.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:s,to:a}=e.bounds,l=i.from,c=null;(o===8||Oe.android&&e.text.length<a-s)&&(l=i.to,c="end");let u=lF(t.state.doc.sliceString(s,a,dl),e.text,l-s,c);u&&(Oe.chrome&&o==13&&u.toB==u.from+2&&e.text.slice(u.from,u.toB)==dl+dl&&u.toB--,n={from:s+u.from,to:s+u.toA,insert:st.of(e.text.slice(u.from,u.toB).split(dl))})}else r&&(!t.hasFocus&&t.state.facet(Xd)||r.main.eq(i))&&(r=null);if(!n&&!r)return!1;if(!n&&e.typeOver&&!i.empty&&r&&r.main.empty?n={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,i.to)}:n&&n.from>=i.from&&n.to<=i.to&&(n.from!=i.from||n.to!=i.to)&&i.to-i.from-(n.to-n.from)<=4?n={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,n.from).append(n.insert).append(t.state.doc.slice(n.to,i.to))}:(Oe.mac||Oe.android)&&n&&n.from==n.to&&n.from==i.head-1&&/^\. ?$/.test(n.insert.toString())&&t.contentDOM.getAttribute("autocorrect")=="off"?(r&&n.insert.length==2&&(r=ie.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:st.of([" "])}):Oe.chrome&&n&&n.from==n.to&&n.from==i.head&&n.insert.toString()==`
668
668
  `&&t.lineWrapping&&(r&&(r=ie.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:st.of([" "])}),n){if(Oe.ios&&t.inputState.flushIOSKey(n)||Oe.android&&(n.to==i.to&&(n.from==i.from||n.from==i.from-1&&t.state.sliceDoc(n.from,i.from)==" ")&&n.insert.length==1&&n.insert.lines==2&&Gs(t.contentDOM,"Enter",13)||(n.from==i.from-1&&n.to==i.to&&n.insert.length==0||o==8&&n.insert.length<n.to-n.from&&n.to>i.head)&&Gs(t.contentDOM,"Backspace",8)||n.from==i.from&&n.to==i.to+1&&n.insert.length==0&&Gs(t.contentDOM,"Delete",46)))return!0;let s=n.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let a,l=()=>a||(a=aF(t,n,r));return t.state.facet(k2).some(c=>c(t,n.from,n.to,s,l))||t.dispatch(l()),!0}else if(r&&!r.main.eq(i)){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:r,scrollIntoView:s,userEvent:a}),!0}else return!1}function aF(t,e,n){let r,i=t.state,o=i.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.from<e.from?i.sliceDoc(o.from,e.from):"",l=o.to>e.to?i.sliceDoc(e.to,o.to):"";r=i.replaceSelection(t.state.toText(a+e.insert.sliceString(0,void 0,t.state.lineBreak)+l))}else{let a=i.changes(e),l=n&&n.main.to<=a.newLength?n.main:void 0;if(i.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=o.to&&e.to>=o.to-10){let c=t.state.sliceDoc(e.from,e.to),u,f=n&&Q2(t,n.main.head);if(f){let p=e.insert.length-(e.to-e.from);u={from:f.from,to:f.to-p}}else u=t.state.doc.lineAt(o.head);let d=o.to-e.to,h=o.to-o.from;r=i.changeByRange(p=>{if(p.from==o.from&&p.to==o.to)return{changes:a,range:l||p.map(a)};let O=p.to-d,m=O-c.length;if(p.to-p.from!=h||t.state.sliceDoc(m,O)!=c||p.to>=u.from&&p.from<=u.to)return{range:p};let x=i.changes({from:m,to:O,insert:e.insert}),v=p.to-o.to;return{changes:x,range:l?ie.range(Math.max(0,l.anchor+v),Math.max(0,l.head+v)):p.map(x)}})}else r={changes:a,selection:l&&i.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)),i.update(r,{userEvent:s,scrollIntoView:!0})}function lF(t,e,n,r){let i=Math.min(t.length,e.length),o=0;for(;o<i&&t.charCodeAt(o)==e.charCodeAt(o);)o++;if(o==i&&t.length==e.length)return null;let s=t.length,a=e.length;for(;s>0&&a>0&&t.charCodeAt(s-1)==e.charCodeAt(a-1);)s--,a--;if(r=="end"){let l=Math.max(0,o-Math.min(s,a));n-=s+l-o}if(s<o&&t.length<e.length){let l=n<=o&&n>=s?o-n:0;o-=l,a=o+(a-s),s=o}else if(a<o){let l=n<=o&&n>=a?o-n:0;o-=l,s=o+(s-a),a=o}return{from:o,toA:s,toB:a}}function cF(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}=t.observer.selectionRange;return n&&(e.push(new Rb(n,r)),(i!=n||o!=r)&&e.push(new Rb(i,o))),e}function uF(t,e){if(t.length==0)return null;let n=t[0].pos,r=t.length==2?t[1].pos:n;return n>-1&&r>-1?ie.single(n+e,r+e):null}const fF={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},sp=Oe.ie&&Oe.ie_version<=11;class dF{constructor(e){this.view=e,this.active=!1,this.selectionRange=new q8,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 r of n)this.queue.push(r);(Oe.ie&&Oe.ie_version<=11||Oe.ios&&e.composing)&&n.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),sp&&(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)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(n=>{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,r)=>n!=e[r]))){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:r}=this,i=this.selectionRange;if(r.state.facet(Xd)?r.root.activeElement!=this.dom:!Wu(r.dom,i))return;let o=i.anchorNode&&r.docView.nearest(i.anchorNode);if(o&&o.ignoreEvent(e)){n||(this.selectionChanged=!1);return}(Oe.ie&&Oe.ie_version<=11||Oe.android&&Oe.chrome)&&!r.state.selection.main.empty&&i.focusNode&&Cl(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=jf(e.root);if(!n)return!1;let r=Oe.safari&&e.root.nodeType==11&&L8(this.dom.ownerDocument)==this.dom&&hF(this.view,n)||n;if(!r||this.selectionRange.eq(r))return!1;let i=Wu(this.dom,r);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&H8(this.dom,r)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(r),i&&(this.selectionChanged=!0),!0)}setSelectionRange(e,n){this.selectionRange.set(e.node,e.offset,n.node,n.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,n=null;for(let r=this.dom;r;)if(r.nodeType==1)!n&&e<this.scrollTargets.length&&this.scrollTargets[e]==r?e++:n||(n=this.scrollTargets.slice(0,e)),n&&n.push(r),r=r.assignedSlot||r.parentNode;else if(r.nodeType==11)r=r.host;else break;if(e<this.scrollTargets.length&&!n&&(n=this.scrollTargets.slice(0,e)),n){for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);for(let r of this.scrollTargets=n)r.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,fF),sp&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),sp&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,n){var r;if(!this.delayedAndroidKey){let i=()=>{let o=this.delayedAndroidKey;o&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=o.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&o.force&&Gs(this.dom,o.key,o.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(i)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:n,force:this.lastChange<Date.now()-50||!!(!((r=this.delayedAndroidKey)===null||r===void 0)&&r.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{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,r=-1,i=!1;for(let o of e){let s=this.readMutation(o);s&&(s.typeOver&&(i=!0),n==-1?{from:n,to:r}=s:(n=Math.min(s.from,n),r=Math.max(s.to,r)))}return{from:n,to:r,typeOver:i}}readChange(){let{from:e,to:n,typeOver:r}=this.processRecords(),i=this.selectionChanged&&Wu(this.dom,this.selectionRange);if(e<0&&!i)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let o=new sF(this.view,e,n,r);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 r=this.view.state,i=U2(this.view,n);return this.view.state==r&&this.view.update([]),i}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 r=Db(n,e.previousSibling||e.target.previousSibling,-1),i=Db(n,e.nextSibling||e.target.nextSibling,1);return{from:r?n.posAfter(r):n.posAtStart,to:i?n.posBefore(i):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,r;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(r=this.resizeScroll)===null||r===void 0||r.disconnect();for(let i of this.scrollTargets)i.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 Db(t,e,n){for(;e;){let r=Ct.get(e);if(r&&r.parent==t)return r;let i=e.parentNode;e=i!=t.dom?i:n>0?e.nextSibling:e.previousSibling}return null}function Qb(t,e){let n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset,s=t.docView.domAtPos(t.state.selection.main.anchor);return Cl(s.node,s.offset,i,o)&&([n,r,i,o]=[i,o,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}}function hF(t,e){if(e.getComposedRanges){let i=e.getComposedRanges(t.root)[0];if(i)return Qb(t,i)}let n=null;function r(i){i.preventDefault(),i.stopImmediatePropagation(),n=i.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",r,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",r,!0),n?Qb(t,n):null}class de{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&&(r=>r.forEach(i=>n(i,this)))||(r=>this.update(r)),this.dispatch=this.dispatch.bind(this),this._root=e.root||U8(e.parent)||document,this.viewState=new $b(e.state||Ue.create(e)),e.scrollTo&&e.scrollTo.is(ou)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(cl).map(r=>new np(r));for(let r of this.plugins)r.update(this);this.observer=new dF(this),this.inputState=new EN(this),this.inputState.ensureHandlers(this.plugins),this.docView=new hb(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure()}dispatch(...e){let n=e.length==1&&e[0]instanceof qt?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,r=!1,i,o=this.state;for(let d of e){if(d.startState!=o)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");o=d.state}if(this.destroyed){this.viewState.state=o;return}let s=this.hasFocus,a=0,l=null;e.some(d=>d.annotation(V2))?(this.inputState.notifiedFocused=s,a=1):s!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=s,l=z2(o,s),l||(a=1));let c=this.observer.delayedAndroidKey,u=null;if(c?(this.observer.clearDelayedAndroidKey(),u=this.observer.readChange(),(u&&!this.state.doc.eq(o.doc)||!this.state.selection.eq(o.selection))&&(u=null)):this.observer.clear(),o.facet(Ue.phrases)!=this.state.facet(Ue.phrases))return this.setState(o);i=Df.create(this,o,e),i.flags|=a;let f=this.viewState.scrollTarget;try{this.updateState=2;for(let d of e){if(f&&(f=f.map(d.changes)),d.scrollIntoView){let{main:h}=d.state.selection;f=new Ys(h.empty?h:ie.cursor(h.head,h.head>h.anchor?-1:1))}for(let h of d.effects)h.is(ou)&&(f=h.value.clip(this.state))}this.viewState.update(i,f),this.bidiCache=Qf.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),n=this.docView.update(i),this.state.facet(ul)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(d=>d.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(fu)!=i.state.facet(fu)&&(this.viewState.mustMeasureContent=!0),(n||r||f||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!i.empty)for(let d of this.state.facet(Z0))try{d(i)}catch(h){Zn(this.state,h,"update listener")}(l||u)&&Promise.resolve().then(()=>{l&&this.state==l.startState&&this.dispatch(l),u&&!U2(this,u)&&c.force&&Gs(this.contentDOM,c.key,c.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 r of this.plugins)r.destroy(this);this.viewState=new $b(e),this.plugins=e.facet(cl).map(r=>new np(r)),this.pluginMap.clear();for(let r of this.plugins)r.update(this);this.docView.destroy(),this.docView=new hb(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(cl),r=e.state.facet(cl);if(n!=r){let i=[];for(let o of r){let s=n.indexOf(o);if(s<0)i.push(new np(o));else{let a=this.plugins[s];a.mustUpdate=e,i.push(a)}}for(let o of this.plugins)o.mustUpdate!=e&&o.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let i of this.plugins)i.mustUpdate=e;for(let i=0;i<this.plugins.length;i++)this.plugins[i].update(this);n!=r&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let n=e.value;if(n&&n.docViewUpdate)try{n.docViewUpdate(this)}catch(r){Zn(this.state,r,"doc view update listener")}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-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,r=this.scrollDOM,i=r.scrollTop*this.scaleY,{scrollAnchorPos:o,scrollAnchorHeight:s}=this.viewState;Math.abs(i-this.viewState.scrollTop)>1&&(s=-1),this.viewState.scrollAnchorHeight=-1;try{for(let a=0;;a++){if(s<0)if(i2(r))o=-1,s=this.viewState.heightMap.height;else{let h=this.viewState.scrollAnchorAt(i);o=h.from,s=h.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 c=[];l&4||([this.measureRequests,c]=[c,this.measureRequests]);let u=c.map(h=>{try{return h.read(this)}catch(p){return Zn(this.state,p),Bb}}),f=Df.create(this,this.state,[]),d=!1;f.flags|=l,n?n.flags|=l:n=f,this.updateState=2,f.empty||(this.updatePlugins(f),this.inputState.update(f),this.updateAttrs(),d=this.docView.update(f),d&&this.docViewUpdate());for(let h=0;h<c.length;h++)if(u[h]!=Bb)try{let p=c[h];p.write&&p.write(u[h],this)}catch(p){Zn(this.state,p)}if(d&&this.docView.updateSelection(!0),!f.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,s=-1;continue}else{let p=(o<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(o).top)-s;if(p>1||p<-1){i=i+p,r.scrollTop=i/this.scaleY,s=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let a of this.state.facet(Z0))a(n)}get themeClasses(){return X0+" "+(this.state.facet(L0)?Y2:G2)+" "+this.state.facet(fu)}updateAttrs(){let e=_b(this,T2,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(Xd)?"true":"false",class:"cm-content",style:`${Oe.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),_b(this,LO,n);let r=this.observer.ignore(()=>{let i=B0(this.contentDOM,this.contentAttrs,n),o=B0(this.dom,this.editorAttrs,e);return i||o});return this.editorAttrs=e,this.contentAttrs=n,r}showAnnouncements(e){let n=!0;for(let r of e)for(let i of r.effects)if(i.is(de.announce)){n&&(this.announceDOM.textContent=""),n=!1;let o=this.announceDOM.appendChild(document.createElement("div"));o.textContent=i.value}}mountStyles(){this.styleModules=this.state.facet(ul);let e=this.state.facet(de.cspNonce);Oo.mount(this.root,this.styleModules.concat(rF).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;n<this.measureRequests.length;n++)if(this.measureRequests[n].key===e.key){this.measureRequests[n]=e;return}}this.measureRequests.push(e)}}plugin(e){let n=this.pluginMap.get(e);return(n===void 0||n&&n.spec!=e)&&this.pluginMap.set(e,n=this.plugins.find(r=>r.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,r){return ip(this,e,vb(this,e,n,r))}moveByGroup(e,n){return ip(this,e,vb(this,e,n,r=>AN(this,e.head,r)))}visualLineSide(e,n){let r=this.bidiSpans(e),i=this.textDirectionAt(e.from),o=r[n?r.length-1:0];return ie.cursor(o.side(n,i)+e.from,o.forward(!n,i)?1:-1)}moveToLineBoundary(e,n,r=!0){return kN(this,e,n,r)}moveVertically(e,n,r){return ip(this,e,PN(this,e,n,r))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,n=0){return this.docView.posFromDOM(e,n)}posAtCoords(e,n=!0){return this.readMeasured(),B2(this,e,n)}coordsAtPos(e,n=1){this.readMeasured();let r=this.docView.coordsAt(e,n);if(!r||r.left==r.right)return r;let i=this.state.doc.lineAt(e),o=this.bidiSpans(i),s=o[so.find(o,e-i.from,-1,n)];return zd(r,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(P2)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>pF)return v2(e.length);let n=this.textDirectionAt(e.from),r;for(let o of this.bidiCache)if(o.from==e.from&&o.dir==n&&(o.fresh||x2(o.isolates,r=db(this,e))))return o.order;r||(r=db(this,e));let i=cN(e.text,n,r);return this.bidiCache.push(new Qf(e.from,e.to,n,r,!0,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||Oe.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{n2(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 ou.of(new Ys(typeof e=="number"?ie.cursor(e):e,n.y,n.x,n.yMargin,n.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:n}=this.scrollDOM,r=this.viewState.scrollAnchorAt(e);return ou.of(new Ys(ie.cursor(r.from),"start","start",r.top-e,n,!0))}static domEventHandlers(e){return Bt.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Bt.define(()=>({}),{eventObservers:e})}static theme(e,n){let r=Oo.newName(),i=[fu.of(r),ul.of(G0(`.${r}`,e))];return n&&n.dark&&i.push(L0.of(!0)),i}static baseTheme(e){return Si.lowest(ul.of(G0("."+X0,e,q2)))}static findFromDOM(e){var n;let r=e.querySelector(".cm-content"),i=r&&Ct.get(r)||Ct.get(e);return((n=i==null?void 0:i.rootView)===null||n===void 0?void 0:n.view)||null}}de.styleModule=ul;de.inputHandler=k2;de.scrollHandler=I2;de.focusChangeEffect=A2;de.perLineTextDirection=P2;de.exceptionSink=C2;de.updateListener=Z0;de.editable=Xd;de.mouseSelectionStyle=w2;de.dragMovesSelection=S2;de.clickAddsSelectionRange=b2;de.decorations=Zl;de.outerDecorations=$2;de.atomicRanges=XO;de.bidiIsolatedRanges=j2;de.scrollMargins=R2;de.darkTheme=L0;de.cspNonce=me.define({combine:t=>t.length?t[0]:""});de.contentAttributes=LO;de.editorAttributes=T2;de.lineWrapping=de.contentAttributes.of({class:"cm-lineWrapping"});de.announce=_e.define();const pF=4096,Bb={};class Qf{constructor(e,n,r,i,o,s){this.from=e,this.to=n,this.dir=r,this.isolates=i,this.fresh=o,this.order=s}static update(e,n){if(n.empty&&!e.some(o=>o.fresh))return e;let r=[],i=e.length?e[e.length-1].dir:$t.LTR;for(let o=Math.max(0,e.length-10);o<e.length;o++){let s=e[o];s.dir==i&&!n.touchesRange(s.from,s.to)&&r.push(new Qf(n.mapPos(s.from,1),n.mapPos(s.to,-1),s.dir,s.isolates,!1,s.order))}return r}}function _b(t,e,n){for(let r=t.state.facet(e),i=r.length-1;i>=0;i--){let o=r[i],s=typeof o=="function"?o(t):o;s&&Q0(s,n)}return n}const gF=Oe.mac?"mac":Oe.windows?"win":Oe.linux?"linux":"key";function mF(t,e){const n=t.split(/-(?!$)/);let r=n[n.length-1];r=="Space"&&(r=" ");let i,o,s,a;for(let l=0;l<n.length-1;++l){const c=n[l];if(/^(cmd|meta|m)$/i.test(c))a=!0;else if(/^a(lt)?$/i.test(c))i=!0;else if(/^(c|ctrl|control)$/i.test(c))o=!0;else if(/^s(hift)?$/i.test(c))s=!0;else if(/^mod$/i.test(c))e=="mac"?a=!0:o=!0;else throw new Error("Unrecognized modifier name: "+c)}return i&&(r="Alt-"+r),o&&(r="Ctrl-"+r),a&&(r="Meta-"+r),s&&(r="Shift-"+r),r}function du(t,e,n){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n!==!1&&e.shiftKey&&(t="Shift-"+t),t}const OF=Si.default(de.domEventHandlers({keydown(t,e){return J2(H2(e.state),t,e,"editor")}})),$a=me.define({enables:OF}),Mb=new WeakMap;function H2(t){let e=t.facet($a),n=Mb.get(e);return n||Mb.set(e,n=yF(e.reduce((r,i)=>r.concat(i),[]))),n}function xF(t,e,n){return J2(H2(t.state),e,t,n)}let no=null;const vF=4e3;function yF(t,e=gF){let n=Object.create(null),r=Object.create(null),i=(s,a)=>{let l=r[s];if(l==null)r[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,c,u)=>{var f,d;let h=n[s]||(n[s]=Object.create(null)),p=a.split(/ (?!$)/).map(x=>mF(x,e));for(let x=1;x<p.length;x++){let v=p.slice(0,x).join(" ");i(v,!0),h[v]||(h[v]={preventDefault:!0,stopPropagation:!1,run:[y=>{let S=no={view:y,prefix:v,scope:s};return setTimeout(()=>{no==S&&(no=null)},vF),!0}]})}let O=p.join(" ");i(O,!1);let m=h[O]||(h[O]={preventDefault:!1,stopPropagation:!1,run:((d=(f=h._any)===null||f===void 0?void 0:f.run)===null||d===void 0?void 0:d.slice())||[]});l&&m.run.push(l),c&&(m.preventDefault=!0),u&&(m.stopPropagation=!0)};for(let s of t){let a=s.scope?s.scope.split(" "):["editor"];if(s.any)for(let c of a){let u=n[c]||(n[c]=Object.create(null));u._any||(u._any={preventDefault:!1,stopPropagation:!1,run:[]});for(let f in u)u[f].run.push(s.any)}let l=s[e]||s.key;if(l)for(let c of a)o(c,l,s.run,s.preventDefault,s.stopPropagation),s.shift&&o(c,"Shift-"+l,s.shift,s.preventDefault,s.stopPropagation)}return n}function J2(t,e,n,r){let i=z8(e),o=bn(i,0),s=kr(o)==i.length&&i!=" ",a="",l=!1,c=!1,u=!1;no&&no.view==n&&no.scope==r&&(a=no.prefix+" ",M2.indexOf(e.keyCode)<0&&(c=!0,no=null));let f=new Set,d=m=>{if(m){for(let x of m.run)if(!f.has(x)&&(f.add(x),x(n,e)))return m.stopPropagation&&(u=!0),!0;m.preventDefault&&(m.stopPropagation&&(u=!0),c=!0)}return!1},h=t[r],p,O;return h&&(d(h[a+du(i,e,!s)])?l=!0:s&&(e.altKey||e.metaKey||e.ctrlKey)&&!(Oe.windows&&e.ctrlKey&&e.altKey)&&(p=xo[e.keyCode])&&p!=i?(d(h[a+du(p,e,!0)])||e.shiftKey&&(O=Fl[e.keyCode])!=i&&O!=p&&d(h[a+du(O,e,!1)]))&&(l=!0):s&&e.shiftKey&&d(h[a+du(i,e,!0)])&&(l=!0),!l&&d(h._any)&&(l=!0)),c&&(l=!0),l&&u&&e.stopPropagation(),l}class gc{constructor(e,n,r,i,o){this.className=e,this.left=n,this.top=r,this.width=i,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,r){if(r.empty){let i=e.coordsAtPos(r.head,r.assoc||1);if(!i)return[];let o=K2(e);return[new gc(n,i.left-o.left,i.top-o.top,null,i.bottom-i.top)]}else return bF(e,n,r)}}function K2(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 Nb(t,e,n){let r=ie.cursor(e);return{from:Math.max(n.from,t.moveToLineBoundary(r,!1,!0).from),to:Math.min(n.to,t.moveToLineBoundary(r,!0,!0).from),type:Wn.Text}}function bF(t,e,n){if(n.to<=t.viewport.from||n.from>=t.viewport.to)return[];let r=Math.max(n.from,t.viewport.from),i=Math.min(n.to,t.viewport.to),o=t.textDirection==$t.LTR,s=t.contentDOM,a=s.getBoundingClientRect(),l=K2(t),c=s.querySelector(".cm-line"),u=c&&window.getComputedStyle(c),f=a.left+(u?parseInt(u.paddingLeft)+Math.min(0,parseInt(u.textIndent)):0),d=a.right-(u?parseInt(u.paddingRight):0),h=V0(t,r),p=V0(t,i),O=h.type==Wn.Text?h:null,m=p.type==Wn.Text?p:null;if(O&&(t.lineWrapping||h.widgetLineBreaks)&&(O=Nb(t,r,O)),m&&(t.lineWrapping||p.widgetLineBreaks)&&(m=Nb(t,i,m)),O&&m&&O.from==m.from)return v(y(n.from,n.to,O));{let b=O?y(n.from,null,O):S(h,!1),w=m?y(null,n.to,m):S(p,!0),C=[];return(O||h).to<(m||p).from-(O&&m?1:0)||h.widgetLineBreaks>1&&b.bottom+t.defaultLineHeight/2<w.top?C.push(x(f,b.bottom,d,w.top)):b.bottom<w.top&&t.elementAtHeight((b.bottom+w.top)/2).type==Wn.Text&&(b.bottom=w.top=(b.bottom+w.top)/2),v(b).concat(C).concat(v(w))}function x(b,w,C,k){return new gc(e,b-l.left,w-l.top-.01,C-b,k-w+.01)}function v({top:b,bottom:w,horizontal:C}){let k=[];for(let I=0;I<C.length;I+=2)k.push(x(C[I],b,C[I+1],w));return k}function y(b,w,C){let k=1e9,I=-1e9,A=[];function E(M,Q,Z,G,V){let ee=t.coordsAtPos(M,M==C.to?-2:2),Y=t.coordsAtPos(Z,Z==C.from?2:-2);!ee||!Y||(k=Math.min(ee.top,Y.top,k),I=Math.max(ee.bottom,Y.bottom,I),V==$t.LTR?A.push(o&&Q?f:ee.left,o&&G?d:Y.right):A.push(!o&&G?f:Y.left,!o&&Q?d:ee.right))}let $=b??C.from,R=w??C.to;for(let M of t.visibleRanges)if(M.to>$&&M.from<R)for(let Q=Math.max(M.from,$),Z=Math.min(M.to,R);;){let G=t.state.doc.lineAt(Q);for(let V of t.bidiSpans(G)){let ee=V.from+G.from,Y=V.to+G.from;if(ee>=Z)break;Y>Q&&E(Math.max(ee,Q),b==null&&ee<=$,Math.min(Y,Z),w==null&&Y>=R,V.dir)}if(Q=G.to+1,Q>=Z)break}return A.length==0&&E($,b==null,R,w==null,t.textDirection),{top:k,bottom:I,horizontal:A}}function S(b,w){let C=a.top+(w?b.top:b.bottom);return{top:C,bottom:C,horizontal:[]}}}function SF(t,e){return t.constructor==e.constructor&&t.eq(e)}class wF{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(Lu)!=e.state.facet(Lu)&&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,r=e.facet(Lu);for(;n<r.length&&r[n]!=this.layer;)n++;this.dom.style.zIndex=String((this.layer.above?150:-1)-n)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:e,scaleY:n}=this.view;(e!=this.scaleX||n!=this.scaleY)&&(this.scaleX=e,this.scaleY=n,this.dom.style.transform=`scale(${1/e}, ${1/n})`)}draw(e){if(e.length!=this.drawn.length||e.some((n,r)=>!SF(n,this.drawn[r]))){let n=this.dom.firstChild,r=0;for(let i of e)i.update&&n&&i.constructor&&this.drawn[r].constructor&&i.update(n,this.drawn[r])?(n=n.nextSibling,r++):this.dom.insertBefore(i.draw(),n);for(;n;){let i=n.nextSibling;n.remove(),n=i}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const Lu=me.define();function eE(t){return[Bt.define(e=>new wF(e,t)),Lu.of(t)]}const tE=!Oe.ios,Wl=me.define({combine(t){return Ci(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,n)=>Math.min(e,n),drawRangeCursor:(e,n)=>e||n})}});function CF(t={}){return[Wl.of(t),kF,AF,PF,E2.of(!0)]}function nE(t){return t.startState.facet(Wl)!=t.state.facet(Wl)}const kF=eE({above:!0,markers(t){let{state:e}=t,n=e.facet(Wl),r=[];for(let i of e.selection.ranges){let o=i==e.selection.main;if(i.empty?!o||tE:n.drawRangeCursor){let s=o?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",a=i.empty?i:ie.cursor(i.head,i.head>i.anchor?-1:1);for(let l of gc.forRange(t,s,a))r.push(l)}}return r},update(t,e){t.transactions.some(r=>r.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=nE(t);return n&&Fb(t.state,e),t.docChanged||t.selectionSet||n},mount(t,e){Fb(e.state,t)},class:"cm-cursorLayer"});function Fb(t,e){e.style.animationDuration=t.facet(Wl).cursorBlinkRate+"ms"}const AF=eE({above:!1,markers(t){return t.state.selection.ranges.map(e=>e.empty?[]:gc.forRange(t,"cm-selectionBackground",e)).reduce((e,n)=>e.concat(n))},update(t,e){return t.docChanged||t.selectionSet||t.viewportChanged||nE(t)},class:"cm-selectionLayer"}),Y0={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};tE&&(Y0[".cm-line"].caretColor="transparent !important",Y0[".cm-content"]={caretColor:"transparent !important"});const PF=Si.highest(de.theme(Y0)),rE=_e.define({map(t,e){return t==null?null:e.mapPos(t)}}),hl=ln.define({create(){return null},update(t,e){return t!=null&&(t=e.changes.mapPos(t)),e.effects.reduce((n,r)=>r.is(rE)?r.value:n,t)}}),EF=Bt.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(hl);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(hl)!=n||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(hl),n=e!=null&&t.coordsAtPos(e);if(!n)return null;let r=t.scrollDOM.getBoundingClientRect();return{left:n.left-r.left+t.scrollDOM.scrollLeft*t.scaleX,top:n.top-r.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(hl)!=t&&this.view.dispatch({effects:rE.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 IF(){return[hl,EF]}function Zb(t,e,n,r,i){e.lastIndex=0;for(let o=t.iterRange(n,r),s=n,a;!o.next().done;s+=o.value.length)if(!o.lineBreak)for(;a=e.exec(o.value);)i(s+a.index,a)}function TF(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 r=[];for(let{from:i,to:o}of n)i=Math.max(t.state.doc.lineAt(i).from,i-e),o=Math.min(t.state.doc.lineAt(o).to,o+e),r.length&&r[r.length-1].to>=i?r[r.length-1].to=o:r.push({from:i,to:o});return r}class iE{constructor(e){const{regexp:n,decoration:r,decorate:i,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,i)this.addMatch=(a,l,c,u)=>i(u,c,c+a[0].length,a,l);else if(typeof r=="function")this.addMatch=(a,l,c,u)=>{let f=r(a,l,c);f&&u(c,c+a[0].length,f)};else if(r)this.addMatch=(a,l,c,u)=>u(c,c+a[0].length,r);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=o,this.maxLength=s}createDeco(e){let n=new mo,r=n.add.bind(n);for(let{from:i,to:o}of TF(e,this.maxLength))Zb(e.state.doc,this.regexp,i,o,(s,a)=>this.addMatch(a,e,s,r));return n.finish()}updateDeco(e,n){let r=1e9,i=-1;return e.docChanged&&e.changes.iterChanges((o,s,a,l)=>{l>e.view.viewport.from&&a<e.view.viewport.to&&(r=Math.min(a,r),i=Math.max(l,i))}),e.viewportChanged||i-r>1e3?this.createDeco(e.view):i>-1?this.updateRange(e.view,n.map(e.changes),r,i):n}updateRange(e,n,r,i){for(let o of e.visibleRanges){let s=Math.max(o.from,r),a=Math.min(o.to,i);if(a>s){let l=e.state.doc.lineAt(s),c=l.to<a?e.state.doc.lineAt(a):l,u=Math.max(o.from,l.from),f=Math.min(o.to,c.to);if(this.boundary){for(;s>l.from;s--)if(this.boundary.test(l.text[s-1-l.from])){u=s;break}for(;a<c.to;a++)if(this.boundary.test(c.text[a-c.from])){f=a;break}}let d=[],h,p=(O,m,x)=>d.push(x.range(O,m));if(l==c)for(this.regexp.lastIndex=u-l.from;(h=this.regexp.exec(l.text))&&h.index<f-l.from;)this.addMatch(h,e,h.index+l.from,p);else Zb(e.state.doc,this.regexp,u,f,(O,m)=>this.addMatch(m,e,O,p));n=n.update({filterFrom:u,filterTo:f,filter:(O,m)=>O<u||m>f,add:d})}}return n}}const q0=/x/.unicode!=null?"gu":"g",$F=new RegExp(`[\0-\b
669
- --Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,q0),jF={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 ap=null;function RF(){var t;if(ap==null&&typeof document<"u"&&document.body){let e=document.body.style;ap=((t=e.tabSize)!==null&&t!==void 0?t:e.MozTabSize)!=null}return ap||!1}const Xu=me.define({combine(t){let e=Ci(t,{render:null,specialChars:$F,addSpecialChars:null});return(e.replaceTabs=!RF())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,q0)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,q0)),e}});function DF(t={}){return[Xu.of(t),QF()]}let Wb=null;function QF(){return Wb||(Wb=Bt.fromClass(class{constructor(t){this.view=t,this.decorations=we.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(Xu)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new iE({regexp:t.specialChars,decoration:(e,n,r)=>{let{doc:i}=n.state,o=bn(e[0],0);if(o==9){let s=i.lineAt(r),a=n.state.tabSize,l=Ta(s.text,a,r-s.from);return we.replace({widget:new NF((a-l%a)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[o]||(this.decorationCache[o]=we.replace({widget:new MF(t,o)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(Xu);t.startState.facet(Xu)!=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 BF="•";function _F(t){return t>=32?BF:t==10?"␤":String.fromCharCode(9216+t)}class MF extends ki{constructor(e,n){super(),this.options=e,this.code=n}eq(e){return e.code==this.code}toDOM(e){let n=_F(this.code),r=e.state.phrase("Control character")+" "+(jF[this.code]||"0x"+this.code.toString(16)),i=this.options.render&&this.options.render(this.code,r,n);if(i)return i;let o=document.createElement("span");return o.textContent=n,o.title=r,o.setAttribute("aria-label",r),o.className="cm-specialChar",o}ignoreEvent(){return!1}}class NF extends ki{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 FF(){return WF}const ZF=we.line({class:"cm-activeLine"}),WF=Bt.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 r of t.state.selection.ranges){let i=t.lineBlockAt(r.head);i.from>e&&(n.push(ZF.range(i.from)),e=i.from)}return we.set(n)}},{decorations:t=>t.decorations});let VF=class extends ki{constructor(e){super(),this.content=e}toDOM(){let e=document.createElement("span");return e.className="cm-placeholder",e.style.pointerEvents="none",e.appendChild(typeof this.content=="string"?document.createTextNode(this.content):this.content),typeof this.content=="string"?e.setAttribute("aria-label","placeholder "+this.content):e.setAttribute("aria-hidden","true"),e}coordsAt(e){let n=e.firstChild?la(e.firstChild):[];if(!n.length)return null;let r=window.getComputedStyle(e.parentNode),i=zd(n[0],r.direction!="rtl"),o=parseInt(r.lineHeight);return i.bottom-i.top>o*1.5?{left:i.left,right:i.right,top:i.top,bottom:i.top+o}:i}ignoreEvent(){return!1}};function zF(t){return Bt.fromClass(class{constructor(e){this.view=e,this.placeholder=t?we.set([we.widget({widget:new VF(t),side:1}).range(0)]):we.none}get decorations(){return this.view.state.doc.length?we.none:this.placeholder}},{decorations:e=>e.decorations})}const U0=2e3;function LF(t,e,n){let r=Math.min(e.line,n.line),i=Math.max(e.line,n.line),o=[];if(e.off>U0||n.off>U0||e.col<0||n.col<0){let s=Math.min(e.off,n.off),a=Math.max(e.off,n.off);for(let l=r;l<=i;l++){let c=t.doc.line(l);c.length<=a&&o.push(ie.range(c.from+s,c.to+a))}}else{let s=Math.min(e.col,n.col),a=Math.max(e.col,n.col);for(let l=r;l<=i;l++){let c=t.doc.line(l),u=E0(c.text,s,t.tabSize,!0);if(u<0)o.push(ie.cursor(c.to));else{let f=E0(c.text,a,t.tabSize);o.push(ie.range(c.from+u,c.from+f))}}}return o}function XF(t,e){let n=t.coordsAtPos(t.viewport.from);return n?Math.round(Math.abs((n.left-e)/t.defaultCharacterWidth)):-1}function Vb(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1),r=t.state.doc.lineAt(n),i=n-r.from,o=i>U0?-1:i==r.length?XF(t,e.clientX):Ta(r.text,t.state.tabSize,n-r.from);return{line:r.number,col:o,off:i}}function GF(t,e){let n=Vb(t,e),r=t.state.selection;return n?{update(i){if(i.docChanged){let o=i.changes.mapPos(i.startState.doc.line(n.line).from),s=i.state.doc.lineAt(o);n={line:s.number,col:n.col,off:Math.min(n.off,s.length)},r=r.map(i.changes)}},get(i,o,s){let a=Vb(t,i);if(!a)return r;let l=LF(t.state,n,a);return l.length?s?ie.create(l.concat(r.ranges)):ie.create(l):r}}:null}function YF(t){let e=n=>n.altKey&&n.button==0;return de.mouseSelectionStyle.of((n,r)=>e(r)?GF(n,r):null)}const qF={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},UF={style:"cursor: crosshair"};function HF(t={}){let[e,n]=qF[t.key||"Alt"],r=Bt.fromClass(class{constructor(i){this.view=i,this.isDown=!1}set(i){this.isDown!=i&&(this.isDown=i,this.view.update([]))}},{eventObservers:{keydown(i){this.set(i.keyCode==e||n(i))},keyup(i){(i.keyCode==e||!n(i))&&this.set(!1)},mousemove(i){this.set(n(i))}}});return[r,de.contentAttributes.of(i=>{var o;return!((o=i.plugin(r))===null||o===void 0)&&o.isDown?UF:null})]}const Ja="-10000px";class oE{constructor(e,n,r,i){this.facet=n,this.createTooltipView=r,this.removeTooltipView=i,this.input=e.state.facet(n),this.tooltips=this.input.filter(s=>s);let o=null;this.tooltipViews=this.tooltips.map(s=>o=r(s,o))}update(e,n){var r;let i=e.state.facet(this.facet),o=i.filter(l=>l);if(i===this.input){for(let l of this.tooltipViews)l.update&&l.update(e);return!1}let s=[],a=n?[]:null;for(let l=0;l<o.length;l++){let c=o[l],u=-1;if(c){for(let f=0;f<this.tooltips.length;f++){let d=this.tooltips[f];d&&d.create==c.create&&(u=f)}if(u<0)s[l]=this.createTooltipView(c,l?s[l-1]:null),a&&(a[l]=!!c.above);else{let f=s[l]=this.tooltipViews[u];a&&(a[l]=n[u]),f.update&&f.update(e)}}}for(let l of this.tooltipViews)s.indexOf(l)<0&&(this.removeTooltipView(l),(r=l.destroy)===null||r===void 0||r.call(l));return n&&(a.forEach((l,c)=>n[c]=l),n.length=a.length),this.input=i,this.tooltips=o,this.tooltipViews=s,!0}}function JF(t){let{win:e}=t;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const lp=me.define({combine:t=>{var e,n,r;return{position:Oe.ios?"absolute":((e=t.find(i=>i.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((n=t.find(i=>i.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((r=t.find(i=>i.tooltipSpace))===null||r===void 0?void 0:r.tooltipSpace)||JF}}}),zb=new WeakMap,YO=Bt.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(lp);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 oE(t,qO,(n,r)=>this.createTooltip(n,r),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,r=t.state.facet(lp);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let i of this.manager.tooltipViews)i.dom.style.position=this.position;n=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let i of this.manager.tooltipViews)this.container.appendChild(i.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),r=e?e.dom:null;if(n.dom.classList.add("cm-tooltip"),t.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let i=document.createElement("div");i.className="cm-tooltip-arrow",n.dom.appendChild(i)}return n.dom.style.position=this.position,n.dom.style.top=Ja,n.dom.style.left="0px",this.container.insertBefore(n.dom,r),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 r of this.manager.tooltipViews)r.dom.remove(),(t=r.destroy)===null||t===void 0||t.call(r);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,r=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:i}=this.manager.tooltipViews[0];if(Oe.gecko)r=i.offsetParent!=this.container.ownerDocument.body;else if(i.style.top==Ja&&i.style.left=="0px"){let o=i.getBoundingClientRect();r=Math.abs(o.top+1e4)>1||Math.abs(o.left)>1}}if(r||this.position=="absolute")if(this.parent){let i=this.parent.getBoundingClientRect();i.width&&i.height&&(e=i.width/this.parent.offsetWidth,n=i.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((i,o)=>{let s=this.manager.tooltipViews[o];return s.getCoords?s.getCoords(i.pos):this.view.coordsAtPos(i.pos)}),size:this.manager.tooltipViews.map(({dom:i})=>i.getBoundingClientRect()),space:this.view.state.facet(lp).tooltipSpace(this.view),scaleX:e,scaleY:n,makeAbsolute:r}}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:r,scaleX:i,scaleY:o}=t,s=[];for(let a=0;a<this.manager.tooltips.length;a++){let l=this.manager.tooltips[a],c=this.manager.tooltipViews[a],{dom:u}=c,f=t.pos[a],d=t.size[a];if(!f||f.bottom<=Math.max(n.top,r.top)||f.top>=Math.min(n.bottom,r.bottom)||f.right<Math.max(n.left,r.left)-.1||f.left>Math.min(n.right,r.right)+.1){u.style.top=Ja;continue}let h=l.arrow?c.dom.querySelector(".cm-tooltip-arrow"):null,p=h?7:0,O=d.right-d.left,m=(e=zb.get(c))!==null&&e!==void 0?e:d.bottom-d.top,x=c.offset||eZ,v=this.view.textDirection==$t.LTR,y=d.width>r.right-r.left?v?r.left:r.right-d.width:v?Math.min(f.left-(h?14:0)+x.x,r.right-O):Math.max(r.left,f.left-O+(h?14:0)-x.x),S=this.above[a];!l.strictSide&&(S?f.top-(d.bottom-d.top)-x.y<r.top:f.bottom+(d.bottom-d.top)+x.y>r.bottom)&&S==r.bottom-f.bottom>f.top-r.top&&(S=this.above[a]=!S);let b=(S?f.top-r.top:r.bottom-f.bottom)-p;if(b<m&&c.resize!==!1){if(b<this.view.defaultLineHeight){u.style.top=Ja;continue}zb.set(c,m),u.style.height=(m=b)/o+"px"}else u.style.height&&(u.style.height="");let w=S?f.top-m-p-x.y:f.bottom+p+x.y,C=y+O;if(c.overlap!==!0)for(let k of s)k.left<C&&k.right>y&&k.top<w+m&&k.bottom>w&&(w=S?k.top-m-2-p:k.bottom+p+2);if(this.position=="absolute"?(u.style.top=(w-t.parent.top)/o+"px",u.style.left=(y-t.parent.left)/i+"px"):(u.style.top=w/o+"px",u.style.left=y/i+"px"),h){let k=f.left+(v?x.x:-x.x)-(y+14-7);h.style.left=k/i+"px"}c.overlap!==!0&&s.push({left:y,top:w,right:C,bottom:w+m}),u.classList.toggle("cm-tooltip-above",S),u.classList.toggle("cm-tooltip-below",!S),c.positioned&&c.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=Ja}},{eventObservers:{scroll(){this.maybeMeasure()}}}),KF=de.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"}}}),eZ={x:0,y:0},qO=me.define({enables:[YO,KF]}),Bf=me.define({combine:t=>t.reduce((e,n)=>e.concat(n),[])});class Gd{static create(e){return new Gd(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new oE(e,Bf,(n,r)=>this.createHostedView(n,r),n=>n.dom.remove())}createHostedView(e,n){let r=e.create(this.view);return r.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(r.dom,n?n.dom.nextSibling:this.dom.firstChild),this.mounted&&r.mount&&r.mount(this.view),r}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 r of this.manager.tooltipViews){let i=r[e];if(i!==void 0){if(n===void 0)n=i;else if(n!==i)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 tZ=qO.compute([Bf],t=>{let e=t.facet(Bf);return e.length===0?null:{pos:Math.min(...e.map(n=>n.pos)),end:Math.max(...e.map(n=>{var r;return(r=n.end)!==null&&r!==void 0?r:n.pos})),create:Gd.create,above:e[0].above,arrow:e.some(n=>n.arrow)}});class nZ{constructor(e,n,r,i,o){this.view=e,this.source=n,this.field=r,this.setHover=i,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;e<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-e):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:e,lastMove:n}=this,r=e.docView.nearest(n.target);if(!r)return;let i,o=1;if(r instanceof oo)i=r.posAtStart;else{if(i=e.posAtCoords(n),i==null)return;let a=e.coordsAtPos(i);if(!a||n.y<a.top||n.y>a.bottom||n.x<a.left-e.defaultCharacterWidth||n.x>a.right+e.defaultCharacterWidth)return;let l=e.bidiSpans(e.state.doc.lineAt(i)).find(u=>u.from<=i&&u.to>=i),c=l&&l.dir==$t.RTL?-1:1;o=n.x<a.left?-c:c}let s=this.source(e,i,o);if(s!=null&&s.then){let a=this.pending={pos:i};s.then(l=>{this.pending==a&&(this.pending=null,l&&!(Array.isArray(l)&&!l.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(l)?l:[l])}))},l=>Zn(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(YO),n=e?e.manager.tooltips.findIndex(r=>r.create==Gd.create):-1;return n>-1?e.manager.tooltipViews[n]:null}mousemove(e){var n,r;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:i,tooltip:o}=this;if(i.length&&o&&!rZ(o.dom,e)||this.pending){let{pos:s}=i[0]||this.pending,a=(r=(n=i[0])===null||n===void 0?void 0:n.end)!==null&&r!==void 0?r:s;(s==a?this.view.posAtCoords(this.lastMove)!=s:!iZ(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:r}=this;r&&r.dom.contains(e.relatedTarget)?this.watchTooltipLeave(r.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let n=r=>{e.removeEventListener("mouseleave",n),this.active.length&&!this.view.dom.contains(r.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 hu=4;function rZ(t,e){let n=t.getBoundingClientRect();return e.clientX>=n.left-hu&&e.clientX<=n.right+hu&&e.clientY>=n.top-hu&&e.clientY<=n.bottom+hu}function iZ(t,e,n,r,i,o){let s=t.scrollDOM.getBoundingClientRect(),a=t.documentTop+t.documentPadding.top+t.contentHeight;if(s.left>r||s.right<r||s.top>i||Math.min(s.bottom,a)<i)return!1;let l=t.posAtCoords({x:r,y:i},!1);return l>=e&&l<=n}function oZ(t,e={}){let n=_e.define(),r=ln.define({create(){return[]},update(i,o){if(i.length&&(e.hideOnChange&&(o.docChanged||o.selection)?i=[]:e.hideOn&&(i=i.filter(s=>!e.hideOn(o,s))),o.docChanged)){let s=[];for(let a of i){let l=o.changes.mapPos(a.pos,-1,wn.TrackDel);if(l!=null){let c=Object.assign(Object.create(null),a);c.pos=l,c.end!=null&&(c.end=o.changes.mapPos(c.end)),s.push(c)}}i=s}for(let s of o.effects)s.is(n)&&(i=s.value),s.is(sZ)&&(i=[]);return i},provide:i=>Bf.from(i)});return[r,Bt.define(i=>new nZ(i,t,r,n,e.hoverTime||300)),tZ]}function sE(t,e){let n=t.plugin(YO);if(!n)return null;let r=n.manager.tooltips.indexOf(e);return r<0?null:n.manager.tooltipViews[r]}const sZ=_e.define(),Lb=me.define({combine(t){let e,n;for(let r of t)e=e||r.topContainer,n=n||r.bottomContainer;return{topContainer:e,bottomContainer:n}}});function Vl(t,e){let n=t.plugin(aE),r=n?n.specs.indexOf(e):-1;return r>-1?n.panels[r]:null}const aE=Bt.fromClass(class{constructor(t){this.input=t.state.facet(zl),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(t));let e=t.state.facet(Lb);this.top=new pu(t,!0,e.topContainer),this.bottom=new pu(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(Lb);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new pu(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new pu(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(zl);if(n!=this.input){let r=n.filter(l=>l),i=[],o=[],s=[],a=[];for(let l of r){let c=this.specs.indexOf(l),u;c<0?(u=l(t.view),a.push(u)):(u=this.panels[c],u.update&&u.update(t)),i.push(u),(u.top?o:s).push(u)}this.specs=r,this.panels=i,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 r of this.panels)r.update&&r.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>de.scrollMargins.of(e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});let pu=class{constructor(e,n,r){this.view=e,this.top=n,this.container=r,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=Xb(e);e=e.nextSibling}else this.dom.insertBefore(n.dom,e);for(;e;)e=Xb(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 Xb(t){let e=t.nextSibling;return t.remove(),e}const zl=me.define({enables:aE});class Zi extends Jo{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}Zi.prototype.elementClass="";Zi.prototype.toDOM=void 0;Zi.prototype.mapMode=wn.TrackBefore;Zi.prototype.startSide=Zi.prototype.endSide=-1;Zi.prototype.point=!0;const Gu=me.define(),aZ={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>et.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},Al=me.define();function lZ(t){return[lE(),Al.of(Object.assign(Object.assign({},aZ),t))]}const Gb=me.define({combine:t=>t.some(e=>e)});function lE(t){return[cZ]}const cZ=Bt.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(Al).map(e=>new qb(t,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!t.state.facet(Gb),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,r=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(r<(n.to-n.from)*.8)}t.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(Gb)!=!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=et.iter(this.view.state.facet(Gu),this.view.viewport.from),r=[],i=this.gutters.map(o=>new uZ(o,this.view.viewport,-this.view.documentPadding.top));for(let o of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(o.type)){let s=!0;for(let a of o.type)if(a.type==Wn.Text&&s){H0(n,r,a.from);for(let l of i)l.line(this.view,a,r);s=!1}else if(a.widget)for(let l of i)l.widget(this.view,a)}else if(o.type==Wn.Text){H0(n,r,o.from);for(let s of i)s.line(this.view,o,r)}else if(o.widget)for(let s of i)s.widget(this.view,o);for(let o of i)o.finish();t&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(t){let e=t.startState.facet(Al),n=t.state.facet(Al),r=t.docChanged||t.heightChanged||t.viewportChanged||!et.eq(t.startState.facet(Gu),t.state.facet(Gu),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let i of this.gutters)i.update(t)&&(r=!0);else{r=!0;let i=[];for(let o of n){let s=e.indexOf(o);s<0?i.push(new qb(this.view,o)):(this.gutters[s].update(t),i.push(this.gutters[s]))}for(let o of this.gutters)o.dom.remove(),i.indexOf(o)<0&&o.destroy();for(let o of i)this.dom.appendChild(o.dom);this.gutters=i}return r}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove()}},{provide:t=>de.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 Yb(t){return Array.isArray(t)?t:[t]}function H0(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class uZ{constructor(e,n,r){this.gutter=e,this.height=r,this.i=0,this.cursor=et.iter(e.markers,n.from)}addElement(e,n,r){let{gutter:i}=this,o=(n.top-this.height)/e.scaleY,s=n.height/e.scaleY;if(this.i==i.elements.length){let a=new cE(e,s,o,r);i.elements.push(a),i.dom.appendChild(a.dom)}else i.elements[this.i].update(e,s,o,r);this.height=n.bottom,this.i++}line(e,n,r){let i=[];H0(this.cursor,i,n.from),r.length&&(i=i.concat(r));let o=this.gutter.config.lineMarker(e,n,i);o&&i.unshift(o);let s=this.gutter;i.length==0&&!s.config.renderEmptyElements||this.addElement(e,n,i)}widget(e,n){let r=this.gutter.config.widgetMarker(e,n.widget,n);r&&this.addElement(e,n,[r])}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let n=e.elements.pop();e.dom.removeChild(n.dom),n.destroy()}}}class qb{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 r in n.domEventHandlers)this.dom.addEventListener(r,i=>{let o=i.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=i.clientY;let a=e.lineBlockAtHeight(s-e.documentTop);n.domEventHandlers[r](e,a,i)&&i.preventDefault()});this.markers=Yb(n.markers(e)),n.initialSpacer&&(this.spacer=new cE(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=Yb(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let i=this.config.updateSpacer(this.spacer.markers[0],e);i!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[i])}let r=e.view.viewport;return!et.eq(this.markers,n,r.from,r.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class cE{constructor(e,n,r,i){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,n,r,i)}update(e,n,r,i){this.height!=n&&(this.height=n,this.dom.style.height=n+"px"),this.above!=r&&(this.dom.style.marginTop=(this.above=r)?r+"px":""),fZ(this.markers,i)||this.setMarkers(e,i)}setMarkers(e,n){let r="cm-gutterElement",i=this.dom.firstChild;for(let o=0,s=0;;){let a=s,l=o<n.length?n[o++]:null,c=!1;if(l){let u=l.elementClass;u&&(r+=" "+u);for(let f=s;f<this.markers.length;f++)if(this.markers[f].compare(l)){a=f,c=!0;break}}else a=this.markers.length;for(;s<a;){let u=this.markers[s++];if(u.toDOM){u.destroy(i);let f=i.nextSibling;i.remove(),i=f}}if(!l)break;l.toDOM&&(c?i=i.nextSibling:this.dom.insertBefore(l.toDOM(e),i)),c&&s++}this.dom.className=r,this.markers=n}destroy(){this.setMarkers(null,[])}}function fZ(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].compare(e[n]))return!1;return!0}const dZ=me.define(),Ds=me.define({combine(t){return Ci(t,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,n){let r=Object.assign({},e);for(let i in n){let o=r[i],s=n[i];r[i]=o?(a,l,c)=>o(a,l,c)||s(a,l,c):s}return r}})}});class cp extends Zi{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function up(t,e){return t.state.facet(Ds).formatNumber(e,t.state)}const hZ=Al.compute([Ds],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(dZ)},lineMarker(e,n,r){return r.some(i=>i.toDOM)?null:new cp(up(e,e.state.doc.lineAt(n.from).number))},widgetMarker:()=>null,lineMarkerChange:e=>e.startState.facet(Ds)!=e.state.facet(Ds),initialSpacer(e){return new cp(up(e,Ub(e.state.doc.lines)))},updateSpacer(e,n){let r=up(n.view,Ub(n.view.state.doc.lines));return r==e.number?e:new cp(r)},domEventHandlers:t.facet(Ds).domEventHandlers}));function pZ(t={}){return[Ds.of(t),lE(),hZ]}function Ub(t){let e=9;for(;e<t;)e=e*10+9;return e}const gZ=new class extends Zi{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},mZ=Gu.compute(["selection"],t=>{let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.head).from;i>n&&(n=i,e.push(gZ.range(i)))}return et.of(e)});function OZ(){return mZ}const uE=1024;let xZ=0,Ar=class{constructor(e,n){this.from=e,this.to=n}};class ze{constructor(e={}){this.id=xZ++,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=zn.match(e)),n=>{let r=e(n);return r===void 0?null:[this,r]}}}ze.closedBy=new ze({deserialize:t=>t.split(" ")});ze.openedBy=new ze({deserialize:t=>t.split(" ")});ze.group=new ze({deserialize:t=>t.split(" ")});ze.isolate=new ze({deserialize:t=>{if(t&&t!="rtl"&&t!="ltr"&&t!="auto")throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}});ze.contextHash=new ze({perNode:!0});ze.lookAhead=new ze({perNode:!0});ze.mounted=new ze({perNode:!0});class Ll{constructor(e,n,r){this.tree=e,this.overlay=n,this.parser=r}static get(e){return e&&e.props&&e.props[ze.mounted.id]}}const vZ=Object.create(null);class zn{constructor(e,n,r,i=0){this.name=e,this.props=n,this.id=r,this.flags=i}static define(e){let n=e.props&&e.props.length?Object.create(null):vZ,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new zn(e.name||"",n,e.id,r);if(e.props){for(let o of e.props)if(Array.isArray(o)||(o=o(i)),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 i}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(ze.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let r in e)for(let i of r.split(" "))n[i]=e[r];return r=>{for(let i=r.prop(ze.group),o=-1;o<(i?i.length:0);o++){let s=n[o<0?r.name:i[o]];if(s)return s}}}}zn.none=new zn("",Object.create(null),0,8);class UO{constructor(e){this.types=e;for(let n=0;n<e.length;n++)if(e[n].id!=n)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let n=[];for(let r of this.types){let i=null;for(let o of e){let s=o(r);s&&(i||(i=Object.assign({},r.props)),i[s[0].id]=s[1])}n.push(i?new zn(r.name,i,r.id,r.flags):r)}return new UO(n)}}const gu=new WeakMap,Hb=new WeakMap;var Pt;(function(t){t[t.ExcludeBuffers=1]="ExcludeBuffers",t[t.IncludeAnonymous=2]="IncludeAnonymous",t[t.IgnoreMounts=4]="IgnoreMounts",t[t.IgnoreOverlays=8]="IgnoreOverlays"})(Pt||(Pt={}));class Qt{constructor(e,n,r,i,o){if(this.type=e,this.children=n,this.positions=r,this.length=i,this.props=null,o&&o.length){this.props=Object.create(null);for(let[s,a]of o)this.props[typeof s=="number"?s:s.id]=a}}toString(){let e=Ll.get(this);if(e&&!e.overlay)return e.tree.toString();let n="";for(let r of this.children){let i=r.toString();i&&(n&&(n+=","),n+=i)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(n.length?"("+n+")":""):n}cursor(e=0){return new _f(this.topNode,e)}cursorAt(e,n=0,r=0){let i=gu.get(this)||this.topNode,o=new _f(i);return o.moveTo(e,n),gu.set(this,o._tree),o}get topNode(){return new Rn(this,0,0,null)}resolve(e,n=0){let r=Xl(gu.get(this)||this.topNode,e,n,!1);return gu.set(this,r),r}resolveInner(e,n=0){let r=Xl(Hb.get(this)||this.topNode,e,n,!0);return Hb.set(this,r),r}resolveStack(e,n=0){return SZ(this,e,n)}iterate(e){let{enter:n,leave:r,from:i=0,to:o=this.length}=e,s=e.mode||0,a=(s&Pt.IncludeAnonymous)>0;for(let l=this.cursor(s|Pt.IncludeAnonymous);;){let c=!1;if(l.from<=o&&l.to>=i&&(!a&&l.type.isAnonymous||n(l)!==!1)){if(l.firstChild())continue;c=!0}for(;c&&r&&(a||!l.type.isAnonymous)&&r(l),!l.nextSibling();){if(!l.parent())return;c=!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:KO(zn.none,this.children,this.positions,0,this.children.length,0,this.length,(n,r,i)=>new Qt(this.type,n,r,i,this.propValues),e.makeTree||((n,r,i)=>new Qt(zn.none,n,r,i)))}static build(e){return wZ(e)}}Qt.empty=new Qt(zn.none,[],[],0);class HO{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 HO(this.buffer,this.index)}}class yo{constructor(e,n,r){this.buffer=e,this.length=n,this.set=r}get type(){return zn.none}toString(){let e=[];for(let n=0;n<this.buffer.length;)e.push(this.childString(n)),n=this.buffer[n+3];return e.join(",")}childString(e){let n=this.buffer[e],r=this.buffer[e+3],i=this.set.types[n],o=i.name;if(/\W/.test(o)&&!i.isError&&(o=JSON.stringify(o)),e+=4,r==e)return o;let s=[];for(;e<r;)s.push(this.childString(e)),e=this.buffer[e+3];return o+"("+s.join(",")+")"}findChild(e,n,r,i,o){let{buffer:s}=this,a=-1;for(let l=e;l!=n&&!(fE(o,i,s[l+1],s[l+2])&&(a=l,r>0));l=s[l+3]);return a}slice(e,n,r){let i=this.buffer,o=new Uint16Array(n-e),s=0;for(let a=e,l=0;a<n;){o[l++]=i[a++],o[l++]=i[a++]-r;let c=o[l++]=i[a++]-r;o[l++]=i[a++]-e,s=Math.max(s,c)}return new yo(o,s,this.set)}}function fE(t,e,n,r){switch(t){case-2:return n<e;case-1:return r>=e&&n<e;case 0:return n<e&&r>e;case 1:return n<=e&&r>e;case 2:return r>e;case 4:return!0}}function Xl(t,e,n,r){for(var i;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to<e);){let s=!r&&t instanceof Rn&&t.index<0?null:t.parent;if(!s)return t;t=s}let o=r?0:Pt.IgnoreOverlays;if(r)for(let s=t,a=s.parent;a;s=a,a=s.parent)s instanceof Rn&&s.index<0&&((i=a.enter(e,n,o))===null||i===void 0?void 0:i.from)!=s.from&&(t=a);for(;;){let s=t.enter(e,n,o);if(!s)return t;t=s}}class dE{cursor(e=0){return new _f(this,e)}getChild(e,n=null,r=null){let i=Jb(this,e,n,r);return i.length?i[0]:null}getChildren(e,n=null,r=null){return Jb(this,e,n,r)}resolve(e,n=0){return Xl(this,e,n,!1)}resolveInner(e,n=0){return Xl(this,e,n,!0)}matchContext(e){return J0(this,e)}enterUnfinishedNodesBefore(e){let n=this.childBefore(e),r=this;for(;n;){let i=n.lastChild;if(!i||i.to!=n.to)break;i.type.isError&&i.from==i.to?(r=n,n=i.prevSibling):n=i}return r}get node(){return this}get next(){return this.parent}}class Rn extends dE{constructor(e,n,r,i){super(),this._tree=e,this.from=n,this.index=r,this._parent=i}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,n,r,i,o=0){for(let s=this;;){for(let{children:a,positions:l}=s._tree,c=n>0?a.length:-1;e!=c;e+=n){let u=a[e],f=l[e]+s.from;if(fE(i,r,f,f+u.length)){if(u instanceof yo){if(o&Pt.ExcludeBuffers)continue;let d=u.findChild(0,u.buffer.length,n,r-f,i);if(d>-1)return new li(new yZ(s,u,e,f),null,d)}else if(o&Pt.IncludeAnonymous||!u.type.isAnonymous||JO(u)){let d;if(!(o&Pt.IgnoreMounts)&&(d=Ll.get(u))&&!d.overlay)return new Rn(d.tree,f,e,s);let h=new Rn(u,f,e,s);return o&Pt.IncludeAnonymous||!h.type.isAnonymous?h:h.nextChild(n<0?u.children.length-1:0,n,r,i)}}}if(o&Pt.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,r=0){let i;if(!(r&Pt.IgnoreOverlays)&&(i=Ll.get(this._tree))&&i.overlay){let o=e-this.from;for(let{from:s,to:a}of i.overlay)if((n>0?s<=o:s<o)&&(n<0?a>=o:a>o))return new Rn(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,r)}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 Jb(t,e,n,r){let i=t.cursor(),o=[];if(!i.firstChild())return o;if(n!=null){for(let s=!1;!s;)if(s=i.type.is(n),!i.nextSibling())return o}for(;;){if(r!=null&&i.type.is(r))return o;if(i.type.is(e)&&o.push(i.node),!i.nextSibling())return r==null?o:[]}}function J0(t,e,n=e.length-1){for(let r=t.parent;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[n]&&e[n]!=r.name)return!1;n--}}return!0}class yZ{constructor(e,n,r,i){this.parent=e,this.buffer=n,this.index=r,this.start=i}}class li extends dE{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,r){super(),this.context=e,this._parent=n,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,n,r){let{buffer:i}=this.context,o=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.context.start,r);return o<0?null:new li(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,r=0){if(r&Pt.ExcludeBuffers)return null;let{buffer:i}=this.context,o=i.findChild(this.index+4,i.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return o<0?null:new li(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 li(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 li(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],n=[],{buffer:r}=this.context,i=this.index+4,o=r.buffer[this.index+3];if(o>i){let s=r.buffer[this.index+1];e.push(r.slice(i,o,s)),n.push(0)}return new Qt(this.type,e,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function hE(t){if(!t.length)return null;let e=0,n=t[0];for(let o=1;o<t.length;o++){let s=t[o];(s.from>n.from||s.to<n.to)&&(n=s,e=o)}let r=n instanceof Rn&&n.index<0?null:n.parent,i=t.slice();return r?i[e]=r:i.splice(e,1),new bZ(i,n)}class bZ{constructor(e,n){this.heads=e,this.node=n}get next(){return hE(this.heads)}}function SZ(t,e,n){let r=t.resolveInner(e,n),i=null;for(let o=r instanceof Rn?r:r.context.parent;o;o=o.parent)if(o.index<0){let s=o.parent;(i||(i=[r])).push(s.resolve(e,n)),o=s}else{let s=Ll.get(o.tree);if(s&&s.overlay&&s.overlay[0].from<=e&&s.overlay[s.overlay.length-1].to>=e){let a=new Rn(s.tree,s.overlay[0].from+o.from,-1,o);(i||(i=[r])).push(Xl(a,e,n,!1))}}return i?hE(i):r}class _f{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 Rn)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let r=e._parent;r;r=r._parent)this.stack.unshift(r.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:r,buffer:i}=this.buffer;return this.type=n||i.set.types[i.buffer[e]],this.from=r+i.buffer[e+1],this.to=r+i.buffer[e+2],!0}yield(e){return e?e instanceof Rn?(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,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,r,this.mode));let{buffer:i}=this.buffer,o=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.buffer.start,r);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,r=this.mode){return this.buffer?r&Pt.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Pt.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&Pt.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,r=this.stack.length-1;if(e<0){let i=r<0?0:this.stack[r]+4;if(this.index!=i)return this.yieldBuf(n.findChild(i,this.index,-1,0,4))}else{let i=n.buffer[this.index+3];if(i<(r<0?n.buffer.length:n.buffer[this.stack[r]+3]))return this.yieldBuf(i)}return r<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,r,{buffer:i}=this;if(i){if(e>0){if(this.index<i.buffer.buffer.length)return!1}else for(let o=0;o<this.index;o++)if(i.buffer.buffer[o+3]<this.index)return!1;({index:n,parent:r}=i)}else({index:n,_parent:r}=this._tree);for(;r;{index:n,_parent:r}=r)if(n>-1)for(let o=n+e,s=e<0?-1:r._tree.children.length;o!=s;o+=e){let a=r._tree.children[o];if(this.mode&Pt.IncludeAnonymous||a instanceof yo||!a.type.isAnonymous||JO(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<e))&&this.parent(););for(;this.enterChild(1,e,n););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,n=null,r=0;if(e&&e.context==this.buffer)e:for(let i=this.index,o=this.stack.length;o>=0;){for(let s=e;s;s=s._parent)if(s.index==i){if(i==this.index)return s;n=s,r=o+1;break e}i=this.stack[--o]}for(let i=r;i<this.stack.length;i++)n=new li(this.buffer,n,this.stack[i]);return this.bufferNode=new li(this.buffer,n,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,n){for(let r=0;;){let i=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){r++;continue}this.type.isAnonymous||(i=!0)}for(;i&&n&&n(this),i=this.type.isAnonymous,!this.nextSibling();){if(!r)return;this.parent(),r--,i=!0}}}matchContext(e){if(!this.buffer)return J0(this.node,e);let{buffer:n}=this.buffer,{types:r}=n.set;for(let i=e.length-1,o=this.stack.length-1;i>=0;o--){if(o<0)return J0(this.node,e,i);let s=r[n.buffer[this.stack[o]]];if(!s.isAnonymous){if(e[i]&&e[i]!=s.name)return!1;i--}}return!0}}function JO(t){return t.children.some(e=>e instanceof yo||!e.type.isAnonymous||JO(e))}function wZ(t){var e;let{buffer:n,nodeSet:r,maxBufferLength:i=uE,reused:o=[],minRepeatType:s=r.types.length}=t,a=Array.isArray(n)?new HO(n,n.length):n,l=r.types,c=0,u=0;function f(b,w,C,k,I,A){let{id:E,start:$,end:R,size:M}=a,Q=u;for(;M<0;)if(a.next(),M==-1){let Y=o[E];C.push(Y),k.push($-b);return}else if(M==-3){c=E;return}else if(M==-4){u=E;return}else throw new RangeError(`Unrecognized record size: ${M}`);let Z=l[E],G,V,ee=$-b;if(R-$<=i&&(V=m(a.pos-w,I))){let Y=new Uint16Array(V.size-V.skip),z=a.pos-V.size,D=Y.length;for(;a.pos>z;)D=x(V.start,Y,D);G=new yo(Y,R-V.start,r),ee=V.start-b}else{let Y=a.pos-M;a.next();let z=[],D=[],B=E>=s?E:-1,N=0,U=R;for(;a.pos>Y;)B>=0&&a.id==B&&a.size>=0?(a.end<=U-i&&(p(z,D,$,N,a.end,U,B,Q),N=z.length,U=a.end),a.next()):A>2500?d($,Y,z,D):f($,Y,z,D,B,A+1);if(B>=0&&N>0&&N<z.length&&p(z,D,$,N,$,U,B,Q),z.reverse(),D.reverse(),B>-1&&N>0){let F=h(Z);G=KO(Z,z,D,0,z.length,0,R-$,F,F)}else G=O(Z,z,D,R-$,Q-R)}C.push(G),k.push(ee)}function d(b,w,C,k){let I=[],A=0,E=-1;for(;a.pos>w;){let{id:$,start:R,end:M,size:Q}=a;if(Q>4)a.next();else{if(E>-1&&R<E)break;E<0&&(E=M-i),I.push($,R,M),A++,a.next()}}if(A){let $=new Uint16Array(A*4),R=I[I.length-2];for(let M=I.length-3,Q=0;M>=0;M-=3)$[Q++]=I[M],$[Q++]=I[M+1]-R,$[Q++]=I[M+2]-R,$[Q++]=Q;C.push(new yo($,I[2]-R,r)),k.push(R-b)}}function h(b){return(w,C,k)=>{let I=0,A=w.length-1,E,$;if(A>=0&&(E=w[A])instanceof Qt){if(!A&&E.type==b&&E.length==k)return E;($=E.prop(ze.lookAhead))&&(I=C[A]+E.length+$)}return O(b,w,C,k,I)}}function p(b,w,C,k,I,A,E,$){let R=[],M=[];for(;b.length>k;)R.push(b.pop()),M.push(w.pop()+C-I);b.push(O(r.types[E],R,M,A-I,$-A)),w.push(I-C)}function O(b,w,C,k,I=0,A){if(c){let E=[ze.contextHash,c];A=A?[E].concat(A):[E]}if(I>25){let E=[ze.lookAhead,I];A=A?[E].concat(A):[E]}return new Qt(b,w,C,k,A)}function m(b,w){let C=a.fork(),k=0,I=0,A=0,E=C.end-i,$={size:0,start:0,skip:0};e:for(let R=C.pos-b;C.pos>R;){let M=C.size;if(C.id==w&&M>=0){$.size=k,$.start=I,$.skip=A,A+=4,k+=4,C.next();continue}let Q=C.pos-M;if(M<0||Q<R||C.start<E)break;let Z=C.id>=s?4:0,G=C.start;for(C.next();C.pos>Q;){if(C.size<0)if(C.size==-3)Z+=4;else break e;else C.id>=s&&(Z+=4);C.next()}I=G,k+=M,A+=Z}return(w<0||k==b)&&($.size=k,$.start=I,$.skip=A),$.size>4?$:void 0}function x(b,w,C){let{id:k,start:I,end:A,size:E}=a;if(a.next(),E>=0&&k<s){let $=C;if(E>4){let R=a.pos-(E-4);for(;a.pos>R;)C=x(b,w,C)}w[--C]=$,w[--C]=A-b,w[--C]=I-b,w[--C]=k}else E==-3?c=k:E==-4&&(u=k);return C}let v=[],y=[];for(;a.pos>0;)f(t.start||0,t.bufferStart||0,v,y,-1,0);let S=(e=t.length)!==null&&e!==void 0?e:v.length?y[0]+v[0].length:0;return new Qt(l[t.topID],v.reverse(),y.reverse(),S)}const Kb=new WeakMap;function Yu(t,e){if(!t.isAnonymous||e instanceof yo||e.type!=t)return 1;let n=Kb.get(e);if(n==null){n=1;for(let r of e.children){if(r.type!=t||!(r instanceof Qt)){n=1;break}n+=Yu(t,r)}Kb.set(e,n)}return n}function KO(t,e,n,r,i,o,s,a,l){let c=0;for(let p=r;p<i;p++)c+=Yu(t,e[p]);let u=Math.ceil(c*1.5/8),f=[],d=[];function h(p,O,m,x,v){for(let y=m;y<x;){let S=y,b=O[y],w=Yu(t,p[y]);for(y++;y<x;y++){let C=Yu(t,p[y]);if(w+C>=u)break;w+=C}if(y==S+1){if(w>u){let C=p[S];h(C.children,C.positions,0,C.children.length,O[S]+v);continue}f.push(p[S])}else{let C=O[y-1]+p[y-1].length-b;f.push(KO(t,p,O,S,y,b,C,null,l))}d.push(b+v-o)}}return h(e,n,r,i,0),(a||l)(f,d,s)}class pE{constructor(){this.map=new WeakMap}setBuffer(e,n,r){let i=this.map.get(e);i||this.map.set(e,i=new Map),i.set(n,r)}getBuffer(e,n){let r=this.map.get(e);return r&&r.get(n)}set(e,n){e instanceof li?this.setBuffer(e.context.buffer,e.index,n):e instanceof Rn&&this.map.set(e.tree,n)}get(e){return e instanceof li?this.getBuffer(e.context.buffer,e.index):e instanceof Rn?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 Bi{constructor(e,n,r,i,o=!1,s=!1){this.from=e,this.to=n,this.tree=r,this.offset=i,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=[],r=!1){let i=[new Bi(0,e.length,e,0,!1,r)];for(let o of n)o.to>e.length&&i.push(o);return i}static applyChanges(e,n,r=128){if(!n.length)return e;let i=[],o=1,s=e.length?e[0]:null;for(let a=0,l=0,c=0;;a++){let u=a<n.length?n[a]:null,f=u?u.fromA:1e9;if(f-l>=r)for(;s&&s.from<f;){let d=s;if(l>=d.from||f<=d.to||c){let h=Math.max(d.from,l)-c,p=Math.min(d.to,f)-c;d=h>=p?null:new Bi(h,p,d.tree,d.offset+c,a>0,!!u)}if(d&&i.push(d),s.to>f)break;s=o<e.length?e[o++]:null}if(!u)break;l=u.toA,c=u.toA-u.toB}return i}}let gE=class{startParse(e,n,r){return typeof e=="string"&&(e=new CZ(e)),r=r?r.length?r.map(i=>new Ar(i.from,i.to)):[new Ar(0,0)]:[new Ar(0,e.length)],this.createParse(e,n||[],r)}parse(e,n,r){let i=this.startParse(e,n,r);for(;;){let o=i.advance();if(o)return o}}};class CZ{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 kZ(t){return(e,n,r,i)=>new PZ(e,t,n,r,i)}class e1{constructor(e,n,r,i,o){this.parser=e,this.parse=n,this.overlay=r,this.target=i,this.from=o}}function t1(t){if(!t.length||t.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(t))}class AZ{constructor(e,n,r,i,o,s,a){this.parser=e,this.predicate=n,this.mounts=r,this.index=i,this.start=o,this.target=s,this.prev=a,this.depth=0,this.ranges=[]}}const K0=new ze({perNode:!0});class PZ{constructor(e,n,r,i,o){this.nest=n,this.input=r,this.fragments=i,this.ranges=o,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let r=this.baseParse.advance();if(!r)return null;if(this.baseParse=null,this.baseTree=r,this.startInner(),this.stoppedAt!=null)for(let i of this.inner)i.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let r=this.baseTree;return this.stoppedAt!=null&&(r=new Qt(r.type,r.children,r.positions,r.length,r.propValues.concat([[K0,this.stoppedAt]]))),r}let e=this.inner[this.innerDone],n=e.parse.advance();if(n){this.innerDone++;let r=Object.assign(Object.create(null),e.target.props);r[ze.mounted.id]=new Ll(n,e.overlay,e.parser),e.target.props=r}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let n=this.innerDone;n<this.inner.length;n++)this.inner[n].from<e&&(e=Math.min(e,this.inner[n].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let n=this.innerDone;n<this.inner.length;n++)this.inner[n].parse.stopAt(e)}startInner(){let e=new TZ(this.fragments),n=null,r=null,i=new _f(new Rn(this.baseTree,this.ranges[0].from,0,null),Pt.IncludeAnonymous|Pt.IgnoreMounts);e:for(let o,s;;){let a=!0,l;if(this.stoppedAt!=null&&i.from>=this.stoppedAt)a=!1;else if(e.hasNode(i)){if(n){let c=n.mounts.find(u=>u.frag.from<=i.from&&u.frag.to>=i.to&&u.mount.overlay);if(c)for(let u of c.mount.overlay){let f=u.from+c.pos,d=u.to+c.pos;f>=i.from&&d<=i.to&&!n.ranges.some(h=>h.from<d&&h.to>f)&&n.ranges.push({from:f,to:d})}}a=!1}else if(r&&(s=EZ(r.ranges,i.from,i.to)))a=s!=2;else if(!i.type.isAnonymous&&(o=this.nest(i,this.input))&&(i.from<i.to||!o.overlay)){i.tree||IZ(i);let c=e.findMounts(i.from,o.parser);if(typeof o.overlay=="function")n=new AZ(o.parser,o.overlay,c,this.inner.length,i.from,i.tree,n);else{let u=i1(this.ranges,o.overlay||(i.from<i.to?[new Ar(i.from,i.to)]:[]));u.length&&t1(u),(u.length||!o.overlay)&&this.inner.push(new e1(o.parser,u.length?o.parser.startParse(this.input,o1(c,u),u):o.parser.startParse(""),o.overlay?o.overlay.map(f=>new Ar(f.from-i.from,f.to-i.from)):null,i.tree,u.length?u[0].from:i.from)),o.overlay?u.length&&(r={ranges:u,depth:0,prev:r}):a=!1}}else n&&(l=n.predicate(i))&&(l===!0&&(l=new Ar(i.from,i.to)),l.from<l.to&&n.ranges.push(l));if(a&&i.firstChild())n&&n.depth++,r&&r.depth++;else for(;!i.nextSibling();){if(!i.parent())break e;if(n&&!--n.depth){let c=i1(this.ranges,n.ranges);c.length&&(t1(c),this.inner.splice(n.index,0,new e1(n.parser,n.parser.startParse(this.input,o1(n.mounts,c),c),n.ranges.map(u=>new Ar(u.from-n.start,u.to-n.start)),n.target,c[0].from))),n=n.prev}r&&!--r.depth&&(r=r.prev)}}}}function EZ(t,e,n){for(let r of t){if(r.from>=n)break;if(r.to>e)return r.from<=e&&r.to>=n?2:1}return 0}function n1(t,e,n,r,i,o){if(e<n){let s=t.buffer[e+1];r.push(t.slice(e,n,s)),i.push(s-o)}}function IZ(t){let{node:e}=t,n=[],r=e.context.buffer;do n.push(t.index),t.parent();while(!t.tree);let i=t.tree,o=i.children.indexOf(r),s=i.children[o],a=s.buffer,l=[o];function c(u,f,d,h,p,O){let m=n[O],x=[],v=[];n1(s,u,m,x,v,h);let y=a[m+1],S=a[m+2];l.push(x.length);let b=O?c(m+4,a[m+3],s.set.types[a[m]],y,S-y,O-1):e.toTree();return x.push(b),v.push(y-h),n1(s,a[m+3],f,x,v,h),new Qt(d,x,v,p)}i.children[o]=c(0,a.length,zn.none,0,s.length,n.length-1);for(let u of l){let f=t.tree.children[u],d=t.tree.positions[u];t.yield(new Rn(f,d+t.from,u,t._tree))}}class r1{constructor(e,n){this.offset=n,this.done=!1,this.cursor=e.cursor(Pt.IncludeAnonymous|Pt.IgnoreMounts)}moveTo(e){let{cursor:n}=this,r=e-this.offset;for(;!this.done&&n.from<r;)n.to>=e&&n.enter(r,1,Pt.IgnoreOverlays|Pt.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 Qt)n=n.children[0];else break}return!1}}let TZ=class{constructor(e){var n;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let r=this.curFrag=e[0];this.curTo=(n=r.tree.prop(K0))!==null&&n!==void 0?n:r.to,this.inner=new r1(r.tree,-r.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(K0))!==null&&e!==void 0?e:n.to,this.inner=new r1(n.tree,-n.offset)}}findMounts(e,n){var r;let i=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let o=this.inner.cursor.node;o;o=o.parent){let s=(r=o.tree)===null||r===void 0?void 0:r.prop(ze.mounted);if(s&&s.parser==n)for(let a=this.fragI;a<this.fragments.length;a++){let l=this.fragments[a];if(l.from>=o.to)break;l.tree==this.curFrag.tree&&i.push({frag:l,pos:o.from-l.offset,mount:s})}}}return i}};function i1(t,e){let n=null,r=e;for(let i=1,o=0;i<t.length;i++){let s=t[i-1].to,a=t[i].from;for(;o<r.length;o++){let l=r[o];if(l.from>=a)break;l.to<=s||(n||(r=n=e.slice()),l.from<s?(n[o]=new Ar(l.from,s),l.to>a&&n.splice(o+1,0,new Ar(a,l.to))):l.to>a?n[o--]=new Ar(a,l.to):n.splice(o--,1))}}return r}function $Z(t,e,n,r){let i=0,o=0,s=!1,a=!1,l=-1e9,c=[];for(;;){let u=i==t.length?1e9:s?t[i].to:t[i].from,f=o==e.length?1e9:a?e[o].to:e[o].from;if(s!=a){let d=Math.max(l,n),h=Math.min(u,f,r);d<h&&c.push(new Ar(d,h))}if(l=Math.min(u,f),l==1e9)break;u==l&&(s?(s=!1,i++):s=!0),f==l&&(a?(a=!1,o++):a=!0)}return c}function o1(t,e){let n=[];for(let{pos:r,mount:i,frag:o}of t){let s=r+(i.overlay?i.overlay[0].from:0),a=s+i.tree.length,l=Math.max(o.from,s),c=Math.min(o.to,a);if(i.overlay){let u=i.overlay.map(d=>new Ar(d.from+r,d.to+r)),f=$Z(e,u,l,c);for(let d=0,h=l;;d++){let p=d==f.length,O=p?c:f[d].from;if(O>h&&n.push(new Bi(h,O,i.tree,-s,o.from>=h||o.openStart,o.to<=O||o.openEnd)),p)break;h=f[d].to}}else n.push(new Bi(l,c,i.tree,-s,o.from>=s||o.openStart,o.to<=a||o.openEnd))}return n}let jZ=0,Ji=class mE{constructor(e,n,r){this.set=e,this.base=n,this.modified=r,this.id=jZ++}static define(e){if(e!=null&&e.base)throw new Error("Can not derive from a modified tag");let n=new mE([],null,[]);if(n.set.push(n),e)for(let r of e.set)n.set.push(r);return n}static defineModifier(){let e=new Mf;return n=>n.modified.indexOf(e)>-1?n:Mf.get(n.base||n,n.modified.concat(e).sort((r,i)=>r.id-i.id))}},RZ=0;class Mf{constructor(){this.instances=[],this.id=RZ++}static get(e,n){if(!n.length)return e;let r=n[0].instances.find(a=>a.base==e&&DZ(n,a.modified));if(r)return r;let i=[],o=new Ji(i,e,n);for(let a of n)a.instances.push(o);let s=QZ(n);for(let a of e.set)if(!a.modified.length)for(let l of s)i.push(Mf.get(a,l));return o}}function DZ(t,e){return t.length==e.length&&t.every((n,r)=>n==e[r])}function QZ(t){let e=[[]];for(let n=0;n<t.length;n++)for(let r=0,i=e.length;r<i;r++)e.push(e[r].concat(t[n]));return e.sort((n,r)=>r.length-n.length)}function ja(t){let e=Object.create(null);for(let n in t){let r=t[n];Array.isArray(r)||(r=[r]);for(let i of n.split(" "))if(i){let o=[],s=2,a=i;for(let f=0;;){if(a=="..."&&f>0&&f+3==i.length){s=1;break}let d=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!d)throw new RangeError("Invalid path: "+i);if(o.push(d[0]=="*"?"":d[0][0]=='"'?JSON.parse(d[0]):d[0]),f+=d[0].length,f==i.length)break;let h=i[f++];if(f==i.length&&h=="!"){s=0;break}if(h!="/")throw new RangeError("Invalid path: "+i);a=i.slice(f)}let l=o.length-1,c=o[l];if(!c)throw new RangeError("Invalid path: "+i);let u=new Nf(r,s,l>0?o.slice(0,l):null);e[c]=u.sort(e[c])}}return OE.add(e)}const OE=new ze;class Nf{constructor(e,n,r,i){this.tags=e,this.mode=n,this.context=r,this.next=i}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}Nf.empty=new Nf([],2,null);function xE(t,e){let n=Object.create(null);for(let o of t)if(!Array.isArray(o.tag))n[o.tag.id]=o.class;else for(let s of o.tag)n[s.id]=o.class;let{scope:r,all:i=null}=e||{};return{style:o=>{let s=i;for(let a of o)for(let l of a.set){let c=n[l.id];if(c){s=s?s+" "+c:c;break}}return s},scope:r}}function BZ(t,e){let n=null;for(let r of t){let i=r.style(e);i&&(n=n?n+" "+i:i)}return n}function _Z(t,e,n,r=0,i=t.length){let o=new MZ(r,Array.isArray(e)?e:[e],n);o.highlightRange(t.cursor(),r,i,"",o.highlighters),o.flush(i)}class MZ{constructor(e,n,r){this.at=e,this.highlighters=n,this.span=r,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,r,i,o){let{type:s,from:a,to:l}=e;if(a>=r||l<=n)return;s.isTop&&(o=this.highlighters.filter(h=>!h.scope||h.scope(s)));let c=i,u=NZ(e)||Nf.empty,f=BZ(o,u.tags);if(f&&(c&&(c+=" "),c+=f,u.mode==1&&(i+=(i?" ":"")+f)),this.startSpan(Math.max(n,a),c),u.opaque)return;let d=e.tree&&e.tree.prop(ze.mounted);if(d&&d.overlay){let h=e.node.enter(d.overlay[0].from+a,1),p=this.highlighters.filter(m=>!m.scope||m.scope(d.tree.type)),O=e.firstChild();for(let m=0,x=a;;m++){let v=m<d.overlay.length?d.overlay[m]:null,y=v?v.from+a:l,S=Math.max(n,x),b=Math.min(r,y);if(S<b&&O)for(;e.from<b&&(this.highlightRange(e,S,b,i,o),this.startSpan(Math.min(b,e.to),c),!(e.to>=y||!e.nextSibling())););if(!v||y>r)break;x=v.to+a,x>n&&(this.highlightRange(h.cursor(),Math.max(n,v.from+a),Math.min(r,x),"",p),this.startSpan(Math.min(r,x),c))}O&&e.parent()}else if(e.firstChild()){d&&(i="");do if(!(e.to<=n)){if(e.from>=r)break;this.highlightRange(e,n,r,i,o),this.startSpan(Math.min(r,e.to),c)}while(e.nextSibling());e.parent()}}}function NZ(t){let e=t.type.prop(OE);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const fe=Ji.define,mu=fe(),Ki=fe(),s1=fe(Ki),a1=fe(Ki),eo=fe(),Ou=fe(eo),fp=fe(eo),ni=fe(),_o=fe(ni),ei=fe(),ti=fe(),em=fe(),Ka=fe(em),xu=fe(),P={comment:mu,lineComment:fe(mu),blockComment:fe(mu),docComment:fe(mu),name:Ki,variableName:fe(Ki),typeName:s1,tagName:fe(s1),propertyName:a1,attributeName:fe(a1),className:fe(Ki),labelName:fe(Ki),namespace:fe(Ki),macroName:fe(Ki),literal:eo,string:Ou,docString:fe(Ou),character:fe(Ou),attributeValue:fe(Ou),number:fp,integer:fe(fp),float:fe(fp),bool:fe(eo),regexp:fe(eo),escape:fe(eo),color:fe(eo),url:fe(eo),keyword:ei,self:fe(ei),null:fe(ei),atom:fe(ei),unit:fe(ei),modifier:fe(ei),operatorKeyword:fe(ei),controlKeyword:fe(ei),definitionKeyword:fe(ei),moduleKeyword:fe(ei),operator:ti,derefOperator:fe(ti),arithmeticOperator:fe(ti),logicOperator:fe(ti),bitwiseOperator:fe(ti),compareOperator:fe(ti),updateOperator:fe(ti),definitionOperator:fe(ti),typeOperator:fe(ti),controlOperator:fe(ti),punctuation:em,separator:fe(em),bracket:Ka,angleBracket:fe(Ka),squareBracket:fe(Ka),paren:fe(Ka),brace:fe(Ka),content:ni,heading:_o,heading1:fe(_o),heading2:fe(_o),heading3:fe(_o),heading4:fe(_o),heading5:fe(_o),heading6:fe(_o),contentSeparator:fe(ni),list:fe(ni),quote:fe(ni),emphasis:fe(ni),strong:fe(ni),link:fe(ni),monospace:fe(ni),strikethrough:fe(ni),inserted:fe(),deleted:fe(),changed:fe(),invalid:fe(),meta:xu,documentMeta:fe(xu),annotation:fe(xu),processingInstruction:fe(xu),definition:Ji.defineModifier(),constant:Ji.defineModifier(),function:Ji.defineModifier(),standard:Ji.defineModifier(),local:Ji.defineModifier(),special:Ji.defineModifier()};xE([{tag:P.link,class:"tok-link"},{tag:P.heading,class:"tok-heading"},{tag:P.emphasis,class:"tok-emphasis"},{tag:P.strong,class:"tok-strong"},{tag:P.keyword,class:"tok-keyword"},{tag:P.atom,class:"tok-atom"},{tag:P.bool,class:"tok-bool"},{tag:P.url,class:"tok-url"},{tag:P.labelName,class:"tok-labelName"},{tag:P.inserted,class:"tok-inserted"},{tag:P.deleted,class:"tok-deleted"},{tag:P.literal,class:"tok-literal"},{tag:P.string,class:"tok-string"},{tag:P.number,class:"tok-number"},{tag:[P.regexp,P.escape,P.special(P.string)],class:"tok-string2"},{tag:P.variableName,class:"tok-variableName"},{tag:P.local(P.variableName),class:"tok-variableName tok-local"},{tag:P.definition(P.variableName),class:"tok-variableName tok-definition"},{tag:P.special(P.variableName),class:"tok-variableName2"},{tag:P.definition(P.propertyName),class:"tok-propertyName tok-definition"},{tag:P.typeName,class:"tok-typeName"},{tag:P.namespace,class:"tok-namespace"},{tag:P.className,class:"tok-className"},{tag:P.macroName,class:"tok-macroName"},{tag:P.propertyName,class:"tok-propertyName"},{tag:P.operator,class:"tok-operator"},{tag:P.comment,class:"tok-comment"},{tag:P.meta,class:"tok-meta"},{tag:P.invalid,class:"tok-invalid"},{tag:P.punctuation,class:"tok-punctuation"}]);var dp;const Qs=new ze;function vE(t){return me.define({combine:t?e=>e.concat(t):void 0})}const ex=new ze;class Wr{constructor(e,n,r=[],i=""){this.data=e,this.name=i,Ue.prototype.hasOwnProperty("tree")||Object.defineProperty(Ue.prototype,"tree",{get(){return Dt(this)}}),this.parser=n,this.extension=[So.of(this),Ue.languageData.of((o,s,a)=>{let l=l1(o,s,a),c=l.type.prop(Qs);if(!c)return[];let u=o.facet(c),f=l.type.prop(ex);if(f){let d=l.resolve(s-l.from,a);for(let h of f)if(h.test(d,o)){let p=o.facet(h.facet);return h.type=="replace"?p:p.concat(u)}}return u})].concat(r)}isActiveAt(e,n,r=-1){return l1(e,n,r).type.prop(Qs)==this.data}findRegions(e){let n=e.facet(So);if((n==null?void 0:n.data)==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let r=[],i=(o,s)=>{if(o.prop(Qs)==this.data){r.push({from:s,to:s+o.length});return}let a=o.prop(ze.mounted);if(a){if(a.tree.prop(Qs)==this.data){if(a.overlay)for(let l of a.overlay)r.push({from:l.from+s,to:l.to+s});else r.push({from:s,to:s+o.length});return}else if(a.overlay){let l=r.length;if(i(a.tree,a.overlay[0].from+s),r.length>l)return}}for(let l=0;l<o.children.length;l++){let c=o.children[l];c instanceof Qt&&i(c,o.positions[l]+s)}};return i(Dt(e),0),r}get allowsNesting(){return!0}}Wr.setState=_e.define();function l1(t,e,n){let r=t.facet(So),i=Dt(t).topNode;if(!r||r.allowsNesting)for(let o=i;o;o=o.enter(e,n,Pt.ExcludeBuffers))o.type.isTop&&(i=o);return i}class bo extends Wr{constructor(e,n,r){super(e,n,[],r),this.parser=n}static define(e){let n=vE(e.languageData);return new bo(n,e.parser.configure({props:[Qs.add(r=>r.isTop?n:void 0)]}),e.name)}configure(e,n){return new bo(this.data,this.parser.configure(e),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function Dt(t){let e=t.field(Wr.state,!1);return e?e.tree:Qt.empty}class FZ{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 r=this.cursorPos-this.string.length;return e<r||n>=this.cursorPos?this.doc.sliceString(e,n):this.string.slice(e-r,n-r)}}let el=null;class Ff{constructor(e,n,r=[],i,o,s,a,l){this.parser=e,this.state=n,this.fragments=r,this.tree=i,this.treeLen=o,this.viewport=s,this.skipped=a,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(e,n,r){return new Ff(e,n,[],Qt.empty,0,r,[],null)}startParse(){return this.parser.startParse(new FZ(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=Qt.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if(typeof e=="number"){let i=Date.now()+e;e=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n<this.state.doc.length&&this.parse.stopAt(n);;){let i=this.parse.advance();if(i)if(this.fragments=this.withoutTempSkipped(Bi.addTree(i,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(r=this.parse.stoppedAt)!==null&&r!==void 0?r:this.state.doc.length,this.tree=i,this.parse=null,this.treeLen<(n??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,n;this.parse&&(e=this.parse.parsedPos)>=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(Bi.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=el;el=this;try{return e()}finally{el=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=c1(e,n.from,n.to);return e}changes(e,n){let{fragments:r,tree:i,treeLen:o,viewport:s,skipped:a}=this;if(this.takeTree(),!e.empty){let l=[];if(e.iterChangedRanges((c,u,f,d)=>l.push({fromA:c,toA:u,fromB:f,toB:d})),r=Bi.applyChanges(r,l),i=Qt.empty,o=0,s={from:e.mapPos(s.from,-1),to:e.mapPos(s.to,1)},this.skipped.length){a=[];for(let c of this.skipped){let u=e.mapPos(c.from,1),f=e.mapPos(c.to,-1);u<f&&a.push({from:u,to:f})}}}return new Ff(this.parser,n,r,i,o,s,a,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let n=this.skipped.length;for(let r=0;r<this.skipped.length;r++){let{from:i,to:o}=this.skipped[r];i<e.to&&o>e.from&&(this.fragments=c1(this.fragments,i,o),this.skipped.splice(r--,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 gE{createParse(n,r,i){let o=i[0].from,s=i[i.length-1].to;return{parsedPos:o,advance(){let l=el;if(l){for(let c of i)l.tempSkipped.push(c);e&&(l.scheduleOn=l.scheduleOn?Promise.all([l.scheduleOn,e]):e)}return this.parsedPos=s,new Qt(zn.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 el}}function c1(t,e,n){return Bi.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class fa{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),r=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,r)||n.takeTree(),new fa(n)}static init(e){let n=Math.min(3e3,e.doc.length),r=Ff.create(e.facet(So).parser,e,{from:0,to:n});return r.work(20,n)||r.takeTree(),new fa(r)}}Wr.state=ln.define({create:fa.init,update(t,e){for(let n of e.effects)if(n.is(Wr.setState))return n.value;return e.startState.facet(So)!=e.state.facet(So)?fa.init(e.state):t.apply(e)}});let yE=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(yE=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:400})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const hp=typeof navigator<"u"&&(!((dp=navigator.scheduling)===null||dp===void 0)&&dp.isInputPending)?()=>navigator.scheduling.isInputPending():null,ZZ=Bt.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(Wr.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(Wr.state);(n.tree!=n.context.tree||!n.context.isDone(e.doc.length))&&(this.working=yE(this.work))}work(e){this.working=null;let n=Date.now();if(this.chunkEnd<n&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=n+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:r,viewport:{to:i}}=this.view,o=r.field(Wr.state);if(o.tree==o.context.tree&&o.context.isDone(i+1e5))return;let s=Date.now()+Math.min(this.chunkBudget,100,e&&!hp?Math.max(25,e.timeRemaining()-5):1e9),a=o.context.treeLen<i&&r.doc.length>i+1e3,l=o.context.work(()=>hp&&hp()||Date.now()>s,i+(a?0:1e5));this.chunkBudget-=Date.now()-n,(l||this.chunkBudget<=0)&&(o.context.takeTree(),this.view.dispatch({effects:Wr.setState.of(new fa(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=>Zn(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()}}}),So=me.define({combine(t){return t.length?t[0]:null},enables:t=>[Wr.state,ZZ,de.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]});class mc{constructor(e,n=[]){this.language=e,this.support=n,this.extension=[e,n]}}const WZ=me.define(),Oc=me.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 Zf(t){let e=t.facet(Oc);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function Gl(t,e){let n="",r=t.tabSize,i=t.facet(Oc)[0];if(i==" "){for(;e>=r;)n+=" ",e-=r;i=" "}for(let o=0;o<e;o++)n+=i;return n}function tx(t,e){t instanceof Ue&&(t=new Yd(t));for(let r of t.state.facet(WZ)){let i=r(t,e);if(i!==void 0)return i}let n=Dt(t.state);return n.length>=e?VZ(t,n,e):null}class Yd{constructor(e,n={}){this.state=e,this.options=n,this.unit=Zf(e)}lineAt(e,n=1){let r=this.state.doc.lineAt(e),{simulateBreak:i,simulateDoubleBreak:o}=this.options;return i!=null&&i>=r.from&&i<=r.to?o&&i==e?{text:"",from:e}:(n<0?i<e:i<=e)?{text:r.text.slice(i-r.from),from:i}:{text:r.text.slice(0,i-r.from),from:r.from}:r}textAfterPos(e,n=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:r,from:i}=this.lineAt(e,n);return r.slice(e-i,Math.min(r.length,e+100-i))}column(e,n=1){let{text:r,from:i}=this.lineAt(e,n),o=this.countColumn(r,e-i),s=this.options.overrideIndentation?this.options.overrideIndentation(i):-1;return s>-1&&(o+=s-this.countColumn(r,r.search(/\S|$/))),o}countColumn(e,n=e.length){return Ta(e,this.state.tabSize,n)}lineIndent(e,n=1){let{text:r,from:i}=this.lineAt(e,n),o=this.options.overrideIndentation;if(o){let s=o(i);if(s>-1)return s}return this.countColumn(r,r.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const Ra=new ze;function VZ(t,e,n){let r=e.resolveStack(n),i=r.node.enterUnfinishedNodesBefore(n);if(i!=r.node){let o=[];for(let s=i;s!=r.node;s=s.parent)o.push(s);for(let s=o.length-1;s>=0;s--)r={node:o[s],next:r}}return bE(r,t,n)}function bE(t,e,n){for(let r=t;r;r=r.next){let i=LZ(r.node);if(i)return i(nx.create(e,n,r))}return 0}function zZ(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function LZ(t){let e=t.type.prop(Ra);if(e)return e;let n=t.firstChild,r;if(n&&(r=n.type.prop(ze.closedBy))){let i=t.lastChild,o=i&&r.indexOf(i.name)>-1;return s=>SE(s,!0,1,void 0,o&&!zZ(s)?i.from:void 0)}return t.parent==null?XZ:null}function XZ(){return 0}class nx extends Yd{constructor(e,n,r){super(e.state,e.options),this.base=e,this.pos=n,this.context=r}get node(){return this.context.node}static create(e,n,r){return new nx(e,n,r)}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 r=e.resolve(n.from);for(;r.parent&&r.parent.from==r.from;)r=r.parent;if(GZ(r,e))break;n=this.state.doc.lineAt(r.from)}return this.lineIndent(n.from)}continue(){return bE(this.context.next,this.base,this.pos)}}function GZ(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function YZ(t){let e=t.node,n=e.childAfter(e.from),r=e.lastChild;if(!n)return null;let i=t.options.simulateBreak,o=t.state.doc.lineAt(n.from),s=i==null||i<=o.from?o.to:Math.min(o.to,i);for(let a=n.to;;){let l=e.childAfter(a);if(!l||l==r)return null;if(!l.type.isSkipped)return l.from<s?n:null;a=l.to}}function qZ({closing:t,align:e=!0,units:n=1}){return r=>SE(r,e,n,t)}function SE(t,e,n,r,i){let o=t.textAfter,s=o.match(/^\s*/)[0].length,a=r&&o.slice(s,s+r.length)==r||i==t.pos+s,l=e?YZ(t):null;return l?a?t.column(l.from):t.column(l.to):t.baseIndent+(a?0:t.unit*n)}const UZ=t=>t.baseIndent;function qs({except:t,units:e=1}={}){return n=>{let r=t&&t.test(n.textAfter);return n.baseIndent+(r?0:e*n.unit)}}const HZ=200;function JZ(){return Ue.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:r}=t.newSelection.main,i=n.lineAt(r);if(r>i.from+HZ)return t;let o=n.sliceString(i.from,r);if(!e.some(c=>c.test(o)))return t;let{state:s}=t,a=-1,l=[];for(let{head:c}of s.selection.ranges){let u=s.doc.lineAt(c);if(u.from==a)continue;a=u.from;let f=tx(s,u.from);if(f==null)continue;let d=/^\s*/.exec(u.text)[0],h=Gl(s,f);d!=h&&l.push({from:u.from,to:u.from+d.length,insert:h})}return l.length?[t,{changes:l,sequential:!0}]:t})}const KZ=me.define(),Da=new ze;function rx(t){let e=t.firstChild,n=t.lastChild;return e&&e.to<n.from?{from:e.to,to:n.type.isError?t.to:n.from}:null}function e6(t,e,n){let r=Dt(t);if(r.length<n)return null;let i=r.resolveStack(n,1),o=null;for(let s=i;s;s=s.next){let a=s.node;if(a.to<=n||a.from>n)continue;if(o&&a.from<e)break;let l=a.type.prop(Da);if(l&&(a.to<r.length-50||r.length==t.doc.length||!t6(a))){let c=l(a,t);c&&c.from<=n&&c.from>=e&&c.to>n&&(o=c)}}return o}function t6(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function Wf(t,e,n){for(let r of t.facet(KZ)){let i=r(t,e,n);if(i)return i}return e6(t,e,n)}function wE(t,e){let n=e.mapPos(t.from,1),r=e.mapPos(t.to,-1);return n>=r?void 0:{from:n,to:r}}const qd=_e.define({map:wE}),xc=_e.define({map:wE});function CE(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some(r=>r.from<=n&&r.to>=n)||e.push(t.lineBlockAt(n));return e}const ns=ln.define({create(){return we.none},update(t,e){t=t.map(e.changes);for(let n of e.effects)if(n.is(qd)&&!n6(t,n.value.from,n.value.to)){let{preparePlaceholder:r}=e.state.facet(PE),i=r?we.replace({widget:new c6(r(e.state,n.value))}):u1;t=t.update({add:[i.range(n.value.from,n.value.to)]})}else n.is(xc)&&(t=t.update({filter:(r,i)=>n.value.from!=r||n.value.to!=i,filterFrom:n.value.from,filterTo:n.value.to}));if(e.selection){let n=!1,{head:r}=e.selection.main;t.between(r,r,(i,o)=>{i<r&&o>r&&(n=!0)}),n&&(t=t.update({filterFrom:r,filterTo:r,filter:(i,o)=>o<=r||i>=r}))}return t},provide:t=>de.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,(r,i)=>{n.push(r,i)}),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<t.length;){let r=t[n++],i=t[n++];if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid JSON for fold state");e.push(u1.range(r,i))}return we.set(e,!0)}});function Vf(t,e,n){var r;let i=null;return(r=t.field(ns,!1))===null||r===void 0||r.between(e,n,(o,s)=>{(!i||i.from>o)&&(i={from:o,to:s})}),i}function n6(t,e,n){let r=!1;return t.between(e,e,(i,o)=>{i==e&&o==n&&(r=!0)}),r}function kE(t,e){return t.field(ns,!1)?e:e.concat(_e.appendConfig.of(EE()))}const r6=t=>{for(let e of CE(t)){let n=Wf(t.state,e.from,e.to);if(n)return t.dispatch({effects:kE(t.state,[qd.of(n),AE(t,n)])}),!0}return!1},i6=t=>{if(!t.state.field(ns,!1))return!1;let e=[];for(let n of CE(t)){let r=Vf(t.state,n.from,n.to);r&&e.push(xc.of(r),AE(t,r,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function AE(t,e,n=!0){let r=t.state.doc.lineAt(e.from).number,i=t.state.doc.lineAt(e.to).number;return de.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${r} ${t.state.phrase("to")} ${i}.`)}const o6=t=>{let{state:e}=t,n=[];for(let r=0;r<e.doc.length;){let i=t.lineBlockAt(r),o=Wf(e,i.from,i.to);o&&n.push(qd.of(o)),r=(o?t.lineBlockAt(o.to):i).to+1}return n.length&&t.dispatch({effects:kE(t.state,n)}),!!n.length},s6=t=>{let e=t.state.field(ns,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,(r,i)=>{n.push(xc.of({from:r,to:i}))}),t.dispatch({effects:n}),!0},a6=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:r6},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:i6},{key:"Ctrl-Alt-[",run:o6},{key:"Ctrl-Alt-]",run:s6}],l6={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},PE=me.define({combine(t){return Ci(t,l6)}});function EE(t){return[ns,d6]}function IE(t,e){let{state:n}=t,r=n.facet(PE),i=s=>{let a=t.lineBlockAt(t.posAtDOM(s.target)),l=Vf(t.state,a.from,a.to);l&&t.dispatch({effects:xc.of(l)}),s.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(t,i,e);let o=document.createElement("span");return o.textContent=r.placeholderText,o.setAttribute("aria-label",n.phrase("folded code")),o.title=n.phrase("unfold"),o.className="cm-foldPlaceholder",o.onclick=i,o}const u1=we.replace({widget:new class extends ki{toDOM(t){return IE(t,null)}}});class c6 extends ki{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return IE(e,this.value)}}const u6={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class pp extends Zi{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 f6(t={}){let e=Object.assign(Object.assign({},u6),t),n=new pp(e,!0),r=new pp(e,!1),i=Bt.fromClass(class{constructor(s){this.from=s.viewport.from,this.markers=this.buildMarkers(s)}update(s){(s.docChanged||s.viewportChanged||s.startState.facet(So)!=s.state.facet(So)||s.startState.field(ns,!1)!=s.state.field(ns,!1)||Dt(s.startState)!=Dt(s.state)||e.foldingChanged(s))&&(this.markers=this.buildMarkers(s.view))}buildMarkers(s){let a=new mo;for(let l of s.viewportLineBlocks){let c=Vf(s.state,l.from,l.to)?r:Wf(s.state,l.from,l.to)?n:null;c&&a.add(l.from,l.from,c)}return a.finish()}}),{domEventHandlers:o}=e;return[i,lZ({class:"cm-foldGutter",markers(s){var a;return((a=s.plugin(i))===null||a===void 0?void 0:a.markers)||et.empty},initialSpacer(){return new pp(e,!1)},domEventHandlers:Object.assign(Object.assign({},o),{click:(s,a,l)=>{if(o.click&&o.click(s,a,l))return!0;let c=Vf(s.state,a.from,a.to);if(c)return s.dispatch({effects:xc.of(c)}),!0;let u=Wf(s.state,a.from,a.to);return u?(s.dispatch({effects:qd.of(u)}),!0):!1}})}),EE()]}const d6=de.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 Qa{constructor(e,n){this.specs=e;let r;function i(a){let l=Oo.newName();return(r||(r=Object.create(null)))["."+l]=a,l}const o=typeof n.all=="string"?n.all:n.all?i(n.all):void 0,s=n.scope;this.scope=s instanceof Wr?a=>a.prop(Qs)==s.data:s?a=>a==s:void 0,this.style=xE(e.map(a=>({tag:a.tag,class:a.class||i(Object.assign({},a,{tag:null}))})),{all:o}).style,this.module=r?new Oo(r):null,this.themeType=n.themeType}static define(e,n){return new Qa(e,n||{})}}const tm=me.define(),TE=me.define({combine(t){return t.length?[t[0]]:null}});function gp(t){let e=t.facet(tm);return e.length?e:t.facet(TE)}function ix(t,e){let n=[p6],r;return t instanceof Qa&&(t.module&&n.push(de.styleModule.of(t.module)),r=t.themeType),e!=null&&e.fallback?n.push(TE.of(t)):r?n.push(tm.computeN([de.darkTheme],i=>i.facet(de.darkTheme)==(r=="dark")?[t]:[])):n.push(tm.of(t)),n}class h6{constructor(e){this.markCache=Object.create(null),this.tree=Dt(e.state),this.decorations=this.buildDeco(e,gp(e.state)),this.decoratedTo=e.viewport.to}update(e){let n=Dt(e.state),r=gp(e.state),i=r!=gp(e.startState),{viewport:o}=e.view,s=e.changes.mapPos(this.decoratedTo,1);n.length<o.to&&!i&&n.type==this.tree.type&&s>=o.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=s):(n!=this.tree||e.viewportChanged||i)&&(this.tree=n,this.decorations=this.buildDeco(e.view,r),this.decoratedTo=o.to)}buildDeco(e,n){if(!n||!this.tree.length)return we.none;let r=new mo;for(let{from:i,to:o}of e.visibleRanges)_Z(this.tree,n,(s,a,l)=>{r.add(s,a,this.markCache[l]||(this.markCache[l]=we.mark({class:l})))},i,o);return r.finish()}}const p6=Si.high(Bt.fromClass(h6,{decorations:t=>t.decorations})),g6=Qa.define([{tag:P.meta,color:"#404740"},{tag:P.link,textDecoration:"underline"},{tag:P.heading,textDecoration:"underline",fontWeight:"bold"},{tag:P.emphasis,fontStyle:"italic"},{tag:P.strong,fontWeight:"bold"},{tag:P.strikethrough,textDecoration:"line-through"},{tag:P.keyword,color:"#708"},{tag:[P.atom,P.bool,P.url,P.contentSeparator,P.labelName],color:"#219"},{tag:[P.literal,P.inserted],color:"#164"},{tag:[P.string,P.deleted],color:"#a11"},{tag:[P.regexp,P.escape,P.special(P.string)],color:"#e40"},{tag:P.definition(P.variableName),color:"#00f"},{tag:P.local(P.variableName),color:"#30a"},{tag:[P.typeName,P.namespace],color:"#085"},{tag:P.className,color:"#167"},{tag:[P.special(P.variableName),P.macroName],color:"#256"},{tag:P.definition(P.propertyName),color:"#00c"},{tag:P.comment,color:"#940"},{tag:P.invalid,color:"#f00"}]),m6=de.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),$E=1e4,jE="()[]{}",RE=me.define({combine(t){return Ci(t,{afterCursor:!0,brackets:jE,maxScanDistance:$E,renderMatch:v6})}}),O6=we.mark({class:"cm-matchingBracket"}),x6=we.mark({class:"cm-nonmatchingBracket"});function v6(t){let e=[],n=t.matched?O6:x6;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 y6=ln.define({create(){return we.none},update(t,e){if(!e.docChanged&&!e.selection)return t;let n=[],r=e.state.facet(RE);for(let i of e.state.selection.ranges){if(!i.empty)continue;let o=ci(e.state,i.head,-1,r)||i.head>0&&ci(e.state,i.head-1,1,r)||r.afterCursor&&(ci(e.state,i.head,1,r)||i.head<e.state.doc.length&&ci(e.state,i.head+1,-1,r));o&&(n=n.concat(r.renderMatch(o,e.state)))}return we.set(n,!0)},provide:t=>de.decorations.from(t)}),b6=[y6,m6];function S6(t={}){return[RE.of(t),b6]}const ox=new ze;function nm(t,e,n){let r=t.prop(e<0?ze.openedBy:ze.closedBy);if(r)return r;if(t.name.length==1){let i=n.indexOf(t.name);if(i>-1&&i%2==(e<0?1:0))return[n[i+e]]}return null}function rm(t){let e=t.type.prop(ox);return e?e(t.node):t}function ci(t,e,n,r={}){let i=r.maxScanDistance||$E,o=r.brackets||jE,s=Dt(t),a=s.resolveInner(e,n);for(let l=a;l;l=l.parent){let c=nm(l.type,n,o);if(c&&l.from<l.to){let u=rm(l);if(u&&(n>0?e>=u.from&&e<u.to:e>u.from&&e<=u.to))return w6(t,e,n,l,u,c,o)}}return C6(t,e,n,s,a.type,i,o)}function w6(t,e,n,r,i,o,s){let a=r.parent,l={from:i.from,to:i.to},c=0,u=a==null?void 0:a.cursor();if(u&&(n<0?u.childBefore(r.from):u.childAfter(r.to)))do if(n<0?u.to<=r.from:u.from>=r.to){if(c==0&&o.indexOf(u.type.name)>-1&&u.from<u.to){let f=rm(u);return{start:l,end:f?{from:f.from,to:f.to}:void 0,matched:!0}}else if(nm(u.type,n,s))c++;else if(nm(u.type,-n,s)){if(c==0){let f=rm(u);return{start:l,end:f&&f.from<f.to?{from:f.from,to:f.to}:void 0,matched:!1}}c--}}while(n<0?u.prevSibling():u.nextSibling());return{start:l,matched:!1}}function C6(t,e,n,r,i,o,s){let a=n<0?t.sliceDoc(e-1,e):t.sliceDoc(e,e+1),l=s.indexOf(a);if(l<0||l%2==0!=n>0)return null;let c={from:n<0?e-1:e,to:n>0?e+1:e},u=t.doc.iterRange(e,n>0?t.doc.length:0),f=0;for(let d=0;!u.next().done&&d<=o;){let h=u.value;n<0&&(d+=h.length);let p=e+d*n;for(let O=n>0?0:h.length-1,m=n>0?h.length:-1;O!=m;O+=n){let x=s.indexOf(h[O]);if(!(x<0||r.resolveInner(p+O,1).type!=i))if(x%2==0==n>0)f++;else{if(f==1)return{start:c,end:{from:p+O,to:p+O+1},matched:x>>1==l>>1};f--}}n>0&&(d+=h.length)}return u.done?{start:c,matched:!1}:null}const k6=Object.create(null),f1=[zn.none],d1=[],h1=Object.create(null),A6=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"]])A6[t]=P6(k6,e);function mp(t,e){d1.indexOf(t)>-1||(d1.push(t),console.warn(e))}function P6(t,e){let n=[];for(let a of e.split(" ")){let l=[];for(let c of a.split(".")){let u=t[c]||P[c];u?typeof u=="function"?l.length?l=l.map(u):mp(c,`Modifier ${c} used at start of tag`):l.length?mp(c,`Tag ${c} used as modifier`):l=Array.isArray(u)?u:[u]:mp(c,`Unknown highlighting tag ${c}`)}for(let c of l)n.push(c)}if(!n.length)return 0;let r=e.replace(/ /g,"_"),i=r+" "+n.map(a=>a.id),o=h1[i];if(o)return o.id;let s=h1[i]=zn.define({id:f1.length,name:r,props:[ja({[r]:n})]});return f1.push(s),s.id}$t.RTL,$t.LTR;const E6=t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),r=ax(t.state,n.from);return r.line?I6(t):r.block?$6(t):!1};function sx(t,e){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=t(e,n);return i?(r(n.update(i)),!0):!1}}const I6=sx(D6,0),T6=sx(DE,0),$6=sx((t,e)=>DE(t,e,R6(e)),0);function ax(t,e){let n=t.languageDataAt("commentTokens",e);return n.length?n[0]:{}}const tl=50;function j6(t,{open:e,close:n},r,i){let o=t.sliceDoc(r-tl,r),s=t.sliceDoc(i,i+tl),a=/\s*$/.exec(o)[0].length,l=/^\s*/.exec(s)[0].length,c=o.length-a;if(o.slice(c-e.length,c)==e&&s.slice(l,l+n.length)==n)return{open:{pos:r-a,margin:a&&1},close:{pos:i+l,margin:l&&1}};let u,f;i-r<=2*tl?u=f=t.sliceDoc(r,i):(u=t.sliceDoc(r,r+tl),f=t.sliceDoc(i-tl,i));let d=/^\s*/.exec(u)[0].length,h=/\s*$/.exec(f)[0].length,p=f.length-h-n.length;return u.slice(d,d+e.length)==e&&f.slice(p,p+n.length)==n?{open:{pos:r+d+e.length,margin:/\s/.test(u.charAt(d+e.length))?1:0},close:{pos:i-h-n.length,margin:/\s/.test(f.charAt(p-1))?1:0}}:null}function R6(t){let e=[];for(let n of t.selection.ranges){let r=t.doc.lineAt(n.from),i=n.to<=r.to?r:t.doc.lineAt(n.to),o=e.length-1;o>=0&&e[o].to>r.from?e[o].to=i.to:e.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return e}function DE(t,e,n=e.selection.ranges){let r=n.map(o=>ax(e,o.from).block);if(!r.every(o=>o))return null;let i=n.map((o,s)=>j6(e,r[s],o.from,o.to));if(t!=2&&!i.every(o=>o))return{changes:e.changes(n.map((o,s)=>i[s]?[]:[{from:o.from,insert:r[s].open+" "},{from:o.to,insert:" "+r[s].close}]))};if(t!=1&&i.some(o=>o)){let o=[];for(let s=0,a;s<i.length;s++)if(a=i[s]){let l=r[s],{open:c,close:u}=a;o.push({from:c.pos-l.open.length,to:c.pos+c.margin},{from:u.pos-u.margin,to:u.pos+l.close.length})}return{changes:o}}return null}function D6(t,e,n=e.selection.ranges){let r=[],i=-1;for(let{from:o,to:s}of n){let a=r.length,l=1e9,c=ax(e,o).line;if(c){for(let u=o;u<=s;){let f=e.doc.lineAt(u);if(f.from>i&&(o==s||s>f.from)){i=f.from;let d=/^\s*/.exec(f.text)[0].length,h=d==f.length,p=f.text.slice(d,d+c.length)==c?d:-1;d<f.text.length&&d<l&&(l=d),r.push({line:f,comment:p,token:c,indent:d,empty:h,single:!1})}u=f.to+1}if(l<1e9)for(let u=a;u<r.length;u++)r[u].indent<r[u].line.text.length&&(r[u].indent=l);r.length==a+1&&(r[a].single=!0)}}if(t!=2&&r.some(o=>o.comment<0&&(!o.empty||o.single))){let o=[];for(let{line:a,token:l,indent:c,empty:u,single:f}of r)(f||!u)&&o.push({from:a.from+c,insert:l+" "});let s=e.changes(o);return{changes:s,selection:e.selection.map(s,1)}}else if(t!=1&&r.some(o=>o.comment>=0)){let o=[];for(let{line:s,comment:a,token:l}of r)if(a>=0){let c=s.from+a,u=c+l.length;s.text[u-s.from]==" "&&u++,o.push({from:c,to:u})}return{changes:o}}return null}const im=wi.define(),Q6=wi.define(),B6=me.define(),QE=me.define({combine(t){return Ci(t,{minDepth:100,newGroupDelay:500,joinToEvent:(e,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,n)=>(r,i)=>e(r,i)||n(r,i)})}}),BE=ln.define({create(){return ui.empty},update(t,e){let n=e.state.facet(QE),r=e.annotation(im);if(r){let l=Hn.fromTransaction(e,r.selection),c=r.side,u=c==0?t.undone:t.done;return l?u=zf(u,u.length,n.minDepth,l):u=NE(u,e.startState.selection),new ui(c==0?r.rest:u,c==0?u:r.rest)}let i=e.annotation(Q6);if((i=="full"||i=="before")&&(t=t.isolate()),e.annotation(qt.addToHistory)===!1)return e.changes.empty?t:t.addMapping(e.changes.desc);let o=Hn.fromTransaction(e),s=e.annotation(qt.time),a=e.annotation(qt.userEvent);return o?t=t.addChanges(o,s,a,n,e):e.selection&&(t=t.addSelection(e.startState.selection,s,a,n.newGroupDelay)),(i=="full"||i=="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 ui(t.done.map(Hn.fromJSON),t.undone.map(Hn.fromJSON))}});function _6(t={}){return[BE,QE.of(t),de.domEventHandlers({beforeinput(e,n){let r=e.inputType=="historyUndo"?_E:e.inputType=="historyRedo"?om:null;return r?(e.preventDefault(),r(n)):!1}})]}function Ud(t,e){return function({state:n,dispatch:r}){if(!e&&n.readOnly)return!1;let i=n.field(BE,!1);if(!i)return!1;let o=i.pop(t,n,e);return o?(r(o),!0):!1}}const _E=Ud(0,!1),om=Ud(1,!1),M6=Ud(0,!0),N6=Ud(1,!0);class Hn{constructor(e,n,r,i,o){this.changes=e,this.effects=n,this.mapped=r,this.startSelection=i,this.selectionsAfter=o}setSelAfter(e){return new Hn(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,n,r;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:(r=this.startSelection)===null||r===void 0?void 0:r.toJSON(),selectionsAfter:this.selectionsAfter.map(i=>i.toJSON())}}static fromJSON(e){return new Hn(e.changes&&rn.fromJSON(e.changes),[],e.mapped&&pi.fromJSON(e.mapped),e.startSelection&&ie.fromJSON(e.startSelection),e.selectionsAfter.map(ie.fromJSON))}static fromTransaction(e,n){let r=Pr;for(let i of e.startState.facet(B6)){let o=i(e);o.length&&(r=r.concat(o))}return!r.length&&e.changes.empty?null:new Hn(e.changes.invert(e.startState.doc),r,void 0,n||e.startState.selection,Pr)}static selection(e){return new Hn(void 0,Pr,void 0,void 0,e)}}function zf(t,e,n,r){let i=e+1>n+20?e-n-1:0,o=t.slice(i,e);return o.push(r),o}function F6(t,e){let n=[],r=!1;return t.iterChangedRanges((i,o)=>n.push(i,o)),e.iterChangedRanges((i,o,s,a)=>{for(let l=0;l<n.length;){let c=n[l++],u=n[l++];a>=c&&s<=u&&(r=!0)}}),r}function Z6(t,e){return t.ranges.length==e.ranges.length&&t.ranges.filter((n,r)=>n.empty!=e.ranges[r].empty).length===0}function ME(t,e){return t.length?e.length?t.concat(e):t:e}const Pr=[],W6=200;function NE(t,e){if(t.length){let n=t[t.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-W6));return r.length&&r[r.length-1].eq(e)?t:(r.push(e),zf(t,t.length-1,1e9,n.setSelAfter(r)))}else return[Hn.selection([e])]}function V6(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 Op(t,e){if(!t.length)return t;let n=t.length,r=Pr;for(;n;){let i=z6(t[n-1],e,r);if(i.changes&&!i.changes.empty||i.effects.length){let o=t.slice(0,n);return o[n-1]=i,o}else e=i.mapped,n--,r=i.selectionsAfter}return r.length?[Hn.selection(r)]:Pr}function z6(t,e,n){let r=ME(t.selectionsAfter.length?t.selectionsAfter.map(a=>a.map(e)):Pr,n);if(!t.changes)return Hn.selection(r);let i=t.changes.map(e),o=e.mapDesc(t.changes,!0),s=t.mapped?t.mapped.composeDesc(o):o;return new Hn(i,_e.mapEffects(t.effects,e),s,t.startSelection.map(o),r)}const L6=/^(input\.type|delete)($|\.)/;class ui{constructor(e,n,r=0,i=void 0){this.done=e,this.undone=n,this.prevTime=r,this.prevUserEvent=i}isolate(){return this.prevTime?new ui(this.done,this.undone):this}addChanges(e,n,r,i,o){let s=this.done,a=s[s.length-1];return a&&a.changes&&!a.changes.empty&&e.changes&&(!r||L6.test(r))&&(!a.selectionsAfter.length&&n-this.prevTime<i.newGroupDelay&&i.joinToEvent(o,F6(a.changes,e.changes))||r=="input.type.compose")?s=zf(s,s.length-1,i.minDepth,new Hn(e.changes.compose(a.changes),ME(e.effects,a.effects),a.mapped,a.startSelection,Pr)):s=zf(s,s.length,i.minDepth,e),new ui(s,Pr,n,r)}addSelection(e,n,r,i){let o=this.done.length?this.done[this.done.length-1].selectionsAfter:Pr;return o.length>0&&n-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&Z6(o[o.length-1],e)?this:new ui(NE(this.done,e),this.undone,n,r)}addMapping(e){return new ui(Op(this.done,e),Op(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,n,r){let i=e==0?this.done:this.undone;if(i.length==0)return null;let o=i[i.length-1],s=o.selectionsAfter[0]||n.selection;if(r&&o.selectionsAfter.length)return n.update({selection:o.selectionsAfter[o.selectionsAfter.length-1],annotations:im.of({side:e,rest:V6(i),selection:s}),userEvent:e==0?"select.undo":"select.redo",scrollIntoView:!0});if(o.changes){let a=i.length==1?Pr:i.slice(0,i.length-1);return o.mapped&&(a=Op(a,o.mapped)),n.update({changes:o.changes,selection:o.startSelection,effects:o.effects,annotations:im.of({side:e,rest:a,selection:s}),filter:!1,userEvent:e==0?"undo":"redo",scrollIntoView:!0})}else return null}}ui.empty=new ui(Pr,Pr);const X6=[{key:"Mod-z",run:_E,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:om,preventDefault:!0},{linux:"Ctrl-Shift-z",run:om,preventDefault:!0},{key:"Mod-u",run:M6,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:N6,preventDefault:!0}];function Ba(t,e){return ie.create(t.ranges.map(e),t.mainIndex)}function Ai(t,e){return t.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function Xr({state:t,dispatch:e},n){let r=Ba(t.selection,n);return r.eq(t.selection,!0)?!1:(e(Ai(t,r)),!0)}function Hd(t,e){return ie.cursor(e?t.to:t.from)}function FE(t,e){return Xr(t,n=>n.empty?t.moveByChar(n,e):Hd(n,e))}function Dn(t){return t.textDirectionAt(t.state.selection.main.head)==$t.LTR}const ZE=t=>FE(t,!Dn(t)),WE=t=>FE(t,Dn(t));function VE(t,e){return Xr(t,n=>n.empty?t.moveByGroup(n,e):Hd(n,e))}const G6=t=>VE(t,!Dn(t)),Y6=t=>VE(t,Dn(t));function q6(t,e,n){if(e.type.prop(n))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function Jd(t,e,n){let r=Dt(t).resolveInner(e.head),i=n?ze.closedBy:ze.openedBy;for(let l=e.head;;){let c=n?r.childAfter(l):r.childBefore(l);if(!c)break;q6(t,c,i)?r=c:l=n?c.to:c.from}let o=r.type.prop(i),s,a;return o&&(s=n?ci(t,r.from,1):ci(t,r.to,-1))&&s.matched?a=n?s.end.to:s.end.from:a=n?r.to:r.from,ie.cursor(a,n?-1:1)}const U6=t=>Xr(t,e=>Jd(t.state,e,!Dn(t))),H6=t=>Xr(t,e=>Jd(t.state,e,Dn(t)));function zE(t,e){return Xr(t,n=>{if(!n.empty)return Hd(n,e);let r=t.moveVertically(n,e);return r.head!=n.head?r:t.moveToLineBoundary(n,e)})}const LE=t=>zE(t,!1),XE=t=>zE(t,!0);function GE(t){let e=t.scrollDOM.clientHeight<t.scrollDOM.scrollHeight-2,n=0,r=0,i;if(e){for(let o of t.state.facet(de.scrollMargins)){let s=o(t);s!=null&&s.top&&(n=Math.max(s==null?void 0:s.top,n)),s!=null&&s.bottom&&(r=Math.max(s==null?void 0:s.bottom,r))}i=t.scrollDOM.clientHeight-n-r}else i=(t.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:r,selfScroll:e,height:Math.max(t.defaultLineHeight,i-5)}}function YE(t,e){let n=GE(t),{state:r}=t,i=Ba(r.selection,s=>s.empty?t.moveVertically(s,e,n.height):Hd(s,e));if(i.eq(r.selection))return!1;let o;if(n.selfScroll){let s=t.coordsAtPos(r.selection.main.head),a=t.scrollDOM.getBoundingClientRect(),l=a.top+n.marginTop,c=a.bottom-n.marginBottom;s&&s.top>l&&s.bottom<c&&(o=de.scrollIntoView(i.main.head,{y:"start",yMargin:s.top-l}))}return t.dispatch(Ai(r,i),{effects:o}),!0}const p1=t=>YE(t,!1),sm=t=>YE(t,!0);function Eo(t,e,n){let r=t.lineBlockAt(e.head),i=t.moveToLineBoundary(e,n);if(i.head==e.head&&i.head!=(n?r.to:r.from)&&(i=t.moveToLineBoundary(e,n,!1)),!n&&i.head==r.from&&r.length){let o=/^\s*/.exec(t.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;o&&e.head!=r.from+o&&(i=ie.cursor(r.from+o))}return i}const J6=t=>Xr(t,e=>Eo(t,e,!0)),K6=t=>Xr(t,e=>Eo(t,e,!1)),eW=t=>Xr(t,e=>Eo(t,e,!Dn(t))),tW=t=>Xr(t,e=>Eo(t,e,Dn(t))),nW=t=>Xr(t,e=>ie.cursor(t.lineBlockAt(e.head).from,1)),rW=t=>Xr(t,e=>ie.cursor(t.lineBlockAt(e.head).to,-1));function iW(t,e,n){let r=!1,i=Ba(t.selection,o=>{let s=ci(t,o.head,-1)||ci(t,o.head,1)||o.head>0&&ci(t,o.head-1,1)||o.head<t.doc.length&&ci(t,o.head+1,-1);if(!s||!s.end)return o;r=!0;let a=s.start.from==o.head?s.end.to:s.end.from;return ie.cursor(a)});return r?(e(Ai(t,i)),!0):!1}const oW=({state:t,dispatch:e})=>iW(t,e);function Rr(t,e){let n=Ba(t.state.selection,r=>{let i=e(r);return ie.range(r.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)});return n.eq(t.state.selection)?!1:(t.dispatch(Ai(t.state,n)),!0)}function qE(t,e){return Rr(t,n=>t.moveByChar(n,e))}const UE=t=>qE(t,!Dn(t)),HE=t=>qE(t,Dn(t));function JE(t,e){return Rr(t,n=>t.moveByGroup(n,e))}const sW=t=>JE(t,!Dn(t)),aW=t=>JE(t,Dn(t)),lW=t=>Rr(t,e=>Jd(t.state,e,!Dn(t))),cW=t=>Rr(t,e=>Jd(t.state,e,Dn(t)));function KE(t,e){return Rr(t,n=>t.moveVertically(n,e))}const eI=t=>KE(t,!1),tI=t=>KE(t,!0);function nI(t,e){return Rr(t,n=>t.moveVertically(n,e,GE(t).height))}const g1=t=>nI(t,!1),m1=t=>nI(t,!0),uW=t=>Rr(t,e=>Eo(t,e,!0)),fW=t=>Rr(t,e=>Eo(t,e,!1)),dW=t=>Rr(t,e=>Eo(t,e,!Dn(t))),hW=t=>Rr(t,e=>Eo(t,e,Dn(t))),pW=t=>Rr(t,e=>ie.cursor(t.lineBlockAt(e.head).from)),gW=t=>Rr(t,e=>ie.cursor(t.lineBlockAt(e.head).to)),O1=({state:t,dispatch:e})=>(e(Ai(t,{anchor:0})),!0),x1=({state:t,dispatch:e})=>(e(Ai(t,{anchor:t.doc.length})),!0),v1=({state:t,dispatch:e})=>(e(Ai(t,{anchor:t.selection.main.anchor,head:0})),!0),y1=({state:t,dispatch:e})=>(e(Ai(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),mW=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),OW=({state:t,dispatch:e})=>{let n=Kd(t).map(({from:r,to:i})=>ie.range(r,Math.min(i+1,t.doc.length)));return e(t.update({selection:ie.create(n),userEvent:"select"})),!0},xW=({state:t,dispatch:e})=>{let n=Ba(t.selection,r=>{var i;let o=Dt(t).resolveStack(r.from,1);for(let s=o;s;s=s.next){let{node:a}=s;if((a.from<r.from&&a.to>=r.to||a.to>r.to&&a.from<=r.from)&&(!((i=a.parent)===null||i===void 0)&&i.parent))return ie.range(a.to,a.from)}return r});return e(Ai(t,n)),!0},vW=({state:t,dispatch:e})=>{let n=t.selection,r=null;return n.ranges.length>1?r=ie.create([n.main]):n.main.empty||(r=ie.create([ie.cursor(n.main.head)])),r?(e(Ai(t,r)),!0):!1};function vc(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:r}=t,i=r.changeByRange(o=>{let{from:s,to:a}=o;if(s==a){let l=e(o);l<s?(n="delete.backward",l=vu(t,l,!1)):l>s&&(n="delete.forward",l=vu(t,l,!0)),s=Math.min(s,l),a=Math.max(a,l)}else s=vu(t,s,!1),a=vu(t,a,!0);return s==a?{range:o}:{changes:{from:s,to:a},range:ie.cursor(s,s<o.head?-1:1)}});return i.changes.empty?!1:(t.dispatch(r.update(i,{scrollIntoView:!0,userEvent:n,effects:n=="delete.selection"?de.announce.of(r.phrase("Selection deleted")):void 0})),!0)}function vu(t,e,n){if(t instanceof de)for(let r of t.state.facet(de.atomicRanges).map(i=>i(t)))r.between(e,e,(i,o)=>{i<e&&o>e&&(e=n?o:i)});return e}const rI=(t,e)=>vc(t,n=>{let r=n.from,{state:i}=t,o=i.doc.lineAt(r),s,a;if(!e&&r>o.from&&r<o.from+200&&!/[^ \t]/.test(s=o.text.slice(0,r-o.from))){if(s[s.length-1]==" ")return r-1;let l=Ta(s,i.tabSize),c=l%Zf(i)||Zf(i);for(let u=0;u<c&&s[s.length-1-u]==" ";u++)r--;a=r}else a=kn(o.text,r-o.from,e,e)+o.from,a==r&&o.number!=(e?i.doc.lines:1)?a+=e?1:-1:!e&&/[\ufe00-\ufe0f]/.test(o.text.slice(a-o.from,r-o.from))&&(a=kn(o.text,a-o.from,!1,!1)+o.from);return a}),am=t=>rI(t,!1),iI=t=>rI(t,!0),oI=(t,e)=>vc(t,n=>{let r=n.head,{state:i}=t,o=i.doc.lineAt(r),s=i.charCategorizer(r);for(let a=null;;){if(r==(e?o.to:o.from)){r==n.head&&o.number!=(e?i.doc.lines:1)&&(r+=e?1:-1);break}let l=kn(o.text,r-o.from,e)+o.from,c=o.text.slice(Math.min(r,l)-o.from,Math.max(r,l)-o.from),u=s(c);if(a!=null&&u!=a)break;(c!=" "||r!=n.head)&&(a=u),r=l}return r}),sI=t=>oI(t,!1),yW=t=>oI(t,!0),bW=t=>vc(t,e=>{let n=t.lineBlockAt(e.head).to;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}),SW=t=>vc(t,e=>{let n=t.moveToLineBoundary(e,!1).head;return e.head>n?n:Math.max(0,e.head-1)}),wW=t=>vc(t,e=>{let n=t.moveToLineBoundary(e,!0).head;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}),CW=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:st.of(["",""])},range:ie.cursor(r.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},kW=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(r=>{if(!r.empty||r.from==0||r.from==t.doc.length)return{range:r};let i=r.from,o=t.doc.lineAt(i),s=i==o.from?i-1:kn(o.text,i-o.from,!1)+o.from,a=i==o.to?i+1:kn(o.text,i-o.from,!0)+o.from;return{changes:{from:s,to:a,insert:t.doc.slice(i,a).append(t.doc.slice(s,i))},range:ie.cursor(a)}});return n.changes.empty?!1:(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function Kd(t){let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.from),o=t.doc.lineAt(r.to);if(!r.empty&&r.to==o.from&&(o=t.doc.lineAt(r.to-1)),n>=i.number){let s=e[e.length-1];s.to=o.to,s.ranges.push(r)}else e.push({from:i.from,to:o.to,ranges:[r]});n=o.number+1}return e}function aI(t,e,n){if(t.readOnly)return!1;let r=[],i=[];for(let o of Kd(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){r.push({from:o.to,to:s.to},{from:o.from,insert:s.text+t.lineBreak});for(let l of o.ranges)i.push(ie.range(Math.min(t.doc.length,l.anchor+a),Math.min(t.doc.length,l.head+a)))}else{r.push({from:s.from,to:o.from},{from:o.to,insert:t.lineBreak+s.text});for(let l of o.ranges)i.push(ie.range(l.anchor-a,l.head-a))}}return r.length?(e(t.update({changes:r,scrollIntoView:!0,selection:ie.create(i,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const AW=({state:t,dispatch:e})=>aI(t,e,!1),PW=({state:t,dispatch:e})=>aI(t,e,!0);function lI(t,e,n){if(t.readOnly)return!1;let r=[];for(let i of Kd(t))n?r.push({from:i.from,insert:t.doc.slice(i.from,i.to)+t.lineBreak}):r.push({from:i.to,insert:t.lineBreak+t.doc.slice(i.from,i.to)});return e(t.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const EW=({state:t,dispatch:e})=>lI(t,e,!1),IW=({state:t,dispatch:e})=>lI(t,e,!0),TW=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(Kd(e).map(({from:i,to:o})=>(i>0?i--:o<e.doc.length&&o++,{from:i,to:o}))),r=Ba(e.selection,i=>t.moveVertically(i,!0)).map(n);return t.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0};function $W(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=Dt(t).resolveInner(e),r=n.childBefore(e),i=n.childAfter(e),o;return r&&i&&r.to<=e&&i.from>=e&&(o=r.type.prop(ze.closedBy))&&o.indexOf(i.name)>-1&&t.doc.lineAt(r.to).from==t.doc.lineAt(i.from).from&&!/\S/.test(t.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}const jW=cI(!1),RW=cI(!0);function cI(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let r=e.changeByRange(i=>{let{from:o,to:s}=i,a=e.doc.lineAt(o),l=!t&&o==s&&$W(e,o);t&&(o=s=(s<=a.to?a:e.doc.lineAt(s)).to);let c=new Yd(e,{simulateBreak:o,simulateDoubleBreak:!!l}),u=tx(c,o);for(u==null&&(u=Ta(/^\s*/.exec(e.doc.lineAt(o).text)[0],e.tabSize));s<a.to&&/\s/.test(a.text[s-a.from]);)s++;l?{from:o,to:s}=l:o>a.from&&o<a.from+100&&!/\S/.test(a.text.slice(0,o))&&(o=a.from);let f=["",Gl(e,u)];return l&&f.push(Gl(e,c.lineIndent(a.from,-1))),{changes:{from:o,to:s,insert:st.of(f)},range:ie.cursor(o+1+f[1].length)}});return n(e.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}}function lx(t,e){let n=-1;return t.changeByRange(r=>{let i=[];for(let s=r.from;s<=r.to;){let a=t.doc.lineAt(s);a.number>n&&(r.empty||r.to>a.from)&&(e(a,i,r),n=a.number),s=a.to+1}let o=t.changes(i);return{changes:i,range:ie.range(o.mapPos(r.anchor,1),o.mapPos(r.head,1))}})}const DW=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),r=new Yd(t,{overrideIndentation:o=>{let s=n[o];return s??-1}}),i=lx(t,(o,s,a)=>{let l=tx(r,o.from);if(l==null)return;/\S/.test(o.text)||(l=0);let c=/^\s*/.exec(o.text)[0],u=Gl(t,l);(c!=u||a.from<o.from+c.length)&&(n[o.from]=l,s.push({from:o.from,to:o.from+c.length,insert:u}))});return i.changes.empty||e(t.update(i,{userEvent:"indent"})),!0},uI=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(lx(t,(n,r)=>{r.push({from:n.from,insert:t.facet(Oc)})}),{userEvent:"input.indent"})),!0),fI=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(lx(t,(n,r)=>{let i=/^\s*/.exec(n.text)[0];if(!i)return;let o=Ta(i,t.tabSize),s=0,a=Gl(t,Math.max(0,o-Zf(t)));for(;s<i.length&&s<a.length&&i.charCodeAt(s)==a.charCodeAt(s);)s++;r.push({from:n.from+s,to:n.from+i.length,insert:a.slice(s)})}),{userEvent:"delete.dedent"})),!0),QW=[{key:"Ctrl-b",run:ZE,shift:UE,preventDefault:!0},{key:"Ctrl-f",run:WE,shift:HE},{key:"Ctrl-p",run:LE,shift:eI},{key:"Ctrl-n",run:XE,shift:tI},{key:"Ctrl-a",run:nW,shift:pW},{key:"Ctrl-e",run:rW,shift:gW},{key:"Ctrl-d",run:iI},{key:"Ctrl-h",run:am},{key:"Ctrl-k",run:bW},{key:"Ctrl-Alt-h",run:sI},{key:"Ctrl-o",run:CW},{key:"Ctrl-t",run:kW},{key:"Ctrl-v",run:sm}],BW=[{key:"ArrowLeft",run:ZE,shift:UE,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:G6,shift:sW,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:eW,shift:dW,preventDefault:!0},{key:"ArrowRight",run:WE,shift:HE,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:Y6,shift:aW,preventDefault:!0},{mac:"Cmd-ArrowRight",run:tW,shift:hW,preventDefault:!0},{key:"ArrowUp",run:LE,shift:eI,preventDefault:!0},{mac:"Cmd-ArrowUp",run:O1,shift:v1},{mac:"Ctrl-ArrowUp",run:p1,shift:g1},{key:"ArrowDown",run:XE,shift:tI,preventDefault:!0},{mac:"Cmd-ArrowDown",run:x1,shift:y1},{mac:"Ctrl-ArrowDown",run:sm,shift:m1},{key:"PageUp",run:p1,shift:g1},{key:"PageDown",run:sm,shift:m1},{key:"Home",run:K6,shift:fW,preventDefault:!0},{key:"Mod-Home",run:O1,shift:v1},{key:"End",run:J6,shift:uW,preventDefault:!0},{key:"Mod-End",run:x1,shift:y1},{key:"Enter",run:jW},{key:"Mod-a",run:mW},{key:"Backspace",run:am,shift:am},{key:"Delete",run:iI},{key:"Mod-Backspace",mac:"Alt-Backspace",run:sI},{key:"Mod-Delete",mac:"Alt-Delete",run:yW},{mac:"Mod-Backspace",run:SW},{mac:"Mod-Delete",run:wW}].concat(QW.map(t=>({mac:t.key,run:t.run,shift:t.shift}))),_W=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:U6,shift:lW},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:H6,shift:cW},{key:"Alt-ArrowUp",run:AW},{key:"Shift-Alt-ArrowUp",run:EW},{key:"Alt-ArrowDown",run:PW},{key:"Shift-Alt-ArrowDown",run:IW},{key:"Escape",run:vW},{key:"Mod-Enter",run:RW},{key:"Alt-l",mac:"Ctrl-l",run:OW},{key:"Mod-i",run:xW,preventDefault:!0},{key:"Mod-[",run:fI},{key:"Mod-]",run:uI},{key:"Mod-Alt-\\",run:DW},{key:"Shift-Mod-k",run:TW},{key:"Shift-Mod-\\",run:oW},{key:"Mod-/",run:E6},{key:"Alt-A",run:T6}].concat(BW),MW={key:"Tab",run:uI,shift:fI};function At(){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 r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r];typeof i=="string"?t.setAttribute(r,i):i!=null&&(t[r]=i)}e++}for(;e<arguments.length;e++)dI(t,arguments[e]);return t}function dI(t,e){if(typeof e=="string")t.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)t.appendChild(e);else if(Array.isArray(e))for(var n=0;n<e.length;n++)dI(t,e[n]);else throw new RangeError("Unsupported child node: "+e)}const b1=typeof String.prototype.normalize=="function"?t=>t.normalize("NFKD"):t=>t;class da{constructor(e,n,r=0,i=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(r,i),this.bufferStart=r,this.normalize=o?a=>o(b1(a)):b1,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 bn(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=MO(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=kr(e);let i=this.normalize(n);for(let o=0,s=r;;o++){let a=i.charCodeAt(o),l=this.match(a,s,this.bufferPos+this.bufferStart);if(o==i.length-1){if(l)return this.value=l,this;break}s==r&&o<n.length&&n.charCodeAt(o)==a&&s++}}}match(e,n,r){let i=null;for(let o=0;o<this.matches.length;o+=2){let s=this.matches[o],a=!1;this.query.charCodeAt(s)==e&&(s==this.query.length-1?i={from:this.matches[o+1],to:r}:(this.matches[o]++,a=!0)),a||(this.matches.splice(o,2),o-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?i={from:n,to:r}:this.matches.push(1,n)),i&&this.test&&!this.test(i.from,i.to,this.buffer,this.bufferStart)&&(i=null),i}}typeof Symbol<"u"&&(da.prototype[Symbol.iterator]=function(){return this});const hI={from:-1,to:-1,match:/.*/.exec("")},cx="gm"+(/x/.unicode==null?"":"u");class pI{constructor(e,n,r,i=0,o=e.length){if(this.text=e,this.to=o,this.curLine="",this.done=!1,this.value=hI,/\\[sWDnr]|\n|\r|\[\^/.test(n))return new gI(e,n,r,i,o);this.re=new RegExp(n,cx+(r!=null&&r.ignoreCase?"i":"")),this.test=r==null?void 0:r.test,this.iter=e.iter();let s=e.lineAt(i);this.curLineStart=s.from,this.matchPos=Lf(e,i),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.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 r=this.curLineStart+n.index,i=r+n[0].length;if(this.matchPos=Lf(this.text,i+(r==i?1:0)),r==this.curLineStart+this.curLine.length&&this.nextLine(),(r<i||r>this.value.to)&&(!this.test||this.test(r,i,n)))return this.value={from:r,to:i,match:n},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}}const xp=new WeakMap;class Us{constructor(e,n){this.from=e,this.text=n}get to(){return this.from+this.text.length}static get(e,n,r){let i=xp.get(e);if(!i||i.from>=r||i.to<=n){let a=new Us(n,e.sliceString(n,r));return xp.set(e,a),a}if(i.from==n&&i.to==r)return i;let{text:o,from:s}=i;return s>n&&(o=e.sliceString(n,s)+o,s=n),i.to<r&&(o+=e.sliceString(i.to,r)),xp.set(e,new Us(s,o)),new Us(n,o.slice(n-s,r-s))}}class gI{constructor(e,n,r,i,o){this.text=e,this.to=o,this.done=!1,this.value=hI,this.matchPos=Lf(e,i),this.re=new RegExp(n,cx+(r!=null&&r.ignoreCase?"i":"")),this.test=r==null?void 0:r.test,this.flat=Us.get(e,i,this.chunkEnd(i+5e3))}chunkEnd(e){return e>=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 r=this.flat.from+n.index,i=r+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(r,i,n)))return this.value={from:r,to:i,match:n},this.matchPos=Lf(this.text,i+(r==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Us.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(pI.prototype[Symbol.iterator]=gI.prototype[Symbol.iterator]=function(){return this});function NW(t){try{return new RegExp(t,cx),!0}catch{return!1}}function Lf(t,e){if(e>=t.length)return e;let n=t.lineAt(e),r;for(;e<n.to&&(r=n.text.charCodeAt(e-n.from))>=56320&&r<57344;)e++;return e}function lm(t){let e=String(t.state.doc.lineAt(t.state.selection.main.head).number),n=At("input",{class:"cm-textfield",name:"line",value:e}),r=At("form",{class:"cm-gotoLine",onkeydown:o=>{o.keyCode==27?(o.preventDefault(),t.dispatch({effects:Xf.of(!1)}),t.focus()):o.keyCode==13&&(o.preventDefault(),i())},onsubmit:o=>{o.preventDefault(),i()}},At("label",t.state.phrase("Go to line"),": ",n)," ",At("button",{class:"cm-button",type:"submit"},t.state.phrase("go")));function i(){let o=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);if(!o)return;let{state:s}=t,a=s.doc.lineAt(s.selection.main.head),[,l,c,u,f]=o,d=u?+u.slice(1):0,h=c?+c:a.number;if(c&&f){let m=h/100;l&&(m=m*(l=="-"?-1:1)+a.number/s.doc.lines),h=Math.round(s.doc.lines*m)}else c&&l&&(h=h*(l=="-"?-1:1)+a.number);let p=s.doc.line(Math.max(1,Math.min(s.doc.lines,h))),O=ie.cursor(p.from+Math.max(0,Math.min(d,p.length)));t.dispatch({effects:[Xf.of(!1),de.scrollIntoView(O.from,{y:"center"})],selection:O}),t.focus()}return{dom:r}}const Xf=_e.define(),S1=ln.define({create(){return!0},update(t,e){for(let n of e.effects)n.is(Xf)&&(t=n.value);return t},provide:t=>zl.from(t,e=>e?lm:null)}),FW=t=>{let e=Vl(t,lm);if(!e){let n=[Xf.of(!0)];t.state.field(S1,!1)==null&&n.push(_e.appendConfig.of([S1,ZW])),t.dispatch({effects:n}),e=Vl(t,lm)}return e&&e.dom.querySelector("input").select(),!0},ZW=de.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),WW={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},VW=me.define({combine(t){return Ci(t,WW,{highlightWordAroundCursor:(e,n)=>e||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function zW(t){return[qW,YW]}const LW=we.mark({class:"cm-selectionMatch"}),XW=we.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function w1(t,e,n,r){return(n==0||t(e.sliceDoc(n-1,n))!=Rt.Word)&&(r==e.doc.length||t(e.sliceDoc(r,r+1))!=Rt.Word)}function GW(t,e,n,r){return t(e.sliceDoc(n,n+1))==Rt.Word&&t(e.sliceDoc(r-1,r))==Rt.Word}const YW=Bt.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(VW),{state:n}=t,r=n.selection;if(r.ranges.length>1)return we.none;let i=r.main,o,s=null;if(i.empty){if(!e.highlightWordAroundCursor)return we.none;let l=n.wordAt(i.head);if(!l)return we.none;s=n.charCategorizer(i.head),o=n.sliceDoc(l.from,l.to)}else{let l=i.to-i.from;if(l<e.minSelectionLength||l>200)return we.none;if(e.wholeWords){if(o=n.sliceDoc(i.from,i.to),s=n.charCategorizer(i.head),!(w1(s,n,i.from,i.to)&&GW(s,n,i.from,i.to)))return we.none}else if(o=n.sliceDoc(i.from,i.to),!o)return we.none}let a=[];for(let l of t.visibleRanges){let c=new da(n.doc,o,l.from,l.to);for(;!c.next().done;){let{from:u,to:f}=c.value;if((!s||w1(s,n,u,f))&&(i.empty&&u<=i.from&&f>=i.to?a.push(XW.range(u,f)):(u>=i.to||f<=i.from)&&a.push(LW.range(u,f)),a.length>e.maxMatches))return we.none}}return we.set(a)}},{decorations:t=>t.decorations}),qW=de.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),UW=({state:t,dispatch:e})=>{let{selection:n}=t,r=ie.create(n.ranges.map(i=>t.wordAt(i.head)||ie.cursor(i.head)),n.mainIndex);return r.eq(n)?!1:(e(t.update({selection:r})),!0)};function HW(t,e){let{main:n,ranges:r}=t.selection,i=t.wordAt(n.head),o=i&&i.from==n.from&&i.to==n.to;for(let s=!1,a=new da(t.doc,e,r[r.length-1].to);;)if(a.next(),a.done){if(s)return null;a=new da(t.doc,e,0,Math.max(0,r[r.length-1].from-1)),s=!0}else{if(s&&r.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 JW=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(o=>o.from===o.to))return UW({state:t,dispatch:e});let r=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(o=>t.sliceDoc(o.from,o.to)!=r))return!1;let i=HW(t,r);return i?(e(t.update({selection:t.selection.addRange(ie.range(i.from,i.to),!1),effects:de.scrollIntoView(i.to)})),!0):!1},_a=me.define({combine(t){return Ci(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new uV(e),scrollToMatch:e=>de.scrollIntoView(e)})}});class mI{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||NW(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(n,r)=>r=="n"?`
670
- `:r=="r"?"\r":r=="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 nV(this):new eV(this)}getCursor(e,n=0,r){let i=e.doc?e:Ue.create({doc:e});return r==null&&(r=i.doc.length),this.regexp?Is(this,i,n,r):Es(this,i,n,r)}}class OI{constructor(e){this.spec=e}}function Es(t,e,n,r){return new da(e.doc,t.unquoted,n,r,t.caseSensitive?void 0:i=>i.toLowerCase(),t.wholeWord?KW(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function KW(t,e){return(n,r,i,o)=>((o>n||o+i.length<r)&&(o=Math.max(0,n-2),i=t.sliceString(o,Math.min(t.length,r+2))),(e(Gf(i,n-o))!=Rt.Word||e(Yf(i,n-o))!=Rt.Word)&&(e(Yf(i,r-o))!=Rt.Word||e(Gf(i,r-o))!=Rt.Word))}class eV extends OI{constructor(e){super(e)}nextMatch(e,n,r){let i=Es(this.spec,e,r,e.doc.length).nextOverlapping();return i.done&&(i=Es(this.spec,e,0,n).nextOverlapping()),i.done?null:i.value}prevMatchInRange(e,n,r){for(let i=r;;){let o=Math.max(n,i-1e4-this.spec.unquoted.length),s=Es(this.spec,e,o,i),a=null;for(;!s.nextOverlapping().done;)a=s.value;if(a)return a;if(o==n)return null;i-=1e4}}prevMatch(e,n,r){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,n){let r=Es(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let o=Es(this.spec,e,Math.max(0,n-this.spec.unquoted.length),Math.min(r+this.spec.unquoted.length,e.doc.length));for(;!o.next().done;)i(o.value.from,o.value.to)}}function Is(t,e,n,r){return new pI(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?tV(e.charCategorizer(e.selection.main.head)):void 0},n,r)}function Gf(t,e){return t.slice(kn(t,e,!1),e)}function Yf(t,e){return t.slice(e,kn(t,e))}function tV(t){return(e,n,r)=>!r[0].length||(t(Gf(r.input,r.index))!=Rt.Word||t(Yf(r.input,r.index))!=Rt.Word)&&(t(Yf(r.input,r.index+r[0].length))!=Rt.Word||t(Gf(r.input,r.index+r[0].length))!=Rt.Word)}class nV extends OI{nextMatch(e,n,r){let i=Is(this.spec,e,r,e.doc.length).next();return i.done&&(i=Is(this.spec,e,0,n).next()),i.done?null:i.value}prevMatchInRange(e,n,r){for(let i=1;;i++){let o=Math.max(n,r-i*1e4),s=Is(this.spec,e,o,r),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,r){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,(n,r)=>r=="$"?"$":r=="&"?e.match[0]:r!="0"&&+r<e.match.length?e.match[r]:n)}matchAll(e,n){let r=Is(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let o=Is(this.spec,e,Math.max(0,n-250),Math.min(r+250,e.doc.length));for(;!o.next().done;)i(o.value.from,o.value.to)}}const Yl=_e.define(),ux=_e.define(),fo=ln.define({create(t){return new vp(cm(t).create(),null)},update(t,e){for(let n of e.effects)n.is(Yl)?t=new vp(n.value.create(),t.panel):n.is(ux)&&(t=new vp(t.query,n.value?fx:null));return t},provide:t=>zl.from(t,e=>e.panel)});class vp{constructor(e,n){this.query=e,this.panel=n}}const rV=we.mark({class:"cm-searchMatch"}),iV=we.mark({class:"cm-searchMatch cm-searchMatch-selected"}),oV=Bt.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(fo))}update(t){let e=t.state.field(fo);(e!=t.startState.field(fo)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return we.none;let{view:n}=this,r=new mo;for(let i=0,o=n.visibleRanges,s=o.length;i<s;i++){let{from:a,to:l}=o[i];for(;i<s-1&&l>o[i+1].from-2*250;)l=o[++i].to;t.highlight(n.state,a,l,(c,u)=>{let f=n.state.selection.ranges.some(d=>d.from==c&&d.to==u);r.add(c,u,f?iV:rV)})}return r.finish()}},{decorations:t=>t.decorations});function yc(t){return e=>{let n=e.state.field(fo,!1);return n&&n.query.spec.valid?t(e,n):yI(e)}}const qf=yc((t,{query:e})=>{let{to:n}=t.state.selection.main,r=e.nextMatch(t.state,n,n);if(!r)return!1;let i=ie.single(r.from,r.to),o=t.state.facet(_a);return t.dispatch({selection:i,effects:[dx(t,r),o.scrollToMatch(i.main,t)],userEvent:"select.search"}),vI(t),!0}),Uf=yc((t,{query:e})=>{let{state:n}=t,{from:r}=n.selection.main,i=e.prevMatch(n,r,r);if(!i)return!1;let o=ie.single(i.from,i.to),s=t.state.facet(_a);return t.dispatch({selection:o,effects:[dx(t,i),s.scrollToMatch(o.main,t)],userEvent:"select.search"}),vI(t),!0}),sV=yc((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:ie.create(n.map(r=>ie.range(r.from,r.to))),userEvent:"select.search.matches"}),!0)}),aV=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,o=[],s=0;for(let a=new da(t.doc,t.sliceDoc(r,i));!a.next().done;){if(o.length>1e3)return!1;a.value.from==r&&(s=o.length),o.push(ie.range(a.value.from,a.value.to))}return e(t.update({selection:ie.create(o,s),userEvent:"select.search.matches"})),!0},C1=yc((t,{query:e})=>{let{state:n}=t,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let o=e.nextMatch(n,r,r);if(!o)return!1;let s=[],a,l,c=[];if(o.from==r&&o.to==i&&(l=n.toText(e.getReplacement(o)),s.push({from:o.from,to:o.to,insert:l}),o=e.nextMatch(n,o.from,o.to),c.push(de.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(r).number)+"."))),o){let u=s.length==0||s[0].from>=o.to?0:o.to-o.from-l.length;a=ie.single(o.from-u,o.to-u),c.push(dx(t,o)),c.push(n.facet(_a).scrollToMatch(a.main,t))}return t.dispatch({changes:s,selection:a,effects:c,userEvent:"input.replace"}),!0}),lV=yc((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map(i=>{let{from:o,to:s}=i;return{from:o,to:s,insert:e.getReplacement(i)}});if(!n.length)return!1;let r=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:de.announce.of(r),userEvent:"input.replace.all"}),!0});function fx(t){return t.state.facet(_a).createPanel(t)}function cm(t,e){var n,r,i,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 c=t.facet(_a);return new mI({search:((n=e==null?void 0:e.literal)!==null&&n!==void 0?n:c.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:(r=e==null?void 0:e.caseSensitive)!==null&&r!==void 0?r:c.caseSensitive,literal:(i=e==null?void 0:e.literal)!==null&&i!==void 0?i:c.literal,regexp:(o=e==null?void 0:e.regexp)!==null&&o!==void 0?o:c.regexp,wholeWord:(s=e==null?void 0:e.wholeWord)!==null&&s!==void 0?s:c.wholeWord})}function xI(t){let e=Vl(t,fx);return e&&e.dom.querySelector("[main-field]")}function vI(t){let e=xI(t);e&&e==t.root.activeElement&&e.select()}const yI=t=>{let e=t.state.field(fo,!1);if(e&&e.panel){let n=xI(t);if(n&&n!=t.root.activeElement){let r=cm(t.state,e.query.spec);r.valid&&t.dispatch({effects:Yl.of(r)}),n.focus(),n.select()}}else t.dispatch({effects:[ux.of(!0),e?Yl.of(cm(t.state,e.query.spec)):_e.appendConfig.of(dV)]});return!0},bI=t=>{let e=t.state.field(fo,!1);if(!e||!e.panel)return!1;let n=Vl(t,fx);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:ux.of(!1)}),!0},cV=[{key:"Mod-f",run:yI,scope:"editor search-panel"},{key:"F3",run:qf,shift:Uf,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:qf,shift:Uf,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:bI,scope:"editor search-panel"},{key:"Mod-Shift-l",run:aV},{key:"Mod-Alt-g",run:FW},{key:"Mod-d",run:JW,preventDefault:!0}];class uV{constructor(e){this.view=e;let n=this.query=e.state.field(fo).query.spec;this.commit=this.commit.bind(this),this.searchField=At("input",{value:n.search,placeholder:or(e,"Find"),"aria-label":or(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=At("input",{value:n.replace,placeholder:or(e,"Replace"),"aria-label":or(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=At("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=At("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=At("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function r(i,o,s){return At("button",{class:"cm-button",name:i,onclick:o,type:"button"},s)}this.dom=At("div",{onkeydown:i=>this.keydown(i),class:"cm-search"},[this.searchField,r("next",()=>qf(e),[or(e,"next")]),r("prev",()=>Uf(e),[or(e,"previous")]),r("select",()=>sV(e),[or(e,"all")]),At("label",null,[this.caseField,or(e,"match case")]),At("label",null,[this.reField,or(e,"regexp")]),At("label",null,[this.wordField,or(e,"by word")]),...e.state.readOnly?[]:[At("br"),this.replaceField,r("replace",()=>C1(e),[or(e,"replace")]),r("replaceAll",()=>lV(e),[or(e,"replace all")])],At("button",{name:"close",onclick:()=>bI(e),"aria-label":or(e,"close"),type:"button"},["×"])])}commit(){let e=new mI({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:Yl.of(e)}))}keydown(e){xF(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?Uf:qf)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),C1(this.view))}update(e){for(let n of e.transactions)for(let r of n.effects)r.is(Yl)&&!r.value.eq(this.query)&&this.setQuery(r.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(_a).top}}function or(t,e){return t.state.phrase(e)}const yu=30,bu=/[\s\.,:;?!]/;function dx(t,{from:e,to:n}){let r=t.state.doc.lineAt(e),i=t.state.doc.lineAt(n).to,o=Math.max(r.from,e-yu),s=Math.min(i,n+yu),a=t.state.sliceDoc(o,s);if(o!=r.from){for(let l=0;l<yu;l++)if(!bu.test(a[l+1])&&bu.test(a[l])){a=a.slice(l);break}}if(s!=i){for(let l=a.length-1;l>a.length-yu;l--)if(!bu.test(a[l-1])&&bu.test(a[l])){a=a.slice(0,l);break}}return de.announce.of(`${t.state.phrase("current match")}. ${a} ${t.state.phrase("on line")} ${r.number}.`)}const fV=de.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"}}),dV=[fo,Si.low(oV),fV];class SI{constructor(e,n,r){this.state=e,this.pos=n,this.explicit=r,this.abortListeners=[]}tokenBefore(e){let n=Dt(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),r=Math.max(n.from,this.pos-250),i=n.text.slice(r-n.from,this.pos-n.from),o=i.search(CI(e,!1));return o<0?null:{from:r+o,to:this.pos,text:i.slice(o)}}get aborted(){return this.abortListeners==null}addEventListener(e,n){e=="abort"&&this.abortListeners&&this.abortListeners.push(n)}}function k1(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 hV(t){let e=Object.create(null),n=Object.create(null);for(let{label:i}of t){e[i[0]]=!0;for(let o=1;o<i.length;o++)n[i[o]]=!0}let r=k1(e)+k1(n)+"*$";return[new RegExp("^"+r),new RegExp(r)]}function wI(t){let e=t.map(i=>typeof i=="string"?{label:i}:i),[n,r]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:hV(e);return i=>{let o=i.matchBefore(r);return o||i.explicit?{from:o?o.from:i.pos,options:e,validFor:n}:null}}function pV(t,e){return n=>{for(let r=Dt(n.state).resolveInner(n.pos,-1);r;r=r.parent){if(t.indexOf(r.name)>-1)return null;if(r.type.isTop)break}return e(n)}}class A1{constructor(e,n,r,i){this.completion=e,this.source=n,this.match=r,this.score=i}}function ho(t){return t.selection.main.from}function CI(t,e){var n;let{source:r}=t,i=e&&r[0]!="^",o=r[r.length-1]!="$";return!i&&!o?t:new RegExp(`${i?"^":""}(?:${r})${o?"$":""}`,(n=t.flags)!==null&&n!==void 0?n:t.ignoreCase?"i":"")}const hx=wi.define();function gV(t,e,n,r){let{main:i}=t.selection,o=n-i.from,s=r-i.from;return Object.assign(Object.assign({},t.changeByRange(a=>a!=i&&n!=r&&t.sliceDoc(a.from+o,a.from+s)!=t.sliceDoc(n,r)?{range:a}:{changes:{from:a.from+o,to:r==i.from?a.to:a.from+s,insert:e},range:ie.cursor(a.from+o+e.length)})),{scrollIntoView:!0,userEvent:"input.complete"})}const P1=new WeakMap;function mV(t){if(!Array.isArray(t))return t;let e=P1.get(t);return e||P1.set(t,e=wI(t)),e}const Hf=_e.define(),ql=_e.define();class OV{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<e.length;){let r=bn(e,n),i=kr(r);this.chars.push(r);let o=e.slice(n,n+i),s=o.toUpperCase();this.folded.push(bn(s==o?o.toLowerCase():s,0)),n+=i}this.astral=e.length!=this.chars.length}ret(e,n){return this.score=e,this.matched=n,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:n,folded:r,any:i,precise:o,byWord:s}=this;if(n.length==1){let v=bn(e,0),y=kr(v),S=y==e.length?0:-100;if(v!=n[0])if(v==r[0])S+=-200;else return null;return this.ret(S,[0,y])}let a=e.indexOf(this.pattern);if(a==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let l=n.length,c=0;if(a<0){for(let v=0,y=Math.min(e.length,200);v<y&&c<l;){let S=bn(e,v);(S==n[c]||S==r[c])&&(i[c++]=v),v+=kr(S)}if(c<l)return null}let u=0,f=0,d=!1,h=0,p=-1,O=-1,m=/[a-z]/.test(e),x=!0;for(let v=0,y=Math.min(e.length,200),S=0;v<y&&f<l;){let b=bn(e,v);a<0&&(u<l&&b==n[u]&&(o[u++]=v),h<l&&(b==n[h]||b==r[h]?(h==0&&(p=v),O=v+1,h++):h=0));let w,C=b<255?b>=48&&b<=57||b>=97&&b<=122?2:b>=65&&b<=90?1:0:(w=MO(b))!=w.toLowerCase()?1:w!=w.toUpperCase()?2:0;(!v||C==1&&m||S==0&&C!=0)&&(n[f]==b||r[f]==b&&(d=!0)?s[f++]=v:s.length&&(x=!1)),S=C,v+=kr(b)}return f==l&&s[0]==0&&x?this.result(-100+(d?-200:0),s,e):h==l&&p==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]):h==l?this.ret(-900-e.length,[p,O]):f==l?this.result(-100+(d?-200:0)+-700+(x?0:-1100),s,e):n.length==2?null:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,n,r){let i=[],o=0;for(let s of n){let a=s+(this.astral?kr(bn(r,s)):1);o&&i[o-1]==s?i[o-1]=a:(i[o++]=s,i[o++]=a)}return this.ret(e-r.length,i)}}class xV{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let n=e.slice(0,this.pattern.length),r=n==this.pattern?0:n.toLowerCase()==this.folded?-200:null;return r==null?null:(this.matched=[0,n.length],this.score=r+(e.length==this.pattern.length?0:-100),this)}}const Cn=me.define({combine(t){return Ci(t,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:vV,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)=>r=>E1(e(r),n(r)),optionClass:(e,n)=>r=>E1(e(r),n(r)),addToOptions:(e,n)=>e.concat(n),filterStrict:(e,n)=>e||n})}});function E1(t,e){return t?e?t+" "+e:t:e}function vV(t,e,n,r,i,o){let s=t.textDirection==$t.RTL,a=s,l=!1,c="top",u,f,d=e.left-i.left,h=i.right-e.right,p=r.right-r.left,O=r.bottom-r.top;if(a&&d<Math.min(p,h)?a=!1:!a&&h<Math.min(p,d)&&(a=!0),p<=(a?d:h))u=Math.max(i.top,Math.min(n.top,i.bottom-O))-e.top,f=Math.min(400,a?d:h);else{l=!0,f=Math.min(400,(s?e.right:i.right-e.left)-30);let v=i.bottom-e.bottom;v>=O||v>e.top?u=n.bottom-e.top:(c="bottom",u=e.bottom-n.top)}let m=(e.bottom-e.top)/o.offsetHeight,x=(e.right-e.left)/o.offsetWidth;return{style:`${c}: ${u/m}px; max-width: ${f/x}px`,class:"cm-completionInfo-"+(l?s?"left-narrow":"right-narrow":a?"left":"right")}}function yV(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(n){let r=document.createElement("div");return r.classList.add("cm-completionIcon"),n.type&&r.classList.add(...n.type.split(/\s+/g).map(i=>"cm-completionIcon-"+i)),r.setAttribute("aria-hidden","true"),r},position:20}),e.push({render(n,r,i,o){let s=document.createElement("span");s.className="cm-completionLabel";let a=n.displayLabel||n.label,l=0;for(let c=0;c<o.length;){let u=o[c++],f=o[c++];u>l&&s.appendChild(document.createTextNode(a.slice(l,u)));let d=s.appendChild(document.createElement("span"));d.appendChild(document.createTextNode(a.slice(u,f))),d.className="cm-completionMatchedText",l=f}return l<a.length&&s.appendChild(document.createTextNode(a.slice(l))),s},position:50},{render(n){if(!n.detail)return null;let r=document.createElement("span");return r.className="cm-completionDetail",r.textContent=n.detail,r},position:80}),e.sort((n,r)=>n.position-r.position).map(n=>n.render)}function yp(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let i=Math.floor(e/n);return{from:i*n,to:(i+1)*n}}let r=Math.floor((t-e)/n);return{from:t-(r+1)*n,to:t-r*n}}class bV{constructor(e,n,r){this.view=e,this.stateField=n,this.applyCompletion=r,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:l=>this.placeInfo(l),key:this},this.space=null,this.currentClass="";let i=e.state.field(n),{options:o,selected:s}=i.open,a=e.state.facet(Cn);this.optionContent=yV(a),this.optionClass=a.optionClass,this.tooltipClass=a.tooltipClass,this.range=yp(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:c}=e.state.field(n).open;for(let u=l.target,f;u&&u!=this.dom;u=u.parentNode)if(u.nodeName=="LI"&&(f=/-(\d+)$/.exec(u.id))&&+f[1]<c.length){this.applyCompletion(e,c[+f[1]]),l.preventDefault();return}}),this.dom.addEventListener("focusout",l=>{let c=e.state.field(this.stateField,!1);c&&c.tooltip&&e.state.facet(Cn).closeOnBlur&&l.relatedTarget!=e.contentDOM&&e.dispatch({effects:ql.of(null)})}),this.showOptions(o,i.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 r=e.state.field(this.stateField),i=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),r!=i){let{options:o,selected:s,disabled:a}=r.open;(!i.open||i.open.options!=o)&&(this.range=yp(o.length,s,e.state.facet(Cn).maxRenderedOptions),this.showOptions(o,r.id)),this.updateSel(),a!=((n=i.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 r of this.currentClass.split(" "))r&&this.dom.classList.remove(r);for(let r of n.split(" "))r&&this.dom.classList.add(r);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.from||n.selected>=this.range.to)&&(this.range=yp(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:r}=n.options[n.selected],{info:i}=r;if(!i)return;let o=typeof i=="string"?document.createTextNode(i):i(r);if(!o)return;"then"in o?o.then(s=>{s&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(s,r)}).catch(s=>Zn(this.view.state,s,"completion info")):this.addInfoPane(o,r)}}addInfoPane(e,n){this.destroyInfo();let r=this.info=document.createElement("div");if(r.className="cm-tooltip cm-completionInfo",e.nodeType!=null)r.appendChild(e),this.infoDestroy=null;else{let{dom:i,destroy:o}=e;r.appendChild(i),this.infoDestroy=o||null}this.dom.appendChild(r),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let n=null;for(let r=this.list.firstChild,i=this.range.from;r;r=r.nextSibling,i++)r.nodeName!="LI"||!r.id?i--:i==e?r.hasAttribute("aria-selected")||(r.setAttribute("aria-selected","true"),n=r):r.hasAttribute("aria-selected")&&r.removeAttribute("aria-selected");return n&&wV(this.list,n),n}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let n=this.dom.getBoundingClientRect(),r=this.info.getBoundingClientRect(),i=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 i.top>Math.min(o.bottom,n.bottom)-10||i.bottom<Math.max(o.top,n.top)+10?null:this.view.state.facet(Cn).positionInfo(this.view,n,i,r,o,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,n,r){const i=document.createElement("ul");i.id=n,i.setAttribute("role","listbox"),i.setAttribute("aria-expanded","true"),i.setAttribute("aria-label",this.view.state.phrase("Completions"));let o=null;for(let s=r.from;s<r.to;s++){let{completion:a,match:l}=e[s],{section:c}=a;if(c){let d=typeof c=="string"?c:c.name;if(d!=o&&(s>r.from||r.from==0))if(o=d,typeof c!="string"&&c.header)i.appendChild(c.header(c));else{let h=i.appendChild(document.createElement("completion-section"));h.textContent=d}}const u=i.appendChild(document.createElement("li"));u.id=n+"-"+s,u.setAttribute("role","option");let f=this.optionClass(a);f&&(u.className=f);for(let d of this.optionContent){let h=d(a,this.view.state,this.view,l);h&&u.appendChild(h)}}return r.from&&i.classList.add("cm-completionListIncompleteTop"),r.to<e.length&&i.classList.add("cm-completionListIncompleteBottom"),i}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function SV(t,e){return n=>new bV(n,t,e)}function wV(t,e){let n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=n.height/t.offsetHeight;r.top<n.top?t.scrollTop-=(n.top-r.top)/i:r.bottom>n.bottom&&(t.scrollTop+=(r.bottom-n.bottom)/i)}function I1(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function CV(t,e){let n=[],r=null,i=c=>{n.push(c);let{section:u}=c.completion;if(u){r||(r=[]);let f=typeof u=="string"?u:u.name;r.some(d=>d.name==f)||r.push(typeof u=="string"?{name:f}:u)}},o=e.facet(Cn);for(let c of t)if(c.hasResult()){let u=c.result.getMatch;if(c.result.filter===!1)for(let f of c.result.options)i(new A1(f,c.source,u?u(f):[],1e9-n.length));else{let f=e.sliceDoc(c.from,c.to),d,h=o.filterStrict?new xV(f):new OV(f);for(let p of c.result.options)if(d=h.match(p.label)){let O=p.displayLabel?u?u(p,d.matched):[]:d.matched;i(new A1(p,c.source,O,d.score+(p.boost||0)))}}}if(r){let c=Object.create(null),u=0,f=(d,h)=>{var p,O;return((p=d.rank)!==null&&p!==void 0?p:1e9)-((O=h.rank)!==null&&O!==void 0?O:1e9)||(d.name<h.name?-1:1)};for(let d of r.sort(f))u-=1e5,c[d.name]=u;for(let d of n){let{section:h}=d.completion;h&&(d.score+=c[typeof h=="string"?h:h.name])}}let s=[],a=null,l=o.compareCompletions;for(let c of n.sort((u,f)=>f.score-u.score||l(u.completion,f.completion))){let u=c.completion;!a||a.label!=u.label||a.detail!=u.detail||a.type!=null&&u.type!=null&&a.type!=u.type||a.apply!=u.apply||a.boost!=u.boost?s.push(c):I1(c.completion)>I1(a)&&(s[s.length-1]=c),a=c.completion}return s}class Bs{constructor(e,n,r,i,o,s){this.options=e,this.attrs=n,this.tooltip=r,this.timestamp=i,this.selected=o,this.disabled=s}setSelected(e,n){return e==this.selected||e>=this.options.length?this:new Bs(this.options,T1(n,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,n,r,i,o){let s=CV(e,n);if(!s.length)return i&&e.some(l=>l.state==1)?new Bs(i.options,i.attrs,i.tooltip,i.timestamp,i.selected,!0):null;let a=n.facet(Cn).selectOnOpen?0:-1;if(i&&i.selected!=a&&i.selected!=-1){let l=i.options[i.selected].completion;for(let c=0;c<s.length;c++)if(s[c].completion==l){a=c;break}}return new Bs(s,T1(r,a),{pos:e.reduce((l,c)=>c.hasResult()?Math.min(l,c.from):l,1e8),create:IV,above:o.aboveCursor},i?i.timestamp:Date.now(),a,!1)}map(e){return new Bs(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class Jf{constructor(e,n,r){this.active=e,this.id=n,this.open=r}static start(){return new Jf(PV,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:n}=e,r=n.facet(Cn),o=(r.override||n.languageDataAt("autocomplete",ho(n)).map(mV)).map(a=>(this.active.find(c=>c.source==a)||new Nn(a,this.active.some(c=>c.state!=0)?1:0)).update(e,r));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))||!kV(o,this.active)?s=Bs.build(o,n,this.id,s,r):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 Nn(a.source,0):a));for(let a of e.effects)a.is(AI)&&(s=s&&s.setSelected(a.value,this.id));return o==this.active&&s==this.open?this:new Jf(o,this.id,s)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:AV}}function kV(t,e){if(t==e)return!0;for(let n=0,r=0;;){for(;n<t.length&&!t[n].hasResult;)n++;for(;r<e.length&&!e[r].hasResult;)r++;let i=n==t.length,o=r==e.length;if(i||o)return i==o;if(t[n++].result!=e[r++].result)return!1}}const AV={"aria-autocomplete":"list"};function T1(t,e){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":t};return e>-1&&(n["aria-activedescendant"]=t+"-"+e),n}const PV=[];function um(t,e){if(t.isUserEvent("input.complete")){let n=t.annotation(hx);if(n&&e.activateOnCompletion(n))return"input"}return t.isUserEvent("input.type")?"input":t.isUserEvent("delete.backward")?"delete":null}class Nn{constructor(e,n,r=-1){this.source=e,this.state=n,this.explicitPos=r}hasResult(){return!1}update(e,n){let r=um(e,n),i=this;r?i=i.handleUserEvent(e,r,n):e.docChanged?i=i.handleChange(e):e.selection&&i.state!=0&&(i=new Nn(i.source,0));for(let o of e.effects)if(o.is(Hf))i=new Nn(i.source,1,o.value?ho(e.state):-1);else if(o.is(ql))i=new Nn(i.source,0);else if(o.is(kI))for(let s of o.value)s.source==i.source&&(i=s);return i}handleUserEvent(e,n,r){return n=="delete"||!r.activateOnTyping?this.map(e.changes):new Nn(this.source,1)}handleChange(e){return e.changes.touchesRange(ho(e.startState))?new Nn(this.source,0):this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new Nn(this.source,this.state,e.mapPos(this.explicitPos))}}class Hs extends Nn{constructor(e,n,r,i,o){super(e,2,n),this.result=r,this.from=i,this.to=o}hasResult(){return!0}handleUserEvent(e,n,r){var i;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=ho(e.state);if((this.explicitPos<0?l<=s:l<this.from)||l>a||!o||n=="delete"&&ho(e.startState)==this.from)return new Nn(this.source,n=="input"&&r.activateOnTyping?1:0);let c=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos);return EV(o.validFor,e.state,s,a)?new Hs(this.source,c,o,s,a):o.update&&(o=o.update(o,s,a,new SI(e.state,l,c>=0)))?new Hs(this.source,c,o,o.from,(i=o.to)!==null&&i!==void 0?i:ho(e.state)):new Nn(this.source,1,c)}handleChange(e){return e.changes.touchesRange(this.from,this.to)?new Nn(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 Hs(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new Nn(this.source,0)}}function EV(t,e,n,r){if(!t)return!1;let i=e.sliceDoc(n,r);return typeof t=="function"?t(i,n,r,e):CI(t,!0).test(i)}const kI=_e.define({map(t,e){return t.map(n=>n.map(e))}}),AI=_e.define(),Un=ln.define({create(){return Jf.start()},update(t,e){return t.update(e)},provide:t=>[qO.from(t,e=>e.tooltip),de.contentAttributes.from(t,e=>e.attrs)]});function px(t,e){const n=e.completion.apply||e.completion.label;let r=t.state.field(Un).active.find(i=>i.source==e.source);return r instanceof Hs?(typeof n=="string"?t.dispatch(Object.assign(Object.assign({},gV(t.state,n,r.from,r.to)),{annotations:hx.of(e.completion)})):n(t,e.completion,r.from,r.to),!0):!1}const IV=SV(Un,px);function Su(t,e="option"){return n=>{let r=n.state.field(Un,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(Cn).interactionDelay)return!1;let i=1,o;e=="page"&&(o=sE(n,r.open.tooltip))&&(i=Math.max(2,Math.floor(o.dom.offsetHeight/o.dom.querySelector("li").offsetHeight)-1));let{length:s}=r.open.options,a=r.open.selected>-1?r.open.selected+i*(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:AI.of(a)}),!0}}const PI=t=>{let e=t.state.field(Un,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<t.state.facet(Cn).interactionDelay?!1:px(t,e.open.options[e.open.selected])},TV=t=>t.state.field(Un,!1)?(t.dispatch({effects:Hf.of(!0)}),!0):!1,$V=t=>{let e=t.state.field(Un,!1);return!e||!e.active.some(n=>n.state!=0)?!1:(t.dispatch({effects:ql.of(null)}),!0)};class jV{constructor(e,n){this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const RV=50,DV=1e3,QV=Bt.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(Un).active)e.state==1&&this.startQuery(e)}update(t){let e=t.state.field(Un),n=t.state.facet(Cn);if(!t.selectionSet&&!t.docChanged&&t.startState.field(Un)==e)return;let r=t.transactions.some(o=>(o.selection||o.docChanged)&&!um(o,n));for(let o=0;o<this.running.length;o++){let s=this.running[o];if(r||s.updates.length+t.transactions.length>RV&&Date.now()-s.time>DV){for(let a of s.context.abortListeners)try{a()}catch(l){Zn(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(Hf)))&&(this.pendingStart=!0);let i=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(),i):-1,this.composing!=0)for(let o of t.transactions)um(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(Un);for(let n of e.active)n.state==1&&!this.running.some(r=>r.active.source==n.source)&&this.startQuery(n)}startQuery(t){let{state:e}=this.view,n=ho(e),r=new SI(e,n,t.explicitPos==n),i=new jV(t,r);this.running.push(i),Promise.resolve(t.source(r)).then(o=>{i.context.aborted||(i.done=o||null,this.scheduleAccept())},o=>{this.view.dispatch({effects:ql.of(null)}),Zn(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 r=0;r<this.running.length;r++){let i=this.running[r];if(i.done===void 0)continue;if(this.running.splice(r--,1),i.done){let s=new Hs(i.active.source,i.active.explicitPos,i.done,i.done.from,(t=i.done.to)!==null&&t!==void 0?t:ho(i.updates.length?i.updates[0].startState:this.view.state));for(let a of i.updates)s=s.update(a,n);if(s.hasResult()){e.push(s);continue}}let o=this.view.state.field(Un).active.find(s=>s.source==i.active.source);if(o&&o.state==1)if(i.done==null){let s=new Nn(i.active.source,0);for(let a of i.updates)s=s.update(a,n);s.state!=1&&e.push(s)}else this.startQuery(o)}e.length&&this.view.dispatch({effects:kI.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(Un,!1);if(e&&e.tooltip&&this.view.state.facet(Cn).closeOnBlur){let n=e.open&&sE(this.view,e.open.tooltip);(!n||!n.dom.contains(t.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:ql.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:Hf.of(!1)}),20),this.composing=0}}}),BV=typeof navigator=="object"&&/Win/.test(navigator.platform),_V=Si.highest(de.domEventHandlers({keydown(t,e){let n=e.state.field(Un,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||t.key.length>1||t.ctrlKey&&!(BV&&t.altKey)||t.metaKey)return!1;let r=n.open.options[n.open.selected],i=n.active.find(s=>s.source==r.source),o=r.completion.commitCharacters||i.result.commitCharacters;return o&&o.indexOf(t.key)>-1&&px(e,r),!1}})),EI=de.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 MV{constructor(e,n,r,i){this.field=e,this.line=n,this.from=r,this.to=i}}class gx{constructor(e,n,r){this.field=e,this.from=n,this.to=r}map(e){let n=e.mapPos(this.from,-1,wn.TrackDel),r=e.mapPos(this.to,1,wn.TrackDel);return n==null||r==null?null:new gx(this.field,n,r)}}class mx{constructor(e,n){this.lines=e,this.fieldPositions=n}instantiate(e,n){let r=[],i=[n],o=e.doc.lineAt(n),s=/^\s*/.exec(o.text)[0];for(let l of this.lines){if(r.length){let c=s,u=/^\t*/.exec(l)[0].length;for(let f=0;f<u;f++)c+=e.facet(Oc);i.push(n+c.length-u),l=c+l.slice(u)}r.push(l),n+=l.length+1}let a=this.fieldPositions.map(l=>new gx(l.field,i[l.line]+l.from,i[l.line]+l.to));return{text:r,ranges:a}}static parse(e){let n=[],r=[],i=[],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]||"",c=-1;for(let u=0;u<n.length;u++)(a!=null?n[u].seq==a:l&&n[u].name==l)&&(c=u);if(c<0){let u=0;for(;u<n.length&&(a==null||n[u].seq!=null&&n[u].seq<a);)u++;n.splice(u,0,{seq:a,name:l}),c=u;for(let f of i)f.field>=c&&f.field++}i.push(new MV(c,r.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 i)l.line==r.length&&l.from>a.index&&(l.from--,l.to--)}r.push(s)}return new mx(r,i)}}let NV=we.widget({widget:new class extends ki{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),FV=we.mark({class:"cm-snippetField"});class Ma{constructor(e,n){this.ranges=e,this.active=n,this.deco=we.set(e.map(r=>(r.from==r.to?NV:FV).range(r.from,r.to)))}map(e){let n=[];for(let r of this.ranges){let i=r.map(e);if(!i)return null;n.push(i)}return new Ma(n,this.active)}selectionInsideField(e){return e.ranges.every(n=>this.ranges.some(r=>r.field==this.active&&r.from<=n.from&&r.to>=n.to))}}const bc=_e.define({map(t,e){return t&&t.map(e)}}),ZV=_e.define(),Ul=ln.define({create(){return null},update(t,e){for(let n of e.effects){if(n.is(bc))return n.value;if(n.is(ZV)&&t)return new Ma(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=>de.decorations.from(t,e=>e?e.deco:we.none)});function Ox(t,e){return ie.create(t.filter(n=>n.field==e).map(n=>ie.range(n.from,n.to)))}function WV(t){let e=mx.parse(t);return(n,r,i,o)=>{let{text:s,ranges:a}=e.instantiate(n.state,i),l={changes:{from:i,to:o,insert:st.of(s)},scrollIntoView:!0,annotations:r?[hx.of(r),qt.userEvent.of("input.complete")]:void 0};if(a.length&&(l.selection=Ox(a,0)),a.some(c=>c.field>0)){let c=new Ma(a,0),u=l.effects=[bc.of(c)];n.state.field(Ul,!1)===void 0&&u.push(_e.appendConfig.of([Ul,GV,YV,EI]))}n.dispatch(n.state.update(l))}}function II(t){return({state:e,dispatch:n})=>{let r=e.field(Ul,!1);if(!r||t<0&&r.active==0)return!1;let i=r.active+t,o=t>0&&!r.ranges.some(s=>s.field==i+t);return n(e.update({selection:Ox(r.ranges,i),effects:bc.of(o?null:new Ma(r.ranges,i)),scrollIntoView:!0})),!0}}const VV=({state:t,dispatch:e})=>t.field(Ul,!1)?(e(t.update({effects:bc.of(null)})),!0):!1,zV=II(1),LV=II(-1),XV=[{key:"Tab",run:zV,shift:LV},{key:"Escape",run:VV}],$1=me.define({combine(t){return t.length?t[0]:XV}}),GV=Si.highest($a.compute([$1],t=>t.facet($1)));function qn(t,e){return Object.assign(Object.assign({},e),{apply:WV(t)})}const YV=de.domEventHandlers({mousedown(t,e){let n=e.state.field(Ul,!1),r;if(!n||(r=e.posAtCoords({x:t.clientX,y:t.clientY}))==null)return!1;let i=n.ranges.find(o=>o.from<=r&&o.to>=r);return!i||i.field==n.active?!1:(e.dispatch({selection:Ox(n.ranges,i.field),effects:bc.of(n.ranges.some(o=>o.field>i.field)?new Ma(n.ranges,i.field):null),scrollIntoView:!0}),!0)}}),Hl={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Lo=_e.define({map(t,e){let n=e.mapPos(t,-1,wn.TrackAfter);return n??void 0}}),xx=new class extends Jo{};xx.startSide=1;xx.endSide=-1;const TI=ln.define({create(){return et.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:r=>r>=n.from&&r<=n.to})}for(let n of e.effects)n.is(Lo)&&(t=t.update({add:[xx.range(n.value,n.value+1)]}));return t}});function qV(){return[HV,TI]}const bp="()[]{}<>";function $I(t){for(let e=0;e<bp.length;e+=2)if(bp.charCodeAt(e)==t)return bp.charAt(e+1);return MO(t<128?t:t+1)}function jI(t,e){return t.languageDataAt("closeBrackets",e)[0]||Hl}const UV=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),HV=de.inputHandler.of((t,e,n,r)=>{if((UV?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let i=t.state.selection.main;if(r.length>2||r.length==2&&kr(bn(r,0))==1||e!=i.from||n!=i.to)return!1;let o=e7(t.state,r);return o?(t.dispatch(o),!0):!1}),JV=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let r=jI(t,t.selection.main.head).brackets||Hl.brackets,i=null,o=t.changeByRange(s=>{if(s.empty){let a=t7(t.doc,s.head);for(let l of r)if(l==a&&eh(t.doc,s.head)==$I(bn(l,0)))return{changes:{from:s.head-l.length,to:s.head+l.length},range:ie.cursor(s.head-l.length)}}return{range:i=s}});return i||e(t.update(o,{scrollIntoView:!0,userEvent:"delete.backward"})),!i},KV=[{key:"Backspace",run:JV}];function e7(t,e){let n=jI(t,t.selection.main.head),r=n.brackets||Hl.brackets;for(let i of r){let o=$I(bn(i,0));if(e==i)return o==i?i7(t,i,r.indexOf(i+i+i)>-1,n):n7(t,i,o,n.before||Hl.before);if(e==o&&RI(t,t.selection.main.from))return r7(t,i,o)}return null}function RI(t,e){let n=!1;return t.field(TI).between(0,t.doc.length,r=>{r==e&&(n=!0)}),n}function eh(t,e){let n=t.sliceString(e,e+2);return n.slice(0,kr(bn(n,0)))}function t7(t,e){let n=t.sliceString(e-2,e);return kr(bn(n,0))==n.length?n:n.slice(1)}function n7(t,e,n,r){let i=null,o=t.changeByRange(s=>{if(!s.empty)return{changes:[{insert:e,from:s.from},{insert:n,from:s.to}],effects:Lo.of(s.to+e.length),range:ie.range(s.anchor+e.length,s.head+e.length)};let a=eh(t.doc,s.head);return!a||/\s/.test(a)||r.indexOf(a)>-1?{changes:{insert:e+n,from:s.head},effects:Lo.of(s.head+e.length),range:ie.cursor(s.head+e.length)}:{range:i=s}});return i?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function r7(t,e,n){let r=null,i=t.changeByRange(o=>o.empty&&eh(t.doc,o.head)==n?{changes:{from:o.head,to:o.head+n.length,insert:n},range:ie.cursor(o.head+n.length)}:r={range:o});return r?null:t.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function i7(t,e,n,r){let i=r.stringPrefixes||Hl.stringPrefixes,o=null,s=t.changeByRange(a=>{if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:e,from:a.to}],effects:Lo.of(a.to+e.length),range:ie.range(a.anchor+e.length,a.head+e.length)};let l=a.head,c=eh(t.doc,l),u;if(c==e){if(j1(t,l))return{changes:{insert:e+e,from:l},effects:Lo.of(l+e.length),range:ie.cursor(l+e.length)};if(RI(t,l)){let d=n&&t.sliceDoc(l,l+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:l,to:l+d.length,insert:d},range:ie.cursor(l+d.length)}}}else{if(n&&t.sliceDoc(l-2*e.length,l)==e+e&&(u=R1(t,l-2*e.length,i))>-1&&j1(t,u))return{changes:{insert:e+e+e+e,from:l},effects:Lo.of(l+e.length),range:ie.cursor(l+e.length)};if(t.charCategorizer(l)(c)!=Rt.Word&&R1(t,l,i)>-1&&!o7(t,l,e,i))return{changes:{insert:e+e,from:l},effects:Lo.of(l+e.length),range:ie.cursor(l+e.length)}}return{range:o=a}});return o?null:t.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function j1(t,e){let n=Dt(t).resolveInner(e+1);return n.parent&&n.from==e}function o7(t,e,n,r){let i=Dt(t).resolveInner(e,-1),o=r.reduce((s,a)=>Math.max(s,a.length),0);for(let s=0;s<5;s++){let a=t.sliceDoc(i.from,Math.min(i.to,i.from+n.length+o)),l=a.indexOf(n);if(!l||l>-1&&r.indexOf(a.slice(0,l))>-1){let u=i.firstChild;for(;u&&u.from==i.from&&u.to-u.from>n.length+l;){if(t.sliceDoc(u.to-n.length,u.to)==n)return!1;u=u.firstChild}return!0}let c=i.to==e&&i.parent;if(!c)break;i=c}return!1}function R1(t,e,n){let r=t.charCategorizer(e);if(r(t.sliceDoc(e-1,e))!=Rt.Word)return e;for(let i of n){let o=e-i.length;if(t.sliceDoc(o,e)==i&&r(t.sliceDoc(o-1,o))!=Rt.Word)return o}return-1}function s7(t={}){return[_V,Un,Cn.of(t),QV,a7,EI]}const DI=[{key:"Ctrl-Space",run:TV},{key:"Escape",run:$V},{key:"ArrowDown",run:Su(!0)},{key:"ArrowUp",run:Su(!1)},{key:"PageDown",run:Su(!0,"page")},{key:"PageUp",run:Su(!1,"page")},{key:"Enter",run:PI}],a7=Si.highest($a.computeN([Cn],t=>t.facet(Cn).defaultKeymap?[DI]:[]));class l7{constructor(e,n,r){this.from=e,this.to=n,this.diagnostic=r}}class zo{constructor(e,n,r){this.diagnostics=e,this.panel=n,this.selected=r}static init(e,n,r){let i=e,o=r.facet(ao).markerFilter;o&&(i=o(i,r));let s=we.set(i.map(a=>a.from==a.to||a.from==a.to-1&&r.doc.lineAt(a.from).to==a.from?we.widget({widget:new v7(a),diagnostic:a}).range(a.from):we.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 zo(s,n,ha(s))}}function ha(t,e=null,n=0){let r=null;return t.between(n,1e9,(i,o,{spec:s})=>{if(!(e&&s.diagnostic!=e))return r=new l7(i,o,s.diagnostic),!1}),r}function c7(t,e){let n=e.pos,r=e.end||n,i=t.state.facet(ao).hideOn(t,n,r);if(i!=null)return i;let o=t.startState.doc.lineAt(e.pos);return!!(t.effects.some(s=>s.is(vx))||t.changes.touchesRange(o.from,Math.max(o.to,r)))}function QI(t,e){return t.field(gr,!1)?e:e.concat(_e.appendConfig.of(NI))}function u7(t,e){return{effects:QI(t,[vx.of(e)])}}const vx=_e.define(),yx=_e.define(),BI=_e.define(),gr=ln.define({create(){return new zo(we.none,null,null)},update(t,e){if(e.docChanged){let n=t.diagnostics.map(e.changes),r=null;if(t.selected){let i=e.changes.mapPos(t.selected.from,1);r=ha(n,t.selected.diagnostic,i)||ha(n,null,i)}t=new zo(n,t.panel,r)}for(let n of e.effects)n.is(vx)?t=zo.init(n.value,t.panel,e.state):n.is(yx)?t=new zo(t.diagnostics,n.value?th.open:null,t.selected):n.is(BI)&&(t=new zo(t.diagnostics,t.panel,n.value));return t},provide:t=>[zl.from(t,e=>e.panel),de.decorations.from(t,e=>e.diagnostics)]}),f7=we.mark({class:"cm-lintRange cm-lintRange-active",inclusive:!0});function d7(t,e,n){let{diagnostics:r}=t.state.field(gr),i=[],o=2e8,s=0;r.between(e-(n<0?1:0),e+(n>0?1:0),(l,c,{spec:u})=>{e>=l&&e<=c&&(l==c||(e>l||n>0)&&(e<c||n<0))&&(i.push(u.diagnostic),o=Math.min(l,o),s=Math.max(c,s))});let a=t.state.facet(ao).tooltipFilter;return a&&(i=a(i,t.state)),i.length?{pos:o,end:s,above:t.state.doc.lineAt(o).to<s,create(){return{dom:h7(t,i)}}}:null}function h7(t,e){return At("ul",{class:"cm-tooltip-lint"},e.map(n=>MI(t,n,!1)))}const p7=t=>{let e=t.state.field(gr,!1);(!e||!e.panel)&&t.dispatch({effects:QI(t.state,[yx.of(!0)])});let n=Vl(t,th.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},D1=t=>{let e=t.state.field(gr,!1);return!e||!e.panel?!1:(t.dispatch({effects:yx.of(!1)}),!0)},g7=t=>{let e=t.state.field(gr,!1);if(!e)return!1;let n=t.state.selection.main,r=e.diagnostics.iter(n.to+1);return!r.value&&(r=e.diagnostics.iter(0),!r.value||r.from==n.from&&r.to==n.to)?!1:(t.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)},m7=[{key:"Mod-Shift-m",run:p7,preventDefault:!0},{key:"F8",run:g7}],O7=Bt.fromClass(class{constructor(t){this.view=t,this.timeout=-1,this.set=!0;let{delay:e}=t.state.facet(ao);this.lintTime=Date.now()+e,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,e)}run(){let t=Date.now();if(t<this.lintTime-10)this.timeout=setTimeout(this.run,this.lintTime-t);else{this.set=!1;let{state:e}=this.view,{sources:n}=e.facet(ao);n.length&&Promise.all(n.map(r=>Promise.resolve(r(this.view)))).then(r=>{let i=r.reduce((o,s)=>o.concat(s));this.view.state.doc==e.doc&&this.view.dispatch(u7(this.view.state,i))},r=>{Zn(this.view.state,r)})}}update(t){let e=t.state.facet(ao);(t.docChanged||e!=t.startState.facet(ao)||e.needsRefresh&&e.needsRefresh(t))&&(this.lintTime=Date.now()+e.delay,this.set||(this.set=!0,this.timeout=setTimeout(this.run,e.delay)))}force(){this.set&&(this.lintTime=Date.now(),this.run())}destroy(){clearTimeout(this.timeout)}}),ao=me.define({combine(t){return Object.assign({sources:t.map(e=>e.source).filter(e=>e!=null)},Ci(t.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,n)=>e?n?r=>e(r)||n(r):e:n}))}});function x7(t,e={}){return[ao.of({source:t,config:e}),O7,NI]}function _I(t){let e=[];if(t)e:for(let{name:n}of t){for(let r=0;r<n.length;r++){let i=n[r];if(/[a-zA-Z]/.test(i)&&!e.some(o=>o.toLowerCase()==i.toLowerCase())){e.push(i);continue e}}e.push("")}return e}function MI(t,e,n){var r;let i=n?_I(e.actions):[];return At("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},At("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(t):e.message),(r=e.actions)===null||r===void 0?void 0:r.map((o,s)=>{let a=!1,l=d=>{if(d.preventDefault(),a)return;a=!0;let h=ha(t.state.field(gr).diagnostics,e);h&&o.apply(t,h.from,h.to)},{name:c}=o,u=i[s]?c.indexOf(i[s]):-1,f=u<0?c:[c.slice(0,u),At("u",c.slice(u,u+1)),c.slice(u+1)];return At("button",{type:"button",class:"cm-diagnosticAction",onclick:l,onmousedown:l,"aria-label":` Action: ${c}${u<0?"":` (access key "${i[s]})"`}.`},f)}),e.source&&At("div",{class:"cm-diagnosticSource"},e.source))}class v7 extends ki{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return At("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class Q1{constructor(e,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=MI(e,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class th{constructor(e){this.view=e,this.items=[];let n=i=>{if(i.keyCode==27)D1(this.view),this.view.focus();else if(i.keyCode==38||i.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(i.keyCode==40||i.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(i.keyCode==36)this.moveSelection(0);else if(i.keyCode==35)this.moveSelection(this.items.length-1);else if(i.keyCode==13)this.view.focus();else if(i.keyCode>=65&&i.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:o}=this.items[this.selectedIndex],s=_I(o.actions);for(let a=0;a<s.length;a++)if(s[a].toUpperCase().charCodeAt(0)==i.keyCode){let l=ha(this.view.state.field(gr).diagnostics,o);l&&o.actions[a].apply(e,l.from,l.to)}}else return;i.preventDefault()},r=i=>{for(let o=0;o<this.items.length;o++)this.items[o].dom.contains(i.target)&&this.moveSelection(o)};this.list=At("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:n,onclick:r}),this.dom=At("div",{class:"cm-panel-lint"},this.list,At("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>D1(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(gr).selected;if(!e)return-1;for(let n=0;n<this.items.length;n++)if(this.items[n].diagnostic==e.diagnostic)return n;return-1}update(){let{diagnostics:e,selected:n}=this.view.state.field(gr),r=0,i=!1,o=null;for(e.between(0,this.view.state.doc.length,(s,a,{spec:l})=>{let c=-1,u;for(let f=r;f<this.items.length;f++)if(this.items[f].diagnostic==l.diagnostic){c=f;break}c<0?(u=new Q1(this.view,l.diagnostic),this.items.splice(r,0,u),i=!0):(u=this.items[c],c>r&&(this.items.splice(r,c-r),i=!0)),n&&u.diagnostic==n.diagnostic?u.dom.hasAttribute("aria-selected")||(u.dom.setAttribute("aria-selected","true"),o=u):u.dom.hasAttribute("aria-selected")&&u.dom.removeAttribute("aria-selected"),r++});r<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)i=!0,this.items.pop();this.items.length==0&&(this.items.push(new Q1(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),i=!0),o?(this.list.setAttribute("aria-activedescendant",o.id),this.view.requestMeasure({key:this,read:()=>({sel:o.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:s,panel:a})=>{let l=a.height/this.list.offsetHeight;s.top<a.top?this.list.scrollTop-=(a.top-s.top)/l:s.bottom>a.bottom&&(this.list.scrollTop+=(s.bottom-a.bottom)/l)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}sync(){let e=this.list.firstChild;function n(){let r=e;e=r.nextSibling,r.remove()}for(let r of this.items)if(r.dom.parentNode==this.list){for(;e!=r.dom;)n();e=r.dom.nextSibling}else this.list.insertBefore(r.dom,e);for(;e;)n()}moveSelection(e){if(this.selectedIndex<0)return;let n=this.view.state.field(gr),r=ha(n.diagnostics,this.items[e].diagnostic);r&&this.view.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:BI.of(r)})}static open(e){return new th(e)}}function y7(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(t)}</svg>')`}function wu(t){return y7(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${t}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const b7=de.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:wu("#d11")},".cm-lintRange-warning":{backgroundImage:wu("orange")},".cm-lintRange-info":{backgroundImage:wu("#999")},".cm-lintRange-hint":{backgroundImage:wu("#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}}}),NI=[gr,de.decorations.compute([gr],t=>{let{selected:e,panel:n}=t.field(gr);return!e||!n||e.from==e.to?we.none:we.set([f7.range(e.from,e.to)])}),oZ(d7,{hideOn:c7}),b7];var B1=function(e){e===void 0&&(e={});var{crosshairCursor:n=!1}=e,r=[];e.closeBracketsKeymap!==!1&&(r=r.concat(KV)),e.defaultKeymap!==!1&&(r=r.concat(_W)),e.searchKeymap!==!1&&(r=r.concat(cV)),e.historyKeymap!==!1&&(r=r.concat(X6)),e.foldKeymap!==!1&&(r=r.concat(a6)),e.completionKeymap!==!1&&(r=r.concat(DI)),e.lintKeymap!==!1&&(r=r.concat(m7));var i=[];return e.lineNumbers!==!1&&i.push(pZ()),e.highlightActiveLineGutter!==!1&&i.push(OZ()),e.highlightSpecialChars!==!1&&i.push(DF()),e.history!==!1&&i.push(_6()),e.foldGutter!==!1&&i.push(f6()),e.drawSelection!==!1&&i.push(CF()),e.dropCursor!==!1&&i.push(IF()),e.allowMultipleSelections!==!1&&i.push(Ue.allowMultipleSelections.of(!0)),e.indentOnInput!==!1&&i.push(JZ()),e.syntaxHighlighting!==!1&&i.push(ix(g6,{fallback:!0})),e.bracketMatching!==!1&&i.push(S6()),e.closeBrackets!==!1&&i.push(qV()),e.autocompletion!==!1&&i.push(s7()),e.rectangularSelection!==!1&&i.push(YF()),n!==!1&&i.push(HF()),e.highlightActiveLine!==!1&&i.push(FF()),e.highlightSelectionMatches!==!1&&i.push(zW()),e.tabSize&&typeof e.tabSize=="number"&&i.push(Oc.of(" ".repeat(e.tabSize))),i.concat([$a.of(r.flat())]).filter(Boolean)};const S7="#e5c07b",_1="#e06c75",w7="#56b6c2",C7="#ffffff",qu="#abb2bf",fm="#7d8799",k7="#61afef",A7="#98c379",M1="#d19a66",P7="#c678dd",E7="#21252b",N1="#2c313a",F1="#282c34",Sp="#353a42",I7="#3E4451",Z1="#528bff",T7=de.theme({"&":{color:qu,backgroundColor:F1},".cm-content":{caretColor:Z1},".cm-cursor, .cm-dropCursor":{borderLeftColor:Z1},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:I7},".cm-panels":{backgroundColor:E7,color:qu},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:F1,color:fm,border:"none"},".cm-activeLineGutter":{backgroundColor:N1},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:Sp},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Sp,borderBottomColor:Sp},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:N1,color:qu}}},{dark:!0}),$7=Qa.define([{tag:P.keyword,color:P7},{tag:[P.name,P.deleted,P.character,P.propertyName,P.macroName],color:_1},{tag:[P.function(P.variableName),P.labelName],color:k7},{tag:[P.color,P.constant(P.name),P.standard(P.name)],color:M1},{tag:[P.definition(P.name),P.separator],color:qu},{tag:[P.typeName,P.className,P.number,P.changed,P.annotation,P.modifier,P.self,P.namespace],color:S7},{tag:[P.operator,P.operatorKeyword,P.url,P.escape,P.regexp,P.link,P.special(P.string)],color:w7},{tag:[P.meta,P.comment],color:fm},{tag:P.strong,fontWeight:"bold"},{tag:P.emphasis,fontStyle:"italic"},{tag:P.strikethrough,textDecoration:"line-through"},{tag:P.link,color:fm,textDecoration:"underline"},{tag:P.heading,fontWeight:"bold",color:_1},{tag:[P.atom,P.bool,P.special(P.variableName)],color:M1},{tag:[P.processingInstruction,P.string,P.inserted],color:A7},{tag:P.invalid,color:C7}]),j7=[T7,ix($7)];var R7=de.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),D7=function(e){e===void 0&&(e={});var{indentWithTab:n=!0,editable:r=!0,readOnly:i=!1,theme:o="light",placeholder:s="",basicSetup:a=!0}=e,l=[];switch(n&&l.unshift($a.of([MW])),a&&(typeof a=="boolean"?l.unshift(B1()):l.unshift(B1(a))),s&&l.unshift(zF(s)),o){case"light":l.push(R7);break;case"dark":l.push(j7);break;case"none":break;default:l.push(o);break}return r===!1&&l.push(de.editable.of(!1)),i&&l.push(Ue.readOnly.of(!0)),[...l]},Q7=t=>({line:t.state.doc.lineAt(t.state.selection.main.from),lineCount:t.state.doc.lines,lineBreak:t.state.lineBreak,length:t.state.doc.length,readOnly:t.state.readOnly,tabSize:t.state.tabSize,selection:t.state.selection,selectionAsSingle:t.state.selection.asSingle().main,ranges:t.state.selection.ranges,selectionCode:t.state.sliceDoc(t.state.selection.main.from,t.state.selection.main.to),selections:t.state.selection.ranges.map(e=>t.state.sliceDoc(e.from,e.to)),selectedText:t.state.selection.ranges.some(e=>!e.empty)}),W1=wi.define(),B7=[];function _7(t){var{value:e,selection:n,onChange:r,onStatistics:i,onCreateEditor:o,onUpdate:s,extensions:a=B7,autoFocus:l,theme:c="light",height:u=null,minHeight:f=null,maxHeight:d=null,width:h=null,minWidth:p=null,maxWidth:O=null,placeholder:m="",editable:x=!0,readOnly:v=!1,indentWithTab:y=!0,basicSetup:S=!0,root:b,initialState:w}=t,[C,k]=j.useState(),[I,A]=j.useState(),[E,$]=j.useState(),R=de.theme({"&":{height:u,minHeight:f,maxHeight:d,width:h,minWidth:p,maxWidth:O},"& .cm-scroller":{height:"100% !important"}}),M=de.updateListener.of(G=>{if(G.docChanged&&typeof r=="function"&&!G.transactions.some(Y=>Y.annotation(W1))){var V=G.state.doc,ee=V.toString();r(ee,G)}i&&i(Q7(G))}),Q=D7({theme:c,editable:x,readOnly:v,placeholder:m,indentWithTab:y,basicSetup:S}),Z=[M,R,...Q];return s&&typeof s=="function"&&Z.push(de.updateListener.of(s)),Z=Z.concat(a),j.useEffect(()=>{if(C&&!E){var G={doc:e,selection:n,extensions:Z},V=w?Ue.fromJSON(w.json,G,w.fields):Ue.create(G);if($(V),!I){var ee=new de({state:V,parent:C,root:b});A(ee),o&&o(ee,V)}}return()=>{I&&($(void 0),A(void 0))}},[C,E]),j.useEffect(()=>k(t.container),[t.container]),j.useEffect(()=>()=>{I&&(I.destroy(),A(void 0))},[I]),j.useEffect(()=>{l&&I&&I.focus()},[l,I]),j.useEffect(()=>{I&&I.dispatch({effects:_e.reconfigure.of(Z)})},[c,a,u,f,d,h,p,O,m,x,v,y,S,r,s]),j.useEffect(()=>{if(e!==void 0){var G=I?I.state.doc.toString():"";I&&e!==G&&I.dispatch({changes:{from:0,to:G.length,insert:e||""},annotations:[W1.of(!0)]})}},[e,I]),{state:E,setState:$,view:I,setView:A,container:C,setContainer:k}}var M7=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],FI=j.forwardRef((t,e)=>{var{className:n,value:r="",selection:i,extensions:o=[],onChange:s,onStatistics:a,onCreateEditor:l,onUpdate:c,autoFocus:u,theme:f="light",height:d,minHeight:h,maxHeight:p,width:O,minWidth:m,maxWidth:x,basicSetup:v,placeholder:y,indentWithTab:S,editable:b,readOnly:w,root:C,initialState:k}=t,I=Rk(t,M7),A=j.useRef(null),{state:E,view:$,container:R}=_7({container:A.current,root:C,value:r,autoFocus:u,theme:f,height:d,minHeight:h,maxHeight:p,width:O,minWidth:m,maxWidth:x,basicSetup:v,placeholder:y,indentWithTab:S,editable:b,readOnly:w,selection:i,onChange:s,onStatistics:a,onCreateEditor:l,onUpdate:c,extensions:o,initialState:k});if(j.useImperativeHandle(e,()=>({editor:A.current,state:E,view:$}),[A,R,E,$]),typeof r!="string")throw new Error("value must be typeof string but got "+typeof r);var M=typeof f=="string"?"cm-theme-"+f:"cm-theme";return g.jsx("div",Ae({ref:A,className:""+M+(n?" "+n:"")},I))});FI.displayName="CodeMirror";function Kf(){return Kf=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Kf.apply(null,arguments)}var ZI=t=>{var{theme:e,settings:n={},styles:r=[]}=t,i={".cm-gutters":{}},o={};n.background&&(o.backgroundColor=n.background),n.backgroundImage&&(o.backgroundImage=n.backgroundImage),n.foreground&&(o.color=n.foreground),n.fontSize&&(o.fontSize=n.fontSize),(n.background||n.foreground)&&(i["&"]=o),n.fontFamily&&(i["&.cm-editor .cm-scroller"]={fontFamily:n.fontFamily}),n.gutterBackground&&(i[".cm-gutters"].backgroundColor=n.gutterBackground),n.gutterForeground&&(i[".cm-gutters"].color=n.gutterForeground),n.gutterBorder&&(i[".cm-gutters"].borderRightColor=n.gutterBorder),n.caret&&(i[".cm-content"]={caretColor:n.caret},i[".cm-cursor, .cm-dropCursor"]={borderLeftColor:n.caret});var s={};n.gutterActiveForeground&&(s.color=n.gutterActiveForeground),n.lineHighlight&&(i[".cm-activeLine"]={backgroundColor:n.lineHighlight},s.backgroundColor=n.lineHighlight),i[".cm-activeLineGutter"]=s,n.selection&&(i["&.cm-focused .cm-selectionBackground, & .cm-line::selection, & .cm-selectionLayer .cm-selectionBackground, .cm-content ::selection"]={background:n.selection+" !important"}),n.selectionMatch&&(i["& .cm-selectionMatch"]={backgroundColor:n.selectionMatch});var a=de.theme(i,{dark:e==="dark"}),l=Qa.define(r),c=[a,ix(l)];return c},N7={background:"#2e3235",foreground:"#bdbdbd",caret:"#a0a4ae",selection:"#d7d4f063",selectionMatch:"#d7d4f063",gutterBackground:"#2e3235",gutterForeground:"#999",gutterActiveForeground:"#4f5b66",lineHighlight:"#545b6130"},bx=t=>{var{theme:e="dark",settings:n={},styles:r=[]}=t||{};return ZI({theme:e,settings:Kf({},N7,n),styles:[{tag:P.keyword,color:"#cf6edf"},{tag:[P.name,P.deleted,P.character,P.macroName],color:"#56c8d8"},{tag:[P.propertyName],color:"#facf4e"},{tag:[P.variableName],color:"#bdbdbd"},{tag:[P.function(P.variableName)],color:"#56c8d8"},{tag:[P.labelName],color:"#cf6edf"},{tag:[P.color,P.constant(P.name),P.standard(P.name)],color:"#facf4e"},{tag:[P.definition(P.name),P.separator],color:"#fa5788"},{tag:[P.brace],color:"#cf6edf"},{tag:[P.annotation],color:"#ff5f52"},{tag:[P.number,P.changed,P.annotation,P.modifier,P.self,P.namespace],color:"#ffad42"},{tag:[P.typeName,P.className],color:"#ffad42"},{tag:[P.operator,P.operatorKeyword],color:"#7186f0"},{tag:[P.tagName],color:"#99d066"},{tag:[P.squareBracket],color:"#ff5f52"},{tag:[P.angleBracket],color:"#606f7a"},{tag:[P.attributeName],color:"#bdbdbd"},{tag:[P.regexp],color:"#ff5f52"},{tag:[P.quote],color:"#6abf69"},{tag:[P.string],color:"#99d066"},{tag:P.link,color:"#56c8d8",textDecoration:"underline",textUnderlinePosition:"under"},{tag:[P.url,P.escape,P.special(P.string)],color:"#facf4e"},{tag:[P.meta],color:"#707d8b"},{tag:[P.comment],color:"#707d8b",fontStyle:"italic"},{tag:P.monospace,color:"#bdbdbd"},{tag:P.strong,fontWeight:"bold",color:"#ff5f52"},{tag:P.emphasis,fontStyle:"italic",color:"#99d066"},{tag:P.strikethrough,textDecoration:"line-through"},{tag:P.heading,fontWeight:"bold",color:"#facf4e"},{tag:P.heading1,fontWeight:"bold",color:"#facf4e"},{tag:[P.heading2,P.heading3,P.heading4],fontWeight:"bold",color:"#facf4e"},{tag:[P.heading5,P.heading6],color:"#facf4e"},{tag:[P.atom,P.bool,P.special(P.variableName)],color:"#56c8d8"},{tag:[P.processingInstruction,P.inserted],color:"#ff5f52"},{tag:[P.contentSeparator],color:"#56c8d8"},{tag:P.invalid,color:"#606f7a",borderBottom:"1px dotted #ff5f52"},...r]})},F7=bx;bx();bx();var Z7={background:"#FAFAFA",foreground:"#90A4AE",caret:"#272727",selection:"#80CBC440",selectionMatch:"#80CBC440",gutterBackground:"#FAFAFA",gutterForeground:"#90A4AE",gutterBorder:"transparent",lineHighlight:"#CCD7DA50"},dm=t=>{var{theme:e="light",settings:n={},styles:r=[]}=t||{};return ZI({theme:e,settings:Kf({},Z7,n),styles:[{tag:P.keyword,color:"#39ADB5"},{tag:[P.name,P.deleted,P.character,P.macroName],color:"#90A4AE"},{tag:[P.propertyName],color:"#6182B8"},{tag:[P.processingInstruction,P.string,P.inserted,P.special(P.string)],color:"#91B859"},{tag:[P.function(P.variableName),P.labelName],color:"#6182B8"},{tag:[P.color,P.constant(P.name),P.standard(P.name)],color:"#39ADB5"},{tag:[P.definition(P.name),P.separator],color:"#90A4AE"},{tag:[P.className],color:"#E2931D"},{tag:[P.number,P.changed,P.annotation,P.modifier,P.self,P.namespace],color:"#F76D47"},{tag:[P.typeName],color:"#E2931D",fontStyle:"#E2931D"},{tag:[P.operator,P.operatorKeyword],color:"#39ADB5"},{tag:[P.url,P.escape,P.regexp,P.link],color:"#91B859"},{tag:[P.meta,P.comment],color:"#90A4AE"},{tag:P.strong,fontWeight:"bold"},{tag:P.emphasis,fontStyle:"italic"},{tag:P.link,textDecoration:"underline"},{tag:P.heading,fontWeight:"bold",color:"#39ADB5"},{tag:[P.atom,P.bool,P.special(P.variableName)],color:"#90A4AE"},{tag:P.invalid,color:"#E5393570"},{tag:P.strikethrough,textDecoration:"line-through"},...r]})};dm();function W7(t){const e={settings:{background:"var(--bg-color-tonal)",fontFamily:"var(--code-block-font-family)"},styles:[{tag:[P.propertyName],color:"var(--code-block-tokens-property-string-color)"},{tag:[P.processingInstruction,P.string,P.inserted,P.special(P.string)],color:"var(--code-block-tokens-string-color)"},{tag:[P.atom,P.bool,P.special(P.variableName)],color:"var(--text-color-secondary)"}]};switch(t){case"light":return dm(e);case"dark":return F7(e);default:return dm(e)}}const WI=_e.define();function ed({dataTestId:t,...e}){const n=je(),r=an(),{stateExtensions:i}=e,o=j.useRef(null),[s,a]=j.useState(!1),l=j.useMemo(()=>i?i.map(c=>Si.highest(c({selectedEnvironment:r,state:n}))):[],[i,r,n]);return j.useEffect(()=>{var u;const c=(u=o.current)==null?void 0:u.view;c&&c.dispatch({effects:WI.of()})},[n.environments,r]),g.jsx(V7,{"data-testid":t,onClick:()=>a(!0),children:g.jsx(FI,{autoFocus:s,className:"codemirror-container",ref:o,theme:W7("light"),basicSetup:{bracketMatching:!0,closeBrackets:!0,tabSize:2,foldGutter:!1,lineNumbers:!0,lintKeymap:!0,drawSelection:!1},onBlur:()=>a(!1),...e,extensions:[...l,...e.extensions||[]]})})}const V7=T.div`
669
+ --Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,q0),jF={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 ap=null;function RF(){var t;if(ap==null&&typeof document<"u"&&document.body){let e=document.body.style;ap=((t=e.tabSize)!==null&&t!==void 0?t:e.MozTabSize)!=null}return ap||!1}const Xu=me.define({combine(t){let e=Ci(t,{render:null,specialChars:$F,addSpecialChars:null});return(e.replaceTabs=!RF())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,q0)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,q0)),e}});function DF(t={}){return[Xu.of(t),QF()]}let Wb=null;function QF(){return Wb||(Wb=Bt.fromClass(class{constructor(t){this.view=t,this.decorations=we.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(Xu)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new iE({regexp:t.specialChars,decoration:(e,n,r)=>{let{doc:i}=n.state,o=bn(e[0],0);if(o==9){let s=i.lineAt(r),a=n.state.tabSize,l=Ta(s.text,a,r-s.from);return we.replace({widget:new NF((a-l%a)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[o]||(this.decorationCache[o]=we.replace({widget:new MF(t,o)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(Xu);t.startState.facet(Xu)!=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 BF="•";function _F(t){return t>=32?BF:t==10?"␤":String.fromCharCode(9216+t)}class MF extends ki{constructor(e,n){super(),this.options=e,this.code=n}eq(e){return e.code==this.code}toDOM(e){let n=_F(this.code),r=e.state.phrase("Control character")+" "+(jF[this.code]||"0x"+this.code.toString(16)),i=this.options.render&&this.options.render(this.code,r,n);if(i)return i;let o=document.createElement("span");return o.textContent=n,o.title=r,o.setAttribute("aria-label",r),o.className="cm-specialChar",o}ignoreEvent(){return!1}}class NF extends ki{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 FF(){return WF}const ZF=we.line({class:"cm-activeLine"}),WF=Bt.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 r of t.state.selection.ranges){let i=t.lineBlockAt(r.head);i.from>e&&(n.push(ZF.range(i.from)),e=i.from)}return we.set(n)}},{decorations:t=>t.decorations});let VF=class extends ki{constructor(e){super(),this.content=e}toDOM(){let e=document.createElement("span");return e.className="cm-placeholder",e.style.pointerEvents="none",e.appendChild(typeof this.content=="string"?document.createTextNode(this.content):this.content),typeof this.content=="string"?e.setAttribute("aria-label","placeholder "+this.content):e.setAttribute("aria-hidden","true"),e}coordsAt(e){let n=e.firstChild?la(e.firstChild):[];if(!n.length)return null;let r=window.getComputedStyle(e.parentNode),i=zd(n[0],r.direction!="rtl"),o=parseInt(r.lineHeight);return i.bottom-i.top>o*1.5?{left:i.left,right:i.right,top:i.top,bottom:i.top+o}:i}ignoreEvent(){return!1}};function zF(t){return Bt.fromClass(class{constructor(e){this.view=e,this.placeholder=t?we.set([we.widget({widget:new VF(t),side:1}).range(0)]):we.none}get decorations(){return this.view.state.doc.length?we.none:this.placeholder}},{decorations:e=>e.decorations})}const U0=2e3;function LF(t,e,n){let r=Math.min(e.line,n.line),i=Math.max(e.line,n.line),o=[];if(e.off>U0||n.off>U0||e.col<0||n.col<0){let s=Math.min(e.off,n.off),a=Math.max(e.off,n.off);for(let l=r;l<=i;l++){let c=t.doc.line(l);c.length<=a&&o.push(ie.range(c.from+s,c.to+a))}}else{let s=Math.min(e.col,n.col),a=Math.max(e.col,n.col);for(let l=r;l<=i;l++){let c=t.doc.line(l),u=E0(c.text,s,t.tabSize,!0);if(u<0)o.push(ie.cursor(c.to));else{let f=E0(c.text,a,t.tabSize);o.push(ie.range(c.from+u,c.from+f))}}}return o}function XF(t,e){let n=t.coordsAtPos(t.viewport.from);return n?Math.round(Math.abs((n.left-e)/t.defaultCharacterWidth)):-1}function Vb(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1),r=t.state.doc.lineAt(n),i=n-r.from,o=i>U0?-1:i==r.length?XF(t,e.clientX):Ta(r.text,t.state.tabSize,n-r.from);return{line:r.number,col:o,off:i}}function GF(t,e){let n=Vb(t,e),r=t.state.selection;return n?{update(i){if(i.docChanged){let o=i.changes.mapPos(i.startState.doc.line(n.line).from),s=i.state.doc.lineAt(o);n={line:s.number,col:n.col,off:Math.min(n.off,s.length)},r=r.map(i.changes)}},get(i,o,s){let a=Vb(t,i);if(!a)return r;let l=LF(t.state,n,a);return l.length?s?ie.create(l.concat(r.ranges)):ie.create(l):r}}:null}function YF(t){let e=n=>n.altKey&&n.button==0;return de.mouseSelectionStyle.of((n,r)=>e(r)?GF(n,r):null)}const qF={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},UF={style:"cursor: crosshair"};function HF(t={}){let[e,n]=qF[t.key||"Alt"],r=Bt.fromClass(class{constructor(i){this.view=i,this.isDown=!1}set(i){this.isDown!=i&&(this.isDown=i,this.view.update([]))}},{eventObservers:{keydown(i){this.set(i.keyCode==e||n(i))},keyup(i){(i.keyCode==e||!n(i))&&this.set(!1)},mousemove(i){this.set(n(i))}}});return[r,de.contentAttributes.of(i=>{var o;return!((o=i.plugin(r))===null||o===void 0)&&o.isDown?UF:null})]}const Ja="-10000px";class oE{constructor(e,n,r,i){this.facet=n,this.createTooltipView=r,this.removeTooltipView=i,this.input=e.state.facet(n),this.tooltips=this.input.filter(s=>s);let o=null;this.tooltipViews=this.tooltips.map(s=>o=r(s,o))}update(e,n){var r;let i=e.state.facet(this.facet),o=i.filter(l=>l);if(i===this.input){for(let l of this.tooltipViews)l.update&&l.update(e);return!1}let s=[],a=n?[]:null;for(let l=0;l<o.length;l++){let c=o[l],u=-1;if(c){for(let f=0;f<this.tooltips.length;f++){let d=this.tooltips[f];d&&d.create==c.create&&(u=f)}if(u<0)s[l]=this.createTooltipView(c,l?s[l-1]:null),a&&(a[l]=!!c.above);else{let f=s[l]=this.tooltipViews[u];a&&(a[l]=n[u]),f.update&&f.update(e)}}}for(let l of this.tooltipViews)s.indexOf(l)<0&&(this.removeTooltipView(l),(r=l.destroy)===null||r===void 0||r.call(l));return n&&(a.forEach((l,c)=>n[c]=l),n.length=a.length),this.input=i,this.tooltips=o,this.tooltipViews=s,!0}}function JF(t){let{win:e}=t;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const lp=me.define({combine:t=>{var e,n,r;return{position:Oe.ios?"absolute":((e=t.find(i=>i.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((n=t.find(i=>i.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((r=t.find(i=>i.tooltipSpace))===null||r===void 0?void 0:r.tooltipSpace)||JF}}}),zb=new WeakMap,YO=Bt.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(lp);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 oE(t,qO,(n,r)=>this.createTooltip(n,r),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,r=t.state.facet(lp);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let i of this.manager.tooltipViews)i.dom.style.position=this.position;n=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let i of this.manager.tooltipViews)this.container.appendChild(i.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),r=e?e.dom:null;if(n.dom.classList.add("cm-tooltip"),t.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let i=document.createElement("div");i.className="cm-tooltip-arrow",n.dom.appendChild(i)}return n.dom.style.position=this.position,n.dom.style.top=Ja,n.dom.style.left="0px",this.container.insertBefore(n.dom,r),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 r of this.manager.tooltipViews)r.dom.remove(),(t=r.destroy)===null||t===void 0||t.call(r);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,r=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:i}=this.manager.tooltipViews[0];if(Oe.gecko)r=i.offsetParent!=this.container.ownerDocument.body;else if(i.style.top==Ja&&i.style.left=="0px"){let o=i.getBoundingClientRect();r=Math.abs(o.top+1e4)>1||Math.abs(o.left)>1}}if(r||this.position=="absolute")if(this.parent){let i=this.parent.getBoundingClientRect();i.width&&i.height&&(e=i.width/this.parent.offsetWidth,n=i.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((i,o)=>{let s=this.manager.tooltipViews[o];return s.getCoords?s.getCoords(i.pos):this.view.coordsAtPos(i.pos)}),size:this.manager.tooltipViews.map(({dom:i})=>i.getBoundingClientRect()),space:this.view.state.facet(lp).tooltipSpace(this.view),scaleX:e,scaleY:n,makeAbsolute:r}}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:r,scaleX:i,scaleY:o}=t,s=[];for(let a=0;a<this.manager.tooltips.length;a++){let l=this.manager.tooltips[a],c=this.manager.tooltipViews[a],{dom:u}=c,f=t.pos[a],d=t.size[a];if(!f||f.bottom<=Math.max(n.top,r.top)||f.top>=Math.min(n.bottom,r.bottom)||f.right<Math.max(n.left,r.left)-.1||f.left>Math.min(n.right,r.right)+.1){u.style.top=Ja;continue}let h=l.arrow?c.dom.querySelector(".cm-tooltip-arrow"):null,p=h?7:0,O=d.right-d.left,m=(e=zb.get(c))!==null&&e!==void 0?e:d.bottom-d.top,x=c.offset||eZ,v=this.view.textDirection==$t.LTR,y=d.width>r.right-r.left?v?r.left:r.right-d.width:v?Math.min(f.left-(h?14:0)+x.x,r.right-O):Math.max(r.left,f.left-O+(h?14:0)-x.x),S=this.above[a];!l.strictSide&&(S?f.top-(d.bottom-d.top)-x.y<r.top:f.bottom+(d.bottom-d.top)+x.y>r.bottom)&&S==r.bottom-f.bottom>f.top-r.top&&(S=this.above[a]=!S);let b=(S?f.top-r.top:r.bottom-f.bottom)-p;if(b<m&&c.resize!==!1){if(b<this.view.defaultLineHeight){u.style.top=Ja;continue}zb.set(c,m),u.style.height=(m=b)/o+"px"}else u.style.height&&(u.style.height="");let w=S?f.top-m-p-x.y:f.bottom+p+x.y,C=y+O;if(c.overlap!==!0)for(let k of s)k.left<C&&k.right>y&&k.top<w+m&&k.bottom>w&&(w=S?k.top-m-2-p:k.bottom+p+2);if(this.position=="absolute"?(u.style.top=(w-t.parent.top)/o+"px",u.style.left=(y-t.parent.left)/i+"px"):(u.style.top=w/o+"px",u.style.left=y/i+"px"),h){let k=f.left+(v?x.x:-x.x)-(y+14-7);h.style.left=k/i+"px"}c.overlap!==!0&&s.push({left:y,top:w,right:C,bottom:w+m}),u.classList.toggle("cm-tooltip-above",S),u.classList.toggle("cm-tooltip-below",!S),c.positioned&&c.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=Ja}},{eventObservers:{scroll(){this.maybeMeasure()}}}),KF=de.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"}}}),eZ={x:0,y:0},qO=me.define({enables:[YO,KF]}),Bf=me.define({combine:t=>t.reduce((e,n)=>e.concat(n),[])});class Gd{static create(e){return new Gd(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new oE(e,Bf,(n,r)=>this.createHostedView(n,r),n=>n.dom.remove())}createHostedView(e,n){let r=e.create(this.view);return r.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(r.dom,n?n.dom.nextSibling:this.dom.firstChild),this.mounted&&r.mount&&r.mount(this.view),r}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 r of this.manager.tooltipViews){let i=r[e];if(i!==void 0){if(n===void 0)n=i;else if(n!==i)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 tZ=qO.compute([Bf],t=>{let e=t.facet(Bf);return e.length===0?null:{pos:Math.min(...e.map(n=>n.pos)),end:Math.max(...e.map(n=>{var r;return(r=n.end)!==null&&r!==void 0?r:n.pos})),create:Gd.create,above:e[0].above,arrow:e.some(n=>n.arrow)}});class nZ{constructor(e,n,r,i,o){this.view=e,this.source=n,this.field=r,this.setHover=i,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;e<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-e):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:e,lastMove:n}=this,r=e.docView.nearest(n.target);if(!r)return;let i,o=1;if(r instanceof oo)i=r.posAtStart;else{if(i=e.posAtCoords(n),i==null)return;let a=e.coordsAtPos(i);if(!a||n.y<a.top||n.y>a.bottom||n.x<a.left-e.defaultCharacterWidth||n.x>a.right+e.defaultCharacterWidth)return;let l=e.bidiSpans(e.state.doc.lineAt(i)).find(u=>u.from<=i&&u.to>=i),c=l&&l.dir==$t.RTL?-1:1;o=n.x<a.left?-c:c}let s=this.source(e,i,o);if(s!=null&&s.then){let a=this.pending={pos:i};s.then(l=>{this.pending==a&&(this.pending=null,l&&!(Array.isArray(l)&&!l.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(l)?l:[l])}))},l=>Zn(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(YO),n=e?e.manager.tooltips.findIndex(r=>r.create==Gd.create):-1;return n>-1?e.manager.tooltipViews[n]:null}mousemove(e){var n,r;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:i,tooltip:o}=this;if(i.length&&o&&!rZ(o.dom,e)||this.pending){let{pos:s}=i[0]||this.pending,a=(r=(n=i[0])===null||n===void 0?void 0:n.end)!==null&&r!==void 0?r:s;(s==a?this.view.posAtCoords(this.lastMove)!=s:!iZ(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:r}=this;r&&r.dom.contains(e.relatedTarget)?this.watchTooltipLeave(r.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let n=r=>{e.removeEventListener("mouseleave",n),this.active.length&&!this.view.dom.contains(r.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 hu=4;function rZ(t,e){let n=t.getBoundingClientRect();return e.clientX>=n.left-hu&&e.clientX<=n.right+hu&&e.clientY>=n.top-hu&&e.clientY<=n.bottom+hu}function iZ(t,e,n,r,i,o){let s=t.scrollDOM.getBoundingClientRect(),a=t.documentTop+t.documentPadding.top+t.contentHeight;if(s.left>r||s.right<r||s.top>i||Math.min(s.bottom,a)<i)return!1;let l=t.posAtCoords({x:r,y:i},!1);return l>=e&&l<=n}function oZ(t,e={}){let n=_e.define(),r=ln.define({create(){return[]},update(i,o){if(i.length&&(e.hideOnChange&&(o.docChanged||o.selection)?i=[]:e.hideOn&&(i=i.filter(s=>!e.hideOn(o,s))),o.docChanged)){let s=[];for(let a of i){let l=o.changes.mapPos(a.pos,-1,wn.TrackDel);if(l!=null){let c=Object.assign(Object.create(null),a);c.pos=l,c.end!=null&&(c.end=o.changes.mapPos(c.end)),s.push(c)}}i=s}for(let s of o.effects)s.is(n)&&(i=s.value),s.is(sZ)&&(i=[]);return i},provide:i=>Bf.from(i)});return[r,Bt.define(i=>new nZ(i,t,r,n,e.hoverTime||300)),tZ]}function sE(t,e){let n=t.plugin(YO);if(!n)return null;let r=n.manager.tooltips.indexOf(e);return r<0?null:n.manager.tooltipViews[r]}const sZ=_e.define(),Lb=me.define({combine(t){let e,n;for(let r of t)e=e||r.topContainer,n=n||r.bottomContainer;return{topContainer:e,bottomContainer:n}}});function Vl(t,e){let n=t.plugin(aE),r=n?n.specs.indexOf(e):-1;return r>-1?n.panels[r]:null}const aE=Bt.fromClass(class{constructor(t){this.input=t.state.facet(zl),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(t));let e=t.state.facet(Lb);this.top=new pu(t,!0,e.topContainer),this.bottom=new pu(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(Lb);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new pu(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new pu(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(zl);if(n!=this.input){let r=n.filter(l=>l),i=[],o=[],s=[],a=[];for(let l of r){let c=this.specs.indexOf(l),u;c<0?(u=l(t.view),a.push(u)):(u=this.panels[c],u.update&&u.update(t)),i.push(u),(u.top?o:s).push(u)}this.specs=r,this.panels=i,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 r of this.panels)r.update&&r.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>de.scrollMargins.of(e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});let pu=class{constructor(e,n,r){this.view=e,this.top=n,this.container=r,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=Xb(e);e=e.nextSibling}else this.dom.insertBefore(n.dom,e);for(;e;)e=Xb(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 Xb(t){let e=t.nextSibling;return t.remove(),e}const zl=me.define({enables:aE});class Zi extends Ko{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}Zi.prototype.elementClass="";Zi.prototype.toDOM=void 0;Zi.prototype.mapMode=wn.TrackBefore;Zi.prototype.startSide=Zi.prototype.endSide=-1;Zi.prototype.point=!0;const Gu=me.define(),aZ={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>et.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},Al=me.define();function lZ(t){return[lE(),Al.of(Object.assign(Object.assign({},aZ),t))]}const Gb=me.define({combine:t=>t.some(e=>e)});function lE(t){return[cZ]}const cZ=Bt.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(Al).map(e=>new qb(t,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!t.state.facet(Gb),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,r=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(r<(n.to-n.from)*.8)}t.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(Gb)!=!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=et.iter(this.view.state.facet(Gu),this.view.viewport.from),r=[],i=this.gutters.map(o=>new uZ(o,this.view.viewport,-this.view.documentPadding.top));for(let o of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(o.type)){let s=!0;for(let a of o.type)if(a.type==Wn.Text&&s){H0(n,r,a.from);for(let l of i)l.line(this.view,a,r);s=!1}else if(a.widget)for(let l of i)l.widget(this.view,a)}else if(o.type==Wn.Text){H0(n,r,o.from);for(let s of i)s.line(this.view,o,r)}else if(o.widget)for(let s of i)s.widget(this.view,o);for(let o of i)o.finish();t&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(t){let e=t.startState.facet(Al),n=t.state.facet(Al),r=t.docChanged||t.heightChanged||t.viewportChanged||!et.eq(t.startState.facet(Gu),t.state.facet(Gu),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let i of this.gutters)i.update(t)&&(r=!0);else{r=!0;let i=[];for(let o of n){let s=e.indexOf(o);s<0?i.push(new qb(this.view,o)):(this.gutters[s].update(t),i.push(this.gutters[s]))}for(let o of this.gutters)o.dom.remove(),i.indexOf(o)<0&&o.destroy();for(let o of i)this.dom.appendChild(o.dom);this.gutters=i}return r}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove()}},{provide:t=>de.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 Yb(t){return Array.isArray(t)?t:[t]}function H0(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class uZ{constructor(e,n,r){this.gutter=e,this.height=r,this.i=0,this.cursor=et.iter(e.markers,n.from)}addElement(e,n,r){let{gutter:i}=this,o=(n.top-this.height)/e.scaleY,s=n.height/e.scaleY;if(this.i==i.elements.length){let a=new cE(e,s,o,r);i.elements.push(a),i.dom.appendChild(a.dom)}else i.elements[this.i].update(e,s,o,r);this.height=n.bottom,this.i++}line(e,n,r){let i=[];H0(this.cursor,i,n.from),r.length&&(i=i.concat(r));let o=this.gutter.config.lineMarker(e,n,i);o&&i.unshift(o);let s=this.gutter;i.length==0&&!s.config.renderEmptyElements||this.addElement(e,n,i)}widget(e,n){let r=this.gutter.config.widgetMarker(e,n.widget,n);r&&this.addElement(e,n,[r])}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let n=e.elements.pop();e.dom.removeChild(n.dom),n.destroy()}}}class qb{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 r in n.domEventHandlers)this.dom.addEventListener(r,i=>{let o=i.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=i.clientY;let a=e.lineBlockAtHeight(s-e.documentTop);n.domEventHandlers[r](e,a,i)&&i.preventDefault()});this.markers=Yb(n.markers(e)),n.initialSpacer&&(this.spacer=new cE(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=Yb(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let i=this.config.updateSpacer(this.spacer.markers[0],e);i!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[i])}let r=e.view.viewport;return!et.eq(this.markers,n,r.from,r.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class cE{constructor(e,n,r,i){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,n,r,i)}update(e,n,r,i){this.height!=n&&(this.height=n,this.dom.style.height=n+"px"),this.above!=r&&(this.dom.style.marginTop=(this.above=r)?r+"px":""),fZ(this.markers,i)||this.setMarkers(e,i)}setMarkers(e,n){let r="cm-gutterElement",i=this.dom.firstChild;for(let o=0,s=0;;){let a=s,l=o<n.length?n[o++]:null,c=!1;if(l){let u=l.elementClass;u&&(r+=" "+u);for(let f=s;f<this.markers.length;f++)if(this.markers[f].compare(l)){a=f,c=!0;break}}else a=this.markers.length;for(;s<a;){let u=this.markers[s++];if(u.toDOM){u.destroy(i);let f=i.nextSibling;i.remove(),i=f}}if(!l)break;l.toDOM&&(c?i=i.nextSibling:this.dom.insertBefore(l.toDOM(e),i)),c&&s++}this.dom.className=r,this.markers=n}destroy(){this.setMarkers(null,[])}}function fZ(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].compare(e[n]))return!1;return!0}const dZ=me.define(),Ds=me.define({combine(t){return Ci(t,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,n){let r=Object.assign({},e);for(let i in n){let o=r[i],s=n[i];r[i]=o?(a,l,c)=>o(a,l,c)||s(a,l,c):s}return r}})}});class cp extends Zi{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function up(t,e){return t.state.facet(Ds).formatNumber(e,t.state)}const hZ=Al.compute([Ds],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(dZ)},lineMarker(e,n,r){return r.some(i=>i.toDOM)?null:new cp(up(e,e.state.doc.lineAt(n.from).number))},widgetMarker:()=>null,lineMarkerChange:e=>e.startState.facet(Ds)!=e.state.facet(Ds),initialSpacer(e){return new cp(up(e,Ub(e.state.doc.lines)))},updateSpacer(e,n){let r=up(n.view,Ub(n.view.state.doc.lines));return r==e.number?e:new cp(r)},domEventHandlers:t.facet(Ds).domEventHandlers}));function pZ(t={}){return[Ds.of(t),lE(),hZ]}function Ub(t){let e=9;for(;e<t;)e=e*10+9;return e}const gZ=new class extends Zi{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},mZ=Gu.compute(["selection"],t=>{let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.head).from;i>n&&(n=i,e.push(gZ.range(i)))}return et.of(e)});function OZ(){return mZ}const uE=1024;let xZ=0,Ar=class{constructor(e,n){this.from=e,this.to=n}};class ze{constructor(e={}){this.id=xZ++,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=zn.match(e)),n=>{let r=e(n);return r===void 0?null:[this,r]}}}ze.closedBy=new ze({deserialize:t=>t.split(" ")});ze.openedBy=new ze({deserialize:t=>t.split(" ")});ze.group=new ze({deserialize:t=>t.split(" ")});ze.isolate=new ze({deserialize:t=>{if(t&&t!="rtl"&&t!="ltr"&&t!="auto")throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}});ze.contextHash=new ze({perNode:!0});ze.lookAhead=new ze({perNode:!0});ze.mounted=new ze({perNode:!0});class Ll{constructor(e,n,r){this.tree=e,this.overlay=n,this.parser=r}static get(e){return e&&e.props&&e.props[ze.mounted.id]}}const vZ=Object.create(null);class zn{constructor(e,n,r,i=0){this.name=e,this.props=n,this.id=r,this.flags=i}static define(e){let n=e.props&&e.props.length?Object.create(null):vZ,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new zn(e.name||"",n,e.id,r);if(e.props){for(let o of e.props)if(Array.isArray(o)||(o=o(i)),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 i}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(ze.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let r in e)for(let i of r.split(" "))n[i]=e[r];return r=>{for(let i=r.prop(ze.group),o=-1;o<(i?i.length:0);o++){let s=n[o<0?r.name:i[o]];if(s)return s}}}}zn.none=new zn("",Object.create(null),0,8);class UO{constructor(e){this.types=e;for(let n=0;n<e.length;n++)if(e[n].id!=n)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let n=[];for(let r of this.types){let i=null;for(let o of e){let s=o(r);s&&(i||(i=Object.assign({},r.props)),i[s[0].id]=s[1])}n.push(i?new zn(r.name,i,r.id,r.flags):r)}return new UO(n)}}const gu=new WeakMap,Hb=new WeakMap;var Pt;(function(t){t[t.ExcludeBuffers=1]="ExcludeBuffers",t[t.IncludeAnonymous=2]="IncludeAnonymous",t[t.IgnoreMounts=4]="IgnoreMounts",t[t.IgnoreOverlays=8]="IgnoreOverlays"})(Pt||(Pt={}));class Qt{constructor(e,n,r,i,o){if(this.type=e,this.children=n,this.positions=r,this.length=i,this.props=null,o&&o.length){this.props=Object.create(null);for(let[s,a]of o)this.props[typeof s=="number"?s:s.id]=a}}toString(){let e=Ll.get(this);if(e&&!e.overlay)return e.tree.toString();let n="";for(let r of this.children){let i=r.toString();i&&(n&&(n+=","),n+=i)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(n.length?"("+n+")":""):n}cursor(e=0){return new _f(this.topNode,e)}cursorAt(e,n=0,r=0){let i=gu.get(this)||this.topNode,o=new _f(i);return o.moveTo(e,n),gu.set(this,o._tree),o}get topNode(){return new Rn(this,0,0,null)}resolve(e,n=0){let r=Xl(gu.get(this)||this.topNode,e,n,!1);return gu.set(this,r),r}resolveInner(e,n=0){let r=Xl(Hb.get(this)||this.topNode,e,n,!0);return Hb.set(this,r),r}resolveStack(e,n=0){return SZ(this,e,n)}iterate(e){let{enter:n,leave:r,from:i=0,to:o=this.length}=e,s=e.mode||0,a=(s&Pt.IncludeAnonymous)>0;for(let l=this.cursor(s|Pt.IncludeAnonymous);;){let c=!1;if(l.from<=o&&l.to>=i&&(!a&&l.type.isAnonymous||n(l)!==!1)){if(l.firstChild())continue;c=!0}for(;c&&r&&(a||!l.type.isAnonymous)&&r(l),!l.nextSibling();){if(!l.parent())return;c=!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:KO(zn.none,this.children,this.positions,0,this.children.length,0,this.length,(n,r,i)=>new Qt(this.type,n,r,i,this.propValues),e.makeTree||((n,r,i)=>new Qt(zn.none,n,r,i)))}static build(e){return wZ(e)}}Qt.empty=new Qt(zn.none,[],[],0);class HO{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 HO(this.buffer,this.index)}}class yo{constructor(e,n,r){this.buffer=e,this.length=n,this.set=r}get type(){return zn.none}toString(){let e=[];for(let n=0;n<this.buffer.length;)e.push(this.childString(n)),n=this.buffer[n+3];return e.join(",")}childString(e){let n=this.buffer[e],r=this.buffer[e+3],i=this.set.types[n],o=i.name;if(/\W/.test(o)&&!i.isError&&(o=JSON.stringify(o)),e+=4,r==e)return o;let s=[];for(;e<r;)s.push(this.childString(e)),e=this.buffer[e+3];return o+"("+s.join(",")+")"}findChild(e,n,r,i,o){let{buffer:s}=this,a=-1;for(let l=e;l!=n&&!(fE(o,i,s[l+1],s[l+2])&&(a=l,r>0));l=s[l+3]);return a}slice(e,n,r){let i=this.buffer,o=new Uint16Array(n-e),s=0;for(let a=e,l=0;a<n;){o[l++]=i[a++],o[l++]=i[a++]-r;let c=o[l++]=i[a++]-r;o[l++]=i[a++]-e,s=Math.max(s,c)}return new yo(o,s,this.set)}}function fE(t,e,n,r){switch(t){case-2:return n<e;case-1:return r>=e&&n<e;case 0:return n<e&&r>e;case 1:return n<=e&&r>e;case 2:return r>e;case 4:return!0}}function Xl(t,e,n,r){for(var i;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to<e);){let s=!r&&t instanceof Rn&&t.index<0?null:t.parent;if(!s)return t;t=s}let o=r?0:Pt.IgnoreOverlays;if(r)for(let s=t,a=s.parent;a;s=a,a=s.parent)s instanceof Rn&&s.index<0&&((i=a.enter(e,n,o))===null||i===void 0?void 0:i.from)!=s.from&&(t=a);for(;;){let s=t.enter(e,n,o);if(!s)return t;t=s}}class dE{cursor(e=0){return new _f(this,e)}getChild(e,n=null,r=null){let i=Jb(this,e,n,r);return i.length?i[0]:null}getChildren(e,n=null,r=null){return Jb(this,e,n,r)}resolve(e,n=0){return Xl(this,e,n,!1)}resolveInner(e,n=0){return Xl(this,e,n,!0)}matchContext(e){return J0(this,e)}enterUnfinishedNodesBefore(e){let n=this.childBefore(e),r=this;for(;n;){let i=n.lastChild;if(!i||i.to!=n.to)break;i.type.isError&&i.from==i.to?(r=n,n=i.prevSibling):n=i}return r}get node(){return this}get next(){return this.parent}}class Rn extends dE{constructor(e,n,r,i){super(),this._tree=e,this.from=n,this.index=r,this._parent=i}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,n,r,i,o=0){for(let s=this;;){for(let{children:a,positions:l}=s._tree,c=n>0?a.length:-1;e!=c;e+=n){let u=a[e],f=l[e]+s.from;if(fE(i,r,f,f+u.length)){if(u instanceof yo){if(o&Pt.ExcludeBuffers)continue;let d=u.findChild(0,u.buffer.length,n,r-f,i);if(d>-1)return new li(new yZ(s,u,e,f),null,d)}else if(o&Pt.IncludeAnonymous||!u.type.isAnonymous||JO(u)){let d;if(!(o&Pt.IgnoreMounts)&&(d=Ll.get(u))&&!d.overlay)return new Rn(d.tree,f,e,s);let h=new Rn(u,f,e,s);return o&Pt.IncludeAnonymous||!h.type.isAnonymous?h:h.nextChild(n<0?u.children.length-1:0,n,r,i)}}}if(o&Pt.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,r=0){let i;if(!(r&Pt.IgnoreOverlays)&&(i=Ll.get(this._tree))&&i.overlay){let o=e-this.from;for(let{from:s,to:a}of i.overlay)if((n>0?s<=o:s<o)&&(n<0?a>=o:a>o))return new Rn(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,r)}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 Jb(t,e,n,r){let i=t.cursor(),o=[];if(!i.firstChild())return o;if(n!=null){for(let s=!1;!s;)if(s=i.type.is(n),!i.nextSibling())return o}for(;;){if(r!=null&&i.type.is(r))return o;if(i.type.is(e)&&o.push(i.node),!i.nextSibling())return r==null?o:[]}}function J0(t,e,n=e.length-1){for(let r=t.parent;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[n]&&e[n]!=r.name)return!1;n--}}return!0}class yZ{constructor(e,n,r,i){this.parent=e,this.buffer=n,this.index=r,this.start=i}}class li extends dE{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,r){super(),this.context=e,this._parent=n,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,n,r){let{buffer:i}=this.context,o=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.context.start,r);return o<0?null:new li(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,r=0){if(r&Pt.ExcludeBuffers)return null;let{buffer:i}=this.context,o=i.findChild(this.index+4,i.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return o<0?null:new li(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 li(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 li(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],n=[],{buffer:r}=this.context,i=this.index+4,o=r.buffer[this.index+3];if(o>i){let s=r.buffer[this.index+1];e.push(r.slice(i,o,s)),n.push(0)}return new Qt(this.type,e,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function hE(t){if(!t.length)return null;let e=0,n=t[0];for(let o=1;o<t.length;o++){let s=t[o];(s.from>n.from||s.to<n.to)&&(n=s,e=o)}let r=n instanceof Rn&&n.index<0?null:n.parent,i=t.slice();return r?i[e]=r:i.splice(e,1),new bZ(i,n)}class bZ{constructor(e,n){this.heads=e,this.node=n}get next(){return hE(this.heads)}}function SZ(t,e,n){let r=t.resolveInner(e,n),i=null;for(let o=r instanceof Rn?r:r.context.parent;o;o=o.parent)if(o.index<0){let s=o.parent;(i||(i=[r])).push(s.resolve(e,n)),o=s}else{let s=Ll.get(o.tree);if(s&&s.overlay&&s.overlay[0].from<=e&&s.overlay[s.overlay.length-1].to>=e){let a=new Rn(s.tree,s.overlay[0].from+o.from,-1,o);(i||(i=[r])).push(Xl(a,e,n,!1))}}return i?hE(i):r}class _f{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 Rn)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let r=e._parent;r;r=r._parent)this.stack.unshift(r.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:r,buffer:i}=this.buffer;return this.type=n||i.set.types[i.buffer[e]],this.from=r+i.buffer[e+1],this.to=r+i.buffer[e+2],!0}yield(e){return e?e instanceof Rn?(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,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,r,this.mode));let{buffer:i}=this.buffer,o=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.buffer.start,r);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,r=this.mode){return this.buffer?r&Pt.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Pt.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&Pt.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,r=this.stack.length-1;if(e<0){let i=r<0?0:this.stack[r]+4;if(this.index!=i)return this.yieldBuf(n.findChild(i,this.index,-1,0,4))}else{let i=n.buffer[this.index+3];if(i<(r<0?n.buffer.length:n.buffer[this.stack[r]+3]))return this.yieldBuf(i)}return r<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,r,{buffer:i}=this;if(i){if(e>0){if(this.index<i.buffer.buffer.length)return!1}else for(let o=0;o<this.index;o++)if(i.buffer.buffer[o+3]<this.index)return!1;({index:n,parent:r}=i)}else({index:n,_parent:r}=this._tree);for(;r;{index:n,_parent:r}=r)if(n>-1)for(let o=n+e,s=e<0?-1:r._tree.children.length;o!=s;o+=e){let a=r._tree.children[o];if(this.mode&Pt.IncludeAnonymous||a instanceof yo||!a.type.isAnonymous||JO(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<e))&&this.parent(););for(;this.enterChild(1,e,n););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,n=null,r=0;if(e&&e.context==this.buffer)e:for(let i=this.index,o=this.stack.length;o>=0;){for(let s=e;s;s=s._parent)if(s.index==i){if(i==this.index)return s;n=s,r=o+1;break e}i=this.stack[--o]}for(let i=r;i<this.stack.length;i++)n=new li(this.buffer,n,this.stack[i]);return this.bufferNode=new li(this.buffer,n,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,n){for(let r=0;;){let i=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){r++;continue}this.type.isAnonymous||(i=!0)}for(;i&&n&&n(this),i=this.type.isAnonymous,!this.nextSibling();){if(!r)return;this.parent(),r--,i=!0}}}matchContext(e){if(!this.buffer)return J0(this.node,e);let{buffer:n}=this.buffer,{types:r}=n.set;for(let i=e.length-1,o=this.stack.length-1;i>=0;o--){if(o<0)return J0(this.node,e,i);let s=r[n.buffer[this.stack[o]]];if(!s.isAnonymous){if(e[i]&&e[i]!=s.name)return!1;i--}}return!0}}function JO(t){return t.children.some(e=>e instanceof yo||!e.type.isAnonymous||JO(e))}function wZ(t){var e;let{buffer:n,nodeSet:r,maxBufferLength:i=uE,reused:o=[],minRepeatType:s=r.types.length}=t,a=Array.isArray(n)?new HO(n,n.length):n,l=r.types,c=0,u=0;function f(b,w,C,k,I,A){let{id:E,start:$,end:R,size:M}=a,Q=u;for(;M<0;)if(a.next(),M==-1){let Y=o[E];C.push(Y),k.push($-b);return}else if(M==-3){c=E;return}else if(M==-4){u=E;return}else throw new RangeError(`Unrecognized record size: ${M}`);let Z=l[E],G,V,ee=$-b;if(R-$<=i&&(V=m(a.pos-w,I))){let Y=new Uint16Array(V.size-V.skip),z=a.pos-V.size,D=Y.length;for(;a.pos>z;)D=x(V.start,Y,D);G=new yo(Y,R-V.start,r),ee=V.start-b}else{let Y=a.pos-M;a.next();let z=[],D=[],B=E>=s?E:-1,N=0,U=R;for(;a.pos>Y;)B>=0&&a.id==B&&a.size>=0?(a.end<=U-i&&(p(z,D,$,N,a.end,U,B,Q),N=z.length,U=a.end),a.next()):A>2500?d($,Y,z,D):f($,Y,z,D,B,A+1);if(B>=0&&N>0&&N<z.length&&p(z,D,$,N,$,U,B,Q),z.reverse(),D.reverse(),B>-1&&N>0){let F=h(Z);G=KO(Z,z,D,0,z.length,0,R-$,F,F)}else G=O(Z,z,D,R-$,Q-R)}C.push(G),k.push(ee)}function d(b,w,C,k){let I=[],A=0,E=-1;for(;a.pos>w;){let{id:$,start:R,end:M,size:Q}=a;if(Q>4)a.next();else{if(E>-1&&R<E)break;E<0&&(E=M-i),I.push($,R,M),A++,a.next()}}if(A){let $=new Uint16Array(A*4),R=I[I.length-2];for(let M=I.length-3,Q=0;M>=0;M-=3)$[Q++]=I[M],$[Q++]=I[M+1]-R,$[Q++]=I[M+2]-R,$[Q++]=Q;C.push(new yo($,I[2]-R,r)),k.push(R-b)}}function h(b){return(w,C,k)=>{let I=0,A=w.length-1,E,$;if(A>=0&&(E=w[A])instanceof Qt){if(!A&&E.type==b&&E.length==k)return E;($=E.prop(ze.lookAhead))&&(I=C[A]+E.length+$)}return O(b,w,C,k,I)}}function p(b,w,C,k,I,A,E,$){let R=[],M=[];for(;b.length>k;)R.push(b.pop()),M.push(w.pop()+C-I);b.push(O(r.types[E],R,M,A-I,$-A)),w.push(I-C)}function O(b,w,C,k,I=0,A){if(c){let E=[ze.contextHash,c];A=A?[E].concat(A):[E]}if(I>25){let E=[ze.lookAhead,I];A=A?[E].concat(A):[E]}return new Qt(b,w,C,k,A)}function m(b,w){let C=a.fork(),k=0,I=0,A=0,E=C.end-i,$={size:0,start:0,skip:0};e:for(let R=C.pos-b;C.pos>R;){let M=C.size;if(C.id==w&&M>=0){$.size=k,$.start=I,$.skip=A,A+=4,k+=4,C.next();continue}let Q=C.pos-M;if(M<0||Q<R||C.start<E)break;let Z=C.id>=s?4:0,G=C.start;for(C.next();C.pos>Q;){if(C.size<0)if(C.size==-3)Z+=4;else break e;else C.id>=s&&(Z+=4);C.next()}I=G,k+=M,A+=Z}return(w<0||k==b)&&($.size=k,$.start=I,$.skip=A),$.size>4?$:void 0}function x(b,w,C){let{id:k,start:I,end:A,size:E}=a;if(a.next(),E>=0&&k<s){let $=C;if(E>4){let R=a.pos-(E-4);for(;a.pos>R;)C=x(b,w,C)}w[--C]=$,w[--C]=A-b,w[--C]=I-b,w[--C]=k}else E==-3?c=k:E==-4&&(u=k);return C}let v=[],y=[];for(;a.pos>0;)f(t.start||0,t.bufferStart||0,v,y,-1,0);let S=(e=t.length)!==null&&e!==void 0?e:v.length?y[0]+v[0].length:0;return new Qt(l[t.topID],v.reverse(),y.reverse(),S)}const Kb=new WeakMap;function Yu(t,e){if(!t.isAnonymous||e instanceof yo||e.type!=t)return 1;let n=Kb.get(e);if(n==null){n=1;for(let r of e.children){if(r.type!=t||!(r instanceof Qt)){n=1;break}n+=Yu(t,r)}Kb.set(e,n)}return n}function KO(t,e,n,r,i,o,s,a,l){let c=0;for(let p=r;p<i;p++)c+=Yu(t,e[p]);let u=Math.ceil(c*1.5/8),f=[],d=[];function h(p,O,m,x,v){for(let y=m;y<x;){let S=y,b=O[y],w=Yu(t,p[y]);for(y++;y<x;y++){let C=Yu(t,p[y]);if(w+C>=u)break;w+=C}if(y==S+1){if(w>u){let C=p[S];h(C.children,C.positions,0,C.children.length,O[S]+v);continue}f.push(p[S])}else{let C=O[y-1]+p[y-1].length-b;f.push(KO(t,p,O,S,y,b,C,null,l))}d.push(b+v-o)}}return h(e,n,r,i,0),(a||l)(f,d,s)}class pE{constructor(){this.map=new WeakMap}setBuffer(e,n,r){let i=this.map.get(e);i||this.map.set(e,i=new Map),i.set(n,r)}getBuffer(e,n){let r=this.map.get(e);return r&&r.get(n)}set(e,n){e instanceof li?this.setBuffer(e.context.buffer,e.index,n):e instanceof Rn&&this.map.set(e.tree,n)}get(e){return e instanceof li?this.getBuffer(e.context.buffer,e.index):e instanceof Rn?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 Bi{constructor(e,n,r,i,o=!1,s=!1){this.from=e,this.to=n,this.tree=r,this.offset=i,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=[],r=!1){let i=[new Bi(0,e.length,e,0,!1,r)];for(let o of n)o.to>e.length&&i.push(o);return i}static applyChanges(e,n,r=128){if(!n.length)return e;let i=[],o=1,s=e.length?e[0]:null;for(let a=0,l=0,c=0;;a++){let u=a<n.length?n[a]:null,f=u?u.fromA:1e9;if(f-l>=r)for(;s&&s.from<f;){let d=s;if(l>=d.from||f<=d.to||c){let h=Math.max(d.from,l)-c,p=Math.min(d.to,f)-c;d=h>=p?null:new Bi(h,p,d.tree,d.offset+c,a>0,!!u)}if(d&&i.push(d),s.to>f)break;s=o<e.length?e[o++]:null}if(!u)break;l=u.toA,c=u.toA-u.toB}return i}}let gE=class{startParse(e,n,r){return typeof e=="string"&&(e=new CZ(e)),r=r?r.length?r.map(i=>new Ar(i.from,i.to)):[new Ar(0,0)]:[new Ar(0,e.length)],this.createParse(e,n||[],r)}parse(e,n,r){let i=this.startParse(e,n,r);for(;;){let o=i.advance();if(o)return o}}};class CZ{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 kZ(t){return(e,n,r,i)=>new PZ(e,t,n,r,i)}class e1{constructor(e,n,r,i,o){this.parser=e,this.parse=n,this.overlay=r,this.target=i,this.from=o}}function t1(t){if(!t.length||t.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(t))}class AZ{constructor(e,n,r,i,o,s,a){this.parser=e,this.predicate=n,this.mounts=r,this.index=i,this.start=o,this.target=s,this.prev=a,this.depth=0,this.ranges=[]}}const K0=new ze({perNode:!0});class PZ{constructor(e,n,r,i,o){this.nest=n,this.input=r,this.fragments=i,this.ranges=o,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let r=this.baseParse.advance();if(!r)return null;if(this.baseParse=null,this.baseTree=r,this.startInner(),this.stoppedAt!=null)for(let i of this.inner)i.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let r=this.baseTree;return this.stoppedAt!=null&&(r=new Qt(r.type,r.children,r.positions,r.length,r.propValues.concat([[K0,this.stoppedAt]]))),r}let e=this.inner[this.innerDone],n=e.parse.advance();if(n){this.innerDone++;let r=Object.assign(Object.create(null),e.target.props);r[ze.mounted.id]=new Ll(n,e.overlay,e.parser),e.target.props=r}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let n=this.innerDone;n<this.inner.length;n++)this.inner[n].from<e&&(e=Math.min(e,this.inner[n].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let n=this.innerDone;n<this.inner.length;n++)this.inner[n].parse.stopAt(e)}startInner(){let e=new TZ(this.fragments),n=null,r=null,i=new _f(new Rn(this.baseTree,this.ranges[0].from,0,null),Pt.IncludeAnonymous|Pt.IgnoreMounts);e:for(let o,s;;){let a=!0,l;if(this.stoppedAt!=null&&i.from>=this.stoppedAt)a=!1;else if(e.hasNode(i)){if(n){let c=n.mounts.find(u=>u.frag.from<=i.from&&u.frag.to>=i.to&&u.mount.overlay);if(c)for(let u of c.mount.overlay){let f=u.from+c.pos,d=u.to+c.pos;f>=i.from&&d<=i.to&&!n.ranges.some(h=>h.from<d&&h.to>f)&&n.ranges.push({from:f,to:d})}}a=!1}else if(r&&(s=EZ(r.ranges,i.from,i.to)))a=s!=2;else if(!i.type.isAnonymous&&(o=this.nest(i,this.input))&&(i.from<i.to||!o.overlay)){i.tree||IZ(i);let c=e.findMounts(i.from,o.parser);if(typeof o.overlay=="function")n=new AZ(o.parser,o.overlay,c,this.inner.length,i.from,i.tree,n);else{let u=i1(this.ranges,o.overlay||(i.from<i.to?[new Ar(i.from,i.to)]:[]));u.length&&t1(u),(u.length||!o.overlay)&&this.inner.push(new e1(o.parser,u.length?o.parser.startParse(this.input,o1(c,u),u):o.parser.startParse(""),o.overlay?o.overlay.map(f=>new Ar(f.from-i.from,f.to-i.from)):null,i.tree,u.length?u[0].from:i.from)),o.overlay?u.length&&(r={ranges:u,depth:0,prev:r}):a=!1}}else n&&(l=n.predicate(i))&&(l===!0&&(l=new Ar(i.from,i.to)),l.from<l.to&&n.ranges.push(l));if(a&&i.firstChild())n&&n.depth++,r&&r.depth++;else for(;!i.nextSibling();){if(!i.parent())break e;if(n&&!--n.depth){let c=i1(this.ranges,n.ranges);c.length&&(t1(c),this.inner.splice(n.index,0,new e1(n.parser,n.parser.startParse(this.input,o1(n.mounts,c),c),n.ranges.map(u=>new Ar(u.from-n.start,u.to-n.start)),n.target,c[0].from))),n=n.prev}r&&!--r.depth&&(r=r.prev)}}}}function EZ(t,e,n){for(let r of t){if(r.from>=n)break;if(r.to>e)return r.from<=e&&r.to>=n?2:1}return 0}function n1(t,e,n,r,i,o){if(e<n){let s=t.buffer[e+1];r.push(t.slice(e,n,s)),i.push(s-o)}}function IZ(t){let{node:e}=t,n=[],r=e.context.buffer;do n.push(t.index),t.parent();while(!t.tree);let i=t.tree,o=i.children.indexOf(r),s=i.children[o],a=s.buffer,l=[o];function c(u,f,d,h,p,O){let m=n[O],x=[],v=[];n1(s,u,m,x,v,h);let y=a[m+1],S=a[m+2];l.push(x.length);let b=O?c(m+4,a[m+3],s.set.types[a[m]],y,S-y,O-1):e.toTree();return x.push(b),v.push(y-h),n1(s,a[m+3],f,x,v,h),new Qt(d,x,v,p)}i.children[o]=c(0,a.length,zn.none,0,s.length,n.length-1);for(let u of l){let f=t.tree.children[u],d=t.tree.positions[u];t.yield(new Rn(f,d+t.from,u,t._tree))}}class r1{constructor(e,n){this.offset=n,this.done=!1,this.cursor=e.cursor(Pt.IncludeAnonymous|Pt.IgnoreMounts)}moveTo(e){let{cursor:n}=this,r=e-this.offset;for(;!this.done&&n.from<r;)n.to>=e&&n.enter(r,1,Pt.IgnoreOverlays|Pt.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 Qt)n=n.children[0];else break}return!1}}let TZ=class{constructor(e){var n;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let r=this.curFrag=e[0];this.curTo=(n=r.tree.prop(K0))!==null&&n!==void 0?n:r.to,this.inner=new r1(r.tree,-r.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(K0))!==null&&e!==void 0?e:n.to,this.inner=new r1(n.tree,-n.offset)}}findMounts(e,n){var r;let i=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let o=this.inner.cursor.node;o;o=o.parent){let s=(r=o.tree)===null||r===void 0?void 0:r.prop(ze.mounted);if(s&&s.parser==n)for(let a=this.fragI;a<this.fragments.length;a++){let l=this.fragments[a];if(l.from>=o.to)break;l.tree==this.curFrag.tree&&i.push({frag:l,pos:o.from-l.offset,mount:s})}}}return i}};function i1(t,e){let n=null,r=e;for(let i=1,o=0;i<t.length;i++){let s=t[i-1].to,a=t[i].from;for(;o<r.length;o++){let l=r[o];if(l.from>=a)break;l.to<=s||(n||(r=n=e.slice()),l.from<s?(n[o]=new Ar(l.from,s),l.to>a&&n.splice(o+1,0,new Ar(a,l.to))):l.to>a?n[o--]=new Ar(a,l.to):n.splice(o--,1))}}return r}function $Z(t,e,n,r){let i=0,o=0,s=!1,a=!1,l=-1e9,c=[];for(;;){let u=i==t.length?1e9:s?t[i].to:t[i].from,f=o==e.length?1e9:a?e[o].to:e[o].from;if(s!=a){let d=Math.max(l,n),h=Math.min(u,f,r);d<h&&c.push(new Ar(d,h))}if(l=Math.min(u,f),l==1e9)break;u==l&&(s?(s=!1,i++):s=!0),f==l&&(a?(a=!1,o++):a=!0)}return c}function o1(t,e){let n=[];for(let{pos:r,mount:i,frag:o}of t){let s=r+(i.overlay?i.overlay[0].from:0),a=s+i.tree.length,l=Math.max(o.from,s),c=Math.min(o.to,a);if(i.overlay){let u=i.overlay.map(d=>new Ar(d.from+r,d.to+r)),f=$Z(e,u,l,c);for(let d=0,h=l;;d++){let p=d==f.length,O=p?c:f[d].from;if(O>h&&n.push(new Bi(h,O,i.tree,-s,o.from>=h||o.openStart,o.to<=O||o.openEnd)),p)break;h=f[d].to}}else n.push(new Bi(l,c,i.tree,-s,o.from>=s||o.openStart,o.to<=a||o.openEnd))}return n}let jZ=0,Ji=class mE{constructor(e,n,r){this.set=e,this.base=n,this.modified=r,this.id=jZ++}static define(e){if(e!=null&&e.base)throw new Error("Can not derive from a modified tag");let n=new mE([],null,[]);if(n.set.push(n),e)for(let r of e.set)n.set.push(r);return n}static defineModifier(){let e=new Mf;return n=>n.modified.indexOf(e)>-1?n:Mf.get(n.base||n,n.modified.concat(e).sort((r,i)=>r.id-i.id))}},RZ=0;class Mf{constructor(){this.instances=[],this.id=RZ++}static get(e,n){if(!n.length)return e;let r=n[0].instances.find(a=>a.base==e&&DZ(n,a.modified));if(r)return r;let i=[],o=new Ji(i,e,n);for(let a of n)a.instances.push(o);let s=QZ(n);for(let a of e.set)if(!a.modified.length)for(let l of s)i.push(Mf.get(a,l));return o}}function DZ(t,e){return t.length==e.length&&t.every((n,r)=>n==e[r])}function QZ(t){let e=[[]];for(let n=0;n<t.length;n++)for(let r=0,i=e.length;r<i;r++)e.push(e[r].concat(t[n]));return e.sort((n,r)=>r.length-n.length)}function ja(t){let e=Object.create(null);for(let n in t){let r=t[n];Array.isArray(r)||(r=[r]);for(let i of n.split(" "))if(i){let o=[],s=2,a=i;for(let f=0;;){if(a=="..."&&f>0&&f+3==i.length){s=1;break}let d=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!d)throw new RangeError("Invalid path: "+i);if(o.push(d[0]=="*"?"":d[0][0]=='"'?JSON.parse(d[0]):d[0]),f+=d[0].length,f==i.length)break;let h=i[f++];if(f==i.length&&h=="!"){s=0;break}if(h!="/")throw new RangeError("Invalid path: "+i);a=i.slice(f)}let l=o.length-1,c=o[l];if(!c)throw new RangeError("Invalid path: "+i);let u=new Nf(r,s,l>0?o.slice(0,l):null);e[c]=u.sort(e[c])}}return OE.add(e)}const OE=new ze;class Nf{constructor(e,n,r,i){this.tags=e,this.mode=n,this.context=r,this.next=i}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}Nf.empty=new Nf([],2,null);function xE(t,e){let n=Object.create(null);for(let o of t)if(!Array.isArray(o.tag))n[o.tag.id]=o.class;else for(let s of o.tag)n[s.id]=o.class;let{scope:r,all:i=null}=e||{};return{style:o=>{let s=i;for(let a of o)for(let l of a.set){let c=n[l.id];if(c){s=s?s+" "+c:c;break}}return s},scope:r}}function BZ(t,e){let n=null;for(let r of t){let i=r.style(e);i&&(n=n?n+" "+i:i)}return n}function _Z(t,e,n,r=0,i=t.length){let o=new MZ(r,Array.isArray(e)?e:[e],n);o.highlightRange(t.cursor(),r,i,"",o.highlighters),o.flush(i)}class MZ{constructor(e,n,r){this.at=e,this.highlighters=n,this.span=r,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,r,i,o){let{type:s,from:a,to:l}=e;if(a>=r||l<=n)return;s.isTop&&(o=this.highlighters.filter(h=>!h.scope||h.scope(s)));let c=i,u=NZ(e)||Nf.empty,f=BZ(o,u.tags);if(f&&(c&&(c+=" "),c+=f,u.mode==1&&(i+=(i?" ":"")+f)),this.startSpan(Math.max(n,a),c),u.opaque)return;let d=e.tree&&e.tree.prop(ze.mounted);if(d&&d.overlay){let h=e.node.enter(d.overlay[0].from+a,1),p=this.highlighters.filter(m=>!m.scope||m.scope(d.tree.type)),O=e.firstChild();for(let m=0,x=a;;m++){let v=m<d.overlay.length?d.overlay[m]:null,y=v?v.from+a:l,S=Math.max(n,x),b=Math.min(r,y);if(S<b&&O)for(;e.from<b&&(this.highlightRange(e,S,b,i,o),this.startSpan(Math.min(b,e.to),c),!(e.to>=y||!e.nextSibling())););if(!v||y>r)break;x=v.to+a,x>n&&(this.highlightRange(h.cursor(),Math.max(n,v.from+a),Math.min(r,x),"",p),this.startSpan(Math.min(r,x),c))}O&&e.parent()}else if(e.firstChild()){d&&(i="");do if(!(e.to<=n)){if(e.from>=r)break;this.highlightRange(e,n,r,i,o),this.startSpan(Math.min(r,e.to),c)}while(e.nextSibling());e.parent()}}}function NZ(t){let e=t.type.prop(OE);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const fe=Ji.define,mu=fe(),Ki=fe(),s1=fe(Ki),a1=fe(Ki),eo=fe(),Ou=fe(eo),fp=fe(eo),ni=fe(),Mo=fe(ni),ei=fe(),ti=fe(),em=fe(),Ka=fe(em),xu=fe(),P={comment:mu,lineComment:fe(mu),blockComment:fe(mu),docComment:fe(mu),name:Ki,variableName:fe(Ki),typeName:s1,tagName:fe(s1),propertyName:a1,attributeName:fe(a1),className:fe(Ki),labelName:fe(Ki),namespace:fe(Ki),macroName:fe(Ki),literal:eo,string:Ou,docString:fe(Ou),character:fe(Ou),attributeValue:fe(Ou),number:fp,integer:fe(fp),float:fe(fp),bool:fe(eo),regexp:fe(eo),escape:fe(eo),color:fe(eo),url:fe(eo),keyword:ei,self:fe(ei),null:fe(ei),atom:fe(ei),unit:fe(ei),modifier:fe(ei),operatorKeyword:fe(ei),controlKeyword:fe(ei),definitionKeyword:fe(ei),moduleKeyword:fe(ei),operator:ti,derefOperator:fe(ti),arithmeticOperator:fe(ti),logicOperator:fe(ti),bitwiseOperator:fe(ti),compareOperator:fe(ti),updateOperator:fe(ti),definitionOperator:fe(ti),typeOperator:fe(ti),controlOperator:fe(ti),punctuation:em,separator:fe(em),bracket:Ka,angleBracket:fe(Ka),squareBracket:fe(Ka),paren:fe(Ka),brace:fe(Ka),content:ni,heading:Mo,heading1:fe(Mo),heading2:fe(Mo),heading3:fe(Mo),heading4:fe(Mo),heading5:fe(Mo),heading6:fe(Mo),contentSeparator:fe(ni),list:fe(ni),quote:fe(ni),emphasis:fe(ni),strong:fe(ni),link:fe(ni),monospace:fe(ni),strikethrough:fe(ni),inserted:fe(),deleted:fe(),changed:fe(),invalid:fe(),meta:xu,documentMeta:fe(xu),annotation:fe(xu),processingInstruction:fe(xu),definition:Ji.defineModifier(),constant:Ji.defineModifier(),function:Ji.defineModifier(),standard:Ji.defineModifier(),local:Ji.defineModifier(),special:Ji.defineModifier()};xE([{tag:P.link,class:"tok-link"},{tag:P.heading,class:"tok-heading"},{tag:P.emphasis,class:"tok-emphasis"},{tag:P.strong,class:"tok-strong"},{tag:P.keyword,class:"tok-keyword"},{tag:P.atom,class:"tok-atom"},{tag:P.bool,class:"tok-bool"},{tag:P.url,class:"tok-url"},{tag:P.labelName,class:"tok-labelName"},{tag:P.inserted,class:"tok-inserted"},{tag:P.deleted,class:"tok-deleted"},{tag:P.literal,class:"tok-literal"},{tag:P.string,class:"tok-string"},{tag:P.number,class:"tok-number"},{tag:[P.regexp,P.escape,P.special(P.string)],class:"tok-string2"},{tag:P.variableName,class:"tok-variableName"},{tag:P.local(P.variableName),class:"tok-variableName tok-local"},{tag:P.definition(P.variableName),class:"tok-variableName tok-definition"},{tag:P.special(P.variableName),class:"tok-variableName2"},{tag:P.definition(P.propertyName),class:"tok-propertyName tok-definition"},{tag:P.typeName,class:"tok-typeName"},{tag:P.namespace,class:"tok-namespace"},{tag:P.className,class:"tok-className"},{tag:P.macroName,class:"tok-macroName"},{tag:P.propertyName,class:"tok-propertyName"},{tag:P.operator,class:"tok-operator"},{tag:P.comment,class:"tok-comment"},{tag:P.meta,class:"tok-meta"},{tag:P.invalid,class:"tok-invalid"},{tag:P.punctuation,class:"tok-punctuation"}]);var dp;const Qs=new ze;function vE(t){return me.define({combine:t?e=>e.concat(t):void 0})}const ex=new ze;class Wr{constructor(e,n,r=[],i=""){this.data=e,this.name=i,Ue.prototype.hasOwnProperty("tree")||Object.defineProperty(Ue.prototype,"tree",{get(){return Dt(this)}}),this.parser=n,this.extension=[So.of(this),Ue.languageData.of((o,s,a)=>{let l=l1(o,s,a),c=l.type.prop(Qs);if(!c)return[];let u=o.facet(c),f=l.type.prop(ex);if(f){let d=l.resolve(s-l.from,a);for(let h of f)if(h.test(d,o)){let p=o.facet(h.facet);return h.type=="replace"?p:p.concat(u)}}return u})].concat(r)}isActiveAt(e,n,r=-1){return l1(e,n,r).type.prop(Qs)==this.data}findRegions(e){let n=e.facet(So);if((n==null?void 0:n.data)==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let r=[],i=(o,s)=>{if(o.prop(Qs)==this.data){r.push({from:s,to:s+o.length});return}let a=o.prop(ze.mounted);if(a){if(a.tree.prop(Qs)==this.data){if(a.overlay)for(let l of a.overlay)r.push({from:l.from+s,to:l.to+s});else r.push({from:s,to:s+o.length});return}else if(a.overlay){let l=r.length;if(i(a.tree,a.overlay[0].from+s),r.length>l)return}}for(let l=0;l<o.children.length;l++){let c=o.children[l];c instanceof Qt&&i(c,o.positions[l]+s)}};return i(Dt(e),0),r}get allowsNesting(){return!0}}Wr.setState=_e.define();function l1(t,e,n){let r=t.facet(So),i=Dt(t).topNode;if(!r||r.allowsNesting)for(let o=i;o;o=o.enter(e,n,Pt.ExcludeBuffers))o.type.isTop&&(i=o);return i}class bo extends Wr{constructor(e,n,r){super(e,n,[],r),this.parser=n}static define(e){let n=vE(e.languageData);return new bo(n,e.parser.configure({props:[Qs.add(r=>r.isTop?n:void 0)]}),e.name)}configure(e,n){return new bo(this.data,this.parser.configure(e),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function Dt(t){let e=t.field(Wr.state,!1);return e?e.tree:Qt.empty}class FZ{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 r=this.cursorPos-this.string.length;return e<r||n>=this.cursorPos?this.doc.sliceString(e,n):this.string.slice(e-r,n-r)}}let el=null;class Ff{constructor(e,n,r=[],i,o,s,a,l){this.parser=e,this.state=n,this.fragments=r,this.tree=i,this.treeLen=o,this.viewport=s,this.skipped=a,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(e,n,r){return new Ff(e,n,[],Qt.empty,0,r,[],null)}startParse(){return this.parser.startParse(new FZ(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=Qt.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if(typeof e=="number"){let i=Date.now()+e;e=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n<this.state.doc.length&&this.parse.stopAt(n);;){let i=this.parse.advance();if(i)if(this.fragments=this.withoutTempSkipped(Bi.addTree(i,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(r=this.parse.stoppedAt)!==null&&r!==void 0?r:this.state.doc.length,this.tree=i,this.parse=null,this.treeLen<(n??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,n;this.parse&&(e=this.parse.parsedPos)>=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(Bi.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=el;el=this;try{return e()}finally{el=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=c1(e,n.from,n.to);return e}changes(e,n){let{fragments:r,tree:i,treeLen:o,viewport:s,skipped:a}=this;if(this.takeTree(),!e.empty){let l=[];if(e.iterChangedRanges((c,u,f,d)=>l.push({fromA:c,toA:u,fromB:f,toB:d})),r=Bi.applyChanges(r,l),i=Qt.empty,o=0,s={from:e.mapPos(s.from,-1),to:e.mapPos(s.to,1)},this.skipped.length){a=[];for(let c of this.skipped){let u=e.mapPos(c.from,1),f=e.mapPos(c.to,-1);u<f&&a.push({from:u,to:f})}}}return new Ff(this.parser,n,r,i,o,s,a,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let n=this.skipped.length;for(let r=0;r<this.skipped.length;r++){let{from:i,to:o}=this.skipped[r];i<e.to&&o>e.from&&(this.fragments=c1(this.fragments,i,o),this.skipped.splice(r--,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 gE{createParse(n,r,i){let o=i[0].from,s=i[i.length-1].to;return{parsedPos:o,advance(){let l=el;if(l){for(let c of i)l.tempSkipped.push(c);e&&(l.scheduleOn=l.scheduleOn?Promise.all([l.scheduleOn,e]):e)}return this.parsedPos=s,new Qt(zn.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 el}}function c1(t,e,n){return Bi.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class fa{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),r=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,r)||n.takeTree(),new fa(n)}static init(e){let n=Math.min(3e3,e.doc.length),r=Ff.create(e.facet(So).parser,e,{from:0,to:n});return r.work(20,n)||r.takeTree(),new fa(r)}}Wr.state=ln.define({create:fa.init,update(t,e){for(let n of e.effects)if(n.is(Wr.setState))return n.value;return e.startState.facet(So)!=e.state.facet(So)?fa.init(e.state):t.apply(e)}});let yE=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(yE=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:400})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const hp=typeof navigator<"u"&&(!((dp=navigator.scheduling)===null||dp===void 0)&&dp.isInputPending)?()=>navigator.scheduling.isInputPending():null,ZZ=Bt.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(Wr.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(Wr.state);(n.tree!=n.context.tree||!n.context.isDone(e.doc.length))&&(this.working=yE(this.work))}work(e){this.working=null;let n=Date.now();if(this.chunkEnd<n&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=n+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:r,viewport:{to:i}}=this.view,o=r.field(Wr.state);if(o.tree==o.context.tree&&o.context.isDone(i+1e5))return;let s=Date.now()+Math.min(this.chunkBudget,100,e&&!hp?Math.max(25,e.timeRemaining()-5):1e9),a=o.context.treeLen<i&&r.doc.length>i+1e3,l=o.context.work(()=>hp&&hp()||Date.now()>s,i+(a?0:1e5));this.chunkBudget-=Date.now()-n,(l||this.chunkBudget<=0)&&(o.context.takeTree(),this.view.dispatch({effects:Wr.setState.of(new fa(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=>Zn(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()}}}),So=me.define({combine(t){return t.length?t[0]:null},enables:t=>[Wr.state,ZZ,de.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]});class mc{constructor(e,n=[]){this.language=e,this.support=n,this.extension=[e,n]}}const WZ=me.define(),Oc=me.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 Zf(t){let e=t.facet(Oc);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function Gl(t,e){let n="",r=t.tabSize,i=t.facet(Oc)[0];if(i==" "){for(;e>=r;)n+=" ",e-=r;i=" "}for(let o=0;o<e;o++)n+=i;return n}function tx(t,e){t instanceof Ue&&(t=new Yd(t));for(let r of t.state.facet(WZ)){let i=r(t,e);if(i!==void 0)return i}let n=Dt(t.state);return n.length>=e?VZ(t,n,e):null}class Yd{constructor(e,n={}){this.state=e,this.options=n,this.unit=Zf(e)}lineAt(e,n=1){let r=this.state.doc.lineAt(e),{simulateBreak:i,simulateDoubleBreak:o}=this.options;return i!=null&&i>=r.from&&i<=r.to?o&&i==e?{text:"",from:e}:(n<0?i<e:i<=e)?{text:r.text.slice(i-r.from),from:i}:{text:r.text.slice(0,i-r.from),from:r.from}:r}textAfterPos(e,n=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:r,from:i}=this.lineAt(e,n);return r.slice(e-i,Math.min(r.length,e+100-i))}column(e,n=1){let{text:r,from:i}=this.lineAt(e,n),o=this.countColumn(r,e-i),s=this.options.overrideIndentation?this.options.overrideIndentation(i):-1;return s>-1&&(o+=s-this.countColumn(r,r.search(/\S|$/))),o}countColumn(e,n=e.length){return Ta(e,this.state.tabSize,n)}lineIndent(e,n=1){let{text:r,from:i}=this.lineAt(e,n),o=this.options.overrideIndentation;if(o){let s=o(i);if(s>-1)return s}return this.countColumn(r,r.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const Ra=new ze;function VZ(t,e,n){let r=e.resolveStack(n),i=r.node.enterUnfinishedNodesBefore(n);if(i!=r.node){let o=[];for(let s=i;s!=r.node;s=s.parent)o.push(s);for(let s=o.length-1;s>=0;s--)r={node:o[s],next:r}}return bE(r,t,n)}function bE(t,e,n){for(let r=t;r;r=r.next){let i=LZ(r.node);if(i)return i(nx.create(e,n,r))}return 0}function zZ(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function LZ(t){let e=t.type.prop(Ra);if(e)return e;let n=t.firstChild,r;if(n&&(r=n.type.prop(ze.closedBy))){let i=t.lastChild,o=i&&r.indexOf(i.name)>-1;return s=>SE(s,!0,1,void 0,o&&!zZ(s)?i.from:void 0)}return t.parent==null?XZ:null}function XZ(){return 0}class nx extends Yd{constructor(e,n,r){super(e.state,e.options),this.base=e,this.pos=n,this.context=r}get node(){return this.context.node}static create(e,n,r){return new nx(e,n,r)}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 r=e.resolve(n.from);for(;r.parent&&r.parent.from==r.from;)r=r.parent;if(GZ(r,e))break;n=this.state.doc.lineAt(r.from)}return this.lineIndent(n.from)}continue(){return bE(this.context.next,this.base,this.pos)}}function GZ(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function YZ(t){let e=t.node,n=e.childAfter(e.from),r=e.lastChild;if(!n)return null;let i=t.options.simulateBreak,o=t.state.doc.lineAt(n.from),s=i==null||i<=o.from?o.to:Math.min(o.to,i);for(let a=n.to;;){let l=e.childAfter(a);if(!l||l==r)return null;if(!l.type.isSkipped)return l.from<s?n:null;a=l.to}}function qZ({closing:t,align:e=!0,units:n=1}){return r=>SE(r,e,n,t)}function SE(t,e,n,r,i){let o=t.textAfter,s=o.match(/^\s*/)[0].length,a=r&&o.slice(s,s+r.length)==r||i==t.pos+s,l=e?YZ(t):null;return l?a?t.column(l.from):t.column(l.to):t.baseIndent+(a?0:t.unit*n)}const UZ=t=>t.baseIndent;function qs({except:t,units:e=1}={}){return n=>{let r=t&&t.test(n.textAfter);return n.baseIndent+(r?0:e*n.unit)}}const HZ=200;function JZ(){return Ue.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:r}=t.newSelection.main,i=n.lineAt(r);if(r>i.from+HZ)return t;let o=n.sliceString(i.from,r);if(!e.some(c=>c.test(o)))return t;let{state:s}=t,a=-1,l=[];for(let{head:c}of s.selection.ranges){let u=s.doc.lineAt(c);if(u.from==a)continue;a=u.from;let f=tx(s,u.from);if(f==null)continue;let d=/^\s*/.exec(u.text)[0],h=Gl(s,f);d!=h&&l.push({from:u.from,to:u.from+d.length,insert:h})}return l.length?[t,{changes:l,sequential:!0}]:t})}const KZ=me.define(),Da=new ze;function rx(t){let e=t.firstChild,n=t.lastChild;return e&&e.to<n.from?{from:e.to,to:n.type.isError?t.to:n.from}:null}function e6(t,e,n){let r=Dt(t);if(r.length<n)return null;let i=r.resolveStack(n,1),o=null;for(let s=i;s;s=s.next){let a=s.node;if(a.to<=n||a.from>n)continue;if(o&&a.from<e)break;let l=a.type.prop(Da);if(l&&(a.to<r.length-50||r.length==t.doc.length||!t6(a))){let c=l(a,t);c&&c.from<=n&&c.from>=e&&c.to>n&&(o=c)}}return o}function t6(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function Wf(t,e,n){for(let r of t.facet(KZ)){let i=r(t,e,n);if(i)return i}return e6(t,e,n)}function wE(t,e){let n=e.mapPos(t.from,1),r=e.mapPos(t.to,-1);return n>=r?void 0:{from:n,to:r}}const qd=_e.define({map:wE}),xc=_e.define({map:wE});function CE(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some(r=>r.from<=n&&r.to>=n)||e.push(t.lineBlockAt(n));return e}const rs=ln.define({create(){return we.none},update(t,e){t=t.map(e.changes);for(let n of e.effects)if(n.is(qd)&&!n6(t,n.value.from,n.value.to)){let{preparePlaceholder:r}=e.state.facet(PE),i=r?we.replace({widget:new c6(r(e.state,n.value))}):u1;t=t.update({add:[i.range(n.value.from,n.value.to)]})}else n.is(xc)&&(t=t.update({filter:(r,i)=>n.value.from!=r||n.value.to!=i,filterFrom:n.value.from,filterTo:n.value.to}));if(e.selection){let n=!1,{head:r}=e.selection.main;t.between(r,r,(i,o)=>{i<r&&o>r&&(n=!0)}),n&&(t=t.update({filterFrom:r,filterTo:r,filter:(i,o)=>o<=r||i>=r}))}return t},provide:t=>de.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,(r,i)=>{n.push(r,i)}),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<t.length;){let r=t[n++],i=t[n++];if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid JSON for fold state");e.push(u1.range(r,i))}return we.set(e,!0)}});function Vf(t,e,n){var r;let i=null;return(r=t.field(rs,!1))===null||r===void 0||r.between(e,n,(o,s)=>{(!i||i.from>o)&&(i={from:o,to:s})}),i}function n6(t,e,n){let r=!1;return t.between(e,e,(i,o)=>{i==e&&o==n&&(r=!0)}),r}function kE(t,e){return t.field(rs,!1)?e:e.concat(_e.appendConfig.of(EE()))}const r6=t=>{for(let e of CE(t)){let n=Wf(t.state,e.from,e.to);if(n)return t.dispatch({effects:kE(t.state,[qd.of(n),AE(t,n)])}),!0}return!1},i6=t=>{if(!t.state.field(rs,!1))return!1;let e=[];for(let n of CE(t)){let r=Vf(t.state,n.from,n.to);r&&e.push(xc.of(r),AE(t,r,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function AE(t,e,n=!0){let r=t.state.doc.lineAt(e.from).number,i=t.state.doc.lineAt(e.to).number;return de.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${r} ${t.state.phrase("to")} ${i}.`)}const o6=t=>{let{state:e}=t,n=[];for(let r=0;r<e.doc.length;){let i=t.lineBlockAt(r),o=Wf(e,i.from,i.to);o&&n.push(qd.of(o)),r=(o?t.lineBlockAt(o.to):i).to+1}return n.length&&t.dispatch({effects:kE(t.state,n)}),!!n.length},s6=t=>{let e=t.state.field(rs,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,(r,i)=>{n.push(xc.of({from:r,to:i}))}),t.dispatch({effects:n}),!0},a6=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:r6},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:i6},{key:"Ctrl-Alt-[",run:o6},{key:"Ctrl-Alt-]",run:s6}],l6={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},PE=me.define({combine(t){return Ci(t,l6)}});function EE(t){return[rs,d6]}function IE(t,e){let{state:n}=t,r=n.facet(PE),i=s=>{let a=t.lineBlockAt(t.posAtDOM(s.target)),l=Vf(t.state,a.from,a.to);l&&t.dispatch({effects:xc.of(l)}),s.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(t,i,e);let o=document.createElement("span");return o.textContent=r.placeholderText,o.setAttribute("aria-label",n.phrase("folded code")),o.title=n.phrase("unfold"),o.className="cm-foldPlaceholder",o.onclick=i,o}const u1=we.replace({widget:new class extends ki{toDOM(t){return IE(t,null)}}});class c6 extends ki{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return IE(e,this.value)}}const u6={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class pp extends Zi{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 f6(t={}){let e=Object.assign(Object.assign({},u6),t),n=new pp(e,!0),r=new pp(e,!1),i=Bt.fromClass(class{constructor(s){this.from=s.viewport.from,this.markers=this.buildMarkers(s)}update(s){(s.docChanged||s.viewportChanged||s.startState.facet(So)!=s.state.facet(So)||s.startState.field(rs,!1)!=s.state.field(rs,!1)||Dt(s.startState)!=Dt(s.state)||e.foldingChanged(s))&&(this.markers=this.buildMarkers(s.view))}buildMarkers(s){let a=new mo;for(let l of s.viewportLineBlocks){let c=Vf(s.state,l.from,l.to)?r:Wf(s.state,l.from,l.to)?n:null;c&&a.add(l.from,l.from,c)}return a.finish()}}),{domEventHandlers:o}=e;return[i,lZ({class:"cm-foldGutter",markers(s){var a;return((a=s.plugin(i))===null||a===void 0?void 0:a.markers)||et.empty},initialSpacer(){return new pp(e,!1)},domEventHandlers:Object.assign(Object.assign({},o),{click:(s,a,l)=>{if(o.click&&o.click(s,a,l))return!0;let c=Vf(s.state,a.from,a.to);if(c)return s.dispatch({effects:xc.of(c)}),!0;let u=Wf(s.state,a.from,a.to);return u?(s.dispatch({effects:qd.of(u)}),!0):!1}})}),EE()]}const d6=de.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 Qa{constructor(e,n){this.specs=e;let r;function i(a){let l=Oo.newName();return(r||(r=Object.create(null)))["."+l]=a,l}const o=typeof n.all=="string"?n.all:n.all?i(n.all):void 0,s=n.scope;this.scope=s instanceof Wr?a=>a.prop(Qs)==s.data:s?a=>a==s:void 0,this.style=xE(e.map(a=>({tag:a.tag,class:a.class||i(Object.assign({},a,{tag:null}))})),{all:o}).style,this.module=r?new Oo(r):null,this.themeType=n.themeType}static define(e,n){return new Qa(e,n||{})}}const tm=me.define(),TE=me.define({combine(t){return t.length?[t[0]]:null}});function gp(t){let e=t.facet(tm);return e.length?e:t.facet(TE)}function ix(t,e){let n=[p6],r;return t instanceof Qa&&(t.module&&n.push(de.styleModule.of(t.module)),r=t.themeType),e!=null&&e.fallback?n.push(TE.of(t)):r?n.push(tm.computeN([de.darkTheme],i=>i.facet(de.darkTheme)==(r=="dark")?[t]:[])):n.push(tm.of(t)),n}class h6{constructor(e){this.markCache=Object.create(null),this.tree=Dt(e.state),this.decorations=this.buildDeco(e,gp(e.state)),this.decoratedTo=e.viewport.to}update(e){let n=Dt(e.state),r=gp(e.state),i=r!=gp(e.startState),{viewport:o}=e.view,s=e.changes.mapPos(this.decoratedTo,1);n.length<o.to&&!i&&n.type==this.tree.type&&s>=o.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=s):(n!=this.tree||e.viewportChanged||i)&&(this.tree=n,this.decorations=this.buildDeco(e.view,r),this.decoratedTo=o.to)}buildDeco(e,n){if(!n||!this.tree.length)return we.none;let r=new mo;for(let{from:i,to:o}of e.visibleRanges)_Z(this.tree,n,(s,a,l)=>{r.add(s,a,this.markCache[l]||(this.markCache[l]=we.mark({class:l})))},i,o);return r.finish()}}const p6=Si.high(Bt.fromClass(h6,{decorations:t=>t.decorations})),g6=Qa.define([{tag:P.meta,color:"#404740"},{tag:P.link,textDecoration:"underline"},{tag:P.heading,textDecoration:"underline",fontWeight:"bold"},{tag:P.emphasis,fontStyle:"italic"},{tag:P.strong,fontWeight:"bold"},{tag:P.strikethrough,textDecoration:"line-through"},{tag:P.keyword,color:"#708"},{tag:[P.atom,P.bool,P.url,P.contentSeparator,P.labelName],color:"#219"},{tag:[P.literal,P.inserted],color:"#164"},{tag:[P.string,P.deleted],color:"#a11"},{tag:[P.regexp,P.escape,P.special(P.string)],color:"#e40"},{tag:P.definition(P.variableName),color:"#00f"},{tag:P.local(P.variableName),color:"#30a"},{tag:[P.typeName,P.namespace],color:"#085"},{tag:P.className,color:"#167"},{tag:[P.special(P.variableName),P.macroName],color:"#256"},{tag:P.definition(P.propertyName),color:"#00c"},{tag:P.comment,color:"#940"},{tag:P.invalid,color:"#f00"}]),m6=de.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),$E=1e4,jE="()[]{}",RE=me.define({combine(t){return Ci(t,{afterCursor:!0,brackets:jE,maxScanDistance:$E,renderMatch:v6})}}),O6=we.mark({class:"cm-matchingBracket"}),x6=we.mark({class:"cm-nonmatchingBracket"});function v6(t){let e=[],n=t.matched?O6:x6;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 y6=ln.define({create(){return we.none},update(t,e){if(!e.docChanged&&!e.selection)return t;let n=[],r=e.state.facet(RE);for(let i of e.state.selection.ranges){if(!i.empty)continue;let o=ci(e.state,i.head,-1,r)||i.head>0&&ci(e.state,i.head-1,1,r)||r.afterCursor&&(ci(e.state,i.head,1,r)||i.head<e.state.doc.length&&ci(e.state,i.head+1,-1,r));o&&(n=n.concat(r.renderMatch(o,e.state)))}return we.set(n,!0)},provide:t=>de.decorations.from(t)}),b6=[y6,m6];function S6(t={}){return[RE.of(t),b6]}const ox=new ze;function nm(t,e,n){let r=t.prop(e<0?ze.openedBy:ze.closedBy);if(r)return r;if(t.name.length==1){let i=n.indexOf(t.name);if(i>-1&&i%2==(e<0?1:0))return[n[i+e]]}return null}function rm(t){let e=t.type.prop(ox);return e?e(t.node):t}function ci(t,e,n,r={}){let i=r.maxScanDistance||$E,o=r.brackets||jE,s=Dt(t),a=s.resolveInner(e,n);for(let l=a;l;l=l.parent){let c=nm(l.type,n,o);if(c&&l.from<l.to){let u=rm(l);if(u&&(n>0?e>=u.from&&e<u.to:e>u.from&&e<=u.to))return w6(t,e,n,l,u,c,o)}}return C6(t,e,n,s,a.type,i,o)}function w6(t,e,n,r,i,o,s){let a=r.parent,l={from:i.from,to:i.to},c=0,u=a==null?void 0:a.cursor();if(u&&(n<0?u.childBefore(r.from):u.childAfter(r.to)))do if(n<0?u.to<=r.from:u.from>=r.to){if(c==0&&o.indexOf(u.type.name)>-1&&u.from<u.to){let f=rm(u);return{start:l,end:f?{from:f.from,to:f.to}:void 0,matched:!0}}else if(nm(u.type,n,s))c++;else if(nm(u.type,-n,s)){if(c==0){let f=rm(u);return{start:l,end:f&&f.from<f.to?{from:f.from,to:f.to}:void 0,matched:!1}}c--}}while(n<0?u.prevSibling():u.nextSibling());return{start:l,matched:!1}}function C6(t,e,n,r,i,o,s){let a=n<0?t.sliceDoc(e-1,e):t.sliceDoc(e,e+1),l=s.indexOf(a);if(l<0||l%2==0!=n>0)return null;let c={from:n<0?e-1:e,to:n>0?e+1:e},u=t.doc.iterRange(e,n>0?t.doc.length:0),f=0;for(let d=0;!u.next().done&&d<=o;){let h=u.value;n<0&&(d+=h.length);let p=e+d*n;for(let O=n>0?0:h.length-1,m=n>0?h.length:-1;O!=m;O+=n){let x=s.indexOf(h[O]);if(!(x<0||r.resolveInner(p+O,1).type!=i))if(x%2==0==n>0)f++;else{if(f==1)return{start:c,end:{from:p+O,to:p+O+1},matched:x>>1==l>>1};f--}}n>0&&(d+=h.length)}return u.done?{start:c,matched:!1}:null}const k6=Object.create(null),f1=[zn.none],d1=[],h1=Object.create(null),A6=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"]])A6[t]=P6(k6,e);function mp(t,e){d1.indexOf(t)>-1||(d1.push(t),console.warn(e))}function P6(t,e){let n=[];for(let a of e.split(" ")){let l=[];for(let c of a.split(".")){let u=t[c]||P[c];u?typeof u=="function"?l.length?l=l.map(u):mp(c,`Modifier ${c} used at start of tag`):l.length?mp(c,`Tag ${c} used as modifier`):l=Array.isArray(u)?u:[u]:mp(c,`Unknown highlighting tag ${c}`)}for(let c of l)n.push(c)}if(!n.length)return 0;let r=e.replace(/ /g,"_"),i=r+" "+n.map(a=>a.id),o=h1[i];if(o)return o.id;let s=h1[i]=zn.define({id:f1.length,name:r,props:[ja({[r]:n})]});return f1.push(s),s.id}$t.RTL,$t.LTR;const E6=t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),r=ax(t.state,n.from);return r.line?I6(t):r.block?$6(t):!1};function sx(t,e){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=t(e,n);return i?(r(n.update(i)),!0):!1}}const I6=sx(D6,0),T6=sx(DE,0),$6=sx((t,e)=>DE(t,e,R6(e)),0);function ax(t,e){let n=t.languageDataAt("commentTokens",e);return n.length?n[0]:{}}const tl=50;function j6(t,{open:e,close:n},r,i){let o=t.sliceDoc(r-tl,r),s=t.sliceDoc(i,i+tl),a=/\s*$/.exec(o)[0].length,l=/^\s*/.exec(s)[0].length,c=o.length-a;if(o.slice(c-e.length,c)==e&&s.slice(l,l+n.length)==n)return{open:{pos:r-a,margin:a&&1},close:{pos:i+l,margin:l&&1}};let u,f;i-r<=2*tl?u=f=t.sliceDoc(r,i):(u=t.sliceDoc(r,r+tl),f=t.sliceDoc(i-tl,i));let d=/^\s*/.exec(u)[0].length,h=/\s*$/.exec(f)[0].length,p=f.length-h-n.length;return u.slice(d,d+e.length)==e&&f.slice(p,p+n.length)==n?{open:{pos:r+d+e.length,margin:/\s/.test(u.charAt(d+e.length))?1:0},close:{pos:i-h-n.length,margin:/\s/.test(f.charAt(p-1))?1:0}}:null}function R6(t){let e=[];for(let n of t.selection.ranges){let r=t.doc.lineAt(n.from),i=n.to<=r.to?r:t.doc.lineAt(n.to),o=e.length-1;o>=0&&e[o].to>r.from?e[o].to=i.to:e.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return e}function DE(t,e,n=e.selection.ranges){let r=n.map(o=>ax(e,o.from).block);if(!r.every(o=>o))return null;let i=n.map((o,s)=>j6(e,r[s],o.from,o.to));if(t!=2&&!i.every(o=>o))return{changes:e.changes(n.map((o,s)=>i[s]?[]:[{from:o.from,insert:r[s].open+" "},{from:o.to,insert:" "+r[s].close}]))};if(t!=1&&i.some(o=>o)){let o=[];for(let s=0,a;s<i.length;s++)if(a=i[s]){let l=r[s],{open:c,close:u}=a;o.push({from:c.pos-l.open.length,to:c.pos+c.margin},{from:u.pos-u.margin,to:u.pos+l.close.length})}return{changes:o}}return null}function D6(t,e,n=e.selection.ranges){let r=[],i=-1;for(let{from:o,to:s}of n){let a=r.length,l=1e9,c=ax(e,o).line;if(c){for(let u=o;u<=s;){let f=e.doc.lineAt(u);if(f.from>i&&(o==s||s>f.from)){i=f.from;let d=/^\s*/.exec(f.text)[0].length,h=d==f.length,p=f.text.slice(d,d+c.length)==c?d:-1;d<f.text.length&&d<l&&(l=d),r.push({line:f,comment:p,token:c,indent:d,empty:h,single:!1})}u=f.to+1}if(l<1e9)for(let u=a;u<r.length;u++)r[u].indent<r[u].line.text.length&&(r[u].indent=l);r.length==a+1&&(r[a].single=!0)}}if(t!=2&&r.some(o=>o.comment<0&&(!o.empty||o.single))){let o=[];for(let{line:a,token:l,indent:c,empty:u,single:f}of r)(f||!u)&&o.push({from:a.from+c,insert:l+" "});let s=e.changes(o);return{changes:s,selection:e.selection.map(s,1)}}else if(t!=1&&r.some(o=>o.comment>=0)){let o=[];for(let{line:s,comment:a,token:l}of r)if(a>=0){let c=s.from+a,u=c+l.length;s.text[u-s.from]==" "&&u++,o.push({from:c,to:u})}return{changes:o}}return null}const im=wi.define(),Q6=wi.define(),B6=me.define(),QE=me.define({combine(t){return Ci(t,{minDepth:100,newGroupDelay:500,joinToEvent:(e,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,n)=>(r,i)=>e(r,i)||n(r,i)})}}),BE=ln.define({create(){return ui.empty},update(t,e){let n=e.state.facet(QE),r=e.annotation(im);if(r){let l=Hn.fromTransaction(e,r.selection),c=r.side,u=c==0?t.undone:t.done;return l?u=zf(u,u.length,n.minDepth,l):u=NE(u,e.startState.selection),new ui(c==0?r.rest:u,c==0?u:r.rest)}let i=e.annotation(Q6);if((i=="full"||i=="before")&&(t=t.isolate()),e.annotation(qt.addToHistory)===!1)return e.changes.empty?t:t.addMapping(e.changes.desc);let o=Hn.fromTransaction(e),s=e.annotation(qt.time),a=e.annotation(qt.userEvent);return o?t=t.addChanges(o,s,a,n,e):e.selection&&(t=t.addSelection(e.startState.selection,s,a,n.newGroupDelay)),(i=="full"||i=="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 ui(t.done.map(Hn.fromJSON),t.undone.map(Hn.fromJSON))}});function _6(t={}){return[BE,QE.of(t),de.domEventHandlers({beforeinput(e,n){let r=e.inputType=="historyUndo"?_E:e.inputType=="historyRedo"?om:null;return r?(e.preventDefault(),r(n)):!1}})]}function Ud(t,e){return function({state:n,dispatch:r}){if(!e&&n.readOnly)return!1;let i=n.field(BE,!1);if(!i)return!1;let o=i.pop(t,n,e);return o?(r(o),!0):!1}}const _E=Ud(0,!1),om=Ud(1,!1),M6=Ud(0,!0),N6=Ud(1,!0);class Hn{constructor(e,n,r,i,o){this.changes=e,this.effects=n,this.mapped=r,this.startSelection=i,this.selectionsAfter=o}setSelAfter(e){return new Hn(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,n,r;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:(r=this.startSelection)===null||r===void 0?void 0:r.toJSON(),selectionsAfter:this.selectionsAfter.map(i=>i.toJSON())}}static fromJSON(e){return new Hn(e.changes&&rn.fromJSON(e.changes),[],e.mapped&&pi.fromJSON(e.mapped),e.startSelection&&ie.fromJSON(e.startSelection),e.selectionsAfter.map(ie.fromJSON))}static fromTransaction(e,n){let r=Pr;for(let i of e.startState.facet(B6)){let o=i(e);o.length&&(r=r.concat(o))}return!r.length&&e.changes.empty?null:new Hn(e.changes.invert(e.startState.doc),r,void 0,n||e.startState.selection,Pr)}static selection(e){return new Hn(void 0,Pr,void 0,void 0,e)}}function zf(t,e,n,r){let i=e+1>n+20?e-n-1:0,o=t.slice(i,e);return o.push(r),o}function F6(t,e){let n=[],r=!1;return t.iterChangedRanges((i,o)=>n.push(i,o)),e.iterChangedRanges((i,o,s,a)=>{for(let l=0;l<n.length;){let c=n[l++],u=n[l++];a>=c&&s<=u&&(r=!0)}}),r}function Z6(t,e){return t.ranges.length==e.ranges.length&&t.ranges.filter((n,r)=>n.empty!=e.ranges[r].empty).length===0}function ME(t,e){return t.length?e.length?t.concat(e):t:e}const Pr=[],W6=200;function NE(t,e){if(t.length){let n=t[t.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-W6));return r.length&&r[r.length-1].eq(e)?t:(r.push(e),zf(t,t.length-1,1e9,n.setSelAfter(r)))}else return[Hn.selection([e])]}function V6(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 Op(t,e){if(!t.length)return t;let n=t.length,r=Pr;for(;n;){let i=z6(t[n-1],e,r);if(i.changes&&!i.changes.empty||i.effects.length){let o=t.slice(0,n);return o[n-1]=i,o}else e=i.mapped,n--,r=i.selectionsAfter}return r.length?[Hn.selection(r)]:Pr}function z6(t,e,n){let r=ME(t.selectionsAfter.length?t.selectionsAfter.map(a=>a.map(e)):Pr,n);if(!t.changes)return Hn.selection(r);let i=t.changes.map(e),o=e.mapDesc(t.changes,!0),s=t.mapped?t.mapped.composeDesc(o):o;return new Hn(i,_e.mapEffects(t.effects,e),s,t.startSelection.map(o),r)}const L6=/^(input\.type|delete)($|\.)/;class ui{constructor(e,n,r=0,i=void 0){this.done=e,this.undone=n,this.prevTime=r,this.prevUserEvent=i}isolate(){return this.prevTime?new ui(this.done,this.undone):this}addChanges(e,n,r,i,o){let s=this.done,a=s[s.length-1];return a&&a.changes&&!a.changes.empty&&e.changes&&(!r||L6.test(r))&&(!a.selectionsAfter.length&&n-this.prevTime<i.newGroupDelay&&i.joinToEvent(o,F6(a.changes,e.changes))||r=="input.type.compose")?s=zf(s,s.length-1,i.minDepth,new Hn(e.changes.compose(a.changes),ME(e.effects,a.effects),a.mapped,a.startSelection,Pr)):s=zf(s,s.length,i.minDepth,e),new ui(s,Pr,n,r)}addSelection(e,n,r,i){let o=this.done.length?this.done[this.done.length-1].selectionsAfter:Pr;return o.length>0&&n-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&Z6(o[o.length-1],e)?this:new ui(NE(this.done,e),this.undone,n,r)}addMapping(e){return new ui(Op(this.done,e),Op(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,n,r){let i=e==0?this.done:this.undone;if(i.length==0)return null;let o=i[i.length-1],s=o.selectionsAfter[0]||n.selection;if(r&&o.selectionsAfter.length)return n.update({selection:o.selectionsAfter[o.selectionsAfter.length-1],annotations:im.of({side:e,rest:V6(i),selection:s}),userEvent:e==0?"select.undo":"select.redo",scrollIntoView:!0});if(o.changes){let a=i.length==1?Pr:i.slice(0,i.length-1);return o.mapped&&(a=Op(a,o.mapped)),n.update({changes:o.changes,selection:o.startSelection,effects:o.effects,annotations:im.of({side:e,rest:a,selection:s}),filter:!1,userEvent:e==0?"undo":"redo",scrollIntoView:!0})}else return null}}ui.empty=new ui(Pr,Pr);const X6=[{key:"Mod-z",run:_E,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:om,preventDefault:!0},{linux:"Ctrl-Shift-z",run:om,preventDefault:!0},{key:"Mod-u",run:M6,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:N6,preventDefault:!0}];function Ba(t,e){return ie.create(t.ranges.map(e),t.mainIndex)}function Ai(t,e){return t.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function Xr({state:t,dispatch:e},n){let r=Ba(t.selection,n);return r.eq(t.selection,!0)?!1:(e(Ai(t,r)),!0)}function Hd(t,e){return ie.cursor(e?t.to:t.from)}function FE(t,e){return Xr(t,n=>n.empty?t.moveByChar(n,e):Hd(n,e))}function Dn(t){return t.textDirectionAt(t.state.selection.main.head)==$t.LTR}const ZE=t=>FE(t,!Dn(t)),WE=t=>FE(t,Dn(t));function VE(t,e){return Xr(t,n=>n.empty?t.moveByGroup(n,e):Hd(n,e))}const G6=t=>VE(t,!Dn(t)),Y6=t=>VE(t,Dn(t));function q6(t,e,n){if(e.type.prop(n))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function Jd(t,e,n){let r=Dt(t).resolveInner(e.head),i=n?ze.closedBy:ze.openedBy;for(let l=e.head;;){let c=n?r.childAfter(l):r.childBefore(l);if(!c)break;q6(t,c,i)?r=c:l=n?c.to:c.from}let o=r.type.prop(i),s,a;return o&&(s=n?ci(t,r.from,1):ci(t,r.to,-1))&&s.matched?a=n?s.end.to:s.end.from:a=n?r.to:r.from,ie.cursor(a,n?-1:1)}const U6=t=>Xr(t,e=>Jd(t.state,e,!Dn(t))),H6=t=>Xr(t,e=>Jd(t.state,e,Dn(t)));function zE(t,e){return Xr(t,n=>{if(!n.empty)return Hd(n,e);let r=t.moveVertically(n,e);return r.head!=n.head?r:t.moveToLineBoundary(n,e)})}const LE=t=>zE(t,!1),XE=t=>zE(t,!0);function GE(t){let e=t.scrollDOM.clientHeight<t.scrollDOM.scrollHeight-2,n=0,r=0,i;if(e){for(let o of t.state.facet(de.scrollMargins)){let s=o(t);s!=null&&s.top&&(n=Math.max(s==null?void 0:s.top,n)),s!=null&&s.bottom&&(r=Math.max(s==null?void 0:s.bottom,r))}i=t.scrollDOM.clientHeight-n-r}else i=(t.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:r,selfScroll:e,height:Math.max(t.defaultLineHeight,i-5)}}function YE(t,e){let n=GE(t),{state:r}=t,i=Ba(r.selection,s=>s.empty?t.moveVertically(s,e,n.height):Hd(s,e));if(i.eq(r.selection))return!1;let o;if(n.selfScroll){let s=t.coordsAtPos(r.selection.main.head),a=t.scrollDOM.getBoundingClientRect(),l=a.top+n.marginTop,c=a.bottom-n.marginBottom;s&&s.top>l&&s.bottom<c&&(o=de.scrollIntoView(i.main.head,{y:"start",yMargin:s.top-l}))}return t.dispatch(Ai(r,i),{effects:o}),!0}const p1=t=>YE(t,!1),sm=t=>YE(t,!0);function Eo(t,e,n){let r=t.lineBlockAt(e.head),i=t.moveToLineBoundary(e,n);if(i.head==e.head&&i.head!=(n?r.to:r.from)&&(i=t.moveToLineBoundary(e,n,!1)),!n&&i.head==r.from&&r.length){let o=/^\s*/.exec(t.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;o&&e.head!=r.from+o&&(i=ie.cursor(r.from+o))}return i}const J6=t=>Xr(t,e=>Eo(t,e,!0)),K6=t=>Xr(t,e=>Eo(t,e,!1)),eW=t=>Xr(t,e=>Eo(t,e,!Dn(t))),tW=t=>Xr(t,e=>Eo(t,e,Dn(t))),nW=t=>Xr(t,e=>ie.cursor(t.lineBlockAt(e.head).from,1)),rW=t=>Xr(t,e=>ie.cursor(t.lineBlockAt(e.head).to,-1));function iW(t,e,n){let r=!1,i=Ba(t.selection,o=>{let s=ci(t,o.head,-1)||ci(t,o.head,1)||o.head>0&&ci(t,o.head-1,1)||o.head<t.doc.length&&ci(t,o.head+1,-1);if(!s||!s.end)return o;r=!0;let a=s.start.from==o.head?s.end.to:s.end.from;return ie.cursor(a)});return r?(e(Ai(t,i)),!0):!1}const oW=({state:t,dispatch:e})=>iW(t,e);function Rr(t,e){let n=Ba(t.state.selection,r=>{let i=e(r);return ie.range(r.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)});return n.eq(t.state.selection)?!1:(t.dispatch(Ai(t.state,n)),!0)}function qE(t,e){return Rr(t,n=>t.moveByChar(n,e))}const UE=t=>qE(t,!Dn(t)),HE=t=>qE(t,Dn(t));function JE(t,e){return Rr(t,n=>t.moveByGroup(n,e))}const sW=t=>JE(t,!Dn(t)),aW=t=>JE(t,Dn(t)),lW=t=>Rr(t,e=>Jd(t.state,e,!Dn(t))),cW=t=>Rr(t,e=>Jd(t.state,e,Dn(t)));function KE(t,e){return Rr(t,n=>t.moveVertically(n,e))}const eI=t=>KE(t,!1),tI=t=>KE(t,!0);function nI(t,e){return Rr(t,n=>t.moveVertically(n,e,GE(t).height))}const g1=t=>nI(t,!1),m1=t=>nI(t,!0),uW=t=>Rr(t,e=>Eo(t,e,!0)),fW=t=>Rr(t,e=>Eo(t,e,!1)),dW=t=>Rr(t,e=>Eo(t,e,!Dn(t))),hW=t=>Rr(t,e=>Eo(t,e,Dn(t))),pW=t=>Rr(t,e=>ie.cursor(t.lineBlockAt(e.head).from)),gW=t=>Rr(t,e=>ie.cursor(t.lineBlockAt(e.head).to)),O1=({state:t,dispatch:e})=>(e(Ai(t,{anchor:0})),!0),x1=({state:t,dispatch:e})=>(e(Ai(t,{anchor:t.doc.length})),!0),v1=({state:t,dispatch:e})=>(e(Ai(t,{anchor:t.selection.main.anchor,head:0})),!0),y1=({state:t,dispatch:e})=>(e(Ai(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),mW=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),OW=({state:t,dispatch:e})=>{let n=Kd(t).map(({from:r,to:i})=>ie.range(r,Math.min(i+1,t.doc.length)));return e(t.update({selection:ie.create(n),userEvent:"select"})),!0},xW=({state:t,dispatch:e})=>{let n=Ba(t.selection,r=>{var i;let o=Dt(t).resolveStack(r.from,1);for(let s=o;s;s=s.next){let{node:a}=s;if((a.from<r.from&&a.to>=r.to||a.to>r.to&&a.from<=r.from)&&(!((i=a.parent)===null||i===void 0)&&i.parent))return ie.range(a.to,a.from)}return r});return e(Ai(t,n)),!0},vW=({state:t,dispatch:e})=>{let n=t.selection,r=null;return n.ranges.length>1?r=ie.create([n.main]):n.main.empty||(r=ie.create([ie.cursor(n.main.head)])),r?(e(Ai(t,r)),!0):!1};function vc(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:r}=t,i=r.changeByRange(o=>{let{from:s,to:a}=o;if(s==a){let l=e(o);l<s?(n="delete.backward",l=vu(t,l,!1)):l>s&&(n="delete.forward",l=vu(t,l,!0)),s=Math.min(s,l),a=Math.max(a,l)}else s=vu(t,s,!1),a=vu(t,a,!0);return s==a?{range:o}:{changes:{from:s,to:a},range:ie.cursor(s,s<o.head?-1:1)}});return i.changes.empty?!1:(t.dispatch(r.update(i,{scrollIntoView:!0,userEvent:n,effects:n=="delete.selection"?de.announce.of(r.phrase("Selection deleted")):void 0})),!0)}function vu(t,e,n){if(t instanceof de)for(let r of t.state.facet(de.atomicRanges).map(i=>i(t)))r.between(e,e,(i,o)=>{i<e&&o>e&&(e=n?o:i)});return e}const rI=(t,e)=>vc(t,n=>{let r=n.from,{state:i}=t,o=i.doc.lineAt(r),s,a;if(!e&&r>o.from&&r<o.from+200&&!/[^ \t]/.test(s=o.text.slice(0,r-o.from))){if(s[s.length-1]==" ")return r-1;let l=Ta(s,i.tabSize),c=l%Zf(i)||Zf(i);for(let u=0;u<c&&s[s.length-1-u]==" ";u++)r--;a=r}else a=kn(o.text,r-o.from,e,e)+o.from,a==r&&o.number!=(e?i.doc.lines:1)?a+=e?1:-1:!e&&/[\ufe00-\ufe0f]/.test(o.text.slice(a-o.from,r-o.from))&&(a=kn(o.text,a-o.from,!1,!1)+o.from);return a}),am=t=>rI(t,!1),iI=t=>rI(t,!0),oI=(t,e)=>vc(t,n=>{let r=n.head,{state:i}=t,o=i.doc.lineAt(r),s=i.charCategorizer(r);for(let a=null;;){if(r==(e?o.to:o.from)){r==n.head&&o.number!=(e?i.doc.lines:1)&&(r+=e?1:-1);break}let l=kn(o.text,r-o.from,e)+o.from,c=o.text.slice(Math.min(r,l)-o.from,Math.max(r,l)-o.from),u=s(c);if(a!=null&&u!=a)break;(c!=" "||r!=n.head)&&(a=u),r=l}return r}),sI=t=>oI(t,!1),yW=t=>oI(t,!0),bW=t=>vc(t,e=>{let n=t.lineBlockAt(e.head).to;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}),SW=t=>vc(t,e=>{let n=t.moveToLineBoundary(e,!1).head;return e.head>n?n:Math.max(0,e.head-1)}),wW=t=>vc(t,e=>{let n=t.moveToLineBoundary(e,!0).head;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}),CW=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:st.of(["",""])},range:ie.cursor(r.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},kW=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(r=>{if(!r.empty||r.from==0||r.from==t.doc.length)return{range:r};let i=r.from,o=t.doc.lineAt(i),s=i==o.from?i-1:kn(o.text,i-o.from,!1)+o.from,a=i==o.to?i+1:kn(o.text,i-o.from,!0)+o.from;return{changes:{from:s,to:a,insert:t.doc.slice(i,a).append(t.doc.slice(s,i))},range:ie.cursor(a)}});return n.changes.empty?!1:(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function Kd(t){let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.from),o=t.doc.lineAt(r.to);if(!r.empty&&r.to==o.from&&(o=t.doc.lineAt(r.to-1)),n>=i.number){let s=e[e.length-1];s.to=o.to,s.ranges.push(r)}else e.push({from:i.from,to:o.to,ranges:[r]});n=o.number+1}return e}function aI(t,e,n){if(t.readOnly)return!1;let r=[],i=[];for(let o of Kd(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){r.push({from:o.to,to:s.to},{from:o.from,insert:s.text+t.lineBreak});for(let l of o.ranges)i.push(ie.range(Math.min(t.doc.length,l.anchor+a),Math.min(t.doc.length,l.head+a)))}else{r.push({from:s.from,to:o.from},{from:o.to,insert:t.lineBreak+s.text});for(let l of o.ranges)i.push(ie.range(l.anchor-a,l.head-a))}}return r.length?(e(t.update({changes:r,scrollIntoView:!0,selection:ie.create(i,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const AW=({state:t,dispatch:e})=>aI(t,e,!1),PW=({state:t,dispatch:e})=>aI(t,e,!0);function lI(t,e,n){if(t.readOnly)return!1;let r=[];for(let i of Kd(t))n?r.push({from:i.from,insert:t.doc.slice(i.from,i.to)+t.lineBreak}):r.push({from:i.to,insert:t.lineBreak+t.doc.slice(i.from,i.to)});return e(t.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const EW=({state:t,dispatch:e})=>lI(t,e,!1),IW=({state:t,dispatch:e})=>lI(t,e,!0),TW=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(Kd(e).map(({from:i,to:o})=>(i>0?i--:o<e.doc.length&&o++,{from:i,to:o}))),r=Ba(e.selection,i=>t.moveVertically(i,!0)).map(n);return t.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0};function $W(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=Dt(t).resolveInner(e),r=n.childBefore(e),i=n.childAfter(e),o;return r&&i&&r.to<=e&&i.from>=e&&(o=r.type.prop(ze.closedBy))&&o.indexOf(i.name)>-1&&t.doc.lineAt(r.to).from==t.doc.lineAt(i.from).from&&!/\S/.test(t.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}const jW=cI(!1),RW=cI(!0);function cI(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let r=e.changeByRange(i=>{let{from:o,to:s}=i,a=e.doc.lineAt(o),l=!t&&o==s&&$W(e,o);t&&(o=s=(s<=a.to?a:e.doc.lineAt(s)).to);let c=new Yd(e,{simulateBreak:o,simulateDoubleBreak:!!l}),u=tx(c,o);for(u==null&&(u=Ta(/^\s*/.exec(e.doc.lineAt(o).text)[0],e.tabSize));s<a.to&&/\s/.test(a.text[s-a.from]);)s++;l?{from:o,to:s}=l:o>a.from&&o<a.from+100&&!/\S/.test(a.text.slice(0,o))&&(o=a.from);let f=["",Gl(e,u)];return l&&f.push(Gl(e,c.lineIndent(a.from,-1))),{changes:{from:o,to:s,insert:st.of(f)},range:ie.cursor(o+1+f[1].length)}});return n(e.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}}function lx(t,e){let n=-1;return t.changeByRange(r=>{let i=[];for(let s=r.from;s<=r.to;){let a=t.doc.lineAt(s);a.number>n&&(r.empty||r.to>a.from)&&(e(a,i,r),n=a.number),s=a.to+1}let o=t.changes(i);return{changes:i,range:ie.range(o.mapPos(r.anchor,1),o.mapPos(r.head,1))}})}const DW=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),r=new Yd(t,{overrideIndentation:o=>{let s=n[o];return s??-1}}),i=lx(t,(o,s,a)=>{let l=tx(r,o.from);if(l==null)return;/\S/.test(o.text)||(l=0);let c=/^\s*/.exec(o.text)[0],u=Gl(t,l);(c!=u||a.from<o.from+c.length)&&(n[o.from]=l,s.push({from:o.from,to:o.from+c.length,insert:u}))});return i.changes.empty||e(t.update(i,{userEvent:"indent"})),!0},uI=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(lx(t,(n,r)=>{r.push({from:n.from,insert:t.facet(Oc)})}),{userEvent:"input.indent"})),!0),fI=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(lx(t,(n,r)=>{let i=/^\s*/.exec(n.text)[0];if(!i)return;let o=Ta(i,t.tabSize),s=0,a=Gl(t,Math.max(0,o-Zf(t)));for(;s<i.length&&s<a.length&&i.charCodeAt(s)==a.charCodeAt(s);)s++;r.push({from:n.from+s,to:n.from+i.length,insert:a.slice(s)})}),{userEvent:"delete.dedent"})),!0),QW=[{key:"Ctrl-b",run:ZE,shift:UE,preventDefault:!0},{key:"Ctrl-f",run:WE,shift:HE},{key:"Ctrl-p",run:LE,shift:eI},{key:"Ctrl-n",run:XE,shift:tI},{key:"Ctrl-a",run:nW,shift:pW},{key:"Ctrl-e",run:rW,shift:gW},{key:"Ctrl-d",run:iI},{key:"Ctrl-h",run:am},{key:"Ctrl-k",run:bW},{key:"Ctrl-Alt-h",run:sI},{key:"Ctrl-o",run:CW},{key:"Ctrl-t",run:kW},{key:"Ctrl-v",run:sm}],BW=[{key:"ArrowLeft",run:ZE,shift:UE,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:G6,shift:sW,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:eW,shift:dW,preventDefault:!0},{key:"ArrowRight",run:WE,shift:HE,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:Y6,shift:aW,preventDefault:!0},{mac:"Cmd-ArrowRight",run:tW,shift:hW,preventDefault:!0},{key:"ArrowUp",run:LE,shift:eI,preventDefault:!0},{mac:"Cmd-ArrowUp",run:O1,shift:v1},{mac:"Ctrl-ArrowUp",run:p1,shift:g1},{key:"ArrowDown",run:XE,shift:tI,preventDefault:!0},{mac:"Cmd-ArrowDown",run:x1,shift:y1},{mac:"Ctrl-ArrowDown",run:sm,shift:m1},{key:"PageUp",run:p1,shift:g1},{key:"PageDown",run:sm,shift:m1},{key:"Home",run:K6,shift:fW,preventDefault:!0},{key:"Mod-Home",run:O1,shift:v1},{key:"End",run:J6,shift:uW,preventDefault:!0},{key:"Mod-End",run:x1,shift:y1},{key:"Enter",run:jW},{key:"Mod-a",run:mW},{key:"Backspace",run:am,shift:am},{key:"Delete",run:iI},{key:"Mod-Backspace",mac:"Alt-Backspace",run:sI},{key:"Mod-Delete",mac:"Alt-Delete",run:yW},{mac:"Mod-Backspace",run:SW},{mac:"Mod-Delete",run:wW}].concat(QW.map(t=>({mac:t.key,run:t.run,shift:t.shift}))),_W=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:U6,shift:lW},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:H6,shift:cW},{key:"Alt-ArrowUp",run:AW},{key:"Shift-Alt-ArrowUp",run:EW},{key:"Alt-ArrowDown",run:PW},{key:"Shift-Alt-ArrowDown",run:IW},{key:"Escape",run:vW},{key:"Mod-Enter",run:RW},{key:"Alt-l",mac:"Ctrl-l",run:OW},{key:"Mod-i",run:xW,preventDefault:!0},{key:"Mod-[",run:fI},{key:"Mod-]",run:uI},{key:"Mod-Alt-\\",run:DW},{key:"Shift-Mod-k",run:TW},{key:"Shift-Mod-\\",run:oW},{key:"Mod-/",run:E6},{key:"Alt-A",run:T6}].concat(BW),MW={key:"Tab",run:uI,shift:fI};function At(){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 r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r];typeof i=="string"?t.setAttribute(r,i):i!=null&&(t[r]=i)}e++}for(;e<arguments.length;e++)dI(t,arguments[e]);return t}function dI(t,e){if(typeof e=="string")t.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)t.appendChild(e);else if(Array.isArray(e))for(var n=0;n<e.length;n++)dI(t,e[n]);else throw new RangeError("Unsupported child node: "+e)}const b1=typeof String.prototype.normalize=="function"?t=>t.normalize("NFKD"):t=>t;class da{constructor(e,n,r=0,i=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(r,i),this.bufferStart=r,this.normalize=o?a=>o(b1(a)):b1,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 bn(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=MO(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=kr(e);let i=this.normalize(n);for(let o=0,s=r;;o++){let a=i.charCodeAt(o),l=this.match(a,s,this.bufferPos+this.bufferStart);if(o==i.length-1){if(l)return this.value=l,this;break}s==r&&o<n.length&&n.charCodeAt(o)==a&&s++}}}match(e,n,r){let i=null;for(let o=0;o<this.matches.length;o+=2){let s=this.matches[o],a=!1;this.query.charCodeAt(s)==e&&(s==this.query.length-1?i={from:this.matches[o+1],to:r}:(this.matches[o]++,a=!0)),a||(this.matches.splice(o,2),o-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?i={from:n,to:r}:this.matches.push(1,n)),i&&this.test&&!this.test(i.from,i.to,this.buffer,this.bufferStart)&&(i=null),i}}typeof Symbol<"u"&&(da.prototype[Symbol.iterator]=function(){return this});const hI={from:-1,to:-1,match:/.*/.exec("")},cx="gm"+(/x/.unicode==null?"":"u");class pI{constructor(e,n,r,i=0,o=e.length){if(this.text=e,this.to=o,this.curLine="",this.done=!1,this.value=hI,/\\[sWDnr]|\n|\r|\[\^/.test(n))return new gI(e,n,r,i,o);this.re=new RegExp(n,cx+(r!=null&&r.ignoreCase?"i":"")),this.test=r==null?void 0:r.test,this.iter=e.iter();let s=e.lineAt(i);this.curLineStart=s.from,this.matchPos=Lf(e,i),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.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 r=this.curLineStart+n.index,i=r+n[0].length;if(this.matchPos=Lf(this.text,i+(r==i?1:0)),r==this.curLineStart+this.curLine.length&&this.nextLine(),(r<i||r>this.value.to)&&(!this.test||this.test(r,i,n)))return this.value={from:r,to:i,match:n},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}}const xp=new WeakMap;class Us{constructor(e,n){this.from=e,this.text=n}get to(){return this.from+this.text.length}static get(e,n,r){let i=xp.get(e);if(!i||i.from>=r||i.to<=n){let a=new Us(n,e.sliceString(n,r));return xp.set(e,a),a}if(i.from==n&&i.to==r)return i;let{text:o,from:s}=i;return s>n&&(o=e.sliceString(n,s)+o,s=n),i.to<r&&(o+=e.sliceString(i.to,r)),xp.set(e,new Us(s,o)),new Us(n,o.slice(n-s,r-s))}}class gI{constructor(e,n,r,i,o){this.text=e,this.to=o,this.done=!1,this.value=hI,this.matchPos=Lf(e,i),this.re=new RegExp(n,cx+(r!=null&&r.ignoreCase?"i":"")),this.test=r==null?void 0:r.test,this.flat=Us.get(e,i,this.chunkEnd(i+5e3))}chunkEnd(e){return e>=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 r=this.flat.from+n.index,i=r+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(r,i,n)))return this.value={from:r,to:i,match:n},this.matchPos=Lf(this.text,i+(r==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Us.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(pI.prototype[Symbol.iterator]=gI.prototype[Symbol.iterator]=function(){return this});function NW(t){try{return new RegExp(t,cx),!0}catch{return!1}}function Lf(t,e){if(e>=t.length)return e;let n=t.lineAt(e),r;for(;e<n.to&&(r=n.text.charCodeAt(e-n.from))>=56320&&r<57344;)e++;return e}function lm(t){let e=String(t.state.doc.lineAt(t.state.selection.main.head).number),n=At("input",{class:"cm-textfield",name:"line",value:e}),r=At("form",{class:"cm-gotoLine",onkeydown:o=>{o.keyCode==27?(o.preventDefault(),t.dispatch({effects:Xf.of(!1)}),t.focus()):o.keyCode==13&&(o.preventDefault(),i())},onsubmit:o=>{o.preventDefault(),i()}},At("label",t.state.phrase("Go to line"),": ",n)," ",At("button",{class:"cm-button",type:"submit"},t.state.phrase("go")));function i(){let o=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);if(!o)return;let{state:s}=t,a=s.doc.lineAt(s.selection.main.head),[,l,c,u,f]=o,d=u?+u.slice(1):0,h=c?+c:a.number;if(c&&f){let m=h/100;l&&(m=m*(l=="-"?-1:1)+a.number/s.doc.lines),h=Math.round(s.doc.lines*m)}else c&&l&&(h=h*(l=="-"?-1:1)+a.number);let p=s.doc.line(Math.max(1,Math.min(s.doc.lines,h))),O=ie.cursor(p.from+Math.max(0,Math.min(d,p.length)));t.dispatch({effects:[Xf.of(!1),de.scrollIntoView(O.from,{y:"center"})],selection:O}),t.focus()}return{dom:r}}const Xf=_e.define(),S1=ln.define({create(){return!0},update(t,e){for(let n of e.effects)n.is(Xf)&&(t=n.value);return t},provide:t=>zl.from(t,e=>e?lm:null)}),FW=t=>{let e=Vl(t,lm);if(!e){let n=[Xf.of(!0)];t.state.field(S1,!1)==null&&n.push(_e.appendConfig.of([S1,ZW])),t.dispatch({effects:n}),e=Vl(t,lm)}return e&&e.dom.querySelector("input").select(),!0},ZW=de.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),WW={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},VW=me.define({combine(t){return Ci(t,WW,{highlightWordAroundCursor:(e,n)=>e||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function zW(t){return[qW,YW]}const LW=we.mark({class:"cm-selectionMatch"}),XW=we.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function w1(t,e,n,r){return(n==0||t(e.sliceDoc(n-1,n))!=Rt.Word)&&(r==e.doc.length||t(e.sliceDoc(r,r+1))!=Rt.Word)}function GW(t,e,n,r){return t(e.sliceDoc(n,n+1))==Rt.Word&&t(e.sliceDoc(r-1,r))==Rt.Word}const YW=Bt.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(VW),{state:n}=t,r=n.selection;if(r.ranges.length>1)return we.none;let i=r.main,o,s=null;if(i.empty){if(!e.highlightWordAroundCursor)return we.none;let l=n.wordAt(i.head);if(!l)return we.none;s=n.charCategorizer(i.head),o=n.sliceDoc(l.from,l.to)}else{let l=i.to-i.from;if(l<e.minSelectionLength||l>200)return we.none;if(e.wholeWords){if(o=n.sliceDoc(i.from,i.to),s=n.charCategorizer(i.head),!(w1(s,n,i.from,i.to)&&GW(s,n,i.from,i.to)))return we.none}else if(o=n.sliceDoc(i.from,i.to),!o)return we.none}let a=[];for(let l of t.visibleRanges){let c=new da(n.doc,o,l.from,l.to);for(;!c.next().done;){let{from:u,to:f}=c.value;if((!s||w1(s,n,u,f))&&(i.empty&&u<=i.from&&f>=i.to?a.push(XW.range(u,f)):(u>=i.to||f<=i.from)&&a.push(LW.range(u,f)),a.length>e.maxMatches))return we.none}}return we.set(a)}},{decorations:t=>t.decorations}),qW=de.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),UW=({state:t,dispatch:e})=>{let{selection:n}=t,r=ie.create(n.ranges.map(i=>t.wordAt(i.head)||ie.cursor(i.head)),n.mainIndex);return r.eq(n)?!1:(e(t.update({selection:r})),!0)};function HW(t,e){let{main:n,ranges:r}=t.selection,i=t.wordAt(n.head),o=i&&i.from==n.from&&i.to==n.to;for(let s=!1,a=new da(t.doc,e,r[r.length-1].to);;)if(a.next(),a.done){if(s)return null;a=new da(t.doc,e,0,Math.max(0,r[r.length-1].from-1)),s=!0}else{if(s&&r.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 JW=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(o=>o.from===o.to))return UW({state:t,dispatch:e});let r=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(o=>t.sliceDoc(o.from,o.to)!=r))return!1;let i=HW(t,r);return i?(e(t.update({selection:t.selection.addRange(ie.range(i.from,i.to),!1),effects:de.scrollIntoView(i.to)})),!0):!1},_a=me.define({combine(t){return Ci(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new uV(e),scrollToMatch:e=>de.scrollIntoView(e)})}});class mI{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||NW(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(n,r)=>r=="n"?`
670
+ `:r=="r"?"\r":r=="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 nV(this):new eV(this)}getCursor(e,n=0,r){let i=e.doc?e:Ue.create({doc:e});return r==null&&(r=i.doc.length),this.regexp?Is(this,i,n,r):Es(this,i,n,r)}}class OI{constructor(e){this.spec=e}}function Es(t,e,n,r){return new da(e.doc,t.unquoted,n,r,t.caseSensitive?void 0:i=>i.toLowerCase(),t.wholeWord?KW(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function KW(t,e){return(n,r,i,o)=>((o>n||o+i.length<r)&&(o=Math.max(0,n-2),i=t.sliceString(o,Math.min(t.length,r+2))),(e(Gf(i,n-o))!=Rt.Word||e(Yf(i,n-o))!=Rt.Word)&&(e(Yf(i,r-o))!=Rt.Word||e(Gf(i,r-o))!=Rt.Word))}class eV extends OI{constructor(e){super(e)}nextMatch(e,n,r){let i=Es(this.spec,e,r,e.doc.length).nextOverlapping();return i.done&&(i=Es(this.spec,e,0,n).nextOverlapping()),i.done?null:i.value}prevMatchInRange(e,n,r){for(let i=r;;){let o=Math.max(n,i-1e4-this.spec.unquoted.length),s=Es(this.spec,e,o,i),a=null;for(;!s.nextOverlapping().done;)a=s.value;if(a)return a;if(o==n)return null;i-=1e4}}prevMatch(e,n,r){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,n){let r=Es(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let o=Es(this.spec,e,Math.max(0,n-this.spec.unquoted.length),Math.min(r+this.spec.unquoted.length,e.doc.length));for(;!o.next().done;)i(o.value.from,o.value.to)}}function Is(t,e,n,r){return new pI(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?tV(e.charCategorizer(e.selection.main.head)):void 0},n,r)}function Gf(t,e){return t.slice(kn(t,e,!1),e)}function Yf(t,e){return t.slice(e,kn(t,e))}function tV(t){return(e,n,r)=>!r[0].length||(t(Gf(r.input,r.index))!=Rt.Word||t(Yf(r.input,r.index))!=Rt.Word)&&(t(Yf(r.input,r.index+r[0].length))!=Rt.Word||t(Gf(r.input,r.index+r[0].length))!=Rt.Word)}class nV extends OI{nextMatch(e,n,r){let i=Is(this.spec,e,r,e.doc.length).next();return i.done&&(i=Is(this.spec,e,0,n).next()),i.done?null:i.value}prevMatchInRange(e,n,r){for(let i=1;;i++){let o=Math.max(n,r-i*1e4),s=Is(this.spec,e,o,r),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,r){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,(n,r)=>r=="$"?"$":r=="&"?e.match[0]:r!="0"&&+r<e.match.length?e.match[r]:n)}matchAll(e,n){let r=Is(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let o=Is(this.spec,e,Math.max(0,n-250),Math.min(r+250,e.doc.length));for(;!o.next().done;)i(o.value.from,o.value.to)}}const Yl=_e.define(),ux=_e.define(),fo=ln.define({create(t){return new vp(cm(t).create(),null)},update(t,e){for(let n of e.effects)n.is(Yl)?t=new vp(n.value.create(),t.panel):n.is(ux)&&(t=new vp(t.query,n.value?fx:null));return t},provide:t=>zl.from(t,e=>e.panel)});class vp{constructor(e,n){this.query=e,this.panel=n}}const rV=we.mark({class:"cm-searchMatch"}),iV=we.mark({class:"cm-searchMatch cm-searchMatch-selected"}),oV=Bt.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(fo))}update(t){let e=t.state.field(fo);(e!=t.startState.field(fo)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return we.none;let{view:n}=this,r=new mo;for(let i=0,o=n.visibleRanges,s=o.length;i<s;i++){let{from:a,to:l}=o[i];for(;i<s-1&&l>o[i+1].from-2*250;)l=o[++i].to;t.highlight(n.state,a,l,(c,u)=>{let f=n.state.selection.ranges.some(d=>d.from==c&&d.to==u);r.add(c,u,f?iV:rV)})}return r.finish()}},{decorations:t=>t.decorations});function yc(t){return e=>{let n=e.state.field(fo,!1);return n&&n.query.spec.valid?t(e,n):yI(e)}}const qf=yc((t,{query:e})=>{let{to:n}=t.state.selection.main,r=e.nextMatch(t.state,n,n);if(!r)return!1;let i=ie.single(r.from,r.to),o=t.state.facet(_a);return t.dispatch({selection:i,effects:[dx(t,r),o.scrollToMatch(i.main,t)],userEvent:"select.search"}),vI(t),!0}),Uf=yc((t,{query:e})=>{let{state:n}=t,{from:r}=n.selection.main,i=e.prevMatch(n,r,r);if(!i)return!1;let o=ie.single(i.from,i.to),s=t.state.facet(_a);return t.dispatch({selection:o,effects:[dx(t,i),s.scrollToMatch(o.main,t)],userEvent:"select.search"}),vI(t),!0}),sV=yc((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:ie.create(n.map(r=>ie.range(r.from,r.to))),userEvent:"select.search.matches"}),!0)}),aV=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,o=[],s=0;for(let a=new da(t.doc,t.sliceDoc(r,i));!a.next().done;){if(o.length>1e3)return!1;a.value.from==r&&(s=o.length),o.push(ie.range(a.value.from,a.value.to))}return e(t.update({selection:ie.create(o,s),userEvent:"select.search.matches"})),!0},C1=yc((t,{query:e})=>{let{state:n}=t,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let o=e.nextMatch(n,r,r);if(!o)return!1;let s=[],a,l,c=[];if(o.from==r&&o.to==i&&(l=n.toText(e.getReplacement(o)),s.push({from:o.from,to:o.to,insert:l}),o=e.nextMatch(n,o.from,o.to),c.push(de.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(r).number)+"."))),o){let u=s.length==0||s[0].from>=o.to?0:o.to-o.from-l.length;a=ie.single(o.from-u,o.to-u),c.push(dx(t,o)),c.push(n.facet(_a).scrollToMatch(a.main,t))}return t.dispatch({changes:s,selection:a,effects:c,userEvent:"input.replace"}),!0}),lV=yc((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map(i=>{let{from:o,to:s}=i;return{from:o,to:s,insert:e.getReplacement(i)}});if(!n.length)return!1;let r=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:de.announce.of(r),userEvent:"input.replace.all"}),!0});function fx(t){return t.state.facet(_a).createPanel(t)}function cm(t,e){var n,r,i,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 c=t.facet(_a);return new mI({search:((n=e==null?void 0:e.literal)!==null&&n!==void 0?n:c.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:(r=e==null?void 0:e.caseSensitive)!==null&&r!==void 0?r:c.caseSensitive,literal:(i=e==null?void 0:e.literal)!==null&&i!==void 0?i:c.literal,regexp:(o=e==null?void 0:e.regexp)!==null&&o!==void 0?o:c.regexp,wholeWord:(s=e==null?void 0:e.wholeWord)!==null&&s!==void 0?s:c.wholeWord})}function xI(t){let e=Vl(t,fx);return e&&e.dom.querySelector("[main-field]")}function vI(t){let e=xI(t);e&&e==t.root.activeElement&&e.select()}const yI=t=>{let e=t.state.field(fo,!1);if(e&&e.panel){let n=xI(t);if(n&&n!=t.root.activeElement){let r=cm(t.state,e.query.spec);r.valid&&t.dispatch({effects:Yl.of(r)}),n.focus(),n.select()}}else t.dispatch({effects:[ux.of(!0),e?Yl.of(cm(t.state,e.query.spec)):_e.appendConfig.of(dV)]});return!0},bI=t=>{let e=t.state.field(fo,!1);if(!e||!e.panel)return!1;let n=Vl(t,fx);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:ux.of(!1)}),!0},cV=[{key:"Mod-f",run:yI,scope:"editor search-panel"},{key:"F3",run:qf,shift:Uf,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:qf,shift:Uf,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:bI,scope:"editor search-panel"},{key:"Mod-Shift-l",run:aV},{key:"Mod-Alt-g",run:FW},{key:"Mod-d",run:JW,preventDefault:!0}];class uV{constructor(e){this.view=e;let n=this.query=e.state.field(fo).query.spec;this.commit=this.commit.bind(this),this.searchField=At("input",{value:n.search,placeholder:or(e,"Find"),"aria-label":or(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=At("input",{value:n.replace,placeholder:or(e,"Replace"),"aria-label":or(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=At("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=At("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=At("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function r(i,o,s){return At("button",{class:"cm-button",name:i,onclick:o,type:"button"},s)}this.dom=At("div",{onkeydown:i=>this.keydown(i),class:"cm-search"},[this.searchField,r("next",()=>qf(e),[or(e,"next")]),r("prev",()=>Uf(e),[or(e,"previous")]),r("select",()=>sV(e),[or(e,"all")]),At("label",null,[this.caseField,or(e,"match case")]),At("label",null,[this.reField,or(e,"regexp")]),At("label",null,[this.wordField,or(e,"by word")]),...e.state.readOnly?[]:[At("br"),this.replaceField,r("replace",()=>C1(e),[or(e,"replace")]),r("replaceAll",()=>lV(e),[or(e,"replace all")])],At("button",{name:"close",onclick:()=>bI(e),"aria-label":or(e,"close"),type:"button"},["×"])])}commit(){let e=new mI({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:Yl.of(e)}))}keydown(e){xF(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?Uf:qf)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),C1(this.view))}update(e){for(let n of e.transactions)for(let r of n.effects)r.is(Yl)&&!r.value.eq(this.query)&&this.setQuery(r.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(_a).top}}function or(t,e){return t.state.phrase(e)}const yu=30,bu=/[\s\.,:;?!]/;function dx(t,{from:e,to:n}){let r=t.state.doc.lineAt(e),i=t.state.doc.lineAt(n).to,o=Math.max(r.from,e-yu),s=Math.min(i,n+yu),a=t.state.sliceDoc(o,s);if(o!=r.from){for(let l=0;l<yu;l++)if(!bu.test(a[l+1])&&bu.test(a[l])){a=a.slice(l);break}}if(s!=i){for(let l=a.length-1;l>a.length-yu;l--)if(!bu.test(a[l-1])&&bu.test(a[l])){a=a.slice(0,l);break}}return de.announce.of(`${t.state.phrase("current match")}. ${a} ${t.state.phrase("on line")} ${r.number}.`)}const fV=de.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"}}),dV=[fo,Si.low(oV),fV];class SI{constructor(e,n,r){this.state=e,this.pos=n,this.explicit=r,this.abortListeners=[]}tokenBefore(e){let n=Dt(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),r=Math.max(n.from,this.pos-250),i=n.text.slice(r-n.from,this.pos-n.from),o=i.search(CI(e,!1));return o<0?null:{from:r+o,to:this.pos,text:i.slice(o)}}get aborted(){return this.abortListeners==null}addEventListener(e,n){e=="abort"&&this.abortListeners&&this.abortListeners.push(n)}}function k1(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 hV(t){let e=Object.create(null),n=Object.create(null);for(let{label:i}of t){e[i[0]]=!0;for(let o=1;o<i.length;o++)n[i[o]]=!0}let r=k1(e)+k1(n)+"*$";return[new RegExp("^"+r),new RegExp(r)]}function wI(t){let e=t.map(i=>typeof i=="string"?{label:i}:i),[n,r]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:hV(e);return i=>{let o=i.matchBefore(r);return o||i.explicit?{from:o?o.from:i.pos,options:e,validFor:n}:null}}function pV(t,e){return n=>{for(let r=Dt(n.state).resolveInner(n.pos,-1);r;r=r.parent){if(t.indexOf(r.name)>-1)return null;if(r.type.isTop)break}return e(n)}}class A1{constructor(e,n,r,i){this.completion=e,this.source=n,this.match=r,this.score=i}}function ho(t){return t.selection.main.from}function CI(t,e){var n;let{source:r}=t,i=e&&r[0]!="^",o=r[r.length-1]!="$";return!i&&!o?t:new RegExp(`${i?"^":""}(?:${r})${o?"$":""}`,(n=t.flags)!==null&&n!==void 0?n:t.ignoreCase?"i":"")}const hx=wi.define();function gV(t,e,n,r){let{main:i}=t.selection,o=n-i.from,s=r-i.from;return Object.assign(Object.assign({},t.changeByRange(a=>a!=i&&n!=r&&t.sliceDoc(a.from+o,a.from+s)!=t.sliceDoc(n,r)?{range:a}:{changes:{from:a.from+o,to:r==i.from?a.to:a.from+s,insert:e},range:ie.cursor(a.from+o+e.length)})),{scrollIntoView:!0,userEvent:"input.complete"})}const P1=new WeakMap;function mV(t){if(!Array.isArray(t))return t;let e=P1.get(t);return e||P1.set(t,e=wI(t)),e}const Hf=_e.define(),ql=_e.define();class OV{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<e.length;){let r=bn(e,n),i=kr(r);this.chars.push(r);let o=e.slice(n,n+i),s=o.toUpperCase();this.folded.push(bn(s==o?o.toLowerCase():s,0)),n+=i}this.astral=e.length!=this.chars.length}ret(e,n){return this.score=e,this.matched=n,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:n,folded:r,any:i,precise:o,byWord:s}=this;if(n.length==1){let v=bn(e,0),y=kr(v),S=y==e.length?0:-100;if(v!=n[0])if(v==r[0])S+=-200;else return null;return this.ret(S,[0,y])}let a=e.indexOf(this.pattern);if(a==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let l=n.length,c=0;if(a<0){for(let v=0,y=Math.min(e.length,200);v<y&&c<l;){let S=bn(e,v);(S==n[c]||S==r[c])&&(i[c++]=v),v+=kr(S)}if(c<l)return null}let u=0,f=0,d=!1,h=0,p=-1,O=-1,m=/[a-z]/.test(e),x=!0;for(let v=0,y=Math.min(e.length,200),S=0;v<y&&f<l;){let b=bn(e,v);a<0&&(u<l&&b==n[u]&&(o[u++]=v),h<l&&(b==n[h]||b==r[h]?(h==0&&(p=v),O=v+1,h++):h=0));let w,C=b<255?b>=48&&b<=57||b>=97&&b<=122?2:b>=65&&b<=90?1:0:(w=MO(b))!=w.toLowerCase()?1:w!=w.toUpperCase()?2:0;(!v||C==1&&m||S==0&&C!=0)&&(n[f]==b||r[f]==b&&(d=!0)?s[f++]=v:s.length&&(x=!1)),S=C,v+=kr(b)}return f==l&&s[0]==0&&x?this.result(-100+(d?-200:0),s,e):h==l&&p==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]):h==l?this.ret(-900-e.length,[p,O]):f==l?this.result(-100+(d?-200:0)+-700+(x?0:-1100),s,e):n.length==2?null:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,n,r){let i=[],o=0;for(let s of n){let a=s+(this.astral?kr(bn(r,s)):1);o&&i[o-1]==s?i[o-1]=a:(i[o++]=s,i[o++]=a)}return this.ret(e-r.length,i)}}class xV{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let n=e.slice(0,this.pattern.length),r=n==this.pattern?0:n.toLowerCase()==this.folded?-200:null;return r==null?null:(this.matched=[0,n.length],this.score=r+(e.length==this.pattern.length?0:-100),this)}}const Cn=me.define({combine(t){return Ci(t,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:vV,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)=>r=>E1(e(r),n(r)),optionClass:(e,n)=>r=>E1(e(r),n(r)),addToOptions:(e,n)=>e.concat(n),filterStrict:(e,n)=>e||n})}});function E1(t,e){return t?e?t+" "+e:t:e}function vV(t,e,n,r,i,o){let s=t.textDirection==$t.RTL,a=s,l=!1,c="top",u,f,d=e.left-i.left,h=i.right-e.right,p=r.right-r.left,O=r.bottom-r.top;if(a&&d<Math.min(p,h)?a=!1:!a&&h<Math.min(p,d)&&(a=!0),p<=(a?d:h))u=Math.max(i.top,Math.min(n.top,i.bottom-O))-e.top,f=Math.min(400,a?d:h);else{l=!0,f=Math.min(400,(s?e.right:i.right-e.left)-30);let v=i.bottom-e.bottom;v>=O||v>e.top?u=n.bottom-e.top:(c="bottom",u=e.bottom-n.top)}let m=(e.bottom-e.top)/o.offsetHeight,x=(e.right-e.left)/o.offsetWidth;return{style:`${c}: ${u/m}px; max-width: ${f/x}px`,class:"cm-completionInfo-"+(l?s?"left-narrow":"right-narrow":a?"left":"right")}}function yV(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(n){let r=document.createElement("div");return r.classList.add("cm-completionIcon"),n.type&&r.classList.add(...n.type.split(/\s+/g).map(i=>"cm-completionIcon-"+i)),r.setAttribute("aria-hidden","true"),r},position:20}),e.push({render(n,r,i,o){let s=document.createElement("span");s.className="cm-completionLabel";let a=n.displayLabel||n.label,l=0;for(let c=0;c<o.length;){let u=o[c++],f=o[c++];u>l&&s.appendChild(document.createTextNode(a.slice(l,u)));let d=s.appendChild(document.createElement("span"));d.appendChild(document.createTextNode(a.slice(u,f))),d.className="cm-completionMatchedText",l=f}return l<a.length&&s.appendChild(document.createTextNode(a.slice(l))),s},position:50},{render(n){if(!n.detail)return null;let r=document.createElement("span");return r.className="cm-completionDetail",r.textContent=n.detail,r},position:80}),e.sort((n,r)=>n.position-r.position).map(n=>n.render)}function yp(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let i=Math.floor(e/n);return{from:i*n,to:(i+1)*n}}let r=Math.floor((t-e)/n);return{from:t-(r+1)*n,to:t-r*n}}class bV{constructor(e,n,r){this.view=e,this.stateField=n,this.applyCompletion=r,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:l=>this.placeInfo(l),key:this},this.space=null,this.currentClass="";let i=e.state.field(n),{options:o,selected:s}=i.open,a=e.state.facet(Cn);this.optionContent=yV(a),this.optionClass=a.optionClass,this.tooltipClass=a.tooltipClass,this.range=yp(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:c}=e.state.field(n).open;for(let u=l.target,f;u&&u!=this.dom;u=u.parentNode)if(u.nodeName=="LI"&&(f=/-(\d+)$/.exec(u.id))&&+f[1]<c.length){this.applyCompletion(e,c[+f[1]]),l.preventDefault();return}}),this.dom.addEventListener("focusout",l=>{let c=e.state.field(this.stateField,!1);c&&c.tooltip&&e.state.facet(Cn).closeOnBlur&&l.relatedTarget!=e.contentDOM&&e.dispatch({effects:ql.of(null)})}),this.showOptions(o,i.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 r=e.state.field(this.stateField),i=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),r!=i){let{options:o,selected:s,disabled:a}=r.open;(!i.open||i.open.options!=o)&&(this.range=yp(o.length,s,e.state.facet(Cn).maxRenderedOptions),this.showOptions(o,r.id)),this.updateSel(),a!=((n=i.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 r of this.currentClass.split(" "))r&&this.dom.classList.remove(r);for(let r of n.split(" "))r&&this.dom.classList.add(r);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.from||n.selected>=this.range.to)&&(this.range=yp(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:r}=n.options[n.selected],{info:i}=r;if(!i)return;let o=typeof i=="string"?document.createTextNode(i):i(r);if(!o)return;"then"in o?o.then(s=>{s&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(s,r)}).catch(s=>Zn(this.view.state,s,"completion info")):this.addInfoPane(o,r)}}addInfoPane(e,n){this.destroyInfo();let r=this.info=document.createElement("div");if(r.className="cm-tooltip cm-completionInfo",e.nodeType!=null)r.appendChild(e),this.infoDestroy=null;else{let{dom:i,destroy:o}=e;r.appendChild(i),this.infoDestroy=o||null}this.dom.appendChild(r),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let n=null;for(let r=this.list.firstChild,i=this.range.from;r;r=r.nextSibling,i++)r.nodeName!="LI"||!r.id?i--:i==e?r.hasAttribute("aria-selected")||(r.setAttribute("aria-selected","true"),n=r):r.hasAttribute("aria-selected")&&r.removeAttribute("aria-selected");return n&&wV(this.list,n),n}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let n=this.dom.getBoundingClientRect(),r=this.info.getBoundingClientRect(),i=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 i.top>Math.min(o.bottom,n.bottom)-10||i.bottom<Math.max(o.top,n.top)+10?null:this.view.state.facet(Cn).positionInfo(this.view,n,i,r,o,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,n,r){const i=document.createElement("ul");i.id=n,i.setAttribute("role","listbox"),i.setAttribute("aria-expanded","true"),i.setAttribute("aria-label",this.view.state.phrase("Completions"));let o=null;for(let s=r.from;s<r.to;s++){let{completion:a,match:l}=e[s],{section:c}=a;if(c){let d=typeof c=="string"?c:c.name;if(d!=o&&(s>r.from||r.from==0))if(o=d,typeof c!="string"&&c.header)i.appendChild(c.header(c));else{let h=i.appendChild(document.createElement("completion-section"));h.textContent=d}}const u=i.appendChild(document.createElement("li"));u.id=n+"-"+s,u.setAttribute("role","option");let f=this.optionClass(a);f&&(u.className=f);for(let d of this.optionContent){let h=d(a,this.view.state,this.view,l);h&&u.appendChild(h)}}return r.from&&i.classList.add("cm-completionListIncompleteTop"),r.to<e.length&&i.classList.add("cm-completionListIncompleteBottom"),i}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function SV(t,e){return n=>new bV(n,t,e)}function wV(t,e){let n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=n.height/t.offsetHeight;r.top<n.top?t.scrollTop-=(n.top-r.top)/i:r.bottom>n.bottom&&(t.scrollTop+=(r.bottom-n.bottom)/i)}function I1(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function CV(t,e){let n=[],r=null,i=c=>{n.push(c);let{section:u}=c.completion;if(u){r||(r=[]);let f=typeof u=="string"?u:u.name;r.some(d=>d.name==f)||r.push(typeof u=="string"?{name:f}:u)}},o=e.facet(Cn);for(let c of t)if(c.hasResult()){let u=c.result.getMatch;if(c.result.filter===!1)for(let f of c.result.options)i(new A1(f,c.source,u?u(f):[],1e9-n.length));else{let f=e.sliceDoc(c.from,c.to),d,h=o.filterStrict?new xV(f):new OV(f);for(let p of c.result.options)if(d=h.match(p.label)){let O=p.displayLabel?u?u(p,d.matched):[]:d.matched;i(new A1(p,c.source,O,d.score+(p.boost||0)))}}}if(r){let c=Object.create(null),u=0,f=(d,h)=>{var p,O;return((p=d.rank)!==null&&p!==void 0?p:1e9)-((O=h.rank)!==null&&O!==void 0?O:1e9)||(d.name<h.name?-1:1)};for(let d of r.sort(f))u-=1e5,c[d.name]=u;for(let d of n){let{section:h}=d.completion;h&&(d.score+=c[typeof h=="string"?h:h.name])}}let s=[],a=null,l=o.compareCompletions;for(let c of n.sort((u,f)=>f.score-u.score||l(u.completion,f.completion))){let u=c.completion;!a||a.label!=u.label||a.detail!=u.detail||a.type!=null&&u.type!=null&&a.type!=u.type||a.apply!=u.apply||a.boost!=u.boost?s.push(c):I1(c.completion)>I1(a)&&(s[s.length-1]=c),a=c.completion}return s}class Bs{constructor(e,n,r,i,o,s){this.options=e,this.attrs=n,this.tooltip=r,this.timestamp=i,this.selected=o,this.disabled=s}setSelected(e,n){return e==this.selected||e>=this.options.length?this:new Bs(this.options,T1(n,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,n,r,i,o){let s=CV(e,n);if(!s.length)return i&&e.some(l=>l.state==1)?new Bs(i.options,i.attrs,i.tooltip,i.timestamp,i.selected,!0):null;let a=n.facet(Cn).selectOnOpen?0:-1;if(i&&i.selected!=a&&i.selected!=-1){let l=i.options[i.selected].completion;for(let c=0;c<s.length;c++)if(s[c].completion==l){a=c;break}}return new Bs(s,T1(r,a),{pos:e.reduce((l,c)=>c.hasResult()?Math.min(l,c.from):l,1e8),create:IV,above:o.aboveCursor},i?i.timestamp:Date.now(),a,!1)}map(e){return new Bs(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class Jf{constructor(e,n,r){this.active=e,this.id=n,this.open=r}static start(){return new Jf(PV,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:n}=e,r=n.facet(Cn),o=(r.override||n.languageDataAt("autocomplete",ho(n)).map(mV)).map(a=>(this.active.find(c=>c.source==a)||new Nn(a,this.active.some(c=>c.state!=0)?1:0)).update(e,r));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))||!kV(o,this.active)?s=Bs.build(o,n,this.id,s,r):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 Nn(a.source,0):a));for(let a of e.effects)a.is(AI)&&(s=s&&s.setSelected(a.value,this.id));return o==this.active&&s==this.open?this:new Jf(o,this.id,s)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:AV}}function kV(t,e){if(t==e)return!0;for(let n=0,r=0;;){for(;n<t.length&&!t[n].hasResult;)n++;for(;r<e.length&&!e[r].hasResult;)r++;let i=n==t.length,o=r==e.length;if(i||o)return i==o;if(t[n++].result!=e[r++].result)return!1}}const AV={"aria-autocomplete":"list"};function T1(t,e){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":t};return e>-1&&(n["aria-activedescendant"]=t+"-"+e),n}const PV=[];function um(t,e){if(t.isUserEvent("input.complete")){let n=t.annotation(hx);if(n&&e.activateOnCompletion(n))return"input"}return t.isUserEvent("input.type")?"input":t.isUserEvent("delete.backward")?"delete":null}class Nn{constructor(e,n,r=-1){this.source=e,this.state=n,this.explicitPos=r}hasResult(){return!1}update(e,n){let r=um(e,n),i=this;r?i=i.handleUserEvent(e,r,n):e.docChanged?i=i.handleChange(e):e.selection&&i.state!=0&&(i=new Nn(i.source,0));for(let o of e.effects)if(o.is(Hf))i=new Nn(i.source,1,o.value?ho(e.state):-1);else if(o.is(ql))i=new Nn(i.source,0);else if(o.is(kI))for(let s of o.value)s.source==i.source&&(i=s);return i}handleUserEvent(e,n,r){return n=="delete"||!r.activateOnTyping?this.map(e.changes):new Nn(this.source,1)}handleChange(e){return e.changes.touchesRange(ho(e.startState))?new Nn(this.source,0):this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new Nn(this.source,this.state,e.mapPos(this.explicitPos))}}class Hs extends Nn{constructor(e,n,r,i,o){super(e,2,n),this.result=r,this.from=i,this.to=o}hasResult(){return!0}handleUserEvent(e,n,r){var i;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=ho(e.state);if((this.explicitPos<0?l<=s:l<this.from)||l>a||!o||n=="delete"&&ho(e.startState)==this.from)return new Nn(this.source,n=="input"&&r.activateOnTyping?1:0);let c=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos);return EV(o.validFor,e.state,s,a)?new Hs(this.source,c,o,s,a):o.update&&(o=o.update(o,s,a,new SI(e.state,l,c>=0)))?new Hs(this.source,c,o,o.from,(i=o.to)!==null&&i!==void 0?i:ho(e.state)):new Nn(this.source,1,c)}handleChange(e){return e.changes.touchesRange(this.from,this.to)?new Nn(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 Hs(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new Nn(this.source,0)}}function EV(t,e,n,r){if(!t)return!1;let i=e.sliceDoc(n,r);return typeof t=="function"?t(i,n,r,e):CI(t,!0).test(i)}const kI=_e.define({map(t,e){return t.map(n=>n.map(e))}}),AI=_e.define(),Un=ln.define({create(){return Jf.start()},update(t,e){return t.update(e)},provide:t=>[qO.from(t,e=>e.tooltip),de.contentAttributes.from(t,e=>e.attrs)]});function px(t,e){const n=e.completion.apply||e.completion.label;let r=t.state.field(Un).active.find(i=>i.source==e.source);return r instanceof Hs?(typeof n=="string"?t.dispatch(Object.assign(Object.assign({},gV(t.state,n,r.from,r.to)),{annotations:hx.of(e.completion)})):n(t,e.completion,r.from,r.to),!0):!1}const IV=SV(Un,px);function Su(t,e="option"){return n=>{let r=n.state.field(Un,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(Cn).interactionDelay)return!1;let i=1,o;e=="page"&&(o=sE(n,r.open.tooltip))&&(i=Math.max(2,Math.floor(o.dom.offsetHeight/o.dom.querySelector("li").offsetHeight)-1));let{length:s}=r.open.options,a=r.open.selected>-1?r.open.selected+i*(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:AI.of(a)}),!0}}const PI=t=>{let e=t.state.field(Un,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<t.state.facet(Cn).interactionDelay?!1:px(t,e.open.options[e.open.selected])},TV=t=>t.state.field(Un,!1)?(t.dispatch({effects:Hf.of(!0)}),!0):!1,$V=t=>{let e=t.state.field(Un,!1);return!e||!e.active.some(n=>n.state!=0)?!1:(t.dispatch({effects:ql.of(null)}),!0)};class jV{constructor(e,n){this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const RV=50,DV=1e3,QV=Bt.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(Un).active)e.state==1&&this.startQuery(e)}update(t){let e=t.state.field(Un),n=t.state.facet(Cn);if(!t.selectionSet&&!t.docChanged&&t.startState.field(Un)==e)return;let r=t.transactions.some(o=>(o.selection||o.docChanged)&&!um(o,n));for(let o=0;o<this.running.length;o++){let s=this.running[o];if(r||s.updates.length+t.transactions.length>RV&&Date.now()-s.time>DV){for(let a of s.context.abortListeners)try{a()}catch(l){Zn(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(Hf)))&&(this.pendingStart=!0);let i=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(),i):-1,this.composing!=0)for(let o of t.transactions)um(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(Un);for(let n of e.active)n.state==1&&!this.running.some(r=>r.active.source==n.source)&&this.startQuery(n)}startQuery(t){let{state:e}=this.view,n=ho(e),r=new SI(e,n,t.explicitPos==n),i=new jV(t,r);this.running.push(i),Promise.resolve(t.source(r)).then(o=>{i.context.aborted||(i.done=o||null,this.scheduleAccept())},o=>{this.view.dispatch({effects:ql.of(null)}),Zn(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 r=0;r<this.running.length;r++){let i=this.running[r];if(i.done===void 0)continue;if(this.running.splice(r--,1),i.done){let s=new Hs(i.active.source,i.active.explicitPos,i.done,i.done.from,(t=i.done.to)!==null&&t!==void 0?t:ho(i.updates.length?i.updates[0].startState:this.view.state));for(let a of i.updates)s=s.update(a,n);if(s.hasResult()){e.push(s);continue}}let o=this.view.state.field(Un).active.find(s=>s.source==i.active.source);if(o&&o.state==1)if(i.done==null){let s=new Nn(i.active.source,0);for(let a of i.updates)s=s.update(a,n);s.state!=1&&e.push(s)}else this.startQuery(o)}e.length&&this.view.dispatch({effects:kI.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(Un,!1);if(e&&e.tooltip&&this.view.state.facet(Cn).closeOnBlur){let n=e.open&&sE(this.view,e.open.tooltip);(!n||!n.dom.contains(t.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:ql.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:Hf.of(!1)}),20),this.composing=0}}}),BV=typeof navigator=="object"&&/Win/.test(navigator.platform),_V=Si.highest(de.domEventHandlers({keydown(t,e){let n=e.state.field(Un,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||t.key.length>1||t.ctrlKey&&!(BV&&t.altKey)||t.metaKey)return!1;let r=n.open.options[n.open.selected],i=n.active.find(s=>s.source==r.source),o=r.completion.commitCharacters||i.result.commitCharacters;return o&&o.indexOf(t.key)>-1&&px(e,r),!1}})),EI=de.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 MV{constructor(e,n,r,i){this.field=e,this.line=n,this.from=r,this.to=i}}class gx{constructor(e,n,r){this.field=e,this.from=n,this.to=r}map(e){let n=e.mapPos(this.from,-1,wn.TrackDel),r=e.mapPos(this.to,1,wn.TrackDel);return n==null||r==null?null:new gx(this.field,n,r)}}class mx{constructor(e,n){this.lines=e,this.fieldPositions=n}instantiate(e,n){let r=[],i=[n],o=e.doc.lineAt(n),s=/^\s*/.exec(o.text)[0];for(let l of this.lines){if(r.length){let c=s,u=/^\t*/.exec(l)[0].length;for(let f=0;f<u;f++)c+=e.facet(Oc);i.push(n+c.length-u),l=c+l.slice(u)}r.push(l),n+=l.length+1}let a=this.fieldPositions.map(l=>new gx(l.field,i[l.line]+l.from,i[l.line]+l.to));return{text:r,ranges:a}}static parse(e){let n=[],r=[],i=[],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]||"",c=-1;for(let u=0;u<n.length;u++)(a!=null?n[u].seq==a:l&&n[u].name==l)&&(c=u);if(c<0){let u=0;for(;u<n.length&&(a==null||n[u].seq!=null&&n[u].seq<a);)u++;n.splice(u,0,{seq:a,name:l}),c=u;for(let f of i)f.field>=c&&f.field++}i.push(new MV(c,r.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 i)l.line==r.length&&l.from>a.index&&(l.from--,l.to--)}r.push(s)}return new mx(r,i)}}let NV=we.widget({widget:new class extends ki{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),FV=we.mark({class:"cm-snippetField"});class Ma{constructor(e,n){this.ranges=e,this.active=n,this.deco=we.set(e.map(r=>(r.from==r.to?NV:FV).range(r.from,r.to)))}map(e){let n=[];for(let r of this.ranges){let i=r.map(e);if(!i)return null;n.push(i)}return new Ma(n,this.active)}selectionInsideField(e){return e.ranges.every(n=>this.ranges.some(r=>r.field==this.active&&r.from<=n.from&&r.to>=n.to))}}const bc=_e.define({map(t,e){return t&&t.map(e)}}),ZV=_e.define(),Ul=ln.define({create(){return null},update(t,e){for(let n of e.effects){if(n.is(bc))return n.value;if(n.is(ZV)&&t)return new Ma(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=>de.decorations.from(t,e=>e?e.deco:we.none)});function Ox(t,e){return ie.create(t.filter(n=>n.field==e).map(n=>ie.range(n.from,n.to)))}function WV(t){let e=mx.parse(t);return(n,r,i,o)=>{let{text:s,ranges:a}=e.instantiate(n.state,i),l={changes:{from:i,to:o,insert:st.of(s)},scrollIntoView:!0,annotations:r?[hx.of(r),qt.userEvent.of("input.complete")]:void 0};if(a.length&&(l.selection=Ox(a,0)),a.some(c=>c.field>0)){let c=new Ma(a,0),u=l.effects=[bc.of(c)];n.state.field(Ul,!1)===void 0&&u.push(_e.appendConfig.of([Ul,GV,YV,EI]))}n.dispatch(n.state.update(l))}}function II(t){return({state:e,dispatch:n})=>{let r=e.field(Ul,!1);if(!r||t<0&&r.active==0)return!1;let i=r.active+t,o=t>0&&!r.ranges.some(s=>s.field==i+t);return n(e.update({selection:Ox(r.ranges,i),effects:bc.of(o?null:new Ma(r.ranges,i)),scrollIntoView:!0})),!0}}const VV=({state:t,dispatch:e})=>t.field(Ul,!1)?(e(t.update({effects:bc.of(null)})),!0):!1,zV=II(1),LV=II(-1),XV=[{key:"Tab",run:zV,shift:LV},{key:"Escape",run:VV}],$1=me.define({combine(t){return t.length?t[0]:XV}}),GV=Si.highest($a.compute([$1],t=>t.facet($1)));function qn(t,e){return Object.assign(Object.assign({},e),{apply:WV(t)})}const YV=de.domEventHandlers({mousedown(t,e){let n=e.state.field(Ul,!1),r;if(!n||(r=e.posAtCoords({x:t.clientX,y:t.clientY}))==null)return!1;let i=n.ranges.find(o=>o.from<=r&&o.to>=r);return!i||i.field==n.active?!1:(e.dispatch({selection:Ox(n.ranges,i.field),effects:bc.of(n.ranges.some(o=>o.field>i.field)?new Ma(n.ranges,i.field):null),scrollIntoView:!0}),!0)}}),Hl={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Xo=_e.define({map(t,e){let n=e.mapPos(t,-1,wn.TrackAfter);return n??void 0}}),xx=new class extends Ko{};xx.startSide=1;xx.endSide=-1;const TI=ln.define({create(){return et.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:r=>r>=n.from&&r<=n.to})}for(let n of e.effects)n.is(Xo)&&(t=t.update({add:[xx.range(n.value,n.value+1)]}));return t}});function qV(){return[HV,TI]}const bp="()[]{}<>";function $I(t){for(let e=0;e<bp.length;e+=2)if(bp.charCodeAt(e)==t)return bp.charAt(e+1);return MO(t<128?t:t+1)}function jI(t,e){return t.languageDataAt("closeBrackets",e)[0]||Hl}const UV=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),HV=de.inputHandler.of((t,e,n,r)=>{if((UV?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let i=t.state.selection.main;if(r.length>2||r.length==2&&kr(bn(r,0))==1||e!=i.from||n!=i.to)return!1;let o=e7(t.state,r);return o?(t.dispatch(o),!0):!1}),JV=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let r=jI(t,t.selection.main.head).brackets||Hl.brackets,i=null,o=t.changeByRange(s=>{if(s.empty){let a=t7(t.doc,s.head);for(let l of r)if(l==a&&eh(t.doc,s.head)==$I(bn(l,0)))return{changes:{from:s.head-l.length,to:s.head+l.length},range:ie.cursor(s.head-l.length)}}return{range:i=s}});return i||e(t.update(o,{scrollIntoView:!0,userEvent:"delete.backward"})),!i},KV=[{key:"Backspace",run:JV}];function e7(t,e){let n=jI(t,t.selection.main.head),r=n.brackets||Hl.brackets;for(let i of r){let o=$I(bn(i,0));if(e==i)return o==i?i7(t,i,r.indexOf(i+i+i)>-1,n):n7(t,i,o,n.before||Hl.before);if(e==o&&RI(t,t.selection.main.from))return r7(t,i,o)}return null}function RI(t,e){let n=!1;return t.field(TI).between(0,t.doc.length,r=>{r==e&&(n=!0)}),n}function eh(t,e){let n=t.sliceString(e,e+2);return n.slice(0,kr(bn(n,0)))}function t7(t,e){let n=t.sliceString(e-2,e);return kr(bn(n,0))==n.length?n:n.slice(1)}function n7(t,e,n,r){let i=null,o=t.changeByRange(s=>{if(!s.empty)return{changes:[{insert:e,from:s.from},{insert:n,from:s.to}],effects:Xo.of(s.to+e.length),range:ie.range(s.anchor+e.length,s.head+e.length)};let a=eh(t.doc,s.head);return!a||/\s/.test(a)||r.indexOf(a)>-1?{changes:{insert:e+n,from:s.head},effects:Xo.of(s.head+e.length),range:ie.cursor(s.head+e.length)}:{range:i=s}});return i?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function r7(t,e,n){let r=null,i=t.changeByRange(o=>o.empty&&eh(t.doc,o.head)==n?{changes:{from:o.head,to:o.head+n.length,insert:n},range:ie.cursor(o.head+n.length)}:r={range:o});return r?null:t.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function i7(t,e,n,r){let i=r.stringPrefixes||Hl.stringPrefixes,o=null,s=t.changeByRange(a=>{if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:e,from:a.to}],effects:Xo.of(a.to+e.length),range:ie.range(a.anchor+e.length,a.head+e.length)};let l=a.head,c=eh(t.doc,l),u;if(c==e){if(j1(t,l))return{changes:{insert:e+e,from:l},effects:Xo.of(l+e.length),range:ie.cursor(l+e.length)};if(RI(t,l)){let d=n&&t.sliceDoc(l,l+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:l,to:l+d.length,insert:d},range:ie.cursor(l+d.length)}}}else{if(n&&t.sliceDoc(l-2*e.length,l)==e+e&&(u=R1(t,l-2*e.length,i))>-1&&j1(t,u))return{changes:{insert:e+e+e+e,from:l},effects:Xo.of(l+e.length),range:ie.cursor(l+e.length)};if(t.charCategorizer(l)(c)!=Rt.Word&&R1(t,l,i)>-1&&!o7(t,l,e,i))return{changes:{insert:e+e,from:l},effects:Xo.of(l+e.length),range:ie.cursor(l+e.length)}}return{range:o=a}});return o?null:t.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function j1(t,e){let n=Dt(t).resolveInner(e+1);return n.parent&&n.from==e}function o7(t,e,n,r){let i=Dt(t).resolveInner(e,-1),o=r.reduce((s,a)=>Math.max(s,a.length),0);for(let s=0;s<5;s++){let a=t.sliceDoc(i.from,Math.min(i.to,i.from+n.length+o)),l=a.indexOf(n);if(!l||l>-1&&r.indexOf(a.slice(0,l))>-1){let u=i.firstChild;for(;u&&u.from==i.from&&u.to-u.from>n.length+l;){if(t.sliceDoc(u.to-n.length,u.to)==n)return!1;u=u.firstChild}return!0}let c=i.to==e&&i.parent;if(!c)break;i=c}return!1}function R1(t,e,n){let r=t.charCategorizer(e);if(r(t.sliceDoc(e-1,e))!=Rt.Word)return e;for(let i of n){let o=e-i.length;if(t.sliceDoc(o,e)==i&&r(t.sliceDoc(o-1,o))!=Rt.Word)return o}return-1}function s7(t={}){return[_V,Un,Cn.of(t),QV,a7,EI]}const DI=[{key:"Ctrl-Space",run:TV},{key:"Escape",run:$V},{key:"ArrowDown",run:Su(!0)},{key:"ArrowUp",run:Su(!1)},{key:"PageDown",run:Su(!0,"page")},{key:"PageUp",run:Su(!1,"page")},{key:"Enter",run:PI}],a7=Si.highest($a.computeN([Cn],t=>t.facet(Cn).defaultKeymap?[DI]:[]));class l7{constructor(e,n,r){this.from=e,this.to=n,this.diagnostic=r}}class Lo{constructor(e,n,r){this.diagnostics=e,this.panel=n,this.selected=r}static init(e,n,r){let i=e,o=r.facet(ao).markerFilter;o&&(i=o(i,r));let s=we.set(i.map(a=>a.from==a.to||a.from==a.to-1&&r.doc.lineAt(a.from).to==a.from?we.widget({widget:new v7(a),diagnostic:a}).range(a.from):we.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 Lo(s,n,ha(s))}}function ha(t,e=null,n=0){let r=null;return t.between(n,1e9,(i,o,{spec:s})=>{if(!(e&&s.diagnostic!=e))return r=new l7(i,o,s.diagnostic),!1}),r}function c7(t,e){let n=e.pos,r=e.end||n,i=t.state.facet(ao).hideOn(t,n,r);if(i!=null)return i;let o=t.startState.doc.lineAt(e.pos);return!!(t.effects.some(s=>s.is(vx))||t.changes.touchesRange(o.from,Math.max(o.to,r)))}function QI(t,e){return t.field(gr,!1)?e:e.concat(_e.appendConfig.of(NI))}function u7(t,e){return{effects:QI(t,[vx.of(e)])}}const vx=_e.define(),yx=_e.define(),BI=_e.define(),gr=ln.define({create(){return new Lo(we.none,null,null)},update(t,e){if(e.docChanged){let n=t.diagnostics.map(e.changes),r=null;if(t.selected){let i=e.changes.mapPos(t.selected.from,1);r=ha(n,t.selected.diagnostic,i)||ha(n,null,i)}t=new Lo(n,t.panel,r)}for(let n of e.effects)n.is(vx)?t=Lo.init(n.value,t.panel,e.state):n.is(yx)?t=new Lo(t.diagnostics,n.value?th.open:null,t.selected):n.is(BI)&&(t=new Lo(t.diagnostics,t.panel,n.value));return t},provide:t=>[zl.from(t,e=>e.panel),de.decorations.from(t,e=>e.diagnostics)]}),f7=we.mark({class:"cm-lintRange cm-lintRange-active",inclusive:!0});function d7(t,e,n){let{diagnostics:r}=t.state.field(gr),i=[],o=2e8,s=0;r.between(e-(n<0?1:0),e+(n>0?1:0),(l,c,{spec:u})=>{e>=l&&e<=c&&(l==c||(e>l||n>0)&&(e<c||n<0))&&(i.push(u.diagnostic),o=Math.min(l,o),s=Math.max(c,s))});let a=t.state.facet(ao).tooltipFilter;return a&&(i=a(i,t.state)),i.length?{pos:o,end:s,above:t.state.doc.lineAt(o).to<s,create(){return{dom:h7(t,i)}}}:null}function h7(t,e){return At("ul",{class:"cm-tooltip-lint"},e.map(n=>MI(t,n,!1)))}const p7=t=>{let e=t.state.field(gr,!1);(!e||!e.panel)&&t.dispatch({effects:QI(t.state,[yx.of(!0)])});let n=Vl(t,th.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},D1=t=>{let e=t.state.field(gr,!1);return!e||!e.panel?!1:(t.dispatch({effects:yx.of(!1)}),!0)},g7=t=>{let e=t.state.field(gr,!1);if(!e)return!1;let n=t.state.selection.main,r=e.diagnostics.iter(n.to+1);return!r.value&&(r=e.diagnostics.iter(0),!r.value||r.from==n.from&&r.to==n.to)?!1:(t.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)},m7=[{key:"Mod-Shift-m",run:p7,preventDefault:!0},{key:"F8",run:g7}],O7=Bt.fromClass(class{constructor(t){this.view=t,this.timeout=-1,this.set=!0;let{delay:e}=t.state.facet(ao);this.lintTime=Date.now()+e,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,e)}run(){let t=Date.now();if(t<this.lintTime-10)this.timeout=setTimeout(this.run,this.lintTime-t);else{this.set=!1;let{state:e}=this.view,{sources:n}=e.facet(ao);n.length&&Promise.all(n.map(r=>Promise.resolve(r(this.view)))).then(r=>{let i=r.reduce((o,s)=>o.concat(s));this.view.state.doc==e.doc&&this.view.dispatch(u7(this.view.state,i))},r=>{Zn(this.view.state,r)})}}update(t){let e=t.state.facet(ao);(t.docChanged||e!=t.startState.facet(ao)||e.needsRefresh&&e.needsRefresh(t))&&(this.lintTime=Date.now()+e.delay,this.set||(this.set=!0,this.timeout=setTimeout(this.run,e.delay)))}force(){this.set&&(this.lintTime=Date.now(),this.run())}destroy(){clearTimeout(this.timeout)}}),ao=me.define({combine(t){return Object.assign({sources:t.map(e=>e.source).filter(e=>e!=null)},Ci(t.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,n)=>e?n?r=>e(r)||n(r):e:n}))}});function x7(t,e={}){return[ao.of({source:t,config:e}),O7,NI]}function _I(t){let e=[];if(t)e:for(let{name:n}of t){for(let r=0;r<n.length;r++){let i=n[r];if(/[a-zA-Z]/.test(i)&&!e.some(o=>o.toLowerCase()==i.toLowerCase())){e.push(i);continue e}}e.push("")}return e}function MI(t,e,n){var r;let i=n?_I(e.actions):[];return At("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},At("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(t):e.message),(r=e.actions)===null||r===void 0?void 0:r.map((o,s)=>{let a=!1,l=d=>{if(d.preventDefault(),a)return;a=!0;let h=ha(t.state.field(gr).diagnostics,e);h&&o.apply(t,h.from,h.to)},{name:c}=o,u=i[s]?c.indexOf(i[s]):-1,f=u<0?c:[c.slice(0,u),At("u",c.slice(u,u+1)),c.slice(u+1)];return At("button",{type:"button",class:"cm-diagnosticAction",onclick:l,onmousedown:l,"aria-label":` Action: ${c}${u<0?"":` (access key "${i[s]})"`}.`},f)}),e.source&&At("div",{class:"cm-diagnosticSource"},e.source))}class v7 extends ki{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return At("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class Q1{constructor(e,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=MI(e,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class th{constructor(e){this.view=e,this.items=[];let n=i=>{if(i.keyCode==27)D1(this.view),this.view.focus();else if(i.keyCode==38||i.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(i.keyCode==40||i.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(i.keyCode==36)this.moveSelection(0);else if(i.keyCode==35)this.moveSelection(this.items.length-1);else if(i.keyCode==13)this.view.focus();else if(i.keyCode>=65&&i.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:o}=this.items[this.selectedIndex],s=_I(o.actions);for(let a=0;a<s.length;a++)if(s[a].toUpperCase().charCodeAt(0)==i.keyCode){let l=ha(this.view.state.field(gr).diagnostics,o);l&&o.actions[a].apply(e,l.from,l.to)}}else return;i.preventDefault()},r=i=>{for(let o=0;o<this.items.length;o++)this.items[o].dom.contains(i.target)&&this.moveSelection(o)};this.list=At("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:n,onclick:r}),this.dom=At("div",{class:"cm-panel-lint"},this.list,At("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>D1(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(gr).selected;if(!e)return-1;for(let n=0;n<this.items.length;n++)if(this.items[n].diagnostic==e.diagnostic)return n;return-1}update(){let{diagnostics:e,selected:n}=this.view.state.field(gr),r=0,i=!1,o=null;for(e.between(0,this.view.state.doc.length,(s,a,{spec:l})=>{let c=-1,u;for(let f=r;f<this.items.length;f++)if(this.items[f].diagnostic==l.diagnostic){c=f;break}c<0?(u=new Q1(this.view,l.diagnostic),this.items.splice(r,0,u),i=!0):(u=this.items[c],c>r&&(this.items.splice(r,c-r),i=!0)),n&&u.diagnostic==n.diagnostic?u.dom.hasAttribute("aria-selected")||(u.dom.setAttribute("aria-selected","true"),o=u):u.dom.hasAttribute("aria-selected")&&u.dom.removeAttribute("aria-selected"),r++});r<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)i=!0,this.items.pop();this.items.length==0&&(this.items.push(new Q1(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),i=!0),o?(this.list.setAttribute("aria-activedescendant",o.id),this.view.requestMeasure({key:this,read:()=>({sel:o.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:s,panel:a})=>{let l=a.height/this.list.offsetHeight;s.top<a.top?this.list.scrollTop-=(a.top-s.top)/l:s.bottom>a.bottom&&(this.list.scrollTop+=(s.bottom-a.bottom)/l)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}sync(){let e=this.list.firstChild;function n(){let r=e;e=r.nextSibling,r.remove()}for(let r of this.items)if(r.dom.parentNode==this.list){for(;e!=r.dom;)n();e=r.dom.nextSibling}else this.list.insertBefore(r.dom,e);for(;e;)n()}moveSelection(e){if(this.selectedIndex<0)return;let n=this.view.state.field(gr),r=ha(n.diagnostics,this.items[e].diagnostic);r&&this.view.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:BI.of(r)})}static open(e){return new th(e)}}function y7(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(t)}</svg>')`}function wu(t){return y7(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${t}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const b7=de.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:wu("#d11")},".cm-lintRange-warning":{backgroundImage:wu("orange")},".cm-lintRange-info":{backgroundImage:wu("#999")},".cm-lintRange-hint":{backgroundImage:wu("#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}}}),NI=[gr,de.decorations.compute([gr],t=>{let{selected:e,panel:n}=t.field(gr);return!e||!n||e.from==e.to?we.none:we.set([f7.range(e.from,e.to)])}),oZ(d7,{hideOn:c7}),b7];var B1=function(e){e===void 0&&(e={});var{crosshairCursor:n=!1}=e,r=[];e.closeBracketsKeymap!==!1&&(r=r.concat(KV)),e.defaultKeymap!==!1&&(r=r.concat(_W)),e.searchKeymap!==!1&&(r=r.concat(cV)),e.historyKeymap!==!1&&(r=r.concat(X6)),e.foldKeymap!==!1&&(r=r.concat(a6)),e.completionKeymap!==!1&&(r=r.concat(DI)),e.lintKeymap!==!1&&(r=r.concat(m7));var i=[];return e.lineNumbers!==!1&&i.push(pZ()),e.highlightActiveLineGutter!==!1&&i.push(OZ()),e.highlightSpecialChars!==!1&&i.push(DF()),e.history!==!1&&i.push(_6()),e.foldGutter!==!1&&i.push(f6()),e.drawSelection!==!1&&i.push(CF()),e.dropCursor!==!1&&i.push(IF()),e.allowMultipleSelections!==!1&&i.push(Ue.allowMultipleSelections.of(!0)),e.indentOnInput!==!1&&i.push(JZ()),e.syntaxHighlighting!==!1&&i.push(ix(g6,{fallback:!0})),e.bracketMatching!==!1&&i.push(S6()),e.closeBrackets!==!1&&i.push(qV()),e.autocompletion!==!1&&i.push(s7()),e.rectangularSelection!==!1&&i.push(YF()),n!==!1&&i.push(HF()),e.highlightActiveLine!==!1&&i.push(FF()),e.highlightSelectionMatches!==!1&&i.push(zW()),e.tabSize&&typeof e.tabSize=="number"&&i.push(Oc.of(" ".repeat(e.tabSize))),i.concat([$a.of(r.flat())]).filter(Boolean)};const S7="#e5c07b",_1="#e06c75",w7="#56b6c2",C7="#ffffff",qu="#abb2bf",fm="#7d8799",k7="#61afef",A7="#98c379",M1="#d19a66",P7="#c678dd",E7="#21252b",N1="#2c313a",F1="#282c34",Sp="#353a42",I7="#3E4451",Z1="#528bff",T7=de.theme({"&":{color:qu,backgroundColor:F1},".cm-content":{caretColor:Z1},".cm-cursor, .cm-dropCursor":{borderLeftColor:Z1},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:I7},".cm-panels":{backgroundColor:E7,color:qu},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:F1,color:fm,border:"none"},".cm-activeLineGutter":{backgroundColor:N1},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:Sp},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Sp,borderBottomColor:Sp},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:N1,color:qu}}},{dark:!0}),$7=Qa.define([{tag:P.keyword,color:P7},{tag:[P.name,P.deleted,P.character,P.propertyName,P.macroName],color:_1},{tag:[P.function(P.variableName),P.labelName],color:k7},{tag:[P.color,P.constant(P.name),P.standard(P.name)],color:M1},{tag:[P.definition(P.name),P.separator],color:qu},{tag:[P.typeName,P.className,P.number,P.changed,P.annotation,P.modifier,P.self,P.namespace],color:S7},{tag:[P.operator,P.operatorKeyword,P.url,P.escape,P.regexp,P.link,P.special(P.string)],color:w7},{tag:[P.meta,P.comment],color:fm},{tag:P.strong,fontWeight:"bold"},{tag:P.emphasis,fontStyle:"italic"},{tag:P.strikethrough,textDecoration:"line-through"},{tag:P.link,color:fm,textDecoration:"underline"},{tag:P.heading,fontWeight:"bold",color:_1},{tag:[P.atom,P.bool,P.special(P.variableName)],color:M1},{tag:[P.processingInstruction,P.string,P.inserted],color:A7},{tag:P.invalid,color:C7}]),j7=[T7,ix($7)];var R7=de.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),D7=function(e){e===void 0&&(e={});var{indentWithTab:n=!0,editable:r=!0,readOnly:i=!1,theme:o="light",placeholder:s="",basicSetup:a=!0}=e,l=[];switch(n&&l.unshift($a.of([MW])),a&&(typeof a=="boolean"?l.unshift(B1()):l.unshift(B1(a))),s&&l.unshift(zF(s)),o){case"light":l.push(R7);break;case"dark":l.push(j7);break;case"none":break;default:l.push(o);break}return r===!1&&l.push(de.editable.of(!1)),i&&l.push(Ue.readOnly.of(!0)),[...l]},Q7=t=>({line:t.state.doc.lineAt(t.state.selection.main.from),lineCount:t.state.doc.lines,lineBreak:t.state.lineBreak,length:t.state.doc.length,readOnly:t.state.readOnly,tabSize:t.state.tabSize,selection:t.state.selection,selectionAsSingle:t.state.selection.asSingle().main,ranges:t.state.selection.ranges,selectionCode:t.state.sliceDoc(t.state.selection.main.from,t.state.selection.main.to),selections:t.state.selection.ranges.map(e=>t.state.sliceDoc(e.from,e.to)),selectedText:t.state.selection.ranges.some(e=>!e.empty)}),W1=wi.define(),B7=[];function _7(t){var{value:e,selection:n,onChange:r,onStatistics:i,onCreateEditor:o,onUpdate:s,extensions:a=B7,autoFocus:l,theme:c="light",height:u=null,minHeight:f=null,maxHeight:d=null,width:h=null,minWidth:p=null,maxWidth:O=null,placeholder:m="",editable:x=!0,readOnly:v=!1,indentWithTab:y=!0,basicSetup:S=!0,root:b,initialState:w}=t,[C,k]=j.useState(),[I,A]=j.useState(),[E,$]=j.useState(),R=de.theme({"&":{height:u,minHeight:f,maxHeight:d,width:h,minWidth:p,maxWidth:O},"& .cm-scroller":{height:"100% !important"}}),M=de.updateListener.of(G=>{if(G.docChanged&&typeof r=="function"&&!G.transactions.some(Y=>Y.annotation(W1))){var V=G.state.doc,ee=V.toString();r(ee,G)}i&&i(Q7(G))}),Q=D7({theme:c,editable:x,readOnly:v,placeholder:m,indentWithTab:y,basicSetup:S}),Z=[M,R,...Q];return s&&typeof s=="function"&&Z.push(de.updateListener.of(s)),Z=Z.concat(a),j.useEffect(()=>{if(C&&!E){var G={doc:e,selection:n,extensions:Z},V=w?Ue.fromJSON(w.json,G,w.fields):Ue.create(G);if($(V),!I){var ee=new de({state:V,parent:C,root:b});A(ee),o&&o(ee,V)}}return()=>{I&&($(void 0),A(void 0))}},[C,E]),j.useEffect(()=>k(t.container),[t.container]),j.useEffect(()=>()=>{I&&(I.destroy(),A(void 0))},[I]),j.useEffect(()=>{l&&I&&I.focus()},[l,I]),j.useEffect(()=>{I&&I.dispatch({effects:_e.reconfigure.of(Z)})},[c,a,u,f,d,h,p,O,m,x,v,y,S,r,s]),j.useEffect(()=>{if(e!==void 0){var G=I?I.state.doc.toString():"";I&&e!==G&&I.dispatch({changes:{from:0,to:G.length,insert:e||""},annotations:[W1.of(!0)]})}},[e,I]),{state:E,setState:$,view:I,setView:A,container:C,setContainer:k}}var M7=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],FI=j.forwardRef((t,e)=>{var{className:n,value:r="",selection:i,extensions:o=[],onChange:s,onStatistics:a,onCreateEditor:l,onUpdate:c,autoFocus:u,theme:f="light",height:d,minHeight:h,maxHeight:p,width:O,minWidth:m,maxWidth:x,basicSetup:v,placeholder:y,indentWithTab:S,editable:b,readOnly:w,root:C,initialState:k}=t,I=Rk(t,M7),A=j.useRef(null),{state:E,view:$,container:R}=_7({container:A.current,root:C,value:r,autoFocus:u,theme:f,height:d,minHeight:h,maxHeight:p,width:O,minWidth:m,maxWidth:x,basicSetup:v,placeholder:y,indentWithTab:S,editable:b,readOnly:w,selection:i,onChange:s,onStatistics:a,onCreateEditor:l,onUpdate:c,extensions:o,initialState:k});if(j.useImperativeHandle(e,()=>({editor:A.current,state:E,view:$}),[A,R,E,$]),typeof r!="string")throw new Error("value must be typeof string but got "+typeof r);var M=typeof f=="string"?"cm-theme-"+f:"cm-theme";return g.jsx("div",Ae({ref:A,className:""+M+(n?" "+n:"")},I))});FI.displayName="CodeMirror";function Kf(){return Kf=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Kf.apply(null,arguments)}var ZI=t=>{var{theme:e,settings:n={},styles:r=[]}=t,i={".cm-gutters":{}},o={};n.background&&(o.backgroundColor=n.background),n.backgroundImage&&(o.backgroundImage=n.backgroundImage),n.foreground&&(o.color=n.foreground),n.fontSize&&(o.fontSize=n.fontSize),(n.background||n.foreground)&&(i["&"]=o),n.fontFamily&&(i["&.cm-editor .cm-scroller"]={fontFamily:n.fontFamily}),n.gutterBackground&&(i[".cm-gutters"].backgroundColor=n.gutterBackground),n.gutterForeground&&(i[".cm-gutters"].color=n.gutterForeground),n.gutterBorder&&(i[".cm-gutters"].borderRightColor=n.gutterBorder),n.caret&&(i[".cm-content"]={caretColor:n.caret},i[".cm-cursor, .cm-dropCursor"]={borderLeftColor:n.caret});var s={};n.gutterActiveForeground&&(s.color=n.gutterActiveForeground),n.lineHighlight&&(i[".cm-activeLine"]={backgroundColor:n.lineHighlight},s.backgroundColor=n.lineHighlight),i[".cm-activeLineGutter"]=s,n.selection&&(i["&.cm-focused .cm-selectionBackground, & .cm-line::selection, & .cm-selectionLayer .cm-selectionBackground, .cm-content ::selection"]={background:n.selection+" !important"}),n.selectionMatch&&(i["& .cm-selectionMatch"]={backgroundColor:n.selectionMatch});var a=de.theme(i,{dark:e==="dark"}),l=Qa.define(r),c=[a,ix(l)];return c},N7={background:"#2e3235",foreground:"#bdbdbd",caret:"#a0a4ae",selection:"#d7d4f063",selectionMatch:"#d7d4f063",gutterBackground:"#2e3235",gutterForeground:"#999",gutterActiveForeground:"#4f5b66",lineHighlight:"#545b6130"},bx=t=>{var{theme:e="dark",settings:n={},styles:r=[]}=t||{};return ZI({theme:e,settings:Kf({},N7,n),styles:[{tag:P.keyword,color:"#cf6edf"},{tag:[P.name,P.deleted,P.character,P.macroName],color:"#56c8d8"},{tag:[P.propertyName],color:"#facf4e"},{tag:[P.variableName],color:"#bdbdbd"},{tag:[P.function(P.variableName)],color:"#56c8d8"},{tag:[P.labelName],color:"#cf6edf"},{tag:[P.color,P.constant(P.name),P.standard(P.name)],color:"#facf4e"},{tag:[P.definition(P.name),P.separator],color:"#fa5788"},{tag:[P.brace],color:"#cf6edf"},{tag:[P.annotation],color:"#ff5f52"},{tag:[P.number,P.changed,P.annotation,P.modifier,P.self,P.namespace],color:"#ffad42"},{tag:[P.typeName,P.className],color:"#ffad42"},{tag:[P.operator,P.operatorKeyword],color:"#7186f0"},{tag:[P.tagName],color:"#99d066"},{tag:[P.squareBracket],color:"#ff5f52"},{tag:[P.angleBracket],color:"#606f7a"},{tag:[P.attributeName],color:"#bdbdbd"},{tag:[P.regexp],color:"#ff5f52"},{tag:[P.quote],color:"#6abf69"},{tag:[P.string],color:"#99d066"},{tag:P.link,color:"#56c8d8",textDecoration:"underline",textUnderlinePosition:"under"},{tag:[P.url,P.escape,P.special(P.string)],color:"#facf4e"},{tag:[P.meta],color:"#707d8b"},{tag:[P.comment],color:"#707d8b",fontStyle:"italic"},{tag:P.monospace,color:"#bdbdbd"},{tag:P.strong,fontWeight:"bold",color:"#ff5f52"},{tag:P.emphasis,fontStyle:"italic",color:"#99d066"},{tag:P.strikethrough,textDecoration:"line-through"},{tag:P.heading,fontWeight:"bold",color:"#facf4e"},{tag:P.heading1,fontWeight:"bold",color:"#facf4e"},{tag:[P.heading2,P.heading3,P.heading4],fontWeight:"bold",color:"#facf4e"},{tag:[P.heading5,P.heading6],color:"#facf4e"},{tag:[P.atom,P.bool,P.special(P.variableName)],color:"#56c8d8"},{tag:[P.processingInstruction,P.inserted],color:"#ff5f52"},{tag:[P.contentSeparator],color:"#56c8d8"},{tag:P.invalid,color:"#606f7a",borderBottom:"1px dotted #ff5f52"},...r]})},F7=bx;bx();bx();var Z7={background:"#FAFAFA",foreground:"#90A4AE",caret:"#272727",selection:"#80CBC440",selectionMatch:"#80CBC440",gutterBackground:"#FAFAFA",gutterForeground:"#90A4AE",gutterBorder:"transparent",lineHighlight:"#CCD7DA50"},dm=t=>{var{theme:e="light",settings:n={},styles:r=[]}=t||{};return ZI({theme:e,settings:Kf({},Z7,n),styles:[{tag:P.keyword,color:"#39ADB5"},{tag:[P.name,P.deleted,P.character,P.macroName],color:"#90A4AE"},{tag:[P.propertyName],color:"#6182B8"},{tag:[P.processingInstruction,P.string,P.inserted,P.special(P.string)],color:"#91B859"},{tag:[P.function(P.variableName),P.labelName],color:"#6182B8"},{tag:[P.color,P.constant(P.name),P.standard(P.name)],color:"#39ADB5"},{tag:[P.definition(P.name),P.separator],color:"#90A4AE"},{tag:[P.className],color:"#E2931D"},{tag:[P.number,P.changed,P.annotation,P.modifier,P.self,P.namespace],color:"#F76D47"},{tag:[P.typeName],color:"#E2931D",fontStyle:"#E2931D"},{tag:[P.operator,P.operatorKeyword],color:"#39ADB5"},{tag:[P.url,P.escape,P.regexp,P.link],color:"#91B859"},{tag:[P.meta,P.comment],color:"#90A4AE"},{tag:P.strong,fontWeight:"bold"},{tag:P.emphasis,fontStyle:"italic"},{tag:P.link,textDecoration:"underline"},{tag:P.heading,fontWeight:"bold",color:"#39ADB5"},{tag:[P.atom,P.bool,P.special(P.variableName)],color:"#90A4AE"},{tag:P.invalid,color:"#E5393570"},{tag:P.strikethrough,textDecoration:"line-through"},...r]})};dm();function W7(t){const e={settings:{background:"var(--bg-color-tonal)",fontFamily:"var(--code-block-font-family)"},styles:[{tag:[P.propertyName],color:"var(--code-block-tokens-property-string-color)"},{tag:[P.processingInstruction,P.string,P.inserted,P.special(P.string)],color:"var(--code-block-tokens-string-color)"},{tag:[P.atom,P.bool,P.special(P.variableName)],color:"var(--text-color-secondary)"}]};switch(t){case"light":return dm(e);case"dark":return F7(e);default:return dm(e)}}const WI=_e.define();function ed({dataTestId:t,...e}){const n=je(),r=an(),{stateExtensions:i}=e,o=j.useRef(null),[s,a]=j.useState(!1),l=j.useMemo(()=>i?i.map(c=>Si.highest(c({selectedEnvironment:r,state:n}))):[],[i,r,n]);return j.useEffect(()=>{var u;const c=(u=o.current)==null?void 0:u.view;c&&c.dispatch({effects:WI.of()})},[n.environments,r]),g.jsx(V7,{"data-testid":t,onClick:()=>a(!0),children:g.jsx(FI,{autoFocus:s,className:"codemirror-container",ref:o,theme:W7("light"),basicSetup:{bracketMatching:!0,closeBrackets:!0,tabSize:2,foldGutter:!1,lineNumbers:!0,lintKeymap:!0,drawSelection:!1},onBlur:()=>a(!1),...e,extensions:[...l,...e.extensions||[]]})})}const V7=T.div`
671
671
  .cm-content {
672
672
  background-color: var(--bg-color);
673
673
  caret-color: var(--code-block-text-color);
@@ -787,9 +787,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
787
787
  `)return`
788
788
  `}return t&&t.eol||`
789
789
  `}function SS(t,e){return`\r
790
- `.indexOf(t.charAt(e))!==-1}var ld;(function(t){t.DEFAULT={allowTrailingComma:!1}})(ld||(ld={}));function EX(t,e,n){e===void 0&&(e=[]),n===void 0&&(n=ld.DEFAULT);var r=null,i=[],o=[];function s(l){Array.isArray(i)?i.push(l):r!==null&&(i[r]=l)}var a={onObjectBegin:function(){var l={};s(l),o.push(i),i=l,r=null},onObjectProperty:function(l){r=l},onObjectEnd:function(){i=o.pop()},onArrayBegin:function(){var l=[];s(l),o.push(i),i=l,r=null},onArrayEnd:function(){i=o.pop()},onLiteralValue:s,onError:function(l,c,u){e.push({error:l,offset:c,length:u})}};return TX(t,a,n),i[0]}function CT(t){if(!t.parent||!t.parent.children)return[];var e=CT(t.parent);if(t.parent.type==="property"){var n=t.parent.children[0].value;e.push(n)}else if(t.parent.type==="array"){var r=t.parent.children.indexOf(t);r!==-1&&e.push(r)}return e}function ym(t){switch(t.type){case"array":return t.children.map(ym);case"object":for(var e=Object.create(null),n=0,r=t.children;n<r.length;n++){var i=r[n],o=i.children[1];o&&(e[i.children[0].value]=ym(o))}return e;case"null":case"string":case"number":case"boolean":return t.value;default:return}}function IX(t,e,n){return n===void 0&&(n=!1),e>=t.offset&&e<t.offset+t.length||n&&e===t.offset+t.length}function kT(t,e,n){if(n===void 0&&(n=!1),IX(t,e,n)){var r=t.children;if(Array.isArray(r))for(var i=0;i<r.length&&r[i].offset<=e;i++){var o=kT(r[i],e,n);if(o)return o}return t}}function TX(t,e,n){n===void 0&&(n=ld.DEFAULT);var r=Px(t,!1);function i(I){return I?function(){return I(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter())}:function(){return!0}}function o(I){return I?function(A){return I(A,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter())}:function(){return!0}}var s=i(e.onObjectBegin),a=o(e.onObjectProperty),l=i(e.onObjectEnd),c=i(e.onArrayBegin),u=i(e.onArrayEnd),f=o(e.onLiteralValue),d=o(e.onSeparator),h=i(e.onComment),p=o(e.onError),O=n&&n.disallowComments,m=n&&n.allowTrailingComma;function x(){for(;;){var I=r.scan();switch(r.getTokenError()){case 4:v(14);break;case 5:v(15);break;case 3:v(13);break;case 1:O||v(11);break;case 2:v(12);break;case 6:v(16);break}switch(I){case 12:case 13:O?v(10):h();break;case 16:v(1);break;case 15:case 14:break;default:return I}}}function v(I,A,E){if(A===void 0&&(A=[]),E===void 0&&(E=[]),p(I),A.length+E.length>0)for(var $=r.getToken();$!==17;){if(A.indexOf($)!==-1){x();break}else if(E.indexOf($)!==-1)break;$=x()}}function y(I){var A=r.getTokenValue();return I?f(A):a(A),x(),!0}function S(){switch(r.getToken()){case 11:var I=r.getTokenValue(),A=Number(I);isNaN(A)&&(v(2),A=0),f(A);break;case 7:f(null);break;case 8:f(!0);break;case 9:f(!1);break;default:return!1}return x(),!0}function b(){return r.getToken()!==10?(v(3,[],[2,5]),!1):(y(!1),r.getToken()===6?(d(":"),x(),k()||v(4,[],[2,5])):v(5,[],[2,5]),!0)}function w(){s(),x();for(var I=!1;r.getToken()!==2&&r.getToken()!==17;){if(r.getToken()===5){if(I||v(4,[],[]),d(","),x(),r.getToken()===2&&m)break}else I&&v(6,[],[]);b()||v(4,[],[2,5]),I=!0}return l(),r.getToken()!==2?v(7,[2],[]):x(),!0}function C(){c(),x();for(var I=!1;r.getToken()!==4&&r.getToken()!==17;){if(r.getToken()===5){if(I||v(4,[],[]),d(","),x(),r.getToken()===4&&m)break}else I&&v(6,[],[]);k()||v(4,[],[4,5]),I=!0}return u(),r.getToken()!==4?v(8,[4],[]):x(),!0}function k(){switch(r.getToken()){case 3:return C();case 1:return w();case 10:return y(!0);default:return S()}}return x(),r.getToken()===17?n.allowEmptyContent?!0:(v(4,[],[]),!1):k()?(r.getToken()!==17&&v(9,[],[]),!0):(v(4,[],[]),!1)}var Ks=Px,$X=EX,jX=kT,RX=CT,DX=ym;function QX(t,e,n){return kX(t,e,n)}function Pl(t,e){if(t===e)return!0;if(t==null||e===null||e===void 0||typeof t!=typeof e||typeof t!="object"||Array.isArray(t)!==Array.isArray(e))return!1;var n,r;if(Array.isArray(t)){if(t.length!==e.length)return!1;for(n=0;n<t.length;n++)if(!Pl(t[n],e[n]))return!1}else{var i=[];for(r in t)i.push(r);i.sort();var o=[];for(r in e)o.push(r);if(o.sort(),!Pl(i,o))return!1;for(n=0;n<i.length;n++)if(!Pl(t[i[n]],e[i[n]]))return!1}return!0}function lr(t){return typeof t=="number"}function ji(t){return typeof t<"u"}function fi(t){return typeof t=="boolean"}function BX(t){return typeof t=="string"}var wS;(function(t){function e(n){return typeof n=="string"}t.is=e})(wS||(wS={}));var bm;(function(t){function e(n){return typeof n=="string"}t.is=e})(bm||(bm={}));var CS;(function(t){t.MIN_VALUE=-2147483648,t.MAX_VALUE=2147483647;function e(n){return typeof n=="number"&&t.MIN_VALUE<=n&&n<=t.MAX_VALUE}t.is=e})(CS||(CS={}));var cd;(function(t){t.MIN_VALUE=0,t.MAX_VALUE=2147483647;function e(n){return typeof n=="number"&&t.MIN_VALUE<=n&&n<=t.MAX_VALUE}t.is=e})(cd||(cd={}));var wr;(function(t){function e(r,i){return r===Number.MAX_VALUE&&(r=cd.MAX_VALUE),i===Number.MAX_VALUE&&(i=cd.MAX_VALUE),{line:r,character:i}}t.create=e;function n(r){let i=r;return J.objectLiteral(i)&&J.uinteger(i.line)&&J.uinteger(i.character)}t.is=n})(wr||(wr={}));var nt;(function(t){function e(r,i,o,s){if(J.uinteger(r)&&J.uinteger(i)&&J.uinteger(o)&&J.uinteger(s))return{start:wr.create(r,i),end:wr.create(o,s)};if(wr.is(r)&&wr.is(i))return{start:r,end:i};throw new Error(`Range#create called with invalid arguments[${r}, ${i}, ${o}, ${s}]`)}t.create=e;function n(r){let i=r;return J.objectLiteral(i)&&wr.is(i.start)&&wr.is(i.end)}t.is=n})(nt||(nt={}));var ma;(function(t){function e(r,i){return{uri:r,range:i}}t.create=e;function n(r){let i=r;return J.objectLiteral(i)&&nt.is(i.range)&&(J.string(i.uri)||J.undefined(i.uri))}t.is=n})(ma||(ma={}));var kS;(function(t){function e(r,i,o,s){return{targetUri:r,targetRange:i,targetSelectionRange:o,originSelectionRange:s}}t.create=e;function n(r){let i=r;return J.objectLiteral(i)&&nt.is(i.targetRange)&&J.string(i.targetUri)&&nt.is(i.targetSelectionRange)&&(nt.is(i.originSelectionRange)||J.undefined(i.originSelectionRange))}t.is=n})(kS||(kS={}));var Sm;(function(t){function e(r,i,o,s){return{red:r,green:i,blue:o,alpha:s}}t.create=e;function n(r){const i=r;return J.objectLiteral(i)&&J.numberRange(i.red,0,1)&&J.numberRange(i.green,0,1)&&J.numberRange(i.blue,0,1)&&J.numberRange(i.alpha,0,1)}t.is=n})(Sm||(Sm={}));var AS;(function(t){function e(r,i){return{range:r,color:i}}t.create=e;function n(r){const i=r;return J.objectLiteral(i)&&nt.is(i.range)&&Sm.is(i.color)}t.is=n})(AS||(AS={}));var PS;(function(t){function e(r,i,o){return{label:r,textEdit:i,additionalTextEdits:o}}t.create=e;function n(r){const i=r;return J.objectLiteral(i)&&J.string(i.label)&&(J.undefined(i.textEdit)||Wi.is(i))&&(J.undefined(i.additionalTextEdits)||J.typedArray(i.additionalTextEdits,Wi.is))}t.is=n})(PS||(PS={}));var El;(function(t){t.Comment="comment",t.Imports="imports",t.Region="region"})(El||(El={}));var ES;(function(t){function e(r,i,o,s,a,l){const c={startLine:r,endLine:i};return J.defined(o)&&(c.startCharacter=o),J.defined(s)&&(c.endCharacter=s),J.defined(a)&&(c.kind=a),J.defined(l)&&(c.collapsedText=l),c}t.create=e;function n(r){const i=r;return J.objectLiteral(i)&&J.uinteger(i.startLine)&&J.uinteger(i.startLine)&&(J.undefined(i.startCharacter)||J.uinteger(i.startCharacter))&&(J.undefined(i.endCharacter)||J.uinteger(i.endCharacter))&&(J.undefined(i.kind)||J.string(i.kind))}t.is=n})(ES||(ES={}));var wm;(function(t){function e(r,i){return{location:r,message:i}}t.create=e;function n(r){let i=r;return J.defined(i)&&ma.is(i.location)&&J.string(i.message)}t.is=n})(wm||(wm={}));var We;(function(t){t.Error=1,t.Warning=2,t.Information=3,t.Hint=4})(We||(We={}));var IS;(function(t){t.Unnecessary=1,t.Deprecated=2})(IS||(IS={}));var TS;(function(t){function e(n){const r=n;return J.objectLiteral(r)&&J.string(r.href)}t.is=e})(TS||(TS={}));var _i;(function(t){function e(r,i,o,s,a,l){let c={range:r,message:i};return J.defined(o)&&(c.severity=o),J.defined(s)&&(c.code=s),J.defined(a)&&(c.source=a),J.defined(l)&&(c.relatedInformation=l),c}t.create=e;function n(r){var i;let o=r;return J.defined(o)&&nt.is(o.range)&&J.string(o.message)&&(J.number(o.severity)||J.undefined(o.severity))&&(J.integer(o.code)||J.string(o.code)||J.undefined(o.code))&&(J.undefined(o.codeDescription)||J.string((i=o.codeDescription)===null||i===void 0?void 0:i.href))&&(J.string(o.source)||J.undefined(o.source))&&(J.undefined(o.relatedInformation)||J.typedArray(o.relatedInformation,wm.is))}t.is=n})(_i||(_i={}));var Oa;(function(t){function e(r,i,...o){let s={title:r,command:i};return J.defined(o)&&o.length>0&&(s.arguments=o),s}t.create=e;function n(r){let i=r;return J.defined(i)&&J.string(i.title)&&J.string(i.command)}t.is=n})(Oa||(Oa={}));var Wi;(function(t){function e(o,s){return{range:o,newText:s}}t.replace=e;function n(o,s){return{range:{start:o,end:o},newText:s}}t.insert=n;function r(o){return{range:o,newText:""}}t.del=r;function i(o){const s=o;return J.objectLiteral(s)&&J.string(s.newText)&&nt.is(s.range)}t.is=i})(Wi||(Wi={}));var Cm;(function(t){function e(r,i,o){const s={label:r};return i!==void 0&&(s.needsConfirmation=i),o!==void 0&&(s.description=o),s}t.create=e;function n(r){const i=r;return J.objectLiteral(i)&&J.string(i.label)&&(J.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(J.string(i.description)||i.description===void 0)}t.is=n})(Cm||(Cm={}));var xa;(function(t){function e(n){const r=n;return J.string(r)}t.is=e})(xa||(xa={}));var $S;(function(t){function e(o,s,a){return{range:o,newText:s,annotationId:a}}t.replace=e;function n(o,s,a){return{range:{start:o,end:o},newText:s,annotationId:a}}t.insert=n;function r(o,s){return{range:o,newText:"",annotationId:s}}t.del=r;function i(o){const s=o;return Wi.is(s)&&(Cm.is(s.annotationId)||xa.is(s.annotationId))}t.is=i})($S||($S={}));var km;(function(t){function e(r,i){return{textDocument:r,edits:i}}t.create=e;function n(r){let i=r;return J.defined(i)&&Tm.is(i.textDocument)&&Array.isArray(i.edits)}t.is=n})(km||(km={}));var Am;(function(t){function e(r,i,o){let s={kind:"create",uri:r};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(s.options=i),o!==void 0&&(s.annotationId=o),s}t.create=e;function n(r){let i=r;return i&&i.kind==="create"&&J.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||J.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||J.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||xa.is(i.annotationId))}t.is=n})(Am||(Am={}));var Pm;(function(t){function e(r,i,o,s){let a={kind:"rename",oldUri:r,newUri:i};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(a.options=o),s!==void 0&&(a.annotationId=s),a}t.create=e;function n(r){let i=r;return i&&i.kind==="rename"&&J.string(i.oldUri)&&J.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||J.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||J.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||xa.is(i.annotationId))}t.is=n})(Pm||(Pm={}));var Em;(function(t){function e(r,i,o){let s={kind:"delete",uri:r};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(s.options=i),o!==void 0&&(s.annotationId=o),s}t.create=e;function n(r){let i=r;return i&&i.kind==="delete"&&J.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||J.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||J.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||xa.is(i.annotationId))}t.is=n})(Em||(Em={}));var Im;(function(t){function e(n){let r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(i=>J.string(i.kind)?Am.is(i)||Pm.is(i)||Em.is(i):km.is(i)))}t.is=e})(Im||(Im={}));var jS;(function(t){function e(r){return{uri:r}}t.create=e;function n(r){let i=r;return J.defined(i)&&J.string(i.uri)}t.is=n})(jS||(jS={}));var RS;(function(t){function e(r,i){return{uri:r,version:i}}t.create=e;function n(r){let i=r;return J.defined(i)&&J.string(i.uri)&&J.integer(i.version)}t.is=n})(RS||(RS={}));var Tm;(function(t){function e(r,i){return{uri:r,version:i}}t.create=e;function n(r){let i=r;return J.defined(i)&&J.string(i.uri)&&(i.version===null||J.integer(i.version))}t.is=n})(Tm||(Tm={}));var DS;(function(t){function e(r,i,o,s){return{uri:r,languageId:i,version:o,text:s}}t.create=e;function n(r){let i=r;return J.defined(i)&&J.string(i.uri)&&J.string(i.languageId)&&J.integer(i.version)&&J.string(i.text)}t.is=n})(DS||(DS={}));var rs;(function(t){t.PlainText="plaintext",t.Markdown="markdown";function e(n){const r=n;return r===t.PlainText||r===t.Markdown}t.is=e})(rs||(rs={}));var Kl;(function(t){function e(n){const r=n;return J.objectLiteral(n)&&rs.is(r.kind)&&J.string(r.value)}t.is=e})(Kl||(Kl={}));var cr;(function(t){t.Text=1,t.Method=2,t.Function=3,t.Constructor=4,t.Field=5,t.Variable=6,t.Class=7,t.Interface=8,t.Module=9,t.Property=10,t.Unit=11,t.Value=12,t.Enum=13,t.Keyword=14,t.Snippet=15,t.Color=16,t.File=17,t.Reference=18,t.Folder=19,t.EnumMember=20,t.Constant=21,t.Struct=22,t.Event=23,t.Operator=24,t.TypeParameter=25})(cr||(cr={}));var en;(function(t){t.PlainText=1,t.Snippet=2})(en||(en={}));var QS;(function(t){t.Deprecated=1})(QS||(QS={}));var BS;(function(t){function e(r,i,o){return{newText:r,insert:i,replace:o}}t.create=e;function n(r){const i=r;return i&&J.string(i.newText)&&nt.is(i.insert)&&nt.is(i.replace)}t.is=n})(BS||(BS={}));var _S;(function(t){t.asIs=1,t.adjustIndentation=2})(_S||(_S={}));var MS;(function(t){function e(n){const r=n;return r&&(J.string(r.detail)||r.detail===void 0)&&(J.string(r.description)||r.description===void 0)}t.is=e})(MS||(MS={}));var $m;(function(t){function e(n){return{label:n}}t.create=e})($m||($m={}));var NS;(function(t){function e(n,r){return{items:n||[],isIncomplete:!!r}}t.create=e})(NS||(NS={}));var ud;(function(t){function e(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}t.fromPlainText=e;function n(r){const i=r;return J.string(i)||J.objectLiteral(i)&&J.string(i.language)&&J.string(i.value)}t.is=n})(ud||(ud={}));var FS;(function(t){function e(n){let r=n;return!!r&&J.objectLiteral(r)&&(Kl.is(r.contents)||ud.is(r.contents)||J.typedArray(r.contents,ud.is))&&(n.range===void 0||nt.is(n.range))}t.is=e})(FS||(FS={}));var ZS;(function(t){function e(n,r){return r?{label:n,documentation:r}:{label:n}}t.create=e})(ZS||(ZS={}));var WS;(function(t){function e(n,r,...i){let o={label:n};return J.defined(r)&&(o.documentation=r),J.defined(i)?o.parameters=i:o.parameters=[],o}t.create=e})(WS||(WS={}));var VS;(function(t){t.Text=1,t.Read=2,t.Write=3})(VS||(VS={}));var zS;(function(t){function e(n,r){let i={range:n};return J.number(r)&&(i.kind=r),i}t.create=e})(zS||(zS={}));var ii;(function(t){t.File=1,t.Module=2,t.Namespace=3,t.Package=4,t.Class=5,t.Method=6,t.Property=7,t.Field=8,t.Constructor=9,t.Enum=10,t.Interface=11,t.Function=12,t.Variable=13,t.Constant=14,t.String=15,t.Number=16,t.Boolean=17,t.Array=18,t.Object=19,t.Key=20,t.Null=21,t.EnumMember=22,t.Struct=23,t.Event=24,t.Operator=25,t.TypeParameter=26})(ii||(ii={}));var LS;(function(t){t.Deprecated=1})(LS||(LS={}));var XS;(function(t){function e(n,r,i,o,s){let a={name:n,kind:r,location:{uri:o,range:i}};return s&&(a.containerName=s),a}t.create=e})(XS||(XS={}));var GS;(function(t){function e(n,r,i,o){return o!==void 0?{name:n,kind:r,location:{uri:i,range:o}}:{name:n,kind:r,location:{uri:i}}}t.create=e})(GS||(GS={}));var YS;(function(t){function e(r,i,o,s,a,l){let c={name:r,detail:i,kind:o,range:s,selectionRange:a};return l!==void 0&&(c.children=l),c}t.create=e;function n(r){let i=r;return i&&J.string(i.name)&&J.number(i.kind)&&nt.is(i.range)&&nt.is(i.selectionRange)&&(i.detail===void 0||J.string(i.detail))&&(i.deprecated===void 0||J.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}t.is=n})(YS||(YS={}));var qS;(function(t){t.Empty="",t.QuickFix="quickfix",t.Refactor="refactor",t.RefactorExtract="refactor.extract",t.RefactorInline="refactor.inline",t.RefactorRewrite="refactor.rewrite",t.Source="source",t.SourceOrganizeImports="source.organizeImports",t.SourceFixAll="source.fixAll"})(qS||(qS={}));var fd;(function(t){t.Invoked=1,t.Automatic=2})(fd||(fd={}));var US;(function(t){function e(r,i,o){let s={diagnostics:r};return i!=null&&(s.only=i),o!=null&&(s.triggerKind=o),s}t.create=e;function n(r){let i=r;return J.defined(i)&&J.typedArray(i.diagnostics,_i.is)&&(i.only===void 0||J.typedArray(i.only,J.string))&&(i.triggerKind===void 0||i.triggerKind===fd.Invoked||i.triggerKind===fd.Automatic)}t.is=n})(US||(US={}));var HS;(function(t){function e(r,i,o){let s={title:r},a=!0;return typeof i=="string"?(a=!1,s.kind=i):Oa.is(i)?s.command=i:s.edit=i,a&&o!==void 0&&(s.kind=o),s}t.create=e;function n(r){let i=r;return i&&J.string(i.title)&&(i.diagnostics===void 0||J.typedArray(i.diagnostics,_i.is))&&(i.kind===void 0||J.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||Oa.is(i.command))&&(i.isPreferred===void 0||J.boolean(i.isPreferred))&&(i.edit===void 0||Im.is(i.edit))}t.is=n})(HS||(HS={}));var JS;(function(t){function e(r,i){let o={range:r};return J.defined(i)&&(o.data=i),o}t.create=e;function n(r){let i=r;return J.defined(i)&&nt.is(i.range)&&(J.undefined(i.command)||Oa.is(i.command))}t.is=n})(JS||(JS={}));var KS;(function(t){function e(r,i){return{tabSize:r,insertSpaces:i}}t.create=e;function n(r){let i=r;return J.defined(i)&&J.uinteger(i.tabSize)&&J.boolean(i.insertSpaces)}t.is=n})(KS||(KS={}));var ew;(function(t){function e(r,i,o){return{range:r,target:i,data:o}}t.create=e;function n(r){let i=r;return J.defined(i)&&nt.is(i.range)&&(J.undefined(i.target)||J.string(i.target))}t.is=n})(ew||(ew={}));var dd;(function(t){function e(r,i){return{range:r,parent:i}}t.create=e;function n(r){let i=r;return J.objectLiteral(i)&&nt.is(i.range)&&(i.parent===void 0||t.is(i.parent))}t.is=n})(dd||(dd={}));var tw;(function(t){t.namespace="namespace",t.type="type",t.class="class",t.enum="enum",t.interface="interface",t.struct="struct",t.typeParameter="typeParameter",t.parameter="parameter",t.variable="variable",t.property="property",t.enumMember="enumMember",t.event="event",t.function="function",t.method="method",t.macro="macro",t.keyword="keyword",t.modifier="modifier",t.comment="comment",t.string="string",t.number="number",t.regexp="regexp",t.operator="operator",t.decorator="decorator"})(tw||(tw={}));var nw;(function(t){t.declaration="declaration",t.definition="definition",t.readonly="readonly",t.static="static",t.deprecated="deprecated",t.abstract="abstract",t.async="async",t.modification="modification",t.documentation="documentation",t.defaultLibrary="defaultLibrary"})(nw||(nw={}));var rw;(function(t){function e(n){const r=n;return J.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}t.is=e})(rw||(rw={}));var iw;(function(t){function e(r,i){return{range:r,text:i}}t.create=e;function n(r){const i=r;return i!=null&&nt.is(i.range)&&J.string(i.text)}t.is=n})(iw||(iw={}));var ow;(function(t){function e(r,i,o){return{range:r,variableName:i,caseSensitiveLookup:o}}t.create=e;function n(r){const i=r;return i!=null&&nt.is(i.range)&&J.boolean(i.caseSensitiveLookup)&&(J.string(i.variableName)||i.variableName===void 0)}t.is=n})(ow||(ow={}));var sw;(function(t){function e(r,i){return{range:r,expression:i}}t.create=e;function n(r){const i=r;return i!=null&&nt.is(i.range)&&(J.string(i.expression)||i.expression===void 0)}t.is=n})(sw||(sw={}));var aw;(function(t){function e(r,i){return{frameId:r,stoppedLocation:i}}t.create=e;function n(r){const i=r;return J.defined(i)&&nt.is(r.stoppedLocation)}t.is=n})(aw||(aw={}));var jm;(function(t){t.Type=1,t.Parameter=2;function e(n){return n===1||n===2}t.is=e})(jm||(jm={}));var Rm;(function(t){function e(r){return{value:r}}t.create=e;function n(r){const i=r;return J.objectLiteral(i)&&(i.tooltip===void 0||J.string(i.tooltip)||Kl.is(i.tooltip))&&(i.location===void 0||ma.is(i.location))&&(i.command===void 0||Oa.is(i.command))}t.is=n})(Rm||(Rm={}));var lw;(function(t){function e(r,i,o){const s={position:r,label:i};return o!==void 0&&(s.kind=o),s}t.create=e;function n(r){const i=r;return J.objectLiteral(i)&&wr.is(i.position)&&(J.string(i.label)||J.typedArray(i.label,Rm.is))&&(i.kind===void 0||jm.is(i.kind))&&i.textEdits===void 0||J.typedArray(i.textEdits,Wi.is)&&(i.tooltip===void 0||J.string(i.tooltip)||Kl.is(i.tooltip))&&(i.paddingLeft===void 0||J.boolean(i.paddingLeft))&&(i.paddingRight===void 0||J.boolean(i.paddingRight))}t.is=n})(lw||(lw={}));var cw;(function(t){function e(n){return{kind:"snippet",value:n}}t.createSnippet=e})(cw||(cw={}));var uw;(function(t){function e(n,r,i,o){return{insertText:n,filterText:r,range:i,command:o}}t.create=e})(uw||(uw={}));var fw;(function(t){function e(n){return{items:n}}t.create=e})(fw||(fw={}));var dw;(function(t){t.Invoked=0,t.Automatic=1})(dw||(dw={}));var hw;(function(t){function e(n,r){return{range:n,text:r}}t.create=e})(hw||(hw={}));var pw;(function(t){function e(n,r){return{triggerKind:n,selectedCompletionInfo:r}}t.create=e})(pw||(pw={}));var gw;(function(t){function e(n){const r=n;return J.objectLiteral(r)&&bm.is(r.uri)&&J.string(r.name)}t.is=e})(gw||(gw={}));var mw;(function(t){function e(o,s,a,l){return new _X(o,s,a,l)}t.create=e;function n(o){let s=o;return!!(J.defined(s)&&J.string(s.uri)&&(J.undefined(s.languageId)||J.string(s.languageId))&&J.uinteger(s.lineCount)&&J.func(s.getText)&&J.func(s.positionAt)&&J.func(s.offsetAt))}t.is=n;function r(o,s){let a=o.getText(),l=i(s,(u,f)=>{let d=u.range.start.line-f.range.start.line;return d===0?u.range.start.character-f.range.start.character:d}),c=a.length;for(let u=l.length-1;u>=0;u--){let f=l[u],d=o.offsetAt(f.range.start),h=o.offsetAt(f.range.end);if(h<=c)a=a.substring(0,d)+f.newText+a.substring(h,a.length);else throw new Error("Overlapping edit");c=d}return a}t.applyEdits=r;function i(o,s){if(o.length<=1)return o;const a=o.length/2|0,l=o.slice(0,a),c=o.slice(a);i(l,s),i(c,s);let u=0,f=0,d=0;for(;u<l.length&&f<c.length;)s(l[u],c[f])<=0?o[d++]=l[u++]:o[d++]=c[f++];for(;u<l.length;)o[d++]=l[u++];for(;f<c.length;)o[d++]=c[f++];return o}})(mw||(mw={}));let _X=class{constructor(e,n,r,i){this._uri=e,this._languageId=n,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let n=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(n,r)}return this._content}update(e,n){this._content=e.text,this._version=n,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let e=[],n=this._content,r=!0;for(let i=0;i<n.length;i++){r&&(e.push(i),r=!1);let o=n.charAt(i);r=o==="\r"||o===`
790
+ `.indexOf(t.charAt(e))!==-1}var ld;(function(t){t.DEFAULT={allowTrailingComma:!1}})(ld||(ld={}));function EX(t,e,n){e===void 0&&(e=[]),n===void 0&&(n=ld.DEFAULT);var r=null,i=[],o=[];function s(l){Array.isArray(i)?i.push(l):r!==null&&(i[r]=l)}var a={onObjectBegin:function(){var l={};s(l),o.push(i),i=l,r=null},onObjectProperty:function(l){r=l},onObjectEnd:function(){i=o.pop()},onArrayBegin:function(){var l=[];s(l),o.push(i),i=l,r=null},onArrayEnd:function(){i=o.pop()},onLiteralValue:s,onError:function(l,c,u){e.push({error:l,offset:c,length:u})}};return TX(t,a,n),i[0]}function CT(t){if(!t.parent||!t.parent.children)return[];var e=CT(t.parent);if(t.parent.type==="property"){var n=t.parent.children[0].value;e.push(n)}else if(t.parent.type==="array"){var r=t.parent.children.indexOf(t);r!==-1&&e.push(r)}return e}function ym(t){switch(t.type){case"array":return t.children.map(ym);case"object":for(var e=Object.create(null),n=0,r=t.children;n<r.length;n++){var i=r[n],o=i.children[1];o&&(e[i.children[0].value]=ym(o))}return e;case"null":case"string":case"number":case"boolean":return t.value;default:return}}function IX(t,e,n){return n===void 0&&(n=!1),e>=t.offset&&e<t.offset+t.length||n&&e===t.offset+t.length}function kT(t,e,n){if(n===void 0&&(n=!1),IX(t,e,n)){var r=t.children;if(Array.isArray(r))for(var i=0;i<r.length&&r[i].offset<=e;i++){var o=kT(r[i],e,n);if(o)return o}return t}}function TX(t,e,n){n===void 0&&(n=ld.DEFAULT);var r=Px(t,!1);function i(I){return I?function(){return I(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter())}:function(){return!0}}function o(I){return I?function(A){return I(A,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter())}:function(){return!0}}var s=i(e.onObjectBegin),a=o(e.onObjectProperty),l=i(e.onObjectEnd),c=i(e.onArrayBegin),u=i(e.onArrayEnd),f=o(e.onLiteralValue),d=o(e.onSeparator),h=i(e.onComment),p=o(e.onError),O=n&&n.disallowComments,m=n&&n.allowTrailingComma;function x(){for(;;){var I=r.scan();switch(r.getTokenError()){case 4:v(14);break;case 5:v(15);break;case 3:v(13);break;case 1:O||v(11);break;case 2:v(12);break;case 6:v(16);break}switch(I){case 12:case 13:O?v(10):h();break;case 16:v(1);break;case 15:case 14:break;default:return I}}}function v(I,A,E){if(A===void 0&&(A=[]),E===void 0&&(E=[]),p(I),A.length+E.length>0)for(var $=r.getToken();$!==17;){if(A.indexOf($)!==-1){x();break}else if(E.indexOf($)!==-1)break;$=x()}}function y(I){var A=r.getTokenValue();return I?f(A):a(A),x(),!0}function S(){switch(r.getToken()){case 11:var I=r.getTokenValue(),A=Number(I);isNaN(A)&&(v(2),A=0),f(A);break;case 7:f(null);break;case 8:f(!0);break;case 9:f(!1);break;default:return!1}return x(),!0}function b(){return r.getToken()!==10?(v(3,[],[2,5]),!1):(y(!1),r.getToken()===6?(d(":"),x(),k()||v(4,[],[2,5])):v(5,[],[2,5]),!0)}function w(){s(),x();for(var I=!1;r.getToken()!==2&&r.getToken()!==17;){if(r.getToken()===5){if(I||v(4,[],[]),d(","),x(),r.getToken()===2&&m)break}else I&&v(6,[],[]);b()||v(4,[],[2,5]),I=!0}return l(),r.getToken()!==2?v(7,[2],[]):x(),!0}function C(){c(),x();for(var I=!1;r.getToken()!==4&&r.getToken()!==17;){if(r.getToken()===5){if(I||v(4,[],[]),d(","),x(),r.getToken()===4&&m)break}else I&&v(6,[],[]);k()||v(4,[],[4,5]),I=!0}return u(),r.getToken()!==4?v(8,[4],[]):x(),!0}function k(){switch(r.getToken()){case 3:return C();case 1:return w();case 10:return y(!0);default:return S()}}return x(),r.getToken()===17?n.allowEmptyContent?!0:(v(4,[],[]),!1):k()?(r.getToken()!==17&&v(9,[],[]),!0):(v(4,[],[]),!1)}var Ks=Px,$X=EX,jX=kT,RX=CT,DX=ym;function QX(t,e,n){return kX(t,e,n)}function Pl(t,e){if(t===e)return!0;if(t==null||e===null||e===void 0||typeof t!=typeof e||typeof t!="object"||Array.isArray(t)!==Array.isArray(e))return!1;var n,r;if(Array.isArray(t)){if(t.length!==e.length)return!1;for(n=0;n<t.length;n++)if(!Pl(t[n],e[n]))return!1}else{var i=[];for(r in t)i.push(r);i.sort();var o=[];for(r in e)o.push(r);if(o.sort(),!Pl(i,o))return!1;for(n=0;n<i.length;n++)if(!Pl(t[i[n]],e[i[n]]))return!1}return!0}function lr(t){return typeof t=="number"}function ji(t){return typeof t<"u"}function fi(t){return typeof t=="boolean"}function BX(t){return typeof t=="string"}var wS;(function(t){function e(n){return typeof n=="string"}t.is=e})(wS||(wS={}));var bm;(function(t){function e(n){return typeof n=="string"}t.is=e})(bm||(bm={}));var CS;(function(t){t.MIN_VALUE=-2147483648,t.MAX_VALUE=2147483647;function e(n){return typeof n=="number"&&t.MIN_VALUE<=n&&n<=t.MAX_VALUE}t.is=e})(CS||(CS={}));var cd;(function(t){t.MIN_VALUE=0,t.MAX_VALUE=2147483647;function e(n){return typeof n=="number"&&t.MIN_VALUE<=n&&n<=t.MAX_VALUE}t.is=e})(cd||(cd={}));var wr;(function(t){function e(r,i){return r===Number.MAX_VALUE&&(r=cd.MAX_VALUE),i===Number.MAX_VALUE&&(i=cd.MAX_VALUE),{line:r,character:i}}t.create=e;function n(r){let i=r;return J.objectLiteral(i)&&J.uinteger(i.line)&&J.uinteger(i.character)}t.is=n})(wr||(wr={}));var nt;(function(t){function e(r,i,o,s){if(J.uinteger(r)&&J.uinteger(i)&&J.uinteger(o)&&J.uinteger(s))return{start:wr.create(r,i),end:wr.create(o,s)};if(wr.is(r)&&wr.is(i))return{start:r,end:i};throw new Error(`Range#create called with invalid arguments[${r}, ${i}, ${o}, ${s}]`)}t.create=e;function n(r){let i=r;return J.objectLiteral(i)&&wr.is(i.start)&&wr.is(i.end)}t.is=n})(nt||(nt={}));var ma;(function(t){function e(r,i){return{uri:r,range:i}}t.create=e;function n(r){let i=r;return J.objectLiteral(i)&&nt.is(i.range)&&(J.string(i.uri)||J.undefined(i.uri))}t.is=n})(ma||(ma={}));var kS;(function(t){function e(r,i,o,s){return{targetUri:r,targetRange:i,targetSelectionRange:o,originSelectionRange:s}}t.create=e;function n(r){let i=r;return J.objectLiteral(i)&&nt.is(i.targetRange)&&J.string(i.targetUri)&&nt.is(i.targetSelectionRange)&&(nt.is(i.originSelectionRange)||J.undefined(i.originSelectionRange))}t.is=n})(kS||(kS={}));var Sm;(function(t){function e(r,i,o,s){return{red:r,green:i,blue:o,alpha:s}}t.create=e;function n(r){const i=r;return J.objectLiteral(i)&&J.numberRange(i.red,0,1)&&J.numberRange(i.green,0,1)&&J.numberRange(i.blue,0,1)&&J.numberRange(i.alpha,0,1)}t.is=n})(Sm||(Sm={}));var AS;(function(t){function e(r,i){return{range:r,color:i}}t.create=e;function n(r){const i=r;return J.objectLiteral(i)&&nt.is(i.range)&&Sm.is(i.color)}t.is=n})(AS||(AS={}));var PS;(function(t){function e(r,i,o){return{label:r,textEdit:i,additionalTextEdits:o}}t.create=e;function n(r){const i=r;return J.objectLiteral(i)&&J.string(i.label)&&(J.undefined(i.textEdit)||Wi.is(i))&&(J.undefined(i.additionalTextEdits)||J.typedArray(i.additionalTextEdits,Wi.is))}t.is=n})(PS||(PS={}));var El;(function(t){t.Comment="comment",t.Imports="imports",t.Region="region"})(El||(El={}));var ES;(function(t){function e(r,i,o,s,a,l){const c={startLine:r,endLine:i};return J.defined(o)&&(c.startCharacter=o),J.defined(s)&&(c.endCharacter=s),J.defined(a)&&(c.kind=a),J.defined(l)&&(c.collapsedText=l),c}t.create=e;function n(r){const i=r;return J.objectLiteral(i)&&J.uinteger(i.startLine)&&J.uinteger(i.startLine)&&(J.undefined(i.startCharacter)||J.uinteger(i.startCharacter))&&(J.undefined(i.endCharacter)||J.uinteger(i.endCharacter))&&(J.undefined(i.kind)||J.string(i.kind))}t.is=n})(ES||(ES={}));var wm;(function(t){function e(r,i){return{location:r,message:i}}t.create=e;function n(r){let i=r;return J.defined(i)&&ma.is(i.location)&&J.string(i.message)}t.is=n})(wm||(wm={}));var We;(function(t){t.Error=1,t.Warning=2,t.Information=3,t.Hint=4})(We||(We={}));var IS;(function(t){t.Unnecessary=1,t.Deprecated=2})(IS||(IS={}));var TS;(function(t){function e(n){const r=n;return J.objectLiteral(r)&&J.string(r.href)}t.is=e})(TS||(TS={}));var _i;(function(t){function e(r,i,o,s,a,l){let c={range:r,message:i};return J.defined(o)&&(c.severity=o),J.defined(s)&&(c.code=s),J.defined(a)&&(c.source=a),J.defined(l)&&(c.relatedInformation=l),c}t.create=e;function n(r){var i;let o=r;return J.defined(o)&&nt.is(o.range)&&J.string(o.message)&&(J.number(o.severity)||J.undefined(o.severity))&&(J.integer(o.code)||J.string(o.code)||J.undefined(o.code))&&(J.undefined(o.codeDescription)||J.string((i=o.codeDescription)===null||i===void 0?void 0:i.href))&&(J.string(o.source)||J.undefined(o.source))&&(J.undefined(o.relatedInformation)||J.typedArray(o.relatedInformation,wm.is))}t.is=n})(_i||(_i={}));var Oa;(function(t){function e(r,i,...o){let s={title:r,command:i};return J.defined(o)&&o.length>0&&(s.arguments=o),s}t.create=e;function n(r){let i=r;return J.defined(i)&&J.string(i.title)&&J.string(i.command)}t.is=n})(Oa||(Oa={}));var Wi;(function(t){function e(o,s){return{range:o,newText:s}}t.replace=e;function n(o,s){return{range:{start:o,end:o},newText:s}}t.insert=n;function r(o){return{range:o,newText:""}}t.del=r;function i(o){const s=o;return J.objectLiteral(s)&&J.string(s.newText)&&nt.is(s.range)}t.is=i})(Wi||(Wi={}));var Cm;(function(t){function e(r,i,o){const s={label:r};return i!==void 0&&(s.needsConfirmation=i),o!==void 0&&(s.description=o),s}t.create=e;function n(r){const i=r;return J.objectLiteral(i)&&J.string(i.label)&&(J.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(J.string(i.description)||i.description===void 0)}t.is=n})(Cm||(Cm={}));var xa;(function(t){function e(n){const r=n;return J.string(r)}t.is=e})(xa||(xa={}));var $S;(function(t){function e(o,s,a){return{range:o,newText:s,annotationId:a}}t.replace=e;function n(o,s,a){return{range:{start:o,end:o},newText:s,annotationId:a}}t.insert=n;function r(o,s){return{range:o,newText:"",annotationId:s}}t.del=r;function i(o){const s=o;return Wi.is(s)&&(Cm.is(s.annotationId)||xa.is(s.annotationId))}t.is=i})($S||($S={}));var km;(function(t){function e(r,i){return{textDocument:r,edits:i}}t.create=e;function n(r){let i=r;return J.defined(i)&&Tm.is(i.textDocument)&&Array.isArray(i.edits)}t.is=n})(km||(km={}));var Am;(function(t){function e(r,i,o){let s={kind:"create",uri:r};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(s.options=i),o!==void 0&&(s.annotationId=o),s}t.create=e;function n(r){let i=r;return i&&i.kind==="create"&&J.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||J.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||J.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||xa.is(i.annotationId))}t.is=n})(Am||(Am={}));var Pm;(function(t){function e(r,i,o,s){let a={kind:"rename",oldUri:r,newUri:i};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(a.options=o),s!==void 0&&(a.annotationId=s),a}t.create=e;function n(r){let i=r;return i&&i.kind==="rename"&&J.string(i.oldUri)&&J.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||J.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||J.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||xa.is(i.annotationId))}t.is=n})(Pm||(Pm={}));var Em;(function(t){function e(r,i,o){let s={kind:"delete",uri:r};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(s.options=i),o!==void 0&&(s.annotationId=o),s}t.create=e;function n(r){let i=r;return i&&i.kind==="delete"&&J.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||J.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||J.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||xa.is(i.annotationId))}t.is=n})(Em||(Em={}));var Im;(function(t){function e(n){let r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(i=>J.string(i.kind)?Am.is(i)||Pm.is(i)||Em.is(i):km.is(i)))}t.is=e})(Im||(Im={}));var jS;(function(t){function e(r){return{uri:r}}t.create=e;function n(r){let i=r;return J.defined(i)&&J.string(i.uri)}t.is=n})(jS||(jS={}));var RS;(function(t){function e(r,i){return{uri:r,version:i}}t.create=e;function n(r){let i=r;return J.defined(i)&&J.string(i.uri)&&J.integer(i.version)}t.is=n})(RS||(RS={}));var Tm;(function(t){function e(r,i){return{uri:r,version:i}}t.create=e;function n(r){let i=r;return J.defined(i)&&J.string(i.uri)&&(i.version===null||J.integer(i.version))}t.is=n})(Tm||(Tm={}));var DS;(function(t){function e(r,i,o,s){return{uri:r,languageId:i,version:o,text:s}}t.create=e;function n(r){let i=r;return J.defined(i)&&J.string(i.uri)&&J.string(i.languageId)&&J.integer(i.version)&&J.string(i.text)}t.is=n})(DS||(DS={}));var is;(function(t){t.PlainText="plaintext",t.Markdown="markdown";function e(n){const r=n;return r===t.PlainText||r===t.Markdown}t.is=e})(is||(is={}));var Kl;(function(t){function e(n){const r=n;return J.objectLiteral(n)&&is.is(r.kind)&&J.string(r.value)}t.is=e})(Kl||(Kl={}));var cr;(function(t){t.Text=1,t.Method=2,t.Function=3,t.Constructor=4,t.Field=5,t.Variable=6,t.Class=7,t.Interface=8,t.Module=9,t.Property=10,t.Unit=11,t.Value=12,t.Enum=13,t.Keyword=14,t.Snippet=15,t.Color=16,t.File=17,t.Reference=18,t.Folder=19,t.EnumMember=20,t.Constant=21,t.Struct=22,t.Event=23,t.Operator=24,t.TypeParameter=25})(cr||(cr={}));var en;(function(t){t.PlainText=1,t.Snippet=2})(en||(en={}));var QS;(function(t){t.Deprecated=1})(QS||(QS={}));var BS;(function(t){function e(r,i,o){return{newText:r,insert:i,replace:o}}t.create=e;function n(r){const i=r;return i&&J.string(i.newText)&&nt.is(i.insert)&&nt.is(i.replace)}t.is=n})(BS||(BS={}));var _S;(function(t){t.asIs=1,t.adjustIndentation=2})(_S||(_S={}));var MS;(function(t){function e(n){const r=n;return r&&(J.string(r.detail)||r.detail===void 0)&&(J.string(r.description)||r.description===void 0)}t.is=e})(MS||(MS={}));var $m;(function(t){function e(n){return{label:n}}t.create=e})($m||($m={}));var NS;(function(t){function e(n,r){return{items:n||[],isIncomplete:!!r}}t.create=e})(NS||(NS={}));var ud;(function(t){function e(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}t.fromPlainText=e;function n(r){const i=r;return J.string(i)||J.objectLiteral(i)&&J.string(i.language)&&J.string(i.value)}t.is=n})(ud||(ud={}));var FS;(function(t){function e(n){let r=n;return!!r&&J.objectLiteral(r)&&(Kl.is(r.contents)||ud.is(r.contents)||J.typedArray(r.contents,ud.is))&&(n.range===void 0||nt.is(n.range))}t.is=e})(FS||(FS={}));var ZS;(function(t){function e(n,r){return r?{label:n,documentation:r}:{label:n}}t.create=e})(ZS||(ZS={}));var WS;(function(t){function e(n,r,...i){let o={label:n};return J.defined(r)&&(o.documentation=r),J.defined(i)?o.parameters=i:o.parameters=[],o}t.create=e})(WS||(WS={}));var VS;(function(t){t.Text=1,t.Read=2,t.Write=3})(VS||(VS={}));var zS;(function(t){function e(n,r){let i={range:n};return J.number(r)&&(i.kind=r),i}t.create=e})(zS||(zS={}));var ii;(function(t){t.File=1,t.Module=2,t.Namespace=3,t.Package=4,t.Class=5,t.Method=6,t.Property=7,t.Field=8,t.Constructor=9,t.Enum=10,t.Interface=11,t.Function=12,t.Variable=13,t.Constant=14,t.String=15,t.Number=16,t.Boolean=17,t.Array=18,t.Object=19,t.Key=20,t.Null=21,t.EnumMember=22,t.Struct=23,t.Event=24,t.Operator=25,t.TypeParameter=26})(ii||(ii={}));var LS;(function(t){t.Deprecated=1})(LS||(LS={}));var XS;(function(t){function e(n,r,i,o,s){let a={name:n,kind:r,location:{uri:o,range:i}};return s&&(a.containerName=s),a}t.create=e})(XS||(XS={}));var GS;(function(t){function e(n,r,i,o){return o!==void 0?{name:n,kind:r,location:{uri:i,range:o}}:{name:n,kind:r,location:{uri:i}}}t.create=e})(GS||(GS={}));var YS;(function(t){function e(r,i,o,s,a,l){let c={name:r,detail:i,kind:o,range:s,selectionRange:a};return l!==void 0&&(c.children=l),c}t.create=e;function n(r){let i=r;return i&&J.string(i.name)&&J.number(i.kind)&&nt.is(i.range)&&nt.is(i.selectionRange)&&(i.detail===void 0||J.string(i.detail))&&(i.deprecated===void 0||J.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}t.is=n})(YS||(YS={}));var qS;(function(t){t.Empty="",t.QuickFix="quickfix",t.Refactor="refactor",t.RefactorExtract="refactor.extract",t.RefactorInline="refactor.inline",t.RefactorRewrite="refactor.rewrite",t.Source="source",t.SourceOrganizeImports="source.organizeImports",t.SourceFixAll="source.fixAll"})(qS||(qS={}));var fd;(function(t){t.Invoked=1,t.Automatic=2})(fd||(fd={}));var US;(function(t){function e(r,i,o){let s={diagnostics:r};return i!=null&&(s.only=i),o!=null&&(s.triggerKind=o),s}t.create=e;function n(r){let i=r;return J.defined(i)&&J.typedArray(i.diagnostics,_i.is)&&(i.only===void 0||J.typedArray(i.only,J.string))&&(i.triggerKind===void 0||i.triggerKind===fd.Invoked||i.triggerKind===fd.Automatic)}t.is=n})(US||(US={}));var HS;(function(t){function e(r,i,o){let s={title:r},a=!0;return typeof i=="string"?(a=!1,s.kind=i):Oa.is(i)?s.command=i:s.edit=i,a&&o!==void 0&&(s.kind=o),s}t.create=e;function n(r){let i=r;return i&&J.string(i.title)&&(i.diagnostics===void 0||J.typedArray(i.diagnostics,_i.is))&&(i.kind===void 0||J.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||Oa.is(i.command))&&(i.isPreferred===void 0||J.boolean(i.isPreferred))&&(i.edit===void 0||Im.is(i.edit))}t.is=n})(HS||(HS={}));var JS;(function(t){function e(r,i){let o={range:r};return J.defined(i)&&(o.data=i),o}t.create=e;function n(r){let i=r;return J.defined(i)&&nt.is(i.range)&&(J.undefined(i.command)||Oa.is(i.command))}t.is=n})(JS||(JS={}));var KS;(function(t){function e(r,i){return{tabSize:r,insertSpaces:i}}t.create=e;function n(r){let i=r;return J.defined(i)&&J.uinteger(i.tabSize)&&J.boolean(i.insertSpaces)}t.is=n})(KS||(KS={}));var ew;(function(t){function e(r,i,o){return{range:r,target:i,data:o}}t.create=e;function n(r){let i=r;return J.defined(i)&&nt.is(i.range)&&(J.undefined(i.target)||J.string(i.target))}t.is=n})(ew||(ew={}));var dd;(function(t){function e(r,i){return{range:r,parent:i}}t.create=e;function n(r){let i=r;return J.objectLiteral(i)&&nt.is(i.range)&&(i.parent===void 0||t.is(i.parent))}t.is=n})(dd||(dd={}));var tw;(function(t){t.namespace="namespace",t.type="type",t.class="class",t.enum="enum",t.interface="interface",t.struct="struct",t.typeParameter="typeParameter",t.parameter="parameter",t.variable="variable",t.property="property",t.enumMember="enumMember",t.event="event",t.function="function",t.method="method",t.macro="macro",t.keyword="keyword",t.modifier="modifier",t.comment="comment",t.string="string",t.number="number",t.regexp="regexp",t.operator="operator",t.decorator="decorator"})(tw||(tw={}));var nw;(function(t){t.declaration="declaration",t.definition="definition",t.readonly="readonly",t.static="static",t.deprecated="deprecated",t.abstract="abstract",t.async="async",t.modification="modification",t.documentation="documentation",t.defaultLibrary="defaultLibrary"})(nw||(nw={}));var rw;(function(t){function e(n){const r=n;return J.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}t.is=e})(rw||(rw={}));var iw;(function(t){function e(r,i){return{range:r,text:i}}t.create=e;function n(r){const i=r;return i!=null&&nt.is(i.range)&&J.string(i.text)}t.is=n})(iw||(iw={}));var ow;(function(t){function e(r,i,o){return{range:r,variableName:i,caseSensitiveLookup:o}}t.create=e;function n(r){const i=r;return i!=null&&nt.is(i.range)&&J.boolean(i.caseSensitiveLookup)&&(J.string(i.variableName)||i.variableName===void 0)}t.is=n})(ow||(ow={}));var sw;(function(t){function e(r,i){return{range:r,expression:i}}t.create=e;function n(r){const i=r;return i!=null&&nt.is(i.range)&&(J.string(i.expression)||i.expression===void 0)}t.is=n})(sw||(sw={}));var aw;(function(t){function e(r,i){return{frameId:r,stoppedLocation:i}}t.create=e;function n(r){const i=r;return J.defined(i)&&nt.is(r.stoppedLocation)}t.is=n})(aw||(aw={}));var jm;(function(t){t.Type=1,t.Parameter=2;function e(n){return n===1||n===2}t.is=e})(jm||(jm={}));var Rm;(function(t){function e(r){return{value:r}}t.create=e;function n(r){const i=r;return J.objectLiteral(i)&&(i.tooltip===void 0||J.string(i.tooltip)||Kl.is(i.tooltip))&&(i.location===void 0||ma.is(i.location))&&(i.command===void 0||Oa.is(i.command))}t.is=n})(Rm||(Rm={}));var lw;(function(t){function e(r,i,o){const s={position:r,label:i};return o!==void 0&&(s.kind=o),s}t.create=e;function n(r){const i=r;return J.objectLiteral(i)&&wr.is(i.position)&&(J.string(i.label)||J.typedArray(i.label,Rm.is))&&(i.kind===void 0||jm.is(i.kind))&&i.textEdits===void 0||J.typedArray(i.textEdits,Wi.is)&&(i.tooltip===void 0||J.string(i.tooltip)||Kl.is(i.tooltip))&&(i.paddingLeft===void 0||J.boolean(i.paddingLeft))&&(i.paddingRight===void 0||J.boolean(i.paddingRight))}t.is=n})(lw||(lw={}));var cw;(function(t){function e(n){return{kind:"snippet",value:n}}t.createSnippet=e})(cw||(cw={}));var uw;(function(t){function e(n,r,i,o){return{insertText:n,filterText:r,range:i,command:o}}t.create=e})(uw||(uw={}));var fw;(function(t){function e(n){return{items:n}}t.create=e})(fw||(fw={}));var dw;(function(t){t.Invoked=0,t.Automatic=1})(dw||(dw={}));var hw;(function(t){function e(n,r){return{range:n,text:r}}t.create=e})(hw||(hw={}));var pw;(function(t){function e(n,r){return{triggerKind:n,selectedCompletionInfo:r}}t.create=e})(pw||(pw={}));var gw;(function(t){function e(n){const r=n;return J.objectLiteral(r)&&bm.is(r.uri)&&J.string(r.name)}t.is=e})(gw||(gw={}));var mw;(function(t){function e(o,s,a,l){return new _X(o,s,a,l)}t.create=e;function n(o){let s=o;return!!(J.defined(s)&&J.string(s.uri)&&(J.undefined(s.languageId)||J.string(s.languageId))&&J.uinteger(s.lineCount)&&J.func(s.getText)&&J.func(s.positionAt)&&J.func(s.offsetAt))}t.is=n;function r(o,s){let a=o.getText(),l=i(s,(u,f)=>{let d=u.range.start.line-f.range.start.line;return d===0?u.range.start.character-f.range.start.character:d}),c=a.length;for(let u=l.length-1;u>=0;u--){let f=l[u],d=o.offsetAt(f.range.start),h=o.offsetAt(f.range.end);if(h<=c)a=a.substring(0,d)+f.newText+a.substring(h,a.length);else throw new Error("Overlapping edit");c=d}return a}t.applyEdits=r;function i(o,s){if(o.length<=1)return o;const a=o.length/2|0,l=o.slice(0,a),c=o.slice(a);i(l,s),i(c,s);let u=0,f=0,d=0;for(;u<l.length&&f<c.length;)s(l[u],c[f])<=0?o[d++]=l[u++]:o[d++]=c[f++];for(;u<l.length;)o[d++]=l[u++];for(;f<c.length;)o[d++]=c[f++];return o}})(mw||(mw={}));let _X=class{constructor(e,n,r,i){this._uri=e,this._languageId=n,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let n=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(n,r)}return this._content}update(e,n){this._content=e.text,this._version=n,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let e=[],n=this._content,r=!0;for(let i=0;i<n.length;i++){r&&(e.push(i),r=!1);let o=n.charAt(i);r=o==="\r"||o===`
791
791
  `,o==="\r"&&i+1<n.length&&n.charAt(i+1)===`
792
- `&&i++}r&&n.length>0&&e.push(n.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return wr.create(0,e);for(;r<i;){let s=Math.floor((r+i)/2);n[s]>e?i=s:r=s+1}let o=r-1;return wr.create(o,e-n[o])}offsetAt(e){let n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;let r=n[e.line],i=e.line+1<n.length?n[e.line+1]:this._content.length;return Math.max(Math.min(r+e.character,i),r)}get lineCount(){return this.getLineOffsets().length}};var J;(function(t){const e=Object.prototype.toString;function n(h){return typeof h<"u"}t.defined=n;function r(h){return typeof h>"u"}t.undefined=r;function i(h){return h===!0||h===!1}t.boolean=i;function o(h){return e.call(h)==="[object String]"}t.string=o;function s(h){return e.call(h)==="[object Number]"}t.number=s;function a(h,p,O){return e.call(h)==="[object Number]"&&p<=h&&h<=O}t.numberRange=a;function l(h){return e.call(h)==="[object Number]"&&-2147483648<=h&&h<=2147483647}t.integer=l;function c(h){return e.call(h)==="[object Number]"&&0<=h&&h<=2147483647}t.uinteger=c;function u(h){return e.call(h)==="[object Function]"}t.func=u;function f(h){return h!==null&&typeof h=="object"}t.objectLiteral=f;function d(h,p){return Array.isArray(h)&&h.every(p)}t.typedArray=d})(J||(J={}));class ec{constructor(e,n,r,i){this._uri=e,this._languageId=n,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const n=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(n,r)}return this._content}update(e,n){for(let r of e)if(ec.isIncremental(r)){const i=AT(r.range),o=this.offsetAt(i.start),s=this.offsetAt(i.end);this._content=this._content.substring(0,o)+r.text+this._content.substring(s,this._content.length);const a=Math.max(i.start.line,0),l=Math.max(i.end.line,0);let c=this._lineOffsets;const u=Ow(r.text,!1,o);if(l-a===u.length)for(let d=0,h=u.length;d<h;d++)c[d+a+1]=u[d];else u.length<1e4?c.splice(a+1,l-a,...u):this._lineOffsets=c=c.slice(0,a+1).concat(u,c.slice(l+1));const f=r.text.length-(s-o);if(f!==0)for(let d=a+1+u.length,h=c.length;d<h;d++)c[d]=c[d]+f}else if(ec.isFull(r))this._content=r.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received");this._version=n}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=Ow(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return{line:0,character:e};for(;r<i;){let s=Math.floor((r+i)/2);n[s]>e?i=s:r=s+1}let o=r-1;return{line:o,character:e-n[o]}}offsetAt(e){let n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;let r=n[e.line],i=e.line+1<n.length?n[e.line+1]:this._content.length;return Math.max(Math.min(r+e.character,i),r)}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){let n=e;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}static isFull(e){let n=e;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}}var Dm;(function(t){function e(i,o,s,a){return new ec(i,o,s,a)}t.create=e;function n(i,o,s){if(i instanceof ec)return i.update(o,s),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}t.update=n;function r(i,o){let s=i.getText(),a=Qm(o.map(MX),(u,f)=>{let d=u.range.start.line-f.range.start.line;return d===0?u.range.start.character-f.range.start.character:d}),l=0;const c=[];for(const u of a){let f=i.offsetAt(u.range.start);if(f<l)throw new Error("Overlapping edit");f>l&&c.push(s.substring(l,f)),u.newText.length&&c.push(u.newText),l=i.offsetAt(u.range.end)}return c.push(s.substr(l)),c.join("")}t.applyEdits=r})(Dm||(Dm={}));function Qm(t,e){if(t.length<=1)return t;const n=t.length/2|0,r=t.slice(0,n),i=t.slice(n);Qm(r,e),Qm(i,e);let o=0,s=0,a=0;for(;o<r.length&&s<i.length;)e(r[o],i[s])<=0?t[a++]=r[o++]:t[a++]=i[s++];for(;o<r.length;)t[a++]=r[o++];for(;s<i.length;)t[a++]=i[s++];return t}function Ow(t,e,n=0){const r=e?[n]:[];for(let i=0;i<t.length;i++){let o=t.charCodeAt(i);(o===13||o===10)&&(o===13&&i+1<t.length&&t.charCodeAt(i+1)===10&&i++,r.push(n+i+1))}return r}function AT(t){const e=t.start,n=t.end;return e.line>n.line||e.line===n.line&&e.character>n.character?{start:n,end:e}:t}function MX(t){const e=AT(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var Je;(function(t){t[t.Undefined=0]="Undefined",t[t.EnumValueMismatch=1]="EnumValueMismatch",t[t.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",t[t.UnexpectedEndOfString=258]="UnexpectedEndOfString",t[t.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",t[t.InvalidUnicode=260]="InvalidUnicode",t[t.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",t[t.InvalidCharacter=262]="InvalidCharacter",t[t.PropertyExpected=513]="PropertyExpected",t[t.CommaExpected=514]="CommaExpected",t[t.ColonExpected=515]="ColonExpected",t[t.ValueExpected=516]="ValueExpected",t[t.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",t[t.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",t[t.TrailingComma=519]="TrailingComma",t[t.DuplicateKey=520]="DuplicateKey",t[t.CommentNotPermitted=521]="CommentNotPermitted",t[t.SchemaResolveError=768]="SchemaResolveError"})(Je||(Je={}));var xw;(function(t){t.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[rs.Markdown,rs.PlainText],commitCharactersSupport:!0}}}}})(xw||(xw={}));var ls=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)i.hasOwnProperty(o)&&(r[o]=i[o])},t(e,n)};return function(e,n){t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),NX={"color-hex":{errorMessage:"Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA.",pattern:/^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/},"date-time":{errorMessage:"String is not a RFC3339 date-time.",pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},date:{errorMessage:"String is not a RFC3339 date.",pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/i},time:{errorMessage:"String is not a RFC3339 time.",pattern:/^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},email:{errorMessage:"String is not an e-mail address.",pattern:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/}},cs=function(){function t(e,n,r){this.offset=n,this.length=r,this.parent=e}return Object.defineProperty(t.prototype,"children",{get:function(){return[]},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")},t}(),FX=function(t){ls(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.type="null",i.value=null,i}return e}(cs),vw=function(t){ls(e,t);function e(n,r,i){var o=t.call(this,n,i)||this;return o.type="boolean",o.value=r,o}return e}(cs),ZX=function(t){ls(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.type="array",i.items=[],i}return Object.defineProperty(e.prototype,"children",{get:function(){return this.items},enumerable:!0,configurable:!0}),e}(cs),WX=function(t){ls(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.type="number",i.isInteger=!0,i.value=Number.NaN,i}return e}(cs),yw=function(t){ls(e,t);function e(n,r,i){var o=t.call(this,n,r,i)||this;return o.type="string",o.value="",o}return e}(cs),VX=function(t){ls(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.type="property",i.colonOffset=-1,i}return Object.defineProperty(e.prototype,"children",{get:function(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]},enumerable:!0,configurable:!0}),e}(cs),zX=function(t){ls(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.type="object",i.properties=[],i}return Object.defineProperty(e.prototype,"children",{get:function(){return this.properties},enumerable:!0,configurable:!0}),e}(cs);function Xn(t){return fi(t)?t?{}:{not:{}}:t}var bw;(function(t){t[t.Key=0]="Key",t[t.Enum=1]="Enum"})(bw||(bw={}));var LX=function(){function t(e,n){e===void 0&&(e=-1),n===void 0&&(n=null),this.focusOffset=e,this.exclude=n,this.schemas=[]}return t.prototype.add=function(e){this.schemas.push(e)},t.prototype.merge=function(e){var n;(n=this.schemas).push.apply(n,e.schemas)},t.prototype.include=function(e){return(this.focusOffset===-1||PT(e,this.focusOffset))&&e!==this.exclude},t.prototype.newSub=function(){return new t(-1,this.exclude)},t}(),Bm=function(){function t(){}return Object.defineProperty(t.prototype,"schemas",{get:function(){return[]},enumerable:!0,configurable:!0}),t.prototype.add=function(e){},t.prototype.merge=function(e){},t.prototype.include=function(e){return!0},t.prototype.newSub=function(){return this},t.instance=new t,t}(),Yn=function(){function t(){this.problems=[],this.propertiesMatches=0,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,this.enumValues=null}return t.prototype.hasProblems=function(){return!!this.problems.length},t.prototype.mergeAll=function(e){for(var n=0,r=e;n<r.length;n++){var i=r[n];this.merge(i)}},t.prototype.merge=function(e){this.problems=this.problems.concat(e.problems)},t.prototype.mergeEnumValues=function(e){if(!this.enumValueMatch&&!e.enumValueMatch&&this.enumValues&&e.enumValues){this.enumValues=this.enumValues.concat(e.enumValues);for(var n=0,r=this.problems;n<r.length;n++){var i=r[n];i.code===Je.EnumValueMismatch&&(i.message="Value is not accepted. Valid values: "+this.enumValues.map(function(o){return JSON.stringify(o)}).join(", ")+".")}}},t.prototype.mergePropertyMatch=function(e){this.merge(e),this.propertiesMatches++,(e.enumValueMatch||!e.hasProblems()&&e.propertiesMatches)&&this.propertiesValueMatches++,e.enumValueMatch&&e.enumValues&&e.enumValues.length===1&&this.primaryValueMatches++},t.prototype.compare=function(e){var n=this.hasProblems();return n!==e.hasProblems()?n?-1:1:this.enumValueMatch!==e.enumValueMatch?e.enumValueMatch?-1:1:this.primaryValueMatches!==e.primaryValueMatches?this.primaryValueMatches-e.primaryValueMatches:this.propertiesValueMatches!==e.propertiesValueMatches?this.propertiesValueMatches-e.propertiesValueMatches:this.propertiesMatches-e.propertiesMatches},t}();function XX(t,e){return e===void 0&&(e=[]),new ET(t,e,[])}function po(t){return DX(t)}function _m(t){return RX(t)}function PT(t,e,n){return n===void 0&&(n=!1),e>=t.offset&&e<t.offset+t.length||n&&e===t.offset+t.length}var ET=function(){function t(e,n,r){n===void 0&&(n=[]),r===void 0&&(r=[]),this.root=e,this.syntaxErrors=n,this.comments=r}return t.prototype.getNodeFromOffset=function(e,n){if(n===void 0&&(n=!1),this.root)return jX(this.root,e,n)},t.prototype.visit=function(e){if(this.root){var n=function(r){var i=e(r),o=r.children;if(Array.isArray(o))for(var s=0;s<o.length&&i;s++)i=n(o[s]);return i};n(this.root)}},t.prototype.validate=function(e,n){if(this.root&&n){var r=new Yn;return pn(this.root,n,r,Bm.instance),r.problems.map(function(i){var o=nt.create(e.positionAt(i.location.offset),e.positionAt(i.location.offset+i.location.length));return _i.create(o,i.message,i.severity,i.code)})}return null},t.prototype.getMatchingSchemas=function(e,n,r){n===void 0&&(n=-1),r===void 0&&(r=null);var i=new LX(n,r);return this.root&&e&&pn(this.root,e,new Yn,i),i.schemas},t}();function pn(t,e,n,r){if(!t||!r.include(t))return;switch(t.type){case"object":l(t,e,n,r);break;case"array":a(t,e,n,r);break;case"string":s(t,e,n);break;case"number":o(t,e,n);break;case"property":return pn(t.valueNode,e,n,r)}i(),r.add({node:t,schema:e});function i(){function c($){return t.type===$||$==="integer"&&t.type==="number"&&t.isInteger||e.nullable&&t.value===null}if(Array.isArray(e.type)?e.type.some(c)||n.problems.push({location:{offset:t.offset,length:t.length},severity:We.Warning,message:e.errorMessage||"Incorrect type. Expected one of "+e.type.join(", ")+"."}):e.type&&(c(e.type)||n.problems.push({location:{offset:t.offset,length:t.length},severity:We.Warning,message:e.errorMessage||'Incorrect type. Expected "'+e.type+'".'})),Array.isArray(e.allOf))for(var u=0,f=e.allOf;u<f.length;u++){var d=f[u];pn(t,Xn(d),n,r)}var h=Xn(e.not);if(h){var p=new Yn,O=r.newSub();pn(t,h,p,O),p.hasProblems()||n.problems.push({location:{offset:t.offset,length:t.length},severity:We.Warning,message:"Matches a schema that is not allowed."});for(var m=0,x=O.schemas;m<x.length;m++){var v=x[m];v.inverted=!v.inverted,r.add(v)}}var y=function($,R){for(var M=[],Q=null,Z=0,G=$;Z<G.length;Z++){var V=G[Z],ee=Xn(V),Y=new Yn,z=r.newSub();if(pn(t,ee,Y,z),Y.hasProblems()||M.push(ee),!Q)Q={schema:ee,validationResult:Y,matchingSchemas:z};else if(!R&&!Y.hasProblems()&&!Q.validationResult.hasProblems())Q.matchingSchemas.merge(z),Q.validationResult.propertiesMatches+=Y.propertiesMatches,Q.validationResult.propertiesValueMatches+=Y.propertiesValueMatches;else{var D=Y.compare(Q.validationResult);D>0?Q={schema:ee,validationResult:Y,matchingSchemas:z}:D===0&&(Q.matchingSchemas.merge(z),Q.validationResult.mergeEnumValues(Y))}}return M.length>1&&R&&n.problems.push({location:{offset:t.offset,length:1},severity:We.Warning,message:"Matches multiple schemas when only one must validate."}),Q!==null&&(n.merge(Q.validationResult),n.propertiesMatches+=Q.validationResult.propertiesMatches,n.propertiesValueMatches+=Q.validationResult.propertiesValueMatches,r.merge(Q.matchingSchemas)),M.length};Array.isArray(e.anyOf)&&y(e.anyOf,!1),Array.isArray(e.oneOf)&&y(e.oneOf,!0);var S=function($){var R=new Yn,M=r.newSub();pn(t,Xn($),R,M),n.merge(R),n.propertiesMatches+=R.propertiesMatches,n.propertiesValueMatches+=R.propertiesValueMatches,r.merge(M)},b=function($,R,M){var Q=Xn($),Z=new Yn,G=r.newSub();pn(t,Q,Z,G),r.merge(G),Z.hasProblems()?M&&S(M):R&&S(R)},w=Xn(e.if);if(w&&b(w,Xn(e.then),Xn(e.else)),Array.isArray(e.enum)){for(var C=po(t),k=!1,I=0,A=e.enum;I<A.length;I++){var E=A[I];if(Pl(C,E)){k=!0;break}}n.enumValues=e.enum,n.enumValueMatch=k,k||n.problems.push({location:{offset:t.offset,length:t.length},severity:We.Warning,code:Je.EnumValueMismatch,message:e.errorMessage||"Value is not accepted. Valid values: "+e.enum.map(function($){return JSON.stringify($)}).join(", ")+"."})}if(ji(e.const)){var C=po(t);Pl(C,e.const)?n.enumValueMatch=!0:(n.problems.push({location:{offset:t.offset,length:t.length},severity:We.Warning,code:Je.EnumValueMismatch,message:e.errorMessage||"Value must be "+JSON.stringify(e.const)+"."}),n.enumValueMatch=!1),n.enumValues=[e.const]}e.deprecationMessage&&t.parent&&n.problems.push({location:{offset:t.parent.offset,length:t.parent.length},severity:We.Warning,message:e.deprecationMessage})}function o(c,u,f,d){var h=c.value;lr(u.multipleOf)&&h%u.multipleOf!==0&&f.problems.push({location:{offset:c.offset,length:c.length},severity:We.Warning,message:"Value is not divisible by "+u.multipleOf+"."});function p(S,b){if(lr(b))return b;if(fi(b)&&b)return S}function O(S,b){if(!fi(b)||!b)return S}var m=p(u.minimum,u.exclusiveMinimum);lr(m)&&h<=m&&f.problems.push({location:{offset:c.offset,length:c.length},severity:We.Warning,message:"Value is below the exclusive minimum of "+m+"."});var x=p(u.maximum,u.exclusiveMaximum);lr(x)&&h>=x&&f.problems.push({location:{offset:c.offset,length:c.length},severity:We.Warning,message:"Value is above the exclusive maximum of "+x+"."});var v=O(u.minimum,u.exclusiveMinimum);lr(v)&&h<v&&f.problems.push({location:{offset:c.offset,length:c.length},severity:We.Warning,message:"Value is below the minimum of "+v+"."});var y=O(u.maximum,u.exclusiveMaximum);lr(y)&&h>y&&f.problems.push({location:{offset:c.offset,length:c.length},severity:We.Warning,message:"Value is above the maximum of "+y+"."})}function s(c,u,f,d){if(lr(u.minLength)&&c.value.length<u.minLength&&f.problems.push({location:{offset:c.offset,length:c.length},severity:We.Warning,message:"String is shorter than the minimum length of "+u.minLength+"."}),lr(u.maxLength)&&c.value.length>u.maxLength&&f.problems.push({location:{offset:c.offset,length:c.length},severity:We.Warning,message:"String is longer than the maximum length of "+u.maxLength+"."}),BX(u.pattern)){var h=new RegExp(u.pattern);h.test(c.value)||f.problems.push({location:{offset:c.offset,length:c.length},severity:We.Warning,message:u.patternErrorMessage||u.errorMessage||'String does not match the pattern of "'+u.pattern+'".'})}if(u.format)switch(u.format){case"uri":case"uri-reference":{var p=void 0;if(!c.value)p="URI expected.";else{var O=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(c.value);O?!O[2]&&u.format==="uri"&&(p="URI with a scheme is expected."):p="URI is expected."}p&&f.problems.push({location:{offset:c.offset,length:c.length},severity:We.Warning,message:u.patternErrorMessage||u.errorMessage||"String is not a URI: "+p})}break;case"color-hex":case"date-time":case"date":case"time":case"email":var m=NX[u.format];(!c.value||!m.pattern.exec(c.value))&&f.problems.push({location:{offset:c.offset,length:c.length},severity:We.Warning,message:u.patternErrorMessage||u.errorMessage||m.errorMessage});break}}function a(c,u,f,d){if(Array.isArray(u.items)){for(var h=u.items,p=0;p<h.length;p++){var O=h[p],m=Xn(O),x=new Yn,v=c.items[p];v?(pn(v,m,x,d),f.mergePropertyMatch(x)):c.items.length>=h.length&&f.propertiesValueMatches++}if(c.items.length>h.length)if(typeof u.additionalItems=="object")for(var y=h.length;y<c.items.length;y++){var x=new Yn;pn(c.items[y],u.additionalItems,x,d),f.mergePropertyMatch(x)}else u.additionalItems===!1&&f.problems.push({location:{offset:c.offset,length:c.length},severity:We.Warning,message:"Array has too many items according to schema. Expected "+h.length+" or fewer."})}else{var S=Xn(u.items);if(S)for(var b=0,w=c.items;b<w.length;b++){var v=w[b],x=new Yn;pn(v,S,x,d),f.mergePropertyMatch(x)}}var C=Xn(u.contains);if(C){var k=c.items.some(function(E){var $=new Yn;return pn(E,C,$,Bm.instance),!$.hasProblems()});k||f.problems.push({location:{offset:c.offset,length:c.length},severity:We.Warning,message:u.errorMessage||"Array does not contain required item."})}if(lr(u.minItems)&&c.items.length<u.minItems&&f.problems.push({location:{offset:c.offset,length:c.length},severity:We.Warning,message:"Array has too few items. Expected "+u.minItems+" or more."}),lr(u.maxItems)&&c.items.length>u.maxItems&&f.problems.push({location:{offset:c.offset,length:c.length},severity:We.Warning,message:"Array has too many items. Expected "+u.maxItems+" or fewer."}),u.uniqueItems===!0){var I=po(c),A=I.some(function(E,$){return $!==I.lastIndexOf(E)});A&&f.problems.push({location:{offset:c.offset,length:c.length},severity:We.Warning,message:"Array has duplicate items."})}}function l(c,u,f,d){for(var h=Object.create(null),p=[],O=0,m=c.properties;O<m.length;O++){var x=m[O],v=x.keyNode.value;h[v]=x.valueNode,p.push(v)}if(Array.isArray(u.required))for(var y=0,S=u.required;y<S.length;y++){var b=S[y];if(!h[b]){var w=c.parent&&c.parent.type==="property"&&c.parent.keyNode,C=w?{offset:w.offset,length:w.length}:{offset:c.offset,length:1};f.problems.push({location:C,severity:We.Warning,message:'Missing property "'+b+'".'})}}var k=function(ne){for(var he=p.indexOf(ne);he>=0;)p.splice(he,1),he=p.indexOf(ne)};if(u.properties)for(var I=0,A=Object.keys(u.properties);I<A.length;I++){var b=A[I];k(b);var E=u.properties[b],$=h[b];if($)if(fi(E))if(E)f.propertiesMatches++,f.propertiesValueMatches++;else{var x=$.parent;f.problems.push({location:{offset:x.keyNode.offset,length:x.keyNode.length},severity:We.Warning,message:u.errorMessage||"Property "+b+" is not allowed."})}else{var R=new Yn;pn($,E,R,d),f.mergePropertyMatch(R)}}if(u.patternProperties)for(var M=0,Q=Object.keys(u.patternProperties);M<Q.length;M++)for(var Z=Q[M],G=new RegExp(Z),V=0,ee=p.slice(0);V<ee.length;V++){var b=ee[V];if(G.test(b)){k(b);var $=h[b];if($){var E=u.patternProperties[Z];if(fi(E))if(E)f.propertiesMatches++,f.propertiesValueMatches++;else{var x=$.parent;f.problems.push({location:{offset:x.keyNode.offset,length:x.keyNode.length},severity:We.Warning,message:u.errorMessage||"Property "+b+" is not allowed."})}else{var R=new Yn;pn($,E,R,d),f.mergePropertyMatch(R)}}}}if(typeof u.additionalProperties=="object")for(var Y=0,z=p;Y<z.length;Y++){var b=z[Y],$=h[b];if($){var R=new Yn;pn($,u.additionalProperties,R,d),f.mergePropertyMatch(R)}}else if(u.additionalProperties===!1&&p.length>0)for(var D=0,B=p;D<B.length;D++){var b=B[D],$=h[b];if($){var x=$.parent;f.problems.push({location:{offset:x.keyNode.offset,length:x.keyNode.length},severity:We.Warning,message:u.errorMessage||"Property "+b+" is not allowed."})}}if(lr(u.maxProperties)&&c.properties.length>u.maxProperties&&f.problems.push({location:{offset:c.offset,length:c.length},severity:We.Warning,message:"Object has more properties than limit of "+u.maxProperties+"."}),lr(u.minProperties)&&c.properties.length<u.minProperties&&f.problems.push({location:{offset:c.offset,length:c.length},severity:We.Warning,message:"Object has fewer properties than the required number of "+u.minProperties}),u.dependencies)for(var N=0,U=Object.keys(u.dependencies);N<U.length;N++){var v=U[N],F=h[v];if(F){var te=u.dependencies[v];if(Array.isArray(te))for(var L=0,ce=te;L<ce.length;L++){var re=ce[L];h[re]?f.propertiesValueMatches++:f.problems.push({location:{offset:c.offset,length:c.length},severity:We.Warning,message:"Object is missing property "+re+" required by property {$key}."})}else{var E=Xn(te);if(E){var R=new Yn;pn(c,E,R,d),f.mergePropertyMatch(R)}}}}var ae=Xn(u.propertyNames);if(ae)for(var H=0,pe=c.properties;H<pe.length;H++){var q=pe[H],v=q.keyNode;v&&pn(v,ae,f,Bm.instance)}}}function GX(t,e){var n=[],r=-1,i=t.getText(),o=Ks(i,!1),s=e&&e.collectComments?[]:void 0;function a(){for(;;){var b=o.scan();switch(u(),b){case 12:case 13:Array.isArray(s)&&s.push(nt.create(t.positionAt(o.getTokenOffset()),t.positionAt(o.getTokenOffset()+o.getTokenLength())));break;case 15:case 14:break;default:return b}}}function l(b,w,C,k,I){if(I===void 0&&(I=We.Error),n.length===0||C!==r){var A=nt.create(t.positionAt(C),t.positionAt(k));n.push(_i.create(A,b,I,w,t.languageId)),r=C}}function c(b,w,C,k,I){C===void 0&&(C=null),k===void 0&&(k=[]),I===void 0&&(I=[]);var A=o.getTokenOffset(),E=o.getTokenOffset()+o.getTokenLength();if(A===E&&A>0){for(A--;A>0&&/\s/.test(i.charAt(A));)A--;E=A+1}if(l(b,w,A,E),C&&f(C,!1),k.length+I.length>0)for(var $=o.getToken();$!==17;){if(k.indexOf($)!==-1){a();break}else if(I.indexOf($)!==-1)break;$=a()}return C}function u(){switch(o.getTokenError()){case 4:return c("Invalid unicode sequence in string.",Je.InvalidUnicode),!0;case 5:return c("Invalid escape character in string.",Je.InvalidEscapeCharacter),!0;case 3:return c("Unexpected end of number.",Je.UnexpectedEndOfNumber),!0;case 1:return c("Unexpected end of comment.",Je.UnexpectedEndOfComment),!0;case 2:return c("Unexpected end of string.",Je.UnexpectedEndOfString),!0;case 6:return c("Invalid characters in string. Control characters must be escaped.",Je.InvalidCharacter),!0}return!1}function f(b,w){return b.length=o.getTokenOffset()+o.getTokenLength()-b.offset,w&&a(),b}function d(b){if(o.getToken()!==3)return null;var w=new ZX(b,o.getTokenOffset());a();for(var C=!1;o.getToken()!==4&&o.getToken()!==17;){if(o.getToken()===5){C||c("Value expected",Je.ValueExpected);var k=o.getTokenOffset();if(a(),o.getToken()===4){C&&l("Trailing comma",Je.TrailingComma,k,k+1);continue}}else C&&c("Expected comma",Je.CommaExpected);var I=v(w);I?w.items.push(I):c("Value expected",Je.ValueExpected,null,[],[4,5]),C=!0}return o.getToken()!==4?c("Expected comma or closing bracket",Je.CommaOrCloseBacketExpected,w):f(w,!0)}function h(b,w){var C=new VX(b,o.getTokenOffset()),k=O(C);if(!k)if(o.getToken()===16){c("Property keys must be doublequoted",Je.Undefined);var I=new yw(C,o.getTokenOffset(),o.getTokenLength());I.value=o.getTokenValue(),k=I,a()}else return null;C.keyNode=k;var A=w[k.value];if(A?(l("Duplicate object key",Je.DuplicateKey,C.keyNode.offset,C.keyNode.offset+C.keyNode.length,We.Warning),typeof A=="object"&&l("DuplicateKeyWarning",Je.DuplicateKey,A.keyNode.offset,A.keyNode.offset+A.keyNode.length,We.Warning),w[k.value]=!0):w[k.value]=C,o.getToken()===6)C.colonOffset=o.getTokenOffset(),a();else if(c("Colon expected",Je.ColonExpected),o.getToken()===10&&t.positionAt(k.offset+k.length).line<t.positionAt(o.getTokenOffset()).line)return C.length=k.length,C;var E=v(C,k.value);return E?(C.valueNode=E,C.length=E.offset+E.length-C.offset,C):c("Value expected",Je.ValueExpected,C,[],[2,5])}function p(b){if(o.getToken()!==1)return null;var w=new zX(b,o.getTokenOffset()),C=Object.create(null);a();for(var k=!1;o.getToken()!==2&&o.getToken()!==17;){if(o.getToken()===5){k||c("Property expected",Je.PropertyExpected);var I=o.getTokenOffset();if(a(),o.getToken()===2){k&&l("Trailing comma",Je.TrailingComma,I,I+1);continue}}else k&&c("Expected comma",Je.CommaExpected);var A=h(w,C);A?w.properties.push(A):c("Property expected",Je.PropertyExpected,null,[],[2,5]),k=!0}return o.getToken()!==2?c("Expected comma or closing brace",Je.CommaOrCloseBraceExpected,w):f(w,!0)}function O(b){if(o.getToken()!==10)return null;var w=new yw(b,o.getTokenOffset());return w.value=o.getTokenValue(),f(w,!0)}function m(b){if(o.getToken()!==11)return null;var w=new WX(b,o.getTokenOffset());if(o.getTokenError()===0){var C=o.getTokenValue();try{var k=JSON.parse(C);if(!lr(k))return c("Invalid number format.",Je.Undefined,w);w.value=k}catch{return c("Invalid number format.",Je.Undefined,w)}w.isInteger=C.indexOf(".")===-1}return f(w,!0)}function x(b){switch(o.getToken()){case 7:return f(new FX(b,o.getTokenOffset()),!0);case 8:return f(new vw(b,!0,o.getTokenOffset()),!0);case 9:return f(new vw(b,!1,o.getTokenOffset()),!0);default:return null}}function v(b,w){return d(b)||p(b)||O(b)||m(b)||x(b)}var y=null,S=a();return S!==17&&(y=v(null),y?o.getToken()!==17&&c("End of file expected.",Je.Undefined):c("Expected a JSON object, array or literal.",Je.Undefined)),new ET(y,n,s)}function Mm(t,e,n){if(t!==null&&typeof t=="object"){var r=e+" ";if(Array.isArray(t)){if(t.length===0)return"[]";for(var i=`[
792
+ `&&i++}r&&n.length>0&&e.push(n.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return wr.create(0,e);for(;r<i;){let s=Math.floor((r+i)/2);n[s]>e?i=s:r=s+1}let o=r-1;return wr.create(o,e-n[o])}offsetAt(e){let n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;let r=n[e.line],i=e.line+1<n.length?n[e.line+1]:this._content.length;return Math.max(Math.min(r+e.character,i),r)}get lineCount(){return this.getLineOffsets().length}};var J;(function(t){const e=Object.prototype.toString;function n(h){return typeof h<"u"}t.defined=n;function r(h){return typeof h>"u"}t.undefined=r;function i(h){return h===!0||h===!1}t.boolean=i;function o(h){return e.call(h)==="[object String]"}t.string=o;function s(h){return e.call(h)==="[object Number]"}t.number=s;function a(h,p,O){return e.call(h)==="[object Number]"&&p<=h&&h<=O}t.numberRange=a;function l(h){return e.call(h)==="[object Number]"&&-2147483648<=h&&h<=2147483647}t.integer=l;function c(h){return e.call(h)==="[object Number]"&&0<=h&&h<=2147483647}t.uinteger=c;function u(h){return e.call(h)==="[object Function]"}t.func=u;function f(h){return h!==null&&typeof h=="object"}t.objectLiteral=f;function d(h,p){return Array.isArray(h)&&h.every(p)}t.typedArray=d})(J||(J={}));class ec{constructor(e,n,r,i){this._uri=e,this._languageId=n,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const n=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(n,r)}return this._content}update(e,n){for(let r of e)if(ec.isIncremental(r)){const i=AT(r.range),o=this.offsetAt(i.start),s=this.offsetAt(i.end);this._content=this._content.substring(0,o)+r.text+this._content.substring(s,this._content.length);const a=Math.max(i.start.line,0),l=Math.max(i.end.line,0);let c=this._lineOffsets;const u=Ow(r.text,!1,o);if(l-a===u.length)for(let d=0,h=u.length;d<h;d++)c[d+a+1]=u[d];else u.length<1e4?c.splice(a+1,l-a,...u):this._lineOffsets=c=c.slice(0,a+1).concat(u,c.slice(l+1));const f=r.text.length-(s-o);if(f!==0)for(let d=a+1+u.length,h=c.length;d<h;d++)c[d]=c[d]+f}else if(ec.isFull(r))this._content=r.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received");this._version=n}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=Ow(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return{line:0,character:e};for(;r<i;){let s=Math.floor((r+i)/2);n[s]>e?i=s:r=s+1}let o=r-1;return{line:o,character:e-n[o]}}offsetAt(e){let n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;let r=n[e.line],i=e.line+1<n.length?n[e.line+1]:this._content.length;return Math.max(Math.min(r+e.character,i),r)}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){let n=e;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}static isFull(e){let n=e;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}}var Dm;(function(t){function e(i,o,s,a){return new ec(i,o,s,a)}t.create=e;function n(i,o,s){if(i instanceof ec)return i.update(o,s),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}t.update=n;function r(i,o){let s=i.getText(),a=Qm(o.map(MX),(u,f)=>{let d=u.range.start.line-f.range.start.line;return d===0?u.range.start.character-f.range.start.character:d}),l=0;const c=[];for(const u of a){let f=i.offsetAt(u.range.start);if(f<l)throw new Error("Overlapping edit");f>l&&c.push(s.substring(l,f)),u.newText.length&&c.push(u.newText),l=i.offsetAt(u.range.end)}return c.push(s.substr(l)),c.join("")}t.applyEdits=r})(Dm||(Dm={}));function Qm(t,e){if(t.length<=1)return t;const n=t.length/2|0,r=t.slice(0,n),i=t.slice(n);Qm(r,e),Qm(i,e);let o=0,s=0,a=0;for(;o<r.length&&s<i.length;)e(r[o],i[s])<=0?t[a++]=r[o++]:t[a++]=i[s++];for(;o<r.length;)t[a++]=r[o++];for(;s<i.length;)t[a++]=i[s++];return t}function Ow(t,e,n=0){const r=e?[n]:[];for(let i=0;i<t.length;i++){let o=t.charCodeAt(i);(o===13||o===10)&&(o===13&&i+1<t.length&&t.charCodeAt(i+1)===10&&i++,r.push(n+i+1))}return r}function AT(t){const e=t.start,n=t.end;return e.line>n.line||e.line===n.line&&e.character>n.character?{start:n,end:e}:t}function MX(t){const e=AT(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var Je;(function(t){t[t.Undefined=0]="Undefined",t[t.EnumValueMismatch=1]="EnumValueMismatch",t[t.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",t[t.UnexpectedEndOfString=258]="UnexpectedEndOfString",t[t.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",t[t.InvalidUnicode=260]="InvalidUnicode",t[t.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",t[t.InvalidCharacter=262]="InvalidCharacter",t[t.PropertyExpected=513]="PropertyExpected",t[t.CommaExpected=514]="CommaExpected",t[t.ColonExpected=515]="ColonExpected",t[t.ValueExpected=516]="ValueExpected",t[t.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",t[t.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",t[t.TrailingComma=519]="TrailingComma",t[t.DuplicateKey=520]="DuplicateKey",t[t.CommentNotPermitted=521]="CommentNotPermitted",t[t.SchemaResolveError=768]="SchemaResolveError"})(Je||(Je={}));var xw;(function(t){t.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[is.Markdown,is.PlainText],commitCharactersSupport:!0}}}}})(xw||(xw={}));var cs=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)i.hasOwnProperty(o)&&(r[o]=i[o])},t(e,n)};return function(e,n){t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),NX={"color-hex":{errorMessage:"Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA.",pattern:/^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/},"date-time":{errorMessage:"String is not a RFC3339 date-time.",pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},date:{errorMessage:"String is not a RFC3339 date.",pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/i},time:{errorMessage:"String is not a RFC3339 time.",pattern:/^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},email:{errorMessage:"String is not an e-mail address.",pattern:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/}},us=function(){function t(e,n,r){this.offset=n,this.length=r,this.parent=e}return Object.defineProperty(t.prototype,"children",{get:function(){return[]},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")},t}(),FX=function(t){cs(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.type="null",i.value=null,i}return e}(us),vw=function(t){cs(e,t);function e(n,r,i){var o=t.call(this,n,i)||this;return o.type="boolean",o.value=r,o}return e}(us),ZX=function(t){cs(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.type="array",i.items=[],i}return Object.defineProperty(e.prototype,"children",{get:function(){return this.items},enumerable:!0,configurable:!0}),e}(us),WX=function(t){cs(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.type="number",i.isInteger=!0,i.value=Number.NaN,i}return e}(us),yw=function(t){cs(e,t);function e(n,r,i){var o=t.call(this,n,r,i)||this;return o.type="string",o.value="",o}return e}(us),VX=function(t){cs(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.type="property",i.colonOffset=-1,i}return Object.defineProperty(e.prototype,"children",{get:function(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]},enumerable:!0,configurable:!0}),e}(us),zX=function(t){cs(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.type="object",i.properties=[],i}return Object.defineProperty(e.prototype,"children",{get:function(){return this.properties},enumerable:!0,configurable:!0}),e}(us);function Xn(t){return fi(t)?t?{}:{not:{}}:t}var bw;(function(t){t[t.Key=0]="Key",t[t.Enum=1]="Enum"})(bw||(bw={}));var LX=function(){function t(e,n){e===void 0&&(e=-1),n===void 0&&(n=null),this.focusOffset=e,this.exclude=n,this.schemas=[]}return t.prototype.add=function(e){this.schemas.push(e)},t.prototype.merge=function(e){var n;(n=this.schemas).push.apply(n,e.schemas)},t.prototype.include=function(e){return(this.focusOffset===-1||PT(e,this.focusOffset))&&e!==this.exclude},t.prototype.newSub=function(){return new t(-1,this.exclude)},t}(),Bm=function(){function t(){}return Object.defineProperty(t.prototype,"schemas",{get:function(){return[]},enumerable:!0,configurable:!0}),t.prototype.add=function(e){},t.prototype.merge=function(e){},t.prototype.include=function(e){return!0},t.prototype.newSub=function(){return this},t.instance=new t,t}(),Yn=function(){function t(){this.problems=[],this.propertiesMatches=0,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,this.enumValues=null}return t.prototype.hasProblems=function(){return!!this.problems.length},t.prototype.mergeAll=function(e){for(var n=0,r=e;n<r.length;n++){var i=r[n];this.merge(i)}},t.prototype.merge=function(e){this.problems=this.problems.concat(e.problems)},t.prototype.mergeEnumValues=function(e){if(!this.enumValueMatch&&!e.enumValueMatch&&this.enumValues&&e.enumValues){this.enumValues=this.enumValues.concat(e.enumValues);for(var n=0,r=this.problems;n<r.length;n++){var i=r[n];i.code===Je.EnumValueMismatch&&(i.message="Value is not accepted. Valid values: "+this.enumValues.map(function(o){return JSON.stringify(o)}).join(", ")+".")}}},t.prototype.mergePropertyMatch=function(e){this.merge(e),this.propertiesMatches++,(e.enumValueMatch||!e.hasProblems()&&e.propertiesMatches)&&this.propertiesValueMatches++,e.enumValueMatch&&e.enumValues&&e.enumValues.length===1&&this.primaryValueMatches++},t.prototype.compare=function(e){var n=this.hasProblems();return n!==e.hasProblems()?n?-1:1:this.enumValueMatch!==e.enumValueMatch?e.enumValueMatch?-1:1:this.primaryValueMatches!==e.primaryValueMatches?this.primaryValueMatches-e.primaryValueMatches:this.propertiesValueMatches!==e.propertiesValueMatches?this.propertiesValueMatches-e.propertiesValueMatches:this.propertiesMatches-e.propertiesMatches},t}();function XX(t,e){return e===void 0&&(e=[]),new ET(t,e,[])}function po(t){return DX(t)}function _m(t){return RX(t)}function PT(t,e,n){return n===void 0&&(n=!1),e>=t.offset&&e<t.offset+t.length||n&&e===t.offset+t.length}var ET=function(){function t(e,n,r){n===void 0&&(n=[]),r===void 0&&(r=[]),this.root=e,this.syntaxErrors=n,this.comments=r}return t.prototype.getNodeFromOffset=function(e,n){if(n===void 0&&(n=!1),this.root)return jX(this.root,e,n)},t.prototype.visit=function(e){if(this.root){var n=function(r){var i=e(r),o=r.children;if(Array.isArray(o))for(var s=0;s<o.length&&i;s++)i=n(o[s]);return i};n(this.root)}},t.prototype.validate=function(e,n){if(this.root&&n){var r=new Yn;return pn(this.root,n,r,Bm.instance),r.problems.map(function(i){var o=nt.create(e.positionAt(i.location.offset),e.positionAt(i.location.offset+i.location.length));return _i.create(o,i.message,i.severity,i.code)})}return null},t.prototype.getMatchingSchemas=function(e,n,r){n===void 0&&(n=-1),r===void 0&&(r=null);var i=new LX(n,r);return this.root&&e&&pn(this.root,e,new Yn,i),i.schemas},t}();function pn(t,e,n,r){if(!t||!r.include(t))return;switch(t.type){case"object":l(t,e,n,r);break;case"array":a(t,e,n,r);break;case"string":s(t,e,n);break;case"number":o(t,e,n);break;case"property":return pn(t.valueNode,e,n,r)}i(),r.add({node:t,schema:e});function i(){function c($){return t.type===$||$==="integer"&&t.type==="number"&&t.isInteger||e.nullable&&t.value===null}if(Array.isArray(e.type)?e.type.some(c)||n.problems.push({location:{offset:t.offset,length:t.length},severity:We.Warning,message:e.errorMessage||"Incorrect type. Expected one of "+e.type.join(", ")+"."}):e.type&&(c(e.type)||n.problems.push({location:{offset:t.offset,length:t.length},severity:We.Warning,message:e.errorMessage||'Incorrect type. Expected "'+e.type+'".'})),Array.isArray(e.allOf))for(var u=0,f=e.allOf;u<f.length;u++){var d=f[u];pn(t,Xn(d),n,r)}var h=Xn(e.not);if(h){var p=new Yn,O=r.newSub();pn(t,h,p,O),p.hasProblems()||n.problems.push({location:{offset:t.offset,length:t.length},severity:We.Warning,message:"Matches a schema that is not allowed."});for(var m=0,x=O.schemas;m<x.length;m++){var v=x[m];v.inverted=!v.inverted,r.add(v)}}var y=function($,R){for(var M=[],Q=null,Z=0,G=$;Z<G.length;Z++){var V=G[Z],ee=Xn(V),Y=new Yn,z=r.newSub();if(pn(t,ee,Y,z),Y.hasProblems()||M.push(ee),!Q)Q={schema:ee,validationResult:Y,matchingSchemas:z};else if(!R&&!Y.hasProblems()&&!Q.validationResult.hasProblems())Q.matchingSchemas.merge(z),Q.validationResult.propertiesMatches+=Y.propertiesMatches,Q.validationResult.propertiesValueMatches+=Y.propertiesValueMatches;else{var D=Y.compare(Q.validationResult);D>0?Q={schema:ee,validationResult:Y,matchingSchemas:z}:D===0&&(Q.matchingSchemas.merge(z),Q.validationResult.mergeEnumValues(Y))}}return M.length>1&&R&&n.problems.push({location:{offset:t.offset,length:1},severity:We.Warning,message:"Matches multiple schemas when only one must validate."}),Q!==null&&(n.merge(Q.validationResult),n.propertiesMatches+=Q.validationResult.propertiesMatches,n.propertiesValueMatches+=Q.validationResult.propertiesValueMatches,r.merge(Q.matchingSchemas)),M.length};Array.isArray(e.anyOf)&&y(e.anyOf,!1),Array.isArray(e.oneOf)&&y(e.oneOf,!0);var S=function($){var R=new Yn,M=r.newSub();pn(t,Xn($),R,M),n.merge(R),n.propertiesMatches+=R.propertiesMatches,n.propertiesValueMatches+=R.propertiesValueMatches,r.merge(M)},b=function($,R,M){var Q=Xn($),Z=new Yn,G=r.newSub();pn(t,Q,Z,G),r.merge(G),Z.hasProblems()?M&&S(M):R&&S(R)},w=Xn(e.if);if(w&&b(w,Xn(e.then),Xn(e.else)),Array.isArray(e.enum)){for(var C=po(t),k=!1,I=0,A=e.enum;I<A.length;I++){var E=A[I];if(Pl(C,E)){k=!0;break}}n.enumValues=e.enum,n.enumValueMatch=k,k||n.problems.push({location:{offset:t.offset,length:t.length},severity:We.Warning,code:Je.EnumValueMismatch,message:e.errorMessage||"Value is not accepted. Valid values: "+e.enum.map(function($){return JSON.stringify($)}).join(", ")+"."})}if(ji(e.const)){var C=po(t);Pl(C,e.const)?n.enumValueMatch=!0:(n.problems.push({location:{offset:t.offset,length:t.length},severity:We.Warning,code:Je.EnumValueMismatch,message:e.errorMessage||"Value must be "+JSON.stringify(e.const)+"."}),n.enumValueMatch=!1),n.enumValues=[e.const]}e.deprecationMessage&&t.parent&&n.problems.push({location:{offset:t.parent.offset,length:t.parent.length},severity:We.Warning,message:e.deprecationMessage})}function o(c,u,f,d){var h=c.value;lr(u.multipleOf)&&h%u.multipleOf!==0&&f.problems.push({location:{offset:c.offset,length:c.length},severity:We.Warning,message:"Value is not divisible by "+u.multipleOf+"."});function p(S,b){if(lr(b))return b;if(fi(b)&&b)return S}function O(S,b){if(!fi(b)||!b)return S}var m=p(u.minimum,u.exclusiveMinimum);lr(m)&&h<=m&&f.problems.push({location:{offset:c.offset,length:c.length},severity:We.Warning,message:"Value is below the exclusive minimum of "+m+"."});var x=p(u.maximum,u.exclusiveMaximum);lr(x)&&h>=x&&f.problems.push({location:{offset:c.offset,length:c.length},severity:We.Warning,message:"Value is above the exclusive maximum of "+x+"."});var v=O(u.minimum,u.exclusiveMinimum);lr(v)&&h<v&&f.problems.push({location:{offset:c.offset,length:c.length},severity:We.Warning,message:"Value is below the minimum of "+v+"."});var y=O(u.maximum,u.exclusiveMaximum);lr(y)&&h>y&&f.problems.push({location:{offset:c.offset,length:c.length},severity:We.Warning,message:"Value is above the maximum of "+y+"."})}function s(c,u,f,d){if(lr(u.minLength)&&c.value.length<u.minLength&&f.problems.push({location:{offset:c.offset,length:c.length},severity:We.Warning,message:"String is shorter than the minimum length of "+u.minLength+"."}),lr(u.maxLength)&&c.value.length>u.maxLength&&f.problems.push({location:{offset:c.offset,length:c.length},severity:We.Warning,message:"String is longer than the maximum length of "+u.maxLength+"."}),BX(u.pattern)){var h=new RegExp(u.pattern);h.test(c.value)||f.problems.push({location:{offset:c.offset,length:c.length},severity:We.Warning,message:u.patternErrorMessage||u.errorMessage||'String does not match the pattern of "'+u.pattern+'".'})}if(u.format)switch(u.format){case"uri":case"uri-reference":{var p=void 0;if(!c.value)p="URI expected.";else{var O=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(c.value);O?!O[2]&&u.format==="uri"&&(p="URI with a scheme is expected."):p="URI is expected."}p&&f.problems.push({location:{offset:c.offset,length:c.length},severity:We.Warning,message:u.patternErrorMessage||u.errorMessage||"String is not a URI: "+p})}break;case"color-hex":case"date-time":case"date":case"time":case"email":var m=NX[u.format];(!c.value||!m.pattern.exec(c.value))&&f.problems.push({location:{offset:c.offset,length:c.length},severity:We.Warning,message:u.patternErrorMessage||u.errorMessage||m.errorMessage});break}}function a(c,u,f,d){if(Array.isArray(u.items)){for(var h=u.items,p=0;p<h.length;p++){var O=h[p],m=Xn(O),x=new Yn,v=c.items[p];v?(pn(v,m,x,d),f.mergePropertyMatch(x)):c.items.length>=h.length&&f.propertiesValueMatches++}if(c.items.length>h.length)if(typeof u.additionalItems=="object")for(var y=h.length;y<c.items.length;y++){var x=new Yn;pn(c.items[y],u.additionalItems,x,d),f.mergePropertyMatch(x)}else u.additionalItems===!1&&f.problems.push({location:{offset:c.offset,length:c.length},severity:We.Warning,message:"Array has too many items according to schema. Expected "+h.length+" or fewer."})}else{var S=Xn(u.items);if(S)for(var b=0,w=c.items;b<w.length;b++){var v=w[b],x=new Yn;pn(v,S,x,d),f.mergePropertyMatch(x)}}var C=Xn(u.contains);if(C){var k=c.items.some(function(E){var $=new Yn;return pn(E,C,$,Bm.instance),!$.hasProblems()});k||f.problems.push({location:{offset:c.offset,length:c.length},severity:We.Warning,message:u.errorMessage||"Array does not contain required item."})}if(lr(u.minItems)&&c.items.length<u.minItems&&f.problems.push({location:{offset:c.offset,length:c.length},severity:We.Warning,message:"Array has too few items. Expected "+u.minItems+" or more."}),lr(u.maxItems)&&c.items.length>u.maxItems&&f.problems.push({location:{offset:c.offset,length:c.length},severity:We.Warning,message:"Array has too many items. Expected "+u.maxItems+" or fewer."}),u.uniqueItems===!0){var I=po(c),A=I.some(function(E,$){return $!==I.lastIndexOf(E)});A&&f.problems.push({location:{offset:c.offset,length:c.length},severity:We.Warning,message:"Array has duplicate items."})}}function l(c,u,f,d){for(var h=Object.create(null),p=[],O=0,m=c.properties;O<m.length;O++){var x=m[O],v=x.keyNode.value;h[v]=x.valueNode,p.push(v)}if(Array.isArray(u.required))for(var y=0,S=u.required;y<S.length;y++){var b=S[y];if(!h[b]){var w=c.parent&&c.parent.type==="property"&&c.parent.keyNode,C=w?{offset:w.offset,length:w.length}:{offset:c.offset,length:1};f.problems.push({location:C,severity:We.Warning,message:'Missing property "'+b+'".'})}}var k=function(ne){for(var he=p.indexOf(ne);he>=0;)p.splice(he,1),he=p.indexOf(ne)};if(u.properties)for(var I=0,A=Object.keys(u.properties);I<A.length;I++){var b=A[I];k(b);var E=u.properties[b],$=h[b];if($)if(fi(E))if(E)f.propertiesMatches++,f.propertiesValueMatches++;else{var x=$.parent;f.problems.push({location:{offset:x.keyNode.offset,length:x.keyNode.length},severity:We.Warning,message:u.errorMessage||"Property "+b+" is not allowed."})}else{var R=new Yn;pn($,E,R,d),f.mergePropertyMatch(R)}}if(u.patternProperties)for(var M=0,Q=Object.keys(u.patternProperties);M<Q.length;M++)for(var Z=Q[M],G=new RegExp(Z),V=0,ee=p.slice(0);V<ee.length;V++){var b=ee[V];if(G.test(b)){k(b);var $=h[b];if($){var E=u.patternProperties[Z];if(fi(E))if(E)f.propertiesMatches++,f.propertiesValueMatches++;else{var x=$.parent;f.problems.push({location:{offset:x.keyNode.offset,length:x.keyNode.length},severity:We.Warning,message:u.errorMessage||"Property "+b+" is not allowed."})}else{var R=new Yn;pn($,E,R,d),f.mergePropertyMatch(R)}}}}if(typeof u.additionalProperties=="object")for(var Y=0,z=p;Y<z.length;Y++){var b=z[Y],$=h[b];if($){var R=new Yn;pn($,u.additionalProperties,R,d),f.mergePropertyMatch(R)}}else if(u.additionalProperties===!1&&p.length>0)for(var D=0,B=p;D<B.length;D++){var b=B[D],$=h[b];if($){var x=$.parent;f.problems.push({location:{offset:x.keyNode.offset,length:x.keyNode.length},severity:We.Warning,message:u.errorMessage||"Property "+b+" is not allowed."})}}if(lr(u.maxProperties)&&c.properties.length>u.maxProperties&&f.problems.push({location:{offset:c.offset,length:c.length},severity:We.Warning,message:"Object has more properties than limit of "+u.maxProperties+"."}),lr(u.minProperties)&&c.properties.length<u.minProperties&&f.problems.push({location:{offset:c.offset,length:c.length},severity:We.Warning,message:"Object has fewer properties than the required number of "+u.minProperties}),u.dependencies)for(var N=0,U=Object.keys(u.dependencies);N<U.length;N++){var v=U[N],F=h[v];if(F){var te=u.dependencies[v];if(Array.isArray(te))for(var L=0,ce=te;L<ce.length;L++){var re=ce[L];h[re]?f.propertiesValueMatches++:f.problems.push({location:{offset:c.offset,length:c.length},severity:We.Warning,message:"Object is missing property "+re+" required by property {$key}."})}else{var E=Xn(te);if(E){var R=new Yn;pn(c,E,R,d),f.mergePropertyMatch(R)}}}}var ae=Xn(u.propertyNames);if(ae)for(var H=0,pe=c.properties;H<pe.length;H++){var q=pe[H],v=q.keyNode;v&&pn(v,ae,f,Bm.instance)}}}function GX(t,e){var n=[],r=-1,i=t.getText(),o=Ks(i,!1),s=e&&e.collectComments?[]:void 0;function a(){for(;;){var b=o.scan();switch(u(),b){case 12:case 13:Array.isArray(s)&&s.push(nt.create(t.positionAt(o.getTokenOffset()),t.positionAt(o.getTokenOffset()+o.getTokenLength())));break;case 15:case 14:break;default:return b}}}function l(b,w,C,k,I){if(I===void 0&&(I=We.Error),n.length===0||C!==r){var A=nt.create(t.positionAt(C),t.positionAt(k));n.push(_i.create(A,b,I,w,t.languageId)),r=C}}function c(b,w,C,k,I){C===void 0&&(C=null),k===void 0&&(k=[]),I===void 0&&(I=[]);var A=o.getTokenOffset(),E=o.getTokenOffset()+o.getTokenLength();if(A===E&&A>0){for(A--;A>0&&/\s/.test(i.charAt(A));)A--;E=A+1}if(l(b,w,A,E),C&&f(C,!1),k.length+I.length>0)for(var $=o.getToken();$!==17;){if(k.indexOf($)!==-1){a();break}else if(I.indexOf($)!==-1)break;$=a()}return C}function u(){switch(o.getTokenError()){case 4:return c("Invalid unicode sequence in string.",Je.InvalidUnicode),!0;case 5:return c("Invalid escape character in string.",Je.InvalidEscapeCharacter),!0;case 3:return c("Unexpected end of number.",Je.UnexpectedEndOfNumber),!0;case 1:return c("Unexpected end of comment.",Je.UnexpectedEndOfComment),!0;case 2:return c("Unexpected end of string.",Je.UnexpectedEndOfString),!0;case 6:return c("Invalid characters in string. Control characters must be escaped.",Je.InvalidCharacter),!0}return!1}function f(b,w){return b.length=o.getTokenOffset()+o.getTokenLength()-b.offset,w&&a(),b}function d(b){if(o.getToken()!==3)return null;var w=new ZX(b,o.getTokenOffset());a();for(var C=!1;o.getToken()!==4&&o.getToken()!==17;){if(o.getToken()===5){C||c("Value expected",Je.ValueExpected);var k=o.getTokenOffset();if(a(),o.getToken()===4){C&&l("Trailing comma",Je.TrailingComma,k,k+1);continue}}else C&&c("Expected comma",Je.CommaExpected);var I=v(w);I?w.items.push(I):c("Value expected",Je.ValueExpected,null,[],[4,5]),C=!0}return o.getToken()!==4?c("Expected comma or closing bracket",Je.CommaOrCloseBacketExpected,w):f(w,!0)}function h(b,w){var C=new VX(b,o.getTokenOffset()),k=O(C);if(!k)if(o.getToken()===16){c("Property keys must be doublequoted",Je.Undefined);var I=new yw(C,o.getTokenOffset(),o.getTokenLength());I.value=o.getTokenValue(),k=I,a()}else return null;C.keyNode=k;var A=w[k.value];if(A?(l("Duplicate object key",Je.DuplicateKey,C.keyNode.offset,C.keyNode.offset+C.keyNode.length,We.Warning),typeof A=="object"&&l("DuplicateKeyWarning",Je.DuplicateKey,A.keyNode.offset,A.keyNode.offset+A.keyNode.length,We.Warning),w[k.value]=!0):w[k.value]=C,o.getToken()===6)C.colonOffset=o.getTokenOffset(),a();else if(c("Colon expected",Je.ColonExpected),o.getToken()===10&&t.positionAt(k.offset+k.length).line<t.positionAt(o.getTokenOffset()).line)return C.length=k.length,C;var E=v(C,k.value);return E?(C.valueNode=E,C.length=E.offset+E.length-C.offset,C):c("Value expected",Je.ValueExpected,C,[],[2,5])}function p(b){if(o.getToken()!==1)return null;var w=new zX(b,o.getTokenOffset()),C=Object.create(null);a();for(var k=!1;o.getToken()!==2&&o.getToken()!==17;){if(o.getToken()===5){k||c("Property expected",Je.PropertyExpected);var I=o.getTokenOffset();if(a(),o.getToken()===2){k&&l("Trailing comma",Je.TrailingComma,I,I+1);continue}}else k&&c("Expected comma",Je.CommaExpected);var A=h(w,C);A?w.properties.push(A):c("Property expected",Je.PropertyExpected,null,[],[2,5]),k=!0}return o.getToken()!==2?c("Expected comma or closing brace",Je.CommaOrCloseBraceExpected,w):f(w,!0)}function O(b){if(o.getToken()!==10)return null;var w=new yw(b,o.getTokenOffset());return w.value=o.getTokenValue(),f(w,!0)}function m(b){if(o.getToken()!==11)return null;var w=new WX(b,o.getTokenOffset());if(o.getTokenError()===0){var C=o.getTokenValue();try{var k=JSON.parse(C);if(!lr(k))return c("Invalid number format.",Je.Undefined,w);w.value=k}catch{return c("Invalid number format.",Je.Undefined,w)}w.isInteger=C.indexOf(".")===-1}return f(w,!0)}function x(b){switch(o.getToken()){case 7:return f(new FX(b,o.getTokenOffset()),!0);case 8:return f(new vw(b,!0,o.getTokenOffset()),!0);case 9:return f(new vw(b,!1,o.getTokenOffset()),!0);default:return null}}function v(b,w){return d(b)||p(b)||O(b)||m(b)||x(b)}var y=null,S=a();return S!==17&&(y=v(null),y?o.getToken()!==17&&c("End of file expected.",Je.Undefined):c("Expected a JSON object, array or literal.",Je.Undefined)),new ET(y,n,s)}function Mm(t,e,n){if(t!==null&&typeof t=="object"){var r=e+" ";if(Array.isArray(t)){if(t.length===0)return"[]";for(var i=`[
793
793
  `,o=0;o<t.length;o++)i+=r+Mm(t[o],r,n),o<t.length-1&&(i+=","),i+=`
794
794
  `;return i+=e+"]",i}else{var s=Object.keys(t);if(s.length===0)return"{}";for(var i=`{
795
795
  `,o=0;o<s.length;o++){var a=s[o];i+=r+JSON.stringify(a)+": "+Mm(t[a],r,n),o<s.length-1&&(i+=","),i+=`
@@ -798,14 +798,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
798
798
  `+y+"]",y+=" ",f="array";p=x+y+u.bodyText.split(`
799
799
  `).join(`
800
800
  `+y)+v+n,h=h||o.sanitizeLabel(p),O=p.replace(/[\n]/g,"")}r.add({kind:o.getSuggestionKind(f),label:h,documentation:o.fromMarkup(u.markdownDescription)||u.description,insertText:p,insertTextFormat:en.Snippet,filterText:O}),s=!0}),!s&&typeof e.items=="object"&&!Array.isArray(e.items)&&this.addDefaultValueCompletions(e.items,n,r,i+1)},t.prototype.addEnumValueCompletions=function(e,n,r){if(ji(e.const)&&r.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(e.const),insertText:this.getInsertTextForValue(e.const,n),insertTextFormat:en.Snippet,documentation:this.fromMarkup(e.markdownDescription)||e.description}),Array.isArray(e.enum))for(var i=0,o=e.enum.length;i<o;i++){var s=e.enum[i],a=this.fromMarkup(e.markdownDescription)||e.description;e.markdownEnumDescriptions&&i<e.markdownEnumDescriptions.length&&this.doesSupportMarkdown()?a=this.fromMarkup(e.markdownEnumDescriptions[i]):e.enumDescriptions&&i<e.enumDescriptions.length&&(a=e.enumDescriptions[i]),r.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(s),insertText:this.getInsertTextForValue(s,n),insertTextFormat:en.Snippet,documentation:a})}},t.prototype.collectTypes=function(e,n){if(!(Array.isArray(e.enum)||ji(e.const))){var r=e.type;Array.isArray(r)?r.forEach(function(i){return n[i]=!0}):n[r]=!0}},t.prototype.addFillerValueCompletions=function(e,n,r){e.object&&r.add({kind:this.getSuggestionKind("object"),label:"{}",insertText:this.getInsertTextForGuessedValue({},n),insertTextFormat:en.Snippet,detail:"New object",documentation:""}),e.array&&r.add({kind:this.getSuggestionKind("array"),label:"[]",insertText:this.getInsertTextForGuessedValue([],n),insertTextFormat:en.Snippet,detail:"New array",documentation:""})},t.prototype.addBooleanValueCompletion=function(e,n,r){r.add({kind:this.getSuggestionKind("boolean"),label:e?"true":"false",insertText:this.getInsertTextForValue(e,n),insertTextFormat:en.Snippet,documentation:""})},t.prototype.addNullValueCompletion=function(e,n){n.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+e,insertTextFormat:en.Snippet,documentation:""})},t.prototype.addDollarSchemaCompletions=function(e,n){var r=this,i=this.schemaService.getRegisteredSchemaIds(function(o){return o==="http"||o==="https"});i.forEach(function(o){return n.add({kind:cr.Module,label:r.getLabelForValue(o),filterText:r.getFilterTextForValue(o),insertText:r.getInsertTextForValue(o,e),insertTextFormat:en.Snippet,documentation:""})})},t.prototype.sanitizeLabel=function(e){return e=e.replace(/[\n]/g,"↵"),e.length>57&&(e=e.substr(0,57).trim()+"..."),e},t.prototype.getLabelForValue=function(e){return this.sanitizeLabel(JSON.stringify(e))},t.prototype.getFilterTextForValue=function(e){return JSON.stringify(e)},t.prototype.getFilterTextForSnippetValue=function(e){return JSON.stringify(e).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")},t.prototype.getLabelForSnippetValue=function(e){var n=JSON.stringify(e);return n=n.replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1"),this.sanitizeLabel(n)},t.prototype.getInsertTextForPlainText=function(e){return e.replace(/[\\\$\}]/g,"\\$&")},t.prototype.getInsertTextForValue=function(e,n){var r=JSON.stringify(e,null," ");return r==="{}"?"{$1}"+n:r==="[]"?"[$1]"+n:this.getInsertTextForPlainText(r+n)},t.prototype.getInsertTextForSnippetValue=function(e,n){var r=function(i){return typeof i=="string"&&i[0]==="^"?i.substr(1):JSON.stringify(i)};return Mm(e,"",r)+n},t.prototype.getInsertTextForGuessedValue=function(e,n){switch(typeof e){case"object":return e===null?"${1:null}"+n:this.getInsertTextForValue(e,n);case"string":var r=JSON.stringify(e);return r=r.substr(1,r.length-2),r=this.getInsertTextForPlainText(r),'"${1:'+r+'}"'+n;case"number":case"boolean":return"${1:"+JSON.stringify(e)+"}"+n}return this.getInsertTextForValue(e,n)},t.prototype.getSuggestionKind=function(e){if(Array.isArray(e)){var n=e;e=n.length>0?n[0]:null}if(!e)return cr.Value;switch(e){case"string":return cr.Value;case"object":return cr.Module;case"property":return cr.Property;default:return cr.Value}},t.prototype.getLabelTextForMatchingNode=function(e,n){switch(e.type){case"array":return"[]";case"object":return"{}";default:var r=n.getText().substr(e.offset,e.length);return r}},t.prototype.getInsertTextForMatchingNode=function(e,n,r){switch(e.type){case"array":return this.getInsertTextForValue([],r);case"object":return this.getInsertTextForValue({},r);default:var i=n.getText().substr(e.offset,e.length)+r;return this.getInsertTextForPlainText(i)}},t.prototype.getInsertTextForProperty=function(e,n,r,i){var o=this.getInsertTextForValue(e,"");if(!r)return o;var s=o+": ",a,l=0;if(n){if(Array.isArray(n.defaultSnippets)){if(n.defaultSnippets.length===1){var c=n.defaultSnippets[0].body;ji(c)&&(a=this.getInsertTextForSnippetValue(c,""))}l+=n.defaultSnippets.length}if(n.enum&&(!a&&n.enum.length===1&&(a=this.getInsertTextForGuessedValue(n.enum[0],"")),l+=n.enum.length),ji(n.default)&&(a||(a=this.getInsertTextForGuessedValue(n.default,"")),l++),l===0){var u=Array.isArray(n.type)?n.type[0]:n.type;switch(u||(n.properties?u="object":n.items&&(u="array")),u){case"boolean":a="$1";break;case"string":a='"$1"';break;case"object":a="{$1}";break;case"array":a="[$1]";break;case"number":case"integer":a="${1:0}";break;case"null":a="${1:null}";break;default:return o}}}return(!a||l>1)&&(a="$1"),s+a+i},t.prototype.getCurrentWord=function(e,n){for(var r=n-1,i=e.getText();r>=0&&`
801
- \r\v":{[,]}`.indexOf(i.charAt(r))===-1;)r--;return i.substring(r+1,n)},t.prototype.evaluateSeparatorAfter=function(e,n){var r=Ks(e.getText(),!0);r.setPosition(n);var i=r.scan();switch(i){case 5:case 2:case 4:case 17:return"";default:return","}},t.prototype.findItemAtOffset=function(e,n,r){for(var i=Ks(n.getText(),!0),o=e.items,s=o.length-1;s>=0;s--){var a=o[s];if(r>a.offset+a.length){i.setPosition(a.offset+a.length);var l=i.scan();return l===5&&r>=i.getTokenOffset()+i.getTokenLength()?s+1:s}else if(r>=a.offset)return s}return 0},t.prototype.isInComment=function(e,n,r){var i=Ks(e.getText(),!1);i.setPosition(n);for(var o=i.scan();o!==17&&i.getTokenOffset()+i.getTokenLength()<r;)o=i.scan();return(o===12||o===13)&&i.getTokenOffset()<=r},t.prototype.fromMarkup=function(e){if(e&&this.doesSupportMarkdown())return{kind:rs.Markdown,value:e}},t.prototype.doesSupportMarkdown=function(){if(!ji(this.supportsMarkdown)){var e=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.completion;this.supportsMarkdown=e&&e.completionItem&&Array.isArray(e.completionItem.documentationFormat)&&e.completionItem.documentationFormat.indexOf(rs.Markdown)!==-1}return this.supportsMarkdown},t.prototype.doesSupportsCommitCharacters=function(){if(!ji(this.supportsCommitCharacters)){var e=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.completion;this.supportsCommitCharacters=e&&e.completionItem&&!!e.completionItem.commitCharactersSupport}return this.supportsCommitCharacters},t}(),KX=function(){function t(e,n,r){n===void 0&&(n=[]),this.schemaService=e,this.contributions=n,this.promise=r||Promise}return t.prototype.doHover=function(e,n,r){var i=e.offsetAt(n),o=r.getNodeFromOffset(i);if(!o||(o.type==="object"||o.type==="array")&&i>o.offset+1&&i<o.offset+o.length-1)return this.promise.resolve(null);var s=o;if(o.type==="string"){var a=o.parent;if(a&&a.type==="property"&&a.keyNode===o&&(o=a.valueNode,!o))return this.promise.resolve(null)}for(var l=nt.create(e.positionAt(s.offset),e.positionAt(s.offset+s.length)),c=function(p){var O={contents:p,range:l};return O},u=_m(o),f=this.contributions.length-1;f>=0;f--){var d=this.contributions[f],h=d.getInfoContribution(e.uri,u);if(h)return h.then(function(p){return c(p)})}return this.schemaService.getSchemaForResource(e.uri,r).then(function(p){if(p){var O=r.getMatchingSchemas(p.schema,o.offset),m=null,x=null,v=null,y=null;O.every(function(b){if(b.node===o&&!b.inverted&&b.schema&&(m=m||b.schema.title,x=x||b.schema.markdownDescription||Mp(b.schema.description),b.schema.enum)){var w=b.schema.enum.indexOf(po(o));b.schema.markdownEnumDescriptions?v=b.schema.markdownEnumDescriptions[w]:b.schema.enumDescriptions&&(v=Mp(b.schema.enumDescriptions[w])),v&&(y=b.schema.enum[w],typeof y!="string"&&(y=JSON.stringify(y)))}return!0});var S="";return m&&(S=Mp(m)),x&&(S.length>0&&(S+=`
801
+ \r\v":{[,]}`.indexOf(i.charAt(r))===-1;)r--;return i.substring(r+1,n)},t.prototype.evaluateSeparatorAfter=function(e,n){var r=Ks(e.getText(),!0);r.setPosition(n);var i=r.scan();switch(i){case 5:case 2:case 4:case 17:return"";default:return","}},t.prototype.findItemAtOffset=function(e,n,r){for(var i=Ks(n.getText(),!0),o=e.items,s=o.length-1;s>=0;s--){var a=o[s];if(r>a.offset+a.length){i.setPosition(a.offset+a.length);var l=i.scan();return l===5&&r>=i.getTokenOffset()+i.getTokenLength()?s+1:s}else if(r>=a.offset)return s}return 0},t.prototype.isInComment=function(e,n,r){var i=Ks(e.getText(),!1);i.setPosition(n);for(var o=i.scan();o!==17&&i.getTokenOffset()+i.getTokenLength()<r;)o=i.scan();return(o===12||o===13)&&i.getTokenOffset()<=r},t.prototype.fromMarkup=function(e){if(e&&this.doesSupportMarkdown())return{kind:is.Markdown,value:e}},t.prototype.doesSupportMarkdown=function(){if(!ji(this.supportsMarkdown)){var e=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.completion;this.supportsMarkdown=e&&e.completionItem&&Array.isArray(e.completionItem.documentationFormat)&&e.completionItem.documentationFormat.indexOf(is.Markdown)!==-1}return this.supportsMarkdown},t.prototype.doesSupportsCommitCharacters=function(){if(!ji(this.supportsCommitCharacters)){var e=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.completion;this.supportsCommitCharacters=e&&e.completionItem&&!!e.completionItem.commitCharactersSupport}return this.supportsCommitCharacters},t}(),KX=function(){function t(e,n,r){n===void 0&&(n=[]),this.schemaService=e,this.contributions=n,this.promise=r||Promise}return t.prototype.doHover=function(e,n,r){var i=e.offsetAt(n),o=r.getNodeFromOffset(i);if(!o||(o.type==="object"||o.type==="array")&&i>o.offset+1&&i<o.offset+o.length-1)return this.promise.resolve(null);var s=o;if(o.type==="string"){var a=o.parent;if(a&&a.type==="property"&&a.keyNode===o&&(o=a.valueNode,!o))return this.promise.resolve(null)}for(var l=nt.create(e.positionAt(s.offset),e.positionAt(s.offset+s.length)),c=function(p){var O={contents:p,range:l};return O},u=_m(o),f=this.contributions.length-1;f>=0;f--){var d=this.contributions[f],h=d.getInfoContribution(e.uri,u);if(h)return h.then(function(p){return c(p)})}return this.schemaService.getSchemaForResource(e.uri,r).then(function(p){if(p){var O=r.getMatchingSchemas(p.schema,o.offset),m=null,x=null,v=null,y=null;O.every(function(b){if(b.node===o&&!b.inverted&&b.schema&&(m=m||b.schema.title,x=x||b.schema.markdownDescription||Mp(b.schema.description),b.schema.enum)){var w=b.schema.enum.indexOf(po(o));b.schema.markdownEnumDescriptions?v=b.schema.markdownEnumDescriptions[w]:b.schema.enumDescriptions&&(v=Mp(b.schema.enumDescriptions[w])),v&&(y=b.schema.enum[w],typeof y!="string"&&(y=JSON.stringify(y)))}return!0});var S="";return m&&(S=Mp(m)),x&&(S.length>0&&(S+=`
802
802
 
803
803
  `),S+=x),v&&(S.length>0&&(S+=`
804
804
 
805
805
  `),S+="`"+eG(y)+"`: "+v),c([S])}return null})},t}();function Mp(t){if(t){var e=t.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,`$1
806
806
 
807
807
  $3`);return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function eG(t){return t.indexOf("`")!==-1?"`` "+t+" ``":t}var tG=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)i.hasOwnProperty(o)&&(r[o]=i[o])},t(e,n)};return function(e,n){t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Wt,tc;if(typeof process=="object")tc=process.platform==="win32";else if(typeof navigator=="object"){var nG=navigator.userAgent;tc=nG.indexOf("Windows")>=0}var rG=/^\w[\w\d+.-]*$/,iG=/^\//,oG=/^\/\//;function sG(t,e){if(!t.scheme&&e)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'+t.authority+'", path: "'+t.path+'", query: "'+t.query+'", fragment: "'+t.fragment+'"}');if(t.scheme&&!rG.test(t.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(t.path){if(t.authority){if(!iG.test(t.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(oG.test(t.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function aG(t,e){return!t&&!e?"file":t}function lG(t,e){switch(t){case"https":case"http":case"file":e?e[0]!==Fr&&(e=Fr+e):e=Fr;break}return e}var St="",Fr="/",cG=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,Fm=function(){function t(e,n,r,i,o,s){s===void 0&&(s=!1),typeof e=="object"?(this.scheme=e.scheme||St,this.authority=e.authority||St,this.path=e.path||St,this.query=e.query||St,this.fragment=e.fragment||St):(this.scheme=aG(e,s),this.authority=n||St,this.path=lG(this.scheme,r||St),this.query=i||St,this.fragment=o||St,sG(this,s))}return t.isUri=function(e){return e instanceof t?!0:e?typeof e.authority=="string"&&typeof e.fragment=="string"&&typeof e.path=="string"&&typeof e.query=="string"&&typeof e.scheme=="string"&&typeof e.fsPath=="function"&&typeof e.with=="function"&&typeof e.toString=="function":!1},Object.defineProperty(t.prototype,"fsPath",{get:function(){return $T(this)},enumerable:!0,configurable:!0}),t.prototype.with=function(e){if(!e)return this;var n=e.scheme,r=e.authority,i=e.path,o=e.query,s=e.fragment;return n===void 0?n=this.scheme:n===null&&(n=St),r===void 0?r=this.authority:r===null&&(r=St),i===void 0?i=this.path:i===null&&(i=St),o===void 0?o=this.query:o===null&&(o=St),s===void 0?s=this.fragment:s===null&&(s=St),n===this.scheme&&r===this.authority&&i===this.path&&o===this.query&&s===this.fragment?this:new Cs(n,r,i,o,s)},t.parse=function(e,n){n===void 0&&(n=!1);var r=cG.exec(e);return r?new Cs(r[2]||St,Cu(r[4]||St),Cu(r[5]||St),Cu(r[7]||St),Cu(r[9]||St),n):new Cs(St,St,St,St,St)},t.file=function(e){var n=St;if(tc&&(e=e.replace(/\\/g,Fr)),e[0]===Fr&&e[1]===Fr){var r=e.indexOf(Fr,2);r===-1?(n=e.substring(2),e=Fr):(n=e.substring(2,r),e=e.substring(r)||Fr)}return new Cs("file",n,e,St,St)},t.from=function(e){return new Cs(e.scheme,e.authority,e.path,e.query,e.fragment)},t.prototype.toString=function(e){return e===void 0&&(e=!1),Zm(this,e)},t.prototype.toJSON=function(){return this},t.revive=function(e){if(e){if(e instanceof t)return e;var n=new Cs(e);return n._formatted=e.external,n._fsPath=e._sep===IT?e.fsPath:null,n}else return e},t}(),IT=tc?1:void 0,Cs=function(t){tG(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n._formatted=null,n._fsPath=null,n}return Object.defineProperty(e.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=$T(this)),this._fsPath},enumerable:!0,configurable:!0}),e.prototype.toString=function(n){return n===void 0&&(n=!1),n?Zm(this,!0):(this._formatted||(this._formatted=Zm(this,!1)),this._formatted)},e.prototype.toJSON=function(){var n={$mid:1};return this._fsPath&&(n.fsPath=this._fsPath,n._sep=IT),this._formatted&&(n.external=this._formatted),this.path&&(n.path=this.path),this.scheme&&(n.scheme=this.scheme),this.authority&&(n.authority=this.authority),this.query&&(n.query=this.query),this.fragment&&(n.fragment=this.fragment),n},e}(Fm),TT=(Wt={},Wt[58]="%3A",Wt[47]="%2F",Wt[63]="%3F",Wt[35]="%23",Wt[91]="%5B",Wt[93]="%5D",Wt[64]="%40",Wt[33]="%21",Wt[36]="%24",Wt[38]="%26",Wt[39]="%27",Wt[40]="%28",Wt[41]="%29",Wt[42]="%2A",Wt[43]="%2B",Wt[44]="%2C",Wt[59]="%3B",Wt[61]="%3D",Wt[32]="%20",Wt);function Sw(t,e){for(var n=void 0,r=-1,i=0;i<t.length;i++){var o=t.charCodeAt(i);if(o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||o===45||o===46||o===95||o===126||e&&o===47)r!==-1&&(n+=encodeURIComponent(t.substring(r,i)),r=-1),n!==void 0&&(n+=t.charAt(i));else{n===void 0&&(n=t.substr(0,i));var s=TT[o];s!==void 0?(r!==-1&&(n+=encodeURIComponent(t.substring(r,i)),r=-1),n+=s):r===-1&&(r=i)}}return r!==-1&&(n+=encodeURIComponent(t.substring(r))),n!==void 0?n:t}function uG(t){for(var e=void 0,n=0;n<t.length;n++){var r=t.charCodeAt(n);r===35||r===63?(e===void 0&&(e=t.substr(0,n)),e+=TT[r]):e!==void 0&&(e+=t[n])}return e!==void 0?e:t}function $T(t,e){var n;return t.authority&&t.path.length>1&&t.scheme==="file"?n="//"+t.authority+t.path:t.path.charCodeAt(0)===47&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&t.path.charCodeAt(2)===58?n=t.path[1].toLowerCase()+t.path.substr(2):n=t.path,tc&&(n=n.replace(/\//g,"\\")),n}function Zm(t,e){var n=e?uG:Sw,r="",i=t.scheme,o=t.authority,s=t.path,a=t.query,l=t.fragment;if(i&&(r+=i,r+=":"),(o||i==="file")&&(r+=Fr,r+=Fr),o){var c=o.indexOf("@");if(c!==-1){var u=o.substr(0,c);o=o.substr(c+1),c=u.indexOf(":"),c===-1?r+=n(u,!1):(r+=n(u.substr(0,c),!1),r+=":",r+=n(u.substr(c+1),!1)),r+="@"}o=o.toLowerCase(),c=o.indexOf(":"),c===-1?r+=n(o,!1):(r+=n(o.substr(0,c),!1),r+=o.substr(c))}if(s){if(s.length>=3&&s.charCodeAt(0)===47&&s.charCodeAt(2)===58){var f=s.charCodeAt(1);f>=65&&f<=90&&(s="/"+String.fromCharCode(f+32)+":"+s.substr(3))}else if(s.length>=2&&s.charCodeAt(1)===58){var f=s.charCodeAt(0);f>=65&&f<=90&&(s=String.fromCharCode(f+32)+":"+s.substr(2))}r+=n(s,!0)}return a&&(r+="?",r+=n(a,!1)),l&&(r+="#",r+=e?l:Sw(l,!1)),r}function jT(t){try{return decodeURIComponent(t)}catch{return t.length>3?t.substr(0,3)+jT(t.substr(3)):t}}var ww=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function Cu(t){return t.match(ww)?t.replace(ww,function(e){return jT(e)}):t}var fG=function(){function t(e){try{this.patternRegExp=new RegExp(qX(e)+"$")}catch{this.patternRegExp=null}this.schemas=[]}return t.prototype.addSchema=function(e){this.schemas.push(e)},t.prototype.matchesPattern=function(e){return this.patternRegExp&&this.patternRegExp.test(e)},t.prototype.getSchemas=function(){return this.schemas},t}(),dG=function(){function t(e,n,r){this.service=e,this.url=n,this.dependencies={},r&&(this.unresolvedSchema=this.service.promise.resolve(new _s(r)))}return t.prototype.getUnresolvedSchema=function(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.url)),this.unresolvedSchema},t.prototype.getResolvedSchema=function(){var e=this;return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then(function(n){return e.service.resolveSchemaContent(n,e.url,e.dependencies)})),this.resolvedSchema},t.prototype.clearSchema=function(){this.resolvedSchema=null,this.unresolvedSchema=null,this.dependencies={}},t}(),_s=function(){function t(e,n){n===void 0&&(n=[]),this.schema=e,this.errors=n}return t}(),Cw=function(){function t(e,n){n===void 0&&(n=[]),this.schema=e,this.errors=n}return t.prototype.getSection=function(e){return Xn(this.getSectionRecursive(e,this.schema))},t.prototype.getSectionRecursive=function(e,n){if(!n||typeof n=="boolean"||e.length===0)return n;var r=e.shift();if(n.properties&&typeof n.properties[r])return this.getSectionRecursive(e,n.properties[r]);if(n.patternProperties)for(var i=0,o=Object.keys(n.patternProperties);i<o.length;i++){var s=o[i],a=new RegExp(s);if(a.test(r))return this.getSectionRecursive(e,n.patternProperties[s])}else{if(typeof n.additionalProperties=="object")return this.getSectionRecursive(e,n.additionalProperties);if(r.match("[0-9]+")){if(Array.isArray(n.items)){var l=parseInt(r,10);if(!isNaN(l)&&n.items[l])return this.getSectionRecursive(e,n.items[l])}else if(n.items)return this.getSectionRecursive(e,n.items)}}return null},t}(),hG=function(){function t(e,n,r){this.contextService=n,this.requestService=e,this.promiseConstructor=r||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations={},this.schemasById={},this.filePatternAssociations=[],this.filePatternAssociationById={},this.registeredSchemasIds={}}return t.prototype.getRegisteredSchemaIds=function(e){return Object.keys(this.registeredSchemasIds).filter(function(n){var r=Fm.parse(n).scheme;return r!=="schemaservice"&&(!e||e(r))})},Object.defineProperty(t.prototype,"promise",{get:function(){return this.promiseConstructor},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()},t.prototype.onResourceChange=function(e){var n=this,r=!1;e=this.normalizeId(e);for(var i=[e],o=Object.keys(this.schemasById).map(function(c){return n.schemasById[c]});i.length;)for(var s=i.pop(),a=0;a<o.length;a++){var l=o[a];l&&(l.url===s||l.dependencies[s])&&(l.url!==s&&i.push(l.url),l.clearSchema(),o[a]=void 0,r=!0)}return r},t.prototype.normalizeId=function(e){try{return Fm.parse(e).toString()}catch{return e}},t.prototype.setSchemaContributions=function(e){if(e.schemas){var n=e.schemas;for(var r in n){var i=this.normalizeId(r);this.contributionSchemas[i]=this.addSchemaHandle(i,n[r])}}if(e.schemaAssociations){var o=e.schemaAssociations;for(var s in o){var a=o[s];this.contributionAssociations[s]=a;for(var l=this.getOrAddFilePatternAssociation(s),c=0,u=a;c<u.length;c++){var f=u[c],r=this.normalizeId(f);l.addSchema(r)}}}},t.prototype.addSchemaHandle=function(e,n){var r=new dG(this,e,n);return this.schemasById[e]=r,r},t.prototype.getOrAddSchemaHandle=function(e,n){return this.schemasById[e]||this.addSchemaHandle(e,n)},t.prototype.getOrAddFilePatternAssociation=function(e){var n=this.filePatternAssociationById[e];return n||(n=new fG(e),this.filePatternAssociationById[e]=n,this.filePatternAssociations.push(n)),n},t.prototype.registerExternalSchema=function(e,n,r){n===void 0&&(n=null);var i=this.normalizeId(e);if(this.registeredSchemasIds[i]=!0,n)for(var o=0,s=n;o<s.length;o++){var a=s[o];this.getOrAddFilePatternAssociation(a).addSchema(i)}return r?this.addSchemaHandle(i,r):this.getOrAddSchemaHandle(i)},t.prototype.clearExternalSchemas=function(){this.schemasById={},this.filePatternAssociations=[],this.filePatternAssociationById={},this.registeredSchemasIds={};for(var e in this.contributionSchemas)this.schemasById[e]=this.contributionSchemas[e],this.registeredSchemasIds[e]=!0;for(var n in this.contributionAssociations)for(var r=this.getOrAddFilePatternAssociation(n),i=0,o=this.contributionAssociations[n];i<o.length;i++){var s=o[i],e=this.normalizeId(s);r.addSchema(e)}},t.prototype.getResolvedSchema=function(e){var n=this.normalizeId(e),r=this.schemasById[n];return r?r.getResolvedSchema():this.promise.resolve(null)},t.prototype.loadSchema=function(e){if(!this.requestService){var n="Unable to load schema from '"+e+"'. No schema request service available";return this.promise.resolve(new _s({},[n]))}return this.requestService(e).then(function(r){if(!r){var i="Unable to load schema from '"+e+"': No content.";return new _s({},[i])}var o={},s=[];o=$X(r,s);var a=s.length?["Unable to parse content from '"+e+"': Parse error at offset "+s[0].offset]:[];return new _s(o,a)},function(r){var i="Unable to load schema from '"+e+"': "+r.toString();return new _s({},[i])})},t.prototype.resolveSchemaContent=function(e,n,r){var i=this,o=e.errors.slice(0),s=e.schema;if(s.$schema){var a=this.normalizeId(s.$schema);if(a==="http://json-schema.org/draft-03/schema")return this.promise.resolve(new Cw({},["Draft-03 schemas are not supported."]));a==="https://json-schema.org/draft/2019-09/schema"&&e.errors.push("Draft 2019-09 schemas are not yet fully supported.")}var l=this.contextService,c=function(h,p){if(!p)return h;var O=h;return p[0]==="/"&&(p=p.substr(1)),p.split("/").some(function(m){return O=O[m],!O}),O},u=function(h,p,O,m){var x=c(p,m);if(x)for(var v in x)x.hasOwnProperty(v)&&!h.hasOwnProperty(v)&&(h[v]=x[v]);else o.push("$ref '"+m+"' in '"+O+"' can not be resolved.")},f=function(h,p,O,m,x){l&&!/^\w+:\/\/.*/.test(p)&&(p=l.resolveRelativePath(p,m)),p=i.normalizeId(p);var v=i.getOrAddSchemaHandle(p);return v.getUnresolvedSchema().then(function(y){if(x[p]=!0,y.errors.length){var S=O?p+"#"+O:p;o.push("Problems loading reference '"+S+"': "+y.errors[0]+".")}return u(h,y.schema,p,O),d(h,y.schema,p,v.dependencies)})},d=function(h,p,O,m){if(!h||typeof h!="object")return Promise.resolve(null);for(var x=[h],v=[],y=[],S=function(){for(var I=[],A=0;A<arguments.length;A++)I[A]=arguments[A];for(var E=0,$=I;E<$.length;E++){var R=$[E];typeof R=="object"&&x.push(R)}},b=function(){for(var I=[],A=0;A<arguments.length;A++)I[A]=arguments[A];for(var E=0,$=I;E<$.length;E++){var R=$[E];if(typeof R=="object")for(var M in R){var Q=R[M];typeof Q=="object"&&x.push(Q)}}},w=function(){for(var I=[],A=0;A<arguments.length;A++)I[A]=arguments[A];for(var E=0,$=I;E<$.length;E++){var R=$[E];if(Array.isArray(R))for(var M=0,Q=R;M<Q.length;M++){var Z=Q[M];typeof Z=="object"&&x.push(Z)}}},C=function(I){for(var A=[];I.$ref;){var E=I.$ref,$=E.split("#",2);if(delete I.$ref,$[0].length>0){y.push(f(I,$[0],$[1],O,m));return}else A.indexOf(E)===-1&&(u(I,p,O,$[1]),A.push(E))}S(I.items,I.additionalProperties,I.not,I.contains,I.propertyNames,I.if,I.then,I.else),b(I.definitions,I.properties,I.patternProperties,I.dependencies),w(I.anyOf,I.allOf,I.oneOf,I.items)};x.length;){var k=x.pop();v.indexOf(k)>=0||(v.push(k),C(k))}return i.promise.all(y)};return d(s,s,n,r).then(function(h){return new Cw(s,o)})},t.prototype.getSchemaForResource=function(e,n){if(n&&n.root&&n.root.type==="object"){var r=n.root.properties.filter(function(p){return p.keyNode.value==="$schema"&&p.valueNode&&p.valueNode.type==="string"});if(r.length>0){var i=po(r[0].valueNode);if(i&&YX(i,".")&&this.contextService&&(i=this.contextService.resolveRelativePath(i,e)),i){var o=this.normalizeId(i);return this.getOrAddSchemaHandle(o).getResolvedSchema()}}}for(var s=Object.create(null),a=[],l=0,c=this.filePatternAssociations;l<c.length;l++){var u=c[l];if(u.matchesPattern(e))for(var f=0,d=u.getSchemas();f<d.length;f++){var h=d[f];s[h]||(a.push(h),s[h]=!0)}}return a.length>0?this.createCombinedSchema(e,a).getResolvedSchema():this.promise.resolve(null)},t.prototype.createCombinedSchema=function(e,n){if(n.length===1)return this.getOrAddSchemaHandle(n[0]);var r="schemaservice://combinedSchema/"+encodeURIComponent(e),i={allOf:n.map(function(o){return{$ref:o}})};return this.addSchemaHandle(r,i)},t}();var pG=function(){function t(e,n){this.jsonSchemaService=e,this.promise=n,this.validationEnabled=!0}return t.prototype.configure=function(e){e&&(this.validationEnabled=e.validate,this.commentSeverity=e.allowComments?void 0:We.Error)},t.prototype.doValidation=function(e,n,r,i){var o=this;if(!this.validationEnabled)return this.promise.resolve([]);var s=[],a={},l=function(f){var d=f.range.start.line+" "+f.range.start.character+" "+f.message;a[d]||(a[d]=!0,s.push(f))},c=function(f){var d=r?kw(r.trailingCommas):We.Error,h=r?kw(r.comments):o.commentSeverity;if(f){if(f.errors.length&&n.root){var p=n.root,O=p.type==="object"?p.properties[0]:null;if(O&&O.keyNode.value==="$schema"){var m=O.valueNode||O,x=nt.create(e.positionAt(m.offset),e.positionAt(m.offset+m.length));l(_i.create(x,f.errors[0],We.Warning,Je.SchemaResolveError))}else{var x=nt.create(e.positionAt(p.offset),e.positionAt(p.offset+1));l(_i.create(x,f.errors[0],We.Warning,Je.SchemaResolveError))}}else{var v=n.validate(e,f.schema);v&&v.forEach(l)}RT(f.schema)&&(h=void 0),DT(f.schema)&&(d=void 0)}for(var y=0,S=n.syntaxErrors;y<S.length;y++){var b=S[y];if(b.code===Je.TrailingComma){if(typeof d!="number")continue;b.severity=d}l(b)}if(typeof h=="number"){var w="Comments are not permitted in JSON.";n.comments.forEach(function(C){l(_i.create(C,w,h,Je.CommentNotPermitted))})}return s};if(i){var u=i.id||"schemaservice://untitled/"+gG++;return this.jsonSchemaService.resolveSchemaContent(new _s(i),u,{}).then(function(f){return c(f)})}return this.jsonSchemaService.getSchemaForResource(e.uri,n).then(function(f){return c(f)})},t}(),gG=0;function RT(t){if(t&&typeof t=="object"){if(fi(t.allowComments))return t.allowComments;if(t.allOf)for(var e=0,n=t.allOf;e<n.length;e++){var r=n[e],i=RT(r);if(fi(i))return i}}}function DT(t){if(t&&typeof t=="object"){if(fi(t.allowTrailingCommas))return t.allowTrailingCommas;if(fi(t.allowsTrailingCommas))return t.allowsTrailingCommas;if(t.allOf)for(var e=0,n=t.allOf;e<n.length;e++){var r=n[e],i=DT(r);if(fi(i))return i}}}function kw(t){switch(t){case"error":return We.Error;case"warning":return We.Warning;case"ignore":return}}var Aw=48,mG=57,OG=65,ku=97,xG=102;function Vt(t){return t<Aw?0:t<=mG?t-Aw:(t<ku&&(t+=ku-OG),t>=ku&&t<=xG?t-ku+10:0)}function vG(t){if(t[0]!=="#")return null;switch(t.length){case 4:return{red:Vt(t.charCodeAt(1))*17/255,green:Vt(t.charCodeAt(2))*17/255,blue:Vt(t.charCodeAt(3))*17/255,alpha:1};case 5:return{red:Vt(t.charCodeAt(1))*17/255,green:Vt(t.charCodeAt(2))*17/255,blue:Vt(t.charCodeAt(3))*17/255,alpha:Vt(t.charCodeAt(4))*17/255};case 7:return{red:(Vt(t.charCodeAt(1))*16+Vt(t.charCodeAt(2)))/255,green:(Vt(t.charCodeAt(3))*16+Vt(t.charCodeAt(4)))/255,blue:(Vt(t.charCodeAt(5))*16+Vt(t.charCodeAt(6)))/255,alpha:1};case 9:return{red:(Vt(t.charCodeAt(1))*16+Vt(t.charCodeAt(2)))/255,green:(Vt(t.charCodeAt(3))*16+Vt(t.charCodeAt(4)))/255,blue:(Vt(t.charCodeAt(5))*16+Vt(t.charCodeAt(6)))/255,alpha:(Vt(t.charCodeAt(7))*16+Vt(t.charCodeAt(8)))/255}}return null}var yG=function(){function t(e){this.schemaService=e}return t.prototype.findDocumentSymbols=function(e,n,r){var i=this;r===void 0&&(r={resultLimit:Number.MAX_VALUE});var o=n.root;if(!o)return null;var s=r.resultLimit,a=e.uri;if((a==="vscode://defaultsettings/keybindings.json"||Nm(a.toLowerCase(),"/user/keybindings.json"))&&o.type==="array"){for(var l=[],c=0,u=o.items;c<u.length;c++){var f=u[c];if(f.type==="object")for(var d=0,h=f.properties;d<h.length;d++){var p=h[d];if(p.keyNode.value==="key"&&p.valueNode){var O=ma.create(e.uri,Hi(e,f));if(l.push({name:po(p.valueNode),kind:ii.Function,location:O}),s--,s<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(a),l}}}return l}var m=function(v,y,S){return s>=0&&(y.type==="array"?y.items.forEach(function(b){return m(v,b,S)}):y.type==="object"&&y.properties.forEach(function(b){if(s>=0){var w=b.valueNode;if(w){s--;var C=ma.create(e.uri,Hi(e,b)),k=S?S+"."+b.keyNode.value:b.keyNode.value;v.push({name:i.getKeyLabel(b),kind:i.getSymbolKind(w.type),location:C,containerName:S}),m(v,w,k)}}})),v},x=m([],o,void 0);return s<0&&(x.pop(),r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(a)),x},t.prototype.findDocumentSymbols2=function(e,n,r){var i=this;r===void 0&&(r={resultLimit:Number.MAX_VALUE});var o=n.root;if(!o)return null;var s=r.resultLimit,a=e.uri;if((a==="vscode://defaultsettings/keybindings.json"||Nm(a.toLowerCase(),"/user/keybindings.json"))&&o.type==="array"){for(var l=[],c=0,u=o.items;c<u.length;c++){var f=u[c];if(f.type==="object")for(var d=0,h=f.properties;d<h.length;d++){var p=h[d];if(p.keyNode.value==="key"&&p.valueNode){var O=Hi(e,f),m=Hi(e,p.keyNode);if(l.push({name:po(p.valueNode),kind:ii.Function,range:O,selectionRange:m}),s--,s<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(a),l}}}return l}var x=function(y,S){return s>=0&&(S.type==="array"?S.items.forEach(function(b,w){if(b&&s>=0){s--;var C=Hi(e,b),k=C,I=String(w),A=x([],b);y.push({name:I,kind:i.getSymbolKind(b.type),range:C,selectionRange:k,children:A})}}):S.type==="object"&&S.properties.forEach(function(b){var w=b.valueNode;if(w&&s>=0){s--;var C=Hi(e,b),k=Hi(e,b.keyNode),I=x([],w);y.push({name:i.getKeyLabel(b),kind:i.getSymbolKind(w.type),range:C,selectionRange:k,children:I})}})),y},v=x([],o);return s<0&&(v.pop(),r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(a)),v},t.prototype.getSymbolKind=function(e){switch(e){case"object":return ii.Module;case"string":return ii.String;case"number":return ii.Number;case"array":return ii.Array;case"boolean":return ii.Boolean;default:return ii.Variable}},t.prototype.getKeyLabel=function(e){var n=e.keyNode.value;return n&&(n=n.replace(/[\n]/g,"↵")),n&&n.trim()?n:'"'+n+'"'},t.prototype.findDocumentColors=function(e,n,r){return this.schemaService.getSchemaForResource(e.uri,n).then(function(i){var o=[];if(i)for(var s=r&&typeof r.resultLimit=="number"?r.resultLimit:Number.MAX_VALUE,a=n.getMatchingSchemas(i.schema),l={},c=0,u=a;c<u.length;c++){var f=u[c];if(!f.inverted&&f.schema&&(f.schema.format==="color"||f.schema.format==="color-hex")&&f.node&&f.node.type==="string"){var d=String(f.node.offset);if(!l[d]){var h=vG(po(f.node));if(h){var p=Hi(e,f.node);o.push({color:h,range:p})}if(l[d]=!0,s--,s<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(e.uri),o}}}return o})},t.prototype.getColorPresentations=function(e,n,r,i){var o=[],s=Math.round(r.red*255),a=Math.round(r.green*255),l=Math.round(r.blue*255);function c(f){var d=f.toString(16);return d.length!==2?"0"+d:d}var u;return r.alpha===1?u="#"+c(s)+c(a)+c(l):u="#"+c(s)+c(a)+c(l)+c(Math.round(r.alpha*255)),o.push({label:u,textEdit:Wi.replace(i,JSON.stringify(u))}),o},t}();function Hi(t,e){return nt.create(t.positionAt(e.offset),t.positionAt(e.offset+e.length))}var bG={schemaAssociations:{},schemas:{}};function SG(t,e){var n=[],r=[],i=[],o=-1,s=Ks(t.getText(),!1),a=s.scan();function l(A){n.push(A),r.push(i.length)}for(;a!==17;){switch(a){case 1:case 3:{var c=t.positionAt(s.getTokenOffset()).line,u={startLine:c,endLine:c,kind:a===1?"object":"array"};i.push(u);break}case 2:case 4:{var f=a===2?"object":"array";if(i.length>0&&i[i.length-1].kind===f){var u=i.pop(),d=t.positionAt(s.getTokenOffset()).line;u&&d>u.startLine+1&&o!==u.startLine&&(u.endLine=d-1,l(u),o=u.startLine)}break}case 13:{var c=t.positionAt(s.getTokenOffset()).line,h=t.positionAt(s.getTokenOffset()+s.getTokenLength()).line;s.getTokenError()===1&&c+1<t.lineCount?s.setPosition(t.offsetAt(wr.create(c+1,0))):c<h&&(l({startLine:c,endLine:h,kind:El.Comment}),o=c);break}case 12:{var p=t.getText().substr(s.getTokenOffset(),s.getTokenLength()),O=p.match(/^\/\/\s*#(region\b)|(endregion\b)/);if(O){var d=t.positionAt(s.getTokenOffset()).line;if(O[1]){var u={startLine:d,endLine:d,kind:El.Region};i.push(u)}else{for(var m=i.length-1;m>=0&&i[m].kind!==El.Region;)m--;if(m>=0){var u=i[m];i.length=m,d>u.startLine&&o!==u.startLine&&(u.endLine=d,l(u),o=u.startLine)}}}break}}a=s.scan()}var x=e&&e.rangeLimit;if(typeof x!="number"||n.length<=x)return n;e&&e.onRangeLimitExceeded&&e.onRangeLimitExceeded(t.uri);for(var v=[],y=0,S=r;y<S.length;y++){var b=S[y];b<30&&(v[b]=(v[b]||0)+1)}for(var w=0,C=0,m=0;m<v.length;m++){var k=v[m];if(k){if(k+w>x){C=m;break}w+=k}}for(var I=[],m=0;m<n.length;m++){var b=r[m];typeof b=="number"&&(b<C||b===C&&w++<x)&&I.push(n[m])}return I}function wG(t,e,n){function r(a){for(var l=t.offsetAt(a),c=n.getNodeFromOffset(l,!0),u=[];c;){switch(c.type){case"string":case"object":case"array":var f=c.offset+1,d=c.offset+c.length-1;f<d&&l>=f&&l<=d&&u.push(i(f,d)),u.push(i(c.offset,c.offset+c.length));break;case"number":case"boolean":case"null":case"property":u.push(i(c.offset,c.offset+c.length));break}if(c.type==="property"||c.parent&&c.parent.type==="array"){var h=s(c.offset+c.length,5);h!==-1&&u.push(i(c.offset,h))}c=c.parent}for(var p=void 0,O=u.length-1;O>=0;O--)p=dd.create(u[O],p);return p||(p=dd.create(nt.create(a,a))),p}function i(a,l){return nt.create(t.positionAt(a),t.positionAt(l))}var o=Ks(t.getText(),!0);function s(a,l){o.setPosition(a);var c=o.scan();return c===l?o.getTokenOffset()+o.getTokenLength():-1}return e.map(r)}function CG(t){var e=t.promiseConstructor||Promise,n=new hG(t.schemaRequestService,t.workspaceContext,e);n.setSchemaContributions(bG);var r=new JX(n,t.contributions,e,t.clientCapabilities),i=new KX(n,t.contributions,e),o=new yG(n),s=new pG(n,e);return{configure:function(a){n.clearExternalSchemas(),a.schemas&&a.schemas.forEach(function(l){n.registerExternalSchema(l.uri,l.fileMatch,l.schema)}),s.configure(a)},resetSchema:function(a){return n.onResourceChange(a)},doValidation:s.doValidation.bind(s),parseJSONDocument:function(a){return GX(a,{collectComments:!0})},newJSONDocument:function(a,l){return XX(a,l)},doComplete:r.doComplete.bind(r),findDocumentSymbols:o.findDocumentSymbols.bind(o),findDocumentSymbols2:o.findDocumentSymbols2.bind(o),findColorSymbols:function(a,l){return o.findDocumentColors(a,l).then(function(c){return c.map(function(u){return u.range})})},findDocumentColors:o.findDocumentColors.bind(o),getColorPresentations:o.getColorPresentations.bind(o),doHover:i.doHover.bind(i),getFoldingRanges:SG,getSelectionRanges:wG,format:function(a,l,c){var u=void 0;if(l){var f=a.offsetAt(l.start),d=a.offsetAt(l.end)-f;u={offset:f,length:d}}var h={tabSize:c?c.tabSize:4,insertSpaces:c?c.insertSpaces:!0,eol:`
808
- `};return QX(a.getText(),u,h).map(function(p){return Wi.replace(nt.create(a.positionAt(p.offset),a.positionAt(p.offset+p.length)),p.content)})}}}function Pw(t){try{const e=new URL(t);return(e.protocol==="http:"&&e.port==="80"||e.protocol==="https:"&&e.port==="443")&&(e.port=""),e.hostname=e.hostname.toLowerCase(),e.protocol+"//"+e.hostname+(e.port?":"+e.port:"")}catch(e){return console.error("Invalid URL",e),null}}function kG(t,e){const n={};return t.forEach(r=>{const i=String(r[e]);n[i]||(n[i]=[]),n[i].push(r)}),n}function nh(t){return t.replace(/{/g,"{{").replace(/}/g,"}}")}function QT(t,e,n){for(const r of n){const i=Ew(t,r),o=Ew(e,r);if(typeof i=="object"&&typeof o=="object"){if(!QT(i,o,n))return!1}else if(i!==o)return!1}return!0}function Ew(t,e){const n=e.split("/");let r=t;for(const i of n)if(r&&typeof r=="object"&&i in r)r=r[i];else return;return r}const AG=["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"],PG="https://cors.redocly.com/",Ex={id:"default-security-scheme",schemes:["default-security-scheme"]},Iw={documentedOAuth2Types:[],grantType:se.ClientCredentials,authRequestExtraParams:[un()],tokenRequestExtraParams:[Tk()],[se.ClientCredentials]:{clientId:"",clientSecret:"",clientAssertion:"",tokenUrl:"",scopes:[un()],accessToken:""},[se.ClientCredentialsWithJwtAssertion]:{clientId:"",clientSecret:"",clientAssertion:"",tokenUrl:"",scopes:[un()],accessToken:""},[se.AuthorizationCode]:{clientId:"",clientSecret:"",tokenUrl:"",authorizationUrl:"",callbackUrl:"",availableScopes:[],scopes:[un()],codeVerifier:"",codeChallenge:"",accessToken:""},[se.Implicit]:{clientId:"",authorizationUrl:"",callbackUrl:"",availableScopes:[],scopes:[un()],accessToken:""},[se.Password]:{username:"",password:"",clientId:"",clientSecret:"",tokenUrl:"",accessToken:""}},EG={securityType:K.NoAuth,securitySchemeId:Ex.id,[K.BasicAuth]:{username:"",password:""},[K.JWT]:{token:""},[K.DigestAuth]:{username:"",password:"",nc:"00000001",realm:void 0,nonce:void 0,opaque:void 0,qop:void 0,algorithm:void 0,cnonce:void 0},[K.APIKey]:{location:Aa.Header,name:"",key:""},[K.OAuth2]:Iw,[K.OpenIDConnect]:{...Iw,openIdConnectUrl:"",userInfoUrl:""}},Wm="urn:ietf:params:oauth:client-assertion-type:jwt-bearer";function IG(t,e){return t.length===e.length&&t.sort().join()===e.sort().join()}function TG(t,e){return t.every(n=>e.includes(n))}function $G(t){const{operation:e,request:n}=t,{security:r}=n,i=E9(t),{selectedSecuritySchemeId:o,securities:s}=r;if(!e)return!1;const l=NT(e).securities.filter(p=>p.securitySchemeId===o||!o),c=s.filter(p=>p.securitySchemeId===o),u=c.map(p=>p.securityType),f=l.map(p=>p.securityType);if(!IG(u,f))return!0;let h=[];return c.forEach(p=>{var w,C,k;const O=p.securityType,m=(w=p[K.OAuth2])==null?void 0:w.grantType,x=u.includes(O),v=l.find(I=>I.securityType===O),y=!v||QT(p,v,RG(O,m)),S=jG(p,O,(C=p[K.OAuth2])==null?void 0:C.grantType,i),b=!!(x&&v&&y&&S);h.push(!((k=e.security)!=null&&k.length)||b)}),h.includes(!1)}function jG(t,e,n,r){var i,o;if(e===K.OAuth2&&(n===se.AuthorizationCode||n===se.Implicit)){const s=(i=t[K.OAuth2][n])==null?void 0:i.availableScopes,a=Sd((o=t[K.OAuth2][n])==null?void 0:o.scopes,r);return TG(a,s)}return!0}function RG(t,e){return t===K.APIKey?[`${K.APIKey}/name`,`${K.APIKey}/location`]:t===K.OAuth2?[`${K.OAuth2}/grantType`,...DG(e)]:t===K.OpenIDConnect?[`${K.OpenIDConnect}/openIdConnectUrl`]:[]}function DG(t){return t===se.ClientCredentials?[`${K.OAuth2}/${se.ClientCredentials}/tokenUrl`]:t===se.Password?[`${K.OAuth2}/${se.Password}/tokenUrl`]:t===se.Implicit?[`${K.OAuth2}/${se.Implicit}/authorizationUrl`]:t===se.AuthorizationCode?[`${K.OAuth2}/${se.AuthorizationCode}/tokenUrl`,`${K.OAuth2}/${se.AuthorizationCode}/authorizationUrl`]:[]}function BT(t){const e=t.map(n=>{let r="";const i=[];return n.forEach((o,s)=>{r=s===0?`${o.id}`:`${r}_${o.id}`,i.push(o.id)}),{id:r,schemes:i}});return t.length?e:[Ex]}function _T(t){return t.map(e=>{const n=e.map(r=>r.id).join("_");return e.map(r=>({...r,schemeId:n}))})}function MT(t){var a;const{request:{security:e},operation:n}=t,r=n.get();if(!r)return;const i=r.security||[],o=BT(i);e.securitySchemeVariants.set(o),e.selectedSecuritySchemeId.get()||e.selectedSecuritySchemeId.set(o[0].id);const s=((a=e.securities)==null?void 0:a.get({noproxy:!0}))||[];e.securities.set(Ix(r,s))}function NT(t){var r;const n=(t.security||[]).length?BT(t.security||[]):[Ex];return{selectedSecuritySchemeId:(r=n[0])==null?void 0:r.id,securitySchemeVariants:n,securities:Ix(t)}}function Ix(t,e){const n=t.security||[];return n!=null&&n.length?_T(n).flat().map((i,o)=>QG(i,e==null?void 0:e[o])):[us()]}function QG(t,e){const n=e||us();n.securitySchemeId=t.schemeId;const r=jx(t);n.securityType=r;const i=t.id;if(r===K.BasicAuth&&(n[K.BasicAuth].username||(n[K.BasicAuth].username=Xt(i+_.SecurityVariablesEnvSuffix.Username)),n[K.BasicAuth].password||(n[K.BasicAuth].password=Xt(i+_.SecurityVariablesEnvSuffix.Password))),r===K.DigestAuth&&(n[K.DigestAuth].username||(n[K.DigestAuth].username=Xt(i+_.SecurityVariablesEnvSuffix.Username)),n[K.DigestAuth].password||(n[K.DigestAuth].password=Xt(i+_.SecurityVariablesEnvSuffix.Password))),r===K.JWT&&!n[K.JWT].token&&(n[K.JWT].token=Xt(i+_.SecurityVariablesEnvSuffix.JWTToken)),r===K.APIKey&&!n[K.APIKey].key&&(n[K.APIKey].name=t.name||"",n[K.APIKey].key=Xt(i+_.SecurityVariablesEnvSuffix.APIKey)),r===K.OAuth2){const o=Rx(t),s=Xt(i+_.SecurityVariablesEnvSuffix.Token),a=n[K.OAuth2];a.grantType=o[0],o.forEach(l=>{var c,u,f,d,h,p,O,m,x,v,y,S;l===se.AuthorizationCode&&!a[se.AuthorizationCode].accessToken&&(a[se.AuthorizationCode].accessToken=s,a[se.AuthorizationCode].clientId=Xt(i+_.SecurityVariablesEnvSuffix.ClientId),a[se.AuthorizationCode].authorizationUrl=((u=(c=t.flows)==null?void 0:c.authorizationCode)==null?void 0:u.authorizationUrl)||"",a[se.AuthorizationCode].clientSecret=Xt(i+_.SecurityVariablesEnvSuffix.ClientSecret),a[se.AuthorizationCode].availableScopes=Object.keys(((d=(f=t.flows)==null?void 0:f.authorizationCode)==null?void 0:d.scopes)||{})||[],a[se.AuthorizationCode].scopes=[...af(Object.keys(((p=(h=t.flows)==null?void 0:h.authorizationCode)==null?void 0:p.scopes)||{})||[]),un()]),l===se.ClientCredentials&&!a[se.ClientCredentials].accessToken&&(a[se.ClientCredentials].accessToken=s,a[se.ClientCredentials].clientId=Xt(i+_.SecurityVariablesEnvSuffix.ClientId),a[se.ClientCredentials].clientSecret=Xt(i+_.SecurityVariablesEnvSuffix.ClientSecret)),l===se.ClientCredentialsWithJwtAssertion&&!a[se.ClientCredentialsWithJwtAssertion].accessToken&&(a[se.ClientCredentialsWithJwtAssertion].accessToken=s,a[se.ClientCredentialsWithJwtAssertion].clientId=Xt(i+_.SecurityVariablesEnvSuffix.ClientId),a[se.ClientCredentialsWithJwtAssertion].clientAssertion=Xt(i+_.SecurityVariablesEnvSuffix.ClientAssertion)),l===se.Implicit&&!a[se.Implicit].accessToken&&(a[se.Implicit].accessToken=s,a[se.Implicit].clientId=Xt(i+_.SecurityVariablesEnvSuffix.ClientId),a[se.Implicit].authorizationUrl=((m=(O=t.flows)==null?void 0:O.implicit)==null?void 0:m.authorizationUrl)||"",a[se.Implicit].availableScopes=Object.keys(((v=(x=t.flows)==null?void 0:x.implicit)==null?void 0:v.scopes)||{})||[],a[se.Implicit].scopes=[...af(Object.keys(((S=(y=t.flows)==null?void 0:y.implicit)==null?void 0:S.scopes)||{})||[]),un()]),l===se.Password&&!a[se.Password].accessToken&&(a[se.Password].accessToken=s,a[se.Password].clientId=Xt(i+_.SecurityVariablesEnvSuffix.ClientId),a[se.Password].clientSecret=Xt(i+_.SecurityVariablesEnvSuffix.ClientSecret))})}if(r===K.OpenIDConnect){const o=Xt(i+_.SecurityVariablesEnvSuffix.Token),s=n[K.OpenIDConnect];s[se.AuthorizationCode].accessToken||(s[se.AuthorizationCode].accessToken=o,s[se.AuthorizationCode].clientId=Xt(i+_.SecurityVariablesEnvSuffix.ClientId),s[se.AuthorizationCode].clientSecret=Xt(i+_.SecurityVariablesEnvSuffix.ClientSecret)),s[se.Implicit].accessToken||(s[se.Implicit].accessToken=o,s[se.Implicit].clientId=Xt(i+_.SecurityVariablesEnvSuffix.ClientId))}return n}function us(){return yn(EG)}function Na(t,e){return t.filter(n=>n.securitySchemeId.get()===e||!e)}function Tx(t){const e=kG(t.parameters,"in"),n=FT(t),r=NT(t),i=Cc(),o=Dh(e.query||[]);return{...i.request,method:t.method.toLocaleUpperCase(),url:Ik("{{server}}"+nh(t.path),o),headers:Dh(e.header||[]),queryParameters:o,cookies:Dh(e.cookie||[]),body:n,security:r}}function FT(t){var a,l,c;const e=(a=t.body)==null?void 0:a.mediaTypes;if(!e||!Object.keys(e).length)return to();const n=BG(e,t),r=(n==null?void 0:n.name)||"",i=!r$.includes(r)&&!i$.includes(r),o=Vm(n),s=i&&o.length?JSON.stringify((l=o.find(({key:u})=>{var f;return u===((f=t.body)==null?void 0:f.activeExampleName)}))==null?void 0:l.value,null,2)||JSON.stringify(o[0].value,null,2):"";return{...to(),activeExampleName:(c=t.body)==null?void 0:c.activeExampleName,...n&&{type:n.name},content:s,formData:{[ot.FormData]:Tw(e[ot.FormData]),[ot["application/x-www-form-urlencoded"]]:Tw(e[ot["application/x-www-form-urlencoded"]])}}}function $x(t){var n;return t?{...(Object.keys(((n=t==null?void 0:t.body)==null?void 0:n.mediaTypes)||{})||[]).reduce((r,i)=>({...r,[i]:{name:i,extensions:void 0}}),{}),...is}:is}function Tw(t){if(!t)return[Zs()];if(!t.parameters)return[Zs()];const e=t.parameters.map(n=>({id:crypto.randomUUID(),key:n.name,value:n.example||"",active:!0,type:n.inputType,files:null}));return e.push(Zs()),e}function Vm(t){const e=t==null?void 0:t.examples;return Object.keys(e||{}).map(n=>{var o;const r=e==null?void 0:e[n];return{name:_.isString(r==null?void 0:r.summary)?r==null?void 0:r.summary:((o=r==null?void 0:r.summary)==null?void 0:o.raw)||n,key:n,value:e==null?void 0:e[n].value}})}function BG(t,e){const n=$x(e),r=Object.keys(t).find(i=>!!n[i]);return r?t[r]:null}function _G(t,e){const n=t==null?void 0:t.security;if(!(n!=null&&n.length)||!t)return[];const r=Ix(t);return[...new Set(r.filter(i=>i.securitySchemeId===e).map(i=>i.securityType))]}function jx(t){if(t.type==="http"){if(t.scheme==="bearer")return K.JWT;if(t.scheme==="basic")return K.BasicAuth;if(t.scheme==="digest")return K.DigestAuth}else{if(t.type==="apiKey")return K.APIKey;if(t.type==="oauth2")return K.OAuth2;if(t.type==="openIdConnect")return K.OpenIDConnect}return K.NoAuth}function MG(t,e){if(t==="clientCredentials"&&e&&"x-assertionType"in e&&e["x-assertionType"]===Wm)return se.ClientCredentialsWithJwtAssertion;switch(t){case"implicit":return se.Implicit;case"password":return se.Password;case"clientCredentials":return se.ClientCredentials;case"authorizationCode":return se.AuthorizationCode;default:return se.AuthorizationCode}}function NG(t,e){const n=t==null?void 0:t.security;if(!(n!=null&&n.length))return[];const o=_T(n).flat().filter(s=>s.schemeId===e).find(s=>jx(s)===K.OAuth2);return Rx(o)}function Rx(t){return Object.entries((t==null?void 0:t.flows)||{}).map(([e,n])=>MG(e,n)).filter(Boolean)}function FG(t){return t?t.split(";").map(r=>r.trim()).map(r=>{const i=r.indexOf("="),o=r.slice(0,i).trim(),s=r.slice(i+1).trim();return[o,s]}):[]}async function ZG(t,e){const r=await t.clone().arrayBuffer(),i=new TextDecoder().decode(r),o=new Uint8Array(r).length,s=FG(document.cookie);return{bodyUsed:t.bodyUsed,status:t.status,headers:Array.from(new Headers(t.headers||[])),arrayBuffer:r,body:i,duration:e,cookies:s,size:o}}var ZT={exports:{}};function WG(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Np={exports:{}};const VG={},zG=Object.freeze(Object.defineProperty({__proto__:null,default:VG},Symbol.toStringTag,{value:"Module"})),LG=p5(zG);var $w;function He(){return $w||($w=1,function(t,e){(function(n,r){t.exports=r()})(Fe,function(){var n=n||function(r,i){var o;if(typeof window<"u"&&window.crypto&&(o=window.crypto),typeof self<"u"&&self.crypto&&(o=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(o=globalThis.crypto),!o&&typeof window<"u"&&window.msCrypto&&(o=window.msCrypto),!o&&typeof Fe<"u"&&Fe.crypto&&(o=Fe.crypto),!o&&typeof WG=="function")try{o=LG}catch{}var s=function(){if(o){if(typeof o.getRandomValues=="function")try{return o.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof o.randomBytes=="function")try{return o.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},a=Object.create||function(){function v(){}return function(y){var S;return v.prototype=y,S=new v,v.prototype=null,S}}(),l={},c=l.lib={},u=c.Base=function(){return{extend:function(v){var y=a(this);return v&&y.mixIn(v),(!y.hasOwnProperty("init")||this.init===y.init)&&(y.init=function(){y.$super.init.apply(this,arguments)}),y.init.prototype=y,y.$super=this,y},create:function(){var v=this.extend();return v.init.apply(v,arguments),v},init:function(){},mixIn:function(v){for(var y in v)v.hasOwnProperty(y)&&(this[y]=v[y]);v.hasOwnProperty("toString")&&(this.toString=v.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),f=c.WordArray=u.extend({init:function(v,y){v=this.words=v||[],y!=i?this.sigBytes=y:this.sigBytes=v.length*4},toString:function(v){return(v||h).stringify(this)},concat:function(v){var y=this.words,S=v.words,b=this.sigBytes,w=v.sigBytes;if(this.clamp(),b%4)for(var C=0;C<w;C++){var k=S[C>>>2]>>>24-C%4*8&255;y[b+C>>>2]|=k<<24-(b+C)%4*8}else for(var I=0;I<w;I+=4)y[b+I>>>2]=S[I>>>2];return this.sigBytes+=w,this},clamp:function(){var v=this.words,y=this.sigBytes;v[y>>>2]&=4294967295<<32-y%4*8,v.length=r.ceil(y/4)},clone:function(){var v=u.clone.call(this);return v.words=this.words.slice(0),v},random:function(v){for(var y=[],S=0;S<v;S+=4)y.push(s());return new f.init(y,v)}}),d=l.enc={},h=d.Hex={stringify:function(v){for(var y=v.words,S=v.sigBytes,b=[],w=0;w<S;w++){var C=y[w>>>2]>>>24-w%4*8&255;b.push((C>>>4).toString(16)),b.push((C&15).toString(16))}return b.join("")},parse:function(v){for(var y=v.length,S=[],b=0;b<y;b+=2)S[b>>>3]|=parseInt(v.substr(b,2),16)<<24-b%8*4;return new f.init(S,y/2)}},p=d.Latin1={stringify:function(v){for(var y=v.words,S=v.sigBytes,b=[],w=0;w<S;w++){var C=y[w>>>2]>>>24-w%4*8&255;b.push(String.fromCharCode(C))}return b.join("")},parse:function(v){for(var y=v.length,S=[],b=0;b<y;b++)S[b>>>2]|=(v.charCodeAt(b)&255)<<24-b%4*8;return new f.init(S,y)}},O=d.Utf8={stringify:function(v){try{return decodeURIComponent(escape(p.stringify(v)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(v){return p.parse(unescape(encodeURIComponent(v)))}},m=c.BufferedBlockAlgorithm=u.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(v){typeof v=="string"&&(v=O.parse(v)),this._data.concat(v),this._nDataBytes+=v.sigBytes},_process:function(v){var y,S=this._data,b=S.words,w=S.sigBytes,C=this.blockSize,k=C*4,I=w/k;v?I=r.ceil(I):I=r.max((I|0)-this._minBufferSize,0);var A=I*C,E=r.min(A*4,w);if(A){for(var $=0;$<A;$+=C)this._doProcessBlock(b,$);y=b.splice(0,A),S.sigBytes-=E}return new f.init(y,E)},clone:function(){var v=u.clone.call(this);return v._data=this._data.clone(),v},_minBufferSize:0});c.Hasher=m.extend({cfg:u.extend(),init:function(v){this.cfg=this.cfg.extend(v),this.reset()},reset:function(){m.reset.call(this),this._doReset()},update:function(v){return this._append(v),this._process(),this},finalize:function(v){v&&this._append(v);var y=this._doFinalize();return y},blockSize:16,_createHelper:function(v){return function(y,S){return new v.init(S).finalize(y)}},_createHmacHelper:function(v){return function(y,S){return new x.HMAC.init(v,S).finalize(y)}}});var x=l.algo={};return l}(Math);return n})}(Np)),Np.exports}var Fp={exports:{}},jw;function rh(){return jw||(jw=1,function(t,e){(function(n,r){t.exports=r(He())})(Fe,function(n){return function(r){var i=n,o=i.lib,s=o.Base,a=o.WordArray,l=i.x64={};l.Word=s.extend({init:function(c,u){this.high=c,this.low=u}}),l.WordArray=s.extend({init:function(c,u){c=this.words=c||[],u!=r?this.sigBytes=u:this.sigBytes=c.length*8},toX32:function(){for(var c=this.words,u=c.length,f=[],d=0;d<u;d++){var h=c[d];f.push(h.high),f.push(h.low)}return a.create(f,this.sigBytes)},clone:function(){for(var c=s.clone.call(this),u=c.words=this.words.slice(0),f=u.length,d=0;d<f;d++)u[d]=u[d].clone();return c}})}(),n})}(Fp)),Fp.exports}var Zp={exports:{}},Rw;function XG(){return Rw||(Rw=1,function(t,e){(function(n,r){t.exports=r(He())})(Fe,function(n){return function(){if(typeof ArrayBuffer=="function"){var r=n,i=r.lib,o=i.WordArray,s=o.init,a=o.init=function(l){if(l instanceof ArrayBuffer&&(l=new Uint8Array(l)),(l instanceof Int8Array||typeof Uint8ClampedArray<"u"&&l instanceof Uint8ClampedArray||l instanceof Int16Array||l instanceof Uint16Array||l instanceof Int32Array||l instanceof Uint32Array||l instanceof Float32Array||l instanceof Float64Array)&&(l=new Uint8Array(l.buffer,l.byteOffset,l.byteLength)),l instanceof Uint8Array){for(var c=l.byteLength,u=[],f=0;f<c;f++)u[f>>>2]|=l[f]<<24-f%4*8;s.call(this,u,c)}else s.apply(this,arguments)};a.prototype=o}}(),n.lib.WordArray})}(Zp)),Zp.exports}var Wp={exports:{}},Dw;function GG(){return Dw||(Dw=1,function(t,e){(function(n,r){t.exports=r(He())})(Fe,function(n){return function(){var r=n,i=r.lib,o=i.WordArray,s=r.enc;s.Utf16=s.Utf16BE={stringify:function(l){for(var c=l.words,u=l.sigBytes,f=[],d=0;d<u;d+=2){var h=c[d>>>2]>>>16-d%4*8&65535;f.push(String.fromCharCode(h))}return f.join("")},parse:function(l){for(var c=l.length,u=[],f=0;f<c;f++)u[f>>>1]|=l.charCodeAt(f)<<16-f%2*16;return o.create(u,c*2)}},s.Utf16LE={stringify:function(l){for(var c=l.words,u=l.sigBytes,f=[],d=0;d<u;d+=2){var h=a(c[d>>>2]>>>16-d%4*8&65535);f.push(String.fromCharCode(h))}return f.join("")},parse:function(l){for(var c=l.length,u=[],f=0;f<c;f++)u[f>>>1]|=a(l.charCodeAt(f)<<16-f%2*16);return o.create(u,c*2)}};function a(l){return l<<8&4278255360|l>>>8&16711935}}(),n.enc.Utf16})}(Wp)),Wp.exports}var Vp={exports:{}},Qw;function fs(){return Qw||(Qw=1,function(t,e){(function(n,r){t.exports=r(He())})(Fe,function(n){return function(){var r=n,i=r.lib,o=i.WordArray,s=r.enc;s.Base64={stringify:function(l){var c=l.words,u=l.sigBytes,f=this._map;l.clamp();for(var d=[],h=0;h<u;h+=3)for(var p=c[h>>>2]>>>24-h%4*8&255,O=c[h+1>>>2]>>>24-(h+1)%4*8&255,m=c[h+2>>>2]>>>24-(h+2)%4*8&255,x=p<<16|O<<8|m,v=0;v<4&&h+v*.75<u;v++)d.push(f.charAt(x>>>6*(3-v)&63));var y=f.charAt(64);if(y)for(;d.length%4;)d.push(y);return d.join("")},parse:function(l){var c=l.length,u=this._map,f=this._reverseMap;if(!f){f=this._reverseMap=[];for(var d=0;d<u.length;d++)f[u.charCodeAt(d)]=d}var h=u.charAt(64);if(h){var p=l.indexOf(h);p!==-1&&(c=p)}return a(l,c,f)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function a(l,c,u){for(var f=[],d=0,h=0;h<c;h++)if(h%4){var p=u[l.charCodeAt(h-1)]<<h%4*2,O=u[l.charCodeAt(h)]>>>6-h%4*2,m=p|O;f[d>>>2]|=m<<24-d%4*8,d++}return o.create(f,d)}}(),n.enc.Base64})}(Vp)),Vp.exports}var zp={exports:{}},Bw;function YG(){return Bw||(Bw=1,function(t,e){(function(n,r){t.exports=r(He())})(Fe,function(n){return function(){var r=n,i=r.lib,o=i.WordArray,s=r.enc;s.Base64url={stringify:function(l,c){c===void 0&&(c=!0);var u=l.words,f=l.sigBytes,d=c?this._safe_map:this._map;l.clamp();for(var h=[],p=0;p<f;p+=3)for(var O=u[p>>>2]>>>24-p%4*8&255,m=u[p+1>>>2]>>>24-(p+1)%4*8&255,x=u[p+2>>>2]>>>24-(p+2)%4*8&255,v=O<<16|m<<8|x,y=0;y<4&&p+y*.75<f;y++)h.push(d.charAt(v>>>6*(3-y)&63));var S=d.charAt(64);if(S)for(;h.length%4;)h.push(S);return h.join("")},parse:function(l,c){c===void 0&&(c=!0);var u=l.length,f=c?this._safe_map:this._map,d=this._reverseMap;if(!d){d=this._reverseMap=[];for(var h=0;h<f.length;h++)d[f.charCodeAt(h)]=h}var p=f.charAt(64);if(p){var O=l.indexOf(p);O!==-1&&(u=O)}return a(l,u,d)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function a(l,c,u){for(var f=[],d=0,h=0;h<c;h++)if(h%4){var p=u[l.charCodeAt(h-1)]<<h%4*2,O=u[l.charCodeAt(h)]>>>6-h%4*2,m=p|O;f[d>>>2]|=m<<24-d%4*8,d++}return o.create(f,d)}}(),n.enc.Base64url})}(zp)),zp.exports}var Lp={exports:{}},_w;function ds(){return _w||(_w=1,function(t,e){(function(n,r){t.exports=r(He())})(Fe,function(n){return function(r){var i=n,o=i.lib,s=o.WordArray,a=o.Hasher,l=i.algo,c=[];(function(){for(var O=0;O<64;O++)c[O]=r.abs(r.sin(O+1))*4294967296|0})();var u=l.MD5=a.extend({_doReset:function(){this._hash=new s.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(O,m){for(var x=0;x<16;x++){var v=m+x,y=O[v];O[v]=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360}var S=this._hash.words,b=O[m+0],w=O[m+1],C=O[m+2],k=O[m+3],I=O[m+4],A=O[m+5],E=O[m+6],$=O[m+7],R=O[m+8],M=O[m+9],Q=O[m+10],Z=O[m+11],G=O[m+12],V=O[m+13],ee=O[m+14],Y=O[m+15],z=S[0],D=S[1],B=S[2],N=S[3];z=f(z,D,B,N,b,7,c[0]),N=f(N,z,D,B,w,12,c[1]),B=f(B,N,z,D,C,17,c[2]),D=f(D,B,N,z,k,22,c[3]),z=f(z,D,B,N,I,7,c[4]),N=f(N,z,D,B,A,12,c[5]),B=f(B,N,z,D,E,17,c[6]),D=f(D,B,N,z,$,22,c[7]),z=f(z,D,B,N,R,7,c[8]),N=f(N,z,D,B,M,12,c[9]),B=f(B,N,z,D,Q,17,c[10]),D=f(D,B,N,z,Z,22,c[11]),z=f(z,D,B,N,G,7,c[12]),N=f(N,z,D,B,V,12,c[13]),B=f(B,N,z,D,ee,17,c[14]),D=f(D,B,N,z,Y,22,c[15]),z=d(z,D,B,N,w,5,c[16]),N=d(N,z,D,B,E,9,c[17]),B=d(B,N,z,D,Z,14,c[18]),D=d(D,B,N,z,b,20,c[19]),z=d(z,D,B,N,A,5,c[20]),N=d(N,z,D,B,Q,9,c[21]),B=d(B,N,z,D,Y,14,c[22]),D=d(D,B,N,z,I,20,c[23]),z=d(z,D,B,N,M,5,c[24]),N=d(N,z,D,B,ee,9,c[25]),B=d(B,N,z,D,k,14,c[26]),D=d(D,B,N,z,R,20,c[27]),z=d(z,D,B,N,V,5,c[28]),N=d(N,z,D,B,C,9,c[29]),B=d(B,N,z,D,$,14,c[30]),D=d(D,B,N,z,G,20,c[31]),z=h(z,D,B,N,A,4,c[32]),N=h(N,z,D,B,R,11,c[33]),B=h(B,N,z,D,Z,16,c[34]),D=h(D,B,N,z,ee,23,c[35]),z=h(z,D,B,N,w,4,c[36]),N=h(N,z,D,B,I,11,c[37]),B=h(B,N,z,D,$,16,c[38]),D=h(D,B,N,z,Q,23,c[39]),z=h(z,D,B,N,V,4,c[40]),N=h(N,z,D,B,b,11,c[41]),B=h(B,N,z,D,k,16,c[42]),D=h(D,B,N,z,E,23,c[43]),z=h(z,D,B,N,M,4,c[44]),N=h(N,z,D,B,G,11,c[45]),B=h(B,N,z,D,Y,16,c[46]),D=h(D,B,N,z,C,23,c[47]),z=p(z,D,B,N,b,6,c[48]),N=p(N,z,D,B,$,10,c[49]),B=p(B,N,z,D,ee,15,c[50]),D=p(D,B,N,z,A,21,c[51]),z=p(z,D,B,N,G,6,c[52]),N=p(N,z,D,B,k,10,c[53]),B=p(B,N,z,D,Q,15,c[54]),D=p(D,B,N,z,w,21,c[55]),z=p(z,D,B,N,R,6,c[56]),N=p(N,z,D,B,Y,10,c[57]),B=p(B,N,z,D,E,15,c[58]),D=p(D,B,N,z,V,21,c[59]),z=p(z,D,B,N,I,6,c[60]),N=p(N,z,D,B,Z,10,c[61]),B=p(B,N,z,D,C,15,c[62]),D=p(D,B,N,z,M,21,c[63]),S[0]=S[0]+z|0,S[1]=S[1]+D|0,S[2]=S[2]+B|0,S[3]=S[3]+N|0},_doFinalize:function(){var O=this._data,m=O.words,x=this._nDataBytes*8,v=O.sigBytes*8;m[v>>>5]|=128<<24-v%32;var y=r.floor(x/4294967296),S=x;m[(v+64>>>9<<4)+15]=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,m[(v+64>>>9<<4)+14]=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360,O.sigBytes=(m.length+1)*4,this._process();for(var b=this._hash,w=b.words,C=0;C<4;C++){var k=w[C];w[C]=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360}return b},clone:function(){var O=a.clone.call(this);return O._hash=this._hash.clone(),O}});function f(O,m,x,v,y,S,b){var w=O+(m&x|~m&v)+y+b;return(w<<S|w>>>32-S)+m}function d(O,m,x,v,y,S,b){var w=O+(m&v|x&~v)+y+b;return(w<<S|w>>>32-S)+m}function h(O,m,x,v,y,S,b){var w=O+(m^x^v)+y+b;return(w<<S|w>>>32-S)+m}function p(O,m,x,v,y,S,b){var w=O+(x^(m|~v))+y+b;return(w<<S|w>>>32-S)+m}i.MD5=a._createHelper(u),i.HmacMD5=a._createHmacHelper(u)}(Math),n.MD5})}(Lp)),Lp.exports}var Xp={exports:{}},Mw;function WT(){return Mw||(Mw=1,function(t,e){(function(n,r){t.exports=r(He())})(Fe,function(n){return function(){var r=n,i=r.lib,o=i.WordArray,s=i.Hasher,a=r.algo,l=[],c=a.SHA1=s.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(u,f){for(var d=this._hash.words,h=d[0],p=d[1],O=d[2],m=d[3],x=d[4],v=0;v<80;v++){if(v<16)l[v]=u[f+v]|0;else{var y=l[v-3]^l[v-8]^l[v-14]^l[v-16];l[v]=y<<1|y>>>31}var S=(h<<5|h>>>27)+x+l[v];v<20?S+=(p&O|~p&m)+1518500249:v<40?S+=(p^O^m)+1859775393:v<60?S+=(p&O|p&m|O&m)-1894007588:S+=(p^O^m)-899497514,x=m,m=O,O=p<<30|p>>>2,p=h,h=S}d[0]=d[0]+h|0,d[1]=d[1]+p|0,d[2]=d[2]+O|0,d[3]=d[3]+m|0,d[4]=d[4]+x|0},_doFinalize:function(){var u=this._data,f=u.words,d=this._nDataBytes*8,h=u.sigBytes*8;return f[h>>>5]|=128<<24-h%32,f[(h+64>>>9<<4)+14]=Math.floor(d/4294967296),f[(h+64>>>9<<4)+15]=d,u.sigBytes=f.length*4,this._process(),this._hash},clone:function(){var u=s.clone.call(this);return u._hash=this._hash.clone(),u}});r.SHA1=s._createHelper(c),r.HmacSHA1=s._createHmacHelper(c)}(),n.SHA1})}(Xp)),Xp.exports}var Gp={exports:{}},Nw;function Dx(){return Nw||(Nw=1,function(t,e){(function(n,r){t.exports=r(He())})(Fe,function(n){return function(r){var i=n,o=i.lib,s=o.WordArray,a=o.Hasher,l=i.algo,c=[],u=[];(function(){function h(x){for(var v=r.sqrt(x),y=2;y<=v;y++)if(!(x%y))return!1;return!0}function p(x){return(x-(x|0))*4294967296|0}for(var O=2,m=0;m<64;)h(O)&&(m<8&&(c[m]=p(r.pow(O,1/2))),u[m]=p(r.pow(O,1/3)),m++),O++})();var f=[],d=l.SHA256=a.extend({_doReset:function(){this._hash=new s.init(c.slice(0))},_doProcessBlock:function(h,p){for(var O=this._hash.words,m=O[0],x=O[1],v=O[2],y=O[3],S=O[4],b=O[5],w=O[6],C=O[7],k=0;k<64;k++){if(k<16)f[k]=h[p+k]|0;else{var I=f[k-15],A=(I<<25|I>>>7)^(I<<14|I>>>18)^I>>>3,E=f[k-2],$=(E<<15|E>>>17)^(E<<13|E>>>19)^E>>>10;f[k]=A+f[k-7]+$+f[k-16]}var R=S&b^~S&w,M=m&x^m&v^x&v,Q=(m<<30|m>>>2)^(m<<19|m>>>13)^(m<<10|m>>>22),Z=(S<<26|S>>>6)^(S<<21|S>>>11)^(S<<7|S>>>25),G=C+Z+R+u[k]+f[k],V=Q+M;C=w,w=b,b=S,S=y+G|0,y=v,v=x,x=m,m=G+V|0}O[0]=O[0]+m|0,O[1]=O[1]+x|0,O[2]=O[2]+v|0,O[3]=O[3]+y|0,O[4]=O[4]+S|0,O[5]=O[5]+b|0,O[6]=O[6]+w|0,O[7]=O[7]+C|0},_doFinalize:function(){var h=this._data,p=h.words,O=this._nDataBytes*8,m=h.sigBytes*8;return p[m>>>5]|=128<<24-m%32,p[(m+64>>>9<<4)+14]=r.floor(O/4294967296),p[(m+64>>>9<<4)+15]=O,h.sigBytes=p.length*4,this._process(),this._hash},clone:function(){var h=a.clone.call(this);return h._hash=this._hash.clone(),h}});i.SHA256=a._createHelper(d),i.HmacSHA256=a._createHmacHelper(d)}(Math),n.SHA256})}(Gp)),Gp.exports}var Yp={exports:{}},Fw;function qG(){return Fw||(Fw=1,function(t,e){(function(n,r,i){t.exports=r(He(),Dx())})(Fe,function(n){return function(){var r=n,i=r.lib,o=i.WordArray,s=r.algo,a=s.SHA256,l=s.SHA224=a.extend({_doReset:function(){this._hash=new o.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var c=a._doFinalize.call(this);return c.sigBytes-=4,c}});r.SHA224=a._createHelper(l),r.HmacSHA224=a._createHmacHelper(l)}(),n.SHA224})}(Yp)),Yp.exports}var qp={exports:{}},Zw;function VT(){return Zw||(Zw=1,function(t,e){(function(n,r,i){t.exports=r(He(),rh())})(Fe,function(n){return function(){var r=n,i=r.lib,o=i.Hasher,s=r.x64,a=s.Word,l=s.WordArray,c=r.algo;function u(){return a.create.apply(a,arguments)}var f=[u(1116352408,3609767458),u(1899447441,602891725),u(3049323471,3964484399),u(3921009573,2173295548),u(961987163,4081628472),u(1508970993,3053834265),u(2453635748,2937671579),u(2870763221,3664609560),u(3624381080,2734883394),u(310598401,1164996542),u(607225278,1323610764),u(1426881987,3590304994),u(1925078388,4068182383),u(2162078206,991336113),u(2614888103,633803317),u(3248222580,3479774868),u(3835390401,2666613458),u(4022224774,944711139),u(264347078,2341262773),u(604807628,2007800933),u(770255983,1495990901),u(1249150122,1856431235),u(1555081692,3175218132),u(1996064986,2198950837),u(2554220882,3999719339),u(2821834349,766784016),u(2952996808,2566594879),u(3210313671,3203337956),u(3336571891,1034457026),u(3584528711,2466948901),u(113926993,3758326383),u(338241895,168717936),u(666307205,1188179964),u(773529912,1546045734),u(1294757372,1522805485),u(1396182291,2643833823),u(1695183700,2343527390),u(1986661051,1014477480),u(2177026350,1206759142),u(2456956037,344077627),u(2730485921,1290863460),u(2820302411,3158454273),u(3259730800,3505952657),u(3345764771,106217008),u(3516065817,3606008344),u(3600352804,1432725776),u(4094571909,1467031594),u(275423344,851169720),u(430227734,3100823752),u(506948616,1363258195),u(659060556,3750685593),u(883997877,3785050280),u(958139571,3318307427),u(1322822218,3812723403),u(1537002063,2003034995),u(1747873779,3602036899),u(1955562222,1575990012),u(2024104815,1125592928),u(2227730452,2716904306),u(2361852424,442776044),u(2428436474,593698344),u(2756734187,3733110249),u(3204031479,2999351573),u(3329325298,3815920427),u(3391569614,3928383900),u(3515267271,566280711),u(3940187606,3454069534),u(4118630271,4000239992),u(116418474,1914138554),u(174292421,2731055270),u(289380356,3203993006),u(460393269,320620315),u(685471733,587496836),u(852142971,1086792851),u(1017036298,365543100),u(1126000580,2618297676),u(1288033470,3409855158),u(1501505948,4234509866),u(1607167915,987167468),u(1816402316,1246189591)],d=[];(function(){for(var p=0;p<80;p++)d[p]=u()})();var h=c.SHA512=o.extend({_doReset:function(){this._hash=new l.init([new a.init(1779033703,4089235720),new a.init(3144134277,2227873595),new a.init(1013904242,4271175723),new a.init(2773480762,1595750129),new a.init(1359893119,2917565137),new a.init(2600822924,725511199),new a.init(528734635,4215389547),new a.init(1541459225,327033209)])},_doProcessBlock:function(p,O){for(var m=this._hash.words,x=m[0],v=m[1],y=m[2],S=m[3],b=m[4],w=m[5],C=m[6],k=m[7],I=x.high,A=x.low,E=v.high,$=v.low,R=y.high,M=y.low,Q=S.high,Z=S.low,G=b.high,V=b.low,ee=w.high,Y=w.low,z=C.high,D=C.low,B=k.high,N=k.low,U=I,F=A,te=E,L=$,ce=R,re=M,ae=Q,H=Z,pe=G,q=V,ne=ee,he=Y,ve=z,Re=D,ye=B,Ee=N,$e=0;$e<80;$e++){var Le,qe,be=d[$e];if($e<16)qe=be.high=p[O+$e*2]|0,Le=be.low=p[O+$e*2+1]|0;else{var rt=d[$e-15],Ot=rt.high,Ut=rt.low,cn=(Ot>>>1|Ut<<31)^(Ot>>>8|Ut<<24)^Ot>>>7,dn=(Ut>>>1|Ot<<31)^(Ut>>>8|Ot<<24)^(Ut>>>7|Ot<<25),hn=d[$e-2],Bn=hn.high,Ht=hn.low,$o=(Bn>>>19|Ht<<13)^(Bn<<3|Ht>>>29)^Bn>>>6,Pi=(Ht>>>19|Bn<<13)^(Ht<<3|Bn>>>29)^(Ht>>>6|Bn<<26),Li=d[$e-7],Dr=Li.high,Pn=Li.low,tr=d[$e-16],_n=tr.high,Jt=tr.low;Le=dn+Pn,qe=cn+Dr+(Le>>>0<dn>>>0?1:0),Le=Le+Pi,qe=qe+$o+(Le>>>0<Pi>>>0?1:0),Le=Le+Jt,qe=qe+_n+(Le>>>0<Jt>>>0?1:0),be.high=qe,be.low=Le}var nr=pe&ne^~pe&ve,Qr=q&he^~q&Re,Mn=U&te^U&ce^te&ce,Et=F&L^F&re^L&re,It=(U>>>28|F<<4)^(U<<30|F>>>2)^(U<<25|F>>>7),yt=(F>>>28|U<<4)^(F<<30|U>>>2)^(F<<25|U>>>7),qr=(pe>>>14|q<<18)^(pe>>>18|q<<14)^(pe<<23|q>>>9),rr=(q>>>14|pe<<18)^(q>>>18|pe<<14)^(q<<23|pe>>>9),ir=f[$e],Ei=ir.high,Ur=ir.low,jt=Ee+rr,_t=ye+qr+(jt>>>0<Ee>>>0?1:0),jt=jt+Qr,_t=_t+nr+(jt>>>0<Qr>>>0?1:0),jt=jt+Ur,_t=_t+Ei+(jt>>>0<Ur>>>0?1:0),jt=jt+Le,_t=_t+qe+(jt>>>0<Le>>>0?1:0),Xi=yt+Et,Ii=It+Mn+(Xi>>>0<yt>>>0?1:0);ye=ve,Ee=Re,ve=ne,Re=he,ne=pe,he=q,q=H+jt|0,pe=ae+_t+(q>>>0<H>>>0?1:0)|0,ae=ce,H=re,ce=te,re=L,te=U,L=F,F=jt+Xi|0,U=_t+Ii+(F>>>0<jt>>>0?1:0)|0}A=x.low=A+F,x.high=I+U+(A>>>0<F>>>0?1:0),$=v.low=$+L,v.high=E+te+($>>>0<L>>>0?1:0),M=y.low=M+re,y.high=R+ce+(M>>>0<re>>>0?1:0),Z=S.low=Z+H,S.high=Q+ae+(Z>>>0<H>>>0?1:0),V=b.low=V+q,b.high=G+pe+(V>>>0<q>>>0?1:0),Y=w.low=Y+he,w.high=ee+ne+(Y>>>0<he>>>0?1:0),D=C.low=D+Re,C.high=z+ve+(D>>>0<Re>>>0?1:0),N=k.low=N+Ee,k.high=B+ye+(N>>>0<Ee>>>0?1:0)},_doFinalize:function(){var p=this._data,O=p.words,m=this._nDataBytes*8,x=p.sigBytes*8;O[x>>>5]|=128<<24-x%32,O[(x+128>>>10<<5)+30]=Math.floor(m/4294967296),O[(x+128>>>10<<5)+31]=m,p.sigBytes=O.length*4,this._process();var v=this._hash.toX32();return v},clone:function(){var p=o.clone.call(this);return p._hash=this._hash.clone(),p},blockSize:1024/32});r.SHA512=o._createHelper(h),r.HmacSHA512=o._createHmacHelper(h)}(),n.SHA512})}(qp)),qp.exports}var Up={exports:{}},Ww;function UG(){return Ww||(Ww=1,function(t,e){(function(n,r,i){t.exports=r(He(),rh(),VT())})(Fe,function(n){return function(){var r=n,i=r.x64,o=i.Word,s=i.WordArray,a=r.algo,l=a.SHA512,c=a.SHA384=l.extend({_doReset:function(){this._hash=new s.init([new o.init(3418070365,3238371032),new o.init(1654270250,914150663),new o.init(2438529370,812702999),new o.init(355462360,4144912697),new o.init(1731405415,4290775857),new o.init(2394180231,1750603025),new o.init(3675008525,1694076839),new o.init(1203062813,3204075428)])},_doFinalize:function(){var u=l._doFinalize.call(this);return u.sigBytes-=16,u}});r.SHA384=l._createHelper(c),r.HmacSHA384=l._createHmacHelper(c)}(),n.SHA384})}(Up)),Up.exports}var Hp={exports:{}},Vw;function HG(){return Vw||(Vw=1,function(t,e){(function(n,r,i){t.exports=r(He(),rh())})(Fe,function(n){return function(r){var i=n,o=i.lib,s=o.WordArray,a=o.Hasher,l=i.x64,c=l.Word,u=i.algo,f=[],d=[],h=[];(function(){for(var m=1,x=0,v=0;v<24;v++){f[m+5*x]=(v+1)*(v+2)/2%64;var y=x%5,S=(2*m+3*x)%5;m=y,x=S}for(var m=0;m<5;m++)for(var x=0;x<5;x++)d[m+5*x]=x+(2*m+3*x)%5*5;for(var b=1,w=0;w<24;w++){for(var C=0,k=0,I=0;I<7;I++){if(b&1){var A=(1<<I)-1;A<32?k^=1<<A:C^=1<<A-32}b&128?b=b<<1^113:b<<=1}h[w]=c.create(C,k)}})();var p=[];(function(){for(var m=0;m<25;m++)p[m]=c.create()})();var O=u.SHA3=a.extend({cfg:a.cfg.extend({outputLength:512}),_doReset:function(){for(var m=this._state=[],x=0;x<25;x++)m[x]=new c.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(m,x){for(var v=this._state,y=this.blockSize/2,S=0;S<y;S++){var b=m[x+2*S],w=m[x+2*S+1];b=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,w=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360;var C=v[S];C.high^=w,C.low^=b}for(var k=0;k<24;k++){for(var I=0;I<5;I++){for(var A=0,E=0,$=0;$<5;$++){var C=v[I+5*$];A^=C.high,E^=C.low}var R=p[I];R.high=A,R.low=E}for(var I=0;I<5;I++)for(var M=p[(I+4)%5],Q=p[(I+1)%5],Z=Q.high,G=Q.low,A=M.high^(Z<<1|G>>>31),E=M.low^(G<<1|Z>>>31),$=0;$<5;$++){var C=v[I+5*$];C.high^=A,C.low^=E}for(var V=1;V<25;V++){var A,E,C=v[V],ee=C.high,Y=C.low,z=f[V];z<32?(A=ee<<z|Y>>>32-z,E=Y<<z|ee>>>32-z):(A=Y<<z-32|ee>>>64-z,E=ee<<z-32|Y>>>64-z);var D=p[d[V]];D.high=A,D.low=E}var B=p[0],N=v[0];B.high=N.high,B.low=N.low;for(var I=0;I<5;I++)for(var $=0;$<5;$++){var V=I+5*$,C=v[V],U=p[V],F=p[(I+1)%5+5*$],te=p[(I+2)%5+5*$];C.high=U.high^~F.high&te.high,C.low=U.low^~F.low&te.low}var C=v[0],L=h[k];C.high^=L.high,C.low^=L.low}},_doFinalize:function(){var m=this._data,x=m.words;this._nDataBytes*8;var v=m.sigBytes*8,y=this.blockSize*32;x[v>>>5]|=1<<24-v%32,x[(r.ceil((v+1)/y)*y>>>5)-1]|=128,m.sigBytes=x.length*4,this._process();for(var S=this._state,b=this.cfg.outputLength/8,w=b/8,C=[],k=0;k<w;k++){var I=S[k],A=I.high,E=I.low;A=(A<<8|A>>>24)&16711935|(A<<24|A>>>8)&4278255360,E=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,C.push(E),C.push(A)}return new s.init(C,b)},clone:function(){for(var m=a.clone.call(this),x=m._state=this._state.slice(0),v=0;v<25;v++)x[v]=x[v].clone();return m}});i.SHA3=a._createHelper(O),i.HmacSHA3=a._createHmacHelper(O)}(Math),n.SHA3})}(Hp)),Hp.exports}var Jp={exports:{}},zw;function JG(){return zw||(zw=1,function(t,e){(function(n,r){t.exports=r(He())})(Fe,function(n){/** @preserve
808
+ `};return QX(a.getText(),u,h).map(function(p){return Wi.replace(nt.create(a.positionAt(p.offset),a.positionAt(p.offset+p.length)),p.content)})}}}function Pw(t){try{const e=new URL(t);return(e.protocol==="http:"&&e.port==="80"||e.protocol==="https:"&&e.port==="443")&&(e.port=""),e.hostname=e.hostname.toLowerCase(),e.protocol+"//"+e.hostname+(e.port?":"+e.port:"")}catch(e){return console.error("Invalid URL",e),null}}function kG(t,e){const n={};return t.forEach(r=>{const i=String(r[e]);n[i]||(n[i]=[]),n[i].push(r)}),n}function nh(t){return t.replace(/{/g,"{{").replace(/}/g,"}}")}function QT(t,e,n){for(const r of n){const i=Ew(t,r),o=Ew(e,r);if(typeof i=="object"&&typeof o=="object"){if(!QT(i,o,n))return!1}else if(i!==o)return!1}return!0}function Ew(t,e){const n=e.split("/");let r=t;for(const i of n)if(r&&typeof r=="object"&&i in r)r=r[i];else return;return r}const AG=["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"],PG="https://cors.redocly.com/",Ex={id:"default-security-scheme",schemes:["default-security-scheme"]},Iw={documentedOAuth2Types:[],grantType:se.ClientCredentials,authRequestExtraParams:[un()],tokenRequestExtraParams:[Tk()],[se.ClientCredentials]:{clientId:"",clientSecret:"",clientAssertion:"",tokenUrl:"",scopes:[un()],accessToken:""},[se.ClientCredentialsWithJwtAssertion]:{clientId:"",clientSecret:"",clientAssertion:"",tokenUrl:"",scopes:[un()],accessToken:""},[se.AuthorizationCode]:{clientId:"",clientSecret:"",tokenUrl:"",authorizationUrl:"",callbackUrl:"",availableScopes:[],scopes:[un()],codeVerifier:"",codeChallenge:"",accessToken:""},[se.Implicit]:{clientId:"",authorizationUrl:"",callbackUrl:"",availableScopes:[],scopes:[un()],accessToken:""},[se.Password]:{username:"",password:"",clientId:"",clientSecret:"",tokenUrl:"",accessToken:""}},EG={securityType:K.NoAuth,securitySchemeId:Ex.id,[K.BasicAuth]:{username:"",password:""},[K.JWT]:{token:""},[K.DigestAuth]:{username:"",password:"",nc:"00000001",realm:void 0,nonce:void 0,opaque:void 0,qop:void 0,algorithm:void 0,cnonce:void 0},[K.APIKey]:{location:Aa.Header,name:"",key:""},[K.OAuth2]:Iw,[K.OpenIDConnect]:{...Iw,openIdConnectUrl:"",userInfoUrl:""}},Wm="urn:ietf:params:oauth:client-assertion-type:jwt-bearer";function IG(t,e){return t.length===e.length&&t.sort().join()===e.sort().join()}function TG(t,e){return t.every(n=>e.includes(n))}function $G(t){const{operation:e,request:n}=t,{security:r}=n,i=E9(t),{selectedSecuritySchemeId:o,securities:s}=r;if(!e)return!1;const l=NT(e).securities.filter(p=>p.securitySchemeId===o||!o),c=s.filter(p=>p.securitySchemeId===o),u=c.map(p=>p.securityType),f=l.map(p=>p.securityType);if(!IG(u,f))return!0;let h=[];return c.forEach(p=>{var w,C,k;const O=p.securityType,m=(w=p[K.OAuth2])==null?void 0:w.grantType,x=u.includes(O),v=l.find(I=>I.securityType===O),y=!v||QT(p,v,RG(O,m)),S=jG(p,O,(C=p[K.OAuth2])==null?void 0:C.grantType,i),b=!!(x&&v&&y&&S);h.push(!((k=e.security)!=null&&k.length)||b)}),h.includes(!1)}function jG(t,e,n,r){var i,o;if(e===K.OAuth2&&(n===se.AuthorizationCode||n===se.Implicit)){const s=(i=t[K.OAuth2][n])==null?void 0:i.availableScopes,a=Sd((o=t[K.OAuth2][n])==null?void 0:o.scopes,r);return TG(a,s)}return!0}function RG(t,e){return t===K.APIKey?[`${K.APIKey}/name`,`${K.APIKey}/location`]:t===K.OAuth2?[`${K.OAuth2}/grantType`,...DG(e)]:t===K.OpenIDConnect?[`${K.OpenIDConnect}/openIdConnectUrl`]:[]}function DG(t){return t===se.ClientCredentials?[`${K.OAuth2}/${se.ClientCredentials}/tokenUrl`]:t===se.Password?[`${K.OAuth2}/${se.Password}/tokenUrl`]:t===se.Implicit?[`${K.OAuth2}/${se.Implicit}/authorizationUrl`]:t===se.AuthorizationCode?[`${K.OAuth2}/${se.AuthorizationCode}/tokenUrl`,`${K.OAuth2}/${se.AuthorizationCode}/authorizationUrl`]:[]}function BT(t){const e=t.map(n=>{let r="";const i=[];return n.forEach((o,s)=>{r=s===0?`${o.id}`:`${r}_${o.id}`,i.push(o.id)}),{id:r,schemes:i}});return t.length?e:[Ex]}function _T(t){return t.map(e=>{const n=e.map(r=>r.id).join("_");return e.map(r=>({...r,schemeId:n}))})}function MT(t){var a;const{request:{security:e},operation:n}=t,r=n.get();if(!r)return;const i=r.security||[],o=BT(i);e.securitySchemeVariants.set(o),e.selectedSecuritySchemeId.get()||e.selectedSecuritySchemeId.set(o[0].id);const s=((a=e.securities)==null?void 0:a.get({noproxy:!0}))||[];e.securities.set(Ix(r,s))}function NT(t){var r;const n=(t.security||[]).length?BT(t.security||[]):[Ex];return{selectedSecuritySchemeId:(r=n[0])==null?void 0:r.id,securitySchemeVariants:n,securities:Ix(t)}}function Ix(t,e){const n=t.security||[];return n!=null&&n.length?_T(n).flat().map((i,o)=>QG(i,e==null?void 0:e[o])):[fs()]}function QG(t,e){const n=e||fs();n.securitySchemeId=t.schemeId;const r=jx(t);n.securityType=r;const i=t.id;if(r===K.BasicAuth&&(n[K.BasicAuth].username||(n[K.BasicAuth].username=Xt(i+_.SecurityVariablesEnvSuffix.Username)),n[K.BasicAuth].password||(n[K.BasicAuth].password=Xt(i+_.SecurityVariablesEnvSuffix.Password))),r===K.DigestAuth&&(n[K.DigestAuth].username||(n[K.DigestAuth].username=Xt(i+_.SecurityVariablesEnvSuffix.Username)),n[K.DigestAuth].password||(n[K.DigestAuth].password=Xt(i+_.SecurityVariablesEnvSuffix.Password))),r===K.JWT&&!n[K.JWT].token&&(n[K.JWT].token=Xt(i+_.SecurityVariablesEnvSuffix.JWTToken)),r===K.APIKey&&!n[K.APIKey].key&&(n[K.APIKey].name=t.name||"",n[K.APIKey].key=Xt(i+_.SecurityVariablesEnvSuffix.APIKey)),r===K.OAuth2){const o=Rx(t),s=Xt(i+_.SecurityVariablesEnvSuffix.Token),a=n[K.OAuth2];a.grantType=o[0],o.forEach(l=>{var c,u,f,d,h,p,O,m,x,v,y,S;l===se.AuthorizationCode&&!a[se.AuthorizationCode].accessToken&&(a[se.AuthorizationCode].accessToken=s,a[se.AuthorizationCode].clientId=Xt(i+_.SecurityVariablesEnvSuffix.ClientId),a[se.AuthorizationCode].authorizationUrl=((u=(c=t.flows)==null?void 0:c.authorizationCode)==null?void 0:u.authorizationUrl)||"",a[se.AuthorizationCode].clientSecret=Xt(i+_.SecurityVariablesEnvSuffix.ClientSecret),a[se.AuthorizationCode].availableScopes=Object.keys(((d=(f=t.flows)==null?void 0:f.authorizationCode)==null?void 0:d.scopes)||{})||[],a[se.AuthorizationCode].scopes=[...af(Object.keys(((p=(h=t.flows)==null?void 0:h.authorizationCode)==null?void 0:p.scopes)||{})||[]),un()]),l===se.ClientCredentials&&!a[se.ClientCredentials].accessToken&&(a[se.ClientCredentials].accessToken=s,a[se.ClientCredentials].clientId=Xt(i+_.SecurityVariablesEnvSuffix.ClientId),a[se.ClientCredentials].clientSecret=Xt(i+_.SecurityVariablesEnvSuffix.ClientSecret)),l===se.ClientCredentialsWithJwtAssertion&&!a[se.ClientCredentialsWithJwtAssertion].accessToken&&(a[se.ClientCredentialsWithJwtAssertion].accessToken=s,a[se.ClientCredentialsWithJwtAssertion].clientId=Xt(i+_.SecurityVariablesEnvSuffix.ClientId),a[se.ClientCredentialsWithJwtAssertion].clientAssertion=Xt(i+_.SecurityVariablesEnvSuffix.ClientAssertion)),l===se.Implicit&&!a[se.Implicit].accessToken&&(a[se.Implicit].accessToken=s,a[se.Implicit].clientId=Xt(i+_.SecurityVariablesEnvSuffix.ClientId),a[se.Implicit].authorizationUrl=((m=(O=t.flows)==null?void 0:O.implicit)==null?void 0:m.authorizationUrl)||"",a[se.Implicit].availableScopes=Object.keys(((v=(x=t.flows)==null?void 0:x.implicit)==null?void 0:v.scopes)||{})||[],a[se.Implicit].scopes=[...af(Object.keys(((S=(y=t.flows)==null?void 0:y.implicit)==null?void 0:S.scopes)||{})||[]),un()]),l===se.Password&&!a[se.Password].accessToken&&(a[se.Password].accessToken=s,a[se.Password].clientId=Xt(i+_.SecurityVariablesEnvSuffix.ClientId),a[se.Password].clientSecret=Xt(i+_.SecurityVariablesEnvSuffix.ClientSecret))})}if(r===K.OpenIDConnect){const o=Xt(i+_.SecurityVariablesEnvSuffix.Token),s=n[K.OpenIDConnect];s[se.AuthorizationCode].accessToken||(s[se.AuthorizationCode].accessToken=o,s[se.AuthorizationCode].clientId=Xt(i+_.SecurityVariablesEnvSuffix.ClientId),s[se.AuthorizationCode].clientSecret=Xt(i+_.SecurityVariablesEnvSuffix.ClientSecret)),s[se.Implicit].accessToken||(s[se.Implicit].accessToken=o,s[se.Implicit].clientId=Xt(i+_.SecurityVariablesEnvSuffix.ClientId))}return n}function fs(){return yn(EG)}function Na(t,e){return t.filter(n=>n.securitySchemeId.get()===e||!e)}function Tx(t){const e=kG(t.parameters,"in"),n=FT(t),r=NT(t),i=Cc(),o=Dh(e.query||[]);return{...i.request,method:t.method.toLocaleUpperCase(),url:Ik("{{server}}"+nh(t.path),o),headers:Dh(e.header||[]),queryParameters:o,cookies:Dh(e.cookie||[]),body:n,security:r}}function FT(t){var a,l,c;const e=(a=t.body)==null?void 0:a.mediaTypes;if(!e||!Object.keys(e).length)return to();const n=BG(e,t),r=(n==null?void 0:n.name)||"",i=!r$.includes(r)&&!i$.includes(r),o=Vm(n),s=i&&o.length?JSON.stringify((l=o.find(({key:u})=>{var f;return u===((f=t.body)==null?void 0:f.activeExampleName)}))==null?void 0:l.value,null,2)||JSON.stringify(o[0].value,null,2):"";return{...to(),activeExampleName:(c=t.body)==null?void 0:c.activeExampleName,...n&&{type:n.name},content:s,formData:{[ot.FormData]:Tw(e[ot.FormData]),[ot["application/x-www-form-urlencoded"]]:Tw(e[ot["application/x-www-form-urlencoded"]])}}}function $x(t){var n;return t?{...(Object.keys(((n=t==null?void 0:t.body)==null?void 0:n.mediaTypes)||{})||[]).reduce((r,i)=>({...r,[i]:{name:i,extensions:void 0}}),{}),...os}:os}function Tw(t){if(!t)return[Zs()];if(!t.parameters)return[Zs()];const e=t.parameters.map(n=>({id:crypto.randomUUID(),key:n.name,value:n.example||"",active:!0,type:n.inputType,files:null}));return e.push(Zs()),e}function Vm(t){const e=t==null?void 0:t.examples;return Object.keys(e||{}).map(n=>{var o;const r=e==null?void 0:e[n];return{name:_.isString(r==null?void 0:r.summary)?r==null?void 0:r.summary:((o=r==null?void 0:r.summary)==null?void 0:o.raw)||n,key:n,value:e==null?void 0:e[n].value}})}function BG(t,e){const n=$x(e),r=Object.keys(t).find(i=>!!n[i]);return r?t[r]:null}function _G(t,e){const n=t==null?void 0:t.security;if(!(n!=null&&n.length)||!t)return[];const r=Ix(t);return[...new Set(r.filter(i=>i.securitySchemeId===e).map(i=>i.securityType))]}function jx(t){if(t.type==="http"){if(t.scheme==="bearer")return K.JWT;if(t.scheme==="basic")return K.BasicAuth;if(t.scheme==="digest")return K.DigestAuth}else{if(t.type==="apiKey")return K.APIKey;if(t.type==="oauth2")return K.OAuth2;if(t.type==="openIdConnect")return K.OpenIDConnect}return K.NoAuth}function MG(t,e){if(t==="clientCredentials"&&e&&"x-assertionType"in e&&e["x-assertionType"]===Wm)return se.ClientCredentialsWithJwtAssertion;switch(t){case"implicit":return se.Implicit;case"password":return se.Password;case"clientCredentials":return se.ClientCredentials;case"authorizationCode":return se.AuthorizationCode;default:return se.AuthorizationCode}}function NG(t,e){const n=t==null?void 0:t.security;if(!(n!=null&&n.length))return[];const o=_T(n).flat().filter(s=>s.schemeId===e).find(s=>jx(s)===K.OAuth2);return Rx(o)}function Rx(t){return Object.entries((t==null?void 0:t.flows)||{}).map(([e,n])=>MG(e,n)).filter(Boolean)}function FG(t){return t?t.split(";").map(r=>r.trim()).map(r=>{const i=r.indexOf("="),o=r.slice(0,i).trim(),s=r.slice(i+1).trim();return[o,s]}):[]}async function ZG(t,e){const r=await t.clone().arrayBuffer(),i=new TextDecoder().decode(r),o=new Uint8Array(r).length,s=FG(document.cookie);return{bodyUsed:t.bodyUsed,status:t.status,headers:Array.from(new Headers(t.headers||[])),arrayBuffer:r,body:i,duration:e,cookies:s,size:o}}var ZT={exports:{}};function WG(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Np={exports:{}};const VG={},zG=Object.freeze(Object.defineProperty({__proto__:null,default:VG},Symbol.toStringTag,{value:"Module"})),LG=p5(zG);var $w;function He(){return $w||($w=1,function(t,e){(function(n,r){t.exports=r()})(Fe,function(){var n=n||function(r,i){var o;if(typeof window<"u"&&window.crypto&&(o=window.crypto),typeof self<"u"&&self.crypto&&(o=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(o=globalThis.crypto),!o&&typeof window<"u"&&window.msCrypto&&(o=window.msCrypto),!o&&typeof Fe<"u"&&Fe.crypto&&(o=Fe.crypto),!o&&typeof WG=="function")try{o=LG}catch{}var s=function(){if(o){if(typeof o.getRandomValues=="function")try{return o.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof o.randomBytes=="function")try{return o.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},a=Object.create||function(){function v(){}return function(y){var S;return v.prototype=y,S=new v,v.prototype=null,S}}(),l={},c=l.lib={},u=c.Base=function(){return{extend:function(v){var y=a(this);return v&&y.mixIn(v),(!y.hasOwnProperty("init")||this.init===y.init)&&(y.init=function(){y.$super.init.apply(this,arguments)}),y.init.prototype=y,y.$super=this,y},create:function(){var v=this.extend();return v.init.apply(v,arguments),v},init:function(){},mixIn:function(v){for(var y in v)v.hasOwnProperty(y)&&(this[y]=v[y]);v.hasOwnProperty("toString")&&(this.toString=v.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),f=c.WordArray=u.extend({init:function(v,y){v=this.words=v||[],y!=i?this.sigBytes=y:this.sigBytes=v.length*4},toString:function(v){return(v||h).stringify(this)},concat:function(v){var y=this.words,S=v.words,b=this.sigBytes,w=v.sigBytes;if(this.clamp(),b%4)for(var C=0;C<w;C++){var k=S[C>>>2]>>>24-C%4*8&255;y[b+C>>>2]|=k<<24-(b+C)%4*8}else for(var I=0;I<w;I+=4)y[b+I>>>2]=S[I>>>2];return this.sigBytes+=w,this},clamp:function(){var v=this.words,y=this.sigBytes;v[y>>>2]&=4294967295<<32-y%4*8,v.length=r.ceil(y/4)},clone:function(){var v=u.clone.call(this);return v.words=this.words.slice(0),v},random:function(v){for(var y=[],S=0;S<v;S+=4)y.push(s());return new f.init(y,v)}}),d=l.enc={},h=d.Hex={stringify:function(v){for(var y=v.words,S=v.sigBytes,b=[],w=0;w<S;w++){var C=y[w>>>2]>>>24-w%4*8&255;b.push((C>>>4).toString(16)),b.push((C&15).toString(16))}return b.join("")},parse:function(v){for(var y=v.length,S=[],b=0;b<y;b+=2)S[b>>>3]|=parseInt(v.substr(b,2),16)<<24-b%8*4;return new f.init(S,y/2)}},p=d.Latin1={stringify:function(v){for(var y=v.words,S=v.sigBytes,b=[],w=0;w<S;w++){var C=y[w>>>2]>>>24-w%4*8&255;b.push(String.fromCharCode(C))}return b.join("")},parse:function(v){for(var y=v.length,S=[],b=0;b<y;b++)S[b>>>2]|=(v.charCodeAt(b)&255)<<24-b%4*8;return new f.init(S,y)}},O=d.Utf8={stringify:function(v){try{return decodeURIComponent(escape(p.stringify(v)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(v){return p.parse(unescape(encodeURIComponent(v)))}},m=c.BufferedBlockAlgorithm=u.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(v){typeof v=="string"&&(v=O.parse(v)),this._data.concat(v),this._nDataBytes+=v.sigBytes},_process:function(v){var y,S=this._data,b=S.words,w=S.sigBytes,C=this.blockSize,k=C*4,I=w/k;v?I=r.ceil(I):I=r.max((I|0)-this._minBufferSize,0);var A=I*C,E=r.min(A*4,w);if(A){for(var $=0;$<A;$+=C)this._doProcessBlock(b,$);y=b.splice(0,A),S.sigBytes-=E}return new f.init(y,E)},clone:function(){var v=u.clone.call(this);return v._data=this._data.clone(),v},_minBufferSize:0});c.Hasher=m.extend({cfg:u.extend(),init:function(v){this.cfg=this.cfg.extend(v),this.reset()},reset:function(){m.reset.call(this),this._doReset()},update:function(v){return this._append(v),this._process(),this},finalize:function(v){v&&this._append(v);var y=this._doFinalize();return y},blockSize:16,_createHelper:function(v){return function(y,S){return new v.init(S).finalize(y)}},_createHmacHelper:function(v){return function(y,S){return new x.HMAC.init(v,S).finalize(y)}}});var x=l.algo={};return l}(Math);return n})}(Np)),Np.exports}var Fp={exports:{}},jw;function rh(){return jw||(jw=1,function(t,e){(function(n,r){t.exports=r(He())})(Fe,function(n){return function(r){var i=n,o=i.lib,s=o.Base,a=o.WordArray,l=i.x64={};l.Word=s.extend({init:function(c,u){this.high=c,this.low=u}}),l.WordArray=s.extend({init:function(c,u){c=this.words=c||[],u!=r?this.sigBytes=u:this.sigBytes=c.length*8},toX32:function(){for(var c=this.words,u=c.length,f=[],d=0;d<u;d++){var h=c[d];f.push(h.high),f.push(h.low)}return a.create(f,this.sigBytes)},clone:function(){for(var c=s.clone.call(this),u=c.words=this.words.slice(0),f=u.length,d=0;d<f;d++)u[d]=u[d].clone();return c}})}(),n})}(Fp)),Fp.exports}var Zp={exports:{}},Rw;function XG(){return Rw||(Rw=1,function(t,e){(function(n,r){t.exports=r(He())})(Fe,function(n){return function(){if(typeof ArrayBuffer=="function"){var r=n,i=r.lib,o=i.WordArray,s=o.init,a=o.init=function(l){if(l instanceof ArrayBuffer&&(l=new Uint8Array(l)),(l instanceof Int8Array||typeof Uint8ClampedArray<"u"&&l instanceof Uint8ClampedArray||l instanceof Int16Array||l instanceof Uint16Array||l instanceof Int32Array||l instanceof Uint32Array||l instanceof Float32Array||l instanceof Float64Array)&&(l=new Uint8Array(l.buffer,l.byteOffset,l.byteLength)),l instanceof Uint8Array){for(var c=l.byteLength,u=[],f=0;f<c;f++)u[f>>>2]|=l[f]<<24-f%4*8;s.call(this,u,c)}else s.apply(this,arguments)};a.prototype=o}}(),n.lib.WordArray})}(Zp)),Zp.exports}var Wp={exports:{}},Dw;function GG(){return Dw||(Dw=1,function(t,e){(function(n,r){t.exports=r(He())})(Fe,function(n){return function(){var r=n,i=r.lib,o=i.WordArray,s=r.enc;s.Utf16=s.Utf16BE={stringify:function(l){for(var c=l.words,u=l.sigBytes,f=[],d=0;d<u;d+=2){var h=c[d>>>2]>>>16-d%4*8&65535;f.push(String.fromCharCode(h))}return f.join("")},parse:function(l){for(var c=l.length,u=[],f=0;f<c;f++)u[f>>>1]|=l.charCodeAt(f)<<16-f%2*16;return o.create(u,c*2)}},s.Utf16LE={stringify:function(l){for(var c=l.words,u=l.sigBytes,f=[],d=0;d<u;d+=2){var h=a(c[d>>>2]>>>16-d%4*8&65535);f.push(String.fromCharCode(h))}return f.join("")},parse:function(l){for(var c=l.length,u=[],f=0;f<c;f++)u[f>>>1]|=a(l.charCodeAt(f)<<16-f%2*16);return o.create(u,c*2)}};function a(l){return l<<8&4278255360|l>>>8&16711935}}(),n.enc.Utf16})}(Wp)),Wp.exports}var Vp={exports:{}},Qw;function ds(){return Qw||(Qw=1,function(t,e){(function(n,r){t.exports=r(He())})(Fe,function(n){return function(){var r=n,i=r.lib,o=i.WordArray,s=r.enc;s.Base64={stringify:function(l){var c=l.words,u=l.sigBytes,f=this._map;l.clamp();for(var d=[],h=0;h<u;h+=3)for(var p=c[h>>>2]>>>24-h%4*8&255,O=c[h+1>>>2]>>>24-(h+1)%4*8&255,m=c[h+2>>>2]>>>24-(h+2)%4*8&255,x=p<<16|O<<8|m,v=0;v<4&&h+v*.75<u;v++)d.push(f.charAt(x>>>6*(3-v)&63));var y=f.charAt(64);if(y)for(;d.length%4;)d.push(y);return d.join("")},parse:function(l){var c=l.length,u=this._map,f=this._reverseMap;if(!f){f=this._reverseMap=[];for(var d=0;d<u.length;d++)f[u.charCodeAt(d)]=d}var h=u.charAt(64);if(h){var p=l.indexOf(h);p!==-1&&(c=p)}return a(l,c,f)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function a(l,c,u){for(var f=[],d=0,h=0;h<c;h++)if(h%4){var p=u[l.charCodeAt(h-1)]<<h%4*2,O=u[l.charCodeAt(h)]>>>6-h%4*2,m=p|O;f[d>>>2]|=m<<24-d%4*8,d++}return o.create(f,d)}}(),n.enc.Base64})}(Vp)),Vp.exports}var zp={exports:{}},Bw;function YG(){return Bw||(Bw=1,function(t,e){(function(n,r){t.exports=r(He())})(Fe,function(n){return function(){var r=n,i=r.lib,o=i.WordArray,s=r.enc;s.Base64url={stringify:function(l,c){c===void 0&&(c=!0);var u=l.words,f=l.sigBytes,d=c?this._safe_map:this._map;l.clamp();for(var h=[],p=0;p<f;p+=3)for(var O=u[p>>>2]>>>24-p%4*8&255,m=u[p+1>>>2]>>>24-(p+1)%4*8&255,x=u[p+2>>>2]>>>24-(p+2)%4*8&255,v=O<<16|m<<8|x,y=0;y<4&&p+y*.75<f;y++)h.push(d.charAt(v>>>6*(3-y)&63));var S=d.charAt(64);if(S)for(;h.length%4;)h.push(S);return h.join("")},parse:function(l,c){c===void 0&&(c=!0);var u=l.length,f=c?this._safe_map:this._map,d=this._reverseMap;if(!d){d=this._reverseMap=[];for(var h=0;h<f.length;h++)d[f.charCodeAt(h)]=h}var p=f.charAt(64);if(p){var O=l.indexOf(p);O!==-1&&(u=O)}return a(l,u,d)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function a(l,c,u){for(var f=[],d=0,h=0;h<c;h++)if(h%4){var p=u[l.charCodeAt(h-1)]<<h%4*2,O=u[l.charCodeAt(h)]>>>6-h%4*2,m=p|O;f[d>>>2]|=m<<24-d%4*8,d++}return o.create(f,d)}}(),n.enc.Base64url})}(zp)),zp.exports}var Lp={exports:{}},_w;function hs(){return _w||(_w=1,function(t,e){(function(n,r){t.exports=r(He())})(Fe,function(n){return function(r){var i=n,o=i.lib,s=o.WordArray,a=o.Hasher,l=i.algo,c=[];(function(){for(var O=0;O<64;O++)c[O]=r.abs(r.sin(O+1))*4294967296|0})();var u=l.MD5=a.extend({_doReset:function(){this._hash=new s.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(O,m){for(var x=0;x<16;x++){var v=m+x,y=O[v];O[v]=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360}var S=this._hash.words,b=O[m+0],w=O[m+1],C=O[m+2],k=O[m+3],I=O[m+4],A=O[m+5],E=O[m+6],$=O[m+7],R=O[m+8],M=O[m+9],Q=O[m+10],Z=O[m+11],G=O[m+12],V=O[m+13],ee=O[m+14],Y=O[m+15],z=S[0],D=S[1],B=S[2],N=S[3];z=f(z,D,B,N,b,7,c[0]),N=f(N,z,D,B,w,12,c[1]),B=f(B,N,z,D,C,17,c[2]),D=f(D,B,N,z,k,22,c[3]),z=f(z,D,B,N,I,7,c[4]),N=f(N,z,D,B,A,12,c[5]),B=f(B,N,z,D,E,17,c[6]),D=f(D,B,N,z,$,22,c[7]),z=f(z,D,B,N,R,7,c[8]),N=f(N,z,D,B,M,12,c[9]),B=f(B,N,z,D,Q,17,c[10]),D=f(D,B,N,z,Z,22,c[11]),z=f(z,D,B,N,G,7,c[12]),N=f(N,z,D,B,V,12,c[13]),B=f(B,N,z,D,ee,17,c[14]),D=f(D,B,N,z,Y,22,c[15]),z=d(z,D,B,N,w,5,c[16]),N=d(N,z,D,B,E,9,c[17]),B=d(B,N,z,D,Z,14,c[18]),D=d(D,B,N,z,b,20,c[19]),z=d(z,D,B,N,A,5,c[20]),N=d(N,z,D,B,Q,9,c[21]),B=d(B,N,z,D,Y,14,c[22]),D=d(D,B,N,z,I,20,c[23]),z=d(z,D,B,N,M,5,c[24]),N=d(N,z,D,B,ee,9,c[25]),B=d(B,N,z,D,k,14,c[26]),D=d(D,B,N,z,R,20,c[27]),z=d(z,D,B,N,V,5,c[28]),N=d(N,z,D,B,C,9,c[29]),B=d(B,N,z,D,$,14,c[30]),D=d(D,B,N,z,G,20,c[31]),z=h(z,D,B,N,A,4,c[32]),N=h(N,z,D,B,R,11,c[33]),B=h(B,N,z,D,Z,16,c[34]),D=h(D,B,N,z,ee,23,c[35]),z=h(z,D,B,N,w,4,c[36]),N=h(N,z,D,B,I,11,c[37]),B=h(B,N,z,D,$,16,c[38]),D=h(D,B,N,z,Q,23,c[39]),z=h(z,D,B,N,V,4,c[40]),N=h(N,z,D,B,b,11,c[41]),B=h(B,N,z,D,k,16,c[42]),D=h(D,B,N,z,E,23,c[43]),z=h(z,D,B,N,M,4,c[44]),N=h(N,z,D,B,G,11,c[45]),B=h(B,N,z,D,Y,16,c[46]),D=h(D,B,N,z,C,23,c[47]),z=p(z,D,B,N,b,6,c[48]),N=p(N,z,D,B,$,10,c[49]),B=p(B,N,z,D,ee,15,c[50]),D=p(D,B,N,z,A,21,c[51]),z=p(z,D,B,N,G,6,c[52]),N=p(N,z,D,B,k,10,c[53]),B=p(B,N,z,D,Q,15,c[54]),D=p(D,B,N,z,w,21,c[55]),z=p(z,D,B,N,R,6,c[56]),N=p(N,z,D,B,Y,10,c[57]),B=p(B,N,z,D,E,15,c[58]),D=p(D,B,N,z,V,21,c[59]),z=p(z,D,B,N,I,6,c[60]),N=p(N,z,D,B,Z,10,c[61]),B=p(B,N,z,D,C,15,c[62]),D=p(D,B,N,z,M,21,c[63]),S[0]=S[0]+z|0,S[1]=S[1]+D|0,S[2]=S[2]+B|0,S[3]=S[3]+N|0},_doFinalize:function(){var O=this._data,m=O.words,x=this._nDataBytes*8,v=O.sigBytes*8;m[v>>>5]|=128<<24-v%32;var y=r.floor(x/4294967296),S=x;m[(v+64>>>9<<4)+15]=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,m[(v+64>>>9<<4)+14]=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360,O.sigBytes=(m.length+1)*4,this._process();for(var b=this._hash,w=b.words,C=0;C<4;C++){var k=w[C];w[C]=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360}return b},clone:function(){var O=a.clone.call(this);return O._hash=this._hash.clone(),O}});function f(O,m,x,v,y,S,b){var w=O+(m&x|~m&v)+y+b;return(w<<S|w>>>32-S)+m}function d(O,m,x,v,y,S,b){var w=O+(m&v|x&~v)+y+b;return(w<<S|w>>>32-S)+m}function h(O,m,x,v,y,S,b){var w=O+(m^x^v)+y+b;return(w<<S|w>>>32-S)+m}function p(O,m,x,v,y,S,b){var w=O+(x^(m|~v))+y+b;return(w<<S|w>>>32-S)+m}i.MD5=a._createHelper(u),i.HmacMD5=a._createHmacHelper(u)}(Math),n.MD5})}(Lp)),Lp.exports}var Xp={exports:{}},Mw;function WT(){return Mw||(Mw=1,function(t,e){(function(n,r){t.exports=r(He())})(Fe,function(n){return function(){var r=n,i=r.lib,o=i.WordArray,s=i.Hasher,a=r.algo,l=[],c=a.SHA1=s.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(u,f){for(var d=this._hash.words,h=d[0],p=d[1],O=d[2],m=d[3],x=d[4],v=0;v<80;v++){if(v<16)l[v]=u[f+v]|0;else{var y=l[v-3]^l[v-8]^l[v-14]^l[v-16];l[v]=y<<1|y>>>31}var S=(h<<5|h>>>27)+x+l[v];v<20?S+=(p&O|~p&m)+1518500249:v<40?S+=(p^O^m)+1859775393:v<60?S+=(p&O|p&m|O&m)-1894007588:S+=(p^O^m)-899497514,x=m,m=O,O=p<<30|p>>>2,p=h,h=S}d[0]=d[0]+h|0,d[1]=d[1]+p|0,d[2]=d[2]+O|0,d[3]=d[3]+m|0,d[4]=d[4]+x|0},_doFinalize:function(){var u=this._data,f=u.words,d=this._nDataBytes*8,h=u.sigBytes*8;return f[h>>>5]|=128<<24-h%32,f[(h+64>>>9<<4)+14]=Math.floor(d/4294967296),f[(h+64>>>9<<4)+15]=d,u.sigBytes=f.length*4,this._process(),this._hash},clone:function(){var u=s.clone.call(this);return u._hash=this._hash.clone(),u}});r.SHA1=s._createHelper(c),r.HmacSHA1=s._createHmacHelper(c)}(),n.SHA1})}(Xp)),Xp.exports}var Gp={exports:{}},Nw;function Dx(){return Nw||(Nw=1,function(t,e){(function(n,r){t.exports=r(He())})(Fe,function(n){return function(r){var i=n,o=i.lib,s=o.WordArray,a=o.Hasher,l=i.algo,c=[],u=[];(function(){function h(x){for(var v=r.sqrt(x),y=2;y<=v;y++)if(!(x%y))return!1;return!0}function p(x){return(x-(x|0))*4294967296|0}for(var O=2,m=0;m<64;)h(O)&&(m<8&&(c[m]=p(r.pow(O,1/2))),u[m]=p(r.pow(O,1/3)),m++),O++})();var f=[],d=l.SHA256=a.extend({_doReset:function(){this._hash=new s.init(c.slice(0))},_doProcessBlock:function(h,p){for(var O=this._hash.words,m=O[0],x=O[1],v=O[2],y=O[3],S=O[4],b=O[5],w=O[6],C=O[7],k=0;k<64;k++){if(k<16)f[k]=h[p+k]|0;else{var I=f[k-15],A=(I<<25|I>>>7)^(I<<14|I>>>18)^I>>>3,E=f[k-2],$=(E<<15|E>>>17)^(E<<13|E>>>19)^E>>>10;f[k]=A+f[k-7]+$+f[k-16]}var R=S&b^~S&w,M=m&x^m&v^x&v,Q=(m<<30|m>>>2)^(m<<19|m>>>13)^(m<<10|m>>>22),Z=(S<<26|S>>>6)^(S<<21|S>>>11)^(S<<7|S>>>25),G=C+Z+R+u[k]+f[k],V=Q+M;C=w,w=b,b=S,S=y+G|0,y=v,v=x,x=m,m=G+V|0}O[0]=O[0]+m|0,O[1]=O[1]+x|0,O[2]=O[2]+v|0,O[3]=O[3]+y|0,O[4]=O[4]+S|0,O[5]=O[5]+b|0,O[6]=O[6]+w|0,O[7]=O[7]+C|0},_doFinalize:function(){var h=this._data,p=h.words,O=this._nDataBytes*8,m=h.sigBytes*8;return p[m>>>5]|=128<<24-m%32,p[(m+64>>>9<<4)+14]=r.floor(O/4294967296),p[(m+64>>>9<<4)+15]=O,h.sigBytes=p.length*4,this._process(),this._hash},clone:function(){var h=a.clone.call(this);return h._hash=this._hash.clone(),h}});i.SHA256=a._createHelper(d),i.HmacSHA256=a._createHmacHelper(d)}(Math),n.SHA256})}(Gp)),Gp.exports}var Yp={exports:{}},Fw;function qG(){return Fw||(Fw=1,function(t,e){(function(n,r,i){t.exports=r(He(),Dx())})(Fe,function(n){return function(){var r=n,i=r.lib,o=i.WordArray,s=r.algo,a=s.SHA256,l=s.SHA224=a.extend({_doReset:function(){this._hash=new o.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var c=a._doFinalize.call(this);return c.sigBytes-=4,c}});r.SHA224=a._createHelper(l),r.HmacSHA224=a._createHmacHelper(l)}(),n.SHA224})}(Yp)),Yp.exports}var qp={exports:{}},Zw;function VT(){return Zw||(Zw=1,function(t,e){(function(n,r,i){t.exports=r(He(),rh())})(Fe,function(n){return function(){var r=n,i=r.lib,o=i.Hasher,s=r.x64,a=s.Word,l=s.WordArray,c=r.algo;function u(){return a.create.apply(a,arguments)}var f=[u(1116352408,3609767458),u(1899447441,602891725),u(3049323471,3964484399),u(3921009573,2173295548),u(961987163,4081628472),u(1508970993,3053834265),u(2453635748,2937671579),u(2870763221,3664609560),u(3624381080,2734883394),u(310598401,1164996542),u(607225278,1323610764),u(1426881987,3590304994),u(1925078388,4068182383),u(2162078206,991336113),u(2614888103,633803317),u(3248222580,3479774868),u(3835390401,2666613458),u(4022224774,944711139),u(264347078,2341262773),u(604807628,2007800933),u(770255983,1495990901),u(1249150122,1856431235),u(1555081692,3175218132),u(1996064986,2198950837),u(2554220882,3999719339),u(2821834349,766784016),u(2952996808,2566594879),u(3210313671,3203337956),u(3336571891,1034457026),u(3584528711,2466948901),u(113926993,3758326383),u(338241895,168717936),u(666307205,1188179964),u(773529912,1546045734),u(1294757372,1522805485),u(1396182291,2643833823),u(1695183700,2343527390),u(1986661051,1014477480),u(2177026350,1206759142),u(2456956037,344077627),u(2730485921,1290863460),u(2820302411,3158454273),u(3259730800,3505952657),u(3345764771,106217008),u(3516065817,3606008344),u(3600352804,1432725776),u(4094571909,1467031594),u(275423344,851169720),u(430227734,3100823752),u(506948616,1363258195),u(659060556,3750685593),u(883997877,3785050280),u(958139571,3318307427),u(1322822218,3812723403),u(1537002063,2003034995),u(1747873779,3602036899),u(1955562222,1575990012),u(2024104815,1125592928),u(2227730452,2716904306),u(2361852424,442776044),u(2428436474,593698344),u(2756734187,3733110249),u(3204031479,2999351573),u(3329325298,3815920427),u(3391569614,3928383900),u(3515267271,566280711),u(3940187606,3454069534),u(4118630271,4000239992),u(116418474,1914138554),u(174292421,2731055270),u(289380356,3203993006),u(460393269,320620315),u(685471733,587496836),u(852142971,1086792851),u(1017036298,365543100),u(1126000580,2618297676),u(1288033470,3409855158),u(1501505948,4234509866),u(1607167915,987167468),u(1816402316,1246189591)],d=[];(function(){for(var p=0;p<80;p++)d[p]=u()})();var h=c.SHA512=o.extend({_doReset:function(){this._hash=new l.init([new a.init(1779033703,4089235720),new a.init(3144134277,2227873595),new a.init(1013904242,4271175723),new a.init(2773480762,1595750129),new a.init(1359893119,2917565137),new a.init(2600822924,725511199),new a.init(528734635,4215389547),new a.init(1541459225,327033209)])},_doProcessBlock:function(p,O){for(var m=this._hash.words,x=m[0],v=m[1],y=m[2],S=m[3],b=m[4],w=m[5],C=m[6],k=m[7],I=x.high,A=x.low,E=v.high,$=v.low,R=y.high,M=y.low,Q=S.high,Z=S.low,G=b.high,V=b.low,ee=w.high,Y=w.low,z=C.high,D=C.low,B=k.high,N=k.low,U=I,F=A,te=E,L=$,ce=R,re=M,ae=Q,H=Z,pe=G,q=V,ne=ee,he=Y,ve=z,Re=D,ye=B,Ee=N,$e=0;$e<80;$e++){var Le,qe,be=d[$e];if($e<16)qe=be.high=p[O+$e*2]|0,Le=be.low=p[O+$e*2+1]|0;else{var rt=d[$e-15],Ot=rt.high,Ut=rt.low,cn=(Ot>>>1|Ut<<31)^(Ot>>>8|Ut<<24)^Ot>>>7,dn=(Ut>>>1|Ot<<31)^(Ut>>>8|Ot<<24)^(Ut>>>7|Ot<<25),hn=d[$e-2],Bn=hn.high,Ht=hn.low,$o=(Bn>>>19|Ht<<13)^(Bn<<3|Ht>>>29)^Bn>>>6,Pi=(Ht>>>19|Bn<<13)^(Ht<<3|Bn>>>29)^(Ht>>>6|Bn<<26),Li=d[$e-7],Dr=Li.high,Pn=Li.low,tr=d[$e-16],_n=tr.high,Jt=tr.low;Le=dn+Pn,qe=cn+Dr+(Le>>>0<dn>>>0?1:0),Le=Le+Pi,qe=qe+$o+(Le>>>0<Pi>>>0?1:0),Le=Le+Jt,qe=qe+_n+(Le>>>0<Jt>>>0?1:0),be.high=qe,be.low=Le}var nr=pe&ne^~pe&ve,Qr=q&he^~q&Re,Mn=U&te^U&ce^te&ce,Et=F&L^F&re^L&re,It=(U>>>28|F<<4)^(U<<30|F>>>2)^(U<<25|F>>>7),yt=(F>>>28|U<<4)^(F<<30|U>>>2)^(F<<25|U>>>7),qr=(pe>>>14|q<<18)^(pe>>>18|q<<14)^(pe<<23|q>>>9),rr=(q>>>14|pe<<18)^(q>>>18|pe<<14)^(q<<23|pe>>>9),ir=f[$e],Ei=ir.high,Ur=ir.low,jt=Ee+rr,_t=ye+qr+(jt>>>0<Ee>>>0?1:0),jt=jt+Qr,_t=_t+nr+(jt>>>0<Qr>>>0?1:0),jt=jt+Ur,_t=_t+Ei+(jt>>>0<Ur>>>0?1:0),jt=jt+Le,_t=_t+qe+(jt>>>0<Le>>>0?1:0),Xi=yt+Et,Ii=It+Mn+(Xi>>>0<yt>>>0?1:0);ye=ve,Ee=Re,ve=ne,Re=he,ne=pe,he=q,q=H+jt|0,pe=ae+_t+(q>>>0<H>>>0?1:0)|0,ae=ce,H=re,ce=te,re=L,te=U,L=F,F=jt+Xi|0,U=_t+Ii+(F>>>0<jt>>>0?1:0)|0}A=x.low=A+F,x.high=I+U+(A>>>0<F>>>0?1:0),$=v.low=$+L,v.high=E+te+($>>>0<L>>>0?1:0),M=y.low=M+re,y.high=R+ce+(M>>>0<re>>>0?1:0),Z=S.low=Z+H,S.high=Q+ae+(Z>>>0<H>>>0?1:0),V=b.low=V+q,b.high=G+pe+(V>>>0<q>>>0?1:0),Y=w.low=Y+he,w.high=ee+ne+(Y>>>0<he>>>0?1:0),D=C.low=D+Re,C.high=z+ve+(D>>>0<Re>>>0?1:0),N=k.low=N+Ee,k.high=B+ye+(N>>>0<Ee>>>0?1:0)},_doFinalize:function(){var p=this._data,O=p.words,m=this._nDataBytes*8,x=p.sigBytes*8;O[x>>>5]|=128<<24-x%32,O[(x+128>>>10<<5)+30]=Math.floor(m/4294967296),O[(x+128>>>10<<5)+31]=m,p.sigBytes=O.length*4,this._process();var v=this._hash.toX32();return v},clone:function(){var p=o.clone.call(this);return p._hash=this._hash.clone(),p},blockSize:1024/32});r.SHA512=o._createHelper(h),r.HmacSHA512=o._createHmacHelper(h)}(),n.SHA512})}(qp)),qp.exports}var Up={exports:{}},Ww;function UG(){return Ww||(Ww=1,function(t,e){(function(n,r,i){t.exports=r(He(),rh(),VT())})(Fe,function(n){return function(){var r=n,i=r.x64,o=i.Word,s=i.WordArray,a=r.algo,l=a.SHA512,c=a.SHA384=l.extend({_doReset:function(){this._hash=new s.init([new o.init(3418070365,3238371032),new o.init(1654270250,914150663),new o.init(2438529370,812702999),new o.init(355462360,4144912697),new o.init(1731405415,4290775857),new o.init(2394180231,1750603025),new o.init(3675008525,1694076839),new o.init(1203062813,3204075428)])},_doFinalize:function(){var u=l._doFinalize.call(this);return u.sigBytes-=16,u}});r.SHA384=l._createHelper(c),r.HmacSHA384=l._createHmacHelper(c)}(),n.SHA384})}(Up)),Up.exports}var Hp={exports:{}},Vw;function HG(){return Vw||(Vw=1,function(t,e){(function(n,r,i){t.exports=r(He(),rh())})(Fe,function(n){return function(r){var i=n,o=i.lib,s=o.WordArray,a=o.Hasher,l=i.x64,c=l.Word,u=i.algo,f=[],d=[],h=[];(function(){for(var m=1,x=0,v=0;v<24;v++){f[m+5*x]=(v+1)*(v+2)/2%64;var y=x%5,S=(2*m+3*x)%5;m=y,x=S}for(var m=0;m<5;m++)for(var x=0;x<5;x++)d[m+5*x]=x+(2*m+3*x)%5*5;for(var b=1,w=0;w<24;w++){for(var C=0,k=0,I=0;I<7;I++){if(b&1){var A=(1<<I)-1;A<32?k^=1<<A:C^=1<<A-32}b&128?b=b<<1^113:b<<=1}h[w]=c.create(C,k)}})();var p=[];(function(){for(var m=0;m<25;m++)p[m]=c.create()})();var O=u.SHA3=a.extend({cfg:a.cfg.extend({outputLength:512}),_doReset:function(){for(var m=this._state=[],x=0;x<25;x++)m[x]=new c.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(m,x){for(var v=this._state,y=this.blockSize/2,S=0;S<y;S++){var b=m[x+2*S],w=m[x+2*S+1];b=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,w=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360;var C=v[S];C.high^=w,C.low^=b}for(var k=0;k<24;k++){for(var I=0;I<5;I++){for(var A=0,E=0,$=0;$<5;$++){var C=v[I+5*$];A^=C.high,E^=C.low}var R=p[I];R.high=A,R.low=E}for(var I=0;I<5;I++)for(var M=p[(I+4)%5],Q=p[(I+1)%5],Z=Q.high,G=Q.low,A=M.high^(Z<<1|G>>>31),E=M.low^(G<<1|Z>>>31),$=0;$<5;$++){var C=v[I+5*$];C.high^=A,C.low^=E}for(var V=1;V<25;V++){var A,E,C=v[V],ee=C.high,Y=C.low,z=f[V];z<32?(A=ee<<z|Y>>>32-z,E=Y<<z|ee>>>32-z):(A=Y<<z-32|ee>>>64-z,E=ee<<z-32|Y>>>64-z);var D=p[d[V]];D.high=A,D.low=E}var B=p[0],N=v[0];B.high=N.high,B.low=N.low;for(var I=0;I<5;I++)for(var $=0;$<5;$++){var V=I+5*$,C=v[V],U=p[V],F=p[(I+1)%5+5*$],te=p[(I+2)%5+5*$];C.high=U.high^~F.high&te.high,C.low=U.low^~F.low&te.low}var C=v[0],L=h[k];C.high^=L.high,C.low^=L.low}},_doFinalize:function(){var m=this._data,x=m.words;this._nDataBytes*8;var v=m.sigBytes*8,y=this.blockSize*32;x[v>>>5]|=1<<24-v%32,x[(r.ceil((v+1)/y)*y>>>5)-1]|=128,m.sigBytes=x.length*4,this._process();for(var S=this._state,b=this.cfg.outputLength/8,w=b/8,C=[],k=0;k<w;k++){var I=S[k],A=I.high,E=I.low;A=(A<<8|A>>>24)&16711935|(A<<24|A>>>8)&4278255360,E=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,C.push(E),C.push(A)}return new s.init(C,b)},clone:function(){for(var m=a.clone.call(this),x=m._state=this._state.slice(0),v=0;v<25;v++)x[v]=x[v].clone();return m}});i.SHA3=a._createHelper(O),i.HmacSHA3=a._createHmacHelper(O)}(Math),n.SHA3})}(Hp)),Hp.exports}var Jp={exports:{}},zw;function JG(){return zw||(zw=1,function(t,e){(function(n,r){t.exports=r(He())})(Fe,function(n){/** @preserve
809
809
  (c) 2012 by Cédric Mesnil. All rights reserved.
810
810
 
811
811
  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
@@ -818,8 +818,8 @@ $3`);return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function eG(t){return t.i
818
818
  * Counter block mode compatible with Dr Brian Gladman fileenc.c
819
819
  * derived from CryptoJS.mode.CTR
820
820
  * Jan Hruby jhruby.web@gmail.com
821
- */return n.mode.CTRGladman=function(){var r=n.lib.BlockCipherMode.extend();function i(a){if((a>>24&255)===255){var l=a>>16&255,c=a>>8&255,u=a&255;l===255?(l=0,c===255?(c=0,u===255?u=0:++u):++c):++l,a=0,a+=l<<16,a+=c<<8,a+=u}else a+=1<<24;return a}function o(a){return(a[0]=i(a[0]))===0&&(a[1]=i(a[1])),a}var s=r.Encryptor=r.extend({processBlock:function(a,l){var c=this._cipher,u=c.blockSize,f=this._iv,d=this._counter;f&&(d=this._counter=f.slice(0),this._iv=void 0),o(d);var h=d.slice(0);c.encryptBlock(h,0);for(var p=0;p<u;p++)a[l+p]^=h[p]}});return r.Decryptor=s,r}(),n.mode.CTRGladman})}(og)),og.exports}var sg={exports:{}},Jw;function rY(){return Jw||(Jw=1,function(t,e){(function(n,r,i){t.exports=r(He(),fn())})(Fe,function(n){return n.mode.OFB=function(){var r=n.lib.BlockCipherMode.extend(),i=r.Encryptor=r.extend({processBlock:function(o,s){var a=this._cipher,l=a.blockSize,c=this._iv,u=this._keystream;c&&(u=this._keystream=c.slice(0),this._iv=void 0),a.encryptBlock(u,0);for(var f=0;f<l;f++)o[s+f]^=u[f]}});return r.Decryptor=i,r}(),n.mode.OFB})}(sg)),sg.exports}var ag={exports:{}},Kw;function iY(){return Kw||(Kw=1,function(t,e){(function(n,r,i){t.exports=r(He(),fn())})(Fe,function(n){return n.mode.ECB=function(){var r=n.lib.BlockCipherMode.extend();return r.Encryptor=r.extend({processBlock:function(i,o){this._cipher.encryptBlock(i,o)}}),r.Decryptor=r.extend({processBlock:function(i,o){this._cipher.decryptBlock(i,o)}}),r}(),n.mode.ECB})}(ag)),ag.exports}var lg={exports:{}},eC;function oY(){return eC||(eC=1,function(t,e){(function(n,r,i){t.exports=r(He(),fn())})(Fe,function(n){return n.pad.AnsiX923={pad:function(r,i){var o=r.sigBytes,s=i*4,a=s-o%s,l=o+a-1;r.clamp(),r.words[l>>>2]|=a<<24-l%4*8,r.sigBytes+=a},unpad:function(r){var i=r.words[r.sigBytes-1>>>2]&255;r.sigBytes-=i}},n.pad.Ansix923})}(lg)),lg.exports}var cg={exports:{}},tC;function sY(){return tC||(tC=1,function(t,e){(function(n,r,i){t.exports=r(He(),fn())})(Fe,function(n){return n.pad.Iso10126={pad:function(r,i){var o=i*4,s=o-r.sigBytes%o;r.concat(n.lib.WordArray.random(s-1)).concat(n.lib.WordArray.create([s<<24],1))},unpad:function(r){var i=r.words[r.sigBytes-1>>>2]&255;r.sigBytes-=i}},n.pad.Iso10126})}(cg)),cg.exports}var ug={exports:{}},nC;function aY(){return nC||(nC=1,function(t,e){(function(n,r,i){t.exports=r(He(),fn())})(Fe,function(n){return n.pad.Iso97971={pad:function(r,i){r.concat(n.lib.WordArray.create([2147483648],1)),n.pad.ZeroPadding.pad(r,i)},unpad:function(r){n.pad.ZeroPadding.unpad(r),r.sigBytes--}},n.pad.Iso97971})}(ug)),ug.exports}var fg={exports:{}},rC;function lY(){return rC||(rC=1,function(t,e){(function(n,r,i){t.exports=r(He(),fn())})(Fe,function(n){return n.pad.ZeroPadding={pad:function(r,i){var o=i*4;r.clamp(),r.sigBytes+=o-(r.sigBytes%o||o)},unpad:function(r){for(var i=r.words,o=r.sigBytes-1,o=r.sigBytes-1;o>=0;o--)if(i[o>>>2]>>>24-o%4*8&255){r.sigBytes=o+1;break}}},n.pad.ZeroPadding})}(fg)),fg.exports}var dg={exports:{}},iC;function cY(){return iC||(iC=1,function(t,e){(function(n,r,i){t.exports=r(He(),fn())})(Fe,function(n){return n.pad.NoPadding={pad:function(){},unpad:function(){}},n.pad.NoPadding})}(dg)),dg.exports}var hg={exports:{}},oC;function uY(){return oC||(oC=1,function(t,e){(function(n,r,i){t.exports=r(He(),fn())})(Fe,function(n){return function(r){var i=n,o=i.lib,s=o.CipherParams,a=i.enc,l=a.Hex,c=i.format;c.Hex={stringify:function(u){return u.ciphertext.toString(l)},parse:function(u){var f=l.parse(u);return s.create({ciphertext:f})}}}(),n.format.Hex})}(hg)),hg.exports}var pg={exports:{}},sC;function fY(){return sC||(sC=1,function(t,e){(function(n,r,i){t.exports=r(He(),fs(),ds(),Io(),fn())})(Fe,function(n){return function(){var r=n,i=r.lib,o=i.BlockCipher,s=r.algo,a=[],l=[],c=[],u=[],f=[],d=[],h=[],p=[],O=[],m=[];(function(){for(var y=[],S=0;S<256;S++)S<128?y[S]=S<<1:y[S]=S<<1^283;for(var b=0,w=0,S=0;S<256;S++){var C=w^w<<1^w<<2^w<<3^w<<4;C=C>>>8^C&255^99,a[b]=C,l[C]=b;var k=y[b],I=y[k],A=y[I],E=y[C]*257^C*16843008;c[b]=E<<24|E>>>8,u[b]=E<<16|E>>>16,f[b]=E<<8|E>>>24,d[b]=E;var E=A*16843009^I*65537^k*257^b*16843008;h[C]=E<<24|E>>>8,p[C]=E<<16|E>>>16,O[C]=E<<8|E>>>24,m[C]=E,b?(b=k^y[y[y[A^k]]],w^=y[y[w]]):b=w=1}})();var x=[0,1,2,4,8,16,32,64,128,27,54],v=s.AES=o.extend({_doReset:function(){var y;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var S=this._keyPriorReset=this._key,b=S.words,w=S.sigBytes/4,C=this._nRounds=w+6,k=(C+1)*4,I=this._keySchedule=[],A=0;A<k;A++)A<w?I[A]=b[A]:(y=I[A-1],A%w?w>6&&A%w==4&&(y=a[y>>>24]<<24|a[y>>>16&255]<<16|a[y>>>8&255]<<8|a[y&255]):(y=y<<8|y>>>24,y=a[y>>>24]<<24|a[y>>>16&255]<<16|a[y>>>8&255]<<8|a[y&255],y^=x[A/w|0]<<24),I[A]=I[A-w]^y);for(var E=this._invKeySchedule=[],$=0;$<k;$++){var A=k-$;if($%4)var y=I[A];else var y=I[A-4];$<4||A<=4?E[$]=y:E[$]=h[a[y>>>24]]^p[a[y>>>16&255]]^O[a[y>>>8&255]]^m[a[y&255]]}}},encryptBlock:function(y,S){this._doCryptBlock(y,S,this._keySchedule,c,u,f,d,a)},decryptBlock:function(y,S){var b=y[S+1];y[S+1]=y[S+3],y[S+3]=b,this._doCryptBlock(y,S,this._invKeySchedule,h,p,O,m,l);var b=y[S+1];y[S+1]=y[S+3],y[S+3]=b},_doCryptBlock:function(y,S,b,w,C,k,I,A){for(var E=this._nRounds,$=y[S]^b[0],R=y[S+1]^b[1],M=y[S+2]^b[2],Q=y[S+3]^b[3],Z=4,G=1;G<E;G++){var V=w[$>>>24]^C[R>>>16&255]^k[M>>>8&255]^I[Q&255]^b[Z++],ee=w[R>>>24]^C[M>>>16&255]^k[Q>>>8&255]^I[$&255]^b[Z++],Y=w[M>>>24]^C[Q>>>16&255]^k[$>>>8&255]^I[R&255]^b[Z++],z=w[Q>>>24]^C[$>>>16&255]^k[R>>>8&255]^I[M&255]^b[Z++];$=V,R=ee,M=Y,Q=z}var V=(A[$>>>24]<<24|A[R>>>16&255]<<16|A[M>>>8&255]<<8|A[Q&255])^b[Z++],ee=(A[R>>>24]<<24|A[M>>>16&255]<<16|A[Q>>>8&255]<<8|A[$&255])^b[Z++],Y=(A[M>>>24]<<24|A[Q>>>16&255]<<16|A[$>>>8&255]<<8|A[R&255])^b[Z++],z=(A[Q>>>24]<<24|A[$>>>16&255]<<16|A[R>>>8&255]<<8|A[M&255])^b[Z++];y[S]=V,y[S+1]=ee,y[S+2]=Y,y[S+3]=z},keySize:256/32});r.AES=o._createHelper(v)}(),n.AES})}(pg)),pg.exports}var gg={exports:{}},aC;function dY(){return aC||(aC=1,function(t,e){(function(n,r,i){t.exports=r(He(),fs(),ds(),Io(),fn())})(Fe,function(n){return function(){var r=n,i=r.lib,o=i.WordArray,s=i.BlockCipher,a=r.algo,l=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],c=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],u=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],f=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],d=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],h=a.DES=s.extend({_doReset:function(){for(var x=this._key,v=x.words,y=[],S=0;S<56;S++){var b=l[S]-1;y[S]=v[b>>>5]>>>31-b%32&1}for(var w=this._subKeys=[],C=0;C<16;C++){for(var k=w[C]=[],I=u[C],S=0;S<24;S++)k[S/6|0]|=y[(c[S]-1+I)%28]<<31-S%6,k[4+(S/6|0)]|=y[28+(c[S+24]-1+I)%28]<<31-S%6;k[0]=k[0]<<1|k[0]>>>31;for(var S=1;S<7;S++)k[S]=k[S]>>>(S-1)*4+3;k[7]=k[7]<<5|k[7]>>>27}for(var A=this._invSubKeys=[],S=0;S<16;S++)A[S]=w[15-S]},encryptBlock:function(x,v){this._doCryptBlock(x,v,this._subKeys)},decryptBlock:function(x,v){this._doCryptBlock(x,v,this._invSubKeys)},_doCryptBlock:function(x,v,y){this._lBlock=x[v],this._rBlock=x[v+1],p.call(this,4,252645135),p.call(this,16,65535),O.call(this,2,858993459),O.call(this,8,16711935),p.call(this,1,1431655765);for(var S=0;S<16;S++){for(var b=y[S],w=this._lBlock,C=this._rBlock,k=0,I=0;I<8;I++)k|=f[I][((C^b[I])&d[I])>>>0];this._lBlock=C,this._rBlock=w^k}var A=this._lBlock;this._lBlock=this._rBlock,this._rBlock=A,p.call(this,1,1431655765),O.call(this,8,16711935),O.call(this,2,858993459),p.call(this,16,65535),p.call(this,4,252645135),x[v]=this._lBlock,x[v+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function p(x,v){var y=(this._lBlock>>>x^this._rBlock)&v;this._rBlock^=y,this._lBlock^=y<<x}function O(x,v){var y=(this._rBlock>>>x^this._lBlock)&v;this._lBlock^=y,this._rBlock^=y<<x}r.DES=s._createHelper(h);var m=a.TripleDES=s.extend({_doReset:function(){var x=this._key,v=x.words;if(v.length!==2&&v.length!==4&&v.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var y=v.slice(0,2),S=v.length<4?v.slice(0,2):v.slice(2,4),b=v.length<6?v.slice(0,2):v.slice(4,6);this._des1=h.createEncryptor(o.create(y)),this._des2=h.createEncryptor(o.create(S)),this._des3=h.createEncryptor(o.create(b))},encryptBlock:function(x,v){this._des1.encryptBlock(x,v),this._des2.decryptBlock(x,v),this._des3.encryptBlock(x,v)},decryptBlock:function(x,v){this._des3.decryptBlock(x,v),this._des2.encryptBlock(x,v),this._des1.decryptBlock(x,v)},keySize:192/32,ivSize:64/32,blockSize:64/32});r.TripleDES=s._createHelper(m)}(),n.TripleDES})}(gg)),gg.exports}var mg={exports:{}},lC;function hY(){return lC||(lC=1,function(t,e){(function(n,r,i){t.exports=r(He(),fs(),ds(),Io(),fn())})(Fe,function(n){return function(){var r=n,i=r.lib,o=i.StreamCipher,s=r.algo,a=s.RC4=o.extend({_doReset:function(){for(var u=this._key,f=u.words,d=u.sigBytes,h=this._S=[],p=0;p<256;p++)h[p]=p;for(var p=0,O=0;p<256;p++){var m=p%d,x=f[m>>>2]>>>24-m%4*8&255;O=(O+h[p]+x)%256;var v=h[p];h[p]=h[O],h[O]=v}this._i=this._j=0},_doProcessBlock:function(u,f){u[f]^=l.call(this)},keySize:256/32,ivSize:0});function l(){for(var u=this._S,f=this._i,d=this._j,h=0,p=0;p<4;p++){f=(f+1)%256,d=(d+u[f])%256;var O=u[f];u[f]=u[d],u[d]=O,h|=u[(u[f]+u[d])%256]<<24-p*8}return this._i=f,this._j=d,h}r.RC4=o._createHelper(a);var c=s.RC4Drop=a.extend({cfg:a.cfg.extend({drop:192}),_doReset:function(){a._doReset.call(this);for(var u=this.cfg.drop;u>0;u--)l.call(this)}});r.RC4Drop=o._createHelper(c)}(),n.RC4})}(mg)),mg.exports}var Og={exports:{}},cC;function pY(){return cC||(cC=1,function(t,e){(function(n,r,i){t.exports=r(He(),fs(),ds(),Io(),fn())})(Fe,function(n){return function(){var r=n,i=r.lib,o=i.StreamCipher,s=r.algo,a=[],l=[],c=[],u=s.Rabbit=o.extend({_doReset:function(){for(var d=this._key.words,h=this.cfg.iv,p=0;p<4;p++)d[p]=(d[p]<<8|d[p]>>>24)&16711935|(d[p]<<24|d[p]>>>8)&4278255360;var O=this._X=[d[0],d[3]<<16|d[2]>>>16,d[1],d[0]<<16|d[3]>>>16,d[2],d[1]<<16|d[0]>>>16,d[3],d[2]<<16|d[1]>>>16],m=this._C=[d[2]<<16|d[2]>>>16,d[0]&4294901760|d[1]&65535,d[3]<<16|d[3]>>>16,d[1]&4294901760|d[2]&65535,d[0]<<16|d[0]>>>16,d[2]&4294901760|d[3]&65535,d[1]<<16|d[1]>>>16,d[3]&4294901760|d[0]&65535];this._b=0;for(var p=0;p<4;p++)f.call(this);for(var p=0;p<8;p++)m[p]^=O[p+4&7];if(h){var x=h.words,v=x[0],y=x[1],S=(v<<8|v>>>24)&16711935|(v<<24|v>>>8)&4278255360,b=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,w=S>>>16|b&4294901760,C=b<<16|S&65535;m[0]^=S,m[1]^=w,m[2]^=b,m[3]^=C,m[4]^=S,m[5]^=w,m[6]^=b,m[7]^=C;for(var p=0;p<4;p++)f.call(this)}},_doProcessBlock:function(d,h){var p=this._X;f.call(this),a[0]=p[0]^p[5]>>>16^p[3]<<16,a[1]=p[2]^p[7]>>>16^p[5]<<16,a[2]=p[4]^p[1]>>>16^p[7]<<16,a[3]=p[6]^p[3]>>>16^p[1]<<16;for(var O=0;O<4;O++)a[O]=(a[O]<<8|a[O]>>>24)&16711935|(a[O]<<24|a[O]>>>8)&4278255360,d[h+O]^=a[O]},blockSize:128/32,ivSize:64/32});function f(){for(var d=this._X,h=this._C,p=0;p<8;p++)l[p]=h[p];h[0]=h[0]+1295307597+this._b|0,h[1]=h[1]+3545052371+(h[0]>>>0<l[0]>>>0?1:0)|0,h[2]=h[2]+886263092+(h[1]>>>0<l[1]>>>0?1:0)|0,h[3]=h[3]+1295307597+(h[2]>>>0<l[2]>>>0?1:0)|0,h[4]=h[4]+3545052371+(h[3]>>>0<l[3]>>>0?1:0)|0,h[5]=h[5]+886263092+(h[4]>>>0<l[4]>>>0?1:0)|0,h[6]=h[6]+1295307597+(h[5]>>>0<l[5]>>>0?1:0)|0,h[7]=h[7]+3545052371+(h[6]>>>0<l[6]>>>0?1:0)|0,this._b=h[7]>>>0<l[7]>>>0?1:0;for(var p=0;p<8;p++){var O=d[p]+h[p],m=O&65535,x=O>>>16,v=((m*m>>>17)+m*x>>>15)+x*x,y=((O&4294901760)*O|0)+((O&65535)*O|0);c[p]=v^y}d[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,d[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,d[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,d[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,d[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,d[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,d[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,d[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}r.Rabbit=o._createHelper(u)}(),n.Rabbit})}(Og)),Og.exports}var xg={exports:{}},uC;function gY(){return uC||(uC=1,function(t,e){(function(n,r,i){t.exports=r(He(),fs(),ds(),Io(),fn())})(Fe,function(n){return function(){var r=n,i=r.lib,o=i.StreamCipher,s=r.algo,a=[],l=[],c=[],u=s.RabbitLegacy=o.extend({_doReset:function(){var d=this._key.words,h=this.cfg.iv,p=this._X=[d[0],d[3]<<16|d[2]>>>16,d[1],d[0]<<16|d[3]>>>16,d[2],d[1]<<16|d[0]>>>16,d[3],d[2]<<16|d[1]>>>16],O=this._C=[d[2]<<16|d[2]>>>16,d[0]&4294901760|d[1]&65535,d[3]<<16|d[3]>>>16,d[1]&4294901760|d[2]&65535,d[0]<<16|d[0]>>>16,d[2]&4294901760|d[3]&65535,d[1]<<16|d[1]>>>16,d[3]&4294901760|d[0]&65535];this._b=0;for(var m=0;m<4;m++)f.call(this);for(var m=0;m<8;m++)O[m]^=p[m+4&7];if(h){var x=h.words,v=x[0],y=x[1],S=(v<<8|v>>>24)&16711935|(v<<24|v>>>8)&4278255360,b=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,w=S>>>16|b&4294901760,C=b<<16|S&65535;O[0]^=S,O[1]^=w,O[2]^=b,O[3]^=C,O[4]^=S,O[5]^=w,O[6]^=b,O[7]^=C;for(var m=0;m<4;m++)f.call(this)}},_doProcessBlock:function(d,h){var p=this._X;f.call(this),a[0]=p[0]^p[5]>>>16^p[3]<<16,a[1]=p[2]^p[7]>>>16^p[5]<<16,a[2]=p[4]^p[1]>>>16^p[7]<<16,a[3]=p[6]^p[3]>>>16^p[1]<<16;for(var O=0;O<4;O++)a[O]=(a[O]<<8|a[O]>>>24)&16711935|(a[O]<<24|a[O]>>>8)&4278255360,d[h+O]^=a[O]},blockSize:128/32,ivSize:64/32});function f(){for(var d=this._X,h=this._C,p=0;p<8;p++)l[p]=h[p];h[0]=h[0]+1295307597+this._b|0,h[1]=h[1]+3545052371+(h[0]>>>0<l[0]>>>0?1:0)|0,h[2]=h[2]+886263092+(h[1]>>>0<l[1]>>>0?1:0)|0,h[3]=h[3]+1295307597+(h[2]>>>0<l[2]>>>0?1:0)|0,h[4]=h[4]+3545052371+(h[3]>>>0<l[3]>>>0?1:0)|0,h[5]=h[5]+886263092+(h[4]>>>0<l[4]>>>0?1:0)|0,h[6]=h[6]+1295307597+(h[5]>>>0<l[5]>>>0?1:0)|0,h[7]=h[7]+3545052371+(h[6]>>>0<l[6]>>>0?1:0)|0,this._b=h[7]>>>0<l[7]>>>0?1:0;for(var p=0;p<8;p++){var O=d[p]+h[p],m=O&65535,x=O>>>16,v=((m*m>>>17)+m*x>>>15)+x*x,y=((O&4294901760)*O|0)+((O&65535)*O|0);c[p]=v^y}d[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,d[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,d[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,d[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,d[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,d[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,d[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,d[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}r.RabbitLegacy=o._createHelper(u)}(),n.RabbitLegacy})}(xg)),xg.exports}var vg={exports:{}},fC;function mY(){return fC||(fC=1,function(t,e){(function(n,r,i){t.exports=r(He(),fs(),ds(),Io(),fn())})(Fe,function(n){return function(){var r=n,i=r.lib,o=i.BlockCipher,s=r.algo;const a=16,l=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],c=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var u={pbox:[],sbox:[]};function f(m,x){let v=x>>24&255,y=x>>16&255,S=x>>8&255,b=x&255,w=m.sbox[0][v]+m.sbox[1][y];return w=w^m.sbox[2][S],w=w+m.sbox[3][b],w}function d(m,x,v){let y=x,S=v,b;for(let w=0;w<a;++w)y=y^m.pbox[w],S=f(m,y)^S,b=y,y=S,S=b;return b=y,y=S,S=b,S=S^m.pbox[a],y=y^m.pbox[a+1],{left:y,right:S}}function h(m,x,v){let y=x,S=v,b;for(let w=a+1;w>1;--w)y=y^m.pbox[w],S=f(m,y)^S,b=y,y=S,S=b;return b=y,y=S,S=b,S=S^m.pbox[1],y=y^m.pbox[0],{left:y,right:S}}function p(m,x,v){for(let C=0;C<4;C++){m.sbox[C]=[];for(let k=0;k<256;k++)m.sbox[C][k]=c[C][k]}let y=0;for(let C=0;C<a+2;C++)m.pbox[C]=l[C]^x[y],y++,y>=v&&(y=0);let S=0,b=0,w=0;for(let C=0;C<a+2;C+=2)w=d(m,S,b),S=w.left,b=w.right,m.pbox[C]=S,m.pbox[C+1]=b;for(let C=0;C<4;C++)for(let k=0;k<256;k+=2)w=d(m,S,b),S=w.left,b=w.right,m.sbox[C][k]=S,m.sbox[C][k+1]=b;return!0}var O=s.Blowfish=o.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var m=this._keyPriorReset=this._key,x=m.words,v=m.sigBytes/4;p(u,x,v)}},encryptBlock:function(m,x){var v=d(u,m[x],m[x+1]);m[x]=v.left,m[x+1]=v.right},decryptBlock:function(m,x){var v=h(u,m[x],m[x+1]);m[x]=v.left,m[x+1]=v.right},blockSize:64/32,keySize:128/32,ivSize:64/32});r.Blowfish=o._createHelper(O)}(),n.Blowfish})}(vg)),vg.exports}(function(t,e){(function(n,r,i){t.exports=r(He(),rh(),XG(),GG(),fs(),YG(),ds(),WT(),Dx(),qG(),VT(),UG(),HG(),JG(),Qx(),KG(),Io(),fn(),eY(),tY(),nY(),rY(),iY(),oY(),sY(),aY(),lY(),cY(),uY(),fY(),dY(),hY(),pY(),gY(),mY())})(Fe,function(n){return n})})(ZT);var dC=ZT.exports;function OY(t){const e=t.substring(7).split(", "),n={};for(const r of e){const[i,o]=r.split("=");n[i]=o.replace(/"/g,"")}return n}function zT(t,e){const{url:n,body:{content:r},method:i,security:{securities:o,selectedSecuritySchemeId:s}}=t,a=o.filter(w=>w.securitySchemeId===s||!s).findLast(w=>w.securityType===K.DigestAuth);if(!a)return"";const{username:l,password:c,realm:u,nonce:f,cnonce:d,algorithm:h,qop:p,nc:O,opaque:m}=a[K.DigestAuth],x=Ge(l,e),{pathname:v,search:y}=new URL(Ge(n,e)),S=y?`${v}${y}`:v,b=xY({username:x,password:Ge(c,e),uri:S,realm:u,nonce:f,cnonce:d,algorithm:h,qop:p,nc:O,opaque:m,method:i,bodyContent:r});return`Digest username="${x}", realm="${u}", nonce="${f}", uri="${S}", qop=${p}, nc=${O}, cnonce="${d}", response="${b}", algorithm=${h}${m?`, opaque="${m}"`:""}`}function xY(t){const{username:e,password:n,realm:r,nonce:i,cnonce:o,algorithm:s,qop:a,nc:l,uri:c,method:u,bodyContent:f}=t,d=vY(s),h=s!=null&&s.endsWith("-sess")?d(`${d(`${e}:${r}:${n}`)}:${i}:${o}`):d(`${e}:${r}:${n}`),p=a!=null&&a.includes("auth-int")?d(`${u}:${c}:${d(f)}`):d(`${u}:${c}`);return d(`${h}:${i}:${l}:${o}:${a}:${p}`).toString()}function vY(t){switch(t==null?void 0:t.replace("-sess","")){case"SHA-256":return dC.SHA256;default:return dC.MD5}}function yY(t){try{const n=new URL(t).hostname;return n==="localhost"||n==="127.0.0.1"}catch{return!1}}function LT(t,e){return e.find(({id:n})=>n===t)||e[0]}async function bY(t){var f,d,h,p;const{request:e,response:n,requestError:r,corsProxyUrl:i,isProcessingRequest:o,mockServer:s,requestController:a,certificates:l}=t,c=yn(e.value);o.set(!0),(d=(f=a.get())==null?void 0:f.abort)==null||d.call(f),a.set(new AbortController);const u=(h=a.get())==null?void 0:h.signal;try{const{method:O,url:m}=e.get(),x=m.split("?")[0],v=Zt(x,t),y=(p=s.get())==null?void 0:p.url,S=y?v.startsWith(location.origin+y):!1,b=i.get()?i.get():"",w=IY(t),k=`${S||yY(v)?"":b}${v}${w?`?${w}`:""}`;await wY(t,k,S,u);const I=GT(t),A=Bx(t),E=Date.now(),{clientCert:$,clientKey:R}=SY(x,l.get()?l.get():[]),M=await Yo(k,{signal:u,method:O,headers:I,body:A||void 0,mode:S||UT(k)?"same-origin":"cors",clientCert:$,clientKey:R}),Q=Date.now()-E;r.set(null),n.set(await ZG(M,Q));const Z=yn(n.value);hC(c,Z,t.history)}catch(O){if(n.set(null),O.name==="AbortError")return;r.set(O.message);const m=yn(n.value);hC(c,m,t.history)}finally{o.set(!1)}}function SY(t,e){let n=Pw(t);const r=e.find(({host:i,port:o})=>Pw(`https://${i}:${o}`)===n);return{clientCert:r==null?void 0:r.crtFilePath,clientKey:r==null?void 0:r.keyFilePath}}async function wY(t,e,n,r){const{request:i}=t.get(),{method:o,security:{selectedSecuritySchemeId:s}}=i,{request:{security:{securities:a}}}=t,l=Na(a,s).findLast(c=>c.securityType.get()===K.DigestAuth);if(l){const c=await Yo(e,{signal:r,method:o,mode:n||UT(e)?"same-origin":"cors"}),u=OY(c.headers.get("WWW-Authenticate")||"");l[K.DigestAuth].merge({nonce:u.nonce,realm:u.realm,qop:u.qop,algorithm:u.algorithm,opaque:u.opaque,cnonce:crypto.randomUUID(),nc:"00000001"})}}function hC(t,e,n){n.merge([{date:new Date().getTime(),request:t,response:e}])}function CY(t){const{request:{security:{selectedSecuritySchemeId:e,securities:n}}}=t;return[...Na(n,e.get())].reduce((o,s)=>{const{securityType:a,...l}=s.get();if(a===K.BasicAuth){const u=l[K.BasicAuth];o.Authorization="Basic "+btoa(`${Zt(u.username,t)}:${Zt(u.password,t)}`)}if(a===K.DigestAuth){const{selectedEnvironmentId:u,environments:f}=t.get(),d=LT(u||"",f);o.Authorization=zT(t.request.get(),d.variables)}if(a===K.JWT){const u=l[K.JWT];o.Authorization="Bearer "+u.token}if(a===K.OAuth2){const{grantType:u}=l[K.OAuth2],{accessToken:f}=l[K.OAuth2][u];o.Authorization="Bearer "+f}if(a===K.OpenIDConnect){const{grantType:u}=l[K.OpenIDConnect],{accessToken:f}=l[K.OpenIDConnect][u];o.Authorization="Bearer "+f}const c=l[K.APIKey];return a===K.APIKey&&c.location===Aa.Header&&c.name&&c.key&&(o[c.name]=c.key),o},{})}function kY(t){var x,v,y;const{request:{method:e,url:n,body:r,headers:i,cookies:o,queryParameters:s},operation:a}=t,l=n.split("?")[0].split("{{server}}")[1];if(!a)return!1;const c=Tx(a),u=!n.startsWith("{{server}}")||l!==nh(a.path),f=c.method!==e,d=((x=a.body)==null?void 0:x.mediaTypes)&&((y=(v=a.body)==null?void 0:v.mediaTypes)==null?void 0:y[r.type])===void 0,h=c.headers&&!c.headers.every(S=>i.some(b=>b.key===S.key)),p=c.cookies&&!c.cookies.every(S=>o.some(b=>b.key===S.key)),O=c.queryParameters&&!c.queryParameters.every(S=>s.some(b=>b.key===S.key)),m=$G(t);return!u&&!f&&!d&&!h&&!p&&!O&&!m}function Bx(t){const{body:e,method:n}=t.get().request;if(n==="GET"||n==="HEAD"||n==="OPTIONS")return null;try{switch(e.type){case"JSON":return structuredClone(Zt(e.content,t));case"multipart/form-data":return EY(t);case"application/x-www-form-urlencoded":return PY(t);case"application/octet-stream":return AY(e.binary);default:return Zt(e.content,t)}}catch(r){console.error(r)}}function AY(t){return t||null}function PY(t){const{body:e}=t.get().request,n=new URLSearchParams;return Sc(e.formData[ot["application/x-www-form-urlencoded"]]).forEach(r=>{const i=Zt(r.value,t);n.append(Zt(r.key,t),i)}),n}function EY(t){const{body:e}=t.get().request,n=new FormData;return Sc(e.formData[ot.FormData]).forEach(({type:r,files:i,value:o,key:s})=>{const a=Zt(s,t);if(r==="file"&&i){if(i instanceof FileList)for(const l of i)n.append(a,l)}else if(o){const l=Zt(o,t);return n.append(a,l)}}),n}function XT(t){const{request:{security:{selectedSecuritySchemeId:e,securities:n}}}=t,r=Na(n,e.get()),{request:{queryParameters:i}}=t.get(),o=[...r].map(s=>{const{[K.APIKey]:a}=s.get();return a.location===Aa.Query?qT(a):null}).filter(Boolean);return Sc([...i,...o])}function IY(t){return XT(t).map(n=>{const r=Zt(n.value,t);return`${Zt(n.key,t)}=${r}`}).join("&")}function TY(t){return XT(t).reduce((n,r)=>{const i=Zt(r.value,t),o=Zt(r.key,t);return{...n,[o]:i}},{})}function $Y(t){const e=t.indexOf("?");if(e===-1)return;const n=new URLSearchParams(t.slice(e+1)),r=[];for(const[i,o]of n.entries())r.push({id:crypto.randomUUID(),active:!0,key:i,value:o});return r}function GT(t){const e=CY(t),n=DY(t),r=jY(t),{headers:i}=t.get().request,s={...Sc(i).reduce((l,c)=>(l[c.key]=c.value,l),{}),...e,...n||{},...r&&{Cookie:r,"X-Redocly-Cookie":r}};return Object.entries(s).reduce((l,[c,u])=>{const f=Zt(c,t),d=Zt(u,t);return l[f]=d,l},{})}function jY(t){return YT(t).map(n=>{const r=Zt(n.value,t);return`${Zt(n.key,t)}=${r}`}).join("; ")}function RY(t){return YT(t).reduce((n,r)=>{const i=Zt(r.value,t);return{...n,[Zt(r.key,t)]:i}},{})}function YT(t){const{request:{security:{selectedSecuritySchemeId:e,securities:n}}}=t,r=Na(n,e.get()),{request:{cookies:i}}=t.get(),o=[...r].map(s=>{const{[K.APIKey]:a}=s.get();return a.location===Aa.Cookie?qT(a):null}).filter(Boolean);return Sc([...i,...o])}function Sc(t){return t.filter(e=>e.active&&e.key&&(e.value||(e==null?void 0:e.files)))}function DY(t){const{body:e}=t.get().request;if(!(!Bx(t)||e.type==="binary"))return{"Content-Type":e.type}}function qT(t){return{key:t.name,value:t.key,active:!0}}function _x(t){var e;return(e=t.environments.find(n=>n.get().id===t.selectedEnvironmentId.get()))==null?void 0:e.get()}function Zt(t,e){var r;const{environments:n}=e.get();return Ge(t,((r=_x(e))==null?void 0:r.variables)||n[0].variables)}function QY(t,e){var r;const{environments:n}=e.get();return $4(t,((r=_x(e))==null?void 0:r.variables)||n[0].variables)}function UT(t){const e=document.createElement("a");return e.href=t,e.origin===window.location.origin}const ih=CG({});let pC=null;function HT(t){pC!==t&&(pC=t,ih.configure({validate:!0,schemas:[{uri:"stub://test",fileMatch:["*"],schema:t}]}))}function JT(t){const e=Dm.create("stub.json","json",0,t),n=ih.parseJSONDocument(e);return{textDoc:e,jsonDoc:n}}const KT=ln.define({create(){},update(t){return t}}),e$=t=>t.field(KT,!1),BY=({state:t})=>{var n,r,i,o;const e=(o=(i=(r=(n=t.operation.get({noproxy:!0,stealth:!0}))==null?void 0:n.body)==null?void 0:r.mediaTypes)==null?void 0:i[ot.JSON])==null?void 0:o.schema;return[KT.init(()=>({schema:yn(e||{}),state:t}))]};function _Y(){return async t=>{const{schema:e,state:n}=e$(t.state)||{};if(!e)return[];HT(e);const r=t.state.doc,{content:i,sourceMap:o}=QY(r.toString(),n),{textDoc:s,jsonDoc:a}=JT(i),l=await ih.doValidation(s,a);return l==null?void 0:l.map(c=>{const u=WY(s,c.range.start,o),f=u<0?0:u;return{from:f,to:f+s.offsetAt(c.range.end)-s.offsetAt(c.range.start),message:c.message,severity:FY[c.severity||3]}})}}const MY=Si.highest($a.of([{key:"Tab",run:t=>PI(t)}]));function NY(){return async function(e){const n={from:e.pos,to:e.pos,options:[],filter:!1},{schema:r}=e$(e.state);if(!r)return n;HT(r);const i=e.state.doc,o=ZY.bind(null,i),{textDoc:s,jsonDoc:a}=JT(i.toString()),l=e.state.doc.lineAt(e.pos),c=l.number-1,u=e.pos-l.from,f=await ih.doComplete(s,{line:c,character:u},a);if(!f)return n;const d=e.state.sliceDoc(l.from,e.pos);if(d.trim().endsWith(",")||VY(d))return n;n.options=f.items.map(O=>({label:O.label,info:O.documentation,apply:m=>{if(!O.textEdit||!("range"in O.textEdit))return;const x=O.textEdit.range,v=O.textEdit.newText.search(/(\$1|\${1:.*?})/);let y=O.textEdit.newText.replace(/(\$1|\${1:.*?})/,"");const S=v===-1?0:v-y.length;m.dispatch({changes:{from:o(x.start),to:o(x.end),insert:y}});const b=y.length-(x.end.character-x.start.character);m.dispatch({selection:ie.single(o(x.end)+b+S)})}}))||[];const h=e.state.wordAt(e.pos),p=h!=null&&h.from?e.state.sliceDoc(h==null?void 0:h.from,h==null?void 0:h.to).toLowerCase():"";return p&&(n.options=n.options.filter(O=>O.label.toLowerCase().replace(/^"/,"").startsWith(p))),n}}const FY={1:"error",2:"warning",3:"info",4:"hint"};function ZY(t,e){return t.line(e.line+1).from+e.character}function WY(t,e,n){let r=t.offsetAt(e);for(const i of n)r>i.pos&&(r-=i.offset);return r}function VY(t){try{return JSON.parse(`{${t}}`),!0}catch{return!1}}function gC(t){return new iE({regexp:new RegExp(`${ss}(.*?)${as}`,"g"),decoration:e=>{const{selectedEnvironment:n}=t,r=e[1],o=n.get().variables.find(l=>l.name===r),s=!(o!=null&&o.value),a=r===QO;return we.mark({attributes:{style:`color: var(--replay-${a?"server":s?"undefined":"defined"}-variable-color);
822
- background-color: var(--replay-${a?"server":s?"undefined":"defined"}-variable-bg-color);`}})}})}const Il=t=>Bt.fromClass(class{constructor(e){ov(this,"decorations");const n=gC(t);this.decorations=n.createDeco(e)}update(e){const n=gC(t);this.decorations=n.updateDeco(e,this.decorations)}},{decorations:e=>e.decorations}),hd={[ot.Text]:{name:"Text",extensions:[de.lineWrapping],stateExtensions:[Il]},[ot.JSON]:{name:"JSON",extensions:[ez(),x7(_Y(),{delay:300,needsRefresh:t=>t.transactions.some(e=>e.effects.some(n=>n.is(WI)))}),zI.data.of({autocomplete:NY()}),MY],stateExtensions:[Il,BY]},[ot.XML]:{name:"XML",extensions:[wX()],stateExtensions:[Il]}},zY={[ot.Image]:{name:"Image",extensions:[],stateExtensions:[Il]}},LY={[ot.HTML]:{name:"HTML",extensions:[KL()],stateExtensions:[Il]}},Au={...hd,...zY,...LY},t$={[ot.FormData]:{name:"form-data",extensions:void 0},[ot["application/x-www-form-urlencoded"]]:{name:"x-www-form-urlencoded",extensions:void 0}},n$={[ot.Binary]:{name:"Binary",extensions:void 0}},is={...hd,...t$,...n$},r$=Object.keys(t$),i$=Object.keys(n$);function mC(t){return new TextEncoder().encode(t)}function OC(t){return btoa(t).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function XY(t){return btoa(String.fromCharCode(...new Uint8Array(t))).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function GY(t){const e=new ArrayBuffer(t.length),n=new Uint8Array(e);for(let r=0,i=t.length;r<i;r++)n[r]=t.charCodeAt(r);return e}var zm=(t=>(t.HS256="HS256",t.HS384="HS384",t.HS512="HS512",t.RS256="RS256",t.ES256="ES256",t))(zm||{});function xC(t){switch(t){case"HS256":return{name:"HMAC",hash:{name:"SHA-256"}};case"HS384":return{name:"HMAC",hash:{name:"SHA-384"}};case"HS512":return{name:"HMAC",hash:{name:"SHA-512"}};case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error(`Algorithm not implemented: ${t}`)}}function o$(t){return t==="RS256"||t==="ES256"}async function YY(t,e,n,r=crypto.subtle){if(!r)throw new Error("`SubtleCrypto` interface is required for JWT signing.");e.startsWith("-----BEGIN")&&(e=e.replace(/^-----(BEGIN|END)[\w\s]+-----$/gm,"").replace(/[^A-Za-z0-9+\/=]/gm,""),e=atob(e));const i=o$(n);let o;try{o=await r.importKey(i?"pkcs8":"raw",i?GY(e):mC(e),xC(n),!1,["sign"])}catch(s){throw process.env.NODE_ENV==="test"?s:new Error("Error importing private key")}return await r.sign(xC(n),o,mC(t))}async function qY(t,e,n,r){const i={...t,iat:Math.floor(Date.now()/1e3),exp:Math.floor(Date.now()/1e3)+3540},o=OC(JSON.stringify(i)),a=`${OC(JSON.stringify({alg:n,typ:"JWT",kid:r}))}.${o}`,l=XY(await YY(a,e,n));return[a,l].join(".")}function UY({isOpen:t,onClose:e,onSign:n}){const[r,i]=j.useState(""),[o,s]=j.useState(zm.HS256),[a,l]=j.useState(""),[c,u]=j.useState(""),[f,d]=j.useState(""),h=async()=>{try{const v=JSON.parse(r),y=await qY(v,a,o,c);d(""),n(y)}catch(v){d(`Error signing JWT: ${v.message}`)}},p=j.useMemo(()=>Object.keys(zm).map(v=>({label:v,value:v})),[]),O=o$(o),m={bracketMatching:!0,closeBrackets:!0,tabSize:2,foldGutter:!1,lineNumbers:!1,lintKeymap:!0,drawSelection:!1},x=g.jsxs(eq,{children:[g.jsxs(ol,{children:[g.jsx(gl,{id:"signature-type-label",children:"Signature Type"}),g.jsx(JY,{ariaLabeledBy:"signature-type-label",dataTestId:"jwt-signature-type-select",options:p,value:p.find(v=>v.value===o),onChange:({value:v})=>s(v)})]}),g.jsxs(ol,{children:[g.jsx(gl,{id:"sign-key",required:!0,children:O?"Private Key":"Secret"}),g.jsx(vC,{children:g.jsx(ed,{"aria-labelledby":"sign-key",dataTestId:"sign-key-codemirror",placeholder:O?"Enter private key":"Enter secret",value:a,maxHeight:"170px",minHeight:"170px",onChange:v=>l(v),extensions:is[ot.Text].extensions,basicSetup:m})})]}),g.jsxs(ol,{children:[g.jsx(gl,{htmlFor:"key-id",children:"Key ID"}),g.jsx(s$,{"data-testid":"key-id",id:"key-id",type:"text",value:c,onChange:v=>u(v.target.value),placeholder:"Enter public key identifier"})]}),g.jsxs(ol,{children:[g.jsx(gl,{id:"jwt-payload",required:!0,children:"JWT Payload"}),g.jsx(vC,{children:g.jsx(ed,{"aria-labelledby":"jwt-payload",dataTestId:"jwt-payload-codemirror",placeholder:"Enter JWT payload as JSON",value:r,maxHeight:"130px",minHeight:"130px",onChange:v=>i(v),extensions:is[ot.JSON].extensions,basicSetup:m})})]}),f&&g.jsx(ol,{children:g.jsx(tq,{children:f})}),g.jsxs(KY,{children:[g.jsx(_.Button,{variant:"outlined",onClick:e,children:"Cancel"}),g.jsx(_.Button,{variant:"primary",disabled:!a||!r,onClick:h,children:"Sign JWT"})]})]});return g.jsx(HY,{isOpen:t,onClose:e,title:"Sign JWT",content:x})}const HY=T(_l)`
821
+ */return n.mode.CTRGladman=function(){var r=n.lib.BlockCipherMode.extend();function i(a){if((a>>24&255)===255){var l=a>>16&255,c=a>>8&255,u=a&255;l===255?(l=0,c===255?(c=0,u===255?u=0:++u):++c):++l,a=0,a+=l<<16,a+=c<<8,a+=u}else a+=1<<24;return a}function o(a){return(a[0]=i(a[0]))===0&&(a[1]=i(a[1])),a}var s=r.Encryptor=r.extend({processBlock:function(a,l){var c=this._cipher,u=c.blockSize,f=this._iv,d=this._counter;f&&(d=this._counter=f.slice(0),this._iv=void 0),o(d);var h=d.slice(0);c.encryptBlock(h,0);for(var p=0;p<u;p++)a[l+p]^=h[p]}});return r.Decryptor=s,r}(),n.mode.CTRGladman})}(og)),og.exports}var sg={exports:{}},Jw;function rY(){return Jw||(Jw=1,function(t,e){(function(n,r,i){t.exports=r(He(),fn())})(Fe,function(n){return n.mode.OFB=function(){var r=n.lib.BlockCipherMode.extend(),i=r.Encryptor=r.extend({processBlock:function(o,s){var a=this._cipher,l=a.blockSize,c=this._iv,u=this._keystream;c&&(u=this._keystream=c.slice(0),this._iv=void 0),a.encryptBlock(u,0);for(var f=0;f<l;f++)o[s+f]^=u[f]}});return r.Decryptor=i,r}(),n.mode.OFB})}(sg)),sg.exports}var ag={exports:{}},Kw;function iY(){return Kw||(Kw=1,function(t,e){(function(n,r,i){t.exports=r(He(),fn())})(Fe,function(n){return n.mode.ECB=function(){var r=n.lib.BlockCipherMode.extend();return r.Encryptor=r.extend({processBlock:function(i,o){this._cipher.encryptBlock(i,o)}}),r.Decryptor=r.extend({processBlock:function(i,o){this._cipher.decryptBlock(i,o)}}),r}(),n.mode.ECB})}(ag)),ag.exports}var lg={exports:{}},eC;function oY(){return eC||(eC=1,function(t,e){(function(n,r,i){t.exports=r(He(),fn())})(Fe,function(n){return n.pad.AnsiX923={pad:function(r,i){var o=r.sigBytes,s=i*4,a=s-o%s,l=o+a-1;r.clamp(),r.words[l>>>2]|=a<<24-l%4*8,r.sigBytes+=a},unpad:function(r){var i=r.words[r.sigBytes-1>>>2]&255;r.sigBytes-=i}},n.pad.Ansix923})}(lg)),lg.exports}var cg={exports:{}},tC;function sY(){return tC||(tC=1,function(t,e){(function(n,r,i){t.exports=r(He(),fn())})(Fe,function(n){return n.pad.Iso10126={pad:function(r,i){var o=i*4,s=o-r.sigBytes%o;r.concat(n.lib.WordArray.random(s-1)).concat(n.lib.WordArray.create([s<<24],1))},unpad:function(r){var i=r.words[r.sigBytes-1>>>2]&255;r.sigBytes-=i}},n.pad.Iso10126})}(cg)),cg.exports}var ug={exports:{}},nC;function aY(){return nC||(nC=1,function(t,e){(function(n,r,i){t.exports=r(He(),fn())})(Fe,function(n){return n.pad.Iso97971={pad:function(r,i){r.concat(n.lib.WordArray.create([2147483648],1)),n.pad.ZeroPadding.pad(r,i)},unpad:function(r){n.pad.ZeroPadding.unpad(r),r.sigBytes--}},n.pad.Iso97971})}(ug)),ug.exports}var fg={exports:{}},rC;function lY(){return rC||(rC=1,function(t,e){(function(n,r,i){t.exports=r(He(),fn())})(Fe,function(n){return n.pad.ZeroPadding={pad:function(r,i){var o=i*4;r.clamp(),r.sigBytes+=o-(r.sigBytes%o||o)},unpad:function(r){for(var i=r.words,o=r.sigBytes-1,o=r.sigBytes-1;o>=0;o--)if(i[o>>>2]>>>24-o%4*8&255){r.sigBytes=o+1;break}}},n.pad.ZeroPadding})}(fg)),fg.exports}var dg={exports:{}},iC;function cY(){return iC||(iC=1,function(t,e){(function(n,r,i){t.exports=r(He(),fn())})(Fe,function(n){return n.pad.NoPadding={pad:function(){},unpad:function(){}},n.pad.NoPadding})}(dg)),dg.exports}var hg={exports:{}},oC;function uY(){return oC||(oC=1,function(t,e){(function(n,r,i){t.exports=r(He(),fn())})(Fe,function(n){return function(r){var i=n,o=i.lib,s=o.CipherParams,a=i.enc,l=a.Hex,c=i.format;c.Hex={stringify:function(u){return u.ciphertext.toString(l)},parse:function(u){var f=l.parse(u);return s.create({ciphertext:f})}}}(),n.format.Hex})}(hg)),hg.exports}var pg={exports:{}},sC;function fY(){return sC||(sC=1,function(t,e){(function(n,r,i){t.exports=r(He(),ds(),hs(),Io(),fn())})(Fe,function(n){return function(){var r=n,i=r.lib,o=i.BlockCipher,s=r.algo,a=[],l=[],c=[],u=[],f=[],d=[],h=[],p=[],O=[],m=[];(function(){for(var y=[],S=0;S<256;S++)S<128?y[S]=S<<1:y[S]=S<<1^283;for(var b=0,w=0,S=0;S<256;S++){var C=w^w<<1^w<<2^w<<3^w<<4;C=C>>>8^C&255^99,a[b]=C,l[C]=b;var k=y[b],I=y[k],A=y[I],E=y[C]*257^C*16843008;c[b]=E<<24|E>>>8,u[b]=E<<16|E>>>16,f[b]=E<<8|E>>>24,d[b]=E;var E=A*16843009^I*65537^k*257^b*16843008;h[C]=E<<24|E>>>8,p[C]=E<<16|E>>>16,O[C]=E<<8|E>>>24,m[C]=E,b?(b=k^y[y[y[A^k]]],w^=y[y[w]]):b=w=1}})();var x=[0,1,2,4,8,16,32,64,128,27,54],v=s.AES=o.extend({_doReset:function(){var y;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var S=this._keyPriorReset=this._key,b=S.words,w=S.sigBytes/4,C=this._nRounds=w+6,k=(C+1)*4,I=this._keySchedule=[],A=0;A<k;A++)A<w?I[A]=b[A]:(y=I[A-1],A%w?w>6&&A%w==4&&(y=a[y>>>24]<<24|a[y>>>16&255]<<16|a[y>>>8&255]<<8|a[y&255]):(y=y<<8|y>>>24,y=a[y>>>24]<<24|a[y>>>16&255]<<16|a[y>>>8&255]<<8|a[y&255],y^=x[A/w|0]<<24),I[A]=I[A-w]^y);for(var E=this._invKeySchedule=[],$=0;$<k;$++){var A=k-$;if($%4)var y=I[A];else var y=I[A-4];$<4||A<=4?E[$]=y:E[$]=h[a[y>>>24]]^p[a[y>>>16&255]]^O[a[y>>>8&255]]^m[a[y&255]]}}},encryptBlock:function(y,S){this._doCryptBlock(y,S,this._keySchedule,c,u,f,d,a)},decryptBlock:function(y,S){var b=y[S+1];y[S+1]=y[S+3],y[S+3]=b,this._doCryptBlock(y,S,this._invKeySchedule,h,p,O,m,l);var b=y[S+1];y[S+1]=y[S+3],y[S+3]=b},_doCryptBlock:function(y,S,b,w,C,k,I,A){for(var E=this._nRounds,$=y[S]^b[0],R=y[S+1]^b[1],M=y[S+2]^b[2],Q=y[S+3]^b[3],Z=4,G=1;G<E;G++){var V=w[$>>>24]^C[R>>>16&255]^k[M>>>8&255]^I[Q&255]^b[Z++],ee=w[R>>>24]^C[M>>>16&255]^k[Q>>>8&255]^I[$&255]^b[Z++],Y=w[M>>>24]^C[Q>>>16&255]^k[$>>>8&255]^I[R&255]^b[Z++],z=w[Q>>>24]^C[$>>>16&255]^k[R>>>8&255]^I[M&255]^b[Z++];$=V,R=ee,M=Y,Q=z}var V=(A[$>>>24]<<24|A[R>>>16&255]<<16|A[M>>>8&255]<<8|A[Q&255])^b[Z++],ee=(A[R>>>24]<<24|A[M>>>16&255]<<16|A[Q>>>8&255]<<8|A[$&255])^b[Z++],Y=(A[M>>>24]<<24|A[Q>>>16&255]<<16|A[$>>>8&255]<<8|A[R&255])^b[Z++],z=(A[Q>>>24]<<24|A[$>>>16&255]<<16|A[R>>>8&255]<<8|A[M&255])^b[Z++];y[S]=V,y[S+1]=ee,y[S+2]=Y,y[S+3]=z},keySize:256/32});r.AES=o._createHelper(v)}(),n.AES})}(pg)),pg.exports}var gg={exports:{}},aC;function dY(){return aC||(aC=1,function(t,e){(function(n,r,i){t.exports=r(He(),ds(),hs(),Io(),fn())})(Fe,function(n){return function(){var r=n,i=r.lib,o=i.WordArray,s=i.BlockCipher,a=r.algo,l=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],c=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],u=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],f=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],d=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],h=a.DES=s.extend({_doReset:function(){for(var x=this._key,v=x.words,y=[],S=0;S<56;S++){var b=l[S]-1;y[S]=v[b>>>5]>>>31-b%32&1}for(var w=this._subKeys=[],C=0;C<16;C++){for(var k=w[C]=[],I=u[C],S=0;S<24;S++)k[S/6|0]|=y[(c[S]-1+I)%28]<<31-S%6,k[4+(S/6|0)]|=y[28+(c[S+24]-1+I)%28]<<31-S%6;k[0]=k[0]<<1|k[0]>>>31;for(var S=1;S<7;S++)k[S]=k[S]>>>(S-1)*4+3;k[7]=k[7]<<5|k[7]>>>27}for(var A=this._invSubKeys=[],S=0;S<16;S++)A[S]=w[15-S]},encryptBlock:function(x,v){this._doCryptBlock(x,v,this._subKeys)},decryptBlock:function(x,v){this._doCryptBlock(x,v,this._invSubKeys)},_doCryptBlock:function(x,v,y){this._lBlock=x[v],this._rBlock=x[v+1],p.call(this,4,252645135),p.call(this,16,65535),O.call(this,2,858993459),O.call(this,8,16711935),p.call(this,1,1431655765);for(var S=0;S<16;S++){for(var b=y[S],w=this._lBlock,C=this._rBlock,k=0,I=0;I<8;I++)k|=f[I][((C^b[I])&d[I])>>>0];this._lBlock=C,this._rBlock=w^k}var A=this._lBlock;this._lBlock=this._rBlock,this._rBlock=A,p.call(this,1,1431655765),O.call(this,8,16711935),O.call(this,2,858993459),p.call(this,16,65535),p.call(this,4,252645135),x[v]=this._lBlock,x[v+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function p(x,v){var y=(this._lBlock>>>x^this._rBlock)&v;this._rBlock^=y,this._lBlock^=y<<x}function O(x,v){var y=(this._rBlock>>>x^this._lBlock)&v;this._lBlock^=y,this._rBlock^=y<<x}r.DES=s._createHelper(h);var m=a.TripleDES=s.extend({_doReset:function(){var x=this._key,v=x.words;if(v.length!==2&&v.length!==4&&v.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var y=v.slice(0,2),S=v.length<4?v.slice(0,2):v.slice(2,4),b=v.length<6?v.slice(0,2):v.slice(4,6);this._des1=h.createEncryptor(o.create(y)),this._des2=h.createEncryptor(o.create(S)),this._des3=h.createEncryptor(o.create(b))},encryptBlock:function(x,v){this._des1.encryptBlock(x,v),this._des2.decryptBlock(x,v),this._des3.encryptBlock(x,v)},decryptBlock:function(x,v){this._des3.decryptBlock(x,v),this._des2.encryptBlock(x,v),this._des1.decryptBlock(x,v)},keySize:192/32,ivSize:64/32,blockSize:64/32});r.TripleDES=s._createHelper(m)}(),n.TripleDES})}(gg)),gg.exports}var mg={exports:{}},lC;function hY(){return lC||(lC=1,function(t,e){(function(n,r,i){t.exports=r(He(),ds(),hs(),Io(),fn())})(Fe,function(n){return function(){var r=n,i=r.lib,o=i.StreamCipher,s=r.algo,a=s.RC4=o.extend({_doReset:function(){for(var u=this._key,f=u.words,d=u.sigBytes,h=this._S=[],p=0;p<256;p++)h[p]=p;for(var p=0,O=0;p<256;p++){var m=p%d,x=f[m>>>2]>>>24-m%4*8&255;O=(O+h[p]+x)%256;var v=h[p];h[p]=h[O],h[O]=v}this._i=this._j=0},_doProcessBlock:function(u,f){u[f]^=l.call(this)},keySize:256/32,ivSize:0});function l(){for(var u=this._S,f=this._i,d=this._j,h=0,p=0;p<4;p++){f=(f+1)%256,d=(d+u[f])%256;var O=u[f];u[f]=u[d],u[d]=O,h|=u[(u[f]+u[d])%256]<<24-p*8}return this._i=f,this._j=d,h}r.RC4=o._createHelper(a);var c=s.RC4Drop=a.extend({cfg:a.cfg.extend({drop:192}),_doReset:function(){a._doReset.call(this);for(var u=this.cfg.drop;u>0;u--)l.call(this)}});r.RC4Drop=o._createHelper(c)}(),n.RC4})}(mg)),mg.exports}var Og={exports:{}},cC;function pY(){return cC||(cC=1,function(t,e){(function(n,r,i){t.exports=r(He(),ds(),hs(),Io(),fn())})(Fe,function(n){return function(){var r=n,i=r.lib,o=i.StreamCipher,s=r.algo,a=[],l=[],c=[],u=s.Rabbit=o.extend({_doReset:function(){for(var d=this._key.words,h=this.cfg.iv,p=0;p<4;p++)d[p]=(d[p]<<8|d[p]>>>24)&16711935|(d[p]<<24|d[p]>>>8)&4278255360;var O=this._X=[d[0],d[3]<<16|d[2]>>>16,d[1],d[0]<<16|d[3]>>>16,d[2],d[1]<<16|d[0]>>>16,d[3],d[2]<<16|d[1]>>>16],m=this._C=[d[2]<<16|d[2]>>>16,d[0]&4294901760|d[1]&65535,d[3]<<16|d[3]>>>16,d[1]&4294901760|d[2]&65535,d[0]<<16|d[0]>>>16,d[2]&4294901760|d[3]&65535,d[1]<<16|d[1]>>>16,d[3]&4294901760|d[0]&65535];this._b=0;for(var p=0;p<4;p++)f.call(this);for(var p=0;p<8;p++)m[p]^=O[p+4&7];if(h){var x=h.words,v=x[0],y=x[1],S=(v<<8|v>>>24)&16711935|(v<<24|v>>>8)&4278255360,b=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,w=S>>>16|b&4294901760,C=b<<16|S&65535;m[0]^=S,m[1]^=w,m[2]^=b,m[3]^=C,m[4]^=S,m[5]^=w,m[6]^=b,m[7]^=C;for(var p=0;p<4;p++)f.call(this)}},_doProcessBlock:function(d,h){var p=this._X;f.call(this),a[0]=p[0]^p[5]>>>16^p[3]<<16,a[1]=p[2]^p[7]>>>16^p[5]<<16,a[2]=p[4]^p[1]>>>16^p[7]<<16,a[3]=p[6]^p[3]>>>16^p[1]<<16;for(var O=0;O<4;O++)a[O]=(a[O]<<8|a[O]>>>24)&16711935|(a[O]<<24|a[O]>>>8)&4278255360,d[h+O]^=a[O]},blockSize:128/32,ivSize:64/32});function f(){for(var d=this._X,h=this._C,p=0;p<8;p++)l[p]=h[p];h[0]=h[0]+1295307597+this._b|0,h[1]=h[1]+3545052371+(h[0]>>>0<l[0]>>>0?1:0)|0,h[2]=h[2]+886263092+(h[1]>>>0<l[1]>>>0?1:0)|0,h[3]=h[3]+1295307597+(h[2]>>>0<l[2]>>>0?1:0)|0,h[4]=h[4]+3545052371+(h[3]>>>0<l[3]>>>0?1:0)|0,h[5]=h[5]+886263092+(h[4]>>>0<l[4]>>>0?1:0)|0,h[6]=h[6]+1295307597+(h[5]>>>0<l[5]>>>0?1:0)|0,h[7]=h[7]+3545052371+(h[6]>>>0<l[6]>>>0?1:0)|0,this._b=h[7]>>>0<l[7]>>>0?1:0;for(var p=0;p<8;p++){var O=d[p]+h[p],m=O&65535,x=O>>>16,v=((m*m>>>17)+m*x>>>15)+x*x,y=((O&4294901760)*O|0)+((O&65535)*O|0);c[p]=v^y}d[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,d[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,d[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,d[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,d[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,d[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,d[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,d[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}r.Rabbit=o._createHelper(u)}(),n.Rabbit})}(Og)),Og.exports}var xg={exports:{}},uC;function gY(){return uC||(uC=1,function(t,e){(function(n,r,i){t.exports=r(He(),ds(),hs(),Io(),fn())})(Fe,function(n){return function(){var r=n,i=r.lib,o=i.StreamCipher,s=r.algo,a=[],l=[],c=[],u=s.RabbitLegacy=o.extend({_doReset:function(){var d=this._key.words,h=this.cfg.iv,p=this._X=[d[0],d[3]<<16|d[2]>>>16,d[1],d[0]<<16|d[3]>>>16,d[2],d[1]<<16|d[0]>>>16,d[3],d[2]<<16|d[1]>>>16],O=this._C=[d[2]<<16|d[2]>>>16,d[0]&4294901760|d[1]&65535,d[3]<<16|d[3]>>>16,d[1]&4294901760|d[2]&65535,d[0]<<16|d[0]>>>16,d[2]&4294901760|d[3]&65535,d[1]<<16|d[1]>>>16,d[3]&4294901760|d[0]&65535];this._b=0;for(var m=0;m<4;m++)f.call(this);for(var m=0;m<8;m++)O[m]^=p[m+4&7];if(h){var x=h.words,v=x[0],y=x[1],S=(v<<8|v>>>24)&16711935|(v<<24|v>>>8)&4278255360,b=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,w=S>>>16|b&4294901760,C=b<<16|S&65535;O[0]^=S,O[1]^=w,O[2]^=b,O[3]^=C,O[4]^=S,O[5]^=w,O[6]^=b,O[7]^=C;for(var m=0;m<4;m++)f.call(this)}},_doProcessBlock:function(d,h){var p=this._X;f.call(this),a[0]=p[0]^p[5]>>>16^p[3]<<16,a[1]=p[2]^p[7]>>>16^p[5]<<16,a[2]=p[4]^p[1]>>>16^p[7]<<16,a[3]=p[6]^p[3]>>>16^p[1]<<16;for(var O=0;O<4;O++)a[O]=(a[O]<<8|a[O]>>>24)&16711935|(a[O]<<24|a[O]>>>8)&4278255360,d[h+O]^=a[O]},blockSize:128/32,ivSize:64/32});function f(){for(var d=this._X,h=this._C,p=0;p<8;p++)l[p]=h[p];h[0]=h[0]+1295307597+this._b|0,h[1]=h[1]+3545052371+(h[0]>>>0<l[0]>>>0?1:0)|0,h[2]=h[2]+886263092+(h[1]>>>0<l[1]>>>0?1:0)|0,h[3]=h[3]+1295307597+(h[2]>>>0<l[2]>>>0?1:0)|0,h[4]=h[4]+3545052371+(h[3]>>>0<l[3]>>>0?1:0)|0,h[5]=h[5]+886263092+(h[4]>>>0<l[4]>>>0?1:0)|0,h[6]=h[6]+1295307597+(h[5]>>>0<l[5]>>>0?1:0)|0,h[7]=h[7]+3545052371+(h[6]>>>0<l[6]>>>0?1:0)|0,this._b=h[7]>>>0<l[7]>>>0?1:0;for(var p=0;p<8;p++){var O=d[p]+h[p],m=O&65535,x=O>>>16,v=((m*m>>>17)+m*x>>>15)+x*x,y=((O&4294901760)*O|0)+((O&65535)*O|0);c[p]=v^y}d[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,d[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,d[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,d[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,d[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,d[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,d[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,d[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}r.RabbitLegacy=o._createHelper(u)}(),n.RabbitLegacy})}(xg)),xg.exports}var vg={exports:{}},fC;function mY(){return fC||(fC=1,function(t,e){(function(n,r,i){t.exports=r(He(),ds(),hs(),Io(),fn())})(Fe,function(n){return function(){var r=n,i=r.lib,o=i.BlockCipher,s=r.algo;const a=16,l=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],c=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var u={pbox:[],sbox:[]};function f(m,x){let v=x>>24&255,y=x>>16&255,S=x>>8&255,b=x&255,w=m.sbox[0][v]+m.sbox[1][y];return w=w^m.sbox[2][S],w=w+m.sbox[3][b],w}function d(m,x,v){let y=x,S=v,b;for(let w=0;w<a;++w)y=y^m.pbox[w],S=f(m,y)^S,b=y,y=S,S=b;return b=y,y=S,S=b,S=S^m.pbox[a],y=y^m.pbox[a+1],{left:y,right:S}}function h(m,x,v){let y=x,S=v,b;for(let w=a+1;w>1;--w)y=y^m.pbox[w],S=f(m,y)^S,b=y,y=S,S=b;return b=y,y=S,S=b,S=S^m.pbox[1],y=y^m.pbox[0],{left:y,right:S}}function p(m,x,v){for(let C=0;C<4;C++){m.sbox[C]=[];for(let k=0;k<256;k++)m.sbox[C][k]=c[C][k]}let y=0;for(let C=0;C<a+2;C++)m.pbox[C]=l[C]^x[y],y++,y>=v&&(y=0);let S=0,b=0,w=0;for(let C=0;C<a+2;C+=2)w=d(m,S,b),S=w.left,b=w.right,m.pbox[C]=S,m.pbox[C+1]=b;for(let C=0;C<4;C++)for(let k=0;k<256;k+=2)w=d(m,S,b),S=w.left,b=w.right,m.sbox[C][k]=S,m.sbox[C][k+1]=b;return!0}var O=s.Blowfish=o.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var m=this._keyPriorReset=this._key,x=m.words,v=m.sigBytes/4;p(u,x,v)}},encryptBlock:function(m,x){var v=d(u,m[x],m[x+1]);m[x]=v.left,m[x+1]=v.right},decryptBlock:function(m,x){var v=h(u,m[x],m[x+1]);m[x]=v.left,m[x+1]=v.right},blockSize:64/32,keySize:128/32,ivSize:64/32});r.Blowfish=o._createHelper(O)}(),n.Blowfish})}(vg)),vg.exports}(function(t,e){(function(n,r,i){t.exports=r(He(),rh(),XG(),GG(),ds(),YG(),hs(),WT(),Dx(),qG(),VT(),UG(),HG(),JG(),Qx(),KG(),Io(),fn(),eY(),tY(),nY(),rY(),iY(),oY(),sY(),aY(),lY(),cY(),uY(),fY(),dY(),hY(),pY(),gY(),mY())})(Fe,function(n){return n})})(ZT);var dC=ZT.exports;function OY(t){const e=t.substring(7).split(", "),n={};for(const r of e){const[i,o]=r.split("=");n[i]=o.replace(/"/g,"")}return n}function zT(t,e){const{url:n,body:{content:r},method:i,security:{securities:o,selectedSecuritySchemeId:s}}=t,a=o.filter(w=>w.securitySchemeId===s||!s).findLast(w=>w.securityType===K.DigestAuth);if(!a)return"";const{username:l,password:c,realm:u,nonce:f,cnonce:d,algorithm:h,qop:p,nc:O,opaque:m}=a[K.DigestAuth],x=Ge(l,e),{pathname:v,search:y}=new URL(Ge(n,e)),S=y?`${v}${y}`:v,b=xY({username:x,password:Ge(c,e),uri:S,realm:u,nonce:f,cnonce:d,algorithm:h,qop:p,nc:O,opaque:m,method:i,bodyContent:r});return`Digest username="${x}", realm="${u}", nonce="${f}", uri="${S}", qop=${p}, nc=${O}, cnonce="${d}", response="${b}", algorithm=${h}${m?`, opaque="${m}"`:""}`}function xY(t){const{username:e,password:n,realm:r,nonce:i,cnonce:o,algorithm:s,qop:a,nc:l,uri:c,method:u,bodyContent:f}=t,d=vY(s),h=s!=null&&s.endsWith("-sess")?d(`${d(`${e}:${r}:${n}`)}:${i}:${o}`):d(`${e}:${r}:${n}`),p=a!=null&&a.includes("auth-int")?d(`${u}:${c}:${d(f)}`):d(`${u}:${c}`);return d(`${h}:${i}:${l}:${o}:${a}:${p}`).toString()}function vY(t){switch(t==null?void 0:t.replace("-sess","")){case"SHA-256":return dC.SHA256;default:return dC.MD5}}function yY(t){try{const n=new URL(t).hostname;return n==="localhost"||n==="127.0.0.1"}catch{return!1}}function LT(t,e){return e.find(({id:n})=>n===t)||e[0]}async function bY(t){var f,d,h,p;const{request:e,response:n,requestError:r,corsProxyUrl:i,isProcessingRequest:o,mockServer:s,requestController:a,certificates:l}=t,c=yn(e.value);o.set(!0),(d=(f=a.get())==null?void 0:f.abort)==null||d.call(f),a.set(new AbortController);const u=(h=a.get())==null?void 0:h.signal;try{const{method:O,url:m}=e.get(),x=m.split("?")[0],v=Zt(x,t),y=(p=s.get())==null?void 0:p.url,S=y?v.startsWith(location.origin+y):!1,b=i.get()?i.get():"",w=IY(t),k=`${S||yY(v)?"":b}${v}${w?`?${w}`:""}`;await wY(t,k,S,u);const I=GT(t),A=Bx(t),E=Date.now(),{clientCert:$,clientKey:R}=SY(x,l.get()?l.get():[]),M=await qo(k,{signal:u,method:O,headers:I,body:A||void 0,mode:S||UT(k)?"same-origin":"cors",clientCert:$,clientKey:R}),Q=Date.now()-E;r.set(null),n.set(await ZG(M,Q));const Z=yn(n.value);hC(c,Z,t.history)}catch(O){if(n.set(null),O.name==="AbortError")return;r.set(O.message);const m=yn(n.value);hC(c,m,t.history)}finally{o.set(!1)}}function SY(t,e){let n=Pw(t);const r=e.find(({host:i,port:o})=>Pw(`https://${i}:${o}`)===n);return{clientCert:r==null?void 0:r.crtFilePath,clientKey:r==null?void 0:r.keyFilePath}}async function wY(t,e,n,r){const{request:i}=t.get(),{method:o,security:{selectedSecuritySchemeId:s}}=i,{request:{security:{securities:a}}}=t,l=Na(a,s).findLast(c=>c.securityType.get()===K.DigestAuth);if(l){const c=await qo(e,{signal:r,method:o,mode:n||UT(e)?"same-origin":"cors"}),u=OY(c.headers.get("WWW-Authenticate")||"");l[K.DigestAuth].merge({nonce:u.nonce,realm:u.realm,qop:u.qop,algorithm:u.algorithm,opaque:u.opaque,cnonce:crypto.randomUUID(),nc:"00000001"})}}function hC(t,e,n){n.merge([{date:new Date().getTime(),request:t,response:e}])}function CY(t){const{request:{security:{selectedSecuritySchemeId:e,securities:n}}}=t;return[...Na(n,e.get())].reduce((o,s)=>{const{securityType:a,...l}=s.get();if(a===K.BasicAuth){const u=l[K.BasicAuth];o.Authorization="Basic "+btoa(`${Zt(u.username,t)}:${Zt(u.password,t)}`)}if(a===K.DigestAuth){const{selectedEnvironmentId:u,environments:f}=t.get(),d=LT(u||"",f);o.Authorization=zT(t.request.get(),d.variables)}if(a===K.JWT){const u=l[K.JWT];o.Authorization="Bearer "+u.token}if(a===K.OAuth2){const{grantType:u}=l[K.OAuth2],{accessToken:f}=l[K.OAuth2][u];o.Authorization="Bearer "+f}if(a===K.OpenIDConnect){const{grantType:u}=l[K.OpenIDConnect],{accessToken:f}=l[K.OpenIDConnect][u];o.Authorization="Bearer "+f}const c=l[K.APIKey];return a===K.APIKey&&c.location===Aa.Header&&c.name&&c.key&&(o[c.name]=c.key),o},{})}function kY(t){var x,v,y;const{request:{method:e,url:n,body:r,headers:i,cookies:o,queryParameters:s},operation:a}=t,l=n.split("?")[0].split("{{server}}")[1];if(!a)return!1;const c=Tx(a),u=!n.startsWith("{{server}}")||l!==nh(a.path),f=c.method!==e,d=((x=a.body)==null?void 0:x.mediaTypes)&&((y=(v=a.body)==null?void 0:v.mediaTypes)==null?void 0:y[r.type])===void 0,h=c.headers&&!c.headers.every(S=>i.some(b=>b.key===S.key)),p=c.cookies&&!c.cookies.every(S=>o.some(b=>b.key===S.key)),O=c.queryParameters&&!c.queryParameters.every(S=>s.some(b=>b.key===S.key)),m=$G(t);return!u&&!f&&!d&&!h&&!p&&!O&&!m}function Bx(t){const{body:e,method:n}=t.get().request;if(n==="GET"||n==="HEAD"||n==="OPTIONS")return null;try{switch(e.type){case"JSON":return structuredClone(Zt(e.content,t));case"multipart/form-data":return EY(t);case"application/x-www-form-urlencoded":return PY(t);case"application/octet-stream":return AY(e.binary);default:return Zt(e.content,t)}}catch(r){console.error(r)}}function AY(t){return t||null}function PY(t){const{body:e}=t.get().request,n=new URLSearchParams;return Sc(e.formData[ot["application/x-www-form-urlencoded"]]).forEach(r=>{const i=Zt(r.value,t);n.append(Zt(r.key,t),i)}),n}function EY(t){const{body:e}=t.get().request,n=new FormData;return Sc(e.formData[ot.FormData]).forEach(({type:r,files:i,value:o,key:s})=>{const a=Zt(s,t);if(r==="file"&&i){if(i instanceof FileList)for(const l of i)n.append(a,l)}else if(o){const l=Zt(o,t);return n.append(a,l)}}),n}function XT(t){const{request:{security:{selectedSecuritySchemeId:e,securities:n}}}=t,r=Na(n,e.get()),{request:{queryParameters:i}}=t.get(),o=[...r].map(s=>{const{[K.APIKey]:a}=s.get();return a.location===Aa.Query?qT(a):null}).filter(Boolean);return Sc([...i,...o])}function IY(t){return XT(t).map(n=>{const r=Zt(n.value,t);return`${Zt(n.key,t)}=${r}`}).join("&")}function TY(t){return XT(t).reduce((n,r)=>{const i=Zt(r.value,t),o=Zt(r.key,t);return{...n,[o]:i}},{})}function $Y(t){const e=t.indexOf("?");if(e===-1)return;const n=new URLSearchParams(t.slice(e+1)),r=[];for(const[i,o]of n.entries())r.push({id:crypto.randomUUID(),active:!0,key:i,value:o});return r}function GT(t){const e=CY(t),n=DY(t),r=jY(t),{headers:i}=t.get().request,s={...Sc(i).reduce((l,c)=>(l[c.key]=c.value,l),{}),...e,...n||{},...r&&{Cookie:r,"X-Redocly-Cookie":r}};return Object.entries(s).reduce((l,[c,u])=>{const f=Zt(c,t),d=Zt(u,t);return l[f]=d,l},{})}function jY(t){return YT(t).map(n=>{const r=Zt(n.value,t);return`${Zt(n.key,t)}=${r}`}).join("; ")}function RY(t){return YT(t).reduce((n,r)=>{const i=Zt(r.value,t);return{...n,[Zt(r.key,t)]:i}},{})}function YT(t){const{request:{security:{selectedSecuritySchemeId:e,securities:n}}}=t,r=Na(n,e.get()),{request:{cookies:i}}=t.get(),o=[...r].map(s=>{const{[K.APIKey]:a}=s.get();return a.location===Aa.Cookie?qT(a):null}).filter(Boolean);return Sc([...i,...o])}function Sc(t){return t.filter(e=>e.active&&e.key&&(e.value||(e==null?void 0:e.files)))}function DY(t){const{body:e}=t.get().request;if(!(!Bx(t)||e.type==="binary"))return{"Content-Type":e.type}}function qT(t){return{key:t.name,value:t.key,active:!0}}function _x(t){var e;return(e=t.environments.find(n=>n.get().id===t.selectedEnvironmentId.get()))==null?void 0:e.get()}function Zt(t,e){var r;const{environments:n}=e.get();return Ge(t,((r=_x(e))==null?void 0:r.variables)||n[0].variables)}function QY(t,e){var r;const{environments:n}=e.get();return $4(t,((r=_x(e))==null?void 0:r.variables)||n[0].variables)}function UT(t){const e=document.createElement("a");return e.href=t,e.origin===window.location.origin}const ih=CG({});let pC=null;function HT(t){pC!==t&&(pC=t,ih.configure({validate:!0,schemas:[{uri:"stub://test",fileMatch:["*"],schema:t}]}))}function JT(t){const e=Dm.create("stub.json","json",0,t),n=ih.parseJSONDocument(e);return{textDoc:e,jsonDoc:n}}const KT=ln.define({create(){},update(t){return t}}),e$=t=>t.field(KT,!1),BY=({state:t})=>{var n,r,i,o;const e=(o=(i=(r=(n=t.operation.get({noproxy:!0,stealth:!0}))==null?void 0:n.body)==null?void 0:r.mediaTypes)==null?void 0:i[ot.JSON])==null?void 0:o.schema;return[KT.init(()=>({schema:yn(e||{}),state:t}))]};function _Y(){return async t=>{const{schema:e,state:n}=e$(t.state)||{};if(!e)return[];HT(e);const r=t.state.doc,{content:i,sourceMap:o}=QY(r.toString(),n),{textDoc:s,jsonDoc:a}=JT(i),l=await ih.doValidation(s,a);return l==null?void 0:l.map(c=>{const u=WY(s,c.range.start,o),f=u<0?0:u;return{from:f,to:f+s.offsetAt(c.range.end)-s.offsetAt(c.range.start),message:c.message,severity:FY[c.severity||3]}})}}const MY=Si.highest($a.of([{key:"Tab",run:t=>PI(t)}]));function NY(){return async function(e){const n={from:e.pos,to:e.pos,options:[],filter:!1},{schema:r}=e$(e.state);if(!r)return n;HT(r);const i=e.state.doc,o=ZY.bind(null,i),{textDoc:s,jsonDoc:a}=JT(i.toString()),l=e.state.doc.lineAt(e.pos),c=l.number-1,u=e.pos-l.from,f=await ih.doComplete(s,{line:c,character:u},a);if(!f)return n;const d=e.state.sliceDoc(l.from,e.pos);if(d.trim().endsWith(",")||VY(d))return n;n.options=f.items.map(O=>({label:O.label,info:O.documentation,apply:m=>{if(!O.textEdit||!("range"in O.textEdit))return;const x=O.textEdit.range,v=O.textEdit.newText.search(/(\$1|\${1:.*?})/);let y=O.textEdit.newText.replace(/(\$1|\${1:.*?})/,"");const S=v===-1?0:v-y.length;m.dispatch({changes:{from:o(x.start),to:o(x.end),insert:y}});const b=y.length-(x.end.character-x.start.character);m.dispatch({selection:ie.single(o(x.end)+b+S)})}}))||[];const h=e.state.wordAt(e.pos),p=h!=null&&h.from?e.state.sliceDoc(h==null?void 0:h.from,h==null?void 0:h.to).toLowerCase():"";return p&&(n.options=n.options.filter(O=>O.label.toLowerCase().replace(/^"/,"").startsWith(p))),n}}const FY={1:"error",2:"warning",3:"info",4:"hint"};function ZY(t,e){return t.line(e.line+1).from+e.character}function WY(t,e,n){let r=t.offsetAt(e);for(const i of n)r>i.pos&&(r-=i.offset);return r}function VY(t){try{return JSON.parse(`{${t}}`),!0}catch{return!1}}function gC(t){return new iE({regexp:new RegExp(`${as}(.*?)${ls}`,"g"),decoration:e=>{const{selectedEnvironment:n}=t,r=e[1],o=n.get().variables.find(l=>l.name===r),s=!(o!=null&&o.value),a=r===QO;return we.mark({attributes:{style:`color: var(--replay-${a?"server":s?"undefined":"defined"}-variable-color);
822
+ background-color: var(--replay-${a?"server":s?"undefined":"defined"}-variable-bg-color);`}})}})}const Il=t=>Bt.fromClass(class{constructor(e){ov(this,"decorations");const n=gC(t);this.decorations=n.createDeco(e)}update(e){const n=gC(t);this.decorations=n.updateDeco(e,this.decorations)}},{decorations:e=>e.decorations}),hd={[ot.Text]:{name:"Text",extensions:[de.lineWrapping],stateExtensions:[Il]},[ot.JSON]:{name:"JSON",extensions:[ez(),x7(_Y(),{delay:300,needsRefresh:t=>t.transactions.some(e=>e.effects.some(n=>n.is(WI)))}),zI.data.of({autocomplete:NY()}),MY],stateExtensions:[Il,BY]},[ot.XML]:{name:"XML",extensions:[wX()],stateExtensions:[Il]}},zY={[ot.Image]:{name:"Image",extensions:[],stateExtensions:[Il]}},LY={[ot.HTML]:{name:"HTML",extensions:[KL()],stateExtensions:[Il]}},Au={...hd,...zY,...LY},t$={[ot.FormData]:{name:"form-data",extensions:void 0},[ot["application/x-www-form-urlencoded"]]:{name:"x-www-form-urlencoded",extensions:void 0}},n$={[ot.Binary]:{name:"Binary",extensions:void 0}},os={...hd,...t$,...n$},r$=Object.keys(t$),i$=Object.keys(n$);function mC(t){return new TextEncoder().encode(t)}function OC(t){return btoa(t).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function XY(t){return btoa(String.fromCharCode(...new Uint8Array(t))).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function GY(t){const e=new ArrayBuffer(t.length),n=new Uint8Array(e);for(let r=0,i=t.length;r<i;r++)n[r]=t.charCodeAt(r);return e}var zm=(t=>(t.HS256="HS256",t.HS384="HS384",t.HS512="HS512",t.RS256="RS256",t.ES256="ES256",t))(zm||{});function xC(t){switch(t){case"HS256":return{name:"HMAC",hash:{name:"SHA-256"}};case"HS384":return{name:"HMAC",hash:{name:"SHA-384"}};case"HS512":return{name:"HMAC",hash:{name:"SHA-512"}};case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error(`Algorithm not implemented: ${t}`)}}function o$(t){return t==="RS256"||t==="ES256"}async function YY(t,e,n,r=crypto.subtle){if(!r)throw new Error("`SubtleCrypto` interface is required for JWT signing.");e.startsWith("-----BEGIN")&&(e=e.replace(/^-----(BEGIN|END)[\w\s]+-----$/gm,"").replace(/[^A-Za-z0-9+\/=]/gm,""),e=atob(e));const i=o$(n);let o;try{o=await r.importKey(i?"pkcs8":"raw",i?GY(e):mC(e),xC(n),!1,["sign"])}catch(s){throw process.env.NODE_ENV==="test"?s:new Error("Error importing private key")}return await r.sign(xC(n),o,mC(t))}async function qY(t,e,n,r){const i={...t,iat:Math.floor(Date.now()/1e3),exp:Math.floor(Date.now()/1e3)+3540},o=OC(JSON.stringify(i)),a=`${OC(JSON.stringify({alg:n,typ:"JWT",kid:r}))}.${o}`,l=XY(await YY(a,e,n));return[a,l].join(".")}function UY({isOpen:t,onClose:e,onSign:n}){const[r,i]=j.useState(""),[o,s]=j.useState(zm.HS256),[a,l]=j.useState(""),[c,u]=j.useState(""),[f,d]=j.useState(""),h=async()=>{try{const v=JSON.parse(r),y=await qY(v,a,o,c);d(""),n(y)}catch(v){d(`Error signing JWT: ${v.message}`)}},p=j.useMemo(()=>Object.keys(zm).map(v=>({label:v,value:v})),[]),O=o$(o),m={bracketMatching:!0,closeBrackets:!0,tabSize:2,foldGutter:!1,lineNumbers:!1,lintKeymap:!0,drawSelection:!1},x=g.jsxs(eq,{children:[g.jsxs(ol,{children:[g.jsx(gl,{id:"signature-type-label",children:"Signature Type"}),g.jsx(JY,{ariaLabeledBy:"signature-type-label",dataTestId:"jwt-signature-type-select",options:p,value:p.find(v=>v.value===o),onChange:({value:v})=>s(v)})]}),g.jsxs(ol,{children:[g.jsx(gl,{id:"sign-key",required:!0,children:O?"Private Key":"Secret"}),g.jsx(vC,{children:g.jsx(ed,{"aria-labelledby":"sign-key",dataTestId:"sign-key-codemirror",placeholder:O?"Enter private key":"Enter secret",value:a,maxHeight:"170px",minHeight:"170px",onChange:v=>l(v),extensions:os[ot.Text].extensions,basicSetup:m})})]}),g.jsxs(ol,{children:[g.jsx(gl,{htmlFor:"key-id",children:"Key ID"}),g.jsx(s$,{"data-testid":"key-id",id:"key-id",type:"text",value:c,onChange:v=>u(v.target.value),placeholder:"Enter public key identifier"})]}),g.jsxs(ol,{children:[g.jsx(gl,{id:"jwt-payload",required:!0,children:"JWT Payload"}),g.jsx(vC,{children:g.jsx(ed,{"aria-labelledby":"jwt-payload",dataTestId:"jwt-payload-codemirror",placeholder:"Enter JWT payload as JSON",value:r,maxHeight:"130px",minHeight:"130px",onChange:v=>i(v),extensions:os[ot.JSON].extensions,basicSetup:m})})]}),f&&g.jsx(ol,{children:g.jsx(tq,{children:f})}),g.jsxs(KY,{children:[g.jsx(_.Button,{variant:"outlined",onClick:e,children:"Cancel"}),g.jsx(_.Button,{variant:"primary",disabled:!a||!r,onClick:h,children:"Sign JWT"})]})]});return g.jsx(HY,{isOpen:t,onClose:e,title:"Sign JWT",content:x})}const HY=T(_l)`
823
823
  ${QP} {
824
824
  min-width: auto;
825
825
  width: 600px;
@@ -1017,7 +1017,7 @@ $3`);return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function eG(t){return t.i
1017
1017
  `,Rq="Predefined security type from the openapi description.",Dq="Alternative security type types not predefined for this request.";function Qq(t){return t===wc?Rq:Dq}function Bq(t){return t.map(e=>({label:g.jsx("div",{children:e}),value:e}))}function _q(){const t=Object.values(se);return Bq(t)}const Mq={[se.ClientCredentials]:nq,[se.ClientCredentialsWithJwtAssertion]:rq,[se.AuthorizationCode]:cq,[se.Implicit]:fq,[se.Password]:hq};function l$({security:t,securityType:e=K.OAuth2}){const{[K.OAuth2]:n,[K.OpenIDConnect]:r,securitySchemeId:i}=t,{operation:o,isRequestEditable:s,tokenRequestError:a}=je(),l=e===K.OAuth2?n:r,c=e===K.OAuth2?NG(o.get(),i.get()):r.documentedOAuth2Types.get()||[],u=_q(),f=oh(c,u),d=an(),{sendEvent:h}=ct(),p=p0(),{tokenState:O,handleTokenSuccess:m,handleTokenError:x,handleGenerateTokenClick:v}=Pq({onGenerateTokenClick:p.handleOpen}),{grantType:y}=l,S=y.get(),{accessToken:b}=l[S],w=I=>{b.set(I)},C=({value:I})=>{y.set(I),h("security_oauth2_flow_changed",{name:I,isDocumented:c.includes(I)})},k=Mq[S];return g.jsxs(bi,{id:"oauth2-container",children:[g.jsxs(tt,{children:[g.jsx(Ye,{children:"Access Token"}),g.jsx(Qe,{}),g.jsx(Ke,{placeholder:"Enter your token or create a new one",value:b.get(),environment:d,editable:s.get(),onChange:w})]}),g.jsx(Ne,{}),g.jsxs(RP,{title:"Configure New Token",expanded:!0,children:[g.jsx(Ne,{}),g.jsxs(tt,{children:[g.jsx(Ye,{children:"Grant type"}),g.jsx(Qe,{}),g.jsx(Nq,{dataTestId:"oauth2-grand-type-select",options:f,value:u.find(({value:I})=>I===S),onChange:C,formatGroupLabel:I=>g.jsx(sh,{data:I,getTooltipText:Qq})})]}),g.jsx(Ne,{}),g.jsx(k,{type:e,onGenerateTokenClick:v,onSuccess:m,onError:x,security:t})]}),g.jsx(_l,{title:"Generate Token",content:g.jsx(Sq,{state:O,onClick:p.handleClose,security:t,securityType:e,errorMessage:a.get()}),isOpen:p.isOpen,onClose:p.handleClose,mountId:"oauth2-container"})]})}const Nq=T(Hg)`
1018
1018
  margin-left: var(--spacing-xs);
1019
1019
  padding-left: 0;
1020
- `,Fq="Predefined request data from the openapi description.",Zq="Alternative authorization types not predefined for this request.";function Wq(t){return t.map(e=>({label:g.jsx("div",{children:e}),value:e}))}function Vq(){const t=Object.values(K);return Wq(t)}function zq(t){return t===wc?Fq:Zq}async function Lq(t){return(await fetch(t)).json()}function Xq(t){return t.userinfo_endpoint}function Gq(t,e){const n=us()[K.OAuth2],r=(s,a)=>{switch(a){case se.AuthorizationCode:return{...n[se.AuthorizationCode],accessToken:e[se.AuthorizationCode].accessToken,clientId:e[se.AuthorizationCode].clientId,clientSecret:e[se.AuthorizationCode].clientSecret,tokenUrl:s.token_endpoint,authorizationUrl:s.authorization_endpoint,availableScopes:s.scopes_supported||[],scopes:af(s.scopes_supported||[])};case se.Implicit:return{...n[se.Implicit],accessToken:e[se.Implicit].accessToken,clientId:e[se.Implicit].clientId,authorizationUrl:s.authorization_endpoint,availableScopes:s.scopes_supported||[],scopes:af(s.scopes_supported||[])};default:return{}}},i=Yq(t);return{...n,documentedOAuth2Types:i,grantType:i[0]||se.AuthorizationCode,[se.AuthorizationCode]:r(t,se.AuthorizationCode),[se.Implicit]:r(t,se.Implicit)}}function Yq(t){const e=t.response_types_supported;return(e==null?void 0:e.map(n=>qq(n)).filter(Boolean))||[]}function qq(t){switch(t){case"token":return se.Implicit;case"code":case"id_token":return se.AuthorizationCode;default:return null}}function Uq({security:t}){const[e,n]=j.useState(!1),[r,i]=j.useState(!1),{[K.OpenIDConnect]:o}=t,s=je(),{isRequestEditable:a}=s,{openIdConnectUrl:l,userInfoUrl:c}=o,u=an(),f=O=>{n(!1),l.set(O)},d=O=>{c.set(O)},h=async O=>{i(!0),n(!1);try{const m=await Lq(O);o.set({...o.get(),...Gq(m,o.get()),userInfoUrl:Xq(m)})}catch(m){console.log(m),n(!!m.message)}i(!1)},p=()=>{h(Zt(l.get(),s))};return g.jsxs(bi,{id:"oidc-container",children:[g.jsxs(tt,{children:[g.jsx(Ye,{children:"OpenId Connect URL"}),g.jsx(Qe,{}),g.jsx(Ke,{placeholder:"Enter your OpenId Connect URL",value:l.get(),environment:u,onChange:f,editable:a.get(),dataTestId:"oidc-connect-url"})]}),g.jsx(Ne,{}),g.jsxs(Jq,{children:[g.jsx(_.Button,{variant:"secondary",onClick:p,icon:r?g.jsx(_.SpinnerIcon,{}):void 0,disabled:!l.get(),size:"small",children:"Generate data"}),e&&g.jsxs(Hq,{"data-testid":"oidc-data-generate-error",children:[g.jsx(_.InformationIcon,{color:"var(--color-error-base)"}),g.jsx("span",{children:"Something is wrong!"})]})]}),g.jsx(Ne,{}),g.jsxs(tt,{children:[g.jsx(Ye,{children:"User Info URL"}),g.jsx(Qe,{}),g.jsx(Ke,{placeholder:"Enter your User Info URL",value:c.get()||"",environment:u,editable:a.get(),onChange:d})]}),g.jsx(Ne,{}),g.jsx(l$,{security:t,securityType:K.OpenIDConnect})]})}const Hq=T.div`
1020
+ `,Fq="Predefined request data from the openapi description.",Zq="Alternative authorization types not predefined for this request.";function Wq(t){return t.map(e=>({label:g.jsx("div",{children:e}),value:e}))}function Vq(){const t=Object.values(K);return Wq(t)}function zq(t){return t===wc?Fq:Zq}async function Lq(t){return(await fetch(t)).json()}function Xq(t){return t.userinfo_endpoint}function Gq(t,e){const n=fs()[K.OAuth2],r=(s,a)=>{switch(a){case se.AuthorizationCode:return{...n[se.AuthorizationCode],accessToken:e[se.AuthorizationCode].accessToken,clientId:e[se.AuthorizationCode].clientId,clientSecret:e[se.AuthorizationCode].clientSecret,tokenUrl:s.token_endpoint,authorizationUrl:s.authorization_endpoint,availableScopes:s.scopes_supported||[],scopes:af(s.scopes_supported||[])};case se.Implicit:return{...n[se.Implicit],accessToken:e[se.Implicit].accessToken,clientId:e[se.Implicit].clientId,authorizationUrl:s.authorization_endpoint,availableScopes:s.scopes_supported||[],scopes:af(s.scopes_supported||[])};default:return{}}},i=Yq(t);return{...n,documentedOAuth2Types:i,grantType:i[0]||se.AuthorizationCode,[se.AuthorizationCode]:r(t,se.AuthorizationCode),[se.Implicit]:r(t,se.Implicit)}}function Yq(t){const e=t.response_types_supported;return(e==null?void 0:e.map(n=>qq(n)).filter(Boolean))||[]}function qq(t){switch(t){case"token":return se.Implicit;case"code":case"id_token":return se.AuthorizationCode;default:return null}}function Uq({security:t}){const[e,n]=j.useState(!1),[r,i]=j.useState(!1),{[K.OpenIDConnect]:o}=t,s=je(),{isRequestEditable:a}=s,{openIdConnectUrl:l,userInfoUrl:c}=o,u=an(),f=O=>{n(!1),l.set(O)},d=O=>{c.set(O)},h=async O=>{i(!0),n(!1);try{const m=await Lq(O);o.set({...o.get(),...Gq(m,o.get()),userInfoUrl:Xq(m)})}catch(m){console.log(m),n(!!m.message)}i(!1)},p=()=>{h(Zt(l.get(),s))};return g.jsxs(bi,{id:"oidc-container",children:[g.jsxs(tt,{children:[g.jsx(Ye,{children:"OpenId Connect URL"}),g.jsx(Qe,{}),g.jsx(Ke,{placeholder:"Enter your OpenId Connect URL",value:l.get(),environment:u,onChange:f,editable:a.get(),dataTestId:"oidc-connect-url"})]}),g.jsx(Ne,{}),g.jsxs(Jq,{children:[g.jsx(_.Button,{variant:"secondary",onClick:p,icon:r?g.jsx(_.SpinnerIcon,{}):void 0,disabled:!l.get(),size:"small",children:"Generate data"}),e&&g.jsxs(Hq,{"data-testid":"oidc-data-generate-error",children:[g.jsx(_.InformationIcon,{color:"var(--color-error-base)"}),g.jsx("span",{children:"Something is wrong!"})]})]}),g.jsx(Ne,{}),g.jsxs(tt,{children:[g.jsx(Ye,{children:"User Info URL"}),g.jsx(Qe,{}),g.jsx(Ke,{placeholder:"Enter your User Info URL",value:c.get()||"",environment:u,editable:a.get(),onChange:d})]}),g.jsx(Ne,{}),g.jsx(l$,{security:t,securityType:K.OpenIDConnect})]})}const Hq=T.div`
1021
1021
  display: flex;
1022
1022
  align-items: center;
1023
1023
  gap: var(--spacing-xs);
@@ -1087,7 +1087,7 @@ $3`);return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function eG(t){return t.i
1087
1087
  height: 1px;
1088
1088
  width: 100%;
1089
1089
  background-color: var(--bg-color-active);
1090
- `;function dU(){const{sendEvent:t}=ct(),e=je(),{request:{security:{selectedSecuritySchemeId:n,securities:r,securitySchemeVariants:i}}}=e,o=i.get().length,s=j.useMemo(()=>Na(r,n.get()),[r,n]),a=()=>{t("add_security_clicked",{name}),r.set(c=>[...c,{...us(),securitySchemeId:n.get()}])},l=c=>{t("remove_security_clicked",{securityType:c.securityType.get()}),c.set(lt)};return g.jsxs(g.Fragment,{children:[o>1&&g.jsxs(pU,{children:[g.jsx(hU,{children:"Security scheme"}),g.jsx(aU,{securitySchemeVariants:i,selectedSecuritySchemeId:n})]}),g.jsx(gU,{children:s.map((c,u)=>g.jsx(j.Fragment,{children:g.jsx(tU,{security:c,additionalActions:g.jsx($r,{variant:"text",disabled:s.length===1,icon:g.jsx(_.TrashCanIcon,{}),onClick:()=>l(c)})})},`${c.securityType.get()}_${c.securitySchemeId.get()}_${u}`))}),g.jsx(_.Button,{variant:"secondary",icon:g.jsx(_.AddIcon,{}),onClick:a,children:"Add security"})]})}const hU=T.div`
1090
+ `;function dU(){const{sendEvent:t}=ct(),e=je(),{request:{security:{selectedSecuritySchemeId:n,securities:r,securitySchemeVariants:i}}}=e,o=i.get().length,s=j.useMemo(()=>Na(r,n.get()),[r,n]),a=()=>{t("add_security_clicked",{name}),r.set(c=>[...c,{...fs(),securitySchemeId:n.get()}])},l=c=>{t("remove_security_clicked",{securityType:c.securityType.get()}),c.set(lt)};return g.jsxs(g.Fragment,{children:[o>1&&g.jsxs(pU,{children:[g.jsx(hU,{children:"Security scheme"}),g.jsx(aU,{securitySchemeVariants:i,selectedSecuritySchemeId:n})]}),g.jsx(gU,{children:s.map((c,u)=>g.jsx(j.Fragment,{children:g.jsx(tU,{security:c,additionalActions:g.jsx($r,{variant:"text",disabled:s.length===1,icon:g.jsx(_.TrashCanIcon,{}),onClick:()=>l(c)})})},`${c.securityType.get()}_${c.securitySchemeId.get()}_${u}`))}),g.jsx(_.Button,{variant:"secondary",icon:g.jsx(_.AddIcon,{}),onClick:a,children:"Add security"})]})}const hU=T.div`
1091
1091
  font-size: var(--font-size-base);
1092
1092
  line-height: var(--line-height-base);
1093
1093
  `,pU=T.div`
@@ -1263,7 +1263,7 @@ $3`);return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function eG(t){return t.i
1263
1263
  border: 1px solid var(--button-border-color-focused);
1264
1264
  border-radius: var(--border-radius-base);
1265
1265
  }
1266
- `,VU="Predefined body type from the openapi description.",zU="Alternative body type types not predefined for this request.";function LU(t){return t===wc?VU:zU}function XU(t){return t.map(e=>{var n;return{label:g.jsx("div",{children:((n=is[e])==null?void 0:n.name)||e}),value:e}})}function GU(t){return XU(Object.keys($x(t)))}const pd="REPLAY_VARIABLE";function YU(t){try{const e=qU(t),n=JSON.parse(e),r=JSON.stringify(n,null,2);return UU(r)}catch(e){return console.error({error:e}),t}}function qU(t){return t.replace(new RegExp(`(?<!")${Pk}(?!")`,"g"),`"${pd}$&${pd}"`)}function UU(t){return t.replace(new RegExp(`"${pd}(.*?)${pd}"`,"g"),"$1")}function HU(){const{request:t,operation:e,isRequestEditable:n}=je(),r=an(),{sendEvent:i}=ct(),{content:o,type:s,activeExampleName:a}=t.body,l=j.useMemo(()=>{var S,b;return e?Object.keys(((b=(S=e.get())==null?void 0:S.body)==null?void 0:b.mediaTypes)||{}):[]},[e]),c=GU(e.get()),u=j.useMemo(()=>oh(l,c),[c,l]),f=j.useMemo(()=>{var S,b,w;return Vm((w=(b=(S=e.get())==null?void 0:S.body)==null?void 0:b.mediaTypes)==null?void 0:w[s.get()])},[e,s]),d=j.useMemo(()=>f.map(({name:S,value:b})=>({element:g.jsx("div",{children:S}),value:b,title:S})),[f]),h=j.useCallback(S=>{o.set(S)},[o]),p=j.useCallback(S=>{const{key:b,name:w}=f.find(C=>JSON.stringify(C.value,null,2)===JSON.stringify(S,null,2))||{};a.set(b||f[0].key),o.set(typeof S!="string"?JSON.stringify(S,null,2):S),i("request_body_example_changed",{name:w})},[a,o,f,i]),O=j.useCallback(({value:S})=>{var w,C,k;s.set(S);const[b]=Vm((k=(C=(w=e.get())==null?void 0:w.body)==null?void 0:C.mediaTypes)==null?void 0:k[S]);if(b){const{key:I,value:A}=b;a.set(I),o.set(typeof A!="string"?JSON.stringify(A,null,2):A)}i("request_body_type_changed",{name:S,isDocumented:l.includes(S)})},[s,e,a,o,i,l]),m=j.useMemo(()=>{var S;return[...((S=is[s.value])==null?void 0:S.extensions)||[]]},[s]),x=j.useMemo(()=>{var S;return[...((S=is[s.value])==null?void 0:S.stateExtensions)||[]]},[s]),v=j.useCallback(()=>{o.set(YU(o.get()))},[o]),y=j.useCallback(()=>{switch(!0){case r$.includes(s.value):return g.jsx(BU,{type:s.value});case i$.includes(s.value):return g.jsx(CC,{children:g.jsx(_U,{})});default:return g.jsx(CC,{children:n.get()?g.jsx(ed,{dataTestId:"request-body-tab-codemirror",value:o.get(),height:"200px",onChange:h,extensions:m,stateExtensions:x}):g.jsx(rH,{children:Ek(o.get(),r.variables.get())})})}},[s,o,n,m,x,r,h]);return g.jsxs(JU,{children:[g.jsxs(tH,{children:[g.jsxs(nH,{children:[g.jsx(KU,{dataTestId:"request-body-type-select",options:u,value:c.find(({value:S})=>S===s.get()),onChange:O,formatGroupLabel:S=>g.jsx(sh,{data:S,getTooltipText:LU})}),s.value==="application/json"&&o.get()&&g.jsx(_.Button,{variant:"ghost",onClick:v,children:"Prettify"})]}),f.length?g.jsx(eH,{options:d,value:{value:a.get(),label:"Pick an example"},onChange:S=>p(S),placeholder:"Pick an example",icon:g.jsx(_.ChevronSortIcon,{}),withArrow:!1,alignment:"end"}):null]}),y()]})}const JU=T.div`
1266
+ `,VU="Predefined body type from the openapi description.",zU="Alternative body type types not predefined for this request.";function LU(t){return t===wc?VU:zU}function XU(t){return t.map(e=>{var n;return{label:g.jsx("div",{children:((n=os[e])==null?void 0:n.name)||e}),value:e}})}function GU(t){return XU(Object.keys($x(t)))}const pd="REPLAY_VARIABLE";function YU(t){try{const e=qU(t),n=JSON.parse(e),r=JSON.stringify(n,null,2);return UU(r)}catch(e){return console.error({error:e}),t}}function qU(t){return t.replace(new RegExp(`(?<!")${Pk}(?!")`,"g"),`"${pd}$&${pd}"`)}function UU(t){return t.replace(new RegExp(`"${pd}(.*?)${pd}"`,"g"),"$1")}function HU(){const{request:t,operation:e,isRequestEditable:n}=je(),r=an(),{sendEvent:i}=ct(),{content:o,type:s,activeExampleName:a}=t.body,l=j.useMemo(()=>{var S,b;return e?Object.keys(((b=(S=e.get())==null?void 0:S.body)==null?void 0:b.mediaTypes)||{}):[]},[e]),c=GU(e.get()),u=j.useMemo(()=>oh(l,c),[c,l]),f=j.useMemo(()=>{var S,b,w;return Vm((w=(b=(S=e.get())==null?void 0:S.body)==null?void 0:b.mediaTypes)==null?void 0:w[s.get()])},[e,s]),d=j.useMemo(()=>f.map(({name:S,value:b})=>({element:g.jsx("div",{children:S}),value:b,title:S})),[f]),h=j.useCallback(S=>{o.set(S)},[o]),p=j.useCallback(S=>{const{key:b,name:w}=f.find(C=>JSON.stringify(C.value,null,2)===JSON.stringify(S,null,2))||{};a.set(b||f[0].key),o.set(typeof S!="string"?JSON.stringify(S,null,2):S),i("request_body_example_changed",{name:w})},[a,o,f,i]),O=j.useCallback(({value:S})=>{var w,C,k;s.set(S);const[b]=Vm((k=(C=(w=e.get())==null?void 0:w.body)==null?void 0:C.mediaTypes)==null?void 0:k[S]);if(b){const{key:I,value:A}=b;a.set(I),o.set(typeof A!="string"?JSON.stringify(A,null,2):A)}i("request_body_type_changed",{name:S,isDocumented:l.includes(S)})},[s,e,a,o,i,l]),m=j.useMemo(()=>{var S;return[...((S=os[s.value])==null?void 0:S.extensions)||[]]},[s]),x=j.useMemo(()=>{var S;return[...((S=os[s.value])==null?void 0:S.stateExtensions)||[]]},[s]),v=j.useCallback(()=>{o.set(YU(o.get()))},[o]),y=j.useCallback(()=>{switch(!0){case r$.includes(s.value):return g.jsx(BU,{type:s.value});case i$.includes(s.value):return g.jsx(CC,{children:g.jsx(_U,{})});default:return g.jsx(CC,{children:n.get()?g.jsx(ed,{dataTestId:"request-body-tab-codemirror",value:o.get(),height:"200px",onChange:h,extensions:m,stateExtensions:x}):g.jsx(rH,{children:Ek(o.get(),r.variables.get())})})}},[s,o,n,m,x,r,h]);return g.jsxs(JU,{children:[g.jsxs(tH,{children:[g.jsxs(nH,{children:[g.jsx(KU,{dataTestId:"request-body-type-select",options:u,value:c.find(({value:S})=>S===s.get()),onChange:O,formatGroupLabel:S=>g.jsx(sh,{data:S,getTooltipText:LU})}),s.value==="application/json"&&o.get()&&g.jsx(_.Button,{variant:"ghost",onClick:v,children:"Prettify"})]}),f.length?g.jsx(eH,{options:d,value:{value:a.get(),label:"Pick an example"},onChange:S=>p(S),placeholder:"Pick an example",icon:g.jsx(_.ChevronSortIcon,{}),withArrow:!1,alignment:"end"}):null]}),y()]})}const JU=T.div`
1267
1267
  display: flex;
1268
1268
  flex-direction: column;
1269
1269
  border-top: 1px solid var(--border-color-secondary);
@@ -1401,7 +1401,7 @@ Please report this to https://github.com/markedjs/marked.`,e.silent)return"<p>An
1401
1401
  color: var(--schema-property-required-label-text-color);
1402
1402
  font-size: var(--font-size-base);
1403
1403
  line-height: var(--line-height-base);
1404
- `;function Fx({paramName:t,paramLocation:e}){const n=je(),r=a=>{var l;return(l=n.operation.get())==null?void 0:l.parameters.find(c=>c.name===a&&c.in===e)},{description:i,required:o,schema:s}=r(t)||{};return i?g.jsx(SA,{children:g.jsx(To,{content:g.jsx(SH,{description:typeof i=="string"?i:i.raw,required:!!o,schema:s}),placement:"bottom",children:g.jsx(_.Button,{size:"small",variant:"text",icon:g.jsx(_.InformationIcon,{})})})}):null}function PH(){const t=an(),e=je(),{request:{queryParameters:n,url:r},isRequestEditable:i}=e,o=()=>{r.set(Ik(r.get(),n.get()))},s=(l,c)=>{c&&n.merge([un()]),o()},a=l=>{n[l].set(lt),o()};return g.jsx(sa,{keyName:"Parameters",elements:n,onParameterChange:s,title:"Query Parameters",environment:t,renderDescription:l=>g.jsx(Fx,{paramName:l,paramLocation:"query"}),editable:i.get(),actions:l=>g.jsx($r,{onClick:()=>a(l),variant:"text",icon:g.jsx(_.TrashCanIcon,{})})})}function EH(){const t=an(),{request:{headers:e},isRequestEditable:n}=je();function r(o,s){s&&e.merge([un()])}function i(o){e[o].set(lt)}return g.jsx(sa,{keyName:"Header",elements:e,onParameterChange:r,title:"Header Parameters",environment:t,renderDescription:o=>g.jsx(Fx,{paramName:o,paramLocation:"header"}),editable:n.get(),actions:o=>g.jsx($r,{onClick:()=>i(o),variant:"text",icon:g.jsx(_.TrashCanIcon,{})})})}function IH(){const t=an(),{request:{cookies:e},isRequestEditable:n}=je();function r(o,s){s&&e.merge([un()])}function i(o){e[o].set(lt)}return g.jsx(sa,{keyName:"Cookie",elements:e,onParameterChange:r,title:"Cookies",environment:t,renderDescription:o=>g.jsx(Fx,{paramName:o,paramLocation:"cookie"}),editable:n.get(),actions:o=>g.jsx($r,{onClick:()=>i(o),variant:"text",icon:g.jsx(_.TrashCanIcon,{})})})}const ro={SECURITY:"Security",BODY:"Body",QUERY:"Query",HEADERS:"Headers",COOKIES:"Cookies"},Oi=[{name:ro.SECURITY,content:dU,icon:g.jsx(_.SecurityIcon,{})},{name:ro.BODY,content:HU,icon:g.jsx(_.CodeIcon,{})},{name:ro.QUERY,content:PH,icon:g.jsx(_.DataFormatIcon,{})},{name:ro.HEADERS,content:EH,icon:g.jsx(_.TableBuiltIcon,{})},{name:ro.COOKIES,content:IH,icon:g.jsx(_.CookieIcon,{})}],TH=Oi.findIndex(t=>t.name===ro.BODY),x$=Oi.findIndex(t=>t.name===ro.QUERY),$H=Oi.findIndex(t=>t.name===ro.SECURITY),jH={requestController:void 0,request:{method:"GET",url:"",security:{securitySchemeVariants:[],selectedSecuritySchemeId:"",securities:[us()]},body:to(),queryParameters:[un()],headers:[un()],cookies:[un()]},isProcessingRequest:!1,response:null,requestError:null,history:[],collections:[],operation:null,operationUrl:void 0,isLinked:!0,environments:[D4],selectedEnvironmentId:null,corsProxyUrl:void 0,mockServer:void 0,appsLoadingState:ri.Idle,apps:[],apiId:void 0,requestActiveTabIdx:x$,oAuth2RedirectURI:void 0,isRequestEditable:!0,tokenRequestError:null,definitionUrl:void 0,transactionSource:null,showUnsavedChangesModal:!1,pendingTransaction:null,pendingTransactionSource:null,disableCollectionsTab:!1,certificates:[]};function Cc(){return structuredClone(jH)}const RH=lO(Cc());lO(us());const v$=j.createContext(RH),DH=v$.Provider;function je(){const t=j.useContext(v$);return y4(t)}class y${static save(e,n){const r=this.get();r[e]=n;const i=JSON.stringify(r);sessionStorage.setItem(Xh,i)}static get(){try{const e=sessionStorage.getItem(Xh);if(e)return JSON.parse(e)}catch(e){console.error("Error parsing serialized data:",e)}return{}}static getByKey(e){return this.get()[e]||null}static clear(){sessionStorage.removeItem(Xh)}}function QH(t,e){const n=yn(t);return e.forEach(r=>{const i=n.find(o=>o.name===r.name);i?i.variables=r.variables:n.push(r)}),n}class ml{static save(e){const n=e.map(o=>{const s=o.variables.filter(a=>a.type!==Sr.ServerUrl);return{...o,variables:s}}),r=this.get(),i=QH(r,n);localStorage.setItem(Gh,JSON.stringify(i))}static get(){try{const e=localStorage.getItem(Gh);if(e)return JSON.parse(e)}catch(e){console.error("Error parsing serialized data:",e)}return[]}static getEnvironmentByName(e){var n;return((n=this.get())==null?void 0:n.find(r=>r.name===e))||null}static getEnvironmentVariableByName(e,n,r){const i=this.getEnvironmentByName(e);return i?r?i==null?void 0:i.variables.find(o=>o.name===n&&o.type===r):i==null?void 0:i.variables.find(o=>o.name===n):null}static clear(){localStorage.removeItem(Gh)}}function BH(t,e){const{servers:n,parameters:r}=t,i=r.filter(s=>s.in==="path"),o=_H(t);return n.map(s=>{const a=s.url,l=s.description||a,c=s.variables||{},u=Object.entries(c).map(([O,m])=>{const x=ml.getEnvironmentVariableByName(l,O,Sr.Server);return{id:crypto.randomUUID(),name:O,value:(x==null?void 0:x.value)||m.default||"",type:Sr.Server,canBeRemoved:!1,canBeEdited:!0,readonlyName:!0}}),f=i.map(({name:O})=>{const m=ml.getEnvironmentVariableByName(l,O,Sr.Path);return{id:crypto.randomUUID(),name:O,value:(m==null?void 0:m.value)||"",type:Sr.Path,canBeRemoved:!1,canBeEdited:!0,readonlyName:!0}}),d=o.map(O=>{const m=ml.getEnvironmentVariableByName(l,O.name,Sr.Security);return{...O,value:(m==null?void 0:m.value)||O.value||""}}),h=ml.getEnvironmentByName(l),p=(h==null?void 0:h.variables.filter(O=>O.type===Sr.UserCreated))||[];return{id:crypto.randomUUID(),name:l,url:a,state:br.Normal,canBeRemoved:!1,canBeEdited:!1,variables:MH([...p,{id:crypto.randomUUID(),name:"server",value:nh(a),type:Sr.ServerUrl,canBeRemoved:!1,canBeEdited:!1},...u,...f,...d],e==null?void 0:e[l])}})}function _H(t){var i;const e=[],n=((i=t.security)==null?void 0:i.flat())||[],r=new Set;return n.forEach(o=>{const s=jx(o);if(r.has(s))return;const a=o.id;r.add(s),(s===K.BasicAuth||s===K.DigestAuth)&&(e.push(Br(a+_.SecurityVariablesEnvSuffix.Username,!1)),e.push(Br(a+_.SecurityVariablesEnvSuffix.Password))),s===K.JWT&&e.push(Br(a+_.SecurityVariablesEnvSuffix.JWTToken)),s===K.APIKey&&e.push(Br(a+_.SecurityVariablesEnvSuffix.APIKey)),s===K.OAuth2&&(e.push(Br(a+_.SecurityVariablesEnvSuffix.Token)),Rx(o).forEach(c=>{e.push(Br(a+_.SecurityVariablesEnvSuffix.ClientId)),[se.Implicit,se.ClientCredentialsWithJwtAssertion].includes(c)||e.push(Br(a+_.SecurityVariablesEnvSuffix.ClientSecret)),c===se.ClientCredentialsWithJwtAssertion&&e.push(Br(a+_.SecurityVariablesEnvSuffix.ClientAssertion))})),s===K.OpenIDConnect&&(e.push(Br(a+_.SecurityVariablesEnvSuffix.Token)),e.push(Br(a+_.SecurityVariablesEnvSuffix.ClientId)),e.push(Br(a+_.SecurityVariablesEnvSuffix.ClientSecret)))}),e}function Br(t,e){return{id:crypto.randomUUID(),name:t,value:"",type:Sr.Security,canBeRemoved:!1,canBeEdited:!0,isSecret:e===void 0?!0:e}}function MH(t,e){return e?t.map(n=>{const r=e[n.name];return r!==void 0?{...n,canBeRemoved:!1,value:n.type===Sr.ServerUrl?nh(r):r}:n}):t}var sn=(t=>(t.Folder="folder",t.Request="request",t))(sn||{}),gt=(t=>(t.Normal="Normal",t.Edit="Edit",t.Draft="Draft",t))(gt||{});function b$(t,e){let n=null;return e.forEach(r=>{if(r.type.get()===sn.Folder){const i=r.nested("value"),o=b$(t,i.items);o&&(n=o)}else if(r.nested("value").id.get()===t){const i=r.nested("value");i&&(n=i)}}),n}function Zx(){const{collections:t,transactionSource:e}=je();return j.useMemo(()=>{const r=e.get();if(r)return b$(r.id,t)},[e,t])}function ah(){const{request:t,response:e,transactionSource:n,showUnsavedChangesModal:r,pendingTransaction:i,pendingTransactionSource:o}=je(),s=Zx(),a=()=>{var p;return((p=n.get())==null?void 0:p.type)==="collection"?!g0(If(t.get({noproxy:!0,stealth:!0})),If(s==null?void 0:s.get({noproxy:!0,stealth:!0}).request)):!1},l=(h,p)=>{a()?(r.set(!0),i.set(h),o.set(p)):(t.set(yn(h.request)),e.set(yn(h.response)),n.set(p),i.set(null),o.set(null))},c=(h,p)=>{h&&(t.set(yn(h.request)),e.set(yn(h==null?void 0:h.response))),n.set(p)},u=()=>{r.set(!1)},f=()=>{r.set(!1),c(i.get(),o.get({noproxy:!0}))},d=()=>{r.set(!1),s==null||s.merge({request:yn(t.get({noproxy:!0})),response:yn(e.get({noproxy:!0}))}),c(i.get(),o.get({noproxy:!0}))};return{selectedTransaction:s,showUnsavedChangesModal:r,isTransactionChanged:a(),updateTransaction:l,onClose:u,onDiscard:f,onSave:d}}function NH(t){const{operation:e,request:n}=t,r=n.body;$x(e.get({noproxy:!0}))[r.type.get({noproxy:!0})]||r.set(FT(e.get({noproxy:!0})))}function Wx({value:t,disableDraft:e,...n}){const r=je(),{updateTransaction:i}=ah(),{operation:o,corsProxyUrl:s,environments:a,operationUrl:l,mockServer:c,selectedEnvironmentId:u,apiId:f,oAuth2RedirectURI:d,definitionUrl:h,disableCollectionsTab:p,certificates:O}=r;return j.useEffect(()=>{O.set(n.certificates||[])},[n.certificates]),j.useEffect(()=>{var x;const m=n.operationUrl&&!e?y$.getByKey(n.operationUrl):null;if(t){const v=yn(t),y=BH(v,n.predefinedEnvValues),S=y.find(({name:w,url:C})=>C===(n==null?void 0:n.environment)||w===(n==null?void 0:n.environment));o.set(v),a.set(y),S&&u.set(S.id);const b=m?{...m,body:{...m.body,activeExampleName:(x=v.body)==null?void 0:x.activeExampleName}}:Tx(v);i({request:b,response:null},null)}s.set(n.corsProxyUrl??PG),l.set(n.operationUrl),c.set(n.mockServer),f.set(n.apiId),d.set(n.oAuth2RedirectURI),h.set(n.definitionUrl),p.set(n.disableCollectionsTab),MT(r),NH(r)},[t]),r}const{createElement:va,createContext:FH,createRef:Noe,forwardRef:S$,useCallback:Gn,useContext:w$,useEffect:qo,useImperativeHandle:C$,useLayoutEffect:ZH,useMemo:WH,useRef:dr,useState:md}=X,$C=X.useId,lh=FH(null);lh.displayName="PanelGroupContext";const nc=ZH,VH=typeof $C=="function"?$C:()=>null;let zH=0;function Vx(t=null){const e=VH(),n=dr(t||e||null);return n.current===null&&(n.current=""+zH++),t??n.current}function k$({children:t,className:e="",collapsedSize:n,collapsible:r,defaultSize:i,forwardedRef:o,id:s,maxSize:a,minSize:l,onCollapse:c,onExpand:u,onResize:f,order:d,style:h,tagName:p="div",...O}){const m=w$(lh);if(m===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:x,expandPanel:v,getPanelSize:y,getPanelStyle:S,groupId:b,isPanelCollapsed:w,reevaluatePanelConstraints:C,registerPanel:k,resizePanel:I,unregisterPanel:A}=m,E=Vx(s),$=dr({callbacks:{onCollapse:c,onExpand:u,onResize:f},constraints:{collapsedSize:n,collapsible:r,defaultSize:i,maxSize:a,minSize:l},id:E,idIsFromProps:s!==void 0,order:d});dr({didLogMissingDefaultSizeWarning:!1}),nc(()=>{const{callbacks:M,constraints:Q}=$.current,Z={...Q};$.current.id=E,$.current.idIsFromProps=s!==void 0,$.current.order=d,M.onCollapse=c,M.onExpand=u,M.onResize=f,Q.collapsedSize=n,Q.collapsible=r,Q.defaultSize=i,Q.maxSize=a,Q.minSize=l,(Z.collapsedSize!==Q.collapsedSize||Z.collapsible!==Q.collapsible||Z.maxSize!==Q.maxSize||Z.minSize!==Q.minSize)&&C($.current,Z)}),nc(()=>{const M=$.current;return k(M),()=>{A(M)}},[d,E,k,A]),C$(o,()=>({collapse:()=>{x($.current)},expand:()=>{v($.current)},getId(){return E},getSize(){return y($.current)},isCollapsed(){return w($.current)},isExpanded(){return!w($.current)},resize:M=>{I($.current,M)}}),[x,v,y,w,E,I]);const R=S($.current,i);return va(p,{...O,children:t,className:e,style:{...R,...h},"data-panel":"","data-panel-id":E,"data-panel-group-id":b,"data-panel-collapsible":void 0,"data-panel-size":void 0})}const Lm=S$((t,e)=>va(k$,{...t,forwardedRef:e}));k$.displayName="Panel";Lm.displayName="forwardRef(Panel)";function Me(t,e="Assertion failed!"){if(!t)throw console.error(e),Error(e)}const A$=10;function rc(t,e,n=A$){t=parseFloat(t.toFixed(n)),e=parseFloat(e.toFixed(n));const r=t-e;return r===0?0:r>0?1:-1}function ur(t,e,n){return rc(t,e,n)===0}function Ms({panelConstraints:t,panelIndex:e,size:n}){const r=t[e];Me(r!=null);let{collapsedSize:i=0,collapsible:o,maxSize:s=100,minSize:a=0}=r;if(rc(n,a)<0)if(o){const l=(i+a)/2;rc(n,l)<0?n=i:n=a}else n=a;return n=Math.min(s,n),n=parseFloat(n.toFixed(A$)),n}function Ol({delta:t,layout:e,panelConstraints:n,pivotIndices:r,trigger:i}){if(ur(t,0))return e;const o=[...e],[s,a]=r;Me(s!=null),Me(a!=null);let l=0;if(i==="keyboard"){{const u=t<0?a:s,f=n[u];if(Me(f),f.collapsible){const d=e[u];Me(d!=null);const h=n[u];Me(h);const{collapsedSize:p=0,minSize:O=0}=h;if(ur(d,p)){const m=O-d;rc(m,Math.abs(t))>0&&(t=t<0?0-m:m)}}}{const u=t<0?s:a,f=n[u];Me(f);const{collapsible:d}=f;if(d){const h=e[u];Me(h!=null);const p=n[u];Me(p);const{collapsedSize:O=0,minSize:m=0}=p;if(ur(h,m)){const x=h-O;rc(x,Math.abs(t))>0&&(t=t<0?0-x:x)}}}}{const u=t<0?1:-1;let f=t<0?a:s,d=0;for(;;){const p=e[f];Me(p!=null);const m=Ms({panelConstraints:n,panelIndex:f,size:100})-p;if(d+=m,f+=u,f<0||f>=n.length)break}const h=Math.min(Math.abs(t),Math.abs(d));t=t<0?0-h:h}{let f=t<0?s:a;for(;f>=0&&f<n.length;){const d=Math.abs(t)-Math.abs(l),h=e[f];Me(h!=null);const p=h-d,O=Ms({panelConstraints:n,panelIndex:f,size:p});if(!ur(h,O)&&(l+=h-O,o[f]=O,l.toPrecision(3).localeCompare(Math.abs(t).toPrecision(3),void 0,{numeric:!0})>=0))break;t<0?f--:f++}}if(ur(l,0))return e;{const u=t<0?a:s,f=e[u];Me(f!=null);const d=f+l,h=Ms({panelConstraints:n,panelIndex:u,size:d});if(o[u]=h,!ur(h,d)){let p=d-h,m=t<0?a:s;for(;m>=0&&m<n.length;){const x=o[m];Me(x!=null);const v=x+p,y=Ms({panelConstraints:n,panelIndex:m,size:v});if(ur(x,y)||(p-=y-x,o[m]=y),ur(p,0))break;t>0?m--:m++}}}const c=o.reduce((u,f)=>f+u,0);return ur(c,100)?o:e}function LH({layout:t,panelsArray:e,pivotIndices:n}){let r=0,i=100,o=0,s=0;const a=n[0];Me(a!=null),e.forEach((f,d)=>{const{constraints:h}=f,{maxSize:p=100,minSize:O=0}=h;d===a?(r=O,i=p):(o+=O,s+=p)});const l=Math.min(i,100-o),c=Math.max(r,100-s),u=t[a];return{valueMax:l,valueMin:c,valueNow:u}}function ic(t,e=document){return Array.from(e.querySelectorAll(`[data-panel-resize-handle-id][data-panel-group-id="${t}"]`))}function P$(t,e,n=document){const i=ic(t,n).findIndex(o=>o.getAttribute("data-panel-resize-handle-id")===e);return i??null}function E$(t,e,n){const r=P$(t,e,n);return r!=null?[r,r+1]:[-1,-1]}function I$(t,e=document){var n;if(e instanceof HTMLElement&&(e==null||(n=e.dataset)===null||n===void 0?void 0:n.panelGroupId)==t)return e;const r=e.querySelector(`[data-panel-group][data-panel-group-id="${t}"]`);return r||null}function ch(t,e=document){const n=e.querySelector(`[data-panel-resize-handle-id="${t}"]`);return n||null}function XH(t,e,n,r=document){var i,o,s,a;const l=ch(e,r),c=ic(t,r),u=l?c.indexOf(l):-1,f=(i=(o=n[u])===null||o===void 0?void 0:o.id)!==null&&i!==void 0?i:null,d=(s=(a=n[u+1])===null||a===void 0?void 0:a.id)!==null&&s!==void 0?s:null;return[f,d]}function GH({committedValuesRef:t,eagerValuesRef:e,groupId:n,layout:r,panelDataArray:i,panelGroupElement:o,setLayout:s}){dr({didWarnAboutMissingResizeHandle:!1}),nc(()=>{if(!o)return;const a=ic(n,o);for(let l=0;l<i.length-1;l++){const{valueMax:c,valueMin:u,valueNow:f}=LH({layout:r,panelsArray:i,pivotIndices:[l,l+1]}),d=a[l];if(d!=null){const h=i[l];Me(h),d.setAttribute("aria-controls",h.id),d.setAttribute("aria-valuemax",""+Math.round(c)),d.setAttribute("aria-valuemin",""+Math.round(u)),d.setAttribute("aria-valuenow",f!=null?""+Math.round(f):"")}}return()=>{a.forEach((l,c)=>{l.removeAttribute("aria-controls"),l.removeAttribute("aria-valuemax"),l.removeAttribute("aria-valuemin"),l.removeAttribute("aria-valuenow")})}},[n,r,i,o]),qo(()=>{if(!o)return;const a=e.current;Me(a);const{panelDataArray:l}=a,c=I$(n,o);Me(c!=null,`No group found for id "${n}"`);const u=ic(n,o);Me(u);const f=u.map(d=>{const h=d.getAttribute("data-panel-resize-handle-id");Me(h);const[p,O]=XH(n,h,l,o);if(p==null||O==null)return()=>{};const m=x=>{if(!x.defaultPrevented)switch(x.key){case"Enter":{x.preventDefault();const v=l.findIndex(y=>y.id===p);if(v>=0){const y=l[v];Me(y);const S=r[v],{collapsedSize:b=0,collapsible:w,minSize:C=0}=y.constraints;if(S!=null&&w){const k=Ol({delta:ur(S,b)?C-b:b-S,layout:r,panelConstraints:l.map(I=>I.constraints),pivotIndices:E$(n,h,o),trigger:"keyboard"});r!==k&&s(k)}}break}}};return d.addEventListener("keydown",m),()=>{d.removeEventListener("keydown",m)}});return()=>{f.forEach(d=>d())}},[o,t,e,n,r,i,s])}function jC(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function T$(t){return t.type==="keydown"}function $$(t){return t.type.startsWith("mouse")}function j$(t){return t.type.startsWith("touch")}function R$(t,e){const n=t==="horizontal";if($$(e))return n?e.clientX:e.clientY;if(j$(e)){const r=e.touches[0];return Me(r),n?r.screenX:r.screenY}else throw Error(`Unsupported event type "${e.type}"`)}function YH(t,e,n,r,i){const o=n==="horizontal",s=ch(e,i);Me(s);const a=s.getAttribute("data-panel-group-id");Me(a);let{initialCursorPosition:l}=r;const c=R$(n,t),u=I$(a,i);Me(u);const f=u.getBoundingClientRect(),d=o?f.width:f.height;return(c-l)/d*100}function qH(t,e,n,r,i,o){if(T$(t)){const s=n==="horizontal";let a=0;t.shiftKey?a=100:i!=null?a=i:a=10;let l=0;switch(t.key){case"ArrowDown":l=s?0:a;break;case"ArrowLeft":l=s?-a:0;break;case"ArrowRight":l=s?a:0;break;case"ArrowUp":l=s?0:-a;break;case"End":l=100;break;case"Home":l=-100;break}return l}else return r==null?0:YH(t,e,n,r,o)}function UH({panelDataArray:t}){const e=Array(t.length),n=t.map(o=>o.constraints);let r=0,i=100;for(let o=0;o<t.length;o++){const s=n[o];Me(s);const{defaultSize:a}=s;a!=null&&(r++,e[o]=a,i-=a)}for(let o=0;o<t.length;o++){const s=n[o];Me(s);const{defaultSize:a}=s;if(a!=null)continue;const l=t.length-r,c=i/l;r++,e[o]=c,i-=c}return e}function ks(t,e,n){e.forEach((r,i)=>{const o=t[i];Me(o);const{callbacks:s,constraints:a,id:l}=o,{collapsedSize:c=0,collapsible:u}=a,f=n[l];if(f==null||r!==f){n[l]=r;const{onCollapse:d,onExpand:h,onResize:p}=s;p&&p(r,f),u&&(d||h)&&(h&&(f==null||f===c)&&r!==c&&h(),d&&(f==null||f!==c)&&r===c&&d())}})}function Eu(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n])return!1;return!0}function HH({defaultSize:t,dragState:e,layout:n,panelData:r,panelIndex:i,precision:o=3}){const s=n[i];let a;return s==null?a=t??"1":r.length===1?a="1":a=s.toPrecision(o),{flexBasis:0,flexGrow:a,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}let Xm=null,Xo=null;function D$(t){switch(t){case"horizontal":return"ew-resize";case"horizontal-max":return"w-resize";case"horizontal-min":return"e-resize";case"vertical":return"ns-resize";case"vertical-max":return"n-resize";case"vertical-min":return"s-resize"}}function JH(){Xo!==null&&(document.head.removeChild(Xo),Xm=null,Xo=null)}function yg(t){if(Xm===t)return;Xm=t;const e=D$(t);Xo===null&&(Xo=document.createElement("style"),document.head.appendChild(Xo)),Xo.innerHTML=`*{cursor: ${e}!important;}`}function KH(t,e=10){let n=null;return(...i)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{t(...i)},e)}}function RC(t){try{if(typeof localStorage<"u")t.getItem=e=>localStorage.getItem(e),t.setItem=(e,n)=>{localStorage.setItem(e,n)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),t.getItem=()=>null,t.setItem=()=>{}}}function Q$(t){return`react-resizable-panels:${t}`}function B$(t){return t.map(e=>{const{constraints:n,id:r,idIsFromProps:i,order:o}=e;return i?r:o?`${o}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((e,n)=>e.localeCompare(n)).join(",")}function _$(t,e){try{const n=Q$(t),r=e.getItem(n);if(r){const i=JSON.parse(r);if(typeof i=="object"&&i!=null)return i}}catch{}return null}function eJ(t,e,n){var r,i;const o=(r=_$(t,n))!==null&&r!==void 0?r:{},s=B$(e);return(i=o[s])!==null&&i!==void 0?i:null}function tJ(t,e,n,r,i){var o;const s=Q$(t),a=B$(e),l=(o=_$(t,i))!==null&&o!==void 0?o:{};l[a]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{i.setItem(s,JSON.stringify(l))}catch(c){console.error(c)}}function DC({layout:t,panelConstraints:e}){const n=[...t],r=n.reduce((o,s)=>o+s,0);if(n.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${n.map(o=>`${o}%`).join(", ")}`);if(!ur(r,100))for(let o=0;o<e.length;o++){const s=n[o];Me(s!=null);const a=100/r*s;n[o]=a}let i=0;for(let o=0;o<e.length;o++){const s=n[o];Me(s!=null);const a=Ms({panelConstraints:e,panelIndex:o,size:s});s!=a&&(i+=s-a,n[o]=a)}if(!ur(i,0))for(let o=0;o<e.length;o++){const s=n[o];Me(s!=null);const a=s+i,l=Ms({panelConstraints:e,panelIndex:o,size:a});if(s!==l&&(i-=l-s,n[o]=l,ur(i,0)))break}return n}const nJ=100,xl={getItem:t=>(RC(xl),xl.getItem(t)),setItem:(t,e)=>{RC(xl),xl.setItem(t,e)}},QC={};function M$({autoSaveId:t=null,children:e,className:n="",direction:r,forwardedRef:i,id:o=null,onLayout:s=null,keyboardResizeBy:a=null,storage:l=xl,style:c,tagName:u="div",...f}){const d=Vx(o),h=dr(null),[p,O]=md(null),[m,x]=md([]),v=dr({}),y=dr(new Map),S=dr(0),b=dr({autoSaveId:t,direction:r,dragState:p,id:d,keyboardResizeBy:a,onLayout:s,storage:l}),w=dr({layout:m,panelDataArray:[],panelDataArrayChanged:!1});dr({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),C$(i,()=>({getId:()=>b.current.id,getLayout:()=>{const{layout:D}=w.current;return D},setLayout:D=>{const{onLayout:B}=b.current,{layout:N,panelDataArray:U}=w.current,F=DC({layout:D,panelConstraints:U.map(te=>te.constraints)});jC(N,F)||(x(F),w.current.layout=F,B&&B(F),ks(U,F,v.current))}}),[]),nc(()=>{b.current.autoSaveId=t,b.current.direction=r,b.current.dragState=p,b.current.id=d,b.current.onLayout=s,b.current.storage=l}),GH({committedValuesRef:b,eagerValuesRef:w,groupId:d,layout:m,panelDataArray:w.current.panelDataArray,setLayout:x,panelGroupElement:h.current}),qo(()=>{const{panelDataArray:D}=w.current;if(t){if(m.length===0||m.length!==D.length)return;let B=QC[t];B==null&&(B=KH(tJ,nJ),QC[t]=B);const N=[...D],U=new Map(y.current);B(t,N,U,m,l)}},[t,m,l]),qo(()=>{});const C=Gn(D=>{const{onLayout:B}=b.current,{layout:N,panelDataArray:U}=w.current;if(D.constraints.collapsible){const F=U.map(re=>re.constraints),{collapsedSize:te=0,panelSize:L,pivotIndices:ce}=Mo(U,D,N);if(Me(L!=null),L!==te){y.current.set(D.id,L);const ae=Ts(U,D)===U.length-1?L-te:te-L,H=Ol({delta:ae,layout:N,panelConstraints:F,pivotIndices:ce,trigger:"imperative-api"});Eu(N,H)||(x(H),w.current.layout=H,B&&B(H),ks(U,H,v.current))}}},[]),k=Gn(D=>{const{onLayout:B}=b.current,{layout:N,panelDataArray:U}=w.current;if(D.constraints.collapsible){const F=U.map(ae=>ae.constraints),{collapsedSize:te=0,panelSize:L,minSize:ce=0,pivotIndices:re}=Mo(U,D,N);if(L===te){const ae=y.current.get(D.id),H=ae!=null&&ae>=ce?ae:ce,q=Ts(U,D)===U.length-1?L-H:H-L,ne=Ol({delta:q,layout:N,panelConstraints:F,pivotIndices:re,trigger:"imperative-api"});Eu(N,ne)||(x(ne),w.current.layout=ne,B&&B(ne),ks(U,ne,v.current))}}},[]),I=Gn(D=>{const{layout:B,panelDataArray:N}=w.current,{panelSize:U}=Mo(N,D,B);return Me(U!=null),U},[]),A=Gn((D,B)=>{const{panelDataArray:N}=w.current,U=Ts(N,D);return HH({defaultSize:B,dragState:p,layout:m,panelData:N,panelIndex:U})},[p,m]),E=Gn(D=>{const{layout:B,panelDataArray:N}=w.current,{collapsedSize:U=0,collapsible:F,panelSize:te}=Mo(N,D,B);return F===!0&&te===U},[]),$=Gn(D=>{const{layout:B,panelDataArray:N}=w.current,{collapsedSize:U=0,collapsible:F,panelSize:te}=Mo(N,D,B);return Me(te!=null),!F||te>U},[]),R=Gn(D=>{const{panelDataArray:B}=w.current;B.push(D),B.sort((N,U)=>{const F=N.order,te=U.order;return F==null&&te==null?0:F==null?-1:te==null?1:F-te}),w.current.panelDataArrayChanged=!0},[]);nc(()=>{if(w.current.panelDataArrayChanged){w.current.panelDataArrayChanged=!1;const{autoSaveId:D,onLayout:B,storage:N}=b.current,{layout:U,panelDataArray:F}=w.current;let te=null;if(D){const ce=eJ(D,F,N);ce&&(y.current=new Map(Object.entries(ce.expandToSizes)),te=ce.layout)}te==null&&(te=UH({panelDataArray:F}));const L=DC({layout:te,panelConstraints:F.map(ce=>ce.constraints)});jC(U,L)||(x(L),w.current.layout=L,B&&B(L),ks(F,L,v.current))}});const M=Gn(D=>function(N){N.preventDefault();const U=h.current;if(!U)return()=>null;const{direction:F,dragState:te,id:L,keyboardResizeBy:ce,onLayout:re}=b.current,{layout:ae,panelDataArray:H}=w.current,{initialLayout:pe}=te??{},q=E$(L,D,U);let ne=qH(N,D,F,te,ce,U);if(ne===0)return;const he=F==="horizontal";document.dir==="rtl"&&he&&(ne=-ne);const ve=H.map(Ee=>Ee.constraints),Re=Ol({delta:ne,layout:pe??ae,panelConstraints:ve,pivotIndices:q,trigger:T$(N)?"keyboard":"mouse-or-touch"}),ye=!Eu(ae,Re);($$(N)||j$(N))&&S.current!=ne&&(S.current=ne,yg(ye?he?"horizontal":"vertical":he?ne<0?"horizontal-min":"horizontal-max":ne<0?"vertical-min":"vertical-max")),ye&&(x(Re),w.current.layout=Re,re&&re(Re),ks(H,Re,v.current))},[]),Q=Gn((D,B)=>{const{onLayout:N}=b.current,{layout:U,panelDataArray:F}=w.current,te=F.map(pe=>pe.constraints),{panelSize:L,pivotIndices:ce}=Mo(F,D,U);Me(L!=null);const ae=Ts(F,D)===F.length-1?L-B:B-L,H=Ol({delta:ae,layout:U,panelConstraints:te,pivotIndices:ce,trigger:"imperative-api"});Eu(U,H)||(x(H),w.current.layout=H,N&&N(H),ks(F,H,v.current))},[]),Z=Gn((D,B)=>{const{layout:N,panelDataArray:U}=w.current,{collapsedSize:F=0,collapsible:te,defaultSize:L,maxSize:ce=100,minSize:re=0}=B,{collapsedSize:ae=0,collapsible:H,defaultSize:pe,maxSize:q=100,minSize:ne=0}=D.constraints,{panelSize:he}=Mo(U,D,N);Me(he!=null),te&&H&&F!==ae&&he===F?Q(D,ae):he<ne?Q(D,ne):he>q&&Q(D,q)},[Q]),G=Gn((D,B)=>{const{direction:N}=b.current,{layout:U}=w.current;if(!h.current)return;const F=ch(D,h.current);Me(F);const te=R$(N,B);O({dragHandleId:D,dragHandleRect:F.getBoundingClientRect(),initialCursorPosition:te,initialLayout:U})},[]),V=Gn(()=>{JH(),O(null)},[]),ee=Gn(D=>{const{panelDataArray:B}=w.current,N=Ts(B,D);N>=0&&(B.splice(N,1),delete v.current[D.id],w.current.panelDataArrayChanged=!0)},[]),Y=WH(()=>({collapsePanel:C,direction:r,dragState:p,expandPanel:k,getPanelSize:I,getPanelStyle:A,groupId:d,isPanelCollapsed:E,isPanelExpanded:$,reevaluatePanelConstraints:Z,registerPanel:R,registerResizeHandle:M,resizePanel:Q,startDragging:G,stopDragging:V,unregisterPanel:ee,panelGroupElement:h.current}),[C,p,r,k,I,A,d,E,$,Z,R,M,Q,G,V,ee]),z={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return va(lh.Provider,{value:Y},va(u,{...f,children:e,className:n,style:{...z,...c},ref:h,"data-panel-group":"","data-panel-group-direction":r,"data-panel-group-id":d}))}const N$=S$((t,e)=>va(M$,{...t,forwardedRef:e}));M$.displayName="PanelGroup";N$.displayName="forwardRef(PanelGroup)";function Ts(t,e){return t.findIndex(n=>n===e||n.id===e.id)}function Mo(t,e,n){const r=Ts(t,e),o=r===t.length-1?[r-1,r]:[r,r+1],s=n[r];return{...e.constraints,panelSize:s,pivotIndices:o}}function rJ({disabled:t,handleId:e,resizeHandler:n,panelGroupElement:r}){qo(()=>{if(t||n==null||r==null)return;const i=ch(e,r);if(i==null)return;const o=s=>{if(!s.defaultPrevented)switch(s.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{s.preventDefault(),n(s);break}case"F6":{s.preventDefault();const a=i.getAttribute("data-panel-group-id");Me(a);const l=ic(a,r),c=P$(a,e,r);Me(c!==null);const u=s.shiftKey?c>0?c-1:l.length-1:c+1<l.length?c+1:0;l[u].focus();break}}};return i.addEventListener("keydown",o),()=>{i.removeEventListener("keydown",o)}},[r,t,e,n])}function F$({children:t=null,className:e="",disabled:n=!1,id:r,onDragging:i,style:o={},tabIndex:s=0,tagName:a="div",...l}){const c=dr(null),u=dr({onDragging:i});qo(()=>{u.current.onDragging=i});const f=w$(lh);if(f===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:d,dragState:h,groupId:p,registerResizeHandle:O,startDragging:m,stopDragging:x,panelGroupElement:v}=f,y=Vx(r),S=(h==null?void 0:h.dragHandleId)===y,[b,w]=md(!1),[C,k]=md(null),I=Gn(()=>{const E=c.current;Me(E),E.blur(),x();const{onDragging:$}=u.current;$&&$(!1)},[x]);qo(()=>{if(n)k(null);else{const E=O(y);k(()=>E)}},[n,y,O]),qo(()=>{if(n||C==null||!S)return;const E=Q=>{C(Q)},$=Q=>{C(Q)},R=c.current;Me(R);const M=R.ownerDocument;return M.body.addEventListener("contextmenu",I),M.body.addEventListener("mousemove",E),M.body.addEventListener("touchmove",E),M.body.addEventListener("mouseleave",$),window.addEventListener("mouseup",I),window.addEventListener("touchend",I),()=>{M.body.removeEventListener("contextmenu",I),M.body.removeEventListener("mousemove",E),M.body.removeEventListener("touchmove",E),M.body.removeEventListener("mouseleave",$),window.removeEventListener("mouseup",I),window.removeEventListener("touchend",I)}},[d,n,S,C,I]),rJ({disabled:n,handleId:y,resizeHandler:C,panelGroupElement:v});const A={cursor:D$(d),touchAction:"none",userSelect:"none"};return va(a,{...l,children:t,className:e,onBlur:()=>w(!1),onFocus:()=>w(!0),onMouseDown:E=>{m(y,E.nativeEvent);const $=u.current;Me($);const{onDragging:R}=$;R&&R(!0)},onMouseUp:I,onTouchCancel:I,onTouchEnd:I,onTouchStart:E=>{m(y,E.nativeEvent);const $=u.current;Me($);const{onDragging:R}=$;R&&R(!0)},ref:c,role:"separator",style:{...A,...o},tabIndex:s,"data-panel-group-direction":d,"data-panel-group-id":p,"data-resize-handle":"","data-resize-handle-active":S?"pointer":b?"keyboard":void 0,"data-panel-resize-handle-enabled":!n,"data-panel-resize-handle-id":y})}F$.displayName="PanelResizeHandle";function iJ({onDoubleClick:t,...e}){return g.jsx(F$,{...e,children:g.jsx(oJ,{onDoubleClick:t,children:g.jsx(Ne,{})})})}const oJ=T.div`
1404
+ `;function Fx({paramName:t,paramLocation:e}){const n=je(),r=a=>{var l;return(l=n.operation.get())==null?void 0:l.parameters.find(c=>c.name===a&&c.in===e)},{description:i,required:o,schema:s}=r(t)||{};return i?g.jsx(SA,{children:g.jsx(To,{content:g.jsx(SH,{description:typeof i=="string"?i:i.raw,required:!!o,schema:s}),placement:"bottom",children:g.jsx(_.Button,{size:"small",variant:"text",icon:g.jsx(_.InformationIcon,{})})})}):null}function PH(){const t=an(),e=je(),{request:{queryParameters:n,url:r},isRequestEditable:i}=e,o=()=>{r.set(Ik(r.get(),n.get()))},s=(l,c)=>{c&&n.merge([un()]),o()},a=l=>{n[l].set(lt),o()};return g.jsx(sa,{keyName:"Parameters",elements:n,onParameterChange:s,title:"Query Parameters",environment:t,renderDescription:l=>g.jsx(Fx,{paramName:l,paramLocation:"query"}),editable:i.get(),actions:l=>g.jsx($r,{onClick:()=>a(l),variant:"text",icon:g.jsx(_.TrashCanIcon,{})})})}function EH(){const t=an(),{request:{headers:e},isRequestEditable:n}=je();function r(o,s){s&&e.merge([un()])}function i(o){e[o].set(lt)}return g.jsx(sa,{keyName:"Header",elements:e,onParameterChange:r,title:"Header Parameters",environment:t,renderDescription:o=>g.jsx(Fx,{paramName:o,paramLocation:"header"}),editable:n.get(),actions:o=>g.jsx($r,{onClick:()=>i(o),variant:"text",icon:g.jsx(_.TrashCanIcon,{})})})}function IH(){const t=an(),{request:{cookies:e},isRequestEditable:n}=je();function r(o,s){s&&e.merge([un()])}function i(o){e[o].set(lt)}return g.jsx(sa,{keyName:"Cookie",elements:e,onParameterChange:r,title:"Cookies",environment:t,renderDescription:o=>g.jsx(Fx,{paramName:o,paramLocation:"cookie"}),editable:n.get(),actions:o=>g.jsx($r,{onClick:()=>i(o),variant:"text",icon:g.jsx(_.TrashCanIcon,{})})})}const ro={SECURITY:"Security",BODY:"Body",QUERY:"Query",HEADERS:"Headers",COOKIES:"Cookies"},Oi=[{name:ro.SECURITY,content:dU,icon:g.jsx(_.SecurityIcon,{})},{name:ro.BODY,content:HU,icon:g.jsx(_.CodeIcon,{})},{name:ro.QUERY,content:PH,icon:g.jsx(_.DataFormatIcon,{})},{name:ro.HEADERS,content:EH,icon:g.jsx(_.TableBuiltIcon,{})},{name:ro.COOKIES,content:IH,icon:g.jsx(_.CookieIcon,{})}],TH=Oi.findIndex(t=>t.name===ro.BODY),x$=Oi.findIndex(t=>t.name===ro.QUERY),$H=Oi.findIndex(t=>t.name===ro.SECURITY),jH={requestController:void 0,request:{method:"GET",url:"",security:{securitySchemeVariants:[],selectedSecuritySchemeId:"",securities:[fs()]},body:to(),queryParameters:[un()],headers:[un()],cookies:[un()]},isProcessingRequest:!1,response:null,requestError:null,history:[],collections:[],operation:null,operationUrl:void 0,isLinked:!0,environments:[D4],selectedEnvironmentId:null,corsProxyUrl:void 0,mockServer:void 0,appsLoadingState:ri.Idle,apps:[],apiId:void 0,requestActiveTabIdx:x$,oAuth2RedirectURI:void 0,isRequestEditable:!0,tokenRequestError:null,definitionUrl:void 0,transactionSource:null,showUnsavedChangesModal:!1,pendingTransaction:null,pendingTransactionSource:null,disableCollectionsTab:!1,certificates:[]};function Cc(){return structuredClone(jH)}const RH=lO(Cc());lO(fs());const v$=j.createContext(RH),DH=v$.Provider;function je(){const t=j.useContext(v$);return y4(t)}class y${static save(e,n){const r=this.get();r[e]=n;const i=JSON.stringify(r);sessionStorage.setItem(Xh,i)}static get(){try{const e=sessionStorage.getItem(Xh);if(e)return JSON.parse(e)}catch(e){console.error("Error parsing serialized data:",e)}return{}}static getByKey(e){return this.get()[e]||null}static clear(){sessionStorage.removeItem(Xh)}}function QH(t,e){const n=yn(t);return e.forEach(r=>{const i=n.find(o=>o.name===r.name);i?i.variables=r.variables:n.push(r)}),n}class ml{static save(e){const n=e.map(o=>{const s=o.variables.filter(a=>a.type!==Sr.ServerUrl);return{...o,variables:s}}),r=this.get(),i=QH(r,n);localStorage.setItem(Gh,JSON.stringify(i))}static get(){try{const e=localStorage.getItem(Gh);if(e)return JSON.parse(e)}catch(e){console.error("Error parsing serialized data:",e)}return[]}static getEnvironmentByName(e){var n;return((n=this.get())==null?void 0:n.find(r=>r.name===e))||null}static getEnvironmentVariableByName(e,n,r){const i=this.getEnvironmentByName(e);return i?r?i==null?void 0:i.variables.find(o=>o.name===n&&o.type===r):i==null?void 0:i.variables.find(o=>o.name===n):null}static clear(){localStorage.removeItem(Gh)}}function BH(t,e){const{servers:n,parameters:r}=t,i=r.filter(s=>s.in==="path"),o=_H(t);return n.map(s=>{const a=s.url,l=s.description||a,c=s.variables||{},u=Object.entries(c).map(([O,m])=>{const x=ml.getEnvironmentVariableByName(l,O,Sr.Server);return{id:crypto.randomUUID(),name:O,value:(x==null?void 0:x.value)||m.default||"",type:Sr.Server,canBeRemoved:!1,canBeEdited:!0,readonlyName:!0}}),f=i.map(({name:O})=>{const m=ml.getEnvironmentVariableByName(l,O,Sr.Path);return{id:crypto.randomUUID(),name:O,value:(m==null?void 0:m.value)||"",type:Sr.Path,canBeRemoved:!1,canBeEdited:!0,readonlyName:!0}}),d=o.map(O=>{const m=ml.getEnvironmentVariableByName(l,O.name,Sr.Security);return{...O,value:(m==null?void 0:m.value)||O.value||""}}),h=ml.getEnvironmentByName(l),p=(h==null?void 0:h.variables.filter(O=>O.type===Sr.UserCreated))||[];return{id:crypto.randomUUID(),name:l,url:a,state:br.Normal,canBeRemoved:!1,canBeEdited:!1,variables:MH([...p,{id:crypto.randomUUID(),name:"server",value:nh(a),type:Sr.ServerUrl,canBeRemoved:!1,canBeEdited:!1},...u,...f,...d],e==null?void 0:e[l])}})}function _H(t){var i;const e=[],n=((i=t.security)==null?void 0:i.flat())||[],r=new Set;return n.forEach(o=>{const s=jx(o);if(r.has(s))return;const a=o.id;r.add(s),(s===K.BasicAuth||s===K.DigestAuth)&&(e.push(Br(a+_.SecurityVariablesEnvSuffix.Username,!1)),e.push(Br(a+_.SecurityVariablesEnvSuffix.Password))),s===K.JWT&&e.push(Br(a+_.SecurityVariablesEnvSuffix.JWTToken)),s===K.APIKey&&e.push(Br(a+_.SecurityVariablesEnvSuffix.APIKey)),s===K.OAuth2&&(e.push(Br(a+_.SecurityVariablesEnvSuffix.Token)),Rx(o).forEach(c=>{e.push(Br(a+_.SecurityVariablesEnvSuffix.ClientId)),[se.Implicit,se.ClientCredentialsWithJwtAssertion].includes(c)||e.push(Br(a+_.SecurityVariablesEnvSuffix.ClientSecret)),c===se.ClientCredentialsWithJwtAssertion&&e.push(Br(a+_.SecurityVariablesEnvSuffix.ClientAssertion))})),s===K.OpenIDConnect&&(e.push(Br(a+_.SecurityVariablesEnvSuffix.Token)),e.push(Br(a+_.SecurityVariablesEnvSuffix.ClientId)),e.push(Br(a+_.SecurityVariablesEnvSuffix.ClientSecret)))}),e}function Br(t,e){return{id:crypto.randomUUID(),name:t,value:"",type:Sr.Security,canBeRemoved:!1,canBeEdited:!0,isSecret:e===void 0?!0:e}}function MH(t,e){return e?t.map(n=>{const r=e[n.name];return r!==void 0?{...n,canBeRemoved:!1,value:n.type===Sr.ServerUrl?nh(r):r}:n}):t}var sn=(t=>(t.Folder="folder",t.Request="request",t))(sn||{}),gt=(t=>(t.Normal="Normal",t.Edit="Edit",t.Draft="Draft",t))(gt||{});function b$(t,e){let n=null;return e.forEach(r=>{if(r.type.get()===sn.Folder){const i=r.nested("value"),o=b$(t,i.items);o&&(n=o)}else if(r.nested("value").id.get()===t){const i=r.nested("value");i&&(n=i)}}),n}function Zx(){const{collections:t,transactionSource:e}=je();return j.useMemo(()=>{const r=e.get();if(r)return b$(r.id,t)},[e,t])}function ah(){const{request:t,response:e,transactionSource:n,showUnsavedChangesModal:r,pendingTransaction:i,pendingTransactionSource:o}=je(),s=Zx(),a=()=>{var p;return((p=n.get())==null?void 0:p.type)==="collection"?!g0(If(t.get({noproxy:!0,stealth:!0})),If(s==null?void 0:s.get({noproxy:!0,stealth:!0}).request)):!1},l=(h,p)=>{a()?(r.set(!0),i.set(h),o.set(p)):(t.set(yn(h.request)),e.set(yn(h.response)),n.set(p),i.set(null),o.set(null))},c=(h,p)=>{h&&(t.set(yn(h.request)),e.set(yn(h==null?void 0:h.response))),n.set(p)},u=()=>{r.set(!1)},f=()=>{r.set(!1),c(i.get(),o.get({noproxy:!0}))},d=()=>{r.set(!1),s==null||s.merge({request:yn(t.get({noproxy:!0})),response:yn(e.get({noproxy:!0}))}),c(i.get(),o.get({noproxy:!0}))};return{selectedTransaction:s,showUnsavedChangesModal:r,isTransactionChanged:a(),updateTransaction:l,onClose:u,onDiscard:f,onSave:d}}function NH(t){const{operation:e,request:n}=t,r=n.body;$x(e.get({noproxy:!0}))[r.type.get({noproxy:!0})]||r.set(FT(e.get({noproxy:!0})))}function Wx({value:t,disableDraft:e,...n}){const r=je(),{updateTransaction:i}=ah(),{operation:o,corsProxyUrl:s,environments:a,operationUrl:l,mockServer:c,selectedEnvironmentId:u,apiId:f,oAuth2RedirectURI:d,definitionUrl:h,disableCollectionsTab:p,certificates:O}=r;return j.useEffect(()=>{O.set(n.certificates||[])},[n.certificates]),j.useEffect(()=>{var x;const m=n.operationUrl&&!e?y$.getByKey(n.operationUrl):null;if(t){const v=yn(t),y=BH(v,n.predefinedEnvValues),S=y.find(({name:w,url:C})=>C===(n==null?void 0:n.environment)||w===(n==null?void 0:n.environment));o.set(v),a.set(y),S&&u.set(S.id);const b=m?{...m,body:{...m.body,activeExampleName:(x=v.body)==null?void 0:x.activeExampleName}}:Tx(v);i({request:b,response:null},null)}s.set(n.corsProxyUrl??PG),l.set(n.operationUrl),c.set(n.mockServer),f.set(n.apiId),d.set(n.oAuth2RedirectURI),h.set(n.definitionUrl),p.set(n.disableCollectionsTab),MT(r),NH(r)},[t]),r}const{createElement:va,createContext:FH,createRef:Noe,forwardRef:S$,useCallback:Gn,useContext:w$,useEffect:Uo,useImperativeHandle:C$,useLayoutEffect:ZH,useMemo:WH,useRef:dr,useState:md}=X,$C=X.useId,lh=FH(null);lh.displayName="PanelGroupContext";const nc=ZH,VH=typeof $C=="function"?$C:()=>null;let zH=0;function Vx(t=null){const e=VH(),n=dr(t||e||null);return n.current===null&&(n.current=""+zH++),t??n.current}function k$({children:t,className:e="",collapsedSize:n,collapsible:r,defaultSize:i,forwardedRef:o,id:s,maxSize:a,minSize:l,onCollapse:c,onExpand:u,onResize:f,order:d,style:h,tagName:p="div",...O}){const m=w$(lh);if(m===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:x,expandPanel:v,getPanelSize:y,getPanelStyle:S,groupId:b,isPanelCollapsed:w,reevaluatePanelConstraints:C,registerPanel:k,resizePanel:I,unregisterPanel:A}=m,E=Vx(s),$=dr({callbacks:{onCollapse:c,onExpand:u,onResize:f},constraints:{collapsedSize:n,collapsible:r,defaultSize:i,maxSize:a,minSize:l},id:E,idIsFromProps:s!==void 0,order:d});dr({didLogMissingDefaultSizeWarning:!1}),nc(()=>{const{callbacks:M,constraints:Q}=$.current,Z={...Q};$.current.id=E,$.current.idIsFromProps=s!==void 0,$.current.order=d,M.onCollapse=c,M.onExpand=u,M.onResize=f,Q.collapsedSize=n,Q.collapsible=r,Q.defaultSize=i,Q.maxSize=a,Q.minSize=l,(Z.collapsedSize!==Q.collapsedSize||Z.collapsible!==Q.collapsible||Z.maxSize!==Q.maxSize||Z.minSize!==Q.minSize)&&C($.current,Z)}),nc(()=>{const M=$.current;return k(M),()=>{A(M)}},[d,E,k,A]),C$(o,()=>({collapse:()=>{x($.current)},expand:()=>{v($.current)},getId(){return E},getSize(){return y($.current)},isCollapsed(){return w($.current)},isExpanded(){return!w($.current)},resize:M=>{I($.current,M)}}),[x,v,y,w,E,I]);const R=S($.current,i);return va(p,{...O,children:t,className:e,style:{...R,...h},"data-panel":"","data-panel-id":E,"data-panel-group-id":b,"data-panel-collapsible":void 0,"data-panel-size":void 0})}const Lm=S$((t,e)=>va(k$,{...t,forwardedRef:e}));k$.displayName="Panel";Lm.displayName="forwardRef(Panel)";function Me(t,e="Assertion failed!"){if(!t)throw console.error(e),Error(e)}const A$=10;function rc(t,e,n=A$){t=parseFloat(t.toFixed(n)),e=parseFloat(e.toFixed(n));const r=t-e;return r===0?0:r>0?1:-1}function ur(t,e,n){return rc(t,e,n)===0}function Ms({panelConstraints:t,panelIndex:e,size:n}){const r=t[e];Me(r!=null);let{collapsedSize:i=0,collapsible:o,maxSize:s=100,minSize:a=0}=r;if(rc(n,a)<0)if(o){const l=(i+a)/2;rc(n,l)<0?n=i:n=a}else n=a;return n=Math.min(s,n),n=parseFloat(n.toFixed(A$)),n}function Ol({delta:t,layout:e,panelConstraints:n,pivotIndices:r,trigger:i}){if(ur(t,0))return e;const o=[...e],[s,a]=r;Me(s!=null),Me(a!=null);let l=0;if(i==="keyboard"){{const u=t<0?a:s,f=n[u];if(Me(f),f.collapsible){const d=e[u];Me(d!=null);const h=n[u];Me(h);const{collapsedSize:p=0,minSize:O=0}=h;if(ur(d,p)){const m=O-d;rc(m,Math.abs(t))>0&&(t=t<0?0-m:m)}}}{const u=t<0?s:a,f=n[u];Me(f);const{collapsible:d}=f;if(d){const h=e[u];Me(h!=null);const p=n[u];Me(p);const{collapsedSize:O=0,minSize:m=0}=p;if(ur(h,m)){const x=h-O;rc(x,Math.abs(t))>0&&(t=t<0?0-x:x)}}}}{const u=t<0?1:-1;let f=t<0?a:s,d=0;for(;;){const p=e[f];Me(p!=null);const m=Ms({panelConstraints:n,panelIndex:f,size:100})-p;if(d+=m,f+=u,f<0||f>=n.length)break}const h=Math.min(Math.abs(t),Math.abs(d));t=t<0?0-h:h}{let f=t<0?s:a;for(;f>=0&&f<n.length;){const d=Math.abs(t)-Math.abs(l),h=e[f];Me(h!=null);const p=h-d,O=Ms({panelConstraints:n,panelIndex:f,size:p});if(!ur(h,O)&&(l+=h-O,o[f]=O,l.toPrecision(3).localeCompare(Math.abs(t).toPrecision(3),void 0,{numeric:!0})>=0))break;t<0?f--:f++}}if(ur(l,0))return e;{const u=t<0?a:s,f=e[u];Me(f!=null);const d=f+l,h=Ms({panelConstraints:n,panelIndex:u,size:d});if(o[u]=h,!ur(h,d)){let p=d-h,m=t<0?a:s;for(;m>=0&&m<n.length;){const x=o[m];Me(x!=null);const v=x+p,y=Ms({panelConstraints:n,panelIndex:m,size:v});if(ur(x,y)||(p-=y-x,o[m]=y),ur(p,0))break;t>0?m--:m++}}}const c=o.reduce((u,f)=>f+u,0);return ur(c,100)?o:e}function LH({layout:t,panelsArray:e,pivotIndices:n}){let r=0,i=100,o=0,s=0;const a=n[0];Me(a!=null),e.forEach((f,d)=>{const{constraints:h}=f,{maxSize:p=100,minSize:O=0}=h;d===a?(r=O,i=p):(o+=O,s+=p)});const l=Math.min(i,100-o),c=Math.max(r,100-s),u=t[a];return{valueMax:l,valueMin:c,valueNow:u}}function ic(t,e=document){return Array.from(e.querySelectorAll(`[data-panel-resize-handle-id][data-panel-group-id="${t}"]`))}function P$(t,e,n=document){const i=ic(t,n).findIndex(o=>o.getAttribute("data-panel-resize-handle-id")===e);return i??null}function E$(t,e,n){const r=P$(t,e,n);return r!=null?[r,r+1]:[-1,-1]}function I$(t,e=document){var n;if(e instanceof HTMLElement&&(e==null||(n=e.dataset)===null||n===void 0?void 0:n.panelGroupId)==t)return e;const r=e.querySelector(`[data-panel-group][data-panel-group-id="${t}"]`);return r||null}function ch(t,e=document){const n=e.querySelector(`[data-panel-resize-handle-id="${t}"]`);return n||null}function XH(t,e,n,r=document){var i,o,s,a;const l=ch(e,r),c=ic(t,r),u=l?c.indexOf(l):-1,f=(i=(o=n[u])===null||o===void 0?void 0:o.id)!==null&&i!==void 0?i:null,d=(s=(a=n[u+1])===null||a===void 0?void 0:a.id)!==null&&s!==void 0?s:null;return[f,d]}function GH({committedValuesRef:t,eagerValuesRef:e,groupId:n,layout:r,panelDataArray:i,panelGroupElement:o,setLayout:s}){dr({didWarnAboutMissingResizeHandle:!1}),nc(()=>{if(!o)return;const a=ic(n,o);for(let l=0;l<i.length-1;l++){const{valueMax:c,valueMin:u,valueNow:f}=LH({layout:r,panelsArray:i,pivotIndices:[l,l+1]}),d=a[l];if(d!=null){const h=i[l];Me(h),d.setAttribute("aria-controls",h.id),d.setAttribute("aria-valuemax",""+Math.round(c)),d.setAttribute("aria-valuemin",""+Math.round(u)),d.setAttribute("aria-valuenow",f!=null?""+Math.round(f):"")}}return()=>{a.forEach((l,c)=>{l.removeAttribute("aria-controls"),l.removeAttribute("aria-valuemax"),l.removeAttribute("aria-valuemin"),l.removeAttribute("aria-valuenow")})}},[n,r,i,o]),Uo(()=>{if(!o)return;const a=e.current;Me(a);const{panelDataArray:l}=a,c=I$(n,o);Me(c!=null,`No group found for id "${n}"`);const u=ic(n,o);Me(u);const f=u.map(d=>{const h=d.getAttribute("data-panel-resize-handle-id");Me(h);const[p,O]=XH(n,h,l,o);if(p==null||O==null)return()=>{};const m=x=>{if(!x.defaultPrevented)switch(x.key){case"Enter":{x.preventDefault();const v=l.findIndex(y=>y.id===p);if(v>=0){const y=l[v];Me(y);const S=r[v],{collapsedSize:b=0,collapsible:w,minSize:C=0}=y.constraints;if(S!=null&&w){const k=Ol({delta:ur(S,b)?C-b:b-S,layout:r,panelConstraints:l.map(I=>I.constraints),pivotIndices:E$(n,h,o),trigger:"keyboard"});r!==k&&s(k)}}break}}};return d.addEventListener("keydown",m),()=>{d.removeEventListener("keydown",m)}});return()=>{f.forEach(d=>d())}},[o,t,e,n,r,i,s])}function jC(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function T$(t){return t.type==="keydown"}function $$(t){return t.type.startsWith("mouse")}function j$(t){return t.type.startsWith("touch")}function R$(t,e){const n=t==="horizontal";if($$(e))return n?e.clientX:e.clientY;if(j$(e)){const r=e.touches[0];return Me(r),n?r.screenX:r.screenY}else throw Error(`Unsupported event type "${e.type}"`)}function YH(t,e,n,r,i){const o=n==="horizontal",s=ch(e,i);Me(s);const a=s.getAttribute("data-panel-group-id");Me(a);let{initialCursorPosition:l}=r;const c=R$(n,t),u=I$(a,i);Me(u);const f=u.getBoundingClientRect(),d=o?f.width:f.height;return(c-l)/d*100}function qH(t,e,n,r,i,o){if(T$(t)){const s=n==="horizontal";let a=0;t.shiftKey?a=100:i!=null?a=i:a=10;let l=0;switch(t.key){case"ArrowDown":l=s?0:a;break;case"ArrowLeft":l=s?-a:0;break;case"ArrowRight":l=s?a:0;break;case"ArrowUp":l=s?0:-a;break;case"End":l=100;break;case"Home":l=-100;break}return l}else return r==null?0:YH(t,e,n,r,o)}function UH({panelDataArray:t}){const e=Array(t.length),n=t.map(o=>o.constraints);let r=0,i=100;for(let o=0;o<t.length;o++){const s=n[o];Me(s);const{defaultSize:a}=s;a!=null&&(r++,e[o]=a,i-=a)}for(let o=0;o<t.length;o++){const s=n[o];Me(s);const{defaultSize:a}=s;if(a!=null)continue;const l=t.length-r,c=i/l;r++,e[o]=c,i-=c}return e}function ks(t,e,n){e.forEach((r,i)=>{const o=t[i];Me(o);const{callbacks:s,constraints:a,id:l}=o,{collapsedSize:c=0,collapsible:u}=a,f=n[l];if(f==null||r!==f){n[l]=r;const{onCollapse:d,onExpand:h,onResize:p}=s;p&&p(r,f),u&&(d||h)&&(h&&(f==null||f===c)&&r!==c&&h(),d&&(f==null||f!==c)&&r===c&&d())}})}function Eu(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n])return!1;return!0}function HH({defaultSize:t,dragState:e,layout:n,panelData:r,panelIndex:i,precision:o=3}){const s=n[i];let a;return s==null?a=t??"1":r.length===1?a="1":a=s.toPrecision(o),{flexBasis:0,flexGrow:a,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}let Xm=null,Go=null;function D$(t){switch(t){case"horizontal":return"ew-resize";case"horizontal-max":return"w-resize";case"horizontal-min":return"e-resize";case"vertical":return"ns-resize";case"vertical-max":return"n-resize";case"vertical-min":return"s-resize"}}function JH(){Go!==null&&(document.head.removeChild(Go),Xm=null,Go=null)}function yg(t){if(Xm===t)return;Xm=t;const e=D$(t);Go===null&&(Go=document.createElement("style"),document.head.appendChild(Go)),Go.innerHTML=`*{cursor: ${e}!important;}`}function KH(t,e=10){let n=null;return(...i)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{t(...i)},e)}}function RC(t){try{if(typeof localStorage<"u")t.getItem=e=>localStorage.getItem(e),t.setItem=(e,n)=>{localStorage.setItem(e,n)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),t.getItem=()=>null,t.setItem=()=>{}}}function Q$(t){return`react-resizable-panels:${t}`}function B$(t){return t.map(e=>{const{constraints:n,id:r,idIsFromProps:i,order:o}=e;return i?r:o?`${o}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((e,n)=>e.localeCompare(n)).join(",")}function _$(t,e){try{const n=Q$(t),r=e.getItem(n);if(r){const i=JSON.parse(r);if(typeof i=="object"&&i!=null)return i}}catch{}return null}function eJ(t,e,n){var r,i;const o=(r=_$(t,n))!==null&&r!==void 0?r:{},s=B$(e);return(i=o[s])!==null&&i!==void 0?i:null}function tJ(t,e,n,r,i){var o;const s=Q$(t),a=B$(e),l=(o=_$(t,i))!==null&&o!==void 0?o:{};l[a]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{i.setItem(s,JSON.stringify(l))}catch(c){console.error(c)}}function DC({layout:t,panelConstraints:e}){const n=[...t],r=n.reduce((o,s)=>o+s,0);if(n.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${n.map(o=>`${o}%`).join(", ")}`);if(!ur(r,100))for(let o=0;o<e.length;o++){const s=n[o];Me(s!=null);const a=100/r*s;n[o]=a}let i=0;for(let o=0;o<e.length;o++){const s=n[o];Me(s!=null);const a=Ms({panelConstraints:e,panelIndex:o,size:s});s!=a&&(i+=s-a,n[o]=a)}if(!ur(i,0))for(let o=0;o<e.length;o++){const s=n[o];Me(s!=null);const a=s+i,l=Ms({panelConstraints:e,panelIndex:o,size:a});if(s!==l&&(i-=l-s,n[o]=l,ur(i,0)))break}return n}const nJ=100,xl={getItem:t=>(RC(xl),xl.getItem(t)),setItem:(t,e)=>{RC(xl),xl.setItem(t,e)}},QC={};function M$({autoSaveId:t=null,children:e,className:n="",direction:r,forwardedRef:i,id:o=null,onLayout:s=null,keyboardResizeBy:a=null,storage:l=xl,style:c,tagName:u="div",...f}){const d=Vx(o),h=dr(null),[p,O]=md(null),[m,x]=md([]),v=dr({}),y=dr(new Map),S=dr(0),b=dr({autoSaveId:t,direction:r,dragState:p,id:d,keyboardResizeBy:a,onLayout:s,storage:l}),w=dr({layout:m,panelDataArray:[],panelDataArrayChanged:!1});dr({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),C$(i,()=>({getId:()=>b.current.id,getLayout:()=>{const{layout:D}=w.current;return D},setLayout:D=>{const{onLayout:B}=b.current,{layout:N,panelDataArray:U}=w.current,F=DC({layout:D,panelConstraints:U.map(te=>te.constraints)});jC(N,F)||(x(F),w.current.layout=F,B&&B(F),ks(U,F,v.current))}}),[]),nc(()=>{b.current.autoSaveId=t,b.current.direction=r,b.current.dragState=p,b.current.id=d,b.current.onLayout=s,b.current.storage=l}),GH({committedValuesRef:b,eagerValuesRef:w,groupId:d,layout:m,panelDataArray:w.current.panelDataArray,setLayout:x,panelGroupElement:h.current}),Uo(()=>{const{panelDataArray:D}=w.current;if(t){if(m.length===0||m.length!==D.length)return;let B=QC[t];B==null&&(B=KH(tJ,nJ),QC[t]=B);const N=[...D],U=new Map(y.current);B(t,N,U,m,l)}},[t,m,l]),Uo(()=>{});const C=Gn(D=>{const{onLayout:B}=b.current,{layout:N,panelDataArray:U}=w.current;if(D.constraints.collapsible){const F=U.map(re=>re.constraints),{collapsedSize:te=0,panelSize:L,pivotIndices:ce}=No(U,D,N);if(Me(L!=null),L!==te){y.current.set(D.id,L);const ae=Ts(U,D)===U.length-1?L-te:te-L,H=Ol({delta:ae,layout:N,panelConstraints:F,pivotIndices:ce,trigger:"imperative-api"});Eu(N,H)||(x(H),w.current.layout=H,B&&B(H),ks(U,H,v.current))}}},[]),k=Gn(D=>{const{onLayout:B}=b.current,{layout:N,panelDataArray:U}=w.current;if(D.constraints.collapsible){const F=U.map(ae=>ae.constraints),{collapsedSize:te=0,panelSize:L,minSize:ce=0,pivotIndices:re}=No(U,D,N);if(L===te){const ae=y.current.get(D.id),H=ae!=null&&ae>=ce?ae:ce,q=Ts(U,D)===U.length-1?L-H:H-L,ne=Ol({delta:q,layout:N,panelConstraints:F,pivotIndices:re,trigger:"imperative-api"});Eu(N,ne)||(x(ne),w.current.layout=ne,B&&B(ne),ks(U,ne,v.current))}}},[]),I=Gn(D=>{const{layout:B,panelDataArray:N}=w.current,{panelSize:U}=No(N,D,B);return Me(U!=null),U},[]),A=Gn((D,B)=>{const{panelDataArray:N}=w.current,U=Ts(N,D);return HH({defaultSize:B,dragState:p,layout:m,panelData:N,panelIndex:U})},[p,m]),E=Gn(D=>{const{layout:B,panelDataArray:N}=w.current,{collapsedSize:U=0,collapsible:F,panelSize:te}=No(N,D,B);return F===!0&&te===U},[]),$=Gn(D=>{const{layout:B,panelDataArray:N}=w.current,{collapsedSize:U=0,collapsible:F,panelSize:te}=No(N,D,B);return Me(te!=null),!F||te>U},[]),R=Gn(D=>{const{panelDataArray:B}=w.current;B.push(D),B.sort((N,U)=>{const F=N.order,te=U.order;return F==null&&te==null?0:F==null?-1:te==null?1:F-te}),w.current.panelDataArrayChanged=!0},[]);nc(()=>{if(w.current.panelDataArrayChanged){w.current.panelDataArrayChanged=!1;const{autoSaveId:D,onLayout:B,storage:N}=b.current,{layout:U,panelDataArray:F}=w.current;let te=null;if(D){const ce=eJ(D,F,N);ce&&(y.current=new Map(Object.entries(ce.expandToSizes)),te=ce.layout)}te==null&&(te=UH({panelDataArray:F}));const L=DC({layout:te,panelConstraints:F.map(ce=>ce.constraints)});jC(U,L)||(x(L),w.current.layout=L,B&&B(L),ks(F,L,v.current))}});const M=Gn(D=>function(N){N.preventDefault();const U=h.current;if(!U)return()=>null;const{direction:F,dragState:te,id:L,keyboardResizeBy:ce,onLayout:re}=b.current,{layout:ae,panelDataArray:H}=w.current,{initialLayout:pe}=te??{},q=E$(L,D,U);let ne=qH(N,D,F,te,ce,U);if(ne===0)return;const he=F==="horizontal";document.dir==="rtl"&&he&&(ne=-ne);const ve=H.map(Ee=>Ee.constraints),Re=Ol({delta:ne,layout:pe??ae,panelConstraints:ve,pivotIndices:q,trigger:T$(N)?"keyboard":"mouse-or-touch"}),ye=!Eu(ae,Re);($$(N)||j$(N))&&S.current!=ne&&(S.current=ne,yg(ye?he?"horizontal":"vertical":he?ne<0?"horizontal-min":"horizontal-max":ne<0?"vertical-min":"vertical-max")),ye&&(x(Re),w.current.layout=Re,re&&re(Re),ks(H,Re,v.current))},[]),Q=Gn((D,B)=>{const{onLayout:N}=b.current,{layout:U,panelDataArray:F}=w.current,te=F.map(pe=>pe.constraints),{panelSize:L,pivotIndices:ce}=No(F,D,U);Me(L!=null);const ae=Ts(F,D)===F.length-1?L-B:B-L,H=Ol({delta:ae,layout:U,panelConstraints:te,pivotIndices:ce,trigger:"imperative-api"});Eu(U,H)||(x(H),w.current.layout=H,N&&N(H),ks(F,H,v.current))},[]),Z=Gn((D,B)=>{const{layout:N,panelDataArray:U}=w.current,{collapsedSize:F=0,collapsible:te,defaultSize:L,maxSize:ce=100,minSize:re=0}=B,{collapsedSize:ae=0,collapsible:H,defaultSize:pe,maxSize:q=100,minSize:ne=0}=D.constraints,{panelSize:he}=No(U,D,N);Me(he!=null),te&&H&&F!==ae&&he===F?Q(D,ae):he<ne?Q(D,ne):he>q&&Q(D,q)},[Q]),G=Gn((D,B)=>{const{direction:N}=b.current,{layout:U}=w.current;if(!h.current)return;const F=ch(D,h.current);Me(F);const te=R$(N,B);O({dragHandleId:D,dragHandleRect:F.getBoundingClientRect(),initialCursorPosition:te,initialLayout:U})},[]),V=Gn(()=>{JH(),O(null)},[]),ee=Gn(D=>{const{panelDataArray:B}=w.current,N=Ts(B,D);N>=0&&(B.splice(N,1),delete v.current[D.id],w.current.panelDataArrayChanged=!0)},[]),Y=WH(()=>({collapsePanel:C,direction:r,dragState:p,expandPanel:k,getPanelSize:I,getPanelStyle:A,groupId:d,isPanelCollapsed:E,isPanelExpanded:$,reevaluatePanelConstraints:Z,registerPanel:R,registerResizeHandle:M,resizePanel:Q,startDragging:G,stopDragging:V,unregisterPanel:ee,panelGroupElement:h.current}),[C,p,r,k,I,A,d,E,$,Z,R,M,Q,G,V,ee]),z={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return va(lh.Provider,{value:Y},va(u,{...f,children:e,className:n,style:{...z,...c},ref:h,"data-panel-group":"","data-panel-group-direction":r,"data-panel-group-id":d}))}const N$=S$((t,e)=>va(M$,{...t,forwardedRef:e}));M$.displayName="PanelGroup";N$.displayName="forwardRef(PanelGroup)";function Ts(t,e){return t.findIndex(n=>n===e||n.id===e.id)}function No(t,e,n){const r=Ts(t,e),o=r===t.length-1?[r-1,r]:[r,r+1],s=n[r];return{...e.constraints,panelSize:s,pivotIndices:o}}function rJ({disabled:t,handleId:e,resizeHandler:n,panelGroupElement:r}){Uo(()=>{if(t||n==null||r==null)return;const i=ch(e,r);if(i==null)return;const o=s=>{if(!s.defaultPrevented)switch(s.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{s.preventDefault(),n(s);break}case"F6":{s.preventDefault();const a=i.getAttribute("data-panel-group-id");Me(a);const l=ic(a,r),c=P$(a,e,r);Me(c!==null);const u=s.shiftKey?c>0?c-1:l.length-1:c+1<l.length?c+1:0;l[u].focus();break}}};return i.addEventListener("keydown",o),()=>{i.removeEventListener("keydown",o)}},[r,t,e,n])}function F$({children:t=null,className:e="",disabled:n=!1,id:r,onDragging:i,style:o={},tabIndex:s=0,tagName:a="div",...l}){const c=dr(null),u=dr({onDragging:i});Uo(()=>{u.current.onDragging=i});const f=w$(lh);if(f===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:d,dragState:h,groupId:p,registerResizeHandle:O,startDragging:m,stopDragging:x,panelGroupElement:v}=f,y=Vx(r),S=(h==null?void 0:h.dragHandleId)===y,[b,w]=md(!1),[C,k]=md(null),I=Gn(()=>{const E=c.current;Me(E),E.blur(),x();const{onDragging:$}=u.current;$&&$(!1)},[x]);Uo(()=>{if(n)k(null);else{const E=O(y);k(()=>E)}},[n,y,O]),Uo(()=>{if(n||C==null||!S)return;const E=Q=>{C(Q)},$=Q=>{C(Q)},R=c.current;Me(R);const M=R.ownerDocument;return M.body.addEventListener("contextmenu",I),M.body.addEventListener("mousemove",E),M.body.addEventListener("touchmove",E),M.body.addEventListener("mouseleave",$),window.addEventListener("mouseup",I),window.addEventListener("touchend",I),()=>{M.body.removeEventListener("contextmenu",I),M.body.removeEventListener("mousemove",E),M.body.removeEventListener("touchmove",E),M.body.removeEventListener("mouseleave",$),window.removeEventListener("mouseup",I),window.removeEventListener("touchend",I)}},[d,n,S,C,I]),rJ({disabled:n,handleId:y,resizeHandler:C,panelGroupElement:v});const A={cursor:D$(d),touchAction:"none",userSelect:"none"};return va(a,{...l,children:t,className:e,onBlur:()=>w(!1),onFocus:()=>w(!0),onMouseDown:E=>{m(y,E.nativeEvent);const $=u.current;Me($);const{onDragging:R}=$;R&&R(!0)},onMouseUp:I,onTouchCancel:I,onTouchEnd:I,onTouchStart:E=>{m(y,E.nativeEvent);const $=u.current;Me($);const{onDragging:R}=$;R&&R(!0)},ref:c,role:"separator",style:{...A,...o},tabIndex:s,"data-panel-group-direction":d,"data-panel-group-id":p,"data-resize-handle":"","data-resize-handle-active":S?"pointer":b?"keyboard":void 0,"data-panel-resize-handle-enabled":!n,"data-panel-resize-handle-id":y})}F$.displayName="PanelResizeHandle";function iJ({onDoubleClick:t,...e}){return g.jsx(F$,{...e,children:g.jsx(oJ,{onDoubleClick:t,children:g.jsx(Ne,{})})})}const oJ=T.div`
1405
1405
  display: flex;
1406
1406
  justify-content: center;
1407
1407
  padding: var(--spacing-xs) 0;
@@ -1578,7 +1578,7 @@ Please report this to https://github.com/markedjs/marked.`,e.silent)return"<p>An
1578
1578
  width: 55px;
1579
1579
  align-self: center;
1580
1580
  justify-content: center;
1581
- `;function AJ(){const{collections:t}=je();return q$(t)}function q$(t,e=""){let n=[];return t.filter(i=>i.get().type===sn.Folder).forEach(i=>{const o=i.get().value,s=i.nested("value"),a=e?`${e} / ${o.name}`:o.name;n.push({path:a,folder:s,treeItem:i}),o.items.length&&(n=n.concat(q$(s.items,a)))}),n}const Xx=(t,e)=>{const[n,r]=j.useState(t),i=a=>/^[a-zA-Z0-9 _\-]+$/.test(a),o=(a,l)=>{var u;return((u=l==null?void 0:l.get())==null?void 0:u.filter(f=>f.value.name.trim()===a.trim()&&f.value.state===gt.Normal)).length<=0},s=j.useMemo(()=>{const a=!i(n),l=e?!o(n,e):!1;return a||l},[e,n]);return{newName:n,setNewName:r,isValidName:i,isUniqueName:o,disabled:s}};function Gx({className:t,defaultName:e,onChange:n,onSave:r,onCancel:i,level:o=0,placeholder:s="New Folder",siblingItems:a,icon:l}){const{newName:c,setNewName:u,disabled:f}=Xx(e,a),d=j.useRef(null),h=c.trim();j.useEffect(()=>{var m;(m=d.current)==null||m.focus()},[d]);const p=j.useCallback(m=>{m.key==="Escape"&&(i==null||i()),m.key==="Enter"&&!f&&r(h)},[i,r,h,f]),O=m=>{u(m.target.value),n==null||n(m)};return g.jsx(Po,{onClickOutside:i,children:g.jsxs(PJ,{$level:o,className:t,onKeyDown:p,children:[g.jsx(kJ,{children:l}),g.jsx(Ho,{ref:d,"data-testid":"edit-item-header-input",type:"text",placeholder:s,value:c,onChange:O}),g.jsx(_C,{"data-testid":"edit-item-header-save-button",variant:"primary",size:"small",onClick:()=>r(c.trim()),disabled:f,icon:g.jsx(_.CheckmarkIcon,{})}),g.jsx(_C,{"data-testid":"edit-item-header-cancel-button",variant:"text",size:"small",onClick:i,icon:g.jsx(_.CloseIcon,{})})]})})}const PJ=T.div`
1581
+ `;function AJ(){const{collections:t}=je();return q$(t)}function q$(t,e=""){let n=[];return t.filter(i=>i.get().type===sn.Folder).forEach(i=>{const o=i.get().value,s=i.nested("value"),a=e?`${e} / ${o.name}`:o.name;n.push({path:a,folder:s,treeItem:i}),o.items.length&&(n=n.concat(q$(s.items,a)))}),n}const Xx=(t,e)=>{const[n,r]=j.useState(t),i=a=>/^[a-zA-Z0-9 _\-]+$/.test(a),o=(a,l)=>{var u;return((u=l==null?void 0:l.get())==null?void 0:u.filter(f=>f.value.name.trim()===a.trim()&&f.value.state===gt.Normal)).length<=0},s=j.useMemo(()=>{const a=!i(n),l=e?!o(n,e):!1;return a||l},[e,n]);return{newName:n,setNewName:r,isValidName:i,isUniqueName:o,disabled:s}};function Gx({className:t,defaultName:e,onChange:n,onSave:r,onCancel:i,level:o=0,placeholder:s="New Folder",siblingItems:a,icon:l}){const{newName:c,setNewName:u,disabled:f}=Xx(e,a),d=j.useRef(null),h=c.trim();j.useEffect(()=>{var m;(m=d.current)==null||m.focus()},[d]);const p=j.useCallback(m=>{m.key==="Escape"&&(i==null||i()),m.key==="Enter"&&!f&&r(h)},[i,r,h,f]),O=m=>{u(m.target.value),n==null||n(m)};return g.jsx(Po,{onClickOutside:i,children:g.jsxs(PJ,{$level:o,className:t,onKeyDown:p,children:[g.jsx(kJ,{children:l}),g.jsx(Jo,{ref:d,"data-testid":"edit-item-header-input",type:"text",placeholder:s,value:c,onChange:O}),g.jsx(_C,{"data-testid":"edit-item-header-save-button",variant:"primary",size:"small",onClick:()=>r(c.trim()),disabled:f,icon:g.jsx(_.CheckmarkIcon,{})}),g.jsx(_C,{"data-testid":"edit-item-header-cancel-button",variant:"text",size:"small",onClick:i,icon:g.jsx(_.CloseIcon,{})})]})})}const PJ=T.div`
1582
1582
  display: flex;
1583
1583
  align-items: center;
1584
1584
  gap: 4px;
@@ -1593,7 +1593,7 @@ Please report this to https://github.com/markedjs/marked.`,e.silent)return"<p>An
1593
1593
  & + & {
1594
1594
  margin-left: 0;
1595
1595
  }
1596
- `;function ba(t,e){let n=e,r=1;const i=new Set(t.map(o=>o.value.name));for(;i.has(n);)r++,n=`${e} ${r}`;return n}function EJ({transaction:t,onClose:e}){const{collections:n}=je(),r=AJ(),[i,o]=j.useState("New Collection"),[s,a]=j.useState(null),[l,c]=j.useState(""),u=j.useMemo(()=>{var S;return(S=r.find(b=>b.folder.get().id===s))==null?void 0:S.folder.items},[s,r]),{newName:f,setNewName:d,disabled:h}=Xx("New Request",u),p=(r.length?!s:!i.trim())||h,O=j.useMemo(()=>r.filter(S=>S.path.toLowerCase().includes(l.toLowerCase())),[l,r]),m=S=>{c(S)},x=()=>{const S={type:sn.Request,value:{id:crypto.randomUUID(),state:gt.Normal,name:f,request:t.request,response:t.response}};if(r.length){const b=r.find(w=>w.folder.get().id===s);b&&b.folder.items.merge([S])}else{const b={type:sn.Folder,value:{id:crypto.randomUUID(),state:gt.Normal,name:i,items:[S]}};n.merge([b,...n.get()])}e==null||e()},v=()=>{c("");const S=ba(n.get(),"New Collection");n.set(b=>[{type:sn.Folder,value:{id:crypto.randomUUID(),state:gt.Draft,name:S,items:[]}},...b])},y=(S,b)=>{S.length&&b.name.set(S),b.state.set(gt.Normal)};return g.jsxs(IJ,{children:[g.jsxs(TJ,{children:[g.jsx("h4",{children:"Save request"}),g.jsx(_.Button,{variant:"text",onClick:()=>e==null?void 0:e(),icon:g.jsx(_.CloseIcon,{})})]}),g.jsx(Vs,{children:g.jsx("b",{children:"Request name"})}),g.jsx(Ho,{type:"text",placeholder:"Enter name",value:f,onChange:S=>d(S.target.value)}),r.length?g.jsxs(g.Fragment,{children:[g.jsx(Vs,{children:g.jsx("b",{children:"Save to"})}),g.jsxs(jJ,{children:[g.jsx(_J,{value:l,onSearch:m}),g.jsx(RJ,{children:O.length?O.map(S=>{const{id:b,name:w,state:C}=S.folder.get();return C!==gt.Normal?g.jsx(BJ,{defaultName:w,siblingItems:n,onSave:k=>y(k,S.folder),onCancel:()=>S.treeItem.set(lt),icon:g.jsx(_.FolderAddIcon,{size:"14px",color:"--icon-color-disabled"})}):g.jsxs(DJ,{onClick:()=>a(b),children:[g.jsx(NJ,{children:s===b?g.jsx(_.CheckmarkIcon,{size:"14px"}):g.jsx(_.FolderIcon,{size:"14px"})}),g.jsx(FJ,{title:S.path,children:S.path})]},b)}):g.jsx(MJ,{children:"No collections found"})})]})]}):g.jsxs(g.Fragment,{children:[g.jsx(Vs,{children:g.jsx("b",{children:"Collection name"})}),g.jsx(Ho,{type:"text",placeholder:"New Collection",value:i,onChange:S=>o(S.target.value)})]}),g.jsxs($J,{children:[g.jsx(MC,{children:r.length?g.jsx(_.Button,{variant:"ghost",icon:g.jsx(_.AddIcon,{}),onClick:v,children:"New Collection"}):null}),g.jsxs(MC,{children:[g.jsx(_.Button,{variant:"outlined",size:"small",onClick:()=>{e==null||e()},children:"Cancel"}),g.jsx(QJ,{variant:"primary",size:"small",onClick:x,disabled:p,children:"Save"})]})]})]})}function U$({children:t,transaction:e}){const{collections:n}=je(),[r,i]=j.useState(!1),o=()=>{i(a=>!a)},s=()=>{n.forEach(a=>{a.get().value.state===gt.Draft&&a.set(lt)}),i(!1)};return r?g.jsx(Ia,{trigger:["click"],showArrow:!0,placement:"bottomRight",visible:r,overlayStyle:{zIndex:"1000",position:"absolute"},overlay:g.jsx(Po,{onClickOutside:s,children:g.jsx(EJ,{transaction:e,onClose:s})}),children:g.jsx("div",{onClick:o,children:t})}):g.jsx("div",{onClick:o,children:t})}const IJ=T(Ao)`
1596
+ `;function ba(t,e){let n=e,r=1;const i=new Set(t.map(o=>o.value.name));for(;i.has(n);)r++,n=`${e} ${r}`;return n}function EJ({transaction:t,onClose:e}){const{collections:n}=je(),r=AJ(),[i,o]=j.useState("New Collection"),[s,a]=j.useState(null),[l,c]=j.useState(""),u=j.useMemo(()=>{var S;return(S=r.find(b=>b.folder.get().id===s))==null?void 0:S.folder.items},[s,r]),{newName:f,setNewName:d,disabled:h}=Xx("New Request",u),p=(r.length?!s:!i.trim())||h,O=j.useMemo(()=>r.filter(S=>S.path.toLowerCase().includes(l.toLowerCase())),[l,r]),m=S=>{c(S)},x=()=>{const S={type:sn.Request,value:{id:crypto.randomUUID(),state:gt.Normal,name:f,request:t.request,response:t.response}};if(r.length){const b=r.find(w=>w.folder.get().id===s);b&&b.folder.items.merge([S])}else{const b={type:sn.Folder,value:{id:crypto.randomUUID(),state:gt.Normal,name:i,items:[S]}};n.merge([b,...n.get()])}e==null||e()},v=()=>{c("");const S=ba(n.get(),"New Collection");n.set(b=>[{type:sn.Folder,value:{id:crypto.randomUUID(),state:gt.Draft,name:S,items:[]}},...b])},y=(S,b)=>{S.length&&b.name.set(S),b.state.set(gt.Normal)};return g.jsxs(IJ,{children:[g.jsxs(TJ,{children:[g.jsx("h4",{children:"Save request"}),g.jsx(_.Button,{variant:"text",onClick:()=>e==null?void 0:e(),icon:g.jsx(_.CloseIcon,{})})]}),g.jsx(Vs,{children:g.jsx("b",{children:"Request name"})}),g.jsx(Jo,{type:"text",placeholder:"Enter name",value:f,onChange:S=>d(S.target.value)}),r.length?g.jsxs(g.Fragment,{children:[g.jsx(Vs,{children:g.jsx("b",{children:"Save to"})}),g.jsxs(jJ,{children:[g.jsx(_J,{value:l,onSearch:m}),g.jsx(RJ,{children:O.length?O.map(S=>{const{id:b,name:w,state:C}=S.folder.get();return C!==gt.Normal?g.jsx(BJ,{defaultName:w,siblingItems:n,onSave:k=>y(k,S.folder),onCancel:()=>S.treeItem.set(lt),icon:g.jsx(_.FolderAddIcon,{size:"14px",color:"--icon-color-disabled"})}):g.jsxs(DJ,{onClick:()=>a(b),children:[g.jsx(NJ,{children:s===b?g.jsx(_.CheckmarkIcon,{size:"14px"}):g.jsx(_.FolderIcon,{size:"14px"})}),g.jsx(FJ,{title:S.path,children:S.path})]},b)}):g.jsx(MJ,{children:"No collections found"})})]})]}):g.jsxs(g.Fragment,{children:[g.jsx(Vs,{children:g.jsx("b",{children:"Collection name"})}),g.jsx(Jo,{type:"text",placeholder:"New Collection",value:i,onChange:S=>o(S.target.value)})]}),g.jsxs($J,{children:[g.jsx(MC,{children:r.length?g.jsx(_.Button,{variant:"ghost",icon:g.jsx(_.AddIcon,{}),onClick:v,children:"New Collection"}):null}),g.jsxs(MC,{children:[g.jsx(_.Button,{variant:"outlined",size:"small",onClick:()=>{e==null||e()},children:"Cancel"}),g.jsx(QJ,{variant:"primary",size:"small",onClick:x,disabled:p,children:"Save"})]})]})]})}function U$({children:t,transaction:e}){const{collections:n}=je(),[r,i]=j.useState(!1),o=()=>{i(a=>!a)},s=()=>{n.forEach(a=>{a.get().value.state===gt.Draft&&a.set(lt)}),i(!1)};return r?g.jsx(Ia,{trigger:["click"],showArrow:!0,placement:"bottomRight",visible:r,overlayStyle:{zIndex:"1000",position:"absolute"},overlay:g.jsx(Po,{onClickOutside:s,children:g.jsx(EJ,{transaction:e,onClose:s})}),children:g.jsx("div",{onClick:o,children:t})}):g.jsx("div",{onClick:o,children:t})}const IJ=T(Ao)`
1597
1597
  display: flex;
1598
1598
  flex-direction: column;
1599
1599
  gap: var(--spacing-xs);
@@ -1777,7 +1777,7 @@ Please report this to https://github.com/markedjs/marked.`,e.silent)return"<p>An
1777
1777
  `,sK=T(dc)`
1778
1778
  padding-left: 39px;
1779
1779
  margin-left: -23px;
1780
- `;function aK({defaultName:t,onChange:e,onApplyNewName:n,onCancelEditing:r,icon:i,placeholder:o="New Folder"}){const[s,a]=j.useState(t),l=u=>{a(u.target.value),e==null||e(u)},c=s.trim();return g.jsx(Po,{onClickOutside:r,children:g.jsxs(CJ,{children:[i,g.jsx(Ho,{"data-testid":"edit-item-header-input",type:"text",placeholder:o,value:s,onChange:l}),g.jsxs(lK,{children:[g.jsx(_.Button,{"data-testid":"edit-item-header-save-button",variant:"primary",onClick:()=>n(c),disabled:!c,children:g.jsx(_.CheckmarkIcon,{})}),g.jsx(_.Button,{variant:"text",onClick:r,icon:g.jsx(_.CloseIcon,{})})]})]})})}const lK=T.div`
1780
+ `;function aK({defaultName:t,onChange:e,onApplyNewName:n,onCancelEditing:r,icon:i,placeholder:o="New Folder"}){const[s,a]=j.useState(t),l=u=>{a(u.target.value),e==null||e(u)},c=s.trim();return g.jsx(Po,{onClickOutside:r,children:g.jsxs(CJ,{children:[i,g.jsx(Jo,{"data-testid":"edit-item-header-input",type:"text",placeholder:o,value:s,onChange:l}),g.jsxs(lK,{children:[g.jsx(_.Button,{"data-testid":"edit-item-header-save-button",variant:"primary",onClick:()=>n(c),disabled:!c,children:g.jsx(_.CheckmarkIcon,{})}),g.jsx(_.Button,{variant:"text",onClick:r,icon:g.jsx(_.CloseIcon,{})})]})]})})}const lK=T.div`
1781
1781
  display: flex;
1782
1782
  gap: var(--spacing-xs);
1783
1783
  `;function cK({environment:t,defaultExpanded:e}){const[n,r]=j.useState(!1),{sendEvent:i}=ct(),{state:o,canBeEdited:s,canBeRemoved:a,name:l}=t.get(),c=()=>{t.set(lt),i("environment_creation_cancelled",{})},u=()=>{t.state.set(br.Normal),i("environment_editing_cancelled",{name:l})},f=()=>{t.state.set(br.Edit),i("environment_editing_started",{name:l})},d=()=>{t.set(lt),i("environment_removed",{name:l})},h=x=>{o===br.Draft?i("environment_creation_finished",{name:x}):i("environment_edited",{name:l,newName:x}),t.state.set(br.Normal),x.length&&t.name.set(x)},p=()=>{r(!0),i("environment_variable_creation_started",{name:l})},O=x=>{t.variables.set(v=>[x,...v]),r(!1),i("environment_variable_creation_finished",{name:l,variable:x.name,isSecret:x.isSecret})},m=()=>{r(!1),i("environment_variable_creation_cancelled",{name:l})};return o===br.Edit||o===br.Draft?g.jsx(aK,{placeholder:"New Environment",defaultName:l,onApplyNewName:h,onCancelEditing:o===br.Draft?c:u,icon:o===br.Edit?g.jsx(_.ChevronRightIcon,{size:"14px",color:"--text-color-secondary"}):g.jsx(_.AddIcon,{})}):g.jsx(g.Fragment,{children:g.jsxs(Fd,{dataTestId:`environment-${l}`,title:l,defaultExpanded:e,controls:g.jsxs(uK,{children:[s&&g.jsx(zs,{size:"small",variant:"text",icon:g.jsx(_.EditIcon,{}),onClick:f,"data-testid":`edit-environment-${l}`}),a&&g.jsx(ya,{description:HJ.replace("{name}",l),onConfirm:d,children:g.jsx($r,{variant:"text",icon:g.jsx(_.TrashCanIcon,{}),"data-testid":`remove-environment-${l}`})}),(!s||!a)&&g.jsx(To,{content:YJ,children:g.jsx(zs,{size:"small",variant:"text",icon:g.jsx(_.InformationIcon,{})})})]}),children:[n?g.jsx(hK,{variable:Ef(),onSave:O,onCancel:m,isNew:!0}):g.jsx(dK,{icon:g.jsx(_.AddIcon,{}),variant:"secondary",onClick:p,iconPosition:"left",size:"small",children:"New variable"}),t.variables.map(x=>g.jsx(j.Fragment,{children:g.jsx(eK,{variable:x,environment:t})},x.get().id))]})})}const uK=T.div`
@@ -1871,7 +1871,7 @@ Please report this to https://github.com/markedjs/marked.`,e.silent)return"<p>An
1871
1871
  align-items: center;
1872
1872
  align-self: stretch;
1873
1873
  background: var(--layer-color);
1874
- `;function AK({app:t}){const[e,n]=j.useState(!1),{title:r,credentials:i,id:o}=t,s=i.get()||[],a=l=>{l&&!i.get()&&(n(!0),Yo(`/api/api-keys/apps/${o.get()}`).then(c=>c.json().then(u=>{c.ok&&i.set(u.credentials)}).catch(()=>console.log("Something went wrong")).finally(()=>n(!1))))};return g.jsx(Fd,{dataTestId:`app-${name}`,title:r.get(),onToggle:a,children:g.jsx(PK,{children:e?g.jsx(EK,{children:g.jsx(_.SpinnerIcon,{size:"16px",color:"--icon-color-additional"})}):s.length?s.map((l,c)=>g.jsx(yK,{credential:l,number:c+1},l.id)):g.jsx(IK,{children:"There are no credentials yet."})})})}const PK=T.div`
1874
+ `;function AK({app:t}){const[e,n]=j.useState(!1),{title:r,credentials:i,id:o}=t,s=i.get()||[],a=l=>{l&&!i.get()&&(n(!0),qo(`/api/api-keys/apps/${o.get()}`).then(c=>c.json().then(u=>{c.ok&&i.set(u.credentials)}).catch(()=>console.log("Something went wrong")).finally(()=>n(!1))))};return g.jsx(Fd,{dataTestId:`app-${name}`,title:r.get(),onToggle:a,children:g.jsx(PK,{children:e?g.jsx(EK,{children:g.jsx(_.SpinnerIcon,{size:"16px",color:"--icon-color-additional"})}):s.length?s.map((l,c)=>g.jsx(yK,{credential:l,number:c+1},l.id)):g.jsx(IK,{children:"There are no credentials yet."})})})}const PK=T.div`
1875
1875
  padding-bottom: var(--spacing-xxs);
1876
1876
  margin-left: -7px;
1877
1877
  padding-right: var(--spacing-base);
@@ -1888,7 +1888,7 @@ Please report this to https://github.com/markedjs/marked.`,e.silent)return"<p>An
1888
1888
  font-size: var(--font-size-base);
1889
1889
  line-height: var(--line-height-base);
1890
1890
  color: var(--text-color-secondary);
1891
- `;function TK(){const[t,e]=j.useState(""),{apps:n,apiId:r,appsLoadingState:i}=je(),{MobileHeader:o}=Yr(),{sendEvent:s}=ct(),a=()=>{window.open("/apps","_blank"),s("apps_request_access_clicked",{})};j.useEffect(()=>((i.get()===ri.Idle||i.get()===ri.Error)&&(i.set(ri.Loading),Yo(`/api/api-keys/api-products/${r.get()}/access?expand=0`).then(u=>u.json().then(f=>{u.ok?(n.set(f.apps||[]),i.set(ri.Success)):i.set(ri.Error)}).catch(()=>i.set(ri.Error)))),()=>{n.set([]),i.set(ri.Idle)}),[r]);const l=j.useMemo(()=>n.filter(u=>u.title.get().toLowerCase().includes(t.toLowerCase())),[t,n]),c=u=>{e(u)};return i.get()===ri.Loading?g.jsx(jK,{children:g.jsx(_.SpinnerIcon,{size:"24px",color:"--icon-color-additional"})}):n.length?g.jsxs($K,{children:[g.jsx(o,{}),g.jsx(Ac,{children:g.jsx(kc,{value:t,onSearch:c})}),g.jsx(fh,{children:l.map(u=>g.jsx(AK,{app:u},u.get().id))})]}):g.jsxs(g.Fragment,{children:[g.jsx(o,{}),g.jsxs(Y$,{children:["You don't have any apps with access to this API",g.jsx(_.Button,{onClick:a,children:"Request access"})]})]})}const $K=T.div`
1891
+ `;function TK(){const[t,e]=j.useState(""),{apps:n,apiId:r,appsLoadingState:i}=je(),{MobileHeader:o}=Yr(),{sendEvent:s}=ct(),a=()=>{window.open("/apps","_blank"),s("apps_request_access_clicked",{})};j.useEffect(()=>((i.get()===ri.Idle||i.get()===ri.Error)&&(i.set(ri.Loading),qo(`/api/api-keys/api-products/${r.get()}/access?expand=0`).then(u=>u.json().then(f=>{u.ok?(n.set(f.apps||[]),i.set(ri.Success)):i.set(ri.Error)}).catch(()=>i.set(ri.Error)))),()=>{n.set([]),i.set(ri.Idle)}),[r]);const l=j.useMemo(()=>n.filter(u=>u.title.get().toLowerCase().includes(t.toLowerCase())),[t,n]),c=u=>{e(u)};return i.get()===ri.Loading?g.jsx(jK,{children:g.jsx(_.SpinnerIcon,{size:"24px",color:"--icon-color-additional"})}):n.length?g.jsxs($K,{children:[g.jsx(o,{}),g.jsx(Ac,{children:g.jsx(kc,{value:t,onSearch:c})}),g.jsx(fh,{children:l.map(u=>g.jsx(AK,{app:u},u.get().id))})]}):g.jsxs(g.Fragment,{children:[g.jsx(o,{}),g.jsxs(Y$,{children:["You don't have any apps with access to this API",g.jsx(_.Button,{onClick:a,children:"Request access"})]})]})}const $K=T.div`
1892
1892
  display: flex;
1893
1893
  flex-direction: column;
1894
1894
  width: 100%;
@@ -1905,15 +1905,15 @@ Please report this to https://github.com/markedjs/marked.`,e.silent)return"<p>An
1905
1905
  `,a+=on.repeat("-",e.indent+u+3+c.pos)+`^
1906
1906
  `,l=1;l<=e.linesAfter&&!(s+l>=i.length);l++)c=bg(t.buffer,r[s+l],i[s+l],t.position-(r[s]-r[s+l]),f),a+=on.repeat(" ",e.indent)+Sg((t.line+l+1).toString(),u)+" | "+c.str+`
1907
1907
  `;return a.replace(/\n$/,"")}var LK=zK,XK=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],GK=["scalar","sequence","mapping"];function YK(t){var e={};return t!==null&&Object.keys(t).forEach(function(n){t[n].forEach(function(r){e[String(r)]=n})}),e}function qK(t,e){if(e=e||{},Object.keys(e).forEach(function(n){if(XK.indexOf(n)===-1)throw new Fn('Unknown option "'+n+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(n){return n},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=YK(e.styleAliases||null),GK.indexOf(this.kind)===-1)throw new Fn('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}var An=qK;function FC(t,e){var n=[];return t[e].forEach(function(r){var i=n.length;n.forEach(function(o,s){o.tag===r.tag&&o.kind===r.kind&&o.multi===r.multi&&(i=s)}),n[i]=r}),n}function UK(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,n;function r(i){i.multi?(t.multi[i.kind].push(i),t.multi.fallback.push(i)):t[i.kind][i.tag]=t.fallback[i.tag]=i}for(e=0,n=arguments.length;e<n;e+=1)arguments[e].forEach(r);return t}function Ym(t){return this.extend(t)}Ym.prototype.extend=function(e){var n=[],r=[];if(e instanceof An)r.push(e);else if(Array.isArray(e))r=r.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(n=n.concat(e.implicit)),e.explicit&&(r=r.concat(e.explicit));else throw new Fn("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");n.forEach(function(o){if(!(o instanceof An))throw new Fn("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(o.loadKind&&o.loadKind!=="scalar")throw new Fn("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(o.multi)throw new Fn("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(o){if(!(o instanceof An))throw new Fn("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(Ym.prototype);return i.implicit=(this.implicit||[]).concat(n),i.explicit=(this.explicit||[]).concat(r),i.compiledImplicit=FC(i,"implicit"),i.compiledExplicit=FC(i,"explicit"),i.compiledTypeMap=UK(i.compiledImplicit,i.compiledExplicit),i};var K$=Ym,ej=new An("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}}),tj=new An("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}}),nj=new An("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}}),rj=new K$({explicit:[ej,tj,nj]});function HK(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}function JK(){return null}function KK(t){return t===null}var ij=new An("tag:yaml.org,2002:null",{kind:"scalar",resolve:HK,construct:JK,predicate:KK,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function eee(t){if(t===null)return!1;var e=t.length;return e===4&&(t==="true"||t==="True"||t==="TRUE")||e===5&&(t==="false"||t==="False"||t==="FALSE")}function tee(t){return t==="true"||t==="True"||t==="TRUE"}function nee(t){return Object.prototype.toString.call(t)==="[object Boolean]"}var oj=new An("tag:yaml.org,2002:bool",{kind:"scalar",resolve:eee,construct:tee,predicate:nee,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"});function ree(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function iee(t){return 48<=t&&t<=55}function oee(t){return 48<=t&&t<=57}function see(t){if(t===null)return!1;var e=t.length,n=0,r=!1,i;if(!e)return!1;if(i=t[n],(i==="-"||i==="+")&&(i=t[++n]),i==="0"){if(n+1===e)return!0;if(i=t[++n],i==="b"){for(n++;n<e;n++)if(i=t[n],i!=="_"){if(i!=="0"&&i!=="1")return!1;r=!0}return r&&i!=="_"}if(i==="x"){for(n++;n<e;n++)if(i=t[n],i!=="_"){if(!ree(t.charCodeAt(n)))return!1;r=!0}return r&&i!=="_"}if(i==="o"){for(n++;n<e;n++)if(i=t[n],i!=="_"){if(!iee(t.charCodeAt(n)))return!1;r=!0}return r&&i!=="_"}}if(i==="_")return!1;for(;n<e;n++)if(i=t[n],i!=="_"){if(!oee(t.charCodeAt(n)))return!1;r=!0}return!(!r||i==="_")}function aee(t){var e=t,n=1,r;if(e.indexOf("_")!==-1&&(e=e.replace(/_/g,"")),r=e[0],(r==="-"||r==="+")&&(r==="-"&&(n=-1),e=e.slice(1),r=e[0]),e==="0")return 0;if(r==="0"){if(e[1]==="b")return n*parseInt(e.slice(2),2);if(e[1]==="x")return n*parseInt(e.slice(2),16);if(e[1]==="o")return n*parseInt(e.slice(2),8)}return n*parseInt(e,10)}function lee(t){return Object.prototype.toString.call(t)==="[object Number]"&&t%1===0&&!on.isNegativeZero(t)}var sj=new An("tag:yaml.org,2002:int",{kind:"scalar",resolve:see,construct:aee,predicate:lee,represent:{binary:function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),cee=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function uee(t){return!(t===null||!cee.test(t)||t[t.length-1]==="_")}function fee(t){var e,n;return e=t.replace(/_/g,"").toLowerCase(),n=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:n*parseFloat(e,10)}var dee=/^[-+]?[0-9]+e/;function hee(t,e){var n;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(on.isNegativeZero(t))return"-0.0";return n=t.toString(10),dee.test(n)?n.replace("e",".e"):n}function pee(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||on.isNegativeZero(t))}var aj=new An("tag:yaml.org,2002:float",{kind:"scalar",resolve:uee,construct:fee,predicate:pee,represent:hee,defaultStyle:"lowercase"}),lj=rj.extend({implicit:[ij,oj,sj,aj]}),cj=lj,uj=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),fj=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function gee(t){return t===null?!1:uj.exec(t)!==null||fj.exec(t)!==null}function mee(t){var e,n,r,i,o,s,a,l=0,c=null,u,f,d;if(e=uj.exec(t),e===null&&(e=fj.exec(t)),e===null)throw new Error("Date resolve error");if(n=+e[1],r=+e[2]-1,i=+e[3],!e[4])return new Date(Date.UTC(n,r,i));if(o=+e[4],s=+e[5],a=+e[6],e[7]){for(l=e[7].slice(0,3);l.length<3;)l+="0";l=+l}return e[9]&&(u=+e[10],f=+(e[11]||0),c=(u*60+f)*6e4,e[9]==="-"&&(c=-c)),d=new Date(Date.UTC(n,r,i,o,s,a,l)),c&&d.setTime(d.getTime()-c),d}function Oee(t){return t.toISOString()}var dj=new An("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:gee,construct:mee,instanceOf:Date,represent:Oee});function xee(t){return t==="<<"||t===null}var hj=new An("tag:yaml.org,2002:merge",{kind:"scalar",resolve:xee}),Yx=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
1908
- \r`;function vee(t){if(t===null)return!1;var e,n,r=0,i=t.length,o=Yx;for(n=0;n<i;n++)if(e=o.indexOf(t.charAt(n)),!(e>64)){if(e<0)return!1;r+=6}return r%8===0}function yee(t){var e,n,r=t.replace(/[\r\n=]/g,""),i=r.length,o=Yx,s=0,a=[];for(e=0;e<i;e++)e%4===0&&e&&(a.push(s>>16&255),a.push(s>>8&255),a.push(s&255)),s=s<<6|o.indexOf(r.charAt(e));return n=i%4*6,n===0?(a.push(s>>16&255),a.push(s>>8&255),a.push(s&255)):n===18?(a.push(s>>10&255),a.push(s>>2&255)):n===12&&a.push(s>>4&255),new Uint8Array(a)}function bee(t){var e="",n=0,r,i,o=t.length,s=Yx;for(r=0;r<o;r++)r%3===0&&r&&(e+=s[n>>18&63],e+=s[n>>12&63],e+=s[n>>6&63],e+=s[n&63]),n=(n<<8)+t[r];return i=o%3,i===0?(e+=s[n>>18&63],e+=s[n>>12&63],e+=s[n>>6&63],e+=s[n&63]):i===2?(e+=s[n>>10&63],e+=s[n>>4&63],e+=s[n<<2&63],e+=s[64]):i===1&&(e+=s[n>>2&63],e+=s[n<<4&63],e+=s[64],e+=s[64]),e}function See(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}var pj=new An("tag:yaml.org,2002:binary",{kind:"scalar",resolve:vee,construct:yee,predicate:See,represent:bee}),wee=Object.prototype.hasOwnProperty,Cee=Object.prototype.toString;function kee(t){if(t===null)return!0;var e=[],n,r,i,o,s,a=t;for(n=0,r=a.length;n<r;n+=1){if(i=a[n],s=!1,Cee.call(i)!=="[object Object]")return!1;for(o in i)if(wee.call(i,o))if(!s)s=!0;else return!1;if(!s)return!1;if(e.indexOf(o)===-1)e.push(o);else return!1}return!0}function Aee(t){return t!==null?t:[]}var gj=new An("tag:yaml.org,2002:omap",{kind:"sequence",resolve:kee,construct:Aee}),Pee=Object.prototype.toString;function Eee(t){if(t===null)return!0;var e,n,r,i,o,s=t;for(o=new Array(s.length),e=0,n=s.length;e<n;e+=1){if(r=s[e],Pee.call(r)!=="[object Object]"||(i=Object.keys(r),i.length!==1))return!1;o[e]=[i[0],r[i[0]]]}return!0}function Iee(t){if(t===null)return[];var e,n,r,i,o,s=t;for(o=new Array(s.length),e=0,n=s.length;e<n;e+=1)r=s[e],i=Object.keys(r),o[e]=[i[0],r[i[0]]];return o}var mj=new An("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Eee,construct:Iee}),Tee=Object.prototype.hasOwnProperty;function $ee(t){if(t===null)return!0;var e,n=t;for(e in n)if(Tee.call(n,e)&&n[e]!==null)return!1;return!0}function jee(t){return t!==null?t:{}}var Oj=new An("tag:yaml.org,2002:set",{kind:"mapping",resolve:$ee,construct:jee}),qx=cj.extend({implicit:[dj,hj],explicit:[pj,gj,mj,Oj]}),Co=Object.prototype.hasOwnProperty,Od=1,xj=2,vj=3,xd=4,wg=1,Ree=2,ZC=3,Dee=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Qee=/[\x85\u2028\u2029]/,Bee=/[,\[\]\{\}]/,yj=/^(?:!|!!|![a-z\-]+!)$/i,bj=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function WC(t){return Object.prototype.toString.call(t)}function xi(t){return t===10||t===13}function Uo(t){return t===9||t===32}function Jn(t){return t===9||t===32||t===10||t===13}function Ns(t){return t===44||t===91||t===93||t===123||t===125}function _ee(t){var e;return 48<=t&&t<=57?t-48:(e=t|32,97<=e&&e<=102?e-97+10:-1)}function Mee(t){return t===120?2:t===117?4:t===85?8:0}function Nee(t){return 48<=t&&t<=57?t-48:-1}function VC(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?" ":t===110?`
1909
- `:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"…":t===95?" ":t===76?"\u2028":t===80?"\u2029":""}function Fee(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}var Sj=new Array(256),wj=new Array(256);for(var As=0;As<256;As++)Sj[As]=VC(As)?1:0,wj[As]=VC(As);function Zee(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||qx,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Cj(t,e){var n={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return n.snippet=LK(n),new Fn(e,n)}function ke(t,e){throw Cj(t,e)}function vd(t,e){t.onWarning&&t.onWarning.call(null,Cj(t,e))}var zC={YAML:function(e,n,r){var i,o,s;e.version!==null&&ke(e,"duplication of %YAML directive"),r.length!==1&&ke(e,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]),i===null&&ke(e,"ill-formed argument of the YAML directive"),o=parseInt(i[1],10),s=parseInt(i[2],10),o!==1&&ke(e,"unacceptable YAML version of the document"),e.version=r[0],e.checkLineBreaks=s<2,s!==1&&s!==2&&vd(e,"unsupported YAML version of the document")},TAG:function(e,n,r){var i,o;r.length!==2&&ke(e,"TAG directive accepts exactly two arguments"),i=r[0],o=r[1],yj.test(i)||ke(e,"ill-formed tag handle (first argument) of the TAG directive"),Co.call(e.tagMap,i)&&ke(e,'there is a previously declared suffix for "'+i+'" tag handle'),bj.test(o)||ke(e,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch{ke(e,"tag prefix is malformed: "+o)}e.tagMap[i]=o}};function go(t,e,n,r){var i,o,s,a;if(e<n){if(a=t.input.slice(e,n),r)for(i=0,o=a.length;i<o;i+=1)s=a.charCodeAt(i),s===9||32<=s&&s<=1114111||ke(t,"expected valid JSON character");else Dee.test(a)&&ke(t,"the stream contains non-printable characters");t.result+=a}}function LC(t,e,n,r){var i,o,s,a;for(on.isObject(n)||ke(t,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(n),s=0,a=i.length;s<a;s+=1)o=i[s],Co.call(e,o)||(e[o]=n[o],r[o]=!0)}function Fs(t,e,n,r,i,o,s,a,l){var c,u;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),c=0,u=i.length;c<u;c+=1)Array.isArray(i[c])&&ke(t,"nested arrays are not supported inside keys"),typeof i=="object"&&WC(i[c])==="[object Object]"&&(i[c]="[object Object]");if(typeof i=="object"&&WC(i)==="[object Object]"&&(i="[object Object]"),i=String(i),e===null&&(e={}),r==="tag:yaml.org,2002:merge")if(Array.isArray(o))for(c=0,u=o.length;c<u;c+=1)LC(t,e,o[c],n);else LC(t,e,o,n);else!t.json&&!Co.call(n,i)&&Co.call(e,i)&&(t.line=s||t.line,t.lineStart=a||t.lineStart,t.position=l||t.position,ke(t,"duplicated mapping key")),i==="__proto__"?Object.defineProperty(e,i,{configurable:!0,enumerable:!0,writable:!0,value:o}):e[i]=o,delete n[i];return e}function Ux(t){var e;e=t.input.charCodeAt(t.position),e===10?t.position++:e===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):ke(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function Yt(t,e,n){for(var r=0,i=t.input.charCodeAt(t.position);i!==0;){for(;Uo(i);)i===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),i=t.input.charCodeAt(++t.position);if(e&&i===35)do i=t.input.charCodeAt(++t.position);while(i!==10&&i!==13&&i!==0);if(xi(i))for(Ux(t),i=t.input.charCodeAt(t.position),r++,t.lineIndent=0;i===32;)t.lineIndent++,i=t.input.charCodeAt(++t.position);else break}return n!==-1&&r!==0&&t.lineIndent<n&&vd(t,"deficient indentation"),r}function dh(t){var e=t.position,n;return n=t.input.charCodeAt(e),!!((n===45||n===46)&&n===t.input.charCodeAt(e+1)&&n===t.input.charCodeAt(e+2)&&(e+=3,n=t.input.charCodeAt(e),n===0||Jn(n)))}function Hx(t,e){e===1?t.result+=" ":e>1&&(t.result+=on.repeat(`
1910
- `,e-1))}function Wee(t,e,n){var r,i,o,s,a,l,c,u,f=t.kind,d=t.result,h;if(h=t.input.charCodeAt(t.position),Jn(h)||Ns(h)||h===35||h===38||h===42||h===33||h===124||h===62||h===39||h===34||h===37||h===64||h===96||(h===63||h===45)&&(i=t.input.charCodeAt(t.position+1),Jn(i)||n&&Ns(i)))return!1;for(t.kind="scalar",t.result="",o=s=t.position,a=!1;h!==0;){if(h===58){if(i=t.input.charCodeAt(t.position+1),Jn(i)||n&&Ns(i))break}else if(h===35){if(r=t.input.charCodeAt(t.position-1),Jn(r))break}else{if(t.position===t.lineStart&&dh(t)||n&&Ns(h))break;if(xi(h))if(l=t.line,c=t.lineStart,u=t.lineIndent,Yt(t,!1,-1),t.lineIndent>=e){a=!0,h=t.input.charCodeAt(t.position);continue}else{t.position=s,t.line=l,t.lineStart=c,t.lineIndent=u;break}}a&&(go(t,o,s,!1),Hx(t,t.line-l),o=s=t.position,a=!1),Uo(h)||(s=t.position+1),h=t.input.charCodeAt(++t.position)}return go(t,o,s,!1),t.result?!0:(t.kind=f,t.result=d,!1)}function Vee(t,e){var n,r,i;if(n=t.input.charCodeAt(t.position),n!==39)return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;(n=t.input.charCodeAt(t.position))!==0;)if(n===39)if(go(t,r,t.position,!0),n=t.input.charCodeAt(++t.position),n===39)r=t.position,t.position++,i=t.position;else return!0;else xi(n)?(go(t,r,i,!0),Hx(t,Yt(t,!1,e)),r=i=t.position):t.position===t.lineStart&&dh(t)?ke(t,"unexpected end of the document within a single quoted scalar"):(t.position++,i=t.position);ke(t,"unexpected end of the stream within a single quoted scalar")}function zee(t,e){var n,r,i,o,s,a;if(a=t.input.charCodeAt(t.position),a!==34)return!1;for(t.kind="scalar",t.result="",t.position++,n=r=t.position;(a=t.input.charCodeAt(t.position))!==0;){if(a===34)return go(t,n,t.position,!0),t.position++,!0;if(a===92){if(go(t,n,t.position,!0),a=t.input.charCodeAt(++t.position),xi(a))Yt(t,!1,e);else if(a<256&&Sj[a])t.result+=wj[a],t.position++;else if((s=Mee(a))>0){for(i=s,o=0;i>0;i--)a=t.input.charCodeAt(++t.position),(s=_ee(a))>=0?o=(o<<4)+s:ke(t,"expected hexadecimal character");t.result+=Fee(o),t.position++}else ke(t,"unknown escape sequence");n=r=t.position}else xi(a)?(go(t,n,r,!0),Hx(t,Yt(t,!1,e)),n=r=t.position):t.position===t.lineStart&&dh(t)?ke(t,"unexpected end of the document within a double quoted scalar"):(t.position++,r=t.position)}ke(t,"unexpected end of the stream within a double quoted scalar")}function Lee(t,e){var n=!0,r,i,o,s=t.tag,a,l=t.anchor,c,u,f,d,h,p=Object.create(null),O,m,x,v;if(v=t.input.charCodeAt(t.position),v===91)u=93,h=!1,a=[];else if(v===123)u=125,h=!0,a={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=a),v=t.input.charCodeAt(++t.position);v!==0;){if(Yt(t,!0,e),v=t.input.charCodeAt(t.position),v===u)return t.position++,t.tag=s,t.anchor=l,t.kind=h?"mapping":"sequence",t.result=a,!0;n?v===44&&ke(t,"expected the node content, but found ','"):ke(t,"missed comma between flow collection entries"),m=O=x=null,f=d=!1,v===63&&(c=t.input.charCodeAt(t.position+1),Jn(c)&&(f=d=!0,t.position++,Yt(t,!0,e))),r=t.line,i=t.lineStart,o=t.position,Sa(t,e,Od,!1,!0),m=t.tag,O=t.result,Yt(t,!0,e),v=t.input.charCodeAt(t.position),(d||t.line===r)&&v===58&&(f=!0,v=t.input.charCodeAt(++t.position),Yt(t,!0,e),Sa(t,e,Od,!1,!0),x=t.result),h?Fs(t,a,p,m,O,x,r,i,o):f?a.push(Fs(t,null,p,m,O,x,r,i,o)):a.push(O),Yt(t,!0,e),v=t.input.charCodeAt(t.position),v===44?(n=!0,v=t.input.charCodeAt(++t.position)):n=!1}ke(t,"unexpected end of the stream within a flow collection")}function Xee(t,e){var n,r,i=wg,o=!1,s=!1,a=e,l=0,c=!1,u,f;if(f=t.input.charCodeAt(t.position),f===124)r=!1;else if(f===62)r=!0;else return!1;for(t.kind="scalar",t.result="";f!==0;)if(f=t.input.charCodeAt(++t.position),f===43||f===45)wg===i?i=f===43?ZC:Ree:ke(t,"repeat of a chomping mode identifier");else if((u=Nee(f))>=0)u===0?ke(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?ke(t,"repeat of an indentation width identifier"):(a=e+u-1,s=!0);else break;if(Uo(f)){do f=t.input.charCodeAt(++t.position);while(Uo(f));if(f===35)do f=t.input.charCodeAt(++t.position);while(!xi(f)&&f!==0)}for(;f!==0;){for(Ux(t),t.lineIndent=0,f=t.input.charCodeAt(t.position);(!s||t.lineIndent<a)&&f===32;)t.lineIndent++,f=t.input.charCodeAt(++t.position);if(!s&&t.lineIndent>a&&(a=t.lineIndent),xi(f)){l++;continue}if(t.lineIndent<a){i===ZC?t.result+=on.repeat(`
1908
+ \r`;function vee(t){if(t===null)return!1;var e,n,r=0,i=t.length,o=Yx;for(n=0;n<i;n++)if(e=o.indexOf(t.charAt(n)),!(e>64)){if(e<0)return!1;r+=6}return r%8===0}function yee(t){var e,n,r=t.replace(/[\r\n=]/g,""),i=r.length,o=Yx,s=0,a=[];for(e=0;e<i;e++)e%4===0&&e&&(a.push(s>>16&255),a.push(s>>8&255),a.push(s&255)),s=s<<6|o.indexOf(r.charAt(e));return n=i%4*6,n===0?(a.push(s>>16&255),a.push(s>>8&255),a.push(s&255)):n===18?(a.push(s>>10&255),a.push(s>>2&255)):n===12&&a.push(s>>4&255),new Uint8Array(a)}function bee(t){var e="",n=0,r,i,o=t.length,s=Yx;for(r=0;r<o;r++)r%3===0&&r&&(e+=s[n>>18&63],e+=s[n>>12&63],e+=s[n>>6&63],e+=s[n&63]),n=(n<<8)+t[r];return i=o%3,i===0?(e+=s[n>>18&63],e+=s[n>>12&63],e+=s[n>>6&63],e+=s[n&63]):i===2?(e+=s[n>>10&63],e+=s[n>>4&63],e+=s[n<<2&63],e+=s[64]):i===1&&(e+=s[n>>2&63],e+=s[n<<4&63],e+=s[64],e+=s[64]),e}function See(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}var pj=new An("tag:yaml.org,2002:binary",{kind:"scalar",resolve:vee,construct:yee,predicate:See,represent:bee}),wee=Object.prototype.hasOwnProperty,Cee=Object.prototype.toString;function kee(t){if(t===null)return!0;var e=[],n,r,i,o,s,a=t;for(n=0,r=a.length;n<r;n+=1){if(i=a[n],s=!1,Cee.call(i)!=="[object Object]")return!1;for(o in i)if(wee.call(i,o))if(!s)s=!0;else return!1;if(!s)return!1;if(e.indexOf(o)===-1)e.push(o);else return!1}return!0}function Aee(t){return t!==null?t:[]}var gj=new An("tag:yaml.org,2002:omap",{kind:"sequence",resolve:kee,construct:Aee}),Pee=Object.prototype.toString;function Eee(t){if(t===null)return!0;var e,n,r,i,o,s=t;for(o=new Array(s.length),e=0,n=s.length;e<n;e+=1){if(r=s[e],Pee.call(r)!=="[object Object]"||(i=Object.keys(r),i.length!==1))return!1;o[e]=[i[0],r[i[0]]]}return!0}function Iee(t){if(t===null)return[];var e,n,r,i,o,s=t;for(o=new Array(s.length),e=0,n=s.length;e<n;e+=1)r=s[e],i=Object.keys(r),o[e]=[i[0],r[i[0]]];return o}var mj=new An("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Eee,construct:Iee}),Tee=Object.prototype.hasOwnProperty;function $ee(t){if(t===null)return!0;var e,n=t;for(e in n)if(Tee.call(n,e)&&n[e]!==null)return!1;return!0}function jee(t){return t!==null?t:{}}var Oj=new An("tag:yaml.org,2002:set",{kind:"mapping",resolve:$ee,construct:jee}),qx=cj.extend({implicit:[dj,hj],explicit:[pj,gj,mj,Oj]}),Co=Object.prototype.hasOwnProperty,Od=1,xj=2,vj=3,xd=4,wg=1,Ree=2,ZC=3,Dee=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Qee=/[\x85\u2028\u2029]/,Bee=/[,\[\]\{\}]/,yj=/^(?:!|!!|![a-z\-]+!)$/i,bj=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function WC(t){return Object.prototype.toString.call(t)}function xi(t){return t===10||t===13}function Ho(t){return t===9||t===32}function Jn(t){return t===9||t===32||t===10||t===13}function Ns(t){return t===44||t===91||t===93||t===123||t===125}function _ee(t){var e;return 48<=t&&t<=57?t-48:(e=t|32,97<=e&&e<=102?e-97+10:-1)}function Mee(t){return t===120?2:t===117?4:t===85?8:0}function Nee(t){return 48<=t&&t<=57?t-48:-1}function VC(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?" ":t===110?`
1909
+ `:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"…":t===95?" ":t===76?"\u2028":t===80?"\u2029":""}function Fee(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}var Sj=new Array(256),wj=new Array(256);for(var As=0;As<256;As++)Sj[As]=VC(As)?1:0,wj[As]=VC(As);function Zee(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||qx,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Cj(t,e){var n={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return n.snippet=LK(n),new Fn(e,n)}function ke(t,e){throw Cj(t,e)}function vd(t,e){t.onWarning&&t.onWarning.call(null,Cj(t,e))}var zC={YAML:function(e,n,r){var i,o,s;e.version!==null&&ke(e,"duplication of %YAML directive"),r.length!==1&&ke(e,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]),i===null&&ke(e,"ill-formed argument of the YAML directive"),o=parseInt(i[1],10),s=parseInt(i[2],10),o!==1&&ke(e,"unacceptable YAML version of the document"),e.version=r[0],e.checkLineBreaks=s<2,s!==1&&s!==2&&vd(e,"unsupported YAML version of the document")},TAG:function(e,n,r){var i,o;r.length!==2&&ke(e,"TAG directive accepts exactly two arguments"),i=r[0],o=r[1],yj.test(i)||ke(e,"ill-formed tag handle (first argument) of the TAG directive"),Co.call(e.tagMap,i)&&ke(e,'there is a previously declared suffix for "'+i+'" tag handle'),bj.test(o)||ke(e,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch{ke(e,"tag prefix is malformed: "+o)}e.tagMap[i]=o}};function go(t,e,n,r){var i,o,s,a;if(e<n){if(a=t.input.slice(e,n),r)for(i=0,o=a.length;i<o;i+=1)s=a.charCodeAt(i),s===9||32<=s&&s<=1114111||ke(t,"expected valid JSON character");else Dee.test(a)&&ke(t,"the stream contains non-printable characters");t.result+=a}}function LC(t,e,n,r){var i,o,s,a;for(on.isObject(n)||ke(t,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(n),s=0,a=i.length;s<a;s+=1)o=i[s],Co.call(e,o)||(e[o]=n[o],r[o]=!0)}function Fs(t,e,n,r,i,o,s,a,l){var c,u;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),c=0,u=i.length;c<u;c+=1)Array.isArray(i[c])&&ke(t,"nested arrays are not supported inside keys"),typeof i=="object"&&WC(i[c])==="[object Object]"&&(i[c]="[object Object]");if(typeof i=="object"&&WC(i)==="[object Object]"&&(i="[object Object]"),i=String(i),e===null&&(e={}),r==="tag:yaml.org,2002:merge")if(Array.isArray(o))for(c=0,u=o.length;c<u;c+=1)LC(t,e,o[c],n);else LC(t,e,o,n);else!t.json&&!Co.call(n,i)&&Co.call(e,i)&&(t.line=s||t.line,t.lineStart=a||t.lineStart,t.position=l||t.position,ke(t,"duplicated mapping key")),i==="__proto__"?Object.defineProperty(e,i,{configurable:!0,enumerable:!0,writable:!0,value:o}):e[i]=o,delete n[i];return e}function Ux(t){var e;e=t.input.charCodeAt(t.position),e===10?t.position++:e===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):ke(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function Yt(t,e,n){for(var r=0,i=t.input.charCodeAt(t.position);i!==0;){for(;Ho(i);)i===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),i=t.input.charCodeAt(++t.position);if(e&&i===35)do i=t.input.charCodeAt(++t.position);while(i!==10&&i!==13&&i!==0);if(xi(i))for(Ux(t),i=t.input.charCodeAt(t.position),r++,t.lineIndent=0;i===32;)t.lineIndent++,i=t.input.charCodeAt(++t.position);else break}return n!==-1&&r!==0&&t.lineIndent<n&&vd(t,"deficient indentation"),r}function dh(t){var e=t.position,n;return n=t.input.charCodeAt(e),!!((n===45||n===46)&&n===t.input.charCodeAt(e+1)&&n===t.input.charCodeAt(e+2)&&(e+=3,n=t.input.charCodeAt(e),n===0||Jn(n)))}function Hx(t,e){e===1?t.result+=" ":e>1&&(t.result+=on.repeat(`
1910
+ `,e-1))}function Wee(t,e,n){var r,i,o,s,a,l,c,u,f=t.kind,d=t.result,h;if(h=t.input.charCodeAt(t.position),Jn(h)||Ns(h)||h===35||h===38||h===42||h===33||h===124||h===62||h===39||h===34||h===37||h===64||h===96||(h===63||h===45)&&(i=t.input.charCodeAt(t.position+1),Jn(i)||n&&Ns(i)))return!1;for(t.kind="scalar",t.result="",o=s=t.position,a=!1;h!==0;){if(h===58){if(i=t.input.charCodeAt(t.position+1),Jn(i)||n&&Ns(i))break}else if(h===35){if(r=t.input.charCodeAt(t.position-1),Jn(r))break}else{if(t.position===t.lineStart&&dh(t)||n&&Ns(h))break;if(xi(h))if(l=t.line,c=t.lineStart,u=t.lineIndent,Yt(t,!1,-1),t.lineIndent>=e){a=!0,h=t.input.charCodeAt(t.position);continue}else{t.position=s,t.line=l,t.lineStart=c,t.lineIndent=u;break}}a&&(go(t,o,s,!1),Hx(t,t.line-l),o=s=t.position,a=!1),Ho(h)||(s=t.position+1),h=t.input.charCodeAt(++t.position)}return go(t,o,s,!1),t.result?!0:(t.kind=f,t.result=d,!1)}function Vee(t,e){var n,r,i;if(n=t.input.charCodeAt(t.position),n!==39)return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;(n=t.input.charCodeAt(t.position))!==0;)if(n===39)if(go(t,r,t.position,!0),n=t.input.charCodeAt(++t.position),n===39)r=t.position,t.position++,i=t.position;else return!0;else xi(n)?(go(t,r,i,!0),Hx(t,Yt(t,!1,e)),r=i=t.position):t.position===t.lineStart&&dh(t)?ke(t,"unexpected end of the document within a single quoted scalar"):(t.position++,i=t.position);ke(t,"unexpected end of the stream within a single quoted scalar")}function zee(t,e){var n,r,i,o,s,a;if(a=t.input.charCodeAt(t.position),a!==34)return!1;for(t.kind="scalar",t.result="",t.position++,n=r=t.position;(a=t.input.charCodeAt(t.position))!==0;){if(a===34)return go(t,n,t.position,!0),t.position++,!0;if(a===92){if(go(t,n,t.position,!0),a=t.input.charCodeAt(++t.position),xi(a))Yt(t,!1,e);else if(a<256&&Sj[a])t.result+=wj[a],t.position++;else if((s=Mee(a))>0){for(i=s,o=0;i>0;i--)a=t.input.charCodeAt(++t.position),(s=_ee(a))>=0?o=(o<<4)+s:ke(t,"expected hexadecimal character");t.result+=Fee(o),t.position++}else ke(t,"unknown escape sequence");n=r=t.position}else xi(a)?(go(t,n,r,!0),Hx(t,Yt(t,!1,e)),n=r=t.position):t.position===t.lineStart&&dh(t)?ke(t,"unexpected end of the document within a double quoted scalar"):(t.position++,r=t.position)}ke(t,"unexpected end of the stream within a double quoted scalar")}function Lee(t,e){var n=!0,r,i,o,s=t.tag,a,l=t.anchor,c,u,f,d,h,p=Object.create(null),O,m,x,v;if(v=t.input.charCodeAt(t.position),v===91)u=93,h=!1,a=[];else if(v===123)u=125,h=!0,a={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=a),v=t.input.charCodeAt(++t.position);v!==0;){if(Yt(t,!0,e),v=t.input.charCodeAt(t.position),v===u)return t.position++,t.tag=s,t.anchor=l,t.kind=h?"mapping":"sequence",t.result=a,!0;n?v===44&&ke(t,"expected the node content, but found ','"):ke(t,"missed comma between flow collection entries"),m=O=x=null,f=d=!1,v===63&&(c=t.input.charCodeAt(t.position+1),Jn(c)&&(f=d=!0,t.position++,Yt(t,!0,e))),r=t.line,i=t.lineStart,o=t.position,Sa(t,e,Od,!1,!0),m=t.tag,O=t.result,Yt(t,!0,e),v=t.input.charCodeAt(t.position),(d||t.line===r)&&v===58&&(f=!0,v=t.input.charCodeAt(++t.position),Yt(t,!0,e),Sa(t,e,Od,!1,!0),x=t.result),h?Fs(t,a,p,m,O,x,r,i,o):f?a.push(Fs(t,null,p,m,O,x,r,i,o)):a.push(O),Yt(t,!0,e),v=t.input.charCodeAt(t.position),v===44?(n=!0,v=t.input.charCodeAt(++t.position)):n=!1}ke(t,"unexpected end of the stream within a flow collection")}function Xee(t,e){var n,r,i=wg,o=!1,s=!1,a=e,l=0,c=!1,u,f;if(f=t.input.charCodeAt(t.position),f===124)r=!1;else if(f===62)r=!0;else return!1;for(t.kind="scalar",t.result="";f!==0;)if(f=t.input.charCodeAt(++t.position),f===43||f===45)wg===i?i=f===43?ZC:Ree:ke(t,"repeat of a chomping mode identifier");else if((u=Nee(f))>=0)u===0?ke(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?ke(t,"repeat of an indentation width identifier"):(a=e+u-1,s=!0);else break;if(Ho(f)){do f=t.input.charCodeAt(++t.position);while(Ho(f));if(f===35)do f=t.input.charCodeAt(++t.position);while(!xi(f)&&f!==0)}for(;f!==0;){for(Ux(t),t.lineIndent=0,f=t.input.charCodeAt(t.position);(!s||t.lineIndent<a)&&f===32;)t.lineIndent++,f=t.input.charCodeAt(++t.position);if(!s&&t.lineIndent>a&&(a=t.lineIndent),xi(f)){l++;continue}if(t.lineIndent<a){i===ZC?t.result+=on.repeat(`
1911
1911
  `,o?1+l:l):i===wg&&o&&(t.result+=`
1912
- `);break}for(r?Uo(f)?(c=!0,t.result+=on.repeat(`
1912
+ `);break}for(r?Ho(f)?(c=!0,t.result+=on.repeat(`
1913
1913
  `,o?1+l:l)):c?(c=!1,t.result+=on.repeat(`
1914
1914
  `,l+1)):l===0?o&&(t.result+=" "):t.result+=on.repeat(`
1915
1915
  `,l):t.result+=on.repeat(`
1916
- `,o?1+l:l),o=!0,s=!0,l=0,n=t.position;!xi(f)&&f!==0;)f=t.input.charCodeAt(++t.position);go(t,n,t.position,!1)}return!0}function XC(t,e){var n,r=t.tag,i=t.anchor,o=[],s,a=!1,l;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=o),l=t.input.charCodeAt(t.position);l!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,ke(t,"tab characters must not be used in indentation")),!(l!==45||(s=t.input.charCodeAt(t.position+1),!Jn(s))));){if(a=!0,t.position++,Yt(t,!0,-1)&&t.lineIndent<=e){o.push(null),l=t.input.charCodeAt(t.position);continue}if(n=t.line,Sa(t,e,vj,!1,!0),o.push(t.result),Yt(t,!0,-1),l=t.input.charCodeAt(t.position),(t.line===n||t.lineIndent>e)&&l!==0)ke(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return a?(t.tag=r,t.anchor=i,t.kind="sequence",t.result=o,!0):!1}function Gee(t,e,n){var r,i,o,s,a,l,c=t.tag,u=t.anchor,f={},d=Object.create(null),h=null,p=null,O=null,m=!1,x=!1,v;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=f),v=t.input.charCodeAt(t.position);v!==0;){if(!m&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,ke(t,"tab characters must not be used in indentation")),r=t.input.charCodeAt(t.position+1),o=t.line,(v===63||v===58)&&Jn(r))v===63?(m&&(Fs(t,f,d,h,p,null,s,a,l),h=p=O=null),x=!0,m=!0,i=!0):m?(m=!1,i=!0):ke(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,v=r;else{if(s=t.line,a=t.lineStart,l=t.position,!Sa(t,n,xj,!1,!0))break;if(t.line===o){for(v=t.input.charCodeAt(t.position);Uo(v);)v=t.input.charCodeAt(++t.position);if(v===58)v=t.input.charCodeAt(++t.position),Jn(v)||ke(t,"a whitespace character is expected after the key-value separator within a block mapping"),m&&(Fs(t,f,d,h,p,null,s,a,l),h=p=O=null),x=!0,m=!1,i=!1,h=t.tag,p=t.result;else if(x)ke(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=c,t.anchor=u,!0}else if(x)ke(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=c,t.anchor=u,!0}if((t.line===o||t.lineIndent>e)&&(m&&(s=t.line,a=t.lineStart,l=t.position),Sa(t,e,xd,!0,i)&&(m?p=t.result:O=t.result),m||(Fs(t,f,d,h,p,O,s,a,l),h=p=O=null),Yt(t,!0,-1),v=t.input.charCodeAt(t.position)),(t.line===o||t.lineIndent>e)&&v!==0)ke(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return m&&Fs(t,f,d,h,p,null,s,a,l),x&&(t.tag=c,t.anchor=u,t.kind="mapping",t.result=f),x}function Yee(t){var e,n=!1,r=!1,i,o,s;if(s=t.input.charCodeAt(t.position),s!==33)return!1;if(t.tag!==null&&ke(t,"duplication of a tag property"),s=t.input.charCodeAt(++t.position),s===60?(n=!0,s=t.input.charCodeAt(++t.position)):s===33?(r=!0,i="!!",s=t.input.charCodeAt(++t.position)):i="!",e=t.position,n){do s=t.input.charCodeAt(++t.position);while(s!==0&&s!==62);t.position<t.length?(o=t.input.slice(e,t.position),s=t.input.charCodeAt(++t.position)):ke(t,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!Jn(s);)s===33&&(r?ke(t,"tag suffix cannot contain exclamation marks"):(i=t.input.slice(e-1,t.position+1),yj.test(i)||ke(t,"named tag handle cannot contain such characters"),r=!0,e=t.position+1)),s=t.input.charCodeAt(++t.position);o=t.input.slice(e,t.position),Bee.test(o)&&ke(t,"tag suffix cannot contain flow indicator characters")}o&&!bj.test(o)&&ke(t,"tag name cannot contain such characters: "+o);try{o=decodeURIComponent(o)}catch{ke(t,"tag name is malformed: "+o)}return n?t.tag=o:Co.call(t.tagMap,i)?t.tag=t.tagMap[i]+o:i==="!"?t.tag="!"+o:i==="!!"?t.tag="tag:yaml.org,2002:"+o:ke(t,'undeclared tag handle "'+i+'"'),!0}function qee(t){var e,n;if(n=t.input.charCodeAt(t.position),n!==38)return!1;for(t.anchor!==null&&ke(t,"duplication of an anchor property"),n=t.input.charCodeAt(++t.position),e=t.position;n!==0&&!Jn(n)&&!Ns(n);)n=t.input.charCodeAt(++t.position);return t.position===e&&ke(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function Uee(t){var e,n,r;if(r=t.input.charCodeAt(t.position),r!==42)return!1;for(r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!Jn(r)&&!Ns(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&ke(t,"name of an alias node must contain at least one character"),n=t.input.slice(e,t.position),Co.call(t.anchorMap,n)||ke(t,'unidentified alias "'+n+'"'),t.result=t.anchorMap[n],Yt(t,!0,-1),!0}function Sa(t,e,n,r,i){var o,s,a,l=1,c=!1,u=!1,f,d,h,p,O,m;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,o=s=a=xd===n||vj===n,r&&Yt(t,!0,-1)&&(c=!0,t.lineIndent>e?l=1:t.lineIndent===e?l=0:t.lineIndent<e&&(l=-1)),l===1)for(;Yee(t)||qee(t);)Yt(t,!0,-1)?(c=!0,a=o,t.lineIndent>e?l=1:t.lineIndent===e?l=0:t.lineIndent<e&&(l=-1)):a=!1;if(a&&(a=c||i),(l===1||xd===n)&&(Od===n||xj===n?O=e:O=e+1,m=t.position-t.lineStart,l===1?a&&(XC(t,m)||Gee(t,m,O))||Lee(t,O)?u=!0:(s&&Xee(t,O)||Vee(t,O)||zee(t,O)?u=!0:Uee(t)?(u=!0,(t.tag!==null||t.anchor!==null)&&ke(t,"alias node should not have any properties")):Wee(t,O,Od===n)&&(u=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):l===0&&(u=a&&XC(t,m))),t.tag===null)t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);else if(t.tag==="?"){for(t.result!==null&&t.kind!=="scalar"&&ke(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),f=0,d=t.implicitTypes.length;f<d;f+=1)if(p=t.implicitTypes[f],p.resolve(t.result)){t.result=p.construct(t.result),t.tag=p.tag,t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);break}}else if(t.tag!=="!"){if(Co.call(t.typeMap[t.kind||"fallback"],t.tag))p=t.typeMap[t.kind||"fallback"][t.tag];else for(p=null,h=t.typeMap.multi[t.kind||"fallback"],f=0,d=h.length;f<d;f+=1)if(t.tag.slice(0,h[f].tag.length)===h[f].tag){p=h[f];break}p||ke(t,"unknown tag !<"+t.tag+">"),t.result!==null&&p.kind!==t.kind&&ke(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+p.kind+'", not "'+t.kind+'"'),p.resolve(t.result,t.tag)?(t.result=p.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):ke(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||u}function Hee(t){var e=t.position,n,r,i,o=!1,s;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(s=t.input.charCodeAt(t.position))!==0&&(Yt(t,!0,-1),s=t.input.charCodeAt(t.position),!(t.lineIndent>0||s!==37));){for(o=!0,s=t.input.charCodeAt(++t.position),n=t.position;s!==0&&!Jn(s);)s=t.input.charCodeAt(++t.position);for(r=t.input.slice(n,t.position),i=[],r.length<1&&ke(t,"directive name must not be less than one character in length");s!==0;){for(;Uo(s);)s=t.input.charCodeAt(++t.position);if(s===35){do s=t.input.charCodeAt(++t.position);while(s!==0&&!xi(s));break}if(xi(s))break;for(n=t.position;s!==0&&!Jn(s);)s=t.input.charCodeAt(++t.position);i.push(t.input.slice(n,t.position))}s!==0&&Ux(t),Co.call(zC,r)?zC[r](t,r,i):vd(t,'unknown document directive "'+r+'"')}if(Yt(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,Yt(t,!0,-1)):o&&ke(t,"directives end mark is expected"),Sa(t,t.lineIndent-1,xd,!1,!0),Yt(t,!0,-1),t.checkLineBreaks&&Qee.test(t.input.slice(e,t.position))&&vd(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&dh(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,Yt(t,!0,-1));return}if(t.position<t.length-1)ke(t,"end of the stream or a document separator is expected");else return}function kj(t,e){t=String(t),e=e||{},t.length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=`
1916
+ `,o?1+l:l),o=!0,s=!0,l=0,n=t.position;!xi(f)&&f!==0;)f=t.input.charCodeAt(++t.position);go(t,n,t.position,!1)}return!0}function XC(t,e){var n,r=t.tag,i=t.anchor,o=[],s,a=!1,l;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=o),l=t.input.charCodeAt(t.position);l!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,ke(t,"tab characters must not be used in indentation")),!(l!==45||(s=t.input.charCodeAt(t.position+1),!Jn(s))));){if(a=!0,t.position++,Yt(t,!0,-1)&&t.lineIndent<=e){o.push(null),l=t.input.charCodeAt(t.position);continue}if(n=t.line,Sa(t,e,vj,!1,!0),o.push(t.result),Yt(t,!0,-1),l=t.input.charCodeAt(t.position),(t.line===n||t.lineIndent>e)&&l!==0)ke(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return a?(t.tag=r,t.anchor=i,t.kind="sequence",t.result=o,!0):!1}function Gee(t,e,n){var r,i,o,s,a,l,c=t.tag,u=t.anchor,f={},d=Object.create(null),h=null,p=null,O=null,m=!1,x=!1,v;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=f),v=t.input.charCodeAt(t.position);v!==0;){if(!m&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,ke(t,"tab characters must not be used in indentation")),r=t.input.charCodeAt(t.position+1),o=t.line,(v===63||v===58)&&Jn(r))v===63?(m&&(Fs(t,f,d,h,p,null,s,a,l),h=p=O=null),x=!0,m=!0,i=!0):m?(m=!1,i=!0):ke(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,v=r;else{if(s=t.line,a=t.lineStart,l=t.position,!Sa(t,n,xj,!1,!0))break;if(t.line===o){for(v=t.input.charCodeAt(t.position);Ho(v);)v=t.input.charCodeAt(++t.position);if(v===58)v=t.input.charCodeAt(++t.position),Jn(v)||ke(t,"a whitespace character is expected after the key-value separator within a block mapping"),m&&(Fs(t,f,d,h,p,null,s,a,l),h=p=O=null),x=!0,m=!1,i=!1,h=t.tag,p=t.result;else if(x)ke(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=c,t.anchor=u,!0}else if(x)ke(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=c,t.anchor=u,!0}if((t.line===o||t.lineIndent>e)&&(m&&(s=t.line,a=t.lineStart,l=t.position),Sa(t,e,xd,!0,i)&&(m?p=t.result:O=t.result),m||(Fs(t,f,d,h,p,O,s,a,l),h=p=O=null),Yt(t,!0,-1),v=t.input.charCodeAt(t.position)),(t.line===o||t.lineIndent>e)&&v!==0)ke(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return m&&Fs(t,f,d,h,p,null,s,a,l),x&&(t.tag=c,t.anchor=u,t.kind="mapping",t.result=f),x}function Yee(t){var e,n=!1,r=!1,i,o,s;if(s=t.input.charCodeAt(t.position),s!==33)return!1;if(t.tag!==null&&ke(t,"duplication of a tag property"),s=t.input.charCodeAt(++t.position),s===60?(n=!0,s=t.input.charCodeAt(++t.position)):s===33?(r=!0,i="!!",s=t.input.charCodeAt(++t.position)):i="!",e=t.position,n){do s=t.input.charCodeAt(++t.position);while(s!==0&&s!==62);t.position<t.length?(o=t.input.slice(e,t.position),s=t.input.charCodeAt(++t.position)):ke(t,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!Jn(s);)s===33&&(r?ke(t,"tag suffix cannot contain exclamation marks"):(i=t.input.slice(e-1,t.position+1),yj.test(i)||ke(t,"named tag handle cannot contain such characters"),r=!0,e=t.position+1)),s=t.input.charCodeAt(++t.position);o=t.input.slice(e,t.position),Bee.test(o)&&ke(t,"tag suffix cannot contain flow indicator characters")}o&&!bj.test(o)&&ke(t,"tag name cannot contain such characters: "+o);try{o=decodeURIComponent(o)}catch{ke(t,"tag name is malformed: "+o)}return n?t.tag=o:Co.call(t.tagMap,i)?t.tag=t.tagMap[i]+o:i==="!"?t.tag="!"+o:i==="!!"?t.tag="tag:yaml.org,2002:"+o:ke(t,'undeclared tag handle "'+i+'"'),!0}function qee(t){var e,n;if(n=t.input.charCodeAt(t.position),n!==38)return!1;for(t.anchor!==null&&ke(t,"duplication of an anchor property"),n=t.input.charCodeAt(++t.position),e=t.position;n!==0&&!Jn(n)&&!Ns(n);)n=t.input.charCodeAt(++t.position);return t.position===e&&ke(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function Uee(t){var e,n,r;if(r=t.input.charCodeAt(t.position),r!==42)return!1;for(r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!Jn(r)&&!Ns(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&ke(t,"name of an alias node must contain at least one character"),n=t.input.slice(e,t.position),Co.call(t.anchorMap,n)||ke(t,'unidentified alias "'+n+'"'),t.result=t.anchorMap[n],Yt(t,!0,-1),!0}function Sa(t,e,n,r,i){var o,s,a,l=1,c=!1,u=!1,f,d,h,p,O,m;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,o=s=a=xd===n||vj===n,r&&Yt(t,!0,-1)&&(c=!0,t.lineIndent>e?l=1:t.lineIndent===e?l=0:t.lineIndent<e&&(l=-1)),l===1)for(;Yee(t)||qee(t);)Yt(t,!0,-1)?(c=!0,a=o,t.lineIndent>e?l=1:t.lineIndent===e?l=0:t.lineIndent<e&&(l=-1)):a=!1;if(a&&(a=c||i),(l===1||xd===n)&&(Od===n||xj===n?O=e:O=e+1,m=t.position-t.lineStart,l===1?a&&(XC(t,m)||Gee(t,m,O))||Lee(t,O)?u=!0:(s&&Xee(t,O)||Vee(t,O)||zee(t,O)?u=!0:Uee(t)?(u=!0,(t.tag!==null||t.anchor!==null)&&ke(t,"alias node should not have any properties")):Wee(t,O,Od===n)&&(u=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):l===0&&(u=a&&XC(t,m))),t.tag===null)t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);else if(t.tag==="?"){for(t.result!==null&&t.kind!=="scalar"&&ke(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),f=0,d=t.implicitTypes.length;f<d;f+=1)if(p=t.implicitTypes[f],p.resolve(t.result)){t.result=p.construct(t.result),t.tag=p.tag,t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);break}}else if(t.tag!=="!"){if(Co.call(t.typeMap[t.kind||"fallback"],t.tag))p=t.typeMap[t.kind||"fallback"][t.tag];else for(p=null,h=t.typeMap.multi[t.kind||"fallback"],f=0,d=h.length;f<d;f+=1)if(t.tag.slice(0,h[f].tag.length)===h[f].tag){p=h[f];break}p||ke(t,"unknown tag !<"+t.tag+">"),t.result!==null&&p.kind!==t.kind&&ke(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+p.kind+'", not "'+t.kind+'"'),p.resolve(t.result,t.tag)?(t.result=p.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):ke(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||u}function Hee(t){var e=t.position,n,r,i,o=!1,s;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(s=t.input.charCodeAt(t.position))!==0&&(Yt(t,!0,-1),s=t.input.charCodeAt(t.position),!(t.lineIndent>0||s!==37));){for(o=!0,s=t.input.charCodeAt(++t.position),n=t.position;s!==0&&!Jn(s);)s=t.input.charCodeAt(++t.position);for(r=t.input.slice(n,t.position),i=[],r.length<1&&ke(t,"directive name must not be less than one character in length");s!==0;){for(;Ho(s);)s=t.input.charCodeAt(++t.position);if(s===35){do s=t.input.charCodeAt(++t.position);while(s!==0&&!xi(s));break}if(xi(s))break;for(n=t.position;s!==0&&!Jn(s);)s=t.input.charCodeAt(++t.position);i.push(t.input.slice(n,t.position))}s!==0&&Ux(t),Co.call(zC,r)?zC[r](t,r,i):vd(t,'unknown document directive "'+r+'"')}if(Yt(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,Yt(t,!0,-1)):o&&ke(t,"directives end mark is expected"),Sa(t,t.lineIndent-1,xd,!1,!0),Yt(t,!0,-1),t.checkLineBreaks&&Qee.test(t.input.slice(e,t.position))&&vd(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&dh(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,Yt(t,!0,-1));return}if(t.position<t.length-1)ke(t,"end of the stream or a document separator is expected");else return}function kj(t,e){t=String(t),e=e||{},t.length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=`
1917
1917
  `),t.charCodeAt(0)===65279&&(t=t.slice(1)));var n=new Zee(t,e),r=t.indexOf("\0");for(r!==-1&&(n.position=r,ke(n,"null byte is not allowed in input")),n.input+="\0";n.input.charCodeAt(n.position)===32;)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)Hee(n);return n.documents}function Jee(t,e,n){e!==null&&typeof e=="object"&&typeof n>"u"&&(n=e,e=null);var r=kj(t,n);if(typeof e!="function")return r;for(var i=0,o=r.length;i<o;i+=1)e(r[i])}function Kee(t,e){var n=kj(t,e);if(n.length!==0){if(n.length===1)return n[0];throw new Fn("expected a single document in the stream, but found more")}}var ete=Jee,tte=Kee,Aj={loadAll:ete,load:tte},Pj=Object.prototype.toString,Ej=Object.prototype.hasOwnProperty,Jx=65279,nte=9,sc=10,rte=13,ite=32,ote=33,ste=34,qm=35,ate=37,lte=38,cte=39,ute=42,Ij=44,fte=45,yd=58,dte=61,hte=62,pte=63,gte=64,Tj=91,$j=93,mte=96,jj=123,Ote=124,Rj=125,Qn={};Qn[0]="\\0";Qn[7]="\\a";Qn[8]="\\b";Qn[9]="\\t";Qn[10]="\\n";Qn[11]="\\v";Qn[12]="\\f";Qn[13]="\\r";Qn[27]="\\e";Qn[34]='\\"';Qn[92]="\\\\";Qn[133]="\\N";Qn[160]="\\_";Qn[8232]="\\L";Qn[8233]="\\P";var xte=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],vte=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function yte(t,e){var n,r,i,o,s,a,l;if(e===null)return{};for(n={},r=Object.keys(e),i=0,o=r.length;i<o;i+=1)s=r[i],a=String(e[s]),s.slice(0,2)==="!!"&&(s="tag:yaml.org,2002:"+s.slice(2)),l=t.compiledTypeMap.fallback[s],l&&Ej.call(l.styleAliases,a)&&(a=l.styleAliases[a]),n[s]=a;return n}function bte(t){var e,n,r;if(e=t.toString(16).toUpperCase(),t<=255)n="x",r=2;else if(t<=65535)n="u",r=4;else if(t<=4294967295)n="U",r=8;else throw new Fn("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+n+on.repeat("0",r-e.length)+e}var Ste=1,ac=2;function wte(t){this.schema=t.schema||qx,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=on.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=yte(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType=t.quotingType==='"'?ac:Ste,this.forceQuotes=t.forceQuotes||!1,this.replacer=typeof t.replacer=="function"?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function GC(t,e){for(var n=on.repeat(" ",e),r=0,i=-1,o="",s,a=t.length;r<a;)i=t.indexOf(`
1918
1918
  `,r),i===-1?(s=t.slice(r),r=a):(s=t.slice(r,i+1),r=i+1),s.length&&s!==`
1919
1919
  `&&(o+=n),o+=s;return o}function Um(t,e){return`
@@ -2097,7 +2097,7 @@ Please report this to https://github.com/markedjs/marked.`,e.silent)return"<p>An
2097
2097
  justify-content: center;
2098
2098
  align-items: flex-start;
2099
2099
  gap: 2px;
2100
- `;function Hne({defaultName:t,onChange:e,onSave:n,onCancel:r,before:i,level:o=0,placeholder:s="New Request",siblingItems:a}){const{newName:l,setNewName:c,disabled:u}=Xx(t,a),f=j.useRef(null),d=l.trim();j.useEffect(()=>{var O;(O=f.current)==null||O.focus()},[f]);const h=j.useCallback(O=>{O.key==="Escape"&&(r==null||r()),O.key==="Enter"&&!u&&n(d)},[r,n,d,u]),p=O=>{c(O.target.value),e==null||e(O)};return g.jsx(Po,{onClickOutside:r,children:g.jsxs(Jne,{$level:o,onKeyDown:h,children:[i,g.jsx(Ho,{ref:f,"data-testid":"edit-item-header-input",type:"text",placeholder:s,value:l,onChange:p}),g.jsx(ik,{"data-testid":"edit-item-header-save-button",variant:"primary",size:"small",onClick:()=>n(d),disabled:u,icon:g.jsx(_.CheckmarkIcon,{})}),g.jsx(ik,{"data-testid":"edit-item-header-cancel-button",variant:"text",size:"small",onClick:r,icon:g.jsx(_.CloseIcon,{})})]})})}const Jne=T.div`
2100
+ `;function Hne({defaultName:t,onChange:e,onSave:n,onCancel:r,before:i,level:o=0,placeholder:s="New Request",siblingItems:a}){const{newName:l,setNewName:c,disabled:u}=Xx(t,a),f=j.useRef(null),d=l.trim();j.useEffect(()=>{var O;(O=f.current)==null||O.focus()},[f]);const h=j.useCallback(O=>{O.key==="Escape"&&(r==null||r()),O.key==="Enter"&&!u&&n(d)},[r,n,d,u]),p=O=>{c(O.target.value),e==null||e(O)};return g.jsx(Po,{onClickOutside:r,children:g.jsxs(Jne,{$level:o,onKeyDown:h,children:[i,g.jsx(Jo,{ref:f,"data-testid":"edit-item-header-input",type:"text",placeholder:s,value:l,onChange:p}),g.jsx(ik,{"data-testid":"edit-item-header-save-button",variant:"primary",size:"small",onClick:()=>n(d),disabled:u,icon:g.jsx(_.CheckmarkIcon,{})}),g.jsx(ik,{"data-testid":"edit-item-header-cancel-button",variant:"text",size:"small",onClick:r,icon:g.jsx(_.CloseIcon,{})})]})})}const Jne=T.div`
2101
2101
  display: flex;
2102
2102
  align-items: center;
2103
2103
  gap: 4px;
@@ -2140,7 +2140,7 @@ Please report this to https://github.com/markedjs/marked.`,e.silent)return"<p>An
2140
2140
  & + & {
2141
2141
  margin-left: 0;
2142
2142
  }
2143
- `;function zj({item:t,level:e,itemList:n,expanded:r}){const{transactionSource:i}=je(),o=Zx(),{sendEvent:s}=ct(),a=()=>{t.get().value.state===gt.Draft?s("collections_folder_creation_cancelled",{}):s("collections_folder_removed",{name:t.get().value.name}),c(t.get({noproxy:!0}).value)&&i.set(null),t.set(lt)},l=()=>{const u=t.get({noproxy:!0}).value;t.get().value.state===gt.Draft?s("collections_request_creation_cancelled",{}):s("collections_request_removed",{name:u.name}),(o==null?void 0:o.get().id)===u.id&&i.set(null),t.set(lt)},c=u=>u.items.some(f=>f.type===sn.Folder?c(f.value):(o==null?void 0:o.get().id)===f.value.id);return t.get().type===sn.Folder?g.jsx(zne,{folder:t.nested("value"),siblingItems:n,onRemove:a,level:e,expanded:r}):g.jsx(Kne,{item:t.nested("value"),siblingItems:n,level:e,onRemove:l})}async function rre(){const t=document.createElement("input");return t.type="file",t.accept=".json, .yaml, .yml",new Promise((e,n)=>{const r=i=>{var c;const s=(c=i.target.files)==null?void 0:c[0];if(!s){n(new Error("No file selected."));return}const a=s.name.toLowerCase();if(!a.endsWith(".json")&&!a.endsWith(".yaml")&&!a.endsWith(".yml")){n(new Error("Please select a JSON, YAML, or YML file."));return}const l=new FileReader;l.onload=u=>{var d;const f=(d=u.target)==null?void 0:d.result;typeof f=="string"?e(f):n(new Error("Failed to read file content."))},l.onerror=()=>{n(new Error("Error reading file."))},l.readAsText(s),t.removeEventListener("change",r)};t.addEventListener("change",r),t.click()})}var tO=(t=>(t[t.NoRequestItemsError=0]="NoRequestItemsError",t[t.RequestItemsParseError=1]="RequestItemsParseError",t))(tO||{});function ire(t){const e={type:sn.Folder,value:{id:crypto.randomUUID(),state:gt.Normal,name:nO(t.workflows[0].workflowId),items:ore(t.workflows[0].steps)}},n=Lj(e);return n===0?{data:null,error:0}:n<t.workflows[0].steps.length?{data:e,error:1}:{data:e}}function ore(t){const e=[];return t.forEach(n=>{const r=n.stepId.split("/");let i=e;r.forEach((o,s)=>{if(s===r.length-1){const a=sre(n,i);a&&i.push(a)}else i=are(i,o).value.items})}),e}function sre(t,e){var n;try{const r=ba(e,t.description);return{type:sn.Request,value:{id:crypto.randomUUID(),state:gt.Normal,name:r,request:{method:t["x-operation"].method.toUpperCase(),url:t["x-replay"].path,security:lre(t["x-replay"].securities),body:cre({contentType:(n=t.requestBody)==null?void 0:n.contentType,payload:t["x-replay"].body}),queryParameters:kg(t["x-replay"].parameters,"query"),headers:kg(t["x-replay"].parameters,"header"),cookies:kg(t["x-replay"].parameters,"cookie")},response:null}}}catch{return null}}function are(t,e){let n=t.find(r=>r.type===sn.Folder&&r.value.name===nO(e));return n||(n={type:sn.Folder,value:{id:crypto.randomUUID(),state:gt.Normal,name:nO(e),items:[]}},t.push(n)),n}function lre(t){return{securitySchemeVariants:[],selectedSecuritySchemeId:"",securities:t.map(e=>{const n=us(),r=e.type;return{...n,securityType:e.type,[e.type]:{...n[r],...e.data}}})}}function cre(t){if(!(t!=null&&t.payload)||!(t!=null&&t.contentType))return{...to(),type:ot.Text};const{contentType:e,payload:n}=t;switch(e){case ot.JSON:case ot.HTML:case ot.XML:case ot.Text:return{...to(),type:e,content:JSON.parse(n)};case ot.FormData:return{...to(),type:e,formData:{"multipart/form-data":sk(n),"application/x-www-form-urlencoded":[]}};case ot["application/x-www-form-urlencoded"]:return{...to(),type:e,formData:{"multipart/form-data":[],"application/x-www-form-urlencoded":sk(n)}};default:return{...to(),type:ot.Text}}}function sk(t){return JSON.parse(t).map(e=>({id:crypto.randomUUID(),key:e.key,value:e.value,active:!0,type:"text"}))}function kg(t,e){const n=t.filter(({in:r})=>r===e).map(({value:r,name:i})=>({id:crypto.randomUUID(),key:i,active:!0,value:r}));return n.push(un()),n}function nO(t){return t.replace(/-/g," ")}function Lj(t){return t.type===sn.Request?1:t.type===sn.Folder?t.value.items.reduce((n,r)=>n+Lj(r),0):0}function ak({icon:t,title:e,description:n,cancelButtonLabel:r,submitButtonLabel:i,onClose:o,onSubmit:s}){return g.jsxs(g.Fragment,{children:[g.jsxs(ure,{children:[t,g.jsx(fre,{children:e}),g.jsx(dre,{children:n})]}),g.jsxs(hre,{children:[g.jsx(_.Button,{variant:"outlined",onClick:o,children:r}),g.jsx(_.Button,{variant:"primary",onClick:s,children:i})]})]})}const ure=T.div`
2143
+ `;function zj({item:t,level:e,itemList:n,expanded:r}){const{transactionSource:i}=je(),o=Zx(),{sendEvent:s}=ct(),a=()=>{t.get().value.state===gt.Draft?s("collections_folder_creation_cancelled",{}):s("collections_folder_removed",{name:t.get().value.name}),c(t.get({noproxy:!0}).value)&&i.set(null),t.set(lt)},l=()=>{const u=t.get({noproxy:!0}).value;t.get().value.state===gt.Draft?s("collections_request_creation_cancelled",{}):s("collections_request_removed",{name:u.name}),(o==null?void 0:o.get().id)===u.id&&i.set(null),t.set(lt)},c=u=>u.items.some(f=>f.type===sn.Folder?c(f.value):(o==null?void 0:o.get().id)===f.value.id);return t.get().type===sn.Folder?g.jsx(zne,{folder:t.nested("value"),siblingItems:n,onRemove:a,level:e,expanded:r}):g.jsx(Kne,{item:t.nested("value"),siblingItems:n,level:e,onRemove:l})}async function rre(){const t=document.createElement("input");return t.type="file",t.accept=".json, .yaml, .yml",new Promise((e,n)=>{const r=i=>{var c;const s=(c=i.target.files)==null?void 0:c[0];if(!s){n(new Error("No file selected."));return}const a=s.name.toLowerCase();if(!a.endsWith(".json")&&!a.endsWith(".yaml")&&!a.endsWith(".yml")){n(new Error("Please select a JSON, YAML, or YML file."));return}const l=new FileReader;l.onload=u=>{var d;const f=(d=u.target)==null?void 0:d.result;typeof f=="string"?e(f):n(new Error("Failed to read file content."))},l.onerror=()=>{n(new Error("Error reading file."))},l.readAsText(s),t.removeEventListener("change",r)};t.addEventListener("change",r),t.click()})}var tO=(t=>(t[t.NoRequestItemsError=0]="NoRequestItemsError",t[t.RequestItemsParseError=1]="RequestItemsParseError",t))(tO||{});function ire(t){const e={type:sn.Folder,value:{id:crypto.randomUUID(),state:gt.Normal,name:nO(t.workflows[0].workflowId),items:ore(t.workflows[0].steps)}},n=Lj(e);return n===0?{data:null,error:0}:n<t.workflows[0].steps.length?{data:e,error:1}:{data:e}}function ore(t){const e=[];return t.forEach(n=>{const r=n.stepId.split("/");let i=e;r.forEach((o,s)=>{if(s===r.length-1){const a=sre(n,i);a&&i.push(a)}else i=are(i,o).value.items})}),e}function sre(t,e){var n;try{const r=ba(e,t.description);return{type:sn.Request,value:{id:crypto.randomUUID(),state:gt.Normal,name:r,request:{method:t["x-operation"].method.toUpperCase(),url:t["x-replay"].path,security:lre(t["x-replay"].securities),body:cre({contentType:(n=t.requestBody)==null?void 0:n.contentType,payload:t["x-replay"].body}),queryParameters:kg(t["x-replay"].parameters,"query"),headers:kg(t["x-replay"].parameters,"header"),cookies:kg(t["x-replay"].parameters,"cookie")},response:null}}}catch{return null}}function are(t,e){let n=t.find(r=>r.type===sn.Folder&&r.value.name===nO(e));return n||(n={type:sn.Folder,value:{id:crypto.randomUUID(),state:gt.Normal,name:nO(e),items:[]}},t.push(n)),n}function lre(t){return{securitySchemeVariants:[],selectedSecuritySchemeId:"",securities:t.map(e=>{const n=fs(),r=e.type;return{...n,securityType:e.type,[e.type]:{...n[r],...e.data}}})}}function cre(t){if(!(t!=null&&t.payload)||!(t!=null&&t.contentType))return{...to(),type:ot.Text};const{contentType:e,payload:n}=t;switch(e){case ot.JSON:case ot.HTML:case ot.XML:case ot.Text:return{...to(),type:e,content:JSON.parse(n)};case ot.FormData:return{...to(),type:e,formData:{"multipart/form-data":sk(n),"application/x-www-form-urlencoded":[]}};case ot["application/x-www-form-urlencoded"]:return{...to(),type:e,formData:{"multipart/form-data":[],"application/x-www-form-urlencoded":sk(n)}};default:return{...to(),type:ot.Text}}}function sk(t){return JSON.parse(t).map(e=>({id:crypto.randomUUID(),key:e.key,value:e.value,active:!0,type:"text"}))}function kg(t,e){const n=t.filter(({in:r})=>r===e).map(({value:r,name:i})=>({id:crypto.randomUUID(),key:i,active:!0,value:r}));return n.push(un()),n}function nO(t){return t.replace(/-/g," ")}function Lj(t){return t.type===sn.Request?1:t.type===sn.Folder?t.value.items.reduce((n,r)=>n+Lj(r),0):0}function ak({icon:t,title:e,description:n,cancelButtonLabel:r,submitButtonLabel:i,onClose:o,onSubmit:s}){return g.jsxs(g.Fragment,{children:[g.jsxs(ure,{children:[t,g.jsx(fre,{children:e}),g.jsx(dre,{children:n})]}),g.jsxs(hre,{children:[g.jsx(_.Button,{variant:"outlined",onClick:o,children:r}),g.jsx(_.Button,{variant:"primary",onClick:s,children:i})]})]})}const ure=T.div`
2144
2144
  display: flex;
2145
2145
  flex-direction: column;
2146
2146
  align-items: center;