From 277bf979301190a41c2a3b4abfed7b9b80a28841 Mon Sep 17 00:00:00 2001 From: mitmproxy release bot Date: Sun, 12 Jan 2025 12:44:35 +0000 Subject: [PATCH] mitmproxy 11.1.0 --- CHANGELOG.md | 3 ++ mitmproxy/tools/web/static/app.js | 62 ++++++++++++------------ mitmproxy/tools/web/templates/index.html | 6 ++- mitmproxy/version.py | 2 +- 4 files changed, 40 insertions(+), 33 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a1b6388cc..75bd4e74c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ ## Unreleased: mitmproxy next + +## 12 January 2025: mitmproxy 11.1.0 + - **Local Capture Mode** is now available on Linux as well. ([#7440](https://github.com/mitmproxy/mitmproxy/pull/7440), @mhils) - mitmproxy now requires Python 3.12 or above. diff --git a/mitmproxy/tools/web/static/app.js b/mitmproxy/tools/web/static/app.js index d7222581d..724dba568 100644 --- a/mitmproxy/tools/web/static/app.js +++ b/mitmproxy/tools/web/static/app.js @@ -1,13 +1,13 @@ -(()=>{var PI=Object.create;var fv=Object.defineProperty;var AI=Object.getOwnPropertyDescriptor;var LI=Object.getOwnPropertyNames;var MI=Object.getPrototypeOf,OI=Object.prototype.hasOwnProperty;var i=(e,t)=>fv(e,"name",{value:t,configurable:!0});var rt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),wb=(e,t)=>{for(var n in t)fv(e,n,{get:t[n],enumerable:!0})},RI=(e,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of LI(t))!OI.call(e,l)&&l!==n&&fv(e,l,{get:()=>t[l],enumerable:!(s=AI(t,l))||s.enumerable});return e};var de=(e,t,n)=>(n=e!=null?PI(MI(e)):{},RI(t||!e||!e.__esModule?fv(n,"default",{value:e,enumerable:!0}):n,e));var Lb=rt(mt=>{"use strict";var Mh=Symbol.for("react.element"),DI=Symbol.for("react.portal"),II=Symbol.for("react.fragment"),FI=Symbol.for("react.strict_mode"),HI=Symbol.for("react.profiler"),BI=Symbol.for("react.provider"),zI=Symbol.for("react.context"),WI=Symbol.for("react.forward_ref"),UI=Symbol.for("react.suspense"),$I=Symbol.for("react.memo"),VI=Symbol.for("react.lazy"),Sb=Symbol.iterator;function qI(e){return e===null||typeof e!="object"?null:(e=Sb&&e[Sb]||e["@@iterator"],typeof e=="function"?e:null)}i(qI,"A");var _b={isMounted:i(function(){return!1},"isMounted"),enqueueForceUpdate:i(function(){},"enqueueForceUpdate"),enqueueReplaceState:i(function(){},"enqueueReplaceState"),enqueueSetState:i(function(){},"enqueueSetState")},Eb=Object.assign,bb={};function Ad(e,t,n){this.props=e,this.context=t,this.refs=bb,this.updater=n||_b}i(Ad,"E");Ad.prototype.isReactComponent={};Ad.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ad.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Tb(){}i(Tb,"F");Tb.prototype=Ad.prototype;function r1(e,t,n){this.props=e,this.context=t,this.refs=bb,this.updater=n||_b}i(r1,"G");var n1=r1.prototype=new Tb;n1.constructor=r1;Eb(n1,Ad.prototype);n1.isPureReactComponent=!0;var xb=Array.isArray,kb=Object.prototype.hasOwnProperty,i1={current:null},Nb={key:!0,ref:!0,__self:!0,__source:!0};function Pb(e,t,n){var s,l={},h=null,d=null;if(t!=null)for(s in t.ref!==void 0&&(d=t.ref),t.key!==void 0&&(h=""+t.key),t)kb.call(t,s)&&!Nb.hasOwnProperty(s)&&(l[s]=t[s]);var v=arguments.length-2;if(v===1)l.children=n;else if(1{"use strict";Mb.exports=Lb()});var Ub=rt(tr=>{"use strict";function u1(e,t){var n=e.length;e.push(t);e:for(;0>>1,l=e[s];if(0>>1;smv(v,n))Smv(b,v)?(e[s]=b,e[S]=n,s=S):(e[s]=v,e[d]=n,s=d);else if(Smv(b,n))e[s]=b,e[S]=n,s=S;else break e}}return t}i(vv,"k");function mv(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}i(mv,"g");typeof performance=="object"&&typeof performance.now=="function"?(Ob=performance,tr.unstable_now=function(){return Ob.now()}):(s1=Date,Rb=s1.now(),tr.unstable_now=function(){return s1.now()-Rb});var Ob,s1,Rb,va=[],xu=[],XI=1,rs=null,ti=3,yv=!1,Zc=!1,Rh=!1,Fb=typeof setTimeout=="function"?setTimeout:null,Hb=typeof clearTimeout=="function"?clearTimeout:null,Db=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function c1(e){for(var t=As(xu);t!==null;){if(t.callback===null)vv(xu);else if(t.startTime<=e)vv(xu),t.sortIndex=t.expirationTime,u1(va,t);else break;t=As(xu)}}i(c1,"G");function f1(e){if(Rh=!1,c1(e),!Zc)if(As(va)!==null)Zc=!0,p1(d1);else{var t=As(xu);t!==null&&h1(f1,t.startTime-e)}}i(f1,"H");function d1(e,t){Zc=!1,Rh&&(Rh=!1,Hb(Dh),Dh=-1),yv=!0;var n=ti;try{for(c1(t),rs=As(va);rs!==null&&(!(rs.expirationTime>t)||e&&!Wb());){var s=rs.callback;if(typeof s=="function"){rs.callback=null,ti=rs.priorityLevel;var l=s(rs.expirationTime<=t);t=tr.unstable_now(),typeof l=="function"?rs.callback=l:rs===As(va)&&vv(va),c1(t)}else vv(va);rs=As(va)}if(rs!==null)var h=!0;else{var d=As(xu);d!==null&&h1(f1,d.startTime-t),h=!1}return h}finally{rs=null,ti=n,yv=!1}}i(d1,"J");var wv=!1,gv=null,Dh=-1,Bb=5,zb=-1;function Wb(){return!(tr.unstable_now()-zbe||125s?(e.sortIndex=n,u1(xu,e),As(va)===null&&e===As(xu)&&(Rh?(Hb(Dh),Dh=-1):Rh=!0,h1(f1,n-s))):(e.sortIndex=l,u1(va,e),Zc||yv||(Zc=!0,p1(d1))),e};tr.unstable_shouldYield=Wb;tr.unstable_wrapCallback=function(e){var t=ti;return function(){var n=ti;ti=t;try{return e.apply(this,arguments)}finally{ti=n}}}});var Vb=rt((WU,$b)=>{"use strict";$b.exports=Ub()});var GN=rt(Lo=>{"use strict";var QI=be(),Po=Vb();function ge(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),F1=Object.prototype.hasOwnProperty,JI=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,qb={},jb={};function ZI(e){return F1.call(jb,e)?!0:F1.call(qb,e)?!1:JI.test(e)?jb[e]=!0:(qb[e]=!0,!1)}i(ZI,"oa");function eF(e,t,n,s){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return s?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}i(eF,"pa");function tF(e,t,n,s){if(t===null||typeof t>"u"||eF(e,t,n,s))return!0;if(s)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}i(tF,"qa");function Ti(e,t,n,s,l,h,d){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=s,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=h,this.removeEmptyString=d}i(Ti,"v");var jn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){jn[e]=new Ti(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];jn[t]=new Ti(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){jn[e]=new Ti(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){jn[e]=new Ti(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){jn[e]=new Ti(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){jn[e]=new Ti(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){jn[e]=new Ti(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){jn[e]=new Ti(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){jn[e]=new Ti(e,5,!1,e.toLowerCase(),null,!1,!1)});var PS=/[\-:]([a-z])/g;function AS(e){return e[1].toUpperCase()}i(AS,"sa");"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(PS,AS);jn[t]=new Ti(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(PS,AS);jn[t]=new Ti(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(PS,AS);jn[t]=new Ti(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){jn[e]=new Ti(e,1,!1,e.toLowerCase(),null,!1,!1)});jn.xlinkHref=new Ti("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){jn[e]=new Ti(e,1,!1,e.toLowerCase(),null,!0,!0)});function LS(e,t,n,s){var l=jn.hasOwnProperty(t)?jn[t]:null;(l!==null?l.type!==0:s||!(2{var kI=Object.create;var fv=Object.defineProperty;var NI=Object.getOwnPropertyDescriptor;var AI=Object.getOwnPropertyNames;var PI=Object.getPrototypeOf,LI=Object.prototype.hasOwnProperty;var i=(e,t)=>fv(e,"name",{value:t,configurable:!0});var rt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),yb=(e,t)=>{for(var n in t)fv(e,n,{get:t[n],enumerable:!0})},MI=(e,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of AI(t))!LI.call(e,l)&&l!==n&&fv(e,l,{get:()=>t[l],enumerable:!(s=NI(t,l))||s.enumerable});return e};var de=(e,t,n)=>(n=e!=null?kI(PI(e)):{},MI(t||!e||!e.__esModule?fv(n,"default",{value:e,enumerable:!0}):n,e));var Pb=rt(mt=>{"use strict";var Mh=Symbol.for("react.element"),OI=Symbol.for("react.portal"),RI=Symbol.for("react.fragment"),DI=Symbol.for("react.strict_mode"),II=Symbol.for("react.profiler"),FI=Symbol.for("react.provider"),HI=Symbol.for("react.context"),BI=Symbol.for("react.forward_ref"),zI=Symbol.for("react.suspense"),WI=Symbol.for("react.memo"),UI=Symbol.for("react.lazy"),wb=Symbol.iterator;function $I(e){return e===null||typeof e!="object"?null:(e=wb&&e[wb]||e["@@iterator"],typeof e=="function"?e:null)}i($I,"A");var Cb={isMounted:i(function(){return!1},"isMounted"),enqueueForceUpdate:i(function(){},"enqueueForceUpdate"),enqueueReplaceState:i(function(){},"enqueueReplaceState"),enqueueSetState:i(function(){},"enqueueSetState")},_b=Object.assign,Eb={};function Pd(e,t,n){this.props=e,this.context=t,this.refs=Eb,this.updater=n||Cb}i(Pd,"E");Pd.prototype.isReactComponent={};Pd.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Pd.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function bb(){}i(bb,"F");bb.prototype=Pd.prototype;function r1(e,t,n){this.props=e,this.context=t,this.refs=Eb,this.updater=n||Cb}i(r1,"G");var n1=r1.prototype=new bb;n1.constructor=r1;_b(n1,Pd.prototype);n1.isPureReactComponent=!0;var Sb=Array.isArray,Tb=Object.prototype.hasOwnProperty,i1={current:null},kb={key:!0,ref:!0,__self:!0,__source:!0};function Nb(e,t,n){var s,l={},h=null,d=null;if(t!=null)for(s in t.ref!==void 0&&(d=t.ref),t.key!==void 0&&(h=""+t.key),t)Tb.call(t,s)&&!kb.hasOwnProperty(s)&&(l[s]=t[s]);var v=arguments.length-2;if(v===1)l.children=n;else if(1{"use strict";Lb.exports=Pb()});var Wb=rt(rr=>{"use strict";function u1(e,t){var n=e.length;e.push(t);e:for(;0>>1,l=e[s];if(0>>1;smv(v,n))Smv(b,v)?(e[s]=b,e[S]=n,s=S):(e[s]=v,e[d]=n,s=d);else if(Smv(b,n))e[s]=b,e[S]=n,s=S;else break e}}return t}i(vv,"k");function mv(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}i(mv,"g");typeof performance=="object"&&typeof performance.now=="function"?(Mb=performance,rr.unstable_now=function(){return Mb.now()}):(s1=Date,Ob=s1.now(),rr.unstable_now=function(){return s1.now()-Ob});var Mb,s1,Ob,va=[],xu=[],GI=1,rs=null,ti=3,yv=!1,Zc=!1,Rh=!1,Ib=typeof setTimeout=="function"?setTimeout:null,Fb=typeof clearTimeout=="function"?clearTimeout:null,Rb=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function c1(e){for(var t=Ps(xu);t!==null;){if(t.callback===null)vv(xu);else if(t.startTime<=e)vv(xu),t.sortIndex=t.expirationTime,u1(va,t);else break;t=Ps(xu)}}i(c1,"G");function f1(e){if(Rh=!1,c1(e),!Zc)if(Ps(va)!==null)Zc=!0,p1(d1);else{var t=Ps(xu);t!==null&&h1(f1,t.startTime-e)}}i(f1,"H");function d1(e,t){Zc=!1,Rh&&(Rh=!1,Fb(Dh),Dh=-1),yv=!0;var n=ti;try{for(c1(t),rs=Ps(va);rs!==null&&(!(rs.expirationTime>t)||e&&!zb());){var s=rs.callback;if(typeof s=="function"){rs.callback=null,ti=rs.priorityLevel;var l=s(rs.expirationTime<=t);t=rr.unstable_now(),typeof l=="function"?rs.callback=l:rs===Ps(va)&&vv(va),c1(t)}else vv(va);rs=Ps(va)}if(rs!==null)var h=!0;else{var d=Ps(xu);d!==null&&h1(f1,d.startTime-t),h=!1}return h}finally{rs=null,ti=n,yv=!1}}i(d1,"J");var wv=!1,gv=null,Dh=-1,Hb=5,Bb=-1;function zb(){return!(rr.unstable_now()-Bbe||125s?(e.sortIndex=n,u1(xu,e),Ps(va)===null&&e===Ps(xu)&&(Rh?(Fb(Dh),Dh=-1):Rh=!0,h1(f1,n-s))):(e.sortIndex=l,u1(va,e),Zc||yv||(Zc=!0,p1(d1))),e};rr.unstable_shouldYield=zb;rr.unstable_wrapCallback=function(e){var t=ti;return function(){var n=ti;ti=t;try{return e.apply(this,arguments)}finally{ti=n}}}});var $b=rt((W8,Ub)=>{"use strict";Ub.exports=Wb()});var KN=rt(Lo=>{"use strict";var YI=be(),Ao=$b();function ge(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),F1=Object.prototype.hasOwnProperty,XI=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Vb={},qb={};function QI(e){return F1.call(qb,e)?!0:F1.call(Vb,e)?!1:XI.test(e)?qb[e]=!0:(Vb[e]=!0,!1)}i(QI,"oa");function JI(e,t,n,s){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return s?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}i(JI,"pa");function ZI(e,t,n,s){if(t===null||typeof t>"u"||JI(e,t,n,s))return!0;if(s)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}i(ZI,"qa");function Ti(e,t,n,s,l,h,d){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=s,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=h,this.removeEmptyString=d}i(Ti,"v");var jn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){jn[e]=new Ti(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];jn[t]=new Ti(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){jn[e]=new Ti(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){jn[e]=new Ti(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){jn[e]=new Ti(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){jn[e]=new Ti(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){jn[e]=new Ti(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){jn[e]=new Ti(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){jn[e]=new Ti(e,5,!1,e.toLowerCase(),null,!1,!1)});var AS=/[\-:]([a-z])/g;function PS(e){return e[1].toUpperCase()}i(PS,"sa");"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(AS,PS);jn[t]=new Ti(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(AS,PS);jn[t]=new Ti(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(AS,PS);jn[t]=new Ti(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){jn[e]=new Ti(e,1,!1,e.toLowerCase(),null,!1,!1)});jn.xlinkHref=new Ti("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){jn[e]=new Ti(e,1,!1,e.toLowerCase(),null,!0,!0)});function LS(e,t,n,s){var l=jn.hasOwnProperty(t)?jn[t]:null;(l!==null?l.type!==0:s||!(2v||l[d]!==h[v]){var S=` -`+l[d].replace(" at new "," at ");return e.displayName&&S.includes("")&&(S=S.replace("",e.displayName)),S}while(1<=d&&0<=v);break}}}finally{g1=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Vh(e):""}i(v1,"Oa");function rF(e){switch(e.tag){case 5:return Vh(e.type);case 16:return Vh("Lazy");case 13:return Vh("Suspense");case 19:return Vh("SuspenseList");case 0:case 2:case 15:return e=v1(e.type,!1),e;case 11:return e=v1(e.type.render,!1),e;case 1:return e=v1(e.type,!0),e;default:return""}}i(rF,"Pa");function W1(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Rd:return"Fragment";case Od:return"Portal";case H1:return"Profiler";case MS:return"StrictMode";case B1:return"Suspense";case z1:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ZT:return(e.displayName||"Context")+".Consumer";case JT:return(e._context.displayName||"Context")+".Provider";case OS:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case RS:return t=e.displayName||null,t!==null?t:W1(e.type)||"Memo";case _u:t=e._payload,e=e._init;try{return W1(e(t))}catch{}}return null}i(W1,"Qa");function nF(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return W1(t);case 8:return t===MS?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}i(nF,"Ra");function Fu(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}i(Fu,"Sa");function tk(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}i(tk,"Ta");function iF(e){var t=tk(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),s=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,h=n.set;return Object.defineProperty(e,t,{configurable:!0,get:i(function(){return l.call(this)},"get"),set:i(function(d){s=""+d,h.call(this,d)},"set")}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:i(function(){return s},"getValue"),setValue:i(function(d){s=""+d},"setValue"),stopTracking:i(function(){e._valueTracker=null,delete e[t]},"stopTracking")}}}i(iF,"Ua");function xv(e){e._valueTracker||(e._valueTracker=iF(e))}i(xv,"Va");function rk(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),s="";return e&&(s=tk(e)?e.checked?"true":"false":e.value),e=s,e!==n?(t.setValue(e),!0):!1}i(rk,"Wa");function Yv(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}i(Yv,"Xa");function U1(e,t){var n=t.checked;return kr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}i(U1,"Ya");function Gb(e,t){var n=t.defaultValue==null?"":t.defaultValue,s=t.checked!=null?t.checked:t.defaultChecked;n=Fu(t.value!=null?t.value:n),e._wrapperState={initialChecked:s,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}i(Gb,"Za");function nk(e,t){t=t.checked,t!=null&&LS(e,"checked",t,!1)}i(nk,"ab");function $1(e,t){nk(e,t);var n=Fu(t.value),s=t.type;if(n!=null)s==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(s==="submit"||s==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?V1(e,t.type,n):t.hasOwnProperty("defaultValue")&&V1(e,t.type,Fu(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}i($1,"bb");function Yb(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var s=t.type;if(!(s!=="submit"&&s!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}i(Yb,"db");function V1(e,t,n){(t!=="number"||Yv(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}i(V1,"cb");var qh=Array.isArray;function qd(e,t,n,s){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=Cv.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function im(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}i(im,"ob");var Gh={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},oF=["Webkit","ms","Moz","O"];Object.keys(Gh).forEach(function(e){oF.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Gh[t]=Gh[e]})});function ak(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Gh.hasOwnProperty(e)&&Gh[e]?(""+t).trim():t+"px"}i(ak,"rb");function lk(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var s=n.indexOf("--")===0,l=ak(n,t[n],s);n==="float"&&(n="cssFloat"),s?e.setProperty(n,l):e[n]=l}}i(lk,"sb");var sF=kr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function K1(e,t){if(t){if(sF[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ge(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ge(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ge(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ge(62))}}i(K1,"ub");function G1(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}i(G1,"vb");var Y1=null;function DS(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}i(DS,"xb");var X1=null,jd=null,Kd=null;function Jb(e){if(e=Cm(e)){if(typeof X1!="function")throw Error(ge(280));var t=e.stateNode;t&&(t=_y(t),X1(e.stateNode,e.type,t))}}i(Jb,"Bb");function uk(e){jd?Kd?Kd.push(e):Kd=[e]:jd=e}i(uk,"Eb");function ck(){if(jd){var e=jd,t=Kd;if(Kd=jd=null,Jb(e),t)for(e=0;e>>=0,e===0?32:31-(vF(e)/yF|0)|0}i(wF,"nc");var _v=64,Ev=4194304;function jh(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}i(jh,"tc");function Zv(e,t){var n=e.pendingLanes;if(n===0)return 0;var s=0,l=e.suspendedLanes,h=e.pingedLanes,d=n&268435455;if(d!==0){var v=d&~l;v!==0?s=jh(v):(h&=d,h!==0&&(s=jh(h)))}else d=n&~l,d!==0?s=jh(d):h!==0&&(s=jh(h));if(s===0)return 0;if(t!==0&&t!==s&&!(t&l)&&(l=s&-s,h=t&-t,l>=h||l===16&&(h&4194240)!==0))return t;if(s&4&&(s|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=s;0n;n++)t.push(e);return t}i(w1,"zc");function Sm(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ds(t),e[t]=n}i(Sm,"Ac");function CF(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var s=e.eventTimes;for(e=e.expirationTimes;0=Xh),aT=" ",lT=!1;function Ak(e,t){switch(e){case"keyup":return XF.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}i(Ak,"ge");function Lk(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}i(Lk,"he");var Dd=!1;function JF(e,t){switch(e){case"compositionend":return Lk(t);case"keypress":return t.which!==32?null:(lT=!0,aT);case"textInput":return e=t.data,e===aT&&lT?null:e;default:return null}}i(JF,"je");function ZF(e,t){if(Dd)return e==="compositionend"||!$S&&Ak(e,t)?(e=Nk(),zv=zS=ku=null,Dd=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=s}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=fT(n)}}i(dT,"Ke");function Dk(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Dk(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}i(Dk,"Le");function Ik(){for(var e=window,t=Yv();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Yv(e.document)}return t}i(Ik,"Me");function VS(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}i(VS,"Ne");function l3(e){var t=Ik(),n=e.focusedElem,s=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Dk(n.ownerDocument.documentElement,n)){if(s!==null&&VS(n)){if(t=s.start,e=s.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,h=Math.min(s.start,l);s=s.end===void 0?h:Math.min(s.end,l),!e.extend&&h>s&&(l=s,s=h,h=l),l=dT(n,h);var d=dT(n,s);l&&d&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==d.node||e.focusOffset!==d.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),h>s?(e.addRange(t),e.extend(d.node,d.offset)):(t.setEnd(d.node,d.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Id=null,rS=null,Jh=null,nS=!1;function pT(e,t,n){var s=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;nS||Id==null||Id!==Yv(s)||(s=Id,"selectionStart"in s&&VS(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Jh&&cm(Jh,s)||(Jh=s,s=ry(rS,"onSelect"),0Bd||(e.current=uS[Bd],uS[Bd]=null,Bd--)}i(fr,"E");function rr(e,t){Bd++,uS[Bd]=e.current,e.current=t}i(rr,"G");var Hu={},oi=zu(Hu),Ki=zu(!1),lf=Hu;function Jd(e,t){var n=e.type.contextTypes;if(!n)return Hu;var s=e.stateNode;if(s&&s.__reactInternalMemoizedUnmaskedChildContext===t)return s.__reactInternalMemoizedMaskedChildContext;var l={},h;for(h in n)l[h]=t[h];return s&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}i(Jd,"Yf");function Gi(e){return e=e.childContextTypes,e!=null}i(Gi,"Zf");function iy(){fr(Ki),fr(oi)}i(iy,"$f");function CT(e,t,n){if(oi.current!==Hu)throw Error(ge(168));rr(oi,t),rr(Ki,n)}i(CT,"ag");function qk(e,t,n){var s=e.stateNode;if(t=t.childContextTypes,typeof s.getChildContext!="function")return n;s=s.getChildContext();for(var l in s)if(!(l in t))throw Error(ge(108,nF(e)||"Unknown",l));return kr({},n,s)}i(qk,"bg");function oy(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Hu,lf=oi.current,rr(oi,e),rr(Ki,Ki.current),!0}i(oy,"cg");function _T(e,t,n){var s=e.stateNode;if(!s)throw Error(ge(169));n?(e=qk(e,t,lf),s.__reactInternalMemoizedMergedChildContext=e,fr(Ki),fr(oi),rr(oi,e)):fr(Ki),rr(Ki,n)}i(_T,"dg");var al=null,Ey=!1,N1=!1;function jk(e){al===null?al=[e]:al.push(e)}i(jk,"hg");function y3(e){Ey=!0,jk(e)}i(y3,"ig");function Wu(){if(!N1&&al!==null){N1=!0;var e=0,t=Vt;try{var n=al;for(Vt=1;e>=d,l-=d,ll=1<<32-Ds(t)+l|n<he?(Re=oe,oe=null):Re=oe.sibling;var Ee=I(F,oe,D[he],q);if(Ee===null){oe===null&&(oe=Re);break}e&&oe&&Ee.alternate===null&&t(F,oe),L=h(Ee,L,he),Z===null?te=Ee:Z.sibling=Ee,Z=Ee,oe=Re}if(he===D.length)return n(F,oe),mr&&ef(F,he),te;if(oe===null){for(;hehe?(Re=oe,oe=null):Re=oe.sibling;var Ye=I(F,oe,Ee.value,q);if(Ye===null){oe===null&&(oe=Re);break}e&&oe&&Ye.alternate===null&&t(F,oe),L=h(Ye,L,he),Z===null?te=Ye:Z.sibling=Ye,Z=Ye,oe=Re}if(Ee.done)return n(F,oe),mr&&ef(F,he),te;if(oe===null){for(;!Ee.done;he++,Ee=D.next())Ee=R(F,Ee.value,q),Ee!==null&&(L=h(Ee,L,he),Z===null?te=Ee:Z.sibling=Ee,Z=Ee);return mr&&ef(F,he),te}for(oe=s(F,oe);!Ee.done;he++,Ee=D.next())Ee=z(oe,F,he,Ee.value,q),Ee!==null&&(e&&Ee.alternate!==null&&oe.delete(Ee.key===null?he:Ee.key),L=h(Ee,L,he),Z===null?te=Ee:Z.sibling=Ee,Z=Ee);return e&&oe.forEach(function(tt){return t(F,tt)}),mr&&ef(F,he),te}i(Y,"t");function ne(F,L,D,q){if(typeof D=="object"&&D!==null&&D.type===Rd&&D.key===null&&(D=D.props.children),typeof D=="object"&&D!==null){switch(D.$$typeof){case Sv:e:{for(var te=D.key,Z=L;Z!==null;){if(Z.key===te){if(te=D.type,te===Rd){if(Z.tag===7){n(F,Z.sibling),L=l(Z,D.props.children),L.return=F,F=L;break e}}else if(Z.elementType===te||typeof te=="object"&&te!==null&&te.$$typeof===_u&&TT(te)===Z.type){n(F,Z.sibling),L=l(Z,D.props),L.ref=zh(F,Z,D),L.return=F,F=L;break e}n(F,Z);break}else t(F,Z);Z=Z.sibling}D.type===Rd?(L=af(D.props.children,F.mode,q,D.key),L.return=F,F=L):(q=Gv(D.type,D.key,D.props,null,F.mode,q),q.ref=zh(F,L,D),q.return=F,F=q)}return d(F);case Od:e:{for(Z=D.key;L!==null;){if(L.key===Z)if(L.tag===4&&L.stateNode.containerInfo===D.containerInfo&&L.stateNode.implementation===D.implementation){n(F,L.sibling),L=l(L,D.children||[]),L.return=F,F=L;break e}else{n(F,L);break}else t(F,L);L=L.sibling}L=I1(D,F.mode,q),L.return=F,F=L}return d(F);case _u:return Z=D._init,ne(F,L,Z(D._payload),q)}if(qh(D))return j(F,L,D,q);if(Ih(D))return Y(F,L,D,q);Dv(F,D)}return typeof D=="string"&&D!==""||typeof D=="number"?(D=""+D,L!==null&&L.tag===6?(n(F,L.sibling),L=l(L,D),L.return=F,F=L):(n(F,L),L=D1(D,F.mode,q),L.return=F,F=L),d(F)):n(F,L)}return i(ne,"J"),ne}i(Xk,"Og");var ep=Xk(!0),Qk=Xk(!1),ly=zu(null),uy=null,Ud=null,GS=null;function YS(){GS=Ud=uy=null}i(YS,"$g");function XS(e){var t=ly.current;fr(ly),e._currentValue=t}i(XS,"ah");function dS(e,t,n){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===n)break;e=e.return}}i(dS,"bh");function Yd(e,t){uy=e,GS=Ud=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ji=!0),e.firstContext=null)}i(Yd,"ch");function as(e){var t=e._currentValue;if(GS!==e)if(e={context:e,memoizedValue:t,next:null},Ud===null){if(uy===null)throw Error(ge(308));Ud=e,uy.dependencies={lanes:0,firstContext:e}}else Ud=Ud.next=e;return t}i(as,"eh");var nf=null;function QS(e){nf===null?nf=[e]:nf.push(e)}i(QS,"gh");function Jk(e,t,n,s){var l=t.interleaved;return l===null?(n.next=n,QS(t)):(n.next=l.next,l.next=n),t.interleaved=n,pl(e,s)}i(Jk,"hh");function pl(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}i(pl,"ih");var Eu=!1;function JS(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}i(JS,"kh");function Zk(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}i(Zk,"lh");function cl(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}i(cl,"mh");function Ou(e,t,n){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,Nt&2){var l=s.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),s.pending=t,pl(e,n)}return l=s.interleaved,l===null?(t.next=t,QS(s)):(t.next=l.next,l.next=t),s.interleaved=t,pl(e,n)}i(Ou,"nh");function Uv(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var s=t.lanes;s&=e.pendingLanes,n|=s,t.lanes=n,FS(e,n)}}i(Uv,"oh");function kT(e,t){var n=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,n===s)){var l=null,h=null;if(n=n.firstBaseUpdate,n!==null){do{var d={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};h===null?l=h=d:h=h.next=d,n=n.next}while(n!==null);h===null?l=h=t:h=h.next=t}else l=h=t;n={baseState:s.baseState,firstBaseUpdate:l,lastBaseUpdate:h,shared:s.shared,effects:s.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}i(kT,"ph");function cy(e,t,n,s){var l=e.updateQueue;Eu=!1;var h=l.firstBaseUpdate,d=l.lastBaseUpdate,v=l.shared.pending;if(v!==null){l.shared.pending=null;var S=v,b=S.next;S.next=null,d===null?h=b:d.next=b,d=S;var k=e.alternate;k!==null&&(k=k.updateQueue,v=k.lastBaseUpdate,v!==d&&(v===null?k.firstBaseUpdate=b:v.next=b,k.lastBaseUpdate=S))}if(h!==null){var R=l.baseState;d=0,k=b=S=null,v=h;do{var I=v.lane,z=v.eventTime;if((s&I)===I){k!==null&&(k=k.next={eventTime:z,lane:0,tag:v.tag,payload:v.payload,callback:v.callback,next:null});e:{var j=e,Y=v;switch(I=t,z=n,Y.tag){case 1:if(j=Y.payload,typeof j=="function"){R=j.call(z,R,I);break e}R=j;break e;case 3:j.flags=j.flags&-65537|128;case 0:if(j=Y.payload,I=typeof j=="function"?j.call(z,R,I):j,I==null)break e;R=kr({},R,I);break e;case 2:Eu=!0}}v.callback!==null&&v.lane!==0&&(e.flags|=64,I=l.effects,I===null?l.effects=[v]:I.push(v))}else z={eventTime:z,lane:I,tag:v.tag,payload:v.payload,callback:v.callback,next:null},k===null?(b=k=z,S=R):k=k.next=z,d|=I;if(v=v.next,v===null){if(v=l.shared.pending,v===null)break;I=v,v=I.next,I.next=null,l.lastBaseUpdate=I,l.shared.pending=null}}while(!0);if(k===null&&(S=R),l.baseState=S,l.firstBaseUpdate=b,l.lastBaseUpdate=k,t=l.shared.interleaved,t!==null){l=t;do d|=l.lane,l=l.next;while(l!==t)}else h===null&&(l.shared.lanes=0);ff|=d,e.lanes=d,e.memoizedState=R}}i(cy,"qh");function NT(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var s=A1.transition;A1.transition={};try{e(!1),t()}finally{Vt=n,A1.transition=s}}i(x3,"vi");function gN(){return ls().memoizedState}i(gN,"wi");function C3(e,t,n){var s=Du(e);if(n={lane:s,action:n,hasEagerState:!1,eagerState:null,next:null},vN(e))yN(t,n);else if(n=Jk(e,t,n,s),n!==null){var l=bi();Is(n,e,s,l),wN(n,t,s)}}i(C3,"xi");function _3(e,t,n){var s=Du(e),l={lane:s,action:n,hasEagerState:!1,eagerState:null,next:null};if(vN(e))yN(t,l);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=t.lastRenderedReducer,h!==null))try{var d=t.lastRenderedState,v=h(d,n);if(l.hasEagerState=!0,l.eagerState=v,Fs(v,d)){var S=t.interleaved;S===null?(l.next=l,QS(t)):(l.next=S.next,S.next=l),t.interleaved=l;return}}catch{}finally{}n=Jk(e,t,l,s),n!==null&&(l=bi(),Is(n,e,s,l),wN(n,t,s))}}i(_3,"ii");function vN(e){var t=e.alternate;return e===Tr||t!==null&&t===Tr}i(vN,"zi");function yN(e,t){Zh=dy=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}i(yN,"Ai");function wN(e,t,n){if(n&4194240){var s=t.lanes;s&=e.pendingLanes,n|=s,t.lanes=n,FS(e,n)}}i(wN,"Bi");var py={readContext:as,useCallback:ri,useContext:ri,useEffect:ri,useImperativeHandle:ri,useInsertionEffect:ri,useLayoutEffect:ri,useMemo:ri,useReducer:ri,useRef:ri,useState:ri,useDebugValue:ri,useDeferredValue:ri,useTransition:ri,useMutableSource:ri,useSyncExternalStore:ri,useId:ri,unstable_isNewReconciler:!1},E3={readContext:as,useCallback:i(function(e,t){return wa().memoizedState=[e,t===void 0?null:t],e},"useCallback"),useContext:as,useEffect:AT,useImperativeHandle:i(function(e,t,n){return n=n!=null?n.concat([e]):null,Vv(4194308,4,fN.bind(null,t,e),n)},"useImperativeHandle"),useLayoutEffect:i(function(e,t){return Vv(4194308,4,e,t)},"useLayoutEffect"),useInsertionEffect:i(function(e,t){return Vv(4,2,e,t)},"useInsertionEffect"),useMemo:i(function(e,t){var n=wa();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},"useMemo"),useReducer:i(function(e,t,n){var s=wa();return t=n!==void 0?n(t):t,s.memoizedState=s.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},s.queue=e,e=e.dispatch=C3.bind(null,Tr,e),[s.memoizedState,e]},"useReducer"),useRef:i(function(e){var t=wa();return e={current:e},t.memoizedState=e},"useRef"),useState:PT,useDebugValue:sx,useDeferredValue:i(function(e){return wa().memoizedState=e},"useDeferredValue"),useTransition:i(function(){var e=PT(!1),t=e[0];return e=x3.bind(null,e[1]),wa().memoizedState=e,[t,e]},"useTransition"),useMutableSource:i(function(){},"useMutableSource"),useSyncExternalStore:i(function(e,t,n){var s=Tr,l=wa();if(mr){if(n===void 0)throw Error(ge(407));n=n()}else{if(n=t(),On===null)throw Error(ge(349));cf&30||nN(s,t,n)}l.memoizedState=n;var h={value:n,getSnapshot:t};return l.queue=h,AT(oN.bind(null,s,h,e),[e]),s.flags|=2048,ym(9,iN.bind(null,s,h,n,t),void 0,null),n},"useSyncExternalStore"),useId:i(function(){var e=wa(),t=On.identifierPrefix;if(mr){var n=ul,s=ll;n=(s&~(1<<32-Ds(s)-1)).toString(32)+n,t=":"+t+"R"+n,n=gm++,0")&&(S=S.replace("",e.displayName)),S}while(1<=d&&0<=v);break}}}finally{g1=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Vh(e):""}i(v1,"Oa");function eF(e){switch(e.tag){case 5:return Vh(e.type);case 16:return Vh("Lazy");case 13:return Vh("Suspense");case 19:return Vh("SuspenseList");case 0:case 2:case 15:return e=v1(e.type,!1),e;case 11:return e=v1(e.type.render,!1),e;case 1:return e=v1(e.type,!0),e;default:return""}}i(eF,"Pa");function W1(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Rd:return"Fragment";case Od:return"Portal";case H1:return"Profiler";case MS:return"StrictMode";case B1:return"Suspense";case z1:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case JT:return(e.displayName||"Context")+".Consumer";case QT:return(e._context.displayName||"Context")+".Provider";case OS:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case RS:return t=e.displayName||null,t!==null?t:W1(e.type)||"Memo";case _u:t=e._payload,e=e._init;try{return W1(e(t))}catch{}}return null}i(W1,"Qa");function tF(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return W1(t);case 8:return t===MS?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}i(tF,"Ra");function Fu(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}i(Fu,"Sa");function ek(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}i(ek,"Ta");function rF(e){var t=ek(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),s=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,h=n.set;return Object.defineProperty(e,t,{configurable:!0,get:i(function(){return l.call(this)},"get"),set:i(function(d){s=""+d,h.call(this,d)},"set")}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:i(function(){return s},"getValue"),setValue:i(function(d){s=""+d},"setValue"),stopTracking:i(function(){e._valueTracker=null,delete e[t]},"stopTracking")}}}i(rF,"Ua");function xv(e){e._valueTracker||(e._valueTracker=rF(e))}i(xv,"Va");function tk(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),s="";return e&&(s=ek(e)?e.checked?"true":"false":e.value),e=s,e!==n?(t.setValue(e),!0):!1}i(tk,"Wa");function Yv(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}i(Yv,"Xa");function U1(e,t){var n=t.checked;return kr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}i(U1,"Ya");function Kb(e,t){var n=t.defaultValue==null?"":t.defaultValue,s=t.checked!=null?t.checked:t.defaultChecked;n=Fu(t.value!=null?t.value:n),e._wrapperState={initialChecked:s,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}i(Kb,"Za");function rk(e,t){t=t.checked,t!=null&&LS(e,"checked",t,!1)}i(rk,"ab");function $1(e,t){rk(e,t);var n=Fu(t.value),s=t.type;if(n!=null)s==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(s==="submit"||s==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?V1(e,t.type,n):t.hasOwnProperty("defaultValue")&&V1(e,t.type,Fu(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}i($1,"bb");function Gb(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var s=t.type;if(!(s!=="submit"&&s!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}i(Gb,"db");function V1(e,t,n){(t!=="number"||Yv(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}i(V1,"cb");var qh=Array.isArray;function qd(e,t,n,s){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=Cv.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function im(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}i(im,"ob");var Gh={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},nF=["Webkit","ms","Moz","O"];Object.keys(Gh).forEach(function(e){nF.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Gh[t]=Gh[e]})});function sk(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Gh.hasOwnProperty(e)&&Gh[e]?(""+t).trim():t+"px"}i(sk,"rb");function ak(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var s=n.indexOf("--")===0,l=sk(n,t[n],s);n==="float"&&(n="cssFloat"),s?e.setProperty(n,l):e[n]=l}}i(ak,"sb");var iF=kr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function K1(e,t){if(t){if(iF[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ge(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ge(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ge(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ge(62))}}i(K1,"ub");function G1(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}i(G1,"vb");var Y1=null;function DS(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}i(DS,"xb");var X1=null,jd=null,Kd=null;function Qb(e){if(e=Cm(e)){if(typeof X1!="function")throw Error(ge(280));var t=e.stateNode;t&&(t=_y(t),X1(e.stateNode,e.type,t))}}i(Qb,"Bb");function lk(e){jd?Kd?Kd.push(e):Kd=[e]:jd=e}i(lk,"Eb");function uk(){if(jd){var e=jd,t=Kd;if(Kd=jd=null,Qb(e),t)for(e=0;e>>=0,e===0?32:31-(mF(e)/gF|0)|0}i(vF,"nc");var _v=64,Ev=4194304;function jh(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}i(jh,"tc");function Zv(e,t){var n=e.pendingLanes;if(n===0)return 0;var s=0,l=e.suspendedLanes,h=e.pingedLanes,d=n&268435455;if(d!==0){var v=d&~l;v!==0?s=jh(v):(h&=d,h!==0&&(s=jh(h)))}else d=n&~l,d!==0?s=jh(d):h!==0&&(s=jh(h));if(s===0)return 0;if(t!==0&&t!==s&&!(t&l)&&(l=s&-s,h=t&-t,l>=h||l===16&&(h&4194240)!==0))return t;if(s&4&&(s|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=s;0n;n++)t.push(e);return t}i(w1,"zc");function Sm(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ds(t),e[t]=n}i(Sm,"Ac");function SF(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var s=e.eventTimes;for(e=e.expirationTimes;0=Xh),sT=" ",aT=!1;function Ak(e,t){switch(e){case"keyup":return GF.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}i(Ak,"ge");function Pk(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}i(Pk,"he");var Dd=!1;function XF(e,t){switch(e){case"compositionend":return Pk(t);case"keypress":return t.which!==32?null:(aT=!0,sT);case"textInput":return e=t.data,e===sT&&aT?null:e;default:return null}}i(XF,"je");function QF(e,t){if(Dd)return e==="compositionend"||!$S&&Ak(e,t)?(e=kk(),zv=zS=ku=null,Dd=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=s}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=cT(n)}}i(fT,"Ke");function Rk(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Rk(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}i(Rk,"Le");function Dk(){for(var e=window,t=Yv();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Yv(e.document)}return t}i(Dk,"Me");function VS(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}i(VS,"Ne");function s3(e){var t=Dk(),n=e.focusedElem,s=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Rk(n.ownerDocument.documentElement,n)){if(s!==null&&VS(n)){if(t=s.start,e=s.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,h=Math.min(s.start,l);s=s.end===void 0?h:Math.min(s.end,l),!e.extend&&h>s&&(l=s,s=h,h=l),l=fT(n,h);var d=fT(n,s);l&&d&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==d.node||e.focusOffset!==d.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),h>s?(e.addRange(t),e.extend(d.node,d.offset)):(t.setEnd(d.node,d.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Id=null,rS=null,Jh=null,nS=!1;function dT(e,t,n){var s=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;nS||Id==null||Id!==Yv(s)||(s=Id,"selectionStart"in s&&VS(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Jh&&cm(Jh,s)||(Jh=s,s=ry(rS,"onSelect"),0Bd||(e.current=uS[Bd],uS[Bd]=null,Bd--)}i(fr,"E");function nr(e,t){Bd++,uS[Bd]=e.current,e.current=t}i(nr,"G");var Hu={},oi=zu(Hu),Ki=zu(!1),lf=Hu;function Jd(e,t){var n=e.type.contextTypes;if(!n)return Hu;var s=e.stateNode;if(s&&s.__reactInternalMemoizedUnmaskedChildContext===t)return s.__reactInternalMemoizedMaskedChildContext;var l={},h;for(h in n)l[h]=t[h];return s&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}i(Jd,"Yf");function Gi(e){return e=e.childContextTypes,e!=null}i(Gi,"Zf");function iy(){fr(Ki),fr(oi)}i(iy,"$f");function xT(e,t,n){if(oi.current!==Hu)throw Error(ge(168));nr(oi,t),nr(Ki,n)}i(xT,"ag");function Vk(e,t,n){var s=e.stateNode;if(t=t.childContextTypes,typeof s.getChildContext!="function")return n;s=s.getChildContext();for(var l in s)if(!(l in t))throw Error(ge(108,tF(e)||"Unknown",l));return kr({},n,s)}i(Vk,"bg");function oy(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Hu,lf=oi.current,nr(oi,e),nr(Ki,Ki.current),!0}i(oy,"cg");function CT(e,t,n){var s=e.stateNode;if(!s)throw Error(ge(169));n?(e=Vk(e,t,lf),s.__reactInternalMemoizedMergedChildContext=e,fr(Ki),fr(oi),nr(oi,e)):fr(Ki),nr(Ki,n)}i(CT,"dg");var al=null,Ey=!1,N1=!1;function qk(e){al===null?al=[e]:al.push(e)}i(qk,"hg");function g3(e){Ey=!0,qk(e)}i(g3,"ig");function Wu(){if(!N1&&al!==null){N1=!0;var e=0,t=Vt;try{var n=al;for(Vt=1;e>=d,l-=d,ll=1<<32-Ds(t)+l|n<he?(Re=oe,oe=null):Re=oe.sibling;var Ee=I(F,oe,D[he],q);if(Ee===null){oe===null&&(oe=Re);break}e&&oe&&Ee.alternate===null&&t(F,oe),L=h(Ee,L,he),Z===null?te=Ee:Z.sibling=Ee,Z=Ee,oe=Re}if(he===D.length)return n(F,oe),mr&&ef(F,he),te;if(oe===null){for(;hehe?(Re=oe,oe=null):Re=oe.sibling;var Ye=I(F,oe,Ee.value,q);if(Ye===null){oe===null&&(oe=Re);break}e&&oe&&Ye.alternate===null&&t(F,oe),L=h(Ye,L,he),Z===null?te=Ye:Z.sibling=Ye,Z=Ye,oe=Re}if(Ee.done)return n(F,oe),mr&&ef(F,he),te;if(oe===null){for(;!Ee.done;he++,Ee=D.next())Ee=R(F,Ee.value,q),Ee!==null&&(L=h(Ee,L,he),Z===null?te=Ee:Z.sibling=Ee,Z=Ee);return mr&&ef(F,he),te}for(oe=s(F,oe);!Ee.done;he++,Ee=D.next())Ee=z(oe,F,he,Ee.value,q),Ee!==null&&(e&&Ee.alternate!==null&&oe.delete(Ee.key===null?he:Ee.key),L=h(Ee,L,he),Z===null?te=Ee:Z.sibling=Ee,Z=Ee);return e&&oe.forEach(function(tt){return t(F,tt)}),mr&&ef(F,he),te}i(Y,"t");function ne(F,L,D,q){if(typeof D=="object"&&D!==null&&D.type===Rd&&D.key===null&&(D=D.props.children),typeof D=="object"&&D!==null){switch(D.$$typeof){case Sv:e:{for(var te=D.key,Z=L;Z!==null;){if(Z.key===te){if(te=D.type,te===Rd){if(Z.tag===7){n(F,Z.sibling),L=l(Z,D.props.children),L.return=F,F=L;break e}}else if(Z.elementType===te||typeof te=="object"&&te!==null&&te.$$typeof===_u&&bT(te)===Z.type){n(F,Z.sibling),L=l(Z,D.props),L.ref=zh(F,Z,D),L.return=F,F=L;break e}n(F,Z);break}else t(F,Z);Z=Z.sibling}D.type===Rd?(L=af(D.props.children,F.mode,q,D.key),L.return=F,F=L):(q=Gv(D.type,D.key,D.props,null,F.mode,q),q.ref=zh(F,L,D),q.return=F,F=q)}return d(F);case Od:e:{for(Z=D.key;L!==null;){if(L.key===Z)if(L.tag===4&&L.stateNode.containerInfo===D.containerInfo&&L.stateNode.implementation===D.implementation){n(F,L.sibling),L=l(L,D.children||[]),L.return=F,F=L;break e}else{n(F,L);break}else t(F,L);L=L.sibling}L=I1(D,F.mode,q),L.return=F,F=L}return d(F);case _u:return Z=D._init,ne(F,L,Z(D._payload),q)}if(qh(D))return j(F,L,D,q);if(Ih(D))return Y(F,L,D,q);Dv(F,D)}return typeof D=="string"&&D!==""||typeof D=="number"?(D=""+D,L!==null&&L.tag===6?(n(F,L.sibling),L=l(L,D),L.return=F,F=L):(n(F,L),L=D1(D,F.mode,q),L.return=F,F=L),d(F)):n(F,L)}return i(ne,"J"),ne}i(Yk,"Og");var ep=Yk(!0),Xk=Yk(!1),ly=zu(null),uy=null,Ud=null,GS=null;function YS(){GS=Ud=uy=null}i(YS,"$g");function XS(e){var t=ly.current;fr(ly),e._currentValue=t}i(XS,"ah");function dS(e,t,n){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===n)break;e=e.return}}i(dS,"bh");function Yd(e,t){uy=e,GS=Ud=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ji=!0),e.firstContext=null)}i(Yd,"ch");function as(e){var t=e._currentValue;if(GS!==e)if(e={context:e,memoizedValue:t,next:null},Ud===null){if(uy===null)throw Error(ge(308));Ud=e,uy.dependencies={lanes:0,firstContext:e}}else Ud=Ud.next=e;return t}i(as,"eh");var nf=null;function QS(e){nf===null?nf=[e]:nf.push(e)}i(QS,"gh");function Qk(e,t,n,s){var l=t.interleaved;return l===null?(n.next=n,QS(t)):(n.next=l.next,l.next=n),t.interleaved=n,pl(e,s)}i(Qk,"hh");function pl(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}i(pl,"ih");var Eu=!1;function JS(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}i(JS,"kh");function Jk(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}i(Jk,"lh");function cl(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}i(cl,"mh");function Ou(e,t,n){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,Nt&2){var l=s.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),s.pending=t,pl(e,n)}return l=s.interleaved,l===null?(t.next=t,QS(s)):(t.next=l.next,l.next=t),s.interleaved=t,pl(e,n)}i(Ou,"nh");function Uv(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var s=t.lanes;s&=e.pendingLanes,n|=s,t.lanes=n,FS(e,n)}}i(Uv,"oh");function TT(e,t){var n=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,n===s)){var l=null,h=null;if(n=n.firstBaseUpdate,n!==null){do{var d={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};h===null?l=h=d:h=h.next=d,n=n.next}while(n!==null);h===null?l=h=t:h=h.next=t}else l=h=t;n={baseState:s.baseState,firstBaseUpdate:l,lastBaseUpdate:h,shared:s.shared,effects:s.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}i(TT,"ph");function cy(e,t,n,s){var l=e.updateQueue;Eu=!1;var h=l.firstBaseUpdate,d=l.lastBaseUpdate,v=l.shared.pending;if(v!==null){l.shared.pending=null;var S=v,b=S.next;S.next=null,d===null?h=b:d.next=b,d=S;var k=e.alternate;k!==null&&(k=k.updateQueue,v=k.lastBaseUpdate,v!==d&&(v===null?k.firstBaseUpdate=b:v.next=b,k.lastBaseUpdate=S))}if(h!==null){var R=l.baseState;d=0,k=b=S=null,v=h;do{var I=v.lane,z=v.eventTime;if((s&I)===I){k!==null&&(k=k.next={eventTime:z,lane:0,tag:v.tag,payload:v.payload,callback:v.callback,next:null});e:{var j=e,Y=v;switch(I=t,z=n,Y.tag){case 1:if(j=Y.payload,typeof j=="function"){R=j.call(z,R,I);break e}R=j;break e;case 3:j.flags=j.flags&-65537|128;case 0:if(j=Y.payload,I=typeof j=="function"?j.call(z,R,I):j,I==null)break e;R=kr({},R,I);break e;case 2:Eu=!0}}v.callback!==null&&v.lane!==0&&(e.flags|=64,I=l.effects,I===null?l.effects=[v]:I.push(v))}else z={eventTime:z,lane:I,tag:v.tag,payload:v.payload,callback:v.callback,next:null},k===null?(b=k=z,S=R):k=k.next=z,d|=I;if(v=v.next,v===null){if(v=l.shared.pending,v===null)break;I=v,v=I.next,I.next=null,l.lastBaseUpdate=I,l.shared.pending=null}}while(!0);if(k===null&&(S=R),l.baseState=S,l.firstBaseUpdate=b,l.lastBaseUpdate=k,t=l.shared.interleaved,t!==null){l=t;do d|=l.lane,l=l.next;while(l!==t)}else h===null&&(l.shared.lanes=0);ff|=d,e.lanes=d,e.memoizedState=R}}i(cy,"qh");function kT(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var s=P1.transition;P1.transition={};try{e(!1),t()}finally{Vt=n,P1.transition=s}}i(w3,"vi");function mN(){return ls().memoizedState}i(mN,"wi");function S3(e,t,n){var s=Du(e);if(n={lane:s,action:n,hasEagerState:!1,eagerState:null,next:null},gN(e))vN(t,n);else if(n=Qk(e,t,n,s),n!==null){var l=bi();Is(n,e,s,l),yN(n,t,s)}}i(S3,"xi");function x3(e,t,n){var s=Du(e),l={lane:s,action:n,hasEagerState:!1,eagerState:null,next:null};if(gN(e))vN(t,l);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=t.lastRenderedReducer,h!==null))try{var d=t.lastRenderedState,v=h(d,n);if(l.hasEagerState=!0,l.eagerState=v,Fs(v,d)){var S=t.interleaved;S===null?(l.next=l,QS(t)):(l.next=S.next,S.next=l),t.interleaved=l;return}}catch{}finally{}n=Qk(e,t,l,s),n!==null&&(l=bi(),Is(n,e,s,l),yN(n,t,s))}}i(x3,"ii");function gN(e){var t=e.alternate;return e===Tr||t!==null&&t===Tr}i(gN,"zi");function vN(e,t){Zh=dy=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}i(vN,"Ai");function yN(e,t,n){if(n&4194240){var s=t.lanes;s&=e.pendingLanes,n|=s,t.lanes=n,FS(e,n)}}i(yN,"Bi");var py={readContext:as,useCallback:ri,useContext:ri,useEffect:ri,useImperativeHandle:ri,useInsertionEffect:ri,useLayoutEffect:ri,useMemo:ri,useReducer:ri,useRef:ri,useState:ri,useDebugValue:ri,useDeferredValue:ri,useTransition:ri,useMutableSource:ri,useSyncExternalStore:ri,useId:ri,unstable_isNewReconciler:!1},C3={readContext:as,useCallback:i(function(e,t){return wa().memoizedState=[e,t===void 0?null:t],e},"useCallback"),useContext:as,useEffect:AT,useImperativeHandle:i(function(e,t,n){return n=n!=null?n.concat([e]):null,Vv(4194308,4,cN.bind(null,t,e),n)},"useImperativeHandle"),useLayoutEffect:i(function(e,t){return Vv(4194308,4,e,t)},"useLayoutEffect"),useInsertionEffect:i(function(e,t){return Vv(4,2,e,t)},"useInsertionEffect"),useMemo:i(function(e,t){var n=wa();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},"useMemo"),useReducer:i(function(e,t,n){var s=wa();return t=n!==void 0?n(t):t,s.memoizedState=s.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},s.queue=e,e=e.dispatch=S3.bind(null,Tr,e),[s.memoizedState,e]},"useReducer"),useRef:i(function(e){var t=wa();return e={current:e},t.memoizedState=e},"useRef"),useState:NT,useDebugValue:sx,useDeferredValue:i(function(e){return wa().memoizedState=e},"useDeferredValue"),useTransition:i(function(){var e=NT(!1),t=e[0];return e=w3.bind(null,e[1]),wa().memoizedState=e,[t,e]},"useTransition"),useMutableSource:i(function(){},"useMutableSource"),useSyncExternalStore:i(function(e,t,n){var s=Tr,l=wa();if(mr){if(n===void 0)throw Error(ge(407));n=n()}else{if(n=t(),On===null)throw Error(ge(349));cf&30||rN(s,t,n)}l.memoizedState=n;var h={value:n,getSnapshot:t};return l.queue=h,AT(iN.bind(null,s,h,e),[e]),s.flags|=2048,ym(9,nN.bind(null,s,h,n,t),void 0,null),n},"useSyncExternalStore"),useId:i(function(){var e=wa(),t=On.identifierPrefix;if(mr){var n=ul,s=ll;n=(s&~(1<<32-Ds(s)-1)).toString(32)+n,t=":"+t+"R"+n,n=gm++,0<\/script>",e=e.removeChild(e.firstChild)):typeof s.is=="string"?e=d.createElement(n,{is:s.is}):(e=d.createElement(n),n==="select"&&(d=e,s.multiple?d.multiple=!0:s.size&&(d.size=s.size))):e=d.createElementNS(e,n),e[Sa]=t,e[pm]=s,PN(e,t,!1,!1),t.stateNode=e;e:{switch(d=G1(n,s),n){case"dialog":cr("cancel",e),cr("close",e),l=s;break;case"iframe":case"object":case"embed":cr("load",e),l=s;break;case"video":case"audio":for(l=0;lnp&&(t.flags|=128,s=!0,Wh(h,!1),t.lanes=4194304)}else{if(!s)if(e=fy(d),e!==null){if(t.flags|=128,s=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Wh(h,!0),h.tail===null&&h.tailMode==="hidden"&&!d.alternate&&!mr)return ni(t),null}else 2*qr()-h.renderingStartTime>np&&n!==1073741824&&(t.flags|=128,s=!0,Wh(h,!1),t.lanes=4194304);h.isBackwards?(d.sibling=t.child,t.child=d):(n=h.last,n!==null?n.sibling=d:t.child=d,h.last=d)}return h.tail!==null?(t=h.tail,h.rendering=t,h.tail=t.sibling,h.renderingStartTime=qr(),t.sibling=null,n=br.current,rr(br,s?n&1|2:n&1),t):(ni(t),null);case 22:case 23:return dx(),s=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==s&&(t.flags|=8192),s&&t.mode&1?To&1073741824&&(ni(t),t.subtreeFlags&6&&(t.flags|=8192)):ni(t),null;case 24:return null;case 25:return null}throw Error(ge(156,t.tag))}i(L3,"Ej");function M3(e,t){switch(jS(t),t.tag){case 1:return Gi(t.type)&&iy(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return tp(),fr(Ki),fr(oi),tx(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ex(t),null;case 13:if(fr(br),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ge(340));Zd()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return fr(br),null;case 4:return tp(),null;case 10:return XS(t.type._context),null;case 22:case 23:return dx(),null;case 24:return null;default:return null}}i(M3,"Ij");var Fv=!1,ii=!1,O3=typeof WeakSet=="function"?WeakSet:Set,Le=null;function $d(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(s){Or(e,t,s)}else n.current=null}i($d,"Lj");function xS(e,t,n){try{n()}catch(s){Or(e,t,s)}}i(xS,"Mj");var WT=!1;function R3(e,t){if(iS=ey,e=Ik(),VS(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var s=n.getSelection&&n.getSelection();if(s&&s.rangeCount!==0){n=s.anchorNode;var l=s.anchorOffset,h=s.focusNode;s=s.focusOffset;try{n.nodeType,h.nodeType}catch{n=null;break e}var d=0,v=-1,S=-1,b=0,k=0,R=e,I=null;t:for(;;){for(var z;R!==n||l!==0&&R.nodeType!==3||(v=d+l),R!==h||s!==0&&R.nodeType!==3||(S=d+s),R.nodeType===3&&(d+=R.nodeValue.length),(z=R.firstChild)!==null;)I=R,R=z;for(;;){if(R===e)break t;if(I===n&&++b===l&&(v=d),I===h&&++k===s&&(S=d),(z=R.nextSibling)!==null)break;R=I,I=R.parentNode}R=z}n=v===-1||S===-1?null:{start:v,end:S}}else n=null}n=n||{start:0,end:0}}else n=null;for(oS={focusedElem:e,selectionRange:n},ey=!1,Le=t;Le!==null;)if(t=Le,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Le=e;else for(;Le!==null;){t=Le;try{var j=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(j!==null){var Y=j.memoizedProps,ne=j.memoizedState,F=t.stateNode,L=F.getSnapshotBeforeUpdate(t.elementType===t.type?Y:Ms(t.type,Y),ne);F.__reactInternalSnapshotBeforeUpdate=L}break;case 3:var D=t.stateNode.containerInfo;D.nodeType===1?D.textContent="":D.nodeType===9&&D.documentElement&&D.removeChild(D.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ge(163))}}catch(q){Or(t,t.return,q)}if(e=t.sibling,e!==null){e.return=t.return,Le=e;break}Le=t.return}return j=WT,WT=!1,j}i(R3,"Oj");function em(e,t,n){var s=t.updateQueue;if(s=s!==null?s.lastEffect:null,s!==null){var l=s=s.next;do{if((l.tag&e)===e){var h=l.destroy;l.destroy=void 0,h!==void 0&&xS(t,n,h)}l=l.next}while(l!==s)}}i(em,"Pj");function ky(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var s=n.create;n.destroy=s()}n=n.next}while(n!==t)}}i(ky,"Qj");function CS(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}i(CS,"Rj");function MN(e){var t=e.alternate;t!==null&&(e.alternate=null,MN(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Sa],delete t[pm],delete t[lS],delete t[g3],delete t[v3])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}i(MN,"Sj");function ON(e){return e.tag===5||e.tag===3||e.tag===4}i(ON,"Tj");function UT(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ON(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}i(UT,"Uj");function _S(e,t,n){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ny));else if(s!==4&&(e=e.child,e!==null))for(_S(e,t,n),e=e.sibling;e!==null;)_S(e,t,n),e=e.sibling}i(_S,"Vj");function ES(e,t,n){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(s!==4&&(e=e.child,e!==null))for(ES(e,t,n),e=e.sibling;e!==null;)ES(e,t,n),e=e.sibling}i(ES,"Wj");var Vn=null,Os=!1;function Cu(e,t,n){for(n=n.child;n!==null;)RN(e,t,n),n=n.sibling}i(Cu,"Yj");function RN(e,t,n){if(xa&&typeof xa.onCommitFiberUnmount=="function")try{xa.onCommitFiberUnmount(wy,n)}catch{}switch(n.tag){case 5:ii||$d(n,t);case 6:var s=Vn,l=Os;Vn=null,Cu(e,t,n),Vn=s,Os=l,Vn!==null&&(Os?(e=Vn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Vn.removeChild(n.stateNode));break;case 18:Vn!==null&&(Os?(e=Vn,n=n.stateNode,e.nodeType===8?k1(e.parentNode,n):e.nodeType===1&&k1(e,n),lm(e)):k1(Vn,n.stateNode));break;case 4:s=Vn,l=Os,Vn=n.stateNode.containerInfo,Os=!0,Cu(e,t,n),Vn=s,Os=l;break;case 0:case 11:case 14:case 15:if(!ii&&(s=n.updateQueue,s!==null&&(s=s.lastEffect,s!==null))){l=s=s.next;do{var h=l,d=h.destroy;h=h.tag,d!==void 0&&(h&2||h&4)&&xS(n,t,d),l=l.next}while(l!==s)}Cu(e,t,n);break;case 1:if(!ii&&($d(n,t),s=n.stateNode,typeof s.componentWillUnmount=="function"))try{s.props=n.memoizedProps,s.state=n.memoizedState,s.componentWillUnmount()}catch(v){Or(n,t,v)}Cu(e,t,n);break;case 21:Cu(e,t,n);break;case 22:n.mode&1?(ii=(s=ii)||n.memoizedState!==null,Cu(e,t,n),ii=s):Cu(e,t,n);break;default:Cu(e,t,n)}}i(RN,"Zj");function $T(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new O3),t.forEach(function(s){var l=$3.bind(null,e,s);n.has(s)||(n.add(s),s.then(l,l))})}}i($T,"ak");function Ls(e,t){var n=t.deletions;if(n!==null)for(var s=0;sl&&(l=d),s&=~h}if(s=l,s=qr()-s,s=(120>s?120:480>s?480:1080>s?1080:1920>s?1920:3e3>s?3e3:4320>s?4320:1960*I3(s/1960))-s,10e?16:e,Nu===null)var s=!1;else{if(e=Nu,Nu=null,gy=0,Nt&6)throw Error(ge(331));var l=Nt;for(Nt|=4,Le=e.current;Le!==null;){var h=Le,d=h.child;if(Le.flags&16){var v=h.deletions;if(v!==null){for(var S=0;Sqr()-cx?sf(e,0):ux|=n),Yi(e,t)}i(W3,"Ti");function UN(e,t){t===0&&(e.mode&1?(t=Ev,Ev<<=1,!(Ev&130023424)&&(Ev=4194304)):t=1);var n=bi();e=pl(e,t),e!==null&&(Sm(e,t,n),Yi(e,n))}i(UN,"Yk");function U3(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),UN(e,n)}i(U3,"uj");function $3(e,t){var n=0;switch(e.tag){case 13:var s=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:s=e.stateNode;break;default:throw Error(ge(314))}s!==null&&s.delete(t),UN(e,n)}i($3,"bk");var $N;$N=i(function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ki.current)ji=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ji=!1,A3(e,t,n);ji=!!(e.flags&131072)}else ji=!1,mr&&t.flags&1048576&&Kk(t,ay,t.index);switch(t.lanes=0,t.tag){case 2:var s=t.type;qv(e,t),e=t.pendingProps;var l=Jd(t,oi.current);Yd(t,n),l=nx(null,t,s,e,l,n);var h=ix();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Gi(s)?(h=!0,oy(t)):h=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,JS(t),l.updater=Ty,t.stateNode=l,l._reactInternals=t,hS(t,s,e,n),t=vS(null,t,s,!0,h,n)):(t.tag=0,mr&&h&&qS(t),Ei(null,t,l,n),t=t.child),t;case 16:s=t.elementType;e:{switch(qv(e,t),e=t.pendingProps,l=s._init,s=l(s._payload),t.type=s,l=t.tag=q3(s),e=Ms(s,e),l){case 0:t=gS(null,t,s,e,n);break e;case 1:t=HT(null,t,s,e,n);break e;case 11:t=IT(null,t,s,e,n);break e;case 14:t=FT(null,t,s,Ms(s.type,e),n);break e}throw Error(ge(306,s,""))}return t;case 0:return s=t.type,l=t.pendingProps,l=t.elementType===s?l:Ms(s,l),gS(e,t,s,l,n);case 1:return s=t.type,l=t.pendingProps,l=t.elementType===s?l:Ms(s,l),HT(e,t,s,l,n);case 3:e:{if(TN(t),e===null)throw Error(ge(387));s=t.pendingProps,h=t.memoizedState,l=h.element,Zk(e,t),cy(t,s,null,n);var d=t.memoizedState;if(s=d.element,h.isDehydrated)if(h={element:s,isDehydrated:!1,cache:d.cache,pendingSuspenseBoundaries:d.pendingSuspenseBoundaries,transitions:d.transitions},t.updateQueue.baseState=h,t.memoizedState=h,t.flags&256){l=rp(Error(ge(423)),t),t=BT(e,t,s,n,l);break e}else if(s!==l){l=rp(Error(ge(424)),t),t=BT(e,t,s,n,l);break e}else for(ko=Mu(t.stateNode.containerInfo.firstChild),No=t,mr=!0,Rs=null,n=Qk(t,null,s,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Zd(),s===l){t=hl(e,t,n);break e}Ei(e,t,s,n)}t=t.child}return t;case 5:return eN(t),e===null&&fS(t),s=t.type,l=t.pendingProps,h=e!==null?e.memoizedProps:null,d=l.children,sS(s,l)?d=null:h!==null&&sS(s,h)&&(t.flags|=32),bN(e,t),Ei(e,t,d,n),t.child;case 6:return e===null&&fS(t),null;case 13:return kN(e,t,n);case 4:return ZS(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=ep(t,null,s,n):Ei(e,t,s,n),t.child;case 11:return s=t.type,l=t.pendingProps,l=t.elementType===s?l:Ms(s,l),IT(e,t,s,l,n);case 7:return Ei(e,t,t.pendingProps,n),t.child;case 8:return Ei(e,t,t.pendingProps.children,n),t.child;case 12:return Ei(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(s=t.type._context,l=t.pendingProps,h=t.memoizedProps,d=l.value,rr(ly,s._currentValue),s._currentValue=d,h!==null)if(Fs(h.value,d)){if(h.children===l.children&&!Ki.current){t=hl(e,t,n);break e}}else for(h=t.child,h!==null&&(h.return=t);h!==null;){var v=h.dependencies;if(v!==null){d=h.child;for(var S=v.firstContext;S!==null;){if(S.context===s){if(h.tag===1){S=cl(-1,n&-n),S.tag=2;var b=h.updateQueue;if(b!==null){b=b.shared;var k=b.pending;k===null?S.next=S:(S.next=k.next,k.next=S),b.pending=S}}h.lanes|=n,S=h.alternate,S!==null&&(S.lanes|=n),dS(h.return,n,t),v.lanes|=n;break}S=S.next}}else if(h.tag===10)d=h.type===t.type?null:h.child;else if(h.tag===18){if(d=h.return,d===null)throw Error(ge(341));d.lanes|=n,v=d.alternate,v!==null&&(v.lanes|=n),dS(d,n,t),d=h.sibling}else d=h.child;if(d!==null)d.return=h;else for(d=h;d!==null;){if(d===t){d=null;break}if(h=d.sibling,h!==null){h.return=d.return,d=h;break}d=d.return}h=d}Ei(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,s=t.pendingProps.children,Yd(t,n),l=as(l),s=s(l),t.flags|=1,Ei(e,t,s,n),t.child;case 14:return s=t.type,l=Ms(s,t.pendingProps),l=Ms(s.type,l),FT(e,t,s,l,n);case 15:return _N(e,t,t.type,t.pendingProps,n);case 17:return s=t.type,l=t.pendingProps,l=t.elementType===s?l:Ms(s,l),qv(e,t),t.tag=1,Gi(s)?(e=!0,oy(t)):e=!1,Yd(t,n),SN(t,s,l),hS(t,s,l,n),vS(null,t,s,!0,e,n);case 19:return NN(e,t,n);case 22:return EN(e,t,n)}throw Error(ge(156,t.tag))},"Vk");function VN(e,t){return vk(e,t)}i(VN,"Fk");function V3(e,t,n,s){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}i(V3,"$k");function os(e,t,n,s){return new V3(e,t,n,s)}i(os,"Bg");function hx(e){return e=e.prototype,!(!e||!e.isReactComponent)}i(hx,"aj");function q3(e){if(typeof e=="function")return hx(e)?1:0;if(e!=null){if(e=e.$$typeof,e===OS)return 11;if(e===RS)return 14}return 2}i(q3,"Zk");function Iu(e,t){var n=e.alternate;return n===null?(n=os(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}i(Iu,"Pg");function Gv(e,t,n,s,l,h){var d=2;if(s=e,typeof e=="function")hx(e)&&(d=1);else if(typeof e=="string")d=5;else e:switch(e){case Rd:return af(n.children,l,h,t);case MS:d=8,l|=8;break;case H1:return e=os(12,n,t,l|2),e.elementType=H1,e.lanes=h,e;case B1:return e=os(13,n,t,l),e.elementType=B1,e.lanes=h,e;case z1:return e=os(19,n,t,l),e.elementType=z1,e.lanes=h,e;case ek:return Py(n,l,h,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case JT:d=10;break e;case ZT:d=9;break e;case OS:d=11;break e;case RS:d=14;break e;case _u:d=16,s=null;break e}throw Error(ge(130,e==null?e:typeof e,""))}return t=os(d,n,t,l),t.elementType=e,t.type=s,t.lanes=h,t}i(Gv,"Rg");function af(e,t,n,s){return e=os(7,e,s,t),e.lanes=n,e}i(af,"Tg");function Py(e,t,n,s){return e=os(22,e,s,t),e.elementType=ek,e.lanes=n,e.stateNode={isHidden:!1},e}i(Py,"pj");function D1(e,t,n){return e=os(6,e,null,t),e.lanes=n,e}i(D1,"Qg");function I1(e,t,n){return t=os(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}i(I1,"Sg");function j3(e,t,n,s,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=w1(0),this.expirationTimes=w1(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=w1(0),this.identifierPrefix=s,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}i(j3,"al");function mx(e,t,n,s,l,h,d,v,S){return e=new j3(e,t,n,v,S),t===1?(t=1,h===!0&&(t|=8)):t=0,h=os(3,null,null,t),e.current=h,h.stateNode=e,h.memoizedState={element:s,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},JS(h),e}i(mx,"bl");function K3(e,t,n){var s=3{"use strict";function YN(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(YN)}catch(e){console.error(e)}}i(YN,"checkDCE");YN(),XN.exports=GN()});var JN=rt(Sx=>{"use strict";var QN=wx();Sx.createRoot=QN.createRoot,Sx.hydrateRoot=QN.hydrateRoot;var jU});var eP=rt(ZN=>{"use strict";var Em=be();function J3(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}i(J3,"n");var Z3=typeof Object.is=="function"?Object.is:J3,e4=Em.useSyncExternalStore,t4=Em.useRef,r4=Em.useEffect,n4=Em.useMemo,i4=Em.useDebugValue;ZN.useSyncExternalStoreWithSelector=function(e,t,n,s,l){var h=t4(null);if(h.current===null){var d={hasValue:!1,value:null};h.current=d}else d=h.current;h=n4(function(){function S(z){if(!b){if(b=!0,k=z,z=s(z),l!==void 0&&d.hasValue){var j=d.value;if(l(j,z))return R=j}return R=z}if(j=R,Z3(k,z))return j;var Y=s(z);return l!==void 0&&l(j,Y)?j:(k=z,R=Y)}i(S,"a");var b=!1,k,R,I=n===void 0?null:n;return[function(){return S(t())},I===null?void 0:function(){return S(I())}]},[t,n,s,l]);var v=e4(e,h[0],h[1]);return r4(function(){d.hasValue=!0,d.value=v},[v]),i4(v),v}});var rP=rt((XU,tP)=>{"use strict";tP.exports=eP()});var Am=rt((up,Pm)=>{(function(){var e,t="4.17.21",n=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",l="Expected a function",h="Invalid `variable` option passed into `_.template`",d="__lodash_hash_undefined__",v=500,S="__lodash_placeholder__",b=1,k=2,R=4,I=1,z=2,j=1,Y=2,ne=4,F=8,L=16,D=32,q=64,te=128,Z=256,oe=512,he=30,Re="...",Ee=800,Ye=16,tt=1,xe=2,Xe=3,je=1/0,Qe=9007199254740991,ot=17976931348623157e292,It=NaN,Pt=4294967295,fn=Pt-1,dn=Pt>>>1,vr=[["ary",te],["bind",j],["bindKey",Y],["curry",F],["curryRight",L],["flip",oe],["partial",D],["partialRight",q],["rearg",Z]],Ut="[object Arguments]",yr="[object Array]",wr="[object AsyncFunction]",Gt="[object Boolean]",Ft="[object Date]",se="[object DOMException]",We="[object Error]",Yr="[object Function]",Zt="[object GeneratorFunction]",st="[object Map]",Fe="[object Number]",Fn="[object Null]",bn="[object Object]",no="[object Promise]",Bo="[object Proxy]",lt="[object RegExp]",Sr="[object Set]",dr="[object String]",pt="[object Symbol]",io="[object Undefined]",Hn="[object WeakMap]",Mi="[object WeakSet]",Xr="[object ArrayBuffer]",Qr="[object DataView]",oo="[object Float32Array]",hi="[object Float64Array]",Bn="[object Int8Array]",so="[object Int16Array]",bl="[object Int32Array]",X="[object Uint8Array]",ee="[object Uint8ClampedArray]",Ce="[object Uint16Array]",Me="[object Uint32Array]",Tl=/\b__p \+= '';/g,ze=/\b(__p \+=) '' \+/g,Jr=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Yt=/&(?:amp|lt|gt|quot|#39);/g,Mt=/[&<>"']/g,At=RegExp(Yt.source),Na=RegExp(Mt.source),pn=/<%-([\s\S]+?)%>/g,zn=/<%([\s\S]+?)%>/g,Nr=/<%=([\s\S]+?)%>/g,gs=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Tn=/^\w*$/,Pa=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Aa=/[\\^$.*+?()[\]{}|]/g,nc=RegExp(Aa.source),ic=/^\s+/,oc=/\s/,$f=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,sc=/\{\n\/\* \[wrapped with (.+)\] \*/,Hp=/,? & /,kl=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Bp=/[()=,{}\[\]\/\s]/,zp=/\\(\\)?/g,Nl=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Vf=/\w*$/,ac=/^[-+]0x[0-9a-f]+$/i,vs=/^0b[01]+$/i,Wp=/^\[object .+?Constructor\]$/,Up=/^0o[0-7]+$/i,La=/^(?:0|[1-9]\d*)$/,lc=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ao=/($^)/,qf=/['\n\r\u2028\u2029\\]/g,Oi="\\ud800-\\udfff",uc="\\u0300-\\u036f",cc="\\ufe20-\\ufe2f",sr="\\u20d0-\\u20ff",Ae=uc+cc+sr,lo="\\u2700-\\u27bf",Pl="a-z\\xdf-\\xf6\\xf8-\\xff",Ri="\\xac\\xb1\\xd7\\xf7",vt="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ys="\\u2000-\\u206f",Ma=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Oa="A-Z\\xc0-\\xd6\\xd8-\\xde",ce="\\ufe0e\\ufe0f",Ve=Ri+vt+ys+Ma,qs="['\u2019]",fc="["+Oi+"]",js="["+Ve+"]",zo="["+Ae+"]",dc="\\d+",qe="["+lo+"]",jf="["+Pl+"]",Al="[^"+Oi+Ve+dc+lo+Pl+Oa+"]",ws="\\ud83c[\\udffb-\\udfff]",mi="(?:"+zo+"|"+ws+")",Ll="[^"+Oi+"]",Ml="(?:\\ud83c[\\udde6-\\uddff]){2}",Ss="[\\ud800-\\udbff][\\udc00-\\udfff]",uo="["+Oa+"]",Ol="\\u200d",Ks="(?:"+jf+"|"+Al+")",pc="(?:"+uo+"|"+Al+")",Rl="(?:"+qs+"(?:d|ll|m|re|s|t|ve))?",hc="(?:"+qs+"(?:D|LL|M|RE|S|T|VE))?",mc=mi+"?",Dl="["+ce+"]?",Ra="(?:"+Ol+"(?:"+[Ll,Ml,Ss].join("|")+")"+Dl+mc+")*",gc="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Di="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Kf=Dl+mc+Ra,$p="(?:"+[qe,Ml,Ss].join("|")+")"+Kf,Il="(?:"+[Ll+zo+"?",zo,Ml,Ss,fc].join("|")+")",Da=RegExp(qs,"g"),Vp=RegExp(zo,"g"),vc=RegExp(ws+"(?="+ws+")|"+Il+Kf,"g"),qp=RegExp([uo+"?"+jf+"+"+Rl+"(?="+[js,uo,"$"].join("|")+")",pc+"+"+hc+"(?="+[js,uo+Ks,"$"].join("|")+")",uo+"?"+Ks+"+"+Rl,uo+"+"+hc,Di,gc,dc,$p].join("|"),"g"),jp=RegExp("["+Ol+Oi+Ae+ce+"]"),yc=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Gf=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Kp=-1,Ht={};Ht[oo]=Ht[hi]=Ht[Bn]=Ht[so]=Ht[bl]=Ht[X]=Ht[ee]=Ht[Ce]=Ht[Me]=!0,Ht[Ut]=Ht[yr]=Ht[Xr]=Ht[Gt]=Ht[Qr]=Ht[Ft]=Ht[We]=Ht[Yr]=Ht[st]=Ht[Fe]=Ht[bn]=Ht[lt]=Ht[Sr]=Ht[dr]=Ht[Hn]=!1;var Ot={};Ot[Ut]=Ot[yr]=Ot[Xr]=Ot[Qr]=Ot[Gt]=Ot[Ft]=Ot[oo]=Ot[hi]=Ot[Bn]=Ot[so]=Ot[bl]=Ot[st]=Ot[Fe]=Ot[bn]=Ot[lt]=Ot[Sr]=Ot[dr]=Ot[pt]=Ot[X]=Ot[ee]=Ot[Ce]=Ot[Me]=!0,Ot[We]=Ot[Yr]=Ot[Hn]=!1;var M={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},De={"&":"&","<":"<",">":">",'"':""","'":"'"},Gs={"&":"&","<":"<",">":">",""":'"',"'":"'"},gi={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Fl=parseFloat,ve=parseInt,Ia=typeof global=="object"&&global&&global.Object===Object&&global,Gp=typeof self=="object"&&self&&self.Object===Object&&self,Rt=Ia||Gp||Function("return this")(),Yf=typeof up=="object"&&up&&!up.nodeType&&up,Ys=Yf&&typeof Pm=="object"&&Pm&&!Pm.nodeType&&Pm,Fa=Ys&&Ys.exports===Yf,Wo=Fa&&Ia.process,Se=function(){try{var G=Ys&&Ys.require&&Ys.require("util").types;return G||Wo&&Wo.binding&&Wo.binding("util")}catch{}}(),Xs=Se&&Se.isArrayBuffer,vi=Se&&Se.isDate,Ze=Se&&Se.isMap,Hl=Se&&Se.isRegExp,hn=Se&&Se.isSet,Bl=Se&&Se.isTypedArray;function Zr(G,ie,J){switch(J.length){case 0:return G.call(ie);case 1:return G.call(ie,J[0]);case 2:return G.call(ie,J[0],J[1]);case 3:return G.call(ie,J[0],J[1],J[2])}return G.apply(ie,J)}i(Zr,"apply");function zl(G,ie,J,Pe){for(var Je=-1,yt=G==null?0:G.length;++Je-1}i(Ha,"arrayIncludes");function Wl(G,ie,J){for(var Pe=-1,Je=G==null?0:G.length;++Pe-1;);return J}i(yi,"charsStartIndex");function ea(G,ie){for(var J=G.length;J--&&Kt(ie,G[J],0)>-1;);return J}i(ea,"charsEndIndex");function ql(G,ie){for(var J=G.length,Pe=0;J--;)G[J]===ie&&++Pe;return Pe}i(ql,"countHolders");var Tc=Ba(M),Fi=Ba(De);function $o(G){return"\\"+gi[G]}i($o,"escapeStringChar");function jl(G,ie){return G==null?e:G[ie]}i(jl,"getValue");function xs(G){return jp.test(G)}i(xs,"hasUnicode");function td(G){return yc.test(G)}i(td,"hasUnicodeWord");function Qp(G){for(var ie,J=[];!(ie=G.next()).done;)J.push(ie.value);return J}i(Qp,"iteratorToArray");function Kl(G){var ie=-1,J=Array(G.size);return G.forEach(function(Pe,Je){J[++ie]=[Je,Pe]}),J}i(Kl,"mapToArray");function Gl(G,ie){return function(J){return G(ie(J))}}i(Gl,"overArg");function kn(G,ie){for(var J=-1,Pe=G.length,Je=0,yt=[];++J-1}i(xg,"listCacheHas");function Cg(a,f){var m=this.__data__,x=tu(m,a);return x<0?(++this.size,m.push([a,f])):m[x][1]=f,this}i(Cg,"listCacheSet"),vo.prototype.clear=xw,vo.prototype.delete=sh,vo.prototype.get=ah,vo.prototype.has=xg,vo.prototype.set=Cg;function yo(a){var f=-1,m=a==null?0:a.length;for(this.clear();++f=f?a:f)),a}i(Ts,"baseClamp");function wi(a,f,m,x,T,A){var B,$=f&b,Q=f&k,le=f&R;if(m&&(B=T?m(a,x,T,A):m(a)),B!==e)return B;if(!Er(a))return a;var ue=at(a);if(ue){if(B=Bw(a),!$)return ei(a,B)}else{var fe=Wr(a),Ne=fe==Yr||fe==Zt;if(Su(a))return xh(a,$);if(fe==bn||fe==Ut||Ne&&!T){if(B=Q||Ne?{}:rv(a),!$)return Q?Rw(a,Tg(B,a)):jg(a,ch(B,a))}else{if(!Ot[fe])return T?a:{};B=kd(a,fe,$)}}A||(A=new ar);var Be=A.get(a);if(Be)return Be;A.set(a,B),ib(a)?a.forEach(function(Ge){B.add(wi(Ge,f,m,Ge,a,A))}):rb(a)&&a.forEach(function(Ge,ht){B.set(ht,wi(Ge,f,m,ht,a,A))});var Ke=le?Q?Td:bd:Q?$i:Ln,dt=ue?e:Ke(a);return Zn(dt||a,function(Ge,ht){dt&&(ht=Ge,Ge=a[ht]),eu(B,ht,wi(Ge,f,m,ht,a,A))}),B}i(wi,"baseClone");function bw(a){var f=Ln(a);return function(m){return fh(m,a,f)}}i(bw,"baseConforms");function fh(a,f,m){var x=m.length;if(a==null)return!x;for(a=Bt(a);x--;){var T=m[x],A=f[T],B=a[T];if(B===e&&!(T in a)||!A(B))return!1}return!0}i(fh,"baseConformsTo");function kg(a,f,m){if(typeof a!="function")throw new Hi(l);return Ie(function(){a.apply(e,m)},f)}i(kg,"baseDelay");function Dc(a,f,m,x){var T=-1,A=Ha,B=!0,$=a.length,Q=[],le=f.length;if(!$)return Q;m&&(f=$t(f,mn(m))),x?(A=Wl,B=!1):f.length>=n&&(A=co,B=!1,f=new ia(f));e:for(;++T<$;){var ue=a[T],fe=m==null?ue:m(ue);if(ue=x||ue!==0?ue:0,B&&fe===fe){for(var Ne=le;Ne--;)if(f[Ne]===fe)continue e;Q.push(ue)}else A(f,fe,x)||Q.push(ue)}return Q}i(Dc,"baseDifference");var So=hu(zi),dh=hu(pd,!0);function Tw(a,f){var m=!0;return So(a,function(x,T,A){return m=!!f(x,T,A),m}),m}i(Tw,"baseEvery");function dd(a,f,m){for(var x=-1,T=a.length;++xT?0:T+m),x=x===e||x>T?T:ct(x),x<0&&(x+=T),x=m>x?0:sb(x);m0&&m($)?f>1?Br($,f-1,m,x,T):Ii(T,$):x||(T[T.length]=$)}return T}i(Br,"baseFlatten");var nu=Kg(),ph=Kg(!0);function zi(a,f){return a&&nu(a,f,Ln)}i(zi,"baseForOwn");function pd(a,f){return a&&ph(a,f,Ln)}i(pd,"baseForOwnRight");function hd(a,f){return jt(f,function(m){return nl(a[m])})}i(hd,"baseFunctions");function la(a,f){f=fa(f,a);for(var m=0,x=f.length;a!=null&&mf}i(md,"baseGt");function Pg(a,f){return a!=null&&kt.call(a,f)}i(Pg,"baseHas");function Ag(a,f){return a!=null&&f in Bt(a)}i(Ag,"baseHasIn");function iu(a,f,m){return a>=Ar(f,m)&&a=120&&ue.length>=120)?new ia(B&&ue):e}ue=a[0];var fe=-1,Ne=$[0];e:for(;++fe-1;)$!==a&&Ua.call($,Q,1),Ua.call(a,Q,1);return a}i(yh,"basePullAll");function Nn(a,f){for(var m=a?f.length:0,x=m-1;m--;){var T=f[m];if(m==x||T!==A){var A=T;c(T)?Ua.call(a,T,1):vd(a,T)}}return a}i(Nn,"basePullAt");function gd(a,f){return a+Va(ih()*(f-a+1))}i(gd,"baseRandom");function Nw(a,f,m,x){for(var T=-1,A=er(Pc((f-a)/(m||1)),0),B=J(A);A--;)B[x?A:++T]=a,a+=m;return B}i(Nw,"baseRange");function wh(a,f){var m="";if(!a||f<1||f>Qe)return m;do f%2&&(m+=a),f=Va(f/2),f&&(a+=a);while(f);return m}i(wh,"baseRepeat");function ut(a,f){return Oe(pe(a,f,Vi),a+"")}i(ut,"baseRest");function Wg(a){return lh(Pd(a))}i(Wg,"baseSample");function Ug(a,f){var m=Pd(a);return hr(m,Ts(f,0,m.length))}i(Ug,"baseSampleSize");function fu(a,f,m,x){if(!Er(a))return a;f=fa(f,a);for(var T=-1,A=f.length,B=A-1,$=a;$!=null&&++TT?0:T+f),m=m>T?T:m,m<0&&(m+=T),T=f>m?0:m-f>>>0,f>>>=0;for(var A=J(T);++x>>1,B=a[A];B!==null&&!_o(B)&&(m?B<=f:B=n){var le=f?null:Iw(a);if(le)return w(le);B=!1,T=co,Q=new ia}else Q=f?[]:$;e:for(;++x=x?a:zr(a,f,m)}i(ks,"castSlice");var qg=eh||function(a){return Rt.clearTimeout(a)};function xh(a,f){if(f)return a.slice();var m=a.length,x=Jp?Jp(m):new a.constructor(m);return a.copy(x),x}i(xh,"cloneBuffer");function du(a){var f=new a.constructor(a.byteLength);return new id(f).set(new id(a)),f}i(du,"cloneArrayBuffer");function Lw(a,f){var m=f?du(a.buffer):a.buffer;return new a.constructor(m,a.byteOffset,a.byteLength)}i(Lw,"cloneDataView");function Mw(a){var f=new a.constructor(a.source,Vf.exec(a));return f.lastIndex=a.lastIndex,f}i(Mw,"cloneRegExp");function Vc(a){return Mc?Bt(Mc.call(a)):{}}i(Vc,"cloneSymbol");function Ch(a,f){var m=f?du(a.buffer):a.buffer;return new a.constructor(m,a.byteOffset,a.length)}i(Ch,"cloneTypedArray");function _h(a,f){if(a!==f){var m=a!==e,x=a===null,T=a===a,A=_o(a),B=f!==e,$=f===null,Q=f===f,le=_o(f);if(!$&&!le&&!A&&a>f||A&&B&&Q&&!$&&!le||x&&B&&Q||!m&&Q||!T)return 1;if(!x&&!A&&!le&&a=$)return Q;var le=m[x];return Q*(le=="desc"?-1:1)}}return a.index-f.index}i(Ow,"compareMultiple");function wd(a,f,m,x){for(var T=-1,A=a.length,B=m.length,$=-1,Q=f.length,le=er(A-B,0),ue=J(Q+le),fe=!x;++$1?m[T-1]:e,B=T>2?m[2]:e;for(A=a.length>3&&typeof A=="function"?(T--,A):e,B&&u(m[0],m[1],B)&&(A=T<3?e:A,T=1),f=Bt(f);++x-1?T[A?f[B]:B]:e}}i(bh,"createFind");function Xg(a){return Qo(function(f){var m=f.length,x=m,T=Lt.prototype.thru;for(a&&f.reverse();x--;){var A=f[x];if(typeof A!="function")throw new Hi(l);if(T&&!B&&Xc(A)=="wrapper")var B=new Lt([],!0)}for(x=B?x:m;++x1&&St.reverse(),ue&&Q$))return!1;var le=A.get(a),ue=A.get(f);if(le&&ue)return le==f&&ue==a;var fe=-1,Ne=!0,Be=m&z?new ia:e;for(A.set(a,f),A.set(f,a);++fe<$;){var Ke=a[fe],dt=f[fe];if(x)var Ge=B?x(dt,Ke,fe,f,a,A):x(Ke,dt,fe,a,f,A);if(Ge!==e){if(Ge)continue;Ne=!1;break}if(Be){if(!Qs(f,function(ht,St){if(!co(Be,St)&&(Ke===ht||T(Ke,ht,m,x,A)))return Be.push(St)})){Ne=!1;break}}else if(!(Ke===dt||T(Ke,dt,m,x,A))){Ne=!1;break}}return A.delete(a),A.delete(f),Ne}i(Wi,"equalArrays");function Ed(a,f,m,x,T,A,B){switch(m){case Qr:if(a.byteLength!=f.byteLength||a.byteOffset!=f.byteOffset)return!1;a=a.buffer,f=f.buffer;case Xr:return!(a.byteLength!=f.byteLength||!A(new id(a),new id(f)));case Gt:case Ft:case Fe:return Ns(+a,+f);case We:return a.name==f.name&&a.message==f.message;case lt:case dr:return a==f+"";case st:var $=Kl;case Sr:var Q=x&I;if($||($=w),a.size!=f.size&&!Q)return!1;var le=B.get(a);if(le)return le==f;x|=z,B.set(a,f);var ue=Wi($(a),$(f),x,T,A,B);return B.delete(a),ue;case pt:if(Mc)return Mc.call(a)==Mc.call(f)}return!1}i(Ed,"equalByTag");function Nh(a,f,m,x,T,A){var B=m&I,$=bd(a),Q=$.length,le=bd(f),ue=le.length;if(Q!=ue&&!B)return!1;for(var fe=Q;fe--;){var Ne=$[fe];if(!(B?Ne in f:kt.call(f,Ne)))return!1}var Be=A.get(a),Ke=A.get(f);if(Be&&Ke)return Be==f&&Ke==a;var dt=!0;A.set(a,f),A.set(f,a);for(var Ge=B;++fe1?"& ":"")+f[x],f=f.join(m>2?", ":" "),a.replace($f,`{ +`+h.stack}return{value:e,source:t,stack:l,digest:null}}i(rp,"Ji");function O1(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}i(O1,"Ki");function mS(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}i(mS,"Li");var b3=typeof WeakMap=="function"?WeakMap:Map;function SN(e,t,n){n=cl(-1,n),n.tag=3,n.payload={element:null};var s=t.value;return n.callback=function(){my||(my=!0,bS=s),mS(e,t)},n}i(SN,"Ni");function xN(e,t,n){n=cl(-1,n),n.tag=3;var s=e.type.getDerivedStateFromError;if(typeof s=="function"){var l=t.value;n.payload=function(){return s(l)},n.callback=function(){mS(e,t)}}var h=e.stateNode;return h!==null&&typeof h.componentDidCatch=="function"&&(n.callback=function(){mS(e,t),typeof s!="function"&&(Ru===null?Ru=new Set([this]):Ru.add(this));var d=t.stack;this.componentDidCatch(t.value,{componentStack:d!==null?d:""})}),n}i(xN,"Qi");function MT(e,t,n){var s=e.pingCache;if(s===null){s=e.pingCache=new b3;var l=new Set;s.set(t,l)}else l=s.get(t),l===void 0&&(l=new Set,s.set(t,l));l.has(n)||(l.add(n),e=B3.bind(null,e,t,n),t.then(e,e))}i(MT,"Si");function OT(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}i(OT,"Ui");function RT(e,t,n,s,l){return e.mode&1?(e.flags|=65536,e.lanes=l,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=cl(-1,1),t.tag=2,Ou(n,t,1))),n.lanes|=1),e)}i(RT,"Vi");var T3=ml.ReactCurrentOwner,ji=!1;function Ei(e,t,n,s){t.child=e===null?Xk(t,null,n,s):ep(t,e.child,n,s)}i(Ei,"Xi");function DT(e,t,n,s,l){n=n.render;var h=t.ref;return Yd(t,l),s=nx(e,t,n,s,h,l),n=ix(),e!==null&&!ji?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,hl(e,t,l)):(mr&&n&&qS(t),t.flags|=1,Ei(e,t,s,l),t.child)}i(DT,"Yi");function IT(e,t,n,s,l){if(e===null){var h=n.type;return typeof h=="function"&&!hx(h)&&h.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=h,CN(e,t,h,s,l)):(e=Gv(n.type,null,s,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(h=e.child,!(e.lanes&l)){var d=h.memoizedProps;if(n=n.compare,n=n!==null?n:cm,n(d,s)&&e.ref===t.ref)return hl(e,t,l)}return t.flags|=1,e=Iu(h,s),e.ref=t.ref,e.return=t,t.child=e}i(IT,"$i");function CN(e,t,n,s,l){if(e!==null){var h=e.memoizedProps;if(cm(h,s)&&e.ref===t.ref)if(ji=!1,t.pendingProps=s=h,(e.lanes&l)!==0)e.flags&131072&&(ji=!0);else return t.lanes=e.lanes,hl(e,t,l)}return gS(e,t,n,s,l)}i(CN,"bj");function _N(e,t,n){var s=t.pendingProps,l=s.children,h=e!==null?e.memoizedState:null;if(s.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},nr(Vd,To),To|=n;else{if(!(n&1073741824))return e=h!==null?h.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,nr(Vd,To),To|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},s=h!==null?h.baseLanes:n,nr(Vd,To),To|=s}else h!==null?(s=h.baseLanes|n,t.memoizedState=null):s=n,nr(Vd,To),To|=s;return Ei(e,t,l,n),t.child}i(_N,"dj");function EN(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}i(EN,"gj");function gS(e,t,n,s,l){var h=Gi(n)?lf:oi.current;return h=Jd(t,h),Yd(t,l),n=nx(e,t,n,s,h,l),s=ix(),e!==null&&!ji?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,hl(e,t,l)):(mr&&s&&qS(t),t.flags|=1,Ei(e,t,n,l),t.child)}i(gS,"cj");function FT(e,t,n,s,l){if(Gi(n)){var h=!0;oy(t)}else h=!1;if(Yd(t,l),t.stateNode===null)qv(e,t),wN(t,n,s),hS(t,n,s,l),s=!0;else if(e===null){var d=t.stateNode,v=t.memoizedProps;d.props=v;var S=d.context,b=n.contextType;typeof b=="object"&&b!==null?b=as(b):(b=Gi(n)?lf:oi.current,b=Jd(t,b));var k=n.getDerivedStateFromProps,R=typeof k=="function"||typeof d.getSnapshotBeforeUpdate=="function";R||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(v!==s||S!==b)&<(t,d,s,b),Eu=!1;var I=t.memoizedState;d.state=I,cy(t,s,d,l),S=t.memoizedState,v!==s||I!==S||Ki.current||Eu?(typeof k=="function"&&(pS(t,n,k,s),S=t.memoizedState),(v=Eu||PT(t,n,v,s,I,S,b))?(R||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(t.flags|=4194308)):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=S),d.props=s,d.state=S,d.context=b,s=v):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{d=t.stateNode,Jk(e,t),v=t.memoizedProps,b=t.type===t.elementType?v:Ms(t.type,v),d.props=b,R=t.pendingProps,I=d.context,S=n.contextType,typeof S=="object"&&S!==null?S=as(S):(S=Gi(n)?lf:oi.current,S=Jd(t,S));var z=n.getDerivedStateFromProps;(k=typeof z=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(v!==R||I!==S)&<(t,d,s,S),Eu=!1,I=t.memoizedState,d.state=I,cy(t,s,d,l);var j=t.memoizedState;v!==R||I!==j||Ki.current||Eu?(typeof z=="function"&&(pS(t,n,z,s),j=t.memoizedState),(b=Eu||PT(t,n,b,s,I,j,S)||!1)?(k||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(s,j,S),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(s,j,S)),typeof d.componentDidUpdate=="function"&&(t.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof d.componentDidUpdate!="function"||v===e.memoizedProps&&I===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&I===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=j),d.props=s,d.state=j,d.context=S,s=b):(typeof d.componentDidUpdate!="function"||v===e.memoizedProps&&I===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&I===e.memoizedState||(t.flags|=1024),s=!1)}return vS(e,t,n,s,h,l)}i(FT,"hj");function vS(e,t,n,s,l,h){EN(e,t);var d=(t.flags&128)!==0;if(!s&&!d)return l&&CT(t,n,!1),hl(e,t,h);s=t.stateNode,T3.current=t;var v=d&&typeof n.getDerivedStateFromError!="function"?null:s.render();return t.flags|=1,e!==null&&d?(t.child=ep(t,e.child,null,h),t.child=ep(t,null,v,h)):Ei(e,t,v,h),t.memoizedState=s.state,l&&CT(t,n,!0),t.child}i(vS,"jj");function bN(e){var t=e.stateNode;t.pendingContext?xT(e,t.pendingContext,t.pendingContext!==t.context):t.context&&xT(e,t.context,!1),ZS(e,t.containerInfo)}i(bN,"kj");function HT(e,t,n,s,l){return Zd(),KS(l),t.flags|=256,Ei(e,t,n,s),t.child}i(HT,"lj");var yS={dehydrated:null,treeContext:null,retryLane:0};function wS(e){return{baseLanes:e,cachePool:null,transitions:null}}i(wS,"nj");function TN(e,t,n){var s=t.pendingProps,l=br.current,h=!1,d=(t.flags&128)!==0,v;if((v=d)||(v=e!==null&&e.memoizedState===null?!1:(l&2)!==0),v?(h=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(l|=1),nr(br,l&1),e===null)return fS(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(d=s.children,e=s.fallback,h?(s=t.mode,h=t.child,d={mode:"hidden",children:d},!(s&1)&&h!==null?(h.childLanes=0,h.pendingProps=d):h=Ay(d,s,0,null),e=af(e,s,n,null),h.return=t,e.return=t,h.sibling=e,t.child=h,t.child.memoizedState=wS(n),t.memoizedState=yS,e):ax(t,d));if(l=e.memoizedState,l!==null&&(v=l.dehydrated,v!==null))return k3(e,t,d,s,v,l,n);if(h){h=s.fallback,d=t.mode,l=e.child,v=l.sibling;var S={mode:"hidden",children:s.children};return!(d&1)&&t.child!==l?(s=t.child,s.childLanes=0,s.pendingProps=S,t.deletions=null):(s=Iu(l,S),s.subtreeFlags=l.subtreeFlags&14680064),v!==null?h=Iu(v,h):(h=af(h,d,n,null),h.flags|=2),h.return=t,s.return=t,s.sibling=h,t.child=s,s=h,h=t.child,d=e.child.memoizedState,d=d===null?wS(n):{baseLanes:d.baseLanes|n,cachePool:null,transitions:d.transitions},h.memoizedState=d,h.childLanes=e.childLanes&~n,t.memoizedState=yS,s}return h=e.child,e=h.sibling,s=Iu(h,{mode:"visible",children:s.children}),!(t.mode&1)&&(s.lanes=n),s.return=t,s.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=s,t.memoizedState=null,s}i(TN,"oj");function ax(e,t){return t=Ay({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}i(ax,"qj");function Iv(e,t,n,s){return s!==null&&KS(s),ep(t,e.child,null,n),e=ax(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}i(Iv,"sj");function k3(e,t,n,s,l,h,d){if(n)return t.flags&256?(t.flags&=-257,s=O1(Error(ge(422))),Iv(e,t,d,s)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(h=s.fallback,l=t.mode,s=Ay({mode:"visible",children:s.children},l,0,null),h=af(h,l,d,null),h.flags|=2,s.return=t,h.return=t,s.sibling=h,t.child=s,t.mode&1&&ep(t,e.child,null,d),t.child.memoizedState=wS(d),t.memoizedState=yS,h);if(!(t.mode&1))return Iv(e,t,d,null);if(l.data==="$!"){if(s=l.nextSibling&&l.nextSibling.dataset,s)var v=s.dgst;return s=v,h=Error(ge(419)),s=O1(h,s,void 0),Iv(e,t,d,s)}if(v=(d&e.childLanes)!==0,ji||v){if(s=On,s!==null){switch(d&-d){case 4:l=2;break;case 16:l=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:l=32;break;case 536870912:l=268435456;break;default:l=0}l=l&(s.suspendedLanes|d)?0:l,l!==0&&l!==h.retryLane&&(h.retryLane=l,pl(e,l),Is(s,e,l,-1))}return px(),s=O1(Error(ge(421))),Iv(e,t,d,s)}return l.data==="$?"?(t.flags|=128,t.child=e.child,t=z3.bind(null,e),l._reactRetry=t,null):(e=h.treeContext,ko=Mu(l.nextSibling),No=t,mr=!0,Rs=null,e!==null&&(ns[is++]=ll,ns[is++]=ul,ns[is++]=uf,ll=e.id,ul=e.overflow,uf=t),t=ax(t,s.children),t.flags|=4096,t)}i(k3,"rj");function BT(e,t,n){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),dS(e.return,t,n)}i(BT,"vj");function R1(e,t,n,s,l){var h=e.memoizedState;h===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:n,tailMode:l}:(h.isBackwards=t,h.rendering=null,h.renderingStartTime=0,h.last=s,h.tail=n,h.tailMode=l)}i(R1,"wj");function kN(e,t,n){var s=t.pendingProps,l=s.revealOrder,h=s.tail;if(Ei(e,t,s.children,n),s=br.current,s&2)s=s&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&BT(e,n,t);else if(e.tag===19)BT(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}s&=1}if(nr(br,s),!(t.mode&1))t.memoizedState=null;else switch(l){case"forwards":for(n=t.child,l=null;n!==null;)e=n.alternate,e!==null&&fy(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),R1(t,!1,l,n,h);break;case"backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&fy(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}R1(t,!0,n,null,h);break;case"together":R1(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}i(kN,"xj");function qv(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}i(qv,"ij");function hl(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ff|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(ge(153));if(t.child!==null){for(e=t.child,n=Iu(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Iu(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}i(hl,"Zi");function N3(e,t,n){switch(t.tag){case 3:bN(t),Zd();break;case 5:Zk(t);break;case 1:Gi(t.type)&&oy(t);break;case 4:ZS(t,t.stateNode.containerInfo);break;case 10:var s=t.type._context,l=t.memoizedProps.value;nr(ly,s._currentValue),s._currentValue=l;break;case 13:if(s=t.memoizedState,s!==null)return s.dehydrated!==null?(nr(br,br.current&1),t.flags|=128,null):n&t.child.childLanes?TN(e,t,n):(nr(br,br.current&1),e=hl(e,t,n),e!==null?e.sibling:null);nr(br,br.current&1);break;case 19:if(s=(n&t.childLanes)!==0,e.flags&128){if(s)return kN(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),nr(br,br.current),s)break;return null;case 22:case 23:return t.lanes=0,_N(e,t,n)}return hl(e,t,n)}i(N3,"yj");var NN,SS,AN,PN;NN=i(function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},"zj");SS=i(function(){},"Aj");AN=i(function(e,t,n,s){var l=e.memoizedProps;if(l!==s){e=t.stateNode,of(Ca.current);var h=null;switch(n){case"input":l=U1(e,l),s=U1(e,s),h=[];break;case"select":l=kr({},l,{value:void 0}),s=kr({},s,{value:void 0}),h=[];break;case"textarea":l=q1(e,l),s=q1(e,s),h=[];break;default:typeof l.onClick!="function"&&typeof s.onClick=="function"&&(e.onclick=ny)}K1(n,s);var d;n=null;for(b in l)if(!s.hasOwnProperty(b)&&l.hasOwnProperty(b)&&l[b]!=null)if(b==="style"){var v=l[b];for(d in v)v.hasOwnProperty(d)&&(n||(n={}),n[d]="")}else b!=="dangerouslySetInnerHTML"&&b!=="children"&&b!=="suppressContentEditableWarning"&&b!=="suppressHydrationWarning"&&b!=="autoFocus"&&(nm.hasOwnProperty(b)?h||(h=[]):(h=h||[]).push(b,null));for(b in s){var S=s[b];if(v=l?.[b],s.hasOwnProperty(b)&&S!==v&&(S!=null||v!=null))if(b==="style")if(v){for(d in v)!v.hasOwnProperty(d)||S&&S.hasOwnProperty(d)||(n||(n={}),n[d]="");for(d in S)S.hasOwnProperty(d)&&v[d]!==S[d]&&(n||(n={}),n[d]=S[d])}else n||(h||(h=[]),h.push(b,n)),n=S;else b==="dangerouslySetInnerHTML"?(S=S?S.__html:void 0,v=v?v.__html:void 0,S!=null&&v!==S&&(h=h||[]).push(b,S)):b==="children"?typeof S!="string"&&typeof S!="number"||(h=h||[]).push(b,""+S):b!=="suppressContentEditableWarning"&&b!=="suppressHydrationWarning"&&(nm.hasOwnProperty(b)?(S!=null&&b==="onScroll"&&cr("scroll",e),h||v===S||(h=[])):(h=h||[]).push(b,S))}n&&(h=h||[]).push("style",n);var b=h;(t.updateQueue=b)&&(t.flags|=4)}},"Bj");PN=i(function(e,t,n,s){n!==s&&(t.flags|=4)},"Cj");function Wh(e,t){if(!mr)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var s=null;n!==null;)n.alternate!==null&&(s=n),n=n.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}i(Wh,"Dj");function ni(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,s=0;if(t)for(var l=e.child;l!==null;)n|=l.lanes|l.childLanes,s|=l.subtreeFlags&14680064,s|=l.flags&14680064,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,s|=l.subtreeFlags,s|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=s,e.childLanes=n,t}i(ni,"S");function A3(e,t,n){var s=t.pendingProps;switch(jS(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ni(t),null;case 1:return Gi(t.type)&&iy(),ni(t),null;case 3:return s=t.stateNode,tp(),fr(Ki),fr(oi),tx(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(Rv(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Rs!==null&&(NS(Rs),Rs=null))),SS(e,t),ni(t),null;case 5:ex(t);var l=of(mm.current);if(n=t.type,e!==null&&t.stateNode!=null)AN(e,t,n,s,l),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!s){if(t.stateNode===null)throw Error(ge(166));return ni(t),null}if(e=of(Ca.current),Rv(t)){s=t.stateNode,n=t.type;var h=t.memoizedProps;switch(s[Sa]=t,s[pm]=h,e=(t.mode&1)!==0,n){case"dialog":cr("cancel",s),cr("close",s);break;case"iframe":case"object":case"embed":cr("load",s);break;case"video":case"audio":for(l=0;l<\/script>",e=e.removeChild(e.firstChild)):typeof s.is=="string"?e=d.createElement(n,{is:s.is}):(e=d.createElement(n),n==="select"&&(d=e,s.multiple?d.multiple=!0:s.size&&(d.size=s.size))):e=d.createElementNS(e,n),e[Sa]=t,e[pm]=s,NN(e,t,!1,!1),t.stateNode=e;e:{switch(d=G1(n,s),n){case"dialog":cr("cancel",e),cr("close",e),l=s;break;case"iframe":case"object":case"embed":cr("load",e),l=s;break;case"video":case"audio":for(l=0;lnp&&(t.flags|=128,s=!0,Wh(h,!1),t.lanes=4194304)}else{if(!s)if(e=fy(d),e!==null){if(t.flags|=128,s=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Wh(h,!0),h.tail===null&&h.tailMode==="hidden"&&!d.alternate&&!mr)return ni(t),null}else 2*qr()-h.renderingStartTime>np&&n!==1073741824&&(t.flags|=128,s=!0,Wh(h,!1),t.lanes=4194304);h.isBackwards?(d.sibling=t.child,t.child=d):(n=h.last,n!==null?n.sibling=d:t.child=d,h.last=d)}return h.tail!==null?(t=h.tail,h.rendering=t,h.tail=t.sibling,h.renderingStartTime=qr(),t.sibling=null,n=br.current,nr(br,s?n&1|2:n&1),t):(ni(t),null);case 22:case 23:return dx(),s=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==s&&(t.flags|=8192),s&&t.mode&1?To&1073741824&&(ni(t),t.subtreeFlags&6&&(t.flags|=8192)):ni(t),null;case 24:return null;case 25:return null}throw Error(ge(156,t.tag))}i(A3,"Ej");function P3(e,t){switch(jS(t),t.tag){case 1:return Gi(t.type)&&iy(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return tp(),fr(Ki),fr(oi),tx(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ex(t),null;case 13:if(fr(br),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ge(340));Zd()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return fr(br),null;case 4:return tp(),null;case 10:return XS(t.type._context),null;case 22:case 23:return dx(),null;case 24:return null;default:return null}}i(P3,"Ij");var Fv=!1,ii=!1,L3=typeof WeakSet=="function"?WeakSet:Set,Le=null;function $d(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(s){Or(e,t,s)}else n.current=null}i($d,"Lj");function xS(e,t,n){try{n()}catch(s){Or(e,t,s)}}i(xS,"Mj");var zT=!1;function M3(e,t){if(iS=ey,e=Dk(),VS(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var s=n.getSelection&&n.getSelection();if(s&&s.rangeCount!==0){n=s.anchorNode;var l=s.anchorOffset,h=s.focusNode;s=s.focusOffset;try{n.nodeType,h.nodeType}catch{n=null;break e}var d=0,v=-1,S=-1,b=0,k=0,R=e,I=null;t:for(;;){for(var z;R!==n||l!==0&&R.nodeType!==3||(v=d+l),R!==h||s!==0&&R.nodeType!==3||(S=d+s),R.nodeType===3&&(d+=R.nodeValue.length),(z=R.firstChild)!==null;)I=R,R=z;for(;;){if(R===e)break t;if(I===n&&++b===l&&(v=d),I===h&&++k===s&&(S=d),(z=R.nextSibling)!==null)break;R=I,I=R.parentNode}R=z}n=v===-1||S===-1?null:{start:v,end:S}}else n=null}n=n||{start:0,end:0}}else n=null;for(oS={focusedElem:e,selectionRange:n},ey=!1,Le=t;Le!==null;)if(t=Le,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Le=e;else for(;Le!==null;){t=Le;try{var j=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(j!==null){var Y=j.memoizedProps,ne=j.memoizedState,F=t.stateNode,L=F.getSnapshotBeforeUpdate(t.elementType===t.type?Y:Ms(t.type,Y),ne);F.__reactInternalSnapshotBeforeUpdate=L}break;case 3:var D=t.stateNode.containerInfo;D.nodeType===1?D.textContent="":D.nodeType===9&&D.documentElement&&D.removeChild(D.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ge(163))}}catch(q){Or(t,t.return,q)}if(e=t.sibling,e!==null){e.return=t.return,Le=e;break}Le=t.return}return j=zT,zT=!1,j}i(M3,"Oj");function em(e,t,n){var s=t.updateQueue;if(s=s!==null?s.lastEffect:null,s!==null){var l=s=s.next;do{if((l.tag&e)===e){var h=l.destroy;l.destroy=void 0,h!==void 0&&xS(t,n,h)}l=l.next}while(l!==s)}}i(em,"Pj");function ky(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var s=n.create;n.destroy=s()}n=n.next}while(n!==t)}}i(ky,"Qj");function CS(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}i(CS,"Rj");function LN(e){var t=e.alternate;t!==null&&(e.alternate=null,LN(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Sa],delete t[pm],delete t[lS],delete t[h3],delete t[m3])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}i(LN,"Sj");function MN(e){return e.tag===5||e.tag===3||e.tag===4}i(MN,"Tj");function WT(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||MN(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}i(WT,"Uj");function _S(e,t,n){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ny));else if(s!==4&&(e=e.child,e!==null))for(_S(e,t,n),e=e.sibling;e!==null;)_S(e,t,n),e=e.sibling}i(_S,"Vj");function ES(e,t,n){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(s!==4&&(e=e.child,e!==null))for(ES(e,t,n),e=e.sibling;e!==null;)ES(e,t,n),e=e.sibling}i(ES,"Wj");var Vn=null,Os=!1;function Cu(e,t,n){for(n=n.child;n!==null;)ON(e,t,n),n=n.sibling}i(Cu,"Yj");function ON(e,t,n){if(xa&&typeof xa.onCommitFiberUnmount=="function")try{xa.onCommitFiberUnmount(wy,n)}catch{}switch(n.tag){case 5:ii||$d(n,t);case 6:var s=Vn,l=Os;Vn=null,Cu(e,t,n),Vn=s,Os=l,Vn!==null&&(Os?(e=Vn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Vn.removeChild(n.stateNode));break;case 18:Vn!==null&&(Os?(e=Vn,n=n.stateNode,e.nodeType===8?k1(e.parentNode,n):e.nodeType===1&&k1(e,n),lm(e)):k1(Vn,n.stateNode));break;case 4:s=Vn,l=Os,Vn=n.stateNode.containerInfo,Os=!0,Cu(e,t,n),Vn=s,Os=l;break;case 0:case 11:case 14:case 15:if(!ii&&(s=n.updateQueue,s!==null&&(s=s.lastEffect,s!==null))){l=s=s.next;do{var h=l,d=h.destroy;h=h.tag,d!==void 0&&(h&2||h&4)&&xS(n,t,d),l=l.next}while(l!==s)}Cu(e,t,n);break;case 1:if(!ii&&($d(n,t),s=n.stateNode,typeof s.componentWillUnmount=="function"))try{s.props=n.memoizedProps,s.state=n.memoizedState,s.componentWillUnmount()}catch(v){Or(n,t,v)}Cu(e,t,n);break;case 21:Cu(e,t,n);break;case 22:n.mode&1?(ii=(s=ii)||n.memoizedState!==null,Cu(e,t,n),ii=s):Cu(e,t,n);break;default:Cu(e,t,n)}}i(ON,"Zj");function UT(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new L3),t.forEach(function(s){var l=W3.bind(null,e,s);n.has(s)||(n.add(s),s.then(l,l))})}}i(UT,"ak");function Ls(e,t){var n=t.deletions;if(n!==null)for(var s=0;sl&&(l=d),s&=~h}if(s=l,s=qr()-s,s=(120>s?120:480>s?480:1080>s?1080:1920>s?1920:3e3>s?3e3:4320>s?4320:1960*R3(s/1960))-s,10e?16:e,Nu===null)var s=!1;else{if(e=Nu,Nu=null,gy=0,Nt&6)throw Error(ge(331));var l=Nt;for(Nt|=4,Le=e.current;Le!==null;){var h=Le,d=h.child;if(Le.flags&16){var v=h.deletions;if(v!==null){for(var S=0;Sqr()-cx?sf(e,0):ux|=n),Yi(e,t)}i(B3,"Ti");function WN(e,t){t===0&&(e.mode&1?(t=Ev,Ev<<=1,!(Ev&130023424)&&(Ev=4194304)):t=1);var n=bi();e=pl(e,t),e!==null&&(Sm(e,t,n),Yi(e,n))}i(WN,"Yk");function z3(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),WN(e,n)}i(z3,"uj");function W3(e,t){var n=0;switch(e.tag){case 13:var s=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:s=e.stateNode;break;default:throw Error(ge(314))}s!==null&&s.delete(t),WN(e,n)}i(W3,"bk");var UN;UN=i(function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ki.current)ji=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ji=!1,N3(e,t,n);ji=!!(e.flags&131072)}else ji=!1,mr&&t.flags&1048576&&jk(t,ay,t.index);switch(t.lanes=0,t.tag){case 2:var s=t.type;qv(e,t),e=t.pendingProps;var l=Jd(t,oi.current);Yd(t,n),l=nx(null,t,s,e,l,n);var h=ix();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Gi(s)?(h=!0,oy(t)):h=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,JS(t),l.updater=Ty,t.stateNode=l,l._reactInternals=t,hS(t,s,e,n),t=vS(null,t,s,!0,h,n)):(t.tag=0,mr&&h&&qS(t),Ei(null,t,l,n),t=t.child),t;case 16:s=t.elementType;e:{switch(qv(e,t),e=t.pendingProps,l=s._init,s=l(s._payload),t.type=s,l=t.tag=$3(s),e=Ms(s,e),l){case 0:t=gS(null,t,s,e,n);break e;case 1:t=FT(null,t,s,e,n);break e;case 11:t=DT(null,t,s,e,n);break e;case 14:t=IT(null,t,s,Ms(s.type,e),n);break e}throw Error(ge(306,s,""))}return t;case 0:return s=t.type,l=t.pendingProps,l=t.elementType===s?l:Ms(s,l),gS(e,t,s,l,n);case 1:return s=t.type,l=t.pendingProps,l=t.elementType===s?l:Ms(s,l),FT(e,t,s,l,n);case 3:e:{if(bN(t),e===null)throw Error(ge(387));s=t.pendingProps,h=t.memoizedState,l=h.element,Jk(e,t),cy(t,s,null,n);var d=t.memoizedState;if(s=d.element,h.isDehydrated)if(h={element:s,isDehydrated:!1,cache:d.cache,pendingSuspenseBoundaries:d.pendingSuspenseBoundaries,transitions:d.transitions},t.updateQueue.baseState=h,t.memoizedState=h,t.flags&256){l=rp(Error(ge(423)),t),t=HT(e,t,s,n,l);break e}else if(s!==l){l=rp(Error(ge(424)),t),t=HT(e,t,s,n,l);break e}else for(ko=Mu(t.stateNode.containerInfo.firstChild),No=t,mr=!0,Rs=null,n=Xk(t,null,s,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Zd(),s===l){t=hl(e,t,n);break e}Ei(e,t,s,n)}t=t.child}return t;case 5:return Zk(t),e===null&&fS(t),s=t.type,l=t.pendingProps,h=e!==null?e.memoizedProps:null,d=l.children,sS(s,l)?d=null:h!==null&&sS(s,h)&&(t.flags|=32),EN(e,t),Ei(e,t,d,n),t.child;case 6:return e===null&&fS(t),null;case 13:return TN(e,t,n);case 4:return ZS(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=ep(t,null,s,n):Ei(e,t,s,n),t.child;case 11:return s=t.type,l=t.pendingProps,l=t.elementType===s?l:Ms(s,l),DT(e,t,s,l,n);case 7:return Ei(e,t,t.pendingProps,n),t.child;case 8:return Ei(e,t,t.pendingProps.children,n),t.child;case 12:return Ei(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(s=t.type._context,l=t.pendingProps,h=t.memoizedProps,d=l.value,nr(ly,s._currentValue),s._currentValue=d,h!==null)if(Fs(h.value,d)){if(h.children===l.children&&!Ki.current){t=hl(e,t,n);break e}}else for(h=t.child,h!==null&&(h.return=t);h!==null;){var v=h.dependencies;if(v!==null){d=h.child;for(var S=v.firstContext;S!==null;){if(S.context===s){if(h.tag===1){S=cl(-1,n&-n),S.tag=2;var b=h.updateQueue;if(b!==null){b=b.shared;var k=b.pending;k===null?S.next=S:(S.next=k.next,k.next=S),b.pending=S}}h.lanes|=n,S=h.alternate,S!==null&&(S.lanes|=n),dS(h.return,n,t),v.lanes|=n;break}S=S.next}}else if(h.tag===10)d=h.type===t.type?null:h.child;else if(h.tag===18){if(d=h.return,d===null)throw Error(ge(341));d.lanes|=n,v=d.alternate,v!==null&&(v.lanes|=n),dS(d,n,t),d=h.sibling}else d=h.child;if(d!==null)d.return=h;else for(d=h;d!==null;){if(d===t){d=null;break}if(h=d.sibling,h!==null){h.return=d.return,d=h;break}d=d.return}h=d}Ei(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,s=t.pendingProps.children,Yd(t,n),l=as(l),s=s(l),t.flags|=1,Ei(e,t,s,n),t.child;case 14:return s=t.type,l=Ms(s,t.pendingProps),l=Ms(s.type,l),IT(e,t,s,l,n);case 15:return CN(e,t,t.type,t.pendingProps,n);case 17:return s=t.type,l=t.pendingProps,l=t.elementType===s?l:Ms(s,l),qv(e,t),t.tag=1,Gi(s)?(e=!0,oy(t)):e=!1,Yd(t,n),wN(t,s,l),hS(t,s,l,n),vS(null,t,s,!0,e,n);case 19:return kN(e,t,n);case 22:return _N(e,t,n)}throw Error(ge(156,t.tag))},"Vk");function $N(e,t){return gk(e,t)}i($N,"Fk");function U3(e,t,n,s){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}i(U3,"$k");function os(e,t,n,s){return new U3(e,t,n,s)}i(os,"Bg");function hx(e){return e=e.prototype,!(!e||!e.isReactComponent)}i(hx,"aj");function $3(e){if(typeof e=="function")return hx(e)?1:0;if(e!=null){if(e=e.$$typeof,e===OS)return 11;if(e===RS)return 14}return 2}i($3,"Zk");function Iu(e,t){var n=e.alternate;return n===null?(n=os(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}i(Iu,"Pg");function Gv(e,t,n,s,l,h){var d=2;if(s=e,typeof e=="function")hx(e)&&(d=1);else if(typeof e=="string")d=5;else e:switch(e){case Rd:return af(n.children,l,h,t);case MS:d=8,l|=8;break;case H1:return e=os(12,n,t,l|2),e.elementType=H1,e.lanes=h,e;case B1:return e=os(13,n,t,l),e.elementType=B1,e.lanes=h,e;case z1:return e=os(19,n,t,l),e.elementType=z1,e.lanes=h,e;case ZT:return Ay(n,l,h,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case QT:d=10;break e;case JT:d=9;break e;case OS:d=11;break e;case RS:d=14;break e;case _u:d=16,s=null;break e}throw Error(ge(130,e==null?e:typeof e,""))}return t=os(d,n,t,l),t.elementType=e,t.type=s,t.lanes=h,t}i(Gv,"Rg");function af(e,t,n,s){return e=os(7,e,s,t),e.lanes=n,e}i(af,"Tg");function Ay(e,t,n,s){return e=os(22,e,s,t),e.elementType=ZT,e.lanes=n,e.stateNode={isHidden:!1},e}i(Ay,"pj");function D1(e,t,n){return e=os(6,e,null,t),e.lanes=n,e}i(D1,"Qg");function I1(e,t,n){return t=os(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}i(I1,"Sg");function V3(e,t,n,s,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=w1(0),this.expirationTimes=w1(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=w1(0),this.identifierPrefix=s,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}i(V3,"al");function mx(e,t,n,s,l,h,d,v,S){return e=new V3(e,t,n,v,S),t===1?(t=1,h===!0&&(t|=8)):t=0,h=os(3,null,null,t),e.current=h,h.stateNode=e,h.memoizedState={element:s,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},JS(h),e}i(mx,"bl");function q3(e,t,n){var s=3{"use strict";function GN(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(GN)}catch(e){console.error(e)}}i(GN,"checkDCE");GN(),YN.exports=KN()});var QN=rt(Sx=>{"use strict";var XN=wx();Sx.createRoot=XN.createRoot,Sx.hydrateRoot=XN.hydrateRoot;var j8});var ZN=rt(JN=>{"use strict";var Em=be();function X3(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}i(X3,"n");var Q3=typeof Object.is=="function"?Object.is:X3,J3=Em.useSyncExternalStore,Z3=Em.useRef,e4=Em.useEffect,t4=Em.useMemo,r4=Em.useDebugValue;JN.useSyncExternalStoreWithSelector=function(e,t,n,s,l){var h=Z3(null);if(h.current===null){var d={hasValue:!1,value:null};h.current=d}else d=h.current;h=t4(function(){function S(z){if(!b){if(b=!0,k=z,z=s(z),l!==void 0&&d.hasValue){var j=d.value;if(l(j,z))return R=j}return R=z}if(j=R,Q3(k,z))return j;var Y=s(z);return l!==void 0&&l(j,Y)?j:(k=z,R=Y)}i(S,"a");var b=!1,k,R,I=n===void 0?null:n;return[function(){return S(t())},I===null?void 0:function(){return S(I())}]},[t,n,s,l]);var v=J3(e,h[0],h[1]);return e4(function(){d.hasValue=!0,d.value=v},[v]),r4(v),v}});var tA=rt((X8,eA)=>{"use strict";eA.exports=ZN()});var Pm=rt((up,Am)=>{(function(){var e,t="4.17.21",n=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",l="Expected a function",h="Invalid `variable` option passed into `_.template`",d="__lodash_hash_undefined__",v=500,S="__lodash_placeholder__",b=1,k=2,R=4,I=1,z=2,j=1,Y=2,ne=4,F=8,L=16,D=32,q=64,te=128,Z=256,oe=512,he=30,Re="...",Ee=800,Ye=16,tt=1,xe=2,Xe=3,je=1/0,Qe=9007199254740991,ot=17976931348623157e292,It=NaN,At=4294967295,fn=At-1,dn=At>>>1,vr=[["ary",te],["bind",j],["bindKey",Y],["curry",F],["curryRight",L],["flip",oe],["partial",D],["partialRight",q],["rearg",Z]],Ut="[object Arguments]",yr="[object Array]",wr="[object AsyncFunction]",Yt="[object Boolean]",Ft="[object Date]",se="[object DOMException]",We="[object Error]",Yr="[object Function]",er="[object GeneratorFunction]",st="[object Map]",Fe="[object Number]",Fn="[object Null]",bn="[object Object]",no="[object Promise]",Bo="[object Proxy]",lt="[object RegExp]",Sr="[object Set]",dr="[object String]",pt="[object Symbol]",io="[object Undefined]",Hn="[object WeakMap]",Mi="[object WeakSet]",Xr="[object ArrayBuffer]",Qr="[object DataView]",oo="[object Float32Array]",hi="[object Float64Array]",Bn="[object Int8Array]",so="[object Int16Array]",bl="[object Int32Array]",X="[object Uint8Array]",ee="[object Uint8ClampedArray]",Ce="[object Uint16Array]",Me="[object Uint32Array]",Tl=/\b__p \+= '';/g,ze=/\b(__p \+=) '' \+/g,Jr=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Xt=/&(?:amp|lt|gt|quot|#39);/g,Mt=/[&<>"']/g,Pt=RegExp(Xt.source),Na=RegExp(Mt.source),pn=/<%-([\s\S]+?)%>/g,zn=/<%([\s\S]+?)%>/g,Nr=/<%=([\s\S]+?)%>/g,gs=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Tn=/^\w*$/,Aa=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Pa=/[\\^$.*+?()[\]{}|]/g,nc=RegExp(Pa.source),ic=/^\s+/,oc=/\s/,$f=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,sc=/\{\n\/\* \[wrapped with (.+)\] \*/,Hp=/,? & /,kl=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Bp=/[()=,{}\[\]\/\s]/,zp=/\\(\\)?/g,Nl=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Vf=/\w*$/,ac=/^[-+]0x[0-9a-f]+$/i,vs=/^0b[01]+$/i,Wp=/^\[object .+?Constructor\]$/,Up=/^0o[0-7]+$/i,La=/^(?:0|[1-9]\d*)$/,lc=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ao=/($^)/,qf=/['\n\r\u2028\u2029\\]/g,Oi="\\ud800-\\udfff",uc="\\u0300-\\u036f",cc="\\ufe20-\\ufe2f",sr="\\u20d0-\\u20ff",Pe=uc+cc+sr,lo="\\u2700-\\u27bf",Al="a-z\\xdf-\\xf6\\xf8-\\xff",Ri="\\xac\\xb1\\xd7\\xf7",vt="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ys="\\u2000-\\u206f",Ma=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Oa="A-Z\\xc0-\\xd6\\xd8-\\xde",ce="\\ufe0e\\ufe0f",Ve=Ri+vt+ys+Ma,qs="['\u2019]",fc="["+Oi+"]",js="["+Ve+"]",zo="["+Pe+"]",dc="\\d+",qe="["+lo+"]",jf="["+Al+"]",Pl="[^"+Oi+Ve+dc+lo+Al+Oa+"]",ws="\\ud83c[\\udffb-\\udfff]",mi="(?:"+zo+"|"+ws+")",Ll="[^"+Oi+"]",Ml="(?:\\ud83c[\\udde6-\\uddff]){2}",Ss="[\\ud800-\\udbff][\\udc00-\\udfff]",uo="["+Oa+"]",Ol="\\u200d",Ks="(?:"+jf+"|"+Pl+")",pc="(?:"+uo+"|"+Pl+")",Rl="(?:"+qs+"(?:d|ll|m|re|s|t|ve))?",hc="(?:"+qs+"(?:D|LL|M|RE|S|T|VE))?",mc=mi+"?",Dl="["+ce+"]?",Ra="(?:"+Ol+"(?:"+[Ll,Ml,Ss].join("|")+")"+Dl+mc+")*",gc="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Di="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Kf=Dl+mc+Ra,$p="(?:"+[qe,Ml,Ss].join("|")+")"+Kf,Il="(?:"+[Ll+zo+"?",zo,Ml,Ss,fc].join("|")+")",Da=RegExp(qs,"g"),Vp=RegExp(zo,"g"),vc=RegExp(ws+"(?="+ws+")|"+Il+Kf,"g"),qp=RegExp([uo+"?"+jf+"+"+Rl+"(?="+[js,uo,"$"].join("|")+")",pc+"+"+hc+"(?="+[js,uo+Ks,"$"].join("|")+")",uo+"?"+Ks+"+"+Rl,uo+"+"+hc,Di,gc,dc,$p].join("|"),"g"),jp=RegExp("["+Ol+Oi+Pe+ce+"]"),yc=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Gf=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Kp=-1,Ht={};Ht[oo]=Ht[hi]=Ht[Bn]=Ht[so]=Ht[bl]=Ht[X]=Ht[ee]=Ht[Ce]=Ht[Me]=!0,Ht[Ut]=Ht[yr]=Ht[Xr]=Ht[Yt]=Ht[Qr]=Ht[Ft]=Ht[We]=Ht[Yr]=Ht[st]=Ht[Fe]=Ht[bn]=Ht[lt]=Ht[Sr]=Ht[dr]=Ht[Hn]=!1;var Ot={};Ot[Ut]=Ot[yr]=Ot[Xr]=Ot[Qr]=Ot[Yt]=Ot[Ft]=Ot[oo]=Ot[hi]=Ot[Bn]=Ot[so]=Ot[bl]=Ot[st]=Ot[Fe]=Ot[bn]=Ot[lt]=Ot[Sr]=Ot[dr]=Ot[pt]=Ot[X]=Ot[ee]=Ot[Ce]=Ot[Me]=!0,Ot[We]=Ot[Yr]=Ot[Hn]=!1;var M={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},De={"&":"&","<":"<",">":">",'"':""","'":"'"},Gs={"&":"&","<":"<",">":">",""":'"',"'":"'"},gi={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Fl=parseFloat,ve=parseInt,Ia=typeof global=="object"&&global&&global.Object===Object&&global,Gp=typeof self=="object"&&self&&self.Object===Object&&self,Rt=Ia||Gp||Function("return this")(),Yf=typeof up=="object"&&up&&!up.nodeType&&up,Ys=Yf&&typeof Am=="object"&&Am&&!Am.nodeType&&Am,Fa=Ys&&Ys.exports===Yf,Wo=Fa&&Ia.process,Se=function(){try{var G=Ys&&Ys.require&&Ys.require("util").types;return G||Wo&&Wo.binding&&Wo.binding("util")}catch{}}(),Xs=Se&&Se.isArrayBuffer,vi=Se&&Se.isDate,Ze=Se&&Se.isMap,Hl=Se&&Se.isRegExp,hn=Se&&Se.isSet,Bl=Se&&Se.isTypedArray;function Zr(G,ie,J){switch(J.length){case 0:return G.call(ie);case 1:return G.call(ie,J[0]);case 2:return G.call(ie,J[0],J[1]);case 3:return G.call(ie,J[0],J[1],J[2])}return G.apply(ie,J)}i(Zr,"apply");function zl(G,ie,J,Ae){for(var Je=-1,yt=G==null?0:G.length;++Je-1}i(Ha,"arrayIncludes");function Wl(G,ie,J){for(var Ae=-1,Je=G==null?0:G.length;++Ae-1;);return J}i(yi,"charsStartIndex");function ea(G,ie){for(var J=G.length;J--&&Kt(ie,G[J],0)>-1;);return J}i(ea,"charsEndIndex");function ql(G,ie){for(var J=G.length,Ae=0;J--;)G[J]===ie&&++Ae;return Ae}i(ql,"countHolders");var Tc=Ba(M),Fi=Ba(De);function $o(G){return"\\"+gi[G]}i($o,"escapeStringChar");function jl(G,ie){return G==null?e:G[ie]}i(jl,"getValue");function xs(G){return jp.test(G)}i(xs,"hasUnicode");function td(G){return yc.test(G)}i(td,"hasUnicodeWord");function Qp(G){for(var ie,J=[];!(ie=G.next()).done;)J.push(ie.value);return J}i(Qp,"iteratorToArray");function Kl(G){var ie=-1,J=Array(G.size);return G.forEach(function(Ae,Je){J[++ie]=[Je,Ae]}),J}i(Kl,"mapToArray");function Gl(G,ie){return function(J){return G(ie(J))}}i(Gl,"overArg");function kn(G,ie){for(var J=-1,Ae=G.length,Je=0,yt=[];++J-1}i(xg,"listCacheHas");function Cg(a,f){var m=this.__data__,x=tu(m,a);return x<0?(++this.size,m.push([a,f])):m[x][1]=f,this}i(Cg,"listCacheSet"),vo.prototype.clear=xw,vo.prototype.delete=sh,vo.prototype.get=ah,vo.prototype.has=xg,vo.prototype.set=Cg;function yo(a){var f=-1,m=a==null?0:a.length;for(this.clear();++f=f?a:f)),a}i(Ts,"baseClamp");function wi(a,f,m,x,T,P){var B,$=f&b,Q=f&k,le=f&R;if(m&&(B=T?m(a,x,T,P):m(a)),B!==e)return B;if(!Er(a))return a;var ue=at(a);if(ue){if(B=Bw(a),!$)return ei(a,B)}else{var fe=Wr(a),Ne=fe==Yr||fe==er;if(Su(a))return xh(a,$);if(fe==bn||fe==Ut||Ne&&!T){if(B=Q||Ne?{}:rv(a),!$)return Q?Rw(a,Tg(B,a)):jg(a,ch(B,a))}else{if(!Ot[fe])return T?a:{};B=kd(a,fe,$)}}P||(P=new ar);var Be=P.get(a);if(Be)return Be;P.set(a,B),nb(a)?a.forEach(function(Ge){B.add(wi(Ge,f,m,Ge,a,P))}):tb(a)&&a.forEach(function(Ge,ht){B.set(ht,wi(Ge,f,m,ht,a,P))});var Ke=le?Q?Td:bd:Q?$i:Ln,dt=ue?e:Ke(a);return Zn(dt||a,function(Ge,ht){dt&&(ht=Ge,Ge=a[ht]),eu(B,ht,wi(Ge,f,m,ht,a,P))}),B}i(wi,"baseClone");function bw(a){var f=Ln(a);return function(m){return fh(m,a,f)}}i(bw,"baseConforms");function fh(a,f,m){var x=m.length;if(a==null)return!x;for(a=Bt(a);x--;){var T=m[x],P=f[T],B=a[T];if(B===e&&!(T in a)||!P(B))return!1}return!0}i(fh,"baseConformsTo");function kg(a,f,m){if(typeof a!="function")throw new Hi(l);return Ie(function(){a.apply(e,m)},f)}i(kg,"baseDelay");function Dc(a,f,m,x){var T=-1,P=Ha,B=!0,$=a.length,Q=[],le=f.length;if(!$)return Q;m&&(f=$t(f,mn(m))),x?(P=Wl,B=!1):f.length>=n&&(P=co,B=!1,f=new ia(f));e:for(;++T<$;){var ue=a[T],fe=m==null?ue:m(ue);if(ue=x||ue!==0?ue:0,B&&fe===fe){for(var Ne=le;Ne--;)if(f[Ne]===fe)continue e;Q.push(ue)}else P(f,fe,x)||Q.push(ue)}return Q}i(Dc,"baseDifference");var So=hu(zi),dh=hu(pd,!0);function Tw(a,f){var m=!0;return So(a,function(x,T,P){return m=!!f(x,T,P),m}),m}i(Tw,"baseEvery");function dd(a,f,m){for(var x=-1,T=a.length;++xT?0:T+m),x=x===e||x>T?T:ct(x),x<0&&(x+=T),x=m>x?0:ob(x);m0&&m($)?f>1?Br($,f-1,m,x,T):Ii(T,$):x||(T[T.length]=$)}return T}i(Br,"baseFlatten");var nu=Kg(),ph=Kg(!0);function zi(a,f){return a&&nu(a,f,Ln)}i(zi,"baseForOwn");function pd(a,f){return a&&ph(a,f,Ln)}i(pd,"baseForOwnRight");function hd(a,f){return jt(f,function(m){return nl(a[m])})}i(hd,"baseFunctions");function la(a,f){f=fa(f,a);for(var m=0,x=f.length;a!=null&&mf}i(md,"baseGt");function Ag(a,f){return a!=null&&kt.call(a,f)}i(Ag,"baseHas");function Pg(a,f){return a!=null&&f in Bt(a)}i(Pg,"baseHasIn");function iu(a,f,m){return a>=Pr(f,m)&&a=120&&ue.length>=120)?new ia(B&&ue):e}ue=a[0];var fe=-1,Ne=$[0];e:for(;++fe-1;)$!==a&&Ua.call($,Q,1),Ua.call(a,Q,1);return a}i(yh,"basePullAll");function Nn(a,f){for(var m=a?f.length:0,x=m-1;m--;){var T=f[m];if(m==x||T!==P){var P=T;c(T)?Ua.call(a,T,1):vd(a,T)}}return a}i(Nn,"basePullAt");function gd(a,f){return a+Va(ih()*(f-a+1))}i(gd,"baseRandom");function Nw(a,f,m,x){for(var T=-1,P=tr(Ac((f-a)/(m||1)),0),B=J(P);P--;)B[x?P:++T]=a,a+=m;return B}i(Nw,"baseRange");function wh(a,f){var m="";if(!a||f<1||f>Qe)return m;do f%2&&(m+=a),f=Va(f/2),f&&(a+=a);while(f);return m}i(wh,"baseRepeat");function ut(a,f){return Oe(pe(a,f,Vi),a+"")}i(ut,"baseRest");function Wg(a){return lh(Ad(a))}i(Wg,"baseSample");function Ug(a,f){var m=Ad(a);return hr(m,Ts(f,0,m.length))}i(Ug,"baseSampleSize");function fu(a,f,m,x){if(!Er(a))return a;f=fa(f,a);for(var T=-1,P=f.length,B=P-1,$=a;$!=null&&++TT?0:T+f),m=m>T?T:m,m<0&&(m+=T),T=f>m?0:m-f>>>0,f>>>=0;for(var P=J(T);++x>>1,B=a[P];B!==null&&!_o(B)&&(m?B<=f:B=n){var le=f?null:Iw(a);if(le)return w(le);B=!1,T=co,Q=new ia}else Q=f?[]:$;e:for(;++x=x?a:zr(a,f,m)}i(ks,"castSlice");var qg=eh||function(a){return Rt.clearTimeout(a)};function xh(a,f){if(f)return a.slice();var m=a.length,x=Jp?Jp(m):new a.constructor(m);return a.copy(x),x}i(xh,"cloneBuffer");function du(a){var f=new a.constructor(a.byteLength);return new id(f).set(new id(a)),f}i(du,"cloneArrayBuffer");function Lw(a,f){var m=f?du(a.buffer):a.buffer;return new a.constructor(m,a.byteOffset,a.byteLength)}i(Lw,"cloneDataView");function Mw(a){var f=new a.constructor(a.source,Vf.exec(a));return f.lastIndex=a.lastIndex,f}i(Mw,"cloneRegExp");function Vc(a){return Mc?Bt(Mc.call(a)):{}}i(Vc,"cloneSymbol");function Ch(a,f){var m=f?du(a.buffer):a.buffer;return new a.constructor(m,a.byteOffset,a.length)}i(Ch,"cloneTypedArray");function _h(a,f){if(a!==f){var m=a!==e,x=a===null,T=a===a,P=_o(a),B=f!==e,$=f===null,Q=f===f,le=_o(f);if(!$&&!le&&!P&&a>f||P&&B&&Q&&!$&&!le||x&&B&&Q||!m&&Q||!T)return 1;if(!x&&!P&&!le&&a=$)return Q;var le=m[x];return Q*(le=="desc"?-1:1)}}return a.index-f.index}i(Ow,"compareMultiple");function wd(a,f,m,x){for(var T=-1,P=a.length,B=m.length,$=-1,Q=f.length,le=tr(P-B,0),ue=J(Q+le),fe=!x;++$1?m[T-1]:e,B=T>2?m[2]:e;for(P=a.length>3&&typeof P=="function"?(T--,P):e,B&&u(m[0],m[1],B)&&(P=T<3?e:P,T=1),f=Bt(f);++x-1?T[P?f[B]:B]:e}}i(bh,"createFind");function Xg(a){return Qo(function(f){var m=f.length,x=m,T=Lt.prototype.thru;for(a&&f.reverse();x--;){var P=f[x];if(typeof P!="function")throw new Hi(l);if(T&&!B&&Xc(P)=="wrapper")var B=new Lt([],!0)}for(x=B?x:m;++x1&&St.reverse(),ue&&Q$))return!1;var le=P.get(a),ue=P.get(f);if(le&&ue)return le==f&&ue==a;var fe=-1,Ne=!0,Be=m&z?new ia:e;for(P.set(a,f),P.set(f,a);++fe<$;){var Ke=a[fe],dt=f[fe];if(x)var Ge=B?x(dt,Ke,fe,f,a,P):x(Ke,dt,fe,a,f,P);if(Ge!==e){if(Ge)continue;Ne=!1;break}if(Be){if(!Qs(f,function(ht,St){if(!co(Be,St)&&(Ke===ht||T(Ke,ht,m,x,P)))return Be.push(St)})){Ne=!1;break}}else if(!(Ke===dt||T(Ke,dt,m,x,P))){Ne=!1;break}}return P.delete(a),P.delete(f),Ne}i(Wi,"equalArrays");function Ed(a,f,m,x,T,P,B){switch(m){case Qr:if(a.byteLength!=f.byteLength||a.byteOffset!=f.byteOffset)return!1;a=a.buffer,f=f.buffer;case Xr:return!(a.byteLength!=f.byteLength||!P(new id(a),new id(f)));case Yt:case Ft:case Fe:return Ns(+a,+f);case We:return a.name==f.name&&a.message==f.message;case lt:case dr:return a==f+"";case st:var $=Kl;case Sr:var Q=x&I;if($||($=w),a.size!=f.size&&!Q)return!1;var le=B.get(a);if(le)return le==f;x|=z,B.set(a,f);var ue=Wi($(a),$(f),x,T,P,B);return B.delete(a),ue;case pt:if(Mc)return Mc.call(a)==Mc.call(f)}return!1}i(Ed,"equalByTag");function Nh(a,f,m,x,T,P){var B=m&I,$=bd(a),Q=$.length,le=bd(f),ue=le.length;if(Q!=ue&&!B)return!1;for(var fe=Q;fe--;){var Ne=$[fe];if(!(B?Ne in f:kt.call(f,Ne)))return!1}var Be=P.get(a),Ke=P.get(f);if(Be&&Ke)return Be==f&&Ke==a;var dt=!0;P.set(a,f),P.set(f,a);for(var Ge=B;++fe1?"& ":"")+f[x],f=f.join(m>2?", ":" "),a.replace($f,`{ /* [wrapped with `+f+`] */ -`)}i(r,"insertWrapDetails");function o(a){return at(a)||Jc(a)||!!(gg&&a&&a[gg])}i(o,"isFlattenable");function c(a,f){var m=typeof a;return f=f??Qe,!!f&&(m=="number"||m!="symbol"&&La.test(a))&&a>-1&&a%1==0&&a0){if(++f>=Ee)return arguments[0]}else f=0;return a.apply(e,arguments)}}i(Dt,"shortOut");function hr(a,f){var m=-1,x=a.length,T=x-1;for(f=f===e?x:f;++m1?a[f-1]:e;return m=typeof m=="function"?(a.pop(),m):e,VE(a,m)});function qE(a){var f=P(a);return f.__chain__=!0,f}i(qE,"chain");function yR(a,f){return f(a),a}i(yR,"tap");function nv(a,f){return f(a)}i(nv,"thru");var wR=Qo(function(a){var f=a.length,m=f?a[0]:0,x=this.__wrapped__,T=i(function(A){return ru(A,a)},"interceptor");return f>1||this.__actions__.length||!(x instanceof $e)||!c(m)?this.thru(T):(x=x.slice(m,+m+(f?1:0)),x.__actions__.push({func:nv,args:[T],thisArg:e}),new Lt(x,this.__chain__).thru(function(A){return f&&!A.length&&A.push(e),A}))});function SR(){return qE(this)}i(SR,"wrapperChain");function xR(){return new Lt(this.value(),this.__chain__)}i(xR,"wrapperCommit");function CR(){this.__values__===e&&(this.__values__=ob(this.value()));var a=this.__index__>=this.__values__.length,f=a?e:this.__values__[this.__index__++];return{done:a,value:f}}i(CR,"wrapperNext");function _R(){return this}i(_R,"wrapperToIterator");function ER(a){for(var f,m=this;m instanceof yn;){var x=Pn(m);x.__index__=0,x.__values__=e,f?T.__wrapped__=x:f=x;var T=x;m=m.__wrapped__}return T.__wrapped__=a,f}i(ER,"wrapperPlant");function bR(){var a=this.__wrapped__;if(a instanceof $e){var f=a;return this.__actions__.length&&(f=new $e(this)),f=f.reverse(),f.__actions__.push({func:nv,args:[zw],thisArg:e}),new Lt(f,this.__chain__)}return this.thru(zw)}i(bR,"wrapperReverse");function TR(){return zc(this.__wrapped__,this.__actions__)}i(TR,"wrapperValue");var kR=pu(function(a,f,m){kt.call(a,m)?++a[m]:bs(a,m,1)});function NR(a,f,m){var x=at(a)?wc:Tw;return m&&u(a,f,m)&&(f=e),x(a,Ue(f,3))}i(NR,"every");function PR(a,f){var m=at(a)?jt:Xa;return m(a,Ue(f,3))}i(PR,"filter");var AR=bh(Zo),LR=bh(ma);function MR(a,f){return Br(iv(a,f),1)}i(MR,"flatMap");function OR(a,f){return Br(iv(a,f),je)}i(OR,"flatMapDeep");function RR(a,f,m){return m=m===e?1:ct(m),Br(iv(a,f),m)}i(RR,"flatMapDepth");function jE(a,f){var m=at(a)?Zn:So;return m(a,Ue(f,3))}i(jE,"forEach");function KE(a,f){var m=at(a)?Xf:dh;return m(a,Ue(f,3))}i(KE,"forEachRight");var DR=pu(function(a,f,m){kt.call(a,m)?a[m].push(f):bs(a,m,[f])});function IR(a,f,m,x){a=Ui(a)?a:Pd(a),m=m&&!x?ct(m):0;var T=a.length;return m<0&&(m=er(T+m,0)),uv(a)?m<=T&&a.indexOf(f,m)>-1:!!T&&Kt(a,f,m)>-1}i(IR,"includes");var FR=ut(function(a,f,m){var x=-1,T=typeof f=="function",A=Ui(a)?J(a.length):[];return So(a,function(B){A[++x]=T?Zr(f,B,m):su(B,f,m)}),A}),HR=pu(function(a,f,m){bs(a,m,f)});function iv(a,f){var m=at(a)?$t:gh;return m(a,Ue(f,3))}i(iv,"map");function BR(a,f,m,x){return a==null?[]:(at(f)||(f=f==null?[]:[f]),m=x?e:m,at(m)||(m=m==null?[]:[m]),Hg(a,f,m))}i(BR,"orderBy");var zR=pu(function(a,f,m){a[m?0:1].push(f)},function(){return[[],[]]});function WR(a,f,m){var x=at(a)?Sc:ed,T=arguments.length<3;return x(a,Ue(f,4),m,T,So)}i(WR,"reduce");function UR(a,f,m){var x=at(a)?Qf:ed,T=arguments.length<3;return x(a,Ue(f,4),m,T,dh)}i(UR,"reduceRight");function $R(a,f){var m=at(a)?jt:Xa;return m(a,av(Ue(f,3)))}i($R,"reject");function VR(a){var f=at(a)?lh:Wg;return f(a)}i(VR,"sample");function qR(a,f,m){(m?u(a,f,m):f===e)?f=1:f=ct(f);var x=at(a)?Ew:Ug;return x(a,f)}i(qR,"sampleSize");function jR(a){var f=at(a)?uh:Aw;return f(a)}i(jR,"shuffle");function KR(a){if(a==null)return 0;if(Ui(a))return uv(a)?gn(a):a.length;var f=Wr(a);return f==st||f==Sr?a.size:Ja(a).length}i(KR,"size");function GR(a,f,m){var x=at(a)?Qs:Hc;return m&&u(a,f,m)&&(f=e),x(a,Ue(f,3))}i(GR,"some");var YR=ut(function(a,f){if(a==null)return[];var m=f.length;return m>1&&u(a,f[0],f[1])?f=[]:m>2&&u(f[0],f[1],f[2])&&(f=[f[0]]),Hg(a,Br(f,1),[])}),ov=Jl||function(){return Rt.Date.now()};function XR(a,f){if(typeof f!="function")throw new Hi(l);return a=ct(a),function(){if(--a<1)return f.apply(this,arguments)}}i(XR,"after");function GE(a,f,m){return f=m?e:f,f=a&&f==null?a.length:f,wt(a,te,e,e,e,e,f)}i(GE,"ary");function YE(a,f){var m;if(typeof f!="function")throw new Hi(l);return a=ct(a),function(){return--a>0&&(m=f.apply(this,arguments)),a<=1&&(f=e),m}}i(YE,"before");var Uw=ut(function(a,f,m){var x=j;if(m.length){var T=kn(m,vu(Uw));x|=D}return wt(a,x,f,m,T)}),XE=ut(function(a,f,m){var x=j|Y;if(m.length){var T=kn(m,vu(XE));x|=D}return wt(f,x,a,m,T)});function QE(a,f,m){f=m?e:f;var x=wt(a,F,e,e,e,e,e,f);return x.placeholder=QE.placeholder,x}i(QE,"curry");function JE(a,f,m){f=m?e:f;var x=wt(a,L,e,e,e,e,e,f);return x.placeholder=JE.placeholder,x}i(JE,"curryRight");function ZE(a,f,m){var x,T,A,B,$,Q,le=0,ue=!1,fe=!1,Ne=!0;if(typeof a!="function")throw new Hi(l);f=ts(f)||0,Er(m)&&(ue=!!m.leading,fe="maxWait"in m,A=fe?er(ts(m.maxWait)||0,f):A,Ne="trailing"in m?!!m.trailing:Ne);function Be(Vr){var Ps=x,ol=T;return x=T=e,le=Vr,B=a.apply(ol,Ps),B}i(Be,"invokeFunc");function Ke(Vr){return le=Vr,$=Ie(ht,f),ue?Be(Vr):B}i(Ke,"leadingEdge");function dt(Vr){var Ps=Vr-Q,ol=Vr-le,yb=f-Ps;return fe?Ar(yb,A-ol):yb}i(dt,"remainingWait");function Ge(Vr){var Ps=Vr-Q,ol=Vr-le;return Q===e||Ps>=f||Ps<0||fe&&ol>=A}i(Ge,"shouldInvoke");function ht(){var Vr=ov();if(Ge(Vr))return St(Vr);$=Ie(ht,dt(Vr))}i(ht,"timerExpired");function St(Vr){return $=e,Ne&&x?Be(Vr):(x=T=e,B)}i(St,"trailingEdge");function Eo(){$!==e&&qg($),le=0,x=Q=T=$=e}i(Eo,"cancel");function Ci(){return $===e?B:St(ov())}i(Ci,"flush");function bo(){var Vr=ov(),Ps=Ge(Vr);if(x=arguments,T=this,Q=Vr,Ps){if($===e)return Ke(Q);if(fe)return qg($),$=Ie(ht,f),Be(Q)}return $===e&&($=Ie(ht,f)),B}return i(bo,"debounced"),bo.cancel=Eo,bo.flush=Ci,bo}i(ZE,"debounce");var QR=ut(function(a,f){return kg(a,1,f)}),JR=ut(function(a,f,m){return kg(a,ts(f)||0,m)});function ZR(a){return wt(a,oe)}i(ZR,"flip");function sv(a,f){if(typeof a!="function"||f!=null&&typeof f!="function")throw new Hi(l);var m=i(function(){var x=arguments,T=f?f.apply(this,x):x[0],A=m.cache;if(A.has(T))return A.get(T);var B=a.apply(this,x);return m.cache=A.set(T,B)||A,B},"memoized");return m.cache=new(sv.Cache||yo),m}i(sv,"memoize"),sv.Cache=yo;function av(a){if(typeof a!="function")throw new Hi(l);return function(){var f=arguments;switch(f.length){case 0:return!a.call(this);case 1:return!a.call(this,f[0]);case 2:return!a.call(this,f[0],f[1]);case 3:return!a.call(this,f[0],f[1],f[2])}return!a.apply(this,f)}}i(av,"negate");function eD(a){return YE(2,a)}i(eD,"once");var tD=$c(function(a,f){f=f.length==1&&at(f[0])?$t(f[0],mn(Ue())):$t(Br(f,1),mn(Ue()));var m=f.length;return ut(function(x){for(var T=-1,A=Ar(x.length,m);++T=f}),Jc=hh(function(){return arguments}())?hh:function(a){return Mr(a)&&kt.call(a,"callee")&&!od.call(a,"callee")},at=J.isArray,gD=Xs?mn(Xs):au;function Ui(a){return a!=null&&lv(a.length)&&!nl(a)}i(Ui,"isArrayLike");function $r(a){return Mr(a)&&Ui(a)}i($r,"isArrayLikeObject");function vD(a){return a===!0||a===!1||Mr(a)&&tn(a)==Gt}i(vD,"isBoolean");var Su=pw||e1,yD=vi?mn(vi):Mg;function wD(a){return Mr(a)&&a.nodeType===1&&!Lh(a)}i(wD,"isElement");function SD(a){if(a==null)return!0;if(Ui(a)&&(at(a)||typeof a=="string"||typeof a.splice=="function"||Su(a)||Nd(a)||Jc(a)))return!a.length;var f=Wr(a);if(f==st||f==Sr)return!a.size;if(E(a))return!Ja(a).length;for(var m in a)if(kt.call(a,m))return!1;return!0}i(SD,"isEmpty");function xD(a,f){return ua(a,f)}i(xD,"isEqual");function CD(a,f,m){m=typeof m=="function"?m:e;var x=m?m(a,f):e;return x===e?ua(a,f,e,m):!!x}i(CD,"isEqualWith");function Vw(a){if(!Mr(a))return!1;var f=tn(a);return f==We||f==se||typeof a.message=="string"&&typeof a.name=="string"&&!Lh(a)}i(Vw,"isError");function _D(a){return typeof a=="number"&&vg(a)}i(_D,"isFinite");function nl(a){if(!Er(a))return!1;var f=tn(a);return f==Yr||f==Zt||f==wr||f==Bo}i(nl,"isFunction");function tb(a){return typeof a=="number"&&a==ct(a)}i(tb,"isInteger");function lv(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=Qe}i(lv,"isLength");function Er(a){var f=typeof a;return a!=null&&(f=="object"||f=="function")}i(Er,"isObject");function Mr(a){return a!=null&&typeof a=="object"}i(Mr,"isObjectLike");var rb=Ze?mn(Ze):Ic;function ED(a,f){return a===f||mh(a,f,bt(f))}i(ED,"isMatch");function bD(a,f,m){return m=typeof m=="function"?m:e,mh(a,f,bt(f),m)}i(bD,"isMatchWith");function TD(a){return nb(a)&&a!=+a}i(TD,"isNaN");function kD(a){if(_(a))throw new Je(s);return Qa(a)}i(kD,"isNative");function ND(a){return a===null}i(ND,"isNull");function PD(a){return a==null}i(PD,"isNil");function nb(a){return typeof a=="number"||Mr(a)&&tn(a)==Fe}i(nb,"isNumber");function Lh(a){if(!Mr(a)||tn(a)!=bn)return!1;var f=ra(a);if(f===null)return!0;var m=kt.call(f,"constructor")&&f.constructor;return typeof m=="function"&&m instanceof m&&Xl.call(m)==Wa}i(Lh,"isPlainObject");var qw=Hl?mn(Hl):Rg;function AD(a){return tb(a)&&a>=-Qe&&a<=Qe}i(AD,"isSafeInteger");var ib=hn?mn(hn):Dg;function uv(a){return typeof a=="string"||!at(a)&&Mr(a)&&tn(a)==dr}i(uv,"isString");function _o(a){return typeof a=="symbol"||Mr(a)&&tn(a)==pt}i(_o,"isSymbol");var Nd=Bl?mn(Bl):Ig;function LD(a){return a===e}i(LD,"isUndefined");function MD(a){return Mr(a)&&Wr(a)==Hn}i(MD,"isWeakMap");function OD(a){return Mr(a)&&tn(a)==Mi}i(OD,"isWeakSet");var RD=jc(Za),DD=jc(function(a,f){return a<=f});function ob(a){if(!a)return[];if(Ui(a))return uv(a)?Xt(a):ei(a);if($a&&a[$a])return Qp(a[$a]());var f=Wr(a),m=f==st?Kl:f==Sr?w:Pd;return m(a)}i(ob,"toArray");function il(a){if(!a)return a===0?a:0;if(a=ts(a),a===je||a===-je){var f=a<0?-1:1;return f*ot}return a===a?a:0}i(il,"toFinite");function ct(a){var f=il(a),m=f%1;return f===f?m?f-m:f:0}i(ct,"toInteger");function sb(a){return a?Ts(ct(a),0,Pt):0}i(sb,"toLength");function ts(a){if(typeof a=="number")return a;if(_o(a))return It;if(Er(a)){var f=typeof a.valueOf=="function"?a.valueOf():a;a=Er(f)?f+"":f}if(typeof a!="string")return a===0?a:+a;a=Vl(a);var m=vs.test(a);return m||Up.test(a)?ve(a.slice(2),m?2:8):ac.test(a)?It:+a}i(ts,"toNumber");function ab(a){return Co(a,$i(a))}i(ab,"toPlainObject");function ID(a){return a?Ts(ct(a),-Qe,Qe):a===0?a:0}i(ID,"toSafeInteger");function zt(a){return a==null?"":Si(a)}i(zt,"toString");var FD=Xo(function(a,f){if(E(f)||Ui(f)){Co(f,Ln(f),a);return}for(var m in f)kt.call(f,m)&&eu(a,m,f[m])}),lb=Xo(function(a,f){Co(f,$i(f),a)}),cv=Xo(function(a,f,m,x){Co(f,$i(f),a,x)}),HD=Xo(function(a,f,m,x){Co(f,Ln(f),a,x)}),BD=Qo(ru);function zD(a,f){var m=Zl(a);return f==null?m:ch(m,f)}i(zD,"create");var WD=ut(function(a,f){a=Bt(a);var m=-1,x=f.length,T=x>2?f[2]:e;for(T&&u(f[0],f[1],T)&&(x=1);++m1),A}),Co(a,Td(a),m),x&&(m=wi(m,b|k|R,Gc));for(var T=f.length;T--;)vd(m,f[T]);return m});function o2(a,f){return cb(a,av(Ue(f)))}i(o2,"omitBy");var s2=Qo(function(a,f){return a==null?{}:Bg(a,f)});function cb(a,f){if(a==null)return{};var m=$t(Td(a),function(x){return[x]});return f=Ue(f),zg(a,m,function(x,T){return f(x,T[0])})}i(cb,"pickBy");function a2(a,f,m){f=fa(f,a);var x=-1,T=f.length;for(T||(T=1,a=e);++xf){var x=a;a=f,f=x}if(m||a%1||f%1){var T=ih();return Ar(a+T*(f-a+Fl("1e-"+((T+"").length-1))),f)}return gd(a,f)}i(v2,"random");var y2=mu(function(a,f,m){return f=f.toLowerCase(),a+(m?pb(f):f)});function pb(a){return Gw(zt(a).toLowerCase())}i(pb,"capitalize");function hb(a){return a=zt(a),a&&a.replace(lc,Tc).replace(Vp,"")}i(hb,"deburr");function w2(a,f,m){a=zt(a),f=Si(f);var x=a.length;m=m===e?x:Ts(ct(m),0,x);var T=m;return m-=f.length,m>=0&&a.slice(m,T)==f}i(w2,"endsWith");function S2(a){return a=zt(a),a&&Na.test(a)?a.replace(Mt,Fi):a}i(S2,"escape");function x2(a){return a=zt(a),a&&nc.test(a)?a.replace(Aa,"\\$&"):a}i(x2,"escapeRegExp");var C2=mu(function(a,f,m){return a+(m?"-":"")+f.toLowerCase()}),_2=mu(function(a,f,m){return a+(m?" ":"")+f.toLowerCase()}),E2=Yg("toLowerCase");function b2(a,f,m){a=zt(a),f=ct(f);var x=f?gn(a):0;if(!f||x>=f)return a;var T=(f-x)/2;return Cd(Va(T),m)+a+Cd(Pc(T),m)}i(b2,"pad");function T2(a,f,m){a=zt(a),f=ct(f);var x=f?gn(a):0;return f&&x>>0,m?(a=zt(a),a&&(typeof f=="string"||f!=null&&!qw(f))&&(f=Si(f),!f&&xs(a))?ks(Xt(a),0,m):a.split(f,m)):[]}i(M2,"split");var O2=mu(function(a,f,m){return a+(m?" ":"")+Gw(f)});function R2(a,f,m){return a=zt(a),m=m==null?0:Ts(ct(m),0,a.length),f=Si(f),a.slice(m,m+f.length)==f}i(R2,"startsWith");function D2(a,f,m){var x=P.templateSettings;m&&u(a,f,m)&&(f=e),a=zt(a),f=cv({},f,x,Zg);var T=cv({},f.imports,x.imports,Zg),A=Ln(T),B=bc(T,A),$,Q,le=0,ue=f.interpolate||ao,fe="__p += '",Ne=Nc((f.escape||ao).source+"|"+ue.source+"|"+(ue===Nr?Nl:ao).source+"|"+(f.evaluate||ao).source+"|$","g"),Be="//# sourceURL="+(kt.call(f,"sourceURL")?(f.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Kp+"]")+` +`)}i(r,"insertWrapDetails");function o(a){return at(a)||Jc(a)||!!(gg&&a&&a[gg])}i(o,"isFlattenable");function c(a,f){var m=typeof a;return f=f??Qe,!!f&&(m=="number"||m!="symbol"&&La.test(a))&&a>-1&&a%1==0&&a0){if(++f>=Ee)return arguments[0]}else f=0;return a.apply(e,arguments)}}i(Dt,"shortOut");function hr(a,f){var m=-1,x=a.length,T=x-1;for(f=f===e?x:f;++m1?a[f-1]:e;return m=typeof m=="function"?(a.pop(),m):e,$E(a,m)});function VE(a){var f=A(a);return f.__chain__=!0,f}i(VE,"chain");function gR(a,f){return f(a),a}i(gR,"tap");function nv(a,f){return f(a)}i(nv,"thru");var vR=Qo(function(a){var f=a.length,m=f?a[0]:0,x=this.__wrapped__,T=i(function(P){return ru(P,a)},"interceptor");return f>1||this.__actions__.length||!(x instanceof $e)||!c(m)?this.thru(T):(x=x.slice(m,+m+(f?1:0)),x.__actions__.push({func:nv,args:[T],thisArg:e}),new Lt(x,this.__chain__).thru(function(P){return f&&!P.length&&P.push(e),P}))});function yR(){return VE(this)}i(yR,"wrapperChain");function wR(){return new Lt(this.value(),this.__chain__)}i(wR,"wrapperCommit");function SR(){this.__values__===e&&(this.__values__=ib(this.value()));var a=this.__index__>=this.__values__.length,f=a?e:this.__values__[this.__index__++];return{done:a,value:f}}i(SR,"wrapperNext");function xR(){return this}i(xR,"wrapperToIterator");function CR(a){for(var f,m=this;m instanceof yn;){var x=An(m);x.__index__=0,x.__values__=e,f?T.__wrapped__=x:f=x;var T=x;m=m.__wrapped__}return T.__wrapped__=a,f}i(CR,"wrapperPlant");function _R(){var a=this.__wrapped__;if(a instanceof $e){var f=a;return this.__actions__.length&&(f=new $e(this)),f=f.reverse(),f.__actions__.push({func:nv,args:[zw],thisArg:e}),new Lt(f,this.__chain__)}return this.thru(zw)}i(_R,"wrapperReverse");function ER(){return zc(this.__wrapped__,this.__actions__)}i(ER,"wrapperValue");var bR=pu(function(a,f,m){kt.call(a,m)?++a[m]:bs(a,m,1)});function TR(a,f,m){var x=at(a)?wc:Tw;return m&&u(a,f,m)&&(f=e),x(a,Ue(f,3))}i(TR,"every");function kR(a,f){var m=at(a)?jt:Xa;return m(a,Ue(f,3))}i(kR,"filter");var NR=bh(Zo),AR=bh(ma);function PR(a,f){return Br(iv(a,f),1)}i(PR,"flatMap");function LR(a,f){return Br(iv(a,f),je)}i(LR,"flatMapDeep");function MR(a,f,m){return m=m===e?1:ct(m),Br(iv(a,f),m)}i(MR,"flatMapDepth");function qE(a,f){var m=at(a)?Zn:So;return m(a,Ue(f,3))}i(qE,"forEach");function jE(a,f){var m=at(a)?Xf:dh;return m(a,Ue(f,3))}i(jE,"forEachRight");var OR=pu(function(a,f,m){kt.call(a,m)?a[m].push(f):bs(a,m,[f])});function RR(a,f,m,x){a=Ui(a)?a:Ad(a),m=m&&!x?ct(m):0;var T=a.length;return m<0&&(m=tr(T+m,0)),uv(a)?m<=T&&a.indexOf(f,m)>-1:!!T&&Kt(a,f,m)>-1}i(RR,"includes");var DR=ut(function(a,f,m){var x=-1,T=typeof f=="function",P=Ui(a)?J(a.length):[];return So(a,function(B){P[++x]=T?Zr(f,B,m):su(B,f,m)}),P}),IR=pu(function(a,f,m){bs(a,m,f)});function iv(a,f){var m=at(a)?$t:gh;return m(a,Ue(f,3))}i(iv,"map");function FR(a,f,m,x){return a==null?[]:(at(f)||(f=f==null?[]:[f]),m=x?e:m,at(m)||(m=m==null?[]:[m]),Hg(a,f,m))}i(FR,"orderBy");var HR=pu(function(a,f,m){a[m?0:1].push(f)},function(){return[[],[]]});function BR(a,f,m){var x=at(a)?Sc:ed,T=arguments.length<3;return x(a,Ue(f,4),m,T,So)}i(BR,"reduce");function zR(a,f,m){var x=at(a)?Qf:ed,T=arguments.length<3;return x(a,Ue(f,4),m,T,dh)}i(zR,"reduceRight");function WR(a,f){var m=at(a)?jt:Xa;return m(a,av(Ue(f,3)))}i(WR,"reject");function UR(a){var f=at(a)?lh:Wg;return f(a)}i(UR,"sample");function $R(a,f,m){(m?u(a,f,m):f===e)?f=1:f=ct(f);var x=at(a)?Ew:Ug;return x(a,f)}i($R,"sampleSize");function VR(a){var f=at(a)?uh:Pw;return f(a)}i(VR,"shuffle");function qR(a){if(a==null)return 0;if(Ui(a))return uv(a)?gn(a):a.length;var f=Wr(a);return f==st||f==Sr?a.size:Ja(a).length}i(qR,"size");function jR(a,f,m){var x=at(a)?Qs:Hc;return m&&u(a,f,m)&&(f=e),x(a,Ue(f,3))}i(jR,"some");var KR=ut(function(a,f){if(a==null)return[];var m=f.length;return m>1&&u(a,f[0],f[1])?f=[]:m>2&&u(f[0],f[1],f[2])&&(f=[f[0]]),Hg(a,Br(f,1),[])}),ov=Jl||function(){return Rt.Date.now()};function GR(a,f){if(typeof f!="function")throw new Hi(l);return a=ct(a),function(){if(--a<1)return f.apply(this,arguments)}}i(GR,"after");function KE(a,f,m){return f=m?e:f,f=a&&f==null?a.length:f,wt(a,te,e,e,e,e,f)}i(KE,"ary");function GE(a,f){var m;if(typeof f!="function")throw new Hi(l);return a=ct(a),function(){return--a>0&&(m=f.apply(this,arguments)),a<=1&&(f=e),m}}i(GE,"before");var Uw=ut(function(a,f,m){var x=j;if(m.length){var T=kn(m,vu(Uw));x|=D}return wt(a,x,f,m,T)}),YE=ut(function(a,f,m){var x=j|Y;if(m.length){var T=kn(m,vu(YE));x|=D}return wt(f,x,a,m,T)});function XE(a,f,m){f=m?e:f;var x=wt(a,F,e,e,e,e,e,f);return x.placeholder=XE.placeholder,x}i(XE,"curry");function QE(a,f,m){f=m?e:f;var x=wt(a,L,e,e,e,e,e,f);return x.placeholder=QE.placeholder,x}i(QE,"curryRight");function JE(a,f,m){var x,T,P,B,$,Q,le=0,ue=!1,fe=!1,Ne=!0;if(typeof a!="function")throw new Hi(l);f=ts(f)||0,Er(m)&&(ue=!!m.leading,fe="maxWait"in m,P=fe?tr(ts(m.maxWait)||0,f):P,Ne="trailing"in m?!!m.trailing:Ne);function Be(Vr){var As=x,ol=T;return x=T=e,le=Vr,B=a.apply(ol,As),B}i(Be,"invokeFunc");function Ke(Vr){return le=Vr,$=Ie(ht,f),ue?Be(Vr):B}i(Ke,"leadingEdge");function dt(Vr){var As=Vr-Q,ol=Vr-le,vb=f-As;return fe?Pr(vb,P-ol):vb}i(dt,"remainingWait");function Ge(Vr){var As=Vr-Q,ol=Vr-le;return Q===e||As>=f||As<0||fe&&ol>=P}i(Ge,"shouldInvoke");function ht(){var Vr=ov();if(Ge(Vr))return St(Vr);$=Ie(ht,dt(Vr))}i(ht,"timerExpired");function St(Vr){return $=e,Ne&&x?Be(Vr):(x=T=e,B)}i(St,"trailingEdge");function Eo(){$!==e&&qg($),le=0,x=Q=T=$=e}i(Eo,"cancel");function Ci(){return $===e?B:St(ov())}i(Ci,"flush");function bo(){var Vr=ov(),As=Ge(Vr);if(x=arguments,T=this,Q=Vr,As){if($===e)return Ke(Q);if(fe)return qg($),$=Ie(ht,f),Be(Q)}return $===e&&($=Ie(ht,f)),B}return i(bo,"debounced"),bo.cancel=Eo,bo.flush=Ci,bo}i(JE,"debounce");var YR=ut(function(a,f){return kg(a,1,f)}),XR=ut(function(a,f,m){return kg(a,ts(f)||0,m)});function QR(a){return wt(a,oe)}i(QR,"flip");function sv(a,f){if(typeof a!="function"||f!=null&&typeof f!="function")throw new Hi(l);var m=i(function(){var x=arguments,T=f?f.apply(this,x):x[0],P=m.cache;if(P.has(T))return P.get(T);var B=a.apply(this,x);return m.cache=P.set(T,B)||P,B},"memoized");return m.cache=new(sv.Cache||yo),m}i(sv,"memoize"),sv.Cache=yo;function av(a){if(typeof a!="function")throw new Hi(l);return function(){var f=arguments;switch(f.length){case 0:return!a.call(this);case 1:return!a.call(this,f[0]);case 2:return!a.call(this,f[0],f[1]);case 3:return!a.call(this,f[0],f[1],f[2])}return!a.apply(this,f)}}i(av,"negate");function JR(a){return GE(2,a)}i(JR,"once");var ZR=$c(function(a,f){f=f.length==1&&at(f[0])?$t(f[0],mn(Ue())):$t(Br(f,1),mn(Ue()));var m=f.length;return ut(function(x){for(var T=-1,P=Pr(x.length,m);++T=f}),Jc=hh(function(){return arguments}())?hh:function(a){return Mr(a)&&kt.call(a,"callee")&&!od.call(a,"callee")},at=J.isArray,hD=Xs?mn(Xs):au;function Ui(a){return a!=null&&lv(a.length)&&!nl(a)}i(Ui,"isArrayLike");function $r(a){return Mr(a)&&Ui(a)}i($r,"isArrayLikeObject");function mD(a){return a===!0||a===!1||Mr(a)&&tn(a)==Yt}i(mD,"isBoolean");var Su=pw||e1,gD=vi?mn(vi):Mg;function vD(a){return Mr(a)&&a.nodeType===1&&!Lh(a)}i(vD,"isElement");function yD(a){if(a==null)return!0;if(Ui(a)&&(at(a)||typeof a=="string"||typeof a.splice=="function"||Su(a)||Nd(a)||Jc(a)))return!a.length;var f=Wr(a);if(f==st||f==Sr)return!a.size;if(E(a))return!Ja(a).length;for(var m in a)if(kt.call(a,m))return!1;return!0}i(yD,"isEmpty");function wD(a,f){return ua(a,f)}i(wD,"isEqual");function SD(a,f,m){m=typeof m=="function"?m:e;var x=m?m(a,f):e;return x===e?ua(a,f,e,m):!!x}i(SD,"isEqualWith");function Vw(a){if(!Mr(a))return!1;var f=tn(a);return f==We||f==se||typeof a.message=="string"&&typeof a.name=="string"&&!Lh(a)}i(Vw,"isError");function xD(a){return typeof a=="number"&&vg(a)}i(xD,"isFinite");function nl(a){if(!Er(a))return!1;var f=tn(a);return f==Yr||f==er||f==wr||f==Bo}i(nl,"isFunction");function eb(a){return typeof a=="number"&&a==ct(a)}i(eb,"isInteger");function lv(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=Qe}i(lv,"isLength");function Er(a){var f=typeof a;return a!=null&&(f=="object"||f=="function")}i(Er,"isObject");function Mr(a){return a!=null&&typeof a=="object"}i(Mr,"isObjectLike");var tb=Ze?mn(Ze):Ic;function CD(a,f){return a===f||mh(a,f,bt(f))}i(CD,"isMatch");function _D(a,f,m){return m=typeof m=="function"?m:e,mh(a,f,bt(f),m)}i(_D,"isMatchWith");function ED(a){return rb(a)&&a!=+a}i(ED,"isNaN");function bD(a){if(_(a))throw new Je(s);return Qa(a)}i(bD,"isNative");function TD(a){return a===null}i(TD,"isNull");function kD(a){return a==null}i(kD,"isNil");function rb(a){return typeof a=="number"||Mr(a)&&tn(a)==Fe}i(rb,"isNumber");function Lh(a){if(!Mr(a)||tn(a)!=bn)return!1;var f=ra(a);if(f===null)return!0;var m=kt.call(f,"constructor")&&f.constructor;return typeof m=="function"&&m instanceof m&&Xl.call(m)==Wa}i(Lh,"isPlainObject");var qw=Hl?mn(Hl):Rg;function ND(a){return eb(a)&&a>=-Qe&&a<=Qe}i(ND,"isSafeInteger");var nb=hn?mn(hn):Dg;function uv(a){return typeof a=="string"||!at(a)&&Mr(a)&&tn(a)==dr}i(uv,"isString");function _o(a){return typeof a=="symbol"||Mr(a)&&tn(a)==pt}i(_o,"isSymbol");var Nd=Bl?mn(Bl):Ig;function AD(a){return a===e}i(AD,"isUndefined");function PD(a){return Mr(a)&&Wr(a)==Hn}i(PD,"isWeakMap");function LD(a){return Mr(a)&&tn(a)==Mi}i(LD,"isWeakSet");var MD=jc(Za),OD=jc(function(a,f){return a<=f});function ib(a){if(!a)return[];if(Ui(a))return uv(a)?Qt(a):ei(a);if($a&&a[$a])return Qp(a[$a]());var f=Wr(a),m=f==st?Kl:f==Sr?w:Ad;return m(a)}i(ib,"toArray");function il(a){if(!a)return a===0?a:0;if(a=ts(a),a===je||a===-je){var f=a<0?-1:1;return f*ot}return a===a?a:0}i(il,"toFinite");function ct(a){var f=il(a),m=f%1;return f===f?m?f-m:f:0}i(ct,"toInteger");function ob(a){return a?Ts(ct(a),0,At):0}i(ob,"toLength");function ts(a){if(typeof a=="number")return a;if(_o(a))return It;if(Er(a)){var f=typeof a.valueOf=="function"?a.valueOf():a;a=Er(f)?f+"":f}if(typeof a!="string")return a===0?a:+a;a=Vl(a);var m=vs.test(a);return m||Up.test(a)?ve(a.slice(2),m?2:8):ac.test(a)?It:+a}i(ts,"toNumber");function sb(a){return Co(a,$i(a))}i(sb,"toPlainObject");function RD(a){return a?Ts(ct(a),-Qe,Qe):a===0?a:0}i(RD,"toSafeInteger");function zt(a){return a==null?"":Si(a)}i(zt,"toString");var DD=Xo(function(a,f){if(E(f)||Ui(f)){Co(f,Ln(f),a);return}for(var m in f)kt.call(f,m)&&eu(a,m,f[m])}),ab=Xo(function(a,f){Co(f,$i(f),a)}),cv=Xo(function(a,f,m,x){Co(f,$i(f),a,x)}),ID=Xo(function(a,f,m,x){Co(f,Ln(f),a,x)}),FD=Qo(ru);function HD(a,f){var m=Zl(a);return f==null?m:ch(m,f)}i(HD,"create");var BD=ut(function(a,f){a=Bt(a);var m=-1,x=f.length,T=x>2?f[2]:e;for(T&&u(f[0],f[1],T)&&(x=1);++m1),P}),Co(a,Td(a),m),x&&(m=wi(m,b|k|R,Gc));for(var T=f.length;T--;)vd(m,f[T]);return m});function n2(a,f){return ub(a,av(Ue(f)))}i(n2,"omitBy");var i2=Qo(function(a,f){return a==null?{}:Bg(a,f)});function ub(a,f){if(a==null)return{};var m=$t(Td(a),function(x){return[x]});return f=Ue(f),zg(a,m,function(x,T){return f(x,T[0])})}i(ub,"pickBy");function o2(a,f,m){f=fa(f,a);var x=-1,T=f.length;for(T||(T=1,a=e);++xf){var x=a;a=f,f=x}if(m||a%1||f%1){var T=ih();return Pr(a+T*(f-a+Fl("1e-"+((T+"").length-1))),f)}return gd(a,f)}i(m2,"random");var g2=mu(function(a,f,m){return f=f.toLowerCase(),a+(m?db(f):f)});function db(a){return Gw(zt(a).toLowerCase())}i(db,"capitalize");function pb(a){return a=zt(a),a&&a.replace(lc,Tc).replace(Vp,"")}i(pb,"deburr");function v2(a,f,m){a=zt(a),f=Si(f);var x=a.length;m=m===e?x:Ts(ct(m),0,x);var T=m;return m-=f.length,m>=0&&a.slice(m,T)==f}i(v2,"endsWith");function y2(a){return a=zt(a),a&&Na.test(a)?a.replace(Mt,Fi):a}i(y2,"escape");function w2(a){return a=zt(a),a&&nc.test(a)?a.replace(Pa,"\\$&"):a}i(w2,"escapeRegExp");var S2=mu(function(a,f,m){return a+(m?"-":"")+f.toLowerCase()}),x2=mu(function(a,f,m){return a+(m?" ":"")+f.toLowerCase()}),C2=Yg("toLowerCase");function _2(a,f,m){a=zt(a),f=ct(f);var x=f?gn(a):0;if(!f||x>=f)return a;var T=(f-x)/2;return Cd(Va(T),m)+a+Cd(Ac(T),m)}i(_2,"pad");function E2(a,f,m){a=zt(a),f=ct(f);var x=f?gn(a):0;return f&&x>>0,m?(a=zt(a),a&&(typeof f=="string"||f!=null&&!qw(f))&&(f=Si(f),!f&&xs(a))?ks(Qt(a),0,m):a.split(f,m)):[]}i(P2,"split");var L2=mu(function(a,f,m){return a+(m?" ":"")+Gw(f)});function M2(a,f,m){return a=zt(a),m=m==null?0:Ts(ct(m),0,a.length),f=Si(f),a.slice(m,m+f.length)==f}i(M2,"startsWith");function O2(a,f,m){var x=A.templateSettings;m&&u(a,f,m)&&(f=e),a=zt(a),f=cv({},f,x,Zg);var T=cv({},f.imports,x.imports,Zg),P=Ln(T),B=bc(T,P),$,Q,le=0,ue=f.interpolate||ao,fe="__p += '",Ne=Nc((f.escape||ao).source+"|"+ue.source+"|"+(ue===Nr?Nl:ao).source+"|"+(f.evaluate||ao).source+"|$","g"),Be="//# sourceURL="+(kt.call(f,"sourceURL")?(f.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Kp+"]")+` `;a.replace(Ne,function(Ge,ht,St,Eo,Ci,bo){return St||(St=Eo),fe+=a.slice(le,bo).replace(qf,$o),ht&&($=!0,fe+=`' + __e(`+ht+`) + '`),Ci&&(Q=!0,fe+=`'; @@ -24,49 +24,49 @@ __p += '`),St&&(fe+=`' + function print() { __p += __j.call(arguments, '') } `:`; `)+fe+`return __p -}`;var dt=gb(function(){return yt(A,Be+"return "+fe).apply(e,B)});if(dt.source=fe,Vw(dt))throw dt;return dt}i(D2,"template");function I2(a){return zt(a).toLowerCase()}i(I2,"toLower");function F2(a){return zt(a).toUpperCase()}i(F2,"toUpper");function H2(a,f,m){if(a=zt(a),a&&(m||f===e))return Vl(a);if(!a||!(f=Si(f)))return a;var x=Xt(a),T=Xt(f),A=yi(x,T),B=ea(x,T)+1;return ks(x,A,B).join("")}i(H2,"trim");function B2(a,f,m){if(a=zt(a),a&&(m||f===e))return a.slice(0,Wn(a)+1);if(!a||!(f=Si(f)))return a;var x=Xt(a),T=ea(x,Xt(f))+1;return ks(x,0,T).join("")}i(B2,"trimEnd");function z2(a,f,m){if(a=zt(a),a&&(m||f===e))return a.replace(ic,"");if(!a||!(f=Si(f)))return a;var x=Xt(a),T=yi(x,Xt(f));return ks(x,T).join("")}i(z2,"trimStart");function W2(a,f){var m=he,x=Re;if(Er(f)){var T="separator"in f?f.separator:T;m="length"in f?ct(f.length):m,x="omission"in f?Si(f.omission):x}a=zt(a);var A=a.length;if(xs(a)){var B=Xt(a);A=B.length}if(m>=A)return a;var $=m-gn(x);if($<1)return x;var Q=B?ks(B,0,$).join(""):a.slice(0,$);if(T===e)return Q+x;if(B&&($+=Q.length-$),qw(T)){if(a.slice($).search(T)){var le,ue=Q;for(T.global||(T=Nc(T.source,zt(Vf.exec(T))+"g")),T.lastIndex=0;le=T.exec(ue);)var fe=le.index;Q=Q.slice(0,fe===e?$:fe)}}else if(a.indexOf(Si(T),$)!=$){var Ne=Q.lastIndexOf(T);Ne>-1&&(Q=Q.slice(0,Ne))}return Q+x}i(W2,"truncate");function U2(a){return a=zt(a),a&&At.test(a)?a.replace(Yt,fo):a}i(U2,"unescape");var $2=mu(function(a,f,m){return a+(m?" ":"")+f.toUpperCase()}),Gw=Yg("toUpperCase");function mb(a,f,m){return a=zt(a),f=m?e:f,f===e?td(a)?kc(a):Zf(a):a.match(f)||[]}i(mb,"words");var gb=ut(function(a,f){try{return Zr(a,e,f)}catch(m){return Vw(m)?m:new Je(m)}}),V2=Qo(function(a,f){return Zn(f,function(m){m=lr(m),bs(a,m,Uw(a[m],a))}),a});function q2(a){var f=a==null?0:a.length,m=Ue();return a=f?$t(a,function(x){if(typeof x[1]!="function")throw new Hi(l);return[m(x[0]),x[1]]}):[],ut(function(x){for(var T=-1;++TQe)return[];var m=Pt,x=Ar(a,Pt);f=Ue(f),a-=Pt;for(var T=Ec(x,f);++m0||f<0)?new $e(m):(a<0?m=m.takeRight(-a):a&&(m=m.drop(a)),f!==e&&(f=ct(f),m=f<0?m.dropRight(-f):m.take(f-a)),m)},$e.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},$e.prototype.toArray=function(){return this.take(Pt)},zi($e.prototype,function(a,f){var m=/^(?:filter|find|map|reject)|While$/.test(f),x=/^(?:head|last)$/.test(f),T=P[x?"take"+(f=="last"?"Right":""):f],A=x||/^find/.test(f);T&&(P.prototype[f]=function(){var B=this.__wrapped__,$=x?[1]:arguments,Q=B instanceof $e,le=$[0],ue=Q||at(B),fe=i(function(ht){var St=T.apply(P,Ii([ht],$));return x&&Ne?St[0]:St},"interceptor");ue&&m&&typeof le=="function"&&le.length!=1&&(Q=ue=!1);var Ne=this.__chain__,Be=!!this.__actions__.length,Ke=A&&!Ne,dt=Q&&!Be;if(!A&&ue){B=dt?B:new $e(this);var Ge=a.apply(B,$);return Ge.__actions__.push({func:nv,args:[fe],thisArg:e}),new Lt(Ge,Ne)}return Ke&&dt?a.apply(this,$):(Ge=this.thru(fe),Ke?x?Ge.value()[0]:Ge.value():Ge)})}),Zn(["pop","push","shift","sort","splice","unshift"],function(a){var f=rd[a],m=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",x=/^(?:pop|shift)$/.test(a);P.prototype[a]=function(){var T=arguments;if(x&&!this.__chain__){var A=this.value();return f.apply(at(A)?A:[],T)}return this[m](function(B){return f.apply(at(B)?B:[],T)})}}),zi($e.prototype,function(a,f){var m=P[f];if(m){var x=m.name+"";kt.call(ja,x)||(ja[x]=[]),ja[x].push({name:f,func:m})}}),ja[Sd(e,Y).name]=[{name:"wrapper",func:e}],$e.prototype.clone=Hr,$e.prototype.reverse=Oc,$e.prototype.value=vw,P.prototype.at=wR,P.prototype.chain=SR,P.prototype.commit=xR,P.prototype.next=CR,P.prototype.plant=ER,P.prototype.reverse=bR,P.prototype.toJSON=P.prototype.valueOf=P.prototype.value=TR,P.prototype.first=P.prototype.head,$a&&(P.prototype[$a]=_R),P},"runInContext"),vn=Yl();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Rt._=vn,define(function(){return vn})):Ys?((Ys.exports=vn)._=vn,Yf._=vn):Rt._=vn}).call(up)});var iA=rt(($x,Vx)=>{(function(e,t){typeof $x=="object"&&typeof Vx<"u"?Vx.exports=t():typeof define=="function"&&define.amd?define(t):e.stable=t()})($x,function(){"use strict";var e=i(function(s,l){return t(s.slice(),l)},"stable");e.inplace=function(s,l){var h=t(s,l);return h!==s&&n(h,null,s.length,s),s};function t(s,l){typeof l!="function"&&(l=i(function(b,k){return String(b).localeCompare(k)},"comp"));var h=s.length;if(h<=1)return s;for(var d=new Array(h),v=1;vv&&(R=v),I>v&&(I=v),z=k,j=R;;)if(z{(function(){"use strict";var e={}.hasOwnProperty;function t(){for(var l="",h=0;h{(function(e,t){typeof ZC=="object"&&typeof e_<"u"?e_.exports=t():typeof define=="function"&&define.amd?define(t):(e=e||self,e.CodeMirror=t())})(ZC,function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),s=/MSIE \d/.test(e),l=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),h=/Edge\/(\d+)/.exec(e),d=s||l||h,v=d&&(s?document.documentMode||6:+(h||l)[1]),S=!h&&/WebKit\//.test(e),b=S&&/Qt\/\d+\.\d+/.test(e),k=!h&&/Chrome\/(\d+)/.exec(e),R=k&&+k[1],I=/Opera\//.test(e),z=/Apple Computer/.test(navigator.vendor),j=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),Y=/PhantomJS/.test(e),ne=z&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),F=/Android/.test(e),L=ne||F||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),D=ne||/Mac/.test(t),q=/\bCrOS\b/.test(e),te=/win/i.test(t),Z=I&&e.match(/Version\/(\d*\.\d*)/);Z&&(Z=Number(Z[1])),Z&&Z>=15&&(I=!1,S=!0);var oe=D&&(b||I&&(Z==null||Z<12.11)),he=n||d&&v>=9;function Re(r){return new RegExp("(^|\\s)"+r+"(?:$|\\s)\\s*")}i(Re,"classTest");var Ee=i(function(r,o){var c=r.className,u=Re(o).exec(c);if(u){var p=c.slice(u.index+u[0].length);r.className=c.slice(0,u.index)+(p?u[1]+p:"")}},"rmClass");function Ye(r){for(var o=r.childNodes.length;o>0;--o)r.removeChild(r.firstChild);return r}i(Ye,"removeChildren");function tt(r,o){return Ye(r).appendChild(o)}i(tt,"removeChildrenAndAdd");function xe(r,o,c,u){var p=document.createElement(r);if(c&&(p.className=c),u&&(p.style.cssText=u),typeof o=="string")p.appendChild(document.createTextNode(o));else if(o)for(var g=0;g=o)return y+(o-g);y+=C-g,y+=c-y%c,g=C+1}}i(Ft,"countColumn");var se=i(function(){this.id=null,this.f=null,this.time=0,this.handler=wr(this.onTimeout,this)},"Delayed");se.prototype.onTimeout=function(r){r.id=0,r.time<=+new Date?r.f():setTimeout(r.handler,r.time-+new Date)},se.prototype.set=function(r,o){this.f=o;var c=+new Date+r;(!this.id||c=o)return u+Math.min(y,o-p);if(p+=g-u,p+=c-p%c,u=g+1,p>=o)return u}}i(bn,"findColumn");var no=[""];function Bo(r){for(;no.length<=r;)no.push(lt(no)+" ");return no[r]}i(Bo,"spaceStr");function lt(r){return r[r.length-1]}i(lt,"lst");function Sr(r,o){for(var c=[],u=0;u"\x80"&&(r.toUpperCase()!=r.toLowerCase()||Hn.test(r))}i(Mi,"isWordCharBasic");function Xr(r,o){return o?o.source.indexOf("\\w")>-1&&Mi(r)?!0:o.test(r):Mi(r)}i(Xr,"isWordChar");function Qr(r){for(var o in r)if(r.hasOwnProperty(o)&&r[o])return!1;return!0}i(Qr,"isEmpty");var oo=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function hi(r){return r.charCodeAt(0)>=768&&oo.test(r)}i(hi,"isExtendingChar");function Bn(r,o,c){for(;(c<0?o>0:oc?-1:1;;){if(o==c)return o;var p=(o+c)/2,g=u<0?Math.ceil(p):Math.floor(p);if(g==o)return r(g)?o:c;r(g)?c=g:o=g+u}}i(so,"findFirst");function bl(r,o,c,u){if(!r)return u(o,c,"ltr",0);for(var p=!1,g=0;go||o==c&&y.to==o)&&(u(Math.max(y.from,o),Math.min(y.to,c),y.level==1?"rtl":"ltr",g),p=!0)}p||u(o,c,"ltr")}i(bl,"iterateBidiSections");var X=null;function ee(r,o,c){var u;X=null;for(var p=0;po)return p;g.to==o&&(g.from!=g.to&&c=="before"?u=p:X=p),g.from==o&&(g.from!=g.to&&c!="before"?u=p:X=p)}return u??X}i(ee,"getBidiPartAt");var Ce=function(){var r="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",o="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function c(E){return E<=247?r.charAt(E):1424<=E&&E<=1524?"R":1536<=E&&E<=1785?o.charAt(E-1536):1774<=E&&E<=2220?"r":8192<=E&&E<=8203?"w":E==8204?"b":"L"}i(c,"charType");var u=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,p=/[stwN]/,g=/[LRr]/,y=/[Lb1n]/,C=/[1n]/;function _(E,O,H){this.level=E,this.from=O,this.to=H}return i(_,"BidiSpan"),function(E,O){var H=O=="ltr"?"L":"R";if(E.length==0||O=="ltr"&&!u.test(E))return!1;for(var K=E.length,V=[],re=0;re-1&&(u[o]=p.slice(0,g).concat(p.slice(g+1)))}}}i(Yt,"off");function Mt(r,o){var c=Jr(r,o);if(c.length)for(var u=Array.prototype.slice.call(arguments,2),p=0;p0}i(pn,"hasHandler");function zn(r){r.prototype.on=function(o,c){ze(this,o,c)},r.prototype.off=function(o,c){Yt(this,o,c)}}i(zn,"eventMixin");function Nr(r){r.preventDefault?r.preventDefault():r.returnValue=!1}i(Nr,"e_preventDefault");function gs(r){r.stopPropagation?r.stopPropagation():r.cancelBubble=!0}i(gs,"e_stopPropagation");function Tn(r){return r.defaultPrevented!=null?r.defaultPrevented:r.returnValue==!1}i(Tn,"e_defaultPrevented");function Pa(r){Nr(r),gs(r)}i(Pa,"e_stop");function Aa(r){return r.target||r.srcElement}i(Aa,"e_target");function nc(r){var o=r.which;return o==null&&(r.button&1?o=1:r.button&2?o=3:r.button&4&&(o=2)),D&&r.ctrlKey&&o==1&&(o=3),o}i(nc,"e_button");var ic=function(){if(d&&v<9)return!1;var r=xe("div");return"draggable"in r||"dragDrop"in r}(),oc;function $f(r){if(oc==null){var o=xe("span","\u200B");tt(r,xe("span",[o,document.createTextNode("x")])),r.firstChild.offsetHeight!=0&&(oc=o.offsetWidth<=1&&o.offsetHeight>2&&!(d&&v<8))}var c=oc?xe("span","\u200B"):xe("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return c.setAttribute("cm-text",""),c}i($f,"zeroWidthElement");var sc;function Hp(r){if(sc!=null)return sc;var o=tt(r,document.createTextNode("A\u062EA")),c=je(o,0,1).getBoundingClientRect(),u=je(o,1,2).getBoundingClientRect();return Ye(r),!c||c.left==c.right?!1:sc=u.right-c.right<3}i(Hp,"hasBadBidiRects");var kl=` +}`;var dt=mb(function(){return yt(P,Be+"return "+fe).apply(e,B)});if(dt.source=fe,Vw(dt))throw dt;return dt}i(O2,"template");function R2(a){return zt(a).toLowerCase()}i(R2,"toLower");function D2(a){return zt(a).toUpperCase()}i(D2,"toUpper");function I2(a,f,m){if(a=zt(a),a&&(m||f===e))return Vl(a);if(!a||!(f=Si(f)))return a;var x=Qt(a),T=Qt(f),P=yi(x,T),B=ea(x,T)+1;return ks(x,P,B).join("")}i(I2,"trim");function F2(a,f,m){if(a=zt(a),a&&(m||f===e))return a.slice(0,Wn(a)+1);if(!a||!(f=Si(f)))return a;var x=Qt(a),T=ea(x,Qt(f))+1;return ks(x,0,T).join("")}i(F2,"trimEnd");function H2(a,f,m){if(a=zt(a),a&&(m||f===e))return a.replace(ic,"");if(!a||!(f=Si(f)))return a;var x=Qt(a),T=yi(x,Qt(f));return ks(x,T).join("")}i(H2,"trimStart");function B2(a,f){var m=he,x=Re;if(Er(f)){var T="separator"in f?f.separator:T;m="length"in f?ct(f.length):m,x="omission"in f?Si(f.omission):x}a=zt(a);var P=a.length;if(xs(a)){var B=Qt(a);P=B.length}if(m>=P)return a;var $=m-gn(x);if($<1)return x;var Q=B?ks(B,0,$).join(""):a.slice(0,$);if(T===e)return Q+x;if(B&&($+=Q.length-$),qw(T)){if(a.slice($).search(T)){var le,ue=Q;for(T.global||(T=Nc(T.source,zt(Vf.exec(T))+"g")),T.lastIndex=0;le=T.exec(ue);)var fe=le.index;Q=Q.slice(0,fe===e?$:fe)}}else if(a.indexOf(Si(T),$)!=$){var Ne=Q.lastIndexOf(T);Ne>-1&&(Q=Q.slice(0,Ne))}return Q+x}i(B2,"truncate");function z2(a){return a=zt(a),a&&Pt.test(a)?a.replace(Xt,fo):a}i(z2,"unescape");var W2=mu(function(a,f,m){return a+(m?" ":"")+f.toUpperCase()}),Gw=Yg("toUpperCase");function hb(a,f,m){return a=zt(a),f=m?e:f,f===e?td(a)?kc(a):Zf(a):a.match(f)||[]}i(hb,"words");var mb=ut(function(a,f){try{return Zr(a,e,f)}catch(m){return Vw(m)?m:new Je(m)}}),U2=Qo(function(a,f){return Zn(f,function(m){m=lr(m),bs(a,m,Uw(a[m],a))}),a});function $2(a){var f=a==null?0:a.length,m=Ue();return a=f?$t(a,function(x){if(typeof x[1]!="function")throw new Hi(l);return[m(x[0]),x[1]]}):[],ut(function(x){for(var T=-1;++TQe)return[];var m=At,x=Pr(a,At);f=Ue(f),a-=At;for(var T=Ec(x,f);++m0||f<0)?new $e(m):(a<0?m=m.takeRight(-a):a&&(m=m.drop(a)),f!==e&&(f=ct(f),m=f<0?m.dropRight(-f):m.take(f-a)),m)},$e.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},$e.prototype.toArray=function(){return this.take(At)},zi($e.prototype,function(a,f){var m=/^(?:filter|find|map|reject)|While$/.test(f),x=/^(?:head|last)$/.test(f),T=A[x?"take"+(f=="last"?"Right":""):f],P=x||/^find/.test(f);T&&(A.prototype[f]=function(){var B=this.__wrapped__,$=x?[1]:arguments,Q=B instanceof $e,le=$[0],ue=Q||at(B),fe=i(function(ht){var St=T.apply(A,Ii([ht],$));return x&&Ne?St[0]:St},"interceptor");ue&&m&&typeof le=="function"&&le.length!=1&&(Q=ue=!1);var Ne=this.__chain__,Be=!!this.__actions__.length,Ke=P&&!Ne,dt=Q&&!Be;if(!P&&ue){B=dt?B:new $e(this);var Ge=a.apply(B,$);return Ge.__actions__.push({func:nv,args:[fe],thisArg:e}),new Lt(Ge,Ne)}return Ke&&dt?a.apply(this,$):(Ge=this.thru(fe),Ke?x?Ge.value()[0]:Ge.value():Ge)})}),Zn(["pop","push","shift","sort","splice","unshift"],function(a){var f=rd[a],m=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",x=/^(?:pop|shift)$/.test(a);A.prototype[a]=function(){var T=arguments;if(x&&!this.__chain__){var P=this.value();return f.apply(at(P)?P:[],T)}return this[m](function(B){return f.apply(at(B)?B:[],T)})}}),zi($e.prototype,function(a,f){var m=A[f];if(m){var x=m.name+"";kt.call(ja,x)||(ja[x]=[]),ja[x].push({name:f,func:m})}}),ja[Sd(e,Y).name]=[{name:"wrapper",func:e}],$e.prototype.clone=Hr,$e.prototype.reverse=Oc,$e.prototype.value=vw,A.prototype.at=vR,A.prototype.chain=yR,A.prototype.commit=wR,A.prototype.next=SR,A.prototype.plant=CR,A.prototype.reverse=_R,A.prototype.toJSON=A.prototype.valueOf=A.prototype.value=ER,A.prototype.first=A.prototype.head,$a&&(A.prototype[$a]=xR),A},"runInContext"),vn=Yl();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Rt._=vn,define(function(){return vn})):Ys?((Ys.exports=vn)._=vn,Yf._=vn):Rt._=vn}).call(up)});var nP=rt(($x,Vx)=>{(function(e,t){typeof $x=="object"&&typeof Vx<"u"?Vx.exports=t():typeof define=="function"&&define.amd?define(t):e.stable=t()})($x,function(){"use strict";var e=i(function(s,l){return t(s.slice(),l)},"stable");e.inplace=function(s,l){var h=t(s,l);return h!==s&&n(h,null,s.length,s),s};function t(s,l){typeof l!="function"&&(l=i(function(b,k){return String(b).localeCompare(k)},"comp"));var h=s.length;if(h<=1)return s;for(var d=new Array(h),v=1;vv&&(R=v),I>v&&(I=v),z=k,j=R;;)if(z{(function(){"use strict";var e={}.hasOwnProperty;function t(){for(var l="",h=0;h{(function(e,t){typeof JC=="object"&&typeof ZC<"u"?ZC.exports=t():typeof define=="function"&&define.amd?define(t):(e=e||self,e.CodeMirror=t())})(JC,function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),s=/MSIE \d/.test(e),l=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),h=/Edge\/(\d+)/.exec(e),d=s||l||h,v=d&&(s?document.documentMode||6:+(h||l)[1]),S=!h&&/WebKit\//.test(e),b=S&&/Qt\/\d+\.\d+/.test(e),k=!h&&/Chrome\/(\d+)/.exec(e),R=k&&+k[1],I=/Opera\//.test(e),z=/Apple Computer/.test(navigator.vendor),j=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),Y=/PhantomJS/.test(e),ne=z&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),F=/Android/.test(e),L=ne||F||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),D=ne||/Mac/.test(t),q=/\bCrOS\b/.test(e),te=/win/i.test(t),Z=I&&e.match(/Version\/(\d*\.\d*)/);Z&&(Z=Number(Z[1])),Z&&Z>=15&&(I=!1,S=!0);var oe=D&&(b||I&&(Z==null||Z<12.11)),he=n||d&&v>=9;function Re(r){return new RegExp("(^|\\s)"+r+"(?:$|\\s)\\s*")}i(Re,"classTest");var Ee=i(function(r,o){var c=r.className,u=Re(o).exec(c);if(u){var p=c.slice(u.index+u[0].length);r.className=c.slice(0,u.index)+(p?u[1]+p:"")}},"rmClass");function Ye(r){for(var o=r.childNodes.length;o>0;--o)r.removeChild(r.firstChild);return r}i(Ye,"removeChildren");function tt(r,o){return Ye(r).appendChild(o)}i(tt,"removeChildrenAndAdd");function xe(r,o,c,u){var p=document.createElement(r);if(c&&(p.className=c),u&&(p.style.cssText=u),typeof o=="string")p.appendChild(document.createTextNode(o));else if(o)for(var g=0;g=o)return y+(o-g);y+=C-g,y+=c-y%c,g=C+1}}i(Ft,"countColumn");var se=i(function(){this.id=null,this.f=null,this.time=0,this.handler=wr(this.onTimeout,this)},"Delayed");se.prototype.onTimeout=function(r){r.id=0,r.time<=+new Date?r.f():setTimeout(r.handler,r.time-+new Date)},se.prototype.set=function(r,o){this.f=o;var c=+new Date+r;(!this.id||c=o)return u+Math.min(y,o-p);if(p+=g-u,p+=c-p%c,u=g+1,p>=o)return u}}i(bn,"findColumn");var no=[""];function Bo(r){for(;no.length<=r;)no.push(lt(no)+" ");return no[r]}i(Bo,"spaceStr");function lt(r){return r[r.length-1]}i(lt,"lst");function Sr(r,o){for(var c=[],u=0;u"\x80"&&(r.toUpperCase()!=r.toLowerCase()||Hn.test(r))}i(Mi,"isWordCharBasic");function Xr(r,o){return o?o.source.indexOf("\\w")>-1&&Mi(r)?!0:o.test(r):Mi(r)}i(Xr,"isWordChar");function Qr(r){for(var o in r)if(r.hasOwnProperty(o)&&r[o])return!1;return!0}i(Qr,"isEmpty");var oo=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function hi(r){return r.charCodeAt(0)>=768&&oo.test(r)}i(hi,"isExtendingChar");function Bn(r,o,c){for(;(c<0?o>0:oc?-1:1;;){if(o==c)return o;var p=(o+c)/2,g=u<0?Math.ceil(p):Math.floor(p);if(g==o)return r(g)?o:c;r(g)?c=g:o=g+u}}i(so,"findFirst");function bl(r,o,c,u){if(!r)return u(o,c,"ltr",0);for(var p=!1,g=0;go||o==c&&y.to==o)&&(u(Math.max(y.from,o),Math.min(y.to,c),y.level==1?"rtl":"ltr",g),p=!0)}p||u(o,c,"ltr")}i(bl,"iterateBidiSections");var X=null;function ee(r,o,c){var u;X=null;for(var p=0;po)return p;g.to==o&&(g.from!=g.to&&c=="before"?u=p:X=p),g.from==o&&(g.from!=g.to&&c!="before"?u=p:X=p)}return u??X}i(ee,"getBidiPartAt");var Ce=function(){var r="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",o="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function c(E){return E<=247?r.charAt(E):1424<=E&&E<=1524?"R":1536<=E&&E<=1785?o.charAt(E-1536):1774<=E&&E<=2220?"r":8192<=E&&E<=8203?"w":E==8204?"b":"L"}i(c,"charType");var u=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,p=/[stwN]/,g=/[LRr]/,y=/[Lb1n]/,C=/[1n]/;function _(E,O,H){this.level=E,this.from=O,this.to=H}return i(_,"BidiSpan"),function(E,O){var H=O=="ltr"?"L":"R";if(E.length==0||O=="ltr"&&!u.test(E))return!1;for(var K=E.length,V=[],re=0;re-1&&(u[o]=p.slice(0,g).concat(p.slice(g+1)))}}}i(Xt,"off");function Mt(r,o){var c=Jr(r,o);if(c.length)for(var u=Array.prototype.slice.call(arguments,2),p=0;p0}i(pn,"hasHandler");function zn(r){r.prototype.on=function(o,c){ze(this,o,c)},r.prototype.off=function(o,c){Xt(this,o,c)}}i(zn,"eventMixin");function Nr(r){r.preventDefault?r.preventDefault():r.returnValue=!1}i(Nr,"e_preventDefault");function gs(r){r.stopPropagation?r.stopPropagation():r.cancelBubble=!0}i(gs,"e_stopPropagation");function Tn(r){return r.defaultPrevented!=null?r.defaultPrevented:r.returnValue==!1}i(Tn,"e_defaultPrevented");function Aa(r){Nr(r),gs(r)}i(Aa,"e_stop");function Pa(r){return r.target||r.srcElement}i(Pa,"e_target");function nc(r){var o=r.which;return o==null&&(r.button&1?o=1:r.button&2?o=3:r.button&4&&(o=2)),D&&r.ctrlKey&&o==1&&(o=3),o}i(nc,"e_button");var ic=function(){if(d&&v<9)return!1;var r=xe("div");return"draggable"in r||"dragDrop"in r}(),oc;function $f(r){if(oc==null){var o=xe("span","\u200B");tt(r,xe("span",[o,document.createTextNode("x")])),r.firstChild.offsetHeight!=0&&(oc=o.offsetWidth<=1&&o.offsetHeight>2&&!(d&&v<8))}var c=oc?xe("span","\u200B"):xe("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return c.setAttribute("cm-text",""),c}i($f,"zeroWidthElement");var sc;function Hp(r){if(sc!=null)return sc;var o=tt(r,document.createTextNode("A\u062EA")),c=je(o,0,1).getBoundingClientRect(),u=je(o,1,2).getBoundingClientRect();return Ye(r),!c||c.left==c.right?!1:sc=u.right-c.right<3}i(Hp,"hasBadBidiRects");var kl=` b`.split(/\n/).length!=3?function(r){for(var o=0,c=[],u=r.length;o<=u;){var p=r.indexOf(` -`,o);p==-1&&(p=r.length);var g=r.slice(o,r.charAt(p-1)=="\r"?p-1:p),y=g.indexOf("\r");y!=-1?(c.push(g.slice(0,y)),o+=y+1):(c.push(g),o=p+1)}return c}:function(r){return r.split(/\r\n?|\n/)},Bp=window.getSelection?function(r){try{return r.selectionStart!=r.selectionEnd}catch{return!1}}:function(r){var o;try{o=r.ownerDocument.selection.createRange()}catch{}return!o||o.parentElement()!=r?!1:o.compareEndPoints("StartToEnd",o)!=0},zp=function(){var r=xe("div");return"oncopy"in r?!0:(r.setAttribute("oncopy","return;"),typeof r.oncopy=="function")}(),Nl=null;function Vf(r){if(Nl!=null)return Nl;var o=tt(r,xe("span","x")),c=o.getBoundingClientRect(),u=je(o,0,1).getBoundingClientRect();return Nl=Math.abs(c.left-u.left)>1}i(Vf,"hasBadZoomedRects");var ac={},vs={};function Wp(r,o){arguments.length>2&&(o.dependencies=Array.prototype.slice.call(arguments,2)),ac[r]=o}i(Wp,"defineMode");function Up(r,o){vs[r]=o}i(Up,"defineMIME");function La(r){if(typeof r=="string"&&vs.hasOwnProperty(r))r=vs[r];else if(r&&typeof r.name=="string"&&vs.hasOwnProperty(r.name)){var o=vs[r.name];typeof o=="string"&&(o={name:o}),r=io(o,r),r.name=o.name}else{if(typeof r=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(r))return La("application/xml");if(typeof r=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(r))return La("application/json")}return typeof r=="string"?{name:r}:r||{name:"null"}}i(La,"resolveMode");function lc(r,o){o=La(o);var c=ac[o.name];if(!c)return lc(r,"text/plain");var u=c(r,o);if(ao.hasOwnProperty(o.name)){var p=ao[o.name];for(var g in p)p.hasOwnProperty(g)&&(u.hasOwnProperty(g)&&(u["_"+g]=u[g]),u[g]=p[g])}if(u.name=o.name,o.helperType&&(u.helperType=o.helperType),o.modeProps)for(var y in o.modeProps)u[y]=o.modeProps[y];return u}i(lc,"getMode");var ao={};function qf(r,o){var c=ao.hasOwnProperty(r)?ao[r]:ao[r]={};Gt(o,c)}i(qf,"extendMode");function Oi(r,o){if(o===!0)return o;if(r.copyState)return r.copyState(o);var c={};for(var u in o){var p=o[u];p instanceof Array&&(p=p.concat([])),c[u]=p}return c}i(Oi,"copyState");function uc(r,o){for(var c;r.innerMode&&(c=r.innerMode(o),!(!c||c.mode==r));)o=c.state,r=c.mode;return c||{mode:r,state:o}}i(uc,"innerMode");function cc(r,o,c){return r.startState?r.startState(o,c):!0}i(cc,"startState");var sr=i(function(r,o,c){this.pos=this.start=0,this.string=r,this.tabSize=o||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=c},"StringStream");sr.prototype.eol=function(){return this.pos>=this.string.length},sr.prototype.sol=function(){return this.pos==this.lineStart},sr.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},sr.prototype.next=function(){if(this.poso},sr.prototype.eatSpace=function(){for(var r=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>r},sr.prototype.skipToEnd=function(){this.pos=this.string.length},sr.prototype.skipTo=function(r){var o=this.string.indexOf(r,this.pos);if(o>-1)return this.pos=o,!0},sr.prototype.backUp=function(r){this.pos-=r},sr.prototype.column=function(){return this.lastColumnPos0?null:(g&&o!==!1&&(this.pos+=g[0].length),g)}},sr.prototype.current=function(){return this.string.slice(this.start,this.pos)},sr.prototype.hideFirstChars=function(r,o){this.lineStart+=r;try{return o()}finally{this.lineStart-=r}},sr.prototype.lookAhead=function(r){var o=this.lineOracle;return o&&o.lookAhead(r)},sr.prototype.baseToken=function(){var r=this.lineOracle;return r&&r.baseToken(this.pos)};function Ae(r,o){if(o-=r.first,o<0||o>=r.size)throw new Error("There is no line "+(o+r.first)+" in the document.");for(var c=r;!c.lines;)for(var u=0;;++u){var p=c.children[u],g=p.chunkSize();if(o=r.first&&oc?ce(c,Ae(r,c).text.length):jf(o,Ae(r,o.line).text.length)}i(qe,"clipPos");function jf(r,o){var c=r.ch;return c==null||c>o?ce(r.line,o):c<0?ce(r.line,0):r}i(jf,"clipToLen");function Al(r,o){for(var c=[],u=0;uthis.maxLookAhead&&(this.maxLookAhead=r),o},mi.prototype.baseToken=function(r){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=r;)this.baseTokenPos+=2;var o=this.baseTokens[this.baseTokenPos+1];return{type:o&&o.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-r}},mi.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},mi.fromSaved=function(r,o,c){return o instanceof ws?new mi(r,Oi(r.mode,o.state),c,o.lookAhead):new mi(r,Oi(r.mode,o),c)},mi.prototype.save=function(r){var o=r!==!1?Oi(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ws(o,this.maxLookAhead):o};function Ll(r,o,c,u){var p=[r.state.modeGen],g={};mc(r,o.text,r.doc.mode,c,function(E,O){return p.push(E,O)},g,u);for(var y=c.state,C=i(function(E){c.baseTokens=p;var O=r.state.overlays[E],H=1,K=0;c.state=!0,mc(r,o.text,O.mode,c,function(V,re){for(var ae=H;KV&&p.splice(H,1,V,p[H+1],pe),H+=2,K=Math.min(V,pe)}if(re)if(O.opaque)p.splice(ae,H-ae,V,"overlay "+re),H=ae+2;else for(;aer.options.maxHighlightLength&&Oi(r.doc.mode,u.state),g=Ll(r,o,u);p&&(u.state=p),o.stateAfter=u.save(!p),o.styles=g.styles,g.classes?o.styleClasses=g.classes:o.styleClasses&&(o.styleClasses=null),c===r.doc.highlightFrontier&&(r.doc.modeFrontier=Math.max(r.doc.modeFrontier,++r.doc.highlightFrontier))}return o.styles}i(Ml,"getLineStyles");function Ss(r,o,c){var u=r.doc,p=r.display;if(!u.mode.startState)return new mi(u,!0,o);var g=Dl(r,o,c),y=g>u.first&&Ae(u,g-1).stateAfter,C=y?mi.fromSaved(u,y,g):new mi(u,cc(u.mode),g);return u.iter(g,o,function(_){uo(r,_.text,C);var E=C.line;_.stateAfter=E==o-1||E%5==0||E>=p.viewFrom&&Eo.start)return g}throw new Error("Mode "+r.name+" failed to advance stream.")}i(Ks,"readToken");var pc=i(function(r,o,c){this.start=r.start,this.end=r.pos,this.string=r.current(),this.type=o||null,this.state=c},"Token");function Rl(r,o,c,u){var p=r.doc,g=p.mode,y;o=qe(p,o);var C=Ae(p,o.line),_=Ss(r,o.line,c),E=new sr(C.text,r.options.tabSize,_),O;for(u&&(O=[]);(u||E.posr.options.maxHighlightLength?(C=!1,y&&uo(r,o,u,O.pos),O.pos=o.length,H=null):H=hc(Ks(c,O,u.state,K),g),K){var V=K[0].name;V&&(H="m-"+(H?V+" "+H:V))}if(!C||E!=H){for(;_y;--C){if(C<=g.first)return g.first;var _=Ae(g,C-1),E=_.stateAfter;if(E&&(!c||C+(E instanceof ws?E.lookAhead:0)<=g.modeFrontier))return C;var O=Ft(_.text,null,r.options.tabSize);(p==null||u>O)&&(p=C-1,u=O)}return p}i(Dl,"findStartLine");function Ra(r,o){if(r.modeFrontier=Math.min(r.modeFrontier,o),!(r.highlightFrontierc;u--){var p=Ae(r,u).stateAfter;if(p&&(!(p instanceof ws)||u+p.lookAhead=o:g.to>o);(u||(u=[])).push(new Il(y,g.from,_?null:g.to))}}return u}i(qp,"markedSpansBefore");function jp(r,o,c){var u;if(r)for(var p=0;p=o:g.to>o);if(C||g.from==o&&y.type=="bookmark"&&(!c||g.marker.insertLeft)){var _=g.from==null||(y.inclusiveLeft?g.from<=o:g.from0&&C)for(var ke=0;ke0)){var O=[_,1],H=Ve(E.from,C.from),K=Ve(E.to,C.to);(H<0||!y.inclusiveLeft&&!H)&&O.push({from:E.from,to:C.from}),(K>0||!y.inclusiveRight&&!K)&&O.push({from:C.to,to:E.to}),p.splice.apply(p,O),_+=O.length-3}}return p}i(Kp,"removeReadOnlyRanges");function Ht(r){var o=r.markedSpans;if(o){for(var c=0;co)&&(!u||Gs(u,g.marker)<0)&&(u=g.marker)}return u}i(Ia,"collapsedSpanAround");function Gp(r,o,c,u,p){var g=Ae(r,o),y=Di&&g.markedSpans;if(y)for(var C=0;C=0&&H<=0||O<=0&&H>=0)&&(O<=0&&(_.marker.inclusiveRight&&p.inclusiveLeft?Ve(E.to,c)>=0:Ve(E.to,c)>0)||O>=0&&(_.marker.inclusiveRight&&p.inclusiveLeft?Ve(E.from,u)<=0:Ve(E.from,u)<0)))return!0}}}i(Gp,"conflictingCollapsedRange");function Rt(r){for(var o;o=Fl(r);)r=o.find(-1,!0).line;return r}i(Rt,"visualLine");function Yf(r){for(var o;o=ve(r);)r=o.find(1,!0).line;return r}i(Yf,"visualLineEnd");function Ys(r){for(var o,c;o=ve(r);)r=o.find(1,!0).line,(c||(c=[])).push(r);return c}i(Ys,"visualLineContinued");function Fa(r,o){var c=Ae(r,o),u=Rt(c);return c==u?o:vt(u)}i(Fa,"visualLineNo");function Wo(r,o){if(o>r.lastLine())return o;var c=Ae(r,o),u;if(!Se(r,c))return o;for(;u=ve(c);)c=u.find(1,!0).line;return vt(c)+1}i(Wo,"visualLineEndNo");function Se(r,o){var c=Di&&o.markedSpans;if(c){for(var u=void 0,p=0;po.maxLineLength&&(o.maxLineLength=p,o.maxLine=u)})}i(Hl,"findMaxLine");var hn=i(function(r,o,c){this.text=r,Ot(this,o),this.height=c?c(this):1},"Line");hn.prototype.lineNo=function(){return vt(this)},zn(hn);function Bl(r,o,c,u){r.text=o,r.stateAfter&&(r.stateAfter=null),r.styles&&(r.styles=null),r.order!=null&&(r.order=null),Ht(r),Ot(r,c);var p=u?u(r):1;p!=r.height&&Ri(r,p)}i(Bl,"updateLine");function Zr(r){r.parent=null,Ht(r)}i(Zr,"cleanUpLine");var zl={},Zn={};function Xf(r,o){if(!r||/^\s*$/.test(r))return null;var c=o.addModeClass?Zn:zl;return c[r]||(c[r]=r.replace(/\S+/g,"cm-$&"))}i(Xf,"interpretTokenStyle");function wc(r,o){var c=Xe("span",null,null,S?"padding-right: .1px":null),u={pre:Xe("pre",[c],"CodeMirror-line"),content:c,col:0,pos:0,cm:r,trailingSpace:!1,splitSpaces:r.getOption("lineWrapping")};o.measure={};for(var p=0;p<=(o.rest?o.rest.length:0);p++){var g=p?o.rest[p-1]:o.line,y=void 0;u.pos=0,u.addToken=Ha,Hp(r.display.measure)&&(y=Me(g,r.doc.direction))&&(u.addToken=$t(u.addToken,y)),u.map=[];var C=o!=r.display.externalMeasured&&vt(g);Sc(g,u,Ml(r,g,C)),g.styleClasses&&(g.styleClasses.bgClass&&(u.bgClass=Pt(g.styleClasses.bgClass,u.bgClass||"")),g.styleClasses.textClass&&(u.textClass=Pt(g.styleClasses.textClass,u.textClass||""))),u.map.length==0&&u.map.push(0,0,u.content.appendChild($f(r.display.measure))),p==0?(o.measure.map=u.map,o.measure.cache={}):((o.measure.maps||(o.measure.maps=[])).push(u.map),(o.measure.caches||(o.measure.caches=[])).push({}))}if(S){var _=u.content.lastChild;(/\bcm-tab\b/.test(_.className)||_.querySelector&&_.querySelector(".cm-tab"))&&(u.content.className="cm-tab-wrap-hack")}return Mt(r,"renderLine",r,o.line,u.pre),u.pre.className&&(u.textClass=Pt(u.pre.className,u.textClass||"")),u}i(wc,"buildLineContent");function jt(r){var o=xe("span","\u2022","cm-invalidchar");return o.title="\\u"+r.charCodeAt(0).toString(16),o.setAttribute("aria-label",o.title),o}i(jt,"defaultSpecialCharPlaceholder");function Ha(r,o,c,u,p,g,y){if(o){var C=r.splitSpaces?Wl(o,r.trailingSpace):o,_=r.cm.state.specialChars,E=!1,O;if(!_.test(o))r.col+=o.length,O=document.createTextNode(C),r.map.push(r.pos,r.pos+o.length,O),d&&v<9&&(E=!0),r.pos+=o.length;else{O=document.createDocumentFragment();for(var H=0;;){_.lastIndex=H;var K=_.exec(o),V=K?K.index-H:o.length-H;if(V){var re=document.createTextNode(C.slice(H,H+V));d&&v<9?O.appendChild(xe("span",[re])):O.appendChild(re),r.map.push(r.pos,r.pos+V,re),r.col+=V,r.pos+=V}if(!K)break;H+=V+1;var ae=void 0;if(K[0]==" "){var pe=r.cm.options.tabSize,we=pe-r.col%pe;ae=O.appendChild(xe("span",Bo(we),"cm-tab")),ae.setAttribute("role","presentation"),ae.setAttribute("cm-text"," "),r.col+=we}else K[0]=="\r"||K[0]==` -`?(ae=O.appendChild(xe("span",K[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),ae.setAttribute("cm-text",K[0]),r.col+=1):(ae=r.cm.options.specialCharPlaceholder(K[0]),ae.setAttribute("cm-text",K[0]),d&&v<9?O.appendChild(xe("span",[ae])):O.appendChild(ae),r.col+=1);r.map.push(r.pos,r.pos+1,ae),r.pos++}}if(r.trailingSpace=C.charCodeAt(o.length-1)==32,c||u||p||E||g||y){var _e=c||"";u&&(_e+=u),p&&(_e+=p);var ye=xe("span",[O],_e,g);if(y)for(var ke in y)y.hasOwnProperty(ke)&&ke!="style"&&ke!="class"&&ye.setAttribute(ke,y[ke]);return r.content.appendChild(ye)}r.content.appendChild(O)}}i(Ha,"buildToken");function Wl(r,o){if(r.length>1&&!/ /.test(r))return r;for(var c=o,u="",p=0;pE&&H.from<=E));K++);if(H.to>=O)return r(c,u,p,g,y,C,_);r(c,u.slice(0,H.to-E),p,g,null,C,_),g=null,u=u.slice(H.to-E),E=H.to}}}i($t,"buildTokenBadBidi");function Ii(r,o,c,u){var p=!u&&c.widgetNode;p&&r.map.push(r.pos,r.pos+o,p),!u&&r.cm.display.input.needsContentAttribute&&(p||(p=r.content.appendChild(document.createElement("span"))),p.setAttribute("cm-marker",c.id)),p&&(r.cm.display.input.setUneditable(p),r.content.appendChild(p)),r.pos+=o,r.trailingSpace=!1}i(Ii,"buildCollapsedSpan");function Sc(r,o,c){var u=r.markedSpans,p=r.text,g=0;if(!u){for(var y=1;y_||it.collapsed&&Oe.to==_&&Oe.from==_)){if(Oe.to!=null&&Oe.to!=_&&V>Oe.to&&(V=Oe.to,ae=""),it.className&&(re+=" "+it.className),it.css&&(K=(K?K+";":"")+it.css),it.startStyle&&Oe.from==_&&(pe+=" "+it.startStyle),it.endStyle&&Oe.to==V&&(ke||(ke=[])).push(it.endStyle,Oe.to),it.title&&((_e||(_e={})).title=it.title),it.attributes)for(var Dt in it.attributes)(_e||(_e={}))[Dt]=it.attributes[Dt];it.collapsed&&(!we||Gs(we.marker,it)<0)&&(we=Oe)}else Oe.from>_&&V>Oe.from&&(V=Oe.from)}if(ke)for(var hr=0;hr=C)break;for(var lr=Math.min(C,V);;){if(O){var xr=_+O.length;if(!we){var Cr=xr>lr?O.slice(0,lr-_):O;o.addToken(o,Cr,H?H+re:re,pe,_+Cr.length==V?ae:"",K,_e)}if(xr>=lr){O=O.slice(lr-_),_=lr;break}_=xr,pe=""}O=p.slice(g,g=c[E++]),H=Xf(c[E++],o.cm.options)}}}i(Sc,"insertLineContent");function Qf(r,o,c){this.line=o,this.rest=Ys(o),this.size=this.rest?vt(lt(this.rest))-c+1:1,this.node=this.text=null,this.hidden=Se(r,o)}i(Qf,"LineView");function Qs(r,o,c){for(var u=[],p,g=o;g2&&g.push((_.bottom+E.top)/2-c.top)}}g.push(c.bottom-c.top)}}i(xs,"ensureLineHeights");function td(r,o,c){if(r.line==o)return{map:r.measure.map,cache:r.measure.cache};if(r.rest){for(var u=0;uc)return{map:r.measure.maps[p],cache:r.measure.caches[p],before:!0}}}i(td,"mapFromLineView");function Qp(r,o){o=Rt(o);var c=vt(o),u=r.display.externalMeasured=new Qf(r.doc,o,c);u.lineN=c;var p=u.built=wc(r,u);return u.text=p.pre,tt(r.display.lineMeasure,p.pre),u}i(Qp,"updateExternalMeasurement");function Kl(r,o,c,u){return w(r,kn(r,o),c,u)}i(Kl,"measureChar");function Gl(r,o){if(o>=r.display.viewFrom&&o=c.lineN&&oo)&&(g=_-C,p=g-1,o>=_&&(y="right")),p!=null){if(u=r[E+2],C==_&&c==(u.insertLeft?"left":"right")&&(y=c),c=="left"&&p==0)for(;E&&r[E-2]==r[E-3]&&r[E-1].insertLeft;)u=r[(E-=3)+2],y="left";if(c=="right"&&p==_-C)for(;E=0&&(c=r[p]).left==c.right;p--);return c}i(U,"getUsefulRect");function gn(r,o,c,u){var p=W(o.map,c,u),g=p.node,y=p.start,C=p.end,_=p.collapse,E;if(g.nodeType==3){for(var O=0;O<4;O++){for(;y&&hi(o.line.text.charAt(p.coverStart+y));)--y;for(;p.coverStart+C0&&(_=u="right");var H;r.options.lineWrapping&&(H=g.getClientRects()).length>1?E=H[u=="right"?H.length-1:0]:E=g.getBoundingClientRect()}if(d&&v<9&&!y&&(!E||!E.left&&!E.right)){var K=g.parentNode.getClientRects()[0];K?E={left:K.left,right:K.left+Cs(r.display),top:K.top,bottom:K.bottom}:E=N}for(var V=E.top-o.rect.top,re=E.bottom-o.rect.top,ae=(V+re)/2,pe=o.view.measure.heights,we=0;we=u.text.length?(_=u.text.length,E="before"):_<=0&&(_=0,E="after"),!C)return y(E=="before"?_-1:_,E=="before");function O(re,ae,pe){var we=C[ae],_e=we.level==1;return y(pe?re-1:re,_e!=pe)}i(O,"getBidi");var H=ee(C,_,E),K=X,V=O(_,H,E=="before");return K!=null&&(V.other=O(_,K,E!="before")),V}i(J,"cursorCoords");function Pe(r,o){var c=0;o=qe(r.doc,o),r.options.lineWrapping||(c=Cs(r.display)*o.ch);var u=Ae(r.doc,o.line),p=vi(u)+ea(r.display);return{left:c,right:c,top:p,bottom:p+u.height}}i(Pe,"estimateCoords");function Je(r,o,c,u,p){var g=ce(r,o,c);return g.xRel=p,u&&(g.outside=u),g}i(Je,"PosWithInfo");function yt(r,o,c){var u=r.doc;if(c+=r.display.viewOffset,c<0)return Je(u.first,0,null,-1,-1);var p=ys(u,c),g=u.first+u.size-1;if(p>g)return Je(u.first+u.size-1,Ae(u,g).text.length,null,1,1);o<0&&(o=0);for(var y=Ae(u,p);;){var C=dw(r,y,p,o,c),_=Ia(y,C.ch+(C.xRel>0||C.outside>0?1:0));if(!_)return C;var E=_.find(1);if(E.line==p)return E;y=Ae(u,p=E.line)}}i(yt,"coordsChar");function Pr(r,o,c,u){u-=Yl(o);var p=o.text.length,g=so(function(y){return w(r,c,y-1).bottom<=u},p,0);return p=so(function(y){return w(r,c,y).top>u},g,p),{begin:g,end:p}}i(Pr,"wrappedLineExtent");function Bt(r,o,c,u){c||(c=kn(r,o));var p=vn(r,o,w(r,c,u),"line").top;return Pr(r,o,c,p)}i(Bt,"wrappedLineExtentChar");function Nc(r,o,c,u){return r.bottom<=c?!1:r.top>c?!0:(u?r.left:r.right)>o}i(Nc,"boxIsAfter");function dw(r,o,c,u,p){p-=vi(o);var g=kn(r,o),y=Yl(o),C=0,_=o.text.length,E=!0,O=Me(o,r.doc.direction);if(O){var H=(r.options.lineWrapping?rd:Hi)(r,o,c,g,O,u,p);E=H.level!=1,C=E?H.from:H.to-1,_=E?H.to:H.from-1}var K=null,V=null,re=so(function(Ie){var Oe=w(r,g,Ie);return Oe.top+=y,Oe.bottom+=y,Nc(Oe,u,p,!1)?(Oe.top<=p&&Oe.left<=u&&(K=Ie,V=Oe),!0):!1},C,_),ae,pe,we=!1;if(V){var _e=u-V.left=ke.bottom?1:0}return re=Bn(o.text,re,1),Je(c,re,pe,we,u-ae)}i(dw,"coordsCharInner");function Hi(r,o,c,u,p,g,y){var C=so(function(H){var K=p[H],V=K.level!=1;return Nc(J(r,ce(c,V?K.to:K.from,V?"before":"after"),"line",o,u),g,y,!0)},0,p.length-1),_=p[C];if(C>0){var E=_.level!=1,O=J(r,ce(c,E?_.from:_.to,E?"after":"before"),"line",o,u);Nc(O,g,y,!0)&&O.top>y&&(_=p[C-1])}return _}i(Hi,"coordsBidiPart");function rd(r,o,c,u,p,g,y){var C=Pr(r,o,u,y),_=C.begin,E=C.end;/\s/.test(o.text.charAt(E-1))&&E--;for(var O=null,H=null,K=0;K=E||V.to<=_)){var re=V.level!=1,ae=w(r,u,re?Math.min(E,V.to)-1:Math.max(_,V.from)).right,pe=aepe)&&(O=V,H=pe)}}return O||(O=p[p.length-1]),O.from<_&&(O={from:_,to:O.to,level:O.level}),O.to>E&&(O={from:O.from,to:E,level:O.level}),O}i(rd,"coordsBidiPartWrapped");var za;function po(r){if(r.cachedTextHeight!=null)return r.cachedTextHeight;if(za==null){za=xe("pre",null,"CodeMirror-line-like");for(var o=0;o<49;++o)za.appendChild(document.createTextNode("x")),za.appendChild(xe("br"));za.appendChild(document.createTextNode("x"))}tt(r.measure,za);var c=za.offsetHeight/50;return c>3&&(r.cachedTextHeight=c),Ye(r.measure),c||1}i(po,"textHeight");function Cs(r){if(r.cachedCharWidth!=null)return r.cachedCharWidth;var o=xe("span","xxxxxxxxxx"),c=xe("pre",[o],"CodeMirror-line-like");tt(r.measure,c);var u=o.getBoundingClientRect(),p=(u.right-u.left)/10;return p>2&&(r.cachedCharWidth=p),p||10}i(Cs,"charWidth");function Xl(r){for(var o=r.display,c={},u={},p=o.gutters.clientLeft,g=o.gutters.firstChild,y=0;g;g=g.nextSibling,++y){var C=r.display.gutterSpecs[y].className;c[C]=g.offsetLeft+g.clientLeft+p,u[C]=g.clientWidth}return{fixedPos:kt(o),gutterTotalWidth:o.gutters.offsetWidth,gutterLeft:c,gutterWidth:u,wrapperWidth:o.wrapper.clientWidth}}i(Xl,"getDimensions");function kt(r){return r.scroller.getBoundingClientRect().left-r.sizer.getBoundingClientRect().left}i(kt,"compensateForHScroll");function mg(r){var o=po(r.display),c=r.options.lineWrapping,u=c&&Math.max(5,r.display.scroller.clientWidth/Cs(r.display)-3);return function(p){if(Se(r.doc,p))return 0;var g=0;if(p.widgets)for(var y=0;y0&&(E=Ae(r.doc,_.line).text).length==_.ch){var O=Ft(E,E.length,r.options.tabSize)-E.length;_=ce(_.line,Math.max(0,Math.round((g-Tc(r.display).left)/Cs(r.display))-O))}return _}i(jo,"posFromMouse");function Wa(r,o){if(o>=r.display.viewTo||(o-=r.display.viewFrom,o<0))return null;for(var c=r.display.view,u=0;uo)&&(p.updateLineNumbers=o),r.curOp.viewChanged=!0,o>=p.viewTo)Di&&Fa(r.doc,o)p.viewFrom?ho(r):(p.viewFrom+=u,p.viewTo+=u);else if(o<=p.viewFrom&&c>=p.viewTo)ho(r);else if(o<=p.viewFrom){var g=mo(r,c,c+u,1);g?(p.view=p.view.slice(g.index),p.viewFrom=g.lineN,p.viewTo+=u):ho(r)}else if(c>=p.viewTo){var y=mo(r,o,o,-1);y?(p.view=p.view.slice(0,y.index),p.viewTo=y.lineN):ho(r)}else{var C=mo(r,o,o,-1),_=mo(r,c,c+u,1);C&&_?(p.view=p.view.slice(0,C.index).concat(Qs(r,C.lineN,_.lineN)).concat(p.view.slice(_.index)),p.viewTo+=u):ho(r)}var E=p.externalMeasured;E&&(c=p.lineN&&o=u.viewTo)){var g=u.view[Wa(r,o)];if(g.node!=null){var y=g.changes||(g.changes=[]);We(y,c)==-1&&y.push(c)}}}i(ta,"regLineChange");function ho(r){r.display.viewFrom=r.display.viewTo=r.doc.first,r.display.view=[],r.display.viewOffset=0}i(ho,"resetView");function mo(r,o,c,u){var p=Wa(r,o),g,y=r.display.view;if(!Di||c==r.doc.first+r.doc.size)return{index:p,lineN:c};for(var C=r.display.viewFrom,_=0;_0){if(p==y.length-1)return null;g=C+y[p].size-o,p++}else g=C-o;o+=g,c+=g}for(;Fa(r.doc,c)!=c;){if(p==(u<0?0:y.length-1))return null;c+=u*y[p-(u<0?1:0)].size,p+=u}return{index:p,lineN:c}}i(mo,"viewCuttingPoint");function id(r,o,c){var u=r.display,p=u.view;p.length==0||o>=u.viewTo||c<=u.viewFrom?(u.view=Qs(r,o,c),u.viewFrom=o):(u.viewFrom>o?u.view=Qs(r,o,u.viewFrom).concat(u.view):u.viewFromc&&(u.view=u.view.slice(0,Wa(r,c)))),u.viewTo=c}i(id,"adjustView");function Jp(r){for(var o=r.display.view,c=0,u=0;u=r.display.viewTo||_.to().line0?y:r.defaultCharWidth())+"px"}if(u.other){var C=c.appendChild(xe("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));C.style.display="",C.style.left=u.other.left+"px",C.style.top=u.other.top+"px",C.style.height=(u.other.bottom-u.other.top)*.85+"px"}}i(od,"drawSelectionCursor");function Ua(r,o){return r.top-o.top||r.left-o.left}i(Ua,"cmpCoords");function gg(r,o,c){var u=r.display,p=r.doc,g=document.createDocumentFragment(),y=Tc(r.display),C=y.left,_=Math.max(u.sizerWidth,$o(r)-u.sizer.offsetLeft)-y.right,E=p.direction=="ltr";function O(ye,ke,Ie,Oe){ke<0&&(ke=0),ke=Math.round(ke),Oe=Math.round(Oe),g.appendChild(xe("div",null,"CodeMirror-selected","position: absolute; left: "+ye+`px; +`,o);p==-1&&(p=r.length);var g=r.slice(o,r.charAt(p-1)=="\r"?p-1:p),y=g.indexOf("\r");y!=-1?(c.push(g.slice(0,y)),o+=y+1):(c.push(g),o=p+1)}return c}:function(r){return r.split(/\r\n?|\n/)},Bp=window.getSelection?function(r){try{return r.selectionStart!=r.selectionEnd}catch{return!1}}:function(r){var o;try{o=r.ownerDocument.selection.createRange()}catch{}return!o||o.parentElement()!=r?!1:o.compareEndPoints("StartToEnd",o)!=0},zp=function(){var r=xe("div");return"oncopy"in r?!0:(r.setAttribute("oncopy","return;"),typeof r.oncopy=="function")}(),Nl=null;function Vf(r){if(Nl!=null)return Nl;var o=tt(r,xe("span","x")),c=o.getBoundingClientRect(),u=je(o,0,1).getBoundingClientRect();return Nl=Math.abs(c.left-u.left)>1}i(Vf,"hasBadZoomedRects");var ac={},vs={};function Wp(r,o){arguments.length>2&&(o.dependencies=Array.prototype.slice.call(arguments,2)),ac[r]=o}i(Wp,"defineMode");function Up(r,o){vs[r]=o}i(Up,"defineMIME");function La(r){if(typeof r=="string"&&vs.hasOwnProperty(r))r=vs[r];else if(r&&typeof r.name=="string"&&vs.hasOwnProperty(r.name)){var o=vs[r.name];typeof o=="string"&&(o={name:o}),r=io(o,r),r.name=o.name}else{if(typeof r=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(r))return La("application/xml");if(typeof r=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(r))return La("application/json")}return typeof r=="string"?{name:r}:r||{name:"null"}}i(La,"resolveMode");function lc(r,o){o=La(o);var c=ac[o.name];if(!c)return lc(r,"text/plain");var u=c(r,o);if(ao.hasOwnProperty(o.name)){var p=ao[o.name];for(var g in p)p.hasOwnProperty(g)&&(u.hasOwnProperty(g)&&(u["_"+g]=u[g]),u[g]=p[g])}if(u.name=o.name,o.helperType&&(u.helperType=o.helperType),o.modeProps)for(var y in o.modeProps)u[y]=o.modeProps[y];return u}i(lc,"getMode");var ao={};function qf(r,o){var c=ao.hasOwnProperty(r)?ao[r]:ao[r]={};Yt(o,c)}i(qf,"extendMode");function Oi(r,o){if(o===!0)return o;if(r.copyState)return r.copyState(o);var c={};for(var u in o){var p=o[u];p instanceof Array&&(p=p.concat([])),c[u]=p}return c}i(Oi,"copyState");function uc(r,o){for(var c;r.innerMode&&(c=r.innerMode(o),!(!c||c.mode==r));)o=c.state,r=c.mode;return c||{mode:r,state:o}}i(uc,"innerMode");function cc(r,o,c){return r.startState?r.startState(o,c):!0}i(cc,"startState");var sr=i(function(r,o,c){this.pos=this.start=0,this.string=r,this.tabSize=o||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=c},"StringStream");sr.prototype.eol=function(){return this.pos>=this.string.length},sr.prototype.sol=function(){return this.pos==this.lineStart},sr.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},sr.prototype.next=function(){if(this.poso},sr.prototype.eatSpace=function(){for(var r=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>r},sr.prototype.skipToEnd=function(){this.pos=this.string.length},sr.prototype.skipTo=function(r){var o=this.string.indexOf(r,this.pos);if(o>-1)return this.pos=o,!0},sr.prototype.backUp=function(r){this.pos-=r},sr.prototype.column=function(){return this.lastColumnPos0?null:(g&&o!==!1&&(this.pos+=g[0].length),g)}},sr.prototype.current=function(){return this.string.slice(this.start,this.pos)},sr.prototype.hideFirstChars=function(r,o){this.lineStart+=r;try{return o()}finally{this.lineStart-=r}},sr.prototype.lookAhead=function(r){var o=this.lineOracle;return o&&o.lookAhead(r)},sr.prototype.baseToken=function(){var r=this.lineOracle;return r&&r.baseToken(this.pos)};function Pe(r,o){if(o-=r.first,o<0||o>=r.size)throw new Error("There is no line "+(o+r.first)+" in the document.");for(var c=r;!c.lines;)for(var u=0;;++u){var p=c.children[u],g=p.chunkSize();if(o=r.first&&oc?ce(c,Pe(r,c).text.length):jf(o,Pe(r,o.line).text.length)}i(qe,"clipPos");function jf(r,o){var c=r.ch;return c==null||c>o?ce(r.line,o):c<0?ce(r.line,0):r}i(jf,"clipToLen");function Pl(r,o){for(var c=[],u=0;uthis.maxLookAhead&&(this.maxLookAhead=r),o},mi.prototype.baseToken=function(r){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=r;)this.baseTokenPos+=2;var o=this.baseTokens[this.baseTokenPos+1];return{type:o&&o.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-r}},mi.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},mi.fromSaved=function(r,o,c){return o instanceof ws?new mi(r,Oi(r.mode,o.state),c,o.lookAhead):new mi(r,Oi(r.mode,o),c)},mi.prototype.save=function(r){var o=r!==!1?Oi(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ws(o,this.maxLookAhead):o};function Ll(r,o,c,u){var p=[r.state.modeGen],g={};mc(r,o.text,r.doc.mode,c,function(E,O){return p.push(E,O)},g,u);for(var y=c.state,C=i(function(E){c.baseTokens=p;var O=r.state.overlays[E],H=1,K=0;c.state=!0,mc(r,o.text,O.mode,c,function(V,re){for(var ae=H;KV&&p.splice(H,1,V,p[H+1],pe),H+=2,K=Math.min(V,pe)}if(re)if(O.opaque)p.splice(ae,H-ae,V,"overlay "+re),H=ae+2;else for(;aer.options.maxHighlightLength&&Oi(r.doc.mode,u.state),g=Ll(r,o,u);p&&(u.state=p),o.stateAfter=u.save(!p),o.styles=g.styles,g.classes?o.styleClasses=g.classes:o.styleClasses&&(o.styleClasses=null),c===r.doc.highlightFrontier&&(r.doc.modeFrontier=Math.max(r.doc.modeFrontier,++r.doc.highlightFrontier))}return o.styles}i(Ml,"getLineStyles");function Ss(r,o,c){var u=r.doc,p=r.display;if(!u.mode.startState)return new mi(u,!0,o);var g=Dl(r,o,c),y=g>u.first&&Pe(u,g-1).stateAfter,C=y?mi.fromSaved(u,y,g):new mi(u,cc(u.mode),g);return u.iter(g,o,function(_){uo(r,_.text,C);var E=C.line;_.stateAfter=E==o-1||E%5==0||E>=p.viewFrom&&Eo.start)return g}throw new Error("Mode "+r.name+" failed to advance stream.")}i(Ks,"readToken");var pc=i(function(r,o,c){this.start=r.start,this.end=r.pos,this.string=r.current(),this.type=o||null,this.state=c},"Token");function Rl(r,o,c,u){var p=r.doc,g=p.mode,y;o=qe(p,o);var C=Pe(p,o.line),_=Ss(r,o.line,c),E=new sr(C.text,r.options.tabSize,_),O;for(u&&(O=[]);(u||E.posr.options.maxHighlightLength?(C=!1,y&&uo(r,o,u,O.pos),O.pos=o.length,H=null):H=hc(Ks(c,O,u.state,K),g),K){var V=K[0].name;V&&(H="m-"+(H?V+" "+H:V))}if(!C||E!=H){for(;_y;--C){if(C<=g.first)return g.first;var _=Pe(g,C-1),E=_.stateAfter;if(E&&(!c||C+(E instanceof ws?E.lookAhead:0)<=g.modeFrontier))return C;var O=Ft(_.text,null,r.options.tabSize);(p==null||u>O)&&(p=C-1,u=O)}return p}i(Dl,"findStartLine");function Ra(r,o){if(r.modeFrontier=Math.min(r.modeFrontier,o),!(r.highlightFrontierc;u--){var p=Pe(r,u).stateAfter;if(p&&(!(p instanceof ws)||u+p.lookAhead=o:g.to>o);(u||(u=[])).push(new Il(y,g.from,_?null:g.to))}}return u}i(qp,"markedSpansBefore");function jp(r,o,c){var u;if(r)for(var p=0;p=o:g.to>o);if(C||g.from==o&&y.type=="bookmark"&&(!c||g.marker.insertLeft)){var _=g.from==null||(y.inclusiveLeft?g.from<=o:g.from0&&C)for(var ke=0;ke0)){var O=[_,1],H=Ve(E.from,C.from),K=Ve(E.to,C.to);(H<0||!y.inclusiveLeft&&!H)&&O.push({from:E.from,to:C.from}),(K>0||!y.inclusiveRight&&!K)&&O.push({from:C.to,to:E.to}),p.splice.apply(p,O),_+=O.length-3}}return p}i(Kp,"removeReadOnlyRanges");function Ht(r){var o=r.markedSpans;if(o){for(var c=0;co)&&(!u||Gs(u,g.marker)<0)&&(u=g.marker)}return u}i(Ia,"collapsedSpanAround");function Gp(r,o,c,u,p){var g=Pe(r,o),y=Di&&g.markedSpans;if(y)for(var C=0;C=0&&H<=0||O<=0&&H>=0)&&(O<=0&&(_.marker.inclusiveRight&&p.inclusiveLeft?Ve(E.to,c)>=0:Ve(E.to,c)>0)||O>=0&&(_.marker.inclusiveRight&&p.inclusiveLeft?Ve(E.from,u)<=0:Ve(E.from,u)<0)))return!0}}}i(Gp,"conflictingCollapsedRange");function Rt(r){for(var o;o=Fl(r);)r=o.find(-1,!0).line;return r}i(Rt,"visualLine");function Yf(r){for(var o;o=ve(r);)r=o.find(1,!0).line;return r}i(Yf,"visualLineEnd");function Ys(r){for(var o,c;o=ve(r);)r=o.find(1,!0).line,(c||(c=[])).push(r);return c}i(Ys,"visualLineContinued");function Fa(r,o){var c=Pe(r,o),u=Rt(c);return c==u?o:vt(u)}i(Fa,"visualLineNo");function Wo(r,o){if(o>r.lastLine())return o;var c=Pe(r,o),u;if(!Se(r,c))return o;for(;u=ve(c);)c=u.find(1,!0).line;return vt(c)+1}i(Wo,"visualLineEndNo");function Se(r,o){var c=Di&&o.markedSpans;if(c){for(var u=void 0,p=0;po.maxLineLength&&(o.maxLineLength=p,o.maxLine=u)})}i(Hl,"findMaxLine");var hn=i(function(r,o,c){this.text=r,Ot(this,o),this.height=c?c(this):1},"Line");hn.prototype.lineNo=function(){return vt(this)},zn(hn);function Bl(r,o,c,u){r.text=o,r.stateAfter&&(r.stateAfter=null),r.styles&&(r.styles=null),r.order!=null&&(r.order=null),Ht(r),Ot(r,c);var p=u?u(r):1;p!=r.height&&Ri(r,p)}i(Bl,"updateLine");function Zr(r){r.parent=null,Ht(r)}i(Zr,"cleanUpLine");var zl={},Zn={};function Xf(r,o){if(!r||/^\s*$/.test(r))return null;var c=o.addModeClass?Zn:zl;return c[r]||(c[r]=r.replace(/\S+/g,"cm-$&"))}i(Xf,"interpretTokenStyle");function wc(r,o){var c=Xe("span",null,null,S?"padding-right: .1px":null),u={pre:Xe("pre",[c],"CodeMirror-line"),content:c,col:0,pos:0,cm:r,trailingSpace:!1,splitSpaces:r.getOption("lineWrapping")};o.measure={};for(var p=0;p<=(o.rest?o.rest.length:0);p++){var g=p?o.rest[p-1]:o.line,y=void 0;u.pos=0,u.addToken=Ha,Hp(r.display.measure)&&(y=Me(g,r.doc.direction))&&(u.addToken=$t(u.addToken,y)),u.map=[];var C=o!=r.display.externalMeasured&&vt(g);Sc(g,u,Ml(r,g,C)),g.styleClasses&&(g.styleClasses.bgClass&&(u.bgClass=At(g.styleClasses.bgClass,u.bgClass||"")),g.styleClasses.textClass&&(u.textClass=At(g.styleClasses.textClass,u.textClass||""))),u.map.length==0&&u.map.push(0,0,u.content.appendChild($f(r.display.measure))),p==0?(o.measure.map=u.map,o.measure.cache={}):((o.measure.maps||(o.measure.maps=[])).push(u.map),(o.measure.caches||(o.measure.caches=[])).push({}))}if(S){var _=u.content.lastChild;(/\bcm-tab\b/.test(_.className)||_.querySelector&&_.querySelector(".cm-tab"))&&(u.content.className="cm-tab-wrap-hack")}return Mt(r,"renderLine",r,o.line,u.pre),u.pre.className&&(u.textClass=At(u.pre.className,u.textClass||"")),u}i(wc,"buildLineContent");function jt(r){var o=xe("span","\u2022","cm-invalidchar");return o.title="\\u"+r.charCodeAt(0).toString(16),o.setAttribute("aria-label",o.title),o}i(jt,"defaultSpecialCharPlaceholder");function Ha(r,o,c,u,p,g,y){if(o){var C=r.splitSpaces?Wl(o,r.trailingSpace):o,_=r.cm.state.specialChars,E=!1,O;if(!_.test(o))r.col+=o.length,O=document.createTextNode(C),r.map.push(r.pos,r.pos+o.length,O),d&&v<9&&(E=!0),r.pos+=o.length;else{O=document.createDocumentFragment();for(var H=0;;){_.lastIndex=H;var K=_.exec(o),V=K?K.index-H:o.length-H;if(V){var re=document.createTextNode(C.slice(H,H+V));d&&v<9?O.appendChild(xe("span",[re])):O.appendChild(re),r.map.push(r.pos,r.pos+V,re),r.col+=V,r.pos+=V}if(!K)break;H+=V+1;var ae=void 0;if(K[0]==" "){var pe=r.cm.options.tabSize,we=pe-r.col%pe;ae=O.appendChild(xe("span",Bo(we),"cm-tab")),ae.setAttribute("role","presentation"),ae.setAttribute("cm-text"," "),r.col+=we}else K[0]=="\r"||K[0]==` +`?(ae=O.appendChild(xe("span",K[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),ae.setAttribute("cm-text",K[0]),r.col+=1):(ae=r.cm.options.specialCharPlaceholder(K[0]),ae.setAttribute("cm-text",K[0]),d&&v<9?O.appendChild(xe("span",[ae])):O.appendChild(ae),r.col+=1);r.map.push(r.pos,r.pos+1,ae),r.pos++}}if(r.trailingSpace=C.charCodeAt(o.length-1)==32,c||u||p||E||g||y){var _e=c||"";u&&(_e+=u),p&&(_e+=p);var ye=xe("span",[O],_e,g);if(y)for(var ke in y)y.hasOwnProperty(ke)&&ke!="style"&&ke!="class"&&ye.setAttribute(ke,y[ke]);return r.content.appendChild(ye)}r.content.appendChild(O)}}i(Ha,"buildToken");function Wl(r,o){if(r.length>1&&!/ /.test(r))return r;for(var c=o,u="",p=0;pE&&H.from<=E));K++);if(H.to>=O)return r(c,u,p,g,y,C,_);r(c,u.slice(0,H.to-E),p,g,null,C,_),g=null,u=u.slice(H.to-E),E=H.to}}}i($t,"buildTokenBadBidi");function Ii(r,o,c,u){var p=!u&&c.widgetNode;p&&r.map.push(r.pos,r.pos+o,p),!u&&r.cm.display.input.needsContentAttribute&&(p||(p=r.content.appendChild(document.createElement("span"))),p.setAttribute("cm-marker",c.id)),p&&(r.cm.display.input.setUneditable(p),r.content.appendChild(p)),r.pos+=o,r.trailingSpace=!1}i(Ii,"buildCollapsedSpan");function Sc(r,o,c){var u=r.markedSpans,p=r.text,g=0;if(!u){for(var y=1;y_||it.collapsed&&Oe.to==_&&Oe.from==_)){if(Oe.to!=null&&Oe.to!=_&&V>Oe.to&&(V=Oe.to,ae=""),it.className&&(re+=" "+it.className),it.css&&(K=(K?K+";":"")+it.css),it.startStyle&&Oe.from==_&&(pe+=" "+it.startStyle),it.endStyle&&Oe.to==V&&(ke||(ke=[])).push(it.endStyle,Oe.to),it.title&&((_e||(_e={})).title=it.title),it.attributes)for(var Dt in it.attributes)(_e||(_e={}))[Dt]=it.attributes[Dt];it.collapsed&&(!we||Gs(we.marker,it)<0)&&(we=Oe)}else Oe.from>_&&V>Oe.from&&(V=Oe.from)}if(ke)for(var hr=0;hr=C)break;for(var lr=Math.min(C,V);;){if(O){var xr=_+O.length;if(!we){var Cr=xr>lr?O.slice(0,lr-_):O;o.addToken(o,Cr,H?H+re:re,pe,_+Cr.length==V?ae:"",K,_e)}if(xr>=lr){O=O.slice(lr-_),_=lr;break}_=xr,pe=""}O=p.slice(g,g=c[E++]),H=Xf(c[E++],o.cm.options)}}}i(Sc,"insertLineContent");function Qf(r,o,c){this.line=o,this.rest=Ys(o),this.size=this.rest?vt(lt(this.rest))-c+1:1,this.node=this.text=null,this.hidden=Se(r,o)}i(Qf,"LineView");function Qs(r,o,c){for(var u=[],p,g=o;g2&&g.push((_.bottom+E.top)/2-c.top)}}g.push(c.bottom-c.top)}}i(xs,"ensureLineHeights");function td(r,o,c){if(r.line==o)return{map:r.measure.map,cache:r.measure.cache};if(r.rest){for(var u=0;uc)return{map:r.measure.maps[p],cache:r.measure.caches[p],before:!0}}}i(td,"mapFromLineView");function Qp(r,o){o=Rt(o);var c=vt(o),u=r.display.externalMeasured=new Qf(r.doc,o,c);u.lineN=c;var p=u.built=wc(r,u);return u.text=p.pre,tt(r.display.lineMeasure,p.pre),u}i(Qp,"updateExternalMeasurement");function Kl(r,o,c,u){return w(r,kn(r,o),c,u)}i(Kl,"measureChar");function Gl(r,o){if(o>=r.display.viewFrom&&o=c.lineN&&oo)&&(g=_-C,p=g-1,o>=_&&(y="right")),p!=null){if(u=r[E+2],C==_&&c==(u.insertLeft?"left":"right")&&(y=c),c=="left"&&p==0)for(;E&&r[E-2]==r[E-3]&&r[E-1].insertLeft;)u=r[(E-=3)+2],y="left";if(c=="right"&&p==_-C)for(;E=0&&(c=r[p]).left==c.right;p--);return c}i(U,"getUsefulRect");function gn(r,o,c,u){var p=W(o.map,c,u),g=p.node,y=p.start,C=p.end,_=p.collapse,E;if(g.nodeType==3){for(var O=0;O<4;O++){for(;y&&hi(o.line.text.charAt(p.coverStart+y));)--y;for(;p.coverStart+C0&&(_=u="right");var H;r.options.lineWrapping&&(H=g.getClientRects()).length>1?E=H[u=="right"?H.length-1:0]:E=g.getBoundingClientRect()}if(d&&v<9&&!y&&(!E||!E.left&&!E.right)){var K=g.parentNode.getClientRects()[0];K?E={left:K.left,right:K.left+Cs(r.display),top:K.top,bottom:K.bottom}:E=N}for(var V=E.top-o.rect.top,re=E.bottom-o.rect.top,ae=(V+re)/2,pe=o.view.measure.heights,we=0;we=u.text.length?(_=u.text.length,E="before"):_<=0&&(_=0,E="after"),!C)return y(E=="before"?_-1:_,E=="before");function O(re,ae,pe){var we=C[ae],_e=we.level==1;return y(pe?re-1:re,_e!=pe)}i(O,"getBidi");var H=ee(C,_,E),K=X,V=O(_,H,E=="before");return K!=null&&(V.other=O(_,K,E!="before")),V}i(J,"cursorCoords");function Ae(r,o){var c=0;o=qe(r.doc,o),r.options.lineWrapping||(c=Cs(r.display)*o.ch);var u=Pe(r.doc,o.line),p=vi(u)+ea(r.display);return{left:c,right:c,top:p,bottom:p+u.height}}i(Ae,"estimateCoords");function Je(r,o,c,u,p){var g=ce(r,o,c);return g.xRel=p,u&&(g.outside=u),g}i(Je,"PosWithInfo");function yt(r,o,c){var u=r.doc;if(c+=r.display.viewOffset,c<0)return Je(u.first,0,null,-1,-1);var p=ys(u,c),g=u.first+u.size-1;if(p>g)return Je(u.first+u.size-1,Pe(u,g).text.length,null,1,1);o<0&&(o=0);for(var y=Pe(u,p);;){var C=dw(r,y,p,o,c),_=Ia(y,C.ch+(C.xRel>0||C.outside>0?1:0));if(!_)return C;var E=_.find(1);if(E.line==p)return E;y=Pe(u,p=E.line)}}i(yt,"coordsChar");function Ar(r,o,c,u){u-=Yl(o);var p=o.text.length,g=so(function(y){return w(r,c,y-1).bottom<=u},p,0);return p=so(function(y){return w(r,c,y).top>u},g,p),{begin:g,end:p}}i(Ar,"wrappedLineExtent");function Bt(r,o,c,u){c||(c=kn(r,o));var p=vn(r,o,w(r,c,u),"line").top;return Ar(r,o,c,p)}i(Bt,"wrappedLineExtentChar");function Nc(r,o,c,u){return r.bottom<=c?!1:r.top>c?!0:(u?r.left:r.right)>o}i(Nc,"boxIsAfter");function dw(r,o,c,u,p){p-=vi(o);var g=kn(r,o),y=Yl(o),C=0,_=o.text.length,E=!0,O=Me(o,r.doc.direction);if(O){var H=(r.options.lineWrapping?rd:Hi)(r,o,c,g,O,u,p);E=H.level!=1,C=E?H.from:H.to-1,_=E?H.to:H.from-1}var K=null,V=null,re=so(function(Ie){var Oe=w(r,g,Ie);return Oe.top+=y,Oe.bottom+=y,Nc(Oe,u,p,!1)?(Oe.top<=p&&Oe.left<=u&&(K=Ie,V=Oe),!0):!1},C,_),ae,pe,we=!1;if(V){var _e=u-V.left=ke.bottom?1:0}return re=Bn(o.text,re,1),Je(c,re,pe,we,u-ae)}i(dw,"coordsCharInner");function Hi(r,o,c,u,p,g,y){var C=so(function(H){var K=p[H],V=K.level!=1;return Nc(J(r,ce(c,V?K.to:K.from,V?"before":"after"),"line",o,u),g,y,!0)},0,p.length-1),_=p[C];if(C>0){var E=_.level!=1,O=J(r,ce(c,E?_.from:_.to,E?"after":"before"),"line",o,u);Nc(O,g,y,!0)&&O.top>y&&(_=p[C-1])}return _}i(Hi,"coordsBidiPart");function rd(r,o,c,u,p,g,y){var C=Ar(r,o,u,y),_=C.begin,E=C.end;/\s/.test(o.text.charAt(E-1))&&E--;for(var O=null,H=null,K=0;K=E||V.to<=_)){var re=V.level!=1,ae=w(r,u,re?Math.min(E,V.to)-1:Math.max(_,V.from)).right,pe=aepe)&&(O=V,H=pe)}}return O||(O=p[p.length-1]),O.from<_&&(O={from:_,to:O.to,level:O.level}),O.to>E&&(O={from:O.from,to:E,level:O.level}),O}i(rd,"coordsBidiPartWrapped");var za;function po(r){if(r.cachedTextHeight!=null)return r.cachedTextHeight;if(za==null){za=xe("pre",null,"CodeMirror-line-like");for(var o=0;o<49;++o)za.appendChild(document.createTextNode("x")),za.appendChild(xe("br"));za.appendChild(document.createTextNode("x"))}tt(r.measure,za);var c=za.offsetHeight/50;return c>3&&(r.cachedTextHeight=c),Ye(r.measure),c||1}i(po,"textHeight");function Cs(r){if(r.cachedCharWidth!=null)return r.cachedCharWidth;var o=xe("span","xxxxxxxxxx"),c=xe("pre",[o],"CodeMirror-line-like");tt(r.measure,c);var u=o.getBoundingClientRect(),p=(u.right-u.left)/10;return p>2&&(r.cachedCharWidth=p),p||10}i(Cs,"charWidth");function Xl(r){for(var o=r.display,c={},u={},p=o.gutters.clientLeft,g=o.gutters.firstChild,y=0;g;g=g.nextSibling,++y){var C=r.display.gutterSpecs[y].className;c[C]=g.offsetLeft+g.clientLeft+p,u[C]=g.clientWidth}return{fixedPos:kt(o),gutterTotalWidth:o.gutters.offsetWidth,gutterLeft:c,gutterWidth:u,wrapperWidth:o.wrapper.clientWidth}}i(Xl,"getDimensions");function kt(r){return r.scroller.getBoundingClientRect().left-r.sizer.getBoundingClientRect().left}i(kt,"compensateForHScroll");function mg(r){var o=po(r.display),c=r.options.lineWrapping,u=c&&Math.max(5,r.display.scroller.clientWidth/Cs(r.display)-3);return function(p){if(Se(r.doc,p))return 0;var g=0;if(p.widgets)for(var y=0;y0&&(E=Pe(r.doc,_.line).text).length==_.ch){var O=Ft(E,E.length,r.options.tabSize)-E.length;_=ce(_.line,Math.max(0,Math.round((g-Tc(r.display).left)/Cs(r.display))-O))}return _}i(jo,"posFromMouse");function Wa(r,o){if(o>=r.display.viewTo||(o-=r.display.viewFrom,o<0))return null;for(var c=r.display.view,u=0;uo)&&(p.updateLineNumbers=o),r.curOp.viewChanged=!0,o>=p.viewTo)Di&&Fa(r.doc,o)p.viewFrom?ho(r):(p.viewFrom+=u,p.viewTo+=u);else if(o<=p.viewFrom&&c>=p.viewTo)ho(r);else if(o<=p.viewFrom){var g=mo(r,c,c+u,1);g?(p.view=p.view.slice(g.index),p.viewFrom=g.lineN,p.viewTo+=u):ho(r)}else if(c>=p.viewTo){var y=mo(r,o,o,-1);y?(p.view=p.view.slice(0,y.index),p.viewTo=y.lineN):ho(r)}else{var C=mo(r,o,o,-1),_=mo(r,c,c+u,1);C&&_?(p.view=p.view.slice(0,C.index).concat(Qs(r,C.lineN,_.lineN)).concat(p.view.slice(_.index)),p.viewTo+=u):ho(r)}var E=p.externalMeasured;E&&(c=p.lineN&&o=u.viewTo)){var g=u.view[Wa(r,o)];if(g.node!=null){var y=g.changes||(g.changes=[]);We(y,c)==-1&&y.push(c)}}}i(ta,"regLineChange");function ho(r){r.display.viewFrom=r.display.viewTo=r.doc.first,r.display.view=[],r.display.viewOffset=0}i(ho,"resetView");function mo(r,o,c,u){var p=Wa(r,o),g,y=r.display.view;if(!Di||c==r.doc.first+r.doc.size)return{index:p,lineN:c};for(var C=r.display.viewFrom,_=0;_0){if(p==y.length-1)return null;g=C+y[p].size-o,p++}else g=C-o;o+=g,c+=g}for(;Fa(r.doc,c)!=c;){if(p==(u<0?0:y.length-1))return null;c+=u*y[p-(u<0?1:0)].size,p+=u}return{index:p,lineN:c}}i(mo,"viewCuttingPoint");function id(r,o,c){var u=r.display,p=u.view;p.length==0||o>=u.viewTo||c<=u.viewFrom?(u.view=Qs(r,o,c),u.viewFrom=o):(u.viewFrom>o?u.view=Qs(r,o,u.viewFrom).concat(u.view):u.viewFromc&&(u.view=u.view.slice(0,Wa(r,c)))),u.viewTo=c}i(id,"adjustView");function Jp(r){for(var o=r.display.view,c=0,u=0;u=r.display.viewTo||_.to().line0?y:r.defaultCharWidth())+"px"}if(u.other){var C=c.appendChild(xe("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));C.style.display="",C.style.left=u.other.left+"px",C.style.top=u.other.top+"px",C.style.height=(u.other.bottom-u.other.top)*.85+"px"}}i(od,"drawSelectionCursor");function Ua(r,o){return r.top-o.top||r.left-o.left}i(Ua,"cmpCoords");function gg(r,o,c){var u=r.display,p=r.doc,g=document.createDocumentFragment(),y=Tc(r.display),C=y.left,_=Math.max(u.sizerWidth,$o(r)-u.sizer.offsetLeft)-y.right,E=p.direction=="ltr";function O(ye,ke,Ie,Oe){ke<0&&(ke=0),ke=Math.round(ke),Oe=Math.round(Oe),g.appendChild(xe("div",null,"CodeMirror-selected","position: absolute; left: "+ye+`px; top: `+ke+"px; width: "+(Ie??_-ye)+`px; - height: `+(Oe-ke)+"px"))}i(O,"add");function H(ye,ke,Ie){var Oe=Ae(p,ye),it=Oe.text.length,Dt,hr;function Qt(Cr,Pn){return ie(r,ce(ye,Cr),"div",Oe,Pn)}i(Qt,"coords");function lr(Cr,Pn,rn){var Lr=Bt(r,Oe,null,Cr),_r=Pn=="ltr"==(rn=="after")?"left":"right",ur=rn=="after"?Lr.begin:Lr.end-(/\s/.test(Oe.text.charAt(Lr.end-1))?2:1);return Qt(ur,_r)[_r]}i(lr,"wrapX");var xr=Me(Oe,p.direction);return bl(xr,ke||0,Ie??it,function(Cr,Pn,rn,Lr){var _r=rn=="ltr",ur=Qt(Cr,_r?"left":"right"),$n=Qt(Pn-1,_r?"right":"left"),yu=ke==null&&Cr==0,ha=Ie==null&&Pn==it,wn=Lr==0,Jo=!xr||Lr==xr.length-1;if($n.top-ur.top<=3){var Ur=(E?yu:ha)&&wn,Ph=(E?ha:yu)&&Jo,Zo=Ur?C:(_r?ur:$n).left,ma=Ph?_:(_r?$n:ur).right;O(Zo,ur.top,ma-Zo,ur.bottom)}else{var ga,An,wu,Ah;_r?(ga=E&&yu&&wn?C:ur.left,An=E?_:lr(Cr,rn,"before"),wu=E?C:lr(Pn,rn,"after"),Ah=E&&ha&&Jo?_:$n.right):(ga=E?lr(Cr,rn,"before"):C,An=!E&&yu&&wn?_:ur.right,wu=!E&&ha&&Jo?C:$n.left,Ah=E?lr(Pn,rn,"after"):_),O(ga,ur.top,An-ga,ur.bottom),ur.bottom<$n.top&&O(C,ur.bottom,null,$n.top),O(wu,$n.top,Ah-wu,$n.bottom)}(!Dt||Ua(ur,Dt)<0)&&(Dt=ur),Ua($n,Dt)<0&&(Dt=$n),(!hr||Ua(ur,hr)<0)&&(hr=ur),Ua($n,hr)<0&&(hr=$n)}),{start:Dt,end:hr}}i(H,"drawForLine");var K=o.from(),V=o.to();if(K.line==V.line)H(K.line,K.ch,V.ch);else{var re=Ae(p,K.line),ae=Ae(p,V.line),pe=Rt(re)==Rt(ae),we=H(K.line,K.ch,pe?re.text.length+1:null).end,_e=H(V.line,pe?0:null,V.ch).start;pe&&(we.top<_e.top-2?(O(we.right,we.top,null,we.bottom),O(C,_e.top,_e.left,_e.bottom)):O(we.right,we.top,_e.left-we.right,we.bottom)),we.bottom<_e.top&&O(C,we.bottom,null,_e.top)}c.appendChild(g)}i(gg,"drawSelectionRange");function $a(r){if(r.state.focused){var o=r.display;clearInterval(o.blinker);var c=!0;o.cursorDiv.style.visibility="",r.options.cursorBlinkRate>0?o.blinker=setInterval(function(){r.hasFocus()||Jl(r),o.cursorDiv.style.visibility=(c=!c)?"":"hidden"},r.options.cursorBlinkRate):r.options.cursorBlinkRate<0&&(o.cursorDiv.style.visibility="hidden")}}i($a,"restartBlink");function na(r){r.hasFocus()||(r.display.input.focus(),r.state.focused||eh(r))}i(na,"ensureFocus");function Ql(r){r.state.delayingBlurEvent=!0,setTimeout(function(){r.state.delayingBlurEvent&&(r.state.delayingBlurEvent=!1,r.state.focused&&Jl(r))},100)}i(Ql,"delayBlurEvent");function eh(r,o){r.state.delayingBlurEvent&&!r.state.draggingText&&(r.state.delayingBlurEvent=!1),r.options.readOnly!="nocursor"&&(r.state.focused||(Mt(r,"focus",r,o),r.state.focused=!0,It(r.display.wrapper,"CodeMirror-focused"),!r.curOp&&r.display.selForContextMenu!=r.doc.sel&&(r.display.input.reset(),S&&setTimeout(function(){return r.display.input.reset(!0)},20)),r.display.input.receivedFocus()),$a(r))}i(eh,"onFocus");function Jl(r,o){r.state.delayingBlurEvent||(r.state.focused&&(Mt(r,"blur",r,o),r.state.focused=!1,Ee(r.display.wrapper,"CodeMirror-focused")),clearInterval(r.display.blinker),setTimeout(function(){r.state.focused||(r.display.shift=!1)},150))}i(Jl,"onBlur");function sd(r){for(var o=r.display,c=o.lineDiv.offsetTop,u=Math.max(0,o.scroller.getBoundingClientRect().top),p=o.lineDiv.getBoundingClientRect().top,g=0,y=0;y.005||V<-.005)&&(pr.display.sizerWidth){var ae=Math.ceil(O/Cs(r.display));ae>r.display.maxLineLength&&(r.display.maxLineLength=ae,r.display.maxLine=C.line,r.display.maxLineChanged=!0)}}}Math.abs(g)>2&&(o.scroller.scrollTop+=g)}i(sd,"updateHeightsInViewport");function Pc(r){if(r.widgets)for(var o=0;o=y&&(g=ys(o,vi(Ae(o,_))-r.wrapper.clientHeight),y=_)}return{from:g,to:Math.max(y,g+1)}}i(Va,"visibleLines");function th(r,o){if(!At(r,"scrollCursorIntoView")){var c=r.display,u=c.sizer.getBoundingClientRect(),p=null,g=c.wrapper.ownerDocument;if(o.top+u.top<0?p=!0:o.bottom+u.top>(g.defaultView.innerHeight||g.documentElement.clientHeight)&&(p=!1),p!=null&&!Y){var y=xe("div","\u200B",null,`position: absolute; + height: `+(Oe-ke)+"px"))}i(O,"add");function H(ye,ke,Ie){var Oe=Pe(p,ye),it=Oe.text.length,Dt,hr;function Jt(Cr,An){return ie(r,ce(ye,Cr),"div",Oe,An)}i(Jt,"coords");function lr(Cr,An,rn){var Lr=Bt(r,Oe,null,Cr),_r=An=="ltr"==(rn=="after")?"left":"right",ur=rn=="after"?Lr.begin:Lr.end-(/\s/.test(Oe.text.charAt(Lr.end-1))?2:1);return Jt(ur,_r)[_r]}i(lr,"wrapX");var xr=Me(Oe,p.direction);return bl(xr,ke||0,Ie??it,function(Cr,An,rn,Lr){var _r=rn=="ltr",ur=Jt(Cr,_r?"left":"right"),$n=Jt(An-1,_r?"right":"left"),yu=ke==null&&Cr==0,ha=Ie==null&&An==it,wn=Lr==0,Jo=!xr||Lr==xr.length-1;if($n.top-ur.top<=3){var Ur=(E?yu:ha)&&wn,Ah=(E?ha:yu)&&Jo,Zo=Ur?C:(_r?ur:$n).left,ma=Ah?_:(_r?$n:ur).right;O(Zo,ur.top,ma-Zo,ur.bottom)}else{var ga,Pn,wu,Ph;_r?(ga=E&&yu&&wn?C:ur.left,Pn=E?_:lr(Cr,rn,"before"),wu=E?C:lr(An,rn,"after"),Ph=E&&ha&&Jo?_:$n.right):(ga=E?lr(Cr,rn,"before"):C,Pn=!E&&yu&&wn?_:ur.right,wu=!E&&ha&&Jo?C:$n.left,Ph=E?lr(An,rn,"after"):_),O(ga,ur.top,Pn-ga,ur.bottom),ur.bottom<$n.top&&O(C,ur.bottom,null,$n.top),O(wu,$n.top,Ph-wu,$n.bottom)}(!Dt||Ua(ur,Dt)<0)&&(Dt=ur),Ua($n,Dt)<0&&(Dt=$n),(!hr||Ua(ur,hr)<0)&&(hr=ur),Ua($n,hr)<0&&(hr=$n)}),{start:Dt,end:hr}}i(H,"drawForLine");var K=o.from(),V=o.to();if(K.line==V.line)H(K.line,K.ch,V.ch);else{var re=Pe(p,K.line),ae=Pe(p,V.line),pe=Rt(re)==Rt(ae),we=H(K.line,K.ch,pe?re.text.length+1:null).end,_e=H(V.line,pe?0:null,V.ch).start;pe&&(we.top<_e.top-2?(O(we.right,we.top,null,we.bottom),O(C,_e.top,_e.left,_e.bottom)):O(we.right,we.top,_e.left-we.right,we.bottom)),we.bottom<_e.top&&O(C,we.bottom,null,_e.top)}c.appendChild(g)}i(gg,"drawSelectionRange");function $a(r){if(r.state.focused){var o=r.display;clearInterval(o.blinker);var c=!0;o.cursorDiv.style.visibility="",r.options.cursorBlinkRate>0?o.blinker=setInterval(function(){r.hasFocus()||Jl(r),o.cursorDiv.style.visibility=(c=!c)?"":"hidden"},r.options.cursorBlinkRate):r.options.cursorBlinkRate<0&&(o.cursorDiv.style.visibility="hidden")}}i($a,"restartBlink");function na(r){r.hasFocus()||(r.display.input.focus(),r.state.focused||eh(r))}i(na,"ensureFocus");function Ql(r){r.state.delayingBlurEvent=!0,setTimeout(function(){r.state.delayingBlurEvent&&(r.state.delayingBlurEvent=!1,r.state.focused&&Jl(r))},100)}i(Ql,"delayBlurEvent");function eh(r,o){r.state.delayingBlurEvent&&!r.state.draggingText&&(r.state.delayingBlurEvent=!1),r.options.readOnly!="nocursor"&&(r.state.focused||(Mt(r,"focus",r,o),r.state.focused=!0,It(r.display.wrapper,"CodeMirror-focused"),!r.curOp&&r.display.selForContextMenu!=r.doc.sel&&(r.display.input.reset(),S&&setTimeout(function(){return r.display.input.reset(!0)},20)),r.display.input.receivedFocus()),$a(r))}i(eh,"onFocus");function Jl(r,o){r.state.delayingBlurEvent||(r.state.focused&&(Mt(r,"blur",r,o),r.state.focused=!1,Ee(r.display.wrapper,"CodeMirror-focused")),clearInterval(r.display.blinker),setTimeout(function(){r.state.focused||(r.display.shift=!1)},150))}i(Jl,"onBlur");function sd(r){for(var o=r.display,c=o.lineDiv.offsetTop,u=Math.max(0,o.scroller.getBoundingClientRect().top),p=o.lineDiv.getBoundingClientRect().top,g=0,y=0;y.005||V<-.005)&&(pr.display.sizerWidth){var ae=Math.ceil(O/Cs(r.display));ae>r.display.maxLineLength&&(r.display.maxLineLength=ae,r.display.maxLine=C.line,r.display.maxLineChanged=!0)}}}Math.abs(g)>2&&(o.scroller.scrollTop+=g)}i(sd,"updateHeightsInViewport");function Ac(r){if(r.widgets)for(var o=0;o=y&&(g=ys(o,vi(Pe(o,_))-r.wrapper.clientHeight),y=_)}return{from:g,to:Math.max(y,g+1)}}i(Va,"visibleLines");function th(r,o){if(!Pt(r,"scrollCursorIntoView")){var c=r.display,u=c.sizer.getBoundingClientRect(),p=null,g=c.wrapper.ownerDocument;if(o.top+u.top<0?p=!0:o.bottom+u.top>(g.defaultView.innerHeight||g.documentElement.clientHeight)&&(p=!1),p!=null&&!Y){var y=xe("div","\u200B",null,`position: absolute; top: `+(o.top-c.viewOffset-ea(r.display))+`px; height: `+(o.bottom-o.top+Fi(r)+c.barHeight)+`px; - left: `+o.left+"px; width: "+Math.max(2,o.right-o.left)+"px;");r.display.lineSpace.appendChild(y),y.scrollIntoView(p),r.display.lineSpace.removeChild(y)}}}i(th,"maybeScrollWindow");function pw(r,o,c,u){u==null&&(u=0);var p;!r.options.lineWrapping&&o==c&&(c=o.sticky=="before"?ce(o.line,o.ch+1,"before"):o,o=o.ch?ce(o.line,o.sticky=="before"?o.ch-1:o.ch,"after"):o);for(var g=0;g<5;g++){var y=!1,C=J(r,o),_=!c||c==o?C:J(r,c);p={left:Math.min(C.left,_.left),top:Math.min(C.top,_.top)-u,right:Math.max(C.left,_.left),bottom:Math.max(C.bottom,_.bottom)+u};var E=rh(r,p),O=r.doc.scrollTop,H=r.doc.scrollLeft;if(E.scrollTop!=null&&(Ac(r,E.scrollTop),Math.abs(r.doc.scrollTop-O)>1&&(y=!0)),E.scrollLeft!=null&&(go(r,E.scrollLeft),Math.abs(r.doc.scrollLeft-H)>1&&(y=!0)),!y)break}return p}i(pw,"scrollPosIntoView");function vg(r,o){var c=rh(r,o);c.scrollTop!=null&&Ac(r,c.scrollTop),c.scrollLeft!=null&&go(r,c.scrollLeft)}i(vg,"scrollIntoView");function rh(r,o){var c=r.display,u=po(r.display);o.top<0&&(o.top=0);var p=r.curOp&&r.curOp.scrollTop!=null?r.curOp.scrollTop:c.scroller.scrollTop,g=jl(r),y={};o.bottom-o.top>g&&(o.bottom=o.top+g);var C=r.doc.height+ql(c),_=o.topC-u;if(o.topp+g){var O=Math.min(o.top,(E?C:o.bottom)-g);O!=p&&(y.scrollTop=O)}var H=r.options.fixedGutter?0:c.gutters.offsetWidth,K=r.curOp&&r.curOp.scrollLeft!=null?r.curOp.scrollLeft:c.scroller.scrollLeft-H,V=$o(r)-c.gutters.offsetWidth,re=o.right-o.left>V;return re&&(o.right=o.left+V),o.left<10?y.scrollLeft=0:o.leftV+K-3&&(y.scrollLeft=o.right+(re?0:10)-V),y}i(rh,"calculateScrollPos");function nh(r,o){o!=null&&(ad(r),r.curOp.scrollTop=(r.curOp.scrollTop==null?r.doc.scrollTop:r.curOp.scrollTop)+o)}i(nh,"addToScrollTop");function er(r){ad(r);var o=r.getCursor();r.curOp.scrollToPos={from:o,to:o,margin:r.options.cursorScrollMargin}}i(er,"ensureCursorVisible");function Ar(r,o,c){(o!=null||c!=null)&&ad(r),o!=null&&(r.curOp.scrollLeft=o),c!=null&&(r.curOp.scrollTop=c)}i(Ar,"scrollToCoords");function hw(r,o){ad(r),r.curOp.scrollToPos=o}i(hw,"scrollToRange");function ad(r){var o=r.curOp.scrollToPos;if(o){r.curOp.scrollToPos=null;var c=Pe(r,o.from),u=Pe(r,o.to);ih(r,c,u,o.margin)}}i(ad,"resolveScrollToPos");function ih(r,o,c,u){var p=rh(r,{left:Math.min(o.left,c.left),top:Math.min(o.top,c.top)-u,right:Math.max(o.right,c.right),bottom:Math.max(o.bottom,c.bottom)+u});Ar(r,p.scrollLeft,p.scrollTop)}i(ih,"scrollToCoordsRange");function Ac(r,o){Math.abs(r.doc.scrollTop-o)<2||(n||vo(r,{top:o}),ld(r,o,!0),n&&vo(r),Oc(r,100))}i(Ac,"updateScrollTop");function ld(r,o,c){o=Math.max(0,Math.min(r.display.scroller.scrollHeight-r.display.scroller.clientHeight,o)),!(r.display.scroller.scrollTop==o&&!c)&&(r.doc.scrollTop=o,r.display.scrollbars.setScrollTop(o),r.display.scroller.scrollTop!=o&&(r.display.scroller.scrollTop=o))}i(ld,"setScrollTop");function go(r,o,c,u){o=Math.max(0,Math.min(o,r.display.scroller.scrollWidth-r.display.scroller.clientWidth)),!((c?o==r.doc.scrollLeft:Math.abs(r.doc.scrollLeft-o)<2)&&!u)&&(r.doc.scrollLeft=o,xg(r),r.display.scroller.scrollLeft!=o&&(r.display.scroller.scrollLeft=o),r.display.scrollbars.setScrollLeft(o))}i(go,"setScrollLeft");function qa(r){var o=r.display,c=o.gutters.offsetWidth,u=Math.round(r.doc.height+ql(r.display));return{clientHeight:o.scroller.clientHeight,viewHeight:o.wrapper.clientHeight,scrollWidth:o.scroller.scrollWidth,clientWidth:o.scroller.clientWidth,viewWidth:o.wrapper.clientWidth,barLeft:r.options.fixedGutter?c:0,docHeight:u,scrollHeight:u+Fi(r)+o.barHeight,nativeBarWidth:o.nativeBarWidth,gutterWidth:c}}i(qa,"measureForScrollbars");var Bi=i(function(r,o,c){this.cm=c;var u=this.vert=xe("div",[xe("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),p=this.horiz=xe("div",[xe("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");u.tabIndex=p.tabIndex=-1,r(u),r(p),ze(u,"scroll",function(){u.clientHeight&&o(u.scrollTop,"vertical")}),ze(p,"scroll",function(){p.clientWidth&&o(p.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,d&&v<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")},"NativeScrollbars");Bi.prototype.update=function(r){var o=r.scrollWidth>r.clientWidth+1,c=r.scrollHeight>r.clientHeight+1,u=r.nativeBarWidth;if(c){this.vert.style.display="block",this.vert.style.bottom=o?u+"px":"0";var p=r.viewHeight-(o?u:0);this.vert.firstChild.style.height=Math.max(0,r.scrollHeight-r.clientHeight+p)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(o){this.horiz.style.display="block",this.horiz.style.right=c?u+"px":"0",this.horiz.style.left=r.barLeft+"px";var g=r.viewWidth-r.barLeft-(c?u:0);this.horiz.firstChild.style.width=Math.max(0,r.scrollWidth-r.clientWidth+g)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&r.clientHeight>0&&(u==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:c?u:0,bottom:o?u:0}},Bi.prototype.setScrollLeft=function(r){this.horiz.scrollLeft!=r&&(this.horiz.scrollLeft=r),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Bi.prototype.setScrollTop=function(r){this.vert.scrollTop!=r&&(this.vert.scrollTop=r),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Bi.prototype.zeroWidthHack=function(){var r=D&&!j?"12px":"18px";this.horiz.style.height=this.vert.style.width=r,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new se,this.disableVert=new se},Bi.prototype.enableZeroWidthBar=function(r,o,c){r.style.visibility="";function u(){var p=r.getBoundingClientRect(),g=c=="vert"?document.elementFromPoint(p.right-1,(p.top+p.bottom)/2):document.elementFromPoint((p.right+p.left)/2,p.bottom-1);g!=r?r.style.visibility="hidden":o.set(1e3,u)}i(u,"maybeDisable"),o.set(1e3,u)},Bi.prototype.clear=function(){var r=this.horiz.parentNode;r.removeChild(this.horiz),r.removeChild(this.vert)};var _s=i(function(){},"NullScrollbars");_s.prototype.update=function(){return{bottom:0,right:0}},_s.prototype.setScrollLeft=function(){},_s.prototype.setScrollTop=function(){},_s.prototype.clear=function(){};function Ko(r,o){o||(o=qa(r));var c=r.display.barWidth,u=r.display.barHeight;Lc(r,o);for(var p=0;p<4&&c!=r.display.barWidth||u!=r.display.barHeight;p++)c!=r.display.barWidth&&r.options.lineWrapping&&sd(r),Lc(r,qa(r)),c=r.display.barWidth,u=r.display.barHeight}i(Ko,"updateScrollbars");function Lc(r,o){var c=r.display,u=c.scrollbars.update(o);c.sizer.style.paddingRight=(c.barWidth=u.right)+"px",c.sizer.style.paddingBottom=(c.barHeight=u.bottom)+"px",c.heightForcer.style.borderBottom=u.bottom+"px solid transparent",u.right&&u.bottom?(c.scrollbarFiller.style.display="block",c.scrollbarFiller.style.height=u.bottom+"px",c.scrollbarFiller.style.width=u.right+"px"):c.scrollbarFiller.style.display="",u.bottom&&r.options.coverGutterNextToScrollbar&&r.options.fixedGutter?(c.gutterFiller.style.display="block",c.gutterFiller.style.height=u.bottom+"px",c.gutterFiller.style.width=o.gutterWidth+"px"):c.gutterFiller.style.display=""}i(Lc,"updateScrollbarsInner");var ja={native:Bi,null:_s};function yg(r){r.display.scrollbars&&(r.display.scrollbars.clear(),r.display.scrollbars.addClass&&Ee(r.display.wrapper,r.display.scrollbars.addClass)),r.display.scrollbars=new ja[r.options.scrollbarStyle](function(o){r.display.wrapper.insertBefore(o,r.display.scrollbarFiller),ze(o,"mousedown",function(){r.state.focused&&setTimeout(function(){return r.display.input.focus()},0)}),o.setAttribute("cm-not-content","true")},function(o,c){c=="horizontal"?go(r,o):Ac(r,o)},r),r.display.scrollbars.addClass&&It(r.display.wrapper,r.display.scrollbars.addClass)}i(yg,"initScrollbars");var mw=0;function Ka(r){r.curOp={cm:r,viewChanged:!1,startHeight:r.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++mw,markArrays:null},Jf(r.curOp)}i(Ka,"startOperation");function Ga(r){var o=r.curOp;o&&xc(o,function(c){for(var u=0;u=c.viewTo)||c.maxLineChanged&&o.options.lineWrapping,r.update=r.mustUpdate&&new Go(o,r.mustUpdate&&{top:r.scrollTop,ensure:r.scrollToPos},r.forceUpdate)}i(ud,"endOperation_R1");function Mc(r){r.updatedDisplay=r.mustUpdate&&oh(r.cm,r.update)}i(Mc,"endOperation_W1");function wg(r){var o=r.cm,c=o.display;r.updatedDisplay&&sd(o),r.barMeasure=qa(o),c.maxLineChanged&&!o.options.lineWrapping&&(r.adjustWidthTo=Kl(o,c.maxLine,c.maxLine.text.length).left+3,o.display.sizerWidth=r.adjustWidthTo,r.barMeasure.scrollWidth=Math.max(c.scroller.clientWidth,c.sizer.offsetLeft+r.adjustWidthTo+Fi(o)+o.display.barWidth),r.maxScrollLeft=Math.max(0,c.sizer.offsetLeft+r.adjustWidthTo-$o(o))),(r.updatedDisplay||r.selectionChanged)&&(r.preparedSelection=c.input.prepareSelection())}i(wg,"endOperation_R2");function P(r){var o=r.cm;r.adjustWidthTo!=null&&(o.display.sizer.style.minWidth=r.adjustWidthTo+"px",r.maxScrollLeft=r.display.viewTo)){var c=+new Date+r.options.workTime,u=Ss(r,o.highlightFrontier),p=[];o.iter(u.line,Math.min(o.first+o.size,r.display.viewTo+500),function(g){if(u.line>=r.display.viewFrom){var y=g.styles,C=g.text.length>r.options.maxHighlightLength?Oi(o.mode,u.state):null,_=Ll(r,g,u,!0);C&&(u.state=C),g.styles=_.styles;var E=g.styleClasses,O=_.classes;O?g.styleClasses=O:E&&(g.styleClasses=null);for(var H=!y||y.length!=g.styles.length||E!=O&&(!E||!O||E.bgClass!=O.bgClass||E.textClass!=O.textClass),K=0;!H&&Kc)return Oc(r,r.options.workDelay),!0}),o.highlightFrontier=u.line,o.modeFrontier=Math.max(o.modeFrontier,u.line),p.length&&yn(r,function(){for(var g=0;g=c.viewFrom&&o.visible.to<=c.viewTo&&(c.updateLineNumbers==null||c.updateLineNumbers>=c.viewTo)&&c.renderedView==c.view&&Jp(r)==0)return!1;Cg(r)&&(ho(r),o.dims=Xl(r));var p=u.first+u.size,g=Math.max(o.visible.from-r.options.viewportMargin,u.first),y=Math.min(p,o.visible.to+r.options.viewportMargin);c.viewFromy&&c.viewTo-y<20&&(y=Math.min(p,c.viewTo)),Di&&(g=Fa(r.doc,g),y=Wo(r.doc,y));var C=g!=c.viewFrom||y!=c.viewTo||c.lastWrapHeight!=o.wrapperHeight||c.lastWrapWidth!=o.wrapperWidth;id(r,g,y),c.viewOffset=vi(Ae(r.doc,c.viewFrom)),r.display.mover.style.top=c.viewOffset+"px";var _=Jp(r);if(!C&&_==0&&!o.force&&c.renderedView==c.view&&(c.updateLineNumbers==null||c.updateLineNumbers>=c.viewTo))return!1;var E=ww(r);return _>4&&(c.lineDiv.style.display="none"),xw(r,c.updateLineNumbers,o.dims),_>4&&(c.lineDiv.style.display=""),c.renderedView=c.view,Sw(E),Ye(c.cursorDiv),Ye(c.selectionDiv),c.gutters.style.height=c.sizer.style.minHeight=0,C&&(c.lastWrapHeight=o.wrapperHeight,c.lastWrapWidth=o.wrapperWidth,Oc(r,400)),c.updateLineNumbers=null,!0}i(oh,"updateDisplayIfNeeded");function Sg(r,o){for(var c=o.viewport,u=!0;;u=!1){if(!u||!r.options.lineWrapping||o.oldDisplayWidth==$o(r)){if(c&&c.top!=null&&(c={top:Math.min(r.doc.height+ql(r.display)-jl(r),c.top)}),o.visible=Va(r.display,r.doc,c),o.visible.from>=r.display.viewFrom&&o.visible.to<=r.display.viewTo)break}else u&&(o.visible=Va(r.display,r.doc,c));if(!oh(r,o))break;sd(r);var p=qa(r);ra(r),Ko(r,p),ah(r,p),o.force=!1}o.signal(r,"update",r),(r.display.viewFrom!=r.display.reportedViewFrom||r.display.viewTo!=r.display.reportedViewTo)&&(o.signal(r,"viewportChange",r,r.display.viewFrom,r.display.viewTo),r.display.reportedViewFrom=r.display.viewFrom,r.display.reportedViewTo=r.display.viewTo)}i(Sg,"postUpdateDisplay");function vo(r,o){var c=new Go(r,o);if(oh(r,c)){sd(r),Sg(r,c);var u=qa(r);ra(r),Ko(r,u),ah(r,u),c.finish()}}i(vo,"updateDisplaySimple");function xw(r,o,c){var u=r.display,p=r.options.lineNumbers,g=u.lineDiv,y=g.firstChild;function C(re){var ae=re.nextSibling;return S&&D&&r.display.currentWheelTarget==re?re.style.display="none":re.parentNode.removeChild(re),ae}i(C,"rm");for(var _=u.view,E=u.viewFrom,O=0;O<_.length;O++){var H=_[O];if(!H.hidden)if(!H.node||H.node.parentNode!=g){var K=Xp(r,H,E,c);g.insertBefore(K,y)}else{for(;y!=H.node;)y=C(y);var V=p&&o!=null&&o<=E&&H.lineNumber;H.changes&&(We(H.changes,"gutter")>-1&&(V=!1),Cc(r,H,E,c)),V&&(Ye(H.lineNumber),H.lineNumber.appendChild(document.createTextNode(Oa(r.options,E)))),y=H.node.nextSibling}E+=H.size}for(;y;)y=C(y)}i(xw,"patchDisplay");function sh(r){var o=r.gutters.offsetWidth;r.sizer.style.marginLeft=o+"px",Kt(r,"gutterChanged",r)}i(sh,"updateGutterSpace");function ah(r,o){r.display.sizer.style.minHeight=o.docHeight+"px",r.display.heightForcer.style.top=o.docHeight+"px",r.display.gutters.style.height=o.docHeight+r.display.barHeight+Fi(r)+"px"}i(ah,"setDocumentHeight");function xg(r){var o=r.display,c=o.view;if(!(!o.alignWidgets&&(!o.gutters.firstChild||!r.options.fixedGutter))){for(var u=kt(o)-o.scroller.scrollLeft+r.doc.scrollLeft,p=o.gutters.offsetWidth,g=u+"px",y=0;y=105&&(p.wrapper.style.clipPath="inset(0px)"),p.wrapper.setAttribute("translate","no"),d&&v<8&&(p.gutters.style.zIndex=-1,p.scroller.style.paddingRight=0),!S&&!(n&&L)&&(p.scroller.draggable=!0),r&&(r.appendChild?r.appendChild(p.wrapper):r(p.wrapper)),p.viewFrom=p.viewTo=o.first,p.reportedViewFrom=p.reportedViewTo=o.first,p.view=[],p.renderedView=null,p.externalMeasured=null,p.viewOffset=0,p.lastWrapHeight=p.lastWrapWidth=0,p.updateLineNumbers=null,p.nativeBarWidth=p.barHeight=p.barWidth=0,p.scrollbarsClipped=!1,p.lineNumWidth=p.lineNumInnerWidth=p.lineNumChars=null,p.alignWidgets=!1,p.cachedCharWidth=p.cachedTextHeight=p.cachedPaddingH=null,p.maxLine=null,p.maxLineLength=0,p.maxLineChanged=!1,p.wheelDX=p.wheelDY=p.wheelStartX=p.wheelStartY=null,p.shift=!1,p.selForContextMenu=null,p.activeTouch=null,p.gutterSpecs=yo(u.gutters,u.lineNumbers),_g(p),c.init(p)}i(Cw,"Display");var cd=0,Es=null;d?Es=-.53:n?Es=15:k?Es=-.7:z&&(Es=-1/3);function ia(r){var o=r.wheelDeltaX,c=r.wheelDeltaY;return o==null&&r.detail&&r.axis==r.HORIZONTAL_AXIS&&(o=r.detail),c==null&&r.detail&&r.axis==r.VERTICAL_AXIS?c=r.detail:c==null&&(c=r.wheelDelta),{x:o,y:c}}i(ia,"wheelEventDelta");function _w(r){var o=ia(r);return o.x*=Es,o.y*=Es,o}i(_w,"wheelEventPixels");function Eg(r,o){k&&R==102&&(r.display.chromeScrollHack==null?r.display.sizer.style.pointerEvents="none":clearTimeout(r.display.chromeScrollHack),r.display.chromeScrollHack=setTimeout(function(){r.display.chromeScrollHack=null,r.display.sizer.style.pointerEvents=""},100));var c=ia(o),u=c.x,p=c.y,g=Es;o.deltaMode===0&&(u=o.deltaX,p=o.deltaY,g=1);var y=r.display,C=y.scroller,_=C.scrollWidth>C.clientWidth,E=C.scrollHeight>C.clientHeight;if(u&&_||p&&E){if(p&&D&&S){e:for(var O=o.target,H=y.view;O!=C;O=O.parentNode)for(var K=0;K=0&&Ve(r,u.to())<=0)return c}return-1};var Et=i(function(r,o){this.anchor=r,this.head=o},"Range");Et.prototype.from=function(){return zo(this.anchor,this.head)},Et.prototype.to=function(){return js(this.anchor,this.head)},Et.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function wo(r,o,c){var u=r&&r.options.selectionsMayTouch,p=o[c];o.sort(function(K,V){return Ve(K.from(),V.from())}),c=We(o,p);for(var g=1;g0:_>=0){var E=zo(C.from(),y.from()),O=js(C.to(),y.to()),H=C.empty()?y.from()==y.head:C.from()==C.head;g<=c&&--c,o.splice(--g,2,new Et(H?O:E,H?E:O))}}return new ar(o,c)}i(wo,"normalizeSelection");function oa(r,o){return new ar([new Et(r,o||r)],0)}i(oa,"simpleSelection");function sa(r){return r.text?ce(r.from.line+r.text.length-1,lt(r.text).length+(r.text.length==1?r.from.ch:0)):r.to}i(sa,"changeEnd");function bg(r,o){if(Ve(r,o.from)<0)return r;if(Ve(r,o.to)<=0)return sa(o);var c=r.line+o.text.length-(o.to.line-o.from.line)-1,u=r.ch;return r.line==o.to.line&&(u+=sa(o).ch-o.to.ch),ce(c,u)}i(bg,"adjustForChange");function fd(r,o){for(var c=[],u=0;u1&&r.remove(C.line+1,re-1),r.insert(C.line+1,we)}Kt(r,"change",r,o)}i(tu,"updateDoc");function aa(r,o,c){function u(p,g,y){if(p.linked)for(var C=0;C1&&!r.done[r.done.length-2].ranges)return r.done.pop(),lt(r.done)}i(bw,"lastChangeEvent");function fh(r,o,c,u){var p=r.history;p.undone.length=0;var g=+new Date,y,C;if((p.lastOp==u||p.lastOrigin==o.origin&&o.origin&&(o.origin.charAt(0)=="+"&&p.lastModTime>g-(r.cm?r.cm.options.historyEventDelay:500)||o.origin.charAt(0)=="*"))&&(y=bw(p,p.lastOp==u)))C=lt(y.changes),Ve(o.from,o.to)==0&&Ve(o.from,C.to)==0?C.to=sa(o):y.changes.push(Ts(r,o));else{var _=lt(p.done);for((!_||!_.ranges)&&So(r.sel,p.done),y={changes:[Ts(r,o)],generation:p.generation},p.done.push(y);p.done.length>p.undoDepth;)p.done.shift(),p.done[0].ranges||p.done.shift()}p.done.push(c),p.generation=++p.maxGeneration,p.lastModTime=p.lastSelTime=g,p.lastOp=p.lastSelOp=u,p.lastOrigin=p.lastSelOrigin=o.origin,C||Mt(r,"historyAdded")}i(fh,"addChangeToHistory");function kg(r,o,c,u){var p=o.charAt(0);return p=="*"||p=="+"&&c.ranges.length==u.ranges.length&&c.somethingSelected()==u.somethingSelected()&&new Date-r.history.lastSelTime<=(r.cm?r.cm.options.historyEventDelay:500)}i(kg,"selectionEventCanBeMerged");function Dc(r,o,c,u){var p=r.history,g=u&&u.origin;c==p.lastSelOp||g&&p.lastSelOrigin==g&&(p.lastModTime==p.lastSelTime&&p.lastOrigin==g||kg(r,g,lt(p.done),o))?p.done[p.done.length-1]=o:So(o,p.done),p.lastSelTime=+new Date,p.lastSelOrigin=g,p.lastSelOp=c,u&&u.clearRedo!==!1&&wi(p.undone)}i(Dc,"addSelectionToHistory");function So(r,o){var c=lt(o);c&&c.ranges&&c.equals(r)||o.push(r)}i(So,"pushSelectionToHistory");function dh(r,o,c,u){var p=o["spans_"+r.id],g=0;r.iter(Math.max(r.first,c),Math.min(r.first+r.size,u),function(y){y.markedSpans&&((p||(p=o["spans_"+r.id]={}))[g]=y.markedSpans),++g})}i(dh,"attachLocalSpans");function Tw(r){if(!r)return null;for(var o,c=0;c-1&&(lt(C)[H]=E[H],delete E[H])}}return u}i(Xa,"copyHistoryArray");function Br(r,o,c,u){if(u){var p=r.anchor;if(c){var g=Ve(o,p)<0;g!=Ve(c,p)<0?(p=o,o=c):g!=Ve(o,c)<0&&(o=c)}return new Et(p,o)}else return new Et(c||o,o)}i(Br,"extendRange");function nu(r,o,c,u,p){p==null&&(p=r.cm&&(r.cm.display.shift||r.extend)),en(r,new ar([Br(r.sel.primary(),o,c,p)],0),u)}i(nu,"extendSelection");function ph(r,o,c){for(var u=[],p=r.cm&&(r.cm.display.shift||r.extend),g=0;g=o.ch:C.to>o.ch))){if(p&&(Mt(_,"beforeCursorEnter"),_.explicitlyCleared))if(g.markedSpans){--y;continue}else break;if(!_.atomic)continue;if(c){var H=_.find(u<0?1:-1),K=void 0;if((u<0?O:E)&&(H=Lg(r,H,-u,H&&H.line==o.line?g:null)),H&&H.line==o.line&&(K=Ve(H,c))&&(u<0?K<0:K>0))return iu(r,H,o,u,p)}var V=_.find(u<0?-1:1);return(u<0?E:O)&&(V=Lg(r,V,u,V.line==o.line?g:null)),V?iu(r,V,o,u,p):null}}return o}i(iu,"skipAtomicInner");function ou(r,o,c,u,p){var g=u||1,y=iu(r,o,c,g,p)||!p&&iu(r,o,c,g,!0)||iu(r,o,c,-g,p)||!p&&iu(r,o,c,-g,!0);return y||(r.cantEdit=!0,ce(r.first,0))}i(ou,"skipAtomic");function Lg(r,o,c,u){return c<0&&o.ch==0?o.line>r.first?qe(r,ce(o.line-1)):null:c>0&&o.ch==(u||Ae(r,o.line)).text.length?o.line=0;--p)Mg(r,{from:u[p].from,to:u[p].to,text:p?[""]:o.text,origin:o.origin});else Mg(r,o)}}i(au,"makeChange");function Mg(r,o){if(!(o.text.length==1&&o.text[0]==""&&Ve(o.from,o.to)==0)){var c=fd(r,o);fh(r,o,c,r.cm?r.cm.curOp.id:NaN),Ic(r,o,c,yc(r,o));var u=[];aa(r,function(p,g){!g&&We(u,p.history)==-1&&(Ig(p.history,o),u.push(p.history)),Ic(p,o,null,yc(p,o))})}}i(Mg,"makeChangeInner");function ua(r,o,c){var u=r.cm&&r.cm.state.suppressEdits;if(!(u&&!c)){for(var p=r.history,g,y=r.sel,C=o=="undo"?p.done:p.undone,_=o=="undo"?p.undone:p.done,E=0;E=0;--V){var re=K(V);if(re)return re.v}}}}i(ua,"makeChangeFromHistory");function Og(r,o){if(o!=0&&(r.first+=o,r.sel=new ar(Sr(r.sel.ranges,function(p){return new Et(ce(p.anchor.line+o,p.anchor.ch),ce(p.head.line+o,p.head.ch))}),r.sel.primIndex),r.cm)){Un(r.cm,r.first,r.first-o,o);for(var c=r.cm.display,u=c.viewFrom;ur.lastLine())){if(o.from.lineg&&(o={from:o.from,to:ce(g,Ae(r,g).text.length),text:[o.text[0]],origin:o.origin}),o.removed=lo(r,o.from,o.to),c||(c=fd(r,o)),r.cm?mh(r.cm,o,u):tu(r,o,u),tn(r,c,st),r.cantEdit&&ou(r,ce(r.firstLine(),0))&&(r.cantEdit=!1)}}i(Ic,"makeChangeSingleDoc");function mh(r,o,c){var u=r.doc,p=r.display,g=o.from,y=o.to,C=!1,_=g.line;r.options.lineWrapping||(_=vt(Rt(Ae(u,g.line))),u.iter(_,y.line+1,function(V){if(V==p.maxLine)return C=!0,!0})),u.sel.contains(o.from,o.to)>-1&&Na(r),tu(u,o,c,mg(r)),r.options.lineWrapping||(u.iter(_,g.line+o.text.length,function(V){var re=Ze(V);re>p.maxLineLength&&(p.maxLine=V,p.maxLineLength=re,p.maxLineChanged=!0,C=!1)}),C&&(r.curOp.updateMaxLine=!0)),Ra(u,g.line),Oc(r,400);var E=o.text.length-(y.line-g.line)-1;o.full?Un(r):g.line==y.line&&o.text.length==1&&!eu(r.doc,o)?ta(r,g.line,"text"):Un(r,g.line,y.line+1,E);var O=pn(r,"changes"),H=pn(r,"change");if(H||O){var K={from:g,to:y,text:o.text,removed:o.removed,origin:o.origin};H&&Kt(r,"change",r,K),O&&(r.curOp.changeObjs||(r.curOp.changeObjs=[])).push(K)}r.display.selForContextMenu=null}i(mh,"makeChangeSingleDocInEditor");function Qa(r,o,c,u,p){var g;u||(u=c),Ve(u,c)<0&&(g=[u,c],c=g[0],u=g[1]),typeof o=="string"&&(o=r.splitLines(o)),au(r,{from:c,to:u,text:o,origin:p})}i(Qa,"replaceRange");function Rg(r,o,c,u){c1||!(this.children[0]instanceof Ja))){var C=[];this.collapse(C),this.children=[new Ja(C)],this.children[0].parent=this}},"removeInner"),collapse:i(function(r){for(var o=0;o50){for(var y=p.lines.length%25+25,C=y;C10);r.parent.maybeSpill()}},"maybeSpill"),iterN:i(function(r,o,c){for(var u=0;ur.display.maxLineLength&&(r.display.maxLine=E,r.display.maxLineLength=O,r.display.maxLineChanged=!0)}u!=null&&r&&this.collapsed&&Un(r,u,p+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,r&&Pg(r.doc)),r&&Kt(r,"markerCleared",r,this,u,p),o&&Ga(r),this.parent&&this.parent.clear()}},xo.prototype.find=function(r,o){r==null&&this.type=="bookmark"&&(r=1);for(var c,u,p=0;p0||y==0&&g.clearWhenEmpty!==!1)return g;if(g.replacedWith&&(g.collapsed=!0,g.widgetNode=Xe("span",[g.replacedWith],"CodeMirror-widget"),u.handleMouseEvents||g.widgetNode.setAttribute("cm-ignore-events","true"),u.insertLeft&&(g.widgetNode.insertLeft=!0)),g.collapsed){if(Gp(r,o.line,o,c,g)||o.line!=c.line&&Gp(r,c.line,o,c,g))throw new Error("Inserting collapsed marker partially overlapping an existing one");$p()}g.addToHistory&&fh(r,{from:o,to:c,origin:"markText"},r.sel,NaN);var C=o.line,_=r.cm,E;if(r.iter(C,c.line+1,function(H){_&&g.collapsed&&!_.options.lineWrapping&&Rt(H)==_.display.maxLine&&(E=!0),g.collapsed&&C!=o.line&&Ri(H,0),vc(H,new Il(g,C==o.line?o.ch:null,C==c.line?c.ch:null),r.cm&&r.cm.curOp),++C}),g.collapsed&&r.iter(o.line,c.line+1,function(H){Se(r,H)&&Ri(H,0)}),g.clearOnEnter&&ze(g,"beforeCursorEnter",function(){return g.clear()}),g.readOnly&&(Kf(),(r.history.done.length||r.history.undone.length)&&r.clearHistory()),g.collapsed&&(g.id=++vh,g.atomic=!0),_){if(E&&(_.curOp.updateMaxLine=!0),g.collapsed)Un(_,o.line,c.line+1);else if(g.className||g.startStyle||g.endStyle||g.css||g.attributes||g.title)for(var O=o.line;O<=c.line;O++)ta(_,O,"text");g.atomic&&Pg(_.doc),Kt(_,"markerAdded",_,g)}return g}i(uu,"markText");var cu=i(function(r,o){this.markers=r,this.primary=o;for(var c=0;c=0;_--)au(this,u[_]);C?la(this,C):this.cm&&er(this.cm)}),undo:Hr(function(){ua(this,"undo")}),redo:Hr(function(){ua(this,"redo")}),undoSelection:Hr(function(){ua(this,"undo",!0)}),redoSelection:Hr(function(){ua(this,"redo",!0)}),setExtending:i(function(r){this.extend=r},"setExtending"),getExtending:i(function(){return this.extend},"getExtending"),historySize:i(function(){for(var r=this.history,o=0,c=0,u=0;u=r.ch)&&o.push(p.marker.parent||p.marker)}return o},"findMarksAt"),findMarks:i(function(r,o,c){r=qe(this,r),o=qe(this,o);var u=[],p=r.line;return this.iter(r.line,o.line+1,function(g){var y=g.markedSpans;if(y)for(var C=0;C=_.to||_.from==null&&p!=r.line||_.from!=null&&p==o.line&&_.from>=o.ch)&&(!c||c(_.marker))&&u.push(_.marker.parent||_.marker)}++p}),u},"findMarks"),getAllMarks:i(function(){var r=[];return this.iter(function(o){var c=o.markedSpans;if(c)for(var u=0;ur)return o=r,!0;r-=g,++c}),qe(this,ce(c,o))},"posFromIndex"),indexFromPos:i(function(r){r=qe(this,r);var o=r.ch;if(r.lineo&&(o=r.from),r.to!=null&&r.to-1){o.state.draggingText(r),setTimeout(function(){return o.display.input.focus()},20);return}try{var O=r.dataTransfer.getData("Text");if(O){var H;if(o.state.draggingText&&!o.state.draggingText.copy&&(H=o.listSelections()),tn(o.doc,oa(c,c)),H)for(var K=0;K=0;C--)Qa(r.doc,"",u[C].from,u[C].to,"+delete");er(r)})}i(ca,"deleteNearSelection");function yd(r,o,c){var u=Bn(r.text,o+c,c);return u<0||u>r.text.length?null:u}i(yd,"moveCharLogically");function Wc(r,o,c){var u=yd(r,o.ch,c);return u==null?null:new ce(o.line,u,c<0?"after":"before")}i(Wc,"moveLogically");function Uc(r,o,c,u,p){if(r){o.doc.direction=="rtl"&&(p=-p);var g=Me(c,o.doc.direction);if(g){var y=p<0?lt(g):g[0],C=p<0==(y.level==1),_=C?"after":"before",E;if(y.level>0||o.doc.direction=="rtl"){var O=kn(o,c);E=p<0?c.text.length-1:0;var H=w(o,O,E).top;E=so(function(K){return w(o,O,K).top==H},p<0==(y.level==1)?y.from:y.to-1,E),_=="before"&&(E=yd(c,E,1))}else E=p<0?y.to:y.from;return new ce(u,E,_)}}return new ce(u,p<0?c.text.length:0,p<0?"before":"after")}i(Uc,"endOfLine");function fa(r,o,c,u){var p=Me(o,r.doc.direction);if(!p)return Wc(o,c,u);c.ch>=o.text.length?(c.ch=o.text.length,c.sticky="before"):c.ch<=0&&(c.ch=0,c.sticky="after");var g=ee(p,c.ch,c.sticky),y=p[g];if(r.doc.direction=="ltr"&&y.level%2==0&&(u>0?y.to>c.ch:y.from=y.from&&K>=O.begin)){var V=H?"before":"after";return new ce(c.line,K,V)}}var re=i(function(we,_e,ye){for(var ke=i(function(Dt,hr){return hr?new ce(c.line,C(Dt,1),"before"):new ce(c.line,Dt,"after")},"getRes");we>=0&&we0==(Ie.level!=1),it=Oe?ye.begin:C(ye.end,-1);if(Ie.from<=it&&it0?O.end:C(O.begin,-1);return pe!=null&&!(u>0&&pe==o.text.length)&&(ae=re(u>0?0:p.length-1,u,E(pe)),ae)?ae:null}i(fa,"moveVisually");var $c={selectAll:su,singleSelection:i(function(r){return r.setSelection(r.getCursor("anchor"),r.getCursor("head"),st)},"singleSelection"),killLine:i(function(r){return ca(r,function(o){if(o.empty()){var c=Ae(r.doc,o.head.line).text.length;return o.head.ch==c&&o.head.line0)p=new ce(p.line,p.ch+1),r.replaceRange(g.charAt(p.ch-1)+g.charAt(p.ch-2),ce(p.line,p.ch-2),p,"+transpose");else if(p.line>r.doc.first){var y=Ae(r.doc,p.line-1).text;y&&(p=new ce(p.line,1),r.replaceRange(g.charAt(0)+r.doc.lineSeparator()+y.charAt(y.length-1),ce(p.line-1,y.length-1),p,"+transpose"))}}c.push(new Et(p,p))}r.setSelections(c)})},"transposeChars"),newlineAndIndent:i(function(r){return yn(r,function(){for(var o=r.listSelections(),c=o.length-1;c>=0;c--)r.replaceRange(r.doc.lineSeparator(),o[c].anchor,o[c].head,"+input");o=r.listSelections();for(var u=0;ur&&Ve(o,this.pos)==0&&c==this.button};var Xo,hu;function Kg(r,o){var c=+new Date;return hu&&hu.compare(c,r,o)?(Xo=hu=null,"triple"):Xo&&Xo.compare(c,r,o)?(hu=new pu(c,r,o),Xo=null,"double"):(Xo=new pu(c,r,o),hu=null,"single")}i(Kg,"clickRepeat");function Gg(r){var o=this,c=o.display;if(!(At(o,r)||c.activeTouch&&c.input.supportsTouch())){if(c.input.ensurePolled(),c.shift=r.shiftKey,yi(c,r)){S||(c.scroller.draggable=!1,setTimeout(function(){return c.scroller.draggable=!0},100));return}if(!gu(o,r)){var u=jo(o,r),p=nc(r),g=u?Kg(u,p):"single";yr(o).focus(),p==1&&o.state.selectingText&&o.state.selectingText(r),!(u&&Yg(o,p,u,g,r))&&(p==1?u?qc(o,u,g,r):Aa(r)==c.scroller&&Nr(r):p==2?(u&&nu(o.doc,u),setTimeout(function(){return c.input.focus()},20)):p==3&&(he?o.display.input.onContextMenu(r):Ql(o)))}}}i(Gg,"onMouseDown");function Yg(r,o,c,u,p){var g="Click";return u=="double"?g="Double"+g:u=="triple"&&(g="Triple"+g),g=(o==1?"Left":o==2?"Middle":"Right")+g,Vc(r,Sh(g,p),p,function(y){if(typeof y=="string"&&(y=$c[y]),!y)return!1;var C=!1;try{r.isReadOnly()&&(r.state.suppressEdits=!0),C=y(r,c)!=Zt}finally{r.state.suppressEdits=!1}return C})}i(Yg,"handleMappedButton");function mu(r,o,c){var u=r.getOption("configureMouse"),p=u?u(r,o,c):{};if(p.unit==null){var g=q?c.shiftKey&&c.metaKey:c.altKey;p.unit=g?"rectangle":o=="single"?"char":o=="double"?"word":"line"}return(p.extend==null||r.doc.extend)&&(p.extend=r.doc.extend||c.shiftKey),p.addNew==null&&(p.addNew=D?c.metaKey:c.ctrlKey),p.moveOnDrag==null&&(p.moveOnDrag=!(D?c.altKey:c.ctrlKey)),p}i(mu,"configureMouse");function qc(r,o,c,u){d?setTimeout(wr(na,r),0):r.curOp.focus=ot(vr(r));var p=mu(r,c,u),g=r.doc.sel,y;r.options.dragDrop&&ic&&!r.isReadOnly()&&c=="single"&&(y=g.contains(o))>-1&&(Ve((y=g.ranges[y]).from(),o)<0||o.xRel>0)&&(Ve(y.to(),o)>0||o.xRel<0)?Dw(r,u,o,p):Xg(r,u,o,p)}i(qc,"leftButtonDown");function Dw(r,o,c,u){var p=r.display,g=!1,y=Lt(r,function(E){S&&(p.scroller.draggable=!1),r.state.draggingText=!1,r.state.delayingBlurEvent&&(r.hasFocus()?r.state.delayingBlurEvent=!1:Ql(r)),Yt(p.wrapper.ownerDocument,"mouseup",y),Yt(p.wrapper.ownerDocument,"mousemove",C),Yt(p.scroller,"dragstart",_),Yt(p.scroller,"drop",y),g||(Nr(E),u.addNew||nu(r.doc,c,null,null,u.extend),S&&!z||d&&v==9?setTimeout(function(){p.wrapper.ownerDocument.body.focus({preventScroll:!0}),p.input.focus()},20):p.input.focus())}),C=i(function(E){g=g||Math.abs(o.clientX-E.clientX)+Math.abs(o.clientY-E.clientY)>=10},"mouseMove"),_=i(function(){return g=!0},"dragStart");S&&(p.scroller.draggable=!0),r.state.draggingText=y,y.copy=!u.moveOnDrag,ze(p.wrapper.ownerDocument,"mouseup",y),ze(p.wrapper.ownerDocument,"mousemove",C),ze(p.scroller,"dragstart",_),ze(p.scroller,"drop",y),r.state.delayingBlurEvent=!0,setTimeout(function(){return p.input.focus()},20),p.scroller.dragDrop&&p.scroller.dragDrop()}i(Dw,"leftButtonStartDrag");function bh(r,o,c){if(c=="char")return new Et(o,o);if(c=="word")return r.findWordAt(o);if(c=="line")return new Et(ce(o.line,0),qe(r.doc,ce(o.line+1,0)));var u=c(r,o);return new Et(u.from,u.to)}i(bh,"rangeForUnit");function Xg(r,o,c,u){d&&Ql(r);var p=r.display,g=r.doc;Nr(o);var y,C,_=g.sel,E=_.ranges;if(u.addNew&&!u.extend?(C=g.sel.contains(c),C>-1?y=E[C]:y=new Et(c,c)):(y=g.sel.primary(),C=g.sel.primIndex),u.unit=="rectangle")u.addNew||(y=new Et(c,c)),c=jo(r,o,!0,!0),C=-1;else{var O=bh(r,c,u.unit);u.extend?y=Br(y,O.anchor,O.head,u.extend):y=O}u.addNew?C==-1?(C=E.length,en(g,wo(r,E.concat([y]),C),{scroll:!1,origin:"*mouse"})):E.length>1&&E[C].empty()&&u.unit=="char"&&!u.extend?(en(g,wo(r,E.slice(0,C).concat(E.slice(C+1)),0),{scroll:!1,origin:"*mouse"}),_=g.sel):zi(g,C,y,Fe):(C=0,en(g,new ar([y],0),Fe),_=g.sel);var H=c;function K(ye){if(Ve(H,ye)!=0)if(H=ye,u.unit=="rectangle"){for(var ke=[],Ie=r.options.tabSize,Oe=Ft(Ae(g,c.line).text,c.ch,Ie),it=Ft(Ae(g,ye.line).text,ye.ch,Ie),Dt=Math.min(Oe,it),hr=Math.max(Oe,it),Qt=Math.min(c.line,ye.line),lr=Math.min(r.lastLine(),Math.max(c.line,ye.line));Qt<=lr;Qt++){var xr=Ae(g,Qt).text,Cr=bn(xr,Dt,Ie);Dt==hr?ke.push(new Et(ce(Qt,Cr),ce(Qt,Cr))):xr.length>Cr&&ke.push(new Et(ce(Qt,Cr),ce(Qt,bn(xr,hr,Ie))))}ke.length||ke.push(new Et(c,c)),en(g,wo(r,_.ranges.slice(0,C).concat(ke),C),{origin:"*mouse",scroll:!1}),r.scrollIntoView(ye)}else{var Pn=y,rn=bh(r,ye,u.unit),Lr=Pn.anchor,_r;Ve(rn.anchor,Lr)>0?(_r=rn.head,Lr=zo(Pn.from(),rn.anchor)):(_r=rn.anchor,Lr=js(Pn.to(),rn.head));var ur=_.ranges.slice(0);ur[C]=Sd(r,new Et(qe(g,Lr),_r)),en(g,wo(r,ur,C),Fe)}}i(K,"extendTo");var V=p.wrapper.getBoundingClientRect(),re=0;function ae(ye){var ke=++re,Ie=jo(r,ye,!0,u.unit=="rectangle");if(Ie)if(Ve(Ie,H)!=0){r.curOp.focus=ot(vr(r)),K(Ie);var Oe=Va(p,g);(Ie.line>=Oe.to||Ie.lineV.bottom?20:0;it&&setTimeout(Lt(r,function(){re==ke&&(p.scroller.scrollTop+=it,ae(ye))}),50)}}i(ae,"extend");function pe(ye){r.state.selectingText=!1,re=1/0,ye&&(Nr(ye),p.input.focus()),Yt(p.wrapper.ownerDocument,"mousemove",we),Yt(p.wrapper.ownerDocument,"mouseup",_e),g.history.lastSelOrigin=null}i(pe,"done");var we=Lt(r,function(ye){ye.buttons===0||!nc(ye)?pe(ye):ae(ye)}),_e=Lt(r,pe);r.state.selectingText=_e,ze(p.wrapper.ownerDocument,"mousemove",we),ze(p.wrapper.ownerDocument,"mouseup",_e)}i(Xg,"leftButtonSelect");function Sd(r,o){var c=o.anchor,u=o.head,p=Ae(r.doc,c.line);if(Ve(c,u)==0&&c.sticky==u.sticky)return o;var g=Me(p);if(!g)return o;var y=ee(g,c.ch,c.sticky),C=g[y];if(C.from!=c.ch&&C.to!=c.ch)return o;var _=y+(C.from==c.ch==(C.level!=1)?0:1);if(_==0||_==g.length)return o;var E;if(u.line!=c.line)E=(u.line-c.line)*(r.doc.direction=="ltr"?1:-1)>0;else{var O=ee(g,u.ch,u.sticky),H=O-y||(u.ch-c.ch)*(C.level==1?-1:1);O==_-1||O==_?E=H<0:E=H>0}var K=g[_+(E?-1:0)],V=E==(K.level==1),re=V?K.from:K.to,ae=V?"after":"before";return c.ch==re&&c.sticky==ae?o:new Et(new ce(c.line,re,ae),u)}i(Sd,"bidiSimplify");function Th(r,o,c,u){var p,g;if(o.touches)p=o.touches[0].clientX,g=o.touches[0].clientY;else try{p=o.clientX,g=o.clientY}catch{return!1}if(p>=Math.floor(r.display.gutters.getBoundingClientRect().right))return!1;u&&Nr(o);var y=r.display,C=y.lineDiv.getBoundingClientRect();if(g>C.bottom||!pn(r,c))return Tn(o);g-=C.top-y.viewOffset;for(var _=0;_=p){var O=ys(r.doc,g),H=r.display.gutterSpecs[_];return Mt(r,c,r,O,H.className,o),Tn(o)}}}i(Th,"gutterEvent");function gu(r,o){return Th(r,o,"gutterClick",!0)}i(gu,"clickInGutter");function xd(r,o){yi(r.display,o)||Cd(r,o)||At(r,o,"contextmenu")||he||r.display.input.onContextMenu(o)}i(xd,"onContextMenu");function Cd(r,o){return pn(r,"gutterContextMenu")?Th(r,o,"gutterContextMenu",!1):!1}i(Cd,"contextMenuInGutter");function Qg(r){r.display.wrapper.className=r.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+r.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Vo(r)}i(Qg,"themeChanged");var rl={toString:i(function(){return"CodeMirror.Init"},"toString")},jc={},Kc={};function kh(r){var o=r.optionHandlers;function c(u,p,g,y){r.defaults[u]=p,g&&(o[u]=y?function(C,_,E){E!=rl&&g(C,_,E)}:g)}i(c,"option"),r.defineOption=c,r.Init=rl,c("value","",function(u,p){return u.setValue(p)},!0),c("mode",null,function(u,p){u.doc.modeOption=p,uh(u)},!0),c("indentUnit",2,uh,!0),c("indentWithTabs",!1),c("smartIndent",!0),c("tabSize",4,function(u){Ya(u),Vo(u),Un(u)},!0),c("lineSeparator",null,function(u,p){if(u.doc.lineSep=p,!!p){var g=[],y=u.doc.first;u.doc.iter(function(_){for(var E=0;;){var O=_.text.indexOf(p,E);if(O==-1)break;E=O+p.length,g.push(ce(y,O))}y++});for(var C=g.length-1;C>=0;C--)Qa(u.doc,p,g[C],ce(g[C].line,g[C].ch+p.length))}}),c("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(u,p,g){u.state.specialChars=new RegExp(p.source+(p.test(" ")?"":"| "),"g"),g!=rl&&u.refresh()}),c("specialCharPlaceholder",jt,function(u){return u.refresh()},!0),c("electricChars",!0),c("inputStyle",L?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),c("spellcheck",!1,function(u,p){return u.getInputField().spellcheck=p},!0),c("autocorrect",!1,function(u,p){return u.getInputField().autocorrect=p},!0),c("autocapitalize",!1,function(u,p){return u.getInputField().autocapitalize=p},!0),c("rtlMoveVisually",!te),c("wholeLineUpdateBefore",!0),c("theme","default",function(u){Qg(u),Rc(u)},!0),c("keyMap","default",function(u,p,g){var y=zc(p),C=g!=rl&&zc(g);C&&C.detach&&C.detach(u,y),y.attach&&y.attach(u,C||null)}),c("extraKeys",null),c("configureMouse",null),c("lineWrapping",!1,Jg,!0),c("gutters",[],function(u,p){u.display.gutterSpecs=yo(p,u.options.lineNumbers),Rc(u)},!0),c("fixedGutter",!0,function(u,p){u.display.gutters.style.left=p?kt(u.display)+"px":"0",u.refresh()},!0),c("coverGutterNextToScrollbar",!1,function(u){return Ko(u)},!0),c("scrollbarStyle","native",function(u){yg(u),Ko(u),u.display.scrollbars.setScrollTop(u.doc.scrollTop),u.display.scrollbars.setScrollLeft(u.doc.scrollLeft)},!0),c("lineNumbers",!1,function(u,p){u.display.gutterSpecs=yo(u.options.gutters,p),Rc(u)},!0),c("firstLineNumber",1,Rc,!0),c("lineNumberFormatter",function(u){return u},Rc,!0),c("showCursorWhenSelecting",!1,ra,!0),c("resetSelectionOnContextMenu",!0),c("lineWiseCopyCut",!0),c("pasteLinesPerSelection",!0),c("selectionsMayTouch",!1),c("readOnly",!1,function(u,p){p=="nocursor"&&(Jl(u),u.display.input.blur()),u.display.input.readOnlyChanged(p)}),c("screenReaderLabel",null,function(u,p){p=p===""?null:p,u.display.input.screenReaderLabelChanged(p)}),c("disableInput",!1,function(u,p){p||u.display.input.reset()},!0),c("dragDrop",!0,Iw),c("allowDropFileTypes",null),c("cursorBlinkRate",530),c("cursorScrollMargin",0),c("cursorHeight",1,ra,!0),c("singleCursorHeightPerLine",!0,ra,!0),c("workTime",100),c("workDelay",100),c("flattenSpans",!0,Ya,!0),c("addModeClass",!1,Ya,!0),c("pollInterval",100),c("undoDepth",200,function(u,p){return u.doc.history.undoDepth=p}),c("historyEventDelay",1250),c("viewportMargin",10,function(u){return u.refresh()},!0),c("maxHighlightLength",1e4,Ya,!0),c("moveInputWithCursor",!0,function(u,p){p||u.display.input.resetPosition()}),c("tabindex",null,function(u,p){return u.display.input.getField().tabIndex=p||""}),c("autofocus",null),c("direction","ltr",function(u,p){return u.doc.setDirection(p)},!0),c("phrases",null)}i(kh,"defineOptions");function Iw(r,o,c){var u=c&&c!=rl;if(!o!=!u){var p=r.display.dragFunctions,g=o?ze:Yt;g(r.display.scroller,"dragstart",p.start),g(r.display.scroller,"dragenter",p.enter),g(r.display.scroller,"dragover",p.over),g(r.display.scroller,"dragleave",p.leave),g(r.display.scroller,"drop",p.drop)}}i(Iw,"dragDropChanged");function Jg(r){r.options.lineWrapping?(It(r.display.wrapper,"CodeMirror-wrap"),r.display.sizer.style.minWidth="",r.display.sizerWidth=null):(Ee(r.display.wrapper,"CodeMirror-wrap"),Hl(r)),nd(r),Un(r),Vo(r),setTimeout(function(){return Ko(r)},100)}i(Jg,"wrappingChanged");function wt(r,o){var c=this;if(!(this instanceof wt))return new wt(r,o);this.options=o=o?Gt(o):{},Gt(jc,o,!1);var u=o.value;typeof u=="string"?u=new Nn(u,o.mode,null,o.lineSeparator,o.direction):o.mode&&(u.modeOption=o.mode),this.doc=u;var p=new wt.inputStyles[o.inputStyle](this),g=this.display=new Cw(r,u,p,o);g.wrapper.CodeMirror=this,Qg(this),o.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),yg(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new se,keySeq:null,specialChars:null},o.autofocus&&!L&&g.input.focus(),d&&v<11&&setTimeout(function(){return c.display.input.reset(!0)},20),Zg(this),$g(),Ka(this),this.curOp.forceUpdate=!0,ch(this,u),o.autofocus&&!L||this.hasFocus()?setTimeout(function(){c.hasFocus()&&!c.state.focused&&eh(c)},20):Jl(this);for(var y in Kc)Kc.hasOwnProperty(y)&&Kc[y](this,o[y],rl);Cg(this),o.finishInit&&o.finishInit(this);for(var C=0;C<_d.length;++C)_d[C](this);Ga(this),S&&o.lineWrapping&&getComputedStyle(g.lineDiv).textRendering=="optimizelegibility"&&(g.lineDiv.style.textRendering="auto")}i(wt,"CodeMirror"),wt.defaults=jc,wt.optionHandlers=Kc;function Zg(r){var o=r.display;ze(o.scroller,"mousedown",Lt(r,Gg)),d&&v<11?ze(o.scroller,"dblclick",Lt(r,function(_){if(!At(r,_)){var E=jo(r,_);if(!(!E||gu(r,_)||yi(r.display,_))){Nr(_);var O=r.findWordAt(E);nu(r.doc,O.anchor,O.head)}}})):ze(o.scroller,"dblclick",function(_){return At(r,_)||Nr(_)}),ze(o.scroller,"contextmenu",function(_){return xd(r,_)}),ze(o.input.getField(),"contextmenu",function(_){o.scroller.contains(_.target)||xd(r,_)});var c,u={end:0};function p(){o.activeTouch&&(c=setTimeout(function(){return o.activeTouch=null},1e3),u=o.activeTouch,u.end=+new Date)}i(p,"finishTouch");function g(_){if(_.touches.length!=1)return!1;var E=_.touches[0];return E.radiusX<=1&&E.radiusY<=1}i(g,"isMouseLikeTouchEvent");function y(_,E){if(E.left==null)return!0;var O=E.left-_.left,H=E.top-_.top;return O*O+H*H>20*20}i(y,"farAway"),ze(o.scroller,"touchstart",function(_){if(!At(r,_)&&!g(_)&&!gu(r,_)){o.input.ensurePolled(),clearTimeout(c);var E=+new Date;o.activeTouch={start:E,moved:!1,prev:E-u.end<=300?u:null},_.touches.length==1&&(o.activeTouch.left=_.touches[0].pageX,o.activeTouch.top=_.touches[0].pageY)}}),ze(o.scroller,"touchmove",function(){o.activeTouch&&(o.activeTouch.moved=!0)}),ze(o.scroller,"touchend",function(_){var E=o.activeTouch;if(E&&!yi(o,_)&&E.left!=null&&!E.moved&&new Date-E.start<300){var O=r.coordsChar(o.activeTouch,"page"),H;!E.prev||y(E,E.prev)?H=new Et(O,O):!E.prev.prev||y(E,E.prev.prev)?H=r.findWordAt(O):H=new Et(ce(O.line,0),qe(r.doc,ce(O.line+1,0))),r.setSelection(H.anchor,H.head),r.focus(),Nr(_)}p()}),ze(o.scroller,"touchcancel",p),ze(o.scroller,"scroll",function(){o.scroller.clientHeight&&(Ac(r,o.scroller.scrollTop),go(r,o.scroller.scrollLeft,!0),Mt(r,"scroll",r))}),ze(o.scroller,"mousewheel",function(_){return Eg(r,_)}),ze(o.scroller,"DOMMouseScroll",function(_){return Eg(r,_)}),ze(o.wrapper,"scroll",function(){return o.wrapper.scrollTop=o.wrapper.scrollLeft=0}),o.dragFunctions={enter:i(function(_){At(r,_)||Pa(_)},"enter"),over:i(function(_){At(r,_)||(ut(r,_),Pa(_))},"over"),start:i(function(_){return wh(r,_)},"start"),drop:Lt(r,Nw),leave:i(function(_){At(r,_)||Wg(r)},"leave")};var C=o.input.getField();ze(C,"keyup",function(_){return Co.call(r,_)}),ze(C,"keydown",Lt(r,Eh)),ze(C,"keypress",Lt(r,jg)),ze(C,"focus",function(_){return eh(r,_)}),ze(C,"blur",function(_){return Jl(r,_)})}i(Zg,"registerEventHandlers");var _d=[];wt.defineInitHook=function(r){return _d.push(r)};function Gc(r,o,c,u){var p=r.doc,g;c==null&&(c="add"),c=="smart"&&(p.mode.indent?g=Ss(r,o).state:c="prev");var y=r.options.tabSize,C=Ae(p,o),_=Ft(C.text,null,y);C.stateAfter&&(C.stateAfter=null);var E=C.text.match(/^\s*/)[0],O;if(!u&&!/\S/.test(C.text))O=0,c="not";else if(c=="smart"&&(O=p.mode.indent(g,C.text.slice(E.length),C.text),O==Zt||O>150)){if(!u)return;c="prev"}c=="prev"?o>p.first?O=Ft(Ae(p,o-1).text,null,y):O=0:c=="add"?O=_+r.options.indentUnit:c=="subtract"?O=_-r.options.indentUnit:typeof c=="number"&&(O=_+c),O=Math.max(0,O);var H="",K=0;if(r.options.indentWithTabs)for(var V=Math.floor(O/y);V;--V)K+=y,H+=" ";if(Ky,_=kl(o),E=null;if(C&&u.ranges.length>1)if(Wi&&Wi.text.join(` -`)==o){if(u.ranges.length%Wi.text.length==0){E=[];for(var O=0;O=0;K--){var V=u.ranges[K],re=V.from(),ae=V.to();V.empty()&&(c&&c>0?re=ce(re.line,re.ch-c):r.state.overwrite&&!C?ae=ce(ae.line,Math.min(Ae(g,ae.line).text.length,ae.ch+lt(_).length)):C&&Wi&&Wi.lineWise&&Wi.text.join(` + left: `+o.left+"px; width: "+Math.max(2,o.right-o.left)+"px;");r.display.lineSpace.appendChild(y),y.scrollIntoView(p),r.display.lineSpace.removeChild(y)}}}i(th,"maybeScrollWindow");function pw(r,o,c,u){u==null&&(u=0);var p;!r.options.lineWrapping&&o==c&&(c=o.sticky=="before"?ce(o.line,o.ch+1,"before"):o,o=o.ch?ce(o.line,o.sticky=="before"?o.ch-1:o.ch,"after"):o);for(var g=0;g<5;g++){var y=!1,C=J(r,o),_=!c||c==o?C:J(r,c);p={left:Math.min(C.left,_.left),top:Math.min(C.top,_.top)-u,right:Math.max(C.left,_.left),bottom:Math.max(C.bottom,_.bottom)+u};var E=rh(r,p),O=r.doc.scrollTop,H=r.doc.scrollLeft;if(E.scrollTop!=null&&(Pc(r,E.scrollTop),Math.abs(r.doc.scrollTop-O)>1&&(y=!0)),E.scrollLeft!=null&&(go(r,E.scrollLeft),Math.abs(r.doc.scrollLeft-H)>1&&(y=!0)),!y)break}return p}i(pw,"scrollPosIntoView");function vg(r,o){var c=rh(r,o);c.scrollTop!=null&&Pc(r,c.scrollTop),c.scrollLeft!=null&&go(r,c.scrollLeft)}i(vg,"scrollIntoView");function rh(r,o){var c=r.display,u=po(r.display);o.top<0&&(o.top=0);var p=r.curOp&&r.curOp.scrollTop!=null?r.curOp.scrollTop:c.scroller.scrollTop,g=jl(r),y={};o.bottom-o.top>g&&(o.bottom=o.top+g);var C=r.doc.height+ql(c),_=o.topC-u;if(o.topp+g){var O=Math.min(o.top,(E?C:o.bottom)-g);O!=p&&(y.scrollTop=O)}var H=r.options.fixedGutter?0:c.gutters.offsetWidth,K=r.curOp&&r.curOp.scrollLeft!=null?r.curOp.scrollLeft:c.scroller.scrollLeft-H,V=$o(r)-c.gutters.offsetWidth,re=o.right-o.left>V;return re&&(o.right=o.left+V),o.left<10?y.scrollLeft=0:o.leftV+K-3&&(y.scrollLeft=o.right+(re?0:10)-V),y}i(rh,"calculateScrollPos");function nh(r,o){o!=null&&(ad(r),r.curOp.scrollTop=(r.curOp.scrollTop==null?r.doc.scrollTop:r.curOp.scrollTop)+o)}i(nh,"addToScrollTop");function tr(r){ad(r);var o=r.getCursor();r.curOp.scrollToPos={from:o,to:o,margin:r.options.cursorScrollMargin}}i(tr,"ensureCursorVisible");function Pr(r,o,c){(o!=null||c!=null)&&ad(r),o!=null&&(r.curOp.scrollLeft=o),c!=null&&(r.curOp.scrollTop=c)}i(Pr,"scrollToCoords");function hw(r,o){ad(r),r.curOp.scrollToPos=o}i(hw,"scrollToRange");function ad(r){var o=r.curOp.scrollToPos;if(o){r.curOp.scrollToPos=null;var c=Ae(r,o.from),u=Ae(r,o.to);ih(r,c,u,o.margin)}}i(ad,"resolveScrollToPos");function ih(r,o,c,u){var p=rh(r,{left:Math.min(o.left,c.left),top:Math.min(o.top,c.top)-u,right:Math.max(o.right,c.right),bottom:Math.max(o.bottom,c.bottom)+u});Pr(r,p.scrollLeft,p.scrollTop)}i(ih,"scrollToCoordsRange");function Pc(r,o){Math.abs(r.doc.scrollTop-o)<2||(n||vo(r,{top:o}),ld(r,o,!0),n&&vo(r),Oc(r,100))}i(Pc,"updateScrollTop");function ld(r,o,c){o=Math.max(0,Math.min(r.display.scroller.scrollHeight-r.display.scroller.clientHeight,o)),!(r.display.scroller.scrollTop==o&&!c)&&(r.doc.scrollTop=o,r.display.scrollbars.setScrollTop(o),r.display.scroller.scrollTop!=o&&(r.display.scroller.scrollTop=o))}i(ld,"setScrollTop");function go(r,o,c,u){o=Math.max(0,Math.min(o,r.display.scroller.scrollWidth-r.display.scroller.clientWidth)),!((c?o==r.doc.scrollLeft:Math.abs(r.doc.scrollLeft-o)<2)&&!u)&&(r.doc.scrollLeft=o,xg(r),r.display.scroller.scrollLeft!=o&&(r.display.scroller.scrollLeft=o),r.display.scrollbars.setScrollLeft(o))}i(go,"setScrollLeft");function qa(r){var o=r.display,c=o.gutters.offsetWidth,u=Math.round(r.doc.height+ql(r.display));return{clientHeight:o.scroller.clientHeight,viewHeight:o.wrapper.clientHeight,scrollWidth:o.scroller.scrollWidth,clientWidth:o.scroller.clientWidth,viewWidth:o.wrapper.clientWidth,barLeft:r.options.fixedGutter?c:0,docHeight:u,scrollHeight:u+Fi(r)+o.barHeight,nativeBarWidth:o.nativeBarWidth,gutterWidth:c}}i(qa,"measureForScrollbars");var Bi=i(function(r,o,c){this.cm=c;var u=this.vert=xe("div",[xe("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),p=this.horiz=xe("div",[xe("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");u.tabIndex=p.tabIndex=-1,r(u),r(p),ze(u,"scroll",function(){u.clientHeight&&o(u.scrollTop,"vertical")}),ze(p,"scroll",function(){p.clientWidth&&o(p.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,d&&v<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")},"NativeScrollbars");Bi.prototype.update=function(r){var o=r.scrollWidth>r.clientWidth+1,c=r.scrollHeight>r.clientHeight+1,u=r.nativeBarWidth;if(c){this.vert.style.display="block",this.vert.style.bottom=o?u+"px":"0";var p=r.viewHeight-(o?u:0);this.vert.firstChild.style.height=Math.max(0,r.scrollHeight-r.clientHeight+p)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(o){this.horiz.style.display="block",this.horiz.style.right=c?u+"px":"0",this.horiz.style.left=r.barLeft+"px";var g=r.viewWidth-r.barLeft-(c?u:0);this.horiz.firstChild.style.width=Math.max(0,r.scrollWidth-r.clientWidth+g)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&r.clientHeight>0&&(u==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:c?u:0,bottom:o?u:0}},Bi.prototype.setScrollLeft=function(r){this.horiz.scrollLeft!=r&&(this.horiz.scrollLeft=r),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Bi.prototype.setScrollTop=function(r){this.vert.scrollTop!=r&&(this.vert.scrollTop=r),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Bi.prototype.zeroWidthHack=function(){var r=D&&!j?"12px":"18px";this.horiz.style.height=this.vert.style.width=r,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new se,this.disableVert=new se},Bi.prototype.enableZeroWidthBar=function(r,o,c){r.style.visibility="";function u(){var p=r.getBoundingClientRect(),g=c=="vert"?document.elementFromPoint(p.right-1,(p.top+p.bottom)/2):document.elementFromPoint((p.right+p.left)/2,p.bottom-1);g!=r?r.style.visibility="hidden":o.set(1e3,u)}i(u,"maybeDisable"),o.set(1e3,u)},Bi.prototype.clear=function(){var r=this.horiz.parentNode;r.removeChild(this.horiz),r.removeChild(this.vert)};var _s=i(function(){},"NullScrollbars");_s.prototype.update=function(){return{bottom:0,right:0}},_s.prototype.setScrollLeft=function(){},_s.prototype.setScrollTop=function(){},_s.prototype.clear=function(){};function Ko(r,o){o||(o=qa(r));var c=r.display.barWidth,u=r.display.barHeight;Lc(r,o);for(var p=0;p<4&&c!=r.display.barWidth||u!=r.display.barHeight;p++)c!=r.display.barWidth&&r.options.lineWrapping&&sd(r),Lc(r,qa(r)),c=r.display.barWidth,u=r.display.barHeight}i(Ko,"updateScrollbars");function Lc(r,o){var c=r.display,u=c.scrollbars.update(o);c.sizer.style.paddingRight=(c.barWidth=u.right)+"px",c.sizer.style.paddingBottom=(c.barHeight=u.bottom)+"px",c.heightForcer.style.borderBottom=u.bottom+"px solid transparent",u.right&&u.bottom?(c.scrollbarFiller.style.display="block",c.scrollbarFiller.style.height=u.bottom+"px",c.scrollbarFiller.style.width=u.right+"px"):c.scrollbarFiller.style.display="",u.bottom&&r.options.coverGutterNextToScrollbar&&r.options.fixedGutter?(c.gutterFiller.style.display="block",c.gutterFiller.style.height=u.bottom+"px",c.gutterFiller.style.width=o.gutterWidth+"px"):c.gutterFiller.style.display=""}i(Lc,"updateScrollbarsInner");var ja={native:Bi,null:_s};function yg(r){r.display.scrollbars&&(r.display.scrollbars.clear(),r.display.scrollbars.addClass&&Ee(r.display.wrapper,r.display.scrollbars.addClass)),r.display.scrollbars=new ja[r.options.scrollbarStyle](function(o){r.display.wrapper.insertBefore(o,r.display.scrollbarFiller),ze(o,"mousedown",function(){r.state.focused&&setTimeout(function(){return r.display.input.focus()},0)}),o.setAttribute("cm-not-content","true")},function(o,c){c=="horizontal"?go(r,o):Pc(r,o)},r),r.display.scrollbars.addClass&&It(r.display.wrapper,r.display.scrollbars.addClass)}i(yg,"initScrollbars");var mw=0;function Ka(r){r.curOp={cm:r,viewChanged:!1,startHeight:r.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++mw,markArrays:null},Jf(r.curOp)}i(Ka,"startOperation");function Ga(r){var o=r.curOp;o&&xc(o,function(c){for(var u=0;u=c.viewTo)||c.maxLineChanged&&o.options.lineWrapping,r.update=r.mustUpdate&&new Go(o,r.mustUpdate&&{top:r.scrollTop,ensure:r.scrollToPos},r.forceUpdate)}i(ud,"endOperation_R1");function Mc(r){r.updatedDisplay=r.mustUpdate&&oh(r.cm,r.update)}i(Mc,"endOperation_W1");function wg(r){var o=r.cm,c=o.display;r.updatedDisplay&&sd(o),r.barMeasure=qa(o),c.maxLineChanged&&!o.options.lineWrapping&&(r.adjustWidthTo=Kl(o,c.maxLine,c.maxLine.text.length).left+3,o.display.sizerWidth=r.adjustWidthTo,r.barMeasure.scrollWidth=Math.max(c.scroller.clientWidth,c.sizer.offsetLeft+r.adjustWidthTo+Fi(o)+o.display.barWidth),r.maxScrollLeft=Math.max(0,c.sizer.offsetLeft+r.adjustWidthTo-$o(o))),(r.updatedDisplay||r.selectionChanged)&&(r.preparedSelection=c.input.prepareSelection())}i(wg,"endOperation_R2");function A(r){var o=r.cm;r.adjustWidthTo!=null&&(o.display.sizer.style.minWidth=r.adjustWidthTo+"px",r.maxScrollLeft=r.display.viewTo)){var c=+new Date+r.options.workTime,u=Ss(r,o.highlightFrontier),p=[];o.iter(u.line,Math.min(o.first+o.size,r.display.viewTo+500),function(g){if(u.line>=r.display.viewFrom){var y=g.styles,C=g.text.length>r.options.maxHighlightLength?Oi(o.mode,u.state):null,_=Ll(r,g,u,!0);C&&(u.state=C),g.styles=_.styles;var E=g.styleClasses,O=_.classes;O?g.styleClasses=O:E&&(g.styleClasses=null);for(var H=!y||y.length!=g.styles.length||E!=O&&(!E||!O||E.bgClass!=O.bgClass||E.textClass!=O.textClass),K=0;!H&&Kc)return Oc(r,r.options.workDelay),!0}),o.highlightFrontier=u.line,o.modeFrontier=Math.max(o.modeFrontier,u.line),p.length&&yn(r,function(){for(var g=0;g=c.viewFrom&&o.visible.to<=c.viewTo&&(c.updateLineNumbers==null||c.updateLineNumbers>=c.viewTo)&&c.renderedView==c.view&&Jp(r)==0)return!1;Cg(r)&&(ho(r),o.dims=Xl(r));var p=u.first+u.size,g=Math.max(o.visible.from-r.options.viewportMargin,u.first),y=Math.min(p,o.visible.to+r.options.viewportMargin);c.viewFromy&&c.viewTo-y<20&&(y=Math.min(p,c.viewTo)),Di&&(g=Fa(r.doc,g),y=Wo(r.doc,y));var C=g!=c.viewFrom||y!=c.viewTo||c.lastWrapHeight!=o.wrapperHeight||c.lastWrapWidth!=o.wrapperWidth;id(r,g,y),c.viewOffset=vi(Pe(r.doc,c.viewFrom)),r.display.mover.style.top=c.viewOffset+"px";var _=Jp(r);if(!C&&_==0&&!o.force&&c.renderedView==c.view&&(c.updateLineNumbers==null||c.updateLineNumbers>=c.viewTo))return!1;var E=ww(r);return _>4&&(c.lineDiv.style.display="none"),xw(r,c.updateLineNumbers,o.dims),_>4&&(c.lineDiv.style.display=""),c.renderedView=c.view,Sw(E),Ye(c.cursorDiv),Ye(c.selectionDiv),c.gutters.style.height=c.sizer.style.minHeight=0,C&&(c.lastWrapHeight=o.wrapperHeight,c.lastWrapWidth=o.wrapperWidth,Oc(r,400)),c.updateLineNumbers=null,!0}i(oh,"updateDisplayIfNeeded");function Sg(r,o){for(var c=o.viewport,u=!0;;u=!1){if(!u||!r.options.lineWrapping||o.oldDisplayWidth==$o(r)){if(c&&c.top!=null&&(c={top:Math.min(r.doc.height+ql(r.display)-jl(r),c.top)}),o.visible=Va(r.display,r.doc,c),o.visible.from>=r.display.viewFrom&&o.visible.to<=r.display.viewTo)break}else u&&(o.visible=Va(r.display,r.doc,c));if(!oh(r,o))break;sd(r);var p=qa(r);ra(r),Ko(r,p),ah(r,p),o.force=!1}o.signal(r,"update",r),(r.display.viewFrom!=r.display.reportedViewFrom||r.display.viewTo!=r.display.reportedViewTo)&&(o.signal(r,"viewportChange",r,r.display.viewFrom,r.display.viewTo),r.display.reportedViewFrom=r.display.viewFrom,r.display.reportedViewTo=r.display.viewTo)}i(Sg,"postUpdateDisplay");function vo(r,o){var c=new Go(r,o);if(oh(r,c)){sd(r),Sg(r,c);var u=qa(r);ra(r),Ko(r,u),ah(r,u),c.finish()}}i(vo,"updateDisplaySimple");function xw(r,o,c){var u=r.display,p=r.options.lineNumbers,g=u.lineDiv,y=g.firstChild;function C(re){var ae=re.nextSibling;return S&&D&&r.display.currentWheelTarget==re?re.style.display="none":re.parentNode.removeChild(re),ae}i(C,"rm");for(var _=u.view,E=u.viewFrom,O=0;O<_.length;O++){var H=_[O];if(!H.hidden)if(!H.node||H.node.parentNode!=g){var K=Xp(r,H,E,c);g.insertBefore(K,y)}else{for(;y!=H.node;)y=C(y);var V=p&&o!=null&&o<=E&&H.lineNumber;H.changes&&(We(H.changes,"gutter")>-1&&(V=!1),Cc(r,H,E,c)),V&&(Ye(H.lineNumber),H.lineNumber.appendChild(document.createTextNode(Oa(r.options,E)))),y=H.node.nextSibling}E+=H.size}for(;y;)y=C(y)}i(xw,"patchDisplay");function sh(r){var o=r.gutters.offsetWidth;r.sizer.style.marginLeft=o+"px",Kt(r,"gutterChanged",r)}i(sh,"updateGutterSpace");function ah(r,o){r.display.sizer.style.minHeight=o.docHeight+"px",r.display.heightForcer.style.top=o.docHeight+"px",r.display.gutters.style.height=o.docHeight+r.display.barHeight+Fi(r)+"px"}i(ah,"setDocumentHeight");function xg(r){var o=r.display,c=o.view;if(!(!o.alignWidgets&&(!o.gutters.firstChild||!r.options.fixedGutter))){for(var u=kt(o)-o.scroller.scrollLeft+r.doc.scrollLeft,p=o.gutters.offsetWidth,g=u+"px",y=0;y=105&&(p.wrapper.style.clipPath="inset(0px)"),p.wrapper.setAttribute("translate","no"),d&&v<8&&(p.gutters.style.zIndex=-1,p.scroller.style.paddingRight=0),!S&&!(n&&L)&&(p.scroller.draggable=!0),r&&(r.appendChild?r.appendChild(p.wrapper):r(p.wrapper)),p.viewFrom=p.viewTo=o.first,p.reportedViewFrom=p.reportedViewTo=o.first,p.view=[],p.renderedView=null,p.externalMeasured=null,p.viewOffset=0,p.lastWrapHeight=p.lastWrapWidth=0,p.updateLineNumbers=null,p.nativeBarWidth=p.barHeight=p.barWidth=0,p.scrollbarsClipped=!1,p.lineNumWidth=p.lineNumInnerWidth=p.lineNumChars=null,p.alignWidgets=!1,p.cachedCharWidth=p.cachedTextHeight=p.cachedPaddingH=null,p.maxLine=null,p.maxLineLength=0,p.maxLineChanged=!1,p.wheelDX=p.wheelDY=p.wheelStartX=p.wheelStartY=null,p.shift=!1,p.selForContextMenu=null,p.activeTouch=null,p.gutterSpecs=yo(u.gutters,u.lineNumbers),_g(p),c.init(p)}i(Cw,"Display");var cd=0,Es=null;d?Es=-.53:n?Es=15:k?Es=-.7:z&&(Es=-1/3);function ia(r){var o=r.wheelDeltaX,c=r.wheelDeltaY;return o==null&&r.detail&&r.axis==r.HORIZONTAL_AXIS&&(o=r.detail),c==null&&r.detail&&r.axis==r.VERTICAL_AXIS?c=r.detail:c==null&&(c=r.wheelDelta),{x:o,y:c}}i(ia,"wheelEventDelta");function _w(r){var o=ia(r);return o.x*=Es,o.y*=Es,o}i(_w,"wheelEventPixels");function Eg(r,o){k&&R==102&&(r.display.chromeScrollHack==null?r.display.sizer.style.pointerEvents="none":clearTimeout(r.display.chromeScrollHack),r.display.chromeScrollHack=setTimeout(function(){r.display.chromeScrollHack=null,r.display.sizer.style.pointerEvents=""},100));var c=ia(o),u=c.x,p=c.y,g=Es;o.deltaMode===0&&(u=o.deltaX,p=o.deltaY,g=1);var y=r.display,C=y.scroller,_=C.scrollWidth>C.clientWidth,E=C.scrollHeight>C.clientHeight;if(u&&_||p&&E){if(p&&D&&S){e:for(var O=o.target,H=y.view;O!=C;O=O.parentNode)for(var K=0;K=0&&Ve(r,u.to())<=0)return c}return-1};var Et=i(function(r,o){this.anchor=r,this.head=o},"Range");Et.prototype.from=function(){return zo(this.anchor,this.head)},Et.prototype.to=function(){return js(this.anchor,this.head)},Et.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function wo(r,o,c){var u=r&&r.options.selectionsMayTouch,p=o[c];o.sort(function(K,V){return Ve(K.from(),V.from())}),c=We(o,p);for(var g=1;g0:_>=0){var E=zo(C.from(),y.from()),O=js(C.to(),y.to()),H=C.empty()?y.from()==y.head:C.from()==C.head;g<=c&&--c,o.splice(--g,2,new Et(H?O:E,H?E:O))}}return new ar(o,c)}i(wo,"normalizeSelection");function oa(r,o){return new ar([new Et(r,o||r)],0)}i(oa,"simpleSelection");function sa(r){return r.text?ce(r.from.line+r.text.length-1,lt(r.text).length+(r.text.length==1?r.from.ch:0)):r.to}i(sa,"changeEnd");function bg(r,o){if(Ve(r,o.from)<0)return r;if(Ve(r,o.to)<=0)return sa(o);var c=r.line+o.text.length-(o.to.line-o.from.line)-1,u=r.ch;return r.line==o.to.line&&(u+=sa(o).ch-o.to.ch),ce(c,u)}i(bg,"adjustForChange");function fd(r,o){for(var c=[],u=0;u1&&r.remove(C.line+1,re-1),r.insert(C.line+1,we)}Kt(r,"change",r,o)}i(tu,"updateDoc");function aa(r,o,c){function u(p,g,y){if(p.linked)for(var C=0;C1&&!r.done[r.done.length-2].ranges)return r.done.pop(),lt(r.done)}i(bw,"lastChangeEvent");function fh(r,o,c,u){var p=r.history;p.undone.length=0;var g=+new Date,y,C;if((p.lastOp==u||p.lastOrigin==o.origin&&o.origin&&(o.origin.charAt(0)=="+"&&p.lastModTime>g-(r.cm?r.cm.options.historyEventDelay:500)||o.origin.charAt(0)=="*"))&&(y=bw(p,p.lastOp==u)))C=lt(y.changes),Ve(o.from,o.to)==0&&Ve(o.from,C.to)==0?C.to=sa(o):y.changes.push(Ts(r,o));else{var _=lt(p.done);for((!_||!_.ranges)&&So(r.sel,p.done),y={changes:[Ts(r,o)],generation:p.generation},p.done.push(y);p.done.length>p.undoDepth;)p.done.shift(),p.done[0].ranges||p.done.shift()}p.done.push(c),p.generation=++p.maxGeneration,p.lastModTime=p.lastSelTime=g,p.lastOp=p.lastSelOp=u,p.lastOrigin=p.lastSelOrigin=o.origin,C||Mt(r,"historyAdded")}i(fh,"addChangeToHistory");function kg(r,o,c,u){var p=o.charAt(0);return p=="*"||p=="+"&&c.ranges.length==u.ranges.length&&c.somethingSelected()==u.somethingSelected()&&new Date-r.history.lastSelTime<=(r.cm?r.cm.options.historyEventDelay:500)}i(kg,"selectionEventCanBeMerged");function Dc(r,o,c,u){var p=r.history,g=u&&u.origin;c==p.lastSelOp||g&&p.lastSelOrigin==g&&(p.lastModTime==p.lastSelTime&&p.lastOrigin==g||kg(r,g,lt(p.done),o))?p.done[p.done.length-1]=o:So(o,p.done),p.lastSelTime=+new Date,p.lastSelOrigin=g,p.lastSelOp=c,u&&u.clearRedo!==!1&&wi(p.undone)}i(Dc,"addSelectionToHistory");function So(r,o){var c=lt(o);c&&c.ranges&&c.equals(r)||o.push(r)}i(So,"pushSelectionToHistory");function dh(r,o,c,u){var p=o["spans_"+r.id],g=0;r.iter(Math.max(r.first,c),Math.min(r.first+r.size,u),function(y){y.markedSpans&&((p||(p=o["spans_"+r.id]={}))[g]=y.markedSpans),++g})}i(dh,"attachLocalSpans");function Tw(r){if(!r)return null;for(var o,c=0;c-1&&(lt(C)[H]=E[H],delete E[H])}}return u}i(Xa,"copyHistoryArray");function Br(r,o,c,u){if(u){var p=r.anchor;if(c){var g=Ve(o,p)<0;g!=Ve(c,p)<0?(p=o,o=c):g!=Ve(o,c)<0&&(o=c)}return new Et(p,o)}else return new Et(c||o,o)}i(Br,"extendRange");function nu(r,o,c,u,p){p==null&&(p=r.cm&&(r.cm.display.shift||r.extend)),en(r,new ar([Br(r.sel.primary(),o,c,p)],0),u)}i(nu,"extendSelection");function ph(r,o,c){for(var u=[],p=r.cm&&(r.cm.display.shift||r.extend),g=0;g=o.ch:C.to>o.ch))){if(p&&(Mt(_,"beforeCursorEnter"),_.explicitlyCleared))if(g.markedSpans){--y;continue}else break;if(!_.atomic)continue;if(c){var H=_.find(u<0?1:-1),K=void 0;if((u<0?O:E)&&(H=Lg(r,H,-u,H&&H.line==o.line?g:null)),H&&H.line==o.line&&(K=Ve(H,c))&&(u<0?K<0:K>0))return iu(r,H,o,u,p)}var V=_.find(u<0?-1:1);return(u<0?E:O)&&(V=Lg(r,V,u,V.line==o.line?g:null)),V?iu(r,V,o,u,p):null}}return o}i(iu,"skipAtomicInner");function ou(r,o,c,u,p){var g=u||1,y=iu(r,o,c,g,p)||!p&&iu(r,o,c,g,!0)||iu(r,o,c,-g,p)||!p&&iu(r,o,c,-g,!0);return y||(r.cantEdit=!0,ce(r.first,0))}i(ou,"skipAtomic");function Lg(r,o,c,u){return c<0&&o.ch==0?o.line>r.first?qe(r,ce(o.line-1)):null:c>0&&o.ch==(u||Pe(r,o.line)).text.length?o.line=0;--p)Mg(r,{from:u[p].from,to:u[p].to,text:p?[""]:o.text,origin:o.origin});else Mg(r,o)}}i(au,"makeChange");function Mg(r,o){if(!(o.text.length==1&&o.text[0]==""&&Ve(o.from,o.to)==0)){var c=fd(r,o);fh(r,o,c,r.cm?r.cm.curOp.id:NaN),Ic(r,o,c,yc(r,o));var u=[];aa(r,function(p,g){!g&&We(u,p.history)==-1&&(Ig(p.history,o),u.push(p.history)),Ic(p,o,null,yc(p,o))})}}i(Mg,"makeChangeInner");function ua(r,o,c){var u=r.cm&&r.cm.state.suppressEdits;if(!(u&&!c)){for(var p=r.history,g,y=r.sel,C=o=="undo"?p.done:p.undone,_=o=="undo"?p.undone:p.done,E=0;E=0;--V){var re=K(V);if(re)return re.v}}}}i(ua,"makeChangeFromHistory");function Og(r,o){if(o!=0&&(r.first+=o,r.sel=new ar(Sr(r.sel.ranges,function(p){return new Et(ce(p.anchor.line+o,p.anchor.ch),ce(p.head.line+o,p.head.ch))}),r.sel.primIndex),r.cm)){Un(r.cm,r.first,r.first-o,o);for(var c=r.cm.display,u=c.viewFrom;ur.lastLine())){if(o.from.lineg&&(o={from:o.from,to:ce(g,Pe(r,g).text.length),text:[o.text[0]],origin:o.origin}),o.removed=lo(r,o.from,o.to),c||(c=fd(r,o)),r.cm?mh(r.cm,o,u):tu(r,o,u),tn(r,c,st),r.cantEdit&&ou(r,ce(r.firstLine(),0))&&(r.cantEdit=!1)}}i(Ic,"makeChangeSingleDoc");function mh(r,o,c){var u=r.doc,p=r.display,g=o.from,y=o.to,C=!1,_=g.line;r.options.lineWrapping||(_=vt(Rt(Pe(u,g.line))),u.iter(_,y.line+1,function(V){if(V==p.maxLine)return C=!0,!0})),u.sel.contains(o.from,o.to)>-1&&Na(r),tu(u,o,c,mg(r)),r.options.lineWrapping||(u.iter(_,g.line+o.text.length,function(V){var re=Ze(V);re>p.maxLineLength&&(p.maxLine=V,p.maxLineLength=re,p.maxLineChanged=!0,C=!1)}),C&&(r.curOp.updateMaxLine=!0)),Ra(u,g.line),Oc(r,400);var E=o.text.length-(y.line-g.line)-1;o.full?Un(r):g.line==y.line&&o.text.length==1&&!eu(r.doc,o)?ta(r,g.line,"text"):Un(r,g.line,y.line+1,E);var O=pn(r,"changes"),H=pn(r,"change");if(H||O){var K={from:g,to:y,text:o.text,removed:o.removed,origin:o.origin};H&&Kt(r,"change",r,K),O&&(r.curOp.changeObjs||(r.curOp.changeObjs=[])).push(K)}r.display.selForContextMenu=null}i(mh,"makeChangeSingleDocInEditor");function Qa(r,o,c,u,p){var g;u||(u=c),Ve(u,c)<0&&(g=[u,c],c=g[0],u=g[1]),typeof o=="string"&&(o=r.splitLines(o)),au(r,{from:c,to:u,text:o,origin:p})}i(Qa,"replaceRange");function Rg(r,o,c,u){c1||!(this.children[0]instanceof Ja))){var C=[];this.collapse(C),this.children=[new Ja(C)],this.children[0].parent=this}},"removeInner"),collapse:i(function(r){for(var o=0;o50){for(var y=p.lines.length%25+25,C=y;C10);r.parent.maybeSpill()}},"maybeSpill"),iterN:i(function(r,o,c){for(var u=0;ur.display.maxLineLength&&(r.display.maxLine=E,r.display.maxLineLength=O,r.display.maxLineChanged=!0)}u!=null&&r&&this.collapsed&&Un(r,u,p+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,r&&Ag(r.doc)),r&&Kt(r,"markerCleared",r,this,u,p),o&&Ga(r),this.parent&&this.parent.clear()}},xo.prototype.find=function(r,o){r==null&&this.type=="bookmark"&&(r=1);for(var c,u,p=0;p0||y==0&&g.clearWhenEmpty!==!1)return g;if(g.replacedWith&&(g.collapsed=!0,g.widgetNode=Xe("span",[g.replacedWith],"CodeMirror-widget"),u.handleMouseEvents||g.widgetNode.setAttribute("cm-ignore-events","true"),u.insertLeft&&(g.widgetNode.insertLeft=!0)),g.collapsed){if(Gp(r,o.line,o,c,g)||o.line!=c.line&&Gp(r,c.line,o,c,g))throw new Error("Inserting collapsed marker partially overlapping an existing one");$p()}g.addToHistory&&fh(r,{from:o,to:c,origin:"markText"},r.sel,NaN);var C=o.line,_=r.cm,E;if(r.iter(C,c.line+1,function(H){_&&g.collapsed&&!_.options.lineWrapping&&Rt(H)==_.display.maxLine&&(E=!0),g.collapsed&&C!=o.line&&Ri(H,0),vc(H,new Il(g,C==o.line?o.ch:null,C==c.line?c.ch:null),r.cm&&r.cm.curOp),++C}),g.collapsed&&r.iter(o.line,c.line+1,function(H){Se(r,H)&&Ri(H,0)}),g.clearOnEnter&&ze(g,"beforeCursorEnter",function(){return g.clear()}),g.readOnly&&(Kf(),(r.history.done.length||r.history.undone.length)&&r.clearHistory()),g.collapsed&&(g.id=++vh,g.atomic=!0),_){if(E&&(_.curOp.updateMaxLine=!0),g.collapsed)Un(_,o.line,c.line+1);else if(g.className||g.startStyle||g.endStyle||g.css||g.attributes||g.title)for(var O=o.line;O<=c.line;O++)ta(_,O,"text");g.atomic&&Ag(_.doc),Kt(_,"markerAdded",_,g)}return g}i(uu,"markText");var cu=i(function(r,o){this.markers=r,this.primary=o;for(var c=0;c=0;_--)au(this,u[_]);C?la(this,C):this.cm&&tr(this.cm)}),undo:Hr(function(){ua(this,"undo")}),redo:Hr(function(){ua(this,"redo")}),undoSelection:Hr(function(){ua(this,"undo",!0)}),redoSelection:Hr(function(){ua(this,"redo",!0)}),setExtending:i(function(r){this.extend=r},"setExtending"),getExtending:i(function(){return this.extend},"getExtending"),historySize:i(function(){for(var r=this.history,o=0,c=0,u=0;u=r.ch)&&o.push(p.marker.parent||p.marker)}return o},"findMarksAt"),findMarks:i(function(r,o,c){r=qe(this,r),o=qe(this,o);var u=[],p=r.line;return this.iter(r.line,o.line+1,function(g){var y=g.markedSpans;if(y)for(var C=0;C=_.to||_.from==null&&p!=r.line||_.from!=null&&p==o.line&&_.from>=o.ch)&&(!c||c(_.marker))&&u.push(_.marker.parent||_.marker)}++p}),u},"findMarks"),getAllMarks:i(function(){var r=[];return this.iter(function(o){var c=o.markedSpans;if(c)for(var u=0;ur)return o=r,!0;r-=g,++c}),qe(this,ce(c,o))},"posFromIndex"),indexFromPos:i(function(r){r=qe(this,r);var o=r.ch;if(r.lineo&&(o=r.from),r.to!=null&&r.to-1){o.state.draggingText(r),setTimeout(function(){return o.display.input.focus()},20);return}try{var O=r.dataTransfer.getData("Text");if(O){var H;if(o.state.draggingText&&!o.state.draggingText.copy&&(H=o.listSelections()),tn(o.doc,oa(c,c)),H)for(var K=0;K=0;C--)Qa(r.doc,"",u[C].from,u[C].to,"+delete");tr(r)})}i(ca,"deleteNearSelection");function yd(r,o,c){var u=Bn(r.text,o+c,c);return u<0||u>r.text.length?null:u}i(yd,"moveCharLogically");function Wc(r,o,c){var u=yd(r,o.ch,c);return u==null?null:new ce(o.line,u,c<0?"after":"before")}i(Wc,"moveLogically");function Uc(r,o,c,u,p){if(r){o.doc.direction=="rtl"&&(p=-p);var g=Me(c,o.doc.direction);if(g){var y=p<0?lt(g):g[0],C=p<0==(y.level==1),_=C?"after":"before",E;if(y.level>0||o.doc.direction=="rtl"){var O=kn(o,c);E=p<0?c.text.length-1:0;var H=w(o,O,E).top;E=so(function(K){return w(o,O,K).top==H},p<0==(y.level==1)?y.from:y.to-1,E),_=="before"&&(E=yd(c,E,1))}else E=p<0?y.to:y.from;return new ce(u,E,_)}}return new ce(u,p<0?c.text.length:0,p<0?"before":"after")}i(Uc,"endOfLine");function fa(r,o,c,u){var p=Me(o,r.doc.direction);if(!p)return Wc(o,c,u);c.ch>=o.text.length?(c.ch=o.text.length,c.sticky="before"):c.ch<=0&&(c.ch=0,c.sticky="after");var g=ee(p,c.ch,c.sticky),y=p[g];if(r.doc.direction=="ltr"&&y.level%2==0&&(u>0?y.to>c.ch:y.from=y.from&&K>=O.begin)){var V=H?"before":"after";return new ce(c.line,K,V)}}var re=i(function(we,_e,ye){for(var ke=i(function(Dt,hr){return hr?new ce(c.line,C(Dt,1),"before"):new ce(c.line,Dt,"after")},"getRes");we>=0&&we0==(Ie.level!=1),it=Oe?ye.begin:C(ye.end,-1);if(Ie.from<=it&&it0?O.end:C(O.begin,-1);return pe!=null&&!(u>0&&pe==o.text.length)&&(ae=re(u>0?0:p.length-1,u,E(pe)),ae)?ae:null}i(fa,"moveVisually");var $c={selectAll:su,singleSelection:i(function(r){return r.setSelection(r.getCursor("anchor"),r.getCursor("head"),st)},"singleSelection"),killLine:i(function(r){return ca(r,function(o){if(o.empty()){var c=Pe(r.doc,o.head.line).text.length;return o.head.ch==c&&o.head.line0)p=new ce(p.line,p.ch+1),r.replaceRange(g.charAt(p.ch-1)+g.charAt(p.ch-2),ce(p.line,p.ch-2),p,"+transpose");else if(p.line>r.doc.first){var y=Pe(r.doc,p.line-1).text;y&&(p=new ce(p.line,1),r.replaceRange(g.charAt(0)+r.doc.lineSeparator()+y.charAt(y.length-1),ce(p.line-1,y.length-1),p,"+transpose"))}}c.push(new Et(p,p))}r.setSelections(c)})},"transposeChars"),newlineAndIndent:i(function(r){return yn(r,function(){for(var o=r.listSelections(),c=o.length-1;c>=0;c--)r.replaceRange(r.doc.lineSeparator(),o[c].anchor,o[c].head,"+input");o=r.listSelections();for(var u=0;ur&&Ve(o,this.pos)==0&&c==this.button};var Xo,hu;function Kg(r,o){var c=+new Date;return hu&&hu.compare(c,r,o)?(Xo=hu=null,"triple"):Xo&&Xo.compare(c,r,o)?(hu=new pu(c,r,o),Xo=null,"double"):(Xo=new pu(c,r,o),hu=null,"single")}i(Kg,"clickRepeat");function Gg(r){var o=this,c=o.display;if(!(Pt(o,r)||c.activeTouch&&c.input.supportsTouch())){if(c.input.ensurePolled(),c.shift=r.shiftKey,yi(c,r)){S||(c.scroller.draggable=!1,setTimeout(function(){return c.scroller.draggable=!0},100));return}if(!gu(o,r)){var u=jo(o,r),p=nc(r),g=u?Kg(u,p):"single";yr(o).focus(),p==1&&o.state.selectingText&&o.state.selectingText(r),!(u&&Yg(o,p,u,g,r))&&(p==1?u?qc(o,u,g,r):Pa(r)==c.scroller&&Nr(r):p==2?(u&&nu(o.doc,u),setTimeout(function(){return c.input.focus()},20)):p==3&&(he?o.display.input.onContextMenu(r):Ql(o)))}}}i(Gg,"onMouseDown");function Yg(r,o,c,u,p){var g="Click";return u=="double"?g="Double"+g:u=="triple"&&(g="Triple"+g),g=(o==1?"Left":o==2?"Middle":"Right")+g,Vc(r,Sh(g,p),p,function(y){if(typeof y=="string"&&(y=$c[y]),!y)return!1;var C=!1;try{r.isReadOnly()&&(r.state.suppressEdits=!0),C=y(r,c)!=er}finally{r.state.suppressEdits=!1}return C})}i(Yg,"handleMappedButton");function mu(r,o,c){var u=r.getOption("configureMouse"),p=u?u(r,o,c):{};if(p.unit==null){var g=q?c.shiftKey&&c.metaKey:c.altKey;p.unit=g?"rectangle":o=="single"?"char":o=="double"?"word":"line"}return(p.extend==null||r.doc.extend)&&(p.extend=r.doc.extend||c.shiftKey),p.addNew==null&&(p.addNew=D?c.metaKey:c.ctrlKey),p.moveOnDrag==null&&(p.moveOnDrag=!(D?c.altKey:c.ctrlKey)),p}i(mu,"configureMouse");function qc(r,o,c,u){d?setTimeout(wr(na,r),0):r.curOp.focus=ot(vr(r));var p=mu(r,c,u),g=r.doc.sel,y;r.options.dragDrop&&ic&&!r.isReadOnly()&&c=="single"&&(y=g.contains(o))>-1&&(Ve((y=g.ranges[y]).from(),o)<0||o.xRel>0)&&(Ve(y.to(),o)>0||o.xRel<0)?Dw(r,u,o,p):Xg(r,u,o,p)}i(qc,"leftButtonDown");function Dw(r,o,c,u){var p=r.display,g=!1,y=Lt(r,function(E){S&&(p.scroller.draggable=!1),r.state.draggingText=!1,r.state.delayingBlurEvent&&(r.hasFocus()?r.state.delayingBlurEvent=!1:Ql(r)),Xt(p.wrapper.ownerDocument,"mouseup",y),Xt(p.wrapper.ownerDocument,"mousemove",C),Xt(p.scroller,"dragstart",_),Xt(p.scroller,"drop",y),g||(Nr(E),u.addNew||nu(r.doc,c,null,null,u.extend),S&&!z||d&&v==9?setTimeout(function(){p.wrapper.ownerDocument.body.focus({preventScroll:!0}),p.input.focus()},20):p.input.focus())}),C=i(function(E){g=g||Math.abs(o.clientX-E.clientX)+Math.abs(o.clientY-E.clientY)>=10},"mouseMove"),_=i(function(){return g=!0},"dragStart");S&&(p.scroller.draggable=!0),r.state.draggingText=y,y.copy=!u.moveOnDrag,ze(p.wrapper.ownerDocument,"mouseup",y),ze(p.wrapper.ownerDocument,"mousemove",C),ze(p.scroller,"dragstart",_),ze(p.scroller,"drop",y),r.state.delayingBlurEvent=!0,setTimeout(function(){return p.input.focus()},20),p.scroller.dragDrop&&p.scroller.dragDrop()}i(Dw,"leftButtonStartDrag");function bh(r,o,c){if(c=="char")return new Et(o,o);if(c=="word")return r.findWordAt(o);if(c=="line")return new Et(ce(o.line,0),qe(r.doc,ce(o.line+1,0)));var u=c(r,o);return new Et(u.from,u.to)}i(bh,"rangeForUnit");function Xg(r,o,c,u){d&&Ql(r);var p=r.display,g=r.doc;Nr(o);var y,C,_=g.sel,E=_.ranges;if(u.addNew&&!u.extend?(C=g.sel.contains(c),C>-1?y=E[C]:y=new Et(c,c)):(y=g.sel.primary(),C=g.sel.primIndex),u.unit=="rectangle")u.addNew||(y=new Et(c,c)),c=jo(r,o,!0,!0),C=-1;else{var O=bh(r,c,u.unit);u.extend?y=Br(y,O.anchor,O.head,u.extend):y=O}u.addNew?C==-1?(C=E.length,en(g,wo(r,E.concat([y]),C),{scroll:!1,origin:"*mouse"})):E.length>1&&E[C].empty()&&u.unit=="char"&&!u.extend?(en(g,wo(r,E.slice(0,C).concat(E.slice(C+1)),0),{scroll:!1,origin:"*mouse"}),_=g.sel):zi(g,C,y,Fe):(C=0,en(g,new ar([y],0),Fe),_=g.sel);var H=c;function K(ye){if(Ve(H,ye)!=0)if(H=ye,u.unit=="rectangle"){for(var ke=[],Ie=r.options.tabSize,Oe=Ft(Pe(g,c.line).text,c.ch,Ie),it=Ft(Pe(g,ye.line).text,ye.ch,Ie),Dt=Math.min(Oe,it),hr=Math.max(Oe,it),Jt=Math.min(c.line,ye.line),lr=Math.min(r.lastLine(),Math.max(c.line,ye.line));Jt<=lr;Jt++){var xr=Pe(g,Jt).text,Cr=bn(xr,Dt,Ie);Dt==hr?ke.push(new Et(ce(Jt,Cr),ce(Jt,Cr))):xr.length>Cr&&ke.push(new Et(ce(Jt,Cr),ce(Jt,bn(xr,hr,Ie))))}ke.length||ke.push(new Et(c,c)),en(g,wo(r,_.ranges.slice(0,C).concat(ke),C),{origin:"*mouse",scroll:!1}),r.scrollIntoView(ye)}else{var An=y,rn=bh(r,ye,u.unit),Lr=An.anchor,_r;Ve(rn.anchor,Lr)>0?(_r=rn.head,Lr=zo(An.from(),rn.anchor)):(_r=rn.anchor,Lr=js(An.to(),rn.head));var ur=_.ranges.slice(0);ur[C]=Sd(r,new Et(qe(g,Lr),_r)),en(g,wo(r,ur,C),Fe)}}i(K,"extendTo");var V=p.wrapper.getBoundingClientRect(),re=0;function ae(ye){var ke=++re,Ie=jo(r,ye,!0,u.unit=="rectangle");if(Ie)if(Ve(Ie,H)!=0){r.curOp.focus=ot(vr(r)),K(Ie);var Oe=Va(p,g);(Ie.line>=Oe.to||Ie.lineV.bottom?20:0;it&&setTimeout(Lt(r,function(){re==ke&&(p.scroller.scrollTop+=it,ae(ye))}),50)}}i(ae,"extend");function pe(ye){r.state.selectingText=!1,re=1/0,ye&&(Nr(ye),p.input.focus()),Xt(p.wrapper.ownerDocument,"mousemove",we),Xt(p.wrapper.ownerDocument,"mouseup",_e),g.history.lastSelOrigin=null}i(pe,"done");var we=Lt(r,function(ye){ye.buttons===0||!nc(ye)?pe(ye):ae(ye)}),_e=Lt(r,pe);r.state.selectingText=_e,ze(p.wrapper.ownerDocument,"mousemove",we),ze(p.wrapper.ownerDocument,"mouseup",_e)}i(Xg,"leftButtonSelect");function Sd(r,o){var c=o.anchor,u=o.head,p=Pe(r.doc,c.line);if(Ve(c,u)==0&&c.sticky==u.sticky)return o;var g=Me(p);if(!g)return o;var y=ee(g,c.ch,c.sticky),C=g[y];if(C.from!=c.ch&&C.to!=c.ch)return o;var _=y+(C.from==c.ch==(C.level!=1)?0:1);if(_==0||_==g.length)return o;var E;if(u.line!=c.line)E=(u.line-c.line)*(r.doc.direction=="ltr"?1:-1)>0;else{var O=ee(g,u.ch,u.sticky),H=O-y||(u.ch-c.ch)*(C.level==1?-1:1);O==_-1||O==_?E=H<0:E=H>0}var K=g[_+(E?-1:0)],V=E==(K.level==1),re=V?K.from:K.to,ae=V?"after":"before";return c.ch==re&&c.sticky==ae?o:new Et(new ce(c.line,re,ae),u)}i(Sd,"bidiSimplify");function Th(r,o,c,u){var p,g;if(o.touches)p=o.touches[0].clientX,g=o.touches[0].clientY;else try{p=o.clientX,g=o.clientY}catch{return!1}if(p>=Math.floor(r.display.gutters.getBoundingClientRect().right))return!1;u&&Nr(o);var y=r.display,C=y.lineDiv.getBoundingClientRect();if(g>C.bottom||!pn(r,c))return Tn(o);g-=C.top-y.viewOffset;for(var _=0;_=p){var O=ys(r.doc,g),H=r.display.gutterSpecs[_];return Mt(r,c,r,O,H.className,o),Tn(o)}}}i(Th,"gutterEvent");function gu(r,o){return Th(r,o,"gutterClick",!0)}i(gu,"clickInGutter");function xd(r,o){yi(r.display,o)||Cd(r,o)||Pt(r,o,"contextmenu")||he||r.display.input.onContextMenu(o)}i(xd,"onContextMenu");function Cd(r,o){return pn(r,"gutterContextMenu")?Th(r,o,"gutterContextMenu",!1):!1}i(Cd,"contextMenuInGutter");function Qg(r){r.display.wrapper.className=r.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+r.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Vo(r)}i(Qg,"themeChanged");var rl={toString:i(function(){return"CodeMirror.Init"},"toString")},jc={},Kc={};function kh(r){var o=r.optionHandlers;function c(u,p,g,y){r.defaults[u]=p,g&&(o[u]=y?function(C,_,E){E!=rl&&g(C,_,E)}:g)}i(c,"option"),r.defineOption=c,r.Init=rl,c("value","",function(u,p){return u.setValue(p)},!0),c("mode",null,function(u,p){u.doc.modeOption=p,uh(u)},!0),c("indentUnit",2,uh,!0),c("indentWithTabs",!1),c("smartIndent",!0),c("tabSize",4,function(u){Ya(u),Vo(u),Un(u)},!0),c("lineSeparator",null,function(u,p){if(u.doc.lineSep=p,!!p){var g=[],y=u.doc.first;u.doc.iter(function(_){for(var E=0;;){var O=_.text.indexOf(p,E);if(O==-1)break;E=O+p.length,g.push(ce(y,O))}y++});for(var C=g.length-1;C>=0;C--)Qa(u.doc,p,g[C],ce(g[C].line,g[C].ch+p.length))}}),c("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(u,p,g){u.state.specialChars=new RegExp(p.source+(p.test(" ")?"":"| "),"g"),g!=rl&&u.refresh()}),c("specialCharPlaceholder",jt,function(u){return u.refresh()},!0),c("electricChars",!0),c("inputStyle",L?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),c("spellcheck",!1,function(u,p){return u.getInputField().spellcheck=p},!0),c("autocorrect",!1,function(u,p){return u.getInputField().autocorrect=p},!0),c("autocapitalize",!1,function(u,p){return u.getInputField().autocapitalize=p},!0),c("rtlMoveVisually",!te),c("wholeLineUpdateBefore",!0),c("theme","default",function(u){Qg(u),Rc(u)},!0),c("keyMap","default",function(u,p,g){var y=zc(p),C=g!=rl&&zc(g);C&&C.detach&&C.detach(u,y),y.attach&&y.attach(u,C||null)}),c("extraKeys",null),c("configureMouse",null),c("lineWrapping",!1,Jg,!0),c("gutters",[],function(u,p){u.display.gutterSpecs=yo(p,u.options.lineNumbers),Rc(u)},!0),c("fixedGutter",!0,function(u,p){u.display.gutters.style.left=p?kt(u.display)+"px":"0",u.refresh()},!0),c("coverGutterNextToScrollbar",!1,function(u){return Ko(u)},!0),c("scrollbarStyle","native",function(u){yg(u),Ko(u),u.display.scrollbars.setScrollTop(u.doc.scrollTop),u.display.scrollbars.setScrollLeft(u.doc.scrollLeft)},!0),c("lineNumbers",!1,function(u,p){u.display.gutterSpecs=yo(u.options.gutters,p),Rc(u)},!0),c("firstLineNumber",1,Rc,!0),c("lineNumberFormatter",function(u){return u},Rc,!0),c("showCursorWhenSelecting",!1,ra,!0),c("resetSelectionOnContextMenu",!0),c("lineWiseCopyCut",!0),c("pasteLinesPerSelection",!0),c("selectionsMayTouch",!1),c("readOnly",!1,function(u,p){p=="nocursor"&&(Jl(u),u.display.input.blur()),u.display.input.readOnlyChanged(p)}),c("screenReaderLabel",null,function(u,p){p=p===""?null:p,u.display.input.screenReaderLabelChanged(p)}),c("disableInput",!1,function(u,p){p||u.display.input.reset()},!0),c("dragDrop",!0,Iw),c("allowDropFileTypes",null),c("cursorBlinkRate",530),c("cursorScrollMargin",0),c("cursorHeight",1,ra,!0),c("singleCursorHeightPerLine",!0,ra,!0),c("workTime",100),c("workDelay",100),c("flattenSpans",!0,Ya,!0),c("addModeClass",!1,Ya,!0),c("pollInterval",100),c("undoDepth",200,function(u,p){return u.doc.history.undoDepth=p}),c("historyEventDelay",1250),c("viewportMargin",10,function(u){return u.refresh()},!0),c("maxHighlightLength",1e4,Ya,!0),c("moveInputWithCursor",!0,function(u,p){p||u.display.input.resetPosition()}),c("tabindex",null,function(u,p){return u.display.input.getField().tabIndex=p||""}),c("autofocus",null),c("direction","ltr",function(u,p){return u.doc.setDirection(p)},!0),c("phrases",null)}i(kh,"defineOptions");function Iw(r,o,c){var u=c&&c!=rl;if(!o!=!u){var p=r.display.dragFunctions,g=o?ze:Xt;g(r.display.scroller,"dragstart",p.start),g(r.display.scroller,"dragenter",p.enter),g(r.display.scroller,"dragover",p.over),g(r.display.scroller,"dragleave",p.leave),g(r.display.scroller,"drop",p.drop)}}i(Iw,"dragDropChanged");function Jg(r){r.options.lineWrapping?(It(r.display.wrapper,"CodeMirror-wrap"),r.display.sizer.style.minWidth="",r.display.sizerWidth=null):(Ee(r.display.wrapper,"CodeMirror-wrap"),Hl(r)),nd(r),Un(r),Vo(r),setTimeout(function(){return Ko(r)},100)}i(Jg,"wrappingChanged");function wt(r,o){var c=this;if(!(this instanceof wt))return new wt(r,o);this.options=o=o?Yt(o):{},Yt(jc,o,!1);var u=o.value;typeof u=="string"?u=new Nn(u,o.mode,null,o.lineSeparator,o.direction):o.mode&&(u.modeOption=o.mode),this.doc=u;var p=new wt.inputStyles[o.inputStyle](this),g=this.display=new Cw(r,u,p,o);g.wrapper.CodeMirror=this,Qg(this),o.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),yg(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new se,keySeq:null,specialChars:null},o.autofocus&&!L&&g.input.focus(),d&&v<11&&setTimeout(function(){return c.display.input.reset(!0)},20),Zg(this),$g(),Ka(this),this.curOp.forceUpdate=!0,ch(this,u),o.autofocus&&!L||this.hasFocus()?setTimeout(function(){c.hasFocus()&&!c.state.focused&&eh(c)},20):Jl(this);for(var y in Kc)Kc.hasOwnProperty(y)&&Kc[y](this,o[y],rl);Cg(this),o.finishInit&&o.finishInit(this);for(var C=0;C<_d.length;++C)_d[C](this);Ga(this),S&&o.lineWrapping&&getComputedStyle(g.lineDiv).textRendering=="optimizelegibility"&&(g.lineDiv.style.textRendering="auto")}i(wt,"CodeMirror"),wt.defaults=jc,wt.optionHandlers=Kc;function Zg(r){var o=r.display;ze(o.scroller,"mousedown",Lt(r,Gg)),d&&v<11?ze(o.scroller,"dblclick",Lt(r,function(_){if(!Pt(r,_)){var E=jo(r,_);if(!(!E||gu(r,_)||yi(r.display,_))){Nr(_);var O=r.findWordAt(E);nu(r.doc,O.anchor,O.head)}}})):ze(o.scroller,"dblclick",function(_){return Pt(r,_)||Nr(_)}),ze(o.scroller,"contextmenu",function(_){return xd(r,_)}),ze(o.input.getField(),"contextmenu",function(_){o.scroller.contains(_.target)||xd(r,_)});var c,u={end:0};function p(){o.activeTouch&&(c=setTimeout(function(){return o.activeTouch=null},1e3),u=o.activeTouch,u.end=+new Date)}i(p,"finishTouch");function g(_){if(_.touches.length!=1)return!1;var E=_.touches[0];return E.radiusX<=1&&E.radiusY<=1}i(g,"isMouseLikeTouchEvent");function y(_,E){if(E.left==null)return!0;var O=E.left-_.left,H=E.top-_.top;return O*O+H*H>20*20}i(y,"farAway"),ze(o.scroller,"touchstart",function(_){if(!Pt(r,_)&&!g(_)&&!gu(r,_)){o.input.ensurePolled(),clearTimeout(c);var E=+new Date;o.activeTouch={start:E,moved:!1,prev:E-u.end<=300?u:null},_.touches.length==1&&(o.activeTouch.left=_.touches[0].pageX,o.activeTouch.top=_.touches[0].pageY)}}),ze(o.scroller,"touchmove",function(){o.activeTouch&&(o.activeTouch.moved=!0)}),ze(o.scroller,"touchend",function(_){var E=o.activeTouch;if(E&&!yi(o,_)&&E.left!=null&&!E.moved&&new Date-E.start<300){var O=r.coordsChar(o.activeTouch,"page"),H;!E.prev||y(E,E.prev)?H=new Et(O,O):!E.prev.prev||y(E,E.prev.prev)?H=r.findWordAt(O):H=new Et(ce(O.line,0),qe(r.doc,ce(O.line+1,0))),r.setSelection(H.anchor,H.head),r.focus(),Nr(_)}p()}),ze(o.scroller,"touchcancel",p),ze(o.scroller,"scroll",function(){o.scroller.clientHeight&&(Pc(r,o.scroller.scrollTop),go(r,o.scroller.scrollLeft,!0),Mt(r,"scroll",r))}),ze(o.scroller,"mousewheel",function(_){return Eg(r,_)}),ze(o.scroller,"DOMMouseScroll",function(_){return Eg(r,_)}),ze(o.wrapper,"scroll",function(){return o.wrapper.scrollTop=o.wrapper.scrollLeft=0}),o.dragFunctions={enter:i(function(_){Pt(r,_)||Aa(_)},"enter"),over:i(function(_){Pt(r,_)||(ut(r,_),Aa(_))},"over"),start:i(function(_){return wh(r,_)},"start"),drop:Lt(r,Nw),leave:i(function(_){Pt(r,_)||Wg(r)},"leave")};var C=o.input.getField();ze(C,"keyup",function(_){return Co.call(r,_)}),ze(C,"keydown",Lt(r,Eh)),ze(C,"keypress",Lt(r,jg)),ze(C,"focus",function(_){return eh(r,_)}),ze(C,"blur",function(_){return Jl(r,_)})}i(Zg,"registerEventHandlers");var _d=[];wt.defineInitHook=function(r){return _d.push(r)};function Gc(r,o,c,u){var p=r.doc,g;c==null&&(c="add"),c=="smart"&&(p.mode.indent?g=Ss(r,o).state:c="prev");var y=r.options.tabSize,C=Pe(p,o),_=Ft(C.text,null,y);C.stateAfter&&(C.stateAfter=null);var E=C.text.match(/^\s*/)[0],O;if(!u&&!/\S/.test(C.text))O=0,c="not";else if(c=="smart"&&(O=p.mode.indent(g,C.text.slice(E.length),C.text),O==er||O>150)){if(!u)return;c="prev"}c=="prev"?o>p.first?O=Ft(Pe(p,o-1).text,null,y):O=0:c=="add"?O=_+r.options.indentUnit:c=="subtract"?O=_-r.options.indentUnit:typeof c=="number"&&(O=_+c),O=Math.max(0,O);var H="",K=0;if(r.options.indentWithTabs)for(var V=Math.floor(O/y);V;--V)K+=y,H+=" ";if(Ky,_=kl(o),E=null;if(C&&u.ranges.length>1)if(Wi&&Wi.text.join(` +`)==o){if(u.ranges.length%Wi.text.length==0){E=[];for(var O=0;O=0;K--){var V=u.ranges[K],re=V.from(),ae=V.to();V.empty()&&(c&&c>0?re=ce(re.line,re.ch-c):r.state.overwrite&&!C?ae=ce(ae.line,Math.min(Pe(g,ae.line).text.length,ae.ch+lt(_).length)):C&&Wi&&Wi.lineWise&&Wi.text.join(` `)==_.join(` -`)&&(re=ae=ce(re.line,0)));var pe={from:re,to:ae,text:E?E[K%E.length]:_,origin:p||(C?"paste":r.state.cutIncoming>y?"cut":"+input")};au(r.doc,pe),Kt(r,"inputRead",r,pe)}o&&!C&&bd(r,o),er(r),r.curOp.updateInput<2&&(r.curOp.updateInput=H),r.curOp.typing=!0,r.state.pasteIncoming=r.state.cutIncoming=-1}i(Nh,"applyTextInput");function Qo(r,o){var c=r.clipboardData&&r.clipboardData.getData("Text");if(c)return r.preventDefault(),!o.isReadOnly()&&!o.options.disableInput&&o.hasFocus()&&yn(o,function(){return Nh(o,c,0,null,"paste")}),!0}i(Qo,"handlePaste");function bd(r,o){if(!(!r.options.electricChars||!r.options.smartIndent))for(var c=r.doc.sel,u=c.ranges.length-1;u>=0;u--){var p=c.ranges[u];if(!(p.head.ch>100||u&&c.ranges[u-1].head.line==p.head.line)){var g=r.getModeAt(p.head),y=!1;if(g.electricChars){for(var C=0;C-1){y=Gc(r,p.head.line,"smart");break}}else g.electricInput&&g.electricInput.test(Ae(r.doc,p.head.line).text.slice(0,p.head.ch))&&(y=Gc(r,p.head.line,"smart"));y&&Kt(r,"electricInput",r,p.head.line)}}}i(bd,"triggerElectric");function Td(r){for(var o=[],c=[],u=0;ug&&(Gc(this,C.head.line,u,!0),g=C.head.line,y==this.doc.sel.primIndex&&er(this));else{var _=C.from(),E=C.to(),O=Math.max(g,_.line);g=Math.min(this.lastLine(),E.line-(E.ch?0:1))+1;for(var H=O;H0&&zi(this.doc,y,new Et(_,K[y].to()),st)}}}),getTokenAt:i(function(u,p){return Rl(this,u,p)},"getTokenAt"),getLineTokens:i(function(u,p){return Rl(this,ce(u),p,!0)},"getLineTokens"),getTokenTypeAt:i(function(u){u=qe(this.doc,u);var p=Ml(this,Ae(this.doc,u.line)),g=0,y=(p.length-1)/2,C=u.ch,_;if(C==0)_=p[2];else for(;;){var E=g+y>>1;if((E?p[E*2-1]:0)>=C)y=E;else if(p[E*2+1]_&&(u=_,y=!0),C=Ae(this.doc,u)}else C=u;return vn(this,C,{top:0,left:0},p||"page",g||y).top+(y?this.doc.height-vi(C):0)},"heightAtLine"),defaultTextHeight:i(function(){return po(this.display)},"defaultTextHeight"),defaultCharWidth:i(function(){return Cs(this.display)},"defaultCharWidth"),getViewport:i(function(){return{from:this.display.viewFrom,to:this.display.viewTo}},"getViewport"),addWidget:i(function(u,p,g,y,C){var _=this.display;u=J(this,qe(this.doc,u));var E=u.bottom,O=u.left;if(p.style.position="absolute",p.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(p),_.sizer.appendChild(p),y=="over")E=u.top;else if(y=="above"||y=="near"){var H=Math.max(_.wrapper.clientHeight,this.doc.height),K=Math.max(_.sizer.clientWidth,_.lineSpace.clientWidth);(y=="above"||u.bottom+p.offsetHeight>H)&&u.top>p.offsetHeight?E=u.top-p.offsetHeight:u.bottom+p.offsetHeight<=H&&(E=u.bottom),O+p.offsetWidth>K&&(O=K-p.offsetWidth)}p.style.top=E+"px",p.style.left=p.style.right="",C=="right"?(O=_.sizer.clientWidth-p.offsetWidth,p.style.right="0px"):(C=="left"?O=0:C=="middle"&&(O=(_.sizer.clientWidth-p.offsetWidth)/2),p.style.left=O+"px"),g&&vg(this,{left:O,top:E,right:O+p.offsetWidth,bottom:E+p.offsetHeight})},"addWidget"),triggerOnKeyDown:$e(Eh),triggerOnKeyPress:$e(jg),triggerOnKeyUp:Co,triggerOnMouseDown:$e(Gg),execCommand:i(function(u){if($c.hasOwnProperty(u))return $c[u].call(null,this)},"execCommand"),triggerElectric:$e(function(u){bd(this,u)}),findPosH:i(function(u,p,g,y){var C=1;p<0&&(C=-1,p=-p);for(var _=qe(this.doc,u),E=0;E0&&O(g.charAt(y-1));)--y;for(;C.5||this.options.lineWrapping)&&nd(this),Mt(this,"refresh",this)}),swapDoc:$e(function(u){var p=this.doc;return p.cm=null,this.state.selectingText&&this.state.selectingText(),ch(this,u),Vo(this),this.display.input.reset(),Ar(this,u.scrollLeft,u.scrollTop),this.curOp.forceScroll=!0,Kt(this,"swapDoc",this,p),p}),phrase:i(function(u){var p=this.options.phrases;return p&&Object.prototype.hasOwnProperty.call(p,u)?p[u]:u},"phrase"),getInputField:i(function(){return this.display.input.getField()},"getInputField"),getWrapperElement:i(function(){return this.display.wrapper},"getWrapperElement"),getScrollerElement:i(function(){return this.display.scroller},"getScrollerElement"),getGutterElement:i(function(){return this.display.gutters},"getGutterElement")},zn(r),r.registerHelper=function(u,p,g){c.hasOwnProperty(u)||(c[u]=r[u]={_global:[]}),c[u][p]=g},r.registerGlobalHelper=function(u,p,g,y){r.registerHelper(u,p,y),c[u]._global.push({pred:g,val:y})}}i(vu,"addEditorMethods");function Ue(r,o,c,u,p){var g=o,y=c,C=Ae(r,o.line),_=p&&r.direction=="rtl"?-c:c;function E(){var _e=o.line+_;return _e=r.first+r.size?!1:(o=new ce(_e,o.ch,o.sticky),C=Ae(r,_e))}i(E,"findNextLine");function O(_e){var ye;if(u=="codepoint"){var ke=C.text.charCodeAt(o.ch+(c>0?0:-1));if(isNaN(ke))ye=null;else{var Ie=c>0?ke>=55296&&ke<56320:ke>=56320&&ke<57343;ye=new ce(o.line,Math.max(0,Math.min(C.text.length,o.ch+c*(Ie?2:1))),-c)}}else p?ye=fa(r.cm,C,o,c):ye=Wc(C,o,c);if(ye==null)if(!_e&&E())o=Uc(p,r.cm,C,o.line,_);else return!1;else o=ye;return!0}if(i(O,"moveOnce"),u=="char"||u=="codepoint")O();else if(u=="column")O(!0);else if(u=="word"||u=="group")for(var H=null,K=u=="group",V=r.cm&&r.cm.getHelper(o,"wordChars"),re=!0;!(c<0&&!O(!re));re=!1){var ae=C.text.charAt(o.ch)||` +`)&&(re=ae=ce(re.line,0)));var pe={from:re,to:ae,text:E?E[K%E.length]:_,origin:p||(C?"paste":r.state.cutIncoming>y?"cut":"+input")};au(r.doc,pe),Kt(r,"inputRead",r,pe)}o&&!C&&bd(r,o),tr(r),r.curOp.updateInput<2&&(r.curOp.updateInput=H),r.curOp.typing=!0,r.state.pasteIncoming=r.state.cutIncoming=-1}i(Nh,"applyTextInput");function Qo(r,o){var c=r.clipboardData&&r.clipboardData.getData("Text");if(c)return r.preventDefault(),!o.isReadOnly()&&!o.options.disableInput&&o.hasFocus()&&yn(o,function(){return Nh(o,c,0,null,"paste")}),!0}i(Qo,"handlePaste");function bd(r,o){if(!(!r.options.electricChars||!r.options.smartIndent))for(var c=r.doc.sel,u=c.ranges.length-1;u>=0;u--){var p=c.ranges[u];if(!(p.head.ch>100||u&&c.ranges[u-1].head.line==p.head.line)){var g=r.getModeAt(p.head),y=!1;if(g.electricChars){for(var C=0;C-1){y=Gc(r,p.head.line,"smart");break}}else g.electricInput&&g.electricInput.test(Pe(r.doc,p.head.line).text.slice(0,p.head.ch))&&(y=Gc(r,p.head.line,"smart"));y&&Kt(r,"electricInput",r,p.head.line)}}}i(bd,"triggerElectric");function Td(r){for(var o=[],c=[],u=0;ug&&(Gc(this,C.head.line,u,!0),g=C.head.line,y==this.doc.sel.primIndex&&tr(this));else{var _=C.from(),E=C.to(),O=Math.max(g,_.line);g=Math.min(this.lastLine(),E.line-(E.ch?0:1))+1;for(var H=O;H0&&zi(this.doc,y,new Et(_,K[y].to()),st)}}}),getTokenAt:i(function(u,p){return Rl(this,u,p)},"getTokenAt"),getLineTokens:i(function(u,p){return Rl(this,ce(u),p,!0)},"getLineTokens"),getTokenTypeAt:i(function(u){u=qe(this.doc,u);var p=Ml(this,Pe(this.doc,u.line)),g=0,y=(p.length-1)/2,C=u.ch,_;if(C==0)_=p[2];else for(;;){var E=g+y>>1;if((E?p[E*2-1]:0)>=C)y=E;else if(p[E*2+1]_&&(u=_,y=!0),C=Pe(this.doc,u)}else C=u;return vn(this,C,{top:0,left:0},p||"page",g||y).top+(y?this.doc.height-vi(C):0)},"heightAtLine"),defaultTextHeight:i(function(){return po(this.display)},"defaultTextHeight"),defaultCharWidth:i(function(){return Cs(this.display)},"defaultCharWidth"),getViewport:i(function(){return{from:this.display.viewFrom,to:this.display.viewTo}},"getViewport"),addWidget:i(function(u,p,g,y,C){var _=this.display;u=J(this,qe(this.doc,u));var E=u.bottom,O=u.left;if(p.style.position="absolute",p.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(p),_.sizer.appendChild(p),y=="over")E=u.top;else if(y=="above"||y=="near"){var H=Math.max(_.wrapper.clientHeight,this.doc.height),K=Math.max(_.sizer.clientWidth,_.lineSpace.clientWidth);(y=="above"||u.bottom+p.offsetHeight>H)&&u.top>p.offsetHeight?E=u.top-p.offsetHeight:u.bottom+p.offsetHeight<=H&&(E=u.bottom),O+p.offsetWidth>K&&(O=K-p.offsetWidth)}p.style.top=E+"px",p.style.left=p.style.right="",C=="right"?(O=_.sizer.clientWidth-p.offsetWidth,p.style.right="0px"):(C=="left"?O=0:C=="middle"&&(O=(_.sizer.clientWidth-p.offsetWidth)/2),p.style.left=O+"px"),g&&vg(this,{left:O,top:E,right:O+p.offsetWidth,bottom:E+p.offsetHeight})},"addWidget"),triggerOnKeyDown:$e(Eh),triggerOnKeyPress:$e(jg),triggerOnKeyUp:Co,triggerOnMouseDown:$e(Gg),execCommand:i(function(u){if($c.hasOwnProperty(u))return $c[u].call(null,this)},"execCommand"),triggerElectric:$e(function(u){bd(this,u)}),findPosH:i(function(u,p,g,y){var C=1;p<0&&(C=-1,p=-p);for(var _=qe(this.doc,u),E=0;E0&&O(g.charAt(y-1));)--y;for(;C.5||this.options.lineWrapping)&&nd(this),Mt(this,"refresh",this)}),swapDoc:$e(function(u){var p=this.doc;return p.cm=null,this.state.selectingText&&this.state.selectingText(),ch(this,u),Vo(this),this.display.input.reset(),Pr(this,u.scrollLeft,u.scrollTop),this.curOp.forceScroll=!0,Kt(this,"swapDoc",this,p),p}),phrase:i(function(u){var p=this.options.phrases;return p&&Object.prototype.hasOwnProperty.call(p,u)?p[u]:u},"phrase"),getInputField:i(function(){return this.display.input.getField()},"getInputField"),getWrapperElement:i(function(){return this.display.wrapper},"getWrapperElement"),getScrollerElement:i(function(){return this.display.scroller},"getScrollerElement"),getGutterElement:i(function(){return this.display.gutters},"getGutterElement")},zn(r),r.registerHelper=function(u,p,g){c.hasOwnProperty(u)||(c[u]=r[u]={_global:[]}),c[u][p]=g},r.registerGlobalHelper=function(u,p,g,y){r.registerHelper(u,p,y),c[u]._global.push({pred:g,val:y})}}i(vu,"addEditorMethods");function Ue(r,o,c,u,p){var g=o,y=c,C=Pe(r,o.line),_=p&&r.direction=="rtl"?-c:c;function E(){var _e=o.line+_;return _e=r.first+r.size?!1:(o=new ce(_e,o.ch,o.sticky),C=Pe(r,_e))}i(E,"findNextLine");function O(_e){var ye;if(u=="codepoint"){var ke=C.text.charCodeAt(o.ch+(c>0?0:-1));if(isNaN(ke))ye=null;else{var Ie=c>0?ke>=55296&&ke<56320:ke>=56320&&ke<57343;ye=new ce(o.line,Math.max(0,Math.min(C.text.length,o.ch+c*(Ie?2:1))),-c)}}else p?ye=fa(r.cm,C,o,c):ye=Wc(C,o,c);if(ye==null)if(!_e&&E())o=Uc(p,r.cm,C,o.line,_);else return!1;else o=ye;return!0}if(i(O,"moveOnce"),u=="char"||u=="codepoint")O();else if(u=="column")O(!0);else if(u=="word"||u=="group")for(var H=null,K=u=="group",V=r.cm&&r.cm.getHelper(o,"wordChars"),re=!0;!(c<0&&!O(!re));re=!1){var ae=C.text.charAt(o.ch)||` `,pe=Xr(ae,V)?"w":K&&ae==` -`?"n":!K||/\s/.test(ae)?null:"p";if(K&&!re&&!pe&&(pe="s"),H&&H!=pe){c<0&&(c=1,O(),o.sticky="after");break}if(pe&&(H=pe),c>0&&!O(!re))break}var we=ou(r,o,g,y,!0);return qs(g,we)&&(we.hitSide=!0),we}i(Ue,"findPosH");function Qc(r,o,c,u){var p=r.doc,g=o.left,y;if(u=="page"){var C=Math.min(r.display.wrapper.clientHeight,yr(r).innerHeight||p(r).documentElement.clientHeight),_=Math.max(C-.5*po(r.display),3);y=(c>0?o.bottom:o.top)+c*_}else u=="line"&&(y=c>0?o.bottom+3:o.top-3);for(var E;E=yt(r,g,y),!!E.outside;){if(c<0?y<=0:y>=p.height){E.hitSide=!0;break}y+=c*5}return E}i(Qc,"findPosV");var bt=i(function(r){this.cm=r,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new se,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null},"ContentEditableInput");bt.prototype.init=function(r){var o=this,c=this,u=c.cm,p=c.div=r.lineDiv;p.contentEditable=!0,Yc(p,u.options.spellcheck,u.options.autocorrect,u.options.autocapitalize);function g(C){for(var _=C.target;_;_=_.parentNode){if(_==p)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(_.className))break}return!1}i(g,"belongsToInput"),ze(p,"paste",function(C){!g(C)||At(u,C)||Qo(C,u)||v<=11&&setTimeout(Lt(u,function(){return o.updateFromDOM()}),20)}),ze(p,"compositionstart",function(C){o.composing={data:C.data,done:!1}}),ze(p,"compositionupdate",function(C){o.composing||(o.composing={data:C.data,done:!1})}),ze(p,"compositionend",function(C){o.composing&&(C.data!=o.composing.data&&o.readFromDOMSoon(),o.composing.done=!0)}),ze(p,"touchstart",function(){return c.forceCompositionEnd()}),ze(p,"input",function(){o.composing||o.readFromDOMSoon()});function y(C){if(!(!g(C)||At(u,C))){if(u.somethingSelected())Ed({lineWise:!1,text:u.getSelections()}),C.type=="cut"&&u.replaceSelection("",null,"cut");else if(u.options.lineWiseCopyCut){var _=Td(u);Ed({lineWise:!0,text:_.text}),C.type=="cut"&&u.operation(function(){u.setSelections(_.ranges,0,st),u.replaceSelection("",null,"cut")})}else return;if(C.clipboardData){C.clipboardData.clearData();var E=Wi.text.join(` +`?"n":!K||/\s/.test(ae)?null:"p";if(K&&!re&&!pe&&(pe="s"),H&&H!=pe){c<0&&(c=1,O(),o.sticky="after");break}if(pe&&(H=pe),c>0&&!O(!re))break}var we=ou(r,o,g,y,!0);return qs(g,we)&&(we.hitSide=!0),we}i(Ue,"findPosH");function Qc(r,o,c,u){var p=r.doc,g=o.left,y;if(u=="page"){var C=Math.min(r.display.wrapper.clientHeight,yr(r).innerHeight||p(r).documentElement.clientHeight),_=Math.max(C-.5*po(r.display),3);y=(c>0?o.bottom:o.top)+c*_}else u=="line"&&(y=c>0?o.bottom+3:o.top-3);for(var E;E=yt(r,g,y),!!E.outside;){if(c<0?y<=0:y>=p.height){E.hitSide=!0;break}y+=c*5}return E}i(Qc,"findPosV");var bt=i(function(r){this.cm=r,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new se,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null},"ContentEditableInput");bt.prototype.init=function(r){var o=this,c=this,u=c.cm,p=c.div=r.lineDiv;p.contentEditable=!0,Yc(p,u.options.spellcheck,u.options.autocorrect,u.options.autocapitalize);function g(C){for(var _=C.target;_;_=_.parentNode){if(_==p)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(_.className))break}return!1}i(g,"belongsToInput"),ze(p,"paste",function(C){!g(C)||Pt(u,C)||Qo(C,u)||v<=11&&setTimeout(Lt(u,function(){return o.updateFromDOM()}),20)}),ze(p,"compositionstart",function(C){o.composing={data:C.data,done:!1}}),ze(p,"compositionupdate",function(C){o.composing||(o.composing={data:C.data,done:!1})}),ze(p,"compositionend",function(C){o.composing&&(C.data!=o.composing.data&&o.readFromDOMSoon(),o.composing.done=!0)}),ze(p,"touchstart",function(){return c.forceCompositionEnd()}),ze(p,"input",function(){o.composing||o.readFromDOMSoon()});function y(C){if(!(!g(C)||Pt(u,C))){if(u.somethingSelected())Ed({lineWise:!1,text:u.getSelections()}),C.type=="cut"&&u.replaceSelection("",null,"cut");else if(u.options.lineWiseCopyCut){var _=Td(u);Ed({lineWise:!0,text:_.text}),C.type=="cut"&&u.operation(function(){u.setSelections(_.ranges,0,st),u.replaceSelection("",null,"cut")})}else return;if(C.clipboardData){C.clipboardData.clearData();var E=Wi.text.join(` `);if(C.clipboardData.setData("Text",E),C.clipboardData.getData("Text")==E){C.preventDefault();return}}var O=Xc(),H=O.firstChild;Yc(H),u.display.lineSpace.insertBefore(O,u.display.lineSpace.firstChild),H.value=Wi.text.join(` -`);var K=ot(Ut(p));fn(H),setTimeout(function(){u.display.lineSpace.removeChild(O),K.focus(),K==p&&c.showPrimarySelection()},50)}}i(y,"onCopyCut"),ze(p,"copy",y),ze(p,"cut",y)},bt.prototype.screenReaderLabelChanged=function(r){r?this.div.setAttribute("aria-label",r):this.div.removeAttribute("aria-label")},bt.prototype.prepareSelection=function(){var r=Zp(this.cm,!1);return r.focus=ot(Ut(this.div))==this.div,r},bt.prototype.showSelection=function(r,o){!r||!this.cm.display.view.length||((r.focus||o)&&this.showPrimarySelection(),this.showMultipleSelections(r))},bt.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},bt.prototype.showPrimarySelection=function(){var r=this.getSelection(),o=this.cm,c=o.doc.sel.primary(),u=c.from(),p=c.to();if(o.display.viewTo==o.display.viewFrom||u.line>=o.display.viewTo||p.line=o.display.viewFrom&&da(o,u)||{node:C[0].measure.map[2],offset:0},E=p.liner.firstLine()&&(u=ce(u.line-1,Ae(r.doc,u.line-1).length)),p.ch==Ae(r.doc,p.line).text.length&&p.lineo.viewTo-1)return!1;var g,y,C;u.line==o.viewFrom||(g=Wa(r,u.line))==0?(y=vt(o.view[0].line),C=o.view[0].node):(y=vt(o.view[g].line),C=o.view[g-1].node.nextSibling);var _=Wa(r,p.line),E,O;if(_==o.view.length-1?(E=o.viewTo-1,O=o.lineDiv.lastChild):(E=vt(o.view[_+1].line)-1,O=o.view[_+1].node.previousSibling),!C)return!1;for(var H=r.doc.splitLines(ev(r,C,O,y,E)),K=lo(r.doc,ce(y,0),ce(E,Ae(r.doc,E).text.length));H.length>1&&K.length>1;)if(lt(H)==lt(K))H.pop(),K.pop(),E--;else if(H[0]==K[0])H.shift(),K.shift(),y++;else break;for(var V=0,re=0,ae=H[0],pe=K[0],we=Math.min(ae.length,pe.length);Vu.ch&&_e.charCodeAt(_e.length-re-1)==ye.charCodeAt(ye.length-re-1);)V--,re++;H[H.length-1]=_e.slice(0,_e.length-re).replace(/^\u200b+/,""),H[0]=H[0].slice(V).replace(/\u200b+$/,"");var Ie=ce(y,V),Oe=ce(E,K.length?lt(K).length-re:0);if(H.length>1||H[0]||Ve(Ie,Oe))return Qa(r.doc,H,Ie,Oe,"+input"),!0},bt.prototype.ensurePolled=function(){this.forceCompositionEnd()},bt.prototype.reset=function(){this.forceCompositionEnd()},bt.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},bt.prototype.readFromDOMSoon=function(){var r=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(r.readDOMTimeout=null,r.composing)if(r.composing.done)r.composing=null;else return;r.updateFromDOM()},80))},bt.prototype.updateFromDOM=function(){var r=this;(this.cm.isReadOnly()||!this.pollContent())&&yn(this.cm,function(){return Un(r.cm)})},bt.prototype.setUneditable=function(r){r.contentEditable="false"},bt.prototype.onKeyPress=function(r){r.charCode==0||this.composing||(r.preventDefault(),this.cm.isReadOnly()||Lt(this.cm,Nh)(this.cm,String.fromCharCode(r.charCode==null?r.keyCode:r.charCode),0))},bt.prototype.readOnlyChanged=function(r){this.div.contentEditable=String(r!="nocursor")},bt.prototype.onContextMenu=function(){},bt.prototype.resetPosition=function(){},bt.prototype.needsContentAttribute=!0;function da(r,o){var c=Gl(r,o.line);if(!c||c.hidden)return null;var u=Ae(r.doc,o.line),p=td(c,u,o.line),g=Me(u,r.doc.direction),y="left";if(g){var C=ee(g,o.ch);y=C%2?"right":"left"}var _=W(p.map,o.ch,y);return _.offset=_.collapse=="right"?_.end:_.start,_}i(da,"posToDOM");function Fw(r){for(var o=r;o;o=o.parentNode)if(/CodeMirror-gutter-wrapper/.test(o.className))return!0;return!1}i(Fw,"isInGutter");function pa(r,o){return o&&(r.bad=!0),r}i(pa,"badPos");function ev(r,o,c,u,p){var g="",y=!1,C=r.doc.lineSeparator(),_=!1;function E(V){return function(re){return re.id==V}}i(E,"recognizeMarker");function O(){y&&(g+=C,_&&(g+=C),y=_=!1)}i(O,"close");function H(V){V&&(O(),g+=V)}i(H,"addText");function K(V){if(V.nodeType==1){var re=V.getAttribute("cm-text");if(re){H(re);return}var ae=V.getAttribute("cm-marker"),pe;if(ae){var we=r.findMarks(ce(u,0),ce(p+1,0),E(+ae));we.length&&(pe=we[0].find(0))&&H(lo(r.doc,pe.from,pe.to).join(C));return}if(V.getAttribute("contenteditable")=="false")return;var _e=/^(pre|div|p|li|table|br)$/i.test(V.nodeName);if(!/^br$/i.test(V.nodeName)&&V.textContent.length==0)return;_e&&O();for(var ye=0;ye=9&&o.hasSelection&&(o.hasSelection=null),c.poll()}),ze(p,"paste",function(y){At(u,y)||Qo(y,u)||(u.state.pasteIncoming=+new Date,c.fastPoll())});function g(y){if(!At(u,y)){if(u.somethingSelected())Ed({lineWise:!1,text:u.getSelections()});else if(u.options.lineWiseCopyCut){var C=Td(u);Ed({lineWise:!0,text:C.text}),y.type=="cut"?u.setSelections(C.ranges,null,st):(c.prevInput="",p.value=C.text.join(` -`),fn(p))}else return;y.type=="cut"&&(u.state.cutIncoming=+new Date)}}i(g,"prepareCopyCut"),ze(p,"cut",g),ze(p,"copy",g),ze(r.scroller,"paste",function(y){if(!(yi(r,y)||At(u,y))){if(!p.dispatchEvent){u.state.pasteIncoming=+new Date,c.focus();return}var C=new Event("paste");C.clipboardData=y.clipboardData,p.dispatchEvent(C)}}),ze(r.lineSpace,"selectstart",function(y){yi(r,y)||Nr(y)}),ze(p,"compositionstart",function(){var y=u.getCursor("from");c.composing&&c.composing.range.clear(),c.composing={start:y,range:u.markText(y,u.getCursor("to"),{className:"CodeMirror-composing"})}}),ze(p,"compositionend",function(){c.composing&&(c.poll(),c.composing.range.clear(),c.composing=null)})},pr.prototype.createField=function(r){this.wrapper=Xc(),this.textarea=this.wrapper.firstChild;var o=this.cm.options;Yc(this.textarea,o.spellcheck,o.autocorrect,o.autocapitalize)},pr.prototype.screenReaderLabelChanged=function(r){r?this.textarea.setAttribute("aria-label",r):this.textarea.removeAttribute("aria-label")},pr.prototype.prepareSelection=function(){var r=this.cm,o=r.display,c=r.doc,u=Zp(r);if(r.options.moveInputWithCursor){var p=J(r,c.sel.primary().head,"div"),g=o.wrapper.getBoundingClientRect(),y=o.lineDiv.getBoundingClientRect();u.teTop=Math.max(0,Math.min(o.wrapper.clientHeight-10,p.top+y.top-g.top)),u.teLeft=Math.max(0,Math.min(o.wrapper.clientWidth-10,p.left+y.left-g.left))}return u},pr.prototype.showSelection=function(r){var o=this.cm,c=o.display;tt(c.cursorDiv,r.cursors),tt(c.selectionDiv,r.selection),r.teTop!=null&&(this.wrapper.style.top=r.teTop+"px",this.wrapper.style.left=r.teLeft+"px")},pr.prototype.reset=function(r){if(!(this.contextMenuPending||this.composing&&r)){var o=this.cm;if(this.resetting=!0,o.somethingSelected()){this.prevInput="";var c=o.getSelection();this.textarea.value=c,o.state.focused&&fn(this.textarea),d&&v>=9&&(this.hasSelection=c)}else r||(this.prevInput=this.textarea.value="",d&&v>=9&&(this.hasSelection=null));this.resetting=!1}},pr.prototype.getField=function(){return this.textarea},pr.prototype.supportsTouch=function(){return!1},pr.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!L||ot(Ut(this.textarea))!=this.textarea))try{this.textarea.focus()}catch{}},pr.prototype.blur=function(){this.textarea.blur()},pr.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},pr.prototype.receivedFocus=function(){this.slowPoll()},pr.prototype.slowPoll=function(){var r=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){r.poll(),r.cm.state.focused&&r.slowPoll()})},pr.prototype.fastPoll=function(){var r=!1,o=this;o.pollingFast=!0;function c(){var u=o.poll();!u&&!r?(r=!0,o.polling.set(60,c)):(o.pollingFast=!1,o.slowPoll())}i(c,"p"),o.polling.set(20,c)},pr.prototype.poll=function(){var r=this,o=this.cm,c=this.textarea,u=this.prevInput;if(this.contextMenuPending||this.resetting||!o.state.focused||Bp(c)&&!u&&!this.composing||o.isReadOnly()||o.options.disableInput||o.state.keySeq)return!1;var p=c.value;if(p==u&&!o.somethingSelected())return!1;if(d&&v>=9&&this.hasSelection===p||D&&/[\uf700-\uf7ff]/.test(p))return o.display.input.reset(),!1;if(o.doc.sel==o.display.selForContextMenu){var g=p.charCodeAt(0);if(g==8203&&!u&&(u="\u200B"),g==8666)return this.reset(),this.cm.execCommand("undo")}for(var y=0,C=Math.min(u.length,p.length);y1e3||p.indexOf(` +`);var K=ot(Ut(p));fn(H),setTimeout(function(){u.display.lineSpace.removeChild(O),K.focus(),K==p&&c.showPrimarySelection()},50)}}i(y,"onCopyCut"),ze(p,"copy",y),ze(p,"cut",y)},bt.prototype.screenReaderLabelChanged=function(r){r?this.div.setAttribute("aria-label",r):this.div.removeAttribute("aria-label")},bt.prototype.prepareSelection=function(){var r=Zp(this.cm,!1);return r.focus=ot(Ut(this.div))==this.div,r},bt.prototype.showSelection=function(r,o){!r||!this.cm.display.view.length||((r.focus||o)&&this.showPrimarySelection(),this.showMultipleSelections(r))},bt.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},bt.prototype.showPrimarySelection=function(){var r=this.getSelection(),o=this.cm,c=o.doc.sel.primary(),u=c.from(),p=c.to();if(o.display.viewTo==o.display.viewFrom||u.line>=o.display.viewTo||p.line=o.display.viewFrom&&da(o,u)||{node:C[0].measure.map[2],offset:0},E=p.liner.firstLine()&&(u=ce(u.line-1,Pe(r.doc,u.line-1).length)),p.ch==Pe(r.doc,p.line).text.length&&p.lineo.viewTo-1)return!1;var g,y,C;u.line==o.viewFrom||(g=Wa(r,u.line))==0?(y=vt(o.view[0].line),C=o.view[0].node):(y=vt(o.view[g].line),C=o.view[g-1].node.nextSibling);var _=Wa(r,p.line),E,O;if(_==o.view.length-1?(E=o.viewTo-1,O=o.lineDiv.lastChild):(E=vt(o.view[_+1].line)-1,O=o.view[_+1].node.previousSibling),!C)return!1;for(var H=r.doc.splitLines(ev(r,C,O,y,E)),K=lo(r.doc,ce(y,0),ce(E,Pe(r.doc,E).text.length));H.length>1&&K.length>1;)if(lt(H)==lt(K))H.pop(),K.pop(),E--;else if(H[0]==K[0])H.shift(),K.shift(),y++;else break;for(var V=0,re=0,ae=H[0],pe=K[0],we=Math.min(ae.length,pe.length);Vu.ch&&_e.charCodeAt(_e.length-re-1)==ye.charCodeAt(ye.length-re-1);)V--,re++;H[H.length-1]=_e.slice(0,_e.length-re).replace(/^\u200b+/,""),H[0]=H[0].slice(V).replace(/\u200b+$/,"");var Ie=ce(y,V),Oe=ce(E,K.length?lt(K).length-re:0);if(H.length>1||H[0]||Ve(Ie,Oe))return Qa(r.doc,H,Ie,Oe,"+input"),!0},bt.prototype.ensurePolled=function(){this.forceCompositionEnd()},bt.prototype.reset=function(){this.forceCompositionEnd()},bt.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},bt.prototype.readFromDOMSoon=function(){var r=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(r.readDOMTimeout=null,r.composing)if(r.composing.done)r.composing=null;else return;r.updateFromDOM()},80))},bt.prototype.updateFromDOM=function(){var r=this;(this.cm.isReadOnly()||!this.pollContent())&&yn(this.cm,function(){return Un(r.cm)})},bt.prototype.setUneditable=function(r){r.contentEditable="false"},bt.prototype.onKeyPress=function(r){r.charCode==0||this.composing||(r.preventDefault(),this.cm.isReadOnly()||Lt(this.cm,Nh)(this.cm,String.fromCharCode(r.charCode==null?r.keyCode:r.charCode),0))},bt.prototype.readOnlyChanged=function(r){this.div.contentEditable=String(r!="nocursor")},bt.prototype.onContextMenu=function(){},bt.prototype.resetPosition=function(){},bt.prototype.needsContentAttribute=!0;function da(r,o){var c=Gl(r,o.line);if(!c||c.hidden)return null;var u=Pe(r.doc,o.line),p=td(c,u,o.line),g=Me(u,r.doc.direction),y="left";if(g){var C=ee(g,o.ch);y=C%2?"right":"left"}var _=W(p.map,o.ch,y);return _.offset=_.collapse=="right"?_.end:_.start,_}i(da,"posToDOM");function Fw(r){for(var o=r;o;o=o.parentNode)if(/CodeMirror-gutter-wrapper/.test(o.className))return!0;return!1}i(Fw,"isInGutter");function pa(r,o){return o&&(r.bad=!0),r}i(pa,"badPos");function ev(r,o,c,u,p){var g="",y=!1,C=r.doc.lineSeparator(),_=!1;function E(V){return function(re){return re.id==V}}i(E,"recognizeMarker");function O(){y&&(g+=C,_&&(g+=C),y=_=!1)}i(O,"close");function H(V){V&&(O(),g+=V)}i(H,"addText");function K(V){if(V.nodeType==1){var re=V.getAttribute("cm-text");if(re){H(re);return}var ae=V.getAttribute("cm-marker"),pe;if(ae){var we=r.findMarks(ce(u,0),ce(p+1,0),E(+ae));we.length&&(pe=we[0].find(0))&&H(lo(r.doc,pe.from,pe.to).join(C));return}if(V.getAttribute("contenteditable")=="false")return;var _e=/^(pre|div|p|li|table|br)$/i.test(V.nodeName);if(!/^br$/i.test(V.nodeName)&&V.textContent.length==0)return;_e&&O();for(var ye=0;ye=9&&o.hasSelection&&(o.hasSelection=null),c.poll()}),ze(p,"paste",function(y){Pt(u,y)||Qo(y,u)||(u.state.pasteIncoming=+new Date,c.fastPoll())});function g(y){if(!Pt(u,y)){if(u.somethingSelected())Ed({lineWise:!1,text:u.getSelections()});else if(u.options.lineWiseCopyCut){var C=Td(u);Ed({lineWise:!0,text:C.text}),y.type=="cut"?u.setSelections(C.ranges,null,st):(c.prevInput="",p.value=C.text.join(` +`),fn(p))}else return;y.type=="cut"&&(u.state.cutIncoming=+new Date)}}i(g,"prepareCopyCut"),ze(p,"cut",g),ze(p,"copy",g),ze(r.scroller,"paste",function(y){if(!(yi(r,y)||Pt(u,y))){if(!p.dispatchEvent){u.state.pasteIncoming=+new Date,c.focus();return}var C=new Event("paste");C.clipboardData=y.clipboardData,p.dispatchEvent(C)}}),ze(r.lineSpace,"selectstart",function(y){yi(r,y)||Nr(y)}),ze(p,"compositionstart",function(){var y=u.getCursor("from");c.composing&&c.composing.range.clear(),c.composing={start:y,range:u.markText(y,u.getCursor("to"),{className:"CodeMirror-composing"})}}),ze(p,"compositionend",function(){c.composing&&(c.poll(),c.composing.range.clear(),c.composing=null)})},pr.prototype.createField=function(r){this.wrapper=Xc(),this.textarea=this.wrapper.firstChild;var o=this.cm.options;Yc(this.textarea,o.spellcheck,o.autocorrect,o.autocapitalize)},pr.prototype.screenReaderLabelChanged=function(r){r?this.textarea.setAttribute("aria-label",r):this.textarea.removeAttribute("aria-label")},pr.prototype.prepareSelection=function(){var r=this.cm,o=r.display,c=r.doc,u=Zp(r);if(r.options.moveInputWithCursor){var p=J(r,c.sel.primary().head,"div"),g=o.wrapper.getBoundingClientRect(),y=o.lineDiv.getBoundingClientRect();u.teTop=Math.max(0,Math.min(o.wrapper.clientHeight-10,p.top+y.top-g.top)),u.teLeft=Math.max(0,Math.min(o.wrapper.clientWidth-10,p.left+y.left-g.left))}return u},pr.prototype.showSelection=function(r){var o=this.cm,c=o.display;tt(c.cursorDiv,r.cursors),tt(c.selectionDiv,r.selection),r.teTop!=null&&(this.wrapper.style.top=r.teTop+"px",this.wrapper.style.left=r.teLeft+"px")},pr.prototype.reset=function(r){if(!(this.contextMenuPending||this.composing&&r)){var o=this.cm;if(this.resetting=!0,o.somethingSelected()){this.prevInput="";var c=o.getSelection();this.textarea.value=c,o.state.focused&&fn(this.textarea),d&&v>=9&&(this.hasSelection=c)}else r||(this.prevInput=this.textarea.value="",d&&v>=9&&(this.hasSelection=null));this.resetting=!1}},pr.prototype.getField=function(){return this.textarea},pr.prototype.supportsTouch=function(){return!1},pr.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!L||ot(Ut(this.textarea))!=this.textarea))try{this.textarea.focus()}catch{}},pr.prototype.blur=function(){this.textarea.blur()},pr.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},pr.prototype.receivedFocus=function(){this.slowPoll()},pr.prototype.slowPoll=function(){var r=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){r.poll(),r.cm.state.focused&&r.slowPoll()})},pr.prototype.fastPoll=function(){var r=!1,o=this;o.pollingFast=!0;function c(){var u=o.poll();!u&&!r?(r=!0,o.polling.set(60,c)):(o.pollingFast=!1,o.slowPoll())}i(c,"p"),o.polling.set(20,c)},pr.prototype.poll=function(){var r=this,o=this.cm,c=this.textarea,u=this.prevInput;if(this.contextMenuPending||this.resetting||!o.state.focused||Bp(c)&&!u&&!this.composing||o.isReadOnly()||o.options.disableInput||o.state.keySeq)return!1;var p=c.value;if(p==u&&!o.somethingSelected())return!1;if(d&&v>=9&&this.hasSelection===p||D&&/[\uf700-\uf7ff]/.test(p))return o.display.input.reset(),!1;if(o.doc.sel==o.display.selForContextMenu){var g=p.charCodeAt(0);if(g==8203&&!u&&(u="\u200B"),g==8666)return this.reset(),this.cm.execCommand("undo")}for(var y=0,C=Math.min(u.length,p.length);y1e3||p.indexOf(` `)>-1?c.value=r.prevInput="":r.prevInput=p,r.composing&&(r.composing.range.clear(),r.composing.range=o.markText(r.composing.start,o.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},pr.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},pr.prototype.onKeyPress=function(){d&&v>=9&&(this.hasSelection=null),this.fastPoll()},pr.prototype.onContextMenu=function(r){var o=this,c=o.cm,u=c.display,p=o.textarea;o.contextMenuPending&&o.contextMenuPending();var g=jo(c,r),y=u.scroller.scrollTop;if(!g||I)return;var C=c.options.resetSelectionOnContextMenu;C&&c.doc.sel.contains(g)==-1&&Lt(c,en)(c.doc,oa(g),st);var _=p.style.cssText,E=o.wrapper.style.cssText,O=o.wrapper.offsetParent.getBoundingClientRect();o.wrapper.style.cssText="position: static",p.style.cssText=`position: absolute; width: 30px; height: 30px; top: `+(r.clientY-O.top-5)+"px; left: "+(r.clientX-O.left-5)+`px; z-index: 1000; background: `+(d?"rgba(255, 255, 255, .05)":"transparent")+`; - outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var H;S&&(H=p.ownerDocument.defaultView.scrollY),u.input.focus(),S&&p.ownerDocument.defaultView.scrollTo(null,H),u.input.reset(),c.somethingSelected()||(p.value=o.prevInput=" "),o.contextMenuPending=V,u.selForContextMenu=c.doc.sel,clearTimeout(u.detectingSelectAll);function K(){if(p.selectionStart!=null){var ae=c.somethingSelected(),pe="\u200B"+(ae?p.value:"");p.value="\u21DA",p.value=pe,o.prevInput=ae?"":"\u200B",p.selectionStart=1,p.selectionEnd=pe.length,u.selForContextMenu=c.doc.sel}}i(K,"prepareSelectAllHack");function V(){if(o.contextMenuPending==V&&(o.contextMenuPending=!1,o.wrapper.style.cssText=E,p.style.cssText=_,d&&v<9&&u.scrollbars.setScrollTop(u.scroller.scrollTop=y),p.selectionStart!=null)){(!d||d&&v<9)&&K();var ae=0,pe=i(function(){u.selForContextMenu==c.doc.sel&&p.selectionStart==0&&p.selectionEnd>0&&o.prevInput=="\u200B"?Lt(c,su)(c):ae++<10?u.detectingSelectAll=setTimeout(pe,500):(u.selForContextMenu=null,u.input.reset())},"poll");u.detectingSelectAll=setTimeout(pe,200)}}if(i(V,"rehide"),d&&v>=9&&K(),he){Pa(r);var re=i(function(){Yt(window,"mouseup",re),setTimeout(V,20)},"mouseup");ze(window,"mouseup",re)}else setTimeout(V,50)},pr.prototype.readOnlyChanged=function(r){r||this.reset(),this.textarea.disabled=r=="nocursor",this.textarea.readOnly=!!r},pr.prototype.setUneditable=function(){},pr.prototype.needsContentAttribute=!1;function tv(r,o){if(o=o?Gt(o):{},o.value=r.value,!o.tabindex&&r.tabIndex&&(o.tabindex=r.tabIndex),!o.placeholder&&r.placeholder&&(o.placeholder=r.placeholder),o.autofocus==null){var c=ot(Ut(r));o.autofocus=c==r||r.getAttribute("autofocus")!=null&&c==document.body}function u(){r.value=C.getValue()}i(u,"save");var p;if(r.form&&(ze(r.form,"submit",u),!o.leaveSubmitMethodAlone)){var g=r.form;p=g.submit;try{var y=g.submit=function(){u(),g.submit=p,g.submit(),g.submit=y}}catch{}}o.finishInit=function(_){_.save=u,_.getTextArea=function(){return r},_.toTextArea=function(){_.toTextArea=isNaN,u(),r.parentNode.removeChild(_.getWrapperElement()),r.style.display="",r.form&&(Yt(r.form,"submit",u),!o.leaveSubmitMethodAlone&&typeof r.form.submit=="function"&&(r.form.submit=p))}},r.style.display="none";var C=wt(function(_){return r.parentNode.insertBefore(_,r.nextSibling)},o);return C}i(tv,"fromTextArea");function Bw(r){r.off=Yt,r.on=ze,r.wheelEventPixels=_w,r.Doc=Nn,r.splitLines=kl,r.countColumn=Ft,r.findColumn=bn,r.isWordChar=Mi,r.Pass=Zt,r.signal=Mt,r.Line=hn,r.changeEnd=sa,r.scrollbarModel=ja,r.Pos=ce,r.cmpPos=Ve,r.modes=ac,r.mimeModes=vs,r.resolveMode=La,r.getMode=lc,r.modeExtensions=ao,r.extendMode=qf,r.copyState=Oi,r.startState=cc,r.innerMode=uc,r.commands=$c,r.keyMap=Yo,r.keyName=Bc,r.isModifierKey=vd,r.lookupKey=xi,r.normalizeKeyMap=Si,r.StringStream=sr,r.SharedTextMarker=cu,r.TextMarker=xo,r.LineWidget=Za,r.e_preventDefault=Nr,r.e_stopPropagation=gs,r.e_stop=Pa,r.addClass=It,r.contains=Qe,r.rmClass=Ee,r.keyNames=zr}i(Bw,"addLegacyProps"),kh(wt),vu(wt);var rv="iter insert remove copy getEditor constructor".split(" ");for(var kd in Nn.prototype)Nn.prototype.hasOwnProperty(kd)&&We(rv,kd)<0&&(wt.prototype[kd]=function(r){return function(){return r.apply(this.doc,arguments)}}(Nn.prototype[kd]));return zn(Nn),wt.inputStyles={textarea:pr,contenteditable:bt},wt.defineMode=function(r){!wt.defaults.mode&&r!="null"&&(wt.defaults.mode=r),Wp.apply(this,arguments)},wt.defineMIME=Up,wt.defineMode("null",function(){return{token:i(function(r){return r.skipToEnd()},"token")}}),wt.defineMIME("text/plain","null"),wt.defineExtension=function(r,o){wt.prototype[r]=o},wt.defineDocExtension=function(r,o){Nn.prototype[r]=o},wt.fromTextArea=tv,Bw(wt),wt.version="5.65.16",wt})});var HL=rt((VK,FL)=>{var Uz=typeof Element<"u",$z=typeof Map=="function",Vz=typeof Set=="function",qz=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function O0(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,s,l;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(s=n;s--!==0;)if(!O0(e[s],t[s]))return!1;return!0}var h;if($z&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(h=e.entries();!(s=h.next()).done;)if(!t.has(s.value[0]))return!1;for(h=e.entries();!(s=h.next()).done;)if(!O0(s.value[1],t.get(s.value[0])))return!1;return!0}if(Vz&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(h=e.entries();!(s=h.next()).done;)if(!t.has(s.value[0]))return!1;return!0}if(qz&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(s=n;s--!==0;)if(e[s]!==t[s])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(l=Object.keys(e),n=l.length,n!==Object.keys(t).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(t,l[s]))return!1;if(Uz&&e instanceof Element)return!1;for(s=n;s--!==0;)if(!((l[s]==="_owner"||l[s]==="__v"||l[s]==="__o")&&e.$$typeof)&&!O0(e[l[s]],t[l[s]]))return!1;return!0}return e!==e&&t!==t}i(O0,"equal");FL.exports=i(function(t,n){try{return O0(t,n)}catch(s){if((s.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw s}},"isEqual")});var iM=rt((ZY,nM)=>{nM.exports=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}});var Qu=rt(Ff=>{var W_,oW=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];Ff.getSymbolSize=i(function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17},"getSymbolSize");Ff.getSymbolTotalCodewords=i(function(t){return oW[t]},"getSymbolTotalCodewords");Ff.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t};Ff.setToSJISFunction=i(function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');W_=t},"setToSJISFunction");Ff.isKanjiModeEnabled=function(){return typeof W_<"u"};Ff.toSJIS=i(function(t){return W_(t)},"toSJIS")});var V0=rt(ps=>{ps.L={bit:1};ps.M={bit:0};ps.Q={bit:3};ps.H={bit:2};function sW(e){if(typeof e!="string")throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return ps.L;case"m":case"medium":return ps.M;case"q":case"quartile":return ps.Q;case"h":case"high":return ps.H;default:throw new Error("Unknown EC Level: "+e)}}i(sW,"fromString");ps.isValid=i(function(t){return t&&typeof t.bit<"u"&&t.bit>=0&&t.bit<4},"isValid");ps.from=i(function(t,n){if(ps.isValid(t))return t;try{return sW(t)}catch{return n}},"from")});var aM=rt((iX,sM)=>{function oM(){this.buffer=[],this.length=0}i(oM,"BitBuffer");oM.prototype={get:i(function(e){let t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},"get"),put:i(function(e,t){for(let n=0;n>>t-n-1&1)===1)},"put"),getLengthInBits:i(function(){return this.length},"getLengthInBits"),putBit:i(function(e){let t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++},"putBit")};sM.exports=oM});var uM=rt((sX,lM)=>{function rg(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}i(rg,"BitMatrix");rg.prototype.set=function(e,t,n,s){let l=e*this.size+t;this.data[l]=n,s&&(this.reservedBit[l]=!0)};rg.prototype.get=function(e,t){return this.data[e*this.size+t]};rg.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n};rg.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};lM.exports=rg});var cM=rt(q0=>{var aW=Qu().getSymbolSize;q0.getRowColCoords=i(function(t){if(t===1)return[];let n=Math.floor(t/7)+2,s=aW(t),l=s===145?26:Math.ceil((s-13)/(2*n-2))*2,h=[s-7];for(let d=1;d{var lW=Qu().getSymbolSize,fM=7;dM.getPositions=i(function(t){let n=lW(t);return[[0,0],[n-fM,0],[0,n-fM]]},"getPositions")});var hM=rt(or=>{or.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var Hf={N1:3,N2:3,N3:40,N4:10};or.isValid=i(function(t){return t!=null&&t!==""&&!isNaN(t)&&t>=0&&t<=7},"isValid");or.from=i(function(t){return or.isValid(t)?parseInt(t,10):void 0},"from");or.getPenaltyN1=i(function(t){let n=t.size,s=0,l=0,h=0,d=null,v=null;for(let S=0;S=5&&(s+=Hf.N1+(l-5)),d=k,l=1),k=t.get(b,S),k===v?h++:(h>=5&&(s+=Hf.N1+(h-5)),v=k,h=1)}l>=5&&(s+=Hf.N1+(l-5)),h>=5&&(s+=Hf.N1+(h-5))}return s},"getPenaltyN1");or.getPenaltyN2=i(function(t){let n=t.size,s=0;for(let l=0;l=10&&(l===1488||l===93)&&s++,h=h<<1&2047|t.get(v,d),v>=10&&(h===1488||h===93)&&s++}return s*Hf.N3},"getPenaltyN3");or.getPenaltyN4=i(function(t){let n=0,s=t.data.length;for(let h=0;h{var Ju=V0(),j0=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],K0=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];U_.getBlocksCount=i(function(t,n){switch(n){case Ju.L:return j0[(t-1)*4+0];case Ju.M:return j0[(t-1)*4+1];case Ju.Q:return j0[(t-1)*4+2];case Ju.H:return j0[(t-1)*4+3];default:return}},"getBlocksCount");U_.getTotalCodewordsCount=i(function(t,n){switch(n){case Ju.L:return K0[(t-1)*4+0];case Ju.M:return K0[(t-1)*4+1];case Ju.Q:return K0[(t-1)*4+2];case Ju.H:return K0[(t-1)*4+3];default:return}},"getTotalCodewordsCount")});var mM=rt(Y0=>{var ng=new Uint8Array(512),G0=new Uint8Array(256);i(function(){let t=1;for(let n=0;n<255;n++)ng[n]=t,G0[t]=n,t<<=1,t&256&&(t^=285);for(let n=255;n<512;n++)ng[n]=ng[n-255]},"initTables")();Y0.log=i(function(t){if(t<1)throw new Error("log("+t+")");return G0[t]},"log");Y0.exp=i(function(t){return ng[t]},"exp");Y0.mul=i(function(t,n){return t===0||n===0?0:ng[G0[t]+G0[n]]},"mul")});var gM=rt(ig=>{var V_=mM();ig.mul=i(function(t,n){let s=new Uint8Array(t.length+n.length-1);for(let l=0;l=0;){let l=s[0];for(let d=0;d{var vM=gM();function q_(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}i(q_,"ReedSolomonEncoder");q_.prototype.initialize=i(function(t){this.degree=t,this.genPoly=vM.generateECPolynomial(this.degree)},"initialize");q_.prototype.encode=i(function(t){if(!this.genPoly)throw new Error("Encoder not initialized");let n=new Uint8Array(t.length+this.degree);n.set(t);let s=vM.mod(n,this.genPoly),l=this.degree-s.length;if(l>0){let h=new Uint8Array(this.degree);return h.set(s,l),h}return s},"encode");yM.exports=q_});var j_=rt(SM=>{SM.isValid=i(function(t){return!isNaN(t)&&t>=1&&t<=40},"isValid")});var K_=rt(_l=>{var xM="[0-9]+",cW="[A-Z $%*+\\-./:]+",og="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";og=og.replace(/u/g,"\\u");var fW="(?:(?![A-Z0-9 $%*+\\-./:]|"+og+`)(?:.|[\r -]))+`;_l.KANJI=new RegExp(og,"g");_l.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");_l.BYTE=new RegExp(fW,"g");_l.NUMERIC=new RegExp(xM,"g");_l.ALPHANUMERIC=new RegExp(cW,"g");var dW=new RegExp("^"+og+"$"),pW=new RegExp("^"+xM+"$"),hW=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");_l.testKanji=i(function(t){return dW.test(t)},"testKanji");_l.testNumeric=i(function(t){return pW.test(t)},"testNumeric");_l.testAlphanumeric=i(function(t){return hW.test(t)},"testAlphanumeric")});var Zu=rt(an=>{var mW=j_(),G_=K_();an.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]};an.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]};an.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]};an.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]};an.MIXED={bit:-1};an.getCharCountIndicator=i(function(t,n){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!mW.isValid(n))throw new Error("Invalid version: "+n);return n>=1&&n<10?t.ccBits[0]:n<27?t.ccBits[1]:t.ccBits[2]},"getCharCountIndicator");an.getBestModeForData=i(function(t){return G_.testNumeric(t)?an.NUMERIC:G_.testAlphanumeric(t)?an.ALPHANUMERIC:G_.testKanji(t)?an.KANJI:an.BYTE},"getBestModeForData");an.toString=i(function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},"toString");an.isValid=i(function(t){return t&&t.bit&&t.ccBits},"isValid");function gW(e){if(typeof e!="string")throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return an.NUMERIC;case"alphanumeric":return an.ALPHANUMERIC;case"kanji":return an.KANJI;case"byte":return an.BYTE;default:throw new Error("Unknown mode: "+e)}}i(gW,"fromString");an.from=i(function(t,n){if(an.isValid(t))return t;try{return gW(t)}catch{return n}},"from")});var TM=rt(Bf=>{var X0=Qu(),vW=$_(),CM=V0(),ec=Zu(),Y_=j_(),EM=7973,_M=X0.getBCHDigit(EM);function yW(e,t,n){for(let s=1;s<=40;s++)if(t<=Bf.getCapacity(s,n,e))return s}i(yW,"getBestVersionForDataLength");function bM(e,t){return ec.getCharCountIndicator(e,t)+4}i(bM,"getReservedBitsCount");function wW(e,t){let n=0;return e.forEach(function(s){let l=bM(s.mode,t);n+=l+s.getBitsLength()}),n}i(wW,"getTotalBitsFromDataArray");function SW(e,t){for(let n=1;n<=40;n++)if(wW(e,n)<=Bf.getCapacity(n,t,ec.MIXED))return n}i(SW,"getBestVersionForMixedData");Bf.from=i(function(t,n){return Y_.isValid(t)?parseInt(t,10):n},"from");Bf.getCapacity=i(function(t,n,s){if(!Y_.isValid(t))throw new Error("Invalid QR Code version");typeof s>"u"&&(s=ec.BYTE);let l=X0.getSymbolTotalCodewords(t),h=vW.getTotalCodewordsCount(t,n),d=(l-h)*8;if(s===ec.MIXED)return d;let v=d-bM(s,t);switch(s){case ec.NUMERIC:return Math.floor(v/10*3);case ec.ALPHANUMERIC:return Math.floor(v/11*2);case ec.KANJI:return Math.floor(v/13);case ec.BYTE:default:return Math.floor(v/8)}},"getCapacity");Bf.getBestVersionForData=i(function(t,n){let s,l=CM.from(n,CM.M);if(Array.isArray(t)){if(t.length>1)return SW(t,l);if(t.length===0)return 1;s=t[0]}else s=t;return yW(s.mode,s.getLength(),l)},"getBestVersionForData");Bf.getEncodedBits=i(function(t){if(!Y_.isValid(t)||t<7)throw new Error("Invalid QR Code version");let n=t<<12;for(;X0.getBCHDigit(n)-_M>=0;)n^=EM<{var X_=Qu(),NM=1335,xW=21522,kM=X_.getBCHDigit(NM);PM.getEncodedBits=i(function(t,n){let s=t.bit<<3|n,l=s<<10;for(;X_.getBCHDigit(l)-kM>=0;)l^=NM<{var CW=Zu();function Pp(e){this.mode=CW.NUMERIC,this.data=e.toString()}i(Pp,"NumericData");Pp.getBitsLength=i(function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},"getBitsLength");Pp.prototype.getLength=i(function(){return this.data.length},"getLength");Pp.prototype.getBitsLength=i(function(){return Pp.getBitsLength(this.data.length)},"getBitsLength");Pp.prototype.write=i(function(t){let n,s,l;for(n=0;n+3<=this.data.length;n+=3)s=this.data.substr(n,3),l=parseInt(s,10),t.put(l,10);let h=this.data.length-n;h>0&&(s=this.data.substr(n),l=parseInt(s,10),t.put(l,h*3+1))},"write");LM.exports=Pp});var RM=rt((RX,OM)=>{var _W=Zu(),Q_=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function Ap(e){this.mode=_W.ALPHANUMERIC,this.data=e}i(Ap,"AlphanumericData");Ap.getBitsLength=i(function(t){return 11*Math.floor(t/2)+6*(t%2)},"getBitsLength");Ap.prototype.getLength=i(function(){return this.data.length},"getLength");Ap.prototype.getBitsLength=i(function(){return Ap.getBitsLength(this.data.length)},"getBitsLength");Ap.prototype.write=i(function(t){let n;for(n=0;n+2<=this.data.length;n+=2){let s=Q_.indexOf(this.data[n])*45;s+=Q_.indexOf(this.data[n+1]),t.put(s,11)}this.data.length%2&&t.put(Q_.indexOf(this.data[n]),6)},"write");OM.exports=Ap});var IM=rt((IX,DM)=>{"use strict";DM.exports=i(function(t){for(var n=[],s=t.length,l=0;l=55296&&h<=56319&&s>l+1){var d=t.charCodeAt(l+1);d>=56320&&d<=57343&&(h=(h-55296)*1024+d-56320+65536,l+=1)}if(h<128){n.push(h);continue}if(h<2048){n.push(h>>6|192),n.push(h&63|128);continue}if(h<55296||h>=57344&&h<65536){n.push(h>>12|224),n.push(h>>6&63|128),n.push(h&63|128);continue}if(h>=65536&&h<=1114111){n.push(h>>18|240),n.push(h>>12&63|128),n.push(h>>6&63|128),n.push(h&63|128);continue}n.push(239,191,189)}return new Uint8Array(n).buffer},"encodeUtf8")});var HM=rt((HX,FM)=>{var EW=IM(),bW=Zu();function Lp(e){this.mode=bW.BYTE,typeof e=="string"&&(e=EW(e)),this.data=new Uint8Array(e)}i(Lp,"ByteData");Lp.getBitsLength=i(function(t){return t*8},"getBitsLength");Lp.prototype.getLength=i(function(){return this.data.length},"getLength");Lp.prototype.getBitsLength=i(function(){return Lp.getBitsLength(this.data.length)},"getBitsLength");Lp.prototype.write=function(e){for(let t=0,n=this.data.length;t{var TW=Zu(),kW=Qu();function Mp(e){this.mode=TW.KANJI,this.data=e}i(Mp,"KanjiData");Mp.getBitsLength=i(function(t){return t*13},"getBitsLength");Mp.prototype.getLength=i(function(){return this.data.length},"getLength");Mp.prototype.getBitsLength=i(function(){return Mp.getBitsLength(this.data.length)},"getBitsLength");Mp.prototype.write=function(e){let t;for(t=0;t=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+` -Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),e.put(n,13)}};BM.exports=Mp});var WM=rt((UX,J_)=>{"use strict";var sg={single_source_shortest_paths:i(function(e,t,n){var s={},l={};l[t]=0;var h=sg.PriorityQueue.make();h.push(t,0);for(var d,v,S,b,k,R,I,z,j;!h.empty();){d=h.pop(),v=d.value,b=d.cost,k=e[v]||{};for(S in k)k.hasOwnProperty(S)&&(R=k[S],I=b+R,z=l[S],j=typeof l[S]>"u",(j||z>I)&&(l[S]=I,h.push(S,I),s[S]=v))}if(typeof n<"u"&&typeof l[n]>"u"){var Y=["Could not find a path from ",t," to ",n,"."].join("");throw new Error(Y)}return s},"single_source_shortest_paths"),extract_shortest_path_from_predecessor_list:i(function(e,t){for(var n=[],s=t,l;s;)n.push(s),l=e[s],s=e[s];return n.reverse(),n},"extract_shortest_path_from_predecessor_list"),find_path:i(function(e,t,n){var s=sg.single_source_shortest_paths(e,t,n);return sg.extract_shortest_path_from_predecessor_list(s,n)},"find_path"),PriorityQueue:{make:i(function(e){var t=sg.PriorityQueue,n={},s;e=e||{};for(s in t)t.hasOwnProperty(s)&&(n[s]=t[s]);return n.queue=[],n.sorter=e.sorter||t.default_sorter,n},"make"),default_sorter:i(function(e,t){return e.cost-t.cost},"default_sorter"),push:i(function(e,t){var n={value:e,cost:t};this.queue.push(n),this.queue.sort(this.sorter)},"push"),pop:i(function(){return this.queue.shift()},"pop"),empty:i(function(){return this.queue.length===0},"empty")}};typeof J_<"u"&&(J_.exports=sg)});var YM=rt(Op=>{var Wt=Zu(),VM=MM(),qM=RM(),jM=HM(),KM=zM(),ag=K_(),Q0=Qu(),NW=WM();function UM(e){return unescape(encodeURIComponent(e)).length}i(UM,"getStringByteLength");function lg(e,t,n){let s=[],l;for(;(l=e.exec(n))!==null;)s.push({data:l[0],index:l.index,mode:t,length:l[0].length});return s}i(lg,"getSegments");function GM(e){let t=lg(ag.NUMERIC,Wt.NUMERIC,e),n=lg(ag.ALPHANUMERIC,Wt.ALPHANUMERIC,e),s,l;return Q0.isKanjiModeEnabled()?(s=lg(ag.BYTE,Wt.BYTE,e),l=lg(ag.KANJI,Wt.KANJI,e)):(s=lg(ag.BYTE_KANJI,Wt.BYTE,e),l=[]),t.concat(n,s,l).sort(function(d,v){return d.index-v.index}).map(function(d){return{data:d.data,mode:d.mode,length:d.length}})}i(GM,"getSegmentsFromString");function Z_(e,t){switch(t){case Wt.NUMERIC:return VM.getBitsLength(e);case Wt.ALPHANUMERIC:return qM.getBitsLength(e);case Wt.KANJI:return KM.getBitsLength(e);case Wt.BYTE:return jM.getBitsLength(e)}}i(Z_,"getSegmentBitsLength");function PW(e){return e.reduce(function(t,n){let s=t.length-1>=0?t[t.length-1]:null;return s&&s.mode===n.mode?(t[t.length-1].data+=n.data,t):(t.push(n),t)},[])}i(PW,"mergeSegments");function AW(e){let t=[];for(let n=0;n{var Z0=Qu(),eE=V0(),MW=aM(),OW=uM(),RW=cM(),DW=pM(),nE=hM(),iE=$_(),IW=wM(),J0=TM(),FW=AM(),HW=Zu(),tE=YM();function BW(e,t){let n=e.size,s=DW.getPositions(t);for(let l=0;l=0&&v<=6&&(S===0||S===6)||S>=0&&S<=6&&(v===0||v===6)||v>=2&&v<=4&&S>=2&&S<=4?e.set(h+v,d+S,!0,!0):e.set(h+v,d+S,!1,!0))}}i(BW,"setupFinderPattern");function zW(e){let t=e.size;for(let n=8;n>v&1)===1,e.set(l,h,d,!0),e.set(h,l,d,!0)}i(UW,"setupVersionInfo");function rE(e,t,n){let s=e.size,l=FW.getEncodedBits(t,n),h,d;for(h=0;h<15;h++)d=(l>>h&1)===1,h<6?e.set(h,8,d,!0):h<8?e.set(h+1,8,d,!0):e.set(s-15+h,8,d,!0),h<8?e.set(8,s-h-1,d,!0):h<9?e.set(8,15-h-1+1,d,!0):e.set(8,15-h-1,d,!0);e.set(s-8,8,1,!0)}i(rE,"setupFormatInfo");function $W(e,t){let n=e.size,s=-1,l=n-1,h=7,d=0;for(let v=n-1;v>0;v-=2)for(v===6&&v--;;){for(let S=0;S<2;S++)if(!e.isReserved(l,v-S)){let b=!1;d>>h&1)===1),e.set(l,v-S,b),h--,h===-1&&(d++,h=7)}if(l+=s,l<0||n<=l){l-=s,s=-s;break}}}i($W,"setupData");function VW(e,t,n){let s=new MW;n.forEach(function(S){s.put(S.mode.bit,4),s.put(S.getLength(),HW.getCharCountIndicator(S.mode,e)),S.write(s)});let l=Z0.getSymbolTotalCodewords(e),h=iE.getTotalCodewordsCount(e,t),d=(l-h)*8;for(s.getLengthInBits()+4<=d&&s.put(0,4);s.getLengthInBits()%8!==0;)s.putBit(0);let v=(d-s.getLengthInBits())/8;for(let S=0;S0&&o.prevInput=="\u200B"?Lt(c,su)(c):ae++<10?u.detectingSelectAll=setTimeout(pe,500):(u.selForContextMenu=null,u.input.reset())},"poll");u.detectingSelectAll=setTimeout(pe,200)}}if(i(V,"rehide"),d&&v>=9&&K(),he){Aa(r);var re=i(function(){Xt(window,"mouseup",re),setTimeout(V,20)},"mouseup");ze(window,"mouseup",re)}else setTimeout(V,50)},pr.prototype.readOnlyChanged=function(r){r||this.reset(),this.textarea.disabled=r=="nocursor",this.textarea.readOnly=!!r},pr.prototype.setUneditable=function(){},pr.prototype.needsContentAttribute=!1;function tv(r,o){if(o=o?Yt(o):{},o.value=r.value,!o.tabindex&&r.tabIndex&&(o.tabindex=r.tabIndex),!o.placeholder&&r.placeholder&&(o.placeholder=r.placeholder),o.autofocus==null){var c=ot(Ut(r));o.autofocus=c==r||r.getAttribute("autofocus")!=null&&c==document.body}function u(){r.value=C.getValue()}i(u,"save");var p;if(r.form&&(ze(r.form,"submit",u),!o.leaveSubmitMethodAlone)){var g=r.form;p=g.submit;try{var y=g.submit=function(){u(),g.submit=p,g.submit(),g.submit=y}}catch{}}o.finishInit=function(_){_.save=u,_.getTextArea=function(){return r},_.toTextArea=function(){_.toTextArea=isNaN,u(),r.parentNode.removeChild(_.getWrapperElement()),r.style.display="",r.form&&(Xt(r.form,"submit",u),!o.leaveSubmitMethodAlone&&typeof r.form.submit=="function"&&(r.form.submit=p))}},r.style.display="none";var C=wt(function(_){return r.parentNode.insertBefore(_,r.nextSibling)},o);return C}i(tv,"fromTextArea");function Bw(r){r.off=Xt,r.on=ze,r.wheelEventPixels=_w,r.Doc=Nn,r.splitLines=kl,r.countColumn=Ft,r.findColumn=bn,r.isWordChar=Mi,r.Pass=er,r.signal=Mt,r.Line=hn,r.changeEnd=sa,r.scrollbarModel=ja,r.Pos=ce,r.cmpPos=Ve,r.modes=ac,r.mimeModes=vs,r.resolveMode=La,r.getMode=lc,r.modeExtensions=ao,r.extendMode=qf,r.copyState=Oi,r.startState=cc,r.innerMode=uc,r.commands=$c,r.keyMap=Yo,r.keyName=Bc,r.isModifierKey=vd,r.lookupKey=xi,r.normalizeKeyMap=Si,r.StringStream=sr,r.SharedTextMarker=cu,r.TextMarker=xo,r.LineWidget=Za,r.e_preventDefault=Nr,r.e_stopPropagation=gs,r.e_stop=Aa,r.addClass=It,r.contains=Qe,r.rmClass=Ee,r.keyNames=zr}i(Bw,"addLegacyProps"),kh(wt),vu(wt);var rv="iter insert remove copy getEditor constructor".split(" ");for(var kd in Nn.prototype)Nn.prototype.hasOwnProperty(kd)&&We(rv,kd)<0&&(wt.prototype[kd]=function(r){return function(){return r.apply(this.doc,arguments)}}(Nn.prototype[kd]));return zn(Nn),wt.inputStyles={textarea:pr,contenteditable:bt},wt.defineMode=function(r){!wt.defaults.mode&&r!="null"&&(wt.defaults.mode=r),Wp.apply(this,arguments)},wt.defineMIME=Up,wt.defineMode("null",function(){return{token:i(function(r){return r.skipToEnd()},"token")}}),wt.defineMIME("text/plain","null"),wt.defineExtension=function(r,o){wt.prototype[r]=o},wt.defineDocExtension=function(r,o){Nn.prototype[r]=o},wt.fromTextArea=tv,Bw(wt),wt.version="5.65.16",wt})});var IL=rt((jK,DL)=>{var Uz=typeof Element<"u",$z=typeof Map=="function",Vz=typeof Set=="function",qz=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function O0(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,s,l;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(s=n;s--!==0;)if(!O0(e[s],t[s]))return!1;return!0}var h;if($z&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(h=e.entries();!(s=h.next()).done;)if(!t.has(s.value[0]))return!1;for(h=e.entries();!(s=h.next()).done;)if(!O0(s.value[1],t.get(s.value[0])))return!1;return!0}if(Vz&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(h=e.entries();!(s=h.next()).done;)if(!t.has(s.value[0]))return!1;return!0}if(qz&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(s=n;s--!==0;)if(e[s]!==t[s])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(l=Object.keys(e),n=l.length,n!==Object.keys(t).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(t,l[s]))return!1;if(Uz&&e instanceof Element)return!1;for(s=n;s--!==0;)if(!((l[s]==="_owner"||l[s]==="__v"||l[s]==="__o")&&e.$$typeof)&&!O0(e[l[s]],t[l[s]]))return!1;return!0}return e!==e&&t!==t}i(O0,"equal");DL.exports=i(function(t,n){try{return O0(t,n)}catch(s){if((s.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw s}},"isEqual")});var rM=rt((tX,tM)=>{tM.exports=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}});var Qu=rt(Ff=>{var z_,oW=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];Ff.getSymbolSize=i(function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17},"getSymbolSize");Ff.getSymbolTotalCodewords=i(function(t){return oW[t]},"getSymbolTotalCodewords");Ff.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t};Ff.setToSJISFunction=i(function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');z_=t},"setToSJISFunction");Ff.isKanjiModeEnabled=function(){return typeof z_<"u"};Ff.toSJIS=i(function(t){return z_(t)},"toSJIS")});var V0=rt(ps=>{ps.L={bit:1};ps.M={bit:0};ps.Q={bit:3};ps.H={bit:2};function sW(e){if(typeof e!="string")throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return ps.L;case"m":case"medium":return ps.M;case"q":case"quartile":return ps.Q;case"h":case"high":return ps.H;default:throw new Error("Unknown EC Level: "+e)}}i(sW,"fromString");ps.isValid=i(function(t){return t&&typeof t.bit<"u"&&t.bit>=0&&t.bit<4},"isValid");ps.from=i(function(t,n){if(ps.isValid(t))return t;try{return sW(t)}catch{return n}},"from")});var oM=rt((sX,iM)=>{function nM(){this.buffer=[],this.length=0}i(nM,"BitBuffer");nM.prototype={get:i(function(e){let t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},"get"),put:i(function(e,t){for(let n=0;n>>t-n-1&1)===1)},"put"),getLengthInBits:i(function(){return this.length},"getLengthInBits"),putBit:i(function(e){let t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++},"putBit")};iM.exports=nM});var aM=rt((lX,sM)=>{function rg(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}i(rg,"BitMatrix");rg.prototype.set=function(e,t,n,s){let l=e*this.size+t;this.data[l]=n,s&&(this.reservedBit[l]=!0)};rg.prototype.get=function(e,t){return this.data[e*this.size+t]};rg.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n};rg.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};sM.exports=rg});var lM=rt(q0=>{var aW=Qu().getSymbolSize;q0.getRowColCoords=i(function(t){if(t===1)return[];let n=Math.floor(t/7)+2,s=aW(t),l=s===145?26:Math.ceil((s-13)/(2*n-2))*2,h=[s-7];for(let d=1;d{var lW=Qu().getSymbolSize,uM=7;cM.getPositions=i(function(t){let n=lW(t);return[[0,0],[n-uM,0],[0,n-uM]]},"getPositions")});var dM=rt(or=>{or.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var Hf={N1:3,N2:3,N3:40,N4:10};or.isValid=i(function(t){return t!=null&&t!==""&&!isNaN(t)&&t>=0&&t<=7},"isValid");or.from=i(function(t){return or.isValid(t)?parseInt(t,10):void 0},"from");or.getPenaltyN1=i(function(t){let n=t.size,s=0,l=0,h=0,d=null,v=null;for(let S=0;S=5&&(s+=Hf.N1+(l-5)),d=k,l=1),k=t.get(b,S),k===v?h++:(h>=5&&(s+=Hf.N1+(h-5)),v=k,h=1)}l>=5&&(s+=Hf.N1+(l-5)),h>=5&&(s+=Hf.N1+(h-5))}return s},"getPenaltyN1");or.getPenaltyN2=i(function(t){let n=t.size,s=0;for(let l=0;l=10&&(l===1488||l===93)&&s++,h=h<<1&2047|t.get(v,d),v>=10&&(h===1488||h===93)&&s++}return s*Hf.N3},"getPenaltyN3");or.getPenaltyN4=i(function(t){let n=0,s=t.data.length;for(let h=0;h{var Ju=V0(),j0=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],K0=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];W_.getBlocksCount=i(function(t,n){switch(n){case Ju.L:return j0[(t-1)*4+0];case Ju.M:return j0[(t-1)*4+1];case Ju.Q:return j0[(t-1)*4+2];case Ju.H:return j0[(t-1)*4+3];default:return}},"getBlocksCount");W_.getTotalCodewordsCount=i(function(t,n){switch(n){case Ju.L:return K0[(t-1)*4+0];case Ju.M:return K0[(t-1)*4+1];case Ju.Q:return K0[(t-1)*4+2];case Ju.H:return K0[(t-1)*4+3];default:return}},"getTotalCodewordsCount")});var pM=rt(Y0=>{var ng=new Uint8Array(512),G0=new Uint8Array(256);i(function(){let t=1;for(let n=0;n<255;n++)ng[n]=t,G0[t]=n,t<<=1,t&256&&(t^=285);for(let n=255;n<512;n++)ng[n]=ng[n-255]},"initTables")();Y0.log=i(function(t){if(t<1)throw new Error("log("+t+")");return G0[t]},"log");Y0.exp=i(function(t){return ng[t]},"exp");Y0.mul=i(function(t,n){return t===0||n===0?0:ng[G0[t]+G0[n]]},"mul")});var hM=rt(ig=>{var $_=pM();ig.mul=i(function(t,n){let s=new Uint8Array(t.length+n.length-1);for(let l=0;l=0;){let l=s[0];for(let d=0;d{var mM=hM();function V_(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}i(V_,"ReedSolomonEncoder");V_.prototype.initialize=i(function(t){this.degree=t,this.genPoly=mM.generateECPolynomial(this.degree)},"initialize");V_.prototype.encode=i(function(t){if(!this.genPoly)throw new Error("Encoder not initialized");let n=new Uint8Array(t.length+this.degree);n.set(t);let s=mM.mod(n,this.genPoly),l=this.degree-s.length;if(l>0){let h=new Uint8Array(this.degree);return h.set(s,l),h}return s},"encode");gM.exports=V_});var q_=rt(yM=>{yM.isValid=i(function(t){return!isNaN(t)&&t>=1&&t<=40},"isValid")});var j_=rt(_l=>{var wM="[0-9]+",cW="[A-Z $%*+\\-./:]+",og="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";og=og.replace(/u/g,"\\u");var fW="(?:(?![A-Z0-9 $%*+\\-./:]|"+og+`)(?:.|[\r +]))+`;_l.KANJI=new RegExp(og,"g");_l.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");_l.BYTE=new RegExp(fW,"g");_l.NUMERIC=new RegExp(wM,"g");_l.ALPHANUMERIC=new RegExp(cW,"g");var dW=new RegExp("^"+og+"$"),pW=new RegExp("^"+wM+"$"),hW=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");_l.testKanji=i(function(t){return dW.test(t)},"testKanji");_l.testNumeric=i(function(t){return pW.test(t)},"testNumeric");_l.testAlphanumeric=i(function(t){return hW.test(t)},"testAlphanumeric")});var Zu=rt(an=>{var mW=q_(),K_=j_();an.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]};an.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]};an.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]};an.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]};an.MIXED={bit:-1};an.getCharCountIndicator=i(function(t,n){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!mW.isValid(n))throw new Error("Invalid version: "+n);return n>=1&&n<10?t.ccBits[0]:n<27?t.ccBits[1]:t.ccBits[2]},"getCharCountIndicator");an.getBestModeForData=i(function(t){return K_.testNumeric(t)?an.NUMERIC:K_.testAlphanumeric(t)?an.ALPHANUMERIC:K_.testKanji(t)?an.KANJI:an.BYTE},"getBestModeForData");an.toString=i(function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},"toString");an.isValid=i(function(t){return t&&t.bit&&t.ccBits},"isValid");function gW(e){if(typeof e!="string")throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return an.NUMERIC;case"alphanumeric":return an.ALPHANUMERIC;case"kanji":return an.KANJI;case"byte":return an.BYTE;default:throw new Error("Unknown mode: "+e)}}i(gW,"fromString");an.from=i(function(t,n){if(an.isValid(t))return t;try{return gW(t)}catch{return n}},"from")});var EM=rt(Bf=>{var X0=Qu(),vW=U_(),SM=V0(),ec=Zu(),G_=q_(),CM=7973,xM=X0.getBCHDigit(CM);function yW(e,t,n){for(let s=1;s<=40;s++)if(t<=Bf.getCapacity(s,n,e))return s}i(yW,"getBestVersionForDataLength");function _M(e,t){return ec.getCharCountIndicator(e,t)+4}i(_M,"getReservedBitsCount");function wW(e,t){let n=0;return e.forEach(function(s){let l=_M(s.mode,t);n+=l+s.getBitsLength()}),n}i(wW,"getTotalBitsFromDataArray");function SW(e,t){for(let n=1;n<=40;n++)if(wW(e,n)<=Bf.getCapacity(n,t,ec.MIXED))return n}i(SW,"getBestVersionForMixedData");Bf.from=i(function(t,n){return G_.isValid(t)?parseInt(t,10):n},"from");Bf.getCapacity=i(function(t,n,s){if(!G_.isValid(t))throw new Error("Invalid QR Code version");typeof s>"u"&&(s=ec.BYTE);let l=X0.getSymbolTotalCodewords(t),h=vW.getTotalCodewordsCount(t,n),d=(l-h)*8;if(s===ec.MIXED)return d;let v=d-_M(s,t);switch(s){case ec.NUMERIC:return Math.floor(v/10*3);case ec.ALPHANUMERIC:return Math.floor(v/11*2);case ec.KANJI:return Math.floor(v/13);case ec.BYTE:default:return Math.floor(v/8)}},"getCapacity");Bf.getBestVersionForData=i(function(t,n){let s,l=SM.from(n,SM.M);if(Array.isArray(t)){if(t.length>1)return SW(t,l);if(t.length===0)return 1;s=t[0]}else s=t;return yW(s.mode,s.getLength(),l)},"getBestVersionForData");Bf.getEncodedBits=i(function(t){if(!G_.isValid(t)||t<7)throw new Error("Invalid QR Code version");let n=t<<12;for(;X0.getBCHDigit(n)-xM>=0;)n^=CM<{var Y_=Qu(),TM=1335,xW=21522,bM=Y_.getBCHDigit(TM);kM.getEncodedBits=i(function(t,n){let s=t.bit<<3|n,l=s<<10;for(;Y_.getBCHDigit(l)-bM>=0;)l^=TM<{var CW=Zu();function Ap(e){this.mode=CW.NUMERIC,this.data=e.toString()}i(Ap,"NumericData");Ap.getBitsLength=i(function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},"getBitsLength");Ap.prototype.getLength=i(function(){return this.data.length},"getLength");Ap.prototype.getBitsLength=i(function(){return Ap.getBitsLength(this.data.length)},"getBitsLength");Ap.prototype.write=i(function(t){let n,s,l;for(n=0;n+3<=this.data.length;n+=3)s=this.data.substr(n,3),l=parseInt(s,10),t.put(l,10);let h=this.data.length-n;h>0&&(s=this.data.substr(n),l=parseInt(s,10),t.put(l,h*3+1))},"write");AM.exports=Ap});var MM=rt((IX,LM)=>{var _W=Zu(),X_=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function Pp(e){this.mode=_W.ALPHANUMERIC,this.data=e}i(Pp,"AlphanumericData");Pp.getBitsLength=i(function(t){return 11*Math.floor(t/2)+6*(t%2)},"getBitsLength");Pp.prototype.getLength=i(function(){return this.data.length},"getLength");Pp.prototype.getBitsLength=i(function(){return Pp.getBitsLength(this.data.length)},"getBitsLength");Pp.prototype.write=i(function(t){let n;for(n=0;n+2<=this.data.length;n+=2){let s=X_.indexOf(this.data[n])*45;s+=X_.indexOf(this.data[n+1]),t.put(s,11)}this.data.length%2&&t.put(X_.indexOf(this.data[n]),6)},"write");LM.exports=Pp});var RM=rt((HX,OM)=>{"use strict";OM.exports=i(function(t){for(var n=[],s=t.length,l=0;l=55296&&h<=56319&&s>l+1){var d=t.charCodeAt(l+1);d>=56320&&d<=57343&&(h=(h-55296)*1024+d-56320+65536,l+=1)}if(h<128){n.push(h);continue}if(h<2048){n.push(h>>6|192),n.push(h&63|128);continue}if(h<55296||h>=57344&&h<65536){n.push(h>>12|224),n.push(h>>6&63|128),n.push(h&63|128);continue}if(h>=65536&&h<=1114111){n.push(h>>18|240),n.push(h>>12&63|128),n.push(h>>6&63|128),n.push(h&63|128);continue}n.push(239,191,189)}return new Uint8Array(n).buffer},"encodeUtf8")});var IM=rt((zX,DM)=>{var EW=RM(),bW=Zu();function Lp(e){this.mode=bW.BYTE,typeof e=="string"&&(e=EW(e)),this.data=new Uint8Array(e)}i(Lp,"ByteData");Lp.getBitsLength=i(function(t){return t*8},"getBitsLength");Lp.prototype.getLength=i(function(){return this.data.length},"getLength");Lp.prototype.getBitsLength=i(function(){return Lp.getBitsLength(this.data.length)},"getBitsLength");Lp.prototype.write=function(e){for(let t=0,n=this.data.length;t{var TW=Zu(),kW=Qu();function Mp(e){this.mode=TW.KANJI,this.data=e}i(Mp,"KanjiData");Mp.getBitsLength=i(function(t){return t*13},"getBitsLength");Mp.prototype.getLength=i(function(){return this.data.length},"getLength");Mp.prototype.getBitsLength=i(function(){return Mp.getBitsLength(this.data.length)},"getBitsLength");Mp.prototype.write=function(e){let t;for(t=0;t=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+` +Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),e.put(n,13)}};FM.exports=Mp});var BM=rt((VX,Q_)=>{"use strict";var sg={single_source_shortest_paths:i(function(e,t,n){var s={},l={};l[t]=0;var h=sg.PriorityQueue.make();h.push(t,0);for(var d,v,S,b,k,R,I,z,j;!h.empty();){d=h.pop(),v=d.value,b=d.cost,k=e[v]||{};for(S in k)k.hasOwnProperty(S)&&(R=k[S],I=b+R,z=l[S],j=typeof l[S]>"u",(j||z>I)&&(l[S]=I,h.push(S,I),s[S]=v))}if(typeof n<"u"&&typeof l[n]>"u"){var Y=["Could not find a path from ",t," to ",n,"."].join("");throw new Error(Y)}return s},"single_source_shortest_paths"),extract_shortest_path_from_predecessor_list:i(function(e,t){for(var n=[],s=t,l;s;)n.push(s),l=e[s],s=e[s];return n.reverse(),n},"extract_shortest_path_from_predecessor_list"),find_path:i(function(e,t,n){var s=sg.single_source_shortest_paths(e,t,n);return sg.extract_shortest_path_from_predecessor_list(s,n)},"find_path"),PriorityQueue:{make:i(function(e){var t=sg.PriorityQueue,n={},s;e=e||{};for(s in t)t.hasOwnProperty(s)&&(n[s]=t[s]);return n.queue=[],n.sorter=e.sorter||t.default_sorter,n},"make"),default_sorter:i(function(e,t){return e.cost-t.cost},"default_sorter"),push:i(function(e,t){var n={value:e,cost:t};this.queue.push(n),this.queue.sort(this.sorter)},"push"),pop:i(function(){return this.queue.shift()},"pop"),empty:i(function(){return this.queue.length===0},"empty")}};typeof Q_<"u"&&(Q_.exports=sg)});var KM=rt(Op=>{var Wt=Zu(),UM=PM(),$M=MM(),VM=IM(),qM=HM(),ag=j_(),Q0=Qu(),NW=BM();function zM(e){return unescape(encodeURIComponent(e)).length}i(zM,"getStringByteLength");function lg(e,t,n){let s=[],l;for(;(l=e.exec(n))!==null;)s.push({data:l[0],index:l.index,mode:t,length:l[0].length});return s}i(lg,"getSegments");function jM(e){let t=lg(ag.NUMERIC,Wt.NUMERIC,e),n=lg(ag.ALPHANUMERIC,Wt.ALPHANUMERIC,e),s,l;return Q0.isKanjiModeEnabled()?(s=lg(ag.BYTE,Wt.BYTE,e),l=lg(ag.KANJI,Wt.KANJI,e)):(s=lg(ag.BYTE_KANJI,Wt.BYTE,e),l=[]),t.concat(n,s,l).sort(function(d,v){return d.index-v.index}).map(function(d){return{data:d.data,mode:d.mode,length:d.length}})}i(jM,"getSegmentsFromString");function J_(e,t){switch(t){case Wt.NUMERIC:return UM.getBitsLength(e);case Wt.ALPHANUMERIC:return $M.getBitsLength(e);case Wt.KANJI:return qM.getBitsLength(e);case Wt.BYTE:return VM.getBitsLength(e)}}i(J_,"getSegmentBitsLength");function AW(e){return e.reduce(function(t,n){let s=t.length-1>=0?t[t.length-1]:null;return s&&s.mode===n.mode?(t[t.length-1].data+=n.data,t):(t.push(n),t)},[])}i(AW,"mergeSegments");function PW(e){let t=[];for(let n=0;n{var Z0=Qu(),Z_=V0(),MW=oM(),OW=aM(),RW=lM(),DW=fM(),rE=dM(),nE=U_(),IW=vM(),J0=EM(),FW=NM(),HW=Zu(),eE=KM();function BW(e,t){let n=e.size,s=DW.getPositions(t);for(let l=0;l=0&&v<=6&&(S===0||S===6)||S>=0&&S<=6&&(v===0||v===6)||v>=2&&v<=4&&S>=2&&S<=4?e.set(h+v,d+S,!0,!0):e.set(h+v,d+S,!1,!0))}}i(BW,"setupFinderPattern");function zW(e){let t=e.size;for(let n=8;n>v&1)===1,e.set(l,h,d,!0),e.set(h,l,d,!0)}i(UW,"setupVersionInfo");function tE(e,t,n){let s=e.size,l=FW.getEncodedBits(t,n),h,d;for(h=0;h<15;h++)d=(l>>h&1)===1,h<6?e.set(h,8,d,!0):h<8?e.set(h+1,8,d,!0):e.set(s-15+h,8,d,!0),h<8?e.set(8,s-h-1,d,!0):h<9?e.set(8,15-h-1+1,d,!0):e.set(8,15-h-1,d,!0);e.set(s-8,8,1,!0)}i(tE,"setupFormatInfo");function $W(e,t){let n=e.size,s=-1,l=n-1,h=7,d=0;for(let v=n-1;v>0;v-=2)for(v===6&&v--;;){for(let S=0;S<2;S++)if(!e.isReserved(l,v-S)){let b=!1;d>>h&1)===1),e.set(l,v-S,b),h--,h===-1&&(d++,h=7)}if(l+=s,l<0||n<=l){l-=s,s=-s;break}}}i($W,"setupData");function VW(e,t,n){let s=new MW;n.forEach(function(S){s.put(S.mode.bit,4),s.put(S.getLength(),HW.getCharCountIndicator(S.mode,e)),S.write(s)});let l=Z0.getSymbolTotalCodewords(e),h=nE.getTotalCodewordsCount(e,t),d=(l-h)*8;for(s.getLengthInBits()+4<=d&&s.put(0,4);s.getLengthInBits()%8!==0;)s.putBit(0);let v=(d-s.getLengthInBits())/8;for(let S=0;S=7&&UW(S,t),$W(S,d),isNaN(s)&&(s=nE.getBestMask(S,rE.bind(null,S,n))),nE.applyMask(s,S),rE(S,n,s),{modules:S,version:t,errorCorrectionLevel:n,maskPattern:s,segments:l}}i(jW,"createSymbol");XM.create=i(function(t,n){if(typeof t>"u"||t==="")throw new Error("No input text");let s=eE.M,l,h;return typeof n<"u"&&(s=eE.from(n.errorCorrectionLevel,eE.M),l=J0.from(n.version),h=nE.from(n.maskPattern),n.toSJISFunc&&Z0.setToSJISFunction(n.toSJISFunc)),jW(t,l,s,h)},"create")});var oE=rt(zf=>{function JM(e){if(typeof e=="number"&&(e=e.toString()),typeof e!="string")throw new Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||t.length===5||t.length>8)throw new Error("Invalid hex color: "+e);(t.length===3||t.length===4)&&(t=Array.prototype.concat.apply([],t.map(function(s){return[s,s]}))),t.length===6&&t.push("F","F");let n=parseInt(t.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:n&255,hex:"#"+t.slice(0,6).join("")}}i(JM,"hex2rgba");zf.getOptions=i(function(t){t||(t={}),t.color||(t.color={});let n=typeof t.margin>"u"||t.margin===null||t.margin<0?4:t.margin,s=t.width&&t.width>=21?t.width:void 0,l=t.scale||4;return{width:s,scale:s?4:l,margin:n,color:{dark:JM(t.color.dark||"#000000ff"),light:JM(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},"getOptions");zf.getScale=i(function(t,n){return n.width&&n.width>=t+n.margin*2?n.width/(t+n.margin*2):n.scale},"getScale");zf.getImageWidth=i(function(t,n){let s=zf.getScale(t,n);return Math.floor((t+n.margin*2)*s)},"getImageWidth");zf.qrToImageData=i(function(t,n,s){let l=n.modules.size,h=n.modules.data,d=zf.getScale(l,s),v=Math.floor((l+s.margin*2)*d),S=s.margin*d,b=[s.color.light,s.color.dark];for(let k=0;k=S&&R>=S&&k{var sE=oE();function KW(e,t,n){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=n,t.width=n,t.style.height=n+"px",t.style.width=n+"px"}i(KW,"clearCanvas");function GW(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}i(GW,"getCanvasElement");ew.render=i(function(t,n,s){let l=s,h=n;typeof l>"u"&&(!n||!n.getContext)&&(l=n,n=void 0),n||(h=GW()),l=sE.getOptions(l);let d=sE.getImageWidth(t.modules.size,l),v=h.getContext("2d"),S=v.createImageData(d,d);return sE.qrToImageData(S.data,t,l),KW(v,h,d),v.putImageData(S,0,0),h},"render");ew.renderToDataURL=i(function(t,n,s){let l=s;typeof l>"u"&&(!n||!n.getContext)&&(l=n,n=void 0),l||(l={});let h=ew.render(t,n,l),d=l.type||"image/png",v=l.rendererOpts||{};return h.toDataURL(d,v.quality)},"renderToDataURL")});var rO=rt(tO=>{var YW=oE();function eO(e,t){let n=e.a/255,s=t+'="'+e.hex+'"';return n<1?s+" "+t+'-opacity="'+n.toFixed(2).slice(1)+'"':s}i(eO,"getColorAttrib");function aE(e,t,n){let s=e+t;return typeof n<"u"&&(s+=" "+n),s}i(aE,"svgCmd");function XW(e,t,n){let s="",l=0,h=!1,d=0;for(let v=0;v0&&S>0&&e[v-1]||(s+=h?aE("M",S+n,.5+b+n):aE("m",l,0),l=0,h=!1),S+1':"",b="',k='viewBox="0 0 '+v+" "+v+'"',I=''+S+b+` -`;return typeof s=="function"&&s(null,I),I},"render")});var iO=rt(ug=>{var QW=iM(),lE=QM(),nO=ZM(),JW=rO();function uE(e,t,n,s,l){let h=[].slice.call(arguments,1),d=h.length,v=typeof h[d-1]=="function";if(!v&&!QW())throw new Error("Callback required as last argument");if(v){if(d<2)throw new Error("Too few arguments provided");d===2?(l=n,n=t,t=s=void 0):d===3&&(t.getContext&&typeof l>"u"?(l=s,s=void 0):(l=s,s=n,n=t,t=void 0))}else{if(d<1)throw new Error("Too few arguments provided");return d===1?(n=t,t=s=void 0):d===2&&!t.getContext&&(s=n,n=t,t=void 0),new Promise(function(S,b){try{let k=lE.create(n,s);S(e(k,t,s))}catch(k){b(k)}})}try{let S=lE.create(n,s);l(null,e(S,t,s))}catch(S){l(S)}}i(uE,"renderCanvas");ug.create=lE.create;ug.toCanvas=uE.bind(null,nO.render);ug.toDataURL=uE.bind(null,nO.renderToDataURL);ug.toString=uE.bind(null,function(e,t,n){return JW.render(e,n)})});var mO=rt((Oee,hO)=>{"use strict";var wU="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";hO.exports=wU});var wO=rt((Ree,yO)=>{"use strict";var SU=mO();function gO(){}i(gO,"emptyFunction");function vO(){}i(vO,"emptyFunctionWithReset");vO.resetWarningCache=gO;yO.exports=function(){function e(s,l,h,d,v,S){if(S!==SU){var b=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw b.name="Invariant Violation",b}}i(e,"shim"),e.isRequired=e;function t(){return e}i(t,"getShim");var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:vO,resetWarningCache:gO};return n.PropTypes=n,n}});var xO=rt((Hee,SO)=>{SO.exports=wO()();var Iee,Fee});var WE=de(be()),AO=de(JN());var fP=de(be(),1),dP=de(rP(),1),Ry=de(be(),1);var Tt="default"in Ry?Ry.default:Ry,nP=Symbol.for("react-redux-context"),iP=typeof globalThis<"u"?globalThis:{};function o4(){if(!Tt.createContext)return{};let e=iP[nP]??(iP[nP]=new Map),t=e.get(Tt.createContext);return t||(t=Tt.createContext(null),e.set(Tt.createContext,t)),t}i(o4,"getContext");var gl=o4(),pP=i(()=>{throw new Error("uSES not initialized!")},"notInitialized");function _x(e=gl){return i(function(){return Tt.useContext(e)},"useReduxContext2")}i(_x,"createReduxContextHook");var hP=_x(),mP=pP,s4=i(e=>{mP=e},"initializeUseSelector"),a4=i((e,t)=>e===t,"refEquality");function l4(e=gl){let t=e===gl?hP:_x(e),n=i((s,l={})=>{let{equalityFn:h=a4,devModeChecks:d={}}=typeof l=="function"?{equalityFn:l}:l,{store:v,subscription:S,getServerState:b,stabilityCheck:k,identityFunctionCheck:R}=t(),I=Tt.useRef(!0),z=Tt.useCallback({[s.name](Y){let ne=s(Y);if(0){if((L==="always"||L==="once"&&I.current)&&!h(ne,D))try{}catch(te){}if((F==="always"||F==="once"&&I.current)&&ne===Y)try{}catch(q){}}return ne}}[s.name],[s,k,d.stabilityCheck]),j=mP(S.addNestedSub,v.getState,b||v.getState,z,h);return Tt.useDebugValue(j),j},"useSelector2");return Object.assign(n,{withTypes:i(()=>n,"withTypes")}),n}i(l4,"createSelectorHook");var gP=l4(),u4=Symbol.for("react.element"),c4=Symbol.for("react.portal"),f4=Symbol.for("react.fragment"),d4=Symbol.for("react.strict_mode"),p4=Symbol.for("react.profiler"),h4=Symbol.for("react.provider"),m4=Symbol.for("react.context"),g4=Symbol.for("react.server_context"),vP=Symbol.for("react.forward_ref"),v4=Symbol.for("react.suspense"),y4=Symbol.for("react.suspense_list"),Ex=Symbol.for("react.memo"),w4=Symbol.for("react.lazy"),QU=Symbol.for("react.offscreen"),JU=Symbol.for("react.client.reference"),S4=vP,x4=Ex;function C4(e){if(typeof e=="object"&&e!==null){let t=e.$$typeof;switch(t){case u4:{let n=e.type;switch(n){case f4:case p4:case d4:case v4:case y4:return n;default:{let s=n&&n.$$typeof;switch(s){case g4:case m4:case vP:case w4:case Ex:case h4:return s;default:return t}}}}case c4:return t}}}i(C4,"typeOf");function _4(e){return C4(e)===Ex}i(_4,"isMemo");function E4(e,t,n,s,{areStatesEqual:l,areOwnPropsEqual:h,areStatePropsEqual:d}){let v=!1,S,b,k,R,I;function z(L,D){return S=L,b=D,k=e(S,b),R=t(s,b),I=n(k,R,b),v=!0,I}i(z,"handleFirstCall");function j(){return k=e(S,b),t.dependsOnOwnProps&&(R=t(s,b)),I=n(k,R,b),I}i(j,"handleNewPropsAndNewState");function Y(){return e.dependsOnOwnProps&&(k=e(S,b)),t.dependsOnOwnProps&&(R=t(s,b)),I=n(k,R,b),I}i(Y,"handleNewProps");function ne(){let L=e(S,b),D=!d(L,k);return k=L,D&&(I=n(k,R,b)),I}i(ne,"handleNewState");function F(L,D){let q=!h(D,b),te=!l(L,S,D,b);return S=L,b=D,q&&te?j():q?Y():te?ne():I}return i(F,"handleSubsequentCalls"),i(function(D,q){return v?F(D,q):z(D,q)},"pureFinalPropsSelector")}i(E4,"pureFinalPropsSelectorFactory");function b4(e,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:s,...l}){let h=t(e,l),d=n(e,l),v=s(e,l);return E4(h,d,v,e,l)}i(b4,"finalPropsSelectorFactory");function T4(e,t){let n={};for(let s in e){let l=e[s];typeof l=="function"&&(n[s]=(...h)=>t(l(...h)))}return n}i(T4,"bindActionCreators");function xx(e){return i(function(n){let s=e(n);function l(){return s}return i(l,"constantSelector"),l.dependsOnOwnProps=!1,l},"initConstantSelector")}i(xx,"wrapMapToPropsConstant");function oP(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}i(oP,"getDependsOnOwnProps");function yP(e,t){return i(function(s,{displayName:l}){let h=i(function(v,S){return h.dependsOnOwnProps?h.mapToProps(v,S):h.mapToProps(v,void 0)},"mapToPropsProxy");return h.dependsOnOwnProps=!0,h.mapToProps=i(function(v,S){h.mapToProps=e,h.dependsOnOwnProps=oP(e);let b=h(v,S);return typeof b=="function"&&(h.mapToProps=b,h.dependsOnOwnProps=oP(b),b=h(v,S)),b},"detectFactoryAndVerify"),h},"initProxySelector")}i(yP,"wrapMapToPropsFunc");function bx(e,t){return(n,s)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${s.wrappedComponentName}.`)}}i(bx,"createInvalidArgFactory");function k4(e){return e&&typeof e=="object"?xx(t=>T4(e,t)):e?typeof e=="function"?yP(e,"mapDispatchToProps"):bx(e,"mapDispatchToProps"):xx(t=>({dispatch:t}))}i(k4,"mapDispatchToPropsFactory");function N4(e){return e?typeof e=="function"?yP(e,"mapStateToProps"):bx(e,"mapStateToProps"):xx(()=>({}))}i(N4,"mapStateToPropsFactory");function P4(e,t,n){return{...n,...e,...t}}i(P4,"defaultMergeProps");function A4(e){return i(function(n,{displayName:s,areMergedPropsEqual:l}){let h=!1,d;return i(function(S,b,k){let R=e(S,b,k);return h?l(R,d)||(d=R):(h=!0,d=R),d},"mergePropsProxy")},"initMergePropsProxy")}i(A4,"wrapMergePropsFunc");function L4(e){return e?typeof e=="function"?A4(e):bx(e,"mergeProps"):()=>P4}i(L4,"mergePropsFactory");function M4(e){e()}i(M4,"defaultNoopBatch");function O4(){let e=null,t=null;return{clear(){e=null,t=null},notify(){M4(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){let n=[],s=e;for(;s;)n.push(s),s=s.next;return n},subscribe(n){let s=!0,l=t={callback:n,next:null,prev:t};return l.prev?l.prev.next=l:e=l,i(function(){!s||e===null||(s=!1,l.next?l.next.prev=l.prev:t=l.prev,l.prev?l.prev.next=l.next:e=l.next)},"unsubscribe")}}}i(O4,"createListenerCollection");var sP={notify(){},get:i(()=>[],"get")};function wP(e,t){let n,s=sP,l=0,h=!1;function d(Y){k();let ne=s.subscribe(Y),F=!1;return()=>{F||(F=!0,ne(),R())}}i(d,"addNestedSub");function v(){s.notify()}i(v,"notifyNestedSubs");function S(){j.onStateChange&&j.onStateChange()}i(S,"handleChangeWrapper");function b(){return h}i(b,"isSubscribed");function k(){l++,n||(n=t?t.addNestedSub(S):e.subscribe(S),s=O4())}i(k,"trySubscribe");function R(){l--,n&&l===0&&(n(),n=void 0,s.clear(),s=sP)}i(R,"tryUnsubscribe");function I(){h||(h=!0,k())}i(I,"trySubscribeSelf");function z(){h&&(h=!1,R())}i(z,"tryUnsubscribeSelf");let j={addNestedSub:d,notifyNestedSubs:v,handleChangeWrapper:S,isSubscribed:b,trySubscribe:I,tryUnsubscribe:z,getListeners:i(()=>s,"getListeners")};return j}i(wP,"createSubscription");var R4=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",D4=typeof navigator<"u"&&navigator.product==="ReactNative",Dy=R4||D4?Tt.useLayoutEffect:Tt.useEffect;function aP(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}i(aP,"is");function Mo(e,t){if(aP(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;let n=Object.keys(e),s=Object.keys(t);if(n.length!==s.length)return!1;for(let l=0;l{xP=e},"initializeConnect"),q4=[null,null];function j4(e,t,n){Dy(()=>e(...t),n)}i(j4,"useIsomorphicLayoutEffectWithArgs");function K4(e,t,n,s,l,h){e.current=s,n.current=!1,l.current&&(l.current=null,h())}i(K4,"captureWrapperProps");function G4(e,t,n,s,l,h,d,v,S,b,k){if(!e)return()=>{};let R=!1,I=null,z=i(()=>{if(R||!v.current)return;let Y=t.getState(),ne,F;try{ne=s(Y,l.current)}catch(L){F=L,I=L}F||(I=null),ne===h.current?d.current||b():(h.current=ne,S.current=ne,d.current=!0,k())},"checkForUpdates");return n.onStateChange=z,n.trySubscribe(),z(),i(()=>{if(R=!0,n.tryUnsubscribe(),n.onStateChange=null,I)throw I},"unsubscribeWrapper")}i(G4,"subscribeUpdates");function Y4(e,t){return e===t}i(Y4,"strictEqual");function X4(e,t,n,{pure:s,areStatesEqual:l=Y4,areOwnPropsEqual:h=Mo,areStatePropsEqual:d=Mo,areMergedPropsEqual:v=Mo,forwardRef:S=!1,context:b=gl}={}){let k=b,R=N4(e),I=k4(t),z=L4(n),j=!!e;return i(ne=>{let F=ne.displayName||ne.name||"Component",L=`Connect(${F})`,D={shouldHandleStateChanges:j,displayName:L,wrappedComponentName:F,WrappedComponent:ne,initMapStateToProps:R,initMapDispatchToProps:I,initMergeProps:z,areStatesEqual:l,areStatePropsEqual:d,areOwnPropsEqual:h,areMergedPropsEqual:v};function q(oe){let[he,Re,Ee]=Tt.useMemo(()=>{let{reactReduxForwardedRef:st,...Fe}=oe;return[oe.context,st,Fe]},[oe]),Ye=Tt.useMemo(()=>{let st=k;return he?.Consumer,st},[he,k]),tt=Tt.useContext(Ye),xe=!!oe.store&&!!oe.store.getState&&!!oe.store.dispatch,Xe=!!tt&&!!tt.store,je=xe?oe.store:tt.store,Qe=Xe?tt.getServerState:je.getState,ot=Tt.useMemo(()=>b4(je.dispatch,D),[je]),[It,Pt]=Tt.useMemo(()=>{if(!j)return q4;let st=wP(je,xe?void 0:tt.subscription),Fe=st.notifyNestedSubs.bind(st);return[st,Fe]},[je,xe,tt]),fn=Tt.useMemo(()=>xe?tt:{...tt,subscription:It},[xe,tt,It]),dn=Tt.useRef(void 0),vr=Tt.useRef(Ee),Ut=Tt.useRef(void 0),yr=Tt.useRef(!1),wr=Tt.useRef(!1),Gt=Tt.useRef(void 0);Dy(()=>(wr.current=!0,()=>{wr.current=!1}),[]);let Ft=Tt.useMemo(()=>i(()=>Ut.current&&Ee===vr.current?Ut.current:ot(je.getState(),Ee),"selector"),[je,Ee]),se=Tt.useMemo(()=>i(Fe=>It?G4(j,je,It,ot,vr,dn,yr,wr,Ut,Pt,Fe):()=>{},"subscribe"),[It]);j4(K4,[vr,dn,yr,Ee,Ut,Pt]);let We;try{We=xP(se,Ft,Qe?()=>ot(Qe(),Ee):Ft)}catch(st){throw Gt.current&&(st.message+=` +`);let d=VW(t,n,l),v=Z0.getSymbolSize(t),S=new OW(v);return BW(S,t),zW(S),WW(S,t),tE(S,n,0),t>=7&&UW(S,t),$W(S,d),isNaN(s)&&(s=rE.getBestMask(S,tE.bind(null,S,n))),rE.applyMask(s,S),tE(S,n,s),{modules:S,version:t,errorCorrectionLevel:n,maskPattern:s,segments:l}}i(jW,"createSymbol");GM.create=i(function(t,n){if(typeof t>"u"||t==="")throw new Error("No input text");let s=Z_.M,l,h;return typeof n<"u"&&(s=Z_.from(n.errorCorrectionLevel,Z_.M),l=J0.from(n.version),h=rE.from(n.maskPattern),n.toSJISFunc&&Z0.setToSJISFunction(n.toSJISFunc)),jW(t,l,s,h)},"create")});var iE=rt(zf=>{function XM(e){if(typeof e=="number"&&(e=e.toString()),typeof e!="string")throw new Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||t.length===5||t.length>8)throw new Error("Invalid hex color: "+e);(t.length===3||t.length===4)&&(t=Array.prototype.concat.apply([],t.map(function(s){return[s,s]}))),t.length===6&&t.push("F","F");let n=parseInt(t.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:n&255,hex:"#"+t.slice(0,6).join("")}}i(XM,"hex2rgba");zf.getOptions=i(function(t){t||(t={}),t.color||(t.color={});let n=typeof t.margin>"u"||t.margin===null||t.margin<0?4:t.margin,s=t.width&&t.width>=21?t.width:void 0,l=t.scale||4;return{width:s,scale:s?4:l,margin:n,color:{dark:XM(t.color.dark||"#000000ff"),light:XM(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},"getOptions");zf.getScale=i(function(t,n){return n.width&&n.width>=t+n.margin*2?n.width/(t+n.margin*2):n.scale},"getScale");zf.getImageWidth=i(function(t,n){let s=zf.getScale(t,n);return Math.floor((t+n.margin*2)*s)},"getImageWidth");zf.qrToImageData=i(function(t,n,s){let l=n.modules.size,h=n.modules.data,d=zf.getScale(l,s),v=Math.floor((l+s.margin*2)*d),S=s.margin*d,b=[s.color.light,s.color.dark];for(let k=0;k=S&&R>=S&&k{var oE=iE();function KW(e,t,n){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=n,t.width=n,t.style.height=n+"px",t.style.width=n+"px"}i(KW,"clearCanvas");function GW(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}i(GW,"getCanvasElement");ew.render=i(function(t,n,s){let l=s,h=n;typeof l>"u"&&(!n||!n.getContext)&&(l=n,n=void 0),n||(h=GW()),l=oE.getOptions(l);let d=oE.getImageWidth(t.modules.size,l),v=h.getContext("2d"),S=v.createImageData(d,d);return oE.qrToImageData(S.data,t,l),KW(v,h,d),v.putImageData(S,0,0),h},"render");ew.renderToDataURL=i(function(t,n,s){let l=s;typeof l>"u"&&(!n||!n.getContext)&&(l=n,n=void 0),l||(l={});let h=ew.render(t,n,l),d=l.type||"image/png",v=l.rendererOpts||{};return h.toDataURL(d,v.quality)},"renderToDataURL")});var eO=rt(ZM=>{var YW=iE();function JM(e,t){let n=e.a/255,s=t+'="'+e.hex+'"';return n<1?s+" "+t+'-opacity="'+n.toFixed(2).slice(1)+'"':s}i(JM,"getColorAttrib");function sE(e,t,n){let s=e+t;return typeof n<"u"&&(s+=" "+n),s}i(sE,"svgCmd");function XW(e,t,n){let s="",l=0,h=!1,d=0;for(let v=0;v0&&S>0&&e[v-1]||(s+=h?sE("M",S+n,.5+b+n):sE("m",l,0),l=0,h=!1),S+1':"",b="',k='viewBox="0 0 '+v+" "+v+'"',I=''+S+b+` +`;return typeof s=="function"&&s(null,I),I},"render")});var rO=rt(ug=>{var QW=rM(),aE=YM(),tO=QM(),JW=eO();function lE(e,t,n,s,l){let h=[].slice.call(arguments,1),d=h.length,v=typeof h[d-1]=="function";if(!v&&!QW())throw new Error("Callback required as last argument");if(v){if(d<2)throw new Error("Too few arguments provided");d===2?(l=n,n=t,t=s=void 0):d===3&&(t.getContext&&typeof l>"u"?(l=s,s=void 0):(l=s,s=n,n=t,t=void 0))}else{if(d<1)throw new Error("Too few arguments provided");return d===1?(n=t,t=s=void 0):d===2&&!t.getContext&&(s=n,n=t,t=void 0),new Promise(function(S,b){try{let k=aE.create(n,s);S(e(k,t,s))}catch(k){b(k)}})}try{let S=aE.create(n,s);l(null,e(S,t,s))}catch(S){l(S)}}i(lE,"renderCanvas");ug.create=aE.create;ug.toCanvas=lE.bind(null,tO.render);ug.toDataURL=lE.bind(null,tO.renderToDataURL);ug.toString=lE.bind(null,function(e,t,n){return JW.render(e,n)})});var pO=rt((Dee,dO)=>{"use strict";var w8="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";dO.exports=w8});var vO=rt((Iee,gO)=>{"use strict";var S8=pO();function hO(){}i(hO,"emptyFunction");function mO(){}i(mO,"emptyFunctionWithReset");mO.resetWarningCache=hO;gO.exports=function(){function e(s,l,h,d,v,S){if(S!==S8){var b=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw b.name="Invariant Violation",b}}i(e,"shim"),e.isRequired=e;function t(){return e}i(t,"getShim");var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:mO,resetWarningCache:hO};return n.PropTypes=n,n}});var wO=rt((zee,yO)=>{yO.exports=vO()();var Hee,Bee});var zE=de(be()),NO=de(QN());var cA=de(be(),1),fA=de(tA(),1),Ry=de(be(),1);var Tt="default"in Ry?Ry.default:Ry,rA=Symbol.for("react-redux-context"),nA=typeof globalThis<"u"?globalThis:{};function n4(){if(!Tt.createContext)return{};let e=nA[rA]??(nA[rA]=new Map),t=e.get(Tt.createContext);return t||(t=Tt.createContext(null),e.set(Tt.createContext,t)),t}i(n4,"getContext");var gl=n4(),dA=i(()=>{throw new Error("uSES not initialized!")},"notInitialized");function _x(e=gl){return i(function(){return Tt.useContext(e)},"useReduxContext2")}i(_x,"createReduxContextHook");var pA=_x(),hA=dA,i4=i(e=>{hA=e},"initializeUseSelector"),o4=i((e,t)=>e===t,"refEquality");function s4(e=gl){let t=e===gl?pA:_x(e),n=i((s,l={})=>{let{equalityFn:h=o4,devModeChecks:d={}}=typeof l=="function"?{equalityFn:l}:l,{store:v,subscription:S,getServerState:b,stabilityCheck:k,identityFunctionCheck:R}=t(),I=Tt.useRef(!0),z=Tt.useCallback({[s.name](Y){let ne=s(Y);if(0){if((L==="always"||L==="once"&&I.current)&&!h(ne,D))try{}catch(te){}if((F==="always"||F==="once"&&I.current)&&ne===Y)try{}catch(q){}}return ne}}[s.name],[s,k,d.stabilityCheck]),j=hA(S.addNestedSub,v.getState,b||v.getState,z,h);return Tt.useDebugValue(j),j},"useSelector2");return Object.assign(n,{withTypes:i(()=>n,"withTypes")}),n}i(s4,"createSelectorHook");var mA=s4(),a4=Symbol.for("react.element"),l4=Symbol.for("react.portal"),u4=Symbol.for("react.fragment"),c4=Symbol.for("react.strict_mode"),f4=Symbol.for("react.profiler"),d4=Symbol.for("react.provider"),p4=Symbol.for("react.context"),h4=Symbol.for("react.server_context"),gA=Symbol.for("react.forward_ref"),m4=Symbol.for("react.suspense"),g4=Symbol.for("react.suspense_list"),Ex=Symbol.for("react.memo"),v4=Symbol.for("react.lazy"),Q8=Symbol.for("react.offscreen"),J8=Symbol.for("react.client.reference"),y4=gA,w4=Ex;function S4(e){if(typeof e=="object"&&e!==null){let t=e.$$typeof;switch(t){case a4:{let n=e.type;switch(n){case u4:case f4:case c4:case m4:case g4:return n;default:{let s=n&&n.$$typeof;switch(s){case h4:case p4:case gA:case v4:case Ex:case d4:return s;default:return t}}}}case l4:return t}}}i(S4,"typeOf");function x4(e){return S4(e)===Ex}i(x4,"isMemo");function C4(e,t,n,s,{areStatesEqual:l,areOwnPropsEqual:h,areStatePropsEqual:d}){let v=!1,S,b,k,R,I;function z(L,D){return S=L,b=D,k=e(S,b),R=t(s,b),I=n(k,R,b),v=!0,I}i(z,"handleFirstCall");function j(){return k=e(S,b),t.dependsOnOwnProps&&(R=t(s,b)),I=n(k,R,b),I}i(j,"handleNewPropsAndNewState");function Y(){return e.dependsOnOwnProps&&(k=e(S,b)),t.dependsOnOwnProps&&(R=t(s,b)),I=n(k,R,b),I}i(Y,"handleNewProps");function ne(){let L=e(S,b),D=!d(L,k);return k=L,D&&(I=n(k,R,b)),I}i(ne,"handleNewState");function F(L,D){let q=!h(D,b),te=!l(L,S,D,b);return S=L,b=D,q&&te?j():q?Y():te?ne():I}return i(F,"handleSubsequentCalls"),i(function(D,q){return v?F(D,q):z(D,q)},"pureFinalPropsSelector")}i(C4,"pureFinalPropsSelectorFactory");function _4(e,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:s,...l}){let h=t(e,l),d=n(e,l),v=s(e,l);return C4(h,d,v,e,l)}i(_4,"finalPropsSelectorFactory");function E4(e,t){let n={};for(let s in e){let l=e[s];typeof l=="function"&&(n[s]=(...h)=>t(l(...h)))}return n}i(E4,"bindActionCreators");function xx(e){return i(function(n){let s=e(n);function l(){return s}return i(l,"constantSelector"),l.dependsOnOwnProps=!1,l},"initConstantSelector")}i(xx,"wrapMapToPropsConstant");function iA(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}i(iA,"getDependsOnOwnProps");function vA(e,t){return i(function(s,{displayName:l}){let h=i(function(v,S){return h.dependsOnOwnProps?h.mapToProps(v,S):h.mapToProps(v,void 0)},"mapToPropsProxy");return h.dependsOnOwnProps=!0,h.mapToProps=i(function(v,S){h.mapToProps=e,h.dependsOnOwnProps=iA(e);let b=h(v,S);return typeof b=="function"&&(h.mapToProps=b,h.dependsOnOwnProps=iA(b),b=h(v,S)),b},"detectFactoryAndVerify"),h},"initProxySelector")}i(vA,"wrapMapToPropsFunc");function bx(e,t){return(n,s)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${s.wrappedComponentName}.`)}}i(bx,"createInvalidArgFactory");function b4(e){return e&&typeof e=="object"?xx(t=>E4(e,t)):e?typeof e=="function"?vA(e,"mapDispatchToProps"):bx(e,"mapDispatchToProps"):xx(t=>({dispatch:t}))}i(b4,"mapDispatchToPropsFactory");function T4(e){return e?typeof e=="function"?vA(e,"mapStateToProps"):bx(e,"mapStateToProps"):xx(()=>({}))}i(T4,"mapStateToPropsFactory");function k4(e,t,n){return{...n,...e,...t}}i(k4,"defaultMergeProps");function N4(e){return i(function(n,{displayName:s,areMergedPropsEqual:l}){let h=!1,d;return i(function(S,b,k){let R=e(S,b,k);return h?l(R,d)||(d=R):(h=!0,d=R),d},"mergePropsProxy")},"initMergePropsProxy")}i(N4,"wrapMergePropsFunc");function A4(e){return e?typeof e=="function"?N4(e):bx(e,"mergeProps"):()=>k4}i(A4,"mergePropsFactory");function P4(e){e()}i(P4,"defaultNoopBatch");function L4(){let e=null,t=null;return{clear(){e=null,t=null},notify(){P4(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){let n=[],s=e;for(;s;)n.push(s),s=s.next;return n},subscribe(n){let s=!0,l=t={callback:n,next:null,prev:t};return l.prev?l.prev.next=l:e=l,i(function(){!s||e===null||(s=!1,l.next?l.next.prev=l.prev:t=l.prev,l.prev?l.prev.next=l.next:e=l.next)},"unsubscribe")}}}i(L4,"createListenerCollection");var oA={notify(){},get:i(()=>[],"get")};function yA(e,t){let n,s=oA,l=0,h=!1;function d(Y){k();let ne=s.subscribe(Y),F=!1;return()=>{F||(F=!0,ne(),R())}}i(d,"addNestedSub");function v(){s.notify()}i(v,"notifyNestedSubs");function S(){j.onStateChange&&j.onStateChange()}i(S,"handleChangeWrapper");function b(){return h}i(b,"isSubscribed");function k(){l++,n||(n=t?t.addNestedSub(S):e.subscribe(S),s=L4())}i(k,"trySubscribe");function R(){l--,n&&l===0&&(n(),n=void 0,s.clear(),s=oA)}i(R,"tryUnsubscribe");function I(){h||(h=!0,k())}i(I,"trySubscribeSelf");function z(){h&&(h=!1,R())}i(z,"tryUnsubscribeSelf");let j={addNestedSub:d,notifyNestedSubs:v,handleChangeWrapper:S,isSubscribed:b,trySubscribe:I,tryUnsubscribe:z,getListeners:i(()=>s,"getListeners")};return j}i(yA,"createSubscription");var M4=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",O4=typeof navigator<"u"&&navigator.product==="ReactNative",Dy=M4||O4?Tt.useLayoutEffect:Tt.useEffect;function sA(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}i(sA,"is");function Mo(e,t){if(sA(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;let n=Object.keys(e),s=Object.keys(t);if(n.length!==s.length)return!1;for(let l=0;l{SA=e},"initializeConnect"),$4=[null,null];function V4(e,t,n){Dy(()=>e(...t),n)}i(V4,"useIsomorphicLayoutEffectWithArgs");function q4(e,t,n,s,l,h){e.current=s,n.current=!1,l.current&&(l.current=null,h())}i(q4,"captureWrapperProps");function j4(e,t,n,s,l,h,d,v,S,b,k){if(!e)return()=>{};let R=!1,I=null,z=i(()=>{if(R||!v.current)return;let Y=t.getState(),ne,F;try{ne=s(Y,l.current)}catch(L){F=L,I=L}F||(I=null),ne===h.current?d.current||b():(h.current=ne,S.current=ne,d.current=!0,k())},"checkForUpdates");return n.onStateChange=z,n.trySubscribe(),z(),i(()=>{if(R=!0,n.tryUnsubscribe(),n.onStateChange=null,I)throw I},"unsubscribeWrapper")}i(j4,"subscribeUpdates");function K4(e,t){return e===t}i(K4,"strictEqual");function G4(e,t,n,{pure:s,areStatesEqual:l=K4,areOwnPropsEqual:h=Mo,areStatePropsEqual:d=Mo,areMergedPropsEqual:v=Mo,forwardRef:S=!1,context:b=gl}={}){let k=b,R=T4(e),I=b4(t),z=A4(n),j=!!e;return i(ne=>{let F=ne.displayName||ne.name||"Component",L=`Connect(${F})`,D={shouldHandleStateChanges:j,displayName:L,wrappedComponentName:F,WrappedComponent:ne,initMapStateToProps:R,initMapDispatchToProps:I,initMergeProps:z,areStatesEqual:l,areStatePropsEqual:d,areOwnPropsEqual:h,areMergedPropsEqual:v};function q(oe){let[he,Re,Ee]=Tt.useMemo(()=>{let{reactReduxForwardedRef:st,...Fe}=oe;return[oe.context,st,Fe]},[oe]),Ye=Tt.useMemo(()=>{let st=k;return he?.Consumer,st},[he,k]),tt=Tt.useContext(Ye),xe=!!oe.store&&!!oe.store.getState&&!!oe.store.dispatch,Xe=!!tt&&!!tt.store,je=xe?oe.store:tt.store,Qe=Xe?tt.getServerState:je.getState,ot=Tt.useMemo(()=>_4(je.dispatch,D),[je]),[It,At]=Tt.useMemo(()=>{if(!j)return $4;let st=yA(je,xe?void 0:tt.subscription),Fe=st.notifyNestedSubs.bind(st);return[st,Fe]},[je,xe,tt]),fn=Tt.useMemo(()=>xe?tt:{...tt,subscription:It},[xe,tt,It]),dn=Tt.useRef(void 0),vr=Tt.useRef(Ee),Ut=Tt.useRef(void 0),yr=Tt.useRef(!1),wr=Tt.useRef(!1),Yt=Tt.useRef(void 0);Dy(()=>(wr.current=!0,()=>{wr.current=!1}),[]);let Ft=Tt.useMemo(()=>i(()=>Ut.current&&Ee===vr.current?Ut.current:ot(je.getState(),Ee),"selector"),[je,Ee]),se=Tt.useMemo(()=>i(Fe=>It?j4(j,je,It,ot,vr,dn,yr,wr,Ut,At,Fe):()=>{},"subscribe"),[It]);V4(q4,[vr,dn,yr,Ee,Ut,At]);let We;try{We=SA(se,Ft,Qe?()=>ot(Qe(),Ee):Ft)}catch(st){throw Yt.current&&(st.message+=` The error may be correlated with this previous error: -${Gt.current.stack} +${Yt.current.stack} -`),st}Dy(()=>{Gt.current=void 0,Ut.current=void 0,dn.current=We});let Yr=Tt.useMemo(()=>Tt.createElement(ne,{...We,ref:Re}),[Re,ne,We]);return Tt.useMemo(()=>j?Tt.createElement(Ye.Provider,{value:fn},Yr):Yr,[Ye,Yr,fn])}i(q,"ConnectFunction");let Z=Tt.memo(q);if(Z.WrappedComponent=ne,Z.displayName=q.displayName=L,S){let he=Tt.forwardRef(i(function(Ee,Ye){return Tt.createElement(Z,{...Ee,reactReduxForwardedRef:Ye})},"forwardConnectRef"));return he.displayName=L,he.WrappedComponent=ne,Cx(he,ne)}return Cx(Z,ne)},"wrapWithConnect")}i(X4,"connect");var Uu=X4;function Q4({store:e,context:t,children:n,serverState:s,stabilityCheck:l="once",identityFunctionCheck:h="once"}){let d=Tt.useMemo(()=>{let b=wP(e);return{store:e,subscription:b,getServerState:s?()=>s:void 0,stabilityCheck:l,identityFunctionCheck:h}},[e,s,l,h]),v=Tt.useMemo(()=>e.getState(),[e]);Dy(()=>{let{subscription:b}=d;return b.onStateChange=b.notifyNestedSubs,b.trySubscribe(),v!==e.getState()&&b.notifyNestedSubs(),()=>{b.tryUnsubscribe(),b.onStateChange=void 0}},[d,v]);let S=t||gl;return Tt.createElement(S.Provider,{value:d},n)}i(Q4,"Provider");var CP=Q4;function _P(e=gl){let t=e===gl?hP:_x(e),n=i(()=>{let{store:s}=t();return s},"useStore2");return Object.assign(n,{withTypes:i(()=>n,"withTypes")}),n}i(_P,"createStoreHook");var J4=_P();function Z4(e=gl){let t=e===gl?J4:_P(e),n=i(()=>t().dispatch,"useDispatch2");return Object.assign(n,{withTypes:i(()=>n,"withTypes")}),n}i(Z4,"createDispatchHook");var EP=Z4();s4(dP.useSyncExternalStoreWithSelector);V4(fP.useSyncExternalStore);var Jn=de(be());function Kn(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}i(Kn,"formatProdErrorMessage");var eH=typeof Symbol=="function"&&Symbol.observable||"@@observable",bP=eH,Tx=i(()=>Math.random().toString(36).substring(7).split("").join("."),"randomString"),tH={INIT:`@@redux/INIT${Tx()}`,REPLACE:`@@redux/REPLACE${Tx()}`,PROBE_UNKNOWN_ACTION:i(()=>`@@redux/PROBE_UNKNOWN_ACTION${Tx()}`,"PROBE_UNKNOWN_ACTION")},Iy=tH;function Fy(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}i(Fy,"isPlainObject");function kx(e,t,n){if(typeof e!="function")throw new Error(Kn(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Kn(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Kn(1));return n(kx)(e,t)}let s=e,l=t,h=new Map,d=h,v=0,S=!1;function b(){d===h&&(d=new Map,h.forEach((ne,F)=>{d.set(F,ne)}))}i(b,"ensureCanMutateNextListeners");function k(){if(S)throw new Error(Kn(3));return l}i(k,"getState");function R(ne){if(typeof ne!="function")throw new Error(Kn(4));if(S)throw new Error(Kn(5));let F=!0;b();let L=v++;return d.set(L,ne),i(function(){if(F){if(S)throw new Error(Kn(6));F=!1,b(),d.delete(L),h=null}},"unsubscribe")}i(R,"subscribe");function I(ne){if(!Fy(ne))throw new Error(Kn(7));if(typeof ne.type>"u")throw new Error(Kn(8));if(typeof ne.type!="string")throw new Error(Kn(17));if(S)throw new Error(Kn(9));try{S=!0,l=s(l,ne)}finally{S=!1}return(h=d).forEach(L=>{L()}),ne}i(I,"dispatch");function z(ne){if(typeof ne!="function")throw new Error(Kn(10));s=ne,I({type:Iy.REPLACE})}i(z,"replaceReducer");function j(){let ne=R;return{subscribe(F){if(typeof F!="object"||F===null)throw new Error(Kn(11));function L(){let q=F;q.next&&q.next(k())}return i(L,"observeState"),L(),{unsubscribe:ne(L)}},[bP](){return this}}}return i(j,"observable"),I({type:Iy.INIT}),{dispatch:I,subscribe:R,getState:k,replaceReducer:z,[bP]:j}}i(kx,"createStore");function rH(e){Object.keys(e).forEach(t=>{let n=e[t];if(typeof n(void 0,{type:Iy.INIT})>"u")throw new Error(Kn(12));if(typeof n(void 0,{type:Iy.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Kn(13))})}i(rH,"assertReducerShape");function sp(e){let t=Object.keys(e),n={};for(let d=0;d"u"){let ne=S&&S.type;throw new Error(Kn(14))}k[I]=Y,b=b||Y!==j}return b=b||s.length!==Object.keys(v).length,b?k:v},"combination")}i(sp,"combineReducers");function ap(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...s)=>t(n(...s)))}i(ap,"compose");function TP(...e){return t=>(n,s)=>{let l=t(n,s),h=i(()=>{throw new Error(Kn(15))},"dispatch"),d={getState:l.getState,dispatch:i((S,...b)=>h(S,...b),"dispatch")},v=e.map(S=>S(d));return h=ap(...v)(l.dispatch),{...l,dispatch:h}}}i(TP,"applyMiddleware");function kP(e){return Fy(e)&&"type"in e&&typeof e.type=="string"}i(kP,"isAction");var OP=Symbol.for("immer-nothing"),NP=Symbol.for("immer-draftable"),Oo=Symbol.for("immer-state");function Hs(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}i(Hs,"die");var lp=Object.getPrototypeOf;function _a(e){return!!e&&!!e[Oo]}i(_a,"isDraft");function Bs(e){return e?RP(e)||Array.isArray(e)||!!e[NP]||!!e.constructor?.[NP]||Uy(e)||$y(e):!1}i(Bs,"isDraftable");var nH=Object.prototype.constructor.toString();function RP(e){if(!e||typeof e!="object")return!1;let t=lp(e);if(t===null)return!0;let n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===nH}i(RP,"isPlainObject");function Hy(e,t){Wy(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,s)=>t(s,n,e))}i(Hy,"each");function Wy(e){let t=e[Oo];return t?t.type_:Array.isArray(e)?1:Uy(e)?2:$y(e)?3:0}i(Wy,"getArchtype");function Ax(e,t){return Wy(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}i(Ax,"has");function DP(e,t,n){let s=Wy(e);s===2?e.set(t,n):s===3?e.add(n):e[t]=n}i(DP,"set");function iH(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}i(iH,"is");function Uy(e){return e instanceof Map}i(Uy,"isMap");function $y(e){return e instanceof Set}i($y,"isSet");function mf(e){return e.copy_||e.base_}i(mf,"latest");function Lx(e,t){if(Uy(e))return new Map(e);if($y(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let n=RP(e);if(t===!0||t==="class_only"&&!n){let s=Object.getOwnPropertyDescriptors(e);delete s[Oo];let l=Reflect.ownKeys(s);for(let h=0;h1&&(e.set=e.add=e.clear=e.delete=oH),Object.freeze(e),t&&Object.entries(e).forEach(([n,s])=>Ix(s,!0))),e}i(Ix,"freeze");function oH(){Hs(2)}i(oH,"dontMutateFrozenCollections");function Vy(e){return Object.isFrozen(e)}i(Vy,"isFrozen");var sH={};function gf(e){let t=sH[e];return t||Hs(0,e),t}i(gf,"getPlugin");var bm;function IP(){return bm}i(IP,"getCurrentScope");function aH(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}i(aH,"createScope");function PP(e,t){t&&(gf("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}i(PP,"usePatchesInScope");function Mx(e){Ox(e),e.drafts_.forEach(lH),e.drafts_=null}i(Mx,"revokeScope");function Ox(e){e===bm&&(bm=e.parent_)}i(Ox,"leaveScope");function AP(e){return bm=aH(bm,e)}i(AP,"enterScope");function lH(e){let t=e[Oo];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}i(lH,"revokeDraft");function LP(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];return e!==void 0&&e!==n?(n[Oo].modified_&&(Mx(t),Hs(4)),Bs(e)&&(e=By(t,e),t.parent_||zy(t,e)),t.patches_&&gf("Patches").generateReplacementPatches_(n[Oo].base_,e,t.patches_,t.inversePatches_)):e=By(t,n,[]),Mx(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==OP?e:void 0}i(LP,"processResult");function By(e,t,n){if(Vy(t))return t;let s=t[Oo];if(!s)return Hy(t,(l,h)=>MP(e,s,t,l,h,n)),t;if(s.scope_!==e)return t;if(!s.modified_)return zy(e,s.base_,!0),s.base_;if(!s.finalized_){s.finalized_=!0,s.scope_.unfinalizedDrafts_--;let l=s.copy_,h=l,d=!1;s.type_===3&&(h=new Set(l),l.clear(),d=!0),Hy(h,(v,S)=>MP(e,s,l,v,S,n,d)),zy(e,l,!1),n&&e.patches_&&gf("Patches").generatePatches_(s,n,e.patches_,e.inversePatches_)}return s.copy_}i(By,"finalize");function MP(e,t,n,s,l,h,d){if(_a(l)){let v=h&&t&&t.type_!==3&&!Ax(t.assigned_,s)?h.concat(s):void 0,S=By(e,l,v);if(DP(n,s,S),_a(S))e.canAutoFreeze_=!1;else return}else d&&n.add(l);if(Bs(l)&&!Vy(l)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;By(e,l),(!t||!t.scope_.parent_)&&typeof s!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,s)&&zy(e,l)}}i(MP,"finalizeProperty");function zy(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Ix(t,n)}i(zy,"maybeFreeze");function uH(e,t){let n=Array.isArray(e),s={type_:n?1:0,scope_:t?t.scope_:IP(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},l=s,h=Fx;n&&(l=[s],h=Tm);let{revoke:d,proxy:v}=Proxy.revocable(l,h);return s.draft_=v,s.revoke_=d,v}i(uH,"createProxyProxy");var Fx={get(e,t){if(t===Oo)return e;let n=mf(e);if(!Ax(n,t))return cH(e,n,t);let s=n[t];return e.finalized_||!Bs(s)?s:s===Nx(e.base_,t)?(Px(e),e.copy_[t]=Dx(s,e)):s},has(e,t){return t in mf(e)},ownKeys(e){return Reflect.ownKeys(mf(e))},set(e,t,n){let s=FP(mf(e),t);if(s?.set)return s.set.call(e.draft_,n),!0;if(!e.modified_){let l=Nx(mf(e),t),h=l?.[Oo];if(h&&h.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(iH(n,l)&&(n!==void 0||Ax(e.base_,t)))return!0;Px(e),Rx(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Nx(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Px(e),Rx(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=mf(e),s=Reflect.getOwnPropertyDescriptor(n,t);return s&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:s.enumerable,value:n[t]}},defineProperty(){Hs(11)},getPrototypeOf(e){return lp(e.base_)},setPrototypeOf(){Hs(12)}},Tm={};Hy(Fx,(e,t)=>{Tm[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Tm.deleteProperty=function(e,t){return Tm.set.call(this,e,t,void 0)};Tm.set=function(e,t,n){return Fx.set.call(this,e[0],t,n,e[0])};function Nx(e,t){let n=e[Oo];return(n?mf(n):e)[t]}i(Nx,"peek");function cH(e,t,n){let s=FP(t,n);return s?"value"in s?s.value:s.get?.call(e.draft_):void 0}i(cH,"readPropFromProto");function FP(e,t){if(!(t in e))return;let n=lp(e);for(;n;){let s=Object.getOwnPropertyDescriptor(n,t);if(s)return s;n=lp(n)}}i(FP,"getDescriptorFromProto");function Rx(e){e.modified_||(e.modified_=!0,e.parent_&&Rx(e.parent_))}i(Rx,"markChanged");function Px(e){e.copy_||(e.copy_=Lx(e.base_,e.scope_.immer_.useStrictShallowCopy_))}i(Px,"prepareCopy");var fH=class{static{i(this,"Immer2")}constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,s)=>{if(typeof t=="function"&&typeof n!="function"){let h=n;n=t;let d=this;return i(function(S=h,...b){return d.produce(S,k=>n.call(this,k,...b))},"curriedProduce")}typeof n!="function"&&Hs(6),s!==void 0&&typeof s!="function"&&Hs(7);let l;if(Bs(t)){let h=AP(this),d=Dx(t,void 0),v=!0;try{l=n(d),v=!1}finally{v?Mx(h):Ox(h)}return PP(h,s),LP(l,h)}else if(!t||typeof t!="object"){if(l=n(t),l===void 0&&(l=t),l===OP&&(l=void 0),this.autoFreeze_&&Ix(l,!0),s){let h=[],d=[];gf("Patches").generateReplacementPatches_(t,l,h,d),s(h,d)}return l}else Hs(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(d,...v)=>this.produceWithPatches(d,S=>t(S,...v));let s,l;return[this.produce(t,n,(d,v)=>{s=d,l=v}),s,l]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Bs(e)||Hs(8),_a(e)&&(e=Hx(e));let t=AP(this),n=Dx(e,void 0);return n[Oo].isManual_=!0,Ox(t),n}finishDraft(e,t){let n=e&&e[Oo];(!n||!n.isManual_)&&Hs(9);let{scope_:s}=n;return PP(s,t),LP(void 0,s)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let l=t[n];if(l.path.length===0&&l.op==="replace"){e=l.value;break}}n>-1&&(t=t.slice(n+1));let s=gf("Patches").applyPatches_;return _a(e)?s(e,t):this.produce(e,l=>s(l,t))}};function Dx(e,t){let n=Uy(e)?gf("MapSet").proxyMap_(e,t):$y(e)?gf("MapSet").proxySet_(e,t):uH(e,t);return(t?t.scope_:IP()).drafts_.push(n),n}i(Dx,"createProxy");function Hx(e){return _a(e)||Hs(10,e),HP(e)}i(Hx,"current");function HP(e){if(!Bs(e)||Vy(e))return e;let t=e[Oo],n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Lx(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Lx(e,!0);return Hy(n,(s,l)=>{DP(n,s,HP(l))}),t&&(t.finalized_=!1),n}i(HP,"currentImpl");var Ro=new fH,qy=Ro.produce,n8=Ro.produceWithPatches.bind(Ro),i8=Ro.setAutoFreeze.bind(Ro),o8=Ro.setUseStrictShallowCopy.bind(Ro),s8=Ro.applyPatches.bind(Ro),a8=Ro.createDraft.bind(Ro),l8=Ro.finishDraft.bind(Ro);function dH(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}i(dH,"assertIsFunction");function pH(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}i(pH,"assertIsObject");function hH(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){let n=e.map(s=>typeof s=="function"?`function ${s.name||"unnamed"}()`:typeof s).join(", ");throw new TypeError(`${t}[${n}]`)}}i(hH,"assertIsArrayOfFunctions");var BP=i(e=>Array.isArray(e)?e:[e],"ensureIsArray");function mH(e){let t=Array.isArray(e[0])?e[0]:e;return hH(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}i(mH,"getDependencies");function gH(e,t){let n=[],{length:s}=e;for(let l=0;l{n=jy(),d.resetResultsCount()},d.resultsCount=()=>h,d.resetResultsCount=()=>{h=0},d}i(Ky,"weakMapMemoize");function Bx(e,...t){let n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,s=i((...l)=>{let h=0,d=0,v,S={},b=l.pop();typeof b=="object"&&(S=b,b=l.pop()),dH(b,`createSelector expects an output function after the inputs, but received: [${typeof b}]`);let k={...n,...S},{memoize:R,memoizeOptions:I=[],argsMemoize:z=Ky,argsMemoizeOptions:j=[],devModeChecks:Y={}}=k,ne=BP(I),F=BP(j),L=mH(l),D=R(i(function(){return h++,b.apply(null,arguments)},"recomputationWrapper"),...ne),q=!0,te=z(i(function(){d++;let oe=gH(L,arguments);return v=D.apply(null,oe),v},"dependenciesChecker"),...F);return Object.assign(te,{resultFunc:b,memoizedResultFunc:D,dependencies:L,dependencyRecomputations:i(()=>d,"dependencyRecomputations"),resetDependencyRecomputations:i(()=>{d=0},"resetDependencyRecomputations"),lastResult:i(()=>v,"lastResult"),recomputations:i(()=>h,"recomputations"),resetRecomputations:i(()=>{h=0},"resetRecomputations"),memoize:R,argsMemoize:z})},"createSelector2");return Object.assign(s,{withTypes:i(()=>s,"withTypes")}),s}i(Bx,"createSelectorCreator");var SH=Bx(Ky),xH=Object.assign((e,t=SH)=>{pH(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let n=Object.keys(e),s=n.map(h=>e[h]);return t(s,(...h)=>h.reduce((d,v,S)=>(d[n[S]]=v,d),{}))},{withTypes:i(()=>xH,"withTypes")});function WP(e){return i(({dispatch:n,getState:s})=>l=>h=>typeof h=="function"?h(n,s,e):l(h),"middleware")}i(WP,"createThunkMiddleware");var UP=WP(),$P=WP;var CH=i((...e)=>{let t=Bx(...e),n=Object.assign((...s)=>{let l=t(...s),h=i((d,...v)=>l(_a(d)?Hx(d):d,...v),"wrappedSelector");return Object.assign(h,l),h},{withTypes:i(()=>n,"withTypes")});return n},"createDraftSafeSelectorCreator"),x8=CH(Ky),_H=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ap:ap.apply(null,arguments)},E8=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},EH=i(e=>e&&typeof e.match=="function","hasMatchFunction");function us(e,t){function n(...s){if(t){let l=t(...s);if(!l)throw new Error(on(0));return{type:e,payload:l.payload,..."meta"in l&&{meta:l.meta},..."error"in l&&{error:l.error}}}return{type:e,payload:s[0]}}return i(n,"actionCreator"),n.toString=()=>`${e}`,n.type=e,n.match=s=>kP(s)&&s.type===e,n}i(us,"createAction");var KP=class km extends Array{static{i(this,"_Tuple")}constructor(...t){super(...t),Object.setPrototypeOf(this,km.prototype)}static get[Symbol.species](){return km}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new km(...t[0].concat(this)):new km(...t.concat(this))}};function VP(e){return Bs(e)?qy(e,()=>{}):e}i(VP,"freezeDraftable");function qP(e,t,n){if(e.has(t)){let l=e.get(t);return n.update&&(l=n.update(l,t,e),e.set(t,l)),l}if(!n.insert)throw new Error(on(10));let s=n.insert(t,e);return e.set(t,s),s}i(qP,"emplace");function bH(e){return typeof e=="boolean"}i(bH,"isBoolean");var TH=i(()=>i(function(t){let{thunk:n=!0,immutableCheck:s=!0,serializableCheck:l=!0,actionCreatorCheck:h=!0}=t??{},d=new KP;return n&&(bH(n)?d.push(UP):d.push($P(n.extraArgument))),d},"getDefaultMiddleware"),"buildGetDefaultMiddleware"),kH="RTK_autoBatch";var GP=i(e=>t=>{setTimeout(t,e)},"createQueueWithTimer"),NH=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:GP(10),PH=i((e={type:"raf"})=>t=>(...n)=>{let s=t(...n),l=!0,h=!1,d=!1,v=new Set,S=e.type==="tick"?queueMicrotask:e.type==="raf"?NH:e.type==="callback"?e.queueNotification:GP(e.timeout),b=i(()=>{d=!1,h&&(h=!1,v.forEach(k=>k()))},"notifyListeners");return Object.assign({},s,{subscribe(k){let R=i(()=>l&&k(),"wrappedListener"),I=s.subscribe(R);return v.add(k),()=>{I(),v.delete(k)}},dispatch(k){try{return l=!k?.meta?.[kH],h=!l,h&&(d||(d=!0,S(b))),s.dispatch(k)}finally{l=!0}}})},"autoBatchEnhancer"),AH=i(e=>i(function(n){let{autoBatch:s=!0}=n??{},l=new KP(e);return s&&l.push(PH(typeof s=="object"?s:void 0)),l},"getDefaultEnhancers"),"buildGetDefaultEnhancers"),$u=!0;function YP(e){let t=TH(),{reducer:n=void 0,middleware:s,devTools:l=!0,preloadedState:h=void 0,enhancers:d=void 0}=e||{},v;if(typeof n=="function")v=n;else if(Fy(n))v=sp(n);else throw new Error(on(1));if(!$u&&s&&typeof s!="function")throw new Error(on(2));let S;if(typeof s=="function"){if(S=s(t),!$u&&!Array.isArray(S))throw new Error(on(3))}else S=t();if(!$u&&S.some(j=>typeof j!="function"))throw new Error(on(4));let b=ap;l&&(b=_H({trace:!$u,...typeof l=="object"&&l}));let k=TP(...S),R=AH(k);if(!$u&&d&&typeof d!="function")throw new Error(on(5));let I=typeof d=="function"?d(R):R();if(!$u&&!Array.isArray(I))throw new Error(on(6));if(!$u&&I.some(j=>typeof j!="function"))throw new Error(on(7));!$u&&S.length&&!I.includes(k)&&console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");let z=b(...I);return kx(v,h,z)}i(YP,"configureStore");function XP(e){let t={},n=[],s,l={addCase(h,d){let v=typeof h=="string"?h:h.type;if(!v)throw new Error(on(28));if(v in t)throw new Error(on(29));return t[v]=d,l},addMatcher(h,d){return n.push({matcher:h,reducer:d}),l},addDefaultCase(h){return s=h,l}};return e(l),[t,n,s]}i(XP,"executeReducerBuilderCallback");function LH(e){return typeof e=="function"}i(LH,"isStateFunction");function MH(e,t){let[n,s,l]=XP(t),h;if(LH(e))h=i(()=>VP(e()),"getInitialState");else{let v=VP(e);h=i(()=>v,"getInitialState")}function d(v=h(),S){let b=[n[S.type],...s.filter(({matcher:k})=>k(S)).map(({reducer:k})=>k)];return b.filter(k=>!!k).length===0&&(b=[l]),b.reduce((k,R)=>{if(R)if(_a(k)){let z=R(k,S);return z===void 0?k:z}else{if(Bs(k))return qy(k,I=>R(I,S));{let I=R(k,S);if(I===void 0){if(k===null)return k;throw new Error(on(9))}return I}}return k},v)}return i(d,"reducer"),d.getInitialState=h,d}i(MH,"createReducer");var OH="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",QP=i((e=21)=>{let t="",n=e;for(;n--;)t+=OH[Math.random()*64|0];return t},"nanoid"),RH=i((e,t)=>EH(e)?e.match(t):e(t),"matches");function DH(...e){return t=>e.some(n=>RH(n,t))}i(DH,"isAnyOf");var IH=["name","message","stack","code"],zx=class{static{i(this,"RejectWithValue")}constructor(e,t){this.payload=e,this.meta=t}_type},jP=class{static{i(this,"FulfillWithMeta")}constructor(e,t){this.payload=e,this.meta=t}_type},FH=i(e=>{if(typeof e=="object"&&e!==null){let t={};for(let n of IH)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},"miniSerializeError"),Nm=(()=>{function e(t,n,s){let l=us(t+"/fulfilled",(S,b,k,R)=>({payload:S,meta:{...R||{},arg:k,requestId:b,requestStatus:"fulfilled"}})),h=us(t+"/pending",(S,b,k)=>({payload:void 0,meta:{...k||{},arg:b,requestId:S,requestStatus:"pending"}})),d=us(t+"/rejected",(S,b,k,R,I)=>({payload:R,error:(s&&s.serializeError||FH)(S||"Rejected"),meta:{...I||{},arg:k,requestId:b,rejectedWithValue:!!R,requestStatus:"rejected",aborted:S?.name==="AbortError",condition:S?.name==="ConditionError"}}));function v(S){return(b,k,R)=>{let I=s?.idGenerator?s.idGenerator(S):QP(),z=new AbortController,j,Y;function ne(L){Y=L,z.abort()}i(ne,"abort");let F=async function(){let L;try{let q=s?.condition?.(S,{getState:k,extra:R});if(BH(q)&&(q=await q),q===!1||z.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let te=new Promise((Z,oe)=>{j=i(()=>{oe({name:"AbortError",message:Y||"Aborted"})},"abortHandler"),z.signal.addEventListener("abort",j)});b(h(I,S,s?.getPendingMeta?.({requestId:I,arg:S},{getState:k,extra:R}))),L=await Promise.race([te,Promise.resolve(n(S,{dispatch:b,getState:k,extra:R,requestId:I,signal:z.signal,abort:ne,rejectWithValue:i((Z,oe)=>new zx(Z,oe),"rejectWithValue"),fulfillWithValue:i((Z,oe)=>new jP(Z,oe),"fulfillWithValue")})).then(Z=>{if(Z instanceof zx)throw Z;return Z instanceof jP?l(Z.payload,I,S,Z.meta):l(Z,I,S)})])}catch(q){L=q instanceof zx?d(null,I,S,q.payload,q.meta):d(q,I,S)}finally{j&&z.signal.removeEventListener("abort",j)}return s&&!s.dispatchConditionRejection&&d.match(L)&&L.meta.condition||b(L),L}();return Object.assign(F,{abort:ne,requestId:I,arg:S,unwrap(){return F.then(HH)}})}}return i(v,"actionCreator"),Object.assign(v,{pending:h,rejected:d,fulfilled:l,settled:DH(d,l),typePrefix:t})}return i(e,"createAsyncThunk2"),e.withTypes=()=>e,e})();function HH(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}i(HH,"unwrapResult");function BH(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}i(BH,"isThenable");var JP=Symbol.for("rtk-slice-createasyncthunk"),P8={[JP]:Nm};function zH(e,t){return`${e}/${t}`}i(zH,"getType");function WH({creators:e}={}){let t=e?.asyncThunk?.[JP];return i(function(s){let{name:l,reducerPath:h=l}=s;if(!l)throw new Error(on(11));typeof process<"u";let d=(typeof s.reducers=="function"?s.reducers($H()):s.reducers)||{},v=Object.keys(d),S={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},b={addCase(L,D){let q=typeof L=="string"?L:L.type;if(!q)throw new Error(on(12));if(q in S.sliceCaseReducersByType)throw new Error(on(13));return S.sliceCaseReducersByType[q]=D,b},addMatcher(L,D){return S.sliceMatchers.push({matcher:L,reducer:D}),b},exposeAction(L,D){return S.actionCreators[L]=D,b},exposeCaseReducer(L,D){return S.sliceCaseReducersByName[L]=D,b}};v.forEach(L=>{let D=d[L],q={reducerName:L,type:zH(l,L),createNotation:typeof s.reducers=="function"};qH(D)?KH(q,D,b,t):VH(q,D,b)});function k(){let[L={},D=[],q=void 0]=typeof s.extraReducers=="function"?XP(s.extraReducers):[s.extraReducers],te={...L,...S.sliceCaseReducersByType};return MH(s.initialState,Z=>{for(let oe in te)Z.addCase(oe,te[oe]);for(let oe of S.sliceMatchers)Z.addMatcher(oe.matcher,oe.reducer);for(let oe of D)Z.addMatcher(oe.matcher,oe.reducer);q&&Z.addDefaultCase(q)})}i(k,"buildReducer");let R=i(L=>L,"selectSelf"),I=new Map,z;function j(L,D){return z||(z=k()),z(L,D)}i(j,"reducer");function Y(){return z||(z=k()),z.getInitialState()}i(Y,"getInitialState");function ne(L,D=!1){function q(Z){let oe=Z[L];return typeof oe>"u"&&D&&(oe=Y()),oe}i(q,"selectSlice");function te(Z=R){let oe=qP(I,D,{insert:i(()=>new WeakMap,"insert")});return qP(oe,Z,{insert:i(()=>{let he={};for(let[Re,Ee]of Object.entries(s.selectors??{}))he[Re]=UH(Ee,Z,Y,D);return he},"insert")})}return i(te,"getSelectors"),{reducerPath:L,getSelectors:te,get selectors(){return te(q)},selectSlice:q}}i(ne,"makeSelectorProps");let F={name:l,reducer:j,actions:S.actionCreators,caseReducers:S.sliceCaseReducersByName,getInitialState:Y,...ne(h),injectInto(L,{reducerPath:D,...q}={}){let te=D??h;return L.inject({reducerPath:te,reducer:j},q),{...F,...ne(te,!0)}}};return F},"createSlice2")}i(WH,"buildCreateSlice");function UH(e,t,n,s){function l(h,...d){let v=t(h);return typeof v>"u"&&s&&(v=n()),e(v,...d)}return i(l,"wrapper"),l.unwrapped=e,l}i(UH,"wrapSelector");var nr=WH();function $H(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return i(e,"asyncThunk"),e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}i($H,"buildReducerCreators");function VH({type:e,reducerName:t,createNotation:n},s,l){let h,d;if("reducer"in s){if(n&&!jH(s))throw new Error(on(17));h=s.reducer,d=s.prepare}else h=s;l.addCase(e,h).exposeCaseReducer(t,h).exposeAction(t,d?us(e,d):us(e))}i(VH,"handleNormalReducerDefinition");function qH(e){return e._reducerDefinitionType==="asyncThunk"}i(qH,"isAsyncThunkSliceReducerDefinition");function jH(e){return e._reducerDefinitionType==="reducerWithPrepare"}i(jH,"isCaseReducerWithPrepareDefinition");function KH({type:e,reducerName:t},n,s,l){if(!l)throw new Error(on(18));let{payloadCreator:h,fulfilled:d,pending:v,rejected:S,settled:b,options:k}=n,R=l(e,h,k);s.exposeAction(t,R),d&&s.addCase(R.fulfilled,d),v&&s.addCase(R.pending,v),S&&s.addCase(R.rejected,S),b&&s.addMatcher(R.settled,b),s.exposeCaseReducer(t,{fulfilled:d||Gy,pending:v||Gy,rejected:S||Gy,settled:b||Gy})}i(KH,"handleThunkCaseReducerDefinition");function Gy(){}i(Gy,"noop");var ZP="listener",eA="completed",tA="cancelled",A8=`task-${tA}`,L8=`task-${eA}`,M8=`${ZP}-${tA}`,O8=`${ZP}-${eA}`;var GH=i((e,t)=>{if(typeof e!="function")throw new Error(on(32))},"assertFunction");var{assign:R8}=Object;var Wx="listenerMiddleware";var YH=i(e=>{let{type:t,actionCreator:n,matcher:s,predicate:l,effect:h}=e;if(t)l=us(t).match;else if(n)t=n.type,l=n.match;else if(s)l=s;else if(!l)throw new Error(on(21));return GH(h,"options.listener"),{predicate:l,type:t,effect:h}},"getListenerEntryPropsFrom"),XH=Object.assign(e=>{let{type:t,predicate:n,effect:s}=YH(e);return{id:QP(),effect:s,type:t,predicate:n,pending:new Set,unsubscribe:i(()=>{throw new Error(on(22))},"unsubscribe")}},{withTypes:i(()=>XH,"withTypes")});var QH=Object.assign(us(`${Wx}/add`),{withTypes:i(()=>QH,"withTypes")}),D8=us(`${Wx}/removeAll`),JH=Object.assign(us(`${Wx}/remove`),{withTypes:i(()=>JH,"withTypes")});var I8=Symbol.for("rtk-state-proxy-original");function on(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}i(on,"formatProdErrorMessage");var ZH={tab:"request",contentViewFor:{}},eB=nr({name:"ui/flow",initialState:ZH,reducers:{selectTab(e,t){e.tab=t.payload},setContentViewFor(e,t){e.contentViewFor[t.payload.messageId]=t.payload.contentView}}}),{actions:tB,reducer:rB}=eB,{selectTab:vf,setContentViewFor:Yy}=tB,rA=rB;var nB=de(Am()),iB=de(be());window.React=iB;var Xy=i(function(e){if(e===0)return"0";let t=["b","kb","mb","gb","tb"],n=0;for(;ne);n++);let s;return e%Math.pow(1024,n)===0?s=0:s=1,(e/Math.pow(1024,n)).toFixed(s)+t[n]},"formatSize"),Qy=i(function(e){let t=e,n=["ms","s","min","h"],s=[1e3,60,60],l=0;for(;Math.abs(t)>=s[l]&&lxt(e,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),...n});xt.post=(e,t,n={})=>xt(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),...n});async function yf(e,...t){return await(await xt(`/commands/${e}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({arguments:t})})).json()}i(yf,"runCommand");async function nA(e){try{await navigator.clipboard.write([new ClipboardItem({"text/plain":e})]);return}catch(s){console.warn(s)}let t=await e;try{await navigator.clipboard.writeText(t);return}catch(s){console.warn(s)}let n=document.createElement("textarea");n.value=t,n.style.position="absolute",n.style.opacity="0",document.body.appendChild(n);try{if(n.focus(),n.select(),!document.execCommand("copy"))throw"failed to copy"}catch{alert(t)}finally{n.remove()}}i(nA,"copyToClipboard");function Lm(e,t){let n=e.lastIndexOf(t);if(n===-1)return["",e];let s=e.slice(0,n),l=e.slice(n+t.length);return[s,l]}i(Lm,"rpartition");function Jy(e,t){let n=e.indexOf(t);if(n===-1)return[e,""];let s=e.slice(0,n),l=e.slice(n+t.length);return[s,l]}i(Jy,"partition");var Rm={};wb(Rm,{ADD:()=>Yx,RECEIVE:()=>Jx,REMOVE:()=>Qx,SET_FILTER:()=>Kx,SET_SORT:()=>Gx,UPDATE:()=>Xx,add:()=>aB,defaultState:()=>cp,receive:()=>cB,reduce:()=>Vu,remove:()=>uB,setFilter:()=>Mm,setSort:()=>Zx,update:()=>lB});var jx=de(iA());var Kx="LIST_SET_FILTER",Gx="LIST_SET_SORT",Yx="LIST_ADD",Xx="LIST_UPDATE",Qx="LIST_REMOVE",Jx="LIST_RECEIVE",cp={byId:{},list:[],listIndex:{},view:[],viewIndex:{}};function Vu(e=cp,t){let{byId:n,list:s,listIndex:l,view:h,viewIndex:d}=e;switch(t.type){case Kx:h=(0,jx.default)(s.filter(t.filter),t.sort),d={},h.forEach((v,S)=>{d[v.id]=S});break;case Gx:h=(0,jx.default)([...h],t.sort),d={},h.forEach((v,S)=>{d[v.id]=S});break;case Yx:if(t.item.id in n)break;n={...n,[t.item.id]:t.item},l={...l,[t.item.id]:s.length},s=[...s,t.item],t.filter(t.item)&&({view:h,viewIndex:d}=oA(e,t.item,t.sort));break;case Xx:{n={...n,[t.item.id]:t.item},s=[...s],s[l[t.item.id]]=t.item;let v=t.item.id in d,S=t.filter(t.item);S&&!v?{view:h,viewIndex:d}=oA(e,t.item,t.sort):!S&&v?{data:h,dataIndex:d}=qx(h,d,t.item.id):S&&v&&({view:h,viewIndex:d}=fB(e,t.item,t.sort));break}case Qx:if(!(t.id in n))break;n={...n},delete n[t.id],{data:s,dataIndex:l}=qx(s,l,t.id),t.id in d&&({data:h,dataIndex:d}=qx(h,d,t.id));break;case Jx:s=t.list,l={},n={},s.forEach((v,S)=>{n[v.id]=v,l[v.id]=S}),h=s.filter(t.filter).sort(t.sort),d={},h.forEach((v,S)=>{d[v.id]=S});break}return{byId:n,list:s,listIndex:l,view:h,viewIndex:d}}i(Vu,"reduce");function Mm(e=Zy,t=Om){return{type:Kx,filter:e,sort:t}}i(Mm,"setFilter");function Zx(e=Om){return{type:Gx,sort:e}}i(Zx,"setSort");function aB(e,t=Zy,n=Om){return{type:Yx,item:e,filter:t,sort:n}}i(aB,"add");function lB(e,t=Zy,n=Om){return{type:Xx,item:e,filter:t,sort:n}}i(lB,"update");function uB(e){return{type:Qx,id:e}}i(uB,"remove");function cB(e,t=Zy,n=Om){return{type:Jx,list:e,filter:t,sort:n}}i(cB,"receive");function oA(e,t,n){let s=dB(e.view,t,n),l=[...e.view],h={...e.viewIndex};l.splice(s,0,t);for(let d=l.length-1;d>=s;d--)h[l[d].id]=d;return{view:l,viewIndex:h}}i(oA,"sortedInsert");function qx(e,t,n){let s=t[n],l=[...e],h={...t};delete h[n],l.splice(s,1);for(let d=l.length-1;d>=s;d--)h[l[d].id]=d;return{data:l,dataIndex:h}}i(qx,"removeData");function fB(e,t,n){let s=[...e.view],l={...e.viewIndex},h=l[t.id];for(s[h]=t;h+10;)s[h]=s[h+1],s[h+1]=t,l[t.id]=h+1,l[s[h].id]=h,++h;for(;h>0&&n(s[h],s[h-1])<0;)s[h]=s[h-1],s[h-1]=t,l[t.id]=h-1,l[s[h].id]=h,--h;return{view:s,viewIndex:l}}i(fB,"sortedUpdate");function dB(e,t,n){let s=0,l=e.length;for(;s>>1;n(t,e[h])>=0?s=h+1:l=h}return s}i(dB,"sortedIndex");function Zy(){return!0}i(Zy,"defaultFilter");function Om(e,t){return 0}i(Om,"defaultSort");var sA={http:80,https:443},Rn=class e{static{i(this,"MessageUtils")}static getContentType(t){let n=e.get_first_header(t,/^Content-Type$/i);if(n)return n.split(";")[0].trim()}static get_first_header(t,n){let s=t;s._headerLookups||Object.defineProperty(s,"_headerLookups",{value:{},configurable:!1,enumerable:!1,writable:!1});let l=n.toString();if(!(l in s._headerLookups)){let h;for(let d=0;d{switch(e.type){case"http":{let t=e.request.contentLength||0;return e.response&&(t+=e.response.contentLength||0),e.websocket&&(t+=e.websocket.messages_meta.contentLength||0),t}case"tcp":case"udp":return e.messages_meta.contentLength||0;case"dns":return e.response?.size??0}},"getTotalSize"),e0=i(e=>e.type==="http"&&!e.websocket,"canReplay"),iC=i(e=>{if(e.type!=="http")return e.client_conn.tls_version==="QUICv1"?"resource-icon-quic":`resource-icon-${e.type}`;if(e.websocket)return"resource-icon-websocket";if(!e.response)return"resource-icon-plain";let t=vl.getContentType(e.response)||"";return e.response.status_code===304?"resource-icon-not-modified":300<=e.response.status_code&&e.response.status_code<400?"resource-icon-redirect":t.indexOf("image")>=0?"resource-icon-image":t.indexOf("javascript")>=0?"resource-icon-js":t.indexOf("css")>=0?"resource-icon-css":t.indexOf("html")>=0?"resource-icon-document":"resource-icon-plain"},"getIcon"),oC=i(e=>{switch(e.type){case"http":return zs.pretty_url(e.request);case"tcp":case"udp":return`${e.client_conn.peername.join(":")} \u2194 ${e.server_conn?.address?.join(":")}`;case"dns":return`${e.request.questions.map(t=>`${t.name} ${t.type}`).join(", ")} = ${(e.response?.answers.map(t=>t.data).join(", ")??"...")||"?"}`}},"mainPath"),sC=i(e=>{switch(e.type){case"http":return e.response?.status_code;case"dns":return e.response?.response_code;default:return}},"statusCode"),aC=i(e=>{switch(e.type){case"http":return e.websocket?e.client_conn.tls_established?"WSS":"WS":e.request.method;case"dns":return e.request.op_code;default:return e.type.toUpperCase()}},"getMethod"),lC=i(e=>{switch(e.type){case"http":return e.request.http_version;default:return""}},"getVersion"),aA={tls:i(e=>e.type==="http"&&e.request.scheme,"tls"),icon:iC,index:i(()=>0,"index"),path:oC,method:aC,version:lC,status:sC,size:nC,time:i(e=>{let t=Dm(e),n=rC(e);return t&&n&&n-t},"time"),timestamp:Dm,quickactions:i(()=>0,"quickactions"),comment:i(e=>e.comment,"comment")};var wf=function(){"use strict";function e(s,l){function h(){this.constructor=s}i(h,"ctor"),h.prototype=l.prototype,s.prototype=new h}i(e,"peg$subclass");function t(s,l,h,d){this.message=s,this.expected=l,this.found=h,this.location=d,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,t)}i(t,"peg$SyntaxError"),e(t,Error);function n(s){var l=arguments.length>1?arguments[1]:{},h=this,d={},v={start:vi},S=vi,b={type:"other",description:"filter expression"},k=i(function(w){return w},"peg$c1"),R={type:"other",description:"whitespace"},I=/^[ \t\n\r]/,z={type:"class",value:"[ \\t\\n\\r]",description:"[ \\t\\n\\r]"},j={type:"other",description:"control character"},Y=/^[|&!()~"]/,ne={type:"class",value:'[|&!()~"]',description:'[|&!()~"]'},F={type:"other",description:"optional whitespace"},L="|",D={type:"literal",value:"|",description:'"|"'},q=i(function(w,N){return Sc(w,N)},"peg$c11"),te="&",Z={type:"literal",value:"&",description:'"&"'},oe=i(function(w,N){return Qf(w,N)},"peg$c14"),he="!",Re={type:"literal",value:"!",description:'"!"'},Ee=i(function(w){return Qs(w)},"peg$c17"),Ye="(",tt={type:"literal",value:"(",description:'"("'},xe=")",Xe={type:"literal",value:")",description:'")"'},je=i(function(w){return Js(w)},"peg$c22"),Qe="~all",ot={type:"literal",value:"~all",description:'"~all"'},It=i(function(){return Jf},"peg$c25"),Pt="~a",fn={type:"literal",value:"~a",description:'"~a"'},dn=i(function(){return xc},"peg$c28"),vr="~b",Ut={type:"literal",value:"~b",description:'"~b"'},yr=i(function(w){return Uo(w)},"peg$c31"),wr="~bq",Gt={type:"literal",value:"~bq",description:'"~bq"'},Ft=i(function(w){return Kt(w)},"peg$c34"),se="~bs",We={type:"literal",value:"~bs",description:'"~bs"'},Yr=i(function(w){return Yp(w)},"peg$c37"),Zt="~c",st={type:"literal",value:"~c",description:'"~c"'},Fe=i(function(w){return Cc(w)},"peg$c40"),Fn="~comment",bn={type:"literal",value:"~comment",description:'"~comment"'},no=i(function(w){return Zs(w)},"peg$c43"),Bo="~d",lt={type:"literal",value:"~d",description:'"~d"'},Sr=i(function(w){return _c(w)},"peg$c46"),dr="~dns",pt={type:"literal",value:"~dns",description:'"~dns"'},io=i(function(){return Ba},"peg$c49"),Hn="~dst",Mi={type:"literal",value:"~dst",description:'"~dst"'},Xr=i(function(w){return ed(w)},"peg$c52"),Qr="~e",oo={type:"literal",value:"~e",description:'"~e"'},hi=i(function(){return Ul},"peg$c55"),Bn="~h",so={type:"literal",value:"~h",description:'"~h"'},bl=i(function(w){return $l(w)},"peg$c58"),X="~hq",ee={type:"literal",value:"~hq",description:'"~hq"'},Ce=i(function(w){return Ec(w)},"peg$c61"),Me="~hs",Tl={type:"literal",value:"~hs",description:'"~hs"'},ze=i(function(w){return Xp(w)},"peg$c64"),Jr="~http",Yt={type:"literal",value:"~http",description:'"~http"'},Mt=i(function(){return Vl},"peg$c67"),At="~marked",Na={type:"literal",value:"~marked",description:'"~marked"'},pn=i(function(){return mn},"peg$c70"),zn="~marker",Nr={type:"literal",value:"~marker",description:'"~marker"'},gs=i(function(w){return bc(w)},"peg$c73"),Tn="~m",Pa={type:"literal",value:"~m",description:'"~m"'},Aa=i(function(w){return co(w)},"peg$c76"),nc="~q",ic={type:"literal",value:"~q",description:'"~q"'},oc=i(function(){return yi},"peg$c79"),$f="~replayq",sc={type:"literal",value:"~replayq",description:'"~replayq"'},Hp=i(function(){return ea},"peg$c82"),kl="~replays",Bp={type:"literal",value:"~replays",description:'"~replays"'},zp=i(function(){return ql},"peg$c85"),Nl="~replay",Vf={type:"literal",value:"~replay",description:'"~replay"'},ac=i(function(){return Tc},"peg$c88"),vs="~src",Wp={type:"literal",value:"~src",description:'"~src"'},Up=i(function(w){return Fi(w)},"peg$c91"),La="~s",lc={type:"literal",value:"~s",description:'"~s"'},ao=i(function(){return $o},"peg$c94"),qf="~tcp",Oi={type:"literal",value:"~tcp",description:'"~tcp"'},uc=i(function(){return jl},"peg$c97"),cc="~udp",sr={type:"literal",value:"~udp",description:'"~udp"'},Ae=i(function(){return xs},"peg$c100"),lo="~tq",Pl={type:"literal",value:"~tq",description:'"~tq"'},Ri=i(function(w){return td(w)},"peg$c103"),vt="~ts",ys={type:"literal",value:"~ts",description:'"~ts"'},Ma=i(function(w){return Qp(w)},"peg$c106"),Oa="~t",ce={type:"literal",value:"~t",description:'"~t"'},Ve=i(function(w){return Kl(w)},"peg$c109"),qs="~u",fc={type:"literal",value:"~u",description:'"~u"'},js=i(function(w){return Gl(w)},"peg$c112"),zo="~websocket",dc={type:"literal",value:"~websocket",description:'"~websocket"'},qe=i(function(){return kn},"peg$c115"),jf={type:"other",description:"integer"},Al=/^['"]/,ws={type:"class",value:`['"]`,description:`['"]`},mi=/^[0-9]/,Ll={type:"class",value:"[0-9]",description:"[0-9]"},Ml=i(function(w){return parseInt(w.join(""),10)},"peg$c121"),Ss={type:"other",description:"string"},uo='"',Ol={type:"literal",value:'"',description:'"\\""'},Ks=i(function(w){return w.join("")},"peg$c125"),pc="'",Rl={type:"literal",value:"'",description:`"'"`},hc=/^["\\]/,mc={type:"class",value:'["\\\\]',description:'["\\\\]'},Dl={type:"any",description:"any character"},Ra=i(function(w){return w},"peg$c131"),gc="\\",Di={type:"literal",value:"\\",description:'"\\\\"'},Kf=/^['\\]/,$p={type:"class",value:"['\\\\]",description:"['\\\\]"},Il=/^['"\\]/,Da={type:"class",value:`['"\\\\]`,description:`['"\\\\]`},Vp="n",vc={type:"literal",value:"n",description:'"n"'},qp=i(function(){return` +`),st}Dy(()=>{Yt.current=void 0,Ut.current=void 0,dn.current=We});let Yr=Tt.useMemo(()=>Tt.createElement(ne,{...We,ref:Re}),[Re,ne,We]);return Tt.useMemo(()=>j?Tt.createElement(Ye.Provider,{value:fn},Yr):Yr,[Ye,Yr,fn])}i(q,"ConnectFunction");let Z=Tt.memo(q);if(Z.WrappedComponent=ne,Z.displayName=q.displayName=L,S){let he=Tt.forwardRef(i(function(Ee,Ye){return Tt.createElement(Z,{...Ee,reactReduxForwardedRef:Ye})},"forwardConnectRef"));return he.displayName=L,he.WrappedComponent=ne,Cx(he,ne)}return Cx(Z,ne)},"wrapWithConnect")}i(G4,"connect");var Uu=G4;function Y4({store:e,context:t,children:n,serverState:s,stabilityCheck:l="once",identityFunctionCheck:h="once"}){let d=Tt.useMemo(()=>{let b=yA(e);return{store:e,subscription:b,getServerState:s?()=>s:void 0,stabilityCheck:l,identityFunctionCheck:h}},[e,s,l,h]),v=Tt.useMemo(()=>e.getState(),[e]);Dy(()=>{let{subscription:b}=d;return b.onStateChange=b.notifyNestedSubs,b.trySubscribe(),v!==e.getState()&&b.notifyNestedSubs(),()=>{b.tryUnsubscribe(),b.onStateChange=void 0}},[d,v]);let S=t||gl;return Tt.createElement(S.Provider,{value:d},n)}i(Y4,"Provider");var xA=Y4;function CA(e=gl){let t=e===gl?pA:_x(e),n=i(()=>{let{store:s}=t();return s},"useStore2");return Object.assign(n,{withTypes:i(()=>n,"withTypes")}),n}i(CA,"createStoreHook");var X4=CA();function Q4(e=gl){let t=e===gl?X4:CA(e),n=i(()=>t().dispatch,"useDispatch2");return Object.assign(n,{withTypes:i(()=>n,"withTypes")}),n}i(Q4,"createDispatchHook");var _A=Q4();i4(fA.useSyncExternalStoreWithSelector);U4(cA.useSyncExternalStore);var Jn=de(be());function Kn(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}i(Kn,"formatProdErrorMessage");var J4=typeof Symbol=="function"&&Symbol.observable||"@@observable",EA=J4,Tx=i(()=>Math.random().toString(36).substring(7).split("").join("."),"randomString"),Z4={INIT:`@@redux/INIT${Tx()}`,REPLACE:`@@redux/REPLACE${Tx()}`,PROBE_UNKNOWN_ACTION:i(()=>`@@redux/PROBE_UNKNOWN_ACTION${Tx()}`,"PROBE_UNKNOWN_ACTION")},Iy=Z4;function Fy(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}i(Fy,"isPlainObject");function kx(e,t,n){if(typeof e!="function")throw new Error(Kn(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Kn(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Kn(1));return n(kx)(e,t)}let s=e,l=t,h=new Map,d=h,v=0,S=!1;function b(){d===h&&(d=new Map,h.forEach((ne,F)=>{d.set(F,ne)}))}i(b,"ensureCanMutateNextListeners");function k(){if(S)throw new Error(Kn(3));return l}i(k,"getState");function R(ne){if(typeof ne!="function")throw new Error(Kn(4));if(S)throw new Error(Kn(5));let F=!0;b();let L=v++;return d.set(L,ne),i(function(){if(F){if(S)throw new Error(Kn(6));F=!1,b(),d.delete(L),h=null}},"unsubscribe")}i(R,"subscribe");function I(ne){if(!Fy(ne))throw new Error(Kn(7));if(typeof ne.type>"u")throw new Error(Kn(8));if(typeof ne.type!="string")throw new Error(Kn(17));if(S)throw new Error(Kn(9));try{S=!0,l=s(l,ne)}finally{S=!1}return(h=d).forEach(L=>{L()}),ne}i(I,"dispatch");function z(ne){if(typeof ne!="function")throw new Error(Kn(10));s=ne,I({type:Iy.REPLACE})}i(z,"replaceReducer");function j(){let ne=R;return{subscribe(F){if(typeof F!="object"||F===null)throw new Error(Kn(11));function L(){let q=F;q.next&&q.next(k())}return i(L,"observeState"),L(),{unsubscribe:ne(L)}},[EA](){return this}}}return i(j,"observable"),I({type:Iy.INIT}),{dispatch:I,subscribe:R,getState:k,replaceReducer:z,[EA]:j}}i(kx,"createStore");function eH(e){Object.keys(e).forEach(t=>{let n=e[t];if(typeof n(void 0,{type:Iy.INIT})>"u")throw new Error(Kn(12));if(typeof n(void 0,{type:Iy.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Kn(13))})}i(eH,"assertReducerShape");function sp(e){let t=Object.keys(e),n={};for(let d=0;d"u"){let ne=S&&S.type;throw new Error(Kn(14))}k[I]=Y,b=b||Y!==j}return b=b||s.length!==Object.keys(v).length,b?k:v},"combination")}i(sp,"combineReducers");function ap(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...s)=>t(n(...s)))}i(ap,"compose");function bA(...e){return t=>(n,s)=>{let l=t(n,s),h=i(()=>{throw new Error(Kn(15))},"dispatch"),d={getState:l.getState,dispatch:i((S,...b)=>h(S,...b),"dispatch")},v=e.map(S=>S(d));return h=ap(...v)(l.dispatch),{...l,dispatch:h}}}i(bA,"applyMiddleware");function TA(e){return Fy(e)&&"type"in e&&typeof e.type=="string"}i(TA,"isAction");var MA=Symbol.for("immer-nothing"),kA=Symbol.for("immer-draftable"),Oo=Symbol.for("immer-state");function Hs(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}i(Hs,"die");var lp=Object.getPrototypeOf;function _a(e){return!!e&&!!e[Oo]}i(_a,"isDraft");function Bs(e){return e?OA(e)||Array.isArray(e)||!!e[kA]||!!e.constructor?.[kA]||Uy(e)||$y(e):!1}i(Bs,"isDraftable");var tH=Object.prototype.constructor.toString();function OA(e){if(!e||typeof e!="object")return!1;let t=lp(e);if(t===null)return!0;let n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===tH}i(OA,"isPlainObject");function Hy(e,t){Wy(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,s)=>t(s,n,e))}i(Hy,"each");function Wy(e){let t=e[Oo];return t?t.type_:Array.isArray(e)?1:Uy(e)?2:$y(e)?3:0}i(Wy,"getArchtype");function Px(e,t){return Wy(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}i(Px,"has");function RA(e,t,n){let s=Wy(e);s===2?e.set(t,n):s===3?e.add(n):e[t]=n}i(RA,"set");function rH(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}i(rH,"is");function Uy(e){return e instanceof Map}i(Uy,"isMap");function $y(e){return e instanceof Set}i($y,"isSet");function mf(e){return e.copy_||e.base_}i(mf,"latest");function Lx(e,t){if(Uy(e))return new Map(e);if($y(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let n=OA(e);if(t===!0||t==="class_only"&&!n){let s=Object.getOwnPropertyDescriptors(e);delete s[Oo];let l=Reflect.ownKeys(s);for(let h=0;h1&&(e.set=e.add=e.clear=e.delete=nH),Object.freeze(e),t&&Object.entries(e).forEach(([n,s])=>Ix(s,!0))),e}i(Ix,"freeze");function nH(){Hs(2)}i(nH,"dontMutateFrozenCollections");function Vy(e){return Object.isFrozen(e)}i(Vy,"isFrozen");var iH={};function gf(e){let t=iH[e];return t||Hs(0,e),t}i(gf,"getPlugin");var bm;function DA(){return bm}i(DA,"getCurrentScope");function oH(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}i(oH,"createScope");function NA(e,t){t&&(gf("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}i(NA,"usePatchesInScope");function Mx(e){Ox(e),e.drafts_.forEach(sH),e.drafts_=null}i(Mx,"revokeScope");function Ox(e){e===bm&&(bm=e.parent_)}i(Ox,"leaveScope");function AA(e){return bm=oH(bm,e)}i(AA,"enterScope");function sH(e){let t=e[Oo];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}i(sH,"revokeDraft");function PA(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];return e!==void 0&&e!==n?(n[Oo].modified_&&(Mx(t),Hs(4)),Bs(e)&&(e=By(t,e),t.parent_||zy(t,e)),t.patches_&&gf("Patches").generateReplacementPatches_(n[Oo].base_,e,t.patches_,t.inversePatches_)):e=By(t,n,[]),Mx(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==MA?e:void 0}i(PA,"processResult");function By(e,t,n){if(Vy(t))return t;let s=t[Oo];if(!s)return Hy(t,(l,h)=>LA(e,s,t,l,h,n)),t;if(s.scope_!==e)return t;if(!s.modified_)return zy(e,s.base_,!0),s.base_;if(!s.finalized_){s.finalized_=!0,s.scope_.unfinalizedDrafts_--;let l=s.copy_,h=l,d=!1;s.type_===3&&(h=new Set(l),l.clear(),d=!0),Hy(h,(v,S)=>LA(e,s,l,v,S,n,d)),zy(e,l,!1),n&&e.patches_&&gf("Patches").generatePatches_(s,n,e.patches_,e.inversePatches_)}return s.copy_}i(By,"finalize");function LA(e,t,n,s,l,h,d){if(_a(l)){let v=h&&t&&t.type_!==3&&!Px(t.assigned_,s)?h.concat(s):void 0,S=By(e,l,v);if(RA(n,s,S),_a(S))e.canAutoFreeze_=!1;else return}else d&&n.add(l);if(Bs(l)&&!Vy(l)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;By(e,l),(!t||!t.scope_.parent_)&&typeof s!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,s)&&zy(e,l)}}i(LA,"finalizeProperty");function zy(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Ix(t,n)}i(zy,"maybeFreeze");function aH(e,t){let n=Array.isArray(e),s={type_:n?1:0,scope_:t?t.scope_:DA(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},l=s,h=Fx;n&&(l=[s],h=Tm);let{revoke:d,proxy:v}=Proxy.revocable(l,h);return s.draft_=v,s.revoke_=d,v}i(aH,"createProxyProxy");var Fx={get(e,t){if(t===Oo)return e;let n=mf(e);if(!Px(n,t))return lH(e,n,t);let s=n[t];return e.finalized_||!Bs(s)?s:s===Nx(e.base_,t)?(Ax(e),e.copy_[t]=Dx(s,e)):s},has(e,t){return t in mf(e)},ownKeys(e){return Reflect.ownKeys(mf(e))},set(e,t,n){let s=IA(mf(e),t);if(s?.set)return s.set.call(e.draft_,n),!0;if(!e.modified_){let l=Nx(mf(e),t),h=l?.[Oo];if(h&&h.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(rH(n,l)&&(n!==void 0||Px(e.base_,t)))return!0;Ax(e),Rx(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Nx(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Ax(e),Rx(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=mf(e),s=Reflect.getOwnPropertyDescriptor(n,t);return s&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:s.enumerable,value:n[t]}},defineProperty(){Hs(11)},getPrototypeOf(e){return lp(e.base_)},setPrototypeOf(){Hs(12)}},Tm={};Hy(Fx,(e,t)=>{Tm[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Tm.deleteProperty=function(e,t){return Tm.set.call(this,e,t,void 0)};Tm.set=function(e,t,n){return Fx.set.call(this,e[0],t,n,e[0])};function Nx(e,t){let n=e[Oo];return(n?mf(n):e)[t]}i(Nx,"peek");function lH(e,t,n){let s=IA(t,n);return s?"value"in s?s.value:s.get?.call(e.draft_):void 0}i(lH,"readPropFromProto");function IA(e,t){if(!(t in e))return;let n=lp(e);for(;n;){let s=Object.getOwnPropertyDescriptor(n,t);if(s)return s;n=lp(n)}}i(IA,"getDescriptorFromProto");function Rx(e){e.modified_||(e.modified_=!0,e.parent_&&Rx(e.parent_))}i(Rx,"markChanged");function Ax(e){e.copy_||(e.copy_=Lx(e.base_,e.scope_.immer_.useStrictShallowCopy_))}i(Ax,"prepareCopy");var uH=class{static{i(this,"Immer2")}constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,s)=>{if(typeof t=="function"&&typeof n!="function"){let h=n;n=t;let d=this;return i(function(S=h,...b){return d.produce(S,k=>n.call(this,k,...b))},"curriedProduce")}typeof n!="function"&&Hs(6),s!==void 0&&typeof s!="function"&&Hs(7);let l;if(Bs(t)){let h=AA(this),d=Dx(t,void 0),v=!0;try{l=n(d),v=!1}finally{v?Mx(h):Ox(h)}return NA(h,s),PA(l,h)}else if(!t||typeof t!="object"){if(l=n(t),l===void 0&&(l=t),l===MA&&(l=void 0),this.autoFreeze_&&Ix(l,!0),s){let h=[],d=[];gf("Patches").generateReplacementPatches_(t,l,h,d),s(h,d)}return l}else Hs(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(d,...v)=>this.produceWithPatches(d,S=>t(S,...v));let s,l;return[this.produce(t,n,(d,v)=>{s=d,l=v}),s,l]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Bs(e)||Hs(8),_a(e)&&(e=Hx(e));let t=AA(this),n=Dx(e,void 0);return n[Oo].isManual_=!0,Ox(t),n}finishDraft(e,t){let n=e&&e[Oo];(!n||!n.isManual_)&&Hs(9);let{scope_:s}=n;return NA(s,t),PA(void 0,s)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let l=t[n];if(l.path.length===0&&l.op==="replace"){e=l.value;break}}n>-1&&(t=t.slice(n+1));let s=gf("Patches").applyPatches_;return _a(e)?s(e,t):this.produce(e,l=>s(l,t))}};function Dx(e,t){let n=Uy(e)?gf("MapSet").proxyMap_(e,t):$y(e)?gf("MapSet").proxySet_(e,t):aH(e,t);return(t?t.scope_:DA()).drafts_.push(n),n}i(Dx,"createProxy");function Hx(e){return _a(e)||Hs(10,e),FA(e)}i(Hx,"current");function FA(e){if(!Bs(e)||Vy(e))return e;let t=e[Oo],n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Lx(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Lx(e,!0);return Hy(n,(s,l)=>{RA(n,s,FA(l))}),t&&(t.finalized_=!1),n}i(FA,"currentImpl");var Ro=new uH,qy=Ro.produce,nU=Ro.produceWithPatches.bind(Ro),iU=Ro.setAutoFreeze.bind(Ro),oU=Ro.setUseStrictShallowCopy.bind(Ro),sU=Ro.applyPatches.bind(Ro),aU=Ro.createDraft.bind(Ro),lU=Ro.finishDraft.bind(Ro);function cH(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}i(cH,"assertIsFunction");function fH(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}i(fH,"assertIsObject");function dH(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){let n=e.map(s=>typeof s=="function"?`function ${s.name||"unnamed"}()`:typeof s).join(", ");throw new TypeError(`${t}[${n}]`)}}i(dH,"assertIsArrayOfFunctions");var HA=i(e=>Array.isArray(e)?e:[e],"ensureIsArray");function pH(e){let t=Array.isArray(e[0])?e[0]:e;return dH(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}i(pH,"getDependencies");function hH(e,t){let n=[],{length:s}=e;for(let l=0;l{n=jy(),d.resetResultsCount()},d.resultsCount=()=>h,d.resetResultsCount=()=>{h=0},d}i(Ky,"weakMapMemoize");function Bx(e,...t){let n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,s=i((...l)=>{let h=0,d=0,v,S={},b=l.pop();typeof b=="object"&&(S=b,b=l.pop()),cH(b,`createSelector expects an output function after the inputs, but received: [${typeof b}]`);let k={...n,...S},{memoize:R,memoizeOptions:I=[],argsMemoize:z=Ky,argsMemoizeOptions:j=[],devModeChecks:Y={}}=k,ne=HA(I),F=HA(j),L=pH(l),D=R(i(function(){return h++,b.apply(null,arguments)},"recomputationWrapper"),...ne),q=!0,te=z(i(function(){d++;let oe=hH(L,arguments);return v=D.apply(null,oe),v},"dependenciesChecker"),...F);return Object.assign(te,{resultFunc:b,memoizedResultFunc:D,dependencies:L,dependencyRecomputations:i(()=>d,"dependencyRecomputations"),resetDependencyRecomputations:i(()=>{d=0},"resetDependencyRecomputations"),lastResult:i(()=>v,"lastResult"),recomputations:i(()=>h,"recomputations"),resetRecomputations:i(()=>{h=0},"resetRecomputations"),memoize:R,argsMemoize:z})},"createSelector2");return Object.assign(s,{withTypes:i(()=>s,"withTypes")}),s}i(Bx,"createSelectorCreator");var yH=Bx(Ky),wH=Object.assign((e,t=yH)=>{fH(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let n=Object.keys(e),s=n.map(h=>e[h]);return t(s,(...h)=>h.reduce((d,v,S)=>(d[n[S]]=v,d),{}))},{withTypes:i(()=>wH,"withTypes")});function zA(e){return i(({dispatch:n,getState:s})=>l=>h=>typeof h=="function"?h(n,s,e):l(h),"middleware")}i(zA,"createThunkMiddleware");var WA=zA(),UA=zA;var SH=i((...e)=>{let t=Bx(...e),n=Object.assign((...s)=>{let l=t(...s),h=i((d,...v)=>l(_a(d)?Hx(d):d,...v),"wrappedSelector");return Object.assign(h,l),h},{withTypes:i(()=>n,"withTypes")});return n},"createDraftSafeSelectorCreator"),xU=SH(Ky),xH=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ap:ap.apply(null,arguments)},EU=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},CH=i(e=>e&&typeof e.match=="function","hasMatchFunction");function us(e,t){function n(...s){if(t){let l=t(...s);if(!l)throw new Error(on(0));return{type:e,payload:l.payload,..."meta"in l&&{meta:l.meta},..."error"in l&&{error:l.error}}}return{type:e,payload:s[0]}}return i(n,"actionCreator"),n.toString=()=>`${e}`,n.type=e,n.match=s=>TA(s)&&s.type===e,n}i(us,"createAction");var jA=class km extends Array{static{i(this,"_Tuple")}constructor(...t){super(...t),Object.setPrototypeOf(this,km.prototype)}static get[Symbol.species](){return km}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new km(...t[0].concat(this)):new km(...t.concat(this))}};function $A(e){return Bs(e)?qy(e,()=>{}):e}i($A,"freezeDraftable");function VA(e,t,n){if(e.has(t)){let l=e.get(t);return n.update&&(l=n.update(l,t,e),e.set(t,l)),l}if(!n.insert)throw new Error(on(10));let s=n.insert(t,e);return e.set(t,s),s}i(VA,"emplace");function _H(e){return typeof e=="boolean"}i(_H,"isBoolean");var EH=i(()=>i(function(t){let{thunk:n=!0,immutableCheck:s=!0,serializableCheck:l=!0,actionCreatorCheck:h=!0}=t??{},d=new jA;return n&&(_H(n)?d.push(WA):d.push(UA(n.extraArgument))),d},"getDefaultMiddleware"),"buildGetDefaultMiddleware"),bH="RTK_autoBatch";var KA=i(e=>t=>{setTimeout(t,e)},"createQueueWithTimer"),TH=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:KA(10),kH=i((e={type:"raf"})=>t=>(...n)=>{let s=t(...n),l=!0,h=!1,d=!1,v=new Set,S=e.type==="tick"?queueMicrotask:e.type==="raf"?TH:e.type==="callback"?e.queueNotification:KA(e.timeout),b=i(()=>{d=!1,h&&(h=!1,v.forEach(k=>k()))},"notifyListeners");return Object.assign({},s,{subscribe(k){let R=i(()=>l&&k(),"wrappedListener"),I=s.subscribe(R);return v.add(k),()=>{I(),v.delete(k)}},dispatch(k){try{return l=!k?.meta?.[bH],h=!l,h&&(d||(d=!0,S(b))),s.dispatch(k)}finally{l=!0}}})},"autoBatchEnhancer"),NH=i(e=>i(function(n){let{autoBatch:s=!0}=n??{},l=new jA(e);return s&&l.push(kH(typeof s=="object"?s:void 0)),l},"getDefaultEnhancers"),"buildGetDefaultEnhancers"),$u=!0;function GA(e){let t=EH(),{reducer:n=void 0,middleware:s,devTools:l=!0,preloadedState:h=void 0,enhancers:d=void 0}=e||{},v;if(typeof n=="function")v=n;else if(Fy(n))v=sp(n);else throw new Error(on(1));if(!$u&&s&&typeof s!="function")throw new Error(on(2));let S;if(typeof s=="function"){if(S=s(t),!$u&&!Array.isArray(S))throw new Error(on(3))}else S=t();if(!$u&&S.some(j=>typeof j!="function"))throw new Error(on(4));let b=ap;l&&(b=xH({trace:!$u,...typeof l=="object"&&l}));let k=bA(...S),R=NH(k);if(!$u&&d&&typeof d!="function")throw new Error(on(5));let I=typeof d=="function"?d(R):R();if(!$u&&!Array.isArray(I))throw new Error(on(6));if(!$u&&I.some(j=>typeof j!="function"))throw new Error(on(7));!$u&&S.length&&!I.includes(k)&&console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");let z=b(...I);return kx(v,h,z)}i(GA,"configureStore");function YA(e){let t={},n=[],s,l={addCase(h,d){let v=typeof h=="string"?h:h.type;if(!v)throw new Error(on(28));if(v in t)throw new Error(on(29));return t[v]=d,l},addMatcher(h,d){return n.push({matcher:h,reducer:d}),l},addDefaultCase(h){return s=h,l}};return e(l),[t,n,s]}i(YA,"executeReducerBuilderCallback");function AH(e){return typeof e=="function"}i(AH,"isStateFunction");function PH(e,t){let[n,s,l]=YA(t),h;if(AH(e))h=i(()=>$A(e()),"getInitialState");else{let v=$A(e);h=i(()=>v,"getInitialState")}function d(v=h(),S){let b=[n[S.type],...s.filter(({matcher:k})=>k(S)).map(({reducer:k})=>k)];return b.filter(k=>!!k).length===0&&(b=[l]),b.reduce((k,R)=>{if(R)if(_a(k)){let z=R(k,S);return z===void 0?k:z}else{if(Bs(k))return qy(k,I=>R(I,S));{let I=R(k,S);if(I===void 0){if(k===null)return k;throw new Error(on(9))}return I}}return k},v)}return i(d,"reducer"),d.getInitialState=h,d}i(PH,"createReducer");var LH="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",XA=i((e=21)=>{let t="",n=e;for(;n--;)t+=LH[Math.random()*64|0];return t},"nanoid"),MH=i((e,t)=>CH(e)?e.match(t):e(t),"matches");function OH(...e){return t=>e.some(n=>MH(n,t))}i(OH,"isAnyOf");var RH=["name","message","stack","code"],zx=class{static{i(this,"RejectWithValue")}constructor(e,t){this.payload=e,this.meta=t}_type},qA=class{static{i(this,"FulfillWithMeta")}constructor(e,t){this.payload=e,this.meta=t}_type},DH=i(e=>{if(typeof e=="object"&&e!==null){let t={};for(let n of RH)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},"miniSerializeError"),Nm=(()=>{function e(t,n,s){let l=us(t+"/fulfilled",(S,b,k,R)=>({payload:S,meta:{...R||{},arg:k,requestId:b,requestStatus:"fulfilled"}})),h=us(t+"/pending",(S,b,k)=>({payload:void 0,meta:{...k||{},arg:b,requestId:S,requestStatus:"pending"}})),d=us(t+"/rejected",(S,b,k,R,I)=>({payload:R,error:(s&&s.serializeError||DH)(S||"Rejected"),meta:{...I||{},arg:k,requestId:b,rejectedWithValue:!!R,requestStatus:"rejected",aborted:S?.name==="AbortError",condition:S?.name==="ConditionError"}}));function v(S){return(b,k,R)=>{let I=s?.idGenerator?s.idGenerator(S):XA(),z=new AbortController,j,Y;function ne(L){Y=L,z.abort()}i(ne,"abort");let F=async function(){let L;try{let q=s?.condition?.(S,{getState:k,extra:R});if(FH(q)&&(q=await q),q===!1||z.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let te=new Promise((Z,oe)=>{j=i(()=>{oe({name:"AbortError",message:Y||"Aborted"})},"abortHandler"),z.signal.addEventListener("abort",j)});b(h(I,S,s?.getPendingMeta?.({requestId:I,arg:S},{getState:k,extra:R}))),L=await Promise.race([te,Promise.resolve(n(S,{dispatch:b,getState:k,extra:R,requestId:I,signal:z.signal,abort:ne,rejectWithValue:i((Z,oe)=>new zx(Z,oe),"rejectWithValue"),fulfillWithValue:i((Z,oe)=>new qA(Z,oe),"fulfillWithValue")})).then(Z=>{if(Z instanceof zx)throw Z;return Z instanceof qA?l(Z.payload,I,S,Z.meta):l(Z,I,S)})])}catch(q){L=q instanceof zx?d(null,I,S,q.payload,q.meta):d(q,I,S)}finally{j&&z.signal.removeEventListener("abort",j)}return s&&!s.dispatchConditionRejection&&d.match(L)&&L.meta.condition||b(L),L}();return Object.assign(F,{abort:ne,requestId:I,arg:S,unwrap(){return F.then(IH)}})}}return i(v,"actionCreator"),Object.assign(v,{pending:h,rejected:d,fulfilled:l,settled:OH(d,l),typePrefix:t})}return i(e,"createAsyncThunk2"),e.withTypes=()=>e,e})();function IH(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}i(IH,"unwrapResult");function FH(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}i(FH,"isThenable");var QA=Symbol.for("rtk-slice-createasyncthunk"),AU={[QA]:Nm};function HH(e,t){return`${e}/${t}`}i(HH,"getType");function BH({creators:e}={}){let t=e?.asyncThunk?.[QA];return i(function(s){let{name:l,reducerPath:h=l}=s;if(!l)throw new Error(on(11));typeof process<"u";let d=(typeof s.reducers=="function"?s.reducers(WH()):s.reducers)||{},v=Object.keys(d),S={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},b={addCase(L,D){let q=typeof L=="string"?L:L.type;if(!q)throw new Error(on(12));if(q in S.sliceCaseReducersByType)throw new Error(on(13));return S.sliceCaseReducersByType[q]=D,b},addMatcher(L,D){return S.sliceMatchers.push({matcher:L,reducer:D}),b},exposeAction(L,D){return S.actionCreators[L]=D,b},exposeCaseReducer(L,D){return S.sliceCaseReducersByName[L]=D,b}};v.forEach(L=>{let D=d[L],q={reducerName:L,type:HH(l,L),createNotation:typeof s.reducers=="function"};$H(D)?qH(q,D,b,t):UH(q,D,b)});function k(){let[L={},D=[],q=void 0]=typeof s.extraReducers=="function"?YA(s.extraReducers):[s.extraReducers],te={...L,...S.sliceCaseReducersByType};return PH(s.initialState,Z=>{for(let oe in te)Z.addCase(oe,te[oe]);for(let oe of S.sliceMatchers)Z.addMatcher(oe.matcher,oe.reducer);for(let oe of D)Z.addMatcher(oe.matcher,oe.reducer);q&&Z.addDefaultCase(q)})}i(k,"buildReducer");let R=i(L=>L,"selectSelf"),I=new Map,z;function j(L,D){return z||(z=k()),z(L,D)}i(j,"reducer");function Y(){return z||(z=k()),z.getInitialState()}i(Y,"getInitialState");function ne(L,D=!1){function q(Z){let oe=Z[L];return typeof oe>"u"&&D&&(oe=Y()),oe}i(q,"selectSlice");function te(Z=R){let oe=VA(I,D,{insert:i(()=>new WeakMap,"insert")});return VA(oe,Z,{insert:i(()=>{let he={};for(let[Re,Ee]of Object.entries(s.selectors??{}))he[Re]=zH(Ee,Z,Y,D);return he},"insert")})}return i(te,"getSelectors"),{reducerPath:L,getSelectors:te,get selectors(){return te(q)},selectSlice:q}}i(ne,"makeSelectorProps");let F={name:l,reducer:j,actions:S.actionCreators,caseReducers:S.sliceCaseReducersByName,getInitialState:Y,...ne(h),injectInto(L,{reducerPath:D,...q}={}){let te=D??h;return L.inject({reducerPath:te,reducer:j},q),{...F,...ne(te,!0)}}};return F},"createSlice2")}i(BH,"buildCreateSlice");function zH(e,t,n,s){function l(h,...d){let v=t(h);return typeof v>"u"&&s&&(v=n()),e(v,...d)}return i(l,"wrapper"),l.unwrapped=e,l}i(zH,"wrapSelector");var Gt=BH();function WH(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return i(e,"asyncThunk"),e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}i(WH,"buildReducerCreators");function UH({type:e,reducerName:t,createNotation:n},s,l){let h,d;if("reducer"in s){if(n&&!VH(s))throw new Error(on(17));h=s.reducer,d=s.prepare}else h=s;l.addCase(e,h).exposeCaseReducer(t,h).exposeAction(t,d?us(e,d):us(e))}i(UH,"handleNormalReducerDefinition");function $H(e){return e._reducerDefinitionType==="asyncThunk"}i($H,"isAsyncThunkSliceReducerDefinition");function VH(e){return e._reducerDefinitionType==="reducerWithPrepare"}i(VH,"isCaseReducerWithPrepareDefinition");function qH({type:e,reducerName:t},n,s,l){if(!l)throw new Error(on(18));let{payloadCreator:h,fulfilled:d,pending:v,rejected:S,settled:b,options:k}=n,R=l(e,h,k);s.exposeAction(t,R),d&&s.addCase(R.fulfilled,d),v&&s.addCase(R.pending,v),S&&s.addCase(R.rejected,S),b&&s.addMatcher(R.settled,b),s.exposeCaseReducer(t,{fulfilled:d||Gy,pending:v||Gy,rejected:S||Gy,settled:b||Gy})}i(qH,"handleThunkCaseReducerDefinition");function Gy(){}i(Gy,"noop");var JA="listener",ZA="completed",eP="cancelled",PU=`task-${eP}`,LU=`task-${ZA}`,MU=`${JA}-${eP}`,OU=`${JA}-${ZA}`;var jH=i((e,t)=>{if(typeof e!="function")throw new Error(on(32))},"assertFunction");var{assign:RU}=Object;var Wx="listenerMiddleware";var KH=i(e=>{let{type:t,actionCreator:n,matcher:s,predicate:l,effect:h}=e;if(t)l=us(t).match;else if(n)t=n.type,l=n.match;else if(s)l=s;else if(!l)throw new Error(on(21));return jH(h,"options.listener"),{predicate:l,type:t,effect:h}},"getListenerEntryPropsFrom"),GH=Object.assign(e=>{let{type:t,predicate:n,effect:s}=KH(e);return{id:XA(),effect:s,type:t,predicate:n,pending:new Set,unsubscribe:i(()=>{throw new Error(on(22))},"unsubscribe")}},{withTypes:i(()=>GH,"withTypes")});var YH=Object.assign(us(`${Wx}/add`),{withTypes:i(()=>YH,"withTypes")}),DU=us(`${Wx}/removeAll`),XH=Object.assign(us(`${Wx}/remove`),{withTypes:i(()=>XH,"withTypes")});var IU=Symbol.for("rtk-state-proxy-original");function on(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}i(on,"formatProdErrorMessage");var QH={tab:"request",contentViewFor:{}},JH=Gt({name:"ui/flow",initialState:QH,reducers:{selectTab(e,t){e.tab=t.payload},setContentViewFor(e,t){e.contentViewFor[t.payload.messageId]=t.payload.contentView}}}),{actions:ZH,reducer:eB}=JH,{selectTab:vf,setContentViewFor:Yy}=ZH,tP=eB;var tB=de(Pm()),rB=de(be());window.React=rB;var Xy=i(function(e){if(e===0)return"0";let t=["b","kb","mb","gb","tb"],n=0;for(;ne);n++);let s;return e%Math.pow(1024,n)===0?s=0:s=1,(e/Math.pow(1024,n)).toFixed(s)+t[n]},"formatSize"),Qy=i(function(e){let t=e,n=["ms","s","min","h"],s=[1e3,60,60],l=0;for(;Math.abs(t)>=s[l]&&lxt(e,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),...n});xt.post=(e,t,n={})=>xt(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),...n});async function yf(e,...t){return await(await xt(`/commands/${e}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({arguments:t})})).json()}i(yf,"runCommand");async function rP(e){try{await navigator.clipboard.write([new ClipboardItem({"text/plain":e})]);return}catch(s){console.warn(s)}let t=await e;try{await navigator.clipboard.writeText(t);return}catch(s){console.warn(s)}let n=document.createElement("textarea");n.value=t,n.style.position="absolute",n.style.opacity="0",document.body.appendChild(n);try{if(n.focus(),n.select(),!document.execCommand("copy"))throw"failed to copy"}catch{alert(t)}finally{n.remove()}}i(rP,"copyToClipboard");function Lm(e,t){let n=e.lastIndexOf(t);if(n===-1)return["",e];let s=e.slice(0,n),l=e.slice(n+t.length);return[s,l]}i(Lm,"rpartition");function Jy(e,t){let n=e.indexOf(t);if(n===-1)return[e,""];let s=e.slice(0,n),l=e.slice(n+t.length);return[s,l]}i(Jy,"partition");var Rm={};yb(Rm,{ADD:()=>Yx,RECEIVE:()=>Jx,REMOVE:()=>Qx,SET_FILTER:()=>Kx,SET_SORT:()=>Gx,UPDATE:()=>Xx,add:()=>oB,defaultState:()=>cp,receive:()=>lB,reduce:()=>Vu,remove:()=>aB,setFilter:()=>Mm,setSort:()=>Zx,update:()=>sB});var jx=de(nP());var Kx="LIST_SET_FILTER",Gx="LIST_SET_SORT",Yx="LIST_ADD",Xx="LIST_UPDATE",Qx="LIST_REMOVE",Jx="LIST_RECEIVE",cp={byId:{},list:[],listIndex:{},view:[],viewIndex:{}};function Vu(e=cp,t){let{byId:n,list:s,listIndex:l,view:h,viewIndex:d}=e;switch(t.type){case Kx:h=(0,jx.default)(s.filter(t.filter),t.sort),d={},h.forEach((v,S)=>{d[v.id]=S});break;case Gx:h=(0,jx.default)([...h],t.sort),d={},h.forEach((v,S)=>{d[v.id]=S});break;case Yx:if(t.item.id in n)break;n={...n,[t.item.id]:t.item},l={...l,[t.item.id]:s.length},s=[...s,t.item],t.filter(t.item)&&({view:h,viewIndex:d}=iP(e,t.item,t.sort));break;case Xx:{n={...n,[t.item.id]:t.item},s=[...s],s[l[t.item.id]]=t.item;let v=t.item.id in d,S=t.filter(t.item);S&&!v?{view:h,viewIndex:d}=iP(e,t.item,t.sort):!S&&v?{data:h,dataIndex:d}=qx(h,d,t.item.id):S&&v&&({view:h,viewIndex:d}=uB(e,t.item,t.sort));break}case Qx:if(!(t.id in n))break;n={...n},delete n[t.id],{data:s,dataIndex:l}=qx(s,l,t.id),t.id in d&&({data:h,dataIndex:d}=qx(h,d,t.id));break;case Jx:s=t.list,l={},n={},s.forEach((v,S)=>{n[v.id]=v,l[v.id]=S}),h=s.filter(t.filter).sort(t.sort),d={},h.forEach((v,S)=>{d[v.id]=S});break}return{byId:n,list:s,listIndex:l,view:h,viewIndex:d}}i(Vu,"reduce");function Mm(e=Zy,t=Om){return{type:Kx,filter:e,sort:t}}i(Mm,"setFilter");function Zx(e=Om){return{type:Gx,sort:e}}i(Zx,"setSort");function oB(e,t=Zy,n=Om){return{type:Yx,item:e,filter:t,sort:n}}i(oB,"add");function sB(e,t=Zy,n=Om){return{type:Xx,item:e,filter:t,sort:n}}i(sB,"update");function aB(e){return{type:Qx,id:e}}i(aB,"remove");function lB(e,t=Zy,n=Om){return{type:Jx,list:e,filter:t,sort:n}}i(lB,"receive");function iP(e,t,n){let s=cB(e.view,t,n),l=[...e.view],h={...e.viewIndex};l.splice(s,0,t);for(let d=l.length-1;d>=s;d--)h[l[d].id]=d;return{view:l,viewIndex:h}}i(iP,"sortedInsert");function qx(e,t,n){let s=t[n],l=[...e],h={...t};delete h[n],l.splice(s,1);for(let d=l.length-1;d>=s;d--)h[l[d].id]=d;return{data:l,dataIndex:h}}i(qx,"removeData");function uB(e,t,n){let s=[...e.view],l={...e.viewIndex},h=l[t.id];for(s[h]=t;h+10;)s[h]=s[h+1],s[h+1]=t,l[t.id]=h+1,l[s[h].id]=h,++h;for(;h>0&&n(s[h],s[h-1])<0;)s[h]=s[h-1],s[h-1]=t,l[t.id]=h-1,l[s[h].id]=h,--h;return{view:s,viewIndex:l}}i(uB,"sortedUpdate");function cB(e,t,n){let s=0,l=e.length;for(;s>>1;n(t,e[h])>=0?s=h+1:l=h}return s}i(cB,"sortedIndex");function Zy(){return!0}i(Zy,"defaultFilter");function Om(e,t){return 0}i(Om,"defaultSort");var oP={http:80,https:443},Rn=class e{static{i(this,"MessageUtils")}static getContentType(t){let n=e.get_first_header(t,/^Content-Type$/i);if(n)return n.split(";")[0].trim()}static get_first_header(t,n){let s=t;s._headerLookups||Object.defineProperty(s,"_headerLookups",{value:{},configurable:!1,enumerable:!1,writable:!1});let l=n.toString();if(!(l in s._headerLookups)){let h;for(let d=0;d{switch(e.type){case"http":{let t=e.request.contentLength||0;return e.response&&(t+=e.response.contentLength||0),e.websocket&&(t+=e.websocket.messages_meta.contentLength||0),t}case"tcp":case"udp":return e.messages_meta.contentLength||0;case"dns":return e.response?.size??0}},"getTotalSize"),e0=i(e=>e.type==="http"&&!e.websocket,"canReplay"),iC=i(e=>{if(e.type!=="http")return e.client_conn.tls_version==="QUICv1"?"resource-icon-quic":`resource-icon-${e.type}`;if(e.websocket)return"resource-icon-websocket";if(!e.response)return"resource-icon-plain";let t=vl.getContentType(e.response)||"";return e.response.status_code===304?"resource-icon-not-modified":300<=e.response.status_code&&e.response.status_code<400?"resource-icon-redirect":t.indexOf("image")>=0?"resource-icon-image":t.indexOf("javascript")>=0?"resource-icon-js":t.indexOf("css")>=0?"resource-icon-css":t.indexOf("html")>=0?"resource-icon-document":"resource-icon-plain"},"getIcon"),oC=i(e=>{switch(e.type){case"http":return zs.pretty_url(e.request);case"tcp":case"udp":return`${e.client_conn.peername.join(":")} \u2194 ${e.server_conn?.address?.join(":")}`;case"dns":return`${e.request.questions.map(t=>`${t.name} ${t.type}`).join(", ")} = ${(e.response?.answers.map(t=>t.data).join(", ")??"...")||"?"}`}},"mainPath"),sC=i(e=>{switch(e.type){case"http":return e.response?.status_code;case"dns":return e.response?.response_code;default:return}},"statusCode"),aC=i(e=>{switch(e.type){case"http":return e.websocket?e.client_conn.tls_established?"WSS":"WS":e.request.method;case"dns":return e.request.op_code;default:return e.type.toUpperCase()}},"getMethod"),lC=i(e=>{switch(e.type){case"http":return e.request.http_version;default:return""}},"getVersion"),sP={tls:i(e=>e.type==="http"&&e.request.scheme,"tls"),icon:iC,index:i(()=>0,"index"),path:oC,method:aC,version:lC,status:sC,size:nC,time:i(e=>{let t=Dm(e),n=rC(e);return t&&n&&n-t},"time"),timestamp:Dm,quickactions:i(()=>0,"quickactions"),comment:i(e=>e.comment,"comment")};var wf=function(){"use strict";function e(s,l){function h(){this.constructor=s}i(h,"ctor"),h.prototype=l.prototype,s.prototype=new h}i(e,"peg$subclass");function t(s,l,h,d){this.message=s,this.expected=l,this.found=h,this.location=d,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,t)}i(t,"peg$SyntaxError"),e(t,Error);function n(s){var l=arguments.length>1?arguments[1]:{},h=this,d={},v={start:vi},S=vi,b={type:"other",description:"filter expression"},k=i(function(w){return w},"peg$c1"),R={type:"other",description:"whitespace"},I=/^[ \t\n\r]/,z={type:"class",value:"[ \\t\\n\\r]",description:"[ \\t\\n\\r]"},j={type:"other",description:"control character"},Y=/^[|&!()~"]/,ne={type:"class",value:'[|&!()~"]',description:'[|&!()~"]'},F={type:"other",description:"optional whitespace"},L="|",D={type:"literal",value:"|",description:'"|"'},q=i(function(w,N){return Sc(w,N)},"peg$c11"),te="&",Z={type:"literal",value:"&",description:'"&"'},oe=i(function(w,N){return Qf(w,N)},"peg$c14"),he="!",Re={type:"literal",value:"!",description:'"!"'},Ee=i(function(w){return Qs(w)},"peg$c17"),Ye="(",tt={type:"literal",value:"(",description:'"("'},xe=")",Xe={type:"literal",value:")",description:'")"'},je=i(function(w){return Js(w)},"peg$c22"),Qe="~all",ot={type:"literal",value:"~all",description:'"~all"'},It=i(function(){return Jf},"peg$c25"),At="~a",fn={type:"literal",value:"~a",description:'"~a"'},dn=i(function(){return xc},"peg$c28"),vr="~b",Ut={type:"literal",value:"~b",description:'"~b"'},yr=i(function(w){return Uo(w)},"peg$c31"),wr="~bq",Yt={type:"literal",value:"~bq",description:'"~bq"'},Ft=i(function(w){return Kt(w)},"peg$c34"),se="~bs",We={type:"literal",value:"~bs",description:'"~bs"'},Yr=i(function(w){return Yp(w)},"peg$c37"),er="~c",st={type:"literal",value:"~c",description:'"~c"'},Fe=i(function(w){return Cc(w)},"peg$c40"),Fn="~comment",bn={type:"literal",value:"~comment",description:'"~comment"'},no=i(function(w){return Zs(w)},"peg$c43"),Bo="~d",lt={type:"literal",value:"~d",description:'"~d"'},Sr=i(function(w){return _c(w)},"peg$c46"),dr="~dns",pt={type:"literal",value:"~dns",description:'"~dns"'},io=i(function(){return Ba},"peg$c49"),Hn="~dst",Mi={type:"literal",value:"~dst",description:'"~dst"'},Xr=i(function(w){return ed(w)},"peg$c52"),Qr="~e",oo={type:"literal",value:"~e",description:'"~e"'},hi=i(function(){return Ul},"peg$c55"),Bn="~h",so={type:"literal",value:"~h",description:'"~h"'},bl=i(function(w){return $l(w)},"peg$c58"),X="~hq",ee={type:"literal",value:"~hq",description:'"~hq"'},Ce=i(function(w){return Ec(w)},"peg$c61"),Me="~hs",Tl={type:"literal",value:"~hs",description:'"~hs"'},ze=i(function(w){return Xp(w)},"peg$c64"),Jr="~http",Xt={type:"literal",value:"~http",description:'"~http"'},Mt=i(function(){return Vl},"peg$c67"),Pt="~marked",Na={type:"literal",value:"~marked",description:'"~marked"'},pn=i(function(){return mn},"peg$c70"),zn="~marker",Nr={type:"literal",value:"~marker",description:'"~marker"'},gs=i(function(w){return bc(w)},"peg$c73"),Tn="~m",Aa={type:"literal",value:"~m",description:'"~m"'},Pa=i(function(w){return co(w)},"peg$c76"),nc="~q",ic={type:"literal",value:"~q",description:'"~q"'},oc=i(function(){return yi},"peg$c79"),$f="~replayq",sc={type:"literal",value:"~replayq",description:'"~replayq"'},Hp=i(function(){return ea},"peg$c82"),kl="~replays",Bp={type:"literal",value:"~replays",description:'"~replays"'},zp=i(function(){return ql},"peg$c85"),Nl="~replay",Vf={type:"literal",value:"~replay",description:'"~replay"'},ac=i(function(){return Tc},"peg$c88"),vs="~src",Wp={type:"literal",value:"~src",description:'"~src"'},Up=i(function(w){return Fi(w)},"peg$c91"),La="~s",lc={type:"literal",value:"~s",description:'"~s"'},ao=i(function(){return $o},"peg$c94"),qf="~tcp",Oi={type:"literal",value:"~tcp",description:'"~tcp"'},uc=i(function(){return jl},"peg$c97"),cc="~udp",sr={type:"literal",value:"~udp",description:'"~udp"'},Pe=i(function(){return xs},"peg$c100"),lo="~tq",Al={type:"literal",value:"~tq",description:'"~tq"'},Ri=i(function(w){return td(w)},"peg$c103"),vt="~ts",ys={type:"literal",value:"~ts",description:'"~ts"'},Ma=i(function(w){return Qp(w)},"peg$c106"),Oa="~t",ce={type:"literal",value:"~t",description:'"~t"'},Ve=i(function(w){return Kl(w)},"peg$c109"),qs="~u",fc={type:"literal",value:"~u",description:'"~u"'},js=i(function(w){return Gl(w)},"peg$c112"),zo="~websocket",dc={type:"literal",value:"~websocket",description:'"~websocket"'},qe=i(function(){return kn},"peg$c115"),jf={type:"other",description:"integer"},Pl=/^['"]/,ws={type:"class",value:`['"]`,description:`['"]`},mi=/^[0-9]/,Ll={type:"class",value:"[0-9]",description:"[0-9]"},Ml=i(function(w){return parseInt(w.join(""),10)},"peg$c121"),Ss={type:"other",description:"string"},uo='"',Ol={type:"literal",value:'"',description:'"\\""'},Ks=i(function(w){return w.join("")},"peg$c125"),pc="'",Rl={type:"literal",value:"'",description:`"'"`},hc=/^["\\]/,mc={type:"class",value:'["\\\\]',description:'["\\\\]'},Dl={type:"any",description:"any character"},Ra=i(function(w){return w},"peg$c131"),gc="\\",Di={type:"literal",value:"\\",description:'"\\\\"'},Kf=/^['\\]/,$p={type:"class",value:"['\\\\]",description:"['\\\\]"},Il=/^['"\\]/,Da={type:"class",value:`['"\\\\]`,description:`['"\\\\]`},Vp="n",vc={type:"literal",value:"n",description:'"n"'},qp=i(function(){return` `},"peg$c140"),jp="r",yc={type:"literal",value:"r",description:'"r"'},Gf=i(function(){return"\r"},"peg$c143"),Kp="t",Ht={type:"literal",value:"t",description:'"t"'},Ot=i(function(){return" "},"peg$c146"),M=0,De=0,Gs=[{line:1,column:1,seenCR:!1}],gi=0,Fl=[],ve=0,Ia;if("startRule"in l){if(!(l.startRule in v))throw new Error(`Can't start parsing from rule "`+l.startRule+'".');S=v[l.startRule]}function Gp(){return s.substring(De,M)}i(Gp,"text");function Rt(){return Wo(De,M)}i(Rt,"location");function Yf(w){throw Xs(null,[{type:"other",description:w}],s.substring(De,M),Wo(De,M))}i(Yf,"expected");function Ys(w){throw Xs(w,null,s.substring(De,M),Wo(De,M))}i(Ys,"error");function Fa(w){var N=Gs[w],W,U;if(N)return N;for(W=w-1;!Gs[W];)W--;for(N=Gs[W],N={line:N.line,column:N.column,seenCR:N.seenCR};Wgi&&(gi=M,Fl=[]),Fl.push(w))}i(Se,"peg$fail");function Xs(w,N,W,U){function gn(Wn){var fo=1;for(Wn.sort(function(Vo,qo){return Vo.descriptionqo.description?1:0});fo1?qo.slice(0,-1).join(", ")+" or "+qo[Wn.length-1]:qo[0],Yl=fo?'"'+Vo(fo)+'"':"end of input","Expected "+kc+" but "+Yl+" found."}return i(Xt,"buildMessage"),N!==null&&gn(N),new t(w!==null?w:Xt(N,W),N,W,U)}i(Xs,"peg$buildException");function vi(){var w,N,W,U;return ve++,w=M,N=hn(),N!==d?(W=Bl(),W!==d?(U=hn(),U!==d?(De=w,N=k(W),w=N):(M=w,w=d)):(M=w,w=d)):(M=w,w=d),ve--,w===d&&(N=d,ve===0&&Se(b)),w}i(vi,"peg$parsestart");function Ze(){var w,N;return ve++,I.test(s.charAt(M))?(w=s.charAt(M),M++):(w=d,ve===0&&Se(z)),ve--,w===d&&(N=d,ve===0&&Se(R)),w}i(Ze,"peg$parsews");function Hl(){var w,N;return ve++,Y.test(s.charAt(M))?(w=s.charAt(M),M++):(w=d,ve===0&&Se(ne)),ve--,w===d&&(N=d,ve===0&&Se(j)),w}i(Hl,"peg$parsecc");function hn(){var w,N;for(ve++,w=[],N=Ze();N!==d;)w.push(N),N=Ze();return ve--,w===d&&(N=d,ve===0&&Se(F)),w}i(hn,"peg$parse__");function Bl(){var w,N,W,U,gn,Xt;return w=M,N=Zr(),N!==d?(W=hn(),W!==d?(s.charCodeAt(M)===124?(U=L,M++):(U=d,ve===0&&Se(D)),U!==d?(gn=hn(),gn!==d?(Xt=Bl(),Xt!==d?(De=w,N=q(N,Xt),w=N):(M=w,w=d)):(M=w,w=d)):(M=w,w=d)):(M=w,w=d)):(M=w,w=d),w===d&&(w=Zr()),w}i(Bl,"peg$parseOrExpr");function Zr(){var w,N,W,U,gn,Xt;if(w=M,N=zl(),N!==d?(W=hn(),W!==d?(s.charCodeAt(M)===38?(U=te,M++):(U=d,ve===0&&Se(Z)),U!==d?(gn=hn(),gn!==d?(Xt=Zr(),Xt!==d?(De=w,N=oe(N,Xt),w=N):(M=w,w=d)):(M=w,w=d)):(M=w,w=d)):(M=w,w=d)):(M=w,w=d),w===d){if(w=M,N=zl(),N!==d){if(W=[],U=Ze(),U!==d)for(;U!==d;)W.push(U),U=Ze();else W=d;W!==d?(U=Zr(),U!==d?(De=w,N=oe(N,U),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;w===d&&(w=zl())}return w}i(Zr,"peg$parseAndExpr");function zl(){var w,N,W,U;return w=M,s.charCodeAt(M)===33?(N=he,M++):(N=d,ve===0&&Se(Re)),N!==d?(W=hn(),W!==d?(U=zl(),U!==d?(De=w,N=Ee(U),w=N):(M=w,w=d)):(M=w,w=d)):(M=w,w=d),w===d&&(w=Zn()),w}i(zl,"peg$parseNotExpr");function Zn(){var w,N,W,U,gn,Xt;return w=M,s.charCodeAt(M)===40?(N=Ye,M++):(N=d,ve===0&&Se(tt)),N!==d?(W=hn(),W!==d?(U=Bl(),U!==d?(gn=hn(),gn!==d?(s.charCodeAt(M)===41?(Xt=xe,M++):(Xt=d,ve===0&&Se(Xe)),Xt!==d?(De=w,N=je(U),w=N):(M=w,w=d)):(M=w,w=d)):(M=w,w=d)):(M=w,w=d)):(M=w,w=d),w===d&&(w=Xf()),w}i(Zn,"peg$parseBindingExpr");function Xf(){var w,N,W,U;if(w=M,s.substr(M,4)===Qe?(N=Qe,M+=4):(N=d,ve===0&&Se(ot)),N!==d&&(De=w,N=It()),w=N,w===d&&(w=M,s.substr(M,2)===Pt?(N=Pt,M+=2):(N=d,ve===0&&Se(fn)),N!==d&&(De=w,N=dn()),w=N,w===d)){if(w=M,s.substr(M,2)===vr?(N=vr,M+=2):(N=d,ve===0&&Se(Ut)),N!==d){if(W=[],U=Ze(),U!==d)for(;U!==d;)W.push(U),U=Ze();else W=d;W!==d?(U=jt(),U!==d?(De=w,N=yr(U),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d){if(w=M,s.substr(M,3)===wr?(N=wr,M+=3):(N=d,ve===0&&Se(Gt)),N!==d){if(W=[],U=Ze(),U!==d)for(;U!==d;)W.push(U),U=Ze();else W=d;W!==d?(U=jt(),U!==d?(De=w,N=Ft(U),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d){if(w=M,s.substr(M,3)===se?(N=se,M+=3):(N=d,ve===0&&Se(We)),N!==d){if(W=[],U=Ze(),U!==d)for(;U!==d;)W.push(U),U=Ze();else W=d;W!==d?(U=jt(),U!==d?(De=w,N=Yr(U),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d){if(w=M,s.substr(M,2)===Zt?(N=Zt,M+=2):(N=d,ve===0&&Se(st)),N!==d){if(W=[],U=Ze(),U!==d)for(;U!==d;)W.push(U),U=Ze();else W=d;W!==d?(U=wc(),U!==d?(De=w,N=Fe(U),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d){if(w=M,s.substr(M,8)===Fn?(N=Fn,M+=8):(N=d,ve===0&&Se(bn)),N!==d){if(W=[],U=Ze(),U!==d)for(;U!==d;)W.push(U),U=Ze();else W=d;W!==d?(U=jt(),U!==d?(De=w,N=no(U),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d){if(w=M,s.substr(M,2)===Bo?(N=Bo,M+=2):(N=d,ve===0&&Se(lt)),N!==d){if(W=[],U=Ze(),U!==d)for(;U!==d;)W.push(U),U=Ze();else W=d;W!==d?(U=jt(),U!==d?(De=w,N=Sr(U),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d&&(w=M,s.substr(M,4)===dr?(N=dr,M+=4):(N=d,ve===0&&Se(pt)),N!==d&&(De=w,N=io()),w=N,w===d)){if(w=M,s.substr(M,4)===Hn?(N=Hn,M+=4):(N=d,ve===0&&Se(Mi)),N!==d){if(W=[],U=Ze(),U!==d)for(;U!==d;)W.push(U),U=Ze();else W=d;W!==d?(U=jt(),U!==d?(De=w,N=Xr(U),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d&&(w=M,s.substr(M,2)===Qr?(N=Qr,M+=2):(N=d,ve===0&&Se(oo)),N!==d&&(De=w,N=hi()),w=N,w===d)){if(w=M,s.substr(M,2)===Bn?(N=Bn,M+=2):(N=d,ve===0&&Se(so)),N!==d){if(W=[],U=Ze(),U!==d)for(;U!==d;)W.push(U),U=Ze();else W=d;W!==d?(U=jt(),U!==d?(De=w,N=bl(U),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d){if(w=M,s.substr(M,3)===X?(N=X,M+=3):(N=d,ve===0&&Se(ee)),N!==d){if(W=[],U=Ze(),U!==d)for(;U!==d;)W.push(U),U=Ze();else W=d;W!==d?(U=jt(),U!==d?(De=w,N=Ce(U),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d){if(w=M,s.substr(M,3)===Me?(N=Me,M+=3):(N=d,ve===0&&Se(Tl)),N!==d){if(W=[],U=Ze(),U!==d)for(;U!==d;)W.push(U),U=Ze();else W=d;W!==d?(U=jt(),U!==d?(De=w,N=ze(U),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d&&(w=M,s.substr(M,5)===Jr?(N=Jr,M+=5):(N=d,ve===0&&Se(Yt)),N!==d&&(De=w,N=Mt()),w=N,w===d&&(w=M,s.substr(M,7)===At?(N=At,M+=7):(N=d,ve===0&&Se(Na)),N!==d&&(De=w,N=pn()),w=N,w===d))){if(w=M,s.substr(M,7)===zn?(N=zn,M+=7):(N=d,ve===0&&Se(Nr)),N!==d){if(W=[],U=Ze(),U!==d)for(;U!==d;)W.push(U),U=Ze();else W=d;W!==d?(U=jt(),U!==d?(De=w,N=gs(U),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d){if(w=M,s.substr(M,2)===Tn?(N=Tn,M+=2):(N=d,ve===0&&Se(Pa)),N!==d){if(W=[],U=Ze(),U!==d)for(;U!==d;)W.push(U),U=Ze();else W=d;W!==d?(U=jt(),U!==d?(De=w,N=Aa(U),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d&&(w=M,s.substr(M,2)===nc?(N=nc,M+=2):(N=d,ve===0&&Se(ic)),N!==d&&(De=w,N=oc()),w=N,w===d&&(w=M,s.substr(M,8)===$f?(N=$f,M+=8):(N=d,ve===0&&Se(sc)),N!==d&&(De=w,N=Hp()),w=N,w===d&&(w=M,s.substr(M,8)===kl?(N=kl,M+=8):(N=d,ve===0&&Se(Bp)),N!==d&&(De=w,N=zp()),w=N,w===d&&(w=M,s.substr(M,7)===Nl?(N=Nl,M+=7):(N=d,ve===0&&Se(Vf)),N!==d&&(De=w,N=ac()),w=N,w===d))))){if(w=M,s.substr(M,4)===vs?(N=vs,M+=4):(N=d,ve===0&&Se(Wp)),N!==d){if(W=[],U=Ze(),U!==d)for(;U!==d;)W.push(U),U=Ze();else W=d;W!==d?(U=jt(),U!==d?(De=w,N=Up(U),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d&&(w=M,s.substr(M,2)===La?(N=La,M+=2):(N=d,ve===0&&Se(lc)),N!==d&&(De=w,N=ao()),w=N,w===d&&(w=M,s.substr(M,4)===qf?(N=qf,M+=4):(N=d,ve===0&&Se(Oi)),N!==d&&(De=w,N=uc()),w=N,w===d&&(w=M,s.substr(M,4)===cc?(N=cc,M+=4):(N=d,ve===0&&Se(sr)),N!==d&&(De=w,N=Ae()),w=N,w===d)))){if(w=M,s.substr(M,3)===lo?(N=lo,M+=3):(N=d,ve===0&&Se(Pl)),N!==d){if(W=[],U=Ze(),U!==d)for(;U!==d;)W.push(U),U=Ze();else W=d;W!==d?(U=jt(),U!==d?(De=w,N=Ri(U),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d){if(w=M,s.substr(M,3)===vt?(N=vt,M+=3):(N=d,ve===0&&Se(ys)),N!==d){if(W=[],U=Ze(),U!==d)for(;U!==d;)W.push(U),U=Ze();else W=d;W!==d?(U=jt(),U!==d?(De=w,N=Ma(U),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d){if(w=M,s.substr(M,2)===Oa?(N=Oa,M+=2):(N=d,ve===0&&Se(ce)),N!==d){if(W=[],U=Ze(),U!==d)for(;U!==d;)W.push(U),U=Ze();else W=d;W!==d?(U=jt(),U!==d?(De=w,N=Ve(U),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d){if(w=M,s.substr(M,2)===qs?(N=qs,M+=2):(N=d,ve===0&&Se(fc)),N!==d){if(W=[],U=Ze(),U!==d)for(;U!==d;)W.push(U),U=Ze();else W=d;W!==d?(U=jt(),U!==d?(De=w,N=js(U),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;w===d&&(w=M,s.substr(M,10)===zo?(N=zo,M+=10):(N=d,ve===0&&Se(dc)),N!==d&&(De=w,N=qe()),w=N,w===d&&(w=M,N=jt(),N!==d&&(De=w,N=js(N)),w=N))}}}}}}}}}}}}}}}}}return w}i(Xf,"peg$parseExpr");function wc(){var w,N,W,U;if(ve++,w=M,Al.test(s.charAt(M))?(N=s.charAt(M),M++):(N=d,ve===0&&Se(ws)),N===d&&(N=null),N!==d){if(W=[],mi.test(s.charAt(M))?(U=s.charAt(M),M++):(U=d,ve===0&&Se(Ll)),U!==d)for(;U!==d;)W.push(U),mi.test(s.charAt(M))?(U=s.charAt(M),M++):(U=d,ve===0&&Se(Ll));else W=d;W!==d?(Al.test(s.charAt(M))?(U=s.charAt(M),M++):(U=d,ve===0&&Se(ws)),U===d&&(U=null),U!==d?(De=w,N=Ml(W),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;return ve--,w===d&&(N=d,ve===0&&Se(jf)),w}i(wc,"peg$parseIntegerLiteral");function jt(){var w,N,W,U;if(ve++,w=M,s.charCodeAt(M)===34?(N=uo,M++):(N=d,ve===0&&Se(Ol)),N!==d){for(W=[],U=Ha();U!==d;)W.push(U),U=Ha();W!==d?(s.charCodeAt(M)===34?(U=uo,M++):(U=d,ve===0&&Se(Ol)),U!==d?(De=w,N=Ks(W),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d){if(w=M,s.charCodeAt(M)===39?(N=pc,M++):(N=d,ve===0&&Se(Rl)),N!==d){for(W=[],U=Wl();U!==d;)W.push(U),U=Wl();W!==d?(s.charCodeAt(M)===39?(U=pc,M++):(U=d,ve===0&&Se(Rl)),U!==d?(De=w,N=Ks(W),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d)if(w=M,N=M,ve++,W=Hl(),ve--,W===d?N=void 0:(M=N,N=d),N!==d){if(W=[],U=$t(),U!==d)for(;U!==d;)W.push(U),U=$t();else W=d;W!==d?(De=w,N=Ks(W),w=N):(M=w,w=d)}else M=w,w=d}return ve--,w===d&&(N=d,ve===0&&Se(Ss)),w}i(jt,"peg$parseStringLiteral");function Ha(){var w,N,W;return w=M,N=M,ve++,hc.test(s.charAt(M))?(W=s.charAt(M),M++):(W=d,ve===0&&Se(mc)),ve--,W===d?N=void 0:(M=N,N=d),N!==d?(s.length>M?(W=s.charAt(M),M++):(W=d,ve===0&&Se(Dl)),W!==d?(De=w,N=Ra(W),w=N):(M=w,w=d)):(M=w,w=d),w===d&&(w=M,s.charCodeAt(M)===92?(N=gc,M++):(N=d,ve===0&&Se(Di)),N!==d?(W=Ii(),W!==d?(De=w,N=Ra(W),w=N):(M=w,w=d)):(M=w,w=d)),w}i(Ha,"peg$parseDoubleStringChar");function Wl(){var w,N,W;return w=M,N=M,ve++,Kf.test(s.charAt(M))?(W=s.charAt(M),M++):(W=d,ve===0&&Se($p)),ve--,W===d?N=void 0:(M=N,N=d),N!==d?(s.length>M?(W=s.charAt(M),M++):(W=d,ve===0&&Se(Dl)),W!==d?(De=w,N=Ra(W),w=N):(M=w,w=d)):(M=w,w=d),w===d&&(w=M,s.charCodeAt(M)===92?(N=gc,M++):(N=d,ve===0&&Se(Di)),N!==d?(W=Ii(),W!==d?(De=w,N=Ra(W),w=N):(M=w,w=d)):(M=w,w=d)),w}i(Wl,"peg$parseSingleStringChar");function $t(){var w,N,W;return w=M,N=M,ve++,W=Ze(),ve--,W===d?N=void 0:(M=N,N=d),N!==d?(s.length>M?(W=s.charAt(M),M++):(W=d,ve===0&&Se(Dl)),W!==d?(De=w,N=Ra(W),w=N):(M=w,w=d)):(M=w,w=d),w}i($t,"peg$parseUnquotedStringChar");function Ii(){var w,N;return Il.test(s.charAt(M))?(w=s.charAt(M),M++):(w=d,ve===0&&Se(Da)),w===d&&(w=M,s.charCodeAt(M)===110?(N=Vp,M++):(N=d,ve===0&&Se(vc)),N!==d&&(De=w,N=qp()),w=N,w===d&&(w=M,s.charCodeAt(M)===114?(N=jp,M++):(N=d,ve===0&&Se(yc)),N!==d&&(De=w,N=Gf()),w=N,w===d&&(w=M,s.charCodeAt(M)===116?(N=Kp,M++):(N=d,ve===0&&Se(Ht)),N!==d&&(De=w,N=Ot()),w=N))),w}i(Ii,"peg$parseEscapeSequence");function Sc(w,N){function W(){return w.apply(this,arguments)||N.apply(this,arguments)}return i(W,"orFilter"),W.desc=w.desc+" or "+N.desc,W}i(Sc,"or");function Qf(w,N){function W(){return w.apply(this,arguments)&&N.apply(this,arguments)}return i(W,"andFilter"),W.desc=w.desc+" and "+N.desc,W}i(Qf,"and");function Qs(w){function N(){return!w.apply(this,arguments)}return i(N,"notFilter"),N.desc="not "+w.desc,N}i(Qs,"not");function Js(w){function N(){return w.apply(this,arguments)}return i(N,"bindingFilter"),N.desc="("+w.desc+")",N}i(Js,"binding");function Jf(w){return!0}i(Jf,"allFilter"),Jf.desc="all flows";var Zf=[new RegExp("text/javascript"),new RegExp("application/x-javascript"),new RegExp("application/javascript"),new RegExp("text/css"),new RegExp("image/.*"),new RegExp("font/.*"),new RegExp("application/font.*")];function xc(w){if(w.response){for(var N=vl.getContentType(w.response),W=Zf.length;W--;)if(Zf[W].test(N))return!0}return!1}i(xc,"assetFilter"),xc.desc="is asset";function Uo(w){w=new RegExp(w,"i");function N(W){return!0}return i(N,"bodyFilter"),N.desc="body filters are not implemented yet, see https://github.com/mitmproxy/mitmproxy/issues/3609",N}i(Uo,"body");function Kt(w){w=new RegExp(w,"i");function N(W){return!0}return i(N,"requestBodyFilter"),N.desc="body filters are not implemented yet, see https://github.com/mitmproxy/mitmproxy/issues/3609",N}i(Kt,"requestBody");function Yp(w){w=new RegExp(w,"i");function N(W){return!0}return i(N,"responseBodyFilter"),N.desc="body filters are not implemented yet, see https://github.com/mitmproxy/mitmproxy/issues/3609",N}i(Yp,"responseBody");function Cc(w){function N(W){return W.response&&W.response.status_code===w}return i(N,"responseCodeFilter"),N.desc="resp. code is "+w,N}i(Cc,"responseCode");function Zs(w){w=new RegExp(w,"i");function N(W){return w.test(W.comment)}return i(N,"commentFilter"),N.desc="comment matches "+w,N}i(Zs,"comment");function _c(w){w=new RegExp(w,"i");function N(W){return W.request&&(w.test(W.request.host)||w.test(W.request.pretty_host))}return i(N,"domainFilter"),N.desc="domain matches "+w,N}i(_c,"domain");function Ba(w){return w.type==="dns"}i(Ba,"dnsFilter"),Ba.desc="is a DNS Flow";function ed(w){w=new RegExp(w,"i");function N(W){return!!W.server_conn.address&&w.test(W.server_conn.address[0]+":"+W.server_conn.address[1])}return i(N,"destinationFilter"),N.desc="destination address matches "+w,N}i(ed,"destination");function Ul(w){return!!w.error}i(Ul,"errorFilter"),Ul.desc="has error";function $l(w){w=new RegExp(w,"i");function N(W){return W.request&&zs.match_header(W.request,w)||W.response&&vl.match_header(W.response,w)}return i(N,"headerFilter"),N.desc="header matches "+w,N}i($l,"header");function Ec(w){w=new RegExp(w,"i");function N(W){return W.request&&zs.match_header(W.request,w)}return i(N,"requestHeaderFilter"),N.desc="req. header matches "+w,N}i(Ec,"requestHeader");function Xp(w){w=new RegExp(w,"i");function N(W){return W.response&&vl.match_header(W.response,w)}return i(N,"responseHeaderFilter"),N.desc="resp. header matches "+w,N}i(Xp,"responseHeader");function Vl(w){return w.type==="http"}i(Vl,"httpFilter"),Vl.desc="is an HTTP Flow";function mn(w){return w.marked}i(mn,"markedFilter"),mn.desc="is marked";function bc(w){w=new RegExp(w,"i");function N(W){return w.test(W.marked)}return i(N,"markerFilter"),N.desc="marker matches "+w,N}i(bc,"marker");function co(w){w=new RegExp(w,"i");function N(W){return W.request&&w.test(W.request.method)}return i(N,"methodFilter"),N.desc="method matches "+w,N}i(co,"method");function yi(w){return w.request&&!w.response}i(yi,"noResponseFilter"),yi.desc="has no response";function ea(w){return w.is_replay==="request"}i(ea,"clientReplayFilter"),ea.desc="request has been replayed";function ql(w){return w.is_replay==="response"}i(ql,"serverReplayFilter"),ql.desc="response has been replayed";function Tc(w){return!!w.is_replay}i(Tc,"replayFilter"),Tc.desc="flow has been replayed";function Fi(w){w=new RegExp(w,"i");function N(W){return!!W.client_conn.peername&&w.test(W.client_conn.peername[0]+":"+W.client_conn.peername[1])}return i(N,"sourceFilter"),N.desc="source address matches "+w,N}i(Fi,"source");function $o(w){return!!w.response}i($o,"responseFilter"),$o.desc="has response";function jl(w){return w.type==="tcp"}i(jl,"tcpFilter"),jl.desc="is a TCP Flow";function xs(w){return w.type==="udp"}i(xs,"udpFilter"),xs.desc="is a UDP Flow";function td(w){w=new RegExp(w,"i");function N(W){return W.request&&w.test(zs.getContentType(W.request))}return i(N,"requestContentTypeFilter"),N.desc="req. content type matches "+w,N}i(td,"requestContentType");function Qp(w){w=new RegExp(w,"i");function N(W){return W.response&&w.test(vl.getContentType(W.response))}return i(N,"responseContentTypeFilter"),N.desc="resp. content type matches "+w,N}i(Qp,"responseContentType");function Kl(w){w=new RegExp(w,"i");function N(W){return W.request&&w.test(zs.getContentType(W.request))||W.response&&w.test(vl.getContentType(W.response))}return i(N,"contentTypeFilter"),N.desc="content type matches "+w,N}i(Kl,"contentType");function Gl(w){w=new RegExp(w,"i");function N(W){if(W.type==="dns"){let U=W.request?.questions[0];return U&&w.test(U.name)}return W.request&&w.test(zs.pretty_url(W.request))}return i(N,"urlFilter"),N.desc="url matches "+w,N}i(Gl,"url");function kn(w){return!!w.websocket}if(i(kn,"websocketFilter"),kn.desc="is a Websocket Flow",Ia=S(),Ia!==d&&M===s.length)return Ia;throw Ia!==d&&M1)s=s.filter(l=>l!==t.data);else if(s=[],t.data in e.viewIndex&&e.view.length>1){let l=e.viewIndex[t.data],h;l===e.view.length-1?h=e.view[l-1]:h=e.view[l+1],s.push(h.id)}}return{...e,selected:s,...Vu(e,n)}}case fA:return{...e,filter:t.filter,...Vu(e,Mm(uA(t.filter),uC(e.sort)))};case pA:return{...e,highlight:t.highlight};case dA:return{...e,sort:t.sort,...Vu(e,Zx(uC(t.sort)))};case cA:return{...e,selected:t.flowIds};default:return e}}i(cC,"reducer");function uA(e){if(e)return wf.parse(e)}i(uA,"makeFilter");function uC({column:e,desc:t}){if(!e)return(s,l)=>0;let n=aA[e];return(s,l)=>{let h=n(s),d=n(l);return h>d?t?-1:1:hxt(`/flows/${e.id}/resume`,{method:"POST"})}i(fp,"resume");function n0(){return()=>xt("/flows/resume",{method:"POST"})}i(n0,"resumeAll");function i0(e){return()=>xt(`/flows/${e.id}/kill`,{method:"POST"})}i(i0,"kill");function mA(){return()=>xt("/flows/kill",{method:"POST"})}i(mA,"killAll");function o0(e){return()=>xt(`/flows/${e.id}`,{method:"DELETE"})}i(o0,"remove");function s0(e){return()=>xt(`/flows/${e.id}/duplicate`,{method:"POST"})}i(s0,"duplicate");function dp(e){return()=>xt(`/flows/${e.id}/replay`,{method:"POST"})}i(dp,"replay");function a0(e){return()=>xt(`/flows/${e.id}/revert`,{method:"POST"})}i(a0,"revert");function si(e,t){return()=>xt.put(`/flows/${e.id}`,t)}i(si,"update");function gA(e,t,n){let s=new FormData;return t=new window.Blob([t],{type:"plain/text"}),s.append("file",t),()=>xt(`/flows/${e.id}/${n}/content.data`,{method:"POST",body:s})}i(gA,"uploadContent");function l0(){return()=>xt("/clear",{method:"POST"})}i(l0,"clear");function vA(e){let t=new FormData;return t.append("file",e),()=>xt("/flows/dump",{method:"POST",body:t})}i(vA,"upload");function yl(e){return{type:cA,flowIds:e?[e]:[]}}i(yl,"select");var SB={activeModal:void 0},yA=nr({name:"ui/modal",initialState:SB,reducers:{setActiveModal(e,t){e.activeModal=t.payload},hideModal(e){e.activeModal=void 0}}}),{actions:xB,reducer:CB}=yA,wA=yA.actions.hideModal.type,{setActiveModal:SA,hideModal:u0}=xB,xA=CB;var ba=de(be());var qt=de(be());var hp=de(be());var Im=de(be()),_A=de(ai());var CA=(()=>{let e=document.createElement("div");return e.setAttribute("contenteditable","PLAINTEXT-ONLY"),e.contentEditable==="plaintext-only"?"plaintext-only":"true"})(),pp=!1,gt=class extends Im.Component{constructor(){super(...arguments);this.input=Im.default.createRef();this.isEditing=i(()=>this.input.current?.contentEditable===CA,"isEditing");this.startEditing=i(()=>{if(!this.input.current)return console.error("unreachable");this.isEditing()||(this.suppress_events=!0,this.input.current.blur(),this.input.current.contentEditable=CA,window.requestAnimationFrame(()=>{if(!this.input.current)return;this.input.current.focus(),this.suppress_events=!1;let n=document.createRange();n.selectNodeContents(this.input.current);let s=window.getSelection();s?.removeAllRanges(),s?.addRange(n),this.props.onEditStart?.()}))},"startEditing");this.resetValue=i(()=>{if(!this.input.current)return console.error("unreachable");this.input.current.textContent=this.props.content,this.props.onInput?.(this.props.content)},"resetValue");this.finishEditing=i(()=>{if(!this.input.current)return console.error("unreachable");this.props.onEditDone(this.input.current.textContent||""),this.input.current.blur(),this.input.current.contentEditable="inherit"},"finishEditing");this.onPaste=i(n=>{n.preventDefault();let s=n.clipboardData.getData("text/plain");document.execCommand("insertHTML",!1,s)},"onPaste");this.suppress_events=!1;this.onMouseDown=i(n=>{pp&&console.debug("onMouseDown",this.suppress_events),this.suppress_events=!0,window.addEventListener("mouseup",this.onMouseUp,{once:!0})},"onMouseDown");this.onMouseUp=i(n=>{let s=n.target===this.input.current,l=!window.getSelection()?.toString();pp&&console.warn("mouseUp",this.suppress_events,s,l),s&&l&&this.startEditing(),this.suppress_events=!1},"onMouseUp");this.onClick=i(n=>{pp&&console.debug("onClick",this.suppress_events)},"onClick");this.onFocus=i(n=>{if(pp&&console.debug("onFocus",this.props.content,this.suppress_events),!this.input.current)throw"unreachable";this.suppress_events||this.startEditing()},"onFocus");this.onInput=i(n=>{this.props.onInput?.(this.input.current?.textContent||"")},"onInput");this.onBlur=i(n=>{pp&&console.debug("onBlur",this.props.content,this.suppress_events),!this.suppress_events&&this.finishEditing()},"onBlur");this.onKeyDown=i(n=>{switch(pp&&console.debug("keydown",n),n.stopPropagation(),n.key){case"Escape":n.preventDefault(),this.resetValue(),this.finishEditing();break;case"Enter":n.shiftKey||(n.preventDefault(),this.finishEditing());break;default:break}this.props.onKeyDown?.(n)},"onKeyDown")}static{i(this,"ValueEditor")}render(){let n=(0,_A.default)("inline-input",this.props.className);return Im.default.createElement("span",{ref:this.input,tabIndex:0,className:n,placeholder:this.props.placeholder,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onInput:this.onInput,onPaste:this.onPaste,onMouseDown:this.onMouseDown,onClick:this.onClick},this.props.content)}componentDidUpdate(n){n.content!==this.props.content&&this.props.onInput?.(this.props.content)}};var EA=de(ai());function xf(e){let[t,n]=(0,hp.useState)(e.isValid(e.content)),s=(0,hp.useRef)(null),l=i(d=>{e.isValid(d)?e.onEditDone(d):s.current?.resetValue()},"onEditDone"),h=(0,EA.default)(e.className,t?"has-success":"has-warning");return hp.default.createElement(gt,{...e,className:h,onInput:d=>n(e.isValid(d)),onEditDone:l,ref:s})}i(xf,"ValidateEditor");var He=i(()=>EP(),"useAppDispatch"),me=gP,bA=Nm.withTypes();var TA="EVENTS_ADD",_B="EVENTS_RECEIVE",kA="EVENTS_TOGGLE_VISIBILITY",NA="EVENTS_TOGGLE_FILTER",dC=(h=>(h.debug="debug",h.info="info",h.web="web",h.warn="warn",h.error="error",h))(dC||{}),EB={visible:!1,filters:{debug:!1,info:!0,web:!0,warn:!0,error:!0},...cp};function pC(e=EB,t){switch(t.type){case kA:return{...e,visible:!e.visible};case NA:{let n={...e.filters,[t.filter]:!e.filters[t.filter]};return{...e,filters:n,...Vu(e,Mm(s=>n[s.level]))}}case TA:case _B:return{...e,...Vu(e,Rm[t.cmd](t.data,n=>e.filters[n.level]))};default:return e}}i(pC,"reduce");function PA(e){return{type:NA,filter:e}}i(PA,"toggleFilter");function mp(){return{type:kA}}i(mp,"toggleVisibility");function AA(e,t="web"){let n={id:Math.random().toString(),message:e,level:t};return{type:TA,cmd:"add",data:n}}i(AA,"add");var MA="UI_OPTION_UPDATE_START",OA="UI_OPTION_UPDATE_SUCCESS",RA="UI_OPTION_UPDATE_ERROR",bB={};function hC(e=bB,t){switch(t.type){case MA:return{...e,[t.option]:{isUpdating:!0,value:t.value,error:!1}};case OA:return{...e,[t.option]:void 0};case RA:{let n=e[t.option].value;return typeof n=="boolean"&&(n=!n),{...e,[t.option]:{value:n,isUpdating:!1,error:t.error}}}case wA:return{};default:return e}}i(hC,"reducer");function DA(e,t){return{type:MA,option:e,value:t}}i(DA,"startUpdate");function IA(e){return{type:OA,option:e}}i(IA,"updateSuccess");function FA(e,t){return{type:RA,option:e,error:String(t)}}i(FA,"updateError");var kB=nr({name:"ui/tabs",initialState:{current:1,isInitial:!0},reducers:{setCurrent(e,t){e.current=t.payload,e.isInitial=!1}}}),{actions:NB,reducer:PB}=kB,{setCurrent:Fm}=NB,HA=PB;var BA=sp({flow:rA,modal:xA,optionsEditor:hC,tabs:HA});var AB={state:"CONNECTION_INIT",message:void 0};function mC(e=AB,t){switch(t.type){case"CONNECTION_ESTABLISHED":case"CONNECTION_FETCHING":case"CONNECTION_ERROR":case"CONNECTION_OFFLINE":return{state:t.type,message:t.message};default:return e}}i(mC,"reducer");function zA(){return{type:"CONNECTION_FETCHING"}}i(zA,"startFetching");function WA(){return{type:"CONNECTION_ESTABLISHED"}}i(WA,"connectionEstablished");function UA(e){return{type:"CONNECTION_ERROR",message:e}}i(UA,"connectionError");var $A={add_upstream_certs_to_client_chain:!1,allow_hosts:[],anticache:!1,anticomp:!1,block_global:!0,block_list:[],block_private:!1,body_size_limit:void 0,cert_passphrase:void 0,certs:[],ciphers_client:void 0,ciphers_server:void 0,client_certs:void 0,client_replay:[],client_replay_concurrency:1,command_history:!0,confdir:"~/.mitmproxy",connect_addr:void 0,connection_strategy:"eager",console_focus_follow:!1,content_view_lines_cutoff:512,dns_name_servers:[],dns_use_hosts_file:!0,export_preserve_original_ip:!1,hardump:"",http2:!0,http2_ping_keepalive:58,http3:!0,http_connect_send_host_header:!0,ignore_hosts:[],intercept:void 0,intercept_active:!1,keep_alt_svc_header:!1,keep_host_header:!1,key_size:2048,listen_host:"",listen_port:void 0,map_local:[],map_remote:[],mode:["regular"],modify_body:[],modify_headers:[],normalize_outbound_headers:!0,onboarding:!0,onboarding_host:"mitm.it",proxy_debug:!1,proxyauth:void 0,rawtcp:!0,readfile_filter:void 0,request_client_cert:!1,rfile:void 0,save_stream_file:void 0,save_stream_filter:void 0,scripts:[],server:!0,server_replay:[],server_replay_extra:"forward",server_replay_ignore_content:!1,server_replay_ignore_host:!1,server_replay_ignore_params:[],server_replay_ignore_payload_params:[],server_replay_ignore_port:!1,server_replay_kill_extra:!1,server_replay_nopop:!1,server_replay_refresh:!0,server_replay_reuse:!1,server_replay_use_headers:[],show_ignored_hosts:!1,showhost:!1,ssl_insecure:!1,ssl_verify_upstream_trusted_ca:void 0,ssl_verify_upstream_trusted_confdir:void 0,stickyauth:void 0,stickycookie:void 0,stream_large_bodies:void 0,strip_ech:!0,tcp_hosts:[],termlog_verbosity:"info",tls_ecdh_curve_client:void 0,tls_ecdh_curve_server:void 0,tls_version_client_max:"UNBOUNDED",tls_version_client_min:"TLS1_2",tls_version_server_max:"UNBOUNDED",tls_version_server_min:"TLS1_2",udp_hosts:[],upstream_auth:void 0,upstream_cert:!0,validate_inbound_headers:!0,view_filter:void 0,view_order:"time",view_order_reversed:!1,web_columns:["tls","icon","path","method","status","size","time"],web_debug:!1,web_host:"127.0.0.1",web_open_browser:!0,web_port:8081,web_static_viewer:"",websocket:!0};var gC="OPTIONS_RECEIVE",vC="OPTIONS_UPDATE";function yC(e=$A,t){switch(t.type){case gC:{let n={};for(let[s,{value:l}]of Object.entries(t.data))n[s]=l;return n}case vC:{let n={...e};for(let[s,{value:l}]of Object.entries(t.data))n[s]=l;return n}default:return e}}i(yC,"reducer");async function MB(e,t,n){try{let s=await xt.put("/options",{[e]:t});if(s.status===200)n(IA(e));else throw await s.text()}catch(s){n(FA(e,s))}}i(MB,"pureSendUpdate");var OB=MB;function gp(e,t){return n=>{n(DA(e,t)),OB(e,t,n)}}i(gp,"update");var DB={visible:!1},IB=nr({name:"commandBar",initialState:DB,reducers:{toggleVisibility(e){e.visible=!e.visible}}}),{actions:FB,reducer:HB}=IB,{toggleVisibility:f0}=FB,VA=HB;var Gn=us("STATE_RECEIVE"),Yn=us("STATE_UPDATE"),BB={available:!1,version:"",contentViews:[],servers:{},platform:""};function wC(e=BB,t){switch(t.type){case Gn.type:case Yn.type:return{...e,available:!0,...t.payload};default:return e}}i(wC,"reducer");var zB={},WB=i((e=zB,t)=>{switch(t.type){case gC:return t.data;case vC:return{...e,...t.data};default:return e}},"reducer"),jA=WB;var Xi=i((e,t)=>t.listen_host&&t.listen_port?`${e}@${t.listen_host}:${t.listen_port}`:t.listen_port?`${e}@${t.listen_port}`:e,"includeListenAddress"),d0=i(e=>{let[t,n]=Lm(e,"@");t||(t=n,n="");let[s,l]=Jy(t,":"),h,d;if(n){let v;if(n.includes(":")?[h,v]=Lm(n,":"):(h="",v=n),v&&(d=parseInt(v,10),isNaN(d)||d<0||d>65535))throw new Error(`invalid port: ${v}`)}return{full_spec:e,name:s,data:l,listen_host:h,listen_port:d}},"parseSpec");var p0=i(e=>Xi("regular",e),"getSpec"),SC=i(({listen_host:e,listen_port:t})=>({ui_id:Math.random(),active:!0,listen_host:e,listen_port:t}),"parseRaw");var h0=i(e=>e.selectedProcesses?`local:${e.selectedProcesses}`:"local","getSpec"),xC=i(({data:e})=>({ui_id:Math.random(),active:!0,selectedProcesses:e}),"parseRaw");var m0=i(e=>{let t=e.file_path?`wireguard:${e.file_path}`:"wireguard";return Xi(t,e)},"getSpec"),CC=i(({data:e,listen_host:t,listen_port:n})=>({ui_id:Math.random(),active:!0,listen_host:t,listen_port:n,file_path:e}),"parseRaw");var g0=(b=>(b.HTTP="http",b.HTTPS="https",b.HTTP3="http3",b.TLS="tls",b.DTLS="dtls",b.TCP="tcp",b.UDP="udp",b.DNS="dns",b.QUIC="quic",b))(g0||{});var v0=i(()=>({active:!1,protocol:"https",destination:"",ui_id:Math.random()}),"defaultReverseState"),vp=i(e=>Xi(`reverse:${e.protocol}://${e.destination}`,e),"getSpec"),KA=i(({data:e,listen_host:t,listen_port:n})=>{let[s,l]=Jy(e,"://");return l||(l=s,s="https"),{ui_id:Math.random(),active:!0,protocol:s,destination:l,listen_host:t,listen_port:n}},"parseRaw");var y0=i(e=>Xi("transparent",e),"getSpec"),_C=i(({listen_host:e,listen_port:t})=>({ui_id:Math.random(),active:!0,listen_host:e,listen_port:t}),"parseRaw");var w0=i(e=>Xi("socks5",e),"getSpec"),EC=i(({listen_host:e,listen_port:t})=>({ui_id:Math.random(),active:!0,listen_host:e,listen_port:t}),"parseRaw");var S0=i(e=>Xi(`upstream:${e.destination}`,e),"getSpec"),bC=i(({data:e,listen_host:t,listen_port:n})=>({ui_id:Math.random(),active:!0,destination:e||"",listen_host:t,listen_port:n}),"parseRaw");var x0=i(e=>Xi("dns",e),"getSpec"),TC=i(({listen_host:e,listen_port:t})=>({ui_id:Math.random(),active:!0,listen_host:e,listen_port:t}),"parseRaw");var qu=i(e=>e.active&&!e.error,"isActiveMode");async function UB(e,t){let n=t.getState().modes,s=[...n.regular.filter(qu).map(p0),...n.local.filter(qu).map(h0),...n.wireguard.filter(qu).map(m0),...n.reverse.filter(qu).map(vp),...n.transparent.filter(qu).map(y0),...n.socks.filter(qu).map(w0),...n.upstream.filter(qu).map(S0),...n.dns.filter(qu).map(x0)],l=await xt.put("/options",{mode:s});if(l.status!==200)throw new Error(await l.text())}i(UB,"updateModes");function Ct(e){return bA(e,UB)}i(Ct,"createModeUpdateThunk");function _t(e,t,n){e.addCase(n.pending,(s,l)=>{let{server:h,value:d}=l.meta.arg,v=s.findIndex(S=>S.ui_id===h.ui_id);v>=0&&(s[v][t]=d,s[v].error=void 0)}),e.addCase(n.rejected,(s,l)=>{let{server:h}=l.meta.arg,d=s.findIndex(v=>v.ui_id===h.ui_id);d>=0&&(s[d].error=l.error.message)})}i(_t,"addSetter");function jr(e,t){return i(function(s,l){if(l.payload.servers){let h=Object.values(l.payload.servers).filter(d=>d.type===e).map(d=>d0(d.full_spec));if(h.length>0)return h.map(t);for(let d of s)d.active=!1}},"reducer")}i(jr,"updateState");var kC=Ct("modes/regular/setActive"),NC=Ct("modes/regular/setListenHost"),PC=Ct("modes/regular/setListenPort"),$B=[{active:!0,ui_id:Math.random()}],VB=nr({name:"modes/regular",initialState:$B,reducers:{},extraReducers:i(e=>{_t(e,"active",kC),_t(e,"listen_host",NC),_t(e,"listen_port",PC),e.addCase(Gn,jr("regular",SC)),e.addCase(Yn,jr("regular",SC))},"extraReducers")}),GA=VB.reducer;var AC=Ct("modes/local/setActive"),yp=Ct("modes/local/setSelectedProcesses"),qB=[{active:!1,selectedProcesses:"",ui_id:Math.random()}],jB=nr({name:"modes/local",initialState:qB,reducers:{},extraReducers:i(e=>{_t(e,"active",AC),_t(e,"selectedProcesses",yp),e.addCase(Gn,jr("local",xC)),e.addCase(Yn,jr("local",xC))},"extraReducers")}),YA=jB.reducer;var LC=Ct("modes/wireguard/setActive"),MC=Ct("modes/wireguard/setListenHost"),OC=Ct("modes/wireguard/setListenPort"),RC=Ct("modes/wireguard/setFilePath"),KB=[{active:!1,ui_id:Math.random()}],GB=nr({name:"modes/wireguard",initialState:KB,reducers:{},extraReducers:i(e=>{_t(e,"active",LC),_t(e,"listen_host",MC),_t(e,"listen_port",OC),_t(e,"file_path",RC),e.addCase(Gn,jr("wireguard",CC)),e.addCase(Yn,jr("wireguard",CC))},"extraReducers")}),XA=GB.reducer;var C0=Ct("modes/reverse/setActive"),DC=Ct("modes/reverse/setListenHost"),IC=Ct("modes/reverse/setListenPort"),FC=Ct("modes/reverse/setProtocol"),HC=Ct("modes/reverse/setDestination"),YB=[v0()],QA=nr({name:"modes/reverse",initialState:YB,reducers:{addServer:i(e=>{e.push(v0())},"addServer"),removeServer:i((e,t)=>{let n=e.findIndex(s=>s.ui_id===t.payload.ui_id);n!==-1&&(e[n].active&&console.error("servers should be deactivated before removal"),e.splice(n,1))},"removeServer")},extraReducers:i(e=>{_t(e,"active",C0),_t(e,"listen_host",DC),_t(e,"listen_port",IC),_t(e,"protocol",FC),_t(e,"destination",HC),e.addCase(Gn,t),e.addCase(Yn,t);function t(n,s){if(s.payload.servers){let l=Object.fromEntries(Object.entries(s.payload.servers).filter(([d,v])=>v.type==="reverse").map(([d,v])=>[d,d0(d)])),h=[];for(let d of n){let v=vp(d),S=v in l;delete l[v],h.push({...d,active:S})}for(let d of Object.values(l))h.push(KA(d));return h.length>1&&Mo({...h[0],ui_id:void 0},{...v0(),ui_id:void 0})&&h.shift(),h}}i(t,"updateState")},"extraReducers")}),{addServer:JA,removeServer:ZA}=QA.actions,eL=QA.reducer;var BC=Ct("modes/transparent/setActive"),zC=Ct("modes/transparent/setListenHost"),WC=Ct("modes/transparent/setListenPort"),XB=[{active:!1,ui_id:Math.random()}],QB=nr({name:"modes/transparent",initialState:XB,reducers:{},extraReducers:i(e=>{_t(e,"active",BC),_t(e,"listen_host",zC),_t(e,"listen_port",WC),e.addCase(Gn,jr("transparent",_C)),e.addCase(Yn,jr("transparent",_C))},"extraReducers")}),tL=QB.reducer;var UC=Ct("modes/socks5/setActive"),$C=Ct("modes/socks5/setListenHost"),VC=Ct("modes/socks5/setListenPort"),JB=[{active:!1,ui_id:Math.random()}],ZB=nr({name:"modes/socks5",initialState:JB,reducers:{},extraReducers:i(e=>{_t(e,"active",UC),_t(e,"listen_host",$C),_t(e,"listen_port",VC),e.addCase(Gn,jr("socks5",EC)),e.addCase(Yn,jr("socks5",EC))},"extraReducers")}),rL=ZB.reducer;var qC=Ct("modes/upstream/setActive"),jC=Ct("modes/upstream/setListenHost"),KC=Ct("modes/upstream/setListenPort"),GC=Ct("modes/upstream/setDestination"),ez=[{active:!1,destination:"",ui_id:Math.random()}],tz=nr({name:"modes/upstream",initialState:ez,reducers:{},extraReducers:i(e=>{_t(e,"active",qC),_t(e,"listen_host",jC),_t(e,"listen_port",KC),_t(e,"destination",GC),e.addCase(Gn,jr("upstream",bC)),e.addCase(Yn,jr("upstream",bC))},"extraReducers")}),nL=tz.reducer;var YC=Ct("modes/dns/setActive"),XC=Ct("modes/dns/setListenHost"),QC=Ct("modes/dns/setListenPort"),rz=[{active:!0,ui_id:Math.random()}],nz=nr({name:"modes/dns",initialState:rz,reducers:{},extraReducers:i(e=>{_t(e,"active",YC),_t(e,"listen_host",XC),_t(e,"listen_port",QC),e.addCase(Gn,jr("dns",TC)),e.addCase(Yn,jr("dns",TC))},"extraReducers")}),iL=nz.reducer;var iz=sp({regular:GA,local:YA,wireguard:XA,reverse:eL,transparent:tL,socks:rL,upstream:nL,dns:iL}),oL=iz;var Cf=Nm("fetchProcesses",async(e,{rejectWithValue:t})=>{try{return(await xt("/processes")).json()}catch(n){return t(n.message)}}),oz={currentProcesses:[],isLoading:!1},sz=nr({name:"processes",initialState:oz,reducers:{},extraReducers:i(e=>{e.addCase(Cf.pending,t=>{t.isLoading=!0,t.error=void 0}),e.addCase(Cf.fulfilled,(t,n)=>{t.isLoading=!1,t.currentProcesses=n.payload}),e.addCase(Cf.rejected,(t,n)=>{t.isLoading=!1,t.error=n.payload})},"extraReducers")}),sL=sz.reducer;var az={commandBar:VA,eventLog:pC,flows:cC,connection:mC,modes:oL,ui:BA,options:yC,options_meta:jA,backendState:wC,processes:sL},_f=YP({reducer:az,middleware:i(e=>e({immutableCheck:{warnAfter:5e5},serializableCheck:{warnAfter:5e5}}),"middleware")});var Io=de(be());var aL=de(Am()),lL=de(ai());var JC=class extends Io.Component{constructor(){super(...arguments);this.container=Io.default.createRef();this.nameInput=Io.default.createRef();this.valueInput=Io.default.createRef();this.render=i(()=>{let[n,s]=this.props.item;return Io.default.createElement("div",{ref:this.container,className:"kv-row",onClick:this.onClick,onKeyDownCapture:this.onKeyDown},Io.default.createElement(gt,{ref:this.nameInput,className:"kv-key",content:n,onEditStart:this.props.onEditStart,onEditDone:l=>this.props.onEditDone([l,s])}),":\xA0",Io.default.createElement(gt,{ref:this.valueInput,className:"kv-value",content:s,onEditStart:this.props.onEditStart,onEditDone:l=>this.props.onEditDone([n,l]),placeholder:"empty"}))},"render");this.onClick=i(n=>{n.target===this.container.current&&this.props.onClickEmptyArea()},"onClick");this.onKeyDown=i(n=>{n.target===this.valueInput.current?.input.current&&n.key==="Tab"&&this.props.onTabNext()},"onKeyDown")}static{i(this,"Row")}},wp=class extends Io.Component{constructor(){super(...arguments);this.rowRefs={};this.state={currentList:this.props.data||[],initialList:this.props.data};this.render=i(()=>{this.rowRefs={};let n=this.state.currentList.map((s,l)=>Io.default.createElement(JC,{key:l,item:s,onEditStart:()=>this.currentlyEditing=l,onEditDone:h=>this.onEditDone(l,h),onClickEmptyArea:()=>this.onClickEmptyArea(l),onTabNext:()=>this.onTabNext(l),ref:h=>this.rowRefs[l]=h}));return Io.default.createElement("div",{className:(0,lL.default)("kv-editor",this.props.className),onMouseDown:this.onMouseDown},n,Io.default.createElement("div",{onClick:s=>{s.preventDefault(),this.onClickEmptyArea(this.state.currentList.length-1)},className:"kv-add-row fa fa-plus-square-o",role:"button","aria-label":"Add"}))},"render");this.onEditDone=i((n,s)=>{let l=[...this.state.currentList];s[0]?l[n]=s:l.splice(n,1),this.currentlyEditing=void 0,(0,aL.isEqual)(this.state.currentList,l)||this.props.onChange(l),this.setState({currentList:l})},"onEditDone");this.onClickEmptyArea=i(n=>{if(this.justFinishedEditing)return;let s=[...this.state.currentList];s.splice(n+1,0,["",""]),this.setState({currentList:s},()=>this.rowRefs[n+1]?.nameInput.current?.startEditing())},"onClickEmptyArea");this.onTabNext=i(n=>{n==this.state.currentList.length-1&&this.onClickEmptyArea(n)},"onTabNext");this.onMouseDown=i(n=>{this.justFinishedEditing=this.currentlyEditing},"onMouseDown")}static{i(this,"KeyValueListEditor")}static getDerivedStateFromProps(n,s){return n.data!==s.initialList?{currentList:n.data||[],initialList:n.data}:null}};var ir=de(be());var Hm=de(be());function _0(e,t){let[n,s]=(0,Hm.useState)(),[l,h]=(0,Hm.useState)();return(0,Hm.useEffect)(()=>{l&&l.abort();let d=new AbortController;return xt(e,{signal:d.signal}).then(v=>{if(!v.ok)throw`${v.status} ${v.statusText}`.trim();return v.text()}).then(v=>{s(v)}).catch(v=>{d.signal.aborted||s(`Error getting content: ${v}.`)}),h(d),()=>{d.signal.aborted||d.abort()}},[e,t]),n}i(_0,"useContent");var Bm=de(be());var E0=Bm.default.memo(i(function({icon:t,text:n,className:s,title:l,onOpenFile:h,onClick:d}){let v;return Bm.default.createElement("a",{href:"#",onClick:S=>{v.click(),d&&d(S)},className:s,title:l},Bm.default.createElement("i",{className:"fa fa-fw "+t}),n,Bm.default.createElement("input",{ref:S=>v=S,className:"hidden",type:"file",onChange:S=>{S.preventDefault(),S.target.files&&S.target.files.length>0&&h(S.target.files[0]),v.value=""}}))},"FileChooser"));var Sp=de(be()),uL=de(ai());function Rr({onClick:e,children:t,icon:n,disabled:s,className:l,title:h}){return Sp.createElement("button",{className:(0,uL.default)(l,"btn btn-default"),onClick:s?void 0:e,disabled:s,title:h},n&&Sp.createElement(Sp.Fragment,null,Sp.createElement("i",{className:"fa "+n}),"\xA0"),t)}i(Rr,"Button");var Um=de(be()),mL=de(be());var zm=de(be()),dL=de(ai()),pL=de(cL()),hL=de(Am());function fL(e){return e&&e.replace(/\r\n|\r/g,` -`)}i(fL,"normalizeLineEndings");var Wm=class extends zm.Component{static{i(this,"CodeMirror")}constructor(t){super(t),this.state={isFocused:!1}}static{this.defaultProps={preserveScrollPosition:!1}}getCodeMirrorInstance(){return this.props.codeMirrorInstance||pL.default}UNSAFE_componentWillMount(){this.props.path&&console.error("Warning: react-codemirror: the `path` prop has been changed to `name`")}componentDidMount(){let t=this.getCodeMirrorInstance();this.codeMirror=t.fromTextArea(this.textareaNode,this.props.options),this.codeMirror.on("change",this.codemirrorValueChanged.bind(this)),this.codeMirror.on("cursorActivity",this.cursorActivity.bind(this)),this.codeMirror.on("focus",this.focusChanged.bind(this,!0)),this.codeMirror.on("blur",this.focusChanged.bind(this,!1)),this.codeMirror.on("scroll",this.scrollChanged.bind(this)),this.codeMirror.setValue(this.props.defaultValue||this.props.value||"")}componentWillUnmount(){this.codeMirror&&this.codeMirror.toTextArea()}UNSAFE_componentWillReceiveProps(t){if(this.codeMirror&&t.value!==void 0&&t.value!==this.props.value&&fL(this.codeMirror.getValue())!==fL(t.value))if(this.props.preserveScrollPosition){let n=this.codeMirror.getScrollInfo();this.codeMirror.setValue(t.value),this.codeMirror.scrollTo(n.left,n.top)}else this.codeMirror.setValue(t.value);if(typeof t.options=="object")for(let n in t.options)t.options.hasOwnProperty(n)&&this.setOptionIfChanged(n,t.options[n])}setOptionIfChanged(t,n){let s=this.codeMirror.getOption(t);(0,hL.isEqual)(s,n)||this.codeMirror.setOption(t,n)}getCodeMirror(){return this.codeMirror}focus(){this.codeMirror&&this.codeMirror.focus()}focusChanged(t){this.setState({isFocused:t}),this.props.onFocusChange&&this.props.onFocusChange(t)}cursorActivity(t){this.props.onCursorActivity&&this.props.onCursorActivity(t)}scrollChanged(t){this.props.onScroll&&this.props.onScroll(t.getScrollInfo())}codemirrorValueChanged(t,n){this.props.onChange&&n.origin!=="setValue"&&this.props.onChange(t.getValue(),n)}render(){let t=(0,dL.default)("ReactCodeMirror",this.state.isFocused?"ReactCodeMirror--focused":null,this.props.className);return zm.createElement("div",{className:t},zm.createElement("textarea",{ref:n=>this.textareaNode=n,name:this.props.name||this.props.path,defaultValue:this.props.value,autoComplete:"off",autoFocus:this.props.autoFocus}))}};var $m=class extends mL.Component{constructor(){super(...arguments);this.editor=Um.createRef();this.getContent=i(()=>this.editor.current?.codeMirror.getValue(),"getContent");this.render=i(()=>{let n={lineNumbers:!0};return Um.createElement("div",{className:"codeeditor",onKeyDown:s=>s.stopPropagation()},Um.createElement(Wm,{ref:this.editor,value:this.props.initialContent,onChange:()=>0,options:n}))},"render")}static{i(this,"CodeEditor")}};var Ef=de(be());var lz=Ef.default.memo(i(function({lines:t,maxLines:n,showMore:s}){return t.length===0?null:Ef.default.createElement("pre",null,t.map((l,h)=>h===n?Ef.default.createElement("button",{key:"showmore",onClick:s,className:"btn btn-xs btn-info"},Ef.default.createElement("i",{className:"fa fa-angle-double-down","aria-hidden":"true"})," ","Show more"):Ef.default.createElement("div",{key:h},l.map(([d,v],S)=>Ef.default.createElement("span",{key:S,className:d},v)))))},"LineRenderer")),b0=lz;var Of=de(be());var Ni=de(be());var T0=de(be());var t_=i(function(t){return t.reduce(function(n,s){var l=s[0],h=s[1];return n[l]=h,n},{})},"fromEntries"),r_=typeof window<"u"&&window.document&&window.document.createElement?T0.useLayoutEffect:T0.useEffect;var Gu=de(be()),BL=de(wx());var Dr="top",Cn="bottom",sn="right",Kr="left",k0="auto",ju=[Dr,Cn,sn,Kr],Sl="start",bf="end",gL="clippingParents",N0="viewport",xp="popper",vL="reference",n_=ju.reduce(function(e,t){return e.concat([t+"-"+Sl,t+"-"+bf])},[]),P0=[].concat(ju,[k0]).reduce(function(e,t){return e.concat([t,t+"-"+Sl,t+"-"+bf])},[]),uz="beforeRead",cz="read",fz="afterRead",dz="beforeMain",pz="main",hz="afterMain",mz="beforeWrite",gz="write",vz="afterWrite",yL=[uz,cz,fz,dz,pz,hz,mz,gz,vz];function Dn(e){return e?(e.nodeName||"").toLowerCase():null}i(Dn,"getNodeName");function gr(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}i(gr,"getWindow");function cs(e){var t=gr(e).Element;return e instanceof t||e instanceof Element}i(cs,"isElement");function _n(e){var t=gr(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}i(_n,"isHTMLElement");function Cp(e){if(typeof ShadowRoot>"u")return!1;var t=gr(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}i(Cp,"isShadowRoot");function yz(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var s=t.styles[n]||{},l=t.attributes[n]||{},h=t.elements[n];!_n(h)||!Dn(h)||(Object.assign(h.style,s),Object.keys(l).forEach(function(d){var v=l[d];v===!1?h.removeAttribute(d):h.setAttribute(d,v===!0?"":v)}))})}i(yz,"applyStyles");function wz(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(s){var l=t.elements[s],h=t.attributes[s]||{},d=Object.keys(t.styles.hasOwnProperty(s)?t.styles[s]:n[s]),v=d.reduce(function(S,b){return S[b]="",S},{});!_n(l)||!Dn(l)||(Object.assign(l.style,v),Object.keys(h).forEach(function(S){l.removeAttribute(S)}))})}}i(wz,"effect");var wL={name:"applyStyles",enabled:!0,phase:"write",fn:yz,effect:wz,requires:["computeStyles"]};function In(e){return e.split("-")[0]}i(In,"getBasePlacement");var Ws=Math.max,Tf=Math.min,xl=Math.round;function _p(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}i(_p,"getUAString");function Vm(){return!/^((?!chrome|android).)*safari/i.test(_p())}i(Vm,"isLayoutViewport");function fs(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var s=e.getBoundingClientRect(),l=1,h=1;t&&_n(e)&&(l=e.offsetWidth>0&&xl(s.width)/e.offsetWidth||1,h=e.offsetHeight>0&&xl(s.height)/e.offsetHeight||1);var d=cs(e)?gr(e):window,v=d.visualViewport,S=!Vm()&&n,b=(s.left+(S&&v?v.offsetLeft:0))/l,k=(s.top+(S&&v?v.offsetTop:0))/h,R=s.width/l,I=s.height/h;return{width:R,height:I,top:k,right:b+R,bottom:k+I,left:b,x:b,y:k}}i(fs,"getBoundingClientRect");function kf(e){var t=fs(e),n=e.offsetWidth,s=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-s)<=1&&(s=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:s}}i(kf,"getLayoutRect");function qm(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Cp(n)){var s=t;do{if(s&&e.isSameNode(s))return!0;s=s.parentNode||s.host}while(s)}return!1}i(qm,"contains");function ki(e){return gr(e).getComputedStyle(e)}i(ki,"getComputedStyle");function i_(e){return["table","td","th"].indexOf(Dn(e))>=0}i(i_,"isTableElement");function Xn(e){return((cs(e)?e.ownerDocument:e.document)||window.document).documentElement}i(Xn,"getDocumentElement");function Cl(e){return Dn(e)==="html"?e:e.assignedSlot||e.parentNode||(Cp(e)?e.host:null)||Xn(e)}i(Cl,"getParentNode");function SL(e){return!_n(e)||ki(e).position==="fixed"?null:e.offsetParent}i(SL,"getTrueOffsetParent");function Sz(e){var t=/firefox/i.test(_p()),n=/Trident/i.test(_p());if(n&&_n(e)){var s=ki(e);if(s.position==="fixed")return null}var l=Cl(e);for(Cp(l)&&(l=l.host);_n(l)&&["html","body"].indexOf(Dn(l))<0;){var h=ki(l);if(h.transform!=="none"||h.perspective!=="none"||h.contain==="paint"||["transform","perspective"].indexOf(h.willChange)!==-1||t&&h.willChange==="filter"||t&&h.filter&&h.filter!=="none")return l;l=l.parentNode}return null}i(Sz,"getContainingBlock");function Us(e){for(var t=gr(e),n=SL(e);n&&i_(n)&&ki(n).position==="static";)n=SL(n);return n&&(Dn(n)==="html"||Dn(n)==="body"&&ki(n).position==="static")?t:n||Sz(e)||t}i(Us,"getOffsetParent");function Nf(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}i(Nf,"getMainAxisFromPlacement");function Pf(e,t,n){return Ws(e,Tf(t,n))}i(Pf,"within");function xL(e,t,n){var s=Pf(e,t,n);return s>n?n:s}i(xL,"withinMaxClamp");function jm(){return{top:0,right:0,bottom:0,left:0}}i(jm,"getFreshSideObject");function Km(e){return Object.assign({},jm(),e)}i(Km,"mergePaddingObject");function Gm(e,t){return t.reduce(function(n,s){return n[s]=e,n},{})}i(Gm,"expandToHashMap");var xz=i(function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Km(typeof t!="number"?t:Gm(t,ju))},"toPaddingObject");function Cz(e){var t,n=e.state,s=e.name,l=e.options,h=n.elements.arrow,d=n.modifiersData.popperOffsets,v=In(n.placement),S=Nf(v),b=[Kr,sn].indexOf(v)>=0,k=b?"height":"width";if(!(!h||!d)){var R=xz(l.padding,n),I=kf(h),z=S==="y"?Dr:Kr,j=S==="y"?Cn:sn,Y=n.rects.reference[k]+n.rects.reference[S]-d[S]-n.rects.popper[k],ne=d[S]-n.rects.reference[S],F=Us(h),L=F?S==="y"?F.clientHeight||0:F.clientWidth||0:0,D=Y/2-ne/2,q=R[z],te=L-I[k]-R[j],Z=L/2-I[k]/2+D,oe=Pf(q,Z,te),he=S;n.modifiersData[s]=(t={},t[he]=oe,t.centerOffset=oe-Z,t)}}i(Cz,"arrow");function _z(e){var t=e.state,n=e.options,s=n.element,l=s===void 0?"[data-popper-arrow]":s;l!=null&&(typeof l=="string"&&(l=t.elements.popper.querySelector(l),!l)||qm(t.elements.popper,l)&&(t.elements.arrow=l))}i(_z,"effect");var CL={name:"arrow",enabled:!0,phase:"main",fn:Cz,effect:_z,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ds(e){return e.split("-")[1]}i(ds,"getVariation");var Ez={top:"auto",right:"auto",bottom:"auto",left:"auto"};function bz(e,t){var n=e.x,s=e.y,l=t.devicePixelRatio||1;return{x:xl(n*l)/l||0,y:xl(s*l)/l||0}}i(bz,"roundOffsetsByDPR");function _L(e){var t,n=e.popper,s=e.popperRect,l=e.placement,h=e.variation,d=e.offsets,v=e.position,S=e.gpuAcceleration,b=e.adaptive,k=e.roundOffsets,R=e.isFixed,I=d.x,z=I===void 0?0:I,j=d.y,Y=j===void 0?0:j,ne=typeof k=="function"?k({x:z,y:Y}):{x:z,y:Y};z=ne.x,Y=ne.y;var F=d.hasOwnProperty("x"),L=d.hasOwnProperty("y"),D=Kr,q=Dr,te=window;if(b){var Z=Us(n),oe="clientHeight",he="clientWidth";if(Z===gr(n)&&(Z=Xn(n),ki(Z).position!=="static"&&v==="absolute"&&(oe="scrollHeight",he="scrollWidth")),Z=Z,l===Dr||(l===Kr||l===sn)&&h===bf){q=Cn;var Re=R&&Z===te&&te.visualViewport?te.visualViewport.height:Z[oe];Y-=Re-s.height,Y*=S?1:-1}if(l===Kr||(l===Dr||l===Cn)&&h===bf){D=sn;var Ee=R&&Z===te&&te.visualViewport?te.visualViewport.width:Z[he];z-=Ee-s.width,z*=S?1:-1}}var Ye=Object.assign({position:v},b&&Ez),tt=k===!0?bz({x:z,y:Y},gr(n)):{x:z,y:Y};if(z=tt.x,Y=tt.y,S){var xe;return Object.assign({},Ye,(xe={},xe[q]=L?"0":"",xe[D]=F?"0":"",xe.transform=(te.devicePixelRatio||1)<=1?"translate("+z+"px, "+Y+"px)":"translate3d("+z+"px, "+Y+"px, 0)",xe))}return Object.assign({},Ye,(t={},t[q]=L?Y+"px":"",t[D]=F?z+"px":"",t.transform="",t))}i(_L,"mapToStyles");function Tz(e){var t=e.state,n=e.options,s=n.gpuAcceleration,l=s===void 0?!0:s,h=n.adaptive,d=h===void 0?!0:h,v=n.roundOffsets,S=v===void 0?!0:v,b={placement:In(t.placement),variation:ds(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:l,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,_L(Object.assign({},b,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:d,roundOffsets:S})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,_L(Object.assign({},b,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:S})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}i(Tz,"computeStyles");var EL={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Tz,data:{}};var A0={passive:!0};function kz(e){var t=e.state,n=e.instance,s=e.options,l=s.scroll,h=l===void 0?!0:l,d=s.resize,v=d===void 0?!0:d,S=gr(t.elements.popper),b=[].concat(t.scrollParents.reference,t.scrollParents.popper);return h&&b.forEach(function(k){k.addEventListener("scroll",n.update,A0)}),v&&S.addEventListener("resize",n.update,A0),function(){h&&b.forEach(function(k){k.removeEventListener("scroll",n.update,A0)}),v&&S.removeEventListener("resize",n.update,A0)}}i(kz,"effect");var bL={name:"eventListeners",enabled:!0,phase:"write",fn:i(function(){},"fn"),effect:kz,data:{}};var Nz={left:"right",right:"left",bottom:"top",top:"bottom"};function Ep(e){return e.replace(/left|right|bottom|top/g,function(t){return Nz[t]})}i(Ep,"getOppositePlacement");var Pz={start:"end",end:"start"};function L0(e){return e.replace(/start|end/g,function(t){return Pz[t]})}i(L0,"getOppositeVariationPlacement");function Af(e){var t=gr(e),n=t.pageXOffset,s=t.pageYOffset;return{scrollLeft:n,scrollTop:s}}i(Af,"getWindowScroll");function Lf(e){return fs(Xn(e)).left+Af(e).scrollLeft}i(Lf,"getWindowScrollBarX");function o_(e,t){var n=gr(e),s=Xn(e),l=n.visualViewport,h=s.clientWidth,d=s.clientHeight,v=0,S=0;if(l){h=l.width,d=l.height;var b=Vm();(b||!b&&t==="fixed")&&(v=l.offsetLeft,S=l.offsetTop)}return{width:h,height:d,x:v+Lf(e),y:S}}i(o_,"getViewportRect");function s_(e){var t,n=Xn(e),s=Af(e),l=(t=e.ownerDocument)==null?void 0:t.body,h=Ws(n.scrollWidth,n.clientWidth,l?l.scrollWidth:0,l?l.clientWidth:0),d=Ws(n.scrollHeight,n.clientHeight,l?l.scrollHeight:0,l?l.clientHeight:0),v=-s.scrollLeft+Lf(e),S=-s.scrollTop;return ki(l||n).direction==="rtl"&&(v+=Ws(n.clientWidth,l?l.clientWidth:0)-h),{width:h,height:d,x:v,y:S}}i(s_,"getDocumentRect");function Mf(e){var t=ki(e),n=t.overflow,s=t.overflowX,l=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+l+s)}i(Mf,"isScrollParent");function M0(e){return["html","body","#document"].indexOf(Dn(e))>=0?e.ownerDocument.body:_n(e)&&Mf(e)?e:M0(Cl(e))}i(M0,"getScrollParent");function Ku(e,t){var n;t===void 0&&(t=[]);var s=M0(e),l=s===((n=e.ownerDocument)==null?void 0:n.body),h=gr(s),d=l?[h].concat(h.visualViewport||[],Mf(s)?s:[]):s,v=t.concat(d);return l?v:v.concat(Ku(Cl(d)))}i(Ku,"listScrollParents");function bp(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}i(bp,"rectToClientRect");function Az(e,t){var n=fs(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}i(Az,"getInnerBoundingClientRect");function TL(e,t,n){return t===N0?bp(o_(e,n)):cs(t)?Az(t,n):bp(s_(Xn(e)))}i(TL,"getClientRectFromMixedType");function Lz(e){var t=Ku(Cl(e)),n=["absolute","fixed"].indexOf(ki(e).position)>=0,s=n&&_n(e)?Us(e):e;return cs(s)?t.filter(function(l){return cs(l)&&qm(l,s)&&Dn(l)!=="body"}):[]}i(Lz,"getClippingParents");function a_(e,t,n,s){var l=t==="clippingParents"?Lz(e):[].concat(t),h=[].concat(l,[n]),d=h[0],v=h.reduce(function(S,b){var k=TL(e,b,s);return S.top=Ws(k.top,S.top),S.right=Tf(k.right,S.right),S.bottom=Tf(k.bottom,S.bottom),S.left=Ws(k.left,S.left),S},TL(e,d,s));return v.width=v.right-v.left,v.height=v.bottom-v.top,v.x=v.left,v.y=v.top,v}i(a_,"getClippingRect");function Ym(e){var t=e.reference,n=e.element,s=e.placement,l=s?In(s):null,h=s?ds(s):null,d=t.x+t.width/2-n.width/2,v=t.y+t.height/2-n.height/2,S;switch(l){case Dr:S={x:d,y:t.y-n.height};break;case Cn:S={x:d,y:t.y+t.height};break;case sn:S={x:t.x+t.width,y:v};break;case Kr:S={x:t.x-n.width,y:v};break;default:S={x:t.x,y:t.y}}var b=l?Nf(l):null;if(b!=null){var k=b==="y"?"height":"width";switch(h){case Sl:S[b]=S[b]-(t[k]/2-n[k]/2);break;case bf:S[b]=S[b]+(t[k]/2-n[k]/2);break;default:}}return S}i(Ym,"computeOffsets");function $s(e,t){t===void 0&&(t={});var n=t,s=n.placement,l=s===void 0?e.placement:s,h=n.strategy,d=h===void 0?e.strategy:h,v=n.boundary,S=v===void 0?gL:v,b=n.rootBoundary,k=b===void 0?N0:b,R=n.elementContext,I=R===void 0?xp:R,z=n.altBoundary,j=z===void 0?!1:z,Y=n.padding,ne=Y===void 0?0:Y,F=Km(typeof ne!="number"?ne:Gm(ne,ju)),L=I===xp?vL:xp,D=e.rects.popper,q=e.elements[j?L:I],te=a_(cs(q)?q:q.contextElement||Xn(e.elements.popper),S,k,d),Z=fs(e.elements.reference),oe=Ym({reference:Z,element:D,strategy:"absolute",placement:l}),he=bp(Object.assign({},D,oe)),Re=I===xp?he:Z,Ee={top:te.top-Re.top+F.top,bottom:Re.bottom-te.bottom+F.bottom,left:te.left-Re.left+F.left,right:Re.right-te.right+F.right},Ye=e.modifiersData.offset;if(I===xp&&Ye){var tt=Ye[l];Object.keys(Ee).forEach(function(xe){var Xe=[sn,Cn].indexOf(xe)>=0?1:-1,je=[Dr,Cn].indexOf(xe)>=0?"y":"x";Ee[xe]+=tt[je]*Xe})}return Ee}i($s,"detectOverflow");function l_(e,t){t===void 0&&(t={});var n=t,s=n.placement,l=n.boundary,h=n.rootBoundary,d=n.padding,v=n.flipVariations,S=n.allowedAutoPlacements,b=S===void 0?P0:S,k=ds(s),R=k?v?n_:n_.filter(function(j){return ds(j)===k}):ju,I=R.filter(function(j){return b.indexOf(j)>=0});I.length===0&&(I=R);var z=I.reduce(function(j,Y){return j[Y]=$s(e,{placement:Y,boundary:l,rootBoundary:h,padding:d})[In(Y)],j},{});return Object.keys(z).sort(function(j,Y){return z[j]-z[Y]})}i(l_,"computeAutoPlacement");function Mz(e){if(In(e)===k0)return[];var t=Ep(e);return[L0(e),t,L0(t)]}i(Mz,"getExpandedFallbackPlacements");function Oz(e){var t=e.state,n=e.options,s=e.name;if(!t.modifiersData[s]._skip){for(var l=n.mainAxis,h=l===void 0?!0:l,d=n.altAxis,v=d===void 0?!0:d,S=n.fallbackPlacements,b=n.padding,k=n.boundary,R=n.rootBoundary,I=n.altBoundary,z=n.flipVariations,j=z===void 0?!0:z,Y=n.allowedAutoPlacements,ne=t.options.placement,F=In(ne),L=F===ne,D=S||(L||!j?[Ep(ne)]:Mz(ne)),q=[ne].concat(D).reduce(function(yr,wr){return yr.concat(In(wr)===k0?l_(t,{placement:wr,boundary:k,rootBoundary:R,padding:b,flipVariations:j,allowedAutoPlacements:Y}):wr)},[]),te=t.rects.reference,Z=t.rects.popper,oe=new Map,he=!0,Re=q[0],Ee=0;Ee=0,je=Xe?"width":"height",Qe=$s(t,{placement:Ye,boundary:k,rootBoundary:R,altBoundary:I,padding:b}),ot=Xe?xe?sn:Kr:xe?Cn:Dr;te[je]>Z[je]&&(ot=Ep(ot));var It=Ep(ot),Pt=[];if(h&&Pt.push(Qe[tt]<=0),v&&Pt.push(Qe[ot]<=0,Qe[It]<=0),Pt.every(function(yr){return yr})){Re=Ye,he=!1;break}oe.set(Ye,Pt)}if(he)for(var fn=j?3:1,dn=i(function(wr){var Gt=q.find(function(Ft){var se=oe.get(Ft);if(se)return se.slice(0,wr).every(function(We){return We})});if(Gt)return Re=Gt,"break"},"_loop"),vr=fn;vr>0;vr--){var Ut=dn(vr);if(Ut==="break")break}t.placement!==Re&&(t.modifiersData[s]._skip=!0,t.placement=Re,t.reset=!0)}}i(Oz,"flip");var kL={name:"flip",enabled:!0,phase:"main",fn:Oz,requiresIfExists:["offset"],data:{_skip:!1}};function NL(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}i(NL,"getSideOffsets");function PL(e){return[Dr,sn,Cn,Kr].some(function(t){return e[t]>=0})}i(PL,"isAnySideFullyClipped");function Rz(e){var t=e.state,n=e.name,s=t.rects.reference,l=t.rects.popper,h=t.modifiersData.preventOverflow,d=$s(t,{elementContext:"reference"}),v=$s(t,{altBoundary:!0}),S=NL(d,s),b=NL(v,l,h),k=PL(S),R=PL(b);t.modifiersData[n]={referenceClippingOffsets:S,popperEscapeOffsets:b,isReferenceHidden:k,hasPopperEscaped:R},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":k,"data-popper-escaped":R})}i(Rz,"hide");var AL={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Rz};function Dz(e,t,n){var s=In(e),l=[Kr,Dr].indexOf(s)>=0?-1:1,h=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,d=h[0],v=h[1];return d=d||0,v=(v||0)*l,[Kr,sn].indexOf(s)>=0?{x:v,y:d}:{x:d,y:v}}i(Dz,"distanceAndSkiddingToXY");function Iz(e){var t=e.state,n=e.options,s=e.name,l=n.offset,h=l===void 0?[0,0]:l,d=P0.reduce(function(k,R){return k[R]=Dz(R,t.rects,h),k},{}),v=d[t.placement],S=v.x,b=v.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=S,t.modifiersData.popperOffsets.y+=b),t.modifiersData[s]=d}i(Iz,"offset");var LL={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Iz};function Fz(e){var t=e.state,n=e.name;t.modifiersData[n]=Ym({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}i(Fz,"popperOffsets");var ML={name:"popperOffsets",enabled:!0,phase:"read",fn:Fz,data:{}};function u_(e){return e==="x"?"y":"x"}i(u_,"getAltAxis");function Hz(e){var t=e.state,n=e.options,s=e.name,l=n.mainAxis,h=l===void 0?!0:l,d=n.altAxis,v=d===void 0?!1:d,S=n.boundary,b=n.rootBoundary,k=n.altBoundary,R=n.padding,I=n.tether,z=I===void 0?!0:I,j=n.tetherOffset,Y=j===void 0?0:j,ne=$s(t,{boundary:S,rootBoundary:b,padding:R,altBoundary:k}),F=In(t.placement),L=ds(t.placement),D=!L,q=Nf(F),te=u_(q),Z=t.modifiersData.popperOffsets,oe=t.rects.reference,he=t.rects.popper,Re=typeof Y=="function"?Y(Object.assign({},t.rects,{placement:t.placement})):Y,Ee=typeof Re=="number"?{mainAxis:Re,altAxis:Re}:Object.assign({mainAxis:0,altAxis:0},Re),Ye=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,tt={x:0,y:0};if(Z){if(h){var xe,Xe=q==="y"?Dr:Kr,je=q==="y"?Cn:sn,Qe=q==="y"?"height":"width",ot=Z[q],It=ot+ne[Xe],Pt=ot-ne[je],fn=z?-he[Qe]/2:0,dn=L===Sl?oe[Qe]:he[Qe],vr=L===Sl?-he[Qe]:-oe[Qe],Ut=t.elements.arrow,yr=z&&Ut?kf(Ut):{width:0,height:0},wr=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:jm(),Gt=wr[Xe],Ft=wr[je],se=Pf(0,oe[Qe],yr[Qe]),We=D?oe[Qe]/2-fn-se-Gt-Ee.mainAxis:dn-se-Gt-Ee.mainAxis,Yr=D?-oe[Qe]/2+fn+se+Ft+Ee.mainAxis:vr+se+Ft+Ee.mainAxis,Zt=t.elements.arrow&&Us(t.elements.arrow),st=Zt?q==="y"?Zt.clientTop||0:Zt.clientLeft||0:0,Fe=(xe=Ye?.[q])!=null?xe:0,Fn=ot+We-Fe-st,bn=ot+Yr-Fe,no=Pf(z?Tf(It,Fn):It,ot,z?Ws(Pt,bn):Pt);Z[q]=no,tt[q]=no-ot}if(v){var Bo,lt=q==="x"?Dr:Kr,Sr=q==="x"?Cn:sn,dr=Z[te],pt=te==="y"?"height":"width",io=dr+ne[lt],Hn=dr-ne[Sr],Mi=[Dr,Kr].indexOf(F)!==-1,Xr=(Bo=Ye?.[te])!=null?Bo:0,Qr=Mi?io:dr-oe[pt]-he[pt]-Xr+Ee.altAxis,oo=Mi?dr+oe[pt]+he[pt]-Xr-Ee.altAxis:Hn,hi=z&&Mi?xL(Qr,dr,oo):Pf(z?Qr:io,dr,z?oo:Hn);Z[te]=hi,tt[te]=hi-dr}t.modifiersData[s]=tt}}i(Hz,"preventOverflow");var OL={name:"preventOverflow",enabled:!0,phase:"main",fn:Hz,requiresIfExists:["offset"]};function c_(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}i(c_,"getHTMLElementScroll");function f_(e){return e===gr(e)||!_n(e)?Af(e):c_(e)}i(f_,"getNodeScroll");function Bz(e){var t=e.getBoundingClientRect(),n=xl(t.width)/e.offsetWidth||1,s=xl(t.height)/e.offsetHeight||1;return n!==1||s!==1}i(Bz,"isElementScaled");function d_(e,t,n){n===void 0&&(n=!1);var s=_n(t),l=_n(t)&&Bz(t),h=Xn(t),d=fs(e,l,n),v={scrollLeft:0,scrollTop:0},S={x:0,y:0};return(s||!s&&!n)&&((Dn(t)!=="body"||Mf(h))&&(v=f_(t)),_n(t)?(S=fs(t,!0),S.x+=t.clientLeft,S.y+=t.clientTop):h&&(S.x=Lf(h))),{x:d.left+v.scrollLeft-S.x,y:d.top+v.scrollTop-S.y,width:d.width,height:d.height}}i(d_,"getCompositeRect");function zz(e){var t=new Map,n=new Set,s=[];e.forEach(function(h){t.set(h.name,h)});function l(h){n.add(h.name);var d=[].concat(h.requires||[],h.requiresIfExists||[]);d.forEach(function(v){if(!n.has(v)){var S=t.get(v);S&&l(S)}}),s.push(h)}return i(l,"sort"),e.forEach(function(h){n.has(h.name)||l(h)}),s}i(zz,"order");function p_(e){var t=zz(e);return yL.reduce(function(n,s){return n.concat(t.filter(function(l){return l.phase===s}))},[])}i(p_,"orderModifiers");function h_(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}i(h_,"debounce");function m_(e){var t=e.reduce(function(n,s){var l=n[s.name];return n[s.name]=l?Object.assign({},l,s,{options:Object.assign({},l.options,s.options),data:Object.assign({},l.data,s.data)}):s,n},{});return Object.keys(t).map(function(n){return t[n]})}i(m_,"mergeByName");var RL={placement:"bottom",modifiers:[],strategy:"absolute"};function DL(){for(var e=arguments.length,t=new Array(e),n=0;nNi.default.createElement("li",{role:"separator",className:"divider"}),"Divider");function li({onClick:e,children:t,...n}){return Ni.default.createElement("li",null,Ni.default.createElement("a",{href:"#",onClick:i(l=>{l.preventDefault(),e()},"click"),...n},t))}i(li,"MenuItem");var Yu=Ni.default.memo(i(function({text:t,children:n,options:s,className:l,onOpen:h,...d}){let[v,S]=(0,Ni.useState)(null),[b,k]=(0,Ni.useState)(!1),[R,I]=(0,Ni.useState)(null),{styles:z,attributes:j}=v_(v,R,{...s}),Y=i(F=>{k(F),h&&h(F)},"setOpen");(0,Ni.useEffect)(()=>{R&&document.addEventListener("click",F=>{R.contains(F.target)?document.addEventListener("click",()=>Y(!1),{once:!0}):(F.preventDefault(),F.stopPropagation(),Y(!1))},{once:!0,capture:!0})},[R]);let ne;return b?ne=Ni.default.createElement("ul",{className:"dropdown-menu show",ref:I,style:z.popper,...j.popper},n):ne=null,Ni.default.createElement(Ni.default.Fragment,null,Ni.default.createElement("a",{href:"#",ref:S,className:(0,WL.default)(l,{open:b}),onClick:F=>{F.preventDefault(),Y(!0)},...d},t),ne)},"Dropdown"));function Xm({value:e,onChange:t}){let n=me(l=>l.backendState.contentViews||[]),s=Of.default.createElement("span",null,Of.default.createElement("i",{className:"fa fa-fw fa-files-o"}),"\xA0",Of.default.createElement("b",null,"View:")," ",e.toLowerCase()," ",Of.default.createElement("span",{className:"caret"}));return Of.default.createElement(Yu,{text:s,className:"btn btn-default btn-xs",options:{placement:"top-end"}},n.map(l=>Of.default.createElement(li,{key:l,onClick:()=>t(l)},l.toLowerCase().replace("_"," "))))}i(Xm,"ViewSelector");function w_({flow:e,message:t}){let n=He(),s=e.request===t?"request":"response",l=me(j=>j.ui.flow.contentViewFor[e.id+s]||"Auto"),h=(0,ir.useRef)(null),[d,v]=(0,ir.useState)(me(j=>j.options.content_view_lines_cutoff)),S=(0,ir.useCallback)(()=>v(Math.max(1024,d*2)),[d]),[b,k]=(0,ir.useState)(!1),R;b?R=Rn.getContentURL(e,t):R=Rn.getContentURL(e,t,l,d+1);let I=_0(R,t.contentHash),z=(0,ir.useMemo)(()=>{if(I&&!b)try{return JSON.parse(I)}catch{return{description:"Network Error",lines:[[["error",`${I}`]]]}}else return},[I]);if(b)return ir.default.createElement("div",{className:"contentview",key:"edit"},ir.default.createElement("div",{className:"controls"},ir.default.createElement("h5",null,"[Editing]"),ir.default.createElement(Rr,{onClick:i(async()=>{let Y=h.current?.getContent();await n(si(e,{[s]:{content:Y}})),k(!1)},"save"),icon:"fa-check text-success",className:"btn-xs"},"Done"),"\xA0",ir.default.createElement(Rr,{onClick:()=>k(!1),icon:"fa-times text-danger",className:"btn-xs"},"Cancel")),ir.default.createElement($m,{ref:h,initialContent:I||""}));{let j=z?z.description:"Loading...";return ir.default.createElement("div",{className:"contentview",key:"view"},ir.default.createElement("div",{className:"controls"},ir.default.createElement("h5",null,j),ir.default.createElement(Rr,{onClick:()=>k(!0),icon:"fa-edit",className:"btn-xs"},"Edit"),"\xA0",ir.default.createElement(E0,{icon:"fa-upload",text:"Replace",title:"Upload a file to replace the content.",onOpenFile:Y=>n(gA(e,Y,s)),className:"btn btn-default btn-xs"}),"\xA0",ir.default.createElement(Xm,{value:l,onChange:Y=>n(Yy({messageId:e.id+s,contentView:Y}))})),y_.matches(t)&&ir.default.createElement(y_,{flow:e,message:t}),ir.default.createElement(b0,{lines:z?.lines||[],maxLines:d,showMore:S}))}}i(w_,"HttpMessage");var Kz=/^image\/(png|jpe?g|gif|webp|vnc.microsoft.icon|x-icon|svg\+xml)$/i;y_.matches=e=>Kz.test(Rn.getContentType(e)||"");function y_({flow:e,message:t}){return ir.default.createElement("div",{className:"flowview-image"},ir.default.createElement("img",{src:Rn.getContentURL(e,t),alt:"preview",className:"img-thumbnail"}))}i(y_,"ViewImage");function Gz({flow:e}){let t=He();return qt.createElement("div",{className:"first-line request-line"},qt.createElement("div",null,qt.createElement(xf,{content:e.request.method,onEditDone:n=>t(si(e,{request:{method:n}})),isValid:n=>n.length>0}),"\xA0",qt.createElement(xf,{content:zs.pretty_url(e.request),onEditDone:n=>t(si(e,{request:{path:"",...eC(n)}})),isValid:n=>!!eC(n)?.host}),"\xA0",qt.createElement(xf,{content:e.request.http_version,onEditDone:n=>t(si(e,{request:{http_version:n}})),isValid:tC})))}i(Gz,"RequestLine");function Yz({flow:e}){let t=He();return qt.createElement("div",{className:"first-line response-line"},qt.createElement(xf,{content:e.response.http_version,onEditDone:n=>t(si(e,{response:{http_version:n}})),isValid:tC}),"\xA0",qt.createElement(xf,{content:e.response.status_code+"",onEditDone:n=>t(si(e,{response:{code:parseInt(n)}})),isValid:n=>/^\d+$/.test(n)}),e.response.http_version!=="HTTP/2.0"&&qt.createElement(qt.Fragment,null,"\xA0",qt.createElement(gt,{content:e.response.reason,onEditDone:n=>t(si(e,{response:{msg:n}}))})))}i(Yz,"ResponseLine");function Xz({flow:e,message:t}){let n=He(),s=e.request===t?"request":"response";return qt.createElement(wp,{className:"headers",data:t.headers,onChange:l=>n(si(e,{[s]:{headers:l}}))})}i(Xz,"Headers");function Qz({flow:e,message:t}){let n=He(),s=e.request===t?"request":"response";return!Rn.get_first_header(t,/^trailer$/i)?null:qt.createElement(qt.Fragment,null,qt.createElement("hr",null),qt.createElement("h5",null,"HTTP Trailers"),qt.createElement(wp,{className:"trailers",data:t.trailers,onChange:h=>n(si(e,{[s]:{trailers:h}}))}))}i(Qz,"Trailers");var $L=qt.memo(i(function({flow:t,message:n}){let s=t.request===n?"request":"response",l=t.request===n?Gz:Yz;return qt.createElement("section",{className:s},qt.createElement(l,{flow:t}),qt.createElement(Xz,{flow:t,message:n}),qt.createElement("hr",null),qt.createElement(w_,{key:t.id+s,flow:t,message:n}),qt.createElement(Qz,{flow:t,message:n}))},"Message"));function S_(){let e=me(t=>t.flows.byId[t.flows.selected[0]]);return qt.createElement($L,{flow:e,message:e.request})}i(S_,"Request");S_.displayName="Request";function x_(){let e=me(t=>t.flows.byId[t.flows.selected[0]]);return qt.createElement($L,{flow:e,message:e.response})}i(x_,"Response");x_.displayName="Response";var et=de(be());var Jz=i(({message:e})=>et.createElement("div",null,e.query?e.op_code:e.response_code,"\xA0",e.truncation?"(Truncated)":""),"Summary"),Zz=i(({message:e})=>et.createElement(et.Fragment,null,et.createElement("h5",null,e.recursion_desired?"Recursive ":"","Question"),et.createElement("table",null,et.createElement("thead",null,et.createElement("tr",null,et.createElement("th",null,"Name"),et.createElement("th",null,"Type"),et.createElement("th",null,"Class"))),et.createElement("tbody",null,e.questions.map((t,n)=>et.createElement("tr",{key:n},et.createElement("td",null,t.name),et.createElement("td",null,t.type),et.createElement("td",null,t.class)))))),"Questions"),C_=i(({name:e,values:t})=>et.createElement(et.Fragment,null,et.createElement("h5",null,e),t.length>0?et.createElement("table",null,et.createElement("thead",null,et.createElement("tr",null,et.createElement("th",null,"Name"),et.createElement("th",null,"Type"),et.createElement("th",null,"Class"),et.createElement("th",null,"TTL"),et.createElement("th",null,"Data"))),et.createElement("tbody",null,t.map((n,s)=>et.createElement("tr",{key:s},et.createElement("td",null,n.name),et.createElement("td",null,n.type),et.createElement("td",null,n.class),et.createElement("td",null,n.ttl),et.createElement("td",null,n.data))))):"\u2014"),"ResourceRecords"),VL=i(({type:e,message:t})=>et.createElement("section",{className:"dns-"+e},et.createElement("div",{className:`first-line ${e}-line`},et.createElement(Jz,{message:t})),et.createElement(Zz,{message:t}),et.createElement("hr",null),et.createElement(C_,{name:`${t.authoritative_answer?"Authoritative ":""}${t.recursion_available?"Recursive ":""}Answer`,values:t.answers}),et.createElement("hr",null),et.createElement(C_,{name:"Authority",values:t.authorities}),et.createElement("hr",null),et.createElement(C_,{name:"Additional",values:t.additionals})),"Message");function __(){let e=me(t=>t.flows.byId[t.flows.selected[0]]);return et.createElement(VL,{type:"request",message:e.request})}i(__,"Request");__.displayName="Request";function E_(){let e=me(t=>t.flows.byId[t.flows.selected[0]]);return et.createElement(VL,{type:"response",message:e.response})}i(E_,"Response");E_.displayName="Response";var Te=de(be());function qL({conn:e}){let t=null;return"address"in e?t=Te.createElement(Te.Fragment,null,Te.createElement("tr",null,Te.createElement("td",null,"Address:"),Te.createElement("td",null,e.address?.join(":"))),e.peername&&Te.createElement("tr",null,Te.createElement("td",null,"Resolved address:"),Te.createElement("td",null,e.peername.join(":"))),e.sockname&&Te.createElement("tr",null,Te.createElement("td",null,"Source address:"),Te.createElement("td",null,e.sockname.join(":")))):e.peername?.[0]&&(t=Te.createElement(Te.Fragment,null,Te.createElement("tr",null,Te.createElement("td",null,"Address:"),Te.createElement("td",null,e.peername?.join(":"))))),Te.createElement("table",{className:"connection-table"},Te.createElement("tbody",null,t,e.sni?Te.createElement("tr",null,Te.createElement("td",null,Te.createElement("abbr",{title:"TLS Server Name Indication"},"SNI"),":"),Te.createElement("td",null,e.sni)):null,e.alpn?Te.createElement("tr",null,Te.createElement("td",null,Te.createElement("abbr",{title:"ALPN protocol negotiated"},"ALPN"),":"),Te.createElement("td",null,e.alpn)):null,e.tls_version?Te.createElement("tr",null,Te.createElement("td",null,"TLS Version:"),Te.createElement("td",null,e.tls_version)):null,e.cipher?Te.createElement("tr",null,Te.createElement("td",null,"TLS Cipher:"),Te.createElement("td",null,e.cipher)):null))}i(qL,"ConnectionInfo");function jL(e){return Te.createElement("dl",{className:"cert-attributes"},e.map(([t,n])=>Te.createElement(Te.Fragment,{key:t},Te.createElement("dt",null,t),Te.createElement("dd",null,n))))}i(jL,"attrList");function eW({flow:e}){let t=e.server_conn?.cert;return t?Te.createElement(Te.Fragment,null,Te.createElement("h4",{key:"name"},"Server Certificate"),Te.createElement("table",{className:"certificate-table"},Te.createElement("tbody",null,Te.createElement("tr",null,Te.createElement("td",null,"Type"),Te.createElement("td",null,t.keyinfo[0],", ",t.keyinfo[1]," bits")),Te.createElement("tr",null,Te.createElement("td",null,"SHA256 digest"),Te.createElement("td",null,t.sha256)),Te.createElement("tr",null,Te.createElement("td",null,"Valid from"),Te.createElement("td",null,Do(t.notbefore,{milliseconds:!1}))),Te.createElement("tr",null,Te.createElement("td",null,"Valid to"),Te.createElement("td",null,Do(t.notafter,{milliseconds:!1}))),Te.createElement("tr",null,Te.createElement("td",null,"Subject Alternative Names"),Te.createElement("td",null,t.altnames.join(", "))),Te.createElement("tr",null,Te.createElement("td",null,"Subject"),Te.createElement("td",null,jL(t.subject))),Te.createElement("tr",null,Te.createElement("td",null,"Issuer"),Te.createElement("td",null,jL(t.issuer))),Te.createElement("tr",null,Te.createElement("td",null,"Serial"),Te.createElement("td",null,t.serial))))):Te.createElement(Te.Fragment,null)}i(eW,"CertificateInfo");function R0({flow:e}){return Te.createElement("section",{className:"detail"},Te.createElement("h4",null,"Client Connection"),Te.createElement(qL,{conn:e.client_conn}),e.server_conn?.address&&Te.createElement(Te.Fragment,null,Te.createElement("h4",null,"Server Connection"),Te.createElement(qL,{conn:e.server_conn})),Te.createElement(eW,{flow:e}))}i(R0,"Connection");R0.displayName="Connection";var Qm=de(be());function D0({flow:e}){return Qm.createElement("section",{className:"error"},Qm.createElement("div",{className:"alert alert-warning"},e.error.msg,Qm.createElement("div",null,Qm.createElement("small",null,Do(e.error.timestamp)))))}i(D0,"Error");D0.displayName="Error";var Vs=de(be());function tW({t:e,deltaTo:t,title:n}){return e?Vs.createElement("tr",null,Vs.createElement("td",null,n,":"),Vs.createElement("td",null,Do(e),t&&Vs.createElement("span",{className:"text-muted"},"(",Qy(1e3*(e-t)),")"))):Vs.createElement("tr",null)}i(tW,"TimeStamp");function I0({flow:e}){let t;e.type==="http"?t=e.request.timestamp_start:t=e.client_conn.timestamp_start;let n=[{title:"Server conn. initiated",t:e.server_conn?.timestamp_start,deltaTo:t},{title:"Server conn. TCP handshake",t:e.server_conn?.timestamp_tcp_setup,deltaTo:t},{title:"Server conn. TLS handshake",t:e.server_conn?.timestamp_tls_setup,deltaTo:t},{title:"Server conn. closed",t:e.server_conn?.timestamp_end,deltaTo:t},{title:"Client conn. established",t:e.client_conn.timestamp_start,deltaTo:e.type==="http"?t:void 0},{title:"Client conn. TLS handshake",t:e.client_conn.timestamp_tls_setup,deltaTo:t},{title:"Client conn. closed",t:e.client_conn.timestamp_end,deltaTo:t}];return e.type==="http"&&n.push({title:"First request byte",t:e.request.timestamp_start},{title:"Request complete",t:e.request.timestamp_end,deltaTo:t},{title:"First response byte",t:e.response?.timestamp_start,deltaTo:t},{title:"Response complete",t:e.response?.timestamp_end,deltaTo:t}),Vs.createElement("section",{className:"timing"},Vs.createElement("h4",null,"Timing"),Vs.createElement("table",{className:"timing-table"},Vs.createElement("tbody",null,n.filter(s=>!!s.t).sort((s,l)=>s.t-l.t).map(({title:s,t:l,deltaTo:h})=>Vs.createElement(tW,{key:s,title:s,t:l,deltaTo:h})))))}i(I0,"Timing");I0.displayName="Timing";var Xu=de(be());var Ea=de(be()),Tp=de(be());function Rf({flow:e,messages_meta:t}){let n=He(),s=me(k=>k.ui.flow.contentViewFor[e.id+"messages"]||"Auto"),[l,h]=(0,Tp.useState)(me(k=>k.options.content_view_lines_cutoff)),d=(0,Tp.useCallback)(()=>h(Math.max(1024,l*2)),[l]),v=_0(Rn.getContentURL(e,"messages",s,l+1),e.id+t.count),S=(0,Tp.useMemo)(()=>{if(v)try{return JSON.parse(v)}catch{return[{description:"Network Error",lines:[[["error",`${v}`]]]}]}},[v])||[],b=l;return Ea.createElement("div",{className:"contentview"},Ea.createElement("div",{className:"controls"},Ea.createElement("h5",null,t.count," Messages"),Ea.createElement(Xm,{value:s,onChange:k=>n(Yy({messageId:e.id+"messages",contentView:k}))})),S.map((k,R)=>{let I=`fa fa-fw fa-arrow-${k.from_client?"right text-primary":"left text-danger"}`,z=Ea.createElement("div",{key:R},Ea.createElement("small",null,Ea.createElement("i",{className:I}),Ea.createElement("span",{className:"pull-right"},k.timestamp&&Do(k.timestamp))),Ea.createElement(b0,{lines:k.lines,maxLines:b,showMore:d}));return b-=k.lines.length,z}))}i(Rf,"Messages");function F0({flow:e}){return Xu.createElement("section",{className:"websocket"},Xu.createElement("h4",null,"WebSocket"),Xu.createElement(Rf,{flow:e,messages_meta:e.websocket.messages_meta}),Xu.createElement(rW,{websocket:e.websocket}))}i(F0,"WebSocket");F0.displayName="WebSocket";function rW({websocket:e}){if(!e.timestamp_end)return null;let t=e.close_reason?`(${e.close_reason})`:"";return Xu.createElement("div",null,Xu.createElement("i",{className:"fa fa-fw fa-window-close text-muted"}),"\xA0 Closed by ",e.closed_by_client?"client":"server"," ","with code ",e.close_code," ",t,".",Xu.createElement("small",{className:"pull-right"},Do(e.timestamp_end)))}i(rW,"CloseSummary");var H0=de(be());function B0({flow:e}){let t=He();return H0.createElement("section",{className:"timing"},H0.createElement("h4",null,"Comment"),H0.createElement(gt,{className:"kv-value",content:e.comment,onEditDone:n=>{t(si(e,{comment:n}))},placeholder:"empty"}))}i(B0,"Comment");B0.displayName="Comment";var GL=de(ai());var b_=de(be());function z0({flow:e}){return b_.createElement("section",{className:"tcp"},b_.createElement(Rf,{flow:e,messages_meta:e.messages_meta}))}i(z0,"TcpMessages");z0.displayName="Stream Data";var T_=de(be());function W0({flow:e}){return T_.createElement("section",{className:"udp"},T_.createElement(Rf,{flow:e,messages_meta:e.messages_meta}))}i(W0,"UdpMessages");W0.displayName="Datagrams";var KL={request:S_,response:x_,error:D0,connection:R0,timing:I0,websocket:F0,tcpmessages:z0,udpmessages:W0,dnsrequest:__,dnsresponse:E_,comment:B0};function U0(e){let t;switch(e.type){case"http":t=["request","response","websocket"].filter(n=>e[n]);break;case"tcp":t=["tcpmessages"];break;case"udp":t=["udpmessages"];break;case"dns":t=["request","response"].filter(n=>e[n]).map(n=>"dns"+n);break}return e.error&&t.push("error"),t.push("connection"),t.push("timing"),t.push("comment"),t}i(U0,"tabsForFlow");function k_(){let e=He(),t=me(h=>h.flows.byId[h.flows.selected[0]]),n=me(h=>h.ui.flow.tab);if(t==null)return ba.createElement(ba.Fragment,null);let s=U0(t);s.indexOf(n)<0&&(n==="response"&&t.error?n="error":n==="error"&&"response"in t?n="response":n=s[0]);let l=KL[n];return ba.createElement("div",{className:"flow-detail"},ba.createElement("nav",{className:"nav-tabs nav-tabs-sm"},ba.createElement("button",{"data-testid":"close-button-id",className:"close-button",onClick:()=>e(yl(void 0))},ba.createElement("i",{className:"fa fa-times-circle"})),s.map(h=>ba.createElement("a",{key:h,href:"#",className:(0,GL.default)({active:n===h}),onClick:d=>{d.preventDefault(),e(vf(h))}},KL[h].displayName))),ba.createElement(l,{flow:t}))}i(k_,"FlowView");function YL(e){if(e.ctrlKey||e.metaKey)return()=>{};let t=e.key;return e.preventDefault(),(n,s)=>{let l=s().flows,h=l.byId[s().flows.selected[0]];switch(t){case"k":case"ArrowUp":n(Sf(l,-1));break;case"j":case"ArrowDown":n(Sf(l,1));break;case" ":case"PageDown":n(Sf(l,10));break;case"PageUp":n(Sf(l,-10));break;case"End":n(Sf(l,1e10));break;case"Home":n(Sf(l,-1e10));break;case"Escape":s().ui.modal.activeModal?n(u0()):n(yl(void 0));break;case"ArrowLeft":{if(!h)break;let d=U0(h),v=s().ui.flow.tab,S=d[(Math.max(0,d.indexOf(v))-1+d.length)%d.length];n(vf(S));break}case"Tab":case"ArrowRight":{if(!h)break;let d=U0(h),v=s().ui.flow.tab,S=d[(Math.max(0,d.indexOf(v))+1)%d.length];n(vf(S));break}case"Delete":case"d":{if(!h)return;n(o0(h));break}case"n":{yf("view.flows.create","get","https://example.com/");break}case"D":{if(!h)return;n(s0(h));break}case"a":{h&&h.intercepted&&n(fp(h));break}case"A":{n(n0());break}case"r":{h&&n(dp(h));break}case"v":{h&&h.modified&&n(a0(h));break}case"x":{h&&h.intercepted&&n(i0(h));break}case"X":{n(mA());break}case"z":{n(l0());break}default:return}}}i(YL,"onKeyDown");var Ta=de(be());var kp=de(be()),XL=de(ai());var Jm=class extends kp.Component{constructor(n,s){super(n,s);this.node=kp.default.createRef();this.state={applied:!1,startPos:0,dragPointer:.1},this.onLostPointerCapture=this.onLostPointerCapture.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this)}static{i(this,"Splitter")}static{this.defaultProps={axis:"x"}}onPointerDown(n){this.state.dragPointer===.1&&(n.target.setPointerCapture(n.pointerId),this.setState({startPos:this.props.axis==="x"?n.pageX:n.pageY,dragPointer:n.pointerId}))}onLostPointerCapture(n){if(this.state.dragPointer!==n.pointerId)return;let s=this.node.current,l=s.previousElementSibling,h=s.nextElementSibling;s.style.transform="",l.style.flex=`0 0 ${Math.max(0,(this.props.axis==="x"?l.offsetWidth+n.pageX:l.offsetHeight+n.pageY)-this.state.startPos)}px`,h.style.flex="1 1 auto",this.setState({applied:!0,dragPointer:.1}),this.onResize()}onPointerMove(n){this.state.dragPointer===n.pointerId&&(this.node.current.style.transform=this.props.axis==="x"?`translateX(${n.pageX-this.state.startPos}px)`:`translateY(${n.pageY-this.state.startPos}px)`)}onResize(){window.setTimeout(()=>window.dispatchEvent(new CustomEvent("resize")),1)}reset(n){this.state.applied&&(this.node.current?.previousElementSibling instanceof HTMLElement&&(this.node.current.previousElementSibling.style.flex=""),this.node.current?.nextElementSibling instanceof HTMLElement&&(this.node.current.nextElementSibling.style.flex=""),n||this.setState({applied:!1}),this.onResize())}componentWillUnmount(){this.reset(!0)}render(){return kp.default.createElement("div",{ref:this.node,className:(0,XL.default)("splitter",this.props.axis==="x"?"splitter-x":"splitter-y")},kp.default.createElement("div",{onLostPointerCapture:this.onLostPointerCapture,onPointerDown:this.onPointerDown,onPointerMove:this.onPointerMove}))}};var Qi=de(be());var Zm=i(e=>{let t=e.current;return t===null||t.scrollTop===0?!1:Math.ceil(t.scrollTop)+t.clientHeight>=t.scrollHeight},"isAtBottom"),$0=i(e=>{e.current&&!Zm(e)&&(e.current.scrollTop=e.current.scrollHeight)},"adjustScrollTop");function Df(e=void 0){if(!e)return{start:0,end:0,paddingTop:0,paddingBottom:0};let{itemCount:t,rowHeight:n,viewportTop:s,viewportHeight:l,itemHeights:h}=e,d=s+l,v=0,S=0,b=0,k=0;if(h){let R=0;for(let I=0;I0&&RB_,default:()=>iW,icon:()=>L_,index:()=>A_,method:()=>O_,path:()=>M_,quickactions:()=>If,size:()=>I_,status:()=>D_,time:()=>F_,timestamp:()=>H_,tls:()=>P_,version:()=>R_});var Jt=de(be());var N_=de(ai());var P_=i(({flow:e})=>Jt.default.createElement("td",{className:(0,N_.default)("col-tls",e.client_conn.tls_established?"col-tls-https":"col-tls-http")}),"tls");P_.headerName="";var A_=i(({flow:e})=>{let t=me(n=>n.flows.listIndex[e.id]);return Jt.default.createElement("td",{className:"col-index"},t+1)},"index");A_.headerName="#";var L_=i(({flow:e})=>Jt.default.createElement("td",{className:"col-icon"},Jt.default.createElement("div",{className:(0,N_.default)("resource-icon",iC(e))})),"icon");L_.headerName="";var M_=i(({flow:e})=>{let t;return e.error&&(e.error.msg==="Connection killed."?t=Jt.default.createElement("i",{className:"fa fa-fw fa-times pull-right"}):t=Jt.default.createElement("i",{className:"fa fa-fw fa-exclamation pull-right"})),Jt.default.createElement("td",{className:"col-path"},e.is_replay==="request"&&Jt.default.createElement("i",{className:"fa fa-fw fa-repeat pull-right"}),e.intercepted&&Jt.default.createElement("i",{className:"fa fa-fw fa-pause pull-right"}),t,Jt.default.createElement("span",{className:"marker pull-right"},e.marked),oC(e))},"path");M_.headerName="Path";var O_=i(({flow:e})=>Jt.default.createElement("td",{className:"col-method"},aC(e)),"method");O_.headerName="Method";var R_=i(({flow:e})=>Jt.default.createElement("td",{className:"col-http-version"},lC(e)),"version");R_.headerName="Version";var D_=i(({flow:e})=>{let t="darkred";return e.type!=="http"&&e.type!="dns"||!e.response?Jt.default.createElement("td",{className:"col-status"}):(100<=e.response.status_code&&e.response.status_code<200?t="green":200<=e.response.status_code&&e.response.status_code<300?t="darkgreen":300<=e.response.status_code&&e.response.status_code<400?t="lightblue":(400<=e.response.status_code&&e.response.status_code<500||500<=e.response.status_code&&e.response.status_code<600)&&(t="red"),Jt.default.createElement("td",{className:"col-status",style:{color:t}},sC(e)))},"status");D_.headerName="Status";var I_=i(({flow:e})=>Jt.default.createElement("td",{className:"col-size"},Xy(nC(e))),"size");I_.headerName="Size";var F_=i(({flow:e})=>{let t=Dm(e),n=rC(e);return Jt.default.createElement("td",{className:"col-time"},t&&n?Qy(1e3*(n-t)):"...")},"time");F_.headerName="Time";var H_=i(({flow:e})=>{let t=Dm(e);return Jt.default.createElement("td",{className:"col-timestamp"},t?Do(t):"...")},"timestamp");H_.headerName="Start time";var If=i(({flow:e})=>{let t=He(),n=null;return e.intercepted?n=Jt.default.createElement("a",{href:"#",className:"quickaction",onClick:()=>t(fp(e))},Jt.default.createElement("i",{className:"fa fa-fw fa-play text-success"})):e0(e)&&(n=Jt.default.createElement("a",{href:"#",className:"quickaction",onClick:()=>t(dp(e))},Jt.default.createElement("i",{className:"fa fa-fw fa-repeat text-primary"}))),Jt.default.createElement("td",{className:"col-quickactions"},n?Jt.default.createElement("div",null,n):Jt.default.createElement(Jt.default.Fragment,null))},"quickactions");If.headerName="";var B_=i(({flow:e})=>{let t=e.comment;return Jt.default.createElement("td",{className:"col-comment"},t)},"comment");B_.headerName="Comment";var nW={icon:L_,index:A_,method:O_,version:R_,path:M_,quickactions:If,size:I_,status:D_,time:F_,timestamp:H_,tls:P_,comment:B_},iW=nW;var ZL=tg.memo(i(function(){let t=He(),n=me(v=>v.flows.sort.desc),s=me(v=>v.flows.sort.column),l=me(v=>v.options.web_columns),h=n?"sort-desc":"sort-asc",d=l.map(v=>eg[v]).filter(v=>v).concat(If);return tg.createElement("tr",null,d.map(v=>tg.createElement("th",{className:(0,JL.default)(`col-${v.name}`,s===v.name&&h),key:v.name,onClick:()=>t(hA(v.name===s&&n?void 0:v.name,v.name!==s?!1:!n))},v.headerName)))},"FlowTableHead"));var Np=de(be()),eM=de(ai());var tM=Np.default.memo(i(function({flow:t,selected:n,highlighted:s}){let l=He(),h=me(b=>b.options.web_columns),d=(0,eM.default)({selected:n,highlighted:s,intercepted:t.intercepted,"has-request":t.type==="http"&&t.request,"has-response":t.type==="http"&&t.response}),v=(0,Np.useCallback)(b=>{let k=b.target;for(;k.parentNode;){if(k.classList.contains("col-quickactions"))return;k=k.parentNode}l(yl(t.id))},[t]),S=h.map(b=>eg[b]).filter(b=>b).concat(If);return Np.default.createElement("tr",{className:d,onClick:v},S.map(b=>Np.default.createElement(b,{key:b.name,flow:t})))},"FlowRow"));var z_=class extends Qi.Component{constructor(n,s){super(n,s);this.viewport=Qi.createRef();this.head=Qi.createRef();this.state={vScroll:Df(),viewportTop:0},this.onViewportUpdate=this.onViewportUpdate.bind(this)}static{i(this,"PureFlowTable")}static{this.defaultProps={rowHeight:32}}componentDidMount(){window.addEventListener("resize",this.onViewportUpdate),this.onViewportUpdate()}componentWillUnmount(){window.removeEventListener("resize",this.onViewportUpdate)}getSnapshotBeforeUpdate(){return Zm(this.viewport)}componentDidUpdate(n,s,l){if(l&&$0(this.viewport),this.onViewportUpdate(),this.props.selected&&this.props.selected!==n.selected){let{rowHeight:d,flows:v,selected:S}=this.props,b=this.viewport.current,k=this.head.current,R=k?k.offsetHeight:0,I=v.indexOf(S)*d+R,z=I+d,j=b.scrollTop,Y=b.offsetHeight;I-Rj+Y&&(b.scrollTop=z-Y),this.onViewportUpdate()}}onViewportUpdate(){let n=this.viewport.current,s=n.scrollTop||0,l=Df({viewportTop:s,viewportHeight:n.offsetHeight||0,itemCount:this.props.flows.length,rowHeight:this.props.rowHeight});if(this.state.viewportTop!==s||!Mo(this.state.vScroll,l)){let h=Math.min(s,l.end*this.props.rowHeight);this.setState({vScroll:l,viewportTop:h})}}render(){let{vScroll:n,viewportTop:s}=this.state,{flows:l,selected:h,highlight:d}=this.props,v=d?wf.parse(d):()=>!1;return Qi.createElement("div",{className:"flow-table",onScroll:this.onViewportUpdate,ref:this.viewport},Qi.createElement("table",null,Qi.createElement("thead",{ref:this.head,style:{transform:`translateY(${s}px)`}},Qi.createElement(ZL,null)),Qi.createElement("tbody",null,Qi.createElement("tr",{style:{height:n.paddingTop}}),l.slice(n.start,n.end).map(S=>Qi.createElement(tM,{key:S.id,flow:S,selected:S===h,highlighted:v(S)})),Qi.createElement("tr",{style:{height:n.paddingBottom}}))))}},rM=Uu(e=>({flows:e.flows.view,highlight:e.flows.highlight,selected:e.flows.byId[e.flows.selected[0]]}))(z_);var ln=de(be()),tw=de(be());var oO=de(iO());function cE(){return ln.createElement("div",{style:{padding:"1em 2em"}},ln.createElement("h3",null,"mitmproxy is running."),ln.createElement("p",null,"No flows have been recorded yet.",ln.createElement("br",null),"To start capturing traffic, please configure your settings in the Capture tab."))}i(cE,"CaptureSetup");function ZW({description:e,listen_addrs:t,is_running:n,wireguard_conf:s,type:l}){let h=(0,tw.useRef)(null);(0,tw.useEffect)(()=>{s&&h.current&&oO.default.toCanvas(h.current,s,{margin:0,scale:3})},[s]);let d,v=t.length===1||t.length===2&&t[0][1]===t[1][1],S=t.every(k=>["::","0.0.0.0"].includes(k[0]));v&&S?d=Ux(["*",t[0][1]]):d=t.map(Ux).join(" and "),e=e[0].toUpperCase()+e.substr(1);let b;return n?b=ln.createElement(ln.Fragment,null,l==="local"?ln.createElement("div",{className:"text-success"},e," is active."):ln.createElement("div",{className:"text-success"},e," listening at ",d,"."),s&&ln.createElement("div",{className:"wireguard-config"},ln.createElement("pre",null,s),ln.createElement("canvas",{ref:h}))):b=ln.createElement(ln.Fragment,null,ln.createElement("div",{className:"text-warning"},e," starting...")),ln.createElement("div",null,b)}i(ZW,"ServerDescription");function ui({error:e,backendState:t}){return ln.createElement("div",{className:"mode-status"},e?ln.createElement("div",{className:"text-danger"},e):t&&ln.createElement(ZW,{...t}))}i(ui,"ServerStatus");var un=de(be());var Pi=de(be());var Rp=de(be());function ci({value:e,onChange:t,children:n,label:s}){let l=Rp.useId();return Rp.createElement("div",{className:"mode-entry"},Rp.createElement("input",{type:"checkbox",name:`mode-checkbox-${l}`,id:`mode-checkbox-${l}`,checked:e,onChange:t}),Rp.createElement("label",{htmlFor:`mode-checkbox-${l}`,style:{marginBottom:0,fontWeight:"normal"}},s),n)}i(ci,"ModeToggle");var Ir=de(be());var Fo=de(be());function fi({children:e,iconClass:t,classname:n,isVisible:s}){let l=Fo.useId(),h="--"+[...l].map(S=>S.charCodeAt(0).toString(16)).join(""),d=Fo.useRef(null),v=Fo.useRef(null);return Fo.useEffect(()=>{d.current.style.anchorName=h,v.current.style.positionAnchor=h},[]),Fo.useEffect(()=>{s===!0&&document.getElementById(l)?.showPopover()},[s]),Fo.createElement("div",{className:n?`mode-popover ${n}`:"mode-popover"},Fo.createElement("button",{popovertarget:l,ref:d},Fo.createElement("i",{className:t,"aria-hidden":"true"})),Fo.createElement("div",{id:l,popover:"auto",ref:v},e))}i(fi,"Popover");function fE({server:e}){let{currentProcesses:t,isLoading:n}=me(D=>D.processes),{selectedProcesses:s}=me(D=>D.modes.local[0]),[l,h]=Ir.useState([]),[d,v]=Ir.useState(""),S=He(),{platform:b}=me(D=>D.backendState),k=i(D=>{v(D.target.value)},"handleInputChange"),R=i(D=>{let q=b.startsWith("win32")?"\\":"/";return Lm(D.executable,q)[1]},"extractProcessName"),I=i(D=>{let q=typeof D=="string"?D:R(D),te=s?`${s}, ${q}`:q;S(yp({server:e,value:te}))},"addProcessToSelection"),z=i(D=>{let q=s?.split(/,\s*/).filter(te=>te!==R(D)).join(", ");S(yp({server:e,value:q}))},"removeProcessFromSelection"),j=i(D=>{Y(D)&&s?z(D):I(D)},"handleApplicationClick"),Y=i(D=>{let q=R(D);return s?.includes(q)},"isSelected");Ir.useEffect(()=>{t.length===0&&S(Cf())},[]),Ir.useEffect(()=>{if(d){let D=t.filter(q=>R(q).toLowerCase().includes(d.toLowerCase()));h(D)}else l!==t&&h(t)},[d,t]);let ne=i(D=>{D.stopPropagation(),D.key==="Enter"&&(I(d),v(""))},"handleInputKeyDown"),[F,L]=Ir.useState(!1);return Ir.createElement("div",{className:"local-dropdown"},Ir.createElement("div",{className:"dropdown-header"},Ir.createElement("input",{type:"text",className:"autocomplete-input",placeholder:s&&s?.length>0?"Add more":"(all applications)",value:d,onChange:k,onKeyDown:ne,onClick:()=>L(!0),onBlur:()=>L(!1)}),Ir.createElement(fi,{iconClass:"fa fa-chevron-down",classname:"local-popover",isVisible:F},Ir.createElement("h4",null,"Current Applications running on machine"),n?Ir.createElement("i",{className:"fa fa-spinner","aria-hidden":"true"}):l.length>0?Ir.createElement("ul",{className:"dropdown-list"},l.map((D,q)=>Ir.createElement("li",{key:q,className:`dropdown-item ${Y(D)?"selected":""}`,onClick:()=>j(D),role:"menuitem"},Ir.createElement("div",{className:"process-details"},Ir.createElement("img",{className:"process-icon",src:`./executable-icon?path=${D.executable}`,loading:"lazy"}),Ir.createElement("span",{className:"process-name"},R(D)))))):Ir.createElement("span",null,"Press ",Ir.createElement("strong",null,"Enter")," to capture traffic for programs matching: ",Ir.createElement("strong",null,d)))))}i(fE,"LocalDropdown");function dE(){let e=me(s=>s.modes.local),t=me(s=>s.backendState.servers),n=e.map(s=>Pi.createElement(eU,{key:s.ui_id,server:s,backendState:t[h0(s)]}));return Pi.createElement("div",null,Pi.createElement("h4",{className:"mode-title"},"Local Applications"),Pi.createElement("p",{className:"mode-description"},"Transparently Intercept local application(s)."),n)}i(dE,"Local");function eU({server:e,backendState:t}){let n=He(),s=me(d=>d.processes.error),l=e.error||t?.last_exception||s||void 0,h=i(d=>{let v=e.selectedProcesses?.split(/,\s*/).filter(S=>S!==d).join(", ");n(yp({server:e,value:v}))},"handleDeletionProcess");return Pi.createElement("div",{className:"mode-local"},Pi.createElement(ci,{value:e.active,label:"Intercept traffic for",onChange:()=>n(AC({server:e,value:!e.active}))},Pi.createElement("div",{className:"processes-container"},Pi.createElement("div",{className:"selected-processes"},e.selectedProcesses?.split(/,\s*/).filter(d=>d.trim()!=="").map(d=>Pi.createElement("div",{key:d,className:"selected-process"},d,Pi.createElement("i",{className:"fa fa-times","aria-hidden":"true",onClick:()=>h(d)})))),Pi.createElement("div",{className:"dropdown-container"},Pi.createElement(fE,{server:e}),Pi.createElement("i",{className:"fa fa-refresh","aria-hidden":"true",onClick:()=>n(Cf())})))),Pi.createElement(ui,{error:l,backendState:t}))}i(eU,"LocalRow");var Ji=de(be());function pE(){let e=me(s=>s.modes.regular),t=me(s=>s.backendState.servers),n=e.map(s=>Ji.createElement(tU,{key:s.ui_id,server:s,backendState:t[p0(s)]}));return Ji.createElement("div",null,Ji.createElement("h4",{className:"mode-title"},"Explicit HTTP(S) Proxy"),Ji.createElement("p",{className:"mode-description"},"You manually configure your client application or device to use an HTTP(S) proxy."),n)}i(pE,"Regular");function tU({server:e,backendState:t}){let n=He(),s=e.error||t?.last_exception||void 0;return Ji.createElement("div",null,Ji.createElement(ci,{value:e.active,label:"Run HTTP/S Proxy",onChange:()=>n(kC({server:e,value:!e.active}))},Ji.createElement(fi,{iconClass:"fa fa-cog"},Ji.createElement("h4",null,"Advanced Configuration"),Ji.createElement("p",null,"Listen Host"),Ji.createElement(gt,{className:"mode-input",content:e.listen_host||"",onEditDone:l=>n(NC({server:e,value:l}))}),Ji.createElement("p",null,"Listen Port"),Ji.createElement(gt,{className:"mode-input",content:e.listen_port?e.listen_port.toString():"",placeholder:"8080",onEditDone:l=>n(PC({server:e,value:parseInt(l)}))}))),Ji.createElement(ui,{error:s,backendState:t}))}i(tU,"RegularRow");var di=de(be());function hE(){let e=me(s=>s.modes.wireguard),t=me(s=>s.backendState.servers),n=e.map(s=>di.createElement(rU,{key:s.ui_id,server:s,backendState:t[m0(s)]}));return di.createElement("div",null,di.createElement("h4",{className:"mode-title"},"WireGuard Server"),di.createElement("p",{className:"mode-description"},"Start a WireGuard\u2122 server and connect an external device for transparent proxying."),n)}i(hE,"Wireguard");function rU({server:e,backendState:t}){let n=He(),s=e.error||t?.last_exception||void 0;return di.createElement("div",null,di.createElement(ci,{value:e.active,label:"Run WireGuard Server",onChange:()=>n(LC({server:e,value:!e.active}))},di.createElement(fi,{iconClass:"fa fa-cog"},di.createElement("h4",null,"Advanced Configuration"),di.createElement("p",null,"Listen Host"),di.createElement(gt,{className:"mode-input",content:e.listen_host||"",placeholder:"(all interfaces)",onEditDone:l=>n(MC({server:e,value:l}))}),di.createElement("p",null,"Listen Port"),di.createElement(gt,{className:"mode-input",content:e.listen_port?e.listen_port.toString():"",placeholder:"51820",onEditDone:l=>n(OC({server:e,value:parseInt(l)}))}),di.createElement("p",null,"Configuration File"),di.createElement(gt,{className:"mode-input",content:e.file_path||"",placeholder:"~/.mitmproxy/wireguard.conf",onEditDone:l=>n(RC({server:e,value:l}))}))),di.createElement(ui,{error:s,backendState:t}))}i(rU,"WireGuardRow");var Gr=de(be());function mE(){let e=He(),t=me(s=>s.modes.reverse),n=me(s=>s.backendState.servers);return Gr.createElement("div",null,Gr.createElement("h4",{className:"mode-title"},"Reverse Proxy"),Gr.createElement("p",{className:"mode-description"},"Requests are forwarded to a preconfigured destination."),Gr.createElement("div",{className:"mode-reverse-servers"},t.map((s,l)=>Gr.createElement(nU,{key:s.ui_id,removable:l>0,server:s,backendState:n[vp(s)]})),Gr.createElement("div",{className:"mode-reverse-add-server",onClick:()=>e(JA())},Gr.createElement("i",{className:"fa fa-plus-square-o","aria-hidden":"true"}),"Add additional server")))}i(mE,"Reverse");function nU({removable:e,server:t,backendState:n}){let s=He(),l=Object.values(g0),h=i(async()=>{t.active&&await s(C0({server:t,value:!1})).unwrap(),await s(ZA(t))},"deleteServer"),d=t.error||n?.last_exception||void 0;return Gr.createElement("div",null,Gr.createElement(ci,{value:t.active,label:"Forward",onChange:()=>{s(C0({server:t,value:!t.active}))}},Gr.createElement("select",{name:"protocols",className:"mode-reverse-dropdown",value:t.protocol,onChange:v=>{s(FC({server:t,value:v.target.value}))}},l.map(v=>Gr.createElement("option",{key:v,value:v},v))),"traffic to",Gr.createElement(gt,{className:"mode-reverse-input",content:t.destination?.toString()||"",onEditDone:v=>s(HC({server:t,value:v})),placeholder:"example.com"}),Gr.createElement(fi,{iconClass:"fa fa-cog"},Gr.createElement("h4",null,"Advanced Configuration"),Gr.createElement("p",null,"Listen Host"),Gr.createElement(gt,{className:"mode-reverse-input",content:t.listen_host||"",onEditDone:v=>s(DC({server:t,value:v})),placeholder:"*"}),Gr.createElement("p",null,"Listen Port"),Gr.createElement(gt,{className:"mode-reverse-input",content:String(t.listen_port||""),onEditDone:v=>s(IC({server:t,value:v})),placeholder:"8080"})),e&&Gr.createElement("i",{className:"fa fa-fw fa-trash fa-lg","aria-hidden":"true",onClick:h})),Gr.createElement(ui,{error:d,backendState:n}))}i(nU,"ReverseToggleRow");var Ai=de(be());function gE(){let e=me(s=>s.modes.transparent),t=me(s=>s.backendState.servers),n=e.map(s=>Ai.createElement(iU,{key:s.ui_id,server:s,backendState:t[y0(s)]}));return Ai.createElement("div",null,Ai.createElement("h4",{className:"mode-title"},"Transparent Proxy"),Ai.createElement("p",{className:"mode-description"},"You"," ",Ai.createElement("a",{href:"https://docs.mitmproxy.org/stable/howto-transparent/",style:{textDecoration:"underline",color:"inherit"}},"configure your routing table")," ","to send traffic through mitmproxy."),n)}i(gE,"Transparent");function iU({server:e,backendState:t}){let n=He(),s=e.error||t?.last_exception||void 0;return Ai.createElement("div",null,Ai.createElement(ci,{value:e.active,label:"Run Transparent Proxy",onChange:()=>n(BC({server:e,value:!e.active}))},Ai.createElement(fi,{iconClass:"fa fa-cog"},Ai.createElement("h4",null,"Advanced Configuration"),Ai.createElement("p",null,"Listen Host"),Ai.createElement(gt,{className:"mode-input",content:e.listen_host||"",onEditDone:l=>n(zC({server:e,value:l}))}),Ai.createElement("p",null,"Listen Port"),Ai.createElement(gt,{className:"mode-input",content:e.listen_port?e.listen_port.toString():"",placeholder:"8080",onEditDone:l=>n(WC({server:e,value:parseInt(l)}))}))),Ai.createElement(ui,{error:s,backendState:t}))}i(iU,"TransparentRow");var Zi=de(be());function vE(){let e=me(s=>s.modes.socks),t=me(s=>s.backendState.servers),n=e.map(s=>Zi.createElement(oU,{key:s.ui_id,server:s,backendState:t[w0(s)]}));return Zi.createElement("div",null,Zi.createElement("h4",{className:"mode-title"},"SOCKS Proxy"),Zi.createElement("p",{className:"mode-description"},"You manually configure your client application or device to use a SOCKSv5 proxy."),n)}i(vE,"Socks");function oU({server:e,backendState:t}){let n=He(),s=e.error||t?.last_exception||void 0;return Zi.createElement("div",null,Zi.createElement(ci,{value:e.active,label:"Run SOCKS Proxy",onChange:()=>n(UC({server:e,value:!e.active}))},Zi.createElement(fi,{iconClass:"fa fa-cog"},Zi.createElement("h4",null,"Advanced Configuration"),Zi.createElement("p",null,"Listen Host"),Zi.createElement(gt,{className:"mode-input",content:e.listen_host||"",onEditDone:l=>n($C({server:e,value:l}))}),Zi.createElement("p",null,"Listen Port"),Zi.createElement(gt,{className:"mode-input",content:e.listen_port?e.listen_port.toString():"",placeholder:"8080",onEditDone:l=>n(VC({server:e,value:parseInt(l)}))}))),Zi.createElement(ui,{error:s,backendState:t}))}i(oU,"SocksRow");var Li=de(be());function yE(){let e=me(s=>s.modes.upstream),t=me(s=>s.backendState.servers),n=e.map(s=>Li.createElement(sU,{key:s.ui_id,server:s,backendState:t[S0(s)]}));return Li.createElement("div",null,Li.createElement("h4",{className:"mode-title"},"Explicit HTTP(S) Proxy (With Upstream Proxy)"),Li.createElement("p",{className:"mode-description"},"All requests are forwarded to a second HTTP(S) proxy server."),n)}i(yE,"Upstream");function sU({server:e,backendState:t}){let n=He(),s=e.error||t?.last_exception||void 0;return Li.createElement("div",null,Li.createElement(ci,{value:e.active,label:"Run HTTP/S Proxy and forward requests to",onChange:()=>{n(qC({server:e,value:!e.active}))}},Li.createElement(gt,{className:"mode-upstream-input",content:e.destination?.toString()||"",onEditDone:l=>n(GC({server:e,value:l})),placeholder:"http://example.com:8080"}),Li.createElement(fi,{iconClass:"fa fa-cog"},Li.createElement("h4",null,"Advanced Configuration"),Li.createElement("p",null,"Listen Host"),Li.createElement(gt,{className:"mode-input",content:e.listen_host||"",onEditDone:l=>n(jC({server:e,value:l}))}),Li.createElement("p",null,"Listen Port"),Li.createElement(gt,{className:"mode-input",content:e.listen_port?e.listen_port.toString():"",placeholder:"8080",onEditDone:l=>n(KC({server:e,value:parseInt(l)}))}))),Li.createElement(ui,{error:s,backendState:t}))}i(sU,"UpstreamRow");var eo=de(be());function wE(){let e=me(s=>s.modes.dns),t=me(s=>s.backendState.servers),n=e.map(s=>eo.createElement(aU,{key:s.ui_id,server:s,backendState:t[x0(s)]}));return eo.createElement("div",null,eo.createElement("h4",{className:"mode-title"},"DNS Server"),eo.createElement("p",{className:"mode-description"},"A recursive DNS resolver using the host's DNS configuration."),n)}i(wE,"Dns");function aU({server:e,backendState:t}){let n=He(),s=e.error||t?.last_exception||void 0;return eo.createElement("div",null,eo.createElement(ci,{value:e.active,label:"Run DNS Server",onChange:()=>n(YC({server:e,value:!e.active}))},eo.createElement(fi,{iconClass:"fa fa-cog"},eo.createElement("h4",null,"Advanced Configuration"),eo.createElement("p",null,"Listen Host"),eo.createElement(gt,{className:"mode-input",content:e.listen_host||"",onEditDone:l=>n(XC({server:e,value:l}))}),eo.createElement("p",null,"Listen Port"),eo.createElement(gt,{className:"mode-input",content:e.listen_port?e.listen_port.toString():"",placeholder:"8080",onEditDone:l=>n(QC({server:e,value:parseInt(l)}))}))),eo.createElement(ui,{error:s,backendState:t}))}i(aU,"DnsRow");var Dp=de(be());function rw({title:e,description:t}){return Dp.createElement("div",{className:"missing-mode-container"},Dp.createElement("div",{className:"title-icon-container"},Dp.createElement("h4",{className:"mode-title"},e),Dp.createElement("i",{className:"fa fa-exclamation-triangle","aria-hidden":"true"})),Dp.createElement("p",{className:"mode-description"},t))}i(rw,"MissingMode");function SE(){let e=me(t=>t.backendState.platform);return un.createElement("div",{className:"modes"},un.createElement("h2",null,"Intercept Traffic"),un.createElement("p",null,"Configure how you want to intercept traffic with mitmproxy."),un.createElement("div",{className:"modes-category green-left-border"},un.createElement("h3",null,"Recommended"),un.createElement("div",{className:"modes-container"},un.createElement(pE,null),e.startsWith("win32")||e.startsWith("darwin")?un.createElement(dE,null):un.createElement(rw,{title:"Local Redirect Mode",description:"This mode is only supported on Windows and MacOS."}),un.createElement(hE,null),un.createElement(mE,null))),un.createElement("div",{className:"modes-category gray-left-border"},un.createElement("h3",null,"Advanced"),un.createElement("div",{className:"modes-container"},un.createElement(vE,null),un.createElement(yE,null),un.createElement(wE,null),e.startsWith("win32")?un.createElement(rw,{title:"Transparent Proxy",description:"This mode is only supported on Linux and MacOS."}):un.createElement(gE,null))))}i(SE,"Modes");function xE(){let e=me(s=>!!s.flows.byId[s.flows.selected[0]]),t=me(s=>s.flows.list.length>0),n=me(s=>s.ui.tabs.current);return Ta.createElement("div",{className:"main-view"},n===0?Ta.createElement(SE,null):Ta.createElement(Ta.Fragment,null,t?Ta.createElement(rM,null):Ta.createElement(cE,null),e&&Ta.createElement(Jm,{key:"splitter"}),e&&Ta.createElement(k_,{key:"flowDetails"})))}i(xE,"MainView");var to=de(be()),dO=de(ai());var Qn=de(be());var nw=de(be());function hs({children:e}){return window.MITMWEB_STATIC?null:nw.createElement(nw.Fragment,null,e)}i(hs,"HideInStatic");var sO=Qn.memo(i(function(){let t=He(),n=me(s=>s.flows.filter);return Qn.createElement(Yu,{className:"pull-left special",text:"File",options:{placement:"bottom-start"}},Qn.createElement("li",null,Qn.createElement(E0,{icon:"fa-folder-open",text:"\xA0Open...",onClick:s=>s.stopPropagation(),onOpenFile:s=>{t(vA(s)),document.body.click()}})),Qn.createElement(li,{onClick:()=>location.replace("/flows/dump")},Qn.createElement("i",{className:"fa fa-fw fa-floppy-o"}),"\xA0Save"),Qn.createElement(li,{onClick:()=>location.replace("/flows/dump?filter="+n)},Qn.createElement("i",{className:"fa fa-fw fa-floppy-o"}),"\xA0Save filtered"),Qn.createElement(li,{onClick:()=>confirm("Delete all flows?")&&t(l0())},Qn.createElement("i",{className:"fa fa-fw fa-trash"}),"\xA0Clear All"),Qn.createElement(hs,null,Qn.createElement(UL,null),Qn.createElement("li",null,Qn.createElement("a",{href:"http://mitm.it/",target:"_blank",rel:"noreferrer"},Qn.createElement("i",{className:"fa fa-fw fa-external-link"}),"\xA0Install Certificates..."))))},"FileMenu"));var tc=de(be());var aO=tc.memo(i(function(){let t=me(s=>s.connection.state),n=me(s=>s.connection.message);switch(t){case"CONNECTION_INIT":return tc.createElement("span",{className:"connection-indicator init"},"connecting\u2026");case"CONNECTION_FETCHING":return tc.createElement("span",{className:"connection-indicator fetching"},"fetching data\u2026");case"CONNECTION_ESTABLISHED":return tc.createElement("span",{className:"connection-indicator established"},"connected");case"CONNECTION_ERROR":return tc.createElement("span",{className:"connection-indicator error",title:n},"connection lost");case"CONNECTION_OFFLINE":return tc.createElement("span",{className:"connection-indicator offline"},"offline")}},"ConnectionIndicator"));var iw=de(be());ow.title="Capture";function ow(){return iw.createElement(iw.Fragment,null)}i(ow,"CaptureMenu");var pi=de(be());var ms=de(be()),lO=de(ai());var Ho=de(be());var cg=class e extends Ho.Component{static{i(this,"FilterDocs")}constructor(t,n){super(t,n),this.state={doc:e.doc}}componentDidMount(){e.xhr||(e.xhr=xt("/filter-help").then(t=>t.json()),e.xhr.catch(()=>{e.xhr=null})),this.state.doc||e.xhr.then(t=>{e.doc=t,this.setState({doc:t})})}render(){let{doc:t}=this.state;return t?Ho.default.createElement("table",{className:"table table-condensed"},Ho.default.createElement("tbody",null,t.commands.map(n=>Ho.default.createElement("tr",{key:n[1],onClick:()=>this.props.selectHandler(n[0].split(" ")[0]+" ")},Ho.default.createElement("td",null,n[0].replace(" ","\xA0")),Ho.default.createElement("td",null,n[1]))),Ho.default.createElement("tr",{key:"docs-link"},Ho.default.createElement("td",{colSpan:2},Ho.default.createElement("a",{href:"https://mitmproxy.org/docs/latest/concepts-filters/",target:"_blank",rel:"noreferrer"},Ho.default.createElement("i",{className:"fa fa-external-link"}),"\xA0 mitmproxy docs"))))):Ho.default.createElement("i",{className:"fa fa-spinner fa-spin"})}};var Wf=class extends ms.Component{constructor(n,s){super(n,s);this.inputRef=ms.default.createRef();this.state={value:this.props.value,focus:!1,mousefocus:!1},this.onChange=this.onChange.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.onMouseEnter=this.onMouseEnter.bind(this),this.onMouseLeave=this.onMouseLeave.bind(this),this.selectFilter=this.selectFilter.bind(this)}static{i(this,"FilterInput")}UNSAFE_componentWillReceiveProps(n){this.setState({value:n.value})}isValid(n){try{return n&&wf.parse(n),!0}catch{return!1}}getDesc(){if(!this.state.value)return ms.default.createElement(cg,{selectHandler:this.selectFilter});try{return wf.parse(this.state.value).desc}catch(n){return""+n}}onChange(n){let s=n.target.value;this.setState({value:s}),this.isValid(s)&&this.props.onChange(s)}onFocus(){this.setState({focus:!0})}onBlur(){this.setState({focus:!1})}onMouseEnter(){this.setState({mousefocus:!0})}onMouseLeave(){this.setState({mousefocus:!1})}onKeyDown(n){(n.key==="Escape"||n.key==="Enter")&&(this.blur(),this.setState({mousefocus:!1})),n.stopPropagation()}selectFilter(n){this.setState({value:n}),this.inputRef.current?.focus()}blur(){this.inputRef.current?.blur()}select(){this.inputRef.current?.select()}render(){let{type:n,color:s,placeholder:l}=this.props,{value:h,focus:d,mousefocus:v}=this.state;return ms.default.createElement("div",{className:(0,lO.default)("filter-input input-group",{"has-error":!this.isValid(h)})},ms.default.createElement("span",{className:"input-group-addon"},ms.default.createElement("i",{className:"fa fa-fw fa-"+n,style:{color:s}})),ms.default.createElement("input",{type:"text",ref:this.inputRef,placeholder:l,className:"form-control",value:h,onChange:this.onChange,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown}),(d||v)&&ms.default.createElement("div",{className:"popover bottom",onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave},ms.default.createElement("div",{className:"arrow"}),ms.default.createElement("div",{className:"popover-content"},this.getDesc())))}};sw.title="Flow List";function sw(){return pi.createElement("div",{className:"main-menu"},pi.createElement("div",{className:"menu-group"},pi.createElement("div",{className:"menu-content"},pi.createElement(cU,null),pi.createElement(fU,null)),pi.createElement("div",{className:"menu-legend"},"Find")),pi.createElement("div",{className:"menu-group"},pi.createElement("div",{className:"menu-content"},pi.createElement(uU,null),pi.createElement(dU,null)),pi.createElement("div",{className:"menu-legend"},"Intercept")))}i(sw,"FlowListMenu");function uU(){let e=He(),t=me(n=>n.options.intercept);return pi.createElement(Wf,{value:t||"",placeholder:"Intercept",type:"pause",color:"hsl(208, 56%, 53%)",onChange:n=>e(gp("intercept",n))})}i(uU,"InterceptInput");function cU(){let e=He(),t=me(n=>n.flows.filter);return pi.createElement(Wf,{value:t||"",placeholder:"Search",type:"search",color:"black",onChange:n=>e(t0(n))})}i(cU,"FlowFilterInput");function fU(){let e=He(),t=me(n=>n.flows.highlight);return pi.createElement(Wf,{value:t||"",placeholder:"Highlight",type:"tag",color:"hsl(48, 100%, 50%)",onChange:n=>e(r0(n))})}i(fU,"HighlightInput");function dU(){let e=He();return pi.createElement(Rr,{className:"btn-sm",title:"[a]ccept all",icon:"fa-forward text-success",onClick:()=>e(n0())},"Resume All")}i(dU,"ResumeAll");var cn=de(be());var Uf=de(be());function CE({value:e,onChange:t,children:n}){return Uf.createElement("div",{className:"menu-entry"},Uf.createElement("label",null,Uf.createElement("input",{type:"checkbox",checked:e,onChange:t}),n))}i(CE,"MenuToggle");function aw({name:e,children:t}){let n=He(),s=me(l=>l.options[e]);return Uf.createElement(CE,{value:!!s,onChange:()=>n(gp(e,!s))},t)}i(aw,"OptionsToggle");function uO(){let e=He(),t=me(n=>n.eventLog.visible);return Uf.createElement(CE,{value:t,onChange:()=>e(mp())},"Display Event Log")}i(uO,"EventlogToggle");function cO(){let e=He(),t=me(n=>n.commandBar.visible);return Uf.createElement(CE,{value:t,onChange:()=>e(f0())},"Display Command Bar")}i(cO,"CommandBarToggle");var _E=de(be());function EE({children:e,resource:t}){let n=`https://docs.mitmproxy.org/stable/${t}`;return _E.createElement("a",{target:"_blank",href:n,rel:"noreferrer"},e||_E.createElement("i",{className:"fa fa-question-circle"}))}i(EE,"DocsLink");lw.title="Options";function lw(){let e=He(),t=i(()=>SA("OptionModal"),"openOptions");return cn.createElement("div",null,cn.createElement(hs,null,cn.createElement("div",{className:"menu-group"},cn.createElement("div",{className:"menu-content"},cn.createElement(Rr,{title:"Open Options",icon:"fa-cogs text-primary",onClick:()=>e(t())},"Edit Options ",cn.createElement("sup",null,"alpha"))),cn.createElement("div",{className:"menu-legend"},"Options Editor")),cn.createElement("div",{className:"menu-group"},cn.createElement("div",{className:"menu-content"},cn.createElement(aw,{name:"anticache"},"Strip cache headers"," ",cn.createElement(EE,{resource:"overview-features/#anticache"})),cn.createElement(aw,{name:"showhost"},"Use host header for display"),cn.createElement(aw,{name:"ssl_insecure"},"Don't verify server certificates")),cn.createElement("div",{className:"menu-legend"},"Quick Options"))),cn.createElement("div",{className:"menu-group"},cn.createElement("div",{className:"menu-content"},cn.createElement(uO,null),cn.createElement(cO,null)),cn.createElement("div",{className:"menu-legend"},"View Options")))}i(lw,"OptionMenu");var ft=de(be());var Ip=i(async(e,t)=>{let n=(async()=>{let s=await yf("export",t,`@${e.id}`);if(s.value)return s.value;throw s.error?s.error:s})();try{await nA(n)}catch(s){alert(s)}},"copy");cw.title="Flow";function cw(){let e=He(),t=me(n=>n.flows.byId[n.flows.selected[0]]);return t?ft.createElement("div",{className:"flow-menu"},ft.createElement(hs,null,ft.createElement("div",{className:"menu-group"},ft.createElement("div",{className:"menu-content"},ft.createElement(Rr,{title:"[r]eplay flow",icon:"fa-repeat text-primary",onClick:()=>e(dp(t)),disabled:!e0(t)},"Replay"),ft.createElement(Rr,{title:"[D]uplicate flow",icon:"fa-copy text-info",onClick:()=>e(s0(t))},"Duplicate"),ft.createElement(Rr,{disabled:!t||!t.modified,title:"revert changes to flow [V]",icon:"fa-history text-warning",onClick:()=>e(a0(t))},"Revert"),ft.createElement(Rr,{title:"[d]elete flow",icon:"fa-trash text-danger",onClick:()=>e(o0(t))},"Delete"),ft.createElement(gU,{flow:t})),ft.createElement("div",{className:"menu-legend"},"Flow Modification"))),ft.createElement("div",{className:"menu-group"},ft.createElement("div",{className:"menu-content"},ft.createElement(pU,{flow:t}),ft.createElement(hU,{flow:t})),ft.createElement("div",{className:"menu-legend"},"Export")),ft.createElement(hs,null,ft.createElement("div",{className:"menu-group"},ft.createElement("div",{className:"menu-content"},ft.createElement(Rr,{disabled:!t||!t.intercepted,title:"[a]ccept intercepted flow",icon:"fa-play text-success",onClick:()=>e(fp(t))},"Resume"),ft.createElement(Rr,{disabled:!t||!t.intercepted,title:"kill intercepted flow [x]",icon:"fa-times text-danger",onClick:()=>e(i0(t))},"Abort")),ft.createElement("div",{className:"menu-legend"},"Interception")))):ft.createElement("div",null)}i(cw,"FlowMenu");var uw=i(e=>{let t=window.open(e,"_blank","noopener,noreferrer");t&&(t.opener=null)},"openInNewTab");function pU({flow:e}){if(e.type!=="http")return ft.createElement(Rr,{icon:"fa-download",onClick:()=>0,disabled:!0},"Download");if(e.request.contentLength&&!e.response?.contentLength)return ft.createElement(Rr,{icon:"fa-download",onClick:()=>uw(Rn.getContentURL(e,e.request))},"Download");if(e.response){let t=e.response;if(!e.request.contentLength&&e.response.contentLength)return ft.createElement(Rr,{icon:"fa-download",onClick:()=>uw(Rn.getContentURL(e,t))},"Download");if(e.request.contentLength&&e.response.contentLength)return ft.createElement(Yu,{text:ft.createElement(Rr,{icon:"fa-download",onClick:()=>1},"Download\u25BE"),options:{placement:"bottom-start"}},ft.createElement(li,{onClick:()=>uw(Rn.getContentURL(e,e.request))},"Download request"),ft.createElement(li,{onClick:()=>uw(Rn.getContentURL(e,t))},"Download response"))}return null}i(pU,"DownloadButton");function hU({flow:e}){return ft.createElement(Yu,{className:"",text:ft.createElement(Rr,{title:"Export flow.",icon:"fa-clone",onClick:()=>1,disabled:e.type!=="http"},"Export\u25BE"),options:{placement:"bottom-start"}},ft.createElement(li,{onClick:()=>Ip(e,"raw_request")},"Copy raw request"),ft.createElement(li,{onClick:()=>Ip(e,"raw_response")},"Copy raw response"),ft.createElement(li,{onClick:()=>Ip(e,"raw")},"Copy raw request and response"),ft.createElement(li,{onClick:()=>Ip(e,"curl")},"Copy as cURL"),ft.createElement(li,{onClick:()=>Ip(e,"httpie")},"Copy as HTTPie"))}i(hU,"ExportButton");var mU={":red_circle:":"\u{1F534}",":orange_circle:":"\u{1F7E0}",":yellow_circle:":"\u{1F7E1}",":green_circle:":"\u{1F7E2}",":large_blue_circle:":"\u{1F535}",":purple_circle:":"\u{1F7E3}",":brown_circle:":"\u{1F7E4}"};function gU({flow:e}){let t=He();return ft.createElement(Yu,{className:"",text:ft.createElement(Rr,{title:"mark flow",icon:"fa-paint-brush text-success",onClick:()=>1},"Mark\u25BE"),options:{placement:"bottom-start"}},ft.createElement(li,{onClick:()=>t(si(e,{marked:""}))},"\u26AA (no marker)"),Object.entries(mU).map(([n,s])=>ft.createElement(li,{key:n,onClick:()=>t(si(e,{marked:n}))},s," ",n.replace(/[:_]/g," "))))}i(gU,"MarkButton");var fO={0:ow,1:sw,2:lw,3:cw};function bE(){let e=He(),t=me(k=>k.ui.tabs.current),n=me(k=>k.flows.selected.filter(R=>R in k.flows.byId),Mo),[s,l]=(0,to.useState)(!1),h=me(k=>k.flows.list.length>0),d=me(k=>k.ui.tabs.isInitial),v=[0,1,2];n.length>0&&v.push(3),(0,to.useEffect)(()=>{h&&d&&e(Fm(1))},[h]),(0,to.useEffect)(()=>{n.length>0&&!s?(e(Fm(3)),l(!0)):n.length===0&&(s&&l(!1),t===3&&e(Fm(1)))},[n,s,t]);function S(k,R){R.preventDefault(),e(Fm(k))}i(S,"handleClick");let b=fO[t];return to.default.createElement("header",null,to.default.createElement("nav",{className:"nav-tabs nav-tabs-lg"},to.default.createElement(sO,null),v.map(k=>to.default.createElement("a",{key:k,href:"#",className:(0,dO.default)({active:k===t}),onClick:R=>S(k,R)},fO[k].title)),to.default.createElement(hs,null,to.default.createElement(aO,null))),to.default.createElement("div",null,to.default.createElement(b,null)))}i(bE,"Header");var nt=de(be()),pO=de(ai());var fw=function(){"use strict";function e(s,l){function h(){this.constructor=s}i(h,"ctor"),h.prototype=l.prototype,s.prototype=new h}i(e,"peg$subclass");function t(s,l,h,d){this.message=s,this.expected=l,this.found=h,this.location=d,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,t)}i(t,"peg$SyntaxError"),e(t,Error);function n(s){var l=arguments.length>1?arguments[1]:{},h=this,d={},v={Expr:Hn},S=Hn,b=i(function(X,ee){return[X,...ee]},"peg$c0"),k=i(function(X){return[X]},"peg$c1"),R=i(function(){return""},"peg$c2"),I={type:"other",description:"string"},z='"',j={type:"literal",value:'"',description:'"\\""'},Y=i(function(X){return X.join("")},"peg$c6"),ne="'",F={type:"literal",value:"'",description:`"'"`},L=/^["\\]/,D={type:"class",value:'["\\\\]',description:'["\\\\]'},q={type:"any",description:"any character"},te=i(function(X){return X},"peg$c12"),Z="\\",oe={type:"literal",value:"\\",description:'"\\\\"'},he=/^['\\]/,Re={type:"class",value:"['\\\\]",description:"['\\\\]"},Ee=/^['"\\]/,Ye={type:"class",value:`['"\\\\]`,description:`['"\\\\]`},tt="n",xe={type:"literal",value:"n",description:'"n"'},Xe=i(function(){return` -`},"peg$c21"),je="r",Qe={type:"literal",value:"r",description:'"r"'},ot=i(function(){return"\r"},"peg$c24"),It="t",Pt={type:"literal",value:"t",description:'"t"'},fn=i(function(){return" "},"peg$c27"),dn={type:"other",description:"whitespace"},vr=/^[ \t\n\r]/,Ut={type:"class",value:"[ \\t\\n\\r]",description:"[ \\t\\n\\r]"},yr={type:"other",description:"control character"},wr=/^[|&!()~"]/,Gt={type:"class",value:'[|&!()~"]',description:'[|&!()~"]'},Ft={type:"other",description:"optional whitespace"},se=0,We=0,Yr=[{line:1,column:1,seenCR:!1}],Zt=0,st=[],Fe=0,Fn;if("startRule"in l){if(!(l.startRule in v))throw new Error(`Can't start parsing from rule "`+l.startRule+'".');S=v[l.startRule]}function bn(){return s.substring(We,se)}i(bn,"text");function no(){return dr(We,se)}i(no,"location");function Bo(X){throw io(null,[{type:"other",description:X}],s.substring(We,se),dr(We,se))}i(Bo,"expected");function lt(X){throw io(X,null,s.substring(We,se),dr(We,se))}i(lt,"error");function Sr(X){var ee=Yr[X],Ce,Me;if(ee)return ee;for(Ce=X-1;!Yr[Ce];)Ce--;for(ee=Yr[Ce],ee={line:ee.line,column:ee.column,seenCR:ee.seenCR};CeZt&&(Zt=se,st=[]),st.push(X))}i(pt,"peg$fail");function io(X,ee,Ce,Me){function Tl(Jr){var Yt=1;for(Jr.sort(function(Mt,At){return Mt.descriptionAt.description?1:0});Yt1?At.slice(0,-1).join(", ")+" or "+At[Jr.length-1]:At[0],pn=Yt?'"'+Mt(Yt)+'"':"end of input","Expected "+Na+" but "+pn+" found."}return i(ze,"buildMessage"),ee!==null&&Tl(ee),new t(X!==null?X:ze(ee,Ce),ee,Ce,Me)}i(io,"peg$buildException");function Hn(){var X,ee,Ce,Me;if(X=se,ee=Mi(),ee!==d){if(Ce=[],Me=Bn(),Me!==d)for(;Me!==d;)Ce.push(Me),Me=Bn();else Ce=d;Ce!==d?(Me=Hn(),Me!==d?(We=X,ee=b(ee,Me),X=ee):(se=X,X=d)):(se=X,X=d)}else se=X,X=d;if(X===d&&(X=se,ee=Mi(),ee!==d&&(We=X,ee=k(ee)),X=ee,X===d)){for(X=se,ee=[],Ce=Bn();Ce!==d;)ee.push(Ce),Ce=Bn();ee!==d&&(We=X,ee=R()),X=ee}return X}i(Hn,"peg$parseExpr");function Mi(){var X,ee,Ce,Me;if(Fe++,X=se,s.charCodeAt(se)===34?(ee=z,se++):(ee=d,Fe===0&&pt(j)),ee!==d){for(Ce=[],Me=Xr();Me!==d;)Ce.push(Me),Me=Xr();Ce!==d?(s.charCodeAt(se)===34?(Me=z,se++):(Me=d,Fe===0&&pt(j)),Me!==d?(We=X,ee=Y(Ce),X=ee):(se=X,X=d)):(se=X,X=d)}else se=X,X=d;if(X===d){if(X=se,s.charCodeAt(se)===39?(ee=ne,se++):(ee=d,Fe===0&&pt(F)),ee!==d){for(Ce=[],Me=Qr();Me!==d;)Ce.push(Me),Me=Qr();Ce!==d?(s.charCodeAt(se)===39?(Me=ne,se++):(Me=d,Fe===0&&pt(F)),Me!==d?(We=X,ee=Y(Ce),X=ee):(se=X,X=d)):(se=X,X=d)}else se=X,X=d;if(X===d){if(X=se,ee=se,Fe++,Ce=so(),Fe--,Ce===d?ee=void 0:(se=ee,ee=d),ee!==d){if(Ce=[],Me=oo(),Me!==d)for(;Me!==d;)Ce.push(Me),Me=oo();else Ce=d;Ce!==d?(We=X,ee=Y(Ce),X=ee):(se=X,X=d)}else se=X,X=d;if(X===d){if(X=se,s.charCodeAt(se)===34?(ee=z,se++):(ee=d,Fe===0&&pt(j)),ee!==d){for(Ce=[],Me=Xr();Me!==d;)Ce.push(Me),Me=Xr();Ce!==d?(We=X,ee=Y(Ce),X=ee):(se=X,X=d)}else se=X,X=d;if(X===d)if(X=se,s.charCodeAt(se)===39?(ee=ne,se++):(ee=d,Fe===0&&pt(F)),ee!==d){for(Ce=[],Me=Qr();Me!==d;)Ce.push(Me),Me=Qr();Ce!==d?(We=X,ee=Y(Ce),X=ee):(se=X,X=d)}else se=X,X=d}}}return Fe--,X===d&&(ee=d,Fe===0&&pt(I)),X}i(Mi,"peg$parseStringLiteral");function Xr(){var X,ee,Ce;return X=se,ee=se,Fe++,L.test(s.charAt(se))?(Ce=s.charAt(se),se++):(Ce=d,Fe===0&&pt(D)),Fe--,Ce===d?ee=void 0:(se=ee,ee=d),ee!==d?(s.length>se?(Ce=s.charAt(se),se++):(Ce=d,Fe===0&&pt(q)),Ce!==d?(We=X,ee=te(Ce),X=ee):(se=X,X=d)):(se=X,X=d),X===d&&(X=se,s.charCodeAt(se)===92?(ee=Z,se++):(ee=d,Fe===0&&pt(oe)),ee!==d?(Ce=hi(),Ce!==d?(We=X,ee=te(Ce),X=ee):(se=X,X=d)):(se=X,X=d)),X}i(Xr,"peg$parseDoubleStringChar");function Qr(){var X,ee,Ce;return X=se,ee=se,Fe++,he.test(s.charAt(se))?(Ce=s.charAt(se),se++):(Ce=d,Fe===0&&pt(Re)),Fe--,Ce===d?ee=void 0:(se=ee,ee=d),ee!==d?(s.length>se?(Ce=s.charAt(se),se++):(Ce=d,Fe===0&&pt(q)),Ce!==d?(We=X,ee=te(Ce),X=ee):(se=X,X=d)):(se=X,X=d),X===d&&(X=se,s.charCodeAt(se)===92?(ee=Z,se++):(ee=d,Fe===0&&pt(oe)),ee!==d?(Ce=hi(),Ce!==d?(We=X,ee=te(Ce),X=ee):(se=X,X=d)):(se=X,X=d)),X}i(Qr,"peg$parseSingleStringChar");function oo(){var X,ee,Ce;return X=se,ee=se,Fe++,Ce=Bn(),Fe--,Ce===d?ee=void 0:(se=ee,ee=d),ee!==d?(s.length>se?(Ce=s.charAt(se),se++):(Ce=d,Fe===0&&pt(q)),Ce!==d?(We=X,ee=te(Ce),X=ee):(se=X,X=d)):(se=X,X=d),X}i(oo,"peg$parseUnquotedStringChar");function hi(){var X,ee;return Ee.test(s.charAt(se))?(X=s.charAt(se),se++):(X=d,Fe===0&&pt(Ye)),X===d&&(X=se,s.charCodeAt(se)===110?(ee=tt,se++):(ee=d,Fe===0&&pt(xe)),ee!==d&&(We=X,ee=Xe()),X=ee,X===d&&(X=se,s.charCodeAt(se)===114?(ee=je,se++):(ee=d,Fe===0&&pt(Qe)),ee!==d&&(We=X,ee=ot()),X=ee,X===d&&(X=se,s.charCodeAt(se)===116?(ee=It,se++):(ee=d,Fe===0&&pt(Pt)),ee!==d&&(We=X,ee=fn()),X=ee))),X}i(hi,"peg$parseEscapeSequence");function Bn(){var X,ee;return Fe++,vr.test(s.charAt(se))?(X=s.charAt(se),se++):(X=d,Fe===0&&pt(Ut)),Fe--,X===d&&(ee=d,Fe===0&&pt(dn)),X}i(Bn,"peg$parsews");function so(){var X,ee;return Fe++,wr.test(s.charAt(se))?(X=s.charAt(se),se++):(X=d,Fe===0&&pt(Gt)),Fe--,X===d&&(ee=d,Fe===0&&pt(yr)),X}i(so,"peg$parsecc");function bl(){var X,ee;for(Fe++,X=[],ee=Bn();ee!==d;)X.push(ee),ee=Bn();return Fe--,X===d&&(ee=d,Fe===0&&pt(Ft)),X}if(i(bl,"peg$parse__"),Fn=S(),Fn!==d&&se===s.length)return Fn;throw Fn!==d&&se{t&&t.current.addEventListener("DOMNodeInserted",n=>{let s=n.currentTarget;s.scroll({top:s.scrollHeight,behavior:"auto"})})},[]),nt.default.createElement("div",{className:"command-result",ref:t},e.map((n,s)=>nt.default.createElement("div",{key:s},nt.default.createElement("div",null,nt.default.createElement("strong",null,"$ ",n.command)),n.result)))}i(vU,"Results");function yU({nextArgs:e,currentArg:t,help:n,description:s,availableCommands:l}){let h=[];for(let d=0;d0&&nt.default.createElement("div",null,nt.default.createElement("strong",null,"Argument suggestion:")," ",h),n?.includes("->")&&nt.default.createElement("div",null,nt.default.createElement("strong",null,"Signature help: "),n),s&&nt.default.createElement("div",null,"# ",s),nt.default.createElement("div",null,nt.default.createElement("strong",null,"Available Commands: "),nt.default.createElement("p",{className:"available-commands"},JSON.stringify(l)))))}i(yU,"CommandHelp");function kE(){let[e,t]=(0,nt.useState)(""),[n,s]=(0,nt.useState)(""),[l,h]=(0,nt.useState)(0),[d,v]=(0,nt.useState)([]),[S,b]=(0,nt.useState)([]),[k,R]=(0,nt.useState)({}),[I,z]=(0,nt.useState)([]),[j,Y]=(0,nt.useState)(0),[ne,F]=(0,nt.useState)(""),[L,D]=(0,nt.useState)(""),[q,te]=(0,nt.useState)([]),[Z,oe]=(0,nt.useState)([]),[he,Re]=(0,nt.useState)(void 0);(0,nt.useEffect)(()=>{xt("/commands",{method:"GET"}).then(Xe=>Xe.json()).then(Xe=>{R(Xe),v(TE(Xe)),b(Object.keys(Xe))}).catch(Xe=>console.error(Xe))},[]),(0,nt.useEffect)(()=>{yf("commands.history.get").then(Xe=>{oe(Xe.value)}).catch(Xe=>console.error(Xe))},[]);let Ee=i((Xe,je)=>{let Qe=fw.parse(je),ot=fw.parse(Xe);F(k[Qe[0]]?.signature_help),D(k[Qe[0]]?.help||""),v(TE(k,ot[0])),b(TE(k,Qe[0]));let It=k[Qe[0]]?.parameters.map(Pt=>Pt.name);It&&(z([Qe[0],...It]),Y(Qe.length-1))},"parseCommand"),Ye=i(Xe=>{t(Xe.target.value),s(Xe.target.value),h(0)},"onChange"),tt=i(Xe=>{if(Xe.key==="Enter"){let[je,...Qe]=fw.parse(e);oe([...Z,e]),yf("commands.history.add",e).catch(()=>0),xt.post(`/commands/${je}`,{arguments:Qe}).then(ot=>ot.json()).then(ot=>{Re(void 0),z([]),te([...q,{command:e,result:JSON.stringify(ot.value||ot.error)}])}).catch(ot=>{Re(void 0),z([]),te([...q,{command:e,result:ot.toString()}])}),F(""),D(""),t(""),s(""),h(0),v(S)}if(Xe.key==="ArrowUp"){let je;he===void 0?je=Z.length-1:je=Math.max(0,he-1),t(Z[je]),s(Z[je]),Re(je)}if(Xe.key==="ArrowDown"){if(he===void 0)return;if(he==Z.length-1)t(""),s(""),Re(void 0);else{let je=he+1;t(Z[je]),s(Z[je]),Re(je)}}Xe.key==="Tab"&&(t(d[l]),h((l+1)%d.length),Xe.preventDefault()),Xe.stopPropagation()},"onKeyDown"),xe=i(Xe=>{if(!e){b(Object.keys(k));return}Ee(n,e),Xe.stopPropagation()},"onKeyUp");return nt.default.createElement("div",{className:"command"},nt.default.createElement("div",{className:"command-title"},"Command Result"),nt.default.createElement(vU,{results:q}),nt.default.createElement(yU,{nextArgs:I,currentArg:j,help:ne,description:L,availableCommands:S}),nt.default.createElement("div",{className:(0,pO.default)("command-input input-group")},nt.default.createElement("span",{className:"input-group-addon"},nt.default.createElement("i",{className:"fa fa-fw fa-terminal"})),nt.default.createElement("input",{type:"text",placeholder:"Enter command",className:"form-control",value:e||"",onChange:Ye,onKeyDown:tt,onKeyUp:xe})))}i(kE,"CommandBar");var El=de(be());var NE=de(be());function PE({checked:e,onToggle:t,text:n}){return NE.default.createElement("div",{className:"btn btn-toggle "+(e?"btn-primary":"btn-default"),onClick:t},NE.default.createElement("i",{className:"fa fa-fw "+(e?"fa-check-square-o":"fa-square-o")}),"\xA0",n)}i(PE,"ToggleButton");var ka=de(be()),AE=de(xO());var fg=class extends ka.Component{constructor(n){super(n);this.viewport=ka.default.createRef();this.heights={},this.state={vScroll:Df()},this.onViewportUpdate=this.onViewportUpdate.bind(this)}static{i(this,"EventLogList")}static{this.propTypes={events:AE.default.array.isRequired,rowHeight:AE.default.number}}static{this.defaultProps={rowHeight:18}}componentDidMount(){window.addEventListener("resize",this.onViewportUpdate),this.onViewportUpdate()}componentWillUnmount(){window.removeEventListener("resize",this.onViewportUpdate)}getSnapshotBeforeUpdate(){return Zm(this.viewport)}componentDidUpdate(n,s,l){l&&$0(this.viewport),this.onViewportUpdate()}onViewportUpdate(){let n=this.viewport.current,s=Df({itemCount:this.props.events.length,rowHeight:this.props.rowHeight,viewportTop:n.scrollTop,viewportHeight:n.offsetHeight,itemHeights:this.props.events.map(l=>this.heights[l.id])});Mo(this.state.vScroll,s)||this.setState({vScroll:s})}setHeight(n,s){if(s&&!this.heights[n]){let l=s.offsetHeight;this.heights[n]!==l&&(this.heights[n]=l,this.onViewportUpdate())}}render(){let{vScroll:n}=this.state,{events:s}=this.props;return ka.default.createElement("pre",{ref:this.viewport,onScroll:this.onViewportUpdate},ka.default.createElement("div",{style:{height:n.paddingTop}}),s.slice(n.start,n.end).map(l=>ka.default.createElement("div",{key:l.id,ref:h=>this.setHeight(l.id,h)},ka.default.createElement(xU,{event:l}),l.message)),ka.default.createElement("div",{style:{height:n.paddingBottom}}))}};function xU({event:e}){let t={web:"html5",debug:"bug",warn:"exclamation-triangle",error:"ban"}[e.level]||"info";return ka.default.createElement("i",{className:`fa fa-fw fa-${t}`})}i(xU,"LogIcon");var LE=class extends El.Component{static{i(this,"PureEventLog")}static{this.defaultProps={defaultHeight:200}}constructor(t,n){super(t,n),this.state={height:this.props.defaultHeight},this.onDragStart=this.onDragStart.bind(this),this.onDragMove=this.onDragMove.bind(this),this.onDragStop=this.onDragStop.bind(this)}onDragStart(t){t.preventDefault(),this.dragStart=this.state.height+t.pageY,window.addEventListener("mousemove",this.onDragMove),window.addEventListener("mouseup",this.onDragStop),window.addEventListener("dragend",this.onDragStop)}onDragMove(t){t.preventDefault(),this.setState({height:this.dragStart-t.pageY})}onDragStop(t){t.preventDefault(),window.removeEventListener("mousemove",this.onDragMove)}render(){let{height:t}=this.state,{filters:n,events:s,toggleFilter:l,close:h}=this.props;return El.default.createElement("div",{className:"eventlog",style:{height:t}},El.default.createElement("div",{onMouseDown:this.onDragStart},"Eventlog",El.default.createElement("div",{className:"pull-right"},Object.values(dC).map(d=>El.default.createElement(PE,{key:d,text:d,checked:n[d],onToggle:()=>l(d)})),El.default.createElement("i",{onClick:h,className:"fa fa-close"}))),El.default.createElement(fg,{events:s}))}},CO=Uu(e=>({filters:e.eventLog.filters,events:e.eventLog.view}),{close:mp,toggleFilter:PA})(LE);var En=de(be());function ME(){let e=me(F=>F.backendState.version),{mode:t,intercept:n,showhost:s,upstream_cert:l,rawtcp:h,http2:d,websocket:v,anticache:S,anticomp:b,stickyauth:k,stickycookie:R,stream_large_bodies:I,listen_host:z,listen_port:j,server:Y,ssl_insecure:ne}=me(F=>F.options);return En.createElement("footer",null,t&&(t.length!==1||t[0]!=="regular")&&En.createElement("span",{className:"label label-success"},t.join(",")),n&&En.createElement("span",{className:"label label-success"},"Intercept: ",n),ne&&En.createElement("span",{className:"label label-danger"},"ssl_insecure"),s&&En.createElement("span",{className:"label label-success"},"showhost"),!l&&En.createElement("span",{className:"label label-success"},"no-upstream-cert"),!h&&En.createElement("span",{className:"label label-success"},"no-raw-tcp"),!d&&En.createElement("span",{className:"label label-success"},"no-http2"),!v&&En.createElement("span",{className:"label label-success"},"no-websocket"),S&&En.createElement("span",{className:"label label-success"},"anticache"),b&&En.createElement("span",{className:"label label-success"},"anticomp"),k&&En.createElement("span",{className:"label label-success"},"stickyauth: ",k),R&&En.createElement("span",{className:"label label-success"},"stickycookie: ",R),I&&En.createElement("span",{className:"label label-success"},"stream: ",Xy(I)),En.createElement("div",{className:"pull-right"},En.createElement(hs,null,Y&&En.createElement("span",{className:"label label-primary",title:"HTTP Proxy Server Address"},z||"*",":",j||8080)),En.createElement("span",{className:"label label-default",title:"Mitmproxy Version"},"mitmproxy ",e)))}i(ME,"Footer");var FE=de(be());var IE=de(be());var Fp=de(be());function OE({children:e}){return Fp.createElement("div",null,Fp.createElement("div",{className:"modal-backdrop fade in"}),Fp.createElement("div",{className:"modal modal-visible",id:"optionsModal",tabIndex:-1,role:"dialog","aria-labelledby":"options"},Fp.createElement("div",{className:"modal-dialog modal-lg",role:"document"},Fp.createElement("div",{className:"modal-content"},e))))}i(OE,"ModalLayout");var Fr=de(be());var dg=de(Am());var ro=de(be());var TO=de(ai());var CU=i(e=>{e.key!=="Escape"&&e.stopPropagation()},"stopPropagation");function kO({value:e,onChange:t,...n}){return ro.default.createElement("div",{className:"checkbox"},ro.default.createElement("label",null,ro.default.createElement("input",{type:"checkbox",checked:e,onChange:s=>t(s.target.checked),...n}),"Enable"))}i(kO,"BooleanOption");function _O({value:e,onChange:t,...n}){return ro.default.createElement("input",{type:"text",value:e||"",onChange:s=>t(s.target.value),...n})}i(_O,"StringOption");function EO(e){return i(function({onChange:n,...s}){return ro.default.createElement(e,{onChange:l=>n(l||null),...s})},"OptionalWrapper")}i(EO,"Optional");function bO({value:e,onChange:t,...n}){return ro.default.createElement("input",{type:"number",value:e,onChange:s=>t(parseInt(s.target.value)),...n})}i(bO,"NumberOption");function _U({value:e,onChange:t,choices:n,...s}){return ro.default.createElement("select",{onChange:l=>t(l.target.value),value:e,...s},n.map(l=>ro.default.createElement("option",{key:l,value:l},l)))}i(_U,"ChoicesOption");function EU({value:e,onChange:t,...n}){let s=Math.max(e.length,1),[l,h]=ro.default.useState(e.join(` +`?(N.seenCR||N.line++,N.column=1,N.seenCR=!1):U==="\r"||U==="\u2028"||U==="\u2029"?(N.line++,N.column=1,N.seenCR=!0):(N.column++,N.seenCR=!1),W++;return Gs[w]=N,N}i(Fa,"peg$computePosDetails");function Wo(w,N){var W=Fa(w),U=Fa(N);return{start:{offset:w,line:W.line,column:W.column},end:{offset:N,line:U.line,column:U.column}}}i(Wo,"peg$computeLocation");function Se(w){Mgi&&(gi=M,Fl=[]),Fl.push(w))}i(Se,"peg$fail");function Xs(w,N,W,U){function gn(Wn){var fo=1;for(Wn.sort(function(Vo,qo){return Vo.descriptionqo.description?1:0});fo1?qo.slice(0,-1).join(", ")+" or "+qo[Wn.length-1]:qo[0],Yl=fo?'"'+Vo(fo)+'"':"end of input","Expected "+kc+" but "+Yl+" found."}return i(Qt,"buildMessage"),N!==null&&gn(N),new t(w!==null?w:Qt(N,W),N,W,U)}i(Xs,"peg$buildException");function vi(){var w,N,W,U;return ve++,w=M,N=hn(),N!==d?(W=Bl(),W!==d?(U=hn(),U!==d?(De=w,N=k(W),w=N):(M=w,w=d)):(M=w,w=d)):(M=w,w=d),ve--,w===d&&(N=d,ve===0&&Se(b)),w}i(vi,"peg$parsestart");function Ze(){var w,N;return ve++,I.test(s.charAt(M))?(w=s.charAt(M),M++):(w=d,ve===0&&Se(z)),ve--,w===d&&(N=d,ve===0&&Se(R)),w}i(Ze,"peg$parsews");function Hl(){var w,N;return ve++,Y.test(s.charAt(M))?(w=s.charAt(M),M++):(w=d,ve===0&&Se(ne)),ve--,w===d&&(N=d,ve===0&&Se(j)),w}i(Hl,"peg$parsecc");function hn(){var w,N;for(ve++,w=[],N=Ze();N!==d;)w.push(N),N=Ze();return ve--,w===d&&(N=d,ve===0&&Se(F)),w}i(hn,"peg$parse__");function Bl(){var w,N,W,U,gn,Qt;return w=M,N=Zr(),N!==d?(W=hn(),W!==d?(s.charCodeAt(M)===124?(U=L,M++):(U=d,ve===0&&Se(D)),U!==d?(gn=hn(),gn!==d?(Qt=Bl(),Qt!==d?(De=w,N=q(N,Qt),w=N):(M=w,w=d)):(M=w,w=d)):(M=w,w=d)):(M=w,w=d)):(M=w,w=d),w===d&&(w=Zr()),w}i(Bl,"peg$parseOrExpr");function Zr(){var w,N,W,U,gn,Qt;if(w=M,N=zl(),N!==d?(W=hn(),W!==d?(s.charCodeAt(M)===38?(U=te,M++):(U=d,ve===0&&Se(Z)),U!==d?(gn=hn(),gn!==d?(Qt=Zr(),Qt!==d?(De=w,N=oe(N,Qt),w=N):(M=w,w=d)):(M=w,w=d)):(M=w,w=d)):(M=w,w=d)):(M=w,w=d),w===d){if(w=M,N=zl(),N!==d){if(W=[],U=Ze(),U!==d)for(;U!==d;)W.push(U),U=Ze();else W=d;W!==d?(U=Zr(),U!==d?(De=w,N=oe(N,U),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;w===d&&(w=zl())}return w}i(Zr,"peg$parseAndExpr");function zl(){var w,N,W,U;return w=M,s.charCodeAt(M)===33?(N=he,M++):(N=d,ve===0&&Se(Re)),N!==d?(W=hn(),W!==d?(U=zl(),U!==d?(De=w,N=Ee(U),w=N):(M=w,w=d)):(M=w,w=d)):(M=w,w=d),w===d&&(w=Zn()),w}i(zl,"peg$parseNotExpr");function Zn(){var w,N,W,U,gn,Qt;return w=M,s.charCodeAt(M)===40?(N=Ye,M++):(N=d,ve===0&&Se(tt)),N!==d?(W=hn(),W!==d?(U=Bl(),U!==d?(gn=hn(),gn!==d?(s.charCodeAt(M)===41?(Qt=xe,M++):(Qt=d,ve===0&&Se(Xe)),Qt!==d?(De=w,N=je(U),w=N):(M=w,w=d)):(M=w,w=d)):(M=w,w=d)):(M=w,w=d)):(M=w,w=d),w===d&&(w=Xf()),w}i(Zn,"peg$parseBindingExpr");function Xf(){var w,N,W,U;if(w=M,s.substr(M,4)===Qe?(N=Qe,M+=4):(N=d,ve===0&&Se(ot)),N!==d&&(De=w,N=It()),w=N,w===d&&(w=M,s.substr(M,2)===At?(N=At,M+=2):(N=d,ve===0&&Se(fn)),N!==d&&(De=w,N=dn()),w=N,w===d)){if(w=M,s.substr(M,2)===vr?(N=vr,M+=2):(N=d,ve===0&&Se(Ut)),N!==d){if(W=[],U=Ze(),U!==d)for(;U!==d;)W.push(U),U=Ze();else W=d;W!==d?(U=jt(),U!==d?(De=w,N=yr(U),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d){if(w=M,s.substr(M,3)===wr?(N=wr,M+=3):(N=d,ve===0&&Se(Yt)),N!==d){if(W=[],U=Ze(),U!==d)for(;U!==d;)W.push(U),U=Ze();else W=d;W!==d?(U=jt(),U!==d?(De=w,N=Ft(U),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d){if(w=M,s.substr(M,3)===se?(N=se,M+=3):(N=d,ve===0&&Se(We)),N!==d){if(W=[],U=Ze(),U!==d)for(;U!==d;)W.push(U),U=Ze();else W=d;W!==d?(U=jt(),U!==d?(De=w,N=Yr(U),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d){if(w=M,s.substr(M,2)===er?(N=er,M+=2):(N=d,ve===0&&Se(st)),N!==d){if(W=[],U=Ze(),U!==d)for(;U!==d;)W.push(U),U=Ze();else W=d;W!==d?(U=wc(),U!==d?(De=w,N=Fe(U),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d){if(w=M,s.substr(M,8)===Fn?(N=Fn,M+=8):(N=d,ve===0&&Se(bn)),N!==d){if(W=[],U=Ze(),U!==d)for(;U!==d;)W.push(U),U=Ze();else W=d;W!==d?(U=jt(),U!==d?(De=w,N=no(U),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d){if(w=M,s.substr(M,2)===Bo?(N=Bo,M+=2):(N=d,ve===0&&Se(lt)),N!==d){if(W=[],U=Ze(),U!==d)for(;U!==d;)W.push(U),U=Ze();else W=d;W!==d?(U=jt(),U!==d?(De=w,N=Sr(U),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d&&(w=M,s.substr(M,4)===dr?(N=dr,M+=4):(N=d,ve===0&&Se(pt)),N!==d&&(De=w,N=io()),w=N,w===d)){if(w=M,s.substr(M,4)===Hn?(N=Hn,M+=4):(N=d,ve===0&&Se(Mi)),N!==d){if(W=[],U=Ze(),U!==d)for(;U!==d;)W.push(U),U=Ze();else W=d;W!==d?(U=jt(),U!==d?(De=w,N=Xr(U),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d&&(w=M,s.substr(M,2)===Qr?(N=Qr,M+=2):(N=d,ve===0&&Se(oo)),N!==d&&(De=w,N=hi()),w=N,w===d)){if(w=M,s.substr(M,2)===Bn?(N=Bn,M+=2):(N=d,ve===0&&Se(so)),N!==d){if(W=[],U=Ze(),U!==d)for(;U!==d;)W.push(U),U=Ze();else W=d;W!==d?(U=jt(),U!==d?(De=w,N=bl(U),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d){if(w=M,s.substr(M,3)===X?(N=X,M+=3):(N=d,ve===0&&Se(ee)),N!==d){if(W=[],U=Ze(),U!==d)for(;U!==d;)W.push(U),U=Ze();else W=d;W!==d?(U=jt(),U!==d?(De=w,N=Ce(U),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d){if(w=M,s.substr(M,3)===Me?(N=Me,M+=3):(N=d,ve===0&&Se(Tl)),N!==d){if(W=[],U=Ze(),U!==d)for(;U!==d;)W.push(U),U=Ze();else W=d;W!==d?(U=jt(),U!==d?(De=w,N=ze(U),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d&&(w=M,s.substr(M,5)===Jr?(N=Jr,M+=5):(N=d,ve===0&&Se(Xt)),N!==d&&(De=w,N=Mt()),w=N,w===d&&(w=M,s.substr(M,7)===Pt?(N=Pt,M+=7):(N=d,ve===0&&Se(Na)),N!==d&&(De=w,N=pn()),w=N,w===d))){if(w=M,s.substr(M,7)===zn?(N=zn,M+=7):(N=d,ve===0&&Se(Nr)),N!==d){if(W=[],U=Ze(),U!==d)for(;U!==d;)W.push(U),U=Ze();else W=d;W!==d?(U=jt(),U!==d?(De=w,N=gs(U),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d){if(w=M,s.substr(M,2)===Tn?(N=Tn,M+=2):(N=d,ve===0&&Se(Aa)),N!==d){if(W=[],U=Ze(),U!==d)for(;U!==d;)W.push(U),U=Ze();else W=d;W!==d?(U=jt(),U!==d?(De=w,N=Pa(U),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d&&(w=M,s.substr(M,2)===nc?(N=nc,M+=2):(N=d,ve===0&&Se(ic)),N!==d&&(De=w,N=oc()),w=N,w===d&&(w=M,s.substr(M,8)===$f?(N=$f,M+=8):(N=d,ve===0&&Se(sc)),N!==d&&(De=w,N=Hp()),w=N,w===d&&(w=M,s.substr(M,8)===kl?(N=kl,M+=8):(N=d,ve===0&&Se(Bp)),N!==d&&(De=w,N=zp()),w=N,w===d&&(w=M,s.substr(M,7)===Nl?(N=Nl,M+=7):(N=d,ve===0&&Se(Vf)),N!==d&&(De=w,N=ac()),w=N,w===d))))){if(w=M,s.substr(M,4)===vs?(N=vs,M+=4):(N=d,ve===0&&Se(Wp)),N!==d){if(W=[],U=Ze(),U!==d)for(;U!==d;)W.push(U),U=Ze();else W=d;W!==d?(U=jt(),U!==d?(De=w,N=Up(U),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d&&(w=M,s.substr(M,2)===La?(N=La,M+=2):(N=d,ve===0&&Se(lc)),N!==d&&(De=w,N=ao()),w=N,w===d&&(w=M,s.substr(M,4)===qf?(N=qf,M+=4):(N=d,ve===0&&Se(Oi)),N!==d&&(De=w,N=uc()),w=N,w===d&&(w=M,s.substr(M,4)===cc?(N=cc,M+=4):(N=d,ve===0&&Se(sr)),N!==d&&(De=w,N=Pe()),w=N,w===d)))){if(w=M,s.substr(M,3)===lo?(N=lo,M+=3):(N=d,ve===0&&Se(Al)),N!==d){if(W=[],U=Ze(),U!==d)for(;U!==d;)W.push(U),U=Ze();else W=d;W!==d?(U=jt(),U!==d?(De=w,N=Ri(U),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d){if(w=M,s.substr(M,3)===vt?(N=vt,M+=3):(N=d,ve===0&&Se(ys)),N!==d){if(W=[],U=Ze(),U!==d)for(;U!==d;)W.push(U),U=Ze();else W=d;W!==d?(U=jt(),U!==d?(De=w,N=Ma(U),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d){if(w=M,s.substr(M,2)===Oa?(N=Oa,M+=2):(N=d,ve===0&&Se(ce)),N!==d){if(W=[],U=Ze(),U!==d)for(;U!==d;)W.push(U),U=Ze();else W=d;W!==d?(U=jt(),U!==d?(De=w,N=Ve(U),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d){if(w=M,s.substr(M,2)===qs?(N=qs,M+=2):(N=d,ve===0&&Se(fc)),N!==d){if(W=[],U=Ze(),U!==d)for(;U!==d;)W.push(U),U=Ze();else W=d;W!==d?(U=jt(),U!==d?(De=w,N=js(U),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;w===d&&(w=M,s.substr(M,10)===zo?(N=zo,M+=10):(N=d,ve===0&&Se(dc)),N!==d&&(De=w,N=qe()),w=N,w===d&&(w=M,N=jt(),N!==d&&(De=w,N=js(N)),w=N))}}}}}}}}}}}}}}}}}return w}i(Xf,"peg$parseExpr");function wc(){var w,N,W,U;if(ve++,w=M,Pl.test(s.charAt(M))?(N=s.charAt(M),M++):(N=d,ve===0&&Se(ws)),N===d&&(N=null),N!==d){if(W=[],mi.test(s.charAt(M))?(U=s.charAt(M),M++):(U=d,ve===0&&Se(Ll)),U!==d)for(;U!==d;)W.push(U),mi.test(s.charAt(M))?(U=s.charAt(M),M++):(U=d,ve===0&&Se(Ll));else W=d;W!==d?(Pl.test(s.charAt(M))?(U=s.charAt(M),M++):(U=d,ve===0&&Se(ws)),U===d&&(U=null),U!==d?(De=w,N=Ml(W),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;return ve--,w===d&&(N=d,ve===0&&Se(jf)),w}i(wc,"peg$parseIntegerLiteral");function jt(){var w,N,W,U;if(ve++,w=M,s.charCodeAt(M)===34?(N=uo,M++):(N=d,ve===0&&Se(Ol)),N!==d){for(W=[],U=Ha();U!==d;)W.push(U),U=Ha();W!==d?(s.charCodeAt(M)===34?(U=uo,M++):(U=d,ve===0&&Se(Ol)),U!==d?(De=w,N=Ks(W),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d){if(w=M,s.charCodeAt(M)===39?(N=pc,M++):(N=d,ve===0&&Se(Rl)),N!==d){for(W=[],U=Wl();U!==d;)W.push(U),U=Wl();W!==d?(s.charCodeAt(M)===39?(U=pc,M++):(U=d,ve===0&&Se(Rl)),U!==d?(De=w,N=Ks(W),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d)if(w=M,N=M,ve++,W=Hl(),ve--,W===d?N=void 0:(M=N,N=d),N!==d){if(W=[],U=$t(),U!==d)for(;U!==d;)W.push(U),U=$t();else W=d;W!==d?(De=w,N=Ks(W),w=N):(M=w,w=d)}else M=w,w=d}return ve--,w===d&&(N=d,ve===0&&Se(Ss)),w}i(jt,"peg$parseStringLiteral");function Ha(){var w,N,W;return w=M,N=M,ve++,hc.test(s.charAt(M))?(W=s.charAt(M),M++):(W=d,ve===0&&Se(mc)),ve--,W===d?N=void 0:(M=N,N=d),N!==d?(s.length>M?(W=s.charAt(M),M++):(W=d,ve===0&&Se(Dl)),W!==d?(De=w,N=Ra(W),w=N):(M=w,w=d)):(M=w,w=d),w===d&&(w=M,s.charCodeAt(M)===92?(N=gc,M++):(N=d,ve===0&&Se(Di)),N!==d?(W=Ii(),W!==d?(De=w,N=Ra(W),w=N):(M=w,w=d)):(M=w,w=d)),w}i(Ha,"peg$parseDoubleStringChar");function Wl(){var w,N,W;return w=M,N=M,ve++,Kf.test(s.charAt(M))?(W=s.charAt(M),M++):(W=d,ve===0&&Se($p)),ve--,W===d?N=void 0:(M=N,N=d),N!==d?(s.length>M?(W=s.charAt(M),M++):(W=d,ve===0&&Se(Dl)),W!==d?(De=w,N=Ra(W),w=N):(M=w,w=d)):(M=w,w=d),w===d&&(w=M,s.charCodeAt(M)===92?(N=gc,M++):(N=d,ve===0&&Se(Di)),N!==d?(W=Ii(),W!==d?(De=w,N=Ra(W),w=N):(M=w,w=d)):(M=w,w=d)),w}i(Wl,"peg$parseSingleStringChar");function $t(){var w,N,W;return w=M,N=M,ve++,W=Ze(),ve--,W===d?N=void 0:(M=N,N=d),N!==d?(s.length>M?(W=s.charAt(M),M++):(W=d,ve===0&&Se(Dl)),W!==d?(De=w,N=Ra(W),w=N):(M=w,w=d)):(M=w,w=d),w}i($t,"peg$parseUnquotedStringChar");function Ii(){var w,N;return Il.test(s.charAt(M))?(w=s.charAt(M),M++):(w=d,ve===0&&Se(Da)),w===d&&(w=M,s.charCodeAt(M)===110?(N=Vp,M++):(N=d,ve===0&&Se(vc)),N!==d&&(De=w,N=qp()),w=N,w===d&&(w=M,s.charCodeAt(M)===114?(N=jp,M++):(N=d,ve===0&&Se(yc)),N!==d&&(De=w,N=Gf()),w=N,w===d&&(w=M,s.charCodeAt(M)===116?(N=Kp,M++):(N=d,ve===0&&Se(Ht)),N!==d&&(De=w,N=Ot()),w=N))),w}i(Ii,"peg$parseEscapeSequence");function Sc(w,N){function W(){return w.apply(this,arguments)||N.apply(this,arguments)}return i(W,"orFilter"),W.desc=w.desc+" or "+N.desc,W}i(Sc,"or");function Qf(w,N){function W(){return w.apply(this,arguments)&&N.apply(this,arguments)}return i(W,"andFilter"),W.desc=w.desc+" and "+N.desc,W}i(Qf,"and");function Qs(w){function N(){return!w.apply(this,arguments)}return i(N,"notFilter"),N.desc="not "+w.desc,N}i(Qs,"not");function Js(w){function N(){return w.apply(this,arguments)}return i(N,"bindingFilter"),N.desc="("+w.desc+")",N}i(Js,"binding");function Jf(w){return!0}i(Jf,"allFilter"),Jf.desc="all flows";var Zf=[new RegExp("text/javascript"),new RegExp("application/x-javascript"),new RegExp("application/javascript"),new RegExp("text/css"),new RegExp("image/.*"),new RegExp("font/.*"),new RegExp("application/font.*")];function xc(w){if(w.response){for(var N=vl.getContentType(w.response),W=Zf.length;W--;)if(Zf[W].test(N))return!0}return!1}i(xc,"assetFilter"),xc.desc="is asset";function Uo(w){w=new RegExp(w,"i");function N(W){return!0}return i(N,"bodyFilter"),N.desc="body filters are not implemented yet, see https://github.com/mitmproxy/mitmproxy/issues/3609",N}i(Uo,"body");function Kt(w){w=new RegExp(w,"i");function N(W){return!0}return i(N,"requestBodyFilter"),N.desc="body filters are not implemented yet, see https://github.com/mitmproxy/mitmproxy/issues/3609",N}i(Kt,"requestBody");function Yp(w){w=new RegExp(w,"i");function N(W){return!0}return i(N,"responseBodyFilter"),N.desc="body filters are not implemented yet, see https://github.com/mitmproxy/mitmproxy/issues/3609",N}i(Yp,"responseBody");function Cc(w){function N(W){return W.response&&W.response.status_code===w}return i(N,"responseCodeFilter"),N.desc="resp. code is "+w,N}i(Cc,"responseCode");function Zs(w){w=new RegExp(w,"i");function N(W){return w.test(W.comment)}return i(N,"commentFilter"),N.desc="comment matches "+w,N}i(Zs,"comment");function _c(w){w=new RegExp(w,"i");function N(W){return W.request&&(w.test(W.request.host)||w.test(W.request.pretty_host))}return i(N,"domainFilter"),N.desc="domain matches "+w,N}i(_c,"domain");function Ba(w){return w.type==="dns"}i(Ba,"dnsFilter"),Ba.desc="is a DNS Flow";function ed(w){w=new RegExp(w,"i");function N(W){return!!W.server_conn.address&&w.test(W.server_conn.address[0]+":"+W.server_conn.address[1])}return i(N,"destinationFilter"),N.desc="destination address matches "+w,N}i(ed,"destination");function Ul(w){return!!w.error}i(Ul,"errorFilter"),Ul.desc="has error";function $l(w){w=new RegExp(w,"i");function N(W){return W.request&&zs.match_header(W.request,w)||W.response&&vl.match_header(W.response,w)}return i(N,"headerFilter"),N.desc="header matches "+w,N}i($l,"header");function Ec(w){w=new RegExp(w,"i");function N(W){return W.request&&zs.match_header(W.request,w)}return i(N,"requestHeaderFilter"),N.desc="req. header matches "+w,N}i(Ec,"requestHeader");function Xp(w){w=new RegExp(w,"i");function N(W){return W.response&&vl.match_header(W.response,w)}return i(N,"responseHeaderFilter"),N.desc="resp. header matches "+w,N}i(Xp,"responseHeader");function Vl(w){return w.type==="http"}i(Vl,"httpFilter"),Vl.desc="is an HTTP Flow";function mn(w){return w.marked}i(mn,"markedFilter"),mn.desc="is marked";function bc(w){w=new RegExp(w,"i");function N(W){return w.test(W.marked)}return i(N,"markerFilter"),N.desc="marker matches "+w,N}i(bc,"marker");function co(w){w=new RegExp(w,"i");function N(W){return W.request&&w.test(W.request.method)}return i(N,"methodFilter"),N.desc="method matches "+w,N}i(co,"method");function yi(w){return w.request&&!w.response}i(yi,"noResponseFilter"),yi.desc="has no response";function ea(w){return w.is_replay==="request"}i(ea,"clientReplayFilter"),ea.desc="request has been replayed";function ql(w){return w.is_replay==="response"}i(ql,"serverReplayFilter"),ql.desc="response has been replayed";function Tc(w){return!!w.is_replay}i(Tc,"replayFilter"),Tc.desc="flow has been replayed";function Fi(w){w=new RegExp(w,"i");function N(W){return!!W.client_conn.peername&&w.test(W.client_conn.peername[0]+":"+W.client_conn.peername[1])}return i(N,"sourceFilter"),N.desc="source address matches "+w,N}i(Fi,"source");function $o(w){return!!w.response}i($o,"responseFilter"),$o.desc="has response";function jl(w){return w.type==="tcp"}i(jl,"tcpFilter"),jl.desc="is a TCP Flow";function xs(w){return w.type==="udp"}i(xs,"udpFilter"),xs.desc="is a UDP Flow";function td(w){w=new RegExp(w,"i");function N(W){return W.request&&w.test(zs.getContentType(W.request))}return i(N,"requestContentTypeFilter"),N.desc="req. content type matches "+w,N}i(td,"requestContentType");function Qp(w){w=new RegExp(w,"i");function N(W){return W.response&&w.test(vl.getContentType(W.response))}return i(N,"responseContentTypeFilter"),N.desc="resp. content type matches "+w,N}i(Qp,"responseContentType");function Kl(w){w=new RegExp(w,"i");function N(W){return W.request&&w.test(zs.getContentType(W.request))||W.response&&w.test(vl.getContentType(W.response))}return i(N,"contentTypeFilter"),N.desc="content type matches "+w,N}i(Kl,"contentType");function Gl(w){w=new RegExp(w,"i");function N(W){if(W.type==="dns"){let U=W.request?.questions[0];return U&&w.test(U.name)}return W.request&&w.test(zs.pretty_url(W.request))}return i(N,"urlFilter"),N.desc="url matches "+w,N}i(Gl,"url");function kn(w){return!!w.websocket}if(i(kn,"websocketFilter"),kn.desc="is a Websocket Flow",Ia=S(),Ia!==d&&M===s.length)return Ia;throw Ia!==d&&M1)s=s.filter(l=>l!==t.data);else if(s=[],t.data in e.viewIndex&&e.view.length>1){let l=e.viewIndex[t.data],h;l===e.view.length-1?h=e.view[l-1]:h=e.view[l+1],s.push(h.id)}}return{...e,selected:s,...Vu(e,n)}}case cP:return{...e,filter:t.filter,...Vu(e,Mm(lP(t.filter),uC(e.sort)))};case dP:return{...e,highlight:t.highlight};case fP:return{...e,sort:t.sort,...Vu(e,Zx(uC(t.sort)))};case uP:return{...e,selected:t.flowIds};default:return e}}i(cC,"reducer");function lP(e){if(e)return wf.parse(e)}i(lP,"makeFilter");function uC({column:e,desc:t}){if(!e)return(s,l)=>0;let n=sP[e];return(s,l)=>{let h=n(s),d=n(l);return h>d?t?-1:1:hxt(`/flows/${e.id}/resume`,{method:"POST"})}i(fp,"resume");function n0(){return()=>xt("/flows/resume",{method:"POST"})}i(n0,"resumeAll");function i0(e){return()=>xt(`/flows/${e.id}/kill`,{method:"POST"})}i(i0,"kill");function hP(){return()=>xt("/flows/kill",{method:"POST"})}i(hP,"killAll");function o0(e){return()=>xt(`/flows/${e.id}`,{method:"DELETE"})}i(o0,"remove");function s0(e){return()=>xt(`/flows/${e.id}/duplicate`,{method:"POST"})}i(s0,"duplicate");function dp(e){return()=>xt(`/flows/${e.id}/replay`,{method:"POST"})}i(dp,"replay");function a0(e){return()=>xt(`/flows/${e.id}/revert`,{method:"POST"})}i(a0,"revert");function si(e,t){return()=>xt.put(`/flows/${e.id}`,t)}i(si,"update");function mP(e,t,n){let s=new FormData;return t=new window.Blob([t],{type:"plain/text"}),s.append("file",t),()=>xt(`/flows/${e.id}/${n}/content.data`,{method:"POST",body:s})}i(mP,"uploadContent");function l0(){return()=>xt("/clear",{method:"POST"})}i(l0,"clear");function gP(e){let t=new FormData;return t.append("file",e),()=>xt("/flows/dump",{method:"POST",body:t})}i(gP,"upload");function yl(e){return{type:uP,flowIds:e?[e]:[]}}i(yl,"select");var yB={activeModal:void 0},vP=Gt({name:"ui/modal",initialState:yB,reducers:{setActiveModal(e,t){e.activeModal=t.payload},hideModal(e){e.activeModal=void 0}}}),{actions:wB,reducer:SB}=vP,yP=vP.actions.hideModal.type,{setActiveModal:wP,hideModal:u0}=wB,SP=SB;var ba=de(be());var qt=de(be());var hp=de(be());var Im=de(be()),CP=de(ai());var xP=(()=>{let e=document.createElement("div");return e.setAttribute("contenteditable","PLAINTEXT-ONLY"),e.contentEditable==="plaintext-only"?"plaintext-only":"true"})(),pp=!1,gt=class extends Im.Component{constructor(){super(...arguments);this.input=Im.default.createRef();this.isEditing=i(()=>this.input.current?.contentEditable===xP,"isEditing");this.startEditing=i(()=>{if(!this.input.current)return console.error("unreachable");this.isEditing()||(this.suppress_events=!0,this.input.current.blur(),this.input.current.contentEditable=xP,window.requestAnimationFrame(()=>{if(this.input.current){if(this.input.current.focus(),this.suppress_events=!1,this.props.selectAllOnClick){let n=document.createRange();n.selectNodeContents(this.input.current);let s=window.getSelection();s?.removeAllRanges(),s?.addRange(n)}this.props.onEditStart?.()}}))},"startEditing");this.resetValue=i(()=>{if(!this.input.current)return console.error("unreachable");this.input.current.textContent=this.props.content,this.props.onInput?.(this.props.content)},"resetValue");this.finishEditing=i(()=>{if(!this.input.current)return console.error("unreachable");this.props.onEditDone(this.input.current.textContent||""),this.input.current.blur(),this.input.current.contentEditable="inherit"},"finishEditing");this.onPaste=i(n=>{n.preventDefault();let s=n.clipboardData.getData("text/plain");document.execCommand("insertHTML",!1,s)},"onPaste");this.suppress_events=!1;this.onMouseDown=i(n=>{pp&&console.debug("onMouseDown",this.suppress_events),this.suppress_events=!0,window.addEventListener("mouseup",this.onMouseUp,{once:!0})},"onMouseDown");this.onMouseUp=i(n=>{let s=n.target===this.input.current,l=!window.getSelection()?.toString();pp&&console.warn("mouseUp",this.suppress_events,s,l),this.props.selectAllOnClick?s&&l&&this.startEditing():s&&this.startEditing(),this.suppress_events=!1},"onMouseUp");this.onClick=i(n=>{pp&&console.debug("onClick",this.suppress_events)},"onClick");this.onFocus=i(n=>{if(pp&&console.debug("onFocus",this.props.content,this.suppress_events),!this.input.current)throw"unreachable";this.suppress_events||this.startEditing()},"onFocus");this.onInput=i(n=>{this.props.onInput?.(this.input.current?.textContent||"")},"onInput");this.onBlur=i(n=>{pp&&console.debug("onBlur",this.props.content,this.suppress_events),!this.suppress_events&&this.finishEditing()},"onBlur");this.onKeyDown=i(n=>{switch(pp&&console.debug("keydown",n),n.stopPropagation(),n.key){case"Escape":n.preventDefault(),this.resetValue(),this.finishEditing();break;case"Enter":n.shiftKey||(n.preventDefault(),this.finishEditing());break;default:break}this.props.onKeyDown?.(n)},"onKeyDown")}static{i(this,"ValueEditor")}render(){let n=(0,CP.default)("inline-input",this.props.className);return Im.default.createElement("span",{ref:this.input,tabIndex:0,className:n,placeholder:this.props.placeholder,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onInput:this.onInput,onPaste:this.onPaste,onMouseDown:this.onMouseDown,onClick:this.onClick},this.props.content)}componentDidUpdate(n){n.content!==this.props.content&&this.props.onInput?.(this.props.content)}};var _P=de(ai());function xf(e){let[t,n]=(0,hp.useState)(e.isValid(e.content)),s=(0,hp.useRef)(null),l=i(d=>{e.isValid(d)?e.onEditDone(d):s.current?.resetValue()},"onEditDone"),h=(0,_P.default)(e.className,t?"has-success":"has-warning");return hp.default.createElement(gt,{...e,className:h,onInput:d=>n(e.isValid(d)),onEditDone:l,ref:s})}i(xf,"ValidateEditor");var He=i(()=>_A(),"useAppDispatch"),me=mA,EP=Nm.withTypes();var bP="EVENTS_ADD",xB="EVENTS_RECEIVE",TP="EVENTS_TOGGLE_VISIBILITY",kP="EVENTS_TOGGLE_FILTER",dC=(h=>(h.debug="debug",h.info="info",h.web="web",h.warn="warn",h.error="error",h))(dC||{}),CB={visible:!1,filters:{debug:!1,info:!0,web:!0,warn:!0,error:!0},...cp};function pC(e=CB,t){switch(t.type){case TP:return{...e,visible:!e.visible};case kP:{let n={...e.filters,[t.filter]:!e.filters[t.filter]};return{...e,filters:n,...Vu(e,Mm(s=>n[s.level]))}}case bP:case xB:return{...e,...Vu(e,Rm[t.cmd](t.data,n=>e.filters[n.level]))};default:return e}}i(pC,"reduce");function NP(e){return{type:kP,filter:e}}i(NP,"toggleFilter");function mp(){return{type:TP}}i(mp,"toggleVisibility");function AP(e,t="web"){let n={id:Math.random().toString(),message:e,level:t};return{type:bP,cmd:"add",data:n}}i(AP,"add");var LP={},_B=Gt({name:"ui/optionsEditor",initialState:LP,reducers:{startUpdate(e,t){e[t.payload.option]={isUpdating:!0,value:t.payload.value,error:!1}},updateSuccess(e,t){e[t.payload.option]=void 0},updateError(e,t){let n=e[t.payload.option].value;typeof n=="boolean"&&(n=!n),e[t.payload.option]={value:n,isUpdating:!1,error:t.payload.error}}},extraReducers:i(e=>{e.addCase(yP,()=>LP)},"extraReducers")}),{actions:EB,reducer:bB}=_B,{startUpdate:MP,updateSuccess:OP,updateError:RP}=EB,DP=bB;var kB=Gt({name:"ui/tabs",initialState:{current:1,isInitial:!0},reducers:{setCurrent(e,t){e.current=t.payload,e.isInitial=!1}}}),{actions:NB,reducer:AB}=kB,{setCurrent:Fm}=NB,IP=AB;var FP=sp({flow:tP,modal:SP,optionsEditor:DP,tabs:IP});var PB={state:"CONNECTION_INIT",message:void 0};function hC(e=PB,t){switch(t.type){case"CONNECTION_ESTABLISHED":case"CONNECTION_FETCHING":case"CONNECTION_ERROR":case"CONNECTION_OFFLINE":return{state:t.type,message:t.message};default:return e}}i(hC,"reducer");function HP(){return{type:"CONNECTION_FETCHING"}}i(HP,"startFetching");function BP(){return{type:"CONNECTION_ESTABLISHED"}}i(BP,"connectionEstablished");function zP(e){return{type:"CONNECTION_ERROR",message:e}}i(zP,"connectionError");var WP={add_upstream_certs_to_client_chain:!1,allow_hosts:[],anticache:!1,anticomp:!1,block_global:!0,block_list:[],block_private:!1,body_size_limit:void 0,cert_passphrase:void 0,certs:[],ciphers_client:void 0,ciphers_server:void 0,client_certs:void 0,client_replay:[],client_replay_concurrency:1,command_history:!0,confdir:"~/.mitmproxy",connect_addr:void 0,connection_strategy:"eager",console_focus_follow:!1,content_view_lines_cutoff:512,dns_name_servers:[],dns_use_hosts_file:!0,export_preserve_original_ip:!1,hardump:"",http2:!0,http2_ping_keepalive:58,http3:!0,http_connect_send_host_header:!0,ignore_hosts:[],intercept:void 0,intercept_active:!1,keep_alt_svc_header:!1,keep_host_header:!1,key_size:2048,listen_host:"",listen_port:void 0,map_local:[],map_remote:[],mode:["regular"],modify_body:[],modify_headers:[],normalize_outbound_headers:!0,onboarding:!0,onboarding_host:"mitm.it",proxy_debug:!1,proxyauth:void 0,rawtcp:!0,readfile_filter:void 0,request_client_cert:!1,rfile:void 0,save_stream_file:void 0,save_stream_filter:void 0,scripts:[],server:!0,server_replay:[],server_replay_extra:"forward",server_replay_ignore_content:!1,server_replay_ignore_host:!1,server_replay_ignore_params:[],server_replay_ignore_payload_params:[],server_replay_ignore_port:!1,server_replay_kill_extra:!1,server_replay_nopop:!1,server_replay_refresh:!0,server_replay_reuse:!1,server_replay_use_headers:[],show_ignored_hosts:!1,showhost:!1,ssl_insecure:!1,ssl_verify_upstream_trusted_ca:void 0,ssl_verify_upstream_trusted_confdir:void 0,stickyauth:void 0,stickycookie:void 0,stream_large_bodies:void 0,strip_ech:!0,tcp_hosts:[],termlog_verbosity:"info",tls_ecdh_curve_client:void 0,tls_ecdh_curve_server:void 0,tls_version_client_max:"UNBOUNDED",tls_version_client_min:"TLS1_2",tls_version_server_max:"UNBOUNDED",tls_version_server_min:"TLS1_2",udp_hosts:[],upstream_auth:void 0,upstream_cert:!0,validate_inbound_headers:!0,view_filter:void 0,view_order:"time",view_order_reversed:!1,web_columns:["tls","icon","path","method","status","size","time"],web_debug:!1,web_host:"127.0.0.1",web_open_browser:!0,web_port:8081,web_static_viewer:"",websocket:!0};var mC="OPTIONS_RECEIVE",gC="OPTIONS_UPDATE";function vC(e=WP,t){switch(t.type){case mC:{let n={};for(let[s,{value:l}]of Object.entries(t.data))n[s]=l;return n}case gC:{let n={...e};for(let[s,{value:l}]of Object.entries(t.data))n[s]=l;return n}default:return e}}i(vC,"reducer");async function MB(e,t,n){try{let s=await xt.put("/options",{[e]:t});if(s.status===200)n(OP({option:e}));else throw await s.text()}catch(s){n(RP({option:e,error:s}))}}i(MB,"pureSendUpdate");var OB=MB;function gp(e,t){return n=>{n(MP({option:e,value:t})),OB(e,t,n)}}i(gp,"update");var DB={visible:!1},IB=Gt({name:"commandBar",initialState:DB,reducers:{toggleVisibility(e){e.visible=!e.visible}}}),{actions:FB,reducer:HB}=IB,{toggleVisibility:f0}=FB,UP=HB;var Gn=us("STATE_RECEIVE"),Yn=us("STATE_UPDATE"),BB={available:!1,version:"",contentViews:[],servers:{},platform:"",localModeUnavailable:null};function yC(e=BB,t){switch(t.type){case Gn.type:case Yn.type:return{...e,available:!0,...t.payload};default:return e}}i(yC,"reducer");var zB={},WB=i((e=zB,t)=>{switch(t.type){case mC:return t.data;case gC:return{...e,...t.data};default:return e}},"reducer"),VP=WB;var Xi=i((e,t)=>t.listen_host&&t.listen_port?`${e}@${t.listen_host}:${t.listen_port}`:t.listen_port?`${e}@${t.listen_port}`:e,"includeListenAddress"),d0=i(e=>{let[t,n]=Lm(e,"@");t||(t=n,n="");let[s,l]=Jy(t,":"),h,d;if(n){let v;if(n.includes(":")?[h,v]=Lm(n,":"):(h="",v=n),v&&(d=parseInt(v,10),isNaN(d)||d<0||d>65535))throw new Error(`invalid port: ${v}`)}return{full_spec:e,name:s,data:l,listen_host:h,listen_port:d}},"parseSpec");var p0=i(e=>Xi("regular",e),"getSpec"),wC=i(({listen_host:e,listen_port:t})=>({ui_id:Math.random(),active:!0,listen_host:e,listen_port:t}),"parseRaw");var h0=i(e=>e.selectedProcesses?`local:${e.selectedProcesses}`:"local","getSpec"),SC=i(({data:e})=>({ui_id:Math.random(),active:!0,selectedProcesses:e}),"parseRaw");var m0=i(e=>{let t=e.file_path?`wireguard:${e.file_path}`:"wireguard";return Xi(t,e)},"getSpec"),xC=i(({data:e,listen_host:t,listen_port:n})=>({ui_id:Math.random(),active:!0,listen_host:t,listen_port:n,file_path:e}),"parseRaw");var g0=(b=>(b.HTTP="http",b.HTTPS="https",b.HTTP3="http3",b.TLS="tls",b.DTLS="dtls",b.TCP="tcp",b.UDP="udp",b.DNS="dns",b.QUIC="quic",b))(g0||{});var v0=i(()=>({active:!1,protocol:"https",destination:"",ui_id:Math.random()}),"defaultReverseState"),vp=i(e=>Xi(`reverse:${e.protocol}://${e.destination}`,e),"getSpec"),qP=i(({data:e,listen_host:t,listen_port:n})=>{let[s,l]=Jy(e,"://");return l||(l=s,s="https"),{ui_id:Math.random(),active:!0,protocol:s,destination:l,listen_host:t,listen_port:n}},"parseRaw");var y0=i(e=>Xi("transparent",e),"getSpec"),CC=i(({listen_host:e,listen_port:t})=>({ui_id:Math.random(),active:!0,listen_host:e,listen_port:t}),"parseRaw");var w0=i(e=>Xi("socks5",e),"getSpec"),_C=i(({listen_host:e,listen_port:t})=>({ui_id:Math.random(),active:!0,listen_host:e,listen_port:t}),"parseRaw");var S0=i(e=>Xi(`upstream:${e.destination}`,e),"getSpec"),EC=i(({data:e,listen_host:t,listen_port:n})=>({ui_id:Math.random(),active:!0,destination:e||"",listen_host:t,listen_port:n}),"parseRaw");var x0=i(e=>Xi("dns",e),"getSpec"),bC=i(({listen_host:e,listen_port:t})=>({ui_id:Math.random(),active:!0,listen_host:e,listen_port:t}),"parseRaw");var qu=i(e=>e.active&&!e.error,"isActiveMode");async function UB(e,t){let n=t.getState().modes,s=[...n.regular.filter(qu).map(p0),...n.local.filter(qu).map(h0),...n.wireguard.filter(qu).map(m0),...n.reverse.filter(qu).map(vp),...n.transparent.filter(qu).map(y0),...n.socks.filter(qu).map(w0),...n.upstream.filter(qu).map(S0),...n.dns.filter(qu).map(x0)],l=await xt.put("/options",{mode:s});if(l.status!==200)throw new Error(await l.text())}i(UB,"updateModes");function Ct(e){return EP(e,UB)}i(Ct,"createModeUpdateThunk");function _t(e,t,n){e.addCase(n.pending,(s,l)=>{let{server:h,value:d}=l.meta.arg,v=s.findIndex(S=>S.ui_id===h.ui_id);v>=0&&(s[v][t]=d,s[v].error=void 0)}),e.addCase(n.rejected,(s,l)=>{let{server:h}=l.meta.arg,d=s.findIndex(v=>v.ui_id===h.ui_id);d>=0&&(s[d].error=l.error.message)})}i(_t,"addSetter");function jr(e,t){return i(function(s,l){if(l.payload.servers){let h=Object.values(l.payload.servers).filter(d=>d.type===e).map(d=>d0(d.full_spec));if(h.length>0)return h.map(t);for(let d of s)d.active=!1}},"reducer")}i(jr,"updateState");var TC=Ct("modes/regular/setActive"),kC=Ct("modes/regular/setListenHost"),NC=Ct("modes/regular/setListenPort"),$B=[{active:!0,ui_id:Math.random()}],VB=Gt({name:"modes/regular",initialState:$B,reducers:{},extraReducers:i(e=>{_t(e,"active",TC),_t(e,"listen_host",kC),_t(e,"listen_port",NC),e.addCase(Gn,jr("regular",wC)),e.addCase(Yn,jr("regular",wC))},"extraReducers")}),jP=VB.reducer;var AC=Ct("modes/local/setActive"),yp=Ct("modes/local/setSelectedProcesses"),qB=[{active:!1,selectedProcesses:"",ui_id:Math.random()}],jB=Gt({name:"modes/local",initialState:qB,reducers:{},extraReducers:i(e=>{_t(e,"active",AC),_t(e,"selectedProcesses",yp),e.addCase(Gn,jr("local",SC)),e.addCase(Yn,jr("local",SC))},"extraReducers")}),KP=jB.reducer;var PC=Ct("modes/wireguard/setActive"),LC=Ct("modes/wireguard/setListenHost"),MC=Ct("modes/wireguard/setListenPort"),OC=Ct("modes/wireguard/setFilePath"),KB=[{active:!1,ui_id:Math.random()}],GB=Gt({name:"modes/wireguard",initialState:KB,reducers:{},extraReducers:i(e=>{_t(e,"active",PC),_t(e,"listen_host",LC),_t(e,"listen_port",MC),_t(e,"file_path",OC),e.addCase(Gn,jr("wireguard",xC)),e.addCase(Yn,jr("wireguard",xC))},"extraReducers")}),GP=GB.reducer;var C0=Ct("modes/reverse/setActive"),RC=Ct("modes/reverse/setListenHost"),DC=Ct("modes/reverse/setListenPort"),IC=Ct("modes/reverse/setProtocol"),FC=Ct("modes/reverse/setDestination"),YB=[v0()],YP=Gt({name:"modes/reverse",initialState:YB,reducers:{addServer:i(e=>{e.push(v0())},"addServer"),removeServer:i((e,t)=>{let n=e.findIndex(s=>s.ui_id===t.payload.ui_id);n!==-1&&(e[n].active&&console.error("servers should be deactivated before removal"),e.splice(n,1))},"removeServer")},extraReducers:i(e=>{_t(e,"active",C0),_t(e,"listen_host",RC),_t(e,"listen_port",DC),_t(e,"protocol",IC),_t(e,"destination",FC),e.addCase(Gn,t),e.addCase(Yn,t);function t(n,s){if(s.payload.servers){let l=Object.fromEntries(Object.entries(s.payload.servers).filter(([d,v])=>v.type==="reverse").map(([d,v])=>[d,d0(d)])),h=[];for(let d of n){let v=vp(d),S=v in l;delete l[v],h.push({...d,active:S})}for(let d of Object.values(l))h.push(qP(d));return h.length>1&&Mo({...h[0],ui_id:void 0},{...v0(),ui_id:void 0})&&h.shift(),h}}i(t,"updateState")},"extraReducers")}),{addServer:XP,removeServer:QP}=YP.actions,JP=YP.reducer;var HC=Ct("modes/transparent/setActive"),BC=Ct("modes/transparent/setListenHost"),zC=Ct("modes/transparent/setListenPort"),XB=[{active:!1,ui_id:Math.random()}],QB=Gt({name:"modes/transparent",initialState:XB,reducers:{},extraReducers:i(e=>{_t(e,"active",HC),_t(e,"listen_host",BC),_t(e,"listen_port",zC),e.addCase(Gn,jr("transparent",CC)),e.addCase(Yn,jr("transparent",CC))},"extraReducers")}),ZP=QB.reducer;var WC=Ct("modes/socks5/setActive"),UC=Ct("modes/socks5/setListenHost"),$C=Ct("modes/socks5/setListenPort"),JB=[{active:!1,ui_id:Math.random()}],ZB=Gt({name:"modes/socks5",initialState:JB,reducers:{},extraReducers:i(e=>{_t(e,"active",WC),_t(e,"listen_host",UC),_t(e,"listen_port",$C),e.addCase(Gn,jr("socks5",_C)),e.addCase(Yn,jr("socks5",_C))},"extraReducers")}),eL=ZB.reducer;var VC=Ct("modes/upstream/setActive"),qC=Ct("modes/upstream/setListenHost"),jC=Ct("modes/upstream/setListenPort"),KC=Ct("modes/upstream/setDestination"),ez=[{active:!1,destination:"",ui_id:Math.random()}],tz=Gt({name:"modes/upstream",initialState:ez,reducers:{},extraReducers:i(e=>{_t(e,"active",VC),_t(e,"listen_host",qC),_t(e,"listen_port",jC),_t(e,"destination",KC),e.addCase(Gn,jr("upstream",EC)),e.addCase(Yn,jr("upstream",EC))},"extraReducers")}),tL=tz.reducer;var GC=Ct("modes/dns/setActive"),YC=Ct("modes/dns/setListenHost"),XC=Ct("modes/dns/setListenPort"),rz=[{active:!0,ui_id:Math.random()}],nz=Gt({name:"modes/dns",initialState:rz,reducers:{},extraReducers:i(e=>{_t(e,"active",GC),_t(e,"listen_host",YC),_t(e,"listen_port",XC),e.addCase(Gn,jr("dns",bC)),e.addCase(Yn,jr("dns",bC))},"extraReducers")}),rL=nz.reducer;var iz=sp({regular:jP,local:KP,wireguard:GP,reverse:JP,transparent:ZP,socks:eL,upstream:tL,dns:rL}),nL=iz;var Cf=Nm("fetchProcesses",async(e,{rejectWithValue:t})=>{try{return(await xt("/processes")).json()}catch(n){return t(n.message)}}),oz={currentProcesses:[],isLoading:!1},sz=Gt({name:"processes",initialState:oz,reducers:{},extraReducers:i(e=>{e.addCase(Cf.pending,t=>{t.isLoading=!0,t.error=void 0}),e.addCase(Cf.fulfilled,(t,n)=>{t.isLoading=!1,t.currentProcesses=n.payload}),e.addCase(Cf.rejected,(t,n)=>{t.isLoading=!1,t.error=n.payload})},"extraReducers")}),iL=sz.reducer;var az={commandBar:UP,eventLog:pC,flows:cC,connection:hC,modes:nL,ui:FP,options:vC,options_meta:VP,backendState:yC,processes:iL},_f=GA({reducer:az,middleware:i(e=>e({immutableCheck:{warnAfter:5e5},serializableCheck:{warnAfter:5e5}}),"middleware")});var Io=de(be());var oL=de(Pm()),sL=de(ai());var QC=class extends Io.Component{constructor(){super(...arguments);this.container=Io.default.createRef();this.nameInput=Io.default.createRef();this.valueInput=Io.default.createRef();this.render=i(()=>{let[n,s]=this.props.item;return Io.default.createElement("div",{ref:this.container,className:"kv-row",onClick:this.onClick,onKeyDownCapture:this.onKeyDown},Io.default.createElement(gt,{ref:this.nameInput,className:"kv-key",content:n,onEditStart:this.props.onEditStart,onEditDone:l=>this.props.onEditDone([l,s]),selectAllOnClick:!0}),":\xA0",Io.default.createElement(gt,{ref:this.valueInput,className:"kv-value",content:s,onEditStart:this.props.onEditStart,onEditDone:l=>this.props.onEditDone([n,l]),placeholder:"empty",selectAllOnClick:!0}))},"render");this.onClick=i(n=>{n.target===this.container.current&&this.props.onClickEmptyArea()},"onClick");this.onKeyDown=i(n=>{n.target===this.valueInput.current?.input.current&&n.key==="Tab"&&this.props.onTabNext()},"onKeyDown")}static{i(this,"Row")}},wp=class extends Io.Component{constructor(){super(...arguments);this.rowRefs={};this.state={currentList:this.props.data||[],initialList:this.props.data};this.render=i(()=>{this.rowRefs={};let n=this.state.currentList.map((s,l)=>Io.default.createElement(QC,{key:l,item:s,onEditStart:()=>this.currentlyEditing=l,onEditDone:h=>this.onEditDone(l,h),onClickEmptyArea:()=>this.onClickEmptyArea(l),onTabNext:()=>this.onTabNext(l),ref:h=>this.rowRefs[l]=h}));return Io.default.createElement("div",{className:(0,sL.default)("kv-editor",this.props.className),onMouseDown:this.onMouseDown},n,Io.default.createElement("div",{onClick:s=>{s.preventDefault(),this.onClickEmptyArea(this.state.currentList.length-1)},className:"kv-add-row fa fa-plus-square-o",role:"button","aria-label":"Add"}))},"render");this.onEditDone=i((n,s)=>{let l=[...this.state.currentList];s[0]?l[n]=s:l.splice(n,1),this.currentlyEditing=void 0,(0,oL.isEqual)(this.state.currentList,l)||this.props.onChange(l),this.setState({currentList:l})},"onEditDone");this.onClickEmptyArea=i(n=>{if(this.justFinishedEditing)return;let s=[...this.state.currentList];s.splice(n+1,0,["",""]),this.setState({currentList:s},()=>this.rowRefs[n+1]?.nameInput.current?.startEditing())},"onClickEmptyArea");this.onTabNext=i(n=>{n==this.state.currentList.length-1&&this.onClickEmptyArea(n)},"onTabNext");this.onMouseDown=i(n=>{this.justFinishedEditing=this.currentlyEditing},"onMouseDown")}static{i(this,"KeyValueListEditor")}static getDerivedStateFromProps(n,s){return n.data!==s.initialList?{currentList:n.data||[],initialList:n.data}:null}};var ir=de(be());var Hm=de(be());function _0(e,t){let[n,s]=(0,Hm.useState)(),[l,h]=(0,Hm.useState)();return(0,Hm.useEffect)(()=>{l&&l.abort();let d=new AbortController;return xt(e,{signal:d.signal}).then(v=>{if(!v.ok)throw`${v.status} ${v.statusText}`.trim();return v.text()}).then(v=>{s(v)}).catch(v=>{d.signal.aborted||s(`Error getting content: ${v}.`)}),h(d),()=>{d.signal.aborted||d.abort()}},[e,t]),n}i(_0,"useContent");var Bm=de(be());var E0=Bm.default.memo(i(function({icon:t,text:n,className:s,title:l,onOpenFile:h,onClick:d}){let v;return Bm.default.createElement("a",{href:"#",onClick:S=>{v.click(),d&&d(S)},className:s,title:l},Bm.default.createElement("i",{className:"fa fa-fw "+t}),n,Bm.default.createElement("input",{ref:S=>v=S,className:"hidden",type:"file",onChange:S=>{S.preventDefault(),S.target.files&&S.target.files.length>0&&h(S.target.files[0]),v.value=""}}))},"FileChooser"));var Sp=de(be()),aL=de(ai());function Rr({onClick:e,children:t,icon:n,disabled:s,className:l,title:h}){return Sp.createElement("button",{className:(0,aL.default)(l,"btn btn-default"),onClick:s?void 0:e,disabled:s,title:h},n&&Sp.createElement(Sp.Fragment,null,Sp.createElement("i",{className:"fa "+n}),"\xA0"),t)}i(Rr,"Button");var Um=de(be()),pL=de(be());var zm=de(be()),cL=de(ai()),fL=de(lL()),dL=de(Pm());function uL(e){return e&&e.replace(/\r\n|\r/g,` +`)}i(uL,"normalizeLineEndings");var Wm=class extends zm.Component{static{i(this,"CodeMirror")}constructor(t){super(t),this.state={isFocused:!1}}static{this.defaultProps={preserveScrollPosition:!1}}getCodeMirrorInstance(){return this.props.codeMirrorInstance||fL.default}UNSAFE_componentWillMount(){this.props.path&&console.error("Warning: react-codemirror: the `path` prop has been changed to `name`")}componentDidMount(){let t=this.getCodeMirrorInstance();this.codeMirror=t.fromTextArea(this.textareaNode,this.props.options),this.codeMirror.on("change",this.codemirrorValueChanged.bind(this)),this.codeMirror.on("cursorActivity",this.cursorActivity.bind(this)),this.codeMirror.on("focus",this.focusChanged.bind(this,!0)),this.codeMirror.on("blur",this.focusChanged.bind(this,!1)),this.codeMirror.on("scroll",this.scrollChanged.bind(this)),this.codeMirror.setValue(this.props.defaultValue||this.props.value||"")}componentWillUnmount(){this.codeMirror&&this.codeMirror.toTextArea()}UNSAFE_componentWillReceiveProps(t){if(this.codeMirror&&t.value!==void 0&&t.value!==this.props.value&&uL(this.codeMirror.getValue())!==uL(t.value))if(this.props.preserveScrollPosition){let n=this.codeMirror.getScrollInfo();this.codeMirror.setValue(t.value),this.codeMirror.scrollTo(n.left,n.top)}else this.codeMirror.setValue(t.value);if(typeof t.options=="object")for(let n in t.options)t.options.hasOwnProperty(n)&&this.setOptionIfChanged(n,t.options[n])}setOptionIfChanged(t,n){let s=this.codeMirror.getOption(t);(0,dL.isEqual)(s,n)||this.codeMirror.setOption(t,n)}getCodeMirror(){return this.codeMirror}focus(){this.codeMirror&&this.codeMirror.focus()}focusChanged(t){this.setState({isFocused:t}),this.props.onFocusChange&&this.props.onFocusChange(t)}cursorActivity(t){this.props.onCursorActivity&&this.props.onCursorActivity(t)}scrollChanged(t){this.props.onScroll&&this.props.onScroll(t.getScrollInfo())}codemirrorValueChanged(t,n){this.props.onChange&&n.origin!=="setValue"&&this.props.onChange(t.getValue(),n)}render(){let t=(0,cL.default)("ReactCodeMirror",this.state.isFocused?"ReactCodeMirror--focused":null,this.props.className);return zm.createElement("div",{className:t},zm.createElement("textarea",{ref:n=>this.textareaNode=n,name:this.props.name||this.props.path,defaultValue:this.props.value,autoComplete:"off",autoFocus:this.props.autoFocus}))}};var $m=class extends pL.Component{constructor(){super(...arguments);this.editor=Um.createRef();this.getContent=i(()=>this.editor.current?.codeMirror.getValue(),"getContent");this.render=i(()=>{let n={lineNumbers:!0};return Um.createElement("div",{className:"codeeditor",onKeyDown:s=>s.stopPropagation()},Um.createElement(Wm,{ref:this.editor,value:this.props.initialContent,onChange:()=>0,options:n}))},"render")}static{i(this,"CodeEditor")}};var Ef=de(be());var lz=Ef.default.memo(i(function({lines:t,maxLines:n,showMore:s}){return t.length===0?null:Ef.default.createElement("pre",null,t.map((l,h)=>h===n?Ef.default.createElement("button",{key:"showmore",onClick:s,className:"btn btn-xs btn-info"},Ef.default.createElement("i",{className:"fa fa-angle-double-down","aria-hidden":"true"})," ","Show more"):Ef.default.createElement("div",{key:h},l.map(([d,v],S)=>Ef.default.createElement("span",{key:S,className:d},v)))))},"LineRenderer")),b0=lz;var Of=de(be());var Ni=de(be());var T0=de(be());var e_=i(function(t){return t.reduce(function(n,s){var l=s[0],h=s[1];return n[l]=h,n},{})},"fromEntries"),t_=typeof window<"u"&&window.document&&window.document.createElement?T0.useLayoutEffect:T0.useEffect;var Gu=de(be()),FL=de(wx());var Dr="top",Cn="bottom",sn="right",Kr="left",k0="auto",ju=[Dr,Cn,sn,Kr],Sl="start",bf="end",hL="clippingParents",N0="viewport",xp="popper",mL="reference",r_=ju.reduce(function(e,t){return e.concat([t+"-"+Sl,t+"-"+bf])},[]),A0=[].concat(ju,[k0]).reduce(function(e,t){return e.concat([t,t+"-"+Sl,t+"-"+bf])},[]),uz="beforeRead",cz="read",fz="afterRead",dz="beforeMain",pz="main",hz="afterMain",mz="beforeWrite",gz="write",vz="afterWrite",gL=[uz,cz,fz,dz,pz,hz,mz,gz,vz];function Dn(e){return e?(e.nodeName||"").toLowerCase():null}i(Dn,"getNodeName");function gr(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}i(gr,"getWindow");function cs(e){var t=gr(e).Element;return e instanceof t||e instanceof Element}i(cs,"isElement");function _n(e){var t=gr(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}i(_n,"isHTMLElement");function Cp(e){if(typeof ShadowRoot>"u")return!1;var t=gr(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}i(Cp,"isShadowRoot");function yz(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var s=t.styles[n]||{},l=t.attributes[n]||{},h=t.elements[n];!_n(h)||!Dn(h)||(Object.assign(h.style,s),Object.keys(l).forEach(function(d){var v=l[d];v===!1?h.removeAttribute(d):h.setAttribute(d,v===!0?"":v)}))})}i(yz,"applyStyles");function wz(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(s){var l=t.elements[s],h=t.attributes[s]||{},d=Object.keys(t.styles.hasOwnProperty(s)?t.styles[s]:n[s]),v=d.reduce(function(S,b){return S[b]="",S},{});!_n(l)||!Dn(l)||(Object.assign(l.style,v),Object.keys(h).forEach(function(S){l.removeAttribute(S)}))})}}i(wz,"effect");var vL={name:"applyStyles",enabled:!0,phase:"write",fn:yz,effect:wz,requires:["computeStyles"]};function In(e){return e.split("-")[0]}i(In,"getBasePlacement");var Ws=Math.max,Tf=Math.min,xl=Math.round;function _p(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}i(_p,"getUAString");function Vm(){return!/^((?!chrome|android).)*safari/i.test(_p())}i(Vm,"isLayoutViewport");function fs(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var s=e.getBoundingClientRect(),l=1,h=1;t&&_n(e)&&(l=e.offsetWidth>0&&xl(s.width)/e.offsetWidth||1,h=e.offsetHeight>0&&xl(s.height)/e.offsetHeight||1);var d=cs(e)?gr(e):window,v=d.visualViewport,S=!Vm()&&n,b=(s.left+(S&&v?v.offsetLeft:0))/l,k=(s.top+(S&&v?v.offsetTop:0))/h,R=s.width/l,I=s.height/h;return{width:R,height:I,top:k,right:b+R,bottom:k+I,left:b,x:b,y:k}}i(fs,"getBoundingClientRect");function kf(e){var t=fs(e),n=e.offsetWidth,s=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-s)<=1&&(s=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:s}}i(kf,"getLayoutRect");function qm(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Cp(n)){var s=t;do{if(s&&e.isSameNode(s))return!0;s=s.parentNode||s.host}while(s)}return!1}i(qm,"contains");function ki(e){return gr(e).getComputedStyle(e)}i(ki,"getComputedStyle");function n_(e){return["table","td","th"].indexOf(Dn(e))>=0}i(n_,"isTableElement");function Xn(e){return((cs(e)?e.ownerDocument:e.document)||window.document).documentElement}i(Xn,"getDocumentElement");function Cl(e){return Dn(e)==="html"?e:e.assignedSlot||e.parentNode||(Cp(e)?e.host:null)||Xn(e)}i(Cl,"getParentNode");function yL(e){return!_n(e)||ki(e).position==="fixed"?null:e.offsetParent}i(yL,"getTrueOffsetParent");function Sz(e){var t=/firefox/i.test(_p()),n=/Trident/i.test(_p());if(n&&_n(e)){var s=ki(e);if(s.position==="fixed")return null}var l=Cl(e);for(Cp(l)&&(l=l.host);_n(l)&&["html","body"].indexOf(Dn(l))<0;){var h=ki(l);if(h.transform!=="none"||h.perspective!=="none"||h.contain==="paint"||["transform","perspective"].indexOf(h.willChange)!==-1||t&&h.willChange==="filter"||t&&h.filter&&h.filter!=="none")return l;l=l.parentNode}return null}i(Sz,"getContainingBlock");function Us(e){for(var t=gr(e),n=yL(e);n&&n_(n)&&ki(n).position==="static";)n=yL(n);return n&&(Dn(n)==="html"||Dn(n)==="body"&&ki(n).position==="static")?t:n||Sz(e)||t}i(Us,"getOffsetParent");function Nf(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}i(Nf,"getMainAxisFromPlacement");function Af(e,t,n){return Ws(e,Tf(t,n))}i(Af,"within");function wL(e,t,n){var s=Af(e,t,n);return s>n?n:s}i(wL,"withinMaxClamp");function jm(){return{top:0,right:0,bottom:0,left:0}}i(jm,"getFreshSideObject");function Km(e){return Object.assign({},jm(),e)}i(Km,"mergePaddingObject");function Gm(e,t){return t.reduce(function(n,s){return n[s]=e,n},{})}i(Gm,"expandToHashMap");var xz=i(function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Km(typeof t!="number"?t:Gm(t,ju))},"toPaddingObject");function Cz(e){var t,n=e.state,s=e.name,l=e.options,h=n.elements.arrow,d=n.modifiersData.popperOffsets,v=In(n.placement),S=Nf(v),b=[Kr,sn].indexOf(v)>=0,k=b?"height":"width";if(!(!h||!d)){var R=xz(l.padding,n),I=kf(h),z=S==="y"?Dr:Kr,j=S==="y"?Cn:sn,Y=n.rects.reference[k]+n.rects.reference[S]-d[S]-n.rects.popper[k],ne=d[S]-n.rects.reference[S],F=Us(h),L=F?S==="y"?F.clientHeight||0:F.clientWidth||0:0,D=Y/2-ne/2,q=R[z],te=L-I[k]-R[j],Z=L/2-I[k]/2+D,oe=Af(q,Z,te),he=S;n.modifiersData[s]=(t={},t[he]=oe,t.centerOffset=oe-Z,t)}}i(Cz,"arrow");function _z(e){var t=e.state,n=e.options,s=n.element,l=s===void 0?"[data-popper-arrow]":s;l!=null&&(typeof l=="string"&&(l=t.elements.popper.querySelector(l),!l)||qm(t.elements.popper,l)&&(t.elements.arrow=l))}i(_z,"effect");var SL={name:"arrow",enabled:!0,phase:"main",fn:Cz,effect:_z,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ds(e){return e.split("-")[1]}i(ds,"getVariation");var Ez={top:"auto",right:"auto",bottom:"auto",left:"auto"};function bz(e,t){var n=e.x,s=e.y,l=t.devicePixelRatio||1;return{x:xl(n*l)/l||0,y:xl(s*l)/l||0}}i(bz,"roundOffsetsByDPR");function xL(e){var t,n=e.popper,s=e.popperRect,l=e.placement,h=e.variation,d=e.offsets,v=e.position,S=e.gpuAcceleration,b=e.adaptive,k=e.roundOffsets,R=e.isFixed,I=d.x,z=I===void 0?0:I,j=d.y,Y=j===void 0?0:j,ne=typeof k=="function"?k({x:z,y:Y}):{x:z,y:Y};z=ne.x,Y=ne.y;var F=d.hasOwnProperty("x"),L=d.hasOwnProperty("y"),D=Kr,q=Dr,te=window;if(b){var Z=Us(n),oe="clientHeight",he="clientWidth";if(Z===gr(n)&&(Z=Xn(n),ki(Z).position!=="static"&&v==="absolute"&&(oe="scrollHeight",he="scrollWidth")),Z=Z,l===Dr||(l===Kr||l===sn)&&h===bf){q=Cn;var Re=R&&Z===te&&te.visualViewport?te.visualViewport.height:Z[oe];Y-=Re-s.height,Y*=S?1:-1}if(l===Kr||(l===Dr||l===Cn)&&h===bf){D=sn;var Ee=R&&Z===te&&te.visualViewport?te.visualViewport.width:Z[he];z-=Ee-s.width,z*=S?1:-1}}var Ye=Object.assign({position:v},b&&Ez),tt=k===!0?bz({x:z,y:Y},gr(n)):{x:z,y:Y};if(z=tt.x,Y=tt.y,S){var xe;return Object.assign({},Ye,(xe={},xe[q]=L?"0":"",xe[D]=F?"0":"",xe.transform=(te.devicePixelRatio||1)<=1?"translate("+z+"px, "+Y+"px)":"translate3d("+z+"px, "+Y+"px, 0)",xe))}return Object.assign({},Ye,(t={},t[q]=L?Y+"px":"",t[D]=F?z+"px":"",t.transform="",t))}i(xL,"mapToStyles");function Tz(e){var t=e.state,n=e.options,s=n.gpuAcceleration,l=s===void 0?!0:s,h=n.adaptive,d=h===void 0?!0:h,v=n.roundOffsets,S=v===void 0?!0:v,b={placement:In(t.placement),variation:ds(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:l,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,xL(Object.assign({},b,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:d,roundOffsets:S})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,xL(Object.assign({},b,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:S})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}i(Tz,"computeStyles");var CL={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Tz,data:{}};var P0={passive:!0};function kz(e){var t=e.state,n=e.instance,s=e.options,l=s.scroll,h=l===void 0?!0:l,d=s.resize,v=d===void 0?!0:d,S=gr(t.elements.popper),b=[].concat(t.scrollParents.reference,t.scrollParents.popper);return h&&b.forEach(function(k){k.addEventListener("scroll",n.update,P0)}),v&&S.addEventListener("resize",n.update,P0),function(){h&&b.forEach(function(k){k.removeEventListener("scroll",n.update,P0)}),v&&S.removeEventListener("resize",n.update,P0)}}i(kz,"effect");var _L={name:"eventListeners",enabled:!0,phase:"write",fn:i(function(){},"fn"),effect:kz,data:{}};var Nz={left:"right",right:"left",bottom:"top",top:"bottom"};function Ep(e){return e.replace(/left|right|bottom|top/g,function(t){return Nz[t]})}i(Ep,"getOppositePlacement");var Az={start:"end",end:"start"};function L0(e){return e.replace(/start|end/g,function(t){return Az[t]})}i(L0,"getOppositeVariationPlacement");function Pf(e){var t=gr(e),n=t.pageXOffset,s=t.pageYOffset;return{scrollLeft:n,scrollTop:s}}i(Pf,"getWindowScroll");function Lf(e){return fs(Xn(e)).left+Pf(e).scrollLeft}i(Lf,"getWindowScrollBarX");function i_(e,t){var n=gr(e),s=Xn(e),l=n.visualViewport,h=s.clientWidth,d=s.clientHeight,v=0,S=0;if(l){h=l.width,d=l.height;var b=Vm();(b||!b&&t==="fixed")&&(v=l.offsetLeft,S=l.offsetTop)}return{width:h,height:d,x:v+Lf(e),y:S}}i(i_,"getViewportRect");function o_(e){var t,n=Xn(e),s=Pf(e),l=(t=e.ownerDocument)==null?void 0:t.body,h=Ws(n.scrollWidth,n.clientWidth,l?l.scrollWidth:0,l?l.clientWidth:0),d=Ws(n.scrollHeight,n.clientHeight,l?l.scrollHeight:0,l?l.clientHeight:0),v=-s.scrollLeft+Lf(e),S=-s.scrollTop;return ki(l||n).direction==="rtl"&&(v+=Ws(n.clientWidth,l?l.clientWidth:0)-h),{width:h,height:d,x:v,y:S}}i(o_,"getDocumentRect");function Mf(e){var t=ki(e),n=t.overflow,s=t.overflowX,l=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+l+s)}i(Mf,"isScrollParent");function M0(e){return["html","body","#document"].indexOf(Dn(e))>=0?e.ownerDocument.body:_n(e)&&Mf(e)?e:M0(Cl(e))}i(M0,"getScrollParent");function Ku(e,t){var n;t===void 0&&(t=[]);var s=M0(e),l=s===((n=e.ownerDocument)==null?void 0:n.body),h=gr(s),d=l?[h].concat(h.visualViewport||[],Mf(s)?s:[]):s,v=t.concat(d);return l?v:v.concat(Ku(Cl(d)))}i(Ku,"listScrollParents");function bp(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}i(bp,"rectToClientRect");function Pz(e,t){var n=fs(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}i(Pz,"getInnerBoundingClientRect");function EL(e,t,n){return t===N0?bp(i_(e,n)):cs(t)?Pz(t,n):bp(o_(Xn(e)))}i(EL,"getClientRectFromMixedType");function Lz(e){var t=Ku(Cl(e)),n=["absolute","fixed"].indexOf(ki(e).position)>=0,s=n&&_n(e)?Us(e):e;return cs(s)?t.filter(function(l){return cs(l)&&qm(l,s)&&Dn(l)!=="body"}):[]}i(Lz,"getClippingParents");function s_(e,t,n,s){var l=t==="clippingParents"?Lz(e):[].concat(t),h=[].concat(l,[n]),d=h[0],v=h.reduce(function(S,b){var k=EL(e,b,s);return S.top=Ws(k.top,S.top),S.right=Tf(k.right,S.right),S.bottom=Tf(k.bottom,S.bottom),S.left=Ws(k.left,S.left),S},EL(e,d,s));return v.width=v.right-v.left,v.height=v.bottom-v.top,v.x=v.left,v.y=v.top,v}i(s_,"getClippingRect");function Ym(e){var t=e.reference,n=e.element,s=e.placement,l=s?In(s):null,h=s?ds(s):null,d=t.x+t.width/2-n.width/2,v=t.y+t.height/2-n.height/2,S;switch(l){case Dr:S={x:d,y:t.y-n.height};break;case Cn:S={x:d,y:t.y+t.height};break;case sn:S={x:t.x+t.width,y:v};break;case Kr:S={x:t.x-n.width,y:v};break;default:S={x:t.x,y:t.y}}var b=l?Nf(l):null;if(b!=null){var k=b==="y"?"height":"width";switch(h){case Sl:S[b]=S[b]-(t[k]/2-n[k]/2);break;case bf:S[b]=S[b]+(t[k]/2-n[k]/2);break;default:}}return S}i(Ym,"computeOffsets");function $s(e,t){t===void 0&&(t={});var n=t,s=n.placement,l=s===void 0?e.placement:s,h=n.strategy,d=h===void 0?e.strategy:h,v=n.boundary,S=v===void 0?hL:v,b=n.rootBoundary,k=b===void 0?N0:b,R=n.elementContext,I=R===void 0?xp:R,z=n.altBoundary,j=z===void 0?!1:z,Y=n.padding,ne=Y===void 0?0:Y,F=Km(typeof ne!="number"?ne:Gm(ne,ju)),L=I===xp?mL:xp,D=e.rects.popper,q=e.elements[j?L:I],te=s_(cs(q)?q:q.contextElement||Xn(e.elements.popper),S,k,d),Z=fs(e.elements.reference),oe=Ym({reference:Z,element:D,strategy:"absolute",placement:l}),he=bp(Object.assign({},D,oe)),Re=I===xp?he:Z,Ee={top:te.top-Re.top+F.top,bottom:Re.bottom-te.bottom+F.bottom,left:te.left-Re.left+F.left,right:Re.right-te.right+F.right},Ye=e.modifiersData.offset;if(I===xp&&Ye){var tt=Ye[l];Object.keys(Ee).forEach(function(xe){var Xe=[sn,Cn].indexOf(xe)>=0?1:-1,je=[Dr,Cn].indexOf(xe)>=0?"y":"x";Ee[xe]+=tt[je]*Xe})}return Ee}i($s,"detectOverflow");function a_(e,t){t===void 0&&(t={});var n=t,s=n.placement,l=n.boundary,h=n.rootBoundary,d=n.padding,v=n.flipVariations,S=n.allowedAutoPlacements,b=S===void 0?A0:S,k=ds(s),R=k?v?r_:r_.filter(function(j){return ds(j)===k}):ju,I=R.filter(function(j){return b.indexOf(j)>=0});I.length===0&&(I=R);var z=I.reduce(function(j,Y){return j[Y]=$s(e,{placement:Y,boundary:l,rootBoundary:h,padding:d})[In(Y)],j},{});return Object.keys(z).sort(function(j,Y){return z[j]-z[Y]})}i(a_,"computeAutoPlacement");function Mz(e){if(In(e)===k0)return[];var t=Ep(e);return[L0(e),t,L0(t)]}i(Mz,"getExpandedFallbackPlacements");function Oz(e){var t=e.state,n=e.options,s=e.name;if(!t.modifiersData[s]._skip){for(var l=n.mainAxis,h=l===void 0?!0:l,d=n.altAxis,v=d===void 0?!0:d,S=n.fallbackPlacements,b=n.padding,k=n.boundary,R=n.rootBoundary,I=n.altBoundary,z=n.flipVariations,j=z===void 0?!0:z,Y=n.allowedAutoPlacements,ne=t.options.placement,F=In(ne),L=F===ne,D=S||(L||!j?[Ep(ne)]:Mz(ne)),q=[ne].concat(D).reduce(function(yr,wr){return yr.concat(In(wr)===k0?a_(t,{placement:wr,boundary:k,rootBoundary:R,padding:b,flipVariations:j,allowedAutoPlacements:Y}):wr)},[]),te=t.rects.reference,Z=t.rects.popper,oe=new Map,he=!0,Re=q[0],Ee=0;Ee=0,je=Xe?"width":"height",Qe=$s(t,{placement:Ye,boundary:k,rootBoundary:R,altBoundary:I,padding:b}),ot=Xe?xe?sn:Kr:xe?Cn:Dr;te[je]>Z[je]&&(ot=Ep(ot));var It=Ep(ot),At=[];if(h&&At.push(Qe[tt]<=0),v&&At.push(Qe[ot]<=0,Qe[It]<=0),At.every(function(yr){return yr})){Re=Ye,he=!1;break}oe.set(Ye,At)}if(he)for(var fn=j?3:1,dn=i(function(wr){var Yt=q.find(function(Ft){var se=oe.get(Ft);if(se)return se.slice(0,wr).every(function(We){return We})});if(Yt)return Re=Yt,"break"},"_loop"),vr=fn;vr>0;vr--){var Ut=dn(vr);if(Ut==="break")break}t.placement!==Re&&(t.modifiersData[s]._skip=!0,t.placement=Re,t.reset=!0)}}i(Oz,"flip");var bL={name:"flip",enabled:!0,phase:"main",fn:Oz,requiresIfExists:["offset"],data:{_skip:!1}};function TL(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}i(TL,"getSideOffsets");function kL(e){return[Dr,sn,Cn,Kr].some(function(t){return e[t]>=0})}i(kL,"isAnySideFullyClipped");function Rz(e){var t=e.state,n=e.name,s=t.rects.reference,l=t.rects.popper,h=t.modifiersData.preventOverflow,d=$s(t,{elementContext:"reference"}),v=$s(t,{altBoundary:!0}),S=TL(d,s),b=TL(v,l,h),k=kL(S),R=kL(b);t.modifiersData[n]={referenceClippingOffsets:S,popperEscapeOffsets:b,isReferenceHidden:k,hasPopperEscaped:R},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":k,"data-popper-escaped":R})}i(Rz,"hide");var NL={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Rz};function Dz(e,t,n){var s=In(e),l=[Kr,Dr].indexOf(s)>=0?-1:1,h=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,d=h[0],v=h[1];return d=d||0,v=(v||0)*l,[Kr,sn].indexOf(s)>=0?{x:v,y:d}:{x:d,y:v}}i(Dz,"distanceAndSkiddingToXY");function Iz(e){var t=e.state,n=e.options,s=e.name,l=n.offset,h=l===void 0?[0,0]:l,d=A0.reduce(function(k,R){return k[R]=Dz(R,t.rects,h),k},{}),v=d[t.placement],S=v.x,b=v.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=S,t.modifiersData.popperOffsets.y+=b),t.modifiersData[s]=d}i(Iz,"offset");var AL={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Iz};function Fz(e){var t=e.state,n=e.name;t.modifiersData[n]=Ym({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}i(Fz,"popperOffsets");var PL={name:"popperOffsets",enabled:!0,phase:"read",fn:Fz,data:{}};function l_(e){return e==="x"?"y":"x"}i(l_,"getAltAxis");function Hz(e){var t=e.state,n=e.options,s=e.name,l=n.mainAxis,h=l===void 0?!0:l,d=n.altAxis,v=d===void 0?!1:d,S=n.boundary,b=n.rootBoundary,k=n.altBoundary,R=n.padding,I=n.tether,z=I===void 0?!0:I,j=n.tetherOffset,Y=j===void 0?0:j,ne=$s(t,{boundary:S,rootBoundary:b,padding:R,altBoundary:k}),F=In(t.placement),L=ds(t.placement),D=!L,q=Nf(F),te=l_(q),Z=t.modifiersData.popperOffsets,oe=t.rects.reference,he=t.rects.popper,Re=typeof Y=="function"?Y(Object.assign({},t.rects,{placement:t.placement})):Y,Ee=typeof Re=="number"?{mainAxis:Re,altAxis:Re}:Object.assign({mainAxis:0,altAxis:0},Re),Ye=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,tt={x:0,y:0};if(Z){if(h){var xe,Xe=q==="y"?Dr:Kr,je=q==="y"?Cn:sn,Qe=q==="y"?"height":"width",ot=Z[q],It=ot+ne[Xe],At=ot-ne[je],fn=z?-he[Qe]/2:0,dn=L===Sl?oe[Qe]:he[Qe],vr=L===Sl?-he[Qe]:-oe[Qe],Ut=t.elements.arrow,yr=z&&Ut?kf(Ut):{width:0,height:0},wr=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:jm(),Yt=wr[Xe],Ft=wr[je],se=Af(0,oe[Qe],yr[Qe]),We=D?oe[Qe]/2-fn-se-Yt-Ee.mainAxis:dn-se-Yt-Ee.mainAxis,Yr=D?-oe[Qe]/2+fn+se+Ft+Ee.mainAxis:vr+se+Ft+Ee.mainAxis,er=t.elements.arrow&&Us(t.elements.arrow),st=er?q==="y"?er.clientTop||0:er.clientLeft||0:0,Fe=(xe=Ye?.[q])!=null?xe:0,Fn=ot+We-Fe-st,bn=ot+Yr-Fe,no=Af(z?Tf(It,Fn):It,ot,z?Ws(At,bn):At);Z[q]=no,tt[q]=no-ot}if(v){var Bo,lt=q==="x"?Dr:Kr,Sr=q==="x"?Cn:sn,dr=Z[te],pt=te==="y"?"height":"width",io=dr+ne[lt],Hn=dr-ne[Sr],Mi=[Dr,Kr].indexOf(F)!==-1,Xr=(Bo=Ye?.[te])!=null?Bo:0,Qr=Mi?io:dr-oe[pt]-he[pt]-Xr+Ee.altAxis,oo=Mi?dr+oe[pt]+he[pt]-Xr-Ee.altAxis:Hn,hi=z&&Mi?wL(Qr,dr,oo):Af(z?Qr:io,dr,z?oo:Hn);Z[te]=hi,tt[te]=hi-dr}t.modifiersData[s]=tt}}i(Hz,"preventOverflow");var LL={name:"preventOverflow",enabled:!0,phase:"main",fn:Hz,requiresIfExists:["offset"]};function u_(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}i(u_,"getHTMLElementScroll");function c_(e){return e===gr(e)||!_n(e)?Pf(e):u_(e)}i(c_,"getNodeScroll");function Bz(e){var t=e.getBoundingClientRect(),n=xl(t.width)/e.offsetWidth||1,s=xl(t.height)/e.offsetHeight||1;return n!==1||s!==1}i(Bz,"isElementScaled");function f_(e,t,n){n===void 0&&(n=!1);var s=_n(t),l=_n(t)&&Bz(t),h=Xn(t),d=fs(e,l,n),v={scrollLeft:0,scrollTop:0},S={x:0,y:0};return(s||!s&&!n)&&((Dn(t)!=="body"||Mf(h))&&(v=c_(t)),_n(t)?(S=fs(t,!0),S.x+=t.clientLeft,S.y+=t.clientTop):h&&(S.x=Lf(h))),{x:d.left+v.scrollLeft-S.x,y:d.top+v.scrollTop-S.y,width:d.width,height:d.height}}i(f_,"getCompositeRect");function zz(e){var t=new Map,n=new Set,s=[];e.forEach(function(h){t.set(h.name,h)});function l(h){n.add(h.name);var d=[].concat(h.requires||[],h.requiresIfExists||[]);d.forEach(function(v){if(!n.has(v)){var S=t.get(v);S&&l(S)}}),s.push(h)}return i(l,"sort"),e.forEach(function(h){n.has(h.name)||l(h)}),s}i(zz,"order");function d_(e){var t=zz(e);return gL.reduce(function(n,s){return n.concat(t.filter(function(l){return l.phase===s}))},[])}i(d_,"orderModifiers");function p_(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}i(p_,"debounce");function h_(e){var t=e.reduce(function(n,s){var l=n[s.name];return n[s.name]=l?Object.assign({},l,s,{options:Object.assign({},l.options,s.options),data:Object.assign({},l.data,s.data)}):s,n},{});return Object.keys(t).map(function(n){return t[n]})}i(h_,"mergeByName");var ML={placement:"bottom",modifiers:[],strategy:"absolute"};function OL(){for(var e=arguments.length,t=new Array(e),n=0;nNi.default.createElement("li",{role:"separator",className:"divider"}),"Divider");function li({onClick:e,children:t,...n}){return Ni.default.createElement("li",null,Ni.default.createElement("a",{href:"#",onClick:i(l=>{l.preventDefault(),e()},"click"),...n},t))}i(li,"MenuItem");var Yu=Ni.default.memo(i(function({text:t,children:n,options:s,className:l,onOpen:h,...d}){let[v,S]=(0,Ni.useState)(null),[b,k]=(0,Ni.useState)(!1),[R,I]=(0,Ni.useState)(null),{styles:z,attributes:j}=g_(v,R,{...s}),Y=i(F=>{k(F),h&&h(F)},"setOpen");(0,Ni.useEffect)(()=>{R&&document.addEventListener("click",F=>{R.contains(F.target)?document.addEventListener("click",()=>Y(!1),{once:!0}):(F.preventDefault(),F.stopPropagation(),Y(!1))},{once:!0,capture:!0})},[R]);let ne;return b?ne=Ni.default.createElement("ul",{className:"dropdown-menu show",ref:I,style:z.popper,...j.popper},n):ne=null,Ni.default.createElement(Ni.default.Fragment,null,Ni.default.createElement("a",{href:"#",ref:S,className:(0,BL.default)(l,{open:b}),onClick:F=>{F.preventDefault(),Y(!0)},...d},t),ne)},"Dropdown"));function Xm({value:e,onChange:t}){let n=me(l=>l.backendState.contentViews||[]),s=Of.default.createElement("span",null,Of.default.createElement("i",{className:"fa fa-fw fa-files-o"}),"\xA0",Of.default.createElement("b",null,"View:")," ",e.toLowerCase()," ",Of.default.createElement("span",{className:"caret"}));return Of.default.createElement(Yu,{text:s,className:"btn btn-default btn-xs",options:{placement:"top-end"}},n.map(l=>Of.default.createElement(li,{key:l,onClick:()=>t(l)},l.toLowerCase().replace("_"," "))))}i(Xm,"ViewSelector");function y_({flow:e,message:t}){let n=He(),s=e.request===t?"request":"response",l=me(j=>j.ui.flow.contentViewFor[e.id+s]||"Auto"),h=(0,ir.useRef)(null),[d,v]=(0,ir.useState)(me(j=>j.options.content_view_lines_cutoff)),S=(0,ir.useCallback)(()=>v(Math.max(1024,d*2)),[d]),[b,k]=(0,ir.useState)(!1),R;b?R=Rn.getContentURL(e,t):R=Rn.getContentURL(e,t,l,d+1);let I=_0(R,t.contentHash),z=(0,ir.useMemo)(()=>{if(I&&!b)try{return JSON.parse(I)}catch{return{description:"Network Error",lines:[[["error",`${I}`]]]}}else return},[I]);if(b)return ir.default.createElement("div",{className:"contentview",key:"edit"},ir.default.createElement("div",{className:"controls"},ir.default.createElement("h5",null,"[Editing]"),ir.default.createElement(Rr,{onClick:i(async()=>{let Y=h.current?.getContent();await n(si(e,{[s]:{content:Y}})),k(!1)},"save"),icon:"fa-check text-success",className:"btn-xs"},"Done"),"\xA0",ir.default.createElement(Rr,{onClick:()=>k(!1),icon:"fa-times text-danger",className:"btn-xs"},"Cancel")),ir.default.createElement($m,{ref:h,initialContent:I||""}));{let j=z?z.description:"Loading...";return ir.default.createElement("div",{className:"contentview",key:"view"},ir.default.createElement("div",{className:"controls"},ir.default.createElement("h5",null,j),ir.default.createElement(Rr,{onClick:()=>k(!0),icon:"fa-edit",className:"btn-xs"},"Edit"),"\xA0",ir.default.createElement(E0,{icon:"fa-upload",text:"Replace",title:"Upload a file to replace the content.",onOpenFile:Y=>n(mP(e,Y,s)),className:"btn btn-default btn-xs"}),"\xA0",ir.default.createElement(Xm,{value:l,onChange:Y=>n(Yy({messageId:e.id+s,contentView:Y}))})),v_.matches(t)&&ir.default.createElement(v_,{flow:e,message:t}),ir.default.createElement(b0,{lines:z?.lines||[],maxLines:d,showMore:S}))}}i(y_,"HttpMessage");var Kz=/^image\/(png|jpe?g|gif|webp|vnc.microsoft.icon|x-icon|svg\+xml)$/i;v_.matches=e=>Kz.test(Rn.getContentType(e)||"");function v_({flow:e,message:t}){return ir.default.createElement("div",{className:"flowview-image"},ir.default.createElement("img",{src:Rn.getContentURL(e,t),alt:"preview",className:"img-thumbnail"}))}i(v_,"ViewImage");function Gz({flow:e}){let t=He();return qt.createElement("div",{className:"first-line request-line"},qt.createElement("div",null,qt.createElement(xf,{content:e.request.method,onEditDone:n=>t(si(e,{request:{method:n}})),isValid:n=>n.length>0,selectAllOnClick:!0}),"\xA0",qt.createElement(xf,{content:zs.pretty_url(e.request),onEditDone:n=>t(si(e,{request:{path:"",...eC(n)}})),isValid:n=>!!eC(n)?.host}),"\xA0",qt.createElement(xf,{content:e.request.http_version,onEditDone:n=>t(si(e,{request:{http_version:n}})),isValid:tC,selectAllOnClick:!0})))}i(Gz,"RequestLine");function Yz({flow:e}){let t=He();return qt.createElement("div",{className:"first-line response-line"},qt.createElement(xf,{content:e.response.http_version,onEditDone:n=>t(si(e,{response:{http_version:n}})),isValid:tC,selectAllOnClick:!0}),"\xA0",qt.createElement(xf,{content:e.response.status_code+"",onEditDone:n=>t(si(e,{response:{code:parseInt(n)}})),isValid:n=>/^\d+$/.test(n),selectAllOnClick:!0}),e.response.http_version!=="HTTP/2.0"&&qt.createElement(qt.Fragment,null,"\xA0",qt.createElement(gt,{content:e.response.reason,onEditDone:n=>t(si(e,{response:{msg:n}})),selectAllOnClick:!0})))}i(Yz,"ResponseLine");function Xz({flow:e,message:t}){let n=He(),s=e.request===t?"request":"response";return qt.createElement(wp,{className:"headers",data:t.headers,onChange:l=>n(si(e,{[s]:{headers:l}}))})}i(Xz,"Headers");function Qz({flow:e,message:t}){let n=He(),s=e.request===t?"request":"response";return!Rn.get_first_header(t,/^trailer$/i)?null:qt.createElement(qt.Fragment,null,qt.createElement("hr",null),qt.createElement("h5",null,"HTTP Trailers"),qt.createElement(wp,{className:"trailers",data:t.trailers,onChange:h=>n(si(e,{[s]:{trailers:h}}))}))}i(Qz,"Trailers");var WL=qt.memo(i(function({flow:t,message:n}){let s=t.request===n?"request":"response",l=t.request===n?Gz:Yz;return qt.createElement("section",{className:s},qt.createElement(l,{flow:t}),qt.createElement(Xz,{flow:t,message:n}),qt.createElement("hr",null),qt.createElement(y_,{key:t.id+s,flow:t,message:n}),qt.createElement(Qz,{flow:t,message:n}))},"Message"));function w_(){let e=me(t=>t.flows.byId[t.flows.selected[0]]);return qt.createElement(WL,{flow:e,message:e.request})}i(w_,"Request");w_.displayName="Request";function S_(){let e=me(t=>t.flows.byId[t.flows.selected[0]]);return qt.createElement(WL,{flow:e,message:e.response})}i(S_,"Response");S_.displayName="Response";var et=de(be());var Jz=i(({message:e})=>et.createElement("div",null,e.query?e.op_code:e.response_code,"\xA0",e.truncation?"(Truncated)":""),"Summary"),Zz=i(({message:e})=>et.createElement(et.Fragment,null,et.createElement("h5",null,e.recursion_desired?"Recursive ":"","Question"),et.createElement("table",null,et.createElement("thead",null,et.createElement("tr",null,et.createElement("th",null,"Name"),et.createElement("th",null,"Type"),et.createElement("th",null,"Class"))),et.createElement("tbody",null,e.questions.map((t,n)=>et.createElement("tr",{key:n},et.createElement("td",null,t.name),et.createElement("td",null,t.type),et.createElement("td",null,t.class)))))),"Questions"),x_=i(({name:e,values:t})=>et.createElement(et.Fragment,null,et.createElement("h5",null,e),t.length>0?et.createElement("table",null,et.createElement("thead",null,et.createElement("tr",null,et.createElement("th",null,"Name"),et.createElement("th",null,"Type"),et.createElement("th",null,"Class"),et.createElement("th",null,"TTL"),et.createElement("th",null,"Data"))),et.createElement("tbody",null,t.map((n,s)=>et.createElement("tr",{key:s},et.createElement("td",null,n.name),et.createElement("td",null,n.type),et.createElement("td",null,n.class),et.createElement("td",null,n.ttl),et.createElement("td",null,n.data))))):"\u2014"),"ResourceRecords"),UL=i(({type:e,message:t})=>et.createElement("section",{className:"dns-"+e},et.createElement("div",{className:`first-line ${e}-line`},et.createElement(Jz,{message:t})),et.createElement(Zz,{message:t}),et.createElement("hr",null),et.createElement(x_,{name:`${t.authoritative_answer?"Authoritative ":""}${t.recursion_available?"Recursive ":""}Answer`,values:t.answers}),et.createElement("hr",null),et.createElement(x_,{name:"Authority",values:t.authorities}),et.createElement("hr",null),et.createElement(x_,{name:"Additional",values:t.additionals})),"Message");function C_(){let e=me(t=>t.flows.byId[t.flows.selected[0]]);return et.createElement(UL,{type:"request",message:e.request})}i(C_,"Request");C_.displayName="Request";function __(){let e=me(t=>t.flows.byId[t.flows.selected[0]]);return et.createElement(UL,{type:"response",message:e.response})}i(__,"Response");__.displayName="Response";var Te=de(be());function $L({conn:e}){let t=null;return"address"in e?t=Te.createElement(Te.Fragment,null,Te.createElement("tr",null,Te.createElement("td",null,"Address:"),Te.createElement("td",null,e.address?.join(":"))),e.peername&&Te.createElement("tr",null,Te.createElement("td",null,"Resolved address:"),Te.createElement("td",null,e.peername.join(":"))),e.sockname&&Te.createElement("tr",null,Te.createElement("td",null,"Source address:"),Te.createElement("td",null,e.sockname.join(":")))):e.peername?.[0]&&(t=Te.createElement(Te.Fragment,null,Te.createElement("tr",null,Te.createElement("td",null,"Address:"),Te.createElement("td",null,e.peername?.join(":"))))),Te.createElement("table",{className:"connection-table"},Te.createElement("tbody",null,t,e.sni?Te.createElement("tr",null,Te.createElement("td",null,Te.createElement("abbr",{title:"TLS Server Name Indication"},"SNI"),":"),Te.createElement("td",null,e.sni)):null,e.alpn?Te.createElement("tr",null,Te.createElement("td",null,Te.createElement("abbr",{title:"ALPN protocol negotiated"},"ALPN"),":"),Te.createElement("td",null,e.alpn)):null,e.tls_version?Te.createElement("tr",null,Te.createElement("td",null,"TLS Version:"),Te.createElement("td",null,e.tls_version)):null,e.cipher?Te.createElement("tr",null,Te.createElement("td",null,"TLS Cipher:"),Te.createElement("td",null,e.cipher)):null))}i($L,"ConnectionInfo");function VL(e){return Te.createElement("dl",{className:"cert-attributes"},e.map(([t,n])=>Te.createElement(Te.Fragment,{key:t},Te.createElement("dt",null,t),Te.createElement("dd",null,n))))}i(VL,"attrList");function eW({flow:e}){let t=e.server_conn?.cert;return t?Te.createElement(Te.Fragment,null,Te.createElement("h4",{key:"name"},"Server Certificate"),Te.createElement("table",{className:"certificate-table"},Te.createElement("tbody",null,Te.createElement("tr",null,Te.createElement("td",null,"Type"),Te.createElement("td",null,t.keyinfo[0],", ",t.keyinfo[1]," bits")),Te.createElement("tr",null,Te.createElement("td",null,"SHA256 digest"),Te.createElement("td",null,t.sha256)),Te.createElement("tr",null,Te.createElement("td",null,"Valid from"),Te.createElement("td",null,Do(t.notbefore,{milliseconds:!1}))),Te.createElement("tr",null,Te.createElement("td",null,"Valid to"),Te.createElement("td",null,Do(t.notafter,{milliseconds:!1}))),Te.createElement("tr",null,Te.createElement("td",null,"Subject Alternative Names"),Te.createElement("td",null,t.altnames.join(", "))),Te.createElement("tr",null,Te.createElement("td",null,"Subject"),Te.createElement("td",null,VL(t.subject))),Te.createElement("tr",null,Te.createElement("td",null,"Issuer"),Te.createElement("td",null,VL(t.issuer))),Te.createElement("tr",null,Te.createElement("td",null,"Serial"),Te.createElement("td",null,t.serial))))):Te.createElement(Te.Fragment,null)}i(eW,"CertificateInfo");function R0({flow:e}){return Te.createElement("section",{className:"detail"},Te.createElement("h4",null,"Client Connection"),Te.createElement($L,{conn:e.client_conn}),e.server_conn?.address&&Te.createElement(Te.Fragment,null,Te.createElement("h4",null,"Server Connection"),Te.createElement($L,{conn:e.server_conn})),Te.createElement(eW,{flow:e}))}i(R0,"Connection");R0.displayName="Connection";var Qm=de(be());function D0({flow:e}){return Qm.createElement("section",{className:"error"},Qm.createElement("div",{className:"alert alert-warning"},e.error.msg,Qm.createElement("div",null,Qm.createElement("small",null,Do(e.error.timestamp)))))}i(D0,"Error");D0.displayName="Error";var Vs=de(be());function tW({t:e,deltaTo:t,title:n}){return e?Vs.createElement("tr",null,Vs.createElement("td",null,n,":"),Vs.createElement("td",null,Do(e),t&&Vs.createElement("span",{className:"text-muted"},"(",Qy(1e3*(e-t)),")"))):Vs.createElement("tr",null)}i(tW,"TimeStamp");function I0({flow:e}){let t;e.type==="http"?t=e.request.timestamp_start:t=e.client_conn.timestamp_start;let n=[{title:"Server conn. initiated",t:e.server_conn?.timestamp_start,deltaTo:t},{title:"Server conn. TCP handshake",t:e.server_conn?.timestamp_tcp_setup,deltaTo:t},{title:"Server conn. TLS handshake",t:e.server_conn?.timestamp_tls_setup,deltaTo:t},{title:"Server conn. closed",t:e.server_conn?.timestamp_end,deltaTo:t},{title:"Client conn. established",t:e.client_conn.timestamp_start,deltaTo:e.type==="http"?t:void 0},{title:"Client conn. TLS handshake",t:e.client_conn.timestamp_tls_setup,deltaTo:t},{title:"Client conn. closed",t:e.client_conn.timestamp_end,deltaTo:t}];return e.type==="http"&&n.push({title:"First request byte",t:e.request.timestamp_start},{title:"Request complete",t:e.request.timestamp_end,deltaTo:t},{title:"First response byte",t:e.response?.timestamp_start,deltaTo:t},{title:"Response complete",t:e.response?.timestamp_end,deltaTo:t}),Vs.createElement("section",{className:"timing"},Vs.createElement("h4",null,"Timing"),Vs.createElement("table",{className:"timing-table"},Vs.createElement("tbody",null,n.filter(s=>!!s.t).sort((s,l)=>s.t-l.t).map(({title:s,t:l,deltaTo:h})=>Vs.createElement(tW,{key:s,title:s,t:l,deltaTo:h})))))}i(I0,"Timing");I0.displayName="Timing";var Xu=de(be());var Ea=de(be()),Tp=de(be());function Rf({flow:e,messages_meta:t}){let n=He(),s=me(k=>k.ui.flow.contentViewFor[e.id+"messages"]||"Auto"),[l,h]=(0,Tp.useState)(me(k=>k.options.content_view_lines_cutoff)),d=(0,Tp.useCallback)(()=>h(Math.max(1024,l*2)),[l]),v=_0(Rn.getContentURL(e,"messages",s,l+1),e.id+t.count),S=(0,Tp.useMemo)(()=>{if(v)try{return JSON.parse(v)}catch{return[{description:"Network Error",lines:[[["error",`${v}`]]]}]}},[v])||[],b=l;return Ea.createElement("div",{className:"contentview"},Ea.createElement("div",{className:"controls"},Ea.createElement("h5",null,t.count," Messages"),Ea.createElement(Xm,{value:s,onChange:k=>n(Yy({messageId:e.id+"messages",contentView:k}))})),S.map((k,R)=>{let I=`fa fa-fw fa-arrow-${k.from_client?"right text-primary":"left text-danger"}`,z=Ea.createElement("div",{key:R},Ea.createElement("small",null,Ea.createElement("i",{className:I}),Ea.createElement("span",{className:"pull-right"},k.timestamp&&Do(k.timestamp))),Ea.createElement(b0,{lines:k.lines,maxLines:b,showMore:d}));return b-=k.lines.length,z}))}i(Rf,"Messages");function F0({flow:e}){return Xu.createElement("section",{className:"websocket"},Xu.createElement("h4",null,"WebSocket"),Xu.createElement(Rf,{flow:e,messages_meta:e.websocket.messages_meta}),Xu.createElement(rW,{websocket:e.websocket}))}i(F0,"WebSocket");F0.displayName="WebSocket";function rW({websocket:e}){if(!e.timestamp_end)return null;let t=e.close_reason?`(${e.close_reason})`:"";return Xu.createElement("div",null,Xu.createElement("i",{className:"fa fa-fw fa-window-close text-muted"}),"\xA0 Closed by ",e.closed_by_client?"client":"server"," ","with code ",e.close_code," ",t,".",Xu.createElement("small",{className:"pull-right"},Do(e.timestamp_end)))}i(rW,"CloseSummary");var H0=de(be());function B0({flow:e}){let t=He();return H0.createElement("section",{className:"timing"},H0.createElement("h4",null,"Comment"),H0.createElement(gt,{className:"kv-value",content:e.comment,onEditDone:n=>{t(si(e,{comment:n}))},placeholder:"empty",selectAllOnClick:!0}))}i(B0,"Comment");B0.displayName="Comment";var jL=de(ai());var E_=de(be());function z0({flow:e}){return E_.createElement("section",{className:"tcp"},E_.createElement(Rf,{flow:e,messages_meta:e.messages_meta}))}i(z0,"TcpMessages");z0.displayName="Stream Data";var b_=de(be());function W0({flow:e}){return b_.createElement("section",{className:"udp"},b_.createElement(Rf,{flow:e,messages_meta:e.messages_meta}))}i(W0,"UdpMessages");W0.displayName="Datagrams";var qL={request:w_,response:S_,error:D0,connection:R0,timing:I0,websocket:F0,tcpmessages:z0,udpmessages:W0,dnsrequest:C_,dnsresponse:__,comment:B0};function U0(e){let t;switch(e.type){case"http":t=["request","response","websocket"].filter(n=>e[n]);break;case"tcp":t=["tcpmessages"];break;case"udp":t=["udpmessages"];break;case"dns":t=["request","response"].filter(n=>e[n]).map(n=>"dns"+n);break}return e.error&&t.push("error"),t.push("connection"),t.push("timing"),t.push("comment"),t}i(U0,"tabsForFlow");function T_(){let e=He(),t=me(h=>h.flows.byId[h.flows.selected[0]]),n=me(h=>h.ui.flow.tab);if(t==null)return ba.createElement(ba.Fragment,null);let s=U0(t);s.indexOf(n)<0&&(n==="response"&&t.error?n="error":n==="error"&&"response"in t?n="response":n=s[0]);let l=qL[n];return ba.createElement("div",{className:"flow-detail"},ba.createElement("nav",{className:"nav-tabs nav-tabs-sm"},ba.createElement("button",{"data-testid":"close-button-id",className:"close-button",onClick:()=>e(yl(void 0))},ba.createElement("i",{className:"fa fa-times-circle"})),s.map(h=>ba.createElement("a",{key:h,href:"#",className:(0,jL.default)({active:n===h}),onClick:d=>{d.preventDefault(),e(vf(h))}},qL[h].displayName))),ba.createElement(l,{flow:t}))}i(T_,"FlowView");function KL(e){if(e.ctrlKey||e.metaKey)return()=>{};let t=e.key;return e.preventDefault(),(n,s)=>{let l=s().flows,h=l.byId[s().flows.selected[0]];switch(t){case"k":case"ArrowUp":n(Sf(l,-1));break;case"j":case"ArrowDown":n(Sf(l,1));break;case" ":case"PageDown":n(Sf(l,10));break;case"PageUp":n(Sf(l,-10));break;case"End":n(Sf(l,1e10));break;case"Home":n(Sf(l,-1e10));break;case"Escape":s().ui.modal.activeModal?n(u0()):n(yl(void 0));break;case"ArrowLeft":{if(!h)break;let d=U0(h),v=s().ui.flow.tab,S=d[(Math.max(0,d.indexOf(v))-1+d.length)%d.length];n(vf(S));break}case"Tab":case"ArrowRight":{if(!h)break;let d=U0(h),v=s().ui.flow.tab,S=d[(Math.max(0,d.indexOf(v))+1)%d.length];n(vf(S));break}case"Delete":case"d":{if(!h)return;n(o0(h));break}case"n":{yf("view.flows.create","get","https://example.com/");break}case"D":{if(!h)return;n(s0(h));break}case"a":{h&&h.intercepted&&n(fp(h));break}case"A":{n(n0());break}case"r":{h&&n(dp(h));break}case"v":{h&&h.modified&&n(a0(h));break}case"x":{h&&h.intercepted&&n(i0(h));break}case"X":{n(hP());break}case"z":{n(l0());break}default:return}}}i(KL,"onKeyDown");var Ta=de(be());var kp=de(be()),GL=de(ai());var Jm=class extends kp.Component{constructor(n,s){super(n,s);this.node=kp.default.createRef();this.state={applied:!1,startPos:0,dragPointer:.1},this.onLostPointerCapture=this.onLostPointerCapture.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this)}static{i(this,"Splitter")}static{this.defaultProps={axis:"x"}}onPointerDown(n){this.state.dragPointer===.1&&(n.target.setPointerCapture(n.pointerId),this.setState({startPos:this.props.axis==="x"?n.pageX:n.pageY,dragPointer:n.pointerId}))}onLostPointerCapture(n){if(this.state.dragPointer!==n.pointerId)return;let s=this.node.current,l=s.previousElementSibling,h=s.nextElementSibling;s.style.transform="",l.style.flex=`0 0 ${Math.max(0,(this.props.axis==="x"?l.offsetWidth+n.pageX:l.offsetHeight+n.pageY)-this.state.startPos)}px`,h.style.flex="1 1 auto",this.setState({applied:!0,dragPointer:.1}),this.onResize()}onPointerMove(n){this.state.dragPointer===n.pointerId&&(this.node.current.style.transform=this.props.axis==="x"?`translateX(${n.pageX-this.state.startPos}px)`:`translateY(${n.pageY-this.state.startPos}px)`)}onResize(){window.setTimeout(()=>window.dispatchEvent(new CustomEvent("resize")),1)}reset(n){this.state.applied&&(this.node.current?.previousElementSibling instanceof HTMLElement&&(this.node.current.previousElementSibling.style.flex=""),this.node.current?.nextElementSibling instanceof HTMLElement&&(this.node.current.nextElementSibling.style.flex=""),n||this.setState({applied:!1}),this.onResize())}componentWillUnmount(){this.reset(!0)}render(){return kp.default.createElement("div",{ref:this.node,className:(0,GL.default)("splitter",this.props.axis==="x"?"splitter-x":"splitter-y")},kp.default.createElement("div",{onLostPointerCapture:this.onLostPointerCapture,onPointerDown:this.onPointerDown,onPointerMove:this.onPointerMove}))}};var Qi=de(be());var Zm=i(e=>{let t=e.current;return t===null||t.scrollTop===0?!1:Math.ceil(t.scrollTop)+t.clientHeight>=t.scrollHeight},"isAtBottom"),$0=i(e=>{e.current&&!Zm(e)&&(e.current.scrollTop=e.current.scrollHeight)},"adjustScrollTop");function Df(e=void 0){if(!e)return{start:0,end:0,paddingTop:0,paddingBottom:0};let{itemCount:t,rowHeight:n,viewportTop:s,viewportHeight:l,itemHeights:h}=e,d=s+l,v=0,S=0,b=0,k=0;if(h){let R=0;for(let I=0;I0&&RH_,default:()=>iW,icon:()=>P_,index:()=>A_,method:()=>M_,path:()=>L_,quickactions:()=>If,size:()=>D_,status:()=>R_,time:()=>I_,timestamp:()=>F_,tls:()=>N_,version:()=>O_});var Zt=de(be());var k_=de(ai());var N_=i(({flow:e})=>Zt.default.createElement("td",{className:(0,k_.default)("col-tls",e.client_conn.tls_established?"col-tls-https":"col-tls-http")}),"tls");N_.headerName="";var A_=i(({flow:e})=>{let t=me(n=>n.flows.listIndex[e.id]);return Zt.default.createElement("td",{className:"col-index"},t+1)},"index");A_.headerName="#";var P_=i(({flow:e})=>Zt.default.createElement("td",{className:"col-icon"},Zt.default.createElement("div",{className:(0,k_.default)("resource-icon",iC(e))})),"icon");P_.headerName="";var L_=i(({flow:e})=>{let t;return e.error&&(e.error.msg==="Connection killed."?t=Zt.default.createElement("i",{className:"fa fa-fw fa-times pull-right"}):t=Zt.default.createElement("i",{className:"fa fa-fw fa-exclamation pull-right"})),Zt.default.createElement("td",{className:"col-path"},e.is_replay==="request"&&Zt.default.createElement("i",{className:"fa fa-fw fa-repeat pull-right"}),e.intercepted&&Zt.default.createElement("i",{className:"fa fa-fw fa-pause pull-right"}),t,Zt.default.createElement("span",{className:"marker pull-right"},e.marked),oC(e))},"path");L_.headerName="Path";var M_=i(({flow:e})=>Zt.default.createElement("td",{className:"col-method"},aC(e)),"method");M_.headerName="Method";var O_=i(({flow:e})=>Zt.default.createElement("td",{className:"col-http-version"},lC(e)),"version");O_.headerName="Version";var R_=i(({flow:e})=>{let t="darkred";return e.type!=="http"&&e.type!="dns"||!e.response?Zt.default.createElement("td",{className:"col-status"}):(100<=e.response.status_code&&e.response.status_code<200?t="green":200<=e.response.status_code&&e.response.status_code<300?t="darkgreen":300<=e.response.status_code&&e.response.status_code<400?t="lightblue":(400<=e.response.status_code&&e.response.status_code<500||500<=e.response.status_code&&e.response.status_code<600)&&(t="red"),Zt.default.createElement("td",{className:"col-status",style:{color:t}},sC(e)))},"status");R_.headerName="Status";var D_=i(({flow:e})=>Zt.default.createElement("td",{className:"col-size"},Xy(nC(e))),"size");D_.headerName="Size";var I_=i(({flow:e})=>{let t=Dm(e),n=rC(e);return Zt.default.createElement("td",{className:"col-time"},t&&n?Qy(1e3*(n-t)):"...")},"time");I_.headerName="Time";var F_=i(({flow:e})=>{let t=Dm(e);return Zt.default.createElement("td",{className:"col-timestamp"},t?Do(t):"...")},"timestamp");F_.headerName="Start time";var If=i(({flow:e})=>{let t=He(),n=null;return e.intercepted?n=Zt.default.createElement("a",{href:"#",className:"quickaction",onClick:()=>t(fp(e))},Zt.default.createElement("i",{className:"fa fa-fw fa-play text-success"})):e0(e)&&(n=Zt.default.createElement("a",{href:"#",className:"quickaction",onClick:()=>t(dp(e))},Zt.default.createElement("i",{className:"fa fa-fw fa-repeat text-primary"}))),Zt.default.createElement("td",{className:"col-quickactions"},n?Zt.default.createElement("div",null,n):Zt.default.createElement(Zt.default.Fragment,null))},"quickactions");If.headerName="";var H_=i(({flow:e})=>{let t=e.comment;return Zt.default.createElement("td",{className:"col-comment"},t)},"comment");H_.headerName="Comment";var nW={icon:P_,index:A_,method:M_,version:O_,path:L_,quickactions:If,size:D_,status:R_,time:I_,timestamp:F_,tls:N_,comment:H_},iW=nW;var QL=tg.memo(i(function(){let t=He(),n=me(v=>v.flows.sort.desc),s=me(v=>v.flows.sort.column),l=me(v=>v.options.web_columns),h=n?"sort-desc":"sort-asc",d=l.map(v=>eg[v]).filter(v=>v).concat(If);return tg.createElement("tr",null,d.map(v=>tg.createElement("th",{className:(0,XL.default)(`col-${v.name}`,s===v.name&&h),key:v.name,onClick:()=>t(pP(v.name===s&&n?void 0:v.name,v.name!==s?!1:!n))},v.headerName)))},"FlowTableHead"));var Np=de(be()),JL=de(ai());var ZL=Np.default.memo(i(function({flow:t,selected:n,highlighted:s}){let l=He(),h=me(b=>b.options.web_columns),d=(0,JL.default)({selected:n,highlighted:s,intercepted:t.intercepted,"has-request":t.type==="http"&&t.request,"has-response":t.type==="http"&&t.response}),v=(0,Np.useCallback)(b=>{let k=b.target;for(;k.parentNode;){if(k.classList.contains("col-quickactions"))return;k=k.parentNode}l(yl(t.id))},[t]),S=h.map(b=>eg[b]).filter(b=>b).concat(If);return Np.default.createElement("tr",{className:d,onClick:v},S.map(b=>Np.default.createElement(b,{key:b.name,flow:t})))},"FlowRow"));var B_=class extends Qi.Component{constructor(n,s){super(n,s);this.viewport=Qi.createRef();this.head=Qi.createRef();this.state={vScroll:Df(),viewportTop:0},this.onViewportUpdate=this.onViewportUpdate.bind(this)}static{i(this,"PureFlowTable")}static{this.defaultProps={rowHeight:32}}componentDidMount(){window.addEventListener("resize",this.onViewportUpdate),this.onViewportUpdate()}componentWillUnmount(){window.removeEventListener("resize",this.onViewportUpdate)}getSnapshotBeforeUpdate(){return Zm(this.viewport)}componentDidUpdate(n,s,l){if(l&&$0(this.viewport),this.onViewportUpdate(),this.props.selected&&this.props.selected!==n.selected){let{rowHeight:d,flows:v,selected:S}=this.props,b=this.viewport.current,k=this.head.current,R=k?k.offsetHeight:0,I=v.indexOf(S)*d+R,z=I+d,j=b.scrollTop,Y=b.offsetHeight;I-Rj+Y&&(b.scrollTop=z-Y),this.onViewportUpdate()}}onViewportUpdate(){let n=this.viewport.current,s=n.scrollTop||0,l=Df({viewportTop:s,viewportHeight:n.offsetHeight||0,itemCount:this.props.flows.length,rowHeight:this.props.rowHeight});if(this.state.viewportTop!==s||!Mo(this.state.vScroll,l)){let h=Math.min(s,l.end*this.props.rowHeight);this.setState({vScroll:l,viewportTop:h})}}render(){let{vScroll:n,viewportTop:s}=this.state,{flows:l,selected:h,highlight:d}=this.props,v=d?wf.parse(d):()=>!1;return Qi.createElement("div",{className:"flow-table",onScroll:this.onViewportUpdate,ref:this.viewport},Qi.createElement("table",null,Qi.createElement("thead",{ref:this.head,style:{transform:`translateY(${s}px)`}},Qi.createElement(QL,null)),Qi.createElement("tbody",null,Qi.createElement("tr",{style:{height:n.paddingTop}}),l.slice(n.start,n.end).map(S=>Qi.createElement(ZL,{key:S.id,flow:S,selected:S===h,highlighted:v(S)})),Qi.createElement("tr",{style:{height:n.paddingBottom}}))))}},eM=Uu(e=>({flows:e.flows.view,highlight:e.flows.highlight,selected:e.flows.byId[e.flows.selected[0]]}))(B_);var ln=de(be()),tw=de(be());var nO=de(rO());function uE(){return ln.createElement("div",{style:{padding:"1em 2em"}},ln.createElement("h3",null,"mitmproxy is running."),ln.createElement("p",null,"No flows have been recorded yet.",ln.createElement("br",null),"To start capturing traffic, please configure your settings in the Capture tab."))}i(uE,"CaptureSetup");function ZW({description:e,listen_addrs:t,is_running:n,wireguard_conf:s,type:l}){let h=(0,tw.useRef)(null);(0,tw.useEffect)(()=>{s&&h.current&&nO.default.toCanvas(h.current,s,{margin:0,scale:3})},[s]);let d,v=t.length===1||t.length===2&&t[0][1]===t[1][1],S=t.every(k=>["::","0.0.0.0"].includes(k[0]));v&&S?d=Ux(["*",t[0][1]]):d=t.map(Ux).join(" and "),e=e[0].toUpperCase()+e.substr(1);let b;return n?b=ln.createElement(ln.Fragment,null,l==="local"?ln.createElement("div",{className:"text-success"},e," is active."):ln.createElement("div",{className:"text-success"},e," listening at ",d,"."),s&&ln.createElement("div",{className:"wireguard-config"},ln.createElement("pre",null,s),ln.createElement("canvas",{ref:h}))):b=ln.createElement(ln.Fragment,null,ln.createElement("div",{className:"text-warning"},e," starting...")),ln.createElement("div",null,b)}i(ZW,"ServerDescription");function ui({error:e,backendState:t}){return ln.createElement("div",{className:"mode-status"},e?ln.createElement("div",{className:"text-danger"},e):t&&ln.createElement(ZW,{...t}))}i(ui,"ServerStatus");var un=de(be());var Ai=de(be());var Rp=de(be());function ci({value:e,onChange:t,children:n,label:s}){let l=Rp.useId();return Rp.createElement("div",{className:"mode-entry"},Rp.createElement("input",{type:"checkbox",name:`mode-checkbox-${l}`,id:`mode-checkbox-${l}`,checked:e,onChange:t}),Rp.createElement("label",{htmlFor:`mode-checkbox-${l}`,style:{marginBottom:0,fontWeight:"normal"}},s),n)}i(ci,"ModeToggle");var Ir=de(be());var Fo=de(be());function fi({children:e,iconClass:t,classname:n,isVisible:s}){let l=Fo.useId(),h="--"+[...l].map(S=>S.charCodeAt(0).toString(16)).join(""),d=Fo.useRef(null),v=Fo.useRef(null);return Fo.useEffect(()=>{d.current.style.anchorName=h,v.current.style.positionAnchor=h},[]),Fo.useEffect(()=>{s===!0&&document.getElementById(l)?.showPopover()},[s]),Fo.createElement("div",{className:n?`mode-popover ${n}`:"mode-popover"},Fo.createElement("button",{popovertarget:l,ref:d},Fo.createElement("i",{className:t,"aria-hidden":"true"})),Fo.createElement("div",{id:l,popover:"auto",ref:v},e))}i(fi,"Popover");function cE({server:e}){let{currentProcesses:t,isLoading:n}=me(D=>D.processes),{selectedProcesses:s}=me(D=>D.modes.local[0]),[l,h]=Ir.useState([]),[d,v]=Ir.useState(""),S=He(),{platform:b}=me(D=>D.backendState),k=i(D=>{v(D.target.value)},"handleInputChange"),R=i(D=>{let q=b.startsWith("win32")?"\\":"/";return Lm(D.executable,q)[1]},"extractProcessName"),I=i(D=>{let q=typeof D=="string"?D:R(D),te=s?`${s}, ${q}`:q;S(yp({server:e,value:te}))},"addProcessToSelection"),z=i(D=>{let q=s?.split(/,\s*/).filter(te=>te!==R(D)).join(", ");S(yp({server:e,value:q}))},"removeProcessFromSelection"),j=i(D=>{Y(D)&&s?z(D):I(D)},"handleApplicationClick"),Y=i(D=>{let q=R(D);return s?.includes(q)},"isSelected");Ir.useEffect(()=>{t.length===0&&S(Cf())},[]),Ir.useEffect(()=>{if(d){let D=t.filter(q=>R(q).toLowerCase().includes(d.toLowerCase()));h(D)}else l!==t&&h(t)},[d,t]);let ne=i(D=>{D.stopPropagation(),D.key==="Enter"&&(I(d),v(""))},"handleInputKeyDown"),[F,L]=Ir.useState(!1);return Ir.createElement("div",{className:"local-dropdown"},Ir.createElement("div",{className:"dropdown-header"},Ir.createElement("input",{type:"text",className:"autocomplete-input",placeholder:s&&s?.length>0?"Add more":"(all applications)",value:d,onChange:k,onKeyDown:ne,onClick:()=>L(!0),onBlur:()=>L(!1)}),Ir.createElement(fi,{iconClass:"fa fa-chevron-down",classname:"local-popover",isVisible:F},Ir.createElement("h4",null,"Current Applications running on machine"),n?Ir.createElement("i",{className:"fa fa-spinner","aria-hidden":"true"}):l.length>0?Ir.createElement("ul",{className:"dropdown-list"},l.map((D,q)=>Ir.createElement("li",{key:q,className:`dropdown-item ${Y(D)?"selected":""}`,onClick:()=>j(D),role:"menuitem"},Ir.createElement("div",{className:"process-details"},Ir.createElement("img",{className:"process-icon",src:`./executable-icon?path=${D.executable}`,loading:"lazy"}),Ir.createElement("span",{className:"process-name"},R(D)))))):Ir.createElement("span",null,"Press ",Ir.createElement("strong",null,"Enter")," to capture traffic for programs matching: ",Ir.createElement("strong",null,d)))))}i(cE,"LocalDropdown");function fE(){let e=me(s=>s.modes.local),t=me(s=>s.backendState.servers),n=e.map(s=>Ai.createElement(e8,{key:s.ui_id,server:s,backendState:t[h0(s)]}));return Ai.createElement("div",null,Ai.createElement("h4",{className:"mode-title"},"Local Applications"),Ai.createElement("p",{className:"mode-description"},"Transparently Intercept local application(s)."),n)}i(fE,"Local");function e8({server:e,backendState:t}){let n=He(),s=me(d=>d.processes.error),l=e.error||t?.last_exception||s||void 0,h=i(d=>{let v=e.selectedProcesses?.split(/,\s*/).filter(S=>S!==d).join(", ");n(yp({server:e,value:v}))},"handleDeletionProcess");return Ai.createElement("div",{className:"mode-local"},Ai.createElement(ci,{value:e.active,label:"Intercept traffic for",onChange:()=>n(AC({server:e,value:!e.active}))},Ai.createElement("div",{className:"processes-container"},Ai.createElement("div",{className:"selected-processes"},e.selectedProcesses?.split(/,\s*/).filter(d=>d.trim()!=="").map(d=>Ai.createElement("div",{key:d,className:"selected-process"},d,Ai.createElement("i",{className:"fa fa-times","aria-hidden":"true",onClick:()=>h(d)})))),Ai.createElement("div",{className:"dropdown-container"},Ai.createElement(cE,{server:e}),Ai.createElement("i",{className:"fa fa-refresh","aria-hidden":"true",onClick:()=>n(Cf())})))),Ai.createElement(ui,{error:l,backendState:t}))}i(e8,"LocalRow");var Ji=de(be());function dE(){let e=me(s=>s.modes.regular),t=me(s=>s.backendState.servers),n=e.map(s=>Ji.createElement(t8,{key:s.ui_id,server:s,backendState:t[p0(s)]}));return Ji.createElement("div",null,Ji.createElement("h4",{className:"mode-title"},"Explicit HTTP(S) Proxy"),Ji.createElement("p",{className:"mode-description"},"You manually configure your client application or device to use an HTTP(S) proxy."),n)}i(dE,"Regular");function t8({server:e,backendState:t}){let n=He(),s=e.error||t?.last_exception||void 0;return Ji.createElement("div",null,Ji.createElement(ci,{value:e.active,label:"Run HTTP/S Proxy",onChange:()=>n(TC({server:e,value:!e.active}))},Ji.createElement(fi,{iconClass:"fa fa-cog"},Ji.createElement("h4",null,"Advanced Configuration"),Ji.createElement("p",null,"Listen Host"),Ji.createElement(gt,{className:"mode-input",content:e.listen_host||"",onEditDone:l=>n(kC({server:e,value:l}))}),Ji.createElement("p",null,"Listen Port"),Ji.createElement(gt,{className:"mode-input",content:e.listen_port?e.listen_port.toString():"",placeholder:"8080",onEditDone:l=>n(NC({server:e,value:parseInt(l)}))}))),Ji.createElement(ui,{error:s,backendState:t}))}i(t8,"RegularRow");var di=de(be());function pE(){let e=me(s=>s.modes.wireguard),t=me(s=>s.backendState.servers),n=e.map(s=>di.createElement(r8,{key:s.ui_id,server:s,backendState:t[m0(s)]}));return di.createElement("div",null,di.createElement("h4",{className:"mode-title"},"WireGuard Server"),di.createElement("p",{className:"mode-description"},"Start a WireGuard\u2122 server and connect an external device for transparent proxying."),n)}i(pE,"Wireguard");function r8({server:e,backendState:t}){let n=He(),s=e.error||t?.last_exception||void 0;return di.createElement("div",null,di.createElement(ci,{value:e.active,label:"Run WireGuard Server",onChange:()=>n(PC({server:e,value:!e.active}))},di.createElement(fi,{iconClass:"fa fa-cog"},di.createElement("h4",null,"Advanced Configuration"),di.createElement("p",null,"Listen Host"),di.createElement(gt,{className:"mode-input",content:e.listen_host||"",placeholder:"(all interfaces)",onEditDone:l=>n(LC({server:e,value:l}))}),di.createElement("p",null,"Listen Port"),di.createElement(gt,{className:"mode-input",content:e.listen_port?e.listen_port.toString():"",placeholder:"51820",onEditDone:l=>n(MC({server:e,value:parseInt(l)}))}),di.createElement("p",null,"Configuration File"),di.createElement(gt,{className:"mode-input",content:e.file_path||"",placeholder:"~/.mitmproxy/wireguard.conf",onEditDone:l=>n(OC({server:e,value:l}))}))),di.createElement(ui,{error:s,backendState:t}))}i(r8,"WireGuardRow");var Gr=de(be());function hE(){let e=He(),t=me(s=>s.modes.reverse),n=me(s=>s.backendState.servers);return Gr.createElement("div",null,Gr.createElement("h4",{className:"mode-title"},"Reverse Proxy"),Gr.createElement("p",{className:"mode-description"},"Requests are forwarded to a preconfigured destination."),Gr.createElement("div",{className:"mode-reverse-servers"},t.map((s,l)=>Gr.createElement(n8,{key:s.ui_id,removable:l>0,server:s,backendState:n[vp(s)]})),Gr.createElement("div",{className:"mode-reverse-add-server",onClick:()=>e(XP())},Gr.createElement("i",{className:"fa fa-plus-square-o","aria-hidden":"true"}),"Add additional server")))}i(hE,"Reverse");function n8({removable:e,server:t,backendState:n}){let s=He(),l=Object.values(g0),h=i(async()=>{t.active&&await s(C0({server:t,value:!1})).unwrap(),await s(QP(t))},"deleteServer"),d=t.error||n?.last_exception||void 0;return Gr.createElement("div",null,Gr.createElement(ci,{value:t.active,label:"Forward",onChange:()=>{s(C0({server:t,value:!t.active}))}},Gr.createElement("select",{name:"protocols",className:"mode-reverse-dropdown",value:t.protocol,onChange:v=>{s(IC({server:t,value:v.target.value}))}},l.map(v=>Gr.createElement("option",{key:v,value:v},v))),"traffic to",Gr.createElement(gt,{className:"mode-reverse-input",content:t.destination?.toString()||"",onEditDone:v=>s(FC({server:t,value:v})),placeholder:"example.com"}),Gr.createElement(fi,{iconClass:"fa fa-cog"},Gr.createElement("h4",null,"Advanced Configuration"),Gr.createElement("p",null,"Listen Host"),Gr.createElement(gt,{className:"mode-input",content:t.listen_host||"",onEditDone:v=>s(RC({server:t,value:v})),placeholder:"*"}),Gr.createElement("p",null,"Listen Port"),Gr.createElement(gt,{className:"mode-input",content:String(t.listen_port||""),onEditDone:v=>s(DC({server:t,value:v})),placeholder:"8080"})),e&&Gr.createElement("i",{className:"fa fa-fw fa-trash fa-lg","aria-hidden":"true",onClick:h})),Gr.createElement(ui,{error:d,backendState:n}))}i(n8,"ReverseToggleRow");var Pi=de(be());function mE(){let e=me(s=>s.modes.transparent),t=me(s=>s.backendState.servers),n=e.map(s=>Pi.createElement(i8,{key:s.ui_id,server:s,backendState:t[y0(s)]}));return Pi.createElement("div",null,Pi.createElement("h4",{className:"mode-title"},"Transparent Proxy"),Pi.createElement("p",{className:"mode-description"},"You"," ",Pi.createElement("a",{href:"https://docs.mitmproxy.org/stable/howto-transparent/",style:{textDecoration:"underline",color:"inherit"}},"configure your routing table")," ","to send traffic through mitmproxy."),n)}i(mE,"Transparent");function i8({server:e,backendState:t}){let n=He(),s=e.error||t?.last_exception||void 0;return Pi.createElement("div",null,Pi.createElement(ci,{value:e.active,label:"Run Transparent Proxy",onChange:()=>n(HC({server:e,value:!e.active}))},Pi.createElement(fi,{iconClass:"fa fa-cog"},Pi.createElement("h4",null,"Advanced Configuration"),Pi.createElement("p",null,"Listen Host"),Pi.createElement(gt,{className:"mode-input",content:e.listen_host||"",onEditDone:l=>n(BC({server:e,value:l}))}),Pi.createElement("p",null,"Listen Port"),Pi.createElement(gt,{className:"mode-input",content:e.listen_port?e.listen_port.toString():"",placeholder:"8080",onEditDone:l=>n(zC({server:e,value:parseInt(l)}))}))),Pi.createElement(ui,{error:s,backendState:t}))}i(i8,"TransparentRow");var Zi=de(be());function gE(){let e=me(s=>s.modes.socks),t=me(s=>s.backendState.servers),n=e.map(s=>Zi.createElement(o8,{key:s.ui_id,server:s,backendState:t[w0(s)]}));return Zi.createElement("div",null,Zi.createElement("h4",{className:"mode-title"},"SOCKS Proxy"),Zi.createElement("p",{className:"mode-description"},"You manually configure your client application or device to use a SOCKSv5 proxy."),n)}i(gE,"Socks");function o8({server:e,backendState:t}){let n=He(),s=e.error||t?.last_exception||void 0;return Zi.createElement("div",null,Zi.createElement(ci,{value:e.active,label:"Run SOCKS Proxy",onChange:()=>n(WC({server:e,value:!e.active}))},Zi.createElement(fi,{iconClass:"fa fa-cog"},Zi.createElement("h4",null,"Advanced Configuration"),Zi.createElement("p",null,"Listen Host"),Zi.createElement(gt,{className:"mode-input",content:e.listen_host||"",onEditDone:l=>n(UC({server:e,value:l}))}),Zi.createElement("p",null,"Listen Port"),Zi.createElement(gt,{className:"mode-input",content:e.listen_port?e.listen_port.toString():"",placeholder:"8080",onEditDone:l=>n($C({server:e,value:parseInt(l)}))}))),Zi.createElement(ui,{error:s,backendState:t}))}i(o8,"SocksRow");var Li=de(be());function vE(){let e=me(s=>s.modes.upstream),t=me(s=>s.backendState.servers),n=e.map(s=>Li.createElement(s8,{key:s.ui_id,server:s,backendState:t[S0(s)]}));return Li.createElement("div",null,Li.createElement("h4",{className:"mode-title"},"Explicit HTTP(S) Proxy (With Upstream Proxy)"),Li.createElement("p",{className:"mode-description"},"All requests are forwarded to a second HTTP(S) proxy server."),n)}i(vE,"Upstream");function s8({server:e,backendState:t}){let n=He(),s=e.error||t?.last_exception||void 0;return Li.createElement("div",null,Li.createElement(ci,{value:e.active,label:"Run HTTP/S Proxy and forward requests to",onChange:()=>{n(VC({server:e,value:!e.active}))}},Li.createElement(gt,{className:"mode-upstream-input",content:e.destination?.toString()||"",onEditDone:l=>n(KC({server:e,value:l})),placeholder:"http://example.com:8080"}),Li.createElement(fi,{iconClass:"fa fa-cog"},Li.createElement("h4",null,"Advanced Configuration"),Li.createElement("p",null,"Listen Host"),Li.createElement(gt,{className:"mode-input",content:e.listen_host||"",onEditDone:l=>n(qC({server:e,value:l}))}),Li.createElement("p",null,"Listen Port"),Li.createElement(gt,{className:"mode-input",content:e.listen_port?e.listen_port.toString():"",placeholder:"8080",onEditDone:l=>n(jC({server:e,value:parseInt(l)}))}))),Li.createElement(ui,{error:s,backendState:t}))}i(s8,"UpstreamRow");var eo=de(be());function yE(){let e=me(s=>s.modes.dns),t=me(s=>s.backendState.servers),n=e.map(s=>eo.createElement(a8,{key:s.ui_id,server:s,backendState:t[x0(s)]}));return eo.createElement("div",null,eo.createElement("h4",{className:"mode-title"},"DNS Server"),eo.createElement("p",{className:"mode-description"},"A recursive DNS resolver using the host's DNS configuration."),n)}i(yE,"Dns");function a8({server:e,backendState:t}){let n=He(),s=e.error||t?.last_exception||void 0;return eo.createElement("div",null,eo.createElement(ci,{value:e.active,label:"Run DNS Server",onChange:()=>n(GC({server:e,value:!e.active}))},eo.createElement(fi,{iconClass:"fa fa-cog"},eo.createElement("h4",null,"Advanced Configuration"),eo.createElement("p",null,"Listen Host"),eo.createElement(gt,{className:"mode-input",content:e.listen_host||"",onEditDone:l=>n(YC({server:e,value:l}))}),eo.createElement("p",null,"Listen Port"),eo.createElement(gt,{className:"mode-input",content:e.listen_port?e.listen_port.toString():"",placeholder:"8080",onEditDone:l=>n(XC({server:e,value:parseInt(l)}))}))),eo.createElement(ui,{error:s,backendState:t}))}i(a8,"DnsRow");var Dp=de(be());function rw({title:e,description:t}){return Dp.createElement("div",{className:"missing-mode-container"},Dp.createElement("div",{className:"title-icon-container"},Dp.createElement("h4",{className:"mode-title"},e),Dp.createElement("i",{className:"fa fa-exclamation-triangle","aria-hidden":"true"})),Dp.createElement("p",{className:"mode-description"},t))}i(rw,"MissingMode");function wE(){let{platform:e,localModeUnavailable:t}=me(n=>n.backendState);return un.createElement("div",{className:"modes"},un.createElement("h2",null,"Intercept Traffic"),un.createElement("p",null,"Configure how you want to intercept traffic with mitmproxy."),un.createElement("div",{className:"modes-category green-left-border"},un.createElement("h3",null,"Recommended"),un.createElement("div",{className:"modes-container"},un.createElement(dE,null),t!==null?un.createElement(rw,{title:"Local Redirect Mode",description:t}):un.createElement(fE,null),un.createElement(pE,null),un.createElement(hE,null))),un.createElement("div",{className:"modes-category gray-left-border"},un.createElement("h3",null,"Advanced"),un.createElement("div",{className:"modes-container"},un.createElement(gE,null),un.createElement(vE,null),un.createElement(yE,null),e.startsWith("win32")?un.createElement(rw,{title:"Transparent Proxy",description:"This mode is only supported on Linux and MacOS."}):un.createElement(mE,null))))}i(wE,"Modes");function SE(){let e=me(s=>!!s.flows.byId[s.flows.selected[0]]),t=me(s=>s.flows.list.length>0),n=me(s=>s.ui.tabs.current);return Ta.createElement("div",{className:"main-view"},n===0?Ta.createElement(wE,null):Ta.createElement(Ta.Fragment,null,t?Ta.createElement(eM,null):Ta.createElement(uE,null),e&&Ta.createElement(Jm,{key:"splitter"}),e&&Ta.createElement(T_,{key:"flowDetails"})))}i(SE,"MainView");var to=de(be()),cO=de(ai());var Qn=de(be());var nw=de(be());function hs({children:e}){return window.MITMWEB_STATIC?null:nw.createElement(nw.Fragment,null,e)}i(hs,"HideInStatic");var iO=Qn.memo(i(function(){let t=He(),n=me(s=>s.flows.filter);return Qn.createElement(Yu,{className:"pull-left special",text:"File",options:{placement:"bottom-start"}},Qn.createElement("li",null,Qn.createElement(E0,{icon:"fa-folder-open",text:"\xA0Open...",onClick:s=>s.stopPropagation(),onOpenFile:s=>{t(gP(s)),document.body.click()}})),Qn.createElement(li,{onClick:()=>location.replace("/flows/dump")},Qn.createElement("i",{className:"fa fa-fw fa-floppy-o"}),"\xA0Save"),Qn.createElement(li,{onClick:()=>location.replace("/flows/dump?filter="+n)},Qn.createElement("i",{className:"fa fa-fw fa-floppy-o"}),"\xA0Save filtered"),Qn.createElement(li,{onClick:()=>confirm("Delete all flows?")&&t(l0())},Qn.createElement("i",{className:"fa fa-fw fa-trash"}),"\xA0Clear All"),Qn.createElement(hs,null,Qn.createElement(zL,null),Qn.createElement("li",null,Qn.createElement("a",{href:"http://mitm.it/",target:"_blank",rel:"noreferrer"},Qn.createElement("i",{className:"fa fa-fw fa-external-link"}),"\xA0Install Certificates..."))))},"FileMenu"));var tc=de(be());var oO=tc.memo(i(function(){let t=me(s=>s.connection.state),n=me(s=>s.connection.message);switch(t){case"CONNECTION_INIT":return tc.createElement("span",{className:"connection-indicator init"},"connecting\u2026");case"CONNECTION_FETCHING":return tc.createElement("span",{className:"connection-indicator fetching"},"fetching data\u2026");case"CONNECTION_ESTABLISHED":return tc.createElement("span",{className:"connection-indicator established"},"connected");case"CONNECTION_ERROR":return tc.createElement("span",{className:"connection-indicator error",title:n},"connection lost");case"CONNECTION_OFFLINE":return tc.createElement("span",{className:"connection-indicator offline"},"offline")}},"ConnectionIndicator"));var iw=de(be());ow.title="Capture";function ow(){return iw.createElement(iw.Fragment,null)}i(ow,"CaptureMenu");var pi=de(be());var ms=de(be()),sO=de(ai());var Ho=de(be());var cg=class e extends Ho.Component{static{i(this,"FilterDocs")}constructor(t,n){super(t,n),this.state={doc:e.doc}}componentDidMount(){e.xhr||(e.xhr=xt("/filter-help").then(t=>t.json()),e.xhr.catch(()=>{e.xhr=null})),this.state.doc||e.xhr.then(t=>{e.doc=t,this.setState({doc:t})})}render(){let{doc:t}=this.state;return t?Ho.default.createElement("table",{className:"table table-condensed"},Ho.default.createElement("tbody",null,t.commands.map(n=>Ho.default.createElement("tr",{key:n[1],onClick:()=>this.props.selectHandler(n[0].split(" ")[0]+" ")},Ho.default.createElement("td",null,n[0].replace(" ","\xA0")),Ho.default.createElement("td",null,n[1]))),Ho.default.createElement("tr",{key:"docs-link"},Ho.default.createElement("td",{colSpan:2},Ho.default.createElement("a",{href:"https://mitmproxy.org/docs/latest/concepts-filters/",target:"_blank",rel:"noreferrer"},Ho.default.createElement("i",{className:"fa fa-external-link"}),"\xA0 mitmproxy docs"))))):Ho.default.createElement("i",{className:"fa fa-spinner fa-spin"})}};var Wf=class extends ms.Component{constructor(n,s){super(n,s);this.inputRef=ms.default.createRef();this.state={value:this.props.value,focus:!1,mousefocus:!1},this.onChange=this.onChange.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.onMouseEnter=this.onMouseEnter.bind(this),this.onMouseLeave=this.onMouseLeave.bind(this),this.selectFilter=this.selectFilter.bind(this)}static{i(this,"FilterInput")}UNSAFE_componentWillReceiveProps(n){this.setState({value:n.value})}isValid(n){try{return n&&wf.parse(n),!0}catch{return!1}}getDesc(){if(!this.state.value)return ms.default.createElement(cg,{selectHandler:this.selectFilter});try{return wf.parse(this.state.value).desc}catch(n){return""+n}}onChange(n){let s=n.target.value;this.setState({value:s}),this.isValid(s)&&this.props.onChange(s)}onFocus(){this.setState({focus:!0})}onBlur(){this.setState({focus:!1})}onMouseEnter(){this.setState({mousefocus:!0})}onMouseLeave(){this.setState({mousefocus:!1})}onKeyDown(n){(n.key==="Escape"||n.key==="Enter")&&(this.blur(),this.setState({mousefocus:!1})),n.stopPropagation?.()}selectFilter(n){this.setState({value:n}),this.inputRef.current?.focus()}blur(){this.inputRef.current?.blur()}select(){this.inputRef.current?.select()}render(){let{type:n,color:s,placeholder:l}=this.props,{value:h,focus:d,mousefocus:v}=this.state;return ms.default.createElement("div",{className:(0,sO.default)("filter-input input-group",{"has-error":!this.isValid(h)})},ms.default.createElement("span",{className:"input-group-addon"},ms.default.createElement("i",{className:"fa fa-fw fa-"+n,style:{color:s}})),ms.default.createElement("input",{type:"text",ref:this.inputRef,placeholder:l,className:"form-control",value:h,onChange:this.onChange,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown}),(d||v)&&ms.default.createElement("div",{className:"popover bottom",onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave},ms.default.createElement("div",{className:"arrow"}),ms.default.createElement("div",{className:"popover-content"},this.getDesc())))}};sw.title="Flow List";function sw(){return pi.createElement("div",{className:"main-menu"},pi.createElement("div",{className:"menu-group"},pi.createElement("div",{className:"menu-content"},pi.createElement(c8,null),pi.createElement(f8,null)),pi.createElement("div",{className:"menu-legend"},"Find")),pi.createElement("div",{className:"menu-group"},pi.createElement("div",{className:"menu-content"},pi.createElement(u8,null),pi.createElement(d8,null)),pi.createElement("div",{className:"menu-legend"},"Intercept")))}i(sw,"FlowListMenu");function u8(){let e=He(),t=me(n=>n.options.intercept);return pi.createElement(Wf,{value:t||"",placeholder:"Intercept",type:"pause",color:"hsl(208, 56%, 53%)",onChange:n=>e(gp("intercept",n))})}i(u8,"InterceptInput");function c8(){let e=He(),t=me(n=>n.flows.filter);return pi.createElement(Wf,{value:t||"",placeholder:"Search",type:"search",color:"black",onChange:n=>e(t0(n))})}i(c8,"FlowFilterInput");function f8(){let e=He(),t=me(n=>n.flows.highlight);return pi.createElement(Wf,{value:t||"",placeholder:"Highlight",type:"tag",color:"hsl(48, 100%, 50%)",onChange:n=>e(r0(n))})}i(f8,"HighlightInput");function d8(){let e=He();return pi.createElement(Rr,{className:"btn-sm",title:"[a]ccept all",icon:"fa-forward text-success",onClick:()=>e(n0())},"Resume All")}i(d8,"ResumeAll");var cn=de(be());var Uf=de(be());function xE({value:e,onChange:t,children:n}){return Uf.createElement("div",{className:"menu-entry"},Uf.createElement("label",null,Uf.createElement("input",{type:"checkbox",checked:e,onChange:t}),n))}i(xE,"MenuToggle");function aw({name:e,children:t}){let n=He(),s=me(l=>l.options[e]);return Uf.createElement(xE,{value:!!s,onChange:()=>n(gp(e,!s))},t)}i(aw,"OptionsToggle");function aO(){let e=He(),t=me(n=>n.eventLog.visible);return Uf.createElement(xE,{value:t,onChange:()=>e(mp())},"Display Event Log")}i(aO,"EventlogToggle");function lO(){let e=He(),t=me(n=>n.commandBar.visible);return Uf.createElement(xE,{value:t,onChange:()=>e(f0())},"Display Command Bar")}i(lO,"CommandBarToggle");var CE=de(be());function _E({children:e,resource:t}){let n=`https://docs.mitmproxy.org/stable/${t}`;return CE.createElement("a",{target:"_blank",href:n,rel:"noreferrer"},e||CE.createElement("i",{className:"fa fa-question-circle"}))}i(_E,"DocsLink");lw.title="Options";function lw(){let e=He(),t=i(()=>wP("OptionModal"),"openOptions");return cn.createElement("div",null,cn.createElement(hs,null,cn.createElement("div",{className:"menu-group"},cn.createElement("div",{className:"menu-content"},cn.createElement(Rr,{title:"Open Options",icon:"fa-cogs text-primary",onClick:()=>e(t())},"Edit Options ",cn.createElement("sup",null,"alpha"))),cn.createElement("div",{className:"menu-legend"},"Options Editor")),cn.createElement("div",{className:"menu-group"},cn.createElement("div",{className:"menu-content"},cn.createElement(aw,{name:"anticache"},"Strip cache headers"," ",cn.createElement(_E,{resource:"overview-features/#anticache"})),cn.createElement(aw,{name:"showhost"},"Use host header for display"),cn.createElement(aw,{name:"ssl_insecure"},"Don't verify server certificates")),cn.createElement("div",{className:"menu-legend"},"Quick Options"))),cn.createElement("div",{className:"menu-group"},cn.createElement("div",{className:"menu-content"},cn.createElement(aO,null),cn.createElement(lO,null)),cn.createElement("div",{className:"menu-legend"},"View Options")))}i(lw,"OptionMenu");var ft=de(be());var Ip=i(async(e,t)=>{let n=(async()=>{let s=await yf("export",t,`@${e.id}`);if(s.value)return s.value;throw s.error?s.error:s})();try{await rP(n)}catch(s){alert(s)}},"copy");cw.title="Flow";function cw(){let e=He(),t=me(n=>n.flows.byId[n.flows.selected[0]]);return t?ft.createElement("div",{className:"flow-menu"},ft.createElement(hs,null,ft.createElement("div",{className:"menu-group"},ft.createElement("div",{className:"menu-content"},ft.createElement(Rr,{title:"[r]eplay flow",icon:"fa-repeat text-primary",onClick:()=>e(dp(t)),disabled:!e0(t)},"Replay"),ft.createElement(Rr,{title:"[D]uplicate flow",icon:"fa-copy text-info",onClick:()=>e(s0(t))},"Duplicate"),ft.createElement(Rr,{disabled:!t||!t.modified,title:"revert changes to flow [V]",icon:"fa-history text-warning",onClick:()=>e(a0(t))},"Revert"),ft.createElement(Rr,{title:"[d]elete flow",icon:"fa-trash text-danger",onClick:()=>e(o0(t))},"Delete"),ft.createElement(g8,{flow:t})),ft.createElement("div",{className:"menu-legend"},"Flow Modification"))),ft.createElement("div",{className:"menu-group"},ft.createElement("div",{className:"menu-content"},ft.createElement(p8,{flow:t}),ft.createElement(h8,{flow:t})),ft.createElement("div",{className:"menu-legend"},"Export")),ft.createElement(hs,null,ft.createElement("div",{className:"menu-group"},ft.createElement("div",{className:"menu-content"},ft.createElement(Rr,{disabled:!t||!t.intercepted,title:"[a]ccept intercepted flow",icon:"fa-play text-success",onClick:()=>e(fp(t))},"Resume"),ft.createElement(Rr,{disabled:!t||!t.intercepted,title:"kill intercepted flow [x]",icon:"fa-times text-danger",onClick:()=>e(i0(t))},"Abort")),ft.createElement("div",{className:"menu-legend"},"Interception")))):ft.createElement("div",null)}i(cw,"FlowMenu");var uw=i(e=>{let t=window.open(e,"_blank","noopener,noreferrer");t&&(t.opener=null)},"openInNewTab");function p8({flow:e}){if(e.type!=="http")return ft.createElement(Rr,{icon:"fa-download",onClick:()=>0,disabled:!0},"Download");if(e.request.contentLength&&!e.response?.contentLength)return ft.createElement(Rr,{icon:"fa-download",onClick:()=>uw(Rn.getContentURL(e,e.request))},"Download");if(e.response){let t=e.response;if(!e.request.contentLength&&e.response.contentLength)return ft.createElement(Rr,{icon:"fa-download",onClick:()=>uw(Rn.getContentURL(e,t))},"Download");if(e.request.contentLength&&e.response.contentLength)return ft.createElement(Yu,{text:ft.createElement(Rr,{icon:"fa-download",onClick:()=>1},"Download\u25BE"),options:{placement:"bottom-start"}},ft.createElement(li,{onClick:()=>uw(Rn.getContentURL(e,e.request))},"Download request"),ft.createElement(li,{onClick:()=>uw(Rn.getContentURL(e,t))},"Download response"))}return null}i(p8,"DownloadButton");function h8({flow:e}){return ft.createElement(Yu,{className:"",text:ft.createElement(Rr,{title:"Export flow.",icon:"fa-clone",onClick:()=>1,disabled:e.type!=="http"},"Export\u25BE"),options:{placement:"bottom-start"}},ft.createElement(li,{onClick:()=>Ip(e,"raw_request")},"Copy raw request"),ft.createElement(li,{onClick:()=>Ip(e,"raw_response")},"Copy raw response"),ft.createElement(li,{onClick:()=>Ip(e,"raw")},"Copy raw request and response"),ft.createElement(li,{onClick:()=>Ip(e,"curl")},"Copy as cURL"),ft.createElement(li,{onClick:()=>Ip(e,"httpie")},"Copy as HTTPie"))}i(h8,"ExportButton");var m8={":red_circle:":"\u{1F534}",":orange_circle:":"\u{1F7E0}",":yellow_circle:":"\u{1F7E1}",":green_circle:":"\u{1F7E2}",":large_blue_circle:":"\u{1F535}",":purple_circle:":"\u{1F7E3}",":brown_circle:":"\u{1F7E4}"};function g8({flow:e}){let t=He();return ft.createElement(Yu,{className:"",text:ft.createElement(Rr,{title:"mark flow",icon:"fa-paint-brush text-success",onClick:()=>1},"Mark\u25BE"),options:{placement:"bottom-start"}},ft.createElement(li,{onClick:()=>t(si(e,{marked:""}))},"\u26AA (no marker)"),Object.entries(m8).map(([n,s])=>ft.createElement(li,{key:n,onClick:()=>t(si(e,{marked:n}))},s," ",n.replace(/[:_]/g," "))))}i(g8,"MarkButton");var uO={0:ow,1:sw,2:lw,3:cw};function EE(){let e=He(),t=me(k=>k.ui.tabs.current),n=me(k=>k.flows.selected.filter(R=>R in k.flows.byId),Mo),[s,l]=(0,to.useState)(!1),h=me(k=>k.flows.list.length>0),d=me(k=>k.ui.tabs.isInitial),v=[0,1,2];n.length>0&&v.push(3),(0,to.useEffect)(()=>{h&&d&&e(Fm(1))},[h]),(0,to.useEffect)(()=>{n.length>0&&!s?(e(Fm(3)),l(!0)):n.length===0&&(s&&l(!1),t===3&&e(Fm(1)))},[n,s,t]);function S(k,R){R.preventDefault(),e(Fm(k))}i(S,"handleClick");let b=uO[t];return to.default.createElement("header",null,to.default.createElement("nav",{className:"nav-tabs nav-tabs-lg"},to.default.createElement(iO,null),v.map(k=>to.default.createElement("a",{key:k,href:"#",className:(0,cO.default)({active:k===t}),onClick:R=>S(k,R)},uO[k].title)),to.default.createElement(hs,null,to.default.createElement(oO,null))),to.default.createElement("div",null,to.default.createElement(b,null)))}i(EE,"Header");var nt=de(be()),fO=de(ai());var fw=function(){"use strict";function e(s,l){function h(){this.constructor=s}i(h,"ctor"),h.prototype=l.prototype,s.prototype=new h}i(e,"peg$subclass");function t(s,l,h,d){this.message=s,this.expected=l,this.found=h,this.location=d,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,t)}i(t,"peg$SyntaxError"),e(t,Error);function n(s){var l=arguments.length>1?arguments[1]:{},h=this,d={},v={Expr:Hn},S=Hn,b=i(function(X,ee){return[X,...ee]},"peg$c0"),k=i(function(X){return[X]},"peg$c1"),R=i(function(){return""},"peg$c2"),I={type:"other",description:"string"},z='"',j={type:"literal",value:'"',description:'"\\""'},Y=i(function(X){return X.join("")},"peg$c6"),ne="'",F={type:"literal",value:"'",description:`"'"`},L=/^["\\]/,D={type:"class",value:'["\\\\]',description:'["\\\\]'},q={type:"any",description:"any character"},te=i(function(X){return X},"peg$c12"),Z="\\",oe={type:"literal",value:"\\",description:'"\\\\"'},he=/^['\\]/,Re={type:"class",value:"['\\\\]",description:"['\\\\]"},Ee=/^['"\\]/,Ye={type:"class",value:`['"\\\\]`,description:`['"\\\\]`},tt="n",xe={type:"literal",value:"n",description:'"n"'},Xe=i(function(){return` +`},"peg$c21"),je="r",Qe={type:"literal",value:"r",description:'"r"'},ot=i(function(){return"\r"},"peg$c24"),It="t",At={type:"literal",value:"t",description:'"t"'},fn=i(function(){return" "},"peg$c27"),dn={type:"other",description:"whitespace"},vr=/^[ \t\n\r]/,Ut={type:"class",value:"[ \\t\\n\\r]",description:"[ \\t\\n\\r]"},yr={type:"other",description:"control character"},wr=/^[|&!()~"]/,Yt={type:"class",value:'[|&!()~"]',description:'[|&!()~"]'},Ft={type:"other",description:"optional whitespace"},se=0,We=0,Yr=[{line:1,column:1,seenCR:!1}],er=0,st=[],Fe=0,Fn;if("startRule"in l){if(!(l.startRule in v))throw new Error(`Can't start parsing from rule "`+l.startRule+'".');S=v[l.startRule]}function bn(){return s.substring(We,se)}i(bn,"text");function no(){return dr(We,se)}i(no,"location");function Bo(X){throw io(null,[{type:"other",description:X}],s.substring(We,se),dr(We,se))}i(Bo,"expected");function lt(X){throw io(X,null,s.substring(We,se),dr(We,se))}i(lt,"error");function Sr(X){var ee=Yr[X],Ce,Me;if(ee)return ee;for(Ce=X-1;!Yr[Ce];)Ce--;for(ee=Yr[Ce],ee={line:ee.line,column:ee.column,seenCR:ee.seenCR};Ceer&&(er=se,st=[]),st.push(X))}i(pt,"peg$fail");function io(X,ee,Ce,Me){function Tl(Jr){var Xt=1;for(Jr.sort(function(Mt,Pt){return Mt.descriptionPt.description?1:0});Xt1?Pt.slice(0,-1).join(", ")+" or "+Pt[Jr.length-1]:Pt[0],pn=Xt?'"'+Mt(Xt)+'"':"end of input","Expected "+Na+" but "+pn+" found."}return i(ze,"buildMessage"),ee!==null&&Tl(ee),new t(X!==null?X:ze(ee,Ce),ee,Ce,Me)}i(io,"peg$buildException");function Hn(){var X,ee,Ce,Me;if(X=se,ee=Mi(),ee!==d){if(Ce=[],Me=Bn(),Me!==d)for(;Me!==d;)Ce.push(Me),Me=Bn();else Ce=d;Ce!==d?(Me=Hn(),Me!==d?(We=X,ee=b(ee,Me),X=ee):(se=X,X=d)):(se=X,X=d)}else se=X,X=d;if(X===d&&(X=se,ee=Mi(),ee!==d&&(We=X,ee=k(ee)),X=ee,X===d)){for(X=se,ee=[],Ce=Bn();Ce!==d;)ee.push(Ce),Ce=Bn();ee!==d&&(We=X,ee=R()),X=ee}return X}i(Hn,"peg$parseExpr");function Mi(){var X,ee,Ce,Me;if(Fe++,X=se,s.charCodeAt(se)===34?(ee=z,se++):(ee=d,Fe===0&&pt(j)),ee!==d){for(Ce=[],Me=Xr();Me!==d;)Ce.push(Me),Me=Xr();Ce!==d?(s.charCodeAt(se)===34?(Me=z,se++):(Me=d,Fe===0&&pt(j)),Me!==d?(We=X,ee=Y(Ce),X=ee):(se=X,X=d)):(se=X,X=d)}else se=X,X=d;if(X===d){if(X=se,s.charCodeAt(se)===39?(ee=ne,se++):(ee=d,Fe===0&&pt(F)),ee!==d){for(Ce=[],Me=Qr();Me!==d;)Ce.push(Me),Me=Qr();Ce!==d?(s.charCodeAt(se)===39?(Me=ne,se++):(Me=d,Fe===0&&pt(F)),Me!==d?(We=X,ee=Y(Ce),X=ee):(se=X,X=d)):(se=X,X=d)}else se=X,X=d;if(X===d){if(X=se,ee=se,Fe++,Ce=so(),Fe--,Ce===d?ee=void 0:(se=ee,ee=d),ee!==d){if(Ce=[],Me=oo(),Me!==d)for(;Me!==d;)Ce.push(Me),Me=oo();else Ce=d;Ce!==d?(We=X,ee=Y(Ce),X=ee):(se=X,X=d)}else se=X,X=d;if(X===d){if(X=se,s.charCodeAt(se)===34?(ee=z,se++):(ee=d,Fe===0&&pt(j)),ee!==d){for(Ce=[],Me=Xr();Me!==d;)Ce.push(Me),Me=Xr();Ce!==d?(We=X,ee=Y(Ce),X=ee):(se=X,X=d)}else se=X,X=d;if(X===d)if(X=se,s.charCodeAt(se)===39?(ee=ne,se++):(ee=d,Fe===0&&pt(F)),ee!==d){for(Ce=[],Me=Qr();Me!==d;)Ce.push(Me),Me=Qr();Ce!==d?(We=X,ee=Y(Ce),X=ee):(se=X,X=d)}else se=X,X=d}}}return Fe--,X===d&&(ee=d,Fe===0&&pt(I)),X}i(Mi,"peg$parseStringLiteral");function Xr(){var X,ee,Ce;return X=se,ee=se,Fe++,L.test(s.charAt(se))?(Ce=s.charAt(se),se++):(Ce=d,Fe===0&&pt(D)),Fe--,Ce===d?ee=void 0:(se=ee,ee=d),ee!==d?(s.length>se?(Ce=s.charAt(se),se++):(Ce=d,Fe===0&&pt(q)),Ce!==d?(We=X,ee=te(Ce),X=ee):(se=X,X=d)):(se=X,X=d),X===d&&(X=se,s.charCodeAt(se)===92?(ee=Z,se++):(ee=d,Fe===0&&pt(oe)),ee!==d?(Ce=hi(),Ce!==d?(We=X,ee=te(Ce),X=ee):(se=X,X=d)):(se=X,X=d)),X}i(Xr,"peg$parseDoubleStringChar");function Qr(){var X,ee,Ce;return X=se,ee=se,Fe++,he.test(s.charAt(se))?(Ce=s.charAt(se),se++):(Ce=d,Fe===0&&pt(Re)),Fe--,Ce===d?ee=void 0:(se=ee,ee=d),ee!==d?(s.length>se?(Ce=s.charAt(se),se++):(Ce=d,Fe===0&&pt(q)),Ce!==d?(We=X,ee=te(Ce),X=ee):(se=X,X=d)):(se=X,X=d),X===d&&(X=se,s.charCodeAt(se)===92?(ee=Z,se++):(ee=d,Fe===0&&pt(oe)),ee!==d?(Ce=hi(),Ce!==d?(We=X,ee=te(Ce),X=ee):(se=X,X=d)):(se=X,X=d)),X}i(Qr,"peg$parseSingleStringChar");function oo(){var X,ee,Ce;return X=se,ee=se,Fe++,Ce=Bn(),Fe--,Ce===d?ee=void 0:(se=ee,ee=d),ee!==d?(s.length>se?(Ce=s.charAt(se),se++):(Ce=d,Fe===0&&pt(q)),Ce!==d?(We=X,ee=te(Ce),X=ee):(se=X,X=d)):(se=X,X=d),X}i(oo,"peg$parseUnquotedStringChar");function hi(){var X,ee;return Ee.test(s.charAt(se))?(X=s.charAt(se),se++):(X=d,Fe===0&&pt(Ye)),X===d&&(X=se,s.charCodeAt(se)===110?(ee=tt,se++):(ee=d,Fe===0&&pt(xe)),ee!==d&&(We=X,ee=Xe()),X=ee,X===d&&(X=se,s.charCodeAt(se)===114?(ee=je,se++):(ee=d,Fe===0&&pt(Qe)),ee!==d&&(We=X,ee=ot()),X=ee,X===d&&(X=se,s.charCodeAt(se)===116?(ee=It,se++):(ee=d,Fe===0&&pt(At)),ee!==d&&(We=X,ee=fn()),X=ee))),X}i(hi,"peg$parseEscapeSequence");function Bn(){var X,ee;return Fe++,vr.test(s.charAt(se))?(X=s.charAt(se),se++):(X=d,Fe===0&&pt(Ut)),Fe--,X===d&&(ee=d,Fe===0&&pt(dn)),X}i(Bn,"peg$parsews");function so(){var X,ee;return Fe++,wr.test(s.charAt(se))?(X=s.charAt(se),se++):(X=d,Fe===0&&pt(Yt)),Fe--,X===d&&(ee=d,Fe===0&&pt(yr)),X}i(so,"peg$parsecc");function bl(){var X,ee;for(Fe++,X=[],ee=Bn();ee!==d;)X.push(ee),ee=Bn();return Fe--,X===d&&(ee=d,Fe===0&&pt(Ft)),X}if(i(bl,"peg$parse__"),Fn=S(),Fn!==d&&se===s.length)return Fn;throw Fn!==d&&se{t&&t.current.addEventListener("DOMNodeInserted",n=>{let s=n.currentTarget;s.scroll({top:s.scrollHeight,behavior:"auto"})})},[]),nt.default.createElement("div",{className:"command-result",ref:t},e.map((n,s)=>nt.default.createElement("div",{key:s},nt.default.createElement("div",null,nt.default.createElement("strong",null,"$ ",n.command)),n.result)))}i(v8,"Results");function y8({nextArgs:e,currentArg:t,help:n,description:s,availableCommands:l}){let h=[];for(let d=0;d0&&nt.default.createElement("div",null,nt.default.createElement("strong",null,"Argument suggestion:")," ",h),n?.includes("->")&&nt.default.createElement("div",null,nt.default.createElement("strong",null,"Signature help: "),n),s&&nt.default.createElement("div",null,"# ",s),nt.default.createElement("div",null,nt.default.createElement("strong",null,"Available Commands: "),nt.default.createElement("p",{className:"available-commands"},JSON.stringify(l)))))}i(y8,"CommandHelp");function TE(){let[e,t]=(0,nt.useState)(""),[n,s]=(0,nt.useState)(""),[l,h]=(0,nt.useState)(0),[d,v]=(0,nt.useState)([]),[S,b]=(0,nt.useState)([]),[k,R]=(0,nt.useState)({}),[I,z]=(0,nt.useState)([]),[j,Y]=(0,nt.useState)(0),[ne,F]=(0,nt.useState)(""),[L,D]=(0,nt.useState)(""),[q,te]=(0,nt.useState)([]),[Z,oe]=(0,nt.useState)([]),[he,Re]=(0,nt.useState)(void 0);(0,nt.useEffect)(()=>{xt("/commands",{method:"GET"}).then(Xe=>Xe.json()).then(Xe=>{R(Xe),v(bE(Xe)),b(Object.keys(Xe))}).catch(Xe=>console.error(Xe))},[]),(0,nt.useEffect)(()=>{yf("commands.history.get").then(Xe=>{oe(Xe.value)}).catch(Xe=>console.error(Xe))},[]);let Ee=i((Xe,je)=>{let Qe=fw.parse(je),ot=fw.parse(Xe);F(k[Qe[0]]?.signature_help),D(k[Qe[0]]?.help||""),v(bE(k,ot[0])),b(bE(k,Qe[0]));let It=k[Qe[0]]?.parameters.map(At=>At.name);It&&(z([Qe[0],...It]),Y(Qe.length-1))},"parseCommand"),Ye=i(Xe=>{t(Xe.target.value),s(Xe.target.value),h(0)},"onChange"),tt=i(Xe=>{if(Xe.key==="Enter"){let[je,...Qe]=fw.parse(e);oe([...Z,e]),yf("commands.history.add",e).catch(()=>0),xt.post(`/commands/${je}`,{arguments:Qe}).then(ot=>ot.json()).then(ot=>{Re(void 0),z([]),te([...q,{command:e,result:JSON.stringify(ot.value||ot.error)}])}).catch(ot=>{Re(void 0),z([]),te([...q,{command:e,result:ot.toString()}])}),F(""),D(""),t(""),s(""),h(0),v(S)}if(Xe.key==="ArrowUp"){let je;he===void 0?je=Z.length-1:je=Math.max(0,he-1),t(Z[je]),s(Z[je]),Re(je)}if(Xe.key==="ArrowDown"){if(he===void 0)return;if(he==Z.length-1)t(""),s(""),Re(void 0);else{let je=he+1;t(Z[je]),s(Z[je]),Re(je)}}Xe.key==="Tab"&&(t(d[l]),h((l+1)%d.length),Xe.preventDefault()),Xe.stopPropagation()},"onKeyDown"),xe=i(Xe=>{if(!e){b(Object.keys(k));return}Ee(n,e),Xe.stopPropagation()},"onKeyUp");return nt.default.createElement("div",{className:"command"},nt.default.createElement("div",{className:"command-title"},"Command Result"),nt.default.createElement(v8,{results:q}),nt.default.createElement(y8,{nextArgs:I,currentArg:j,help:ne,description:L,availableCommands:S}),nt.default.createElement("div",{className:(0,fO.default)("command-input input-group")},nt.default.createElement("span",{className:"input-group-addon"},nt.default.createElement("i",{className:"fa fa-fw fa-terminal"})),nt.default.createElement("input",{type:"text",placeholder:"Enter command",className:"form-control",value:e||"",onChange:Ye,onKeyDown:tt,onKeyUp:xe})))}i(TE,"CommandBar");var El=de(be());var kE=de(be());function NE({checked:e,onToggle:t,text:n}){return kE.default.createElement("div",{className:"btn btn-toggle "+(e?"btn-primary":"btn-default"),onClick:t},kE.default.createElement("i",{className:"fa fa-fw "+(e?"fa-check-square-o":"fa-square-o")}),"\xA0",n)}i(NE,"ToggleButton");var ka=de(be()),AE=de(wO());var fg=class extends ka.Component{constructor(n){super(n);this.viewport=ka.default.createRef();this.heights={},this.state={vScroll:Df()},this.onViewportUpdate=this.onViewportUpdate.bind(this)}static{i(this,"EventLogList")}static{this.propTypes={events:AE.default.array.isRequired,rowHeight:AE.default.number}}static{this.defaultProps={rowHeight:18}}componentDidMount(){window.addEventListener("resize",this.onViewportUpdate),this.onViewportUpdate()}componentWillUnmount(){window.removeEventListener("resize",this.onViewportUpdate)}getSnapshotBeforeUpdate(){return Zm(this.viewport)}componentDidUpdate(n,s,l){l&&$0(this.viewport),this.onViewportUpdate()}onViewportUpdate(){let n=this.viewport.current,s=Df({itemCount:this.props.events.length,rowHeight:this.props.rowHeight,viewportTop:n.scrollTop,viewportHeight:n.offsetHeight,itemHeights:this.props.events.map(l=>this.heights[l.id])});Mo(this.state.vScroll,s)||this.setState({vScroll:s})}setHeight(n,s){if(s&&!this.heights[n]){let l=s.offsetHeight;this.heights[n]!==l&&(this.heights[n]=l,this.onViewportUpdate())}}render(){let{vScroll:n}=this.state,{events:s}=this.props;return ka.default.createElement("pre",{ref:this.viewport,onScroll:this.onViewportUpdate},ka.default.createElement("div",{style:{height:n.paddingTop}}),s.slice(n.start,n.end).map(l=>ka.default.createElement("div",{key:l.id,ref:h=>this.setHeight(l.id,h)},ka.default.createElement(x8,{event:l}),l.message)),ka.default.createElement("div",{style:{height:n.paddingBottom}}))}};function x8({event:e}){let t={web:"html5",debug:"bug",warn:"exclamation-triangle",error:"ban"}[e.level]||"info";return ka.default.createElement("i",{className:`fa fa-fw fa-${t}`})}i(x8,"LogIcon");var PE=class extends El.Component{static{i(this,"PureEventLog")}static{this.defaultProps={defaultHeight:200}}constructor(t,n){super(t,n),this.state={height:this.props.defaultHeight},this.onDragStart=this.onDragStart.bind(this),this.onDragMove=this.onDragMove.bind(this),this.onDragStop=this.onDragStop.bind(this)}onDragStart(t){t.preventDefault(),this.dragStart=this.state.height+t.pageY,window.addEventListener("mousemove",this.onDragMove),window.addEventListener("mouseup",this.onDragStop),window.addEventListener("dragend",this.onDragStop)}onDragMove(t){t.preventDefault(),this.setState({height:this.dragStart-t.pageY})}onDragStop(t){t.preventDefault(),window.removeEventListener("mousemove",this.onDragMove)}render(){let{height:t}=this.state,{filters:n,events:s,toggleFilter:l,close:h}=this.props;return El.default.createElement("div",{className:"eventlog",style:{height:t}},El.default.createElement("div",{onMouseDown:this.onDragStart},"Eventlog",El.default.createElement("div",{className:"pull-right"},Object.values(dC).map(d=>El.default.createElement(NE,{key:d,text:d,checked:n[d],onToggle:()=>l(d)})),El.default.createElement("i",{onClick:h,className:"fa fa-close"}))),El.default.createElement(fg,{events:s}))}},SO=Uu(e=>({filters:e.eventLog.filters,events:e.eventLog.view}),{close:mp,toggleFilter:NP})(PE);var En=de(be());function LE(){let e=me(F=>F.backendState.version),{mode:t,intercept:n,showhost:s,upstream_cert:l,rawtcp:h,http2:d,websocket:v,anticache:S,anticomp:b,stickyauth:k,stickycookie:R,stream_large_bodies:I,listen_host:z,listen_port:j,server:Y,ssl_insecure:ne}=me(F=>F.options);return En.createElement("footer",null,t&&(t.length!==1||t[0]!=="regular")&&En.createElement("span",{className:"label label-success"},t.join(",")),n&&En.createElement("span",{className:"label label-success"},"Intercept: ",n),ne&&En.createElement("span",{className:"label label-danger"},"ssl_insecure"),s&&En.createElement("span",{className:"label label-success"},"showhost"),!l&&En.createElement("span",{className:"label label-success"},"no-upstream-cert"),!h&&En.createElement("span",{className:"label label-success"},"no-raw-tcp"),!d&&En.createElement("span",{className:"label label-success"},"no-http2"),!v&&En.createElement("span",{className:"label label-success"},"no-websocket"),S&&En.createElement("span",{className:"label label-success"},"anticache"),b&&En.createElement("span",{className:"label label-success"},"anticomp"),k&&En.createElement("span",{className:"label label-success"},"stickyauth: ",k),R&&En.createElement("span",{className:"label label-success"},"stickycookie: ",R),I&&En.createElement("span",{className:"label label-success"},"stream: ",Xy(I)),En.createElement("div",{className:"pull-right"},En.createElement(hs,null,Y&&En.createElement("span",{className:"label label-primary",title:"HTTP Proxy Server Address"},z||"*",":",j||8080)),En.createElement("span",{className:"label label-default",title:"Mitmproxy Version"},"mitmproxy ",e)))}i(LE,"Footer");var IE=de(be());var DE=de(be());var Fp=de(be());function ME({children:e}){return Fp.createElement("div",null,Fp.createElement("div",{className:"modal-backdrop fade in"}),Fp.createElement("div",{className:"modal modal-visible",id:"optionsModal",tabIndex:-1,role:"dialog","aria-labelledby":"options"},Fp.createElement("div",{className:"modal-dialog modal-lg",role:"document"},Fp.createElement("div",{className:"modal-content"},e))))}i(ME,"ModalLayout");var Fr=de(be());var dg=de(Pm());var ro=de(be());var EO=de(ai());var C8=i(e=>{e.key!=="Escape"&&e.stopPropagation()},"stopPropagation");function bO({value:e,onChange:t,...n}){return ro.default.createElement("div",{className:"checkbox"},ro.default.createElement("label",null,ro.default.createElement("input",{type:"checkbox",checked:e,onChange:s=>t(s.target.checked),...n}),"Enable"))}i(bO,"BooleanOption");function xO({value:e,onChange:t,...n}){return ro.default.createElement("input",{type:"text",value:e||"",onChange:s=>t(s.target.value),...n})}i(xO,"StringOption");function CO(e){return i(function({onChange:n,...s}){return ro.default.createElement(e,{onChange:l=>n(l||null),...s})},"OptionalWrapper")}i(CO,"Optional");function _O({value:e,onChange:t,...n}){return ro.default.createElement("input",{type:"number",value:e,onChange:s=>t(parseInt(s.target.value)),...n})}i(_O,"NumberOption");function _8({value:e,onChange:t,choices:n,...s}){return ro.default.createElement("select",{onChange:l=>t(l.target.value),value:e,...s},n.map(l=>ro.default.createElement("option",{key:l,value:l},l)))}i(_8,"ChoicesOption");function E8({value:e,onChange:t,...n}){let s=Math.max(e.length,1),[l,h]=ro.default.useState(e.join(` `));return ro.default.createElement("textarea",{rows:s,value:l,onChange:i(v=>{let S=v.target.value;h(S),t(S.split(` -`).map(b=>b.trim()).filter(b=>b!==""))},"handleChange"),...n})}i(EU,"StringSequenceOption");var bU={bool:kO,str:_O,int:bO,"optional str":EO(_O),"optional int":EO(bO),"sequence of str":EU};function TU({choices:e,type:t,value:n,onChange:s,name:l,error:h}){let d,v={onChange:s,value:n};if(e)d=_U,v.choices=e;else if(d=bU[t],!d)throw`unknown option type ${t}`;return d!==kO&&(v.className="form-control"),ro.default.createElement("div",{className:(0,TO.default)({"has-error":h})},ro.default.createElement(d,{name:l,onKeyDown:CU,...v}))}i(TU,"PureOption");function RE({name:e}){let t=He(),n=me(d=>d.options_meta[e]?.choices),s=me(d=>d.options_meta[e]?.type),l=me(d=>{let v=d.ui.optionsEditor[e];return v?v.value:d.options_meta[e]?.value}),h=me(d=>d.ui.optionsEditor[e]?.error);return ro.default.createElement(TU,{name:e,choices:n,type:s,value:l,error:h,onChange:d=>t(gp(e,d))})}i(RE,"OptionInput");function kU({name:e}){let t=me(n=>n.options_meta[e]?.help);return Fr.default.createElement("div",{className:"help-block small"},t)}i(kU,"OptionHelp");function NU({name:e}){let t=me(n=>n.options_meta[e]?.error);return t?Fr.default.createElement("div",{className:"small text-danger"},t):null}i(NU,"OptionError");function PU({value:e,defaultVal:t}){if(e===t)return null;if(typeof t=="boolean")t=t?"true":"false";else if(Array.isArray(t)){if((0,dg.isEmpty)((0,dg.compact)(e))&&(0,dg.isEmpty)(t))return null;t="[ ]"}else t===""?t='""':t===null&&(t="null");return Fr.default.createElement("div",{className:"small"},"Default: ",Fr.default.createElement("strong",null," ",t," ")," ")}i(PU,"PureOptionDefault");var AU=Uu((e,{name:t})=>({value:e.options[t],defaultVal:e.options_meta[t]?.default}))(PU);function DE(){let e=He(),t=me(n=>Object.keys(n.options_meta),Mo).sort();return Fr.default.createElement("div",null,Fr.default.createElement("div",{className:"modal-header"},Fr.default.createElement("button",{type:"button",className:"close","data-dismiss":"modal",onClick:()=>e(u0())},Fr.default.createElement("i",{className:"fa fa-fw fa-times"})),Fr.default.createElement("div",{className:"modal-title"},Fr.default.createElement("h4",null,"Options"))),Fr.default.createElement("div",{className:"modal-body"},Fr.default.createElement("div",{className:"form-horizontal"},t.map(n=>Fr.default.createElement("div",{key:n,className:"form-group"},Fr.default.createElement("div",{className:"col-xs-6"},Fr.default.createElement("label",{htmlFor:n},n),Fr.default.createElement(kU,{name:n})),Fr.default.createElement("div",{className:"col-xs-6"},Fr.default.createElement(RE,{name:n}),Fr.default.createElement(NU,{name:n}),Fr.default.createElement(AU,{name:n})))))),Fr.default.createElement("div",{className:"modal-footer"}))}i(DE,"OptionModal");function LU(){return IE.createElement(OE,null,IE.createElement(DE,null))}i(LU,"OptionModal");var NO=[LU];function HE(){let e=me(n=>n.ui.modal.activeModal),t=NO.find(n=>n.name===e);return e&&t!==void 0?FE.createElement(t,null):FE.createElement("div",null)}i(HE,"PureModal");var BE=class extends Jn.Component{constructor(){super(...arguments);this.state={};this.render=i(()=>{let{showEventLog:n,showCommandBar:s}=this.props;return this.state.error?(console.log("ERR",this.state),Jn.default.createElement("div",{className:"container"},Jn.default.createElement("h1",null,"mitmproxy has crashed."),Jn.default.createElement("pre",null,this.state.error.stack,Jn.default.createElement("br",null),Jn.default.createElement("br",null),"Component Stack:",this.state.errorInfo?.componentStack),Jn.default.createElement("p",null,"Please lodge a bug report at"," ",Jn.default.createElement("a",{href:"https://github.com/mitmproxy/mitmproxy/issues"},"https://github.com/mitmproxy/mitmproxy/issues"),"."))):Jn.default.createElement("div",{id:"container",tabIndex:0},Jn.default.createElement(bE,null),Jn.default.createElement(xE,null),s&&Jn.default.createElement(kE,{key:"commandbar"}),n&&Jn.default.createElement(CO,{key:"eventlog"}),Jn.default.createElement(ME,null),Jn.default.createElement(HE,null))},"render")}static{i(this,"ProxyAppMain")}componentDidMount(){window.addEventListener("keydown",this.props.onKeyDown)}componentWillUnmount(){window.removeEventListener("keydown",this.props.onKeyDown)}componentDidCatch(n,s){this.setState({error:n,errorInfo:s})}},PO=Uu(e=>({showEventLog:e.eventLog.visible,showCommandBar:e.commandBar.visible}),{onKeyDown:YL})(BE);var rc={SEARCH:"s",HIGHLIGHT:"h",SHOW_EVENTLOG:"e",SHOW_COMMANDBAR:"c"};function MU(e){let[t,n]=window.location.hash.substr(1).split("?",2),s=t.substr(1).split("/");if(s[0]==="flows"&&s.length==3){let[l,h]=s.slice(1);e.dispatch(yl(l)),e.dispatch(vf(h))}n&&n.split("&").forEach(l=>{let[h,d]=l.split("=",2),v=decodeURIComponent(d);switch(h){case rc.SEARCH:e.dispatch(t0(v));break;case rc.HIGHLIGHT:e.dispatch(r0(v));break;case rc.SHOW_EVENTLOG:e.getState().eventLog.visible||e.dispatch(mp());break;case rc.SHOW_COMMANDBAR:e.getState().commandBar.visible||e.dispatch(f0());break;default:console.error(`unimplemented query arg: ${l}`)}})}i(MU,"updateStoreFromUrl");function OU(e){let t=e.getState(),n={[rc.SEARCH]:t.flows.filter,[rc.HIGHLIGHT]:t.flows.highlight,[rc.SHOW_EVENTLOG]:t.eventLog.visible,[rc.SHOW_COMMANDBAR]:t.commandBar.visible},s=Object.keys(n).filter(d=>n[d]).map(d=>`${d}=${encodeURIComponent(n[d])}`).join("&"),l;t.flows.selected.length>0?l=`/flows/${t.flows.selected[0]}/${t.ui.flow.tab}`:l="/flows",s&&(l+="?"+s);let h=window.location.pathname;h==="blank"&&(h="/"),window.location.hash.substr(1)!==l&&history.replaceState(void 0,"",`${h}#${l}`)}i(OU,"updateUrlFromStore");function zE(e){MU(e),e.subscribe(()=>OU(e))}i(zE,"initialize");var RU="reset",pg=class{static{i(this,"WebsocketBackend")}constructor(t){this.activeFetches={},this.store=t,this.connect()}connect(){this.socket=new WebSocket(location.origin.replace("http","ws")+location.pathname.replace(/\/$/,"")+"/updates"),this.socket.addEventListener("open",()=>this.onOpen()),this.socket.addEventListener("close",t=>this.onClose(t)),this.socket.addEventListener("message",t=>this.onMessage(JSON.parse(t.data))),this.socket.addEventListener("error",t=>this.onError(t))}onOpen(){this.fetchData("state"),this.fetchData("flows"),this.fetchData("events"),this.fetchData("options"),this.store.dispatch(zA())}fetchData(t){let n=[];this.activeFetches[t]=n,xt(`./${t}`).then(s=>s.json()).then(s=>{this.activeFetches[t]===n&&this.receive(t,s)})}onMessage(t){if(t.cmd===RU)return this.fetchData(t.resource);if(t.resource in this.activeFetches)this.activeFetches[t.resource].push(t);else{let n=`${t.resource}_${t.cmd}`.toUpperCase();this.store.dispatch({type:n,...t})}}receive(t,n){let s=`${t}_RECEIVE`.toUpperCase();t==="state"?this.store.dispatch({type:s,payload:n}):this.store.dispatch({type:s,cmd:"receive",resource:t,data:n});let l=this.activeFetches[t];delete this.activeFetches[t],l.forEach(h=>this.onMessage(h)),Object.keys(this.activeFetches).length===0&&this.store.dispatch(WA())}onClose(t){this.store.dispatch(UA(`Connection closed at ${new Date().toUTCString()} with error code ${t.code}.`)),console.error("websocket connection closed",t)}onError(...t){console.error("websocket connection errored",t)}};var hg=class{static{i(this,"StaticBackend")}constructor(t){this.store=t,this.onOpen()}onOpen(){this.fetchData("flows"),this.fetchData("options")}fetchData(t){xt(`./${t}`).then(n=>n.json()).then(n=>{this.receive(t,n)})}receive(t,n){let s=`${t}_RECEIVE`.toUpperCase();this.store.dispatch({type:s,cmd:"receive",resource:t,data:n})}};zE(_f);window.MITMWEB_STATIC?window.backend=new hg(_f):window.backend=new pg(_f);window.addEventListener("error",e=>{_f.dispatch(AA(`${e.message} -${e.error.stack}`))});document.addEventListener("DOMContentLoaded",()=>{let e=document.getElementById("mitmproxy");(0,AO.createRoot)(e).render(WE.createElement(CP,{store:_f},WE.createElement(PO,null)))});})(); +`).map(b=>b.trim()).filter(b=>b!==""))},"handleChange"),...n})}i(E8,"StringSequenceOption");var b8={bool:bO,str:xO,int:_O,"optional str":CO(xO),"optional int":CO(_O),"sequence of str":E8};function T8({choices:e,type:t,value:n,onChange:s,name:l,error:h}){let d,v={onChange:s,value:n};if(e)d=_8,v.choices=e;else if(d=b8[t],!d)throw`unknown option type ${t}`;return d!==bO&&(v.className="form-control"),ro.default.createElement("div",{className:(0,EO.default)({"has-error":h})},ro.default.createElement(d,{name:l,onKeyDown:C8,...v}))}i(T8,"PureOption");function OE({name:e}){let t=He(),n=me(d=>d.options_meta[e]?.choices),s=me(d=>d.options_meta[e]?.type),l=me(d=>{let v=d.ui.optionsEditor[e];return v?v.value:d.options_meta[e]?.value}),h=me(d=>d.ui.optionsEditor[e]?.error);return ro.default.createElement(T8,{name:e,choices:n,type:s,value:l,error:h,onChange:d=>t(gp(e,d))})}i(OE,"OptionInput");function k8({name:e}){let t=me(n=>n.options_meta[e]?.help);return Fr.default.createElement("div",{className:"help-block small"},t)}i(k8,"OptionHelp");function N8({name:e}){let t=me(n=>n.options_meta[e]?.error);return t?Fr.default.createElement("div",{className:"small text-danger"},t):null}i(N8,"OptionError");function A8({value:e,defaultVal:t}){if(e===t)return null;if(typeof t=="boolean")t=t?"true":"false";else if(Array.isArray(t)){if((0,dg.isEmpty)((0,dg.compact)(e))&&(0,dg.isEmpty)(t))return null;t="[ ]"}else t===""?t='""':t===null&&(t="null");return Fr.default.createElement("div",{className:"small"},"Default: ",Fr.default.createElement("strong",null," ",t," ")," ")}i(A8,"PureOptionDefault");var P8=Uu((e,{name:t})=>({value:e.options[t],defaultVal:e.options_meta[t]?.default}))(A8);function RE(){let e=He(),t=me(n=>Object.keys(n.options_meta),Mo).sort();return Fr.default.createElement("div",null,Fr.default.createElement("div",{className:"modal-header"},Fr.default.createElement("button",{type:"button",className:"close","data-dismiss":"modal",onClick:()=>e(u0())},Fr.default.createElement("i",{className:"fa fa-fw fa-times"})),Fr.default.createElement("div",{className:"modal-title"},Fr.default.createElement("h4",null,"Options"))),Fr.default.createElement("div",{className:"modal-body"},Fr.default.createElement("div",{className:"form-horizontal"},t.map(n=>Fr.default.createElement("div",{key:n,className:"form-group"},Fr.default.createElement("div",{className:"col-xs-6"},Fr.default.createElement("label",{htmlFor:n},n),Fr.default.createElement(k8,{name:n})),Fr.default.createElement("div",{className:"col-xs-6"},Fr.default.createElement(OE,{name:n}),Fr.default.createElement(N8,{name:n}),Fr.default.createElement(P8,{name:n})))))),Fr.default.createElement("div",{className:"modal-footer"}))}i(RE,"OptionModal");function L8(){return DE.createElement(ME,null,DE.createElement(RE,null))}i(L8,"OptionModal");var TO=[L8];function FE(){let e=me(n=>n.ui.modal.activeModal),t=TO.find(n=>n.name===e);return e&&t!==void 0?IE.createElement(t,null):IE.createElement("div",null)}i(FE,"PureModal");var HE=class extends Jn.Component{constructor(){super(...arguments);this.state={};this.render=i(()=>{let{showEventLog:n,showCommandBar:s}=this.props;return this.state.error?(console.log("ERR",this.state),Jn.default.createElement("div",{className:"container"},Jn.default.createElement("h1",null,"mitmproxy has crashed."),Jn.default.createElement("pre",null,this.state.error.stack,Jn.default.createElement("br",null),Jn.default.createElement("br",null),"Component Stack:",this.state.errorInfo?.componentStack),Jn.default.createElement("p",null,"Please lodge a bug report at"," ",Jn.default.createElement("a",{href:"https://github.com/mitmproxy/mitmproxy/issues"},"https://github.com/mitmproxy/mitmproxy/issues"),"."))):Jn.default.createElement("div",{id:"container",tabIndex:0},Jn.default.createElement(EE,null),Jn.default.createElement(SE,null),s&&Jn.default.createElement(TE,{key:"commandbar"}),n&&Jn.default.createElement(SO,{key:"eventlog"}),Jn.default.createElement(LE,null),Jn.default.createElement(FE,null))},"render")}static{i(this,"ProxyAppMain")}componentDidMount(){window.addEventListener("keydown",this.props.onKeyDown)}componentWillUnmount(){window.removeEventListener("keydown",this.props.onKeyDown)}componentDidCatch(n,s){this.setState({error:n,errorInfo:s})}},kO=Uu(e=>({showEventLog:e.eventLog.visible,showCommandBar:e.commandBar.visible}),{onKeyDown:KL})(HE);var rc={SEARCH:"s",HIGHLIGHT:"h",SHOW_EVENTLOG:"e",SHOW_COMMANDBAR:"c"};function M8(e){let[t,n]=window.location.hash.substr(1).split("?",2),s=t.substr(1).split("/");if(s[0]==="flows"&&s.length==3){let[l,h]=s.slice(1);e.dispatch(yl(l)),e.dispatch(vf(h))}n&&n.split("&").forEach(l=>{let[h,d]=l.split("=",2),v=decodeURIComponent(d);switch(h){case rc.SEARCH:e.dispatch(t0(v));break;case rc.HIGHLIGHT:e.dispatch(r0(v));break;case rc.SHOW_EVENTLOG:e.getState().eventLog.visible||e.dispatch(mp());break;case rc.SHOW_COMMANDBAR:e.getState().commandBar.visible||e.dispatch(f0());break;default:console.error(`unimplemented query arg: ${l}`)}})}i(M8,"updateStoreFromUrl");function O8(e){let t=e.getState(),n={[rc.SEARCH]:t.flows.filter,[rc.HIGHLIGHT]:t.flows.highlight,[rc.SHOW_EVENTLOG]:t.eventLog.visible,[rc.SHOW_COMMANDBAR]:t.commandBar.visible},s=Object.keys(n).filter(d=>n[d]).map(d=>`${d}=${encodeURIComponent(n[d])}`).join("&"),l;t.flows.selected.length>0?l=`/flows/${t.flows.selected[0]}/${t.ui.flow.tab}`:l="/flows",s&&(l+="?"+s);let h=window.location.pathname;h==="blank"&&(h="/"),window.location.hash.substr(1)!==l&&history.replaceState(void 0,"",`${h}#${l}`)}i(O8,"updateUrlFromStore");function BE(e){M8(e),e.subscribe(()=>O8(e))}i(BE,"initialize");var R8="reset",pg=class{static{i(this,"WebsocketBackend")}constructor(t){this.activeFetches={},this.store=t,this.connect()}connect(){this.socket=new WebSocket(location.origin.replace("http","ws")+location.pathname.replace(/\/$/,"")+"/updates"),this.socket.addEventListener("open",()=>this.onOpen()),this.socket.addEventListener("close",t=>this.onClose(t)),this.socket.addEventListener("message",t=>this.onMessage(JSON.parse(t.data))),this.socket.addEventListener("error",t=>this.onError(t))}onOpen(){this.fetchData("state"),this.fetchData("flows"),this.fetchData("events"),this.fetchData("options"),this.store.dispatch(HP())}fetchData(t){let n=[];this.activeFetches[t]=n,xt(`./${t}`).then(s=>s.json()).then(s=>{this.activeFetches[t]===n&&this.receive(t,s)})}onMessage(t){if(t.cmd===R8)return this.fetchData(t.resource);if(t.resource in this.activeFetches)this.activeFetches[t.resource].push(t);else{let n=`${t.resource}_${t.cmd}`.toUpperCase();this.store.dispatch({type:n,...t})}}receive(t,n){let s=`${t}_RECEIVE`.toUpperCase();t==="state"?this.store.dispatch({type:s,payload:n}):this.store.dispatch({type:s,cmd:"receive",resource:t,data:n});let l=this.activeFetches[t];delete this.activeFetches[t],l.forEach(h=>this.onMessage(h)),Object.keys(this.activeFetches).length===0&&this.store.dispatch(BP())}onClose(t){this.store.dispatch(zP(`Connection closed at ${new Date().toUTCString()} with error code ${t.code}.`)),console.error("websocket connection closed",t)}onError(...t){console.error("websocket connection errored",t)}};var hg=class{static{i(this,"StaticBackend")}constructor(t){this.store=t,this.onOpen()}onOpen(){this.fetchData("flows"),this.fetchData("options")}fetchData(t){xt(`./${t}`).then(n=>n.json()).then(n=>{this.receive(t,n)})}receive(t,n){let s=`${t}_RECEIVE`.toUpperCase();this.store.dispatch({type:s,cmd:"receive",resource:t,data:n})}};BE(_f);window.MITMWEB_STATIC?window.backend=new hg(_f):window.backend=new pg(_f);window.addEventListener("error",e=>{_f.dispatch(AP(`${e.message} +${e.error.stack}`))});document.addEventListener("DOMContentLoaded",()=>{let e=document.getElementById("mitmproxy");(0,NO.createRoot)(e).render(zE.createElement(xA,{store:_f},zE.createElement(kO,null)))});})(); /*! Bundled license information: react/cjs/react.production.min.js: diff --git a/mitmproxy/tools/web/templates/index.html b/mitmproxy/tools/web/templates/index.html index 9c1c12119..0e611b0ef 100644 --- a/mitmproxy/tools/web/templates/index.html +++ b/mitmproxy/tools/web/templates/index.html @@ -6,7 +6,11 @@ - + diff --git a/mitmproxy/version.py b/mitmproxy/version.py index 5f6f3f07a..6e8366dd3 100644 --- a/mitmproxy/version.py +++ b/mitmproxy/version.py @@ -2,7 +2,7 @@ import os import subprocess import sys -VERSION = "12.0.0.dev" +VERSION = "11.1.0" MITMPROXY = "mitmproxy " + VERSION # Serialization format version. This is displayed nowhere, it just needs to be incremented by one