@guihz/trading-vue-editor-tes 0.0.154 → 0.0.155

Sign up to get free protection for your applications and to get access to all the features.
@@ -8,7 +8,7 @@
8
8
  *
9
9
  * This source code is licensed under the MIT license found in the
10
10
  * LICENSE file in the root directory of this source tree.
11
- */var Ki;function pp(){if(Ki)return ns;Ki=1;var a=R,n=Symbol.for("react.element"),s=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,c=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function m(_,f,b){var h,T={},P=null,U=null;b!==void 0&&(P=""+b),f.key!==void 0&&(P=""+f.key),f.ref!==void 0&&(U=f.ref);for(h in f)o.call(f,h)&&!l.hasOwnProperty(h)&&(T[h]=f[h]);if(_&&_.defaultProps)for(h in f=_.defaultProps,f)T[h]===void 0&&(T[h]=f[h]);return{$$typeof:n,type:_,key:P,ref:U,props:T,_owner:c.current}}return ns.Fragment=s,ns.jsx=m,ns.jsxs=m,ns}var is={};/**
11
+ */var Ki;function pp(){if(Ki)return ns;Ki=1;var a=R,n=Symbol.for("react.element"),s=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,c=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function m(y,f,b){var h,T={},P=null,U=null;b!==void 0&&(P=""+b),f.key!==void 0&&(P=""+f.key),f.ref!==void 0&&(U=f.ref);for(h in f)o.call(f,h)&&!l.hasOwnProperty(h)&&(T[h]=f[h]);if(y&&y.defaultProps)for(h in f=y.defaultProps,f)T[h]===void 0&&(T[h]=f[h]);return{$$typeof:n,type:y,key:P,ref:U,props:T,_owner:c.current}}return ns.Fragment=s,ns.jsx=m,ns.jsxs=m,ns}var is={};/**
12
12
  * @license React
13
13
  * react-jsx-runtime.development.js
14
14
  *
@@ -16,7 +16,7 @@
16
16
  *
17
17
  * This source code is licensed under the MIT license found in the
18
18
  * LICENSE file in the root directory of this source tree.
19
- */var $i;function dp(){return $i||($i=1,process.env.NODE_ENV!=="production"&&function(){var a=R,n=Symbol.for("react.element"),s=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),m=Symbol.for("react.provider"),_=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),U=Symbol.for("react.offscreen"),F=Symbol.iterator,E="@@iterator";function j(g){if(g===null||typeof g!="object")return null;var M=F&&g[F]||g[E];return typeof M=="function"?M:null}var G=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function V(g){{for(var M=arguments.length,K=new Array(M>1?M-1:0),te=1;te<M;te++)K[te-1]=arguments[te];B("error",g,K)}}function B(g,M,K){{var te=G.ReactDebugCurrentFrame,fe=te.getStackAddendum();fe!==""&&(M+="%s",K=K.concat([fe]));var we=K.map(function(ue){return String(ue)});we.unshift("Warning: "+M),Function.prototype.apply.call(console[g],console,we)}}var k=!1,O=!1,Y=!1,S=!1,W=!1,ae;ae=Symbol.for("react.module.reference");function ce(g){return!!(typeof g=="string"||typeof g=="function"||g===o||g===l||W||g===c||g===b||g===h||S||g===U||k||O||Y||typeof g=="object"&&g!==null&&(g.$$typeof===P||g.$$typeof===T||g.$$typeof===m||g.$$typeof===_||g.$$typeof===f||g.$$typeof===ae||g.getModuleId!==void 0))}function Qe(g,M,K){var te=g.displayName;if(te)return te;var fe=M.displayName||M.name||"";return fe!==""?K+"("+fe+")":K}function Et(g){return g.displayName||"Context"}function Ue(g){if(g==null)return null;if(typeof g.tag=="number"&&V("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof g=="function")return g.displayName||g.name||null;if(typeof g=="string")return g;switch(g){case o:return"Fragment";case s:return"Portal";case l:return"Profiler";case c:return"StrictMode";case b:return"Suspense";case h:return"SuspenseList"}if(typeof g=="object")switch(g.$$typeof){case _:var M=g;return Et(M)+".Consumer";case m:var K=g;return Et(K._context)+".Provider";case f:return Qe(g,g.render,"ForwardRef");case T:var te=g.displayName||null;return te!==null?te:Ue(g.type)||"Memo";case P:{var fe=g,we=fe._payload,ue=fe._init;try{return Ue(ue(we))}catch{return null}}}return null}var Ke=Object.assign,Z=0,ge,Le,Me,dt,wt,re,he;function Pe(){}Pe.__reactDisabledLog=!0;function Nt(){{if(Z===0){ge=console.log,Le=console.info,Me=console.warn,dt=console.error,wt=console.group,re=console.groupCollapsed,he=console.groupEnd;var g={configurable:!0,enumerable:!0,value:Pe,writable:!0};Object.defineProperties(console,{info:g,log:g,warn:g,error:g,group:g,groupCollapsed:g,groupEnd:g})}Z++}}function je(){{if(Z--,Z===0){var g={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Ke({},g,{value:ge}),info:Ke({},g,{value:Le}),warn:Ke({},g,{value:Me}),error:Ke({},g,{value:dt}),group:Ke({},g,{value:wt}),groupCollapsed:Ke({},g,{value:re}),groupEnd:Ke({},g,{value:he})})}Z<0&&V("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Lt=G.ReactCurrentDispatcher,Ze;function Kt(g,M,K){{if(Ze===void 0)try{throw Error()}catch(fe){var te=fe.stack.trim().match(/\n( *(at )?)/);Ze=te&&te[1]||""}return`
19
+ */var $i;function dp(){return $i||($i=1,process.env.NODE_ENV!=="production"&&function(){var a=R,n=Symbol.for("react.element"),s=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),m=Symbol.for("react.provider"),y=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),U=Symbol.for("react.offscreen"),F=Symbol.iterator,E="@@iterator";function j(g){if(g===null||typeof g!="object")return null;var M=F&&g[F]||g[E];return typeof M=="function"?M:null}var G=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function V(g){{for(var M=arguments.length,K=new Array(M>1?M-1:0),te=1;te<M;te++)K[te-1]=arguments[te];B("error",g,K)}}function B(g,M,K){{var te=G.ReactDebugCurrentFrame,fe=te.getStackAddendum();fe!==""&&(M+="%s",K=K.concat([fe]));var we=K.map(function(ue){return String(ue)});we.unshift("Warning: "+M),Function.prototype.apply.call(console[g],console,we)}}var k=!1,O=!1,Y=!1,S=!1,W=!1,ae;ae=Symbol.for("react.module.reference");function ce(g){return!!(typeof g=="string"||typeof g=="function"||g===o||g===l||W||g===c||g===b||g===h||S||g===U||k||O||Y||typeof g=="object"&&g!==null&&(g.$$typeof===P||g.$$typeof===T||g.$$typeof===m||g.$$typeof===y||g.$$typeof===f||g.$$typeof===ae||g.getModuleId!==void 0))}function Qe(g,M,K){var te=g.displayName;if(te)return te;var fe=M.displayName||M.name||"";return fe!==""?K+"("+fe+")":K}function Et(g){return g.displayName||"Context"}function Ue(g){if(g==null)return null;if(typeof g.tag=="number"&&V("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof g=="function")return g.displayName||g.name||null;if(typeof g=="string")return g;switch(g){case o:return"Fragment";case s:return"Portal";case l:return"Profiler";case c:return"StrictMode";case b:return"Suspense";case h:return"SuspenseList"}if(typeof g=="object")switch(g.$$typeof){case y:var M=g;return Et(M)+".Consumer";case m:var K=g;return Et(K._context)+".Provider";case f:return Qe(g,g.render,"ForwardRef");case T:var te=g.displayName||null;return te!==null?te:Ue(g.type)||"Memo";case P:{var fe=g,we=fe._payload,ue=fe._init;try{return Ue(ue(we))}catch{return null}}}return null}var Ke=Object.assign,Z=0,be,Le,Me,dt,wt,re,he;function Pe(){}Pe.__reactDisabledLog=!0;function Nt(){{if(Z===0){be=console.log,Le=console.info,Me=console.warn,dt=console.error,wt=console.group,re=console.groupCollapsed,he=console.groupEnd;var g={configurable:!0,enumerable:!0,value:Pe,writable:!0};Object.defineProperties(console,{info:g,log:g,warn:g,error:g,group:g,groupCollapsed:g,groupEnd:g})}Z++}}function je(){{if(Z--,Z===0){var g={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Ke({},g,{value:be}),info:Ke({},g,{value:Le}),warn:Ke({},g,{value:Me}),error:Ke({},g,{value:dt}),group:Ke({},g,{value:wt}),groupCollapsed:Ke({},g,{value:re}),groupEnd:Ke({},g,{value:he})})}Z<0&&V("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Lt=G.ReactCurrentDispatcher,Ze;function Kt(g,M,K){{if(Ze===void 0)try{throw Error()}catch(fe){var te=fe.stack.trim().match(/\n( *(at )?)/);Ze=te&&te[1]||""}return`
20
20
  `+Ze+g}}var Gt=!1,Pr;{var Or=typeof WeakMap=="function"?WeakMap:Map;Pr=new Or}function wr(g,M){if(!g||Gt)return"";{var K=Pr.get(g);if(K!==void 0)return K}var te;Gt=!0;var fe=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var we;we=Lt.current,Lt.current=null,Nt();try{if(M){var ue=function(){throw Error()};if(Object.defineProperty(ue.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ue,[])}catch(at){te=at}Reflect.construct(g,[],ue)}else{try{ue.call()}catch(at){te=at}g.call(ue.prototype)}}else{try{throw Error()}catch(at){te=at}g()}}catch(at){if(at&&te&&typeof at.stack=="string"){for(var de=at.stack.split(`
21
21
  `),He=te.stack.split(`
22
22
  `),Ce=de.length-1,Ee=He.length-1;Ce>=1&&Ee>=0&&de[Ce]!==He[Ee];)Ee--;for(;Ce>=1&&Ee>=0;Ce--,Ee--)if(de[Ce]!==He[Ee]){if(Ce!==1||Ee!==1)do if(Ce--,Ee--,Ee<0||de[Ce]!==He[Ee]){var st=`
@@ -26,8 +26,8 @@ Check the render method of \``+g+"`."}return""}}function kn(g){{if(g!==void 0){v
26
26
 
27
27
  Check your code at `+M+":"+K+"."}return""}}var la={};function ca(g){{var M=oa();if(!M){var K=typeof g=="string"?g:g.displayName||g.name;K&&(M=`
28
28
 
29
- Check the top-level render call using <`+K+">.")}return M}}function pa(g,M){{if(!g._store||g._store.validated||g.key!=null)return;g._store.validated=!0;var K=ca(M);if(la[K])return;la[K]=!0;var te="";g&&g._owner&&g._owner!==vs.current&&(te=" It was passed a child from "+Ue(g._owner.type)+"."),Vt(g),V('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',K,te),Vt(null)}}function da(g,M){{if(typeof g!="object")return;if(Xt(g))for(var K=0;K<g.length;K++){var te=g[K];Ts(te)&&pa(te,M)}else if(Ts(g))g._store&&(g._store.validated=!0);else if(g){var fe=j(g);if(typeof fe=="function"&&fe!==g.entries)for(var we=fe.call(g),ue;!(ue=we.next()).done;)Ts(ue.value)&&pa(ue.value,M)}}}function In(g){{var M=g.type;if(M==null||typeof M=="string")return;var K;if(typeof M=="function")K=M.propTypes;else if(typeof M=="object"&&(M.$$typeof===f||M.$$typeof===T))K=M.propTypes;else return;if(K){var te=Ue(M);vr(K,g.props,"prop",te,g)}else if(M.PropTypes!==void 0&&!$r){$r=!0;var fe=Ue(M);V("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",fe||"Unknown")}typeof M.getDefaultProps=="function"&&!M.getDefaultProps.isReactClassApproved&&V("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Ds(g){{for(var M=Object.keys(g.props),K=0;K<M.length;K++){var te=M[K];if(te!=="children"&&te!=="key"){Vt(g),V("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",te),Vt(null);break}}g.ref!==null&&(Vt(g),V("Invalid attribute `ref` supplied to `React.Fragment`."),Vt(null))}}function ma(g,M,K,te,fe,we){{var ue=ce(g);if(!ue){var de="";(g===void 0||typeof g=="object"&&g!==null&&Object.keys(g).length===0)&&(de+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var He=kn(fe);He?de+=He:de+=oa();var Ce;g===null?Ce="null":Xt(g)?Ce="array":g!==void 0&&g.$$typeof===n?(Ce="<"+(Ue(g.type)||"Unknown")+" />",de=" Did you accidentally export a JSX literal instead of a component?"):Ce=typeof g,V("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Ce,de)}var Ee=Dn(g,M,K,fe,we);if(Ee==null)return Ee;if(ue){var st=M.children;if(st!==void 0)if(te)if(Xt(st)){for(var Pt=0;Pt<st.length;Pt++)da(st[Pt],g);Object.freeze&&Object.freeze(st)}else V("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else da(st,g)}return g===o?Ds(Ee):In(Ee),Ee}}function ks(g,M,K){return ma(g,M,K,!0)}function An(g,M,K){return ma(g,M,K,!1)}var qn=An,Cn=ks;is.Fragment=o,is.jsx=qn,is.jsxs=Cn}()),is}process.env.NODE_ENV==="production"?en.exports=pp():en.exports=dp();var L=en.exports;function mp(a,n,s){return n in a?Object.defineProperty(a,n,{value:s,enumerable:!0,configurable:!0,writable:!0}):a[n]=s,a}function ji(a,n){var s=Object.keys(a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(a);n&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(a,c).enumerable})),s.push.apply(s,o)}return s}function Hi(a){for(var n=1;n<arguments.length;n++){var s=arguments[n]!=null?arguments[n]:{};n%2?ji(Object(s),!0).forEach(function(o){mp(a,o,s[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(s)):ji(Object(s)).forEach(function(o){Object.defineProperty(a,o,Object.getOwnPropertyDescriptor(s,o))})}return a}function up(a,n){if(a==null)return{};var s={},o=Object.keys(a),c,l;for(l=0;l<o.length;l++)c=o[l],!(n.indexOf(c)>=0)&&(s[c]=a[c]);return s}function yp(a,n){if(a==null)return{};var s=up(a,n),o,c;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(a);for(c=0;c<l.length;c++)o=l[c],!(n.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(a,o)&&(s[o]=a[o])}return s}function _p(a,n){return fp(a)||gp(a,n)||bp(a,n)||xp()}function fp(a){if(Array.isArray(a))return a}function gp(a,n){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(a)))){var s=[],o=!0,c=!1,l=void 0;try{for(var m=a[Symbol.iterator](),_;!(o=(_=m.next()).done)&&(s.push(_.value),!(n&&s.length===n));o=!0);}catch(f){c=!0,l=f}finally{try{!o&&m.return!=null&&m.return()}finally{if(c)throw l}}return s}}function bp(a,n){if(a){if(typeof a=="string")return Wi(a,n);var s=Object.prototype.toString.call(a).slice(8,-1);if(s==="Object"&&a.constructor&&(s=a.constructor.name),s==="Map"||s==="Set")return Array.from(a);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return Wi(a,n)}}function Wi(a,n){(n==null||n>a.length)&&(n=a.length);for(var s=0,o=new Array(n);s<n;s++)o[s]=a[s];return o}function xp(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
30
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hp(a,n,s){return n in a?Object.defineProperty(a,n,{value:s,enumerable:!0,configurable:!0,writable:!0}):a[n]=s,a}function Gi(a,n){var s=Object.keys(a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(a);n&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(a,c).enumerable})),s.push.apply(s,o)}return s}function Xi(a){for(var n=1;n<arguments.length;n++){var s=arguments[n]!=null?arguments[n]:{};n%2?Gi(Object(s),!0).forEach(function(o){hp(a,o,s[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(s)):Gi(Object(s)).forEach(function(o){Object.defineProperty(a,o,Object.getOwnPropertyDescriptor(s,o))})}return a}function wp(){for(var a=arguments.length,n=new Array(a),s=0;s<a;s++)n[s]=arguments[s];return function(o){return n.reduceRight(function(c,l){return l(c)},o)}}function os(a){return function n(){for(var s=this,o=arguments.length,c=new Array(o),l=0;l<o;l++)c[l]=arguments[l];return c.length>=a.length?a.apply(this,c):function(){for(var m=arguments.length,_=new Array(m),f=0;f<m;f++)_[f]=arguments[f];return n.apply(s,[].concat(c,_))}}}function Ks(a){return{}.toString.call(a).includes("Object")}function vp(a){return!Object.keys(a).length}function ls(a){return typeof a=="function"}function Tp(a,n){return Object.prototype.hasOwnProperty.call(a,n)}function Dp(a,n){return Ks(n)||nr("changeType"),Object.keys(n).some(function(s){return!Tp(a,s)})&&nr("changeField"),n}function kp(a){ls(a)||nr("selectorType")}function Ip(a){ls(a)||Ks(a)||nr("handlerType"),Ks(a)&&Object.values(a).some(function(n){return!ls(n)})&&nr("handlersType")}function Ap(a){a||nr("initialIsRequired"),Ks(a)||nr("initialType"),vp(a)&&nr("initialContent")}function qp(a,n){throw new Error(a[n]||a.default)}var Cp={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},nr=os(qp)(Cp),$s={changes:Dp,selector:kp,handler:Ip,initial:Ap};function zp(a){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};$s.initial(a),$s.handler(n);var s={current:a},o=os(Np)(s,n),c=os(Ep)(s),l=os($s.changes)(a),m=os(Sp)(s);function _(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(h){return h};return $s.selector(b),b(s.current)}function f(b){wp(o,c,l,m)(b)}return[_,f]}function Sp(a,n){return ls(n)?n(a.current):n}function Ep(a,n){return a.current=Xi(Xi({},a.current),n),n}function Np(a,n,s){return ls(n)?n(a.current):Object.keys(s).forEach(function(o){var c;return(c=n[o])===null||c===void 0?void 0:c.call(n,a.current[o])}),s}var Lp={create:zp},Mp={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.43.0/min/vs"}};function Pp(a){return function n(){for(var s=this,o=arguments.length,c=new Array(o),l=0;l<o;l++)c[l]=arguments[l];return c.length>=a.length?a.apply(this,c):function(){for(var m=arguments.length,_=new Array(m),f=0;f<m;f++)_[f]=arguments[f];return n.apply(s,[].concat(c,_))}}}function Op(a){return{}.toString.call(a).includes("Object")}function Rp(a){return a||Yi("configIsRequired"),Op(a)||Yi("configType"),a.urls?(Fp(),{paths:{vs:a.urls.monacoBase}}):a}function Fp(){console.warn(Vi.deprecation)}function Bp(a,n){throw new Error(a[n]||a.default)}var Vi={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
29
+ Check the top-level render call using <`+K+">.")}return M}}function pa(g,M){{if(!g._store||g._store.validated||g.key!=null)return;g._store.validated=!0;var K=ca(M);if(la[K])return;la[K]=!0;var te="";g&&g._owner&&g._owner!==vs.current&&(te=" It was passed a child from "+Ue(g._owner.type)+"."),Vt(g),V('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',K,te),Vt(null)}}function da(g,M){{if(typeof g!="object")return;if(Xt(g))for(var K=0;K<g.length;K++){var te=g[K];Ts(te)&&pa(te,M)}else if(Ts(g))g._store&&(g._store.validated=!0);else if(g){var fe=j(g);if(typeof fe=="function"&&fe!==g.entries)for(var we=fe.call(g),ue;!(ue=we.next()).done;)Ts(ue.value)&&pa(ue.value,M)}}}function In(g){{var M=g.type;if(M==null||typeof M=="string")return;var K;if(typeof M=="function")K=M.propTypes;else if(typeof M=="object"&&(M.$$typeof===f||M.$$typeof===T))K=M.propTypes;else return;if(K){var te=Ue(M);vr(K,g.props,"prop",te,g)}else if(M.PropTypes!==void 0&&!$r){$r=!0;var fe=Ue(M);V("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",fe||"Unknown")}typeof M.getDefaultProps=="function"&&!M.getDefaultProps.isReactClassApproved&&V("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Ds(g){{for(var M=Object.keys(g.props),K=0;K<M.length;K++){var te=M[K];if(te!=="children"&&te!=="key"){Vt(g),V("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",te),Vt(null);break}}g.ref!==null&&(Vt(g),V("Invalid attribute `ref` supplied to `React.Fragment`."),Vt(null))}}function ma(g,M,K,te,fe,we){{var ue=ce(g);if(!ue){var de="";(g===void 0||typeof g=="object"&&g!==null&&Object.keys(g).length===0)&&(de+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var He=kn(fe);He?de+=He:de+=oa();var Ce;g===null?Ce="null":Xt(g)?Ce="array":g!==void 0&&g.$$typeof===n?(Ce="<"+(Ue(g.type)||"Unknown")+" />",de=" Did you accidentally export a JSX literal instead of a component?"):Ce=typeof g,V("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Ce,de)}var Ee=Dn(g,M,K,fe,we);if(Ee==null)return Ee;if(ue){var st=M.children;if(st!==void 0)if(te)if(Xt(st)){for(var Pt=0;Pt<st.length;Pt++)da(st[Pt],g);Object.freeze&&Object.freeze(st)}else V("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else da(st,g)}return g===o?Ds(Ee):In(Ee),Ee}}function ks(g,M,K){return ma(g,M,K,!0)}function An(g,M,K){return ma(g,M,K,!1)}var qn=An,Cn=ks;is.Fragment=o,is.jsx=qn,is.jsxs=Cn}()),is}process.env.NODE_ENV==="production"?en.exports=pp():en.exports=dp();var L=en.exports;function mp(a,n,s){return n in a?Object.defineProperty(a,n,{value:s,enumerable:!0,configurable:!0,writable:!0}):a[n]=s,a}function ji(a,n){var s=Object.keys(a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(a);n&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(a,c).enumerable})),s.push.apply(s,o)}return s}function Hi(a){for(var n=1;n<arguments.length;n++){var s=arguments[n]!=null?arguments[n]:{};n%2?ji(Object(s),!0).forEach(function(o){mp(a,o,s[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(s)):ji(Object(s)).forEach(function(o){Object.defineProperty(a,o,Object.getOwnPropertyDescriptor(s,o))})}return a}function up(a,n){if(a==null)return{};var s={},o=Object.keys(a),c,l;for(l=0;l<o.length;l++)c=o[l],!(n.indexOf(c)>=0)&&(s[c]=a[c]);return s}function yp(a,n){if(a==null)return{};var s=up(a,n),o,c;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(a);for(c=0;c<l.length;c++)o=l[c],!(n.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(a,o)&&(s[o]=a[o])}return s}function _p(a,n){return fp(a)||gp(a,n)||bp(a,n)||xp()}function fp(a){if(Array.isArray(a))return a}function gp(a,n){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(a)))){var s=[],o=!0,c=!1,l=void 0;try{for(var m=a[Symbol.iterator](),y;!(o=(y=m.next()).done)&&(s.push(y.value),!(n&&s.length===n));o=!0);}catch(f){c=!0,l=f}finally{try{!o&&m.return!=null&&m.return()}finally{if(c)throw l}}return s}}function bp(a,n){if(a){if(typeof a=="string")return Wi(a,n);var s=Object.prototype.toString.call(a).slice(8,-1);if(s==="Object"&&a.constructor&&(s=a.constructor.name),s==="Map"||s==="Set")return Array.from(a);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return Wi(a,n)}}function Wi(a,n){(n==null||n>a.length)&&(n=a.length);for(var s=0,o=new Array(n);s<n;s++)o[s]=a[s];return o}function xp(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
30
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hp(a,n,s){return n in a?Object.defineProperty(a,n,{value:s,enumerable:!0,configurable:!0,writable:!0}):a[n]=s,a}function Gi(a,n){var s=Object.keys(a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(a);n&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(a,c).enumerable})),s.push.apply(s,o)}return s}function Xi(a){for(var n=1;n<arguments.length;n++){var s=arguments[n]!=null?arguments[n]:{};n%2?Gi(Object(s),!0).forEach(function(o){hp(a,o,s[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(s)):Gi(Object(s)).forEach(function(o){Object.defineProperty(a,o,Object.getOwnPropertyDescriptor(s,o))})}return a}function wp(){for(var a=arguments.length,n=new Array(a),s=0;s<a;s++)n[s]=arguments[s];return function(o){return n.reduceRight(function(c,l){return l(c)},o)}}function os(a){return function n(){for(var s=this,o=arguments.length,c=new Array(o),l=0;l<o;l++)c[l]=arguments[l];return c.length>=a.length?a.apply(this,c):function(){for(var m=arguments.length,y=new Array(m),f=0;f<m;f++)y[f]=arguments[f];return n.apply(s,[].concat(c,y))}}}function Ks(a){return{}.toString.call(a).includes("Object")}function vp(a){return!Object.keys(a).length}function ls(a){return typeof a=="function"}function Tp(a,n){return Object.prototype.hasOwnProperty.call(a,n)}function Dp(a,n){return Ks(n)||nr("changeType"),Object.keys(n).some(function(s){return!Tp(a,s)})&&nr("changeField"),n}function kp(a){ls(a)||nr("selectorType")}function Ip(a){ls(a)||Ks(a)||nr("handlerType"),Ks(a)&&Object.values(a).some(function(n){return!ls(n)})&&nr("handlersType")}function Ap(a){a||nr("initialIsRequired"),Ks(a)||nr("initialType"),vp(a)&&nr("initialContent")}function qp(a,n){throw new Error(a[n]||a.default)}var Cp={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},nr=os(qp)(Cp),$s={changes:Dp,selector:kp,handler:Ip,initial:Ap};function zp(a){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};$s.initial(a),$s.handler(n);var s={current:a},o=os(Np)(s,n),c=os(Ep)(s),l=os($s.changes)(a),m=os(Sp)(s);function y(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(h){return h};return $s.selector(b),b(s.current)}function f(b){wp(o,c,l,m)(b)}return[y,f]}function Sp(a,n){return ls(n)?n(a.current):n}function Ep(a,n){return a.current=Xi(Xi({},a.current),n),n}function Np(a,n,s){return ls(n)?n(a.current):Object.keys(s).forEach(function(o){var c;return(c=n[o])===null||c===void 0?void 0:c.call(n,a.current[o])}),s}var Lp={create:zp},Mp={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.43.0/min/vs"}};function Pp(a){return function n(){for(var s=this,o=arguments.length,c=new Array(o),l=0;l<o;l++)c[l]=arguments[l];return c.length>=a.length?a.apply(this,c):function(){for(var m=arguments.length,y=new Array(m),f=0;f<m;f++)y[f]=arguments[f];return n.apply(s,[].concat(c,y))}}}function Op(a){return{}.toString.call(a).includes("Object")}function Rp(a){return a||Yi("configIsRequired"),Op(a)||Yi("configType"),a.urls?(Fp(),{paths:{vs:a.urls.monacoBase}}):a}function Fp(){console.warn(Vi.deprecation)}function Bp(a,n){throw new Error(a[n]||a.default)}var Vi={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
31
31
  You are using deprecated way of configuration.
32
32
 
33
33
  Instead of using
@@ -36,7 +36,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
36
36
  monaco.config({ paths: { vs: '...' } })
37
37
 
38
38
  For more please check the link https://github.com/suren-atoyan/monaco-loader#config
39
- `},Yi=Pp(Bp)(Vi),Up={config:Rp},Kp=function(){for(var n=arguments.length,s=new Array(n),o=0;o<n;o++)s[o]=arguments[o];return function(c){return s.reduceRight(function(l,m){return m(l)},c)}};function Qi(a,n){return Object.keys(n).forEach(function(s){n[s]instanceof Object&&a[s]&&Object.assign(n[s],Qi(a[s],n[s]))}),Hi(Hi({},a),n)}var $p={type:"cancelation",msg:"operation is manually canceled"};function tn(a){var n=!1,s=new Promise(function(o,c){a.then(function(l){return n?c($p):o(l)}),a.catch(c)});return s.cancel=function(){return n=!0},s}var jp=Lp.create({config:Mp,isInitialized:!1,resolve:null,reject:null,monaco:null}),Zi=_p(jp,2),cs=Zi[0],js=Zi[1];function Hp(a){var n=Up.config(a),s=n.monaco,o=yp(n,["monaco"]);js(function(c){return{config:Qi(c.config,o),monaco:s}})}function Wp(){var a=cs(function(n){var s=n.monaco,o=n.isInitialized,c=n.resolve;return{monaco:s,isInitialized:o,resolve:c}});if(!a.isInitialized){if(js({isInitialized:!0}),a.monaco)return a.resolve(a.monaco),tn(rn);if(window.monaco&&window.monaco.editor)return Ji(window.monaco),a.resolve(window.monaco),tn(rn);Kp(Gp,Vp)(Yp)}return tn(rn)}function Gp(a){return document.body.appendChild(a)}function Xp(a){var n=document.createElement("script");return a&&(n.src=a),n}function Vp(a){var n=cs(function(o){var c=o.config,l=o.reject;return{config:c,reject:l}}),s=Xp("".concat(n.config.paths.vs,"/loader.js"));return s.onload=function(){return a()},s.onerror=n.reject,s}function Yp(){var a=cs(function(s){var o=s.config,c=s.resolve,l=s.reject;return{config:o,resolve:c,reject:l}}),n=window.require;n.config(a.config),n(["vs/editor/editor.main"],function(s){Ji(s),a.resolve(s)},function(s){a.reject(s)})}function Ji(a){cs().monaco||js({monaco:a})}function Qp(){return cs(function(a){var n=a.monaco;return n})}var rn=new Promise(function(a,n){return js({resolve:a,reject:n})}),sn={config:Hp,init:Wp,__getMonacoInstance:Qp},Zp={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},an=Zp,Jp={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},ed=Jp;function td({children:a}){return R.createElement("div",{style:ed.container},a)}var rd=td,sd=rd;function ad({width:a,height:n,isEditorReady:s,loading:o,_ref:c,className:l,wrapperProps:m}){return R.createElement("section",{style:{...an.wrapper,width:a,height:n},...m},!s&&R.createElement(sd,null,o),R.createElement("div",{ref:c,style:{...an.fullWidth,...!s&&an.hide},className:l}))}var nd=ad,eo=R.memo(nd);function id(a){R.useEffect(a,[])}var to=id;function od(a,n,s=!0){let o=R.useRef(!0);R.useEffect(o.current||!s?()=>{o.current=!1}:a,n)}var ct=od;function ps(){}function Nr(a,n,s,o){return ld(a,o)||cd(a,n,s,o)}function ld(a,n){return a.editor.getModel(ro(a,n))}function cd(a,n,s,o){return a.editor.createModel(n,s,o?ro(a,o):void 0)}function ro(a,n){return a.Uri.parse(n)}function pd({original:a,modified:n,language:s,originalLanguage:o,modifiedLanguage:c,originalModelPath:l,modifiedModelPath:m,keepCurrentOriginalModel:_=!1,keepCurrentModifiedModel:f=!1,theme:b="light",loading:h="Loading...",options:T={},height:P="100%",width:U="100%",className:F,wrapperProps:E={},beforeMount:j=ps,onMount:G=ps}){let[V,B]=R.useState(!1),[k,O]=R.useState(!0),Y=R.useRef(null),S=R.useRef(null),W=R.useRef(null),ae=R.useRef(G),ce=R.useRef(j),Qe=R.useRef(!1);to(()=>{let Z=sn.init();return Z.then(ge=>(S.current=ge)&&O(!1)).catch(ge=>(ge==null?void 0:ge.type)!=="cancelation"&&console.error("Monaco initialization: error:",ge)),()=>Y.current?Ke():Z.cancel()}),ct(()=>{if(Y.current&&S.current){let Z=Y.current.getOriginalEditor(),ge=Nr(S.current,a||"",o||s||"text",l||"");ge!==Z.getModel()&&Z.setModel(ge)}},[l],V),ct(()=>{if(Y.current&&S.current){let Z=Y.current.getModifiedEditor(),ge=Nr(S.current,n||"",c||s||"text",m||"");ge!==Z.getModel()&&Z.setModel(ge)}},[m],V),ct(()=>{let Z=Y.current.getModifiedEditor();Z.getOption(S.current.editor.EditorOption.readOnly)?Z.setValue(n||""):n!==Z.getValue()&&(Z.executeEdits("",[{range:Z.getModel().getFullModelRange(),text:n||"",forceMoveMarkers:!0}]),Z.pushUndoStop())},[n],V),ct(()=>{var Z,ge;(ge=(Z=Y.current)==null?void 0:Z.getModel())==null||ge.original.setValue(a||"")},[a],V),ct(()=>{let{original:Z,modified:ge}=Y.current.getModel();S.current.editor.setModelLanguage(Z,o||s||"text"),S.current.editor.setModelLanguage(ge,c||s||"text")},[s,o,c],V),ct(()=>{var Z;(Z=S.current)==null||Z.editor.setTheme(b)},[b],V),ct(()=>{var Z;(Z=Y.current)==null||Z.updateOptions(T)},[T],V);let Et=R.useCallback(()=>{var Le;if(!S.current)return;ce.current(S.current);let Z=Nr(S.current,a||"",o||s||"text",l||""),ge=Nr(S.current,n||"",c||s||"text",m||"");(Le=Y.current)==null||Le.setModel({original:Z,modified:ge})},[s,n,c,a,o,l,m]),Ue=R.useCallback(()=>{var Z;!Qe.current&&W.current&&(Y.current=S.current.editor.createDiffEditor(W.current,{automaticLayout:!0,...T}),Et(),(Z=S.current)==null||Z.editor.setTheme(b),B(!0),Qe.current=!0)},[T,b,Et]);R.useEffect(()=>{V&&ae.current(Y.current,S.current)},[V]),R.useEffect(()=>{!k&&!V&&Ue()},[k,V,Ue]);function Ke(){var ge,Le,Me,dt;let Z=(ge=Y.current)==null?void 0:ge.getModel();_||((Le=Z==null?void 0:Z.original)==null||Le.dispose()),f||((Me=Z==null?void 0:Z.modified)==null||Me.dispose()),(dt=Y.current)==null||dt.dispose()}return R.createElement(eo,{width:U,height:P,isEditorReady:V,loading:h,_ref:W,className:F,wrapperProps:E})}var dd=pd,md=R.memo(dd);function ud(a){let n=R.useRef();return R.useEffect(()=>{n.current=a},[a]),n.current}var yd=ud,Hs=new Map;function _d({defaultValue:a,defaultLanguage:n,defaultPath:s,value:o,language:c,path:l,theme:m="light",line:_,loading:f="Loading...",options:b={},overrideServices:h={},saveViewState:T=!0,keepCurrentModel:P=!1,width:U="100%",height:F="100%",className:E,wrapperProps:j={},beforeMount:G=ps,onMount:V=ps,onChange:B,onValidate:k=ps}){let[O,Y]=R.useState(!1),[S,W]=R.useState(!0),ae=R.useRef(null),ce=R.useRef(null),Qe=R.useRef(null),Et=R.useRef(V),Ue=R.useRef(G),Ke=R.useRef(),Z=R.useRef(o),ge=yd(l),Le=R.useRef(!1),Me=R.useRef(!1);to(()=>{let re=sn.init();return re.then(he=>(ae.current=he)&&W(!1)).catch(he=>(he==null?void 0:he.type)!=="cancelation"&&console.error("Monaco initialization: error:",he)),()=>ce.current?wt():re.cancel()}),ct(()=>{var he,Pe,Nt,je;let re=Nr(ae.current,a||o||"",n||c||"",l||s||"");re!==((he=ce.current)==null?void 0:he.getModel())&&(T&&Hs.set(ge,(Pe=ce.current)==null?void 0:Pe.saveViewState()),(Nt=ce.current)==null||Nt.setModel(re),T&&((je=ce.current)==null||je.restoreViewState(Hs.get(l))))},[l],O),ct(()=>{var re;(re=ce.current)==null||re.updateOptions(b)},[b],O),ct(()=>{!ce.current||o===void 0||(ce.current.getOption(ae.current.editor.EditorOption.readOnly)?ce.current.setValue(o):o!==ce.current.getValue()&&(Me.current=!0,ce.current.executeEdits("",[{range:ce.current.getModel().getFullModelRange(),text:o,forceMoveMarkers:!0}]),ce.current.pushUndoStop(),Me.current=!1))},[o],O),ct(()=>{var he,Pe;let re=(he=ce.current)==null?void 0:he.getModel();re&&c&&((Pe=ae.current)==null||Pe.editor.setModelLanguage(re,c))},[c],O),ct(()=>{var re;_!==void 0&&((re=ce.current)==null||re.revealLine(_))},[_],O),ct(()=>{var re;(re=ae.current)==null||re.editor.setTheme(m)},[m],O);let dt=R.useCallback(()=>{var re;if(!(!Qe.current||!ae.current)&&!Le.current){Ue.current(ae.current);let he=l||s,Pe=Nr(ae.current,o||a||"",n||c||"",he||"");ce.current=(re=ae.current)==null?void 0:re.editor.create(Qe.current,{model:Pe,automaticLayout:!0,...b},h),T&&ce.current.restoreViewState(Hs.get(he)),ae.current.editor.setTheme(m),_!==void 0&&ce.current.revealLine(_),Y(!0),Le.current=!0}},[a,n,s,o,c,l,b,h,T,m,_]);R.useEffect(()=>{O&&Et.current(ce.current,ae.current)},[O]),R.useEffect(()=>{!S&&!O&&dt()},[S,O,dt]),Z.current=o,R.useEffect(()=>{var re,he;O&&B&&((re=Ke.current)==null||re.dispose(),Ke.current=(he=ce.current)==null?void 0:he.onDidChangeModelContent(Pe=>{Me.current||B(ce.current.getValue(),Pe)}))},[O,B]),R.useEffect(()=>{if(O){let re=ae.current.editor.onDidChangeMarkers(he=>{var Nt;let Pe=(Nt=ce.current.getModel())==null?void 0:Nt.uri;if(Pe&&he.find(je=>je.path===Pe.path)){let je=ae.current.editor.getModelMarkers({resource:Pe});k==null||k(je)}});return()=>{re==null||re.dispose()}}return()=>{}},[O,k]);function wt(){var re,he;(re=Ke.current)==null||re.dispose(),P?T&&Hs.set(l,ce.current.saveViewState()):(he=ce.current.getModel())==null||he.dispose(),ce.current.dispose()}return R.createElement(eo,{width:U,height:F,isEditorReady:O,loading:f,_ref:Qe,className:E,wrapperProps:j})}var fd=_d,gd=R.memo(fd);const so={keywords:[{name:"or",desc:["逻辑 OR。适用于布尔表达式。"],syntax:["expr1 or expr2"],returns:["布尔值,或一系列布尔值。"]},{name:"and",desc:["逻辑 AND。适用于布尔表达式。"],syntax:["expr1 and expr2"],returns:["布尔值,或一系列布尔值。"]},{name:"not",desc:["逻辑求反(NOT)。 适用于布尔表达式。"],syntax:["not expr1"],returns:["布尔值,或一系列布尔值。"]},{name:"if",desc:["If语句定义了在满足表达式条件时必须执行的语句块。","要访问和使用if语句,应在代码的第一行中指定>= 2的Pine Script®语言版本,例如://@version=5","Pine Script®语言的第四版允许您使用“else if”语法。","通用编码来自:"],syntax:[`var_declarationX = if condition
39
+ `},Yi=Pp(Bp)(Vi),Up={config:Rp},Kp=function(){for(var n=arguments.length,s=new Array(n),o=0;o<n;o++)s[o]=arguments[o];return function(c){return s.reduceRight(function(l,m){return m(l)},c)}};function Qi(a,n){return Object.keys(n).forEach(function(s){n[s]instanceof Object&&a[s]&&Object.assign(n[s],Qi(a[s],n[s]))}),Hi(Hi({},a),n)}var $p={type:"cancelation",msg:"operation is manually canceled"};function tn(a){var n=!1,s=new Promise(function(o,c){a.then(function(l){return n?c($p):o(l)}),a.catch(c)});return s.cancel=function(){return n=!0},s}var jp=Lp.create({config:Mp,isInitialized:!1,resolve:null,reject:null,monaco:null}),Zi=_p(jp,2),cs=Zi[0],js=Zi[1];function Hp(a){var n=Up.config(a),s=n.monaco,o=yp(n,["monaco"]);js(function(c){return{config:Qi(c.config,o),monaco:s}})}function Wp(){var a=cs(function(n){var s=n.monaco,o=n.isInitialized,c=n.resolve;return{monaco:s,isInitialized:o,resolve:c}});if(!a.isInitialized){if(js({isInitialized:!0}),a.monaco)return a.resolve(a.monaco),tn(rn);if(window.monaco&&window.monaco.editor)return Ji(window.monaco),a.resolve(window.monaco),tn(rn);Kp(Gp,Vp)(Yp)}return tn(rn)}function Gp(a){return document.body.appendChild(a)}function Xp(a){var n=document.createElement("script");return a&&(n.src=a),n}function Vp(a){var n=cs(function(o){var c=o.config,l=o.reject;return{config:c,reject:l}}),s=Xp("".concat(n.config.paths.vs,"/loader.js"));return s.onload=function(){return a()},s.onerror=n.reject,s}function Yp(){var a=cs(function(s){var o=s.config,c=s.resolve,l=s.reject;return{config:o,resolve:c,reject:l}}),n=window.require;n.config(a.config),n(["vs/editor/editor.main"],function(s){Ji(s),a.resolve(s)},function(s){a.reject(s)})}function Ji(a){cs().monaco||js({monaco:a})}function Qp(){return cs(function(a){var n=a.monaco;return n})}var rn=new Promise(function(a,n){return js({resolve:a,reject:n})}),sn={config:Hp,init:Wp,__getMonacoInstance:Qp},Zp={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},an=Zp,Jp={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},ed=Jp;function td({children:a}){return R.createElement("div",{style:ed.container},a)}var rd=td,sd=rd;function ad({width:a,height:n,isEditorReady:s,loading:o,_ref:c,className:l,wrapperProps:m}){return R.createElement("section",{style:{...an.wrapper,width:a,height:n},...m},!s&&R.createElement(sd,null,o),R.createElement("div",{ref:c,style:{...an.fullWidth,...!s&&an.hide},className:l}))}var nd=ad,eo=R.memo(nd);function id(a){R.useEffect(a,[])}var to=id;function od(a,n,s=!0){let o=R.useRef(!0);R.useEffect(o.current||!s?()=>{o.current=!1}:a,n)}var ct=od;function ps(){}function Nr(a,n,s,o){return ld(a,o)||cd(a,n,s,o)}function ld(a,n){return a.editor.getModel(ro(a,n))}function cd(a,n,s,o){return a.editor.createModel(n,s,o?ro(a,o):void 0)}function ro(a,n){return a.Uri.parse(n)}function pd({original:a,modified:n,language:s,originalLanguage:o,modifiedLanguage:c,originalModelPath:l,modifiedModelPath:m,keepCurrentOriginalModel:y=!1,keepCurrentModifiedModel:f=!1,theme:b="light",loading:h="Loading...",options:T={},height:P="100%",width:U="100%",className:F,wrapperProps:E={},beforeMount:j=ps,onMount:G=ps}){let[V,B]=R.useState(!1),[k,O]=R.useState(!0),Y=R.useRef(null),S=R.useRef(null),W=R.useRef(null),ae=R.useRef(G),ce=R.useRef(j),Qe=R.useRef(!1);to(()=>{let Z=sn.init();return Z.then(be=>(S.current=be)&&O(!1)).catch(be=>(be==null?void 0:be.type)!=="cancelation"&&console.error("Monaco initialization: error:",be)),()=>Y.current?Ke():Z.cancel()}),ct(()=>{if(Y.current&&S.current){let Z=Y.current.getOriginalEditor(),be=Nr(S.current,a||"",o||s||"text",l||"");be!==Z.getModel()&&Z.setModel(be)}},[l],V),ct(()=>{if(Y.current&&S.current){let Z=Y.current.getModifiedEditor(),be=Nr(S.current,n||"",c||s||"text",m||"");be!==Z.getModel()&&Z.setModel(be)}},[m],V),ct(()=>{let Z=Y.current.getModifiedEditor();Z.getOption(S.current.editor.EditorOption.readOnly)?Z.setValue(n||""):n!==Z.getValue()&&(Z.executeEdits("",[{range:Z.getModel().getFullModelRange(),text:n||"",forceMoveMarkers:!0}]),Z.pushUndoStop())},[n],V),ct(()=>{var Z,be;(be=(Z=Y.current)==null?void 0:Z.getModel())==null||be.original.setValue(a||"")},[a],V),ct(()=>{let{original:Z,modified:be}=Y.current.getModel();S.current.editor.setModelLanguage(Z,o||s||"text"),S.current.editor.setModelLanguage(be,c||s||"text")},[s,o,c],V),ct(()=>{var Z;(Z=S.current)==null||Z.editor.setTheme(b)},[b],V),ct(()=>{var Z;(Z=Y.current)==null||Z.updateOptions(T)},[T],V);let Et=R.useCallback(()=>{var Le;if(!S.current)return;ce.current(S.current);let Z=Nr(S.current,a||"",o||s||"text",l||""),be=Nr(S.current,n||"",c||s||"text",m||"");(Le=Y.current)==null||Le.setModel({original:Z,modified:be})},[s,n,c,a,o,l,m]),Ue=R.useCallback(()=>{var Z;!Qe.current&&W.current&&(Y.current=S.current.editor.createDiffEditor(W.current,{automaticLayout:!0,...T}),Et(),(Z=S.current)==null||Z.editor.setTheme(b),B(!0),Qe.current=!0)},[T,b,Et]);R.useEffect(()=>{V&&ae.current(Y.current,S.current)},[V]),R.useEffect(()=>{!k&&!V&&Ue()},[k,V,Ue]);function Ke(){var be,Le,Me,dt;let Z=(be=Y.current)==null?void 0:be.getModel();y||((Le=Z==null?void 0:Z.original)==null||Le.dispose()),f||((Me=Z==null?void 0:Z.modified)==null||Me.dispose()),(dt=Y.current)==null||dt.dispose()}return R.createElement(eo,{width:U,height:P,isEditorReady:V,loading:h,_ref:W,className:F,wrapperProps:E})}var dd=pd,md=R.memo(dd);function ud(a){let n=R.useRef();return R.useEffect(()=>{n.current=a},[a]),n.current}var yd=ud,Hs=new Map;function _d({defaultValue:a,defaultLanguage:n,defaultPath:s,value:o,language:c,path:l,theme:m="light",line:y,loading:f="Loading...",options:b={},overrideServices:h={},saveViewState:T=!0,keepCurrentModel:P=!1,width:U="100%",height:F="100%",className:E,wrapperProps:j={},beforeMount:G=ps,onMount:V=ps,onChange:B,onValidate:k=ps}){let[O,Y]=R.useState(!1),[S,W]=R.useState(!0),ae=R.useRef(null),ce=R.useRef(null),Qe=R.useRef(null),Et=R.useRef(V),Ue=R.useRef(G),Ke=R.useRef(),Z=R.useRef(o),be=yd(l),Le=R.useRef(!1),Me=R.useRef(!1);to(()=>{let re=sn.init();return re.then(he=>(ae.current=he)&&W(!1)).catch(he=>(he==null?void 0:he.type)!=="cancelation"&&console.error("Monaco initialization: error:",he)),()=>ce.current?wt():re.cancel()}),ct(()=>{var he,Pe,Nt,je;let re=Nr(ae.current,a||o||"",n||c||"",l||s||"");re!==((he=ce.current)==null?void 0:he.getModel())&&(T&&Hs.set(be,(Pe=ce.current)==null?void 0:Pe.saveViewState()),(Nt=ce.current)==null||Nt.setModel(re),T&&((je=ce.current)==null||je.restoreViewState(Hs.get(l))))},[l],O),ct(()=>{var re;(re=ce.current)==null||re.updateOptions(b)},[b],O),ct(()=>{!ce.current||o===void 0||(ce.current.getOption(ae.current.editor.EditorOption.readOnly)?ce.current.setValue(o):o!==ce.current.getValue()&&(Me.current=!0,ce.current.executeEdits("",[{range:ce.current.getModel().getFullModelRange(),text:o,forceMoveMarkers:!0}]),ce.current.pushUndoStop(),Me.current=!1))},[o],O),ct(()=>{var he,Pe;let re=(he=ce.current)==null?void 0:he.getModel();re&&c&&((Pe=ae.current)==null||Pe.editor.setModelLanguage(re,c))},[c],O),ct(()=>{var re;y!==void 0&&((re=ce.current)==null||re.revealLine(y))},[y],O),ct(()=>{var re;(re=ae.current)==null||re.editor.setTheme(m)},[m],O);let dt=R.useCallback(()=>{var re;if(!(!Qe.current||!ae.current)&&!Le.current){Ue.current(ae.current);let he=l||s,Pe=Nr(ae.current,o||a||"",n||c||"",he||"");ce.current=(re=ae.current)==null?void 0:re.editor.create(Qe.current,{model:Pe,automaticLayout:!0,...b},h),T&&ce.current.restoreViewState(Hs.get(he)),ae.current.editor.setTheme(m),y!==void 0&&ce.current.revealLine(y),Y(!0),Le.current=!0}},[a,n,s,o,c,l,b,h,T,m,y]);R.useEffect(()=>{O&&Et.current(ce.current,ae.current)},[O]),R.useEffect(()=>{!S&&!O&&dt()},[S,O,dt]),Z.current=o,R.useEffect(()=>{var re,he;O&&B&&((re=Ke.current)==null||re.dispose(),Ke.current=(he=ce.current)==null?void 0:he.onDidChangeModelContent(Pe=>{Me.current||B(ce.current.getValue(),Pe)}))},[O,B]),R.useEffect(()=>{if(O){let re=ae.current.editor.onDidChangeMarkers(he=>{var Nt;let Pe=(Nt=ce.current.getModel())==null?void 0:Nt.uri;if(Pe&&he.find(je=>je.path===Pe.path)){let je=ae.current.editor.getModelMarkers({resource:Pe});k==null||k(je)}});return()=>{re==null||re.dispose()}}return()=>{}},[O,k]);function wt(){var re,he;(re=Ke.current)==null||re.dispose(),P?T&&Hs.set(l,ce.current.saveViewState()):(he=ce.current.getModel())==null||he.dispose(),ce.current.dispose()}return R.createElement(eo,{width:U,height:F,isEditorReady:O,loading:f,_ref:Qe,className:E,wrapperProps:j})}var fd=_d,gd=R.memo(fd);const so={keywords:[{name:"or",desc:["逻辑 OR。适用于布尔表达式。"],syntax:["expr1 or expr2"],returns:["布尔值,或一系列布尔值。"]},{name:"and",desc:["逻辑 AND。适用于布尔表达式。"],syntax:["expr1 and expr2"],returns:["布尔值,或一系列布尔值。"]},{name:"not",desc:["逻辑求反(NOT)。 适用于布尔表达式。"],syntax:["not expr1"],returns:["布尔值,或一系列布尔值。"]},{name:"if",desc:["If语句定义了在满足表达式条件时必须执行的语句块。","要访问和使用if语句,应在代码的第一行中指定>= 2的Pine Script®语言版本,例如://@version=5","Pine Script®语言的第四版允许您使用“else if”语法。","通用编码来自:"],syntax:[`var_declarationX = if condition
40
40
  var_decl_then0
41
41
  var_decl_then1
42
42
 
@@ -103,21 +103,21 @@ else
103
103
  \${2:local_block_1}
104
104
  else
105
105
  \${3:local_block_2}
106
- `,kind:"statement"},{label:"for...to",insertText:"for ${1:i} = 1 to ${2:to_num} by 1\n ${3:local_block}\n",kind:"loop"},{label:"for...in",insertText:"for [${1:index}, ${2:value}] in ${3:arr}\n ${4:local_block}\n",kind:"loop"},{label:"while",insertText:"while ${1:condition}\n ${2:local_block}\n",kind:"statement"},{label:"switch",insertText:"switch ${1:condition}\n ${2:value_1} => ${3:local_block_1}\n ${4:value_2} => ${5:local_block_2}\n => ${6:default_local_block}\n",kind:"statement"}],ao=["in","as","continue","break","else","to","by"],be={keywords:"keyword",functions:"built-in function",variables:"built-in variable",methods:"built-in method",types:"built-in type",annotations:"annotation",constants:"built-in constant",namespace:"namespace",userDefinedVariable:"user-defined variable",userDefinedType:"user-defined type",field:"field",enum:"enum",userDefinedMethod:"user-defined method",userDefinedFunction:"user-defined function",returns:"returns",parameter:"parameter",namespaceDesc:"**Namespaces** are immutable terms that act as prefixes for groups of identifiers. A dot and another term always follow a namespace when naming Tcc functions, variables, and methods.",toTriggerParameterHints:"to trigger parameters hint"},xd={clickOnKeywordForMoreHelp:"`click` on keyword for more help"};function hd(){const a={},n={};return Object.keys(so).reduce((s,o)=>{const c=so[o],l=be[o],{mapObj:m,keys:_}=wd(c,l);return s.keyMapList[o]=m,s.keyList[o]=_,s},{keyList:a,keyMapList:n}),{keyList:a,keyMapList:n}}function wd(a,n){const s=new Map,o=[];return a.forEach(c=>{var m;c.title=n;const l=c.originalName||c.name;l!=="for...in"&&(s.has(l)?(m=s.get(l))==null||m.push(c):(o.push(l),s.set(l,[c])))}),{mapObj:s,keys:o}}const{keyList:no,keyMapList:pt}=hd(),ds=[{title:"Variables",key:"variables",prefix:"var"},{title:"Constants",key:"constants",prefix:"const"},{title:"Functions",key:"functions",prefix:"fun"},{title:"Keywords",key:"keywords",prefix:"kw"},{title:"Types",key:"types",prefix:"type"},{title:"Operators",key:"operators",prefix:"op"},{title:"Annotations",key:"annotations",prefix:"an"}];function vd(a){return a.replace(/<.*>/,"")}class Td{constructor(){Object.defineProperty(this,"delimiter",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"lineBreak",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"paragraphBreak",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.delimiter="***",this.lineBreak=`
106
+ `,kind:"statement"},{label:"for...to",insertText:"for ${1:i} = 1 to ${2:to_num} by 1\n ${3:local_block}\n",kind:"loop"},{label:"for...in",insertText:"for [${1:index}, ${2:value}] in ${3:arr}\n ${4:local_block}\n",kind:"loop"},{label:"while",insertText:"while ${1:condition}\n ${2:local_block}\n",kind:"statement"},{label:"switch",insertText:"switch ${1:condition}\n ${2:value_1} => ${3:local_block_1}\n ${4:value_2} => ${5:local_block_2}\n => ${6:default_local_block}\n",kind:"statement"}],ao=["in","as","continue","break","else","to","by"],ge={keywords:"keyword",functions:"built-in function",variables:"built-in variable",methods:"built-in method",types:"built-in type",annotations:"annotation",constants:"built-in constant",namespace:"namespace",userDefinedVariable:"user-defined variable",userDefinedType:"user-defined type",field:"field",enum:"enum",userDefinedMethod:"user-defined method",userDefinedFunction:"user-defined function",returns:"returns",parameter:"parameter",namespaceDesc:"**Namespaces** are immutable terms that act as prefixes for groups of identifiers. A dot and another term always follow a namespace when naming Tcc functions, variables, and methods.",toTriggerParameterHints:"to trigger parameters hint"},xd={clickOnKeywordForMoreHelp:"`click` on keyword for more help"};function hd(){const a={},n={};return Object.keys(so).reduce((s,o)=>{const c=so[o],l=ge[o],{mapObj:m,keys:y}=wd(c,l);return s.keyMapList[o]=m,s.keyList[o]=y,s},{keyList:a,keyMapList:n}),{keyList:a,keyMapList:n}}function wd(a,n){const s=new Map,o=[];return a.forEach(c=>{var m;c.title=n;const l=c.originalName||c.name;l!=="for...in"&&(s.has(l)?(m=s.get(l))==null||m.push(c):(o.push(l),s.set(l,[c])))}),{mapObj:s,keys:o}}const{keyList:no,keyMapList:pt}=hd(),ds=[{title:"Variables",key:"variables",prefix:"var"},{title:"Constants",key:"constants",prefix:"const"},{title:"Functions",key:"functions",prefix:"fun"},{title:"Keywords",key:"keywords",prefix:"kw"},{title:"Types",key:"types",prefix:"type"},{title:"Operators",key:"operators",prefix:"op"},{title:"Annotations",key:"annotations",prefix:"an"}];function vd(a){return a.replace(/<.*>/,"")}class Td{constructor(){Object.defineProperty(this,"delimiter",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"lineBreak",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"paragraphBreak",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.delimiter="***",this.lineBreak=`
107
107
  `,this.paragraphBreak=`
108
108
 
109
109
  `}bold(n){return`**${n}**`}italic(n){return`*${n.replace(">","&gt;").replace("<","&lt;")}*`}pineCode(n){return`\`\`\`
110
110
  ${n}
111
- \`\`\``}code(n){return`\`${n}\``}paragraph(...n){return[this.paragraphBreak,...n,this.paragraphBreak].join(this.lineBreak)}link(n,s){return`[${n}](${s.href})`}}const oe=new Td;function Dd(a){const{name:n,libraryName:s,desc:o}=a,c=[`${oe.bold(n||s)} (library)`];return c.push(oe.delimiter),o&&c.push(oe.paragraph(oe.bold(rt.Description),oe.lineBreak,o)),c.join(c.length===2?" ":oe.lineBreak)}function kd(a,n=0,s=!0){const o=a[n];if(!o)return"";if(o.isEnumMember)return`${oe.bold(o.name)} (enum member)${o.value===void 0?"":` = ${o.value}`}`;const c=/(Mac|iPhone|iPod|iPad)/i.test(window.navigator.userAgent),{name:l,title:m,desc:_,type:f,syntax:b,returns:h,remarks:T,fields:P,members:U}=o,F=[`${oe.bold(l)} (${m})`];if(a.length>1&&F.push(oe.italic(`+${a.length-1} overloads`)),F.push(oe.delimiter),_&&F.push(oe.paragraph(Array.isArray(_)?_.join(oe.lineBreak):_||"")),f&&F.push(oe.paragraph(oe.bold(rt.Type),oe.italic(f))),b&&b.length&&F.push(oe.paragraph(oe.bold(rt.Syntax),oe.pineCode(b.join(oe.lineBreak)))),h&&F.push(oe.paragraph(oe.bold(rt.Returns),oe.lineBreak,h.join(oe.lineBreak))),T&&T.length&&a.length<=1){let E="";typeof T=="string"?E=T:E=T.join(oe.lineBreak)||"",E.length<200&&F.push(oe.paragraph(oe.bold(rt.Remarks),oe.lineBreak,E))}if(P){const E=[];for(const j of P){const G=j.desc?` - ${j.desc}`:"";E.push(`${j.name} (${j.type})${G}`)}F.push(oe.paragraph(oe.bold(rt.Fields),oe.lineBreak,E.join(oe.paragraphBreak)))}if(U){const E=[];for(const j of U){const G=j.desc?` - ${j.desc}`:"";E.push(`${j.name}${j.value?` (${j.value})`:""}${G}`)}F.push(oe.paragraph(oe.bold(rt.EnumMembers),oe.lineBreak,E.join(oe.paragraphBreak)))}return s&&F.push(oe.italic(`${oe.code(c?"⌘":"Ctrl")} + ${xd.clickOnKeywordForMoreHelp}`)),F.join(F.length===2?" ":oe.lineBreak)}const nn="tcc_cursor_position",Id=["submenuitem.EditorContextPeek","editor.action.peekDefinition"];function Ad(a){return a.replace(/<[^<>]+>/,"").replace(/(series|simple|const|input)\s+([\w\d.]+)/,"$2").replace(/\w[\w.\d]*\[\]/,"array")}function qd(a){const n=a.getContribution("editor.contrib.contextmenu"),s=n==null?void 0:n._getMenuActions;n._getMenuActions=function(){return s.apply(n,arguments).filter(function(c){return!Id.includes(c.id)})}}class Cd{constructor(){Object.defineProperty(this,"bracketsPostfix",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_builtinSubtreeCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_formatter",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_namespaceCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_suggestions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_outermostNsItems",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_funcArgsCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userSuggestions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userFuncArgsCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userNamespaceCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userOutermostNsItems",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_methodNamespaceCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userMethods",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userFunctions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_methodFuncs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userTypes",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userEnums",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_nextIsBracket",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.bracketsPostfix="(${0})",this._builtinSubtreeCache={},this._formatter=oe,this._namespaceCache=new Map,this._suggestions=[],this._outermostNsItems=new Map,this._funcArgsCache=new Map,this._userSuggestions=[],this._userFuncArgsCache=new Map,this._userNamespaceCache=new Map,this._userOutermostNsItems=new Map,this._methodNamespaceCache=new Map,this._userMethods=new Map,this._userTypes=new Map,this._methodFuncs=new Map,this._userFunctions=new Map,this._userEnums=new Map,this._nextIsBracket=!1}get methodFuncs(){return this._methodFuncs}get userFuncs(){return this._userFunctions}get userEnums(){return this._userEnums}set nextIsBracket(n){this._nextIsBracket=n}get nextIsBracket(){return this._nextIsBracket}get annotationSuggestions(){return this._getAnnotationCompletionItems(this._builtinSubtreeCache.annotations)}initBuiltinsTrees(){this._getBuiltinsCacheFragment(),this._suggestions=this._getAllCompletionItems(),this._getFuncArgumentsCompletionItemsToCache(this._builtinSubtreeCache.functions)}getArgSuggestions(n){return this._funcArgsCache.get(n)||this._userFuncArgsCache.get(n)}getSuggestions(n){return n?this._namespaceCache.get(n)||this._userNamespaceCache.get(n):this._suggestions.concat(this._userSuggestions)}_initUserDefind(){this._userFuncArgsCache.clear(),this._userNamespaceCache.clear(),this._userOutermostNsItems.clear(),this._methodNamespaceCache.clear(),this._methodFuncs.clear()}setUserDefind(n,s,o,c,l){this._initUserDefind();const m=this._mergeTreeSlices(this._generateTreeSlice(pt.methods,"method"),this._generateTreeSlice(c,"method"));this._getMethodNamespaceCache(m),this._userMethods=c,this._userTypes=s,this._userFunctions=n,this._userEnums=l;const _=this._generateTreeSlice(n,"fun");this._userSuggestions=this._getAllUserCompletionItems(_,this._generateTreeSlice(s,"type"),this._generateTreeSlice(o,"var"),this._generateTreeSlice(l,"enum")),this._getUserFuncArgumentsCompletionItemsToCache(_)}_getAllUserCompletionItems(n,s,o,c){const l=this._getEnumCompletionItems(c),m=this._getUserVariableCompletionItems(o),_=this._getTypeCompletionItems(s,!0),f=this._getFunctionCompletionItems(n,void 0,!0);return[..._,...f,...m,...l,...this._userOutermostNsItems.values()]}_getAllCompletionItems(){const{variables:n,keywords:s,types:o,functions:c}=this._builtinSubtreeCache,l=this._getVariableCompletionItems(n),m=this._getKeywordCompletionItems(s),_=this._getTypeCompletionItems(o),f=this._getFunctionCompletionItems(c),b=this._getSnippetsCompletionsList();return[...l,...m,..._,...f,...this._outermostNsItems.values(),...b]}_getNodeKey(n,s){return`${s}_${n}`}_mergeTreeSlices(...n){const s=new Map;for(const o of n)for(const[c,l]of o){const m=s.get(c);m?s.set(c,{...m,children:this._mergeTreeSlices(l.children,m.children)}):s.set(c,l)}return s}_mergeCompletions(n,s){const o=this._namespaceCache.get(n);o?this._namespaceCache.set(n,[...o,...s]):this._namespaceCache.set(n,s)}_mergeUserCompletions(n,s){const o=this._userNamespaceCache.get(n);o?this._userNamespaceCache.set(n,[...o,...s]):this._userNamespaceCache.set(n,s)}_generateTreeSlice(n,s){const o=new Map;for(const[c,l]of n){const[m,..._]=c.split("."),f=_.length>0,b=o.get(this._getNodeKey(m,f?"ns":s));let h=new Map,T=l.map(U=>({...U,name:c})),P=this._getNodeKey(c,s);if(f&&s!=="type"){const U=new Map([[_.join("."),l]]);T=[{name:m,title:be.namespace}],P=this._getNodeKey(m,"ns"),h=this._generateTreeSlice(U,s)}b&&(T=[{name:m,title:be.namespace}],h=this._mergeTreeSlices(b.children,h)),o.set(P,{value:T,children:h})}return o}_getBuiltinsCacheFragment(){const{keywords:n,variables:s,constants:o,types:c,functions:l,annotations:m}=pt,_=this._generateTreeSlice(m,"an");return _.delete("an_@version="),this._builtinSubtreeCache={keywords:this._generateTreeSlice(n,"key"),variables:this._mergeTreeSlices(this._generateTreeSlice(s,"var"),this._generateTreeSlice(o,"var")),types:this._generateTreeSlice(c,"type"),functions:this._generateTreeSlice(l,"fun"),annotations:_},this._builtinSubtreeCache}_getVariableCompletionItems(n,s){const o=[],c=[];for(const[l,m]of n){const{value:_,children:f}=m;if(l.startsWith("ns")){const b=this._getNamespaceCompletionItem(_[0]);if(s){c.push({...b});const T=`${s}.${b.label}`;b.label=T,b.insertText=T}const h=this._getVariableCompletionItems(f,b.label);s||this._outermostNsItems.set(l,b),o.push(...h)}else{const b=this._getVariableCompletionItem(_[0],s?3:2);if(s){c.push({...b});const{label:h}=b;b.label=`${s}.${h}`,b.insertText=`${s}.${b.insertText}`,b.filterText=`${h}\r`}o.push(b)}}return c.length&&s&&this._mergeCompletions(s,c),o}_setUserVariableSubItems(n,s){var b,h,T,P;let o=[];const c=Ad(n.type||""),l=this._methodNamespaceCache.get(c),m=s?`${s}.${n.name}`:n.name;l&&(o=l.filter(U=>{var G;const F=`${c}.${U.label}`,E=pt.methods.get(F)||this._userMethods.get(F),j=E==null?void 0:E.some(V=>!V.thisType||V.thisType[0].includes("<>")||V.thisType.includes(n.type||""));if(j&&E){const V=this._getNamedArgumentsCompletionList(((G=E[0])==null?void 0:G.args)||[]),B=`${m}.${U.label}`;this._userFuncArgsCache.set(B,V),this._methodFuncs.set(B,E)}return j}));const{types:_}=pt,f=((h=(b=this._userTypes.get(c))==null?void 0:b[0])==null?void 0:h.fields)||((P=(T=_.get(c))==null?void 0:T[0])==null?void 0:P.fields);if(f)for(const U of f){const F=U.name,E=U.type,j=this._getInstanceTypeCompletionItemProp({name:F,type:E,desc:U.desc?[U.desc]:void 0});this._setUserVariableSubItems({name:F,type:E},n.name),o.push({...j})}o.length&&this._mergeUserCompletions(m,o)}_getUserVariableCompletionItems(n,s){const o=[],c=[];for(const[l,m]of n){const{value:_,children:f}=m;if(this._setUserVariableSubItems(_[0]),l.startsWith("ns")){const b=this._getNamespaceCompletionItem(_[0]);if(s){c.push({...b});const T=`${s}.${b.label}`;b.label=T,b.insertText=T}const h=this._getUserVariableCompletionItems(f,b.label);s||this._userOutermostNsItems.set(l,b),o.push(...h)}else{const b=this._getVariableCompletionItem(_[0],s?2:1,!1);if(s){c.push({...b});const{label:h}=b;b.label=`${s}.${h}`,b.insertText=`${s}.${b.insertText}`,b.filterText=`${h}\r`}o.push(b)}}return c.length&&s&&this._mergeUserCompletions(s,c),o}_getTypeCompletionItems(n,s=!1){const o=[];for(const[,c]of n){const{value:l}=c,m=s?this._getCustomTypeCompletionItem(l[0]):this._getTypeCompletionItem(l[0]);o.push(m)}return o}_getEnumCompletionItems(n){const s=[];for(const[,o]of n){const{value:c}=o,l=this._getEnumCompletionItem(c[0]);s.push(l);const m=c[0].members;m!=null&&m.length&&this._getEnumMemberCompletionItems(c[0].name,m)}return s}_getEnumMemberCompletionItems(n,s){const o=[];for(const c of s){const{name:l,desc:m,value:_}=c,f=this._getEnumMemberCompletionItem({name:l,desc:m?[m]:void 0,value:_});o.push(f)}o.length&&this._mergeUserCompletions(n,o)}_getAnnotationCompletionItems(n){const s=[];for(const[,o]of n){const{value:c}=o,l=this._getAnnotationCompletionItem(c[0]);s.push(l)}return s}_getKeywordCompletionItems(n){const s=[];for(const[,o]of n){const{value:c}=o,l=this._getKeywordCompletionItem(c[0]);s.push(l)}return s}_getMethodNamespaceCache(n,s){const o=[];for(const[c,l]of n){const{value:m,children:_}=l;if(c.startsWith("ns")){const f=this._getNamespaceCompletionItem(m[0]);if(s){o.push({...f});const b=`${s}.${f.label}`;f.label=b,f.insertText=b}this._getMethodNamespaceCache(_,f.label)}else{const f=this._getFunctionCompletionItem(m[0],s?3:2);if(m.length>1&&(f.detail=`${f.detail} (+${m.length-1} overloads)`),s){o.push({...f});const{label:b}=f;f.label=`${s}.${b}`,f.insertText=`${s}.${f.insertText}`,f.originInsertText=`${s}.${f.originInsertText}`,f.filterText=`${b}\r`}}}s&&this._methodNamespaceCache.set(s,o)}_getFunctionCompletionItems(n,s,o=!1){const c=[],l=[];for(const[m,_]of n){const{value:f,children:b}=_;if(m.startsWith("ns")){const h=this._getNamespaceCompletionItem(f[0]);if(s){l.push({...h});const P=`${s}.${h.label}`;h.label=P,h.insertText=P}const T=this._getFunctionCompletionItems(b,h.label,o);s||(o?this._userOutermostNsItems.set(m,h):this._outermostNsItems.set(m,h)),c.push(...T)}else{const h=this._getFunctionCompletionItem(f[0],s?3:2,!o);if(f.length>1&&(h.detail=`${h.detail} (+${f.length-1} overloads)`),s){l.push({...h});const{label:T}=h;h.label=`${s}.${T}`,h.insertText=`${s}.${h.insertText}`,h.originInsertText=`${s}.${h.originInsertText}`,h.filterText=`${T}\r`}c.push(h)}}return l.length&&s&&(o?this._mergeUserCompletions(s,l):this._mergeCompletions(s,l)),c}_getSnippetsCompletionsList(){return bd.map(n=>{const{label:s,kind:o,insertText:c}=n,l=s.charAt(0).toUpperCase()+s.substring(1),m={value:this._formatter.pineCode(c.replace(/\${\d:([^}]+)}|\${\d}/g,"$1"))};return{label:s,detail:`(${l} ${o})`,insertText:c,insertTextRules:ke.languages.CompletionItemInsertTextRule.InsertAsSnippet,sortText:`2_${s}`,kind:ke.languages.CompletionItemKind.Snippet,documentation:m}})}_getFuncArgumentsCompletionItemsToCache(n,s){for(const[o,c]of n){const{name:l}=c.value[0];if(o.startsWith("ns"))this._getFuncArgumentsCompletionItemsToCache(c.children,s?`${s}.${l}`:l);else{const m=new Map;c.value.reduce((b,h)=>{const T=h.args;return T&&T.length&&T.forEach(P=>{b.set(P.name,P)}),b},m);const _=this._getNamedArgumentsCompletionList([...m.values()]),f=s?`${s}.${l}`:l;this._funcArgsCache.set(f,_)}}}_getUserFuncArgumentsCompletionItemsToCache(n,s){for(const[o,c]of n){const{name:l}=c.value[0];if(o.startsWith("ns"))this._getUserFuncArgumentsCompletionItemsToCache(c.children,s?`${s}.${l}`:l);else{const m=new Map;c.value.reduce((b,h)=>{const T=h.args;return T&&T.length&&T.forEach(P=>{b.set(P.name,P)}),b},m);const _=this._getNamedArgumentsCompletionList([...m.values()]),f=s?`${s}.${l}`:l;this._userFuncArgsCache.set(f,_)}}}_getNamedArgumentsCompletionList(n){return n.map(s=>{const{name:o,desc:c,displayType:l}=s,m=`${o} = `,_=Array.isArray(c)?c.join(this._formatter.delimiter):c||"";return{label:m,documentation:{value:this._formatter.paragraph(this._formatter.bold(be.Description),this._formatter.lineBreak,_)},insertText:m,detail:`(${be.parameter}) ${be.types} ${l}`,kind:ke.languages.CompletionItemKind.Text,sortText:`0_${m}`}})}_getVariableCompletionItem(n,s=2,o=!0){const c=this._extractExamples(n),l=this._extractDescription(n),m=[this._createDescriptionSection(l)];c.length?m.push(this._createExampleSection(c)):n.syntax&&n.syntax.length&&m.push(this._createSyntaxSection(n.syntax));const _={value:m.join(this._formatter.lineBreak)},f=o?be.variables:be.userDefinedVariable;return{documentation:_,label:n.name,insertText:n.name,kind:ke.languages.CompletionItemKind.Variable,sortText:`${s}_${n.name}`,detail:`(${f}) ${n.type}`}}_getKeywordCompletionItem(n,s=2){const o=this._extractExamples(n),c=this._extractDescription(n),l=[this._createDescriptionSection(c)];return o.length?l.push(this._createExampleSection(o)):n.syntax&&n.syntax.length&&l.push(this._createSyntaxSection(n.syntax)),{documentation:{value:l.join(this._formatter.lineBreak)},label:n.name,insertText:n.name,kind:ke.languages.CompletionItemKind.Keyword,sortText:`${s}_${n.name}`,detail:`(${be.keywords})`}}_getTypeCompletionItem(n){const s=this._extractDescription(n);return{documentation:{value:this._createDescriptionSection(s)},label:n.name,insertText:n.name,kind:ke.languages.CompletionItemKind.Keyword,sortText:`1_${n.name}`,detail:`(${be.types})`}}_getCustomTypeCompletionItem(n){const s=this._extractDescription(n);return{documentation:{value:this._createDescriptionSection(s)},label:n.name,insertText:n.name,kind:ke.languages.CompletionItemKind.Keyword,sortText:`2_${n.name}`,detail:`(${be.userDefinedType})`}}_getEnumCompletionItem(n){const s=this._extractDescription(n);return{documentation:{value:this._createDescriptionSection(s)},label:n.name,insertText:n.name,kind:ke.languages.CompletionItemKind.Enum,sortText:`2_${n.name}`,detail:`(${be.enum})`}}_getEnumMemberCompletionItem(n){const s=this._extractDescription(n);return{documentation:{value:this._createDescriptionSection(s)},label:n.name,insertText:n.name,kind:ke.languages.CompletionItemKind.EnumMember,sortText:`2_${n.name}`,detail:`(enum member) ${n.value?`${n.name} = ${n.value}`:`${n.name}`}`}}_getInstanceTypeCompletionItemProp(n){const s=this._extractDescription(n),o=[];return s&&o.push(this._formatter.paragraph(this._formatter.bold(rt.Description),this._formatter.lineBreak,s)),{documentation:{value:o.join(this._formatter.lineBreak)},label:n.name,insertText:n.name,kind:ke.languages.CompletionItemKind.Field,sortText:`2_${n.name}`,detail:`(${be.field}) ${n.type}`}}_getFunctionCompletionItem(n,s=2,o=!0){var U;const c=n.returnedTypes&&n.returnedTypes[0]||n.syntax&&n.syntax[0]&&((U=n.syntax[0].split("→").pop())==null?void 0:U.trim()),l=this._extractExamples(n),m=this._extractDescription(n),_=[this._createDescriptionSection(m)];l.length?_.push(this._createExampleSection(l)):n.syntax&&n.syntax.length&&_.push(this._createSyntaxSection(n.syntax)),n.returns&&n.returns.length&&_.push(this._createReturnSection(n.returns));const f={value:_.join(this._formatter.lineBreak)},b=n.name,h=o?be.functions:be.userDefinedFunction,T=n.template,P=T?`${vd(b)}<\${1}>`:b;return{documentation:f,label:T?`${b.replace(/<.+>/,"")}<type>`:b,kind:ke.languages.CompletionItemKind.Function,sortText:`${s}_${b}`,insertTextRules:ke.languages.CompletionItemInsertTextRule.InsertAsSnippet,insertText:P+this.bracketsPostfix,originInsertText:P,detail:`(${h}) ${be.returns} ${c}`,command:{id:"tcc.editor.function",title:"",arguments:[T?"editor.action.triggerSuggest":"editor.action.triggerParameterHints"]}}}_getAnnotationCompletionItem(n){const s=this._extractDescription(n),o=this._extractExamples(n),c=[this._createDescriptionSection(s)];return o.length&&c.push(this._createExampleSection(o)),{documentation:{value:c.join(this._formatter.lineBreak)},label:n.name,insertText:n.name.replace("@",""),kind:ke.languages.CompletionItemKind.Keyword,detail:`(${be.annotations})`}}_getNamespaceCompletionItem(n,s=2){const o=[this._createDescriptionSection(be.namespaceDesc)];return{label:n.name,documentation:{value:o.join(this._formatter.lineBreak)},detail:`(${be.namespace}) ${n.name}`,insertText:n.name,sortText:`${s}_${n.name}`,kind:ke.languages.CompletionItemKind.Module}}_extractExamples(n){let s;return n.examples||n.detailedDesc&&((s=n.detailedDesc[0])===null||s===void 0?void 0:s.examples)||[]}_extractDescription(n){return Array.isArray(n.desc)?n.desc.join(this._formatter.lineBreak):n.desc||""}_createExampleSection(n){return this._formatter.paragraph(this._formatter.bold(rt.Example),this._formatter.pineCode(n.join(this._formatter.lineBreak)))}_createSyntaxSection(n){return this._formatter.paragraph(this._formatter.bold(rt.Syntax),this._formatter.pineCode(n.join(this._formatter.lineBreak)))}_createReturnSection(n){return this._formatter.paragraph(this._formatter.bold(rt.Returns),this._formatter.lineBreak,n.join(this._formatter.lineBreak))}_createDescriptionSection(n){return!n||n.trim().length===0?"":this._formatter.paragraph(this._formatter.bold(rt.Description),this._formatter.lineBreak,n)}}const St=new Cd;class zd{constructor(){Object.defineProperty(this,"_userFunctions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userVariables",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userTypes",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userMethods",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userEnums",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_imports",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_overloadsFuncs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._userFunctions=new Map,this._userVariables=new Map,this._userTypes=new Map,this._userMethods=new Map,this._imports=new Map,this._userEnums=new Map,this._overloadsFuncs=[]}get overloadsFuncs(){return this._overloadsFuncs}setUserDefined(n,s){const{functions:o,variables:c,types:l,methods:m,imports:_,enums:f}=n;o&&(this._userFunctions=o),c&&(this._userVariables=c),l&&(this._userTypes=l),m&&(this._userMethods=m),_&&(this._imports=_),f&&(this._userEnums=f),this._overloadsFuncs=s}parseLineContentFuncVar(n,s,o,c){let l=(o==null?void 0:o.getLineContent(s))||"";const m=l.indexOf("//");if(this._removeString(l).indexOf("//")!==-1&&m<=n)return;l=l+" ";const _=this._getVariablesDocVal(l,n,s);if(_){if(_.isBuildIn){const h=o==null?void 0:o.getWordAtPosition(c||new ke.Position(s,n));if(((o==null?void 0:o.getValueInRange({startLineNumber:s,startColumn:(h==null?void 0:h.endColumn)||0,endLineNumber:s,endColumn:((h==null?void 0:h.endColumn)||0)+2}))||"").trim().startsWith("="))return null}return _}const f=this._getFuncsDocVal(l,n,s);if(f)return f;const b=l.match(/[a-zA-Z_][a-zA-Z_0-9]*(\s*\.\s*[a-zA-Z_][a-zA-Z_0-9]*)*(?=\s*<)/g);if(b){const h=this._matchContent(b,l,n);if(h){const T=this._getBuildInOther(h.name);if(T)return{docValue:T,isBuildIn:!0,index:0};{const P=this._getBuildInFunc(`${h.name}<type>`);if(P)return{docValue:P,isBuildIn:!0,index:0}}}}return this._getImportDocVal(l,n,s)}_getImportDocVal(n,s,o){const c=new RegExp("(?<=(import(\\s+)))([a-zA-Z\\d\\$_\\-\\.\\u00a1-\\uffff\\/]+)","g"),l=new RegExp("(?<=(as\\b)(\\s+))([a-zA-Z\\d\\_\\u00a1\\uffff\\/]+)","g"),m=n.match(c);if(m){const _=this._matchContent(m,n,s);if(_){const b=this._imports.get(_.name);if(b)return b}const f=n.match(l);if(f){const b=this._matchContent(f,n,s);if(b){for(const[h,T]of this._imports)if(T.name===b.name)return T}}}return null}_getBuildInFunc(n){return pt.functions.get(n)}_getBuildInMethod(n){return pt.methods.get(n)}_getBuildInOther(n){const{keywords:s,variables:o,constants:c,types:l}=pt;return s.get(n)||o.get(n)||c.get(n)||l.get(n)}parseCurrentInputFunc(n,s=!1,o=!1){let c=n.length-1,l=0,m=s,_=o;for(;c>=0;){const f=n.charAt(c);if(c-=1,/['"]/.test(f)){const b=f;if(f==="'"){if(m){m=!1;continue}}else if(_){_=!1;continue}for(;c>=0;){const h=n.charAt(c);if(c-=1,h===b)break}}if(!(m||_)&&(/\)/.test(f)&&(l+=1),/\(/.test(f))){if(l>0){l-=1;continue}let b="";for(;c>=0;){const h=n.charAt(c);if(/\s/.test(h)&&!b){c-=1;continue}if(/[^\w.]/.test(h))break;c-=1,b=h+b}if(b)return{funcName:b,startIndex:c+1}}}}parseCurrentInputFuncAndArg(n,s=!1,o=!1){const{funcName:c,startIndex:l}=this.parseCurrentInputFunc(n,s,o)||{};if(c&&typeof l=="number"){let m=n.slice(l+c.length).trim().slice(1),_=-1;if(s&&(_=m.lastIndexOf("'")),o){const h=m.lastIndexOf('"');(h!==-1&&h<_||_===-1)&&(_=h)}_!==-1&&(m=m.substring(0,_));const b=m.replace(/[\w.]+\(.*\)/g,"").split(",").map(h=>{const T=h.trim().split("=");return T.length<=1?"":T[0].trim()});return{startIndex:l,funcName:c,args:b}}}_removeString(n){return n.replace(/\\"|\\'/g,"").replace(/"[^"]*"|'[^']*'/g,"")}_getVariablesDocVal(n,s,o){const c=this._removeString(n).replace(/\/\/.*/g,"").match(/[a-zA-Z_][a-zA-Z_0-9]*(\s*\.\s*[a-zA-Z_][a-zA-Z_0-9]*)*(?=\s*[^(a-zA-Z_0-9."'<])/g);if(c){const l=this._matchContent(c,n,s);if(l){const m={docValue:void 0,isBuildIn:!0,index:0},_=this._getBuildInOther(l.name);if(_)return m.docValue=_,m;const f=this._getUserVariablesDocVal(l.name,s,o);if(f)return Object.assign(m,{docValue:[f],isBuildIn:!1});const b=this._getUserTypesDocVal(l.name);if(b)return Object.assign(m,{docValue:b,isBuildIn:!1});const h=this._getTypesAndFileds(n,l.name,s,o);if(h&&typeof h!="string")return Object.assign(m,{docValue:[h],isBuildIn:!1});const T=this._getUserEnumsDocVal(l,s);if(T)return Object.assign(m,{docValue:T,isBuildIn:!1})}}}_getUserVariablesDocVal(n,s,o){const m=[...this._userVariables.get(n)||[]].sort((_,f)=>(f.scope||0)-(_.scope||0)).find(_=>{const f=_.range;return((f==null?void 0:f.startColumn)||0)<=s&&((f==null?void 0:f.startLineNumber)||0)<=o&&((f==null?void 0:f.endLineNumber)||0)>=o});if(m)return m.title=be.userDefinedVariable,m.type=this._arrayTypeTransform(m.type),m}_getUserTypesDocVal(n){const s=this._userTypes.get(n);if(s)return s[0].title=be.userDefinedType,s}_getUserEnumsDocVal(n,s){var f;const{endIndex:o,name:c}=n,l=c.split(".");let m=l[0];l.length>2&&(m=l.slice(0,2).join("."));const _=this._userEnums.get(m);if(_&&_.length){_[0].title=be.enum;const b=l[l.length-1],h=(f=_[0].members)==null?void 0:f.find(T=>T.name===b);if(!h||s<o-b.length)return _;if(s>o-b.length)return[h]}}_getTypesAndFileds(n,s,o,c){var l,m;if(s.includes(".")){const _=s.split(".");let f=_[0],b,h=null,T=n.indexOf(s,o-s.length)+1,P=T+f.length-1;for(const U of _.slice(1)){if(!h){const F=T<=o&&P>=o,E=this._getUserVariablesDocVal(f,o,c);if(F&&E)return E;h=E==null?void 0:E.type}if(h){b=h,T=P+2,P=P+U.length+1;const F=this._userTypes.get(h)||pt.types.get(h),E=(m=(l=F==null?void 0:F[0])==null?void 0:l.fields)==null?void 0:m.find(j=>j.name===U);if(E&&T<=o&&P>=o)return{name:`${h}.${U}`,desc:E.desc,type:this._arrayTypeTransform(E.type),title:be.field};h=E==null?void 0:E.type}else f=`${f}.${U}`,P=P+U.length+1}return b}}_getFuncsDocVal(n,s,o){const c=n.match(/[a-zA-Z_][a-zA-Z_0-9]*(\s*\.\s*[a-zA-Z_][a-zA-Z_0-9]*)*(?=\s*\()/g);if(c){const l=this._matchContent(c,n,s);if(l){const m={docValue:void 0,isBuildIn:!0,endIndex:l.endIndex,index:0},_=this._getBuildInFunc(l.name);if(_)return m.index=this._getOverloadsFuncIndex(_,s,l.name,o),Object.assign(m,{docValue:_});const f=this._getUserFuncsDocVal(l.name);if(f)return m.index=this._getOverloadsFuncIndex(f,s,l.name,o),Object.assign(m,{docValue:f,isBuildIn:!1});const b=this._getUserVarFuncsDocVal(n,l.name,s,o);if(b)return Object.assign(m,{docValue:[b],isBuildIn:!1})}}}_getOverloadsFuncIndex(n,s,o,c){if(n.length>1){const l=this._overloadsFuncs.find(m=>m.name===o&&m.line===c&&m.startColumn<=s&&m.endColumn>=s);if(l)return l.index}return 0}_getUserFuncsDocVal(n){const s=this._userFunctions.get(n);if(s){for(const o of s)o.title=be.userDefinedFunction;return s}}_getUserMethodsDocVal(n){const s=this._userMethods.get(n);if(s){for(const o of s)o.title=be.userDefinedFunction;return s}}_getUserVarFuncsDocVal(n,s,o,c){var l;if(s.includes(".")){const m=s.split("."),_=this._getTypesAndFileds(n,s,o,c);if(typeof _=="string"){const b=`${this._arrayTypeTransform(_).replace(/<[^<>]+>/,"").replace(/(series|simple|const|input)\s+([\w\d.]+)/,"$2")}.${m.pop()}`,h=this._getBuildInMethod(b);if(h){const T=this._getOverloadsFuncIndex(h,o,b,c);return{...h[0],name:b,index:T}}return(l=this._getUserMethodsDocVal(b))==null?void 0:l[0]}else return _}}_arrayTypeTransform(n=""){return n.includes("[]")?`array<${n.replace("[]","")}>`:n}_matchContent(n,s,o){let c=0;for(const l of n){c=o-l.length;const m=s.indexOf(l,c);if(c=m+l.length,this._judgeVal(s,m,c)&&m+1<=o&&c>=o)return{name:l,endIndex:c}}}_judgeVal(n,s,o){const c=n.charAt(s-1),l=/[\w\d."'/]/;if(l.test(c))return!1;const m=n.charAt(o);return!l.test(m)}}const br=new zd;var Ws={exports:{}};/**
111
+ \`\`\``}code(n){return`\`${n}\``}paragraph(...n){return[this.paragraphBreak,...n,this.paragraphBreak].join(this.lineBreak)}link(n,s){return`[${n}](${s.href})`}}const oe=new Td;function Dd(a){const{name:n,libraryName:s,desc:o}=a,c=[`${oe.bold(n||s)} (library)`];return c.push(oe.delimiter),o&&c.push(oe.paragraph(oe.bold(rt.Description),oe.lineBreak,o)),c.join(c.length===2?" ":oe.lineBreak)}function kd(a,n=0,s=!0){const o=a[n];if(!o)return"";if(o.isEnumMember)return`${oe.bold(o.name)} (enum member)${o.value===void 0?"":` = ${o.value}`}`;const c=/(Mac|iPhone|iPod|iPad)/i.test(window.navigator.userAgent),{name:l,title:m,desc:y,type:f,syntax:b,returns:h,remarks:T,fields:P,members:U}=o,F=[`${oe.bold(l)} (${m})`];if(a.length>1&&F.push(oe.italic(`+${a.length-1} overloads`)),F.push(oe.delimiter),y&&F.push(oe.paragraph(Array.isArray(y)?y.join(oe.lineBreak):y||"")),f&&F.push(oe.paragraph(oe.bold(rt.Type),oe.italic(f))),b&&b.length&&F.push(oe.paragraph(oe.bold(rt.Syntax),oe.pineCode(b.join(oe.lineBreak)))),h&&F.push(oe.paragraph(oe.bold(rt.Returns),oe.lineBreak,h.join(oe.lineBreak))),T&&T.length&&a.length<=1){let E="";typeof T=="string"?E=T:E=T.join(oe.lineBreak)||"",E.length<200&&F.push(oe.paragraph(oe.bold(rt.Remarks),oe.lineBreak,E))}if(P){const E=[];for(const j of P){const G=j.desc?` - ${j.desc}`:"";E.push(`${j.name} (${j.type})${G}`)}F.push(oe.paragraph(oe.bold(rt.Fields),oe.lineBreak,E.join(oe.paragraphBreak)))}if(U){const E=[];for(const j of U){const G=j.desc?` - ${j.desc}`:"";E.push(`${j.name}${j.value?` (${j.value})`:""}${G}`)}F.push(oe.paragraph(oe.bold(rt.EnumMembers),oe.lineBreak,E.join(oe.paragraphBreak)))}return s&&F.push(oe.italic(`${oe.code(c?"⌘":"Ctrl")} + ${xd.clickOnKeywordForMoreHelp}`)),F.join(F.length===2?" ":oe.lineBreak)}const nn="tcc_cursor_position",Id=["submenuitem.EditorContextPeek","editor.action.peekDefinition"];function Ad(a){return a.replace(/<[^<>]+>/,"").replace(/(series|simple|const|input)\s+([\w\d.]+)/,"$2").replace(/\w[\w.\d]*\[\]/,"array")}function qd(a){const n=a.getContribution("editor.contrib.contextmenu"),s=n==null?void 0:n._getMenuActions;n._getMenuActions=function(){return s.apply(n,arguments).filter(function(c){return!Id.includes(c.id)})}}class Cd{constructor(){Object.defineProperty(this,"bracketsPostfix",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_builtinSubtreeCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_formatter",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_namespaceCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_suggestions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_outermostNsItems",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_funcArgsCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userSuggestions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userFuncArgsCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userNamespaceCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userOutermostNsItems",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_methodNamespaceCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userMethods",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userFunctions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_methodFuncs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userTypes",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userEnums",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_nextIsBracket",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.bracketsPostfix="(${0})",this._builtinSubtreeCache={},this._formatter=oe,this._namespaceCache=new Map,this._suggestions=[],this._outermostNsItems=new Map,this._funcArgsCache=new Map,this._userSuggestions=[],this._userFuncArgsCache=new Map,this._userNamespaceCache=new Map,this._userOutermostNsItems=new Map,this._methodNamespaceCache=new Map,this._userMethods=new Map,this._userTypes=new Map,this._methodFuncs=new Map,this._userFunctions=new Map,this._userEnums=new Map,this._nextIsBracket=!1}get methodFuncs(){return this._methodFuncs}get userFuncs(){return this._userFunctions}get userEnums(){return this._userEnums}set nextIsBracket(n){this._nextIsBracket=n}get nextIsBracket(){return this._nextIsBracket}get annotationSuggestions(){return this._getAnnotationCompletionItems(this._builtinSubtreeCache.annotations)}initBuiltinsTrees(){this._getBuiltinsCacheFragment(),this._suggestions=this._getAllCompletionItems(),this._getFuncArgumentsCompletionItemsToCache(this._builtinSubtreeCache.functions)}getArgSuggestions(n){return this._funcArgsCache.get(n)||this._userFuncArgsCache.get(n)}getSuggestions(n){return n?this._namespaceCache.get(n)||this._userNamespaceCache.get(n):this._suggestions.concat(this._userSuggestions)}_initUserDefind(){this._userFuncArgsCache.clear(),this._userNamespaceCache.clear(),this._userOutermostNsItems.clear(),this._methodNamespaceCache.clear(),this._methodFuncs.clear()}setUserDefind(n,s,o,c,l){this._initUserDefind();const m=this._mergeTreeSlices(this._generateTreeSlice(pt.methods,"method"),this._generateTreeSlice(c,"method"));this._getMethodNamespaceCache(m),this._userMethods=c,this._userTypes=s,this._userFunctions=n,this._userEnums=l;const y=this._generateTreeSlice(n,"fun");this._userSuggestions=this._getAllUserCompletionItems(y,this._generateTreeSlice(s,"type"),this._generateTreeSlice(o,"var"),this._generateTreeSlice(l,"enum")),this._getUserFuncArgumentsCompletionItemsToCache(y)}_getAllUserCompletionItems(n,s,o,c){const l=this._getEnumCompletionItems(c),m=this._getUserVariableCompletionItems(o),y=this._getTypeCompletionItems(s,!0),f=this._getFunctionCompletionItems(n,void 0,!0);return[...y,...f,...m,...l,...this._userOutermostNsItems.values()]}_getAllCompletionItems(){const{variables:n,keywords:s,types:o,functions:c}=this._builtinSubtreeCache,l=this._getVariableCompletionItems(n),m=this._getKeywordCompletionItems(s),y=this._getTypeCompletionItems(o),f=this._getFunctionCompletionItems(c),b=this._getSnippetsCompletionsList();return[...l,...m,...y,...f,...this._outermostNsItems.values(),...b]}_getNodeKey(n,s){return`${s}_${n}`}_mergeTreeSlices(...n){const s=new Map;for(const o of n)for(const[c,l]of o){const m=s.get(c);m?s.set(c,{...m,children:this._mergeTreeSlices(l.children,m.children)}):s.set(c,l)}return s}_mergeCompletions(n,s){const o=this._namespaceCache.get(n);o?this._namespaceCache.set(n,[...o,...s]):this._namespaceCache.set(n,s)}_mergeUserCompletions(n,s){const o=this._userNamespaceCache.get(n);o?this._userNamespaceCache.set(n,[...o,...s]):this._userNamespaceCache.set(n,s)}_generateTreeSlice(n,s){const o=new Map;for(const[c,l]of n){const[m,...y]=c.split("."),f=y.length>0,b=o.get(this._getNodeKey(m,f?"ns":s));let h=new Map,T=l.map(U=>({...U,name:c})),P=this._getNodeKey(c,s);if(f&&s!=="type"){const U=new Map([[y.join("."),l]]);T=[{name:m,title:ge.namespace}],P=this._getNodeKey(m,"ns"),h=this._generateTreeSlice(U,s)}b&&(T=[{name:m,title:ge.namespace}],h=this._mergeTreeSlices(b.children,h)),o.set(P,{value:T,children:h})}return o}_getBuiltinsCacheFragment(){const{keywords:n,variables:s,constants:o,types:c,functions:l,annotations:m}=pt,y=this._generateTreeSlice(m,"an");return y.delete("an_@version="),this._builtinSubtreeCache={keywords:this._generateTreeSlice(n,"key"),variables:this._mergeTreeSlices(this._generateTreeSlice(s,"var"),this._generateTreeSlice(o,"var")),types:this._generateTreeSlice(c,"type"),functions:this._generateTreeSlice(l,"fun"),annotations:y},this._builtinSubtreeCache}_getVariableCompletionItems(n,s){const o=[],c=[];for(const[l,m]of n){const{value:y,children:f}=m;if(l.startsWith("ns")){const b=this._getNamespaceCompletionItem(y[0]);if(s){c.push({...b});const T=`${s}.${b.label}`;b.label=T,b.insertText=T}const h=this._getVariableCompletionItems(f,b.label);s||this._outermostNsItems.set(l,b),o.push(...h)}else{const b=this._getVariableCompletionItem(y[0],s?3:2);if(s){c.push({...b});const{label:h}=b;b.label=`${s}.${h}`,b.insertText=`${s}.${b.insertText}`,b.filterText=`${h}\r`}o.push(b)}}return c.length&&s&&this._mergeCompletions(s,c),o}_setUserVariableSubItems(n,s){var b,h,T,P;let o=[];const c=Ad(n.type||""),l=this._methodNamespaceCache.get(c),m=s?`${s}.${n.name}`:n.name;l&&(o=l.filter(U=>{var G;const F=`${c}.${U.label}`,E=pt.methods.get(F)||this._userMethods.get(F),j=E==null?void 0:E.some(V=>!V.thisType||V.thisType[0].includes("<>")||V.thisType.includes(n.type||""));if(j&&E){const V=this._getNamedArgumentsCompletionList(((G=E[0])==null?void 0:G.args)||[]),B=`${m}.${U.label}`;this._userFuncArgsCache.set(B,V),this._methodFuncs.set(B,E)}return j}));const{types:y}=pt,f=((h=(b=this._userTypes.get(c))==null?void 0:b[0])==null?void 0:h.fields)||((P=(T=y.get(c))==null?void 0:T[0])==null?void 0:P.fields);if(f)for(const U of f){const F=U.name,E=U.type,j=this._getInstanceTypeCompletionItemProp({name:F,type:E,desc:U.desc?[U.desc]:void 0});this._setUserVariableSubItems({name:F,type:E},n.name),o.push({...j})}o.length&&this._mergeUserCompletions(m,o)}_getUserVariableCompletionItems(n,s){const o=[],c=[];for(const[l,m]of n){const{value:y,children:f}=m;if(this._setUserVariableSubItems(y[0]),l.startsWith("ns")){const b=this._getNamespaceCompletionItem(y[0]);if(s){c.push({...b});const T=`${s}.${b.label}`;b.label=T,b.insertText=T}const h=this._getUserVariableCompletionItems(f,b.label);s||this._userOutermostNsItems.set(l,b),o.push(...h)}else{const b=this._getVariableCompletionItem(y[0],s?2:1,!1);if(s){c.push({...b});const{label:h}=b;b.label=`${s}.${h}`,b.insertText=`${s}.${b.insertText}`,b.filterText=`${h}\r`}o.push(b)}}return c.length&&s&&this._mergeUserCompletions(s,c),o}_getTypeCompletionItems(n,s=!1){const o=[];for(const[,c]of n){const{value:l}=c,m=s?this._getCustomTypeCompletionItem(l[0]):this._getTypeCompletionItem(l[0]);o.push(m)}return o}_getEnumCompletionItems(n){const s=[];for(const[,o]of n){const{value:c}=o,l=this._getEnumCompletionItem(c[0]);s.push(l);const m=c[0].members;m!=null&&m.length&&this._getEnumMemberCompletionItems(c[0].name,m)}return s}_getEnumMemberCompletionItems(n,s){const o=[];for(const c of s){const{name:l,desc:m,value:y}=c,f=this._getEnumMemberCompletionItem({name:l,desc:m?[m]:void 0,value:y});o.push(f)}o.length&&this._mergeUserCompletions(n,o)}_getAnnotationCompletionItems(n){const s=[];for(const[,o]of n){const{value:c}=o,l=this._getAnnotationCompletionItem(c[0]);s.push(l)}return s}_getKeywordCompletionItems(n){const s=[];for(const[,o]of n){const{value:c}=o,l=this._getKeywordCompletionItem(c[0]);s.push(l)}return s}_getMethodNamespaceCache(n,s){const o=[];for(const[c,l]of n){const{value:m,children:y}=l;if(c.startsWith("ns")){const f=this._getNamespaceCompletionItem(m[0]);if(s){o.push({...f});const b=`${s}.${f.label}`;f.label=b,f.insertText=b}this._getMethodNamespaceCache(y,f.label)}else{const f=this._getFunctionCompletionItem(m[0],s?3:2);if(m.length>1&&(f.detail=`${f.detail} (+${m.length-1} overloads)`),s){o.push({...f});const{label:b}=f;f.label=`${s}.${b}`,f.insertText=`${s}.${f.insertText}`,f.originInsertText=`${s}.${f.originInsertText}`,f.filterText=`${b}\r`}}}s&&this._methodNamespaceCache.set(s,o)}_getFunctionCompletionItems(n,s,o=!1){const c=[],l=[];for(const[m,y]of n){const{value:f,children:b}=y;if(m.startsWith("ns")){const h=this._getNamespaceCompletionItem(f[0]);if(s){l.push({...h});const P=`${s}.${h.label}`;h.label=P,h.insertText=P}const T=this._getFunctionCompletionItems(b,h.label,o);s||(o?this._userOutermostNsItems.set(m,h):this._outermostNsItems.set(m,h)),c.push(...T)}else{const h=this._getFunctionCompletionItem(f[0],s?3:2,!o);if(f.length>1&&(h.detail=`${h.detail} (+${f.length-1} overloads)`),s){l.push({...h});const{label:T}=h;h.label=`${s}.${T}`,h.insertText=`${s}.${h.insertText}`,h.originInsertText=`${s}.${h.originInsertText}`,h.filterText=`${T}\r`}c.push(h)}}return l.length&&s&&(o?this._mergeUserCompletions(s,l):this._mergeCompletions(s,l)),c}_getSnippetsCompletionsList(){return bd.map(n=>{const{label:s,kind:o,insertText:c}=n,l=s.charAt(0).toUpperCase()+s.substring(1),m={value:this._formatter.pineCode(c.replace(/\${\d:([^}]+)}|\${\d}/g,"$1"))};return{label:s,detail:`(${l} ${o})`,insertText:c,insertTextRules:ke.languages.CompletionItemInsertTextRule.InsertAsSnippet,sortText:`2_${s}`,kind:ke.languages.CompletionItemKind.Snippet,documentation:m}})}_getFuncArgumentsCompletionItemsToCache(n,s){for(const[o,c]of n){const{name:l}=c.value[0];if(o.startsWith("ns"))this._getFuncArgumentsCompletionItemsToCache(c.children,s?`${s}.${l}`:l);else{const m=new Map;c.value.reduce((b,h)=>{const T=h.args;return T&&T.length&&T.forEach(P=>{b.set(P.name,P)}),b},m);const y=this._getNamedArgumentsCompletionList([...m.values()]),f=s?`${s}.${l}`:l;this._funcArgsCache.set(f,y)}}}_getUserFuncArgumentsCompletionItemsToCache(n,s){for(const[o,c]of n){const{name:l}=c.value[0];if(o.startsWith("ns"))this._getUserFuncArgumentsCompletionItemsToCache(c.children,s?`${s}.${l}`:l);else{const m=new Map;c.value.reduce((b,h)=>{const T=h.args;return T&&T.length&&T.forEach(P=>{b.set(P.name,P)}),b},m);const y=this._getNamedArgumentsCompletionList([...m.values()]),f=s?`${s}.${l}`:l;this._userFuncArgsCache.set(f,y)}}}_getNamedArgumentsCompletionList(n){return n.map(s=>{const{name:o,desc:c,displayType:l}=s,m=`${o} = `,y=Array.isArray(c)?c.join(this._formatter.delimiter):c||"";return{label:m,documentation:{value:this._formatter.paragraph(this._formatter.bold(ge.Description),this._formatter.lineBreak,y)},insertText:m,detail:`(${ge.parameter}) ${ge.types} ${l}`,kind:ke.languages.CompletionItemKind.Text,sortText:`0_${m}`}})}_getVariableCompletionItem(n,s=2,o=!0){const c=this._extractExamples(n),l=this._extractDescription(n),m=[this._createDescriptionSection(l)];c.length?m.push(this._createExampleSection(c)):n.syntax&&n.syntax.length&&m.push(this._createSyntaxSection(n.syntax));const y={value:m.join(this._formatter.lineBreak)},f=o?ge.variables:ge.userDefinedVariable;return{documentation:y,label:n.name,insertText:n.name,kind:ke.languages.CompletionItemKind.Variable,sortText:`${s}_${n.name}`,detail:`(${f}) ${n.type}`}}_getKeywordCompletionItem(n,s=2){const o=this._extractExamples(n),c=this._extractDescription(n),l=[this._createDescriptionSection(c)];return o.length?l.push(this._createExampleSection(o)):n.syntax&&n.syntax.length&&l.push(this._createSyntaxSection(n.syntax)),{documentation:{value:l.join(this._formatter.lineBreak)},label:n.name,insertText:n.name,kind:ke.languages.CompletionItemKind.Keyword,sortText:`${s}_${n.name}`,detail:`(${ge.keywords})`}}_getTypeCompletionItem(n){const s=this._extractDescription(n);return{documentation:{value:this._createDescriptionSection(s)},label:n.name,insertText:n.name,kind:ke.languages.CompletionItemKind.Keyword,sortText:`1_${n.name}`,detail:`(${ge.types})`}}_getCustomTypeCompletionItem(n){const s=this._extractDescription(n);return{documentation:{value:this._createDescriptionSection(s)},label:n.name,insertText:n.name,kind:ke.languages.CompletionItemKind.Keyword,sortText:`2_${n.name}`,detail:`(${ge.userDefinedType})`}}_getEnumCompletionItem(n){const s=this._extractDescription(n);return{documentation:{value:this._createDescriptionSection(s)},label:n.name,insertText:n.name,kind:ke.languages.CompletionItemKind.Enum,sortText:`2_${n.name}`,detail:`(${ge.enum})`}}_getEnumMemberCompletionItem(n){const s=this._extractDescription(n);return{documentation:{value:this._createDescriptionSection(s)},label:n.name,insertText:n.name,kind:ke.languages.CompletionItemKind.EnumMember,sortText:`2_${n.name}`,detail:`(enum member) ${n.value?`${n.name} = ${n.value}`:`${n.name}`}`}}_getInstanceTypeCompletionItemProp(n){const s=this._extractDescription(n),o=[];return s&&o.push(this._formatter.paragraph(this._formatter.bold(rt.Description),this._formatter.lineBreak,s)),{documentation:{value:o.join(this._formatter.lineBreak)},label:n.name,insertText:n.name,kind:ke.languages.CompletionItemKind.Field,sortText:`2_${n.name}`,detail:`(${ge.field}) ${n.type}`}}_getFunctionCompletionItem(n,s=2,o=!0){var U;const c=n.returnedTypes&&n.returnedTypes[0]||n.syntax&&n.syntax[0]&&((U=n.syntax[0].split("→").pop())==null?void 0:U.trim()),l=this._extractExamples(n),m=this._extractDescription(n),y=[this._createDescriptionSection(m)];l.length?y.push(this._createExampleSection(l)):n.syntax&&n.syntax.length&&y.push(this._createSyntaxSection(n.syntax)),n.returns&&n.returns.length&&y.push(this._createReturnSection(n.returns));const f={value:y.join(this._formatter.lineBreak)},b=n.name,h=o?ge.functions:ge.userDefinedFunction,T=n.template,P=T?`${vd(b)}<\${1}>`:b;return{documentation:f,label:T?`${b.replace(/<.+>/,"")}<type>`:b,kind:ke.languages.CompletionItemKind.Function,sortText:`${s}_${b}`,insertTextRules:ke.languages.CompletionItemInsertTextRule.InsertAsSnippet,insertText:P+this.bracketsPostfix,originInsertText:P,detail:`(${h}) ${ge.returns} ${c}`,command:{id:"tcc.editor.function",title:"",arguments:[T?"editor.action.triggerSuggest":"editor.action.triggerParameterHints"]}}}_getAnnotationCompletionItem(n){const s=this._extractDescription(n),o=this._extractExamples(n),c=[this._createDescriptionSection(s)];return o.length&&c.push(this._createExampleSection(o)),{documentation:{value:c.join(this._formatter.lineBreak)},label:n.name,insertText:n.name.replace("@",""),kind:ke.languages.CompletionItemKind.Keyword,detail:`(${ge.annotations})`}}_getNamespaceCompletionItem(n,s=2){const o=[this._createDescriptionSection(ge.namespaceDesc)];return{label:n.name,documentation:{value:o.join(this._formatter.lineBreak)},detail:`(${ge.namespace}) ${n.name}`,insertText:n.name,sortText:`${s}_${n.name}`,kind:ke.languages.CompletionItemKind.Module}}_extractExamples(n){let s;return n.examples||n.detailedDesc&&((s=n.detailedDesc[0])===null||s===void 0?void 0:s.examples)||[]}_extractDescription(n){return Array.isArray(n.desc)?n.desc.join(this._formatter.lineBreak):n.desc||""}_createExampleSection(n){return this._formatter.paragraph(this._formatter.bold(rt.Example),this._formatter.pineCode(n.join(this._formatter.lineBreak)))}_createSyntaxSection(n){return this._formatter.paragraph(this._formatter.bold(rt.Syntax),this._formatter.pineCode(n.join(this._formatter.lineBreak)))}_createReturnSection(n){return this._formatter.paragraph(this._formatter.bold(rt.Returns),this._formatter.lineBreak,n.join(this._formatter.lineBreak))}_createDescriptionSection(n){return!n||n.trim().length===0?"":this._formatter.paragraph(this._formatter.bold(rt.Description),this._formatter.lineBreak,n)}}const St=new Cd;class zd{constructor(){Object.defineProperty(this,"_userFunctions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userVariables",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userTypes",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userMethods",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userEnums",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_imports",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_overloadsFuncs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._userFunctions=new Map,this._userVariables=new Map,this._userTypes=new Map,this._userMethods=new Map,this._imports=new Map,this._userEnums=new Map,this._overloadsFuncs=[]}get overloadsFuncs(){return this._overloadsFuncs}setUserDefined(n,s){const{functions:o,variables:c,types:l,methods:m,imports:y,enums:f}=n;o&&(this._userFunctions=o),c&&(this._userVariables=c),l&&(this._userTypes=l),m&&(this._userMethods=m),y&&(this._imports=y),f&&(this._userEnums=f),this._overloadsFuncs=s}parseLineContentFuncVar(n,s,o,c){let l=(o==null?void 0:o.getLineContent(s))||"";const m=l.indexOf("//");if(this._removeString(l).indexOf("//")!==-1&&m<=n)return;l=l+" ";const y=this._getVariablesDocVal(l,n,s);if(y){if(y.isBuildIn){const h=o==null?void 0:o.getWordAtPosition(c||new ke.Position(s,n));if(((o==null?void 0:o.getValueInRange({startLineNumber:s,startColumn:(h==null?void 0:h.endColumn)||0,endLineNumber:s,endColumn:((h==null?void 0:h.endColumn)||0)+2}))||"").trim().startsWith("="))return null}return y}const f=this._getFuncsDocVal(l,n,s);if(f)return f;const b=l.match(/[a-zA-Z_][a-zA-Z_0-9]*(\s*\.\s*[a-zA-Z_][a-zA-Z_0-9]*)*(?=\s*<)/g);if(b){const h=this._matchContent(b,l,n);if(h){const T=this._getBuildInOther(h.name);if(T)return{docValue:T,isBuildIn:!0,index:0};{const P=this._getBuildInFunc(`${h.name}<type>`);if(P)return{docValue:P,isBuildIn:!0,index:0}}}}return this._getImportDocVal(l,n,s)}_getImportDocVal(n,s,o){const c=new RegExp("(?<=(import(\\s+)))([a-zA-Z\\d\\$_\\-\\.\\u00a1-\\uffff\\/]+)","g"),l=new RegExp("(?<=(as\\b)(\\s+))([a-zA-Z\\d\\_\\u00a1\\uffff\\/]+)","g"),m=n.match(c);if(m){const y=this._matchContent(m,n,s);if(y){const b=this._imports.get(y.name);if(b)return b}const f=n.match(l);if(f){const b=this._matchContent(f,n,s);if(b){for(const[h,T]of this._imports)if(T.name===b.name)return T}}}return null}_getBuildInFunc(n){return pt.functions.get(n)}_getBuildInMethod(n){return pt.methods.get(n)}_getBuildInOther(n){const{keywords:s,variables:o,constants:c,types:l}=pt;return s.get(n)||o.get(n)||c.get(n)||l.get(n)}parseCurrentInputFunc(n,s=!1,o=!1){let c=n.length-1,l=0,m=s,y=o;for(;c>=0;){const f=n.charAt(c);if(c-=1,/['"]/.test(f)){const b=f;if(f==="'"){if(m){m=!1;continue}}else if(y){y=!1;continue}for(;c>=0;){const h=n.charAt(c);if(c-=1,h===b)break}}if(!(m||y)&&(/\)/.test(f)&&(l+=1),/\(/.test(f))){if(l>0){l-=1;continue}let b="";for(;c>=0;){const h=n.charAt(c);if(/\s/.test(h)&&!b){c-=1;continue}if(/[^\w.]/.test(h))break;c-=1,b=h+b}if(b)return{funcName:b,startIndex:c+1}}}}parseCurrentInputFuncAndArg(n,s=!1,o=!1){const{funcName:c,startIndex:l}=this.parseCurrentInputFunc(n,s,o)||{};if(c&&typeof l=="number"){let m=n.slice(l+c.length).trim().slice(1),y=-1;if(s&&(y=m.lastIndexOf("'")),o){const h=m.lastIndexOf('"');(h!==-1&&h<y||y===-1)&&(y=h)}y!==-1&&(m=m.substring(0,y));const b=m.replace(/[\w.]+\(.*\)/g,"").split(",").map(h=>{const T=h.trim().split("=");return T.length<=1?"":T[0].trim()});return{startIndex:l,funcName:c,args:b}}}_removeString(n){return n.replace(/\\"|\\'/g,"").replace(/"[^"]*"|'[^']*'/g,"")}_getVariablesDocVal(n,s,o){const c=this._removeString(n).replace(/\/\/.*/g,"").match(/[a-zA-Z_][a-zA-Z_0-9]*(\s*\.\s*[a-zA-Z_][a-zA-Z_0-9]*)*(?=\s*[^(a-zA-Z_0-9."'<])/g);if(c){const l=this._matchContent(c,n,s);if(l){const m={docValue:void 0,isBuildIn:!0,index:0},y=this._getBuildInOther(l.name);if(y)return m.docValue=y,m;const f=this._getUserVariablesDocVal(l.name,s,o);if(f)return Object.assign(m,{docValue:[f],isBuildIn:!1});const b=this._getUserTypesDocVal(l.name);if(b)return Object.assign(m,{docValue:b,isBuildIn:!1});const h=this._getTypesAndFileds(n,l.name,s,o);if(h&&typeof h!="string")return Object.assign(m,{docValue:[h],isBuildIn:!1});const T=this._getUserEnumsDocVal(l,s);if(T)return Object.assign(m,{docValue:T,isBuildIn:!1})}}}_getUserVariablesDocVal(n,s,o){const m=[...this._userVariables.get(n)||[]].sort((y,f)=>(f.scope||0)-(y.scope||0)).find(y=>{const f=y.range;return((f==null?void 0:f.startColumn)||0)<=s&&((f==null?void 0:f.startLineNumber)||0)<=o&&((f==null?void 0:f.endLineNumber)||0)>=o});if(m)return m.title=ge.userDefinedVariable,m.type=this._arrayTypeTransform(m.type),m}_getUserTypesDocVal(n){const s=this._userTypes.get(n);if(s)return s[0].title=ge.userDefinedType,s}_getUserEnumsDocVal(n,s){var f;const{endIndex:o,name:c}=n,l=c.split(".");let m=l[0];l.length>2&&(m=l.slice(0,2).join("."));const y=this._userEnums.get(m);if(y&&y.length){y[0].title=ge.enum;const b=l[l.length-1],h=(f=y[0].members)==null?void 0:f.find(T=>T.name===b);if(!h||s<o-b.length)return y;if(s>o-b.length)return[h]}}_getTypesAndFileds(n,s,o,c){var l,m;if(s.includes(".")){const y=s.split(".");let f=y[0],b,h=null,T=n.indexOf(s,o-s.length)+1,P=T+f.length-1;for(const U of y.slice(1)){if(!h){const F=T<=o&&P>=o,E=this._getUserVariablesDocVal(f,o,c);if(F&&E)return E;h=E==null?void 0:E.type}if(h){b=h,T=P+2,P=P+U.length+1;const F=this._userTypes.get(h)||pt.types.get(h),E=(m=(l=F==null?void 0:F[0])==null?void 0:l.fields)==null?void 0:m.find(j=>j.name===U);if(E&&T<=o&&P>=o)return{name:`${h}.${U}`,desc:E.desc,type:this._arrayTypeTransform(E.type),title:ge.field};h=E==null?void 0:E.type}else f=`${f}.${U}`,P=P+U.length+1}return b}}_getFuncsDocVal(n,s,o){const c=n.match(/[a-zA-Z_][a-zA-Z_0-9]*(\s*\.\s*[a-zA-Z_][a-zA-Z_0-9]*)*(?=\s*\()/g);if(c){const l=this._matchContent(c,n,s);if(l){const m={docValue:void 0,isBuildIn:!0,endIndex:l.endIndex,index:0},y=this._getBuildInFunc(l.name);if(y)return m.index=this._getOverloadsFuncIndex(y,s,l.name,o),Object.assign(m,{docValue:y});const f=this._getUserFuncsDocVal(l.name);if(f)return m.index=this._getOverloadsFuncIndex(f,s,l.name,o),Object.assign(m,{docValue:f,isBuildIn:!1});const b=this._getUserVarFuncsDocVal(n,l.name,s,o);if(b)return Object.assign(m,{docValue:[b],isBuildIn:!1})}}}_getOverloadsFuncIndex(n,s,o,c){if(n.length>1){const l=this._overloadsFuncs.find(m=>m.name===o&&m.line===c&&m.startColumn<=s&&m.endColumn>=s);if(l)return l.index}return 0}_getUserFuncsDocVal(n){const s=this._userFunctions.get(n);if(s){for(const o of s)o.title=ge.userDefinedFunction;return s}}_getUserMethodsDocVal(n){const s=this._userMethods.get(n);if(s){for(const o of s)o.title=ge.userDefinedFunction;return s}}_getUserVarFuncsDocVal(n,s,o,c){var l;if(s.includes(".")){const m=s.split("."),y=this._getTypesAndFileds(n,s,o,c);if(typeof y=="string"){const b=`${this._arrayTypeTransform(y).replace(/<[^<>]+>/,"").replace(/(series|simple|const|input)\s+([\w\d.]+)/,"$2")}.${m.pop()}`,h=this._getBuildInMethod(b);if(h){const T=this._getOverloadsFuncIndex(h,o,b,c);return{...h[0],name:b,index:T}}return(l=this._getUserMethodsDocVal(b))==null?void 0:l[0]}else return y}}_arrayTypeTransform(n=""){return n.includes("[]")?`array<${n.replace("[]","")}>`:n}_matchContent(n,s,o){let c=0;for(const l of n){c=o-l.length;const m=s.indexOf(l,c);if(c=m+l.length,this._judgeVal(s,m,c)&&m+1<=o&&c>=o)return{name:l,endIndex:c}}}_judgeVal(n,s,o){const c=n.charAt(s-1),l=/[\w\d."'/]/;if(l.test(c))return!1;const m=n.charAt(o);return!l.test(m)}}const br=new zd;var Ws={exports:{}};/**
112
112
  * @license
113
113
  * Lodash <https://lodash.com/>
114
114
  * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
115
115
  * Released under MIT license <https://lodash.com/license>
116
116
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
117
117
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
118
- */Ws.exports,function(a,n){(function(){var s,o="4.17.21",c=200,l="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",m="Expected a function",_="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",b=500,h="__lodash_placeholder__",T=1,P=2,U=4,F=1,E=2,j=1,G=2,V=4,B=8,k=16,O=32,Y=64,S=128,W=256,ae=512,ce=30,Qe="...",Et=800,Ue=16,Ke=1,Z=2,ge=3,Le=1/0,Me=9007199254740991,dt=17976931348623157e292,wt=NaN,re=4294967295,he=re-1,Pe=re>>>1,Nt=[["ary",S],["bind",j],["bindKey",G],["curry",B],["curryRight",k],["flip",ae],["partial",O],["partialRight",Y],["rearg",W]],je="[object Arguments]",Lt="[object Array]",Ze="[object AsyncFunction]",Kt="[object Boolean]",Gt="[object Date]",Pr="[object DOMException]",Or="[object Error]",wr="[object Function]",aa="[object GeneratorFunction]",mt="[object Map]",$t="[object Number]",Rr="[object Null]",vt="[object Object]",_s="[object Promise]",Fr="[object Proxy]",vr="[object RegExp]",ut="[object Set]",Xt="[object String]",Br="[object Symbol]",Tn="[object Undefined]",or="[object WeakMap]",na="[object WeakSet]",Mt="[object ArrayBuffer]",lr="[object DataView]",Ur="[object Float32Array]",Kr="[object Float64Array]",Tr="[object Int8Array]",fs="[object Int16Array]",gs="[object Int32Array]",bs="[object Uint8Array]",xs="[object Uint8ClampedArray]",hs="[object Uint16Array]",ws="[object Uint32Array]",Dn=/\b__p \+= '';/g,vs=/\b(__p \+=) '' \+/g,ia=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Vt=/&(?:amp|lt|gt|quot|#39);/g,$r=/[&<>"']/g,Ts=RegExp(Vt.source),oa=RegExp($r.source),kn=/<%-([\s\S]+?)%>/g,la=/<%([\s\S]+?)%>/g,ca=/<%=([\s\S]+?)%>/g,pa=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,da=/^\w*$/,In=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ds=/[\\^$.*+?()[\]{}|]/g,ma=RegExp(Ds.source),ks=/^\s+/,An=/\s/,qn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Cn=/\{\n\/\* \[wrapped with (.+)\] \*/,g=/,? & /,M=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,K=/[()=,{}\[\]\/\s]/,te=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,we=/\w*$/,ue=/^[-+]0x[0-9a-f]+$/i,de=/^0b[01]+$/i,He=/^\[object .+?Constructor\]$/,Ce=/^0o[0-7]+$/i,Ee=/^(?:0|[1-9]\d*)$/,st=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Pt=/($^)/,ua=/['\n\r\u2028\u2029\\]/g,at="\\ud800-\\udfff",$m="\\u0300-\\u036f",jm="\\ufe20-\\ufe2f",Hm="\\u20d0-\\u20ff",Oo=$m+jm+Hm,Ro="\\u2700-\\u27bf",Fo="a-z\\xdf-\\xf6\\xf8-\\xff",Wm="\\xac\\xb1\\xd7\\xf7",Gm="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Xm="\\u2000-\\u206f",Vm=" \\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",Bo="A-Z\\xc0-\\xd6\\xd8-\\xde",Uo="\\ufe0e\\ufe0f",Ko=Wm+Gm+Xm+Vm,zn="['’]",Ym="["+at+"]",$o="["+Ko+"]",ya="["+Oo+"]",jo="\\d+",Qm="["+Ro+"]",Ho="["+Fo+"]",Wo="[^"+at+Ko+jo+Ro+Fo+Bo+"]",Sn="\\ud83c[\\udffb-\\udfff]",Zm="(?:"+ya+"|"+Sn+")",Go="[^"+at+"]",En="(?:\\ud83c[\\udde6-\\uddff]){2}",Nn="[\\ud800-\\udbff][\\udc00-\\udfff]",jr="["+Bo+"]",Xo="\\u200d",Vo="(?:"+Ho+"|"+Wo+")",Jm="(?:"+jr+"|"+Wo+")",Yo="(?:"+zn+"(?:d|ll|m|re|s|t|ve))?",Qo="(?:"+zn+"(?:D|LL|M|RE|S|T|VE))?",Zo=Zm+"?",Jo="["+Uo+"]?",eu="(?:"+Xo+"(?:"+[Go,En,Nn].join("|")+")"+Jo+Zo+")*",tu="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ru="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",el=Jo+Zo+eu,su="(?:"+[Qm,En,Nn].join("|")+")"+el,au="(?:"+[Go+ya+"?",ya,En,Nn,Ym].join("|")+")",nu=RegExp(zn,"g"),iu=RegExp(ya,"g"),Ln=RegExp(Sn+"(?="+Sn+")|"+au+el,"g"),ou=RegExp([jr+"?"+Ho+"+"+Yo+"(?="+[$o,jr,"$"].join("|")+")",Jm+"+"+Qo+"(?="+[$o,jr+Vo,"$"].join("|")+")",jr+"?"+Vo+"+"+Yo,jr+"+"+Qo,ru,tu,jo,su].join("|"),"g"),lu=RegExp("["+Xo+at+Oo+Uo+"]"),cu=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,pu=["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"],du=-1,Ae={};Ae[Ur]=Ae[Kr]=Ae[Tr]=Ae[fs]=Ae[gs]=Ae[bs]=Ae[xs]=Ae[hs]=Ae[ws]=!0,Ae[je]=Ae[Lt]=Ae[Mt]=Ae[Kt]=Ae[lr]=Ae[Gt]=Ae[Or]=Ae[wr]=Ae[mt]=Ae[$t]=Ae[vt]=Ae[vr]=Ae[ut]=Ae[Xt]=Ae[or]=!1;var Ie={};Ie[je]=Ie[Lt]=Ie[Mt]=Ie[lr]=Ie[Kt]=Ie[Gt]=Ie[Ur]=Ie[Kr]=Ie[Tr]=Ie[fs]=Ie[gs]=Ie[mt]=Ie[$t]=Ie[vt]=Ie[vr]=Ie[ut]=Ie[Xt]=Ie[Br]=Ie[bs]=Ie[xs]=Ie[hs]=Ie[ws]=!0,Ie[Or]=Ie[wr]=Ie[or]=!1;var mu={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},uu={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},yu={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},_u={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},fu=parseFloat,gu=parseInt,tl=typeof as=="object"&&as&&as.Object===Object&&as,bu=typeof self=="object"&&self&&self.Object===Object&&self,We=tl||bu||Function("return this")(),Mn=n&&!n.nodeType&&n,Dr=Mn&&!0&&a&&!a.nodeType&&a,rl=Dr&&Dr.exports===Mn,Pn=rl&&tl.process,Tt=function(){try{var w=Dr&&Dr.require&&Dr.require("util").types;return w||Pn&&Pn.binding&&Pn.binding("util")}catch{}}(),sl=Tt&&Tt.isArrayBuffer,al=Tt&&Tt.isDate,nl=Tt&&Tt.isMap,il=Tt&&Tt.isRegExp,ol=Tt&&Tt.isSet,ll=Tt&&Tt.isTypedArray;function yt(w,q,D){switch(D.length){case 0:return w.call(q);case 1:return w.call(q,D[0]);case 2:return w.call(q,D[0],D[1]);case 3:return w.call(q,D[0],D[1],D[2])}return w.apply(q,D)}function xu(w,q,D,H){for(var se=-1,xe=w==null?0:w.length;++se<xe;){var Fe=w[se];q(H,Fe,D(Fe),w)}return H}function Dt(w,q){for(var D=-1,H=w==null?0:w.length;++D<H&&q(w[D],D,w)!==!1;);return w}function hu(w,q){for(var D=w==null?0:w.length;D--&&q(w[D],D,w)!==!1;);return w}function cl(w,q){for(var D=-1,H=w==null?0:w.length;++D<H;)if(!q(w[D],D,w))return!1;return!0}function cr(w,q){for(var D=-1,H=w==null?0:w.length,se=0,xe=[];++D<H;){var Fe=w[D];q(Fe,D,w)&&(xe[se++]=Fe)}return xe}function _a(w,q){var D=w==null?0:w.length;return!!D&&Hr(w,q,0)>-1}function On(w,q,D){for(var H=-1,se=w==null?0:w.length;++H<se;)if(D(q,w[H]))return!0;return!1}function qe(w,q){for(var D=-1,H=w==null?0:w.length,se=Array(H);++D<H;)se[D]=q(w[D],D,w);return se}function pr(w,q){for(var D=-1,H=q.length,se=w.length;++D<H;)w[se+D]=q[D];return w}function Rn(w,q,D,H){var se=-1,xe=w==null?0:w.length;for(H&&xe&&(D=w[++se]);++se<xe;)D=q(D,w[se],se,w);return D}function wu(w,q,D,H){var se=w==null?0:w.length;for(H&&se&&(D=w[--se]);se--;)D=q(D,w[se],se,w);return D}function Fn(w,q){for(var D=-1,H=w==null?0:w.length;++D<H;)if(q(w[D],D,w))return!0;return!1}var vu=Bn("length");function Tu(w){return w.split("")}function Du(w){return w.match(M)||[]}function pl(w,q,D){var H;return D(w,function(se,xe,Fe){if(q(se,xe,Fe))return H=xe,!1}),H}function fa(w,q,D,H){for(var se=w.length,xe=D+(H?1:-1);H?xe--:++xe<se;)if(q(w[xe],xe,w))return xe;return-1}function Hr(w,q,D){return q===q?Pu(w,q,D):fa(w,dl,D)}function ku(w,q,D,H){for(var se=D-1,xe=w.length;++se<xe;)if(H(w[se],q))return se;return-1}function dl(w){return w!==w}function ml(w,q){var D=w==null?0:w.length;return D?Kn(w,q)/D:wt}function Bn(w){return function(q){return q==null?s:q[w]}}function Un(w){return function(q){return w==null?s:w[q]}}function ul(w,q,D,H,se){return se(w,function(xe,Fe,De){D=H?(H=!1,xe):q(D,xe,Fe,De)}),D}function Iu(w,q){var D=w.length;for(w.sort(q);D--;)w[D]=w[D].value;return w}function Kn(w,q){for(var D,H=-1,se=w.length;++H<se;){var xe=q(w[H]);xe!==s&&(D=D===s?xe:D+xe)}return D}function $n(w,q){for(var D=-1,H=Array(w);++D<w;)H[D]=q(D);return H}function Au(w,q){return qe(q,function(D){return[D,w[D]]})}function yl(w){return w&&w.slice(0,bl(w)+1).replace(ks,"")}function _t(w){return function(q){return w(q)}}function jn(w,q){return qe(q,function(D){return w[D]})}function Is(w,q){return w.has(q)}function _l(w,q){for(var D=-1,H=w.length;++D<H&&Hr(q,w[D],0)>-1;);return D}function fl(w,q){for(var D=w.length;D--&&Hr(q,w[D],0)>-1;);return D}function qu(w,q){for(var D=w.length,H=0;D--;)w[D]===q&&++H;return H}var Cu=Un(mu),zu=Un(uu);function Su(w){return"\\"+_u[w]}function Eu(w,q){return w==null?s:w[q]}function Wr(w){return lu.test(w)}function Nu(w){return cu.test(w)}function Lu(w){for(var q,D=[];!(q=w.next()).done;)D.push(q.value);return D}function Hn(w){var q=-1,D=Array(w.size);return w.forEach(function(H,se){D[++q]=[se,H]}),D}function gl(w,q){return function(D){return w(q(D))}}function dr(w,q){for(var D=-1,H=w.length,se=0,xe=[];++D<H;){var Fe=w[D];(Fe===q||Fe===h)&&(w[D]=h,xe[se++]=D)}return xe}function ga(w){var q=-1,D=Array(w.size);return w.forEach(function(H){D[++q]=H}),D}function Mu(w){var q=-1,D=Array(w.size);return w.forEach(function(H){D[++q]=[H,H]}),D}function Pu(w,q,D){for(var H=D-1,se=w.length;++H<se;)if(w[H]===q)return H;return-1}function Ou(w,q,D){for(var H=D+1;H--;)if(w[H]===q)return H;return H}function Gr(w){return Wr(w)?Fu(w):vu(w)}function Ot(w){return Wr(w)?Bu(w):Tu(w)}function bl(w){for(var q=w.length;q--&&An.test(w.charAt(q)););return q}var Ru=Un(yu);function Fu(w){for(var q=Ln.lastIndex=0;Ln.test(w);)++q;return q}function Bu(w){return w.match(Ln)||[]}function Uu(w){return w.match(ou)||[]}var Ku=function w(q){q=q==null?We:Xr.defaults(We.Object(),q,Xr.pick(We,pu));var D=q.Array,H=q.Date,se=q.Error,xe=q.Function,Fe=q.Math,De=q.Object,Wn=q.RegExp,$u=q.String,kt=q.TypeError,ba=D.prototype,ju=xe.prototype,Vr=De.prototype,xa=q["__core-js_shared__"],ha=ju.toString,Te=Vr.hasOwnProperty,Hu=0,xl=function(){var e=/[^.]+$/.exec(xa&&xa.keys&&xa.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),wa=Vr.toString,Wu=ha.call(De),Gu=We._,Xu=Wn("^"+ha.call(Te).replace(Ds,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),va=rl?q.Buffer:s,mr=q.Symbol,Ta=q.Uint8Array,hl=va?va.allocUnsafe:s,Da=gl(De.getPrototypeOf,De),wl=De.create,vl=Vr.propertyIsEnumerable,ka=ba.splice,Tl=mr?mr.isConcatSpreadable:s,As=mr?mr.iterator:s,kr=mr?mr.toStringTag:s,Ia=function(){try{var e=zr(De,"defineProperty");return e({},"",{}),e}catch{}}(),Vu=q.clearTimeout!==We.clearTimeout&&q.clearTimeout,Yu=H&&H.now!==We.Date.now&&H.now,Qu=q.setTimeout!==We.setTimeout&&q.setTimeout,Aa=Fe.ceil,qa=Fe.floor,Gn=De.getOwnPropertySymbols,Zu=va?va.isBuffer:s,Dl=q.isFinite,Ju=ba.join,ey=gl(De.keys,De),Be=Fe.max,Ve=Fe.min,ty=H.now,ry=q.parseInt,kl=Fe.random,sy=ba.reverse,Xn=zr(q,"DataView"),qs=zr(q,"Map"),Vn=zr(q,"Promise"),Yr=zr(q,"Set"),Cs=zr(q,"WeakMap"),zs=zr(De,"create"),Ca=Cs&&new Cs,Qr={},ay=Sr(Xn),ny=Sr(qs),iy=Sr(Vn),oy=Sr(Yr),ly=Sr(Cs),za=mr?mr.prototype:s,Ss=za?za.valueOf:s,Il=za?za.toString:s;function d(e){if(Ne(e)&&!ne(e)&&!(e instanceof ye)){if(e instanceof It)return e;if(Te.call(e,"__wrapped__"))return Ac(e)}return new It(e)}var Zr=function(){function e(){}return function(t){if(!ze(t))return{};if(wl)return wl(t);e.prototype=t;var r=new e;return e.prototype=s,r}}();function Sa(){}function It(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=s}d.templateSettings={escape:kn,evaluate:la,interpolate:ca,variable:"",imports:{_:d}},d.prototype=Sa.prototype,d.prototype.constructor=d,It.prototype=Zr(Sa.prototype),It.prototype.constructor=It;function ye(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=re,this.__views__=[]}function cy(){var e=new ye(this.__wrapped__);return e.__actions__=nt(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=nt(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=nt(this.__views__),e}function py(){if(this.__filtered__){var e=new ye(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function dy(){var e=this.__wrapped__.value(),t=this.__dir__,r=ne(e),i=t<0,p=r?e.length:0,u=T_(0,p,this.__views__),y=u.start,x=u.end,v=x-y,C=i?x:y-1,z=this.__iteratees__,N=z.length,$=0,X=Ve(v,this.__takeCount__);if(!r||!i&&p==v&&X==v)return Yl(e,this.__actions__);var J=[];e:for(;v--&&$<X;){C+=t;for(var le=-1,ee=e[C];++le<N;){var me=z[le],_e=me.iteratee,bt=me.type,tt=_e(ee);if(bt==Z)ee=tt;else if(!tt){if(bt==Ke)continue e;break e}}J[$++]=ee}return J}ye.prototype=Zr(Sa.prototype),ye.prototype.constructor=ye;function Ir(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}function my(){this.__data__=zs?zs(null):{},this.size=0}function uy(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function yy(e){var t=this.__data__;if(zs){var r=t[e];return r===f?s:r}return Te.call(t,e)?t[e]:s}function _y(e){var t=this.__data__;return zs?t[e]!==s:Te.call(t,e)}function fy(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=zs&&t===s?f:t,this}Ir.prototype.clear=my,Ir.prototype.delete=uy,Ir.prototype.get=yy,Ir.prototype.has=_y,Ir.prototype.set=fy;function Yt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}function gy(){this.__data__=[],this.size=0}function by(e){var t=this.__data__,r=Ea(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():ka.call(t,r,1),--this.size,!0}function xy(e){var t=this.__data__,r=Ea(t,e);return r<0?s:t[r][1]}function hy(e){return Ea(this.__data__,e)>-1}function wy(e,t){var r=this.__data__,i=Ea(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}Yt.prototype.clear=gy,Yt.prototype.delete=by,Yt.prototype.get=xy,Yt.prototype.has=hy,Yt.prototype.set=wy;function Qt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}function vy(){this.size=0,this.__data__={hash:new Ir,map:new(qs||Yt),string:new Ir}}function Ty(e){var t=ja(this,e).delete(e);return this.size-=t?1:0,t}function Dy(e){return ja(this,e).get(e)}function ky(e){return ja(this,e).has(e)}function Iy(e,t){var r=ja(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}Qt.prototype.clear=vy,Qt.prototype.delete=Ty,Qt.prototype.get=Dy,Qt.prototype.has=ky,Qt.prototype.set=Iy;function Ar(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Qt;++t<r;)this.add(e[t])}function Ay(e){return this.__data__.set(e,f),this}function qy(e){return this.__data__.has(e)}Ar.prototype.add=Ar.prototype.push=Ay,Ar.prototype.has=qy;function Rt(e){var t=this.__data__=new Yt(e);this.size=t.size}function Cy(){this.__data__=new Yt,this.size=0}function zy(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function Sy(e){return this.__data__.get(e)}function Ey(e){return this.__data__.has(e)}function Ny(e,t){var r=this.__data__;if(r instanceof Yt){var i=r.__data__;if(!qs||i.length<c-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new Qt(i)}return r.set(e,t),this.size=r.size,this}Rt.prototype.clear=Cy,Rt.prototype.delete=zy,Rt.prototype.get=Sy,Rt.prototype.has=Ey,Rt.prototype.set=Ny;function Al(e,t){var r=ne(e),i=!r&&Er(e),p=!r&&!i&&gr(e),u=!r&&!i&&!p&&rs(e),y=r||i||p||u,x=y?$n(e.length,$u):[],v=x.length;for(var C in e)(t||Te.call(e,C))&&!(y&&(C=="length"||p&&(C=="offset"||C=="parent")||u&&(C=="buffer"||C=="byteLength"||C=="byteOffset")||tr(C,v)))&&x.push(C);return x}function ql(e){var t=e.length;return t?e[ii(0,t-1)]:s}function Ly(e,t){return Ha(nt(e),qr(t,0,e.length))}function My(e){return Ha(nt(e))}function Yn(e,t,r){(r!==s&&!Ft(e[t],r)||r===s&&!(t in e))&&Zt(e,t,r)}function Es(e,t,r){var i=e[t];(!(Te.call(e,t)&&Ft(i,r))||r===s&&!(t in e))&&Zt(e,t,r)}function Ea(e,t){for(var r=e.length;r--;)if(Ft(e[r][0],t))return r;return-1}function Py(e,t,r,i){return ur(e,function(p,u,y){t(i,p,r(p),y)}),i}function Cl(e,t){return e&&Ht(t,$e(t),e)}function Oy(e,t){return e&&Ht(t,ot(t),e)}function Zt(e,t,r){t=="__proto__"&&Ia?Ia(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function Qn(e,t){for(var r=-1,i=t.length,p=D(i),u=e==null;++r<i;)p[r]=u?s:Si(e,t[r]);return p}function qr(e,t,r){return e===e&&(r!==s&&(e=e<=r?e:r),t!==s&&(e=e>=t?e:t)),e}function At(e,t,r,i,p,u){var y,x=t&T,v=t&P,C=t&U;if(r&&(y=p?r(e,i,p,u):r(e)),y!==s)return y;if(!ze(e))return e;var z=ne(e);if(z){if(y=k_(e),!x)return nt(e,y)}else{var N=Ye(e),$=N==wr||N==aa;if(gr(e))return Jl(e,x);if(N==vt||N==je||$&&!p){if(y=v||$?{}:bc(e),!x)return v?y_(e,Oy(y,e)):u_(e,Cl(y,e))}else{if(!Ie[N])return p?e:{};y=I_(e,N,x)}}u||(u=new Rt);var X=u.get(e);if(X)return X;u.set(e,y),Gc(e)?e.forEach(function(ee){y.add(At(ee,t,r,ee,e,u))}):Hc(e)&&e.forEach(function(ee,me){y.set(me,At(ee,t,r,me,e,u))});var J=C?v?gi:fi:v?ot:$e,le=z?s:J(e);return Dt(le||e,function(ee,me){le&&(me=ee,ee=e[me]),Es(y,me,At(ee,t,r,me,e,u))}),y}function Ry(e){var t=$e(e);return function(r){return zl(r,e,t)}}function zl(e,t,r){var i=r.length;if(e==null)return!i;for(e=De(e);i--;){var p=r[i],u=t[p],y=e[p];if(y===s&&!(p in e)||!u(y))return!1}return!0}function Sl(e,t,r){if(typeof e!="function")throw new kt(m);return Fs(function(){e.apply(s,r)},t)}function Ns(e,t,r,i){var p=-1,u=_a,y=!0,x=e.length,v=[],C=t.length;if(!x)return v;r&&(t=qe(t,_t(r))),i?(u=On,y=!1):t.length>=c&&(u=Is,y=!1,t=new Ar(t));e:for(;++p<x;){var z=e[p],N=r==null?z:r(z);if(z=i||z!==0?z:0,y&&N===N){for(var $=C;$--;)if(t[$]===N)continue e;v.push(z)}else u(t,N,i)||v.push(z)}return v}var ur=ac(jt),El=ac(Jn,!0);function Fy(e,t){var r=!0;return ur(e,function(i,p,u){return r=!!t(i,p,u),r}),r}function Na(e,t,r){for(var i=-1,p=e.length;++i<p;){var u=e[i],y=t(u);if(y!=null&&(x===s?y===y&&!gt(y):r(y,x)))var x=y,v=u}return v}function By(e,t,r,i){var p=e.length;for(r=ie(r),r<0&&(r=-r>p?0:p+r),i=i===s||i>p?p:ie(i),i<0&&(i+=p),i=r>i?0:Vc(i);r<i;)e[r++]=t;return e}function Nl(e,t){var r=[];return ur(e,function(i,p,u){t(i,p,u)&&r.push(i)}),r}function Ge(e,t,r,i,p){var u=-1,y=e.length;for(r||(r=q_),p||(p=[]);++u<y;){var x=e[u];t>0&&r(x)?t>1?Ge(x,t-1,r,i,p):pr(p,x):i||(p[p.length]=x)}return p}var Zn=nc(),Ll=nc(!0);function jt(e,t){return e&&Zn(e,t,$e)}function Jn(e,t){return e&&Ll(e,t,$e)}function La(e,t){return cr(t,function(r){return rr(e[r])})}function Cr(e,t){t=_r(t,e);for(var r=0,i=t.length;e!=null&&r<i;)e=e[Wt(t[r++])];return r&&r==i?e:s}function Ml(e,t,r){var i=t(e);return ne(e)?i:pr(i,r(e))}function Je(e){return e==null?e===s?Tn:Rr:kr&&kr in De(e)?v_(e):M_(e)}function ei(e,t){return e>t}function Uy(e,t){return e!=null&&Te.call(e,t)}function Ky(e,t){return e!=null&&t in De(e)}function $y(e,t,r){return e>=Ve(t,r)&&e<Be(t,r)}function ti(e,t,r){for(var i=r?On:_a,p=e[0].length,u=e.length,y=u,x=D(u),v=1/0,C=[];y--;){var z=e[y];y&&t&&(z=qe(z,_t(t))),v=Ve(z.length,v),x[y]=!r&&(t||p>=120&&z.length>=120)?new Ar(y&&z):s}z=e[0];var N=-1,$=x[0];e:for(;++N<p&&C.length<v;){var X=z[N],J=t?t(X):X;if(X=r||X!==0?X:0,!($?Is($,J):i(C,J,r))){for(y=u;--y;){var le=x[y];if(!(le?Is(le,J):i(e[y],J,r)))continue e}$&&$.push(J),C.push(X)}}return C}function jy(e,t,r,i){return jt(e,function(p,u,y){t(i,r(p),u,y)}),i}function Ls(e,t,r){t=_r(t,e),e=vc(e,t);var i=e==null?e:e[Wt(Ct(t))];return i==null?s:yt(i,e,r)}function Pl(e){return Ne(e)&&Je(e)==je}function Hy(e){return Ne(e)&&Je(e)==Mt}function Wy(e){return Ne(e)&&Je(e)==Gt}function Ms(e,t,r,i,p){return e===t?!0:e==null||t==null||!Ne(e)&&!Ne(t)?e!==e&&t!==t:Gy(e,t,r,i,Ms,p)}function Gy(e,t,r,i,p,u){var y=ne(e),x=ne(t),v=y?Lt:Ye(e),C=x?Lt:Ye(t);v=v==je?vt:v,C=C==je?vt:C;var z=v==vt,N=C==vt,$=v==C;if($&&gr(e)){if(!gr(t))return!1;y=!0,z=!1}if($&&!z)return u||(u=new Rt),y||rs(e)?_c(e,t,r,i,p,u):h_(e,t,v,r,i,p,u);if(!(r&F)){var X=z&&Te.call(e,"__wrapped__"),J=N&&Te.call(t,"__wrapped__");if(X||J){var le=X?e.value():e,ee=J?t.value():t;return u||(u=new Rt),p(le,ee,r,i,u)}}return $?(u||(u=new Rt),w_(e,t,r,i,p,u)):!1}function Xy(e){return Ne(e)&&Ye(e)==mt}function ri(e,t,r,i){var p=r.length,u=p,y=!i;if(e==null)return!u;for(e=De(e);p--;){var x=r[p];if(y&&x[2]?x[1]!==e[x[0]]:!(x[0]in e))return!1}for(;++p<u;){x=r[p];var v=x[0],C=e[v],z=x[1];if(y&&x[2]){if(C===s&&!(v in e))return!1}else{var N=new Rt;if(i)var $=i(C,z,v,e,t,N);if(!($===s?Ms(z,C,F|E,i,N):$))return!1}}return!0}function Ol(e){if(!ze(e)||z_(e))return!1;var t=rr(e)?Xu:He;return t.test(Sr(e))}function Vy(e){return Ne(e)&&Je(e)==vr}function Yy(e){return Ne(e)&&Ye(e)==ut}function Qy(e){return Ne(e)&&Qa(e.length)&&!!Ae[Je(e)]}function Rl(e){return typeof e=="function"?e:e==null?lt:typeof e=="object"?ne(e)?Ul(e[0],e[1]):Bl(e):ip(e)}function si(e){if(!Rs(e))return ey(e);var t=[];for(var r in De(e))Te.call(e,r)&&r!="constructor"&&t.push(r);return t}function Zy(e){if(!ze(e))return L_(e);var t=Rs(e),r=[];for(var i in e)i=="constructor"&&(t||!Te.call(e,i))||r.push(i);return r}function ai(e,t){return e<t}function Fl(e,t){var r=-1,i=it(e)?D(e.length):[];return ur(e,function(p,u,y){i[++r]=t(p,u,y)}),i}function Bl(e){var t=xi(e);return t.length==1&&t[0][2]?hc(t[0][0],t[0][1]):function(r){return r===e||ri(r,e,t)}}function Ul(e,t){return wi(e)&&xc(t)?hc(Wt(e),t):function(r){var i=Si(r,e);return i===s&&i===t?Ei(r,e):Ms(t,i,F|E)}}function Ma(e,t,r,i,p){e!==t&&Zn(t,function(u,y){if(p||(p=new Rt),ze(u))Jy(e,t,y,r,Ma,i,p);else{var x=i?i(Ti(e,y),u,y+"",e,t,p):s;x===s&&(x=u),Yn(e,y,x)}},ot)}function Jy(e,t,r,i,p,u,y){var x=Ti(e,r),v=Ti(t,r),C=y.get(v);if(C){Yn(e,r,C);return}var z=u?u(x,v,r+"",e,t,y):s,N=z===s;if(N){var $=ne(v),X=!$&&gr(v),J=!$&&!X&&rs(v);z=v,$||X||J?ne(x)?z=x:Oe(x)?z=nt(x):X?(N=!1,z=Jl(v,!0)):J?(N=!1,z=ec(v,!0)):z=[]:Bs(v)||Er(v)?(z=x,Er(x)?z=Yc(x):(!ze(x)||rr(x))&&(z=bc(v))):N=!1}N&&(y.set(v,z),p(z,v,i,u,y),y.delete(v)),Yn(e,r,z)}function Kl(e,t){var r=e.length;if(r)return t+=t<0?r:0,tr(t,r)?e[t]:s}function $l(e,t,r){t.length?t=qe(t,function(u){return ne(u)?function(y){return Cr(y,u.length===1?u[0]:u)}:u}):t=[lt];var i=-1;t=qe(t,_t(Q()));var p=Fl(e,function(u,y,x){var v=qe(t,function(C){return C(u)});return{criteria:v,index:++i,value:u}});return Iu(p,function(u,y){return m_(u,y,r)})}function e_(e,t){return jl(e,t,function(r,i){return Ei(e,i)})}function jl(e,t,r){for(var i=-1,p=t.length,u={};++i<p;){var y=t[i],x=Cr(e,y);r(x,y)&&Ps(u,_r(y,e),x)}return u}function t_(e){return function(t){return Cr(t,e)}}function ni(e,t,r,i){var p=i?ku:Hr,u=-1,y=t.length,x=e;for(e===t&&(t=nt(t)),r&&(x=qe(e,_t(r)));++u<y;)for(var v=0,C=t[u],z=r?r(C):C;(v=p(x,z,v,i))>-1;)x!==e&&ka.call(x,v,1),ka.call(e,v,1);return e}function Hl(e,t){for(var r=e?t.length:0,i=r-1;r--;){var p=t[r];if(r==i||p!==u){var u=p;tr(p)?ka.call(e,p,1):ci(e,p)}}return e}function ii(e,t){return e+qa(kl()*(t-e+1))}function r_(e,t,r,i){for(var p=-1,u=Be(Aa((t-e)/(r||1)),0),y=D(u);u--;)y[i?u:++p]=e,e+=r;return y}function oi(e,t){var r="";if(!e||t<1||t>Me)return r;do t%2&&(r+=e),t=qa(t/2),t&&(e+=e);while(t);return r}function pe(e,t){return Di(wc(e,t,lt),e+"")}function s_(e){return ql(ss(e))}function a_(e,t){var r=ss(e);return Ha(r,qr(t,0,r.length))}function Ps(e,t,r,i){if(!ze(e))return e;t=_r(t,e);for(var p=-1,u=t.length,y=u-1,x=e;x!=null&&++p<u;){var v=Wt(t[p]),C=r;if(v==="__proto__"||v==="constructor"||v==="prototype")return e;if(p!=y){var z=x[v];C=i?i(z,v,x):s,C===s&&(C=ze(z)?z:tr(t[p+1])?[]:{})}Es(x,v,C),x=x[v]}return e}var Wl=Ca?function(e,t){return Ca.set(e,t),e}:lt,n_=Ia?function(e,t){return Ia(e,"toString",{configurable:!0,enumerable:!1,value:Li(t),writable:!0})}:lt;function i_(e){return Ha(ss(e))}function qt(e,t,r){var i=-1,p=e.length;t<0&&(t=-t>p?0:p+t),r=r>p?p:r,r<0&&(r+=p),p=t>r?0:r-t>>>0,t>>>=0;for(var u=D(p);++i<p;)u[i]=e[i+t];return u}function o_(e,t){var r;return ur(e,function(i,p,u){return r=t(i,p,u),!r}),!!r}function Pa(e,t,r){var i=0,p=e==null?i:e.length;if(typeof t=="number"&&t===t&&p<=Pe){for(;i<p;){var u=i+p>>>1,y=e[u];y!==null&&!gt(y)&&(r?y<=t:y<t)?i=u+1:p=u}return p}return li(e,t,lt,r)}function li(e,t,r,i){var p=0,u=e==null?0:e.length;if(u===0)return 0;t=r(t);for(var y=t!==t,x=t===null,v=gt(t),C=t===s;p<u;){var z=qa((p+u)/2),N=r(e[z]),$=N!==s,X=N===null,J=N===N,le=gt(N);if(y)var ee=i||J;else C?ee=J&&(i||$):x?ee=J&&$&&(i||!X):v?ee=J&&$&&!X&&(i||!le):X||le?ee=!1:ee=i?N<=t:N<t;ee?p=z+1:u=z}return Ve(u,he)}function Gl(e,t){for(var r=-1,i=e.length,p=0,u=[];++r<i;){var y=e[r],x=t?t(y):y;if(!r||!Ft(x,v)){var v=x;u[p++]=y===0?0:y}}return u}function Xl(e){return typeof e=="number"?e:gt(e)?wt:+e}function ft(e){if(typeof e=="string")return e;if(ne(e))return qe(e,ft)+"";if(gt(e))return Il?Il.call(e):"";var t=e+"";return t=="0"&&1/e==-Le?"-0":t}function yr(e,t,r){var i=-1,p=_a,u=e.length,y=!0,x=[],v=x;if(r)y=!1,p=On;else if(u>=c){var C=t?null:b_(e);if(C)return ga(C);y=!1,p=Is,v=new Ar}else v=t?[]:x;e:for(;++i<u;){var z=e[i],N=t?t(z):z;if(z=r||z!==0?z:0,y&&N===N){for(var $=v.length;$--;)if(v[$]===N)continue e;t&&v.push(N),x.push(z)}else p(v,N,r)||(v!==x&&v.push(N),x.push(z))}return x}function ci(e,t){return t=_r(t,e),e=vc(e,t),e==null||delete e[Wt(Ct(t))]}function Vl(e,t,r,i){return Ps(e,t,r(Cr(e,t)),i)}function Oa(e,t,r,i){for(var p=e.length,u=i?p:-1;(i?u--:++u<p)&&t(e[u],u,e););return r?qt(e,i?0:u,i?u+1:p):qt(e,i?u+1:0,i?p:u)}function Yl(e,t){var r=e;return r instanceof ye&&(r=r.value()),Rn(t,function(i,p){return p.func.apply(p.thisArg,pr([i],p.args))},r)}function pi(e,t,r){var i=e.length;if(i<2)return i?yr(e[0]):[];for(var p=-1,u=D(i);++p<i;)for(var y=e[p],x=-1;++x<i;)x!=p&&(u[p]=Ns(u[p]||y,e[x],t,r));return yr(Ge(u,1),t,r)}function Ql(e,t,r){for(var i=-1,p=e.length,u=t.length,y={};++i<p;){var x=i<u?t[i]:s;r(y,e[i],x)}return y}function di(e){return Oe(e)?e:[]}function mi(e){return typeof e=="function"?e:lt}function _r(e,t){return ne(e)?e:wi(e,t)?[e]:Ic(ve(e))}var l_=pe;function fr(e,t,r){var i=e.length;return r=r===s?i:r,!t&&r>=i?e:qt(e,t,r)}var Zl=Vu||function(e){return We.clearTimeout(e)};function Jl(e,t){if(t)return e.slice();var r=e.length,i=hl?hl(r):new e.constructor(r);return e.copy(i),i}function ui(e){var t=new e.constructor(e.byteLength);return new Ta(t).set(new Ta(e)),t}function c_(e,t){var r=t?ui(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}function p_(e){var t=new e.constructor(e.source,we.exec(e));return t.lastIndex=e.lastIndex,t}function d_(e){return Ss?De(Ss.call(e)):{}}function ec(e,t){var r=t?ui(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function tc(e,t){if(e!==t){var r=e!==s,i=e===null,p=e===e,u=gt(e),y=t!==s,x=t===null,v=t===t,C=gt(t);if(!x&&!C&&!u&&e>t||u&&y&&v&&!x&&!C||i&&y&&v||!r&&v||!p)return 1;if(!i&&!u&&!C&&e<t||C&&r&&p&&!i&&!u||x&&r&&p||!y&&p||!v)return-1}return 0}function m_(e,t,r){for(var i=-1,p=e.criteria,u=t.criteria,y=p.length,x=r.length;++i<y;){var v=tc(p[i],u[i]);if(v){if(i>=x)return v;var C=r[i];return v*(C=="desc"?-1:1)}}return e.index-t.index}function rc(e,t,r,i){for(var p=-1,u=e.length,y=r.length,x=-1,v=t.length,C=Be(u-y,0),z=D(v+C),N=!i;++x<v;)z[x]=t[x];for(;++p<y;)(N||p<u)&&(z[r[p]]=e[p]);for(;C--;)z[x++]=e[p++];return z}function sc(e,t,r,i){for(var p=-1,u=e.length,y=-1,x=r.length,v=-1,C=t.length,z=Be(u-x,0),N=D(z+C),$=!i;++p<z;)N[p]=e[p];for(var X=p;++v<C;)N[X+v]=t[v];for(;++y<x;)($||p<u)&&(N[X+r[y]]=e[p++]);return N}function nt(e,t){var r=-1,i=e.length;for(t||(t=D(i));++r<i;)t[r]=e[r];return t}function Ht(e,t,r,i){var p=!r;r||(r={});for(var u=-1,y=t.length;++u<y;){var x=t[u],v=i?i(r[x],e[x],x,r,e):s;v===s&&(v=e[x]),p?Zt(r,x,v):Es(r,x,v)}return r}function u_(e,t){return Ht(e,hi(e),t)}function y_(e,t){return Ht(e,fc(e),t)}function Ra(e,t){return function(r,i){var p=ne(r)?xu:Py,u=t?t():{};return p(r,e,Q(i,2),u)}}function Jr(e){return pe(function(t,r){var i=-1,p=r.length,u=p>1?r[p-1]:s,y=p>2?r[2]:s;for(u=e.length>3&&typeof u=="function"?(p--,u):s,y&&et(r[0],r[1],y)&&(u=p<3?s:u,p=1),t=De(t);++i<p;){var x=r[i];x&&e(t,x,i,u)}return t})}function ac(e,t){return function(r,i){if(r==null)return r;if(!it(r))return e(r,i);for(var p=r.length,u=t?p:-1,y=De(r);(t?u--:++u<p)&&i(y[u],u,y)!==!1;);return r}}function nc(e){return function(t,r,i){for(var p=-1,u=De(t),y=i(t),x=y.length;x--;){var v=y[e?x:++p];if(r(u[v],v,u)===!1)break}return t}}function __(e,t,r){var i=t&j,p=Os(e);function u(){var y=this&&this!==We&&this instanceof u?p:e;return y.apply(i?r:this,arguments)}return u}function ic(e){return function(t){t=ve(t);var r=Wr(t)?Ot(t):s,i=r?r[0]:t.charAt(0),p=r?fr(r,1).join(""):t.slice(1);return i[e]()+p}}function es(e){return function(t){return Rn(ap(sp(t).replace(nu,"")),e,"")}}function Os(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=Zr(e.prototype),i=e.apply(r,t);return ze(i)?i:r}}function f_(e,t,r){var i=Os(e);function p(){for(var u=arguments.length,y=D(u),x=u,v=ts(p);x--;)y[x]=arguments[x];var C=u<3&&y[0]!==v&&y[u-1]!==v?[]:dr(y,v);if(u-=C.length,u<r)return dc(e,t,Fa,p.placeholder,s,y,C,s,s,r-u);var z=this&&this!==We&&this instanceof p?i:e;return yt(z,this,y)}return p}function oc(e){return function(t,r,i){var p=De(t);if(!it(t)){var u=Q(r,3);t=$e(t),r=function(x){return u(p[x],x,p)}}var y=e(t,r,i);return y>-1?p[u?t[y]:y]:s}}function lc(e){return er(function(t){var r=t.length,i=r,p=It.prototype.thru;for(e&&t.reverse();i--;){var u=t[i];if(typeof u!="function")throw new kt(m);if(p&&!y&&$a(u)=="wrapper")var y=new It([],!0)}for(i=y?i:r;++i<r;){u=t[i];var x=$a(u),v=x=="wrapper"?bi(u):s;v&&vi(v[0])&&v[1]==(S|B|O|W)&&!v[4].length&&v[9]==1?y=y[$a(v[0])].apply(y,v[3]):y=u.length==1&&vi(u)?y[x]():y.thru(u)}return function(){var C=arguments,z=C[0];if(y&&C.length==1&&ne(z))return y.plant(z).value();for(var N=0,$=r?t[N].apply(this,C):z;++N<r;)$=t[N].call(this,$);return $}})}function Fa(e,t,r,i,p,u,y,x,v,C){var z=t&S,N=t&j,$=t&G,X=t&(B|k),J=t&ae,le=$?s:Os(e);function ee(){for(var me=arguments.length,_e=D(me),bt=me;bt--;)_e[bt]=arguments[bt];if(X)var tt=ts(ee),xt=qu(_e,tt);if(i&&(_e=rc(_e,i,p,X)),u&&(_e=sc(_e,u,y,X)),me-=xt,X&&me<C){var Re=dr(_e,tt);return dc(e,t,Fa,ee.placeholder,r,_e,Re,x,v,C-me)}var Bt=N?r:this,ar=$?Bt[e]:e;return me=_e.length,x?_e=P_(_e,x):J&&me>1&&_e.reverse(),z&&v<me&&(_e.length=v),this&&this!==We&&this instanceof ee&&(ar=le||Os(ar)),ar.apply(Bt,_e)}return ee}function cc(e,t){return function(r,i){return jy(r,e,t(i),{})}}function Ba(e,t){return function(r,i){var p;if(r===s&&i===s)return t;if(r!==s&&(p=r),i!==s){if(p===s)return i;typeof r=="string"||typeof i=="string"?(r=ft(r),i=ft(i)):(r=Xl(r),i=Xl(i)),p=e(r,i)}return p}}function yi(e){return er(function(t){return t=qe(t,_t(Q())),pe(function(r){var i=this;return e(t,function(p){return yt(p,i,r)})})})}function Ua(e,t){t=t===s?" ":ft(t);var r=t.length;if(r<2)return r?oi(t,e):t;var i=oi(t,Aa(e/Gr(t)));return Wr(t)?fr(Ot(i),0,e).join(""):i.slice(0,e)}function g_(e,t,r,i){var p=t&j,u=Os(e);function y(){for(var x=-1,v=arguments.length,C=-1,z=i.length,N=D(z+v),$=this&&this!==We&&this instanceof y?u:e;++C<z;)N[C]=i[C];for(;v--;)N[C++]=arguments[++x];return yt($,p?r:this,N)}return y}function pc(e){return function(t,r,i){return i&&typeof i!="number"&&et(t,r,i)&&(r=i=s),t=sr(t),r===s?(r=t,t=0):r=sr(r),i=i===s?t<r?1:-1:sr(i),r_(t,r,i,e)}}function Ka(e){return function(t,r){return typeof t=="string"&&typeof r=="string"||(t=zt(t),r=zt(r)),e(t,r)}}function dc(e,t,r,i,p,u,y,x,v,C){var z=t&B,N=z?y:s,$=z?s:y,X=z?u:s,J=z?s:u;t|=z?O:Y,t&=~(z?Y:O),t&V||(t&=~(j|G));var le=[e,t,p,X,N,J,$,x,v,C],ee=r.apply(s,le);return vi(e)&&Tc(ee,le),ee.placeholder=i,Dc(ee,e,t)}function _i(e){var t=Fe[e];return function(r,i){if(r=zt(r),i=i==null?0:Ve(ie(i),292),i&&Dl(r)){var p=(ve(r)+"e").split("e"),u=t(p[0]+"e"+(+p[1]+i));return p=(ve(u)+"e").split("e"),+(p[0]+"e"+(+p[1]-i))}return t(r)}}var b_=Yr&&1/ga(new Yr([,-0]))[1]==Le?function(e){return new Yr(e)}:Oi;function mc(e){return function(t){var r=Ye(t);return r==mt?Hn(t):r==ut?Mu(t):Au(t,e(t))}}function Jt(e,t,r,i,p,u,y,x){var v=t&G;if(!v&&typeof e!="function")throw new kt(m);var C=i?i.length:0;if(C||(t&=~(O|Y),i=p=s),y=y===s?y:Be(ie(y),0),x=x===s?x:ie(x),C-=p?p.length:0,t&Y){var z=i,N=p;i=p=s}var $=v?s:bi(e),X=[e,t,r,i,p,z,N,u,y,x];if($&&N_(X,$),e=X[0],t=X[1],r=X[2],i=X[3],p=X[4],x=X[9]=X[9]===s?v?0:e.length:Be(X[9]-C,0),!x&&t&(B|k)&&(t&=~(B|k)),!t||t==j)var J=__(e,t,r);else t==B||t==k?J=f_(e,t,x):(t==O||t==(j|O))&&!p.length?J=g_(e,t,r,i):J=Fa.apply(s,X);var le=$?Wl:Tc;return Dc(le(J,X),e,t)}function uc(e,t,r,i){return e===s||Ft(e,Vr[r])&&!Te.call(i,r)?t:e}function yc(e,t,r,i,p,u){return ze(e)&&ze(t)&&(u.set(t,e),Ma(e,t,s,yc,u),u.delete(t)),e}function x_(e){return Bs(e)?s:e}function _c(e,t,r,i,p,u){var y=r&F,x=e.length,v=t.length;if(x!=v&&!(y&&v>x))return!1;var C=u.get(e),z=u.get(t);if(C&&z)return C==t&&z==e;var N=-1,$=!0,X=r&E?new Ar:s;for(u.set(e,t),u.set(t,e);++N<x;){var J=e[N],le=t[N];if(i)var ee=y?i(le,J,N,t,e,u):i(J,le,N,e,t,u);if(ee!==s){if(ee)continue;$=!1;break}if(X){if(!Fn(t,function(me,_e){if(!Is(X,_e)&&(J===me||p(J,me,r,i,u)))return X.push(_e)})){$=!1;break}}else if(!(J===le||p(J,le,r,i,u))){$=!1;break}}return u.delete(e),u.delete(t),$}function h_(e,t,r,i,p,u,y){switch(r){case lr:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Mt:return!(e.byteLength!=t.byteLength||!u(new Ta(e),new Ta(t)));case Kt:case Gt:case $t:return Ft(+e,+t);case Or:return e.name==t.name&&e.message==t.message;case vr:case Xt:return e==t+"";case mt:var x=Hn;case ut:var v=i&F;if(x||(x=ga),e.size!=t.size&&!v)return!1;var C=y.get(e);if(C)return C==t;i|=E,y.set(e,t);var z=_c(x(e),x(t),i,p,u,y);return y.delete(e),z;case Br:if(Ss)return Ss.call(e)==Ss.call(t)}return!1}function w_(e,t,r,i,p,u){var y=r&F,x=fi(e),v=x.length,C=fi(t),z=C.length;if(v!=z&&!y)return!1;for(var N=v;N--;){var $=x[N];if(!(y?$ in t:Te.call(t,$)))return!1}var X=u.get(e),J=u.get(t);if(X&&J)return X==t&&J==e;var le=!0;u.set(e,t),u.set(t,e);for(var ee=y;++N<v;){$=x[N];var me=e[$],_e=t[$];if(i)var bt=y?i(_e,me,$,t,e,u):i(me,_e,$,e,t,u);if(!(bt===s?me===_e||p(me,_e,r,i,u):bt)){le=!1;break}ee||(ee=$=="constructor")}if(le&&!ee){var tt=e.constructor,xt=t.constructor;tt!=xt&&"constructor"in e&&"constructor"in t&&!(typeof tt=="function"&&tt instanceof tt&&typeof xt=="function"&&xt instanceof xt)&&(le=!1)}return u.delete(e),u.delete(t),le}function er(e){return Di(wc(e,s,zc),e+"")}function fi(e){return Ml(e,$e,hi)}function gi(e){return Ml(e,ot,fc)}var bi=Ca?function(e){return Ca.get(e)}:Oi;function $a(e){for(var t=e.name+"",r=Qr[t],i=Te.call(Qr,t)?r.length:0;i--;){var p=r[i],u=p.func;if(u==null||u==e)return p.name}return t}function ts(e){var t=Te.call(d,"placeholder")?d:e;return t.placeholder}function Q(){var e=d.iteratee||Mi;return e=e===Mi?Rl:e,arguments.length?e(arguments[0],arguments[1]):e}function ja(e,t){var r=e.__data__;return C_(t)?r[typeof t=="string"?"string":"hash"]:r.map}function xi(e){for(var t=$e(e),r=t.length;r--;){var i=t[r],p=e[i];t[r]=[i,p,xc(p)]}return t}function zr(e,t){var r=Eu(e,t);return Ol(r)?r:s}function v_(e){var t=Te.call(e,kr),r=e[kr];try{e[kr]=s;var i=!0}catch{}var p=wa.call(e);return i&&(t?e[kr]=r:delete e[kr]),p}var hi=Gn?function(e){return e==null?[]:(e=De(e),cr(Gn(e),function(t){return vl.call(e,t)}))}:Ri,fc=Gn?function(e){for(var t=[];e;)pr(t,hi(e)),e=Da(e);return t}:Ri,Ye=Je;(Xn&&Ye(new Xn(new ArrayBuffer(1)))!=lr||qs&&Ye(new qs)!=mt||Vn&&Ye(Vn.resolve())!=_s||Yr&&Ye(new Yr)!=ut||Cs&&Ye(new Cs)!=or)&&(Ye=function(e){var t=Je(e),r=t==vt?e.constructor:s,i=r?Sr(r):"";if(i)switch(i){case ay:return lr;case ny:return mt;case iy:return _s;case oy:return ut;case ly:return or}return t});function T_(e,t,r){for(var i=-1,p=r.length;++i<p;){var u=r[i],y=u.size;switch(u.type){case"drop":e+=y;break;case"dropRight":t-=y;break;case"take":t=Ve(t,e+y);break;case"takeRight":e=Be(e,t-y);break}}return{start:e,end:t}}function D_(e){var t=e.match(Cn);return t?t[1].split(g):[]}function gc(e,t,r){t=_r(t,e);for(var i=-1,p=t.length,u=!1;++i<p;){var y=Wt(t[i]);if(!(u=e!=null&&r(e,y)))break;e=e[y]}return u||++i!=p?u:(p=e==null?0:e.length,!!p&&Qa(p)&&tr(y,p)&&(ne(e)||Er(e)))}function k_(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&Te.call(e,"index")&&(r.index=e.index,r.input=e.input),r}function bc(e){return typeof e.constructor=="function"&&!Rs(e)?Zr(Da(e)):{}}function I_(e,t,r){var i=e.constructor;switch(t){case Mt:return ui(e);case Kt:case Gt:return new i(+e);case lr:return c_(e,r);case Ur:case Kr:case Tr:case fs:case gs:case bs:case xs:case hs:case ws:return ec(e,r);case mt:return new i;case $t:case Xt:return new i(e);case vr:return p_(e);case ut:return new i;case Br:return d_(e)}}function A_(e,t){var r=t.length;if(!r)return e;var i=r-1;return t[i]=(r>1?"& ":"")+t[i],t=t.join(r>2?", ":" "),e.replace(qn,`{
118
+ */Ws.exports,function(a,n){(function(){var s,o="4.17.21",c=200,l="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",m="Expected a function",y="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",b=500,h="__lodash_placeholder__",T=1,P=2,U=4,F=1,E=2,j=1,G=2,V=4,B=8,k=16,O=32,Y=64,S=128,W=256,ae=512,ce=30,Qe="...",Et=800,Ue=16,Ke=1,Z=2,be=3,Le=1/0,Me=9007199254740991,dt=17976931348623157e292,wt=NaN,re=4294967295,he=re-1,Pe=re>>>1,Nt=[["ary",S],["bind",j],["bindKey",G],["curry",B],["curryRight",k],["flip",ae],["partial",O],["partialRight",Y],["rearg",W]],je="[object Arguments]",Lt="[object Array]",Ze="[object AsyncFunction]",Kt="[object Boolean]",Gt="[object Date]",Pr="[object DOMException]",Or="[object Error]",wr="[object Function]",aa="[object GeneratorFunction]",mt="[object Map]",$t="[object Number]",Rr="[object Null]",vt="[object Object]",_s="[object Promise]",Fr="[object Proxy]",vr="[object RegExp]",ut="[object Set]",Xt="[object String]",Br="[object Symbol]",Tn="[object Undefined]",or="[object WeakMap]",na="[object WeakSet]",Mt="[object ArrayBuffer]",lr="[object DataView]",Ur="[object Float32Array]",Kr="[object Float64Array]",Tr="[object Int8Array]",fs="[object Int16Array]",gs="[object Int32Array]",bs="[object Uint8Array]",xs="[object Uint8ClampedArray]",hs="[object Uint16Array]",ws="[object Uint32Array]",Dn=/\b__p \+= '';/g,vs=/\b(__p \+=) '' \+/g,ia=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Vt=/&(?:amp|lt|gt|quot|#39);/g,$r=/[&<>"']/g,Ts=RegExp(Vt.source),oa=RegExp($r.source),kn=/<%-([\s\S]+?)%>/g,la=/<%([\s\S]+?)%>/g,ca=/<%=([\s\S]+?)%>/g,pa=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,da=/^\w*$/,In=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ds=/[\\^$.*+?()[\]{}|]/g,ma=RegExp(Ds.source),ks=/^\s+/,An=/\s/,qn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Cn=/\{\n\/\* \[wrapped with (.+)\] \*/,g=/,? & /,M=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,K=/[()=,{}\[\]\/\s]/,te=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,we=/\w*$/,ue=/^[-+]0x[0-9a-f]+$/i,de=/^0b[01]+$/i,He=/^\[object .+?Constructor\]$/,Ce=/^0o[0-7]+$/i,Ee=/^(?:0|[1-9]\d*)$/,st=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Pt=/($^)/,ua=/['\n\r\u2028\u2029\\]/g,at="\\ud800-\\udfff",$m="\\u0300-\\u036f",jm="\\ufe20-\\ufe2f",Hm="\\u20d0-\\u20ff",Oo=$m+jm+Hm,Ro="\\u2700-\\u27bf",Fo="a-z\\xdf-\\xf6\\xf8-\\xff",Wm="\\xac\\xb1\\xd7\\xf7",Gm="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Xm="\\u2000-\\u206f",Vm=" \\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",Bo="A-Z\\xc0-\\xd6\\xd8-\\xde",Uo="\\ufe0e\\ufe0f",Ko=Wm+Gm+Xm+Vm,zn="['’]",Ym="["+at+"]",$o="["+Ko+"]",ya="["+Oo+"]",jo="\\d+",Qm="["+Ro+"]",Ho="["+Fo+"]",Wo="[^"+at+Ko+jo+Ro+Fo+Bo+"]",Sn="\\ud83c[\\udffb-\\udfff]",Zm="(?:"+ya+"|"+Sn+")",Go="[^"+at+"]",En="(?:\\ud83c[\\udde6-\\uddff]){2}",Nn="[\\ud800-\\udbff][\\udc00-\\udfff]",jr="["+Bo+"]",Xo="\\u200d",Vo="(?:"+Ho+"|"+Wo+")",Jm="(?:"+jr+"|"+Wo+")",Yo="(?:"+zn+"(?:d|ll|m|re|s|t|ve))?",Qo="(?:"+zn+"(?:D|LL|M|RE|S|T|VE))?",Zo=Zm+"?",Jo="["+Uo+"]?",eu="(?:"+Xo+"(?:"+[Go,En,Nn].join("|")+")"+Jo+Zo+")*",tu="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ru="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",el=Jo+Zo+eu,su="(?:"+[Qm,En,Nn].join("|")+")"+el,au="(?:"+[Go+ya+"?",ya,En,Nn,Ym].join("|")+")",nu=RegExp(zn,"g"),iu=RegExp(ya,"g"),Ln=RegExp(Sn+"(?="+Sn+")|"+au+el,"g"),ou=RegExp([jr+"?"+Ho+"+"+Yo+"(?="+[$o,jr,"$"].join("|")+")",Jm+"+"+Qo+"(?="+[$o,jr+Vo,"$"].join("|")+")",jr+"?"+Vo+"+"+Yo,jr+"+"+Qo,ru,tu,jo,su].join("|"),"g"),lu=RegExp("["+Xo+at+Oo+Uo+"]"),cu=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,pu=["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"],du=-1,Ae={};Ae[Ur]=Ae[Kr]=Ae[Tr]=Ae[fs]=Ae[gs]=Ae[bs]=Ae[xs]=Ae[hs]=Ae[ws]=!0,Ae[je]=Ae[Lt]=Ae[Mt]=Ae[Kt]=Ae[lr]=Ae[Gt]=Ae[Or]=Ae[wr]=Ae[mt]=Ae[$t]=Ae[vt]=Ae[vr]=Ae[ut]=Ae[Xt]=Ae[or]=!1;var Ie={};Ie[je]=Ie[Lt]=Ie[Mt]=Ie[lr]=Ie[Kt]=Ie[Gt]=Ie[Ur]=Ie[Kr]=Ie[Tr]=Ie[fs]=Ie[gs]=Ie[mt]=Ie[$t]=Ie[vt]=Ie[vr]=Ie[ut]=Ie[Xt]=Ie[Br]=Ie[bs]=Ie[xs]=Ie[hs]=Ie[ws]=!0,Ie[Or]=Ie[wr]=Ie[or]=!1;var mu={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},uu={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},yu={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},_u={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},fu=parseFloat,gu=parseInt,tl=typeof as=="object"&&as&&as.Object===Object&&as,bu=typeof self=="object"&&self&&self.Object===Object&&self,We=tl||bu||Function("return this")(),Mn=n&&!n.nodeType&&n,Dr=Mn&&!0&&a&&!a.nodeType&&a,rl=Dr&&Dr.exports===Mn,Pn=rl&&tl.process,Tt=function(){try{var w=Dr&&Dr.require&&Dr.require("util").types;return w||Pn&&Pn.binding&&Pn.binding("util")}catch{}}(),sl=Tt&&Tt.isArrayBuffer,al=Tt&&Tt.isDate,nl=Tt&&Tt.isMap,il=Tt&&Tt.isRegExp,ol=Tt&&Tt.isSet,ll=Tt&&Tt.isTypedArray;function yt(w,q,D){switch(D.length){case 0:return w.call(q);case 1:return w.call(q,D[0]);case 2:return w.call(q,D[0],D[1]);case 3:return w.call(q,D[0],D[1],D[2])}return w.apply(q,D)}function xu(w,q,D,H){for(var se=-1,xe=w==null?0:w.length;++se<xe;){var Fe=w[se];q(H,Fe,D(Fe),w)}return H}function Dt(w,q){for(var D=-1,H=w==null?0:w.length;++D<H&&q(w[D],D,w)!==!1;);return w}function hu(w,q){for(var D=w==null?0:w.length;D--&&q(w[D],D,w)!==!1;);return w}function cl(w,q){for(var D=-1,H=w==null?0:w.length;++D<H;)if(!q(w[D],D,w))return!1;return!0}function cr(w,q){for(var D=-1,H=w==null?0:w.length,se=0,xe=[];++D<H;){var Fe=w[D];q(Fe,D,w)&&(xe[se++]=Fe)}return xe}function _a(w,q){var D=w==null?0:w.length;return!!D&&Hr(w,q,0)>-1}function On(w,q,D){for(var H=-1,se=w==null?0:w.length;++H<se;)if(D(q,w[H]))return!0;return!1}function qe(w,q){for(var D=-1,H=w==null?0:w.length,se=Array(H);++D<H;)se[D]=q(w[D],D,w);return se}function pr(w,q){for(var D=-1,H=q.length,se=w.length;++D<H;)w[se+D]=q[D];return w}function Rn(w,q,D,H){var se=-1,xe=w==null?0:w.length;for(H&&xe&&(D=w[++se]);++se<xe;)D=q(D,w[se],se,w);return D}function wu(w,q,D,H){var se=w==null?0:w.length;for(H&&se&&(D=w[--se]);se--;)D=q(D,w[se],se,w);return D}function Fn(w,q){for(var D=-1,H=w==null?0:w.length;++D<H;)if(q(w[D],D,w))return!0;return!1}var vu=Bn("length");function Tu(w){return w.split("")}function Du(w){return w.match(M)||[]}function pl(w,q,D){var H;return D(w,function(se,xe,Fe){if(q(se,xe,Fe))return H=xe,!1}),H}function fa(w,q,D,H){for(var se=w.length,xe=D+(H?1:-1);H?xe--:++xe<se;)if(q(w[xe],xe,w))return xe;return-1}function Hr(w,q,D){return q===q?Pu(w,q,D):fa(w,dl,D)}function ku(w,q,D,H){for(var se=D-1,xe=w.length;++se<xe;)if(H(w[se],q))return se;return-1}function dl(w){return w!==w}function ml(w,q){var D=w==null?0:w.length;return D?Kn(w,q)/D:wt}function Bn(w){return function(q){return q==null?s:q[w]}}function Un(w){return function(q){return w==null?s:w[q]}}function ul(w,q,D,H,se){return se(w,function(xe,Fe,De){D=H?(H=!1,xe):q(D,xe,Fe,De)}),D}function Iu(w,q){var D=w.length;for(w.sort(q);D--;)w[D]=w[D].value;return w}function Kn(w,q){for(var D,H=-1,se=w.length;++H<se;){var xe=q(w[H]);xe!==s&&(D=D===s?xe:D+xe)}return D}function $n(w,q){for(var D=-1,H=Array(w);++D<w;)H[D]=q(D);return H}function Au(w,q){return qe(q,function(D){return[D,w[D]]})}function yl(w){return w&&w.slice(0,bl(w)+1).replace(ks,"")}function _t(w){return function(q){return w(q)}}function jn(w,q){return qe(q,function(D){return w[D]})}function Is(w,q){return w.has(q)}function _l(w,q){for(var D=-1,H=w.length;++D<H&&Hr(q,w[D],0)>-1;);return D}function fl(w,q){for(var D=w.length;D--&&Hr(q,w[D],0)>-1;);return D}function qu(w,q){for(var D=w.length,H=0;D--;)w[D]===q&&++H;return H}var Cu=Un(mu),zu=Un(uu);function Su(w){return"\\"+_u[w]}function Eu(w,q){return w==null?s:w[q]}function Wr(w){return lu.test(w)}function Nu(w){return cu.test(w)}function Lu(w){for(var q,D=[];!(q=w.next()).done;)D.push(q.value);return D}function Hn(w){var q=-1,D=Array(w.size);return w.forEach(function(H,se){D[++q]=[se,H]}),D}function gl(w,q){return function(D){return w(q(D))}}function dr(w,q){for(var D=-1,H=w.length,se=0,xe=[];++D<H;){var Fe=w[D];(Fe===q||Fe===h)&&(w[D]=h,xe[se++]=D)}return xe}function ga(w){var q=-1,D=Array(w.size);return w.forEach(function(H){D[++q]=H}),D}function Mu(w){var q=-1,D=Array(w.size);return w.forEach(function(H){D[++q]=[H,H]}),D}function Pu(w,q,D){for(var H=D-1,se=w.length;++H<se;)if(w[H]===q)return H;return-1}function Ou(w,q,D){for(var H=D+1;H--;)if(w[H]===q)return H;return H}function Gr(w){return Wr(w)?Fu(w):vu(w)}function Ot(w){return Wr(w)?Bu(w):Tu(w)}function bl(w){for(var q=w.length;q--&&An.test(w.charAt(q)););return q}var Ru=Un(yu);function Fu(w){for(var q=Ln.lastIndex=0;Ln.test(w);)++q;return q}function Bu(w){return w.match(Ln)||[]}function Uu(w){return w.match(ou)||[]}var Ku=function w(q){q=q==null?We:Xr.defaults(We.Object(),q,Xr.pick(We,pu));var D=q.Array,H=q.Date,se=q.Error,xe=q.Function,Fe=q.Math,De=q.Object,Wn=q.RegExp,$u=q.String,kt=q.TypeError,ba=D.prototype,ju=xe.prototype,Vr=De.prototype,xa=q["__core-js_shared__"],ha=ju.toString,Te=Vr.hasOwnProperty,Hu=0,xl=function(){var e=/[^.]+$/.exec(xa&&xa.keys&&xa.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),wa=Vr.toString,Wu=ha.call(De),Gu=We._,Xu=Wn("^"+ha.call(Te).replace(Ds,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),va=rl?q.Buffer:s,mr=q.Symbol,Ta=q.Uint8Array,hl=va?va.allocUnsafe:s,Da=gl(De.getPrototypeOf,De),wl=De.create,vl=Vr.propertyIsEnumerable,ka=ba.splice,Tl=mr?mr.isConcatSpreadable:s,As=mr?mr.iterator:s,kr=mr?mr.toStringTag:s,Ia=function(){try{var e=zr(De,"defineProperty");return e({},"",{}),e}catch{}}(),Vu=q.clearTimeout!==We.clearTimeout&&q.clearTimeout,Yu=H&&H.now!==We.Date.now&&H.now,Qu=q.setTimeout!==We.setTimeout&&q.setTimeout,Aa=Fe.ceil,qa=Fe.floor,Gn=De.getOwnPropertySymbols,Zu=va?va.isBuffer:s,Dl=q.isFinite,Ju=ba.join,ey=gl(De.keys,De),Be=Fe.max,Ve=Fe.min,ty=H.now,ry=q.parseInt,kl=Fe.random,sy=ba.reverse,Xn=zr(q,"DataView"),qs=zr(q,"Map"),Vn=zr(q,"Promise"),Yr=zr(q,"Set"),Cs=zr(q,"WeakMap"),zs=zr(De,"create"),Ca=Cs&&new Cs,Qr={},ay=Sr(Xn),ny=Sr(qs),iy=Sr(Vn),oy=Sr(Yr),ly=Sr(Cs),za=mr?mr.prototype:s,Ss=za?za.valueOf:s,Il=za?za.toString:s;function d(e){if(Ne(e)&&!ne(e)&&!(e instanceof ye)){if(e instanceof It)return e;if(Te.call(e,"__wrapped__"))return Ac(e)}return new It(e)}var Zr=function(){function e(){}return function(t){if(!ze(t))return{};if(wl)return wl(t);e.prototype=t;var r=new e;return e.prototype=s,r}}();function Sa(){}function It(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=s}d.templateSettings={escape:kn,evaluate:la,interpolate:ca,variable:"",imports:{_:d}},d.prototype=Sa.prototype,d.prototype.constructor=d,It.prototype=Zr(Sa.prototype),It.prototype.constructor=It;function ye(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=re,this.__views__=[]}function cy(){var e=new ye(this.__wrapped__);return e.__actions__=nt(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=nt(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=nt(this.__views__),e}function py(){if(this.__filtered__){var e=new ye(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function dy(){var e=this.__wrapped__.value(),t=this.__dir__,r=ne(e),i=t<0,p=r?e.length:0,u=T_(0,p,this.__views__),_=u.start,x=u.end,v=x-_,C=i?x:_-1,z=this.__iteratees__,N=z.length,$=0,X=Ve(v,this.__takeCount__);if(!r||!i&&p==v&&X==v)return Yl(e,this.__actions__);var J=[];e:for(;v--&&$<X;){C+=t;for(var le=-1,ee=e[C];++le<N;){var me=z[le],_e=me.iteratee,bt=me.type,tt=_e(ee);if(bt==Z)ee=tt;else if(!tt){if(bt==Ke)continue e;break e}}J[$++]=ee}return J}ye.prototype=Zr(Sa.prototype),ye.prototype.constructor=ye;function Ir(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}function my(){this.__data__=zs?zs(null):{},this.size=0}function uy(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function yy(e){var t=this.__data__;if(zs){var r=t[e];return r===f?s:r}return Te.call(t,e)?t[e]:s}function _y(e){var t=this.__data__;return zs?t[e]!==s:Te.call(t,e)}function fy(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=zs&&t===s?f:t,this}Ir.prototype.clear=my,Ir.prototype.delete=uy,Ir.prototype.get=yy,Ir.prototype.has=_y,Ir.prototype.set=fy;function Yt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}function gy(){this.__data__=[],this.size=0}function by(e){var t=this.__data__,r=Ea(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():ka.call(t,r,1),--this.size,!0}function xy(e){var t=this.__data__,r=Ea(t,e);return r<0?s:t[r][1]}function hy(e){return Ea(this.__data__,e)>-1}function wy(e,t){var r=this.__data__,i=Ea(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}Yt.prototype.clear=gy,Yt.prototype.delete=by,Yt.prototype.get=xy,Yt.prototype.has=hy,Yt.prototype.set=wy;function Qt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}function vy(){this.size=0,this.__data__={hash:new Ir,map:new(qs||Yt),string:new Ir}}function Ty(e){var t=ja(this,e).delete(e);return this.size-=t?1:0,t}function Dy(e){return ja(this,e).get(e)}function ky(e){return ja(this,e).has(e)}function Iy(e,t){var r=ja(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}Qt.prototype.clear=vy,Qt.prototype.delete=Ty,Qt.prototype.get=Dy,Qt.prototype.has=ky,Qt.prototype.set=Iy;function Ar(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Qt;++t<r;)this.add(e[t])}function Ay(e){return this.__data__.set(e,f),this}function qy(e){return this.__data__.has(e)}Ar.prototype.add=Ar.prototype.push=Ay,Ar.prototype.has=qy;function Rt(e){var t=this.__data__=new Yt(e);this.size=t.size}function Cy(){this.__data__=new Yt,this.size=0}function zy(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function Sy(e){return this.__data__.get(e)}function Ey(e){return this.__data__.has(e)}function Ny(e,t){var r=this.__data__;if(r instanceof Yt){var i=r.__data__;if(!qs||i.length<c-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new Qt(i)}return r.set(e,t),this.size=r.size,this}Rt.prototype.clear=Cy,Rt.prototype.delete=zy,Rt.prototype.get=Sy,Rt.prototype.has=Ey,Rt.prototype.set=Ny;function Al(e,t){var r=ne(e),i=!r&&Er(e),p=!r&&!i&&gr(e),u=!r&&!i&&!p&&rs(e),_=r||i||p||u,x=_?$n(e.length,$u):[],v=x.length;for(var C in e)(t||Te.call(e,C))&&!(_&&(C=="length"||p&&(C=="offset"||C=="parent")||u&&(C=="buffer"||C=="byteLength"||C=="byteOffset")||tr(C,v)))&&x.push(C);return x}function ql(e){var t=e.length;return t?e[ii(0,t-1)]:s}function Ly(e,t){return Ha(nt(e),qr(t,0,e.length))}function My(e){return Ha(nt(e))}function Yn(e,t,r){(r!==s&&!Ft(e[t],r)||r===s&&!(t in e))&&Zt(e,t,r)}function Es(e,t,r){var i=e[t];(!(Te.call(e,t)&&Ft(i,r))||r===s&&!(t in e))&&Zt(e,t,r)}function Ea(e,t){for(var r=e.length;r--;)if(Ft(e[r][0],t))return r;return-1}function Py(e,t,r,i){return ur(e,function(p,u,_){t(i,p,r(p),_)}),i}function Cl(e,t){return e&&Ht(t,$e(t),e)}function Oy(e,t){return e&&Ht(t,ot(t),e)}function Zt(e,t,r){t=="__proto__"&&Ia?Ia(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function Qn(e,t){for(var r=-1,i=t.length,p=D(i),u=e==null;++r<i;)p[r]=u?s:Si(e,t[r]);return p}function qr(e,t,r){return e===e&&(r!==s&&(e=e<=r?e:r),t!==s&&(e=e>=t?e:t)),e}function At(e,t,r,i,p,u){var _,x=t&T,v=t&P,C=t&U;if(r&&(_=p?r(e,i,p,u):r(e)),_!==s)return _;if(!ze(e))return e;var z=ne(e);if(z){if(_=k_(e),!x)return nt(e,_)}else{var N=Ye(e),$=N==wr||N==aa;if(gr(e))return Jl(e,x);if(N==vt||N==je||$&&!p){if(_=v||$?{}:bc(e),!x)return v?y_(e,Oy(_,e)):u_(e,Cl(_,e))}else{if(!Ie[N])return p?e:{};_=I_(e,N,x)}}u||(u=new Rt);var X=u.get(e);if(X)return X;u.set(e,_),Gc(e)?e.forEach(function(ee){_.add(At(ee,t,r,ee,e,u))}):Hc(e)&&e.forEach(function(ee,me){_.set(me,At(ee,t,r,me,e,u))});var J=C?v?gi:fi:v?ot:$e,le=z?s:J(e);return Dt(le||e,function(ee,me){le&&(me=ee,ee=e[me]),Es(_,me,At(ee,t,r,me,e,u))}),_}function Ry(e){var t=$e(e);return function(r){return zl(r,e,t)}}function zl(e,t,r){var i=r.length;if(e==null)return!i;for(e=De(e);i--;){var p=r[i],u=t[p],_=e[p];if(_===s&&!(p in e)||!u(_))return!1}return!0}function Sl(e,t,r){if(typeof e!="function")throw new kt(m);return Fs(function(){e.apply(s,r)},t)}function Ns(e,t,r,i){var p=-1,u=_a,_=!0,x=e.length,v=[],C=t.length;if(!x)return v;r&&(t=qe(t,_t(r))),i?(u=On,_=!1):t.length>=c&&(u=Is,_=!1,t=new Ar(t));e:for(;++p<x;){var z=e[p],N=r==null?z:r(z);if(z=i||z!==0?z:0,_&&N===N){for(var $=C;$--;)if(t[$]===N)continue e;v.push(z)}else u(t,N,i)||v.push(z)}return v}var ur=ac(jt),El=ac(Jn,!0);function Fy(e,t){var r=!0;return ur(e,function(i,p,u){return r=!!t(i,p,u),r}),r}function Na(e,t,r){for(var i=-1,p=e.length;++i<p;){var u=e[i],_=t(u);if(_!=null&&(x===s?_===_&&!gt(_):r(_,x)))var x=_,v=u}return v}function By(e,t,r,i){var p=e.length;for(r=ie(r),r<0&&(r=-r>p?0:p+r),i=i===s||i>p?p:ie(i),i<0&&(i+=p),i=r>i?0:Vc(i);r<i;)e[r++]=t;return e}function Nl(e,t){var r=[];return ur(e,function(i,p,u){t(i,p,u)&&r.push(i)}),r}function Ge(e,t,r,i,p){var u=-1,_=e.length;for(r||(r=q_),p||(p=[]);++u<_;){var x=e[u];t>0&&r(x)?t>1?Ge(x,t-1,r,i,p):pr(p,x):i||(p[p.length]=x)}return p}var Zn=nc(),Ll=nc(!0);function jt(e,t){return e&&Zn(e,t,$e)}function Jn(e,t){return e&&Ll(e,t,$e)}function La(e,t){return cr(t,function(r){return rr(e[r])})}function Cr(e,t){t=_r(t,e);for(var r=0,i=t.length;e!=null&&r<i;)e=e[Wt(t[r++])];return r&&r==i?e:s}function Ml(e,t,r){var i=t(e);return ne(e)?i:pr(i,r(e))}function Je(e){return e==null?e===s?Tn:Rr:kr&&kr in De(e)?v_(e):M_(e)}function ei(e,t){return e>t}function Uy(e,t){return e!=null&&Te.call(e,t)}function Ky(e,t){return e!=null&&t in De(e)}function $y(e,t,r){return e>=Ve(t,r)&&e<Be(t,r)}function ti(e,t,r){for(var i=r?On:_a,p=e[0].length,u=e.length,_=u,x=D(u),v=1/0,C=[];_--;){var z=e[_];_&&t&&(z=qe(z,_t(t))),v=Ve(z.length,v),x[_]=!r&&(t||p>=120&&z.length>=120)?new Ar(_&&z):s}z=e[0];var N=-1,$=x[0];e:for(;++N<p&&C.length<v;){var X=z[N],J=t?t(X):X;if(X=r||X!==0?X:0,!($?Is($,J):i(C,J,r))){for(_=u;--_;){var le=x[_];if(!(le?Is(le,J):i(e[_],J,r)))continue e}$&&$.push(J),C.push(X)}}return C}function jy(e,t,r,i){return jt(e,function(p,u,_){t(i,r(p),u,_)}),i}function Ls(e,t,r){t=_r(t,e),e=vc(e,t);var i=e==null?e:e[Wt(Ct(t))];return i==null?s:yt(i,e,r)}function Pl(e){return Ne(e)&&Je(e)==je}function Hy(e){return Ne(e)&&Je(e)==Mt}function Wy(e){return Ne(e)&&Je(e)==Gt}function Ms(e,t,r,i,p){return e===t?!0:e==null||t==null||!Ne(e)&&!Ne(t)?e!==e&&t!==t:Gy(e,t,r,i,Ms,p)}function Gy(e,t,r,i,p,u){var _=ne(e),x=ne(t),v=_?Lt:Ye(e),C=x?Lt:Ye(t);v=v==je?vt:v,C=C==je?vt:C;var z=v==vt,N=C==vt,$=v==C;if($&&gr(e)){if(!gr(t))return!1;_=!0,z=!1}if($&&!z)return u||(u=new Rt),_||rs(e)?_c(e,t,r,i,p,u):h_(e,t,v,r,i,p,u);if(!(r&F)){var X=z&&Te.call(e,"__wrapped__"),J=N&&Te.call(t,"__wrapped__");if(X||J){var le=X?e.value():e,ee=J?t.value():t;return u||(u=new Rt),p(le,ee,r,i,u)}}return $?(u||(u=new Rt),w_(e,t,r,i,p,u)):!1}function Xy(e){return Ne(e)&&Ye(e)==mt}function ri(e,t,r,i){var p=r.length,u=p,_=!i;if(e==null)return!u;for(e=De(e);p--;){var x=r[p];if(_&&x[2]?x[1]!==e[x[0]]:!(x[0]in e))return!1}for(;++p<u;){x=r[p];var v=x[0],C=e[v],z=x[1];if(_&&x[2]){if(C===s&&!(v in e))return!1}else{var N=new Rt;if(i)var $=i(C,z,v,e,t,N);if(!($===s?Ms(z,C,F|E,i,N):$))return!1}}return!0}function Ol(e){if(!ze(e)||z_(e))return!1;var t=rr(e)?Xu:He;return t.test(Sr(e))}function Vy(e){return Ne(e)&&Je(e)==vr}function Yy(e){return Ne(e)&&Ye(e)==ut}function Qy(e){return Ne(e)&&Qa(e.length)&&!!Ae[Je(e)]}function Rl(e){return typeof e=="function"?e:e==null?lt:typeof e=="object"?ne(e)?Ul(e[0],e[1]):Bl(e):ip(e)}function si(e){if(!Rs(e))return ey(e);var t=[];for(var r in De(e))Te.call(e,r)&&r!="constructor"&&t.push(r);return t}function Zy(e){if(!ze(e))return L_(e);var t=Rs(e),r=[];for(var i in e)i=="constructor"&&(t||!Te.call(e,i))||r.push(i);return r}function ai(e,t){return e<t}function Fl(e,t){var r=-1,i=it(e)?D(e.length):[];return ur(e,function(p,u,_){i[++r]=t(p,u,_)}),i}function Bl(e){var t=xi(e);return t.length==1&&t[0][2]?hc(t[0][0],t[0][1]):function(r){return r===e||ri(r,e,t)}}function Ul(e,t){return wi(e)&&xc(t)?hc(Wt(e),t):function(r){var i=Si(r,e);return i===s&&i===t?Ei(r,e):Ms(t,i,F|E)}}function Ma(e,t,r,i,p){e!==t&&Zn(t,function(u,_){if(p||(p=new Rt),ze(u))Jy(e,t,_,r,Ma,i,p);else{var x=i?i(Ti(e,_),u,_+"",e,t,p):s;x===s&&(x=u),Yn(e,_,x)}},ot)}function Jy(e,t,r,i,p,u,_){var x=Ti(e,r),v=Ti(t,r),C=_.get(v);if(C){Yn(e,r,C);return}var z=u?u(x,v,r+"",e,t,_):s,N=z===s;if(N){var $=ne(v),X=!$&&gr(v),J=!$&&!X&&rs(v);z=v,$||X||J?ne(x)?z=x:Oe(x)?z=nt(x):X?(N=!1,z=Jl(v,!0)):J?(N=!1,z=ec(v,!0)):z=[]:Bs(v)||Er(v)?(z=x,Er(x)?z=Yc(x):(!ze(x)||rr(x))&&(z=bc(v))):N=!1}N&&(_.set(v,z),p(z,v,i,u,_),_.delete(v)),Yn(e,r,z)}function Kl(e,t){var r=e.length;if(r)return t+=t<0?r:0,tr(t,r)?e[t]:s}function $l(e,t,r){t.length?t=qe(t,function(u){return ne(u)?function(_){return Cr(_,u.length===1?u[0]:u)}:u}):t=[lt];var i=-1;t=qe(t,_t(Q()));var p=Fl(e,function(u,_,x){var v=qe(t,function(C){return C(u)});return{criteria:v,index:++i,value:u}});return Iu(p,function(u,_){return m_(u,_,r)})}function e_(e,t){return jl(e,t,function(r,i){return Ei(e,i)})}function jl(e,t,r){for(var i=-1,p=t.length,u={};++i<p;){var _=t[i],x=Cr(e,_);r(x,_)&&Ps(u,_r(_,e),x)}return u}function t_(e){return function(t){return Cr(t,e)}}function ni(e,t,r,i){var p=i?ku:Hr,u=-1,_=t.length,x=e;for(e===t&&(t=nt(t)),r&&(x=qe(e,_t(r)));++u<_;)for(var v=0,C=t[u],z=r?r(C):C;(v=p(x,z,v,i))>-1;)x!==e&&ka.call(x,v,1),ka.call(e,v,1);return e}function Hl(e,t){for(var r=e?t.length:0,i=r-1;r--;){var p=t[r];if(r==i||p!==u){var u=p;tr(p)?ka.call(e,p,1):ci(e,p)}}return e}function ii(e,t){return e+qa(kl()*(t-e+1))}function r_(e,t,r,i){for(var p=-1,u=Be(Aa((t-e)/(r||1)),0),_=D(u);u--;)_[i?u:++p]=e,e+=r;return _}function oi(e,t){var r="";if(!e||t<1||t>Me)return r;do t%2&&(r+=e),t=qa(t/2),t&&(e+=e);while(t);return r}function pe(e,t){return Di(wc(e,t,lt),e+"")}function s_(e){return ql(ss(e))}function a_(e,t){var r=ss(e);return Ha(r,qr(t,0,r.length))}function Ps(e,t,r,i){if(!ze(e))return e;t=_r(t,e);for(var p=-1,u=t.length,_=u-1,x=e;x!=null&&++p<u;){var v=Wt(t[p]),C=r;if(v==="__proto__"||v==="constructor"||v==="prototype")return e;if(p!=_){var z=x[v];C=i?i(z,v,x):s,C===s&&(C=ze(z)?z:tr(t[p+1])?[]:{})}Es(x,v,C),x=x[v]}return e}var Wl=Ca?function(e,t){return Ca.set(e,t),e}:lt,n_=Ia?function(e,t){return Ia(e,"toString",{configurable:!0,enumerable:!1,value:Li(t),writable:!0})}:lt;function i_(e){return Ha(ss(e))}function qt(e,t,r){var i=-1,p=e.length;t<0&&(t=-t>p?0:p+t),r=r>p?p:r,r<0&&(r+=p),p=t>r?0:r-t>>>0,t>>>=0;for(var u=D(p);++i<p;)u[i]=e[i+t];return u}function o_(e,t){var r;return ur(e,function(i,p,u){return r=t(i,p,u),!r}),!!r}function Pa(e,t,r){var i=0,p=e==null?i:e.length;if(typeof t=="number"&&t===t&&p<=Pe){for(;i<p;){var u=i+p>>>1,_=e[u];_!==null&&!gt(_)&&(r?_<=t:_<t)?i=u+1:p=u}return p}return li(e,t,lt,r)}function li(e,t,r,i){var p=0,u=e==null?0:e.length;if(u===0)return 0;t=r(t);for(var _=t!==t,x=t===null,v=gt(t),C=t===s;p<u;){var z=qa((p+u)/2),N=r(e[z]),$=N!==s,X=N===null,J=N===N,le=gt(N);if(_)var ee=i||J;else C?ee=J&&(i||$):x?ee=J&&$&&(i||!X):v?ee=J&&$&&!X&&(i||!le):X||le?ee=!1:ee=i?N<=t:N<t;ee?p=z+1:u=z}return Ve(u,he)}function Gl(e,t){for(var r=-1,i=e.length,p=0,u=[];++r<i;){var _=e[r],x=t?t(_):_;if(!r||!Ft(x,v)){var v=x;u[p++]=_===0?0:_}}return u}function Xl(e){return typeof e=="number"?e:gt(e)?wt:+e}function ft(e){if(typeof e=="string")return e;if(ne(e))return qe(e,ft)+"";if(gt(e))return Il?Il.call(e):"";var t=e+"";return t=="0"&&1/e==-Le?"-0":t}function yr(e,t,r){var i=-1,p=_a,u=e.length,_=!0,x=[],v=x;if(r)_=!1,p=On;else if(u>=c){var C=t?null:b_(e);if(C)return ga(C);_=!1,p=Is,v=new Ar}else v=t?[]:x;e:for(;++i<u;){var z=e[i],N=t?t(z):z;if(z=r||z!==0?z:0,_&&N===N){for(var $=v.length;$--;)if(v[$]===N)continue e;t&&v.push(N),x.push(z)}else p(v,N,r)||(v!==x&&v.push(N),x.push(z))}return x}function ci(e,t){return t=_r(t,e),e=vc(e,t),e==null||delete e[Wt(Ct(t))]}function Vl(e,t,r,i){return Ps(e,t,r(Cr(e,t)),i)}function Oa(e,t,r,i){for(var p=e.length,u=i?p:-1;(i?u--:++u<p)&&t(e[u],u,e););return r?qt(e,i?0:u,i?u+1:p):qt(e,i?u+1:0,i?p:u)}function Yl(e,t){var r=e;return r instanceof ye&&(r=r.value()),Rn(t,function(i,p){return p.func.apply(p.thisArg,pr([i],p.args))},r)}function pi(e,t,r){var i=e.length;if(i<2)return i?yr(e[0]):[];for(var p=-1,u=D(i);++p<i;)for(var _=e[p],x=-1;++x<i;)x!=p&&(u[p]=Ns(u[p]||_,e[x],t,r));return yr(Ge(u,1),t,r)}function Ql(e,t,r){for(var i=-1,p=e.length,u=t.length,_={};++i<p;){var x=i<u?t[i]:s;r(_,e[i],x)}return _}function di(e){return Oe(e)?e:[]}function mi(e){return typeof e=="function"?e:lt}function _r(e,t){return ne(e)?e:wi(e,t)?[e]:Ic(ve(e))}var l_=pe;function fr(e,t,r){var i=e.length;return r=r===s?i:r,!t&&r>=i?e:qt(e,t,r)}var Zl=Vu||function(e){return We.clearTimeout(e)};function Jl(e,t){if(t)return e.slice();var r=e.length,i=hl?hl(r):new e.constructor(r);return e.copy(i),i}function ui(e){var t=new e.constructor(e.byteLength);return new Ta(t).set(new Ta(e)),t}function c_(e,t){var r=t?ui(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}function p_(e){var t=new e.constructor(e.source,we.exec(e));return t.lastIndex=e.lastIndex,t}function d_(e){return Ss?De(Ss.call(e)):{}}function ec(e,t){var r=t?ui(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function tc(e,t){if(e!==t){var r=e!==s,i=e===null,p=e===e,u=gt(e),_=t!==s,x=t===null,v=t===t,C=gt(t);if(!x&&!C&&!u&&e>t||u&&_&&v&&!x&&!C||i&&_&&v||!r&&v||!p)return 1;if(!i&&!u&&!C&&e<t||C&&r&&p&&!i&&!u||x&&r&&p||!_&&p||!v)return-1}return 0}function m_(e,t,r){for(var i=-1,p=e.criteria,u=t.criteria,_=p.length,x=r.length;++i<_;){var v=tc(p[i],u[i]);if(v){if(i>=x)return v;var C=r[i];return v*(C=="desc"?-1:1)}}return e.index-t.index}function rc(e,t,r,i){for(var p=-1,u=e.length,_=r.length,x=-1,v=t.length,C=Be(u-_,0),z=D(v+C),N=!i;++x<v;)z[x]=t[x];for(;++p<_;)(N||p<u)&&(z[r[p]]=e[p]);for(;C--;)z[x++]=e[p++];return z}function sc(e,t,r,i){for(var p=-1,u=e.length,_=-1,x=r.length,v=-1,C=t.length,z=Be(u-x,0),N=D(z+C),$=!i;++p<z;)N[p]=e[p];for(var X=p;++v<C;)N[X+v]=t[v];for(;++_<x;)($||p<u)&&(N[X+r[_]]=e[p++]);return N}function nt(e,t){var r=-1,i=e.length;for(t||(t=D(i));++r<i;)t[r]=e[r];return t}function Ht(e,t,r,i){var p=!r;r||(r={});for(var u=-1,_=t.length;++u<_;){var x=t[u],v=i?i(r[x],e[x],x,r,e):s;v===s&&(v=e[x]),p?Zt(r,x,v):Es(r,x,v)}return r}function u_(e,t){return Ht(e,hi(e),t)}function y_(e,t){return Ht(e,fc(e),t)}function Ra(e,t){return function(r,i){var p=ne(r)?xu:Py,u=t?t():{};return p(r,e,Q(i,2),u)}}function Jr(e){return pe(function(t,r){var i=-1,p=r.length,u=p>1?r[p-1]:s,_=p>2?r[2]:s;for(u=e.length>3&&typeof u=="function"?(p--,u):s,_&&et(r[0],r[1],_)&&(u=p<3?s:u,p=1),t=De(t);++i<p;){var x=r[i];x&&e(t,x,i,u)}return t})}function ac(e,t){return function(r,i){if(r==null)return r;if(!it(r))return e(r,i);for(var p=r.length,u=t?p:-1,_=De(r);(t?u--:++u<p)&&i(_[u],u,_)!==!1;);return r}}function nc(e){return function(t,r,i){for(var p=-1,u=De(t),_=i(t),x=_.length;x--;){var v=_[e?x:++p];if(r(u[v],v,u)===!1)break}return t}}function __(e,t,r){var i=t&j,p=Os(e);function u(){var _=this&&this!==We&&this instanceof u?p:e;return _.apply(i?r:this,arguments)}return u}function ic(e){return function(t){t=ve(t);var r=Wr(t)?Ot(t):s,i=r?r[0]:t.charAt(0),p=r?fr(r,1).join(""):t.slice(1);return i[e]()+p}}function es(e){return function(t){return Rn(ap(sp(t).replace(nu,"")),e,"")}}function Os(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=Zr(e.prototype),i=e.apply(r,t);return ze(i)?i:r}}function f_(e,t,r){var i=Os(e);function p(){for(var u=arguments.length,_=D(u),x=u,v=ts(p);x--;)_[x]=arguments[x];var C=u<3&&_[0]!==v&&_[u-1]!==v?[]:dr(_,v);if(u-=C.length,u<r)return dc(e,t,Fa,p.placeholder,s,_,C,s,s,r-u);var z=this&&this!==We&&this instanceof p?i:e;return yt(z,this,_)}return p}function oc(e){return function(t,r,i){var p=De(t);if(!it(t)){var u=Q(r,3);t=$e(t),r=function(x){return u(p[x],x,p)}}var _=e(t,r,i);return _>-1?p[u?t[_]:_]:s}}function lc(e){return er(function(t){var r=t.length,i=r,p=It.prototype.thru;for(e&&t.reverse();i--;){var u=t[i];if(typeof u!="function")throw new kt(m);if(p&&!_&&$a(u)=="wrapper")var _=new It([],!0)}for(i=_?i:r;++i<r;){u=t[i];var x=$a(u),v=x=="wrapper"?bi(u):s;v&&vi(v[0])&&v[1]==(S|B|O|W)&&!v[4].length&&v[9]==1?_=_[$a(v[0])].apply(_,v[3]):_=u.length==1&&vi(u)?_[x]():_.thru(u)}return function(){var C=arguments,z=C[0];if(_&&C.length==1&&ne(z))return _.plant(z).value();for(var N=0,$=r?t[N].apply(this,C):z;++N<r;)$=t[N].call(this,$);return $}})}function Fa(e,t,r,i,p,u,_,x,v,C){var z=t&S,N=t&j,$=t&G,X=t&(B|k),J=t&ae,le=$?s:Os(e);function ee(){for(var me=arguments.length,_e=D(me),bt=me;bt--;)_e[bt]=arguments[bt];if(X)var tt=ts(ee),xt=qu(_e,tt);if(i&&(_e=rc(_e,i,p,X)),u&&(_e=sc(_e,u,_,X)),me-=xt,X&&me<C){var Re=dr(_e,tt);return dc(e,t,Fa,ee.placeholder,r,_e,Re,x,v,C-me)}var Bt=N?r:this,ar=$?Bt[e]:e;return me=_e.length,x?_e=P_(_e,x):J&&me>1&&_e.reverse(),z&&v<me&&(_e.length=v),this&&this!==We&&this instanceof ee&&(ar=le||Os(ar)),ar.apply(Bt,_e)}return ee}function cc(e,t){return function(r,i){return jy(r,e,t(i),{})}}function Ba(e,t){return function(r,i){var p;if(r===s&&i===s)return t;if(r!==s&&(p=r),i!==s){if(p===s)return i;typeof r=="string"||typeof i=="string"?(r=ft(r),i=ft(i)):(r=Xl(r),i=Xl(i)),p=e(r,i)}return p}}function yi(e){return er(function(t){return t=qe(t,_t(Q())),pe(function(r){var i=this;return e(t,function(p){return yt(p,i,r)})})})}function Ua(e,t){t=t===s?" ":ft(t);var r=t.length;if(r<2)return r?oi(t,e):t;var i=oi(t,Aa(e/Gr(t)));return Wr(t)?fr(Ot(i),0,e).join(""):i.slice(0,e)}function g_(e,t,r,i){var p=t&j,u=Os(e);function _(){for(var x=-1,v=arguments.length,C=-1,z=i.length,N=D(z+v),$=this&&this!==We&&this instanceof _?u:e;++C<z;)N[C]=i[C];for(;v--;)N[C++]=arguments[++x];return yt($,p?r:this,N)}return _}function pc(e){return function(t,r,i){return i&&typeof i!="number"&&et(t,r,i)&&(r=i=s),t=sr(t),r===s?(r=t,t=0):r=sr(r),i=i===s?t<r?1:-1:sr(i),r_(t,r,i,e)}}function Ka(e){return function(t,r){return typeof t=="string"&&typeof r=="string"||(t=zt(t),r=zt(r)),e(t,r)}}function dc(e,t,r,i,p,u,_,x,v,C){var z=t&B,N=z?_:s,$=z?s:_,X=z?u:s,J=z?s:u;t|=z?O:Y,t&=~(z?Y:O),t&V||(t&=~(j|G));var le=[e,t,p,X,N,J,$,x,v,C],ee=r.apply(s,le);return vi(e)&&Tc(ee,le),ee.placeholder=i,Dc(ee,e,t)}function _i(e){var t=Fe[e];return function(r,i){if(r=zt(r),i=i==null?0:Ve(ie(i),292),i&&Dl(r)){var p=(ve(r)+"e").split("e"),u=t(p[0]+"e"+(+p[1]+i));return p=(ve(u)+"e").split("e"),+(p[0]+"e"+(+p[1]-i))}return t(r)}}var b_=Yr&&1/ga(new Yr([,-0]))[1]==Le?function(e){return new Yr(e)}:Oi;function mc(e){return function(t){var r=Ye(t);return r==mt?Hn(t):r==ut?Mu(t):Au(t,e(t))}}function Jt(e,t,r,i,p,u,_,x){var v=t&G;if(!v&&typeof e!="function")throw new kt(m);var C=i?i.length:0;if(C||(t&=~(O|Y),i=p=s),_=_===s?_:Be(ie(_),0),x=x===s?x:ie(x),C-=p?p.length:0,t&Y){var z=i,N=p;i=p=s}var $=v?s:bi(e),X=[e,t,r,i,p,z,N,u,_,x];if($&&N_(X,$),e=X[0],t=X[1],r=X[2],i=X[3],p=X[4],x=X[9]=X[9]===s?v?0:e.length:Be(X[9]-C,0),!x&&t&(B|k)&&(t&=~(B|k)),!t||t==j)var J=__(e,t,r);else t==B||t==k?J=f_(e,t,x):(t==O||t==(j|O))&&!p.length?J=g_(e,t,r,i):J=Fa.apply(s,X);var le=$?Wl:Tc;return Dc(le(J,X),e,t)}function uc(e,t,r,i){return e===s||Ft(e,Vr[r])&&!Te.call(i,r)?t:e}function yc(e,t,r,i,p,u){return ze(e)&&ze(t)&&(u.set(t,e),Ma(e,t,s,yc,u),u.delete(t)),e}function x_(e){return Bs(e)?s:e}function _c(e,t,r,i,p,u){var _=r&F,x=e.length,v=t.length;if(x!=v&&!(_&&v>x))return!1;var C=u.get(e),z=u.get(t);if(C&&z)return C==t&&z==e;var N=-1,$=!0,X=r&E?new Ar:s;for(u.set(e,t),u.set(t,e);++N<x;){var J=e[N],le=t[N];if(i)var ee=_?i(le,J,N,t,e,u):i(J,le,N,e,t,u);if(ee!==s){if(ee)continue;$=!1;break}if(X){if(!Fn(t,function(me,_e){if(!Is(X,_e)&&(J===me||p(J,me,r,i,u)))return X.push(_e)})){$=!1;break}}else if(!(J===le||p(J,le,r,i,u))){$=!1;break}}return u.delete(e),u.delete(t),$}function h_(e,t,r,i,p,u,_){switch(r){case lr:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Mt:return!(e.byteLength!=t.byteLength||!u(new Ta(e),new Ta(t)));case Kt:case Gt:case $t:return Ft(+e,+t);case Or:return e.name==t.name&&e.message==t.message;case vr:case Xt:return e==t+"";case mt:var x=Hn;case ut:var v=i&F;if(x||(x=ga),e.size!=t.size&&!v)return!1;var C=_.get(e);if(C)return C==t;i|=E,_.set(e,t);var z=_c(x(e),x(t),i,p,u,_);return _.delete(e),z;case Br:if(Ss)return Ss.call(e)==Ss.call(t)}return!1}function w_(e,t,r,i,p,u){var _=r&F,x=fi(e),v=x.length,C=fi(t),z=C.length;if(v!=z&&!_)return!1;for(var N=v;N--;){var $=x[N];if(!(_?$ in t:Te.call(t,$)))return!1}var X=u.get(e),J=u.get(t);if(X&&J)return X==t&&J==e;var le=!0;u.set(e,t),u.set(t,e);for(var ee=_;++N<v;){$=x[N];var me=e[$],_e=t[$];if(i)var bt=_?i(_e,me,$,t,e,u):i(me,_e,$,e,t,u);if(!(bt===s?me===_e||p(me,_e,r,i,u):bt)){le=!1;break}ee||(ee=$=="constructor")}if(le&&!ee){var tt=e.constructor,xt=t.constructor;tt!=xt&&"constructor"in e&&"constructor"in t&&!(typeof tt=="function"&&tt instanceof tt&&typeof xt=="function"&&xt instanceof xt)&&(le=!1)}return u.delete(e),u.delete(t),le}function er(e){return Di(wc(e,s,zc),e+"")}function fi(e){return Ml(e,$e,hi)}function gi(e){return Ml(e,ot,fc)}var bi=Ca?function(e){return Ca.get(e)}:Oi;function $a(e){for(var t=e.name+"",r=Qr[t],i=Te.call(Qr,t)?r.length:0;i--;){var p=r[i],u=p.func;if(u==null||u==e)return p.name}return t}function ts(e){var t=Te.call(d,"placeholder")?d:e;return t.placeholder}function Q(){var e=d.iteratee||Mi;return e=e===Mi?Rl:e,arguments.length?e(arguments[0],arguments[1]):e}function ja(e,t){var r=e.__data__;return C_(t)?r[typeof t=="string"?"string":"hash"]:r.map}function xi(e){for(var t=$e(e),r=t.length;r--;){var i=t[r],p=e[i];t[r]=[i,p,xc(p)]}return t}function zr(e,t){var r=Eu(e,t);return Ol(r)?r:s}function v_(e){var t=Te.call(e,kr),r=e[kr];try{e[kr]=s;var i=!0}catch{}var p=wa.call(e);return i&&(t?e[kr]=r:delete e[kr]),p}var hi=Gn?function(e){return e==null?[]:(e=De(e),cr(Gn(e),function(t){return vl.call(e,t)}))}:Ri,fc=Gn?function(e){for(var t=[];e;)pr(t,hi(e)),e=Da(e);return t}:Ri,Ye=Je;(Xn&&Ye(new Xn(new ArrayBuffer(1)))!=lr||qs&&Ye(new qs)!=mt||Vn&&Ye(Vn.resolve())!=_s||Yr&&Ye(new Yr)!=ut||Cs&&Ye(new Cs)!=or)&&(Ye=function(e){var t=Je(e),r=t==vt?e.constructor:s,i=r?Sr(r):"";if(i)switch(i){case ay:return lr;case ny:return mt;case iy:return _s;case oy:return ut;case ly:return or}return t});function T_(e,t,r){for(var i=-1,p=r.length;++i<p;){var u=r[i],_=u.size;switch(u.type){case"drop":e+=_;break;case"dropRight":t-=_;break;case"take":t=Ve(t,e+_);break;case"takeRight":e=Be(e,t-_);break}}return{start:e,end:t}}function D_(e){var t=e.match(Cn);return t?t[1].split(g):[]}function gc(e,t,r){t=_r(t,e);for(var i=-1,p=t.length,u=!1;++i<p;){var _=Wt(t[i]);if(!(u=e!=null&&r(e,_)))break;e=e[_]}return u||++i!=p?u:(p=e==null?0:e.length,!!p&&Qa(p)&&tr(_,p)&&(ne(e)||Er(e)))}function k_(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&Te.call(e,"index")&&(r.index=e.index,r.input=e.input),r}function bc(e){return typeof e.constructor=="function"&&!Rs(e)?Zr(Da(e)):{}}function I_(e,t,r){var i=e.constructor;switch(t){case Mt:return ui(e);case Kt:case Gt:return new i(+e);case lr:return c_(e,r);case Ur:case Kr:case Tr:case fs:case gs:case bs:case xs:case hs:case ws:return ec(e,r);case mt:return new i;case $t:case Xt:return new i(e);case vr:return p_(e);case ut:return new i;case Br:return d_(e)}}function A_(e,t){var r=t.length;if(!r)return e;var i=r-1;return t[i]=(r>1?"& ":"")+t[i],t=t.join(r>2?", ":" "),e.replace(qn,`{
119
119
  /* [wrapped with `+t+`] */
120
- `)}function q_(e){return ne(e)||Er(e)||!!(Tl&&e&&e[Tl])}function tr(e,t){var r=typeof e;return t=t??Me,!!t&&(r=="number"||r!="symbol"&&Ee.test(e))&&e>-1&&e%1==0&&e<t}function et(e,t,r){if(!ze(r))return!1;var i=typeof t;return(i=="number"?it(r)&&tr(t,r.length):i=="string"&&t in r)?Ft(r[t],e):!1}function wi(e,t){if(ne(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||gt(e)?!0:da.test(e)||!pa.test(e)||t!=null&&e in De(t)}function C_(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function vi(e){var t=$a(e),r=d[t];if(typeof r!="function"||!(t in ye.prototype))return!1;if(e===r)return!0;var i=bi(r);return!!i&&e===i[0]}function z_(e){return!!xl&&xl in e}var S_=xa?rr:Fi;function Rs(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Vr;return e===r}function xc(e){return e===e&&!ze(e)}function hc(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==s||e in De(r))}}function E_(e){var t=Va(e,function(i){return r.size===b&&r.clear(),i}),r=t.cache;return t}function N_(e,t){var r=e[1],i=t[1],p=r|i,u=p<(j|G|S),y=i==S&&r==B||i==S&&r==W&&e[7].length<=t[8]||i==(S|W)&&t[7].length<=t[8]&&r==B;if(!(u||y))return e;i&j&&(e[2]=t[2],p|=r&j?0:V);var x=t[3];if(x){var v=e[3];e[3]=v?rc(v,x,t[4]):x,e[4]=v?dr(e[3],h):t[4]}return x=t[5],x&&(v=e[5],e[5]=v?sc(v,x,t[6]):x,e[6]=v?dr(e[5],h):t[6]),x=t[7],x&&(e[7]=x),i&S&&(e[8]=e[8]==null?t[8]:Ve(e[8],t[8])),e[9]==null&&(e[9]=t[9]),e[0]=t[0],e[1]=p,e}function L_(e){var t=[];if(e!=null)for(var r in De(e))t.push(r);return t}function M_(e){return wa.call(e)}function wc(e,t,r){return t=Be(t===s?e.length-1:t,0),function(){for(var i=arguments,p=-1,u=Be(i.length-t,0),y=D(u);++p<u;)y[p]=i[t+p];p=-1;for(var x=D(t+1);++p<t;)x[p]=i[p];return x[t]=r(y),yt(e,this,x)}}function vc(e,t){return t.length<2?e:Cr(e,qt(t,0,-1))}function P_(e,t){for(var r=e.length,i=Ve(t.length,r),p=nt(e);i--;){var u=t[i];e[i]=tr(u,r)?p[u]:s}return e}function Ti(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var Tc=kc(Wl),Fs=Qu||function(e,t){return We.setTimeout(e,t)},Di=kc(n_);function Dc(e,t,r){var i=t+"";return Di(e,A_(i,O_(D_(i),r)))}function kc(e){var t=0,r=0;return function(){var i=ty(),p=Ue-(i-r);if(r=i,p>0){if(++t>=Et)return arguments[0]}else t=0;return e.apply(s,arguments)}}function Ha(e,t){var r=-1,i=e.length,p=i-1;for(t=t===s?i:t;++r<t;){var u=ii(r,p),y=e[u];e[u]=e[r],e[r]=y}return e.length=t,e}var Ic=E_(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(In,function(r,i,p,u){t.push(p?u.replace(te,"$1"):i||r)}),t});function Wt(e){if(typeof e=="string"||gt(e))return e;var t=e+"";return t=="0"&&1/e==-Le?"-0":t}function Sr(e){if(e!=null){try{return ha.call(e)}catch{}try{return e+""}catch{}}return""}function O_(e,t){return Dt(Nt,function(r){var i="_."+r[0];t&r[1]&&!_a(e,i)&&e.push(i)}),e.sort()}function Ac(e){if(e instanceof ye)return e.clone();var t=new It(e.__wrapped__,e.__chain__);return t.__actions__=nt(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function R_(e,t,r){(r?et(e,t,r):t===s)?t=1:t=Be(ie(t),0);var i=e==null?0:e.length;if(!i||t<1)return[];for(var p=0,u=0,y=D(Aa(i/t));p<i;)y[u++]=qt(e,p,p+=t);return y}function F_(e){for(var t=-1,r=e==null?0:e.length,i=0,p=[];++t<r;){var u=e[t];u&&(p[i++]=u)}return p}function B_(){var e=arguments.length;if(!e)return[];for(var t=D(e-1),r=arguments[0],i=e;i--;)t[i-1]=arguments[i];return pr(ne(r)?nt(r):[r],Ge(t,1))}var U_=pe(function(e,t){return Oe(e)?Ns(e,Ge(t,1,Oe,!0)):[]}),K_=pe(function(e,t){var r=Ct(t);return Oe(r)&&(r=s),Oe(e)?Ns(e,Ge(t,1,Oe,!0),Q(r,2)):[]}),$_=pe(function(e,t){var r=Ct(t);return Oe(r)&&(r=s),Oe(e)?Ns(e,Ge(t,1,Oe,!0),s,r):[]});function j_(e,t,r){var i=e==null?0:e.length;return i?(t=r||t===s?1:ie(t),qt(e,t<0?0:t,i)):[]}function H_(e,t,r){var i=e==null?0:e.length;return i?(t=r||t===s?1:ie(t),t=i-t,qt(e,0,t<0?0:t)):[]}function W_(e,t){return e&&e.length?Oa(e,Q(t,3),!0,!0):[]}function G_(e,t){return e&&e.length?Oa(e,Q(t,3),!0):[]}function X_(e,t,r,i){var p=e==null?0:e.length;return p?(r&&typeof r!="number"&&et(e,t,r)&&(r=0,i=p),By(e,t,r,i)):[]}function qc(e,t,r){var i=e==null?0:e.length;if(!i)return-1;var p=r==null?0:ie(r);return p<0&&(p=Be(i+p,0)),fa(e,Q(t,3),p)}function Cc(e,t,r){var i=e==null?0:e.length;if(!i)return-1;var p=i-1;return r!==s&&(p=ie(r),p=r<0?Be(i+p,0):Ve(p,i-1)),fa(e,Q(t,3),p,!0)}function zc(e){var t=e==null?0:e.length;return t?Ge(e,1):[]}function V_(e){var t=e==null?0:e.length;return t?Ge(e,Le):[]}function Y_(e,t){var r=e==null?0:e.length;return r?(t=t===s?1:ie(t),Ge(e,t)):[]}function Q_(e){for(var t=-1,r=e==null?0:e.length,i={};++t<r;){var p=e[t];i[p[0]]=p[1]}return i}function Sc(e){return e&&e.length?e[0]:s}function Z_(e,t,r){var i=e==null?0:e.length;if(!i)return-1;var p=r==null?0:ie(r);return p<0&&(p=Be(i+p,0)),Hr(e,t,p)}function J_(e){var t=e==null?0:e.length;return t?qt(e,0,-1):[]}var ef=pe(function(e){var t=qe(e,di);return t.length&&t[0]===e[0]?ti(t):[]}),tf=pe(function(e){var t=Ct(e),r=qe(e,di);return t===Ct(r)?t=s:r.pop(),r.length&&r[0]===e[0]?ti(r,Q(t,2)):[]}),rf=pe(function(e){var t=Ct(e),r=qe(e,di);return t=typeof t=="function"?t:s,t&&r.pop(),r.length&&r[0]===e[0]?ti(r,s,t):[]});function sf(e,t){return e==null?"":Ju.call(e,t)}function Ct(e){var t=e==null?0:e.length;return t?e[t-1]:s}function af(e,t,r){var i=e==null?0:e.length;if(!i)return-1;var p=i;return r!==s&&(p=ie(r),p=p<0?Be(i+p,0):Ve(p,i-1)),t===t?Ou(e,t,p):fa(e,dl,p,!0)}function nf(e,t){return e&&e.length?Kl(e,ie(t)):s}var of=pe(Ec);function Ec(e,t){return e&&e.length&&t&&t.length?ni(e,t):e}function lf(e,t,r){return e&&e.length&&t&&t.length?ni(e,t,Q(r,2)):e}function cf(e,t,r){return e&&e.length&&t&&t.length?ni(e,t,s,r):e}var pf=er(function(e,t){var r=e==null?0:e.length,i=Qn(e,t);return Hl(e,qe(t,function(p){return tr(p,r)?+p:p}).sort(tc)),i});function df(e,t){var r=[];if(!(e&&e.length))return r;var i=-1,p=[],u=e.length;for(t=Q(t,3);++i<u;){var y=e[i];t(y,i,e)&&(r.push(y),p.push(i))}return Hl(e,p),r}function ki(e){return e==null?e:sy.call(e)}function mf(e,t,r){var i=e==null?0:e.length;return i?(r&&typeof r!="number"&&et(e,t,r)?(t=0,r=i):(t=t==null?0:ie(t),r=r===s?i:ie(r)),qt(e,t,r)):[]}function uf(e,t){return Pa(e,t)}function yf(e,t,r){return li(e,t,Q(r,2))}function _f(e,t){var r=e==null?0:e.length;if(r){var i=Pa(e,t);if(i<r&&Ft(e[i],t))return i}return-1}function ff(e,t){return Pa(e,t,!0)}function gf(e,t,r){return li(e,t,Q(r,2),!0)}function bf(e,t){var r=e==null?0:e.length;if(r){var i=Pa(e,t,!0)-1;if(Ft(e[i],t))return i}return-1}function xf(e){return e&&e.length?Gl(e):[]}function hf(e,t){return e&&e.length?Gl(e,Q(t,2)):[]}function wf(e){var t=e==null?0:e.length;return t?qt(e,1,t):[]}function vf(e,t,r){return e&&e.length?(t=r||t===s?1:ie(t),qt(e,0,t<0?0:t)):[]}function Tf(e,t,r){var i=e==null?0:e.length;return i?(t=r||t===s?1:ie(t),t=i-t,qt(e,t<0?0:t,i)):[]}function Df(e,t){return e&&e.length?Oa(e,Q(t,3),!1,!0):[]}function kf(e,t){return e&&e.length?Oa(e,Q(t,3)):[]}var If=pe(function(e){return yr(Ge(e,1,Oe,!0))}),Af=pe(function(e){var t=Ct(e);return Oe(t)&&(t=s),yr(Ge(e,1,Oe,!0),Q(t,2))}),qf=pe(function(e){var t=Ct(e);return t=typeof t=="function"?t:s,yr(Ge(e,1,Oe,!0),s,t)});function Cf(e){return e&&e.length?yr(e):[]}function zf(e,t){return e&&e.length?yr(e,Q(t,2)):[]}function Sf(e,t){return t=typeof t=="function"?t:s,e&&e.length?yr(e,s,t):[]}function Ii(e){if(!(e&&e.length))return[];var t=0;return e=cr(e,function(r){if(Oe(r))return t=Be(r.length,t),!0}),$n(t,function(r){return qe(e,Bn(r))})}function Nc(e,t){if(!(e&&e.length))return[];var r=Ii(e);return t==null?r:qe(r,function(i){return yt(t,s,i)})}var Ef=pe(function(e,t){return Oe(e)?Ns(e,t):[]}),Nf=pe(function(e){return pi(cr(e,Oe))}),Lf=pe(function(e){var t=Ct(e);return Oe(t)&&(t=s),pi(cr(e,Oe),Q(t,2))}),Mf=pe(function(e){var t=Ct(e);return t=typeof t=="function"?t:s,pi(cr(e,Oe),s,t)}),Pf=pe(Ii);function Of(e,t){return Ql(e||[],t||[],Es)}function Rf(e,t){return Ql(e||[],t||[],Ps)}var Ff=pe(function(e){var t=e.length,r=t>1?e[t-1]:s;return r=typeof r=="function"?(e.pop(),r):s,Nc(e,r)});function Lc(e){var t=d(e);return t.__chain__=!0,t}function Bf(e,t){return t(e),e}function Wa(e,t){return t(e)}var Uf=er(function(e){var t=e.length,r=t?e[0]:0,i=this.__wrapped__,p=function(u){return Qn(u,e)};return t>1||this.__actions__.length||!(i instanceof ye)||!tr(r)?this.thru(p):(i=i.slice(r,+r+(t?1:0)),i.__actions__.push({func:Wa,args:[p],thisArg:s}),new It(i,this.__chain__).thru(function(u){return t&&!u.length&&u.push(s),u}))});function Kf(){return Lc(this)}function $f(){return new It(this.value(),this.__chain__)}function jf(){this.__values__===s&&(this.__values__=Xc(this.value()));var e=this.__index__>=this.__values__.length,t=e?s:this.__values__[this.__index__++];return{done:e,value:t}}function Hf(){return this}function Wf(e){for(var t,r=this;r instanceof Sa;){var i=Ac(r);i.__index__=0,i.__values__=s,t?p.__wrapped__=i:t=i;var p=i;r=r.__wrapped__}return p.__wrapped__=e,t}function Gf(){var e=this.__wrapped__;if(e instanceof ye){var t=e;return this.__actions__.length&&(t=new ye(this)),t=t.reverse(),t.__actions__.push({func:Wa,args:[ki],thisArg:s}),new It(t,this.__chain__)}return this.thru(ki)}function Xf(){return Yl(this.__wrapped__,this.__actions__)}var Vf=Ra(function(e,t,r){Te.call(e,r)?++e[r]:Zt(e,r,1)});function Yf(e,t,r){var i=ne(e)?cl:Fy;return r&&et(e,t,r)&&(t=s),i(e,Q(t,3))}function Qf(e,t){var r=ne(e)?cr:Nl;return r(e,Q(t,3))}var Zf=oc(qc),Jf=oc(Cc);function eg(e,t){return Ge(Ga(e,t),1)}function tg(e,t){return Ge(Ga(e,t),Le)}function rg(e,t,r){return r=r===s?1:ie(r),Ge(Ga(e,t),r)}function Mc(e,t){var r=ne(e)?Dt:ur;return r(e,Q(t,3))}function Pc(e,t){var r=ne(e)?hu:El;return r(e,Q(t,3))}var sg=Ra(function(e,t,r){Te.call(e,r)?e[r].push(t):Zt(e,r,[t])});function ag(e,t,r,i){e=it(e)?e:ss(e),r=r&&!i?ie(r):0;var p=e.length;return r<0&&(r=Be(p+r,0)),Za(e)?r<=p&&e.indexOf(t,r)>-1:!!p&&Hr(e,t,r)>-1}var ng=pe(function(e,t,r){var i=-1,p=typeof t=="function",u=it(e)?D(e.length):[];return ur(e,function(y){u[++i]=p?yt(t,y,r):Ls(y,t,r)}),u}),ig=Ra(function(e,t,r){Zt(e,r,t)});function Ga(e,t){var r=ne(e)?qe:Fl;return r(e,Q(t,3))}function og(e,t,r,i){return e==null?[]:(ne(t)||(t=t==null?[]:[t]),r=i?s:r,ne(r)||(r=r==null?[]:[r]),$l(e,t,r))}var lg=Ra(function(e,t,r){e[r?0:1].push(t)},function(){return[[],[]]});function cg(e,t,r){var i=ne(e)?Rn:ul,p=arguments.length<3;return i(e,Q(t,4),r,p,ur)}function pg(e,t,r){var i=ne(e)?wu:ul,p=arguments.length<3;return i(e,Q(t,4),r,p,El)}function dg(e,t){var r=ne(e)?cr:Nl;return r(e,Ya(Q(t,3)))}function mg(e){var t=ne(e)?ql:s_;return t(e)}function ug(e,t,r){(r?et(e,t,r):t===s)?t=1:t=ie(t);var i=ne(e)?Ly:a_;return i(e,t)}function yg(e){var t=ne(e)?My:i_;return t(e)}function _g(e){if(e==null)return 0;if(it(e))return Za(e)?Gr(e):e.length;var t=Ye(e);return t==mt||t==ut?e.size:si(e).length}function fg(e,t,r){var i=ne(e)?Fn:o_;return r&&et(e,t,r)&&(t=s),i(e,Q(t,3))}var gg=pe(function(e,t){if(e==null)return[];var r=t.length;return r>1&&et(e,t[0],t[1])?t=[]:r>2&&et(t[0],t[1],t[2])&&(t=[t[0]]),$l(e,Ge(t,1),[])}),Xa=Yu||function(){return We.Date.now()};function bg(e,t){if(typeof t!="function")throw new kt(m);return e=ie(e),function(){if(--e<1)return t.apply(this,arguments)}}function Oc(e,t,r){return t=r?s:t,t=e&&t==null?e.length:t,Jt(e,S,s,s,s,s,t)}function Rc(e,t){var r;if(typeof t!="function")throw new kt(m);return e=ie(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=s),r}}var Ai=pe(function(e,t,r){var i=j;if(r.length){var p=dr(r,ts(Ai));i|=O}return Jt(e,i,t,r,p)}),Fc=pe(function(e,t,r){var i=j|G;if(r.length){var p=dr(r,ts(Fc));i|=O}return Jt(t,i,e,r,p)});function Bc(e,t,r){t=r?s:t;var i=Jt(e,B,s,s,s,s,s,t);return i.placeholder=Bc.placeholder,i}function Uc(e,t,r){t=r?s:t;var i=Jt(e,k,s,s,s,s,s,t);return i.placeholder=Uc.placeholder,i}function Kc(e,t,r){var i,p,u,y,x,v,C=0,z=!1,N=!1,$=!0;if(typeof e!="function")throw new kt(m);t=zt(t)||0,ze(r)&&(z=!!r.leading,N="maxWait"in r,u=N?Be(zt(r.maxWait)||0,t):u,$="trailing"in r?!!r.trailing:$);function X(Re){var Bt=i,ar=p;return i=p=s,C=Re,y=e.apply(ar,Bt),y}function J(Re){return C=Re,x=Fs(me,t),z?X(Re):y}function le(Re){var Bt=Re-v,ar=Re-C,op=t-Bt;return N?Ve(op,u-ar):op}function ee(Re){var Bt=Re-v,ar=Re-C;return v===s||Bt>=t||Bt<0||N&&ar>=u}function me(){var Re=Xa();if(ee(Re))return _e(Re);x=Fs(me,le(Re))}function _e(Re){return x=s,$&&i?X(Re):(i=p=s,y)}function bt(){x!==s&&Zl(x),C=0,i=v=p=x=s}function tt(){return x===s?y:_e(Xa())}function xt(){var Re=Xa(),Bt=ee(Re);if(i=arguments,p=this,v=Re,Bt){if(x===s)return J(v);if(N)return Zl(x),x=Fs(me,t),X(v)}return x===s&&(x=Fs(me,t)),y}return xt.cancel=bt,xt.flush=tt,xt}var xg=pe(function(e,t){return Sl(e,1,t)}),hg=pe(function(e,t,r){return Sl(e,zt(t)||0,r)});function wg(e){return Jt(e,ae)}function Va(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new kt(m);var r=function(){var i=arguments,p=t?t.apply(this,i):i[0],u=r.cache;if(u.has(p))return u.get(p);var y=e.apply(this,i);return r.cache=u.set(p,y)||u,y};return r.cache=new(Va.Cache||Qt),r}Va.Cache=Qt;function Ya(e){if(typeof e!="function")throw new kt(m);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function vg(e){return Rc(2,e)}var Tg=l_(function(e,t){t=t.length==1&&ne(t[0])?qe(t[0],_t(Q())):qe(Ge(t,1),_t(Q()));var r=t.length;return pe(function(i){for(var p=-1,u=Ve(i.length,r);++p<u;)i[p]=t[p].call(this,i[p]);return yt(e,this,i)})}),qi=pe(function(e,t){var r=dr(t,ts(qi));return Jt(e,O,s,t,r)}),$c=pe(function(e,t){var r=dr(t,ts($c));return Jt(e,Y,s,t,r)}),Dg=er(function(e,t){return Jt(e,W,s,s,s,t)});function kg(e,t){if(typeof e!="function")throw new kt(m);return t=t===s?t:ie(t),pe(e,t)}function Ig(e,t){if(typeof e!="function")throw new kt(m);return t=t==null?0:Be(ie(t),0),pe(function(r){var i=r[t],p=fr(r,0,t);return i&&pr(p,i),yt(e,this,p)})}function Ag(e,t,r){var i=!0,p=!0;if(typeof e!="function")throw new kt(m);return ze(r)&&(i="leading"in r?!!r.leading:i,p="trailing"in r?!!r.trailing:p),Kc(e,t,{leading:i,maxWait:t,trailing:p})}function qg(e){return Oc(e,1)}function Cg(e,t){return qi(mi(t),e)}function zg(){if(!arguments.length)return[];var e=arguments[0];return ne(e)?e:[e]}function Sg(e){return At(e,U)}function Eg(e,t){return t=typeof t=="function"?t:s,At(e,U,t)}function Ng(e){return At(e,T|U)}function Lg(e,t){return t=typeof t=="function"?t:s,At(e,T|U,t)}function Mg(e,t){return t==null||zl(e,t,$e(t))}function Ft(e,t){return e===t||e!==e&&t!==t}var Pg=Ka(ei),Og=Ka(function(e,t){return e>=t}),Er=Pl(function(){return arguments}())?Pl:function(e){return Ne(e)&&Te.call(e,"callee")&&!vl.call(e,"callee")},ne=D.isArray,Rg=sl?_t(sl):Hy;function it(e){return e!=null&&Qa(e.length)&&!rr(e)}function Oe(e){return Ne(e)&&it(e)}function Fg(e){return e===!0||e===!1||Ne(e)&&Je(e)==Kt}var gr=Zu||Fi,Bg=al?_t(al):Wy;function Ug(e){return Ne(e)&&e.nodeType===1&&!Bs(e)}function Kg(e){if(e==null)return!0;if(it(e)&&(ne(e)||typeof e=="string"||typeof e.splice=="function"||gr(e)||rs(e)||Er(e)))return!e.length;var t=Ye(e);if(t==mt||t==ut)return!e.size;if(Rs(e))return!si(e).length;for(var r in e)if(Te.call(e,r))return!1;return!0}function $g(e,t){return Ms(e,t)}function jg(e,t,r){r=typeof r=="function"?r:s;var i=r?r(e,t):s;return i===s?Ms(e,t,s,r):!!i}function Ci(e){if(!Ne(e))return!1;var t=Je(e);return t==Or||t==Pr||typeof e.message=="string"&&typeof e.name=="string"&&!Bs(e)}function Hg(e){return typeof e=="number"&&Dl(e)}function rr(e){if(!ze(e))return!1;var t=Je(e);return t==wr||t==aa||t==Ze||t==Fr}function jc(e){return typeof e=="number"&&e==ie(e)}function Qa(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Me}function ze(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Ne(e){return e!=null&&typeof e=="object"}var Hc=nl?_t(nl):Xy;function Wg(e,t){return e===t||ri(e,t,xi(t))}function Gg(e,t,r){return r=typeof r=="function"?r:s,ri(e,t,xi(t),r)}function Xg(e){return Wc(e)&&e!=+e}function Vg(e){if(S_(e))throw new se(l);return Ol(e)}function Yg(e){return e===null}function Qg(e){return e==null}function Wc(e){return typeof e=="number"||Ne(e)&&Je(e)==$t}function Bs(e){if(!Ne(e)||Je(e)!=vt)return!1;var t=Da(e);if(t===null)return!0;var r=Te.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&ha.call(r)==Wu}var zi=il?_t(il):Vy;function Zg(e){return jc(e)&&e>=-Me&&e<=Me}var Gc=ol?_t(ol):Yy;function Za(e){return typeof e=="string"||!ne(e)&&Ne(e)&&Je(e)==Xt}function gt(e){return typeof e=="symbol"||Ne(e)&&Je(e)==Br}var rs=ll?_t(ll):Qy;function Jg(e){return e===s}function eb(e){return Ne(e)&&Ye(e)==or}function tb(e){return Ne(e)&&Je(e)==na}var rb=Ka(ai),sb=Ka(function(e,t){return e<=t});function Xc(e){if(!e)return[];if(it(e))return Za(e)?Ot(e):nt(e);if(As&&e[As])return Lu(e[As]());var t=Ye(e),r=t==mt?Hn:t==ut?ga:ss;return r(e)}function sr(e){if(!e)return e===0?e:0;if(e=zt(e),e===Le||e===-Le){var t=e<0?-1:1;return t*dt}return e===e?e:0}function ie(e){var t=sr(e),r=t%1;return t===t?r?t-r:t:0}function Vc(e){return e?qr(ie(e),0,re):0}function zt(e){if(typeof e=="number")return e;if(gt(e))return wt;if(ze(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ze(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=yl(e);var r=de.test(e);return r||Ce.test(e)?gu(e.slice(2),r?2:8):ue.test(e)?wt:+e}function Yc(e){return Ht(e,ot(e))}function ab(e){return e?qr(ie(e),-Me,Me):e===0?e:0}function ve(e){return e==null?"":ft(e)}var nb=Jr(function(e,t){if(Rs(t)||it(t)){Ht(t,$e(t),e);return}for(var r in t)Te.call(t,r)&&Es(e,r,t[r])}),Qc=Jr(function(e,t){Ht(t,ot(t),e)}),Ja=Jr(function(e,t,r,i){Ht(t,ot(t),e,i)}),ib=Jr(function(e,t,r,i){Ht(t,$e(t),e,i)}),ob=er(Qn);function lb(e,t){var r=Zr(e);return t==null?r:Cl(r,t)}var cb=pe(function(e,t){e=De(e);var r=-1,i=t.length,p=i>2?t[2]:s;for(p&&et(t[0],t[1],p)&&(i=1);++r<i;)for(var u=t[r],y=ot(u),x=-1,v=y.length;++x<v;){var C=y[x],z=e[C];(z===s||Ft(z,Vr[C])&&!Te.call(e,C))&&(e[C]=u[C])}return e}),pb=pe(function(e){return e.push(s,yc),yt(Zc,s,e)});function db(e,t){return pl(e,Q(t,3),jt)}function mb(e,t){return pl(e,Q(t,3),Jn)}function ub(e,t){return e==null?e:Zn(e,Q(t,3),ot)}function yb(e,t){return e==null?e:Ll(e,Q(t,3),ot)}function _b(e,t){return e&&jt(e,Q(t,3))}function fb(e,t){return e&&Jn(e,Q(t,3))}function gb(e){return e==null?[]:La(e,$e(e))}function bb(e){return e==null?[]:La(e,ot(e))}function Si(e,t,r){var i=e==null?s:Cr(e,t);return i===s?r:i}function xb(e,t){return e!=null&&gc(e,t,Uy)}function Ei(e,t){return e!=null&&gc(e,t,Ky)}var hb=cc(function(e,t,r){t!=null&&typeof t.toString!="function"&&(t=wa.call(t)),e[t]=r},Li(lt)),wb=cc(function(e,t,r){t!=null&&typeof t.toString!="function"&&(t=wa.call(t)),Te.call(e,t)?e[t].push(r):e[t]=[r]},Q),vb=pe(Ls);function $e(e){return it(e)?Al(e):si(e)}function ot(e){return it(e)?Al(e,!0):Zy(e)}function Tb(e,t){var r={};return t=Q(t,3),jt(e,function(i,p,u){Zt(r,t(i,p,u),i)}),r}function Db(e,t){var r={};return t=Q(t,3),jt(e,function(i,p,u){Zt(r,p,t(i,p,u))}),r}var kb=Jr(function(e,t,r){Ma(e,t,r)}),Zc=Jr(function(e,t,r,i){Ma(e,t,r,i)}),Ib=er(function(e,t){var r={};if(e==null)return r;var i=!1;t=qe(t,function(u){return u=_r(u,e),i||(i=u.length>1),u}),Ht(e,gi(e),r),i&&(r=At(r,T|P|U,x_));for(var p=t.length;p--;)ci(r,t[p]);return r});function Ab(e,t){return Jc(e,Ya(Q(t)))}var qb=er(function(e,t){return e==null?{}:e_(e,t)});function Jc(e,t){if(e==null)return{};var r=qe(gi(e),function(i){return[i]});return t=Q(t),jl(e,r,function(i,p){return t(i,p[0])})}function Cb(e,t,r){t=_r(t,e);var i=-1,p=t.length;for(p||(p=1,e=s);++i<p;){var u=e==null?s:e[Wt(t[i])];u===s&&(i=p,u=r),e=rr(u)?u.call(e):u}return e}function zb(e,t,r){return e==null?e:Ps(e,t,r)}function Sb(e,t,r,i){return i=typeof i=="function"?i:s,e==null?e:Ps(e,t,r,i)}var ep=mc($e),tp=mc(ot);function Eb(e,t,r){var i=ne(e),p=i||gr(e)||rs(e);if(t=Q(t,4),r==null){var u=e&&e.constructor;p?r=i?new u:[]:ze(e)?r=rr(u)?Zr(Da(e)):{}:r={}}return(p?Dt:jt)(e,function(y,x,v){return t(r,y,x,v)}),r}function Nb(e,t){return e==null?!0:ci(e,t)}function Lb(e,t,r){return e==null?e:Vl(e,t,mi(r))}function Mb(e,t,r,i){return i=typeof i=="function"?i:s,e==null?e:Vl(e,t,mi(r),i)}function ss(e){return e==null?[]:jn(e,$e(e))}function Pb(e){return e==null?[]:jn(e,ot(e))}function Ob(e,t,r){return r===s&&(r=t,t=s),r!==s&&(r=zt(r),r=r===r?r:0),t!==s&&(t=zt(t),t=t===t?t:0),qr(zt(e),t,r)}function Rb(e,t,r){return t=sr(t),r===s?(r=t,t=0):r=sr(r),e=zt(e),$y(e,t,r)}function Fb(e,t,r){if(r&&typeof r!="boolean"&&et(e,t,r)&&(t=r=s),r===s&&(typeof t=="boolean"?(r=t,t=s):typeof e=="boolean"&&(r=e,e=s)),e===s&&t===s?(e=0,t=1):(e=sr(e),t===s?(t=e,e=0):t=sr(t)),e>t){var i=e;e=t,t=i}if(r||e%1||t%1){var p=kl();return Ve(e+p*(t-e+fu("1e-"+((p+"").length-1))),t)}return ii(e,t)}var Bb=es(function(e,t,r){return t=t.toLowerCase(),e+(r?rp(t):t)});function rp(e){return Ni(ve(e).toLowerCase())}function sp(e){return e=ve(e),e&&e.replace(st,Cu).replace(iu,"")}function Ub(e,t,r){e=ve(e),t=ft(t);var i=e.length;r=r===s?i:qr(ie(r),0,i);var p=r;return r-=t.length,r>=0&&e.slice(r,p)==t}function Kb(e){return e=ve(e),e&&oa.test(e)?e.replace($r,zu):e}function $b(e){return e=ve(e),e&&ma.test(e)?e.replace(Ds,"\\$&"):e}var jb=es(function(e,t,r){return e+(r?"-":"")+t.toLowerCase()}),Hb=es(function(e,t,r){return e+(r?" ":"")+t.toLowerCase()}),Wb=ic("toLowerCase");function Gb(e,t,r){e=ve(e),t=ie(t);var i=t?Gr(e):0;if(!t||i>=t)return e;var p=(t-i)/2;return Ua(qa(p),r)+e+Ua(Aa(p),r)}function Xb(e,t,r){e=ve(e),t=ie(t);var i=t?Gr(e):0;return t&&i<t?e+Ua(t-i,r):e}function Vb(e,t,r){e=ve(e),t=ie(t);var i=t?Gr(e):0;return t&&i<t?Ua(t-i,r)+e:e}function Yb(e,t,r){return r||t==null?t=0:t&&(t=+t),ry(ve(e).replace(ks,""),t||0)}function Qb(e,t,r){return(r?et(e,t,r):t===s)?t=1:t=ie(t),oi(ve(e),t)}function Zb(){var e=arguments,t=ve(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var Jb=es(function(e,t,r){return e+(r?"_":"")+t.toLowerCase()});function ex(e,t,r){return r&&typeof r!="number"&&et(e,t,r)&&(t=r=s),r=r===s?re:r>>>0,r?(e=ve(e),e&&(typeof t=="string"||t!=null&&!zi(t))&&(t=ft(t),!t&&Wr(e))?fr(Ot(e),0,r):e.split(t,r)):[]}var tx=es(function(e,t,r){return e+(r?" ":"")+Ni(t)});function rx(e,t,r){return e=ve(e),r=r==null?0:qr(ie(r),0,e.length),t=ft(t),e.slice(r,r+t.length)==t}function sx(e,t,r){var i=d.templateSettings;r&&et(e,t,r)&&(t=s),e=ve(e),t=Ja({},t,i,uc);var p=Ja({},t.imports,i.imports,uc),u=$e(p),y=jn(p,u),x,v,C=0,z=t.interpolate||Pt,N="__p += '",$=Wn((t.escape||Pt).source+"|"+z.source+"|"+(z===ca?fe:Pt).source+"|"+(t.evaluate||Pt).source+"|$","g"),X="//# sourceURL="+(Te.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++du+"]")+`
120
+ `)}function q_(e){return ne(e)||Er(e)||!!(Tl&&e&&e[Tl])}function tr(e,t){var r=typeof e;return t=t??Me,!!t&&(r=="number"||r!="symbol"&&Ee.test(e))&&e>-1&&e%1==0&&e<t}function et(e,t,r){if(!ze(r))return!1;var i=typeof t;return(i=="number"?it(r)&&tr(t,r.length):i=="string"&&t in r)?Ft(r[t],e):!1}function wi(e,t){if(ne(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||gt(e)?!0:da.test(e)||!pa.test(e)||t!=null&&e in De(t)}function C_(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function vi(e){var t=$a(e),r=d[t];if(typeof r!="function"||!(t in ye.prototype))return!1;if(e===r)return!0;var i=bi(r);return!!i&&e===i[0]}function z_(e){return!!xl&&xl in e}var S_=xa?rr:Fi;function Rs(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Vr;return e===r}function xc(e){return e===e&&!ze(e)}function hc(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==s||e in De(r))}}function E_(e){var t=Va(e,function(i){return r.size===b&&r.clear(),i}),r=t.cache;return t}function N_(e,t){var r=e[1],i=t[1],p=r|i,u=p<(j|G|S),_=i==S&&r==B||i==S&&r==W&&e[7].length<=t[8]||i==(S|W)&&t[7].length<=t[8]&&r==B;if(!(u||_))return e;i&j&&(e[2]=t[2],p|=r&j?0:V);var x=t[3];if(x){var v=e[3];e[3]=v?rc(v,x,t[4]):x,e[4]=v?dr(e[3],h):t[4]}return x=t[5],x&&(v=e[5],e[5]=v?sc(v,x,t[6]):x,e[6]=v?dr(e[5],h):t[6]),x=t[7],x&&(e[7]=x),i&S&&(e[8]=e[8]==null?t[8]:Ve(e[8],t[8])),e[9]==null&&(e[9]=t[9]),e[0]=t[0],e[1]=p,e}function L_(e){var t=[];if(e!=null)for(var r in De(e))t.push(r);return t}function M_(e){return wa.call(e)}function wc(e,t,r){return t=Be(t===s?e.length-1:t,0),function(){for(var i=arguments,p=-1,u=Be(i.length-t,0),_=D(u);++p<u;)_[p]=i[t+p];p=-1;for(var x=D(t+1);++p<t;)x[p]=i[p];return x[t]=r(_),yt(e,this,x)}}function vc(e,t){return t.length<2?e:Cr(e,qt(t,0,-1))}function P_(e,t){for(var r=e.length,i=Ve(t.length,r),p=nt(e);i--;){var u=t[i];e[i]=tr(u,r)?p[u]:s}return e}function Ti(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var Tc=kc(Wl),Fs=Qu||function(e,t){return We.setTimeout(e,t)},Di=kc(n_);function Dc(e,t,r){var i=t+"";return Di(e,A_(i,O_(D_(i),r)))}function kc(e){var t=0,r=0;return function(){var i=ty(),p=Ue-(i-r);if(r=i,p>0){if(++t>=Et)return arguments[0]}else t=0;return e.apply(s,arguments)}}function Ha(e,t){var r=-1,i=e.length,p=i-1;for(t=t===s?i:t;++r<t;){var u=ii(r,p),_=e[u];e[u]=e[r],e[r]=_}return e.length=t,e}var Ic=E_(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(In,function(r,i,p,u){t.push(p?u.replace(te,"$1"):i||r)}),t});function Wt(e){if(typeof e=="string"||gt(e))return e;var t=e+"";return t=="0"&&1/e==-Le?"-0":t}function Sr(e){if(e!=null){try{return ha.call(e)}catch{}try{return e+""}catch{}}return""}function O_(e,t){return Dt(Nt,function(r){var i="_."+r[0];t&r[1]&&!_a(e,i)&&e.push(i)}),e.sort()}function Ac(e){if(e instanceof ye)return e.clone();var t=new It(e.__wrapped__,e.__chain__);return t.__actions__=nt(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function R_(e,t,r){(r?et(e,t,r):t===s)?t=1:t=Be(ie(t),0);var i=e==null?0:e.length;if(!i||t<1)return[];for(var p=0,u=0,_=D(Aa(i/t));p<i;)_[u++]=qt(e,p,p+=t);return _}function F_(e){for(var t=-1,r=e==null?0:e.length,i=0,p=[];++t<r;){var u=e[t];u&&(p[i++]=u)}return p}function B_(){var e=arguments.length;if(!e)return[];for(var t=D(e-1),r=arguments[0],i=e;i--;)t[i-1]=arguments[i];return pr(ne(r)?nt(r):[r],Ge(t,1))}var U_=pe(function(e,t){return Oe(e)?Ns(e,Ge(t,1,Oe,!0)):[]}),K_=pe(function(e,t){var r=Ct(t);return Oe(r)&&(r=s),Oe(e)?Ns(e,Ge(t,1,Oe,!0),Q(r,2)):[]}),$_=pe(function(e,t){var r=Ct(t);return Oe(r)&&(r=s),Oe(e)?Ns(e,Ge(t,1,Oe,!0),s,r):[]});function j_(e,t,r){var i=e==null?0:e.length;return i?(t=r||t===s?1:ie(t),qt(e,t<0?0:t,i)):[]}function H_(e,t,r){var i=e==null?0:e.length;return i?(t=r||t===s?1:ie(t),t=i-t,qt(e,0,t<0?0:t)):[]}function W_(e,t){return e&&e.length?Oa(e,Q(t,3),!0,!0):[]}function G_(e,t){return e&&e.length?Oa(e,Q(t,3),!0):[]}function X_(e,t,r,i){var p=e==null?0:e.length;return p?(r&&typeof r!="number"&&et(e,t,r)&&(r=0,i=p),By(e,t,r,i)):[]}function qc(e,t,r){var i=e==null?0:e.length;if(!i)return-1;var p=r==null?0:ie(r);return p<0&&(p=Be(i+p,0)),fa(e,Q(t,3),p)}function Cc(e,t,r){var i=e==null?0:e.length;if(!i)return-1;var p=i-1;return r!==s&&(p=ie(r),p=r<0?Be(i+p,0):Ve(p,i-1)),fa(e,Q(t,3),p,!0)}function zc(e){var t=e==null?0:e.length;return t?Ge(e,1):[]}function V_(e){var t=e==null?0:e.length;return t?Ge(e,Le):[]}function Y_(e,t){var r=e==null?0:e.length;return r?(t=t===s?1:ie(t),Ge(e,t)):[]}function Q_(e){for(var t=-1,r=e==null?0:e.length,i={};++t<r;){var p=e[t];i[p[0]]=p[1]}return i}function Sc(e){return e&&e.length?e[0]:s}function Z_(e,t,r){var i=e==null?0:e.length;if(!i)return-1;var p=r==null?0:ie(r);return p<0&&(p=Be(i+p,0)),Hr(e,t,p)}function J_(e){var t=e==null?0:e.length;return t?qt(e,0,-1):[]}var ef=pe(function(e){var t=qe(e,di);return t.length&&t[0]===e[0]?ti(t):[]}),tf=pe(function(e){var t=Ct(e),r=qe(e,di);return t===Ct(r)?t=s:r.pop(),r.length&&r[0]===e[0]?ti(r,Q(t,2)):[]}),rf=pe(function(e){var t=Ct(e),r=qe(e,di);return t=typeof t=="function"?t:s,t&&r.pop(),r.length&&r[0]===e[0]?ti(r,s,t):[]});function sf(e,t){return e==null?"":Ju.call(e,t)}function Ct(e){var t=e==null?0:e.length;return t?e[t-1]:s}function af(e,t,r){var i=e==null?0:e.length;if(!i)return-1;var p=i;return r!==s&&(p=ie(r),p=p<0?Be(i+p,0):Ve(p,i-1)),t===t?Ou(e,t,p):fa(e,dl,p,!0)}function nf(e,t){return e&&e.length?Kl(e,ie(t)):s}var of=pe(Ec);function Ec(e,t){return e&&e.length&&t&&t.length?ni(e,t):e}function lf(e,t,r){return e&&e.length&&t&&t.length?ni(e,t,Q(r,2)):e}function cf(e,t,r){return e&&e.length&&t&&t.length?ni(e,t,s,r):e}var pf=er(function(e,t){var r=e==null?0:e.length,i=Qn(e,t);return Hl(e,qe(t,function(p){return tr(p,r)?+p:p}).sort(tc)),i});function df(e,t){var r=[];if(!(e&&e.length))return r;var i=-1,p=[],u=e.length;for(t=Q(t,3);++i<u;){var _=e[i];t(_,i,e)&&(r.push(_),p.push(i))}return Hl(e,p),r}function ki(e){return e==null?e:sy.call(e)}function mf(e,t,r){var i=e==null?0:e.length;return i?(r&&typeof r!="number"&&et(e,t,r)?(t=0,r=i):(t=t==null?0:ie(t),r=r===s?i:ie(r)),qt(e,t,r)):[]}function uf(e,t){return Pa(e,t)}function yf(e,t,r){return li(e,t,Q(r,2))}function _f(e,t){var r=e==null?0:e.length;if(r){var i=Pa(e,t);if(i<r&&Ft(e[i],t))return i}return-1}function ff(e,t){return Pa(e,t,!0)}function gf(e,t,r){return li(e,t,Q(r,2),!0)}function bf(e,t){var r=e==null?0:e.length;if(r){var i=Pa(e,t,!0)-1;if(Ft(e[i],t))return i}return-1}function xf(e){return e&&e.length?Gl(e):[]}function hf(e,t){return e&&e.length?Gl(e,Q(t,2)):[]}function wf(e){var t=e==null?0:e.length;return t?qt(e,1,t):[]}function vf(e,t,r){return e&&e.length?(t=r||t===s?1:ie(t),qt(e,0,t<0?0:t)):[]}function Tf(e,t,r){var i=e==null?0:e.length;return i?(t=r||t===s?1:ie(t),t=i-t,qt(e,t<0?0:t,i)):[]}function Df(e,t){return e&&e.length?Oa(e,Q(t,3),!1,!0):[]}function kf(e,t){return e&&e.length?Oa(e,Q(t,3)):[]}var If=pe(function(e){return yr(Ge(e,1,Oe,!0))}),Af=pe(function(e){var t=Ct(e);return Oe(t)&&(t=s),yr(Ge(e,1,Oe,!0),Q(t,2))}),qf=pe(function(e){var t=Ct(e);return t=typeof t=="function"?t:s,yr(Ge(e,1,Oe,!0),s,t)});function Cf(e){return e&&e.length?yr(e):[]}function zf(e,t){return e&&e.length?yr(e,Q(t,2)):[]}function Sf(e,t){return t=typeof t=="function"?t:s,e&&e.length?yr(e,s,t):[]}function Ii(e){if(!(e&&e.length))return[];var t=0;return e=cr(e,function(r){if(Oe(r))return t=Be(r.length,t),!0}),$n(t,function(r){return qe(e,Bn(r))})}function Nc(e,t){if(!(e&&e.length))return[];var r=Ii(e);return t==null?r:qe(r,function(i){return yt(t,s,i)})}var Ef=pe(function(e,t){return Oe(e)?Ns(e,t):[]}),Nf=pe(function(e){return pi(cr(e,Oe))}),Lf=pe(function(e){var t=Ct(e);return Oe(t)&&(t=s),pi(cr(e,Oe),Q(t,2))}),Mf=pe(function(e){var t=Ct(e);return t=typeof t=="function"?t:s,pi(cr(e,Oe),s,t)}),Pf=pe(Ii);function Of(e,t){return Ql(e||[],t||[],Es)}function Rf(e,t){return Ql(e||[],t||[],Ps)}var Ff=pe(function(e){var t=e.length,r=t>1?e[t-1]:s;return r=typeof r=="function"?(e.pop(),r):s,Nc(e,r)});function Lc(e){var t=d(e);return t.__chain__=!0,t}function Bf(e,t){return t(e),e}function Wa(e,t){return t(e)}var Uf=er(function(e){var t=e.length,r=t?e[0]:0,i=this.__wrapped__,p=function(u){return Qn(u,e)};return t>1||this.__actions__.length||!(i instanceof ye)||!tr(r)?this.thru(p):(i=i.slice(r,+r+(t?1:0)),i.__actions__.push({func:Wa,args:[p],thisArg:s}),new It(i,this.__chain__).thru(function(u){return t&&!u.length&&u.push(s),u}))});function Kf(){return Lc(this)}function $f(){return new It(this.value(),this.__chain__)}function jf(){this.__values__===s&&(this.__values__=Xc(this.value()));var e=this.__index__>=this.__values__.length,t=e?s:this.__values__[this.__index__++];return{done:e,value:t}}function Hf(){return this}function Wf(e){for(var t,r=this;r instanceof Sa;){var i=Ac(r);i.__index__=0,i.__values__=s,t?p.__wrapped__=i:t=i;var p=i;r=r.__wrapped__}return p.__wrapped__=e,t}function Gf(){var e=this.__wrapped__;if(e instanceof ye){var t=e;return this.__actions__.length&&(t=new ye(this)),t=t.reverse(),t.__actions__.push({func:Wa,args:[ki],thisArg:s}),new It(t,this.__chain__)}return this.thru(ki)}function Xf(){return Yl(this.__wrapped__,this.__actions__)}var Vf=Ra(function(e,t,r){Te.call(e,r)?++e[r]:Zt(e,r,1)});function Yf(e,t,r){var i=ne(e)?cl:Fy;return r&&et(e,t,r)&&(t=s),i(e,Q(t,3))}function Qf(e,t){var r=ne(e)?cr:Nl;return r(e,Q(t,3))}var Zf=oc(qc),Jf=oc(Cc);function eg(e,t){return Ge(Ga(e,t),1)}function tg(e,t){return Ge(Ga(e,t),Le)}function rg(e,t,r){return r=r===s?1:ie(r),Ge(Ga(e,t),r)}function Mc(e,t){var r=ne(e)?Dt:ur;return r(e,Q(t,3))}function Pc(e,t){var r=ne(e)?hu:El;return r(e,Q(t,3))}var sg=Ra(function(e,t,r){Te.call(e,r)?e[r].push(t):Zt(e,r,[t])});function ag(e,t,r,i){e=it(e)?e:ss(e),r=r&&!i?ie(r):0;var p=e.length;return r<0&&(r=Be(p+r,0)),Za(e)?r<=p&&e.indexOf(t,r)>-1:!!p&&Hr(e,t,r)>-1}var ng=pe(function(e,t,r){var i=-1,p=typeof t=="function",u=it(e)?D(e.length):[];return ur(e,function(_){u[++i]=p?yt(t,_,r):Ls(_,t,r)}),u}),ig=Ra(function(e,t,r){Zt(e,r,t)});function Ga(e,t){var r=ne(e)?qe:Fl;return r(e,Q(t,3))}function og(e,t,r,i){return e==null?[]:(ne(t)||(t=t==null?[]:[t]),r=i?s:r,ne(r)||(r=r==null?[]:[r]),$l(e,t,r))}var lg=Ra(function(e,t,r){e[r?0:1].push(t)},function(){return[[],[]]});function cg(e,t,r){var i=ne(e)?Rn:ul,p=arguments.length<3;return i(e,Q(t,4),r,p,ur)}function pg(e,t,r){var i=ne(e)?wu:ul,p=arguments.length<3;return i(e,Q(t,4),r,p,El)}function dg(e,t){var r=ne(e)?cr:Nl;return r(e,Ya(Q(t,3)))}function mg(e){var t=ne(e)?ql:s_;return t(e)}function ug(e,t,r){(r?et(e,t,r):t===s)?t=1:t=ie(t);var i=ne(e)?Ly:a_;return i(e,t)}function yg(e){var t=ne(e)?My:i_;return t(e)}function _g(e){if(e==null)return 0;if(it(e))return Za(e)?Gr(e):e.length;var t=Ye(e);return t==mt||t==ut?e.size:si(e).length}function fg(e,t,r){var i=ne(e)?Fn:o_;return r&&et(e,t,r)&&(t=s),i(e,Q(t,3))}var gg=pe(function(e,t){if(e==null)return[];var r=t.length;return r>1&&et(e,t[0],t[1])?t=[]:r>2&&et(t[0],t[1],t[2])&&(t=[t[0]]),$l(e,Ge(t,1),[])}),Xa=Yu||function(){return We.Date.now()};function bg(e,t){if(typeof t!="function")throw new kt(m);return e=ie(e),function(){if(--e<1)return t.apply(this,arguments)}}function Oc(e,t,r){return t=r?s:t,t=e&&t==null?e.length:t,Jt(e,S,s,s,s,s,t)}function Rc(e,t){var r;if(typeof t!="function")throw new kt(m);return e=ie(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=s),r}}var Ai=pe(function(e,t,r){var i=j;if(r.length){var p=dr(r,ts(Ai));i|=O}return Jt(e,i,t,r,p)}),Fc=pe(function(e,t,r){var i=j|G;if(r.length){var p=dr(r,ts(Fc));i|=O}return Jt(t,i,e,r,p)});function Bc(e,t,r){t=r?s:t;var i=Jt(e,B,s,s,s,s,s,t);return i.placeholder=Bc.placeholder,i}function Uc(e,t,r){t=r?s:t;var i=Jt(e,k,s,s,s,s,s,t);return i.placeholder=Uc.placeholder,i}function Kc(e,t,r){var i,p,u,_,x,v,C=0,z=!1,N=!1,$=!0;if(typeof e!="function")throw new kt(m);t=zt(t)||0,ze(r)&&(z=!!r.leading,N="maxWait"in r,u=N?Be(zt(r.maxWait)||0,t):u,$="trailing"in r?!!r.trailing:$);function X(Re){var Bt=i,ar=p;return i=p=s,C=Re,_=e.apply(ar,Bt),_}function J(Re){return C=Re,x=Fs(me,t),z?X(Re):_}function le(Re){var Bt=Re-v,ar=Re-C,op=t-Bt;return N?Ve(op,u-ar):op}function ee(Re){var Bt=Re-v,ar=Re-C;return v===s||Bt>=t||Bt<0||N&&ar>=u}function me(){var Re=Xa();if(ee(Re))return _e(Re);x=Fs(me,le(Re))}function _e(Re){return x=s,$&&i?X(Re):(i=p=s,_)}function bt(){x!==s&&Zl(x),C=0,i=v=p=x=s}function tt(){return x===s?_:_e(Xa())}function xt(){var Re=Xa(),Bt=ee(Re);if(i=arguments,p=this,v=Re,Bt){if(x===s)return J(v);if(N)return Zl(x),x=Fs(me,t),X(v)}return x===s&&(x=Fs(me,t)),_}return xt.cancel=bt,xt.flush=tt,xt}var xg=pe(function(e,t){return Sl(e,1,t)}),hg=pe(function(e,t,r){return Sl(e,zt(t)||0,r)});function wg(e){return Jt(e,ae)}function Va(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new kt(m);var r=function(){var i=arguments,p=t?t.apply(this,i):i[0],u=r.cache;if(u.has(p))return u.get(p);var _=e.apply(this,i);return r.cache=u.set(p,_)||u,_};return r.cache=new(Va.Cache||Qt),r}Va.Cache=Qt;function Ya(e){if(typeof e!="function")throw new kt(m);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function vg(e){return Rc(2,e)}var Tg=l_(function(e,t){t=t.length==1&&ne(t[0])?qe(t[0],_t(Q())):qe(Ge(t,1),_t(Q()));var r=t.length;return pe(function(i){for(var p=-1,u=Ve(i.length,r);++p<u;)i[p]=t[p].call(this,i[p]);return yt(e,this,i)})}),qi=pe(function(e,t){var r=dr(t,ts(qi));return Jt(e,O,s,t,r)}),$c=pe(function(e,t){var r=dr(t,ts($c));return Jt(e,Y,s,t,r)}),Dg=er(function(e,t){return Jt(e,W,s,s,s,t)});function kg(e,t){if(typeof e!="function")throw new kt(m);return t=t===s?t:ie(t),pe(e,t)}function Ig(e,t){if(typeof e!="function")throw new kt(m);return t=t==null?0:Be(ie(t),0),pe(function(r){var i=r[t],p=fr(r,0,t);return i&&pr(p,i),yt(e,this,p)})}function Ag(e,t,r){var i=!0,p=!0;if(typeof e!="function")throw new kt(m);return ze(r)&&(i="leading"in r?!!r.leading:i,p="trailing"in r?!!r.trailing:p),Kc(e,t,{leading:i,maxWait:t,trailing:p})}function qg(e){return Oc(e,1)}function Cg(e,t){return qi(mi(t),e)}function zg(){if(!arguments.length)return[];var e=arguments[0];return ne(e)?e:[e]}function Sg(e){return At(e,U)}function Eg(e,t){return t=typeof t=="function"?t:s,At(e,U,t)}function Ng(e){return At(e,T|U)}function Lg(e,t){return t=typeof t=="function"?t:s,At(e,T|U,t)}function Mg(e,t){return t==null||zl(e,t,$e(t))}function Ft(e,t){return e===t||e!==e&&t!==t}var Pg=Ka(ei),Og=Ka(function(e,t){return e>=t}),Er=Pl(function(){return arguments}())?Pl:function(e){return Ne(e)&&Te.call(e,"callee")&&!vl.call(e,"callee")},ne=D.isArray,Rg=sl?_t(sl):Hy;function it(e){return e!=null&&Qa(e.length)&&!rr(e)}function Oe(e){return Ne(e)&&it(e)}function Fg(e){return e===!0||e===!1||Ne(e)&&Je(e)==Kt}var gr=Zu||Fi,Bg=al?_t(al):Wy;function Ug(e){return Ne(e)&&e.nodeType===1&&!Bs(e)}function Kg(e){if(e==null)return!0;if(it(e)&&(ne(e)||typeof e=="string"||typeof e.splice=="function"||gr(e)||rs(e)||Er(e)))return!e.length;var t=Ye(e);if(t==mt||t==ut)return!e.size;if(Rs(e))return!si(e).length;for(var r in e)if(Te.call(e,r))return!1;return!0}function $g(e,t){return Ms(e,t)}function jg(e,t,r){r=typeof r=="function"?r:s;var i=r?r(e,t):s;return i===s?Ms(e,t,s,r):!!i}function Ci(e){if(!Ne(e))return!1;var t=Je(e);return t==Or||t==Pr||typeof e.message=="string"&&typeof e.name=="string"&&!Bs(e)}function Hg(e){return typeof e=="number"&&Dl(e)}function rr(e){if(!ze(e))return!1;var t=Je(e);return t==wr||t==aa||t==Ze||t==Fr}function jc(e){return typeof e=="number"&&e==ie(e)}function Qa(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Me}function ze(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Ne(e){return e!=null&&typeof e=="object"}var Hc=nl?_t(nl):Xy;function Wg(e,t){return e===t||ri(e,t,xi(t))}function Gg(e,t,r){return r=typeof r=="function"?r:s,ri(e,t,xi(t),r)}function Xg(e){return Wc(e)&&e!=+e}function Vg(e){if(S_(e))throw new se(l);return Ol(e)}function Yg(e){return e===null}function Qg(e){return e==null}function Wc(e){return typeof e=="number"||Ne(e)&&Je(e)==$t}function Bs(e){if(!Ne(e)||Je(e)!=vt)return!1;var t=Da(e);if(t===null)return!0;var r=Te.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&ha.call(r)==Wu}var zi=il?_t(il):Vy;function Zg(e){return jc(e)&&e>=-Me&&e<=Me}var Gc=ol?_t(ol):Yy;function Za(e){return typeof e=="string"||!ne(e)&&Ne(e)&&Je(e)==Xt}function gt(e){return typeof e=="symbol"||Ne(e)&&Je(e)==Br}var rs=ll?_t(ll):Qy;function Jg(e){return e===s}function eb(e){return Ne(e)&&Ye(e)==or}function tb(e){return Ne(e)&&Je(e)==na}var rb=Ka(ai),sb=Ka(function(e,t){return e<=t});function Xc(e){if(!e)return[];if(it(e))return Za(e)?Ot(e):nt(e);if(As&&e[As])return Lu(e[As]());var t=Ye(e),r=t==mt?Hn:t==ut?ga:ss;return r(e)}function sr(e){if(!e)return e===0?e:0;if(e=zt(e),e===Le||e===-Le){var t=e<0?-1:1;return t*dt}return e===e?e:0}function ie(e){var t=sr(e),r=t%1;return t===t?r?t-r:t:0}function Vc(e){return e?qr(ie(e),0,re):0}function zt(e){if(typeof e=="number")return e;if(gt(e))return wt;if(ze(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ze(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=yl(e);var r=de.test(e);return r||Ce.test(e)?gu(e.slice(2),r?2:8):ue.test(e)?wt:+e}function Yc(e){return Ht(e,ot(e))}function ab(e){return e?qr(ie(e),-Me,Me):e===0?e:0}function ve(e){return e==null?"":ft(e)}var nb=Jr(function(e,t){if(Rs(t)||it(t)){Ht(t,$e(t),e);return}for(var r in t)Te.call(t,r)&&Es(e,r,t[r])}),Qc=Jr(function(e,t){Ht(t,ot(t),e)}),Ja=Jr(function(e,t,r,i){Ht(t,ot(t),e,i)}),ib=Jr(function(e,t,r,i){Ht(t,$e(t),e,i)}),ob=er(Qn);function lb(e,t){var r=Zr(e);return t==null?r:Cl(r,t)}var cb=pe(function(e,t){e=De(e);var r=-1,i=t.length,p=i>2?t[2]:s;for(p&&et(t[0],t[1],p)&&(i=1);++r<i;)for(var u=t[r],_=ot(u),x=-1,v=_.length;++x<v;){var C=_[x],z=e[C];(z===s||Ft(z,Vr[C])&&!Te.call(e,C))&&(e[C]=u[C])}return e}),pb=pe(function(e){return e.push(s,yc),yt(Zc,s,e)});function db(e,t){return pl(e,Q(t,3),jt)}function mb(e,t){return pl(e,Q(t,3),Jn)}function ub(e,t){return e==null?e:Zn(e,Q(t,3),ot)}function yb(e,t){return e==null?e:Ll(e,Q(t,3),ot)}function _b(e,t){return e&&jt(e,Q(t,3))}function fb(e,t){return e&&Jn(e,Q(t,3))}function gb(e){return e==null?[]:La(e,$e(e))}function bb(e){return e==null?[]:La(e,ot(e))}function Si(e,t,r){var i=e==null?s:Cr(e,t);return i===s?r:i}function xb(e,t){return e!=null&&gc(e,t,Uy)}function Ei(e,t){return e!=null&&gc(e,t,Ky)}var hb=cc(function(e,t,r){t!=null&&typeof t.toString!="function"&&(t=wa.call(t)),e[t]=r},Li(lt)),wb=cc(function(e,t,r){t!=null&&typeof t.toString!="function"&&(t=wa.call(t)),Te.call(e,t)?e[t].push(r):e[t]=[r]},Q),vb=pe(Ls);function $e(e){return it(e)?Al(e):si(e)}function ot(e){return it(e)?Al(e,!0):Zy(e)}function Tb(e,t){var r={};return t=Q(t,3),jt(e,function(i,p,u){Zt(r,t(i,p,u),i)}),r}function Db(e,t){var r={};return t=Q(t,3),jt(e,function(i,p,u){Zt(r,p,t(i,p,u))}),r}var kb=Jr(function(e,t,r){Ma(e,t,r)}),Zc=Jr(function(e,t,r,i){Ma(e,t,r,i)}),Ib=er(function(e,t){var r={};if(e==null)return r;var i=!1;t=qe(t,function(u){return u=_r(u,e),i||(i=u.length>1),u}),Ht(e,gi(e),r),i&&(r=At(r,T|P|U,x_));for(var p=t.length;p--;)ci(r,t[p]);return r});function Ab(e,t){return Jc(e,Ya(Q(t)))}var qb=er(function(e,t){return e==null?{}:e_(e,t)});function Jc(e,t){if(e==null)return{};var r=qe(gi(e),function(i){return[i]});return t=Q(t),jl(e,r,function(i,p){return t(i,p[0])})}function Cb(e,t,r){t=_r(t,e);var i=-1,p=t.length;for(p||(p=1,e=s);++i<p;){var u=e==null?s:e[Wt(t[i])];u===s&&(i=p,u=r),e=rr(u)?u.call(e):u}return e}function zb(e,t,r){return e==null?e:Ps(e,t,r)}function Sb(e,t,r,i){return i=typeof i=="function"?i:s,e==null?e:Ps(e,t,r,i)}var ep=mc($e),tp=mc(ot);function Eb(e,t,r){var i=ne(e),p=i||gr(e)||rs(e);if(t=Q(t,4),r==null){var u=e&&e.constructor;p?r=i?new u:[]:ze(e)?r=rr(u)?Zr(Da(e)):{}:r={}}return(p?Dt:jt)(e,function(_,x,v){return t(r,_,x,v)}),r}function Nb(e,t){return e==null?!0:ci(e,t)}function Lb(e,t,r){return e==null?e:Vl(e,t,mi(r))}function Mb(e,t,r,i){return i=typeof i=="function"?i:s,e==null?e:Vl(e,t,mi(r),i)}function ss(e){return e==null?[]:jn(e,$e(e))}function Pb(e){return e==null?[]:jn(e,ot(e))}function Ob(e,t,r){return r===s&&(r=t,t=s),r!==s&&(r=zt(r),r=r===r?r:0),t!==s&&(t=zt(t),t=t===t?t:0),qr(zt(e),t,r)}function Rb(e,t,r){return t=sr(t),r===s?(r=t,t=0):r=sr(r),e=zt(e),$y(e,t,r)}function Fb(e,t,r){if(r&&typeof r!="boolean"&&et(e,t,r)&&(t=r=s),r===s&&(typeof t=="boolean"?(r=t,t=s):typeof e=="boolean"&&(r=e,e=s)),e===s&&t===s?(e=0,t=1):(e=sr(e),t===s?(t=e,e=0):t=sr(t)),e>t){var i=e;e=t,t=i}if(r||e%1||t%1){var p=kl();return Ve(e+p*(t-e+fu("1e-"+((p+"").length-1))),t)}return ii(e,t)}var Bb=es(function(e,t,r){return t=t.toLowerCase(),e+(r?rp(t):t)});function rp(e){return Ni(ve(e).toLowerCase())}function sp(e){return e=ve(e),e&&e.replace(st,Cu).replace(iu,"")}function Ub(e,t,r){e=ve(e),t=ft(t);var i=e.length;r=r===s?i:qr(ie(r),0,i);var p=r;return r-=t.length,r>=0&&e.slice(r,p)==t}function Kb(e){return e=ve(e),e&&oa.test(e)?e.replace($r,zu):e}function $b(e){return e=ve(e),e&&ma.test(e)?e.replace(Ds,"\\$&"):e}var jb=es(function(e,t,r){return e+(r?"-":"")+t.toLowerCase()}),Hb=es(function(e,t,r){return e+(r?" ":"")+t.toLowerCase()}),Wb=ic("toLowerCase");function Gb(e,t,r){e=ve(e),t=ie(t);var i=t?Gr(e):0;if(!t||i>=t)return e;var p=(t-i)/2;return Ua(qa(p),r)+e+Ua(Aa(p),r)}function Xb(e,t,r){e=ve(e),t=ie(t);var i=t?Gr(e):0;return t&&i<t?e+Ua(t-i,r):e}function Vb(e,t,r){e=ve(e),t=ie(t);var i=t?Gr(e):0;return t&&i<t?Ua(t-i,r)+e:e}function Yb(e,t,r){return r||t==null?t=0:t&&(t=+t),ry(ve(e).replace(ks,""),t||0)}function Qb(e,t,r){return(r?et(e,t,r):t===s)?t=1:t=ie(t),oi(ve(e),t)}function Zb(){var e=arguments,t=ve(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var Jb=es(function(e,t,r){return e+(r?"_":"")+t.toLowerCase()});function ex(e,t,r){return r&&typeof r!="number"&&et(e,t,r)&&(t=r=s),r=r===s?re:r>>>0,r?(e=ve(e),e&&(typeof t=="string"||t!=null&&!zi(t))&&(t=ft(t),!t&&Wr(e))?fr(Ot(e),0,r):e.split(t,r)):[]}var tx=es(function(e,t,r){return e+(r?" ":"")+Ni(t)});function rx(e,t,r){return e=ve(e),r=r==null?0:qr(ie(r),0,e.length),t=ft(t),e.slice(r,r+t.length)==t}function sx(e,t,r){var i=d.templateSettings;r&&et(e,t,r)&&(t=s),e=ve(e),t=Ja({},t,i,uc);var p=Ja({},t.imports,i.imports,uc),u=$e(p),_=jn(p,u),x,v,C=0,z=t.interpolate||Pt,N="__p += '",$=Wn((t.escape||Pt).source+"|"+z.source+"|"+(z===ca?fe:Pt).source+"|"+(t.evaluate||Pt).source+"|$","g"),X="//# sourceURL="+(Te.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++du+"]")+`
121
121
  `;e.replace($,function(ee,me,_e,bt,tt,xt){return _e||(_e=bt),N+=e.slice(C,xt).replace(ua,Su),me&&(x=!0,N+=`' +
122
122
  __e(`+me+`) +
123
123
  '`),tt&&(v=!0,N+=`';
@@ -128,24 +128,24 @@ __p += '`),_e&&(N+=`' +
128
128
  `;var J=Te.call(t,"variable")&&t.variable;if(!J)N=`with (obj) {
129
129
  `+N+`
130
130
  }
131
- `;else if(K.test(J))throw new se(_);N=(v?N.replace(Dn,""):N).replace(vs,"$1").replace(ia,"$1;"),N="function("+(J||"obj")+`) {
131
+ `;else if(K.test(J))throw new se(y);N=(v?N.replace(Dn,""):N).replace(vs,"$1").replace(ia,"$1;"),N="function("+(J||"obj")+`) {
132
132
  `+(J?"":`obj || (obj = {});
133
133
  `)+"var __t, __p = ''"+(x?", __e = _.escape":"")+(v?`, __j = Array.prototype.join;
134
134
  function print() { __p += __j.call(arguments, '') }
135
135
  `:`;
136
136
  `)+N+`return __p
137
- }`;var le=np(function(){return xe(u,X+"return "+N).apply(s,y)});if(le.source=N,Ci(le))throw le;return le}function ax(e){return ve(e).toLowerCase()}function nx(e){return ve(e).toUpperCase()}function ix(e,t,r){if(e=ve(e),e&&(r||t===s))return yl(e);if(!e||!(t=ft(t)))return e;var i=Ot(e),p=Ot(t),u=_l(i,p),y=fl(i,p)+1;return fr(i,u,y).join("")}function ox(e,t,r){if(e=ve(e),e&&(r||t===s))return e.slice(0,bl(e)+1);if(!e||!(t=ft(t)))return e;var i=Ot(e),p=fl(i,Ot(t))+1;return fr(i,0,p).join("")}function lx(e,t,r){if(e=ve(e),e&&(r||t===s))return e.replace(ks,"");if(!e||!(t=ft(t)))return e;var i=Ot(e),p=_l(i,Ot(t));return fr(i,p).join("")}function cx(e,t){var r=ce,i=Qe;if(ze(t)){var p="separator"in t?t.separator:p;r="length"in t?ie(t.length):r,i="omission"in t?ft(t.omission):i}e=ve(e);var u=e.length;if(Wr(e)){var y=Ot(e);u=y.length}if(r>=u)return e;var x=r-Gr(i);if(x<1)return i;var v=y?fr(y,0,x).join(""):e.slice(0,x);if(p===s)return v+i;if(y&&(x+=v.length-x),zi(p)){if(e.slice(x).search(p)){var C,z=v;for(p.global||(p=Wn(p.source,ve(we.exec(p))+"g")),p.lastIndex=0;C=p.exec(z);)var N=C.index;v=v.slice(0,N===s?x:N)}}else if(e.indexOf(ft(p),x)!=x){var $=v.lastIndexOf(p);$>-1&&(v=v.slice(0,$))}return v+i}function px(e){return e=ve(e),e&&Ts.test(e)?e.replace(Vt,Ru):e}var dx=es(function(e,t,r){return e+(r?" ":"")+t.toUpperCase()}),Ni=ic("toUpperCase");function ap(e,t,r){return e=ve(e),t=r?s:t,t===s?Nu(e)?Uu(e):Du(e):e.match(t)||[]}var np=pe(function(e,t){try{return yt(e,s,t)}catch(r){return Ci(r)?r:new se(r)}}),mx=er(function(e,t){return Dt(t,function(r){r=Wt(r),Zt(e,r,Ai(e[r],e))}),e});function ux(e){var t=e==null?0:e.length,r=Q();return e=t?qe(e,function(i){if(typeof i[1]!="function")throw new kt(m);return[r(i[0]),i[1]]}):[],pe(function(i){for(var p=-1;++p<t;){var u=e[p];if(yt(u[0],this,i))return yt(u[1],this,i)}})}function yx(e){return Ry(At(e,T))}function Li(e){return function(){return e}}function _x(e,t){return e==null||e!==e?t:e}var fx=lc(),gx=lc(!0);function lt(e){return e}function Mi(e){return Rl(typeof e=="function"?e:At(e,T))}function bx(e){return Bl(At(e,T))}function xx(e,t){return Ul(e,At(t,T))}var hx=pe(function(e,t){return function(r){return Ls(r,e,t)}}),wx=pe(function(e,t){return function(r){return Ls(e,r,t)}});function Pi(e,t,r){var i=$e(t),p=La(t,i);r==null&&!(ze(t)&&(p.length||!i.length))&&(r=t,t=e,e=this,p=La(t,$e(t)));var u=!(ze(r)&&"chain"in r)||!!r.chain,y=rr(e);return Dt(p,function(x){var v=t[x];e[x]=v,y&&(e.prototype[x]=function(){var C=this.__chain__;if(u||C){var z=e(this.__wrapped__),N=z.__actions__=nt(this.__actions__);return N.push({func:v,args:arguments,thisArg:e}),z.__chain__=C,z}return v.apply(e,pr([this.value()],arguments))})}),e}function vx(){return We._===this&&(We._=Gu),this}function Oi(){}function Tx(e){return e=ie(e),pe(function(t){return Kl(t,e)})}var Dx=yi(qe),kx=yi(cl),Ix=yi(Fn);function ip(e){return wi(e)?Bn(Wt(e)):t_(e)}function Ax(e){return function(t){return e==null?s:Cr(e,t)}}var qx=pc(),Cx=pc(!0);function Ri(){return[]}function Fi(){return!1}function zx(){return{}}function Sx(){return""}function Ex(){return!0}function Nx(e,t){if(e=ie(e),e<1||e>Me)return[];var r=re,i=Ve(e,re);t=Q(t),e-=re;for(var p=$n(i,t);++r<e;)t(r);return p}function Lx(e){return ne(e)?qe(e,Wt):gt(e)?[e]:nt(Ic(ve(e)))}function Mx(e){var t=++Hu;return ve(e)+t}var Px=Ba(function(e,t){return e+t},0),Ox=_i("ceil"),Rx=Ba(function(e,t){return e/t},1),Fx=_i("floor");function Bx(e){return e&&e.length?Na(e,lt,ei):s}function Ux(e,t){return e&&e.length?Na(e,Q(t,2),ei):s}function Kx(e){return ml(e,lt)}function $x(e,t){return ml(e,Q(t,2))}function jx(e){return e&&e.length?Na(e,lt,ai):s}function Hx(e,t){return e&&e.length?Na(e,Q(t,2),ai):s}var Wx=Ba(function(e,t){return e*t},1),Gx=_i("round"),Xx=Ba(function(e,t){return e-t},0);function Vx(e){return e&&e.length?Kn(e,lt):0}function Yx(e,t){return e&&e.length?Kn(e,Q(t,2)):0}return d.after=bg,d.ary=Oc,d.assign=nb,d.assignIn=Qc,d.assignInWith=Ja,d.assignWith=ib,d.at=ob,d.before=Rc,d.bind=Ai,d.bindAll=mx,d.bindKey=Fc,d.castArray=zg,d.chain=Lc,d.chunk=R_,d.compact=F_,d.concat=B_,d.cond=ux,d.conforms=yx,d.constant=Li,d.countBy=Vf,d.create=lb,d.curry=Bc,d.curryRight=Uc,d.debounce=Kc,d.defaults=cb,d.defaultsDeep=pb,d.defer=xg,d.delay=hg,d.difference=U_,d.differenceBy=K_,d.differenceWith=$_,d.drop=j_,d.dropRight=H_,d.dropRightWhile=W_,d.dropWhile=G_,d.fill=X_,d.filter=Qf,d.flatMap=eg,d.flatMapDeep=tg,d.flatMapDepth=rg,d.flatten=zc,d.flattenDeep=V_,d.flattenDepth=Y_,d.flip=wg,d.flow=fx,d.flowRight=gx,d.fromPairs=Q_,d.functions=gb,d.functionsIn=bb,d.groupBy=sg,d.initial=J_,d.intersection=ef,d.intersectionBy=tf,d.intersectionWith=rf,d.invert=hb,d.invertBy=wb,d.invokeMap=ng,d.iteratee=Mi,d.keyBy=ig,d.keys=$e,d.keysIn=ot,d.map=Ga,d.mapKeys=Tb,d.mapValues=Db,d.matches=bx,d.matchesProperty=xx,d.memoize=Va,d.merge=kb,d.mergeWith=Zc,d.method=hx,d.methodOf=wx,d.mixin=Pi,d.negate=Ya,d.nthArg=Tx,d.omit=Ib,d.omitBy=Ab,d.once=vg,d.orderBy=og,d.over=Dx,d.overArgs=Tg,d.overEvery=kx,d.overSome=Ix,d.partial=qi,d.partialRight=$c,d.partition=lg,d.pick=qb,d.pickBy=Jc,d.property=ip,d.propertyOf=Ax,d.pull=of,d.pullAll=Ec,d.pullAllBy=lf,d.pullAllWith=cf,d.pullAt=pf,d.range=qx,d.rangeRight=Cx,d.rearg=Dg,d.reject=dg,d.remove=df,d.rest=kg,d.reverse=ki,d.sampleSize=ug,d.set=zb,d.setWith=Sb,d.shuffle=yg,d.slice=mf,d.sortBy=gg,d.sortedUniq=xf,d.sortedUniqBy=hf,d.split=ex,d.spread=Ig,d.tail=wf,d.take=vf,d.takeRight=Tf,d.takeRightWhile=Df,d.takeWhile=kf,d.tap=Bf,d.throttle=Ag,d.thru=Wa,d.toArray=Xc,d.toPairs=ep,d.toPairsIn=tp,d.toPath=Lx,d.toPlainObject=Yc,d.transform=Eb,d.unary=qg,d.union=If,d.unionBy=Af,d.unionWith=qf,d.uniq=Cf,d.uniqBy=zf,d.uniqWith=Sf,d.unset=Nb,d.unzip=Ii,d.unzipWith=Nc,d.update=Lb,d.updateWith=Mb,d.values=ss,d.valuesIn=Pb,d.without=Ef,d.words=ap,d.wrap=Cg,d.xor=Nf,d.xorBy=Lf,d.xorWith=Mf,d.zip=Pf,d.zipObject=Of,d.zipObjectDeep=Rf,d.zipWith=Ff,d.entries=ep,d.entriesIn=tp,d.extend=Qc,d.extendWith=Ja,Pi(d,d),d.add=Px,d.attempt=np,d.camelCase=Bb,d.capitalize=rp,d.ceil=Ox,d.clamp=Ob,d.clone=Sg,d.cloneDeep=Ng,d.cloneDeepWith=Lg,d.cloneWith=Eg,d.conformsTo=Mg,d.deburr=sp,d.defaultTo=_x,d.divide=Rx,d.endsWith=Ub,d.eq=Ft,d.escape=Kb,d.escapeRegExp=$b,d.every=Yf,d.find=Zf,d.findIndex=qc,d.findKey=db,d.findLast=Jf,d.findLastIndex=Cc,d.findLastKey=mb,d.floor=Fx,d.forEach=Mc,d.forEachRight=Pc,d.forIn=ub,d.forInRight=yb,d.forOwn=_b,d.forOwnRight=fb,d.get=Si,d.gt=Pg,d.gte=Og,d.has=xb,d.hasIn=Ei,d.head=Sc,d.identity=lt,d.includes=ag,d.indexOf=Z_,d.inRange=Rb,d.invoke=vb,d.isArguments=Er,d.isArray=ne,d.isArrayBuffer=Rg,d.isArrayLike=it,d.isArrayLikeObject=Oe,d.isBoolean=Fg,d.isBuffer=gr,d.isDate=Bg,d.isElement=Ug,d.isEmpty=Kg,d.isEqual=$g,d.isEqualWith=jg,d.isError=Ci,d.isFinite=Hg,d.isFunction=rr,d.isInteger=jc,d.isLength=Qa,d.isMap=Hc,d.isMatch=Wg,d.isMatchWith=Gg,d.isNaN=Xg,d.isNative=Vg,d.isNil=Qg,d.isNull=Yg,d.isNumber=Wc,d.isObject=ze,d.isObjectLike=Ne,d.isPlainObject=Bs,d.isRegExp=zi,d.isSafeInteger=Zg,d.isSet=Gc,d.isString=Za,d.isSymbol=gt,d.isTypedArray=rs,d.isUndefined=Jg,d.isWeakMap=eb,d.isWeakSet=tb,d.join=sf,d.kebabCase=jb,d.last=Ct,d.lastIndexOf=af,d.lowerCase=Hb,d.lowerFirst=Wb,d.lt=rb,d.lte=sb,d.max=Bx,d.maxBy=Ux,d.mean=Kx,d.meanBy=$x,d.min=jx,d.minBy=Hx,d.stubArray=Ri,d.stubFalse=Fi,d.stubObject=zx,d.stubString=Sx,d.stubTrue=Ex,d.multiply=Wx,d.nth=nf,d.noConflict=vx,d.noop=Oi,d.now=Xa,d.pad=Gb,d.padEnd=Xb,d.padStart=Vb,d.parseInt=Yb,d.random=Fb,d.reduce=cg,d.reduceRight=pg,d.repeat=Qb,d.replace=Zb,d.result=Cb,d.round=Gx,d.runInContext=w,d.sample=mg,d.size=_g,d.snakeCase=Jb,d.some=fg,d.sortedIndex=uf,d.sortedIndexBy=yf,d.sortedIndexOf=_f,d.sortedLastIndex=ff,d.sortedLastIndexBy=gf,d.sortedLastIndexOf=bf,d.startCase=tx,d.startsWith=rx,d.subtract=Xx,d.sum=Vx,d.sumBy=Yx,d.template=sx,d.times=Nx,d.toFinite=sr,d.toInteger=ie,d.toLength=Vc,d.toLower=ax,d.toNumber=zt,d.toSafeInteger=ab,d.toString=ve,d.toUpper=nx,d.trim=ix,d.trimEnd=ox,d.trimStart=lx,d.truncate=cx,d.unescape=px,d.uniqueId=Mx,d.upperCase=dx,d.upperFirst=Ni,d.each=Mc,d.eachRight=Pc,d.first=Sc,Pi(d,function(){var e={};return jt(d,function(t,r){Te.call(d.prototype,r)||(e[r]=t)}),e}(),{chain:!1}),d.VERSION=o,Dt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){d[e].placeholder=d}),Dt(["drop","take"],function(e,t){ye.prototype[e]=function(r){r=r===s?1:Be(ie(r),0);var i=this.__filtered__&&!t?new ye(this):this.clone();return i.__filtered__?i.__takeCount__=Ve(r,i.__takeCount__):i.__views__.push({size:Ve(r,re),type:e+(i.__dir__<0?"Right":"")}),i},ye.prototype[e+"Right"]=function(r){return this.reverse()[e](r).reverse()}}),Dt(["filter","map","takeWhile"],function(e,t){var r=t+1,i=r==Ke||r==ge;ye.prototype[e]=function(p){var u=this.clone();return u.__iteratees__.push({iteratee:Q(p,3),type:r}),u.__filtered__=u.__filtered__||i,u}}),Dt(["head","last"],function(e,t){var r="take"+(t?"Right":"");ye.prototype[e]=function(){return this[r](1).value()[0]}}),Dt(["initial","tail"],function(e,t){var r="drop"+(t?"":"Right");ye.prototype[e]=function(){return this.__filtered__?new ye(this):this[r](1)}}),ye.prototype.compact=function(){return this.filter(lt)},ye.prototype.find=function(e){return this.filter(e).head()},ye.prototype.findLast=function(e){return this.reverse().find(e)},ye.prototype.invokeMap=pe(function(e,t){return typeof e=="function"?new ye(this):this.map(function(r){return Ls(r,e,t)})}),ye.prototype.reject=function(e){return this.filter(Ya(Q(e)))},ye.prototype.slice=function(e,t){e=ie(e);var r=this;return r.__filtered__&&(e>0||t<0)?new ye(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==s&&(t=ie(t),r=t<0?r.dropRight(-t):r.take(t-e)),r)},ye.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},ye.prototype.toArray=function(){return this.take(re)},jt(ye.prototype,function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),p=d[i?"take"+(t=="last"?"Right":""):t],u=i||/^find/.test(t);p&&(d.prototype[t]=function(){var y=this.__wrapped__,x=i?[1]:arguments,v=y instanceof ye,C=x[0],z=v||ne(y),N=function(me){var _e=p.apply(d,pr([me],x));return i&&$?_e[0]:_e};z&&r&&typeof C=="function"&&C.length!=1&&(v=z=!1);var $=this.__chain__,X=!!this.__actions__.length,J=u&&!$,le=v&&!X;if(!u&&z){y=le?y:new ye(this);var ee=e.apply(y,x);return ee.__actions__.push({func:Wa,args:[N],thisArg:s}),new It(ee,$)}return J&&le?e.apply(this,x):(ee=this.thru(N),J?i?ee.value()[0]:ee.value():ee)})}),Dt(["pop","push","shift","sort","splice","unshift"],function(e){var t=ba[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);d.prototype[e]=function(){var p=arguments;if(i&&!this.__chain__){var u=this.value();return t.apply(ne(u)?u:[],p)}return this[r](function(y){return t.apply(ne(y)?y:[],p)})}}),jt(ye.prototype,function(e,t){var r=d[t];if(r){var i=r.name+"";Te.call(Qr,i)||(Qr[i]=[]),Qr[i].push({name:t,func:r})}}),Qr[Fa(s,G).name]=[{name:"wrapper",func:s}],ye.prototype.clone=cy,ye.prototype.reverse=py,ye.prototype.value=dy,d.prototype.at=Uf,d.prototype.chain=Kf,d.prototype.commit=$f,d.prototype.next=jf,d.prototype.plant=Wf,d.prototype.reverse=Gf,d.prototype.toJSON=d.prototype.valueOf=d.prototype.value=Xf,d.prototype.first=d.prototype.head,As&&(d.prototype[As]=Hf),d},Xr=Ku();Dr?((Dr.exports=Xr)._=Xr,Mn._=Xr):We._=Xr}).call(as)}(Ws,Ws.exports);var io=Ws.exports;const Se="tccScript",Lr={builtinFunctions:/strategy\.closedtrades\.max_drawdown_percent|strategy\.opentrades\.max_drawdown_percent|strategy\.risk\.max_intraday_filled_orders|strategy\.closedtrades\.max_runup_percent|array\.percentile_linear_interpolation|strategy\.closedtrades\.entry_bar_index|strategy\.opentrades\.max_runup_percent|strategy\.closedtrades\.exit_bar_index|strategy\.closedtrades\.profit_percent|strategy\.closedtrades\.entry_comment|strategy\.opentrades\.entry_bar_index|strategy\.closedtrades\.exit_comment|strategy\.closedtrades\.max_drawdown|strategy\.opentrades\.profit_percent|ta\.percentile_linear_interpolation|strategy\.closedtrades\.entry_price|strategy\.opentrades\.entry_comment|strategy\.closedtrades\.commission|strategy\.closedtrades\.entry_time|strategy\.closedtrades\.exit_price|strategy\.opentrades\.max_drawdown|strategy\.risk\.max_cons_loss_days|strategy\.closedtrades\.exit_time|strategy\.closedtrades\.max_runup|strategy\.opentrades\.entry_price|strategy\.risk\.max_intraday_loss|strategy\.risk\.max_position_size|table\.cell_set_text_font_family|strategy\.closedtrades\.entry_id|strategy\.opentrades\.commission|strategy\.opentrades\.entry_time|array\.binary_search_rightmost|array\.percentile_nearest_rank|strategy\.closedtrades\.exit_id|strategy\.opentrades\.max_runup|array\.binary_search_leftmost|strategy\.closedtrades\.profit|strategy\.opentrades\.entry_id|strategy\.risk\.allow_entry_in|strategy\.convert_to_account|box\.set_bottom_right_point|label\.set_text_font_family|strategy\.closedtrades\.size|strategy\.convert_to_symbol|strategy\.default_entry_qty|strategy\.opentrades\.profit|strategy\.risk\.max_drawdown|ta\.percentile_nearest_rank|table\.cell_set_text_halign|table\.cell_set_text_valign|request\.security_lower_tf|table\.cell_set_text_color|box\.set_text_font_family|strategy\.opentrades\.size|table\.cell_set_text_size|matrix\.is_antisymmetric|box\.set_top_left_point|chart\.point\.from_index|matrix\.is_antidiagonal|table\.cell_set_bgcolor|table\.cell_set_tooltip|table\.set_border_color|table\.set_border_width|timeframe\.from_seconds|chart\.point\.from_time|line\.set_second_point|math\.round_to_mintick|matrix\.elements_count|request\.currency_rate|ta\.pivot_point_levels|table\.cell_set_height|table\.set_frame_color|table\.set_frame_width|box\.set_border_color|box\.set_border_style|box\.set_border_width|line\.set_first_point|matrix\.is_stochastic|matrix\.is_triangular|table\.cell_set_width|timeframe\.in_seconds|array\.binary_search|box\.set_rightbottom|box\.set_text_halign|box\.set_text_valign|color\.from_gradient|label\.set_textalign|label\.set_textcolor|matrix\.eigenvectors|matrix\.is_symmetric|matrix\.swap_columns|strategy\.cancel_all|table\.cell_set_text|array\.new_linefill|array\.sort_indices|box\.set_text_color|linefill\.get_line1|linefill\.get_line2|linefill\.set_color|matrix\.eigenvalues|matrix\.is_diagonal|matrix\.is_identity|strategy\.close_all|table\.set_position|ticker\.pointfigure|array\.lastindexof|array\.percentrank|array\.standardize|box\.set_text_size|box\.set_text_wrap|label\.set_tooltip|matrix\.remove_col|matrix\.remove_row|request\.dividends|request\.financial|table\.merge_cells|table\.set_bgcolor|ticker\.heikinashi|array\.covariance|array\.new_string|chart\.point\.copy|matrix\.is_binary|matrix\.is_square|matrix\.submatrix|matrix\.swap_rows|matrix\.transpose|request\.earnings|request\.economic|request\.security|ticker\.linebreak|timeframe\.change|array\.new_color|array\.new_float|array\.new_label|array\.new_table|box\.set_bgcolor|box\.set_lefttop|chart\.point\.new|chart\.point\.now|input\.text_area|input\.timeframe|label\.set_color|label\.set_point|label\.set_style|line\.set_extend|linefill\.delete|polyline\.delete|str\.format_time|str\.replace_all|strategy\.cancel|ticker\.standard|alertcondition|array\.includes|array\.new_bool|array\.new_line|array\.variance|box\.get_bottom|box\.set_bottom|box\.set_extend|label\.get_text|label\.set_size|label\.set_text|label\.set_xloc|label\.set_yloc|line\.get_price|line\.set_color|line\.set_style|line\.set_width|math\.todegrees|math\.toradians|matrix\.add_col|matrix\.add_row|matrix\.columns|matrix\.is_zero|matrix\.reshape|matrix\.reverse|request\.quandl|request\.splits|str\.startswith|strategy\.close|strategy\.entry|strategy\.order|syminfo\.prefix|syminfo\.ticker|ta\.correlation|ta\.highestbars|ta\.percentrank|ticker\.inherit|array\.indexof|array\.new_box|array\.new_int|array\.reverse|array\.unshift|box\.get_right|box\.set_right|input\.session|line\.set_xloc|matrix\.concat|matrix\.median|max_bars_back|runtime\.error|str\.substring|strategy\.exit|ta\.crossunder|ta\.lowestbars|ta\.supertrend|ticker\.modify|array\.concat|array\.insert|array\.median|array\.remove|box\.get_left|box\.set_left|box\.set_text|input\.source|input\.string|input\.symbol|label\.delete|label\.set_xy|line\.set_xy1|line\.set_xy2|linefill\.new|map\.contains|matrix\.trace|polyline\.new|request\.seed|str\.contains|str\.endswith|str\.tonumber|str\.tostring|ta\.barssince|ta\.crossover|ta\.pivothigh|ta\.valuewhen|table\.delete|ticker\.renko|array\.clear|array\.every|array\.first|array\.range|array\.shift|array\.slice|array\.stdev|box\.get_top|box\.set_top|input\.color|input\.float|input\.price|label\.get_x|label\.get_y|label\.set_x|label\.set_y|line\.delete|line\.get_x1|line\.get_x2|line\.get_y1|line\.get_y2|line\.set_x1|line\.set_x2|line\.set_y1|line\.set_y2|log\.warning|map\.put_all|math\.random|matrix\.copy|matrix\.diff|matrix\.fill|matrix\.kron|matrix\.mode|matrix\.mult|matrix\.pinv|matrix\.rank|matrix\.rows|matrix\.sort|str\.replace|ta\.pivotlow|ta\.variance|table\.clear|ticker\.kagi|array\.copy|array\.fill|array\.from|array\.join|array\.last|array\.mode|array\.push|array\.size|array\.some|array\.sort|box\.delete|dayofmonth|input\.bool|input\.time|label\.copy|map\.remove|map\.values|math\.floor|math\.log10|math\.round|matrix\.avg|matrix\.col|matrix\.det|matrix\.get|matrix\.inv|matrix\.max|matrix\.min|matrix\.new|matrix\.pow|matrix\.row|matrix\.set|matrix\.sum|plotcandle|str\.format|str\.length|ta\.falling|ta\.highest|table\.cell|ticker\.new|time_close|weekofyear|array\.abs|array\.avg|array\.get|array\.max|array\.min|array\.new|array\.pop|array\.set|array\.sum|color\.new|color\.rgb|dayofweek|indicator|input\.int|label\.new|line\.copy|log\.error|map\.clear|math\.acos|math\.asin|math\.atan|input\.enum|math\.ceil|math\.sign|math\.sqrt|plotarrow|plotshape|str\.lower|str\.match|str\.split|str\.upper|ta\.change|ta\.linreg|ta\.lowest|ta\.median|ta\.rising|table\.new|timestamp|barcolor|box\.copy|line\.new|linefill|log\.info|map\.copy|map\.keys|map\.size|math\.abs|math\.avg|math\.cos|math\.exp|math\.log|math\.max|math\.min|math\.pow|math\.sin|math\.sum|math\.tan|plotchar|strategy|ta\.cross|ta\.range|ta\.stdev|ta\.stoch|bgcolor|box\.new|color\.b|color\.g|color\.r|color\.t|library|map\.get|map\.new|map\.put|plotbar|str\.pos|ta\.alma|ta\.macd|ta\.mode|ta\.swma|ta\.vwap|ta\.vwma|fixnan|minute|second|string|ta\.atr|ta\.bbw|ta\.cci|ta\.cmo|ta\.cog|ta\.cum|ta\.dev|ta\.dmi|ta\.ema|ta\.hma|ta\.kcw|ta\.max|ta\.mfi|ta\.min|ta\.mom|ta\.rma|ta\.roc|ta\.rsi|ta\.sar|ta\.sma|ta\.tsi|ta\.wma|ta\.wpr|alert|color|float|hline|input|label|month|ta\.bb|ta\.kc|ta\.tr|table|bool|fill|hour|line|plot|time|year|box|int|na|nz/,keywords:/continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to/,tokenizer:{root:[[/\/\/\s*(?=@)/,"comment","@comments"],[/\/\/.*(?!@).*/,"comment"],[/\'([^\'\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/\"/,{token:"string",bracket:"@open",next:"@stringDouble"}],[/(type|enum)\s+[a-zA-Z]\w*/,"entity.name.type"],[/'/,{token:"string",bracket:"@open",next:"@stringSingle"}],[/(@builtinFunctions)(?=\s*\(|\s*<.*>)/,{token:"support.function",next:"@template"}],[/@punctuation/,{token:"punctuation.operator",next:"@property"}],[/(varip|var)\b(\s+)((?!(?:chart\.point|linefill|polyline|matrix|series|simple|string|array|color|const|float|label|table|bool|line|box|int|map|continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to)\b)[\w.\d_$]+)(\[\]|)(\s+)((?!(?:continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to)\b)[\w\d_$]+)/,[{token:"keyword"},{token:"source"},{token:"entity.name.type"},{token:"paren"},{token:"source"},{token:"variable.other"}]],[/\b(?:@builtinTypes)(?=(\s*)[\[|<|(]|(?=\s+(?=[^.=][\w\(]*))|\s*$)/,{token:"support.type",next:"@template"}],[/^(\s*)\b(?!(?:chart\.point|linefill|polyline|matrix|series|simple|string|array|color|const|float|label|table|bool|line|box|int|map|continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to)\b)([\w.\d_$]+)(\[\]|)(\s+)((?!(?:continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to)\b)[\w\d_$]+)(\s+)(\=)/,[{token:"source"},{token:"entity.name.type"},{token:"paren"},{token:"source"},{token:"variable.other"},{token:"source"},{token:"keyword.equals"}]],[/(\((?:\s+))?((?!(?:chart\.point|linefill|polyline|continue|for\.\.\.in|matrix|series|simple|string|export|import|method|switch|array|color|const|float|label|table|break|varip|while|bool|line|else|type|enum|box|int|map|and|for|not|var|as|by|if|in|or|to)\b)\b[\w.\d_$]+(?=[\[\]]*(?:\s+)(?:[\w\d_$]+\s*(?:\,|\))+\s*).+(?:\=\>|\→)))/,"entity.name.type"],[/import(?=\s+@importName)/,{token:"keyword",next:"@import"}],[/import(?=\s+[a-zA-Z\d\$_\-\.\u00a1-\uffff\/]+)/,"keyword"],[/[+-]?\d+\.\d*([eE][\-+]?\d+)?(?!\w+)/,"constant.numeric.float"],[/[+-]?\.\d+([eE][\-+]?\d+)?(?!\w+)/,"constant.numeric.float"],[/([+-]?(\d+))(?!\w+)(?!\w+)/,"constant.numeric.integer"],[/(?:true|false)\b/,"constant.other.boolean"],[/#[0-9a-fA-F]{6,8}\b/,"constant.other.color"],[/\+=|\-=|\*=|\/=|%=|[\/%*+\-]|==|!=|<=|>=|=>|<|>|\?|\:=|\:|\,/,"keyword.operator"],[/\b(?:continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to)\b/,"keyword"],[/^[a-zA-Z_][a-zA-Z_0-9]+(?=\s*\()/,"entity.name.function"],[/[0-9]+\b/,"constant.numeric.integer"],[/=/,"keyword.equals"],[/\b(?:strategy\.commission\.cash_per_contract|strategy\.avg_winning_trade_percent|strategy\.avg_winning_trade|strategy\.avg_losing_trade_percent|strategy\.avg_losing_trade|syminfo\.recommendations_sell_strong|syminfo\.recommendations_buy_strong|strategy\.commission\.cash_per_order|strategy\.margin_liquidation_price|strategy\.max_contracts_held_short|strategy\.max_contracts_held_long|syminfo\.shares_outstanding_float|syminfo\.shares_outstanding_total|barstate\.islastconfirmedhistory|earnings\.future_period_end_time|strategy\.max_contracts_held_all|syminfo\.target_price_estimates|strategy\.max_drawdown_percent|syminfo\.recommendations_total|alert\.freq_once_per_bar_close|label\.style_label_lower_right|label\.style_label_upper_right|chart\.right_visible_bar_time|strategy\.grossprofit_percent|strategy\.position_entry_name|syminfo\.recommendations_date|syminfo\.recommendations_hold|syminfo\.recommendations_sell|syminfo\.target_price_average|label\.style_label_lower_left|label\.style_label_upper_left|chart\.left_visible_bar_time|strategy\.openprofit_percent|strategy\.position_avg_price|syminfo\.recommendations_buy|syminfo\.target_price_median|plot\.style_stepline_diamond|strategy\.commission\.percent|session\.isfirstbar_regular|strategy\.grossloss_percent|strategy\.max_runup_percent|strategy\.netprofit_percent|strategy\.percent_of_equity|session\.islastbar_regular|strategy\.account_currency|syminfo\.target_price_date|syminfo\.target_price_high|dividends\.future_pay_date|strategy\.initial_capital|syminfo\.target_price_low|dividends\.future_ex_date|label\.style_label_center|label\.style_text_outline|label\.style_triangledown|strategy\.direction\.short|earnings\.future_revenue|alert\.freq_once_per_bar|dividends\.future_amount|label\.style_label_right|strategy\.direction\.long|strategy\.position_size|barmerge\.lookahead_off|label\.style_label_down|label\.style_label_left|label\.style_triangleup|line\.style_arrow_right|position\.bottom_center|position\.middle_center|strategy\.direction\.all|strategy\.closedtrades|strategy\.max_drawdown|barmerge\.lookahead_on|earnings\.standardized|font\.family_monospace|label\.style_arrowdown|line\.style_arrow_both|line\.style_arrow_left|plot\.style_steplinebr|position\.bottom_right|position\.middle_right|barstate\.isconfirmed|earnings\.future_time|session\.ispostmarket|strategy\.grossprofit|syminfo\.basecurrency|syminfo\.shareholders|timeframe\.isintraday|timeframe\.multiplier|adjustment\.dividends|label\.style_label_up|plot\.style_histogram|position\.bottom_left|position\.middle_left|barstate\.isrealtime|chart\.is_heikinashi|earnings\.future_eps|session\.ispremarket|strategy\.eventrades|strategy\.losstrades|strategy\.openprofit|strategy\.opentrades\.capital_held|strategy\.opentrades|syminfo\.description|timeframe\.isminutes|timeframe\.ismonthly|timeframe\.isseconds|dayofweek\.wednesday|display\.data_window|display\.price_scale|display\.status_line|font\.family_default|label\.style_arrowup|label\.style_diamond|plot\.style_stepline|position\.top_center|strategy\.oca\.cancel|strategy\.oca\.reduce|barstate\.ishistory|chart\.is_linebreak|session\.isfirstbar|strategy\.grossloss|strategy\.max_runup|strategy\.netprofit|strategy\.wintrades|syminfo\.pointvalue|syminfo\.pricescale|syminfo\.volumetype|timeframe\.isweekly|dayofweek\.saturday|dayofweek\.thursday|hline\.style_dashed|hline\.style_dotted|label\.style_circle|label\.style_square|label\.style_xcross|plot\.style_circles|plot\.style_columns|position\.top_right|shape\.triangledown|splits\.denominator|chart\.is_standard|session\.islastbar|syminfo\.employees|timeframe\.isdaily|adjustment\.splits|barmerge\.gaps_off|dayofweek\.tuesday|earnings\.estimate|hline\.style_solid|label\.style_cross|line\.style_dashed|line\.style_dotted|location\.abovebar|location\.absolute|location\.belowbar|plot\.style_areabr|plot\.style_linebr|position\.top_left|strategy\.oca\.none|text\.align_bottom|text\.align_center|barstate\.isfirst|session\.ismarket|syminfo\.currency|syminfo\.industry|syminfo\.tickerid|syminfo\.timezone|timeframe\.period|barmerge\.gaps_on|dayofweek\.friday|dayofweek\.monday|dayofweek\.sunday|label\.style_flag|label\.style_none|line\.style_solid|order\.descending|plot\.style_cross|session\.extended|shape\.triangleup|splits\.numerator|text\.align_right|barstate\.islast|strategy\.equity|syminfo\.country|syminfo\.minmove|syminfo\.mintick|syminfo\.session|time_tradingday|timeframe\.isdwm|adjustment\.none|dividends\.gross|earnings\.actual|location\.bottom|order\.ascending|plot\.style_area|plot\.style_line|session\.regular|shape\.arrowdown|shape\.labeldown|text\.align_left|barstate\.isnew|chart\.bg_color|chart\.fg_color|chart\.is_range|chart\.is_renko|last_bar_index|strategy\.short|syminfo\.prefix|syminfo\.sector|syminfo\.ticker|alert\.freq_all|format\.inherit|format\.mintick|format\.percent|strategy\.fixed|text\.align_top|text\.wrap_auto|text\.wrap_none|xloc\.bar_index|chart\.is_kagi|last_bar_time|strategy\.long|color\.fuchsia|currency\.NONE|currency\.USDT|dividends\.net|format\.volume|shape\.arrowup|shape\.diamond|shape\.labelup|strategy\.cash|xloc\.bar_time|yloc\.abovebar|yloc\.belowbar|chart\.is_pnf|linefill\.all|polyline\.all|syminfo\.root|syminfo\.type|color\.maroon|color\.orange|color\.purple|color\.silver|color\.yellow|currency\.AUD|currency\.BTC|currency\.CAD|currency\.CHF|currency\.ETH|currency\.EUR|currency\.GBP|currency\.HKD|currency\.INR|currency\.JPY|currency\.KRW|currency\.MYR|currency\.NOK|currency\.NZD|currency\.RUB|currency\.SEK|currency\.SGD|currency\.TRY|currency\.USD|currency\.ZAR|display\.none|display\.pane|extend\.right|format\.price|location\.top|shape\.circle|shape\.square|shape\.xcross|color\.black|color\.green|color\.olive|color\.white|display\.all|extend\.both|extend\.left|extend\.none|scale\.right|shape\.cross|size\.normal|dayofmonth|ta\.accdist|time_close|weekofyear|color\.aqua|color\.blue|color\.gray|color\.lime|color\.navy|color\.teal|scale\.left|scale\.none|shape\.flag|size\.large|size\.small|yloc\.price|bar_index|dayofweek|label\.all|table\.all|color\.red|math\.rphi|size\.auto|size\.huge|size\.tiny|line\.all|math\.phi|box\.all|ta\.vwap|ta\.wvad|timenow|math\.pi|minute|second|ta\.iii|ta\.nvi|ta\.obv|ta\.pvi|ta\.pvt|ta\.wad|volume|math\.e|close|hlcc4|month|ohlc4|ta\.tr|false|high|hlc3|hour|open|time|year|true|hl2|low|na)\b(?!\s*=\s*\w+)/,"support.variable"],[/[(|)|\[|\]]/,"paren"],[/[a-zA-Z_][a-zA-Z_0-9]*(?=\s*\()/,{token:"entity.name.method"}],[/\w+\b/,"variable.other"]],comments:[[/@[A-Za-z]+(\s*=\s*)?$/,{token:"comment.annotation",next:"@pop"}],[/@[A-Za-z]+(\s*=\s*)?/,{token:"comment.annotation"}],[/(?!\s*@[A-Za-z]+).+$/,{token:"comment",next:"@pop"}]],stringDouble:[[/[^\\\"]+/,"string"],[/\\./,"string.invalid"],[/\"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],stringSingle:[[/[^\\']+/,"string"],[/\\./,"string.invalid"],[/'/,{token:"string",bracket:"@close",next:"@pop"}]],template:[[/(@builtinTypes)/,{token:"support.type"}],[/(\((?:\s+))?((?!(?:chart\.point|linefill|polyline|continue|for\.\.\.in|matrix|series|simple|string|export|import|method|switch|array|color|const|float|label|table|break|varip|while|bool|line|else|type|enum|box|int|map|and|for|not|var|as|by|if|in|or|to)\b)\b[\w.\d_$]+(?=[\[\]]*(?:\s+)(?:[\w\d_$]+\s*(?:\,|\))+\s*).+(?:\=\>|\→)))/,"entity.name.type"],[/\(|\)|\[|\]|\=|\>/,{token:"paren",next:"@pop"}],[/(\,)(\s+)/,["keyword.operator","source"]],[/(\,)/,{token:"keyword.operator"}],[/([\w.\d$]+)/,{token:"entity.name.type"}],[/(<|>)/,{token:"paren"}],[/\s(?=\w)|$/,{token:"source",next:"@pop"}]],property:[[/@punctuation/,{token:"punctuation.operator"}],[/(@builtinTypes)(?=\s*[(])/,{token:"support.method",next:"@pop"}],[/[a-zA-Z_][a-zA-Z_0-9]+(?=\s*\()/,{token:"entity.name.method",next:"@pop"}],[/[a-zA-Z0-9_]+/,{token:"variable.other.property",next:"@pop"}],[/@empty/,{token:"source",next:"@pop"}]],import:[[/\s+/,{token:"source"}],[/(@importName)(\s+)(as\b)(\s+)(@importAlias)/,[{token:"entity.name.module"},{token:"source"},{token:"keyword"},{token:"source"},{token:"entity.name.module.name",next:"@pop"}]],[/@importName/,{token:"entity.name.module",next:"@pop"}]]},builtinTypes:/chart\.point|linefill|polyline|matrix|series|simple|string|array|color|const|float|label|table|bool|line|box|int|map/,punctuation:/[.](?![.])/,importName:/[a-zA-Z\d\$_\-\.\u00a1-\uffff\/]+/,importAlias:/[a-zA-Z\d\_\u00a1\uffff\/]+/,empty:/^$/};var ht;(function(a){a[a.None=0]="None",a[a.Indent=1]="Indent",a[a.IndentOutdent=2]="IndentOutdent",a[a.Outdent=3]="Outdent"})(ht||(ht={}));const on={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["(",")"],["[","]"]],folding:{markers:{start:/(\/\/#region)|(\/\/.*{($|\s))/,end:/(\/\/#endregion)|(\/\/.*}($|\s))/}},autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],onEnterRules:[{beforeText:/\)\s*=>\s*$/,action:{indentAction:ht.Indent}},{beforeText:/if\s+.*\s*$/,action:{indentAction:ht.Indent}},{beforeText:/else/,action:{indentAction:ht.Indent}},{beforeText:/for\s+\S+\s*=\s*\S+\s+to\s+\S+(?:\s+by\s+\S+)?\s*$/,action:{indentAction:ht.Indent}},{beforeText:/for\s+(?:\[\S+\s+\S+]|\S+)\s+in\s+\S+\s*$/,action:{indentAction:ht.Indent}},{beforeText:/switch\s+.*\s*$/,action:{indentAction:ht.Indent}},{beforeText:/while\s+.*\s*$/,action:{indentAction:ht.Indent}},{beforeText:/type\s+\w+/,action:{indentAction:ht.Indent}},{beforeText:/enum\s+\w+/,action:{indentAction:ht.Indent}},{beforeText:/^\s*$/,action:{indentAction:ht.Outdent}}]},I={"color-white":"#ffffff","color-black":"#000000","color-transparent":"#00000000","color-cold-gray-50":"#F8F9FD","color-cold-gray-100":"#F0F3FA","color-cold-gray-150":"#E0E3EB","color-cold-gray-200":"#D1D4DC","color-cold-gray-250":"#C1C4CD","color-cold-gray-300":"#B2B5BE","color-cold-gray-350":"#A3A6AF","color-cold-gray-400":"#9598A1","color-cold-gray-450":"#868993","color-cold-gray-500":"#787B86","color-cold-gray-550":"#6A6D78","color-cold-gray-600":"#5D606B","color-cold-gray-650":"#50535E","color-cold-gray-700":"#434651","color-cold-gray-750":"#363A45","color-cold-gray-800":"#2A2E39","color-cold-gray-850":"#1E222D","color-cold-gray-900":"#131722","color-cold-gray-950":"#0C0E15","color-ripe-red-50":"#FFEBEC","color-ripe-red-100":"#FCCBCD","color-ripe-red-200":"#FAA1A4","color-ripe-red-300":"#F77C80","color-ripe-red-400":"#F7525F","color-ripe-red-500":"#F23645","color-ripe-red-600":"#CC2F3C","color-ripe-red-700":"#B22833","color-ripe-red-800":"#991F29","color-ripe-red-900":"#801922","color-ripe-red-a100":"#FF8080","color-ripe-red-a200":"#FF5252","color-ripe-red-a400":"#FF3333","color-ripe-red-a600":"#CC2929","color-ripe-red-a700":"#802028","color-ripe-red-a800":"#4D191D","color-ripe-red-a900":"#331F20","color-tan-orange-50":"#FFF3E0","color-tan-orange-100":"#FFE0B2","color-tan-orange-200":"#FFCC80","color-tan-orange-300":"#ffb74d","color-tan-orange-400":"#FFA726","color-tan-orange-500":"#FF9800","color-tan-orange-600":"#FB8C00","color-tan-orange-700":"#F57C00","color-tan-orange-800":"#EF6C00","color-tan-orange-900":"#e65100","color-tan-orange-a200":"#ffab40","color-tan-orange-a400":"#FF9100","color-tan-orange-a600":"#CC7014","color-tan-orange-a700":"#8C541C","color-tan-orange-a800":"#593A1B","color-tan-orange-a900":"#33261A","color-iguana-green-100":"#C8E6C9","color-iguana-green-200":"#A5D6A7","color-iguana-green-300":"#81c784","color-iguana-green-400":"#66BB6A","color-iguana-green-500":"#4caf50","color-iguana-green-600":"#43a047","color-iguana-green-700":"#388e3c","color-iguana-green-800":"#2E7D32","color-iguana-green-900":"#1B5E20","color-iguana-green-a700":"#00c853","color-banana-yellow-100":"#FFF9C4","color-banana-yellow-200":"#FFF59D","color-banana-yellow-300":"#FFF176","color-banana-yellow-400":"#ffee58","color-banana-yellow-500":"#ffeb3b","color-banana-yellow-600":"#fdd835","color-banana-yellow-700":"#fbc02d","color-banana-yellow-800":"#f9a825","color-banana-yellow-900":"#F57F17","color-banana-yellow-a400":"#ffea00","color-banana-yellow-a700":"#EEDA01","color-tv-blue-50":"#E3EFFD","color-tv-blue-100":"#BBD9FB","color-tv-blue-200":"#90BFF9","color-tv-blue-300":"#5B9CF6","color-tv-blue-400":"#3179F5","color-tv-blue-500":"#2962FF","color-tv-blue-600":"#1E53E5","color-tv-blue-700":"#1848CC","color-tv-blue-800":"#143EB3","color-tv-blue-900":"#0C3299","color-tv-blue-a100":"#82b1ff","color-tv-blue-a200":"#448aff","color-tv-blue-a400":"#2979ff","color-tv-blue-a600":"#2962FF","color-tv-blue-a700":"#143A87","color-tv-blue-a800":"#142E61","color-tv-blue-a900":"#132042","color-deep-blue-50":"#EDE7F6","color-deep-blue-100":"#D1C4E9","color-deep-blue-200":"#B39DDB","color-deep-blue-300":"#9575cd","color-deep-blue-400":"#7e57c2","color-deep-blue-500":"#673ab7","color-deep-blue-700":"#512da8","color-deep-blue-800":"#4527A0","color-deep-blue-900":"#311B92","color-deep-blue-a100":"#b388ff","color-deep-blue-a200":"#7C4DFF","color-deep-blue-a400":"#651FFF","color-deep-blue-a700":"#6200EA","color-minty-green-50":"#DAF2EE","color-minty-green-100":"#ACE5DC","color-minty-green-200":"#70CCBD","color-minty-green-300":"#42BDA8","color-minty-green-400":"#22AB94","color-minty-green-500":"#089981","color-minty-green-600":"#06806B","color-minty-green-700":"#056656","color-minty-green-800":"#004D40","color-minty-green-900":"#00332A","color-minty-green-a400":"#2BD9BC","color-minty-green-a600":"#24B29B","color-minty-green-a700":"#1B7667","color-minty-green-a800":"#10443B","color-minty-green-a900":"#082621","color-grapes-purple-50":"#F3E5F5","color-grapes-purple-100":"#E1BEE7","color-grapes-purple-200":"#CE93D8","color-grapes-purple-300":"#ba68c8","color-grapes-purple-400":"#ab47bc","color-grapes-purple-500":"#9c27b0","color-grapes-purple-600":"#8e24aa","color-grapes-purple-700":"#7b1fa2","color-grapes-purple-800":"#6A1B9A","color-grapes-purple-900":"#4A148C","color-grapes-purple-a100":"#EA80FC","color-grapes-purple-a200":"#E040FB","color-grapes-purple-a400":"#D500F9","color-grapes-purple-a700":"#aa00ff","color-berry-pink-100":"#F8BBD0","color-berry-pink-200":"#f48fb1","color-berry-pink-300":"#f06292","color-berry-pink-400":"#ec407a","color-berry-pink-500":"#e91e63","color-berry-pink-600":"#D81B60","color-berry-pink-700":"#C2185B","color-berry-pink-800":"#AD1457","color-berry-pink-900":"#880E4F","color-berry-pink-a100":"#ff80ab","color-berry-pink-a200":"#ff4081","color-berry-pink-a400":"#f50057","color-sky-blue-100":"#B2EBF2","color-sky-blue-200":"#80DEEA","color-sky-blue-300":"#4dd0e1","color-sky-blue-400":"#26c6da","color-sky-blue-500":"#00bcd4","color-sky-blue-600":"#00acc1","color-sky-blue-700":"#0097A7","color-sky-blue-800":"#00838F","color-sky-blue-900":"#006064","color-sky-blue-a400":"#00e5ff","color-sky-blue-a700":"#00B8D4","color-deep-blue-600":"#5E35B1","color-forest-green-50":"#DAF2E6","color-forest-green-100":"#ACE5C9","color-forest-green-200":"#70CC9E","color-forest-green-300":"#42BD7F","color-forest-green-400":"#22AB67","color-forest-green-500":"#089950","color-forest-green-600":"#068043","color-forest-green-700":"#056636","color-forest-green-800":"#004D27","color-forest-green-900":"#1A3326","color-facebook":"#1877F2","color-deep-facebook":"#1564CA","color-twitter":"#1DA1F2","color-deep-twitter":"#188CD3","color-youtube":"#FF0000","color-linkedin":"#007BB5","color-seeking-alpha-brand":"#ff7200"};function Ut(a,n=1){return a+Math.round(255*Math.min(Math.max(n,0),1)).toString(16).toUpperCase().padStart(2,"0")}const ln={base:"vs",inherit:!0,rules:[{token:"comment",foreground:I["color-cold-gray-400"]},{token:"comment.annotation",fontStyle:"bold"},{token:"text",foreground:I["color-cold-gray-900"]},{token:"string",foreground:I["color-iguana-green-700"]},{token:"constant.numeric",foreground:I["color-banana-yellow-900"]},{token:"constant.language",foreground:I["color-ripe-red-a600"]},{token:"constant.other.color",foreground:I["color-ripe-red-a600"]},{token:"constant.other",foreground:I["color-ripe-red-a600"]},{token:"support.variable",foreground:I["color-ripe-red-a600"]},{token:"support.function",foreground:I["color-tv-blue-a600"]},{token:"support.type",foreground:I["color-minty-green-400"],fontStyle:"bold"},{token:"entity.name.type",foreground:I["color-minty-green-400"],fontStyle:"bold"},{token:"support.method",foreground:I["color-tv-blue-a600"]},{token:"keyword.equals",foreground:I["color-minty-green-400"]},{token:"keyword.operator",foreground:I["color-minty-green-400"]},{token:"keyword.other",foreground:I["color-minty-green-400"]},{token:"keyword",foreground:I["color-minty-green-400"]},{token:"variable.other",foreground:I["color-cold-gray-800"]},{token:"variable.other.property",foreground:I["color-cold-gray-800"]},{token:"paren",foreground:I["color-black"]},{token:"entity.name.function",foreground:I["color-tv-blue-900"]},{token:"entity.name.method",foreground:I["color-tv-blue-900"]},{token:"meta.function-call",foreground:I["color-grapes-purple-600"]},{token:"entity.name.module.name",foreground:I["color-grapes-purple-600"]},{token:"entity.name.module",foreground:I["color-tv-blue-a600"]},{token:"",background:I["color-white"]}],colors:{"editor.foreground":I["color-cold-gray-900"],"editor.background":"#00000000","editorLineNumber.foreground":I["color-cold-gray-400"],"editorLineNumber.activeForeground":I["color-cold-gray-700"],"editorHoverWidget.background":I["color-white"],"editorHoverWidget.statusBarBackground":I["color-cold-gray-150"],"editorHoverWidget.foreground":I["color-cold-gray-900"],"editorWidget.background":I["color-white"],"editorWidget.foreground":I["color-cold-gray-900"],"editorGutter.background":"#00000000","editor.foldBackground":Ut(I["color-cold-gray-200"],.5),"editor.lineHighlightBackground":I["color-tv-blue-50"],"editor.lineHighlightBorder":I["color-tv-blue-50"],"editor.rangeHighlightBackground":I["color-tv-blue-a800"],"editorBracketMatch.background":I["color-cold-gray-150"],"editor.selectionBackground":I["color-tv-blue-100"],"editor.selectionHighlightBackground":I["color-tv-blue-50"],"editor.findMatchBackground":I["color-tan-orange-100"],"editor.findMatchHighlightBackground":I["color-tan-orange-100"],"editor.findMatchBorder":I["color-tan-orange-500"],"list.foreground":I["color-cold-gray-900"],"list.hoverForeground":I["color-cold-gray-900"],"list.activeSelectionBackground":I["color-tv-blue-500"],"list.hoverBackground":I["color-tv-blue-50"],"list.focusHighlightForeground":I["color-tv-blue-100"],"list.inactiveSelectionBackground":I["color-tv-blue-500"],"keybindingLabel.background":I["color-white"],"keybindingLabel.foreground":I["color-cold-gray-900"],"keybindingLabel.border":I["color-cold-gray-150"],"input.foreground":I["color-cold-gray-900"],"textLink.foreground":I["color-tv-blue-500"],"textLink.activeForeground":I["color-tv-blue-600"],"peekViewEditor.matchHighlightBackground":I["color-tan-orange-100"],"peekViewResult.lineForeground":I["color-cold-gray-900"],"editorMarkerNavigationWarning.background":I["color-banana-yellow-800"],"inputValidation.warningBackground":I["color-banana-yellow-800"],"diffEditor.insertedTextBackground":Ut(I["color-forest-green-500"],.3),"diffEditor.insertedLineBackground":Ut(I["color-forest-green-500"],.15),"diffEditor.removedTextBackground":Ut(I["color-ripe-red-500"],.3),"diffEditor.removedLineBackground":Ut(I["color-ripe-red-500"],.15),"editorInlayHint.background":I["color-cold-gray-150"],"editorInlayHint.foreground":I["color-cold-gray-550"],"editorError.foreground":I["color-ripe-red-500"],"editorWarning.foreground":I["color-tan-orange-500"]}},cn={base:"vs-dark",inherit:!0,rules:[{token:"comment",foreground:I["color-cold-gray-500"]},{token:"comment.annotation",fontStyle:"bold"},{token:"text",foreground:I["color-white"]},{token:"string",foreground:I["color-iguana-green-700"]},{token:"constant.numeric",foreground:I["color-banana-yellow-900"]},{token:"constant.language",foreground:I["color-ripe-red-300"]},{token:"constant.other.color",foreground:I["color-ripe-red-300"]},{token:"constant.other",foreground:I["color-ripe-red-300"]},{token:"support.variable",foreground:I["color-ripe-red-300"]},{token:"support.function",foreground:I["color-tv-blue-300"]},{token:"support.method",foreground:I["color-tv-blue-300"]},{token:"support.type",foreground:I["color-minty-green-300"],fontStyle:"bold"},{token:"entity.name.type",foreground:I["color-minty-green-300"],fontStyle:"bold"},{token:"keyword.equals",foreground:I["color-minty-green-300"]},{token:"keyword.operator",foreground:I["color-minty-green-300"]},{token:"keyword.other",foreground:I["color-minty-green-300"]},{token:"keyword",foreground:I["color-minty-green-300"]},{token:"variable.other",foreground:I["color-cold-gray-200"]},{token:"variable.other.property",foreground:I["color-cold-gray-200"]},{token:"paren",foreground:I["color-white"]},{token:"entity.name.function",foreground:I["color-tv-blue-400"]},{token:"entity.name.method",foreground:I["color-tv-blue-400"]},{token:"meta.function-call",foreground:I["color-grapes-purple-300"]},{token:"entity.name.module.name",foreground:I["color-grapes-purple-300"]},{token:"entity.name.module",foreground:I["color-tv-blue-300"]},{token:"",background:I["color-cold-gray-900"]}],colors:{"editor.foreground":I["color-white"],"editor.background":I["color-cold-gray-900"],"editorLineNumber.foreground":I["color-cold-gray-500"],"editorLineNumber.activeForeground":I["color-cold-gray-300"],"editorWidget.background":I["color-cold-gray-850"],"editorHoverWidget.background":I["color-cold-gray-850"],"editorHoverWidget.foreground":I["color-cold-gray-300"],"editorHoverWidget.statusBarBackground":I["color-cold-gray-900"],"editorWidget.foreground":I["color-cold-gray-300"],"editorGutter.background":I["color-cold-gray-900"],"editor.foldBackground":Ut(I["color-cold-gray-700"],.5),"editor.lineHighlightBackground":I["color-tv-blue-a900"],"editor.lineHighlightBorder":I["color-tv-blue-a900"],"editor.rangeHighlightBackground":I["color-tv-blue-a800"],"editorBracketMatch.background":I["color-cold-gray-750"],"editor.selectionBackground":I["color-tv-blue-a800"],"editor.selectionHighlightBackground":I["color-cold-gray-800"],"list.foreground":I["color-cold-gray-350"],"list.hoverForeground":I["color-cold-gray-350"],"list.activeSelectionBackground":I["color-tv-blue-500"],"list.hoverBackground":I["color-tv-blue-900"],"list.focusHighlightForeground":I["color-tv-blue-300"],"list.inactiveSelectionBackground":I["color-tv-blue-500"],"keybindingLabel.background":I["color-cold-gray-800"],"keybindingLabel.foreground":I["color-cold-gray-300"],"keybindingLabel.border":I["color-cold-gray-700"],"input.foreground":I["color-cold-gray-350"],"textLink.foreground":I["color-tv-blue-500"],"textLink.activeForeground":I["color-tv-blue-600"],"peekViewEditor.matchHighlightBackground":I["color-tan-orange-a800"],"peekViewResult.lineForeground":I["color-cold-gray-350"],"diffEditor.insertedTextBackground":Ut(I["color-iguana-green-a700"],.3),"diffEditor.insertedLineBackground":Ut(I["color-iguana-green-a700"],.15),"diffEditor.removedTextBackground":Ut(I["color-ripe-red-a400"],.3),"diffEditor.removedLineBackground":Ut(I["color-ripe-red-a400"],.15),"editorInlayHint.background":I["color-cold-gray-800"],"editorInlayHint.foreground":I["color-cold-gray-400"],"editorError.foreground":I["color-ripe-red-500"],"editorWarning.foreground":I["color-tan-orange-700"]}},Sd=/(\\(?:[\\'"]))|(\\$)|("|$)|($)/g,Ed=/(\\(?:[\\'"]))|(\\$)|('|$)|($)/g,oo={"color.aqua":"#00BCD4","color.black":"#363A45","color.blue":"#2196F3","color.fuchsia":"#E040FB","color.gray":"#787B86","color.green":"#4CAF50","color.lime":"#00E676","color.maroon":"#880E4F","color.navy":"#311B92","color.olive":"#808000","color.orange":"#FF9800","color.purple":"#9C27B0","color.red":"#FF5252","color.silver":"#B2B5BE","color.teal":"#00897B","color.white":"#FFFFFF","color.yellow":"#FFEB3B"};class Nd{constructor(n){Object.defineProperty(this,"_formatter",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_isMac",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_getSignatureParams",{enumerable:!0,configurable:!0,writable:!0,value:(s=[],o)=>{const c=new Map,l=o.indexOf("(");for(let m=l+1,_=l;m<o.length;m++)o[m]!==","&&o[m]!==")"||(_++,c.set(o.slice(_,m),_),_=m+1);return s.map(({name:m="",displayType:_,desc:f})=>{const b=[],h=c.get(m),T=h+m.length;return b.push(this._formatter.paragraph(this._formatter.bold(m),this._formatter.italic(_||""))),f&&b.push(Array.isArray(f)?f.join(this._formatter.lineBreak):f),{label:[h,T],documentation:{value:b.join(this._formatter.lineBreak)}}})}}),this._formatter=oe,this._isMac=/(Mac|iPhone|iPod|iPad)/i.test(n)}getSignatureHelpValues(n,s,o=0,c=0){var b;const l=this._getFuncItems(n);if(!(l!=null&&l.length))return null;const m=this._getSequentialSignatures(n,l),_=this._getActiveIndex(l,s),f=(b=br.overloadsFuncs)==null?void 0:b.find(h=>h.name===n&&h.startColumn===o&&c===h.line);return f&&(_.activeSignature=Number(f.index)),{signatures:m,..._}}_getActiveIndex(n,s=[]){let o=0,c=-1;s.some(m=>!!m)||(c=s.length-1);const l=s.pop();if(l)for(const[m,_]of n.entries()){const{args:f}=_;if(f&&f.length){const b=f.findIndex(h=>h.name===l);if(b!=-1){c=b,o=m;break}}}return{activeParameter:c,activeSignature:o}}_getFuncItems(n){return pt.functions.get(n)||St.userFuncs.get(n)||St.methodFuncs.get(n)}_getSequentialSignatures(n,s){return s.map(o=>{const c=this._getSignatureLabel(n,o);return{label:c,documentation:this._getFormattedSignatureDocumentation(o),parameters:this._getSignatureParams(o.args,c)}})}_getSignatureLabel(n,s,o=!1){const c=[n];return o&&c.push("<type>"),s.args&&(c.push("("),c.push(s.args.map(({name:l})=>l).join(", ")),c.push(")")),c.join("")}_getFormattedSignatureDocumentation(n){const{desc:s}=n,o=[];s&&o.push(Array.isArray(s)?s.join(this._formatter.lineBreak):s);const c=`${this._formatter.code(this._isMac?"⌘":"Ctrl")} +
137
+ }`;var le=np(function(){return xe(u,X+"return "+N).apply(s,_)});if(le.source=N,Ci(le))throw le;return le}function ax(e){return ve(e).toLowerCase()}function nx(e){return ve(e).toUpperCase()}function ix(e,t,r){if(e=ve(e),e&&(r||t===s))return yl(e);if(!e||!(t=ft(t)))return e;var i=Ot(e),p=Ot(t),u=_l(i,p),_=fl(i,p)+1;return fr(i,u,_).join("")}function ox(e,t,r){if(e=ve(e),e&&(r||t===s))return e.slice(0,bl(e)+1);if(!e||!(t=ft(t)))return e;var i=Ot(e),p=fl(i,Ot(t))+1;return fr(i,0,p).join("")}function lx(e,t,r){if(e=ve(e),e&&(r||t===s))return e.replace(ks,"");if(!e||!(t=ft(t)))return e;var i=Ot(e),p=_l(i,Ot(t));return fr(i,p).join("")}function cx(e,t){var r=ce,i=Qe;if(ze(t)){var p="separator"in t?t.separator:p;r="length"in t?ie(t.length):r,i="omission"in t?ft(t.omission):i}e=ve(e);var u=e.length;if(Wr(e)){var _=Ot(e);u=_.length}if(r>=u)return e;var x=r-Gr(i);if(x<1)return i;var v=_?fr(_,0,x).join(""):e.slice(0,x);if(p===s)return v+i;if(_&&(x+=v.length-x),zi(p)){if(e.slice(x).search(p)){var C,z=v;for(p.global||(p=Wn(p.source,ve(we.exec(p))+"g")),p.lastIndex=0;C=p.exec(z);)var N=C.index;v=v.slice(0,N===s?x:N)}}else if(e.indexOf(ft(p),x)!=x){var $=v.lastIndexOf(p);$>-1&&(v=v.slice(0,$))}return v+i}function px(e){return e=ve(e),e&&Ts.test(e)?e.replace(Vt,Ru):e}var dx=es(function(e,t,r){return e+(r?" ":"")+t.toUpperCase()}),Ni=ic("toUpperCase");function ap(e,t,r){return e=ve(e),t=r?s:t,t===s?Nu(e)?Uu(e):Du(e):e.match(t)||[]}var np=pe(function(e,t){try{return yt(e,s,t)}catch(r){return Ci(r)?r:new se(r)}}),mx=er(function(e,t){return Dt(t,function(r){r=Wt(r),Zt(e,r,Ai(e[r],e))}),e});function ux(e){var t=e==null?0:e.length,r=Q();return e=t?qe(e,function(i){if(typeof i[1]!="function")throw new kt(m);return[r(i[0]),i[1]]}):[],pe(function(i){for(var p=-1;++p<t;){var u=e[p];if(yt(u[0],this,i))return yt(u[1],this,i)}})}function yx(e){return Ry(At(e,T))}function Li(e){return function(){return e}}function _x(e,t){return e==null||e!==e?t:e}var fx=lc(),gx=lc(!0);function lt(e){return e}function Mi(e){return Rl(typeof e=="function"?e:At(e,T))}function bx(e){return Bl(At(e,T))}function xx(e,t){return Ul(e,At(t,T))}var hx=pe(function(e,t){return function(r){return Ls(r,e,t)}}),wx=pe(function(e,t){return function(r){return Ls(e,r,t)}});function Pi(e,t,r){var i=$e(t),p=La(t,i);r==null&&!(ze(t)&&(p.length||!i.length))&&(r=t,t=e,e=this,p=La(t,$e(t)));var u=!(ze(r)&&"chain"in r)||!!r.chain,_=rr(e);return Dt(p,function(x){var v=t[x];e[x]=v,_&&(e.prototype[x]=function(){var C=this.__chain__;if(u||C){var z=e(this.__wrapped__),N=z.__actions__=nt(this.__actions__);return N.push({func:v,args:arguments,thisArg:e}),z.__chain__=C,z}return v.apply(e,pr([this.value()],arguments))})}),e}function vx(){return We._===this&&(We._=Gu),this}function Oi(){}function Tx(e){return e=ie(e),pe(function(t){return Kl(t,e)})}var Dx=yi(qe),kx=yi(cl),Ix=yi(Fn);function ip(e){return wi(e)?Bn(Wt(e)):t_(e)}function Ax(e){return function(t){return e==null?s:Cr(e,t)}}var qx=pc(),Cx=pc(!0);function Ri(){return[]}function Fi(){return!1}function zx(){return{}}function Sx(){return""}function Ex(){return!0}function Nx(e,t){if(e=ie(e),e<1||e>Me)return[];var r=re,i=Ve(e,re);t=Q(t),e-=re;for(var p=$n(i,t);++r<e;)t(r);return p}function Lx(e){return ne(e)?qe(e,Wt):gt(e)?[e]:nt(Ic(ve(e)))}function Mx(e){var t=++Hu;return ve(e)+t}var Px=Ba(function(e,t){return e+t},0),Ox=_i("ceil"),Rx=Ba(function(e,t){return e/t},1),Fx=_i("floor");function Bx(e){return e&&e.length?Na(e,lt,ei):s}function Ux(e,t){return e&&e.length?Na(e,Q(t,2),ei):s}function Kx(e){return ml(e,lt)}function $x(e,t){return ml(e,Q(t,2))}function jx(e){return e&&e.length?Na(e,lt,ai):s}function Hx(e,t){return e&&e.length?Na(e,Q(t,2),ai):s}var Wx=Ba(function(e,t){return e*t},1),Gx=_i("round"),Xx=Ba(function(e,t){return e-t},0);function Vx(e){return e&&e.length?Kn(e,lt):0}function Yx(e,t){return e&&e.length?Kn(e,Q(t,2)):0}return d.after=bg,d.ary=Oc,d.assign=nb,d.assignIn=Qc,d.assignInWith=Ja,d.assignWith=ib,d.at=ob,d.before=Rc,d.bind=Ai,d.bindAll=mx,d.bindKey=Fc,d.castArray=zg,d.chain=Lc,d.chunk=R_,d.compact=F_,d.concat=B_,d.cond=ux,d.conforms=yx,d.constant=Li,d.countBy=Vf,d.create=lb,d.curry=Bc,d.curryRight=Uc,d.debounce=Kc,d.defaults=cb,d.defaultsDeep=pb,d.defer=xg,d.delay=hg,d.difference=U_,d.differenceBy=K_,d.differenceWith=$_,d.drop=j_,d.dropRight=H_,d.dropRightWhile=W_,d.dropWhile=G_,d.fill=X_,d.filter=Qf,d.flatMap=eg,d.flatMapDeep=tg,d.flatMapDepth=rg,d.flatten=zc,d.flattenDeep=V_,d.flattenDepth=Y_,d.flip=wg,d.flow=fx,d.flowRight=gx,d.fromPairs=Q_,d.functions=gb,d.functionsIn=bb,d.groupBy=sg,d.initial=J_,d.intersection=ef,d.intersectionBy=tf,d.intersectionWith=rf,d.invert=hb,d.invertBy=wb,d.invokeMap=ng,d.iteratee=Mi,d.keyBy=ig,d.keys=$e,d.keysIn=ot,d.map=Ga,d.mapKeys=Tb,d.mapValues=Db,d.matches=bx,d.matchesProperty=xx,d.memoize=Va,d.merge=kb,d.mergeWith=Zc,d.method=hx,d.methodOf=wx,d.mixin=Pi,d.negate=Ya,d.nthArg=Tx,d.omit=Ib,d.omitBy=Ab,d.once=vg,d.orderBy=og,d.over=Dx,d.overArgs=Tg,d.overEvery=kx,d.overSome=Ix,d.partial=qi,d.partialRight=$c,d.partition=lg,d.pick=qb,d.pickBy=Jc,d.property=ip,d.propertyOf=Ax,d.pull=of,d.pullAll=Ec,d.pullAllBy=lf,d.pullAllWith=cf,d.pullAt=pf,d.range=qx,d.rangeRight=Cx,d.rearg=Dg,d.reject=dg,d.remove=df,d.rest=kg,d.reverse=ki,d.sampleSize=ug,d.set=zb,d.setWith=Sb,d.shuffle=yg,d.slice=mf,d.sortBy=gg,d.sortedUniq=xf,d.sortedUniqBy=hf,d.split=ex,d.spread=Ig,d.tail=wf,d.take=vf,d.takeRight=Tf,d.takeRightWhile=Df,d.takeWhile=kf,d.tap=Bf,d.throttle=Ag,d.thru=Wa,d.toArray=Xc,d.toPairs=ep,d.toPairsIn=tp,d.toPath=Lx,d.toPlainObject=Yc,d.transform=Eb,d.unary=qg,d.union=If,d.unionBy=Af,d.unionWith=qf,d.uniq=Cf,d.uniqBy=zf,d.uniqWith=Sf,d.unset=Nb,d.unzip=Ii,d.unzipWith=Nc,d.update=Lb,d.updateWith=Mb,d.values=ss,d.valuesIn=Pb,d.without=Ef,d.words=ap,d.wrap=Cg,d.xor=Nf,d.xorBy=Lf,d.xorWith=Mf,d.zip=Pf,d.zipObject=Of,d.zipObjectDeep=Rf,d.zipWith=Ff,d.entries=ep,d.entriesIn=tp,d.extend=Qc,d.extendWith=Ja,Pi(d,d),d.add=Px,d.attempt=np,d.camelCase=Bb,d.capitalize=rp,d.ceil=Ox,d.clamp=Ob,d.clone=Sg,d.cloneDeep=Ng,d.cloneDeepWith=Lg,d.cloneWith=Eg,d.conformsTo=Mg,d.deburr=sp,d.defaultTo=_x,d.divide=Rx,d.endsWith=Ub,d.eq=Ft,d.escape=Kb,d.escapeRegExp=$b,d.every=Yf,d.find=Zf,d.findIndex=qc,d.findKey=db,d.findLast=Jf,d.findLastIndex=Cc,d.findLastKey=mb,d.floor=Fx,d.forEach=Mc,d.forEachRight=Pc,d.forIn=ub,d.forInRight=yb,d.forOwn=_b,d.forOwnRight=fb,d.get=Si,d.gt=Pg,d.gte=Og,d.has=xb,d.hasIn=Ei,d.head=Sc,d.identity=lt,d.includes=ag,d.indexOf=Z_,d.inRange=Rb,d.invoke=vb,d.isArguments=Er,d.isArray=ne,d.isArrayBuffer=Rg,d.isArrayLike=it,d.isArrayLikeObject=Oe,d.isBoolean=Fg,d.isBuffer=gr,d.isDate=Bg,d.isElement=Ug,d.isEmpty=Kg,d.isEqual=$g,d.isEqualWith=jg,d.isError=Ci,d.isFinite=Hg,d.isFunction=rr,d.isInteger=jc,d.isLength=Qa,d.isMap=Hc,d.isMatch=Wg,d.isMatchWith=Gg,d.isNaN=Xg,d.isNative=Vg,d.isNil=Qg,d.isNull=Yg,d.isNumber=Wc,d.isObject=ze,d.isObjectLike=Ne,d.isPlainObject=Bs,d.isRegExp=zi,d.isSafeInteger=Zg,d.isSet=Gc,d.isString=Za,d.isSymbol=gt,d.isTypedArray=rs,d.isUndefined=Jg,d.isWeakMap=eb,d.isWeakSet=tb,d.join=sf,d.kebabCase=jb,d.last=Ct,d.lastIndexOf=af,d.lowerCase=Hb,d.lowerFirst=Wb,d.lt=rb,d.lte=sb,d.max=Bx,d.maxBy=Ux,d.mean=Kx,d.meanBy=$x,d.min=jx,d.minBy=Hx,d.stubArray=Ri,d.stubFalse=Fi,d.stubObject=zx,d.stubString=Sx,d.stubTrue=Ex,d.multiply=Wx,d.nth=nf,d.noConflict=vx,d.noop=Oi,d.now=Xa,d.pad=Gb,d.padEnd=Xb,d.padStart=Vb,d.parseInt=Yb,d.random=Fb,d.reduce=cg,d.reduceRight=pg,d.repeat=Qb,d.replace=Zb,d.result=Cb,d.round=Gx,d.runInContext=w,d.sample=mg,d.size=_g,d.snakeCase=Jb,d.some=fg,d.sortedIndex=uf,d.sortedIndexBy=yf,d.sortedIndexOf=_f,d.sortedLastIndex=ff,d.sortedLastIndexBy=gf,d.sortedLastIndexOf=bf,d.startCase=tx,d.startsWith=rx,d.subtract=Xx,d.sum=Vx,d.sumBy=Yx,d.template=sx,d.times=Nx,d.toFinite=sr,d.toInteger=ie,d.toLength=Vc,d.toLower=ax,d.toNumber=zt,d.toSafeInteger=ab,d.toString=ve,d.toUpper=nx,d.trim=ix,d.trimEnd=ox,d.trimStart=lx,d.truncate=cx,d.unescape=px,d.uniqueId=Mx,d.upperCase=dx,d.upperFirst=Ni,d.each=Mc,d.eachRight=Pc,d.first=Sc,Pi(d,function(){var e={};return jt(d,function(t,r){Te.call(d.prototype,r)||(e[r]=t)}),e}(),{chain:!1}),d.VERSION=o,Dt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){d[e].placeholder=d}),Dt(["drop","take"],function(e,t){ye.prototype[e]=function(r){r=r===s?1:Be(ie(r),0);var i=this.__filtered__&&!t?new ye(this):this.clone();return i.__filtered__?i.__takeCount__=Ve(r,i.__takeCount__):i.__views__.push({size:Ve(r,re),type:e+(i.__dir__<0?"Right":"")}),i},ye.prototype[e+"Right"]=function(r){return this.reverse()[e](r).reverse()}}),Dt(["filter","map","takeWhile"],function(e,t){var r=t+1,i=r==Ke||r==be;ye.prototype[e]=function(p){var u=this.clone();return u.__iteratees__.push({iteratee:Q(p,3),type:r}),u.__filtered__=u.__filtered__||i,u}}),Dt(["head","last"],function(e,t){var r="take"+(t?"Right":"");ye.prototype[e]=function(){return this[r](1).value()[0]}}),Dt(["initial","tail"],function(e,t){var r="drop"+(t?"":"Right");ye.prototype[e]=function(){return this.__filtered__?new ye(this):this[r](1)}}),ye.prototype.compact=function(){return this.filter(lt)},ye.prototype.find=function(e){return this.filter(e).head()},ye.prototype.findLast=function(e){return this.reverse().find(e)},ye.prototype.invokeMap=pe(function(e,t){return typeof e=="function"?new ye(this):this.map(function(r){return Ls(r,e,t)})}),ye.prototype.reject=function(e){return this.filter(Ya(Q(e)))},ye.prototype.slice=function(e,t){e=ie(e);var r=this;return r.__filtered__&&(e>0||t<0)?new ye(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==s&&(t=ie(t),r=t<0?r.dropRight(-t):r.take(t-e)),r)},ye.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},ye.prototype.toArray=function(){return this.take(re)},jt(ye.prototype,function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),p=d[i?"take"+(t=="last"?"Right":""):t],u=i||/^find/.test(t);p&&(d.prototype[t]=function(){var _=this.__wrapped__,x=i?[1]:arguments,v=_ instanceof ye,C=x[0],z=v||ne(_),N=function(me){var _e=p.apply(d,pr([me],x));return i&&$?_e[0]:_e};z&&r&&typeof C=="function"&&C.length!=1&&(v=z=!1);var $=this.__chain__,X=!!this.__actions__.length,J=u&&!$,le=v&&!X;if(!u&&z){_=le?_:new ye(this);var ee=e.apply(_,x);return ee.__actions__.push({func:Wa,args:[N],thisArg:s}),new It(ee,$)}return J&&le?e.apply(this,x):(ee=this.thru(N),J?i?ee.value()[0]:ee.value():ee)})}),Dt(["pop","push","shift","sort","splice","unshift"],function(e){var t=ba[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);d.prototype[e]=function(){var p=arguments;if(i&&!this.__chain__){var u=this.value();return t.apply(ne(u)?u:[],p)}return this[r](function(_){return t.apply(ne(_)?_:[],p)})}}),jt(ye.prototype,function(e,t){var r=d[t];if(r){var i=r.name+"";Te.call(Qr,i)||(Qr[i]=[]),Qr[i].push({name:t,func:r})}}),Qr[Fa(s,G).name]=[{name:"wrapper",func:s}],ye.prototype.clone=cy,ye.prototype.reverse=py,ye.prototype.value=dy,d.prototype.at=Uf,d.prototype.chain=Kf,d.prototype.commit=$f,d.prototype.next=jf,d.prototype.plant=Wf,d.prototype.reverse=Gf,d.prototype.toJSON=d.prototype.valueOf=d.prototype.value=Xf,d.prototype.first=d.prototype.head,As&&(d.prototype[As]=Hf),d},Xr=Ku();Dr?((Dr.exports=Xr)._=Xr,Mn._=Xr):We._=Xr}).call(as)}(Ws,Ws.exports);var io=Ws.exports;const Se="tccScript",Lr={builtinFunctions:/strategy\.closedtrades\.max_drawdown_percent|strategy\.opentrades\.max_drawdown_percent|strategy\.risk\.max_intraday_filled_orders|strategy\.closedtrades\.max_runup_percent|array\.percentile_linear_interpolation|strategy\.closedtrades\.entry_bar_index|strategy\.opentrades\.max_runup_percent|strategy\.closedtrades\.exit_bar_index|strategy\.closedtrades\.profit_percent|strategy\.closedtrades\.entry_comment|strategy\.opentrades\.entry_bar_index|strategy\.closedtrades\.exit_comment|strategy\.closedtrades\.max_drawdown|strategy\.opentrades\.profit_percent|ta\.percentile_linear_interpolation|strategy\.closedtrades\.entry_price|strategy\.opentrades\.entry_comment|strategy\.closedtrades\.commission|strategy\.closedtrades\.entry_time|strategy\.closedtrades\.exit_price|strategy\.opentrades\.max_drawdown|strategy\.risk\.max_cons_loss_days|strategy\.closedtrades\.exit_time|strategy\.closedtrades\.max_runup|strategy\.opentrades\.entry_price|strategy\.risk\.max_intraday_loss|strategy\.risk\.max_position_size|table\.cell_set_text_font_family|strategy\.closedtrades\.entry_id|strategy\.opentrades\.commission|strategy\.opentrades\.entry_time|array\.binary_search_rightmost|array\.percentile_nearest_rank|strategy\.closedtrades\.exit_id|strategy\.opentrades\.max_runup|array\.binary_search_leftmost|strategy\.closedtrades\.profit|strategy\.opentrades\.entry_id|strategy\.risk\.allow_entry_in|strategy\.convert_to_account|box\.set_bottom_right_point|label\.set_text_font_family|strategy\.closedtrades\.size|strategy\.convert_to_symbol|strategy\.default_entry_qty|strategy\.opentrades\.profit|strategy\.risk\.max_drawdown|ta\.percentile_nearest_rank|table\.cell_set_text_halign|table\.cell_set_text_valign|request\.security_lower_tf|table\.cell_set_text_color|box\.set_text_font_family|strategy\.opentrades\.size|table\.cell_set_text_size|matrix\.is_antisymmetric|box\.set_top_left_point|chart\.point\.from_index|matrix\.is_antidiagonal|table\.cell_set_bgcolor|table\.cell_set_tooltip|table\.set_border_color|table\.set_border_width|timeframe\.from_seconds|chart\.point\.from_time|line\.set_second_point|math\.round_to_mintick|matrix\.elements_count|request\.currency_rate|ta\.pivot_point_levels|table\.cell_set_height|table\.set_frame_color|table\.set_frame_width|box\.set_border_color|box\.set_border_style|box\.set_border_width|line\.set_first_point|matrix\.is_stochastic|matrix\.is_triangular|table\.cell_set_width|timeframe\.in_seconds|array\.binary_search|box\.set_rightbottom|box\.set_text_halign|box\.set_text_valign|color\.from_gradient|label\.set_textalign|label\.set_textcolor|matrix\.eigenvectors|matrix\.is_symmetric|matrix\.swap_columns|strategy\.cancel_all|table\.cell_set_text|array\.new_linefill|array\.sort_indices|box\.set_text_color|linefill\.get_line1|linefill\.get_line2|linefill\.set_color|matrix\.eigenvalues|matrix\.is_diagonal|matrix\.is_identity|strategy\.close_all|table\.set_position|ticker\.pointfigure|array\.lastindexof|array\.percentrank|array\.standardize|box\.set_text_size|box\.set_text_wrap|label\.set_tooltip|matrix\.remove_col|matrix\.remove_row|request\.dividends|request\.financial|table\.merge_cells|table\.set_bgcolor|ticker\.heikinashi|array\.covariance|array\.new_string|chart\.point\.copy|matrix\.is_binary|matrix\.is_square|matrix\.submatrix|matrix\.swap_rows|matrix\.transpose|request\.earnings|request\.economic|request\.security|ticker\.linebreak|timeframe\.change|array\.new_color|array\.new_float|array\.new_label|array\.new_table|box\.set_bgcolor|box\.set_lefttop|chart\.point\.new|chart\.point\.now|input\.text_area|input\.timeframe|label\.set_color|label\.set_point|label\.set_style|line\.set_extend|linefill\.delete|polyline\.delete|str\.format_time|str\.replace_all|strategy\.cancel|ticker\.standard|alertcondition|array\.includes|array\.new_bool|array\.new_line|array\.variance|box\.get_bottom|box\.set_bottom|box\.set_extend|label\.get_text|label\.set_size|label\.set_text|label\.set_xloc|label\.set_yloc|line\.get_price|line\.set_color|line\.set_style|line\.set_width|math\.todegrees|math\.toradians|matrix\.add_col|matrix\.add_row|matrix\.columns|matrix\.is_zero|matrix\.reshape|matrix\.reverse|request\.quandl|request\.splits|str\.startswith|strategy\.close|strategy\.entry|strategy\.order|syminfo\.prefix|syminfo\.ticker|ta\.correlation|ta\.highestbars|ta\.percentrank|ticker\.inherit|array\.indexof|array\.new_box|array\.new_int|array\.reverse|array\.unshift|box\.get_right|box\.set_right|input\.session|line\.set_xloc|matrix\.concat|matrix\.median|max_bars_back|runtime\.error|str\.substring|strategy\.exit|ta\.crossunder|ta\.lowestbars|ta\.supertrend|ticker\.modify|array\.concat|array\.insert|array\.median|array\.remove|box\.get_left|box\.set_left|box\.set_text|input\.source|input\.string|input\.symbol|label\.delete|label\.set_xy|line\.set_xy1|line\.set_xy2|linefill\.new|map\.contains|matrix\.trace|polyline\.new|request\.seed|str\.contains|str\.endswith|str\.tonumber|str\.tostring|ta\.barssince|ta\.crossover|ta\.pivothigh|ta\.valuewhen|table\.delete|ticker\.renko|array\.clear|array\.every|array\.first|array\.range|array\.shift|array\.slice|array\.stdev|box\.get_top|box\.set_top|input\.color|input\.float|input\.price|label\.get_x|label\.get_y|label\.set_x|label\.set_y|line\.delete|line\.get_x1|line\.get_x2|line\.get_y1|line\.get_y2|line\.set_x1|line\.set_x2|line\.set_y1|line\.set_y2|log\.warning|map\.put_all|math\.random|matrix\.copy|matrix\.diff|matrix\.fill|matrix\.kron|matrix\.mode|matrix\.mult|matrix\.pinv|matrix\.rank|matrix\.rows|matrix\.sort|str\.replace|ta\.pivotlow|ta\.variance|table\.clear|ticker\.kagi|array\.copy|array\.fill|array\.from|array\.join|array\.last|array\.mode|array\.push|array\.size|array\.some|array\.sort|box\.delete|dayofmonth|input\.bool|input\.time|label\.copy|map\.remove|map\.values|math\.floor|math\.log10|math\.round|matrix\.avg|matrix\.col|matrix\.det|matrix\.get|matrix\.inv|matrix\.max|matrix\.min|matrix\.new|matrix\.pow|matrix\.row|matrix\.set|matrix\.sum|plotcandle|str\.format|str\.length|ta\.falling|ta\.highest|table\.cell|ticker\.new|time_close|weekofyear|array\.abs|array\.avg|array\.get|array\.max|array\.min|array\.new|array\.pop|array\.set|array\.sum|color\.new|color\.rgb|dayofweek|indicator|input\.int|label\.new|line\.copy|log\.error|map\.clear|math\.acos|math\.asin|math\.atan|input\.enum|math\.ceil|math\.sign|math\.sqrt|plotarrow|plotshape|str\.lower|str\.match|str\.split|str\.upper|ta\.change|ta\.linreg|ta\.lowest|ta\.median|ta\.rising|table\.new|timestamp|barcolor|box\.copy|line\.new|linefill|log\.info|map\.copy|map\.keys|map\.size|math\.abs|math\.avg|math\.cos|math\.exp|math\.log|math\.max|math\.min|math\.pow|math\.sin|math\.sum|math\.tan|plotchar|strategy|ta\.cross|ta\.range|ta\.stdev|ta\.stoch|bgcolor|box\.new|color\.b|color\.g|color\.r|color\.t|library|map\.get|map\.new|map\.put|plotbar|str\.pos|ta\.alma|ta\.macd|ta\.mode|ta\.swma|ta\.vwap|ta\.vwma|fixnan|minute|second|string|ta\.atr|ta\.bbw|ta\.cci|ta\.cmo|ta\.cog|ta\.cum|ta\.dev|ta\.dmi|ta\.ema|ta\.hma|ta\.kcw|ta\.max|ta\.mfi|ta\.min|ta\.mom|ta\.rma|ta\.roc|ta\.rsi|ta\.sar|ta\.sma|ta\.tsi|ta\.wma|ta\.wpr|alert|color|float|hline|input|label|month|ta\.bb|ta\.kc|ta\.tr|table|bool|fill|hour|line|plot|time|year|box|int|na|nz/,keywords:/continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to/,tokenizer:{root:[[/\/\/\s*(?=@)/,"comment","@comments"],[/\/\/.*(?!@).*/,"comment"],[/\'([^\'\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/\"/,{token:"string",bracket:"@open",next:"@stringDouble"}],[/(type|enum)\s+[a-zA-Z]\w*/,"entity.name.type"],[/'/,{token:"string",bracket:"@open",next:"@stringSingle"}],[/(@builtinFunctions)(?=\s*\(|\s*<.*>)/,{token:"support.function",next:"@template"}],[/@punctuation/,{token:"punctuation.operator",next:"@property"}],[/(varip|var)\b(\s+)((?!(?:chart\.point|linefill|polyline|matrix|series|simple|string|array|color|const|float|label|table|bool|line|box|int|map|continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to)\b)[\w.\d_$]+)(\[\]|)(\s+)((?!(?:continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to)\b)[\w\d_$]+)/,[{token:"keyword"},{token:"source"},{token:"entity.name.type"},{token:"paren"},{token:"source"},{token:"variable.other"}]],[/\b(?:@builtinTypes)(?=(\s*)[\[|<|(]|(?=\s+(?=[^.=][\w\(]*))|\s*$)/,{token:"support.type",next:"@template"}],[/^(\s*)\b(?!(?:chart\.point|linefill|polyline|matrix|series|simple|string|array|color|const|float|label|table|bool|line|box|int|map|continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to)\b)([\w.\d_$]+)(\[\]|)(\s+)((?!(?:continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to)\b)[\w\d_$]+)(\s+)(\=)/,[{token:"source"},{token:"entity.name.type"},{token:"paren"},{token:"source"},{token:"variable.other"},{token:"source"},{token:"keyword.equals"}]],[/(\((?:\s+))?((?!(?:chart\.point|linefill|polyline|continue|for\.\.\.in|matrix|series|simple|string|export|import|method|switch|array|color|const|float|label|table|break|varip|while|bool|line|else|type|enum|box|int|map|and|for|not|var|as|by|if|in|or|to)\b)\b[\w.\d_$]+(?=[\[\]]*(?:\s+)(?:[\w\d_$]+\s*(?:\,|\))+\s*).+(?:\=\>|\→)))/,"entity.name.type"],[/import(?=\s+@importName)/,{token:"keyword",next:"@import"}],[/import(?=\s+[a-zA-Z\d\$_\-\.\u00a1-\uffff\/]+)/,"keyword"],[/[+-]?\d+\.\d*([eE][\-+]?\d+)?(?!\w+)/,"constant.numeric.float"],[/[+-]?\.\d+([eE][\-+]?\d+)?(?!\w+)/,"constant.numeric.float"],[/([+-]?(\d+))(?!\w+)(?!\w+)/,"constant.numeric.integer"],[/(?:true|false)\b/,"constant.other.boolean"],[/#[0-9a-fA-F]{6,8}\b/,"constant.other.color"],[/\+=|\-=|\*=|\/=|%=|[\/%*+\-]|==|!=|<=|>=|=>|<|>|\?|\:=|\:|\,/,"keyword.operator"],[/\b(?:continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to)\b/,"keyword"],[/^[a-zA-Z_][a-zA-Z_0-9]+(?=\s*\()/,"entity.name.function"],[/[0-9]+\b/,"constant.numeric.integer"],[/=/,"keyword.equals"],[/\b(?:strategy\.commission\.cash_per_contract|strategy\.avg_winning_trade_percent|strategy\.avg_winning_trade|strategy\.avg_losing_trade_percent|strategy\.avg_losing_trade|syminfo\.recommendations_sell_strong|syminfo\.recommendations_buy_strong|strategy\.commission\.cash_per_order|strategy\.margin_liquidation_price|strategy\.max_contracts_held_short|strategy\.max_contracts_held_long|syminfo\.shares_outstanding_float|syminfo\.shares_outstanding_total|barstate\.islastconfirmedhistory|earnings\.future_period_end_time|strategy\.max_contracts_held_all|syminfo\.target_price_estimates|strategy\.max_drawdown_percent|syminfo\.recommendations_total|alert\.freq_once_per_bar_close|label\.style_label_lower_right|label\.style_label_upper_right|chart\.right_visible_bar_time|strategy\.grossprofit_percent|strategy\.position_entry_name|syminfo\.recommendations_date|syminfo\.recommendations_hold|syminfo\.recommendations_sell|syminfo\.target_price_average|label\.style_label_lower_left|label\.style_label_upper_left|chart\.left_visible_bar_time|strategy\.openprofit_percent|strategy\.position_avg_price|syminfo\.recommendations_buy|syminfo\.target_price_median|plot\.style_stepline_diamond|strategy\.commission\.percent|session\.isfirstbar_regular|strategy\.grossloss_percent|strategy\.max_runup_percent|strategy\.netprofit_percent|strategy\.percent_of_equity|session\.islastbar_regular|strategy\.account_currency|syminfo\.target_price_date|syminfo\.target_price_high|dividends\.future_pay_date|strategy\.initial_capital|syminfo\.target_price_low|dividends\.future_ex_date|label\.style_label_center|label\.style_text_outline|label\.style_triangledown|strategy\.direction\.short|earnings\.future_revenue|alert\.freq_once_per_bar|dividends\.future_amount|label\.style_label_right|strategy\.direction\.long|strategy\.position_size|barmerge\.lookahead_off|label\.style_label_down|label\.style_label_left|label\.style_triangleup|line\.style_arrow_right|position\.bottom_center|position\.middle_center|strategy\.direction\.all|strategy\.closedtrades|strategy\.max_drawdown|barmerge\.lookahead_on|earnings\.standardized|font\.family_monospace|label\.style_arrowdown|line\.style_arrow_both|line\.style_arrow_left|plot\.style_steplinebr|position\.bottom_right|position\.middle_right|barstate\.isconfirmed|earnings\.future_time|session\.ispostmarket|strategy\.grossprofit|syminfo\.basecurrency|syminfo\.shareholders|timeframe\.isintraday|timeframe\.multiplier|adjustment\.dividends|label\.style_label_up|plot\.style_histogram|position\.bottom_left|position\.middle_left|barstate\.isrealtime|chart\.is_heikinashi|earnings\.future_eps|session\.ispremarket|strategy\.eventrades|strategy\.losstrades|strategy\.openprofit|strategy\.opentrades\.capital_held|strategy\.opentrades|syminfo\.description|timeframe\.isminutes|timeframe\.ismonthly|timeframe\.isseconds|dayofweek\.wednesday|display\.data_window|display\.price_scale|display\.status_line|font\.family_default|label\.style_arrowup|label\.style_diamond|plot\.style_stepline|position\.top_center|strategy\.oca\.cancel|strategy\.oca\.reduce|barstate\.ishistory|chart\.is_linebreak|session\.isfirstbar|strategy\.grossloss|strategy\.max_runup|strategy\.netprofit|strategy\.wintrades|syminfo\.pointvalue|syminfo\.pricescale|syminfo\.volumetype|timeframe\.isweekly|dayofweek\.saturday|dayofweek\.thursday|hline\.style_dashed|hline\.style_dotted|label\.style_circle|label\.style_square|label\.style_xcross|plot\.style_circles|plot\.style_columns|position\.top_right|shape\.triangledown|splits\.denominator|chart\.is_standard|session\.islastbar|syminfo\.employees|timeframe\.isdaily|adjustment\.splits|barmerge\.gaps_off|dayofweek\.tuesday|earnings\.estimate|hline\.style_solid|label\.style_cross|line\.style_dashed|line\.style_dotted|location\.abovebar|location\.absolute|location\.belowbar|plot\.style_areabr|plot\.style_linebr|position\.top_left|strategy\.oca\.none|text\.align_bottom|text\.align_center|barstate\.isfirst|session\.ismarket|syminfo\.currency|syminfo\.industry|syminfo\.tickerid|syminfo\.timezone|timeframe\.period|barmerge\.gaps_on|dayofweek\.friday|dayofweek\.monday|dayofweek\.sunday|label\.style_flag|label\.style_none|line\.style_solid|order\.descending|plot\.style_cross|session\.extended|shape\.triangleup|splits\.numerator|text\.align_right|barstate\.islast|strategy\.equity|syminfo\.country|syminfo\.minmove|syminfo\.mintick|syminfo\.session|time_tradingday|timeframe\.isdwm|adjustment\.none|dividends\.gross|earnings\.actual|location\.bottom|order\.ascending|plot\.style_area|plot\.style_line|session\.regular|shape\.arrowdown|shape\.labeldown|text\.align_left|barstate\.isnew|chart\.bg_color|chart\.fg_color|chart\.is_range|chart\.is_renko|last_bar_index|strategy\.short|syminfo\.prefix|syminfo\.sector|syminfo\.ticker|alert\.freq_all|format\.inherit|format\.mintick|format\.percent|strategy\.fixed|text\.align_top|text\.wrap_auto|text\.wrap_none|xloc\.bar_index|chart\.is_kagi|last_bar_time|strategy\.long|color\.fuchsia|currency\.NONE|currency\.USDT|dividends\.net|format\.volume|shape\.arrowup|shape\.diamond|shape\.labelup|strategy\.cash|xloc\.bar_time|yloc\.abovebar|yloc\.belowbar|chart\.is_pnf|linefill\.all|polyline\.all|syminfo\.root|syminfo\.type|color\.maroon|color\.orange|color\.purple|color\.silver|color\.yellow|currency\.AUD|currency\.BTC|currency\.CAD|currency\.CHF|currency\.ETH|currency\.EUR|currency\.GBP|currency\.HKD|currency\.INR|currency\.JPY|currency\.KRW|currency\.MYR|currency\.NOK|currency\.NZD|currency\.RUB|currency\.SEK|currency\.SGD|currency\.TRY|currency\.USD|currency\.ZAR|display\.none|display\.pane|extend\.right|format\.price|location\.top|shape\.circle|shape\.square|shape\.xcross|color\.black|color\.green|color\.olive|color\.white|display\.all|extend\.both|extend\.left|extend\.none|scale\.right|shape\.cross|size\.normal|dayofmonth|ta\.accdist|time_close|weekofyear|color\.aqua|color\.blue|color\.gray|color\.lime|color\.navy|color\.teal|scale\.left|scale\.none|shape\.flag|size\.large|size\.small|yloc\.price|bar_index|dayofweek|label\.all|table\.all|color\.red|math\.rphi|size\.auto|size\.huge|size\.tiny|line\.all|math\.phi|box\.all|ta\.vwap|ta\.wvad|timenow|math\.pi|minute|second|ta\.iii|ta\.nvi|ta\.obv|ta\.pvi|ta\.pvt|ta\.wad|volume|math\.e|close|hlcc4|month|ohlc4|ta\.tr|false|high|hlc3|hour|open|time|year|true|hl2|low|na)\b(?!\s*=\s*\w+)/,"support.variable"],[/[(|)|\[|\]]/,"paren"],[/[a-zA-Z_][a-zA-Z_0-9]*(?=\s*\()/,{token:"entity.name.method"}],[/\w+\b/,"variable.other"]],comments:[[/@[A-Za-z]+(\s*=\s*)?$/,{token:"comment.annotation",next:"@pop"}],[/@[A-Za-z]+(\s*=\s*)?/,{token:"comment.annotation"}],[/(?!\s*@[A-Za-z]+).+$/,{token:"comment",next:"@pop"}]],stringDouble:[[/[^\\\"]+/,"string"],[/\\./,"string.invalid"],[/\"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],stringSingle:[[/[^\\']+/,"string"],[/\\./,"string.invalid"],[/'/,{token:"string",bracket:"@close",next:"@pop"}]],template:[[/(@builtinTypes)/,{token:"support.type"}],[/(\((?:\s+))?((?!(?:chart\.point|linefill|polyline|continue|for\.\.\.in|matrix|series|simple|string|export|import|method|switch|array|color|const|float|label|table|break|varip|while|bool|line|else|type|enum|box|int|map|and|for|not|var|as|by|if|in|or|to)\b)\b[\w.\d_$]+(?=[\[\]]*(?:\s+)(?:[\w\d_$]+\s*(?:\,|\))+\s*).+(?:\=\>|\→)))/,"entity.name.type"],[/\(|\)|\[|\]|\=|\>/,{token:"paren",next:"@pop"}],[/(\,)(\s+)/,["keyword.operator","source"]],[/(\,)/,{token:"keyword.operator"}],[/([\w.\d$]+)/,{token:"entity.name.type"}],[/(<|>)/,{token:"paren"}],[/\s(?=\w)|$/,{token:"source",next:"@pop"}]],property:[[/@punctuation/,{token:"punctuation.operator"}],[/(@builtinTypes)(?=\s*[(])/,{token:"support.method",next:"@pop"}],[/[a-zA-Z_][a-zA-Z_0-9]+(?=\s*\()/,{token:"entity.name.method",next:"@pop"}],[/[a-zA-Z0-9_]+/,{token:"variable.other.property",next:"@pop"}],[/@empty/,{token:"source",next:"@pop"}]],import:[[/\s+/,{token:"source"}],[/(@importName)(\s+)(as\b)(\s+)(@importAlias)/,[{token:"entity.name.module"},{token:"source"},{token:"keyword"},{token:"source"},{token:"entity.name.module.name",next:"@pop"}]],[/@importName/,{token:"entity.name.module",next:"@pop"}]]},builtinTypes:/chart\.point|linefill|polyline|matrix|series|simple|string|array|color|const|float|label|table|bool|line|box|int|map/,punctuation:/[.](?![.])/,importName:/[a-zA-Z\d\$_\-\.\u00a1-\uffff\/]+/,importAlias:/[a-zA-Z\d\_\u00a1\uffff\/]+/,empty:/^$/};var ht;(function(a){a[a.None=0]="None",a[a.Indent=1]="Indent",a[a.IndentOutdent=2]="IndentOutdent",a[a.Outdent=3]="Outdent"})(ht||(ht={}));const on={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["(",")"],["[","]"]],folding:{markers:{start:/(\/\/#region)|(\/\/.*{($|\s))/,end:/(\/\/#endregion)|(\/\/.*}($|\s))/}},autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],onEnterRules:[{beforeText:/\)\s*=>\s*$/,action:{indentAction:ht.Indent}},{beforeText:/if\s+.*\s*$/,action:{indentAction:ht.Indent}},{beforeText:/else/,action:{indentAction:ht.Indent}},{beforeText:/for\s+\S+\s*=\s*\S+\s+to\s+\S+(?:\s+by\s+\S+)?\s*$/,action:{indentAction:ht.Indent}},{beforeText:/for\s+(?:\[\S+\s+\S+]|\S+)\s+in\s+\S+\s*$/,action:{indentAction:ht.Indent}},{beforeText:/switch\s+.*\s*$/,action:{indentAction:ht.Indent}},{beforeText:/while\s+.*\s*$/,action:{indentAction:ht.Indent}},{beforeText:/type\s+\w+/,action:{indentAction:ht.Indent}},{beforeText:/enum\s+\w+/,action:{indentAction:ht.Indent}},{beforeText:/^\s*$/,action:{indentAction:ht.Outdent}}]},I={"color-white":"#ffffff","color-black":"#000000","color-transparent":"#00000000","color-cold-gray-50":"#F8F9FD","color-cold-gray-100":"#F0F3FA","color-cold-gray-150":"#E0E3EB","color-cold-gray-200":"#D1D4DC","color-cold-gray-250":"#C1C4CD","color-cold-gray-300":"#B2B5BE","color-cold-gray-350":"#A3A6AF","color-cold-gray-400":"#9598A1","color-cold-gray-450":"#868993","color-cold-gray-500":"#787B86","color-cold-gray-550":"#6A6D78","color-cold-gray-600":"#5D606B","color-cold-gray-650":"#50535E","color-cold-gray-700":"#434651","color-cold-gray-750":"#363A45","color-cold-gray-800":"#2A2E39","color-cold-gray-850":"#1E222D","color-cold-gray-900":"#131722","color-cold-gray-950":"#0C0E15","color-ripe-red-50":"#FFEBEC","color-ripe-red-100":"#FCCBCD","color-ripe-red-200":"#FAA1A4","color-ripe-red-300":"#F77C80","color-ripe-red-400":"#F7525F","color-ripe-red-500":"#F23645","color-ripe-red-600":"#CC2F3C","color-ripe-red-700":"#B22833","color-ripe-red-800":"#991F29","color-ripe-red-900":"#801922","color-ripe-red-a100":"#FF8080","color-ripe-red-a200":"#FF5252","color-ripe-red-a400":"#FF3333","color-ripe-red-a600":"#CC2929","color-ripe-red-a700":"#802028","color-ripe-red-a800":"#4D191D","color-ripe-red-a900":"#331F20","color-tan-orange-50":"#FFF3E0","color-tan-orange-100":"#FFE0B2","color-tan-orange-200":"#FFCC80","color-tan-orange-300":"#ffb74d","color-tan-orange-400":"#FFA726","color-tan-orange-500":"#FF9800","color-tan-orange-600":"#FB8C00","color-tan-orange-700":"#F57C00","color-tan-orange-800":"#EF6C00","color-tan-orange-900":"#e65100","color-tan-orange-a200":"#ffab40","color-tan-orange-a400":"#FF9100","color-tan-orange-a600":"#CC7014","color-tan-orange-a700":"#8C541C","color-tan-orange-a800":"#593A1B","color-tan-orange-a900":"#33261A","color-iguana-green-100":"#C8E6C9","color-iguana-green-200":"#A5D6A7","color-iguana-green-300":"#81c784","color-iguana-green-400":"#66BB6A","color-iguana-green-500":"#4caf50","color-iguana-green-600":"#43a047","color-iguana-green-700":"#388e3c","color-iguana-green-800":"#2E7D32","color-iguana-green-900":"#1B5E20","color-iguana-green-a700":"#00c853","color-banana-yellow-100":"#FFF9C4","color-banana-yellow-200":"#FFF59D","color-banana-yellow-300":"#FFF176","color-banana-yellow-400":"#ffee58","color-banana-yellow-500":"#ffeb3b","color-banana-yellow-600":"#fdd835","color-banana-yellow-700":"#fbc02d","color-banana-yellow-800":"#f9a825","color-banana-yellow-900":"#F57F17","color-banana-yellow-a400":"#ffea00","color-banana-yellow-a700":"#EEDA01","color-tv-blue-50":"#E3EFFD","color-tv-blue-100":"#BBD9FB","color-tv-blue-200":"#90BFF9","color-tv-blue-300":"#5B9CF6","color-tv-blue-400":"#3179F5","color-tv-blue-500":"#2962FF","color-tv-blue-600":"#1E53E5","color-tv-blue-700":"#1848CC","color-tv-blue-800":"#143EB3","color-tv-blue-900":"#0C3299","color-tv-blue-a100":"#82b1ff","color-tv-blue-a200":"#448aff","color-tv-blue-a400":"#2979ff","color-tv-blue-a600":"#2962FF","color-tv-blue-a700":"#143A87","color-tv-blue-a800":"#142E61","color-tv-blue-a900":"#132042","color-deep-blue-50":"#EDE7F6","color-deep-blue-100":"#D1C4E9","color-deep-blue-200":"#B39DDB","color-deep-blue-300":"#9575cd","color-deep-blue-400":"#7e57c2","color-deep-blue-500":"#673ab7","color-deep-blue-700":"#512da8","color-deep-blue-800":"#4527A0","color-deep-blue-900":"#311B92","color-deep-blue-a100":"#b388ff","color-deep-blue-a200":"#7C4DFF","color-deep-blue-a400":"#651FFF","color-deep-blue-a700":"#6200EA","color-minty-green-50":"#DAF2EE","color-minty-green-100":"#ACE5DC","color-minty-green-200":"#70CCBD","color-minty-green-300":"#42BDA8","color-minty-green-400":"#22AB94","color-minty-green-500":"#089981","color-minty-green-600":"#06806B","color-minty-green-700":"#056656","color-minty-green-800":"#004D40","color-minty-green-900":"#00332A","color-minty-green-a400":"#2BD9BC","color-minty-green-a600":"#24B29B","color-minty-green-a700":"#1B7667","color-minty-green-a800":"#10443B","color-minty-green-a900":"#082621","color-grapes-purple-50":"#F3E5F5","color-grapes-purple-100":"#E1BEE7","color-grapes-purple-200":"#CE93D8","color-grapes-purple-300":"#ba68c8","color-grapes-purple-400":"#ab47bc","color-grapes-purple-500":"#9c27b0","color-grapes-purple-600":"#8e24aa","color-grapes-purple-700":"#7b1fa2","color-grapes-purple-800":"#6A1B9A","color-grapes-purple-900":"#4A148C","color-grapes-purple-a100":"#EA80FC","color-grapes-purple-a200":"#E040FB","color-grapes-purple-a400":"#D500F9","color-grapes-purple-a700":"#aa00ff","color-berry-pink-100":"#F8BBD0","color-berry-pink-200":"#f48fb1","color-berry-pink-300":"#f06292","color-berry-pink-400":"#ec407a","color-berry-pink-500":"#e91e63","color-berry-pink-600":"#D81B60","color-berry-pink-700":"#C2185B","color-berry-pink-800":"#AD1457","color-berry-pink-900":"#880E4F","color-berry-pink-a100":"#ff80ab","color-berry-pink-a200":"#ff4081","color-berry-pink-a400":"#f50057","color-sky-blue-100":"#B2EBF2","color-sky-blue-200":"#80DEEA","color-sky-blue-300":"#4dd0e1","color-sky-blue-400":"#26c6da","color-sky-blue-500":"#00bcd4","color-sky-blue-600":"#00acc1","color-sky-blue-700":"#0097A7","color-sky-blue-800":"#00838F","color-sky-blue-900":"#006064","color-sky-blue-a400":"#00e5ff","color-sky-blue-a700":"#00B8D4","color-deep-blue-600":"#5E35B1","color-forest-green-50":"#DAF2E6","color-forest-green-100":"#ACE5C9","color-forest-green-200":"#70CC9E","color-forest-green-300":"#42BD7F","color-forest-green-400":"#22AB67","color-forest-green-500":"#089950","color-forest-green-600":"#068043","color-forest-green-700":"#056636","color-forest-green-800":"#004D27","color-forest-green-900":"#1A3326","color-facebook":"#1877F2","color-deep-facebook":"#1564CA","color-twitter":"#1DA1F2","color-deep-twitter":"#188CD3","color-youtube":"#FF0000","color-linkedin":"#007BB5","color-seeking-alpha-brand":"#ff7200"};function Ut(a,n=1){return a+Math.round(255*Math.min(Math.max(n,0),1)).toString(16).toUpperCase().padStart(2,"0")}const ln={base:"vs",inherit:!0,rules:[{token:"comment",foreground:I["color-cold-gray-400"]},{token:"comment.annotation",fontStyle:"bold"},{token:"text",foreground:I["color-cold-gray-900"]},{token:"string",foreground:I["color-iguana-green-700"]},{token:"constant.numeric",foreground:I["color-banana-yellow-900"]},{token:"constant.language",foreground:I["color-ripe-red-a600"]},{token:"constant.other.color",foreground:I["color-ripe-red-a600"]},{token:"constant.other",foreground:I["color-ripe-red-a600"]},{token:"support.variable",foreground:I["color-ripe-red-a600"]},{token:"support.function",foreground:I["color-tv-blue-a600"]},{token:"support.type",foreground:I["color-minty-green-400"],fontStyle:"bold"},{token:"entity.name.type",foreground:I["color-minty-green-400"],fontStyle:"bold"},{token:"support.method",foreground:I["color-tv-blue-a600"]},{token:"keyword.equals",foreground:I["color-minty-green-400"]},{token:"keyword.operator",foreground:I["color-minty-green-400"]},{token:"keyword.other",foreground:I["color-minty-green-400"]},{token:"keyword",foreground:I["color-minty-green-400"]},{token:"variable.other",foreground:I["color-cold-gray-800"]},{token:"variable.other.property",foreground:I["color-cold-gray-800"]},{token:"paren",foreground:I["color-black"]},{token:"entity.name.function",foreground:I["color-tv-blue-900"]},{token:"entity.name.method",foreground:I["color-tv-blue-900"]},{token:"meta.function-call",foreground:I["color-grapes-purple-600"]},{token:"entity.name.module.name",foreground:I["color-grapes-purple-600"]},{token:"entity.name.module",foreground:I["color-tv-blue-a600"]},{token:"",background:I["color-white"]}],colors:{"editor.foreground":I["color-cold-gray-900"],"editor.background":"#00000000","editorLineNumber.foreground":I["color-cold-gray-400"],"editorLineNumber.activeForeground":I["color-cold-gray-700"],"editorHoverWidget.background":I["color-white"],"editorHoverWidget.statusBarBackground":I["color-cold-gray-150"],"editorHoverWidget.foreground":I["color-cold-gray-900"],"editorWidget.background":I["color-white"],"editorWidget.foreground":I["color-cold-gray-900"],"editorGutter.background":"#00000000","editor.foldBackground":Ut(I["color-cold-gray-200"],.5),"editor.lineHighlightBackground":I["color-tv-blue-50"],"editor.lineHighlightBorder":I["color-tv-blue-50"],"editor.rangeHighlightBackground":I["color-tv-blue-a800"],"editorBracketMatch.background":I["color-cold-gray-150"],"editor.selectionBackground":I["color-tv-blue-100"],"editor.selectionHighlightBackground":I["color-tv-blue-50"],"editor.findMatchBackground":I["color-tan-orange-100"],"editor.findMatchHighlightBackground":I["color-tan-orange-100"],"editor.findMatchBorder":I["color-tan-orange-500"],"list.foreground":I["color-cold-gray-900"],"list.hoverForeground":I["color-cold-gray-900"],"list.activeSelectionBackground":I["color-tv-blue-500"],"list.hoverBackground":I["color-tv-blue-50"],"list.focusHighlightForeground":I["color-tv-blue-100"],"list.inactiveSelectionBackground":I["color-tv-blue-500"],"keybindingLabel.background":I["color-white"],"keybindingLabel.foreground":I["color-cold-gray-900"],"keybindingLabel.border":I["color-cold-gray-150"],"input.foreground":I["color-cold-gray-900"],"textLink.foreground":I["color-tv-blue-500"],"textLink.activeForeground":I["color-tv-blue-600"],"peekViewEditor.matchHighlightBackground":I["color-tan-orange-100"],"peekViewResult.lineForeground":I["color-cold-gray-900"],"editorMarkerNavigationWarning.background":I["color-banana-yellow-800"],"inputValidation.warningBackground":I["color-banana-yellow-800"],"diffEditor.insertedTextBackground":Ut(I["color-forest-green-500"],.3),"diffEditor.insertedLineBackground":Ut(I["color-forest-green-500"],.15),"diffEditor.removedTextBackground":Ut(I["color-ripe-red-500"],.3),"diffEditor.removedLineBackground":Ut(I["color-ripe-red-500"],.15),"editorInlayHint.background":I["color-cold-gray-150"],"editorInlayHint.foreground":I["color-cold-gray-550"],"editorError.foreground":I["color-ripe-red-500"],"editorWarning.foreground":I["color-tan-orange-500"]}},cn={base:"vs-dark",inherit:!0,rules:[{token:"comment",foreground:I["color-cold-gray-500"]},{token:"comment.annotation",fontStyle:"bold"},{token:"text",foreground:I["color-white"]},{token:"string",foreground:I["color-iguana-green-700"]},{token:"constant.numeric",foreground:I["color-banana-yellow-900"]},{token:"constant.language",foreground:I["color-ripe-red-300"]},{token:"constant.other.color",foreground:I["color-ripe-red-300"]},{token:"constant.other",foreground:I["color-ripe-red-300"]},{token:"support.variable",foreground:I["color-ripe-red-300"]},{token:"support.function",foreground:I["color-tv-blue-300"]},{token:"support.method",foreground:I["color-tv-blue-300"]},{token:"support.type",foreground:I["color-minty-green-300"],fontStyle:"bold"},{token:"entity.name.type",foreground:I["color-minty-green-300"],fontStyle:"bold"},{token:"keyword.equals",foreground:I["color-minty-green-300"]},{token:"keyword.operator",foreground:I["color-minty-green-300"]},{token:"keyword.other",foreground:I["color-minty-green-300"]},{token:"keyword",foreground:I["color-minty-green-300"]},{token:"variable.other",foreground:I["color-cold-gray-200"]},{token:"variable.other.property",foreground:I["color-cold-gray-200"]},{token:"paren",foreground:I["color-white"]},{token:"entity.name.function",foreground:I["color-tv-blue-400"]},{token:"entity.name.method",foreground:I["color-tv-blue-400"]},{token:"meta.function-call",foreground:I["color-grapes-purple-300"]},{token:"entity.name.module.name",foreground:I["color-grapes-purple-300"]},{token:"entity.name.module",foreground:I["color-tv-blue-300"]},{token:"",background:I["color-cold-gray-900"]}],colors:{"editor.foreground":I["color-white"],"editor.background":I["color-cold-gray-900"],"editorLineNumber.foreground":I["color-cold-gray-500"],"editorLineNumber.activeForeground":I["color-cold-gray-300"],"editorWidget.background":I["color-cold-gray-850"],"editorHoverWidget.background":I["color-cold-gray-850"],"editorHoverWidget.foreground":I["color-cold-gray-300"],"editorHoverWidget.statusBarBackground":I["color-cold-gray-900"],"editorWidget.foreground":I["color-cold-gray-300"],"editorGutter.background":I["color-cold-gray-900"],"editor.foldBackground":Ut(I["color-cold-gray-700"],.5),"editor.lineHighlightBackground":I["color-tv-blue-a900"],"editor.lineHighlightBorder":I["color-tv-blue-a900"],"editor.rangeHighlightBackground":I["color-tv-blue-a800"],"editorBracketMatch.background":I["color-cold-gray-750"],"editor.selectionBackground":I["color-tv-blue-a800"],"editor.selectionHighlightBackground":I["color-cold-gray-800"],"list.foreground":I["color-cold-gray-350"],"list.hoverForeground":I["color-cold-gray-350"],"list.activeSelectionBackground":I["color-tv-blue-500"],"list.hoverBackground":I["color-tv-blue-900"],"list.focusHighlightForeground":I["color-tv-blue-300"],"list.inactiveSelectionBackground":I["color-tv-blue-500"],"keybindingLabel.background":I["color-cold-gray-800"],"keybindingLabel.foreground":I["color-cold-gray-300"],"keybindingLabel.border":I["color-cold-gray-700"],"input.foreground":I["color-cold-gray-350"],"textLink.foreground":I["color-tv-blue-500"],"textLink.activeForeground":I["color-tv-blue-600"],"peekViewEditor.matchHighlightBackground":I["color-tan-orange-a800"],"peekViewResult.lineForeground":I["color-cold-gray-350"],"diffEditor.insertedTextBackground":Ut(I["color-iguana-green-a700"],.3),"diffEditor.insertedLineBackground":Ut(I["color-iguana-green-a700"],.15),"diffEditor.removedTextBackground":Ut(I["color-ripe-red-a400"],.3),"diffEditor.removedLineBackground":Ut(I["color-ripe-red-a400"],.15),"editorInlayHint.background":I["color-cold-gray-800"],"editorInlayHint.foreground":I["color-cold-gray-400"],"editorError.foreground":I["color-ripe-red-500"],"editorWarning.foreground":I["color-tan-orange-700"]}},Sd=/(\\(?:[\\'"]))|(\\$)|("|$)|($)/g,Ed=/(\\(?:[\\'"]))|(\\$)|('|$)|($)/g,oo={"color.aqua":"#00BCD4","color.black":"#363A45","color.blue":"#2196F3","color.fuchsia":"#E040FB","color.gray":"#787B86","color.green":"#4CAF50","color.lime":"#00E676","color.maroon":"#880E4F","color.navy":"#311B92","color.olive":"#808000","color.orange":"#FF9800","color.purple":"#9C27B0","color.red":"#FF5252","color.silver":"#B2B5BE","color.teal":"#00897B","color.white":"#FFFFFF","color.yellow":"#FFEB3B"};class Nd{constructor(n){Object.defineProperty(this,"_formatter",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_isMac",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_getSignatureParams",{enumerable:!0,configurable:!0,writable:!0,value:(s=[],o)=>{const c=new Map,l=o.indexOf("(");for(let m=l+1,y=l;m<o.length;m++)o[m]!==","&&o[m]!==")"||(y++,c.set(o.slice(y,m),y),y=m+1);return s.map(({name:m="",displayType:y,desc:f})=>{const b=[],h=c.get(m),T=h+m.length;return b.push(this._formatter.paragraph(this._formatter.bold(m),this._formatter.italic(y||""))),f&&b.push(Array.isArray(f)?f.join(this._formatter.lineBreak):f),{label:[h,T],documentation:{value:b.join(this._formatter.lineBreak)}}})}}),this._formatter=oe,this._isMac=/(Mac|iPhone|iPod|iPad)/i.test(n)}getSignatureHelpValues(n,s,o=0,c=0){var b;const l=this._getFuncItems(n);if(!(l!=null&&l.length))return null;const m=this._getSequentialSignatures(n,l),y=this._getActiveIndex(l,s),f=(b=br.overloadsFuncs)==null?void 0:b.find(h=>h.name===n&&h.startColumn===o&&c===h.line);return f&&(y.activeSignature=Number(f.index)),{signatures:m,...y}}_getActiveIndex(n,s=[]){let o=0,c=-1;s.some(m=>!!m)||(c=s.length-1);const l=s.pop();if(l)for(const[m,y]of n.entries()){const{args:f}=y;if(f&&f.length){const b=f.findIndex(h=>h.name===l);if(b!=-1){c=b,o=m;break}}}return{activeParameter:c,activeSignature:o}}_getFuncItems(n){return pt.functions.get(n)||St.userFuncs.get(n)||St.methodFuncs.get(n)}_getSequentialSignatures(n,s){return s.map(o=>{const c=this._getSignatureLabel(n,o);return{label:c,documentation:this._getFormattedSignatureDocumentation(o),parameters:this._getSignatureParams(o.args,c)}})}_getSignatureLabel(n,s,o=!1){const c=[n];return o&&c.push("<type>"),s.args&&(c.push("("),c.push(s.args.map(({name:l})=>l).join(", ")),c.push(")")),c.join("")}_getFormattedSignatureDocumentation(n){const{desc:s}=n,o=[];s&&o.push(Array.isArray(s)?s.join(this._formatter.lineBreak):s);const c=`${this._formatter.code(this._isMac?"⌘":"Ctrl")} +
138
138
  ${this._formatter.code("Shift")} +
139
- ${this._formatter.code("Space")}`;return o.push(this._formatter.lineBreak),o.push(this._formatter.italic(`${c} ${be.toTriggerParameterHints}`)),{value:this._formatter.paragraph(...o)}}}const Ld=new Nd(window.navigator.userAgent);class Md{constructor(){Object.defineProperty(this,"_colors",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_count",{enumerable:!0,configurable:!0,writable:!0,value:0}),this._colors=oo}getDocumentColors(n){this._count++;const s=[];return n.forEach(o=>{const{range:c}=o;let{matches:l}=o;l=l||[];const m=l[0]||"";let _=null;this._isHexToken(m)?_=this._hexToColor(m):this._isRgbColor(m)?_=this._rgbToColor(m):this._colors[m]?_=this._hexToColor(this._colors[m]):this._isColorExpression(m)&&l[1]&&l[6]&&(_=this._extractNewExpression(l[1],Number(l[6]))),_&&s.push({color:_,range:c})}),s}get _defultColorsRegStr(){return Object.keys(oo).reduce((n,s)=>`${n}|${s}`,"")}get colorMatchesRegStr(){const n=`#[0-9a-fA-F]{6,8}|(\\b(color.rgb\\s*\\((\\s*\\d+\\s*,\\s*){2}(\\s*\\d+\\s*,{0,1}){1,2}\\s*\\)${this._defultColorsRegStr}))`;return`color.new\\s*\\(\\s*(${n})\\s*,\\s*(\\d+)\\s*\\)|${n}`}getDocumentColorPresentations(n,{color:s,range:o}){const c=n.getValueInRange(o);if(this._isHexToken(c)||this._colors[c])return[{label:this._colorRgbRepresentation(s)},{label:this._colorHexRepresentation(s)}];if(this._isColorExpression(c)||this._isRgbColor(c)){const l=this._isColorExpression(c)?this._colorNewRepresentation(s):this._colorRgbRepresentation(s);if(!l)return[];const m=this._colorHexRepresentation(s);return[{label:l,textEdit:{text:l,range:o}},{label:m,textEdit:{text:m,range:o}}]}return null}_hexFromNumber(n){const s=this._denormalize(n).toString(16);return s.length===1?`0${s}`:s}_normalize(n){return n/255}_denormalize(n){return Math.round(255*n)}_normalizeAlpha(n){return(100-n)/100}_denormalizeAlpha(n){return 100-Math.round(100*n)}_extractNewExpression(n,s){let o=null;return this._isHexToken(n)?o=this._hexToColor(n):this._isRgbColor(n)?o=this._rgbToColor(n):this._colors[n]&&(o=this._hexToColor(this._colors[n])),o&&!Number.isNaN(s)?{...o,alpha:this._normalizeAlpha(s)}:null}_colorHexRepresentation(n){const s=this._hexFromNumber(n.red),o=this._hexFromNumber(n.green),c=this._hexFromNumber(n.blue),l=this._hexFromNumber(n.alpha);return`#${s}${o}${c}${n.alpha===1?"":l}`}_colorRgbRepresentation(n){const s=this._denormalize(n.red),o=this._denormalize(n.green),c=this._denormalize(n.blue),l=this._denormalizeAlpha(n.alpha),m=[s,o,c];return l>0&&m.push(l),`color.rgb(${m.join(", ")})`}_colorNewRepresentation(n){const s={...n,alpha:1};return`color.new(${this._colorHexRepresentation(s)}, ${this._denormalizeAlpha(n.alpha)})`}_hexToColor(n){const s=(n=this._isHexToken(n)?n.slice(1):n).length===3||n.length===4,o=s?`${n.slice(0,1)}${n.slice(0,1)}`:n.slice(0,2),c=s?`${n.slice(1,2)}${n.slice(1,2)}`:n.slice(2,4),l=s?`${n.slice(2,3)}${n.slice(2,3)}`:n.slice(4,6),m=(s?`${n.slice(3,4)}${n.slice(3,4)}`:n.slice(6,8))||"ff";return{red:this._normalize(parseInt(o,16)),green:this._normalize(parseInt(c,16)),blue:this._normalize(parseInt(l,16)),alpha:this._normalize(parseInt(m,16))}}_rgbToColor(n){const s=n.replace(/[^\d,]/g,"").split(","),o=this._normalize(Number(s[0])),c=this._normalize(Number(s[1])),l=this._normalize(Number(s[2])),m=this._normalizeAlpha(Number(s[3]))||1;return isNaN(o)||isNaN(c)||isNaN(l)?null:{red:o,green:c,blue:l,alpha:m}}_isHexToken(n){return n.charAt(0)==="#"}_isRgbColor(n){return n.startsWith("color.rgb")}_isColorExpression(n){return n.startsWith("color.new")}}const pn=new Md;A.VType=void 0,function(a){a.BOOL="bool",a.INT="int",a.FLOAT="float",a.ARRAY="array",a.BOX="box",a.CHART_POINT="chart.point",a.COLOR="color",a.CONST="const",a.LABEL="label",a.LINE="line",a.LINEFILL="linefill",a.MAP="map",a.MATRIX="matrix",a.POLYLINE="polyline",a.SERIES="series",a.SIMPLE="simple",a.STRING="string",a.TABLE="table",a.UNDETERMINED="undetermined type",a.INPUT="input",a.NA="na",a.VOID="void",a.ENUM="enum"}(A.VType||(A.VType={})),A.VRuleType=void 0,function(a){a.FlowStmt="FlowStmt",a.DeclareAssign="DeclareAssign",a.VarBlockStmt="VarBlockStmt",a.VarSingle="VarSingle",a.VarMultiple="VarMultiple",a.ParenthesizedExpression="ParenthesizedExpression",a.AdditiveExpression="AdditiveExpression",a.RelationalExpression="RelationalExpression",a.EqualityExpression="EqualityExpression",a.TernaryExpression="TernaryExpression",a.UnaryExpression="UnaryExpression",a.NotExpression="NotExpression",a.MemberIndexExpression="MemberIndexExpression",a.MethodExpression="MethodExpression",a.LogicalAndExpression="LogicalAndExpression",a.LogicalOrExpression="LogicalOrExpression",a.MultiplicativeExpression="MultiplicativeExpression",a.Brackethesized="Brackethesized",a.IfStatement="IfStatement",a.ForToStatement="ForToStatement",a.ForInStatement="ForInStatement",a.SwitchStatement="SwitchStatement",a.CaseClause="CaseClause",a.DefaultCaluse="DefaultCaluse",a.WhileStatement="WhileStatement",a.ImportElement="ImportElement",a.Literal="Literal",a.ArrowFunction="ArrowFunction",a.ArrowMethod="ArrowMethod",a.TypeStatement="TypeStatement",a.Name="Name",a.AgainAssign="AgainAssign",a.EnumStatement="EnumStatement"}(A.VRuleType||(A.VRuleType={})),A.VAdjustment=void 0,function(a){a.dividends="dividends",a.none="none",a.splits="splits"}(A.VAdjustment||(A.VAdjustment={})),A.VAlert=void 0,function(a){a.freqAll="freq_all",a.freqOncePerBar="freq_once_per_bar",a.freqOncePerBarClose="freq_once_per_bar_close"}(A.VAlert||(A.VAlert={})),A.VBarmergeGaps=void 0,function(a){a.gapsOff="gaps_off",a.gapsOn="gaps_on",a.lookaheadOff="lookahead_off",a.lookaheadOn="lookahead_on"}(A.VBarmergeGaps||(A.VBarmergeGaps={})),A.VPlotDisplay=void 0,function(a){a.all="all",a.dataWindow="data_window",a.none="none",a.pane="pane",a.priceScale="price_scale",a.statusLine="status_line"}(A.VPlotDisplay||(A.VPlotDisplay={})),A.VExtend=void 0,function(a){a.both="both",a.left="left",a.none="none",a.right="right"}(A.VExtend||(A.VExtend={})),A.VFormatType=void 0,function(a){a.inherit="inherit",a.mintick="mintick",a.percent="percent",a.price="price",a.volume="volume"}(A.VFormatType||(A.VFormatType={})),A.VHlineStyle=void 0,function(a){a.styleDashed="style_dashed",a.styleDotted="style_dotted",a.styleSolid="style_solid"}(A.VHlineStyle||(A.VHlineStyle={})),A.VLabelStyle=void 0,function(a){a.styleArrowdown="style_arrowdown",a.styleArrowup="style_arrowup",a.styleCircle="style_circle",a.styleCross="style_cross",a.styleDiamond="style_diamond",a.styleFlag="style_flag",a.styleLabelCenter="style_label_center",a.styleLabelDown="style_label_down",a.styleLabelLeft="style_label_left",a.styleLabelLowerLeft="style_label_lower_left",a.styleLabelLowerRight="style_label_lower_right",a.styleLabelRight="style_label_right",a.styleLabelUp="style_label_up",a.styleLabelUpperLeft="style_label_upper_left",a.styleLabelUpperRight="style_label_upper_right",a.styleNone="style_none",a.styleSquare="style_square",a.styleTextOutline="style_text_outline",a.styleTriangledown="style_triangledown",a.styleTriangleup="style_triangleup",a.styleXcross="style_xcross"}(A.VLabelStyle||(A.VLabelStyle={})),A.VLineStyle=void 0,function(a){a.styleArrowBoth="style_arrow_both",a.styleArrowLeft="style_arrow_left",a.styleArrowRight="style_arrow_right",a.styleDashed="style_dashed",a.styleDotted="style_dotted",a.styleSolid="style_solid"}(A.VLineStyle||(A.VLineStyle={})),A.VLocation=void 0,function(a){a.abovebar="abovebar",a.absolute="absolute",a.belowbar="belowbar",a.bottom="bottom",a.top="top"}(A.VLocation||(A.VLocation={})),A.VSortOrder=void 0,function(a){a.ascending="ascending",a.descending="descending"}(A.VSortOrder||(A.VSortOrder={})),A.VPlotStyle=void 0,function(a){a.styleArea="Area",a.styleAreabr="Area With Breaks",a.styleCircles="Circles",a.styleColumns="Columns",a.styleCross="Cross",a.styleHistogram="Histogram",a.styleLine="Line",a.styleLinebr="Line With Breaks",a.styleStepline="Step Line",a.styleSteplineDiamond="Step Line With Diamonds",a.styleSteplinebr="Step line with Breaks"}(A.VPlotStyle||(A.VPlotStyle={})),A.VPosition=void 0,function(a){a.bottomCenter="bottom_center",a.bottomLeft="bottom_left",a.bottomRight="bottom_right",a.middleCenter="middle_center",a.middleLeft="middle_left",a.middleRight="middle_right",a.topCenter="top_center",a.topLeft="top_left",a.topRight="top_right"}(A.VPosition||(A.VPosition={})),A.VScale=void 0,function(a){a.left="left",a.none="none",a.right="right"}(A.VScale||(A.VScale={})),A.VSession=void 0,function(a){a.extended="extended",a.regular="regular"}(A.VSession||(A.VSession={})),A.VShape=void 0,function(a){a.arrowdown="arrowdown",a.arrowup="arrowup",a.circle="circle",a.cross="cross",a.diamond="diamond",a.flag="flag",a.labeldown="labeldown",a.labelup="labelup",a.square="square",a.triangledown="triangledown",a.triangleup="triangleup",a.xcross="xcross"}(A.VShape||(A.VShape={})),A.VSize=void 0,function(a){a.auto="auto",a.huge="huge",a.large="large",a.normal="normal",a.small="small",a.tiny="tiny"}(A.VSize||(A.VSize={})),A.VFont=void 0,function(a){a.familyDefault="default",a.familyMonospace="monospace"}(A.VFont||(A.VFont={})),A.VStrategy=void 0,function(a){a.cash="cash",a.fixed="fixed",a.percentOfEquity="percent_of_equity"}(A.VStrategy||(A.VStrategy={})),A.VCommission=void 0,function(a){a.cashPerContract="cash_per_contract",a.cashPerOrder="cash_per_order",a.percent="percent"}(A.VCommission||(A.VCommission={})),A.VDirection=void 0,function(a){a.all="all",a.long="long",a.short="short"}(A.VDirection||(A.VDirection={})),A.VOca=void 0,function(a){a.cancel="cancel",a.none="none",a.reduce="reduce"}(A.VOca||(A.VOca={})),A.VText=void 0,function(a){a.alignBottom="align_bottom",a.alignCenter="align_center",a.alignLeft="align_left",a.alignRight="align_right",a.alignTop="align_top",a.wrapAuto="wrap_auto",a.wrapNone="wrap_none"}(A.VText||(A.VText={})),A.VXloc=void 0,function(a){a.bar_index="bar_index",a.bar_time="bar_time"}(A.VXloc||(A.VXloc={})),A.VYloc=void 0,function(a){a.abovebar="abovebar",a.belowbar="belowbar",a.price="price"}(A.VYloc||(A.VYloc={})),A.VEarnings=void 0,function(a){a.actual="actual",a.estimate="estimate",a.standardized="standardized"}(A.VEarnings||(A.VEarnings={})),A.VPivotType=void 0,function(a){a.traditional="Traditional",a.fibonacci="Fibonacci",a.woodie="Woodie",a.classic="Classic",a.dm="DM",a.camarilla="Camarilla"}(A.VPivotType||(A.VPivotType={})),A.VInputType=void 0,function(a){a.INT="int",a.BOOL="bool",a.TIME="time",a.COLOR="color",a.FLOAT="float",a.PRICE="price",a.SOURCE="source",a.STRING="string",a.SYMBOL="symbol",a.SESSION="session",a.TEXT_AREA="text_area",a.TIMEFRAME="timeframe",a.ENUM="enum"}(A.VInputType||(A.VInputType={}));var lo;(function(a){a.description="description",a.field="field",a.function="function",a.param="param",a.returns="returns",a.type="type",a.variable="variable",a.enum="enum"})(lo||(lo={})),A.VScriptType=void 0,function(a){a.library="library",a.indicator="indicator",a.strategy="strategy"}(A.VScriptType||(A.VScriptType={})),A.VType.SERIES,A.VType.SIMPLE,A.VType.INPUT,A.VType.CONST,A.VType.INT,A.VType.FLOAT,A.VType.BOOL,A.VType.COLOR,A.VType.STRING;const Pd={domReadOnly:!0,scrollBeyondLastLine:!1,readOnly:!0,minimap:{enabled:!1},scrollbar:{vertical:"hidden",horizontal:"hidden",alwaysConsumeMouseWheel:!1},contextmenu:!1},co={functions:[{name:"calcBB",desc:["Computes Bollinger Band values from an array of data."],args:[{name:"srcArray",desc:"(array<float>) The array where the queue is maintained.",required:!0,allowedTypeIDs:["float[]","int[]"],displayType:"float[]"},{name:"mult",required:!0,allowedTypeIDs:["series int","series float","simple int","simple float","input int","input float","const int","const float"],displayType:"series float"},{name:"calculate",required:!1,allowedTypeIDs:["series bool","simple bool","input bool","const bool"],displayType:"series bool"}],syntax:["calcBB(float[] srcArray, series float mult, series bool calculate) → [series float, series float, series float]"],hasMemberIndex:!1,pos:{lineNumber:10,column:14},isUser:!0,returnedTypes:["[series float, series float, series float]"],returns:["A tuple containing the basis, upper band, and lower band respectively."]},{name:"calcBB",args:[{name:"srcArray",required:!0,allowedTypeIDs:["float[]","int[]"],displayType:"float[]"},{name:"mult",required:!0,allowedTypeIDs:["series int","simple int","input int","const int"],displayType:"series int"},{name:"calculate",required:!1,allowedTypeIDs:["series bool","simple bool","input bool","const bool"],displayType:"series bool"}],syntax:["calcBB(float[] srcArray, series int mult, series bool calculate) → [series float, series float, series float]"],hasMemberIndex:!1,pos:{lineNumber:19,column:14},isUser:!0,returnedTypes:["[series float, series float, series float]"],index:1},{name:"Scanner.new",args:[{name:"enabled",required:!1,allowedTypeIDs:["series bool","simple bool","input bool","const bool"],displayType:"series bool"},{name:"ticker",required:!1,allowedTypeIDs:["series string","simple string","input string","const string"],displayType:"series string"},{name:"timeframe",required:!1,allowedTypeIDs:["series string","simple string","input string","const string"],displayType:"series string"}],returnedTypes:["Scanner"],pos:{lineNumber:30,column:12},syntax:["Scanner.new(series bool enabled, series string ticker, series string timeframe) → Scanner"]},{name:"Scanner.copy",args:[{name:"object",required:!0,allowedTypeIDs:["Scanner"],displayType:"Scanner"}],returnedTypes:["Scanner"],pos:{lineNumber:30,column:12},info:"The identifier of the object to be copied.",syntax:["Scanner.copy(Scanner object) → Scanner"]}],methods:[{name:"calcBB",args:[{name:"mult",required:!0,allowedTypeIDs:["series int","series float","simple int","simple float","input int","input float","const int","const float"],displayType:"series float"},{name:"calculate",required:!1,allowedTypeIDs:["series bool","simple bool","input bool","const bool"],displayType:"series bool"}],desc:["Computes Bollinger Band values from an array of data."],originalName:"array.calcBB",syntax:["calcBB(series float mult, series bool calculate) → [series float, series float, series float]"],returnedTypes:["[series float, series float, series float]"],hasMemberIndex:!1,pos:{lineNumber:10,column:14},thisType:["float[]"],returns:["A tuple containing the basis, upper band, and lower band respectively."]},{name:"calcBB",args:[{name:"mult",required:!0,allowedTypeIDs:["series int","simple int","input int","const int"],displayType:"series int"},{name:"calculate",required:!1,allowedTypeIDs:["series bool","simple bool","input bool","const bool"],displayType:"series bool"}],originalName:"array.calcBB",syntax:["calcBB(series int mult, series bool calculate) → [series float, series float, series float]"],returnedTypes:["[series float, series float, series float]"],hasMemberIndex:!1,pos:{lineNumber:19,column:14},thisType:["float[]"],index:1},{name:"Scanner.copy",args:[],returnedTypes:["Scanner"],thisType:["Scanner"],pos:{lineNumber:30,column:12},syntax:["Scanner.copy() → Scanner"]}],types:[{fields:[{name:"enabled",type:"series bool"},{name:"ticker",type:"series string"},{name:"timeframe",type:"series string"}],name:"Scanner",pos:{lineNumber:30,column:12}}],description:"Provides a tool to quickly output a label on the chart.",codeStr:'const $name={calcBB:({srcArray:a,mult:r,calculate:_=!0},e)=>{let v=$_var.getVarValue("mean",e+"_14_12","var")||$_var.setVarValue("mean",e+"_14_12",$_var.na,"var"),s=$_var.getVarValue("dev",e+"_14_13","var")||$_var.setVarValue("dev",e+"_14_13",$_var.na,"var");return _&&($_var.againAssignParse(v,a.avg(e+"_16_16")),v=a.avg(e+"_16_16"),$_var.setVarValue("mean",e+"_14_12",v,"var"),$_var.againAssignParse(s,a.stdev(e+"_17_16")*r),s=a.stdev(e+"_17_16")*r,$_var.setVarValue("dev",e+"_14_13",s,"var")),[v,$_var.add(v,s),$_var.sub(v,s)]},calcBB$1:({srcArray:a,mult:r,calculate:_=!0},e)=>{let v=$_var.getVarValue("mean",e+"_14_21","var")||$_var.setVarValue("mean",e+"_14_21",$_var.na,"var"),s=$_var.getVarValue("dev",e+"_14_22","var")||$_var.setVarValue("dev",e+"_14_22",$_var.na,"var");return _&&($_var.againAssignParse(v,a.avg(e+"_25_16")),v=a.avg(e+"_25_16"),$_var.setVarValue("mean",e+"_14_21",v,"var"),$_var.againAssignParse(s,a.stdev(e+"_26_16")*r),s=a.stdev(e+"_26_16")*r,$_var.setVarValue("dev",e+"_14_22",s,"var")),[v,$_var.add(v,s),$_var.sub(v,s)]},Scanner:$_var.getTypeInstance({enabled:void 0,ticker:void 0,timeframe:void 0},[])};'};class Od{constructor(){Object.defineProperty(this,"_inlayHints",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_editor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_importCompleteLibrary",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_funcs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._inlayHints=new Map,this._importCompleteLibrary=new Map,this._funcs=new Map}get inlayHints(){return[...this._inlayHints.values()]}setEditor(n){this._editor=n}async setInlayHints(n){const{endLine:s,endColumn:o,name:c,libraryId:l,libraryName:m}=n;if(this._importCompleteLibrary.has(l)){const _=this._funcs.get(l);return((_==null?void 0:_.name)!==c||!c&&!this._inlayHints.has(l))&&(this._updateFuncNames(c||m,l),this._inlayHintsHandle(n)),this._importCompleteLibrary.get(l)}return this._importCompleteLibrary.set(l,co),this._inlayHints.set(l,{label:"载入中...",position:{column:o,lineNumber:s},paddingLeft:!0}),this.triggerInlayHints(),this._updateFuncNames(c||m,l),setTimeout(()=>{this._inlayHints.has(l)&&this._inlayHintsHandle(n)},2e3),co}deleteInlayHints(n){this._inlayHints.delete(n)}clearInlayHints(){this._inlayHints.clear()}triggerInlayHints(){this._editor&&this._editor.updateOptions({inlayHints:{fontFamily:String(Date.now())}})}_updateFuncNames(n,s){const o=this._importCompleteLibrary.get(s);if(!o)return;const c=o.functions.map(l=>`${n}.${l.name}`);this._funcs.set(s,{name:n,funcs:c}),this._updateMonarchTokens()}_setNoNameInlayHints(n){const{endLine:s,endColumn:o,libraryId:c,libraryName:l}=n;this._inlayHints.set(c,{label:`as ${l}`,position:{column:o,lineNumber:s},paddingLeft:!0})}_inlayHintsHandle(n){const{name:s,libraryId:o}=n;s?this._inlayHints.delete(o):this._setNoNameInlayHints(n),this.triggerInlayHints()}_updateMonarchTokens(){const n=[...this._funcs.values()].map(c=>c.funcs.join("|")),s=new RegExp("\\b("+n.join("|")+")(?=\\s*\\()"),o=[...Lr.tokenizer.root];o.splice(15,0,[s,"meta.function-call"]),ke.languages.setMonarchTokensProvider(Se,{...Lr,tokenizer:{...Lr.tokenizer,root:o}})}}const Gs=new Od;function Rd(a,n,s){var U;const o={startLineNumber:n.lineNumber,startColumn:1,endLineNumber:n.lineNumber,endColumn:n.column},c=a.getValueInRange(o);if(/^\/\/\s*@/.test(c))return{suggestions:St.annotationSuggestions};if(s.triggerCharacter==="@")return{suggestions:[]};const l=c.match(/([\w.]+)$/)||[];if(!l.length)return{suggestions:[]};const m=(U=l[0])==null?void 0:U.match(/.*[^\w.]+([\w.]+)(?=\.)|([\w.]+)(?=\.)/),_=m?m[1]?m[1]:m[2]?m[2]:void 0:void 0,f=a.getWordUntilPosition(n),b=br.parseCurrentInputFunc(c),h={startLineNumber:n.lineNumber,endLineNumber:n.lineNumber,startColumn:f.startColumn,endColumn:f.endColumn},T=a.getValueInRange({...h,startColumn:f.endColumn,endColumn:f.endColumn+1});St.nextIsBracket=T==="(";let P=po(St.getSuggestions(_)||[],h);if(l[0]==="."&&(P=[]),b&&!_&&!/=\s*\w+$/.test(c)){const F=po(St.getArgSuggestions(b.funcName)||[],h);P=P.concat(F)}return{suggestions:P||[],dispose:()=>{}}}function Fd(a){if(a.kind!==1)return a;const{originInsertText:n}=a;return St.nextIsBracket?a.insertText=n:a.insertText=n+St.bracketsPostfix,a}function Bd(a,n){var o;const s=br.parseLineContentFuncVar(n.column,n.lineNumber,a,n);if(s!=null&&s.libraryId)return{contents:[{value:Dd(s)}]};if((o=s==null?void 0:s.docValue)!=null&&o.length){const c=kd(s.docValue,s.index,s.isBuildIn);if(c)return{contents:[{value:c}]}}return{contents:[]}}function Ud(a,n){var T,P;const s={startLineNumber:n.lineNumber,endLineNumber:n.lineNumber,startColumn:1,endColumn:n.column},o=a.getValueInRange(s),c=a.findMatches(String(Sd),s,!0,!1,null,!0),l=a.findMatches(String(Ed),s,!0,!1,null,!0),m=(T=c.pop())==null?void 0:T.matches,_=(P=l.pop())==null?void 0:P.matches;let f=!1;c.length%2===0?m&&m[0]==='"'&&(f=!0):m&&!m[0]&&(f=!0);let b=!1;l.length%2===0?_&&_[0]==="'"&&(b=!0):_&&!_[0]&&(b=!0);const h=br.parseCurrentInputFuncAndArg(o,b,f);if(h){const{funcName:U,args:F,startIndex:E}=h,j=Ld.getSignatureHelpValues(U,F,E+1,n.lineNumber);if(j)return{value:j,dispose:()=>{}}}return null}function Kd(a){let n=a.findMatches(pn.colorMatchesRegStr,!0,!0,!1,null,!0);return n=n.filter(o=>{const c=a.getValueInRange({...o.range,startColumn:0});return c.indexOf("//")===-1||c.indexOf("//")>o.range.endColumn}),pn.getDocumentColors(n)}function $d(a,n){return pn.getDocumentColorPresentations(a,n)||[]}function jd(a,n){const s=a.getModel(),o=br.parseLineContentFuncVar(n.startColumn+1,n.startLineNumber,s);if(!o||o.isBuildIn||!o.docValue||!o.docValue[0].pos)return o!=null&&o.isBuildIn?o:void 0;const{lineNumber:c,column:l}=o.docValue[0].pos,m={startLineNumber:c,endLineNumber:c,startColumn:l,endColumn:l};a.revealRangeInCenterIfOutsideViewport(m),a.setSelection(m)}function Hd(a,n){return br.parseLineContentFuncVar(n.column,n.lineNumber,a,n)?{uri:a.uri,range:{startLineNumber:n.lineNumber,endLineNumber:n.lineNumber,startColumn:n.column-1,endColumn:n.column-1}}:null}function po(a,n){return a.map(s=>(s.range=n,s))}function Wd(){return{hints:Gs.inlayHints,dispose:()=>{}}}var ms={},us=lp;if(process.env.NODE_ENV==="production")ms.createRoot=us.createRoot,ms.hydrateRoot=us.hydrateRoot;else{var Xs=us.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;ms.createRoot=function(a,n){Xs.usingClientEntryPoint=!0;try{return us.createRoot(a,n)}finally{Xs.usingClientEntryPoint=!1}},ms.hydrateRoot=function(a,n,s){Xs.usingClientEntryPoint=!0;try{return us.hydrateRoot(a,n,s)}finally{Xs.usingClientEntryPoint=!1}}}var Xe;(function(a){a.added="added",a.removed="removed",a.modified="modified"})(Xe||(Xe={}));const Gd=(a,n)=>{const{close:s,retracement:o}=a,[c,l]=R.useState("modified");return R.useImperativeHandle(n,()=>({updateType(m){l(m)}})),L.jsxs("div",{className:`content-popup content-${c}-popup`,children:[L.jsx("div",{className:`triangle-popup triangle-${c}-popup`}),L.jsxs("div",{className:`header-popup header-${c}-popup`,children:[L.jsx("div",{className:"title-popup",children:"Local working changes"}),L.jsx("div",{className:"actions-popup",children:L.jsx("div",{onClick:s,"data-role":"button",className:"button-popup","data-name":"button-close-diff",children:L.jsx("span",{className:"icon-popup",role:"img",children:L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 12",width:"12",height:"12",children:L.jsx("path",{stroke:"currentColor",strokeWidth:"1.2",d:"m1.5 1.5 9 9m0-9-9 9"})})})})})]}),L.jsx("div",{id:"diffEditorContainer",style:{height:"100%"}})]})},Xd=R.forwardRef(Gd);class Vd{constructor(n,s,o=!0){Object.defineProperty(this,"_domNode",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_id",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_top",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_content",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._id=n,this._domNode=document.createElement("div"),this._domNode.style.display="none",this._domNode.style.width=o?"calc(100% - 134px)":"calc(100% - 14px)",this._domNode.style.height="200px",s==null||s.onDidScrollChange(this.scrollChangeHandler.bind(this)),ms.createRoot(this._domNode).render(L.jsx(Xd,{ref:c=>this._content=c,close:()=>this._close(),retracement:this._retracement})),this._top=0}_close(){this._domNode.style.display="none"}_retracement(){}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}show(n,s,o){var c;this._top=s,(c=this._content)==null||c.updateType(o),this._domNode.style.top=`${n}px`,this._domNode.style.display="block"}hide(){this._domNode.style.display="none"}scrollChangeHandler(n){const s=n.scrollTop;this._domNode.style.top=`${this._top-s}px`}}function ir(){}ir.prototype={diff:function(n,s){var o,c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=c.callback;typeof c=="function"&&(l=c,c={}),this.options=c;var m=this;function _(k){return l?(setTimeout(function(){l(void 0,k)},0),!0):k}n=this.castInput(n),s=this.castInput(s),n=this.removeEmpty(this.tokenize(n)),s=this.removeEmpty(this.tokenize(s));var f=s.length,b=n.length,h=1,T=f+b;c.maxEditLength&&(T=Math.min(T,c.maxEditLength));var P=(o=c.timeout)!==null&&o!==void 0?o:1/0,U=Date.now()+P,F=[{oldPos:-1,lastComponent:void 0}],E=this.extractCommon(F[0],s,n,0);if(F[0].oldPos+1>=b&&E+1>=f)return _([{value:this.join(s),count:s.length}]);var j=-1/0,G=1/0;function V(){for(var k=Math.max(j,-h);k<=Math.min(G,h);k+=2){var O=void 0,Y=F[k-1],S=F[k+1];Y&&(F[k-1]=void 0);var W=!1;if(S){var ae=S.oldPos-k;W=S&&0<=ae&&ae<f}var ce=Y&&Y.oldPos+1<b;if(!W&&!ce){F[k]=void 0;continue}if(!ce||W&&Y.oldPos+1<S.oldPos?O=m.addToPath(S,!0,void 0,0):O=m.addToPath(Y,void 0,!0,1),E=m.extractCommon(O,s,n,k),O.oldPos+1>=b&&E+1>=f)return _(Yd(m,O.lastComponent,s,n,m.useLongestToken));F[k]=O,O.oldPos+1>=b&&(G=Math.min(G,k-1)),E+1>=f&&(j=Math.max(j,k+1))}h++}if(l)(function k(){setTimeout(function(){if(h>T||Date.now()>U)return l();V()||k()},0)})();else for(;h<=T&&Date.now()<=U;){var B=V();if(B)return B}},addToPath:function(n,s,o,c){var l=n.lastComponent;return l&&l.added===s&&l.removed===o?{oldPos:n.oldPos+c,lastComponent:{count:l.count+1,added:s,removed:o,previousComponent:l.previousComponent}}:{oldPos:n.oldPos+c,lastComponent:{count:1,added:s,removed:o,previousComponent:l}}},extractCommon:function(n,s,o,c){for(var l=s.length,m=o.length,_=n.oldPos,f=_-c,b=0;f+1<l&&_+1<m&&this.equals(s[f+1],o[_+1]);)f++,_++,b++;return b&&(n.lastComponent={count:b,previousComponent:n.lastComponent}),n.oldPos=_,f},equals:function(n,s){return this.options.comparator?this.options.comparator(n,s):n===s||this.options.ignoreCase&&n.toLowerCase()===s.toLowerCase()},removeEmpty:function(n){for(var s=[],o=0;o<n.length;o++)n[o]&&s.push(n[o]);return s},castInput:function(n){return n},tokenize:function(n){return n.split("")},join:function(n){return n.join("")}};function Yd(a,n,s,o,c){for(var l=[],m;n;)l.push(n),m=n.previousComponent,delete n.previousComponent,n=m;l.reverse();for(var _=0,f=l.length,b=0,h=0;_<f;_++){var T=l[_];if(T.removed){if(T.value=a.join(o.slice(h,h+T.count)),h+=T.count,_&&l[_-1].added){var U=l[_-1];l[_-1]=l[_],l[_]=U}}else{if(!T.added&&c){var P=s.slice(b,b+T.count);P=P.map(function(E,j){var G=o[h+j];return G.length>E.length?G:E}),T.value=a.join(P)}else T.value=a.join(s.slice(b,b+T.count));b+=T.count,T.added||(h+=T.count)}}var F=l[f-1];return f>1&&typeof F.value=="string"&&(F.added||F.removed)&&a.equals("",F.value)&&(l[f-2].value+=F.value,l.pop()),l}var mo=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,uo=/\S/,yo=new ir;yo.equals=function(a,n){return this.options.ignoreCase&&(a=a.toLowerCase(),n=n.toLowerCase()),a===n||this.options.ignoreWhitespace&&!uo.test(a)&&!uo.test(n)},yo.tokenize=function(a){for(var n=a.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),s=0;s<n.length-1;s++)!n[s+1]&&n[s+2]&&mo.test(n[s])&&mo.test(n[s+2])&&(n[s]+=n[s+2],n.splice(s+1,2),s--);return n};var dn=new ir;dn.tokenize=function(a){this.options.stripTrailingCr&&(a=a.replace(/\r\n/g,`
140
- `));var n=[],s=a.split(/(\n|\r\n)/);s[s.length-1]||s.pop();for(var o=0;o<s.length;o++){var c=s[o];o%2&&!this.options.newlineIsToken?n[n.length-1]+=c:(this.options.ignoreWhitespace&&(c=c.trim()),n.push(c))}return n};function Qd(a,n,s){return dn.diff(a,n,s)}var Zd=new ir;Zd.tokenize=function(a){return a.split(/(\S.+?[.!?])(?=\s+|$)/)};var Jd=new ir;Jd.tokenize=function(a){return a.split(/([{}:;,]|\s+)/)};function Vs(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Vs=function(n){return typeof n}:Vs=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Vs(a)}var em=Object.prototype.toString,ys=new ir;ys.useLongestToken=!0,ys.tokenize=dn.tokenize,ys.castInput=function(a){var n=this.options,s=n.undefinedReplacement,o=n.stringifyReplacer,c=o===void 0?function(l,m){return typeof m>"u"?s:m}:o;return typeof a=="string"?a:JSON.stringify(mn(a,null,null,c),c," ")},ys.equals=function(a,n){return ir.prototype.equals.call(ys,a.replace(/,([\r\n])/g,"$1"),n.replace(/,([\r\n])/g,"$1"))};function mn(a,n,s,o,c){n=n||[],s=s||[],o&&(a=o(c,a));var l;for(l=0;l<n.length;l+=1)if(n[l]===a)return s[l];var m;if(em.call(a)==="[object Array]"){for(n.push(a),m=new Array(a.length),s.push(m),l=0;l<a.length;l+=1)m[l]=mn(a[l],n,s,o,c);return n.pop(),s.pop(),m}if(a&&a.toJSON&&(a=a.toJSON()),Vs(a)==="object"&&a!==null){n.push(a),m={},s.push(m);var _=[],f;for(f in a)a.hasOwnProperty(f)&&_.push(f);for(_.sort(),l=0;l<_.length;l+=1)f=_[l],m[f]=mn(a[f],n,s,o,f);n.pop(),s.pop()}else m=a;return m}var un=new ir;un.tokenize=function(a){return a.slice()},un.join=un.removeEmpty=function(a){return a};class tm{constructor(n,s,o=""){Object.defineProperty(this,"_editor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_monaco",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_originalModel",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_oldDecorations",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_diffEditor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_diffPopupWidget",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_didChangeListener",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_onMouseDownListener",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._editor=n,this._monaco=s,this._originalModel=this._monaco.editor.createModel(o,Se),this._oldDecorations=[],this._init(),this._eventListening()}_init(){var n;this._changeEvent(),this._didChangeListener=(n=this._editor.getModel())==null?void 0:n.onDidChangeContent(()=>this._changeEvent())}update(n){var s,o;if(this._originalModel=this._monaco.editor.createModel(n,Se),n!==((s=this._editor.getModel())==null?void 0:s.getValue())){this._changeEvent();return}(o=this._editor.getModel())==null||o.deltaDecorations(this._oldDecorations,[]),this._oldDecorations=[]}dispose(){var n,s,o,c;this._diffPopupWidget&&(this._diffPopupWidget.hide(),this._editor.removeOverlayWidget(this._diffPopupWidget)),(n=this._didChangeListener)==null||n.dispose(),(s=this._onMouseDownListener)==null||s.dispose(),(o=this._editor.getModel())==null||o.deltaDecorations(this._oldDecorations,[]),this._oldDecorations=[],(c=this._diffEditor)==null||c.dispose(),this._diffEditor=void 0}_changesHandle(n){let s=0,o;const c=[];let l=0;for(const m of n){const{added:_,removed:f,count:b=1,value:h}=m;_?o&&o.removed?(s=this._changeHandle(c,s,l,b,Xe.modified),l=0,o=void 0):(o&&o.added&&(s=this._changeHandle(c,s,l,o.count||1,Xe.added),l=0),o=m):f?o&&o.added?(s=this._changeHandle(c,s,l,o.count||1,Xe.modified),l=0,o=void 0):(o&&o.removed&&this._addDecorationList(c,s,Xe.removed),o=m):/^\n+$/.test(h)?o&&(o.added||o.removed)?l=b:s+=b:(o&&o.added?(s=this._changeHandle(c,s,l,o.count||1,Xe.added),l=0,o=void 0):o&&o.removed&&(this._addDecorationList(c,s,Xe.removed),o=void 0),s+=b)}return o&&o.added?s=this._changeHandle(c,s,l,o.count||1,Xe.added):o&&o.removed&&this._addDecorationList(c,s,Xe.removed),c}_changeHandle(n,s,o,c,l){for(let m=1;m<=c;m++)this._addDecorationList(n,s+m,l);return s+=c+o,s}_addDecorationList(n,s,o){n.push({range:new this._monaco.Range(s,1,s,1),options:{isWholeLine:!0,linesDecorationsClassName:`line-${o} line-decoration_${o}`}})}_changeEvent(){var c,l;const n=Qd(this._originalModel.getValue(),((c=this._editor.getModel())==null?void 0:c.getValue())||""),s=this._changesHandle(n),o=((l=this._editor.getModel())==null?void 0:l.deltaDecorations(this._oldDecorations,s))||[];this._oldDecorations=o}_eventListening(){const n=new Vd("diff.popup.widget",this._editor);this._editor.addOverlayWidget(n),this._onMouseDownListener=this._editor.onMouseDown(s=>this._onMouseDownHandle(s)),this._diffPopupWidget=n}_onMouseDownHandle(n){var m,_,f,b,h,T;const s=(m=n.target.element)==null?void 0:m.classList,o=s==null?void 0:s.contains(`line-${Xe.added}`),c=s==null?void 0:s.contains(`line-${Xe.modified}`),l=s==null?void 0:s.contains(`line-${Xe.removed}`);if(o||c||l){const P=((f=(_=n==null?void 0:n.target)==null?void 0:_.position)==null?void 0:f.lineNumber)||0,U=((b=this._editor)==null?void 0:b.getTopForLineNumber(P+1))||0,F=((h=this._editor)==null?void 0:h.getScrollTop())||0,E=o?Xe.added:c?Xe.modified:Xe.removed;(T=this._diffPopupWidget)==null||T.show(U-F,U,E),this._diffEditor||(this._diffEditor=this._createDiffEditor()),this._diffEditor.setModel({original:this._originalModel,modified:this._editor.getModel()}),this._diffEditor.revealLineInCenter(P+1)}}_createDiffEditor(){return this._monaco.editor.createDiffEditor(document.getElementById("diffEditorContainer"),{renderSideBySide:!1,quickSuggestions:!1,suggestOnTriggerCharacters:!1,hover:{enabled:!1},parameterHints:{enabled:!1}})}}class rm{constructor(n,s,o){Object.defineProperty(this,"_editor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_monaco",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_decorations",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_changPositionListener",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_originalScript",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_onActionTrigger",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_onLinkOpen",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_registerList",{enumerable:!0,configurable:!0,writable:!0,value:[]}),this._editor=n,this._monaco=s,this._onActionTrigger=o,this._init()}addLinkOpenFunc(n){this._onLinkOpen=n}updateActionTrigger(n){this._onActionTrigger=n}setModelMarkers(n){this._monaco.editor.setModelMarkers(this._editor.getModel(),"owner",n)}addDiffDecorations(){this._decorations||(this._decorations=new tm(this._editor,this._monaco,this._originalScript))}removeDiffDecorations(){var n;(n=this._decorations)==null||n.dispose(),this._decorations=void 0}setValue(n){this._editor.setValue(n),this._editor.setScrollTop(0),this.focus()}setPosition(n){var s,o;(s=this._editor)==null||s.setPosition(n),(o=this._editor)==null||o.revealPositionInCenter(n),this.focus()}focus(){var n;(n=this._editor)==null||n.focus()}setOriginalScript(n){var s;this._originalScript=n,(s=this._decorations)==null||s.update(n)}getEditorLayout(){var o;const n=this._editor.getContentHeight(),s=(o=this._editor.getModel())==null?void 0:o.getLineCount();return{contentHeight:n,lineCount:s}}setEditorLayout(n,s){var o,c;(c=this._editor)==null||c.layout({height:n,width:s||((o=this._editor)==null?void 0:o.getContainerDomNode().clientWidth)})}_init(){this._register(),this._setOptions(),this._addCommands(),this._addActions(),this._setCursorPosition(),this._onTabSizeChange()}_onTabSizeChange(){const n=this._editor.getModel();n==null||n.onDidChangeOptions(s=>{if(s.tabSize&&!s.indentSize){const o=(n==null?void 0:n.getOptions().tabSize)||4;n==null||n.updateOptions({indentSize:o})}})}_setCursorPosition(){const n=localStorage.getItem(nn);this._editor.setPosition(n?JSON.parse(n):{lineNumber:1,column:1}),this._editor.focus()}_register(){this._monaco.languages.register({id:Se});const n=this._monaco.languages.registerCompletionItemProvider(Se,{triggerCharacters:[".","@"],provideCompletionItems:Rd,resolveCompletionItem:Fd});this._registerList.push(n);const s=this._monaco.languages.registerHoverProvider(Se,{provideHover:Bd});this._registerList.push(s);const o=this._monaco.languages.registerSignatureHelpProvider(Se,{signatureHelpTriggerCharacters:["(",","],provideSignatureHelp:Ud});this._registerList.push(o);const c=this._monaco.languages.registerColorProvider(Se,{provideColorPresentations:$d,provideDocumentColors:Kd});this._registerList.push(c);const l=this._monaco.editor.registerEditorOpener({openCodeEditor:(b,h,T)=>{const P=jd(b,T);if(P){const{index:U,docValue:F}=P,{title:E,name:j}=F[U];let G="";switch(E){case be.keywords:G="kw";break;case be.functions:G="fun";break;case be.variables:G="var";break;case be.types:G="type";break;case be.constants:G="const";break}this._onLinkOpen&&this._onLinkOpen(`${G}_${j}`,U)}return!0}});this._registerList.push(l);const m=this._monaco.editor.registerLinkOpener({open:b=>(this._onLinkOpen&&b.fragment&&this._onLinkOpen(b.fragment),!!b.fragment)});this._registerList.push(m);const _=this._monaco.languages.registerDefinitionProvider(Se,{provideDefinition:Hd});this._registerList.push(_);const f=this._monaco.languages.registerInlayHintsProvider(Se,{provideInlayHints:Wd});this._registerList.push(f)}_setOptions(){this._monaco.editor.defineTheme("vs-dark",cn),this._monaco.editor.defineTheme("vs",ln),this._monaco.languages.setMonarchTokensProvider(Se,Lr),this._monaco.languages.setLanguageConfiguration(Se,on)}_addCommands(){this._monaco.editor.addCommand({id:"tcc.editor.function",run:(n,s)=>{var o;if(St.nextIsBracket){const c=this._editor.getPosition();c&&this._editor.setPosition(Object.assign(c,{column:c.column+1}))}(o=this._editor.getAction(s))==null||o.run()}})}_addActions(){this._editor.addAction({id:"tcc-save-script",label:"保存脚本",keybindings:[this._monaco.KeyMod.CtrlCmd|this._monaco.KeyCode.KeyS],contextMenuGroupId:"9_modification",contextMenuOrder:1,run:()=>{this._onActionTrigger&&this._onActionTrigger(A.Actions.Save)}}),this._editor.addAction({id:"tcc-find-replace-line",label:"寻找/替换",keybindings:[this._monaco.KeyMod.CtrlCmd|this._monaco.KeyCode.KeyF],contextMenuGroupId:"9_cutcopypaste",contextMenuOrder:5,run:()=>{this.openFind(),this._onActionTrigger&&this._onActionTrigger(A.Actions.Find)}}),this._editor.addAction({id:"tcc-trigger-console-script",label:"切换控制台",keybindings:[this._monaco.KeyMod.CtrlCmd|this._monaco.KeyCode.Backquote],contextMenuGroupId:"z_commands",contextMenuOrder:0,run:()=>{this._onActionTrigger&&this._onActionTrigger(A.Actions.TriggerConsole)}}),this._editor.addAction({id:"tcc-run-script",label:"运行脚本",keybindings:[this._monaco.KeyMod.CtrlCmd|this._monaco.KeyCode.Enter],run:()=>{this._onActionTrigger&&this._onActionTrigger(A.Actions.RunScript)}}),this._editor.addAction({id:"tcc-open-script",label:"打开脚本",keybindings:[this._monaco.KeyMod.CtrlCmd|this._monaco.KeyCode.KeyO],contextMenuGroupId:"9_modification",contextMenuOrder:2,run:()=>{this._onActionTrigger&&this._onActionTrigger(A.Actions.Open)}}),this._editor.addAction({id:"tcc-new-window-script",label:"在新窗口中打开",keybindings:[this._monaco.KeyMod.Shift|this._monaco.KeyMod.Alt|this._monaco.KeyCode.KeyW],contextMenuGroupId:"9_modification",contextMenuOrder:3,run:()=>{this._onActionTrigger&&this._onActionTrigger(A.Actions.NewWindow)}}),this._editor.addAction({id:"tcc-new-tab-script",label:"在新标签页中打开",keybindings:[this._monaco.KeyMod.Shift|this._monaco.KeyMod.Alt|this._monaco.KeyCode.KeyT],contextMenuGroupId:"9_modification",contextMenuOrder:4,run:()=>{this._onActionTrigger&&this._onActionTrigger(A.Actions.NewTab)}})}openFind(){this.focus(),this._editor.trigger("click","actions.find",null)}gotoLine(){this.focus(),this._editor.trigger("click","editor.action.gotoLine",null)}onChangeCursorPosition(n){this._changPositionListener&&this._changPositionListener.dispose();const s=localStorage.getItem(nn);n&&n(s?JSON.parse(s):{lineNumber:1,column:1}),this._changPositionListener=this._editor.onDidChangeCursorPosition(o=>{localStorage.setItem(nn,JSON.stringify(o.position)),n&&n(o.position)})}dispose(){var n;for(const s of this._registerList)s.dispose();(n=this._editor)==null||n.dispose()}}/**
139
+ ${this._formatter.code("Space")}`;return o.push(this._formatter.lineBreak),o.push(this._formatter.italic(`${c} ${ge.toTriggerParameterHints}`)),{value:this._formatter.paragraph(...o)}}}const Ld=new Nd(window.navigator.userAgent);class Md{constructor(){Object.defineProperty(this,"_colors",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_count",{enumerable:!0,configurable:!0,writable:!0,value:0}),this._colors=oo}getDocumentColors(n){this._count++;const s=[];return n.forEach(o=>{const{range:c}=o;let{matches:l}=o;l=l||[];const m=l[0]||"";let y=null;this._isHexToken(m)?y=this._hexToColor(m):this._isRgbColor(m)?y=this._rgbToColor(m):this._colors[m]?y=this._hexToColor(this._colors[m]):this._isColorExpression(m)&&l[1]&&l[6]&&(y=this._extractNewExpression(l[1],Number(l[6]))),y&&s.push({color:y,range:c})}),s}get _defultColorsRegStr(){return Object.keys(oo).reduce((n,s)=>`${n}|${s}`,"")}get colorMatchesRegStr(){const n=`#[0-9a-fA-F]{6,8}|(\\b(color.rgb\\s*\\((\\s*\\d+\\s*,\\s*){2}(\\s*\\d+\\s*,{0,1}){1,2}\\s*\\)${this._defultColorsRegStr}))`;return`color.new\\s*\\(\\s*(${n})\\s*,\\s*(\\d+)\\s*\\)|${n}`}getDocumentColorPresentations(n,{color:s,range:o}){const c=n.getValueInRange(o);if(this._isHexToken(c)||this._colors[c])return[{label:this._colorRgbRepresentation(s)},{label:this._colorHexRepresentation(s)}];if(this._isColorExpression(c)||this._isRgbColor(c)){const l=this._isColorExpression(c)?this._colorNewRepresentation(s):this._colorRgbRepresentation(s);if(!l)return[];const m=this._colorHexRepresentation(s);return[{label:l,textEdit:{text:l,range:o}},{label:m,textEdit:{text:m,range:o}}]}return null}_hexFromNumber(n){const s=this._denormalize(n).toString(16);return s.length===1?`0${s}`:s}_normalize(n){return n/255}_denormalize(n){return Math.round(255*n)}_normalizeAlpha(n){return(100-n)/100}_denormalizeAlpha(n){return 100-Math.round(100*n)}_extractNewExpression(n,s){let o=null;return this._isHexToken(n)?o=this._hexToColor(n):this._isRgbColor(n)?o=this._rgbToColor(n):this._colors[n]&&(o=this._hexToColor(this._colors[n])),o&&!Number.isNaN(s)?{...o,alpha:this._normalizeAlpha(s)}:null}_colorHexRepresentation(n){const s=this._hexFromNumber(n.red),o=this._hexFromNumber(n.green),c=this._hexFromNumber(n.blue),l=this._hexFromNumber(n.alpha);return`#${s}${o}${c}${n.alpha===1?"":l}`}_colorRgbRepresentation(n){const s=this._denormalize(n.red),o=this._denormalize(n.green),c=this._denormalize(n.blue),l=this._denormalizeAlpha(n.alpha),m=[s,o,c];return l>0&&m.push(l),`color.rgb(${m.join(", ")})`}_colorNewRepresentation(n){const s={...n,alpha:1};return`color.new(${this._colorHexRepresentation(s)}, ${this._denormalizeAlpha(n.alpha)})`}_hexToColor(n){const s=(n=this._isHexToken(n)?n.slice(1):n).length===3||n.length===4,o=s?`${n.slice(0,1)}${n.slice(0,1)}`:n.slice(0,2),c=s?`${n.slice(1,2)}${n.slice(1,2)}`:n.slice(2,4),l=s?`${n.slice(2,3)}${n.slice(2,3)}`:n.slice(4,6),m=(s?`${n.slice(3,4)}${n.slice(3,4)}`:n.slice(6,8))||"ff";return{red:this._normalize(parseInt(o,16)),green:this._normalize(parseInt(c,16)),blue:this._normalize(parseInt(l,16)),alpha:this._normalize(parseInt(m,16))}}_rgbToColor(n){const s=n.replace(/[^\d,]/g,"").split(","),o=this._normalize(Number(s[0])),c=this._normalize(Number(s[1])),l=this._normalize(Number(s[2])),m=this._normalizeAlpha(Number(s[3]))||1;return isNaN(o)||isNaN(c)||isNaN(l)?null:{red:o,green:c,blue:l,alpha:m}}_isHexToken(n){return n.charAt(0)==="#"}_isRgbColor(n){return n.startsWith("color.rgb")}_isColorExpression(n){return n.startsWith("color.new")}}const pn=new Md;A.VType=void 0,function(a){a.BOOL="bool",a.INT="int",a.FLOAT="float",a.ARRAY="array",a.BOX="box",a.CHART_POINT="chart.point",a.COLOR="color",a.CONST="const",a.LABEL="label",a.LINE="line",a.LINEFILL="linefill",a.MAP="map",a.MATRIX="matrix",a.POLYLINE="polyline",a.SERIES="series",a.SIMPLE="simple",a.STRING="string",a.TABLE="table",a.UNDETERMINED="undetermined type",a.INPUT="input",a.NA="na",a.VOID="void",a.ENUM="enum"}(A.VType||(A.VType={})),A.VRuleType=void 0,function(a){a.FlowStmt="FlowStmt",a.DeclareAssign="DeclareAssign",a.VarBlockStmt="VarBlockStmt",a.VarSingle="VarSingle",a.VarMultiple="VarMultiple",a.ParenthesizedExpression="ParenthesizedExpression",a.AdditiveExpression="AdditiveExpression",a.RelationalExpression="RelationalExpression",a.EqualityExpression="EqualityExpression",a.TernaryExpression="TernaryExpression",a.UnaryExpression="UnaryExpression",a.NotExpression="NotExpression",a.MemberIndexExpression="MemberIndexExpression",a.MethodExpression="MethodExpression",a.LogicalAndExpression="LogicalAndExpression",a.LogicalOrExpression="LogicalOrExpression",a.MultiplicativeExpression="MultiplicativeExpression",a.Brackethesized="Brackethesized",a.IfStatement="IfStatement",a.ForToStatement="ForToStatement",a.ForInStatement="ForInStatement",a.SwitchStatement="SwitchStatement",a.CaseClause="CaseClause",a.DefaultCaluse="DefaultCaluse",a.WhileStatement="WhileStatement",a.ImportElement="ImportElement",a.Literal="Literal",a.ArrowFunction="ArrowFunction",a.ArrowMethod="ArrowMethod",a.TypeStatement="TypeStatement",a.Name="Name",a.AgainAssign="AgainAssign",a.EnumStatement="EnumStatement"}(A.VRuleType||(A.VRuleType={})),A.VAdjustment=void 0,function(a){a.dividends="dividends",a.none="none",a.splits="splits"}(A.VAdjustment||(A.VAdjustment={})),A.VAlert=void 0,function(a){a.freqAll="freq_all",a.freqOncePerBar="freq_once_per_bar",a.freqOncePerBarClose="freq_once_per_bar_close"}(A.VAlert||(A.VAlert={})),A.VBarmergeGaps=void 0,function(a){a.gapsOff="gaps_off",a.gapsOn="gaps_on",a.lookaheadOff="lookahead_off",a.lookaheadOn="lookahead_on"}(A.VBarmergeGaps||(A.VBarmergeGaps={})),A.VPlotDisplay=void 0,function(a){a.all="all",a.dataWindow="data_window",a.none="none",a.pane="pane",a.priceScale="price_scale",a.statusLine="status_line"}(A.VPlotDisplay||(A.VPlotDisplay={})),A.VExtend=void 0,function(a){a.both="both",a.left="left",a.none="none",a.right="right"}(A.VExtend||(A.VExtend={})),A.VFormatType=void 0,function(a){a.inherit="inherit",a.mintick="mintick",a.percent="percent",a.price="price",a.volume="volume"}(A.VFormatType||(A.VFormatType={})),A.VHlineStyle=void 0,function(a){a.styleDashed="style_dashed",a.styleDotted="style_dotted",a.styleSolid="style_solid"}(A.VHlineStyle||(A.VHlineStyle={})),A.VLabelStyle=void 0,function(a){a.styleArrowdown="style_arrowdown",a.styleArrowup="style_arrowup",a.styleCircle="style_circle",a.styleCross="style_cross",a.styleDiamond="style_diamond",a.styleFlag="style_flag",a.styleLabelCenter="style_label_center",a.styleLabelDown="style_label_down",a.styleLabelLeft="style_label_left",a.styleLabelLowerLeft="style_label_lower_left",a.styleLabelLowerRight="style_label_lower_right",a.styleLabelRight="style_label_right",a.styleLabelUp="style_label_up",a.styleLabelUpperLeft="style_label_upper_left",a.styleLabelUpperRight="style_label_upper_right",a.styleNone="style_none",a.styleSquare="style_square",a.styleTextOutline="style_text_outline",a.styleTriangledown="style_triangledown",a.styleTriangleup="style_triangleup",a.styleXcross="style_xcross"}(A.VLabelStyle||(A.VLabelStyle={})),A.VLineStyle=void 0,function(a){a.styleArrowBoth="style_arrow_both",a.styleArrowLeft="style_arrow_left",a.styleArrowRight="style_arrow_right",a.styleDashed="style_dashed",a.styleDotted="style_dotted",a.styleSolid="style_solid"}(A.VLineStyle||(A.VLineStyle={})),A.VLocation=void 0,function(a){a.abovebar="abovebar",a.absolute="absolute",a.belowbar="belowbar",a.bottom="bottom",a.top="top"}(A.VLocation||(A.VLocation={})),A.VSortOrder=void 0,function(a){a.ascending="ascending",a.descending="descending"}(A.VSortOrder||(A.VSortOrder={})),A.VPlotStyle=void 0,function(a){a.styleArea="Area",a.styleAreabr="Area With Breaks",a.styleCircles="Circles",a.styleColumns="Columns",a.styleCross="Cross",a.styleHistogram="Histogram",a.styleLine="Line",a.styleLinebr="Line With Breaks",a.styleStepline="Step Line",a.styleSteplineDiamond="Step Line With Diamonds",a.styleSteplinebr="Step line with Breaks"}(A.VPlotStyle||(A.VPlotStyle={})),A.VPosition=void 0,function(a){a.bottomCenter="bottom_center",a.bottomLeft="bottom_left",a.bottomRight="bottom_right",a.middleCenter="middle_center",a.middleLeft="middle_left",a.middleRight="middle_right",a.topCenter="top_center",a.topLeft="top_left",a.topRight="top_right"}(A.VPosition||(A.VPosition={})),A.VScale=void 0,function(a){a.left="left",a.none="none",a.right="right"}(A.VScale||(A.VScale={})),A.VSession=void 0,function(a){a.extended="extended",a.regular="regular"}(A.VSession||(A.VSession={})),A.VShape=void 0,function(a){a.arrowdown="arrowdown",a.arrowup="arrowup",a.circle="circle",a.cross="cross",a.diamond="diamond",a.flag="flag",a.labeldown="labeldown",a.labelup="labelup",a.square="square",a.triangledown="triangledown",a.triangleup="triangleup",a.xcross="xcross"}(A.VShape||(A.VShape={})),A.VSize=void 0,function(a){a.auto="auto",a.huge="huge",a.large="large",a.normal="normal",a.small="small",a.tiny="tiny"}(A.VSize||(A.VSize={})),A.VFont=void 0,function(a){a.familyDefault="default",a.familyMonospace="monospace"}(A.VFont||(A.VFont={})),A.VStrategy=void 0,function(a){a.cash="cash",a.fixed="fixed",a.percentOfEquity="percent_of_equity"}(A.VStrategy||(A.VStrategy={})),A.VCommission=void 0,function(a){a.cashPerContract="cash_per_contract",a.cashPerOrder="cash_per_order",a.percent="percent"}(A.VCommission||(A.VCommission={})),A.VDirection=void 0,function(a){a.all="all",a.long="long",a.short="short"}(A.VDirection||(A.VDirection={})),A.VOca=void 0,function(a){a.cancel="cancel",a.none="none",a.reduce="reduce"}(A.VOca||(A.VOca={})),A.VText=void 0,function(a){a.alignBottom="align_bottom",a.alignCenter="align_center",a.alignLeft="align_left",a.alignRight="align_right",a.alignTop="align_top",a.wrapAuto="wrap_auto",a.wrapNone="wrap_none"}(A.VText||(A.VText={})),A.VXloc=void 0,function(a){a.bar_index="bar_index",a.bar_time="bar_time"}(A.VXloc||(A.VXloc={})),A.VYloc=void 0,function(a){a.abovebar="abovebar",a.belowbar="belowbar",a.price="price"}(A.VYloc||(A.VYloc={})),A.VEarnings=void 0,function(a){a.actual="actual",a.estimate="estimate",a.standardized="standardized"}(A.VEarnings||(A.VEarnings={})),A.VPivotType=void 0,function(a){a.traditional="Traditional",a.fibonacci="Fibonacci",a.woodie="Woodie",a.classic="Classic",a.dm="DM",a.camarilla="Camarilla"}(A.VPivotType||(A.VPivotType={})),A.VInputType=void 0,function(a){a.INT="int",a.BOOL="bool",a.TIME="time",a.COLOR="color",a.FLOAT="float",a.PRICE="price",a.SOURCE="source",a.STRING="string",a.SYMBOL="symbol",a.SESSION="session",a.TEXT_AREA="text_area",a.TIMEFRAME="timeframe",a.ENUM="enum"}(A.VInputType||(A.VInputType={}));var lo;(function(a){a.description="description",a.field="field",a.function="function",a.param="param",a.returns="returns",a.type="type",a.variable="variable",a.enum="enum"})(lo||(lo={})),A.VScriptType=void 0,function(a){a.library="library",a.indicator="indicator",a.strategy="strategy"}(A.VScriptType||(A.VScriptType={})),A.VType.SERIES,A.VType.SIMPLE,A.VType.INPUT,A.VType.CONST,A.VType.INT,A.VType.FLOAT,A.VType.BOOL,A.VType.COLOR,A.VType.STRING;const Pd={domReadOnly:!0,scrollBeyondLastLine:!1,readOnly:!0,minimap:{enabled:!1},scrollbar:{vertical:"hidden",horizontal:"hidden",alwaysConsumeMouseWheel:!1},contextmenu:!1},co={functions:[{name:"calcBB",desc:["Computes Bollinger Band values from an array of data."],args:[{name:"srcArray",desc:"(array<float>) The array where the queue is maintained.",required:!0,allowedTypeIDs:["float[]","int[]"],displayType:"float[]"},{name:"mult",required:!0,allowedTypeIDs:["series int","series float","simple int","simple float","input int","input float","const int","const float"],displayType:"series float"},{name:"calculate",required:!1,allowedTypeIDs:["series bool","simple bool","input bool","const bool"],displayType:"series bool"}],syntax:["calcBB(float[] srcArray, series float mult, series bool calculate) → [series float, series float, series float]"],hasMemberIndex:!1,pos:{lineNumber:10,column:14},isUser:!0,returnedTypes:["[series float, series float, series float]"],returns:["A tuple containing the basis, upper band, and lower band respectively."]},{name:"calcBB",args:[{name:"srcArray",required:!0,allowedTypeIDs:["float[]","int[]"],displayType:"float[]"},{name:"mult",required:!0,allowedTypeIDs:["series int","simple int","input int","const int"],displayType:"series int"},{name:"calculate",required:!1,allowedTypeIDs:["series bool","simple bool","input bool","const bool"],displayType:"series bool"}],syntax:["calcBB(float[] srcArray, series int mult, series bool calculate) → [series float, series float, series float]"],hasMemberIndex:!1,pos:{lineNumber:19,column:14},isUser:!0,returnedTypes:["[series float, series float, series float]"],index:1},{name:"Scanner.new",args:[{name:"enabled",required:!1,allowedTypeIDs:["series bool","simple bool","input bool","const bool"],displayType:"series bool"},{name:"ticker",required:!1,allowedTypeIDs:["series string","simple string","input string","const string"],displayType:"series string"},{name:"timeframe",required:!1,allowedTypeIDs:["series string","simple string","input string","const string"],displayType:"series string"}],returnedTypes:["Scanner"],pos:{lineNumber:30,column:12},syntax:["Scanner.new(series bool enabled, series string ticker, series string timeframe) → Scanner"]},{name:"Scanner.copy",args:[{name:"object",required:!0,allowedTypeIDs:["Scanner"],displayType:"Scanner"}],returnedTypes:["Scanner"],pos:{lineNumber:30,column:12},info:"The identifier of the object to be copied.",syntax:["Scanner.copy(Scanner object) → Scanner"]}],methods:[{name:"calcBB",args:[{name:"mult",required:!0,allowedTypeIDs:["series int","series float","simple int","simple float","input int","input float","const int","const float"],displayType:"series float"},{name:"calculate",required:!1,allowedTypeIDs:["series bool","simple bool","input bool","const bool"],displayType:"series bool"}],desc:["Computes Bollinger Band values from an array of data."],originalName:"array.calcBB",syntax:["calcBB(series float mult, series bool calculate) → [series float, series float, series float]"],returnedTypes:["[series float, series float, series float]"],hasMemberIndex:!1,pos:{lineNumber:10,column:14},thisType:["float[]"],returns:["A tuple containing the basis, upper band, and lower band respectively."]},{name:"calcBB",args:[{name:"mult",required:!0,allowedTypeIDs:["series int","simple int","input int","const int"],displayType:"series int"},{name:"calculate",required:!1,allowedTypeIDs:["series bool","simple bool","input bool","const bool"],displayType:"series bool"}],originalName:"array.calcBB",syntax:["calcBB(series int mult, series bool calculate) → [series float, series float, series float]"],returnedTypes:["[series float, series float, series float]"],hasMemberIndex:!1,pos:{lineNumber:19,column:14},thisType:["float[]"],index:1},{name:"Scanner.copy",args:[],returnedTypes:["Scanner"],thisType:["Scanner"],pos:{lineNumber:30,column:12},syntax:["Scanner.copy() → Scanner"]}],types:[{fields:[{name:"enabled",type:"series bool"},{name:"ticker",type:"series string"},{name:"timeframe",type:"series string"}],name:"Scanner",pos:{lineNumber:30,column:12}}],description:"Provides a tool to quickly output a label on the chart.",codeStr:'const $name={calcBB:({srcArray:a,mult:r,calculate:_=!0},e)=>{let v=$_var.getVarValue("mean",e+"_14_12","var")||$_var.setVarValue("mean",e+"_14_12",$_var.na,"var"),s=$_var.getVarValue("dev",e+"_14_13","var")||$_var.setVarValue("dev",e+"_14_13",$_var.na,"var");return _&&($_var.againAssignParse(v,a.avg(e+"_16_16")),v=a.avg(e+"_16_16"),$_var.setVarValue("mean",e+"_14_12",v,"var"),$_var.againAssignParse(s,a.stdev(e+"_17_16")*r),s=a.stdev(e+"_17_16")*r,$_var.setVarValue("dev",e+"_14_13",s,"var")),[v,$_var.add(v,s),$_var.sub(v,s)]},calcBB$1:({srcArray:a,mult:r,calculate:_=!0},e)=>{let v=$_var.getVarValue("mean",e+"_14_21","var")||$_var.setVarValue("mean",e+"_14_21",$_var.na,"var"),s=$_var.getVarValue("dev",e+"_14_22","var")||$_var.setVarValue("dev",e+"_14_22",$_var.na,"var");return _&&($_var.againAssignParse(v,a.avg(e+"_25_16")),v=a.avg(e+"_25_16"),$_var.setVarValue("mean",e+"_14_21",v,"var"),$_var.againAssignParse(s,a.stdev(e+"_26_16")*r),s=a.stdev(e+"_26_16")*r,$_var.setVarValue("dev",e+"_14_22",s,"var")),[v,$_var.add(v,s),$_var.sub(v,s)]},Scanner:$_var.getTypeInstance({enabled:void 0,ticker:void 0,timeframe:void 0},[])};'};class Od{constructor(){Object.defineProperty(this,"_inlayHints",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_editor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_importCompleteLibrary",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_funcs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._inlayHints=new Map,this._importCompleteLibrary=new Map,this._funcs=new Map}get inlayHints(){return[...this._inlayHints.values()]}setEditor(n){this._editor=n}async setInlayHints(n){const{endLine:s,endColumn:o,name:c,libraryId:l,libraryName:m}=n;if(this._importCompleteLibrary.has(l)){const y=this._funcs.get(l);return((y==null?void 0:y.name)!==c||!c&&!this._inlayHints.has(l))&&(this._updateFuncNames(c||m,l),this._inlayHintsHandle(n)),this._importCompleteLibrary.get(l)}return this._importCompleteLibrary.set(l,co),this._inlayHints.set(l,{label:"载入中...",position:{column:o,lineNumber:s},paddingLeft:!0}),this.triggerInlayHints(),this._updateFuncNames(c||m,l),setTimeout(()=>{this._inlayHints.has(l)&&this._inlayHintsHandle(n)},2e3),co}deleteInlayHints(n){this._inlayHints.delete(n)}clearInlayHints(){this._inlayHints.clear()}triggerInlayHints(){this._editor&&this._editor.updateOptions({inlayHints:{fontFamily:String(Date.now())}})}_updateFuncNames(n,s){const o=this._importCompleteLibrary.get(s);if(!o)return;const c=o.functions.map(l=>`${n}.${l.name}`);this._funcs.set(s,{name:n,funcs:c}),this._updateMonarchTokens()}_setNoNameInlayHints(n){const{endLine:s,endColumn:o,libraryId:c,libraryName:l}=n;this._inlayHints.set(c,{label:`as ${l}`,position:{column:o,lineNumber:s},paddingLeft:!0})}_inlayHintsHandle(n){const{name:s,libraryId:o}=n;s?this._inlayHints.delete(o):this._setNoNameInlayHints(n),this.triggerInlayHints()}_updateMonarchTokens(){const n=[...this._funcs.values()].map(c=>c.funcs.join("|")),s=new RegExp("\\b("+n.join("|")+")(?=\\s*\\()"),o=[...Lr.tokenizer.root];o.splice(15,0,[s,"meta.function-call"]),ke.languages.setMonarchTokensProvider(Se,{...Lr,tokenizer:{...Lr.tokenizer,root:o}})}}const Gs=new Od;function Rd(a,n,s){var U;const o={startLineNumber:n.lineNumber,startColumn:1,endLineNumber:n.lineNumber,endColumn:n.column},c=a.getValueInRange(o);if(/^\/\/\s*@/.test(c))return{suggestions:St.annotationSuggestions};if(s.triggerCharacter==="@")return{suggestions:[]};const l=c.match(/([\w.]+)$/)||[];if(!l.length)return{suggestions:[]};const m=(U=l[0])==null?void 0:U.match(/.*[^\w.]+([\w.]+)(?=\.)|([\w.]+)(?=\.)/),y=m?m[1]?m[1]:m[2]?m[2]:void 0:void 0,f=a.getWordUntilPosition(n),b=br.parseCurrentInputFunc(c),h={startLineNumber:n.lineNumber,endLineNumber:n.lineNumber,startColumn:f.startColumn,endColumn:f.endColumn},T=a.getValueInRange({...h,startColumn:f.endColumn,endColumn:f.endColumn+1});St.nextIsBracket=T==="(";let P=po(St.getSuggestions(y)||[],h);if(l[0]==="."&&(P=[]),b&&!y&&!/=\s*\w+$/.test(c)){const F=po(St.getArgSuggestions(b.funcName)||[],h);P=P.concat(F)}return{suggestions:P||[],dispose:()=>{}}}function Fd(a){if(a.kind!==1)return a;const{originInsertText:n}=a;return St.nextIsBracket?a.insertText=n:a.insertText=n+St.bracketsPostfix,a}function Bd(a,n){var o;const s=br.parseLineContentFuncVar(n.column,n.lineNumber,a,n);if(s!=null&&s.libraryId)return{contents:[{value:Dd(s)}]};if((o=s==null?void 0:s.docValue)!=null&&o.length){const c=kd(s.docValue,s.index,s.isBuildIn);if(c)return{contents:[{value:c}]}}return{contents:[]}}function Ud(a,n){var T,P;const s={startLineNumber:n.lineNumber,endLineNumber:n.lineNumber,startColumn:1,endColumn:n.column},o=a.getValueInRange(s),c=a.findMatches(String(Sd),s,!0,!1,null,!0),l=a.findMatches(String(Ed),s,!0,!1,null,!0),m=(T=c.pop())==null?void 0:T.matches,y=(P=l.pop())==null?void 0:P.matches;let f=!1;c.length%2===0?m&&m[0]==='"'&&(f=!0):m&&!m[0]&&(f=!0);let b=!1;l.length%2===0?y&&y[0]==="'"&&(b=!0):y&&!y[0]&&(b=!0);const h=br.parseCurrentInputFuncAndArg(o,b,f);if(h){const{funcName:U,args:F,startIndex:E}=h,j=Ld.getSignatureHelpValues(U,F,E+1,n.lineNumber);if(j)return{value:j,dispose:()=>{}}}return null}function Kd(a){let n=a.findMatches(pn.colorMatchesRegStr,!0,!0,!1,null,!0);return n=n.filter(o=>{const c=a.getValueInRange({...o.range,startColumn:0});return c.indexOf("//")===-1||c.indexOf("//")>o.range.endColumn}),pn.getDocumentColors(n)}function $d(a,n){return pn.getDocumentColorPresentations(a,n)||[]}function jd(a,n){var y,f;const s=a.getModel(),o=br.parseLineContentFuncVar(n.startColumn+1,n.startLineNumber,s);if(!o||o.isBuildIn||!o.docValue||!o.docValue[0].pos)return o!=null&&o.isBuildIn||(f=(y=o==null?void 0:o.docValue)==null?void 0:y[0].title)!=null&&f.startsWith("built-in")?o:void 0;const{lineNumber:c,column:l}=o.docValue[0].pos,m={startLineNumber:c,endLineNumber:c,startColumn:l,endColumn:l};a.revealRangeInCenterIfOutsideViewport(m),a.setSelection(m)}function Hd(a,n){return br.parseLineContentFuncVar(n.column,n.lineNumber,a,n)?{uri:a.uri,range:{startLineNumber:n.lineNumber,endLineNumber:n.lineNumber,startColumn:n.column-1,endColumn:n.column-1}}:null}function po(a,n){return a.map(s=>(s.range=n,s))}function Wd(){return{hints:Gs.inlayHints,dispose:()=>{}}}var ms={},us=lp;if(process.env.NODE_ENV==="production")ms.createRoot=us.createRoot,ms.hydrateRoot=us.hydrateRoot;else{var Xs=us.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;ms.createRoot=function(a,n){Xs.usingClientEntryPoint=!0;try{return us.createRoot(a,n)}finally{Xs.usingClientEntryPoint=!1}},ms.hydrateRoot=function(a,n,s){Xs.usingClientEntryPoint=!0;try{return us.hydrateRoot(a,n,s)}finally{Xs.usingClientEntryPoint=!1}}}var Xe;(function(a){a.added="added",a.removed="removed",a.modified="modified"})(Xe||(Xe={}));const Gd=(a,n)=>{const{close:s,retracement:o}=a,[c,l]=R.useState("modified");return R.useImperativeHandle(n,()=>({updateType(m){l(m)}})),L.jsxs("div",{className:`content-popup content-${c}-popup`,children:[L.jsx("div",{className:`triangle-popup triangle-${c}-popup`}),L.jsxs("div",{className:`header-popup header-${c}-popup`,children:[L.jsx("div",{className:"title-popup",children:"Local working changes"}),L.jsx("div",{className:"actions-popup",children:L.jsx("div",{onClick:s,"data-role":"button",className:"button-popup","data-name":"button-close-diff",children:L.jsx("span",{className:"icon-popup",role:"img",children:L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 12",width:"12",height:"12",children:L.jsx("path",{stroke:"currentColor",strokeWidth:"1.2",d:"m1.5 1.5 9 9m0-9-9 9"})})})})})]}),L.jsx("div",{id:"diffEditorContainer",style:{height:"100%"}})]})},Xd=R.forwardRef(Gd);class Vd{constructor(n,s,o=!0){Object.defineProperty(this,"_domNode",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_id",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_top",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_content",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._id=n,this._domNode=document.createElement("div"),this._domNode.style.display="none",this._domNode.style.width=o?"calc(100% - 134px)":"calc(100% - 14px)",this._domNode.style.height="200px",s==null||s.onDidScrollChange(this.scrollChangeHandler.bind(this)),ms.createRoot(this._domNode).render(L.jsx(Xd,{ref:c=>this._content=c,close:()=>this._close(),retracement:this._retracement})),this._top=0}_close(){this._domNode.style.display="none"}_retracement(){}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}show(n,s,o){var c;this._top=s,(c=this._content)==null||c.updateType(o),this._domNode.style.top=`${n}px`,this._domNode.style.display="block"}hide(){this._domNode.style.display="none"}scrollChangeHandler(n){const s=n.scrollTop;this._domNode.style.top=`${this._top-s}px`}}function ir(){}ir.prototype={diff:function(n,s){var o,c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=c.callback;typeof c=="function"&&(l=c,c={}),this.options=c;var m=this;function y(k){return l?(setTimeout(function(){l(void 0,k)},0),!0):k}n=this.castInput(n),s=this.castInput(s),n=this.removeEmpty(this.tokenize(n)),s=this.removeEmpty(this.tokenize(s));var f=s.length,b=n.length,h=1,T=f+b;c.maxEditLength&&(T=Math.min(T,c.maxEditLength));var P=(o=c.timeout)!==null&&o!==void 0?o:1/0,U=Date.now()+P,F=[{oldPos:-1,lastComponent:void 0}],E=this.extractCommon(F[0],s,n,0);if(F[0].oldPos+1>=b&&E+1>=f)return y([{value:this.join(s),count:s.length}]);var j=-1/0,G=1/0;function V(){for(var k=Math.max(j,-h);k<=Math.min(G,h);k+=2){var O=void 0,Y=F[k-1],S=F[k+1];Y&&(F[k-1]=void 0);var W=!1;if(S){var ae=S.oldPos-k;W=S&&0<=ae&&ae<f}var ce=Y&&Y.oldPos+1<b;if(!W&&!ce){F[k]=void 0;continue}if(!ce||W&&Y.oldPos+1<S.oldPos?O=m.addToPath(S,!0,void 0,0):O=m.addToPath(Y,void 0,!0,1),E=m.extractCommon(O,s,n,k),O.oldPos+1>=b&&E+1>=f)return y(Yd(m,O.lastComponent,s,n,m.useLongestToken));F[k]=O,O.oldPos+1>=b&&(G=Math.min(G,k-1)),E+1>=f&&(j=Math.max(j,k+1))}h++}if(l)(function k(){setTimeout(function(){if(h>T||Date.now()>U)return l();V()||k()},0)})();else for(;h<=T&&Date.now()<=U;){var B=V();if(B)return B}},addToPath:function(n,s,o,c){var l=n.lastComponent;return l&&l.added===s&&l.removed===o?{oldPos:n.oldPos+c,lastComponent:{count:l.count+1,added:s,removed:o,previousComponent:l.previousComponent}}:{oldPos:n.oldPos+c,lastComponent:{count:1,added:s,removed:o,previousComponent:l}}},extractCommon:function(n,s,o,c){for(var l=s.length,m=o.length,y=n.oldPos,f=y-c,b=0;f+1<l&&y+1<m&&this.equals(s[f+1],o[y+1]);)f++,y++,b++;return b&&(n.lastComponent={count:b,previousComponent:n.lastComponent}),n.oldPos=y,f},equals:function(n,s){return this.options.comparator?this.options.comparator(n,s):n===s||this.options.ignoreCase&&n.toLowerCase()===s.toLowerCase()},removeEmpty:function(n){for(var s=[],o=0;o<n.length;o++)n[o]&&s.push(n[o]);return s},castInput:function(n){return n},tokenize:function(n){return n.split("")},join:function(n){return n.join("")}};function Yd(a,n,s,o,c){for(var l=[],m;n;)l.push(n),m=n.previousComponent,delete n.previousComponent,n=m;l.reverse();for(var y=0,f=l.length,b=0,h=0;y<f;y++){var T=l[y];if(T.removed){if(T.value=a.join(o.slice(h,h+T.count)),h+=T.count,y&&l[y-1].added){var U=l[y-1];l[y-1]=l[y],l[y]=U}}else{if(!T.added&&c){var P=s.slice(b,b+T.count);P=P.map(function(E,j){var G=o[h+j];return G.length>E.length?G:E}),T.value=a.join(P)}else T.value=a.join(s.slice(b,b+T.count));b+=T.count,T.added||(h+=T.count)}}var F=l[f-1];return f>1&&typeof F.value=="string"&&(F.added||F.removed)&&a.equals("",F.value)&&(l[f-2].value+=F.value,l.pop()),l}var mo=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,uo=/\S/,yo=new ir;yo.equals=function(a,n){return this.options.ignoreCase&&(a=a.toLowerCase(),n=n.toLowerCase()),a===n||this.options.ignoreWhitespace&&!uo.test(a)&&!uo.test(n)},yo.tokenize=function(a){for(var n=a.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),s=0;s<n.length-1;s++)!n[s+1]&&n[s+2]&&mo.test(n[s])&&mo.test(n[s+2])&&(n[s]+=n[s+2],n.splice(s+1,2),s--);return n};var dn=new ir;dn.tokenize=function(a){this.options.stripTrailingCr&&(a=a.replace(/\r\n/g,`
140
+ `));var n=[],s=a.split(/(\n|\r\n)/);s[s.length-1]||s.pop();for(var o=0;o<s.length;o++){var c=s[o];o%2&&!this.options.newlineIsToken?n[n.length-1]+=c:(this.options.ignoreWhitespace&&(c=c.trim()),n.push(c))}return n};function Qd(a,n,s){return dn.diff(a,n,s)}var Zd=new ir;Zd.tokenize=function(a){return a.split(/(\S.+?[.!?])(?=\s+|$)/)};var Jd=new ir;Jd.tokenize=function(a){return a.split(/([{}:;,]|\s+)/)};function Vs(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Vs=function(n){return typeof n}:Vs=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Vs(a)}var em=Object.prototype.toString,ys=new ir;ys.useLongestToken=!0,ys.tokenize=dn.tokenize,ys.castInput=function(a){var n=this.options,s=n.undefinedReplacement,o=n.stringifyReplacer,c=o===void 0?function(l,m){return typeof m>"u"?s:m}:o;return typeof a=="string"?a:JSON.stringify(mn(a,null,null,c),c," ")},ys.equals=function(a,n){return ir.prototype.equals.call(ys,a.replace(/,([\r\n])/g,"$1"),n.replace(/,([\r\n])/g,"$1"))};function mn(a,n,s,o,c){n=n||[],s=s||[],o&&(a=o(c,a));var l;for(l=0;l<n.length;l+=1)if(n[l]===a)return s[l];var m;if(em.call(a)==="[object Array]"){for(n.push(a),m=new Array(a.length),s.push(m),l=0;l<a.length;l+=1)m[l]=mn(a[l],n,s,o,c);return n.pop(),s.pop(),m}if(a&&a.toJSON&&(a=a.toJSON()),Vs(a)==="object"&&a!==null){n.push(a),m={},s.push(m);var y=[],f;for(f in a)a.hasOwnProperty(f)&&y.push(f);for(y.sort(),l=0;l<y.length;l+=1)f=y[l],m[f]=mn(a[f],n,s,o,f);n.pop(),s.pop()}else m=a;return m}var un=new ir;un.tokenize=function(a){return a.slice()},un.join=un.removeEmpty=function(a){return a};class tm{constructor(n,s,o=""){Object.defineProperty(this,"_editor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_monaco",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_originalModel",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_oldDecorations",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_diffEditor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_diffPopupWidget",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_didChangeListener",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_onMouseDownListener",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._editor=n,this._monaco=s,this._originalModel=this._monaco.editor.createModel(o,Se),this._oldDecorations=[],this._init(),this._eventListening()}_init(){var n;this._changeEvent(),this._didChangeListener=(n=this._editor.getModel())==null?void 0:n.onDidChangeContent(()=>this._changeEvent())}update(n){var s,o;if(this._originalModel=this._monaco.editor.createModel(n,Se),n!==((s=this._editor.getModel())==null?void 0:s.getValue())){this._changeEvent();return}(o=this._editor.getModel())==null||o.deltaDecorations(this._oldDecorations,[]),this._oldDecorations=[]}dispose(){var n,s,o,c;this._diffPopupWidget&&(this._diffPopupWidget.hide(),this._editor.removeOverlayWidget(this._diffPopupWidget)),(n=this._didChangeListener)==null||n.dispose(),(s=this._onMouseDownListener)==null||s.dispose(),(o=this._editor.getModel())==null||o.deltaDecorations(this._oldDecorations,[]),this._oldDecorations=[],(c=this._diffEditor)==null||c.dispose(),this._diffEditor=void 0}_changesHandle(n){let s=0,o;const c=[];let l=0;for(const m of n){const{added:y,removed:f,count:b=1,value:h}=m;y?o&&o.removed?(s=this._changeHandle(c,s,l,b,Xe.modified),l=0,o=void 0):(o&&o.added&&(s=this._changeHandle(c,s,l,o.count||1,Xe.added),l=0),o=m):f?o&&o.added?(s=this._changeHandle(c,s,l,o.count||1,Xe.modified),l=0,o=void 0):(o&&o.removed&&this._addDecorationList(c,s,Xe.removed),o=m):/^\n+$/.test(h)?o&&(o.added||o.removed)?l=b:s+=b:(o&&o.added?(s=this._changeHandle(c,s,l,o.count||1,Xe.added),l=0,o=void 0):o&&o.removed&&(this._addDecorationList(c,s,Xe.removed),o=void 0),s+=b)}return o&&o.added?s=this._changeHandle(c,s,l,o.count||1,Xe.added):o&&o.removed&&this._addDecorationList(c,s,Xe.removed),c}_changeHandle(n,s,o,c,l){for(let m=1;m<=c;m++)this._addDecorationList(n,s+m,l);return s+=c+o,s}_addDecorationList(n,s,o){n.push({range:new this._monaco.Range(s,1,s,1),options:{isWholeLine:!0,linesDecorationsClassName:`line-${o} line-decoration_${o}`}})}_changeEvent(){var c,l;const n=Qd(this._originalModel.getValue(),((c=this._editor.getModel())==null?void 0:c.getValue())||""),s=this._changesHandle(n),o=((l=this._editor.getModel())==null?void 0:l.deltaDecorations(this._oldDecorations,s))||[];this._oldDecorations=o}_eventListening(){const n=new Vd("diff.popup.widget",this._editor);this._editor.addOverlayWidget(n),this._onMouseDownListener=this._editor.onMouseDown(s=>this._onMouseDownHandle(s)),this._diffPopupWidget=n}_onMouseDownHandle(n){var m,y,f,b,h,T;const s=(m=n.target.element)==null?void 0:m.classList,o=s==null?void 0:s.contains(`line-${Xe.added}`),c=s==null?void 0:s.contains(`line-${Xe.modified}`),l=s==null?void 0:s.contains(`line-${Xe.removed}`);if(o||c||l){const P=((f=(y=n==null?void 0:n.target)==null?void 0:y.position)==null?void 0:f.lineNumber)||0,U=((b=this._editor)==null?void 0:b.getTopForLineNumber(P+1))||0,F=((h=this._editor)==null?void 0:h.getScrollTop())||0,E=o?Xe.added:c?Xe.modified:Xe.removed;(T=this._diffPopupWidget)==null||T.show(U-F,U,E),this._diffEditor||(this._diffEditor=this._createDiffEditor()),this._diffEditor.setModel({original:this._originalModel,modified:this._editor.getModel()}),this._diffEditor.revealLineInCenter(P+1)}}_createDiffEditor(){return this._monaco.editor.createDiffEditor(document.getElementById("diffEditorContainer"),{renderSideBySide:!1,quickSuggestions:!1,suggestOnTriggerCharacters:!1,hover:{enabled:!1},parameterHints:{enabled:!1}})}}class rm{constructor(n,s,o){Object.defineProperty(this,"_editor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_monaco",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_decorations",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_changPositionListener",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_originalScript",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_onActionTrigger",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_onLinkOpen",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_registerList",{enumerable:!0,configurable:!0,writable:!0,value:[]}),this._editor=n,this._monaco=s,this._onActionTrigger=o,this._init()}addLinkOpenFunc(n){this._onLinkOpen=n}updateActionTrigger(n){this._onActionTrigger=n}setModelMarkers(n){this._monaco.editor.setModelMarkers(this._editor.getModel(),"owner",n)}addDiffDecorations(){this._decorations||(this._decorations=new tm(this._editor,this._monaco,this._originalScript))}removeDiffDecorations(){var n;(n=this._decorations)==null||n.dispose(),this._decorations=void 0}setValue(n){this._editor.setValue(n),this._editor.setScrollTop(0),this.focus()}setPosition(n){var s,o;(s=this._editor)==null||s.setPosition(n),(o=this._editor)==null||o.revealPositionInCenter(n),this.focus()}focus(){var n;(n=this._editor)==null||n.focus()}setOriginalScript(n){var s;this._originalScript=n,(s=this._decorations)==null||s.update(n)}getEditorLayout(){var o;const n=this._editor.getContentHeight(),s=(o=this._editor.getModel())==null?void 0:o.getLineCount();return{contentHeight:n,lineCount:s}}setEditorLayout(n,s){var o,c;(c=this._editor)==null||c.layout({height:n,width:s||((o=this._editor)==null?void 0:o.getContainerDomNode().clientWidth)})}_init(){this._register(),this._setOptions(),this._addCommands(),this._addActions(),this._setCursorPosition(),this._onTabSizeChange()}_onTabSizeChange(){const n=this._editor.getModel();n==null||n.onDidChangeOptions(s=>{if(s.tabSize&&!s.indentSize){const o=(n==null?void 0:n.getOptions().tabSize)||4;n==null||n.updateOptions({indentSize:o})}})}_setCursorPosition(){const n=localStorage.getItem(nn);this._editor.setPosition(n?JSON.parse(n):{lineNumber:1,column:1}),this._editor.focus()}_register(){this._monaco.languages.register({id:Se});const n=this._monaco.languages.registerCompletionItemProvider(Se,{triggerCharacters:[".","@"],provideCompletionItems:Rd,resolveCompletionItem:Fd});this._registerList.push(n);const s=this._monaco.languages.registerHoverProvider(Se,{provideHover:Bd});this._registerList.push(s);const o=this._monaco.languages.registerSignatureHelpProvider(Se,{signatureHelpTriggerCharacters:["(",","],provideSignatureHelp:Ud});this._registerList.push(o);const c=this._monaco.languages.registerColorProvider(Se,{provideColorPresentations:$d,provideDocumentColors:Kd});this._registerList.push(c);const l=this._monaco.editor.registerEditorOpener({openCodeEditor:(b,h,T)=>{const P=jd(b,T);if(P){const{index:U,docValue:F}=P,{title:E,name:j}=F[U];let G="";switch(E){case ge.keywords:G="kw";break;case ge.methods:case ge.functions:G="fun";break;case ge.variables:G="var";break;case ge.types:G="type";break;case ge.constants:G="const";break}this._onLinkOpen&&this._onLinkOpen(`${G}_${j}`,U)}return!0}});this._registerList.push(l);const m=this._monaco.editor.registerLinkOpener({open:b=>(this._onLinkOpen&&b.fragment&&this._onLinkOpen(b.fragment),!!b.fragment)});this._registerList.push(m);const y=this._monaco.languages.registerDefinitionProvider(Se,{provideDefinition:Hd});this._registerList.push(y);const f=this._monaco.languages.registerInlayHintsProvider(Se,{provideInlayHints:Wd});this._registerList.push(f)}_setOptions(){this._monaco.editor.defineTheme("vs-dark",cn),this._monaco.editor.defineTheme("vs",ln),this._monaco.languages.setMonarchTokensProvider(Se,Lr),this._monaco.languages.setLanguageConfiguration(Se,on)}_addCommands(){this._monaco.editor.addCommand({id:"tcc.editor.function",run:(n,s)=>{var o;if(St.nextIsBracket){const c=this._editor.getPosition();c&&this._editor.setPosition(Object.assign(c,{column:c.column+1}))}(o=this._editor.getAction(s))==null||o.run()}})}_addActions(){this._editor.addAction({id:"tcc-save-script",label:"保存脚本",keybindings:[this._monaco.KeyMod.CtrlCmd|this._monaco.KeyCode.KeyS],contextMenuGroupId:"9_modification",contextMenuOrder:1,run:()=>{this._onActionTrigger&&this._onActionTrigger(A.Actions.Save)}}),this._editor.addAction({id:"tcc-find-replace-line",label:"寻找/替换",keybindings:[this._monaco.KeyMod.CtrlCmd|this._monaco.KeyCode.KeyF],contextMenuGroupId:"9_cutcopypaste",contextMenuOrder:5,run:()=>{this.openFind(),this._onActionTrigger&&this._onActionTrigger(A.Actions.Find)}}),this._editor.addAction({id:"tcc-trigger-console-script",label:"切换控制台",keybindings:[this._monaco.KeyMod.CtrlCmd|this._monaco.KeyCode.Backquote],contextMenuGroupId:"z_commands",contextMenuOrder:0,run:()=>{this._onActionTrigger&&this._onActionTrigger(A.Actions.TriggerConsole)}}),this._editor.addAction({id:"tcc-run-script",label:"运行脚本",keybindings:[this._monaco.KeyMod.CtrlCmd|this._monaco.KeyCode.Enter],run:()=>{this._onActionTrigger&&this._onActionTrigger(A.Actions.RunScript)}}),this._editor.addAction({id:"tcc-open-script",label:"打开脚本",keybindings:[this._monaco.KeyMod.CtrlCmd|this._monaco.KeyCode.KeyO],contextMenuGroupId:"9_modification",contextMenuOrder:2,run:()=>{this._onActionTrigger&&this._onActionTrigger(A.Actions.Open)}}),this._editor.addAction({id:"tcc-new-window-script",label:"在新窗口中打开",keybindings:[this._monaco.KeyMod.Shift|this._monaco.KeyMod.Alt|this._monaco.KeyCode.KeyW],contextMenuGroupId:"9_modification",contextMenuOrder:3,run:()=>{this._onActionTrigger&&this._onActionTrigger(A.Actions.NewWindow)}}),this._editor.addAction({id:"tcc-new-tab-script",label:"在新标签页中打开",keybindings:[this._monaco.KeyMod.Shift|this._monaco.KeyMod.Alt|this._monaco.KeyCode.KeyT],contextMenuGroupId:"9_modification",contextMenuOrder:4,run:()=>{this._onActionTrigger&&this._onActionTrigger(A.Actions.NewTab)}})}openFind(){this.focus(),this._editor.trigger("click","actions.find",null)}gotoLine(){this.focus(),this._editor.trigger("click","editor.action.gotoLine",null)}onChangeCursorPosition(n){this._changPositionListener&&this._changPositionListener.dispose();const s=localStorage.getItem(nn);n&&n(s?JSON.parse(s):{lineNumber:1,column:1}),this._changPositionListener=this._editor.onDidChangeCursorPosition(o=>{localStorage.setItem(nn,JSON.stringify(o.position)),n&&n(o.position)})}dispose(){var n;for(const s of this._registerList)s.dispose();(n=this._editor)==null||n.dispose()}}/**
141
141
  * @license
142
142
  * Copyright 2019 Google LLC
143
143
  * SPDX-License-Identifier: Apache-2.0
144
- */const _o=Symbol("Comlink.proxy"),sm=Symbol("Comlink.endpoint"),am=Symbol("Comlink.releaseProxy"),yn=Symbol("Comlink.finalizer"),Ys=Symbol("Comlink.thrown"),fo=a=>typeof a=="object"&&a!==null||typeof a=="function",nm={canHandle:a=>fo(a)&&a[_o],serialize(a){const{port1:n,port2:s}=new MessageChannel;return bo(a,n),[s,[s]]},deserialize(a){return a.start(),_n(a)}},im={canHandle:a=>fo(a)&&Ys in a,serialize({value:a}){let n;return a instanceof Error?n={isError:!0,value:{message:a.message,name:a.name,stack:a.stack}}:n={isError:!1,value:a},[n,[]]},deserialize(a){throw a.isError?Object.assign(new Error(a.value.message),a.value):a.value}},go=new Map([["proxy",nm],["throw",im]]);function om(a,n){for(const s of a)if(n===s||s==="*"||s instanceof RegExp&&s.test(n))return!0;return!1}function bo(a,n=globalThis,s=["*"]){n.addEventListener("message",function o(c){if(!c||!c.data)return;if(!om(s,c.origin)){console.warn(`Invalid origin '${c.origin}' for comlink proxy`);return}const{id:l,type:m,path:_}=Object.assign({path:[]},c.data),f=(c.data.argumentList||[]).map(xr);let b;try{const h=_.slice(0,-1).reduce((P,U)=>P[U],a),T=_.reduce((P,U)=>P[U],a);switch(m){case"GET":b=T;break;case"SET":h[_.slice(-1)[0]]=xr(c.data.value),b=!0;break;case"APPLY":b=T.apply(h,f);break;case"CONSTRUCT":{const P=new T(...f);b=gn(P)}break;case"ENDPOINT":{const{port1:P,port2:U}=new MessageChannel;bo(a,U),b=mm(P,[P])}break;case"RELEASE":b=void 0;break;default:return}}catch(h){b={value:h,[Ys]:0}}Promise.resolve(b).catch(h=>({value:h,[Ys]:0})).then(h=>{const[T,P]=ea(h);n.postMessage(Object.assign(Object.assign({},T),{id:l}),P),m==="RELEASE"&&(n.removeEventListener("message",o),xo(n),yn in a&&typeof a[yn]=="function"&&a[yn]())}).catch(h=>{const[T,P]=ea({value:new TypeError("Unserializable return value"),[Ys]:0});n.postMessage(Object.assign(Object.assign({},T),{id:l}),P)})}),n.start&&n.start()}function lm(a){return a.constructor.name==="MessagePort"}function xo(a){lm(a)&&a.close()}function _n(a,n){return fn(a,[],n)}function Qs(a){if(a)throw new Error("Proxy has been released and is not useable")}function ho(a){return Mr(a,{type:"RELEASE"}).then(()=>{xo(a)})}const Zs=new WeakMap,Js="FinalizationRegistry"in globalThis&&new FinalizationRegistry(a=>{const n=(Zs.get(a)||0)-1;Zs.set(a,n),n===0&&ho(a)});function cm(a,n){const s=(Zs.get(n)||0)+1;Zs.set(n,s),Js&&Js.register(a,n,a)}function pm(a){Js&&Js.unregister(a)}function fn(a,n=[],s=function(){}){let o=!1;const c=new Proxy(s,{get(l,m){if(Qs(o),m===am)return()=>{pm(c),ho(a),o=!0};if(m==="then"){if(n.length===0)return{then:()=>c};const _=Mr(a,{type:"GET",path:n.map(f=>f.toString())}).then(xr);return _.then.bind(_)}return fn(a,[...n,m])},set(l,m,_){Qs(o);const[f,b]=ea(_);return Mr(a,{type:"SET",path:[...n,m].map(h=>h.toString()),value:f},b).then(xr)},apply(l,m,_){Qs(o);const f=n[n.length-1];if(f===sm)return Mr(a,{type:"ENDPOINT"}).then(xr);if(f==="bind")return fn(a,n.slice(0,-1));const[b,h]=wo(_);return Mr(a,{type:"APPLY",path:n.map(T=>T.toString()),argumentList:b},h).then(xr)},construct(l,m){Qs(o);const[_,f]=wo(m);return Mr(a,{type:"CONSTRUCT",path:n.map(b=>b.toString()),argumentList:_},f).then(xr)}});return cm(c,a),c}function dm(a){return Array.prototype.concat.apply([],a)}function wo(a){const n=a.map(ea);return[n.map(s=>s[0]),dm(n.map(s=>s[1]))]}const vo=new WeakMap;function mm(a,n){return vo.set(a,n),a}function gn(a){return Object.assign(a,{[_o]:!0})}function ea(a){for(const[n,s]of go)if(s.canHandle(a)){const[o,c]=s.serialize(a);return[{type:"HANDLER",name:n,value:o},c]}return[{type:"RAW",value:a},vo.get(a)||[]]}function xr(a){switch(a.type){case"HANDLER":return go.get(a.name).deserialize(a.value);case"RAW":return a.value}}function Mr(a,n,s){return new Promise(o=>{const c=um();a.addEventListener("message",function l(m){!m.data||!m.data.id||m.data.id!==c||(a.removeEventListener("message",l),o(m.data))}),a.start&&a.start(),a.postMessage(Object.assign({id:c},n),s)})}function um(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}const To=new Worker(new URL(""+(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__dirname+"/assets/scriptsRunWorker-DcFMYcUp.js").href:new URL("assets/scriptsRunWorker-DcFMYcUp.js",typeof document>"u"?location.href:document.currentScript&&document.currentScript.src||document.baseURI).href),typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Us&&Us.src||new URL("trading-vue-editor.umd.cjs",document.baseURI).href),{type:"module",name:"Run TccScript Server"});To.onerror=a=>{console.error(a)};async function Do(a){return await Gs.setInlayHints(a)}const ko=_n(To),Io=_n(new Worker(new URL(""+(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__dirname+"/assets/parserTccWorker-DWxyfhc4.js").href:new URL("assets/parserTccWorker-DWxyfhc4.js",typeof document>"u"?location.href:document.currentScript&&document.currentScript.src||document.baseURI).href),typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Us&&Us.src||new URL("trading-vue-editor.umd.cjs",document.baseURI).href),{type:"module",name:"Parser TccScript Server"}));async function Ao(a,n=!1){const{functions:s,types:o,constants:c,variables:l,methods:m}=pt;return await Io.parseTcc(a,n,gn(Do),{functions:Object.fromEntries(s),methods:Object.fromEntries(m),types:Object.fromEntries(o),constants:Object.fromEntries(c),variables:Object.fromEntries(l)})}async function ym(a,n){const{functions:s,types:o,constants:c,variables:l,methods:m}=pt;return await Io.parseLibraryCode(a,n,gn(Do),{functions:Object.fromEntries(s),methods:Object.fromEntries(m),types:Object.fromEntries(o),constants:Object.fromEntries(c),variables:Object.fromEntries(l)})}async function qo(a,n,s=!0){return await ko.runScript(a,n,s)}async function _m(a){return await ko.removeScript(a)}function fm(a){return new Worker(""+(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__dirname+"/assets/editor.worker-CT5Cb1wO.js").href:new URL("assets/editor.worker-CT5Cb1wO.js",typeof document>"u"?location.href:document.currentScript&&document.currentScript.src||document.baseURI).href),{name:a==null?void 0:a.name})}self.MonacoEnvironment={getWorker(){return new fm({name:"Editor Worker"})}},sn.config({paths:{vs:"https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.45.0/min/vs"},"vs/nls":{availableLanguages:{"*":"zh-cn"}}});let Co={};const gm=(a,n)=>{const{height:s,width:o,theme:c,options:l,hasDiff:m,readOnly:_,defaultValue:f,onChange:b,onLinkOpen:h,onDeclareConfigChange:T,onCursorPositionChange:P,onActionTrigger:U,onEditorDidMount:F}=a,E=R.useRef(null),j=R.useRef(null),G=R.useRef(!1);R.useImperativeHandle(n,()=>({setOriginalScript(S){var W;(W=E.current)==null||W.setOriginalScript(S)},setScript(S){var W;(W=E.current)==null||W.setValue(S)},gotoLine(){var S;(S=E.current)==null||S.gotoLine()},getEditorLayout(){var S;return(S=E.current)==null?void 0:S.getEditorLayout()},setPosition(S,W){var ae;(ae=E.current)==null||ae.setPosition({column:S,lineNumber:W})},setModelMarkers(S){var W;(W=E.current)==null||W.setModelMarkers(S)},focus(){var S;(S=E.current)==null||S.focus()}})),R.useEffect(()=>{var S,W;m?(W=E.current)==null||W.addDiffDecorations():(S=E.current)==null||S.removeDiffDecorations()},[m]),R.useEffect(()=>{c&&ke.editor.setTheme(c)},[c]),R.useEffect(()=>{var S;(S=E.current)==null||S.updateActionTrigger(U)},[U]),R.useEffect(()=>{var S;h&&((S=E.current)==null||S.addLinkOpenFunc(h))},[h]);function V(S,W){var ce,Qe;St.initBuiltinsTrees(),Gs.setEditor(S),E.current=new rm(S,W,U),h&&((ce=E.current)==null||ce.addLinkOpenFunc(h)),m&&((Qe=E.current)==null||Qe.addDiffDecorations()),qd(S),requestAnimationFrame(Y);const ae=S.getValue();E.current.onChangeCursorPosition(P),b&&b(ae),!_&&B(ae),F&&F()}const B=R.useCallback(async S=>{var Lt;const W=Date.now();G.current=!1;const{errors:ae,functions:ce,methods:Qe,types:Et,variables:Ue,overloadsFuncs:Ke,imports:Z,preParserCode:ge,enums:Le}=await Ao(S),Me=new Map(Object.entries(ce)),dt=new Map(Object.entries(Qe)),wt=new Map(Object.entries(Et)),re=new Map(Object.entries(Ue)),he=new Map(Object.entries(Z)),Pe=new Map(Object.entries(Le));br.setUserDefined({functions:Me,methods:dt,types:wt,variables:re,imports:he,enums:Pe},Ke),St.setUserDefind(Me,wt,re,dt,Pe);const Nt=ae.map(Ze=>({...Ze,severity:Ze.type||ke.MarkerSeverity.Error}));if(_)return;try{if(!ae.length&&ge){const Ze=await qo(ge,{isPreParser:!0});io.isEqual(Ze,Co)||(Co=Ze,T&&T(Ze))}}catch(Ze){console.log(Ze),ae.push({message:Ze.message,startLineNumber:0,endLineNumber:0,startColumn:0,endColumn:0})}!G.current&&((Lt=E.current)==null||Lt.setModelMarkers(Nt));const je=Date.now();console.log((je-W)/1e3)},[T,_]),k=R.useMemo(()=>io.debounce(B,1500),[B]);function O(S){var W;if(_){B(S||"");return}G.current=!0,Gs.clearInlayHints(),(W=E.current)==null||W.setModelMarkers([]),S!==void 0&&(b&&b(S),k(S))}const Y=R.useCallback(()=>{var W,ae;const S=(W=j.current)==null?void 0:W.getBoundingClientRect();(ae=E.current)==null||ae.setEditorLayout((S==null?void 0:S.height)||0,S==null?void 0:S.width)},[]);return R.useEffect(()=>{const S=()=>{window.requestAnimationFrame(Y)},W=new ResizeObserver(S);return j.current&&W.observe(j.current),()=>{var ae;j.current&&W.unobserve(j.current),W.disconnect(),(ae=E.current)==null||ae.dispose()}},[]),L.jsx("div",{ref:j,children:L.jsx(gd,{height:s,width:o||"100%",defaultLanguage:Se,defaultValue:f||`indicator("我的脚本")
144
+ */const _o=Symbol("Comlink.proxy"),sm=Symbol("Comlink.endpoint"),am=Symbol("Comlink.releaseProxy"),yn=Symbol("Comlink.finalizer"),Ys=Symbol("Comlink.thrown"),fo=a=>typeof a=="object"&&a!==null||typeof a=="function",nm={canHandle:a=>fo(a)&&a[_o],serialize(a){const{port1:n,port2:s}=new MessageChannel;return bo(a,n),[s,[s]]},deserialize(a){return a.start(),_n(a)}},im={canHandle:a=>fo(a)&&Ys in a,serialize({value:a}){let n;return a instanceof Error?n={isError:!0,value:{message:a.message,name:a.name,stack:a.stack}}:n={isError:!1,value:a},[n,[]]},deserialize(a){throw a.isError?Object.assign(new Error(a.value.message),a.value):a.value}},go=new Map([["proxy",nm],["throw",im]]);function om(a,n){for(const s of a)if(n===s||s==="*"||s instanceof RegExp&&s.test(n))return!0;return!1}function bo(a,n=globalThis,s=["*"]){n.addEventListener("message",function o(c){if(!c||!c.data)return;if(!om(s,c.origin)){console.warn(`Invalid origin '${c.origin}' for comlink proxy`);return}const{id:l,type:m,path:y}=Object.assign({path:[]},c.data),f=(c.data.argumentList||[]).map(xr);let b;try{const h=y.slice(0,-1).reduce((P,U)=>P[U],a),T=y.reduce((P,U)=>P[U],a);switch(m){case"GET":b=T;break;case"SET":h[y.slice(-1)[0]]=xr(c.data.value),b=!0;break;case"APPLY":b=T.apply(h,f);break;case"CONSTRUCT":{const P=new T(...f);b=gn(P)}break;case"ENDPOINT":{const{port1:P,port2:U}=new MessageChannel;bo(a,U),b=mm(P,[P])}break;case"RELEASE":b=void 0;break;default:return}}catch(h){b={value:h,[Ys]:0}}Promise.resolve(b).catch(h=>({value:h,[Ys]:0})).then(h=>{const[T,P]=ea(h);n.postMessage(Object.assign(Object.assign({},T),{id:l}),P),m==="RELEASE"&&(n.removeEventListener("message",o),xo(n),yn in a&&typeof a[yn]=="function"&&a[yn]())}).catch(h=>{const[T,P]=ea({value:new TypeError("Unserializable return value"),[Ys]:0});n.postMessage(Object.assign(Object.assign({},T),{id:l}),P)})}),n.start&&n.start()}function lm(a){return a.constructor.name==="MessagePort"}function xo(a){lm(a)&&a.close()}function _n(a,n){return fn(a,[],n)}function Qs(a){if(a)throw new Error("Proxy has been released and is not useable")}function ho(a){return Mr(a,{type:"RELEASE"}).then(()=>{xo(a)})}const Zs=new WeakMap,Js="FinalizationRegistry"in globalThis&&new FinalizationRegistry(a=>{const n=(Zs.get(a)||0)-1;Zs.set(a,n),n===0&&ho(a)});function cm(a,n){const s=(Zs.get(n)||0)+1;Zs.set(n,s),Js&&Js.register(a,n,a)}function pm(a){Js&&Js.unregister(a)}function fn(a,n=[],s=function(){}){let o=!1;const c=new Proxy(s,{get(l,m){if(Qs(o),m===am)return()=>{pm(c),ho(a),o=!0};if(m==="then"){if(n.length===0)return{then:()=>c};const y=Mr(a,{type:"GET",path:n.map(f=>f.toString())}).then(xr);return y.then.bind(y)}return fn(a,[...n,m])},set(l,m,y){Qs(o);const[f,b]=ea(y);return Mr(a,{type:"SET",path:[...n,m].map(h=>h.toString()),value:f},b).then(xr)},apply(l,m,y){Qs(o);const f=n[n.length-1];if(f===sm)return Mr(a,{type:"ENDPOINT"}).then(xr);if(f==="bind")return fn(a,n.slice(0,-1));const[b,h]=wo(y);return Mr(a,{type:"APPLY",path:n.map(T=>T.toString()),argumentList:b},h).then(xr)},construct(l,m){Qs(o);const[y,f]=wo(m);return Mr(a,{type:"CONSTRUCT",path:n.map(b=>b.toString()),argumentList:y},f).then(xr)}});return cm(c,a),c}function dm(a){return Array.prototype.concat.apply([],a)}function wo(a){const n=a.map(ea);return[n.map(s=>s[0]),dm(n.map(s=>s[1]))]}const vo=new WeakMap;function mm(a,n){return vo.set(a,n),a}function gn(a){return Object.assign(a,{[_o]:!0})}function ea(a){for(const[n,s]of go)if(s.canHandle(a)){const[o,c]=s.serialize(a);return[{type:"HANDLER",name:n,value:o},c]}return[{type:"RAW",value:a},vo.get(a)||[]]}function xr(a){switch(a.type){case"HANDLER":return go.get(a.name).deserialize(a.value);case"RAW":return a.value}}function Mr(a,n,s){return new Promise(o=>{const c=um();a.addEventListener("message",function l(m){!m.data||!m.data.id||m.data.id!==c||(a.removeEventListener("message",l),o(m.data))}),a.start&&a.start(),a.postMessage(Object.assign({id:c},n),s)})}function um(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}const To=new Worker(new URL(""+(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__dirname+"/assets/scriptsRunWorker-DcFMYcUp.js").href:new URL("assets/scriptsRunWorker-DcFMYcUp.js",typeof document>"u"?location.href:document.currentScript&&document.currentScript.src||document.baseURI).href),typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Us&&Us.src||new URL("trading-vue-editor.umd.cjs",document.baseURI).href),{type:"module",name:"Run TccScript Server"});To.onerror=a=>{console.error(a)};async function Do(a){return await Gs.setInlayHints(a)}const ko=_n(To),Io=_n(new Worker(new URL(""+(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__dirname+"/assets/parserTccWorker-DWxyfhc4.js").href:new URL("assets/parserTccWorker-DWxyfhc4.js",typeof document>"u"?location.href:document.currentScript&&document.currentScript.src||document.baseURI).href),typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Us&&Us.src||new URL("trading-vue-editor.umd.cjs",document.baseURI).href),{type:"module",name:"Parser TccScript Server"}));async function Ao(a,n=!1){const{functions:s,types:o,constants:c,variables:l,methods:m}=pt;return await Io.parseTcc(a,n,gn(Do),{functions:Object.fromEntries(s),methods:Object.fromEntries(m),types:Object.fromEntries(o),constants:Object.fromEntries(c),variables:Object.fromEntries(l)})}async function ym(a,n){const{functions:s,types:o,constants:c,variables:l,methods:m}=pt;return await Io.parseLibraryCode(a,n,gn(Do),{functions:Object.fromEntries(s),methods:Object.fromEntries(m),types:Object.fromEntries(o),constants:Object.fromEntries(c),variables:Object.fromEntries(l)})}async function qo(a,n,s=!0){return await ko.runScript(a,n,s)}async function _m(a){return await ko.removeScript(a)}function fm(a){return new Worker(""+(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__dirname+"/assets/editor.worker-CT5Cb1wO.js").href:new URL("assets/editor.worker-CT5Cb1wO.js",typeof document>"u"?location.href:document.currentScript&&document.currentScript.src||document.baseURI).href),{name:a==null?void 0:a.name})}self.MonacoEnvironment={getWorker(){return new fm({name:"Editor Worker"})}},sn.config({paths:{vs:"https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.45.0/min/vs"},"vs/nls":{availableLanguages:{"*":"zh-cn"}}});let Co={};const gm=(a,n)=>{const{height:s,width:o,theme:c,options:l,hasDiff:m,readOnly:y,defaultValue:f,onChange:b,onLinkOpen:h,onDeclareConfigChange:T,onCursorPositionChange:P,onActionTrigger:U,onEditorDidMount:F}=a,E=R.useRef(null),j=R.useRef(null),G=R.useRef(!1);R.useImperativeHandle(n,()=>({setOriginalScript(S){var W;(W=E.current)==null||W.setOriginalScript(S)},setScript(S){var W;(W=E.current)==null||W.setValue(S)},gotoLine(){var S;(S=E.current)==null||S.gotoLine()},getEditorLayout(){var S;return(S=E.current)==null?void 0:S.getEditorLayout()},setPosition(S,W){var ae;(ae=E.current)==null||ae.setPosition({column:S,lineNumber:W})},setModelMarkers(S){var W;(W=E.current)==null||W.setModelMarkers(S)},focus(){var S;(S=E.current)==null||S.focus()}})),R.useEffect(()=>{var S,W;m?(W=E.current)==null||W.addDiffDecorations():(S=E.current)==null||S.removeDiffDecorations()},[m]),R.useEffect(()=>{c&&ke.editor.setTheme(c)},[c]),R.useEffect(()=>{var S;(S=E.current)==null||S.updateActionTrigger(U)},[U]),R.useEffect(()=>{var S;h&&((S=E.current)==null||S.addLinkOpenFunc(h))},[h]);function V(S,W){var ce,Qe;St.initBuiltinsTrees(),Gs.setEditor(S),E.current=new rm(S,W,U),h&&((ce=E.current)==null||ce.addLinkOpenFunc(h)),m&&((Qe=E.current)==null||Qe.addDiffDecorations()),qd(S),requestAnimationFrame(Y);const ae=S.getValue();E.current.onChangeCursorPosition(P),b&&b(ae),!y&&B(ae),F&&F()}const B=R.useCallback(async S=>{var Lt;const W=Date.now();G.current=!1;const{errors:ae,functions:ce,methods:Qe,types:Et,variables:Ue,overloadsFuncs:Ke,imports:Z,preParserCode:be,enums:Le}=await Ao(S),Me=new Map(Object.entries(ce)),dt=new Map(Object.entries(Qe)),wt=new Map(Object.entries(Et)),re=new Map(Object.entries(Ue)),he=new Map(Object.entries(Z)),Pe=new Map(Object.entries(Le));br.setUserDefined({functions:Me,methods:dt,types:wt,variables:re,imports:he,enums:Pe},Ke),St.setUserDefind(Me,wt,re,dt,Pe);const Nt=ae.map(Ze=>({...Ze,severity:Ze.type||ke.MarkerSeverity.Error}));if(y)return;try{if(!ae.length&&be){const Ze=await qo(be,{isPreParser:!0});io.isEqual(Ze,Co)||(Co=Ze,T&&T(Ze))}}catch(Ze){console.log(Ze),ae.push({message:Ze.message,startLineNumber:0,endLineNumber:0,startColumn:0,endColumn:0})}!G.current&&((Lt=E.current)==null||Lt.setModelMarkers(Nt));const je=Date.now();console.log((je-W)/1e3)},[T,y]),k=R.useMemo(()=>io.debounce(B,1500),[B]);function O(S){var W;if(y){B(S||"");return}G.current=!0,Gs.clearInlayHints(),(W=E.current)==null||W.setModelMarkers([]),S!==void 0&&(b&&b(S),k(S))}const Y=R.useCallback(()=>{var W,ae;const S=(W=j.current)==null?void 0:W.getBoundingClientRect();(ae=E.current)==null||ae.setEditorLayout((S==null?void 0:S.height)||0,S==null?void 0:S.width)},[]);return R.useEffect(()=>{const S=()=>{window.requestAnimationFrame(Y)},W=new ResizeObserver(S);return j.current&&W.observe(j.current),()=>{var ae;j.current&&W.unobserve(j.current),W.disconnect(),(ae=E.current)==null||ae.dispose()}},[]),L.jsx("div",{ref:j,children:L.jsx(gd,{height:s,width:o||"100%",defaultLanguage:Se,defaultValue:f||`indicator("我的脚本")
145
145
  plot(close)
146
- `,theme:c||"vs-dark",className:`tvue-script ${c||"vs-dark"}`,options:{colorDecorators:!0,useShadowDOM:!1,matchOnWordStartOnly:!0,automaticLayout:!1,suggest:{filterGraceful:!0},fontSize:13,..._?Pd:{},readOnlyMessage:{value:"该脚本是只读的。它无法被编辑。"},...l},onMount:V,onChange:O})})},bm=R.forwardRef(gm),xm=a=>{const{theme:n,modified:s,original:o,height:c,width:l,renderSideBySide:m=!0}=a,_=R.useCallback((f,b)=>{b.languages.register({id:Se}),b.editor.defineTheme("vs-dark",cn),b.editor.defineTheme("vs",ln),b.languages.setMonarchTokensProvider(Se,Lr),b.languages.setLanguageConfiguration(Se,on)},[]);return L.jsx(md,{height:c||"90vh",width:l||"100%",theme:n||"vs-dark",options:{readOnly:!0,renderSideBySide:m,scrollBeyondLastLine:!1},language:Se,modified:s,original:o,onMount:_})};A.VMarkerSeverity=void 0,function(a){a[a.Hint=1]="Hint",a[a.Info=2]="Info",a[a.Warning=4]="Warning",a[a.Error=8]="Error"}(A.VMarkerSeverity||(A.VMarkerSeverity={}));var ta={},hm=function(){var a=document.getSelection();if(!a.rangeCount)return function(){};for(var n=document.activeElement,s=[],o=0;o<a.rangeCount;o++)s.push(a.getRangeAt(o));switch(n.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":n.blur();break;default:n=null;break}return a.removeAllRanges(),function(){a.type==="Caret"&&a.removeAllRanges(),a.rangeCount||s.forEach(function(c){a.addRange(c)}),n&&n.focus()}},wm=hm,zo={"text/plain":"Text","text/html":"Url",default:"Text"},vm="Copy to clipboard: #{key}, Enter";function Tm(a){var n=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return a.replace(/#{\s*key\s*}/g,n)}function Dm(a,n){var s,o,c,l,m,_,f=!1;n||(n={}),s=n.debug||!1;try{c=wm(),l=document.createRange(),m=document.getSelection(),_=document.createElement("span"),_.textContent=a,_.ariaHidden="true",_.style.all="unset",_.style.position="fixed",_.style.top=0,_.style.clip="rect(0, 0, 0, 0)",_.style.whiteSpace="pre",_.style.webkitUserSelect="text",_.style.MozUserSelect="text",_.style.msUserSelect="text",_.style.userSelect="text",_.addEventListener("copy",function(h){if(h.stopPropagation(),n.format)if(h.preventDefault(),typeof h.clipboardData>"u"){s&&console.warn("unable to use e.clipboardData"),s&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var T=zo[n.format]||zo.default;window.clipboardData.setData(T,a)}else h.clipboardData.clearData(),h.clipboardData.setData(n.format,a);n.onCopy&&(h.preventDefault(),n.onCopy(h.clipboardData))}),document.body.appendChild(_),l.selectNodeContents(_),m.addRange(l);var b=document.execCommand("copy");if(!b)throw new Error("copy command was unsuccessful");f=!0}catch(h){s&&console.error("unable to copy using execCommand: ",h),s&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(n.format||"text",a),n.onCopy&&n.onCopy(window.clipboardData),f=!0}catch(T){s&&console.error("unable to copy using clipboardData: ",T),s&&console.error("falling back to prompt"),o=Tm("message"in n?n.message:vm),window.prompt(o,a)}}finally{m&&(typeof m.removeRange=="function"?m.removeRange(l):m.removeAllRanges()),_&&document.body.removeChild(_),c()}return f}var km=Dm;function bn(a){"@babel/helpers - typeof";return bn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},bn(a)}Object.defineProperty(ta,"__esModule",{value:!0}),ta.CopyToClipboard=void 0;var ra=So(R),Im=So(km),Am=["text","onCopy","options","children"];function So(a){return a&&a.__esModule?a:{default:a}}function Eo(a,n){var s=Object.keys(a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(a);n&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(a,c).enumerable})),s.push.apply(s,o)}return s}function No(a){for(var n=1;n<arguments.length;n++){var s=arguments[n]!=null?arguments[n]:{};n%2?Eo(Object(s),!0).forEach(function(o){hn(a,o,s[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(s)):Eo(Object(s)).forEach(function(o){Object.defineProperty(a,o,Object.getOwnPropertyDescriptor(s,o))})}return a}function qm(a,n){if(a==null)return{};var s=Cm(a,n),o,c;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(a);for(c=0;c<l.length;c++)o=l[c],!(n.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(a,o)&&(s[o]=a[o])}return s}function Cm(a,n){if(a==null)return{};var s={},o=Object.keys(a),c,l;for(l=0;l<o.length;l++)c=o[l],!(n.indexOf(c)>=0)&&(s[c]=a[c]);return s}function zm(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function Lo(a,n){for(var s=0;s<n.length;s++){var o=n[s];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(a,o.key,o)}}function Sm(a,n,s){return n&&Lo(a.prototype,n),s&&Lo(a,s),Object.defineProperty(a,"prototype",{writable:!1}),a}function Em(a,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(n&&n.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),n&&xn(a,n)}function xn(a,n){return xn=Object.setPrototypeOf||function(o,c){return o.__proto__=c,o},xn(a,n)}function Nm(a){var n=Mm();return function(){var o=sa(a),c;if(n){var l=sa(this).constructor;c=Reflect.construct(o,arguments,l)}else c=o.apply(this,arguments);return Lm(this,c)}}function Lm(a,n){if(n&&(bn(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Mo(a)}function Mo(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function Mm(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function sa(a){return sa=Object.setPrototypeOf?Object.getPrototypeOf:function(s){return s.__proto__||Object.getPrototypeOf(s)},sa(a)}function hn(a,n,s){return n in a?Object.defineProperty(a,n,{value:s,enumerable:!0,configurable:!0,writable:!0}):a[n]=s,a}var Po=function(a){Em(s,a);var n=Nm(s);function s(){var o;zm(this,s);for(var c=arguments.length,l=new Array(c),m=0;m<c;m++)l[m]=arguments[m];return o=n.call.apply(n,[this].concat(l)),hn(Mo(o),"onClick",function(_){var f=o.props,b=f.text,h=f.onCopy,T=f.children,P=f.options,U=ra.default.Children.only(T),F=(0,Im.default)(b,P);h&&h(b,F),U&&U.props&&typeof U.props.onClick=="function"&&U.props.onClick(_)}),o}return Sm(s,[{key:"render",value:function(){var c=this.props;c.text,c.onCopy,c.options;var l=c.children,m=qm(c,Am),_=ra.default.Children.only(l);return ra.default.cloneElement(_,No(No({},m),{},{onClick:this.onClick}))}}]),s}(ra.default.PureComponent);ta.CopyToClipboard=Po,hn(Po,"defaultProps",{onCopy:void 0,options:void 0});var Pm=ta,wn=Pm.CopyToClipboard;wn.CopyToClipboard=wn;var Om=wn;const vn=cp(Om);async function Rm(a,n=0){const s=a[n];if(!s)return;const{name:o,args:c,type:l,desc:m,examples:_,remarks:f,seeAlso:b,syntax:h,detailedDesc:T,fields:P,returns:U}=s,F={name:o};if(a.length>1&&(F.overloads=`${a.length} overloads`),l&&(F.type=l),c&&(F.name=`${o}()`,F.args=c.map(E=>{const{name:j,desc:G,displayType:V}=E;return{label:`${j} (${V})`,desc:G&&hr(G)}})),m&&(F.desc=m.map(E=>hr(E))),_&&(F.originalExample=_.join(`
146
+ `,theme:c||"vs-dark",className:`tvue-script ${c||"vs-dark"}`,options:{colorDecorators:!0,useShadowDOM:!1,matchOnWordStartOnly:!0,automaticLayout:!1,suggest:{filterGraceful:!0},fontSize:13,...y?Pd:{},readOnlyMessage:{value:"该脚本是只读的。它无法被编辑。"},...l},onMount:V,onChange:O})})},bm=R.forwardRef(gm),xm=a=>{const{theme:n,modified:s,original:o,height:c,width:l,renderSideBySide:m=!0}=a,y=R.useCallback((f,b)=>{b.languages.register({id:Se}),b.editor.defineTheme("vs-dark",cn),b.editor.defineTheme("vs",ln),b.languages.setMonarchTokensProvider(Se,Lr),b.languages.setLanguageConfiguration(Se,on)},[]);return L.jsx(md,{height:c||"90vh",width:l||"100%",theme:n||"vs-dark",options:{readOnly:!0,renderSideBySide:m,scrollBeyondLastLine:!1},language:Se,modified:s,original:o,onMount:y})};A.VMarkerSeverity=void 0,function(a){a[a.Hint=1]="Hint",a[a.Info=2]="Info",a[a.Warning=4]="Warning",a[a.Error=8]="Error"}(A.VMarkerSeverity||(A.VMarkerSeverity={}));var ta={},hm=function(){var a=document.getSelection();if(!a.rangeCount)return function(){};for(var n=document.activeElement,s=[],o=0;o<a.rangeCount;o++)s.push(a.getRangeAt(o));switch(n.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":n.blur();break;default:n=null;break}return a.removeAllRanges(),function(){a.type==="Caret"&&a.removeAllRanges(),a.rangeCount||s.forEach(function(c){a.addRange(c)}),n&&n.focus()}},wm=hm,zo={"text/plain":"Text","text/html":"Url",default:"Text"},vm="Copy to clipboard: #{key}, Enter";function Tm(a){var n=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return a.replace(/#{\s*key\s*}/g,n)}function Dm(a,n){var s,o,c,l,m,y,f=!1;n||(n={}),s=n.debug||!1;try{c=wm(),l=document.createRange(),m=document.getSelection(),y=document.createElement("span"),y.textContent=a,y.ariaHidden="true",y.style.all="unset",y.style.position="fixed",y.style.top=0,y.style.clip="rect(0, 0, 0, 0)",y.style.whiteSpace="pre",y.style.webkitUserSelect="text",y.style.MozUserSelect="text",y.style.msUserSelect="text",y.style.userSelect="text",y.addEventListener("copy",function(h){if(h.stopPropagation(),n.format)if(h.preventDefault(),typeof h.clipboardData>"u"){s&&console.warn("unable to use e.clipboardData"),s&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var T=zo[n.format]||zo.default;window.clipboardData.setData(T,a)}else h.clipboardData.clearData(),h.clipboardData.setData(n.format,a);n.onCopy&&(h.preventDefault(),n.onCopy(h.clipboardData))}),document.body.appendChild(y),l.selectNodeContents(y),m.addRange(l);var b=document.execCommand("copy");if(!b)throw new Error("copy command was unsuccessful");f=!0}catch(h){s&&console.error("unable to copy using execCommand: ",h),s&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(n.format||"text",a),n.onCopy&&n.onCopy(window.clipboardData),f=!0}catch(T){s&&console.error("unable to copy using clipboardData: ",T),s&&console.error("falling back to prompt"),o=Tm("message"in n?n.message:vm),window.prompt(o,a)}}finally{m&&(typeof m.removeRange=="function"?m.removeRange(l):m.removeAllRanges()),y&&document.body.removeChild(y),c()}return f}var km=Dm;function bn(a){"@babel/helpers - typeof";return bn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},bn(a)}Object.defineProperty(ta,"__esModule",{value:!0}),ta.CopyToClipboard=void 0;var ra=So(R),Im=So(km),Am=["text","onCopy","options","children"];function So(a){return a&&a.__esModule?a:{default:a}}function Eo(a,n){var s=Object.keys(a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(a);n&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(a,c).enumerable})),s.push.apply(s,o)}return s}function No(a){for(var n=1;n<arguments.length;n++){var s=arguments[n]!=null?arguments[n]:{};n%2?Eo(Object(s),!0).forEach(function(o){hn(a,o,s[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(s)):Eo(Object(s)).forEach(function(o){Object.defineProperty(a,o,Object.getOwnPropertyDescriptor(s,o))})}return a}function qm(a,n){if(a==null)return{};var s=Cm(a,n),o,c;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(a);for(c=0;c<l.length;c++)o=l[c],!(n.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(a,o)&&(s[o]=a[o])}return s}function Cm(a,n){if(a==null)return{};var s={},o=Object.keys(a),c,l;for(l=0;l<o.length;l++)c=o[l],!(n.indexOf(c)>=0)&&(s[c]=a[c]);return s}function zm(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function Lo(a,n){for(var s=0;s<n.length;s++){var o=n[s];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(a,o.key,o)}}function Sm(a,n,s){return n&&Lo(a.prototype,n),s&&Lo(a,s),Object.defineProperty(a,"prototype",{writable:!1}),a}function Em(a,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(n&&n.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),n&&xn(a,n)}function xn(a,n){return xn=Object.setPrototypeOf||function(o,c){return o.__proto__=c,o},xn(a,n)}function Nm(a){var n=Mm();return function(){var o=sa(a),c;if(n){var l=sa(this).constructor;c=Reflect.construct(o,arguments,l)}else c=o.apply(this,arguments);return Lm(this,c)}}function Lm(a,n){if(n&&(bn(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Mo(a)}function Mo(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function Mm(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function sa(a){return sa=Object.setPrototypeOf?Object.getPrototypeOf:function(s){return s.__proto__||Object.getPrototypeOf(s)},sa(a)}function hn(a,n,s){return n in a?Object.defineProperty(a,n,{value:s,enumerable:!0,configurable:!0,writable:!0}):a[n]=s,a}var Po=function(a){Em(s,a);var n=Nm(s);function s(){var o;zm(this,s);for(var c=arguments.length,l=new Array(c),m=0;m<c;m++)l[m]=arguments[m];return o=n.call.apply(n,[this].concat(l)),hn(Mo(o),"onClick",function(y){var f=o.props,b=f.text,h=f.onCopy,T=f.children,P=f.options,U=ra.default.Children.only(T),F=(0,Im.default)(b,P);h&&h(b,F),U&&U.props&&typeof U.props.onClick=="function"&&U.props.onClick(y)}),o}return Sm(s,[{key:"render",value:function(){var c=this.props;c.text,c.onCopy,c.options;var l=c.children,m=qm(c,Am),y=ra.default.Children.only(l);return ra.default.cloneElement(y,No(No({},m),{},{onClick:this.onClick}))}}]),s}(ra.default.PureComponent);ta.CopyToClipboard=Po,hn(Po,"defaultProps",{onCopy:void 0,options:void 0});var Pm=ta,wn=Pm.CopyToClipboard;wn.CopyToClipboard=wn;var Om=wn;const vn=cp(Om);async function Rm(a,n=0){const s=a[n];if(!s)return;const{name:o,args:c,type:l,desc:m,examples:y,remarks:f,seeAlso:b,syntax:h,detailedDesc:T,fields:P,returns:U}=s,F={name:o};if(a.length>1&&(F.overloads=`${a.length} overloads`),l&&(F.type=l),c&&(F.name=`${o}()`,F.args=c.map(E=>{const{name:j,desc:G,displayType:V}=E;return{label:`${j} (${V})`,desc:G&&hr(G)}})),m&&(F.desc=m.map(E=>hr(E))),y&&(F.originalExample=y.join(`
147
147
  `),F.examples=await ke.editor.colorize(F.originalExample,Se,{tabSize:4})),T){F.detailedDesc=[];for(const E of T){const{desc:j,examples:G}=E;let V=j.map(O=>hr(O)),B,k;G&&(k=G.join(`
148
- `),B=await ke.editor.colorize(k,Se,{tabSize:4})),F.detailedDesc.push({desc:V,examples:B,originalExample:k})}}return U&&(F.returns=U.map(E=>hr(E))),f&&(F.remarks=typeof f=="string"?[hr(f)]:f.map(E=>hr(E))),h&&(F.syntax=a.map(E=>{var j;return(j=E.syntax)==null?void 0:j[0]})),P&&(F.fields=P.map(E=>{const{name:j,desc:G,type:V}=E;return{label:`${j} (${V})`,desc:G&&hr(G)}})),b&&(F.seeAlso=b.map(E=>Fm(E))),F}function Fm(a){const s=/\[([^\[\]]+)\]\(([^\(\)]+)\)/g.exec(a);if(s){const[o,c,l]=s;return{name:c,link:l}}}function hr(a){const n=/\*\*([^\*]+)\*\*/g,s=/\`([^\`]+)\`/g,o=/\[([^\[\]]+)\]\(([^\(\)]+)\)/g;return a.replace(n,(c,l)=>`<strong>${l}</strong>`).replace(s,(c,l)=>`<code>${l}</code>`).replace(o,(c,l,m)=>`<a ${m.startsWith("#")?`data-name="${l}"`:'target="_blank"'} class="manual-content-text-link" href="${m}">${l}</a>`)}function Bm(a){var o;const n=[],s=[];for(const c of ds){for(let l of no[c.key].sort()){if(ao.includes(l))continue;let m=l;c.prefix==="fun"&&(m=`${l}()`),m.includes(a)&&(m.startsWith(a)?n.unshift({label:m,group:c,key:`${c.prefix}_${l}`}):n.push({label:m,group:c,key:`${c.prefix}_${l}`}))}for(const[l,m]of pt[c.key])for(const _ of m){const{name:f,args:b,type:h,desc:T,examples:P,remarks:U,seeAlso:F,syntax:E,detailedDesc:j,fields:G,returns:V}=_,B={label:f,group:c,key:`${c.prefix}_${f}`};if(c.prefix==="fun"&&(B.label=`${f}()`),B.label.includes(a))break;if(b){let k=!1;for(const O of b){const{name:Y,desc:S,displayType:W}=O;if(Y.includes(a)||S!=null&&S.includes(a)||W!=null&&W.includes(a)){s.push(B),k=!0;break}}if(k)break}if(h&&h.includes(a)){s.push(B);break}if(T){let k=!1;for(const O of T)if(O.includes(a)){s.push(B),k=!0;break}if(k)break}if(P){let k=!1;for(const O of P)if(O.includes(a)){s.push(B),k=!0;break}if(k)break}if(U&&(typeof U=="string"?U:U.join(`
148
+ `),B=await ke.editor.colorize(k,Se,{tabSize:4})),F.detailedDesc.push({desc:V,examples:B,originalExample:k})}}return U&&(F.returns=U.map(E=>hr(E))),f&&(F.remarks=typeof f=="string"?[hr(f)]:f.map(E=>hr(E))),h&&(F.syntax=a.map(E=>{var j;return(j=E.syntax)==null?void 0:j[0]})),P&&(F.fields=P.map(E=>{const{name:j,desc:G,type:V}=E;return{label:`${j} (${V})`,desc:G&&hr(G)}})),b&&(F.seeAlso=b.map(E=>Fm(E))),F}function Fm(a){const s=/\[([^\[\]]+)\]\(([^\(\)]+)\)/g.exec(a);if(s){const[o,c,l]=s;return{name:c,link:l}}}function hr(a){const n=/\*\*([^\*]+)\*\*/g,s=/\`([^\`]+)\`/g,o=/\[([^\[\]]+)\]\(([^\(\)]+)\)/g;return a.replace(n,(c,l)=>`<strong>${l}</strong>`).replace(s,(c,l)=>`<code>${l}</code>`).replace(o,(c,l,m)=>`<a ${m.startsWith("#")?`data-name="${l}"`:'target="_blank"'} class="manual-content-text-link" href="${m}">${l}</a>`)}function Bm(a){var o;const n=[],s=[];for(const c of ds){for(let l of no[c.key].sort()){if(ao.includes(l))continue;let m=l;c.prefix==="fun"&&(m=`${l}()`),m.includes(a)&&(m.startsWith(a)?n.unshift({label:m,group:c,key:`${c.prefix}_${l}`}):n.push({label:m,group:c,key:`${c.prefix}_${l}`}))}for(const[l,m]of pt[c.key])for(const y of m){const{name:f,args:b,type:h,desc:T,examples:P,remarks:U,seeAlso:F,syntax:E,detailedDesc:j,fields:G,returns:V}=y,B={label:f,group:c,key:`${c.prefix}_${f}`};if(c.prefix==="fun"&&(B.label=`${f}()`),B.label.includes(a))break;if(b){let k=!1;for(const O of b){const{name:Y,desc:S,displayType:W}=O;if(Y.includes(a)||S!=null&&S.includes(a)||W!=null&&W.includes(a)){s.push(B),k=!0;break}}if(k)break}if(h&&h.includes(a)){s.push(B);break}if(T){let k=!1;for(const O of T)if(O.includes(a)){s.push(B),k=!0;break}if(k)break}if(P){let k=!1;for(const O of P)if(O.includes(a)){s.push(B),k=!0;break}if(k)break}if(U&&(typeof U=="string"?U:U.join(`
149
149
  `)).includes(a)){s.push(B);break}if(F){let k=!1;for(const O of F)if(O.includes(a)){s.push(B),k=!0;break}if(k)break}if(E){let k=!1;for(const O of E)if(O.includes(a)){s.push(B),k=!0;break}if(k)break}if(j){let k=!1;for(const O of j){const{desc:Y,examples:S}=O;if(Y.join(`
150
150
  `).includes(a)){s.push(B),k=!0;break}if((o=S==null?void 0:S.join(`
151
- `))!=null&&o.includes(a)){s.push(B),k=!0;break}}if(k)break}if(G){let k=!1;for(const O of G){const{name:Y,desc:S,type:W}=O;if(Y.includes(a)||S!=null&&S.includes(a)||W!=null&&W.includes(a)){s.push(B),k=!0;break}}if(k)break}if(V){let k=!1;for(const O of V)if(O.includes(a)){s.push(B),k=!0;break}if(k)break}}}return{labelList:n,contentList:s}}const Um=a=>{var V;const{group:n,itemKey:s,onItemClick:o,currentIndex:c}=a,[l,m]=R.useState(),[_,f]=R.useState(0),[b,h]=R.useState("Copy code"),[T,P]=R.useState("Copy link");R.useEffect(()=>{U(c)},[s]);const U=B=>{const k=s.replace(`${n==null?void 0:n.prefix}_`,""),O=pt[n==null?void 0:n.key].get(k);f(B),O&&Rm(O,B).then(Y=>{m(Y)})},F=B=>{U(B)},E=B=>{var k,O;if(B.target.localName==="a"&&B.target.hash&&((O=(k=B.target)==null?void 0:k.dataset)!=null&&O.name)){B.preventDefault();const{hash:Y}=B.target;o(Y.replace("#",""))}},j=()=>{h("Copied"),setTimeout(()=>{h("Copy code")},1e3)},G=()=>{P("Link copied"),setTimeout(()=>{P("Copy link")},3e3)};return L.jsx("div",{onClick:E,id:`#${s}`,children:L.jsxs("div",{className:"manual-content-wrapper",children:[L.jsxs("div",{className:"manual-content-header",children:[L.jsxs("div",{children:[L.jsx("h3",{className:"manual-content-header-title",children:l==null?void 0:l.name}),!!(l!=null&&l.overloads)&&L.jsx("span",{className:"manual-content-header-overloads",children:l==null?void 0:l.overloads})]}),L.jsx(vn,{text:(l==null?void 0:l.name)||"",onCopy:G,children:L.jsx("div",{"data-tooltip":T,className:"manual-content-btn",children:L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 28 28",width:"28",height:"28",children:L.jsxs("g",{fill:"currentColor",children:[L.jsx("path",{fillRule:"nonzero",d:"M15.039 5.969l-.019-.019-2.828 2.828.707.707 2.474-2.474c1.367-1.367 3.582-1.367 4.949 0s1.367 3.582 0 4.949l-2.474 2.474.707.707 2.828-2.828-.019-.019c1.415-1.767 1.304-4.352-.334-5.99-1.638-1.638-4.224-1.749-5.99-.334zM5.97 15.038l-.019-.019 2.828-2.828.707.707-2.475 2.475c-1.367 1.367-1.367 3.582 0 4.949s3.582 1.367 4.949 0l2.474-2.474.707.707-2.828 2.828-.019-.019c-1.767 1.415-4.352 1.304-5.99-.334-1.638-1.638-1.749-4.224-.334-5.99z"}),L.jsx("path",{d:"M10.485 16.141l5.656-5.656.707.707-5.656 5.656z"})]})})})})]}),(V=l==null?void 0:l.desc)==null?void 0:V.map((B,k)=>L.jsx("div",{dangerouslySetInnerHTML:{__html:B},className:"manual-content-text"},k)),(l==null?void 0:l.type)&&L.jsxs(R.Fragment,{children:[L.jsx("div",{className:"manual-content-sub-title",children:"type"}),L.jsx("div",{className:"manual-content-text",children:l.type})]}),(l==null?void 0:l.syntax)&&L.jsxs(R.Fragment,{children:[L.jsxs("div",{className:"manual-content-sub-title",children:["Syntax ",!!(l!=null&&l.overloads)&&"& Overloads"]}),l.syntax.map((B,k)=>{var O;return(((O=l.syntax)==null?void 0:O.length)||0)>1?L.jsx("div",{onClick:()=>F(k),children:L.jsx("pre",{className:`manual-content-syntax with-overloads ${k===_?"selected":""}`,children:B})},k):L.jsx("pre",{className:"manual-content-syntax",children:B},k)})]}),(l==null?void 0:l.args)&&L.jsxs(R.Fragment,{children:[L.jsx("div",{className:"manual-content-sub-title",children:"arguments"}),l.args.map((B,k)=>L.jsxs("div",{className:"manual-content-text",children:[L.jsx("span",{className:"manual-content-args-label",children:B.label})," ",L.jsx("span",{dangerouslySetInnerHTML:{__html:B.desc||""}})]},k))]}),(l==null?void 0:l.fields)&&L.jsxs(R.Fragment,{children:[L.jsx("div",{className:"manual-content-sub-title",children:"fields"}),l.fields.map((B,k)=>L.jsxs("div",{className:"manual-content-text",children:[L.jsx("span",{className:"manual-content-args-label",children:B.label})," ",L.jsx("span",{dangerouslySetInnerHTML:{__html:B.desc||""}})]},k))]}),(l==null?void 0:l.examples)&&L.jsxs(R.Fragment,{children:[L.jsxs("div",{className:"manual-content-sub-title manual-content-example-header",children:[L.jsx("div",{children:L.jsx("span",{children:"example"})}),L.jsx(vn,{text:l.originalExample||"",onCopy:j,children:L.jsx("div",{"data-tooltip":b,className:"manual-content-btn manual-content-example-copy",children:L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",fill:"none",children:L.jsx("path",{stroke:"currentColor",d:"M8 9.5H6.5a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1h11a1 1 0 0 0 1-1V20m-8-1.5h11a1 1 0 0 0 1-1v-11a1 1 0 0 0-1-1h-11a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1z"})})})})]}),L.jsx("pre",{className:"manual-content-example",children:L.jsx("code",{dangerouslySetInnerHTML:{__html:l.examples}})})]}),(l==null?void 0:l.detailedDesc)&&l.detailedDesc.map((B,k)=>L.jsxs(R.Fragment,{children:[B.desc.map((O,Y)=>L.jsx("div",{className:"manual-content-text",dangerouslySetInnerHTML:{__html:O}},Y)),L.jsxs("div",{className:"manual-content-sub-title manual-content-example-header",children:[L.jsx("div",{children:L.jsx("span",{children:"example"})}),L.jsx(vn,{text:B.originalExample||"",onCopy:j,children:L.jsx("div",{"data-tooltip":b,className:"manual-content-btn manual-content-example-copy",children:L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",fill:"none",children:L.jsx("path",{stroke:"currentColor",d:"M8 9.5H6.5a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1h11a1 1 0 0 0 1-1V20m-8-1.5h11a1 1 0 0 0 1-1v-11a1 1 0 0 0-1-1h-11a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1z"})})})})]}),L.jsx("pre",{className:"manual-content-example",children:L.jsx("code",{dangerouslySetInnerHTML:{__html:B.examples||""}})})]},k)),(l==null?void 0:l.returns)&&L.jsxs(R.Fragment,{children:[L.jsx("div",{className:"manual-content-sub-title",children:"returns"}),l.returns.map((B,k)=>L.jsx("div",{className:"manual-content-text",dangerouslySetInnerHTML:{__html:B}},k))]}),(l==null?void 0:l.remarks)&&L.jsxs(R.Fragment,{children:[L.jsx("div",{className:"manual-content-sub-title",children:"remarks"}),l.remarks.map((B,k)=>L.jsx("div",{className:"manual-content-text",dangerouslySetInnerHTML:{__html:B}},k))]}),(l==null?void 0:l.seeAlso)&&L.jsxs(R.Fragment,{children:[L.jsx("div",{className:"manual-content-sub-title",children:"see Also"}),L.jsx("div",{className:"manual-content-see_also",children:l.seeAlso.map((B,k)=>L.jsx("a",{className:"manual-content-see_also-tag","data-name":B==null?void 0:B.name,href:B==null?void 0:B.link,children:B==null?void 0:B.name},k))})]})]})})};ke.languages.register({id:Se}),ke.editor.defineTheme("vs-dark",cn),ke.editor.defineTheme("vs",ln),ke.languages.setMonarchTokensProvider(Se,Lr),ke.languages.setLanguageConfiguration(Se,on);const Km=({theme:a="vs-dark",currentValue:n})=>{const[s,o]=R.useState(ds[0]),[c,l]=R.useState(null),[m,_]=R.useState(0),[f,b]=R.useState(""),[h,T]=R.useState("var_bar_index"),P=R.useRef(null),U=R.useRef(null),F=k=>{k.key===(s==null?void 0:s.key)&&!(s!=null&&s.isHidden)?o({...k,isHidden:!0}):o(k)};R.useEffect(()=>{ke.editor.setTheme(a)},[a]),R.useEffect(()=>{if(n.value){const[k]=n.value.split("_"),O=ds.find(Y=>k===Y.prefix);O&&(_(n.index||0),V(O,n.value))}},[n]);const E=(k,O)=>{var Y;k!==h&&(O&&o(O),_(0),T(k),(Y=U.current)==null||Y.scrollTo({top:0}))},j=k=>{if(k.target.value.trim()==="")G();else{b(k.target.value);const O=Bm(k.target.value);l(O)}},G=()=>{b(""),l(null),setTimeout(()=>{var k,O;(O=(k=P.current)==null?void 0:k.querySelector(`a[data-href="${h}"]`))==null||O.scrollIntoView(!0)},10)},V=(k,O)=>{var Y;o(k),T(O),setTimeout(()=>{var S,W;(W=(S=P.current)==null?void 0:S.querySelector(`a[data-href="${O}"]`))==null||W.scrollIntoView(!0)},10),(Y=U.current)==null||Y.scrollTo({top:0})},B=k=>{const O=ds.find(Y=>k.startsWith(Y.prefix));O&&(_(0),V(O,k))};return L.jsxs("div",{className:`${a} manual-warpper`,children:[L.jsxs("div",{className:"manual-left",children:[L.jsxs("div",{className:"manual-search",children:[L.jsx("span",{className:"manual-search-icon",children:L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18",width:"18px",height:"18px",children:L.jsx("path",{fillRule:"evenodd",d:"M12.5 11h-.79l-.28-.27A6.47 6.47 0 0 0 13 6.5 6.5 6.5 0 1 0 6.5 13c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L17.49 16l-4.99-5zm-6 0C4.01 11 2 8.99 2 6.5S4.01 2 6.5 2 11 4.01 11 6.5 8.99 11 6.5 11z"})})}),L.jsx("input",{onChange:j,spellCheck:"false",value:f,className:"manual-search-input",autoComplete:"off",placeholder:"Search",type:"text"}),L.jsx("span",{onClick:G,className:`manual-search-clear ${f?"":"hide"}`,children:L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 95.939 95.939",width:"9",height:"9",children:L.jsx("path",{d:"M62.82 47.97l32.53-32.534a2 2 0 0 0 0-2.828L83.332.586a2 2 0 0 0-2.827 0L47.97 33.12 15.435.587c-.75-.75-2.078-.75-2.828 0L.587 12.607a2 2 0 0 0 0 2.83L33.12 47.97.588 80.504a2 2 0 0 0 0 2.828l12.02 12.02a1.997 1.997 0 0 0 2.83 0L47.97 62.818l32.535 32.535a2 2 0 0 0 2.827 0l12.02-12.02c.78-.783.78-2.05 0-2.83L62.82 47.97z"})})})]}),L.jsx("div",{className:`manual-group-search-list manual-scroll ${f?"":"hide"}`,children:L.jsxs("div",{children:[c==null?void 0:c.labelList.map(k=>L.jsx("a",{onClick:O=>{O.preventDefault(),E(k.key,k.group)},className:`manual-group-body-item ${k.key===h?"manual-group-body-item-selected":""}`,"data-href":k.key,href:`#${k.key}`,children:k.label},`search_${k.key}`)),L.jsx("div",{className:"manual-content-separator"}),c==null?void 0:c.contentList.map(k=>L.jsx("a",{onClick:O=>{O.preventDefault(),E(k.key,k.group)},className:`manual-group-body-item ${k.key===h?"manual-group-body-item-selected":""}`,"data-href":k.key,href:`#${k.key}`,children:k.label},`search_${k.key}`))]})}),L.jsx("div",{className:`manual-group-list manual-scroll ${f?"hide":""}`,ref:P,children:ds.map(k=>{var O,Y;return L.jsxs(R.Fragment,{children:[L.jsx("div",{onClick:()=>F(k),className:`manual-group-title ${k.key===(s==null?void 0:s.key)&&!(s!=null&&s.isHidden)?"active":""}`,children:k.title}),L.jsx("div",{className:`manual-group-body manual-scroll ${k.key!==(s==null?void 0:s.key)||s!=null&&s.isHidden?"hide":""}`,children:(Y=(O=no[k.key])==null?void 0:O.sort().filter(S=>!ao.includes(S)))==null?void 0:Y.map(S=>{const W=`${k.prefix}_${S}`;return L.jsx("a",{onClick:ae=>{ae.preventDefault(),E(W)},className:`manual-group-body-item ${W===h?"manual-group-body-item-selected":""}`,"data-href":W,href:`#${W}`,children:`${S}${k.prefix==="fun"?"()":""}`},W)})})]},k.key)})})]}),L.jsx("div",{ref:U,className:"manual-right manual-scroll",children:L.jsx(Um,{currentIndex:m,group:s,itemKey:h,onItemClick:B})})]})};A.ReferenceManual=Km,A.TradingVueDiffEditor=xm,A.TradingVueEditor=bm,A.parseLibrary=ym,A.parseTcc=Ao,A.removeScript=_m,A.scriptsRun=qo,Object.defineProperty(A,Symbol.toStringTag,{value:"Module"})});
151
+ `))!=null&&o.includes(a)){s.push(B),k=!0;break}}if(k)break}if(G){let k=!1;for(const O of G){const{name:Y,desc:S,type:W}=O;if(Y.includes(a)||S!=null&&S.includes(a)||W!=null&&W.includes(a)){s.push(B),k=!0;break}}if(k)break}if(V){let k=!1;for(const O of V)if(O.includes(a)){s.push(B),k=!0;break}if(k)break}}}return{labelList:n,contentList:s}}const Um=a=>{var V;const{group:n,itemKey:s,onItemClick:o,currentIndex:c}=a,[l,m]=R.useState(),[y,f]=R.useState(0),[b,h]=R.useState("Copy code"),[T,P]=R.useState("Copy link");R.useEffect(()=>{U(c)},[s]);const U=B=>{const k=s.replace(`${n==null?void 0:n.prefix}_`,""),O=pt[n==null?void 0:n.key].get(k);f(B),O&&Rm(O,B).then(Y=>{m(Y)})},F=B=>{U(B)},E=B=>{var k,O;if(B.target.localName==="a"&&B.target.hash&&((O=(k=B.target)==null?void 0:k.dataset)!=null&&O.name)){B.preventDefault();const{hash:Y}=B.target;o(Y.replace("#",""))}},j=()=>{h("Copied"),setTimeout(()=>{h("Copy code")},1e3)},G=()=>{P("Link copied"),setTimeout(()=>{P("Copy link")},3e3)};return L.jsx("div",{onClick:E,id:`#${s}`,children:L.jsxs("div",{className:"manual-content-wrapper",children:[L.jsxs("div",{className:"manual-content-header",children:[L.jsxs("div",{children:[L.jsx("h3",{className:"manual-content-header-title",children:l==null?void 0:l.name}),!!(l!=null&&l.overloads)&&L.jsx("span",{className:"manual-content-header-overloads",children:l==null?void 0:l.overloads})]}),L.jsx(vn,{text:(l==null?void 0:l.name)||"",onCopy:G,children:L.jsx("div",{"data-tooltip":T,className:"manual-content-btn",children:L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 28 28",width:"28",height:"28",children:L.jsxs("g",{fill:"currentColor",children:[L.jsx("path",{fillRule:"nonzero",d:"M15.039 5.969l-.019-.019-2.828 2.828.707.707 2.474-2.474c1.367-1.367 3.582-1.367 4.949 0s1.367 3.582 0 4.949l-2.474 2.474.707.707 2.828-2.828-.019-.019c1.415-1.767 1.304-4.352-.334-5.99-1.638-1.638-4.224-1.749-5.99-.334zM5.97 15.038l-.019-.019 2.828-2.828.707.707-2.475 2.475c-1.367 1.367-1.367 3.582 0 4.949s3.582 1.367 4.949 0l2.474-2.474.707.707-2.828 2.828-.019-.019c-1.767 1.415-4.352 1.304-5.99-.334-1.638-1.638-1.749-4.224-.334-5.99z"}),L.jsx("path",{d:"M10.485 16.141l5.656-5.656.707.707-5.656 5.656z"})]})})})})]}),(V=l==null?void 0:l.desc)==null?void 0:V.map((B,k)=>L.jsx("div",{dangerouslySetInnerHTML:{__html:B},className:"manual-content-text"},k)),(l==null?void 0:l.type)&&L.jsxs(R.Fragment,{children:[L.jsx("div",{className:"manual-content-sub-title",children:"type"}),L.jsx("div",{className:"manual-content-text",children:l.type})]}),(l==null?void 0:l.syntax)&&L.jsxs(R.Fragment,{children:[L.jsxs("div",{className:"manual-content-sub-title",children:["Syntax ",!!(l!=null&&l.overloads)&&"& Overloads"]}),l.syntax.map((B,k)=>{var O;return(((O=l.syntax)==null?void 0:O.length)||0)>1?L.jsx("div",{onClick:()=>F(k),children:L.jsx("pre",{className:`manual-content-syntax with-overloads ${k===y?"selected":""}`,children:B})},k):L.jsx("pre",{className:"manual-content-syntax",children:B},k)})]}),(l==null?void 0:l.args)&&L.jsxs(R.Fragment,{children:[L.jsx("div",{className:"manual-content-sub-title",children:"arguments"}),l.args.map((B,k)=>L.jsxs("div",{className:"manual-content-text",children:[L.jsx("span",{className:"manual-content-args-label",children:B.label})," ",L.jsx("span",{dangerouslySetInnerHTML:{__html:B.desc||""}})]},k))]}),(l==null?void 0:l.fields)&&L.jsxs(R.Fragment,{children:[L.jsx("div",{className:"manual-content-sub-title",children:"fields"}),l.fields.map((B,k)=>L.jsxs("div",{className:"manual-content-text",children:[L.jsx("span",{className:"manual-content-args-label",children:B.label})," ",L.jsx("span",{dangerouslySetInnerHTML:{__html:B.desc||""}})]},k))]}),(l==null?void 0:l.examples)&&L.jsxs(R.Fragment,{children:[L.jsxs("div",{className:"manual-content-sub-title manual-content-example-header",children:[L.jsx("div",{children:L.jsx("span",{children:"example"})}),L.jsx(vn,{text:l.originalExample||"",onCopy:j,children:L.jsx("div",{"data-tooltip":b,className:"manual-content-btn manual-content-example-copy",children:L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",fill:"none",children:L.jsx("path",{stroke:"currentColor",d:"M8 9.5H6.5a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1h11a1 1 0 0 0 1-1V20m-8-1.5h11a1 1 0 0 0 1-1v-11a1 1 0 0 0-1-1h-11a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1z"})})})})]}),L.jsx("pre",{className:"manual-content-example",children:L.jsx("code",{dangerouslySetInnerHTML:{__html:l.examples}})})]}),(l==null?void 0:l.detailedDesc)&&l.detailedDesc.map((B,k)=>L.jsxs(R.Fragment,{children:[B.desc.map((O,Y)=>L.jsx("div",{className:"manual-content-text",dangerouslySetInnerHTML:{__html:O}},Y)),L.jsxs("div",{className:"manual-content-sub-title manual-content-example-header",children:[L.jsx("div",{children:L.jsx("span",{children:"example"})}),L.jsx(vn,{text:B.originalExample||"",onCopy:j,children:L.jsx("div",{"data-tooltip":b,className:"manual-content-btn manual-content-example-copy",children:L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",fill:"none",children:L.jsx("path",{stroke:"currentColor",d:"M8 9.5H6.5a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1h11a1 1 0 0 0 1-1V20m-8-1.5h11a1 1 0 0 0 1-1v-11a1 1 0 0 0-1-1h-11a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1z"})})})})]}),L.jsx("pre",{className:"manual-content-example",children:L.jsx("code",{dangerouslySetInnerHTML:{__html:B.examples||""}})})]},k)),(l==null?void 0:l.returns)&&L.jsxs(R.Fragment,{children:[L.jsx("div",{className:"manual-content-sub-title",children:"returns"}),l.returns.map((B,k)=>L.jsx("div",{className:"manual-content-text",dangerouslySetInnerHTML:{__html:B}},k))]}),(l==null?void 0:l.remarks)&&L.jsxs(R.Fragment,{children:[L.jsx("div",{className:"manual-content-sub-title",children:"remarks"}),l.remarks.map((B,k)=>L.jsx("div",{className:"manual-content-text",dangerouslySetInnerHTML:{__html:B}},k))]}),(l==null?void 0:l.seeAlso)&&L.jsxs(R.Fragment,{children:[L.jsx("div",{className:"manual-content-sub-title",children:"see Also"}),L.jsx("div",{className:"manual-content-see_also",children:l.seeAlso.map((B,k)=>L.jsx("a",{className:"manual-content-see_also-tag","data-name":B==null?void 0:B.name,href:B==null?void 0:B.link,children:B==null?void 0:B.name},k))})]})]})})};ke.languages.register({id:Se}),ke.editor.defineTheme("vs-dark",cn),ke.editor.defineTheme("vs",ln),ke.languages.setMonarchTokensProvider(Se,Lr),ke.languages.setLanguageConfiguration(Se,on);const Km=({theme:a="vs-dark",currentValue:n})=>{const[s,o]=R.useState(ds[0]),[c,l]=R.useState(null),[m,y]=R.useState(0),[f,b]=R.useState(""),[h,T]=R.useState("var_bar_index"),P=R.useRef(null),U=R.useRef(null),F=k=>{k.key===(s==null?void 0:s.key)&&!(s!=null&&s.isHidden)?o({...k,isHidden:!0}):o(k)};R.useEffect(()=>{ke.editor.setTheme(a)},[a]),R.useEffect(()=>{if(n.value){const[k]=n.value.split("_"),O=ds.find(Y=>k===Y.prefix);O&&(y(n.index||0),V(O,n.value))}},[n]);const E=(k,O)=>{var Y;k!==h&&(O&&o(O),y(0),T(k),(Y=U.current)==null||Y.scrollTo({top:0}))},j=k=>{if(k.target.value.trim()==="")G();else{b(k.target.value);const O=Bm(k.target.value);l(O)}},G=()=>{b(""),l(null),setTimeout(()=>{var k,O;(O=(k=P.current)==null?void 0:k.querySelector(`a[data-href="${h}"]`))==null||O.scrollIntoView(!0)},10)},V=(k,O)=>{var Y;o(k),T(O),setTimeout(()=>{var S,W;(W=(S=P.current)==null?void 0:S.querySelector(`a[data-href="${O}"]`))==null||W.scrollIntoView(!0)},10),(Y=U.current)==null||Y.scrollTo({top:0})},B=k=>{const O=ds.find(Y=>k.startsWith(Y.prefix));O&&(y(0),V(O,k))};return L.jsxs("div",{className:`${a} manual-warpper`,children:[L.jsxs("div",{className:"manual-left",children:[L.jsxs("div",{className:"manual-search",children:[L.jsx("span",{className:"manual-search-icon",children:L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18",width:"18px",height:"18px",children:L.jsx("path",{fillRule:"evenodd",d:"M12.5 11h-.79l-.28-.27A6.47 6.47 0 0 0 13 6.5 6.5 6.5 0 1 0 6.5 13c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L17.49 16l-4.99-5zm-6 0C4.01 11 2 8.99 2 6.5S4.01 2 6.5 2 11 4.01 11 6.5 8.99 11 6.5 11z"})})}),L.jsx("input",{onChange:j,spellCheck:"false",value:f,className:"manual-search-input",autoComplete:"off",placeholder:"Search",type:"text"}),L.jsx("span",{onClick:G,className:`manual-search-clear ${f?"":"hide"}`,children:L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 95.939 95.939",width:"9",height:"9",children:L.jsx("path",{d:"M62.82 47.97l32.53-32.534a2 2 0 0 0 0-2.828L83.332.586a2 2 0 0 0-2.827 0L47.97 33.12 15.435.587c-.75-.75-2.078-.75-2.828 0L.587 12.607a2 2 0 0 0 0 2.83L33.12 47.97.588 80.504a2 2 0 0 0 0 2.828l12.02 12.02a1.997 1.997 0 0 0 2.83 0L47.97 62.818l32.535 32.535a2 2 0 0 0 2.827 0l12.02-12.02c.78-.783.78-2.05 0-2.83L62.82 47.97z"})})})]}),L.jsx("div",{className:`manual-group-search-list manual-scroll ${f?"":"hide"}`,children:L.jsxs("div",{children:[c==null?void 0:c.labelList.map(k=>L.jsx("a",{onClick:O=>{O.preventDefault(),E(k.key,k.group)},className:`manual-group-body-item ${k.key===h?"manual-group-body-item-selected":""}`,"data-href":k.key,href:`#${k.key}`,children:k.label},`search_${k.key}`)),L.jsx("div",{className:"manual-content-separator"}),c==null?void 0:c.contentList.map(k=>L.jsx("a",{onClick:O=>{O.preventDefault(),E(k.key,k.group)},className:`manual-group-body-item ${k.key===h?"manual-group-body-item-selected":""}`,"data-href":k.key,href:`#${k.key}`,children:k.label},`search_${k.key}`))]})}),L.jsx("div",{className:`manual-group-list manual-scroll ${f?"hide":""}`,ref:P,children:ds.map(k=>{var O,Y;return L.jsxs(R.Fragment,{children:[L.jsx("div",{onClick:()=>F(k),className:`manual-group-title ${k.key===(s==null?void 0:s.key)&&!(s!=null&&s.isHidden)?"active":""}`,children:k.title}),L.jsx("div",{className:`manual-group-body manual-scroll ${k.key!==(s==null?void 0:s.key)||s!=null&&s.isHidden?"hide":""}`,children:(Y=(O=no[k.key])==null?void 0:O.sort().filter(S=>!ao.includes(S)))==null?void 0:Y.map(S=>{const W=`${k.prefix}_${S}`;return L.jsx("a",{onClick:ae=>{ae.preventDefault(),E(W)},className:`manual-group-body-item ${W===h?"manual-group-body-item-selected":""}`,"data-href":W,href:`#${W}`,children:`${S}${k.prefix==="fun"?"()":""}`},W)})})]},k.key)})})]}),L.jsx("div",{ref:U,className:"manual-right manual-scroll",children:L.jsx(Um,{currentIndex:m,group:s,itemKey:h,onItemClick:B})})]})};A.ReferenceManual=Km,A.TradingVueDiffEditor=xm,A.TradingVueEditor=bm,A.parseLibrary=ym,A.parseTcc=Ao,A.removeScript=_m,A.scriptsRun=qo,Object.defineProperty(A,Symbol.toStringTag,{value:"Module"})});